@antv/aimapui 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,49 +1,49 @@
1
- var AimapUI=(function(W,i,u,Ut,Ie,M0,k0,S0){"use strict";function z0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ge=z0(Ut),He={basemap:"map",center:[105,35],zoom:4,pitch:0,rotation:0};function Xe(e){return{basemap:e.basemap??He.basemap,engine:e.engine,token:e.token,style:e.style,center:e.center??[...He.center],zoom:e.zoom??He.zoom,pitch:e.pitch??He.pitch,rotation:e.rotation??He.rotation,minZoom:e.minZoom,maxZoom:e.maxZoom,bounds:e.bounds,gestureConfig:e.gestureConfig}}let H0=0;function V0(){return`aimap-layer-${++H0}`}function qt(e){return{id:e.id??V0(),type:e.type,name:e.name??e.type,visible:e.visible??!0,zIndex:e.zIndex??0,minZoom:e.minZoom,maxZoom:e.maxZoom,autoFit:e.autoFit??!1,source:e.source,sourceType:e.sourceType,sourceConfig:e.sourceConfig,color:e.color,colorField:e.colorField,colorValues:e.colorValues,size:e.size,sizeField:e.sizeField,sizeValues:e.sizeValues,shape:e.shape,shapeField:e.shapeField,shapeValues:e.shapeValues,style:e.style,filterField:e.filterField,filterValues:e.filterValues,animate:e.animate,active:e.active,select:e.select,events:e.events}}const E0={zoom:"topright",scale:"bottomleft",fullscreen:"topright",geoLocate:"topright",mapTheme:"topright",mouseLocation:"bottomright",exportImage:"topright",layerSwitch:"topright",draw:"topright"};function Yt(e){return{type:e.type,position:e.position??E0[e.type]??"topright",options:e.options}}const A0={breakpoint:768};function Z0(e){return{breakpoint:(e==null?void 0:e.breakpoint)??A0.breakpoint,mobile:e==null?void 0:e.mobile}}function it(e){return{map:Xe(e.map),layers:(e.layers??[]).map(qt),controls:(e.controls??[]).map(Yt),interactions:e.interactions??[],legends:e.legends??[],responsive:e.responsive?Z0(e.responsive):void 0,events:e.events}}function Xt(e){return it(e)}function F0(e){const t=[];if(e.basemap||t.push("map.basemap is required"),e.center){const[n,r]=e.center;(n<-180||n>180)&&t.push("map.center[0] (longitude) must be between -180 and 180"),(r<-90||r>90)&&t.push("map.center[1] (latitude) must be between -90 and 90")}return t}function T0(e,t){const n=[];return e.type||n.push(`layers[${t}].type is required`),e.source===void 0&&e.source,e.colorField&&!e.colorValues&&e.color,n}function N0(e){const t=[];return t.push(...F0(e.map)),(e.layers??[]).forEach((n,r)=>{t.push(...T0(n,r))}),{valid:t.length===0,errors:t}}const Gt=u.createContext(null);function Jt({schema:e,children:t}){return i.jsx(Gt.Provider,{value:e,children:t})}function I0(){return u.useContext(Gt)}class Kt{constructor(){this.listeners=new Map}on(t,n){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n),()=>{var r;(r=this.listeners.get(t))==null||r.delete(n)}}once(t,n){const r=(...l)=>{n(...l),o()},o=this.on(t,r);return o}emit(t,...n){const r=this.listeners.get(t);r&&r.forEach(o=>{try{o(...n)}catch(l){console.error(`[aimapui EventBus] Error in event "${t}":`,l)}})}off(t){this.listeners.delete(t)}clear(){this.listeners.clear()}}function Qt(){return new Kt}const Rt=u.createContext(null);function e1({events:e,children:t}){const n=u.useRef(null);return n.current||(n.current=Qt()),u.useEffect(()=>{if(!e||!n.current)return;const r=n.current,o=[];for(const[l,s]of Object.entries(e))s&&o.push(r.on(l,s));return()=>{o.forEach(l=>l())}},[e]),i.jsx(Rt.Provider,{value:n.current,children:t})}function lt(){const e=u.useContext(Rt);if(!e)throw new Error("[aimapui] useEventBus must be used within an EventBusProvider");return e}const t1=u.createContext({resolvedTheme:"light",theme:"light",setTheme:()=>{},toggleTheme:()=>{}});function n1({defaultTheme:e="light",target:t="container",children:n}){const[r,o]=u.useState(e),[l,s]=u.useState("light");u.useEffect(()=>{const h=window.matchMedia("(prefers-color-scheme: dark)");s(h.matches?"dark":"light");const f=p=>{s(p.matches?"dark":"light")};return h.addEventListener("change",f),()=>h.removeEventListener("change",f)},[]);const a=r==="system"?l:r,c=u.useCallback(()=>{o(h=>h==="system"?l==="light"?"dark":"light":h==="light"?"dark":"light")},[l]);u.useEffect(()=>{t==="root"&&document.documentElement.setAttribute("data-theme",a)},[a,t]);const d=u.useMemo(()=>({resolvedTheme:a,theme:r,setTheme:o,toggleTheme:c}),[a,r,c]);return i.jsx(t1.Provider,{value:d,children:t==="container"?i.jsx("div",{"data-theme":a,style:{display:"contents"},children:n}):n})}function r1(){return u.useContext(t1)}const P0=u.createContext({isMobile:!1,breakpoint:768,width:typeof window<"u"?window.innerWidth:1024,schema:void 0});function D0({responsive:e,children:t}){const[n,r]=u.useState(typeof window<"u"?window.innerWidth:1024);u.useEffect(()=>{let a;const c=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(()=>r(window.innerWidth))};return window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c),cancelAnimationFrame(a)}},[]);const o=(e==null?void 0:e.breakpoint)??768,l=n<o,s=u.useMemo(()=>({isMobile:l,breakpoint:o,width:n,schema:e}),[l,o,n,e]);return i.jsx(P0.Provider,{value:s,children:t})}const o1=u.createContext(null);function s1({scene:e,children:t}){const n=u.useRef(e);return n.current=e,i.jsx(o1.Provider,{value:n.current,children:t})}function me(){return u.useContext(o1)}async function i1(e){var l,s,a;const t=e.basemap??He.basemap,n=e.token??"",r=e.style??"normal",o={center:e.center??He.center,zoom:e.zoom??He.zoom,pitch:e.pitch??He.pitch,rotation:e.rotation??He.rotation,minZoom:e.minZoom,maxZoom:e.maxZoom,dragEnable:((l=e.gestureConfig)==null?void 0:l.dragPan)??!0,zoomEnable:((s=e.gestureConfig)==null?void 0:s.pinchZoom)??!0,rotateEnable:((a=e.gestureConfig)==null?void 0:a.dragRotate)??!0};if(e.engine)return new e.engine({...o,style:r,token:n});switch(t){case"gaode":{const{GaodeMap:c}=await import("@antv/l7-maps/gaode");return new c({...o,style:$0(r),token:n})}case"mapbox":{const{Mapbox:c}=await import("@antv/l7-maps/mapbox");return new c({...o,style:_0(r),token:n})}case"tianditu":{const{TMap:c}=await import("@antv/l7-maps/tianditu");return new c({...o,token:n})}case"tencent":{const{TencentMap:c}=await import("@antv/l7-maps/tencent");return new c({...o,token:n})}case"baidu":{const{BaiduMap:c}=await import("@antv/l7-maps/baidu");return new c({...o,style:O0(r),token:n})}case"maplibre":{const{MapLibre:c}=await import("@antv/l7-maps/maplibre");return new c({...o,style:B0(r),token:n})}case"google":{const{GoogleMap:c}=await import("@antv/l7-maps/google"),d=new c({...o,style:j0(r),token:n});return W0(d),d}case"map":default:{const{Map:c}=await import("@antv/l7-maps/simple");return new c({center:e.center??He.center,zoom:e.zoom??He.zoom})}}}function $0(e){return{light:"light",dark:"dark",normal:"normal",darkblue:"dark",satellite:"satellite"}[e]??e}function _0(e){return{light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark",normal:"https://tiles.openfreemap.org/styles/bright",liberty:"https://tiles.openfreemap.org/styles/liberty",fiord:"https://tiles.openfreemap.org/styles/fiord"}[e]??e}function O0(e){return{light:"light",dark:"dark",normal:"normal",darkblue:"dark",satellite:"satellite"}[e]??e}function j0(e){return{light:"roadmap",dark:"roadmap",normal:"roadmap",darkblue:"roadmap",satellite:"satellite",hybrid:"hybrid",terrain:"terrain"}[e]??"roadmap"}function B0(e){return{light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark",normal:"https://tiles.openfreemap.org/styles/bright",liberty:"https://tiles.openfreemap.org/styles/liberty",fiord:"https://tiles.openfreemap.org/styles/fiord"}[e]??e}function W0(e){const t=["zoomControl","mapTypeControl","streetViewControl","fullscreenControl","scaleControl","rotateControl","panControl"],n={};for(const s of t)n[s]=!1;const r=()=>{const s=e.map;if(!s||typeof s.setOptions!="function")return!1;s.setOptions(n);const a=s.setOptions.bind(s);return s.setOptions=c=>{const d={...c};for(const h of t)h in d&&delete d[h];a(d)},!0};if(r())return;let o=0;const l=setInterval(()=>{o+=1,(r()||o>100)&&clearInterval(l)},50)}function l1({mapSchema:e,children:t,onSceneReady:n,mapEventHandlers:r,events:o,className:l,style:s}){const a=u.useRef(null),c=u.useRef(null),[d,h]=u.useState(null),f=u.useRef(n);f.current=n;const p=u.useRef(r);p.current=r;const g=lt(),y=u.useCallback((k,L)=>{var M,H,N;if(L.basemap==="map")return;const z=((M=L.gestureConfig)==null?void 0:M.dragPan)??!0,E=((H=L.gestureConfig)==null?void 0:H.pinchZoom)??!0,T=((N=L.gestureConfig)==null?void 0:N.dragRotate)??!0;try{const V=k.mapService;if(V&&typeof V.setMapStatus=="function"&&V.setMapStatus({dragEnable:z,zoomEnable:E,rotateEnable:T,doubleClickZoom:E}),L.basemap==="google"&&(V!=null&&V.map)){const F=V.map;typeof F.setOptions=="function"&&F.setOptions({zoomControl:!1,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1,scaleControl:!1,rotateControl:!1,panControl:!1})}}catch{}},[]);u.useEffect(()=>{if(!a.current)return;let k=!1;const L=Xe(e),z=T=>{if(k||!a.current)return;const M=new Ut.Scene({id:a.current,map:T,logoVisible:!1});c.current=M,M.on("loaded",()=>{var H;k||(y(M,L),h(M),(H=f.current)==null||H.call(f,M),E(M))}),L.bounds&&M.on("loaded",()=>{try{const[H,N]=L.bounds;M.fitBounds([H[0],H[1],N[0],N[1]])}catch{}})};if(L.engine){const T={center:L.center,zoom:L.zoom,pitch:L.pitch,rotation:L.rotation,minZoom:L.minZoom,maxZoom:L.maxZoom,style:L.style??"normal",token:L.token??""},M=new L.engine(T);z(M)}else i1(L).then(z);function E(T){T.on("mapmove",()=>{var H,N;const M={originalEvent:null,center:[T.getCenter().lng,T.getCenter().lat],zoom:T.getZoom(),pitch:T.getPitch(),rotation:T.getRotation()};(N=(H=p.current)==null?void 0:H.onMove)==null||N.call(H,M),o!=null&&o.mapMove&&g.emit(o.mapMove,M)}),T.on("zoomchange",()=>{var H,N;const M={originalEvent:null,center:[T.getCenter().lng,T.getCenter().lat],zoom:T.getZoom(),pitch:T.getPitch(),rotation:T.getRotation()};(N=(H=p.current)==null?void 0:H.onZoom)==null||N.call(H,M),o!=null&&o.mapZoom&&g.emit(o.mapZoom,M)})}return()=>{if(k=!0,c.current){try{c.current.destroy()}catch{}c.current=null}h(null)}},[e.basemap,e.engine,y]);const C=JSON.stringify(e.center),b=JSON.stringify(e.gestureConfig);u.useEffect(()=>{if(!d)return;const k=Xe(e);try{d.setCenter(k.center)}catch{}try{d.setZoom(k.zoom)}catch{}try{d.setPitch(k.pitch)}catch{}try{d.setRotation(k.rotation)}catch{}y(d,k)},[d,C,e.zoom,e.pitch,e.rotation,b,y]);const x=u.useCallback(()=>{if(c.current)try{const k=c.current.map;k&&typeof k.resize=="function"&&k.resize()}catch{}},[]);return u.useEffect(()=>(window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)),[x]),i.jsx("div",{ref:a,className:l??"aimapui-container",style:s??{width:"100%",height:"100%"},children:d&&i.jsx(s1,{scene:d,children:t})})}function a1(e){if(e.colorField)return{field:e.colorField,values:e.colorValues};if(e.color)return{values:e.color}}function U0(e){if(e.sizeField)return{field:e.sizeField,values:e.sizeValues};if(e.size!==void 0)return{values:e.size}}function c1(e){if(e.shapeField)return{field:e.shapeField,values:e.shapeValues};if(e.shape)return{values:e.shape}}function at(e){return{color:a1(e),size:U0(e),shape:c1(e),style:e.style?{...e.style}:void 0}}function q0(e){var t,n;return{data:e.source,options:{parser:{type:"json",x:((t=e.sourceConfig)==null?void 0:t.x)??"lng",y:((n=e.sourceConfig)==null?void 0:n.y)??"lat"}}}}function Y0(e){var t,n;return{data:e.source,options:{parser:{type:"csv",x:(t=e.sourceConfig)==null?void 0:t.x,y:(n=e.sourceConfig)==null?void 0:n.y}}}}function ct(e){return{data:e.source,options:void 0}}function X0(e){var t;return(t=e.sourceConfig)!=null&&t.parser?{data:e.source,options:{parser:e.sourceConfig.parser}}:e.sourceType==="geojson"?ct(e):e.sourceType==="csv"?Y0(e):q0(e)}function u1(e){return{type:"PointLayer",sourceConfig:X0(e),visual:at(e),schema:e}}function d1(e){return{type:"LineLayer",sourceConfig:G0(e),visual:at(e),schema:e}}function G0(e){var t,n,r,o,l,s,a,c,d,h;return(t=e.sourceConfig)!=null&&t.parser?{data:e.source,options:{parser:e.sourceConfig.parser}}:e.sourceType==="geojson"?ct(e):e.sourceType==="csv"?{data:e.source,options:{parser:{type:"csv",x:(n=e.sourceConfig)==null?void 0:n.x,y:(r=e.sourceConfig)==null?void 0:r.y,x1:(o=e.sourceConfig)==null?void 0:o.x1,y1:(l=e.sourceConfig)==null?void 0:l.y1}}}:{data:e.source,options:{parser:{type:"json",x:((s=e.sourceConfig)==null?void 0:s.x)??"lng",y:((a=e.sourceConfig)==null?void 0:a.y)??"lat",x1:(c=e.sourceConfig)==null?void 0:c.x1,y1:(d=e.sourceConfig)==null?void 0:d.y1,coordinates:(h=e.sourceConfig)==null?void 0:h.coordinates}}}}function h1(e){return{type:"PolygonLayer",sourceConfig:J0(e),visual:at(e),schema:e}}function J0(e){var t;return e.sourceType==="geojson"?ct(e):{data:e.source,options:{parser:{type:"json",coordinates:((t=e.sourceConfig)==null?void 0:t.coordinates)??"coordinates"}}}}function p1(e){return{type:"HeatmapLayer",sourceConfig:K0(e),visual:Q0(e),schema:e}}function K0(e){var t,n,r,o,l,s,a,c;return(t=e.sourceConfig)!=null&&t.parser?{data:e.source,options:{parser:e.sourceConfig.parser,...e.sourceConfig.transforms?{transforms:e.sourceConfig.transforms}:{}}}:e.sourceType==="geojson"?{data:e.source,options:(n=e.sourceConfig)!=null&&n.transforms?{transforms:e.sourceConfig.transforms}:void 0}:e.sourceType==="csv"?{data:e.source,options:{parser:{type:"csv",x:(r=e.sourceConfig)==null?void 0:r.x,y:(o=e.sourceConfig)==null?void 0:o.y},...(l=e.sourceConfig)!=null&&l.transforms?{transforms:e.sourceConfig.transforms}:{}}}:{data:e.source,options:{parser:{type:"json",x:((s=e.sourceConfig)==null?void 0:s.x)??"lng",y:((a=e.sourceConfig)==null?void 0:a.y)??"lat"},...(c=e.sourceConfig)!=null&&c.transforms?{transforms:e.sourceConfig.transforms}:{}}}}function Q0(e){const t=e.sizeField?{field:e.sizeField,values:e.sizeValues}:void 0,n=a1(e),r=c1(e),o=e.style?{...e.style}:void 0;return{color:n,size:t,shape:r,style:o}}function f1(e){return{type:"RasterLayer",sourceConfig:R0(e),visual:en(e),schema:e}}function R0(e){var t;return(t=e.sourceConfig)!=null&&t.parser?{data:e.source,options:{parser:e.sourceConfig.parser}}:{data:e.source,options:e.sourceType==="raster"?{parser:{type:"raster",extent:[73.482190241,3.82501784112,135.106618732,53.557926206]}}:e.sourceType==="rasterTile"?{parser:{type:"rasterTile",tileSize:256,zoomOffset:1}}:void 0}}function en(e){return{color:void 0,size:void 0,shape:void 0,style:e.style?{...e.style}:void 0}}function g1(e){var t;return{type:"ImageLayer",sourceConfig:{data:e.source,options:{parser:((t=e.sourceConfig)==null?void 0:t.parser)??(e.sourceType==="image"?{type:"image"}:void 0)}},visual:{color:void 0,size:void 0,shape:void 0,style:e.style?{...e.style}:void 0},schema:e}}function ut(e,t,n,r){const o=u.useRef(t),l=u.useRef(n);o.current=t,l.current=n;const s=u.useRef(r);s.current=r;const a=u.useRef(null),c=u.useRef(e);c.current=e;const d=u.useCallback(()=>{const f=c.current;if(f)try{const p=f.mapService;if(p){const g=p.lngLatToContainer([o.current,l.current]);g&&s.current(g.x,g.y)}else{const g=f.lngLatToContainer([o.current,l.current]);g&&s.current(g.x,g.y)}}catch{}},[]),h=u.useCallback(()=>{d()},[d]);u.useEffect(()=>{if(!e)return;const f=()=>{setTimeout(()=>d(),0)};return e.loaded?f():e.on("loaded",f),()=>{e.off("loaded",f)}},[e,d]),u.useEffect(()=>{d()},[t,n,d]),u.useEffect(()=>{if(e){try{const f=e.mapService;if(f)return f.on("camerachange",h),f.on("viewchange",h),()=>{f.off("camerachange",h),f.off("viewchange",h)}}catch{}return e.on("camerachange",h),e.on("resize",h),()=>{e.off("camerachange",h),e.off("resize",h)}}},[e,h]),u.useEffect(()=>()=>{a.current!==null&&(cancelAnimationFrame(a.current),a.current=null)},[])}function fe(...e){return M0(e)}function tn(e,t=1){const n=e.replace("#","").match(/.{2}/g);if(!n||n.length<3)return e;const[r,o,l]=n.map(s=>parseInt(s,16));return`rgba(${r}, ${o}, ${l}, ${t})`}function Ge(e){return typeof e=="string"&&/<[a-zA-Z][^>]*>/.test(e)}let Ue=null;const dt=new Set;function nn(e,t){Ue&&Ue!==e&&dt.forEach(n=>n(e)),Ue=e}function rn(e){Ue===e&&(Ue=null)}function on(e,t,n,r,o,l,s,a){if(s!=="auto")return je(s,a);const c=t,d=l-t,h=e,f=o-e,p=8;if(c>=r+a+p)return je("top",a);if(d>=r+a+p)return je("bottom",a);if(f>=n+a+p)return je("right",a);if(h>=n+a+p)return je("left",a);const y=Object.entries({top:c,bottom:d,right:f,left:h}).sort((C,b)=>b[1]-C[1])[0][0];return je(y,a)}function je(e,t){switch(e){case"top":return{placement:"top",transform:`translate(-50%, -100%) translateY(-${t}px)`};case"bottom":return{placement:"bottom",transform:`translate(-50%, 0) translateY(${t}px)`};case"left":return{placement:"left",transform:`translate(-100%, -50%) translateX(-${t}px)`};case"right":return{placement:"right",transform:`translate(0, -50%) translateX(${t}px)`}}}function Je({onClick:e}){return i.jsx("button",{onClick:t=>{t.stopPropagation(),e()},className:"aimapui-popup-close-btn absolute top-2 right-2 size-8 flex items-center justify-center text-on-surface-variant rounded-lg transition-[color,background] duration-200 cursor-pointer bg-transparent border-none p-0 hover:text-on-surface hover:bg-surface-container-high [&_.material-symbols-outlined]:text-xl","aria-label":"关闭",children:i.jsx("span",{className:"material-symbols-outlined",children:"close"})})}const sn={top:"M0 0L8 8L16 0",bottom:"M0 8L8 0L16 8",left:"M0 0L8 8L0 16",right:"M8 0L0 8L8 16"};function Ke({placement:e}){const t=e==="top"||e==="bottom",n=t?16:8,r=t?8:16,o=t?"0 0 16 8":"0 0 8 16",l=sn[e];return i.jsx("div",{className:`aimapui-popup-tip-arrow aimapui-popup-tip-arrow--${e==="top"?"bottom":e==="bottom"?"top":e}`,children:i.jsxs("svg",{width:n,height:r,viewBox:o,fill:"none",children:[i.jsx("path",{d:l,fill:"rgba(248, 249, 255, 0.95)"}),i.jsx("path",{d:l,stroke:"rgba(195, 198, 215, 0.3)",strokeWidth:"0.5",fill:"none"})]})})}function ln({header:e,onClose:t}){return e.coverUrl?i.jsxs("div",{className:"aimapui-popup-cover relative aspect-video overflow-hidden",children:[i.jsx("img",{src:e.coverUrl,alt:e.title,className:"aimapui-popup-cover-img w-full h-full object-cover"}),i.jsx("button",{className:"aimapui-popup-close-btn aimapui-popup-close-btn--cover absolute top-2 right-2 size-8 bg-black/30 backdrop-blur-sm text-white flex items-center justify-center rounded-full border-none cursor-pointer transition-colors duration-200 z-10 hover:bg-black/50 [&_.material-symbols-outlined]:text-lg","aria-label":"关闭",onClick:n=>{n.stopPropagation(),t()},children:i.jsx("span",{className:"material-symbols-outlined",children:"close"})}),e.statusLabel&&i.jsxs("div",{className:"aimapui-popup-status-badge absolute bottom-2 left-2 flex items-center gap-1.5 px-2 py-0.5 bg-surface/90 backdrop-blur-sm rounded-md shadow-sm text-[10px] font-semibold uppercase tracking-wide text-on-surface",children:[i.jsx("div",{className:"size-2 rounded-full",style:{background:e.statusColor||"#10b981"}}),i.jsx("span",{children:e.statusLabel})]})]}):null}function an({header:e,onClose:t,hasCover:n,showStatusDot:r}){return i.jsxs("div",{className:fe("aimapui-popup-header relative flex items-center p-4",!n&&"pr-10"),children:[r&&e.statusDot&&i.jsx("div",{className:"size-2 rounded-full shrink-0 mr-2 animate-pulse",style:{background:e.statusDot}}),i.jsx("h3",{className:"aimapui-popup-title text-xl leading-7 font-semibold text-on-surface m-0 flex-1 min-w-0 truncate",children:e.title}),!n&&i.jsx(Je,{onClick:t})]})}function cn({attributes:e,size:t}){const n=t==="compact",r=t==="detailed",o=n?1:2;return i.jsx("div",{className:fe("aimapui-popup-attrs",n?"flex flex-col":"grid gap-2"),style:n?void 0:{gridTemplateColumns:`repeat(${o}, 1fr)`},children:e.map((l,s)=>r&&l.icon?i.jsxs("div",{className:"aimapui-popup-attr flex items-center gap-2",children:[i.jsx("div",{className:"aimapui-popup-attr-icon size-12 rounded-lg bg-surface-container-highest flex items-center justify-center text-primary shrink-0 [&_.material-symbols-outlined]:text-[28px]",children:i.jsx("span",{className:"material-symbols-outlined",children:l.icon})}),i.jsxs("div",{children:[i.jsx("p",{className:"aimapui-popup-attr-label text-sm leading-5 text-on-surface-variant m-0",children:l.label}),i.jsx("p",{className:"aimapui-popup-attr-value text-sm leading-5 font-medium text-on-surface m-0",style:l.valueColor?{color:l.valueColor}:void 0,children:l.value})]})]},s):i.jsxs("div",{className:fe("aimapui-popup-attr","flex justify-between items-baseline gap-2",n&&"py-2 border-b border-outline-variant/30 last:border-b-0 last:pb-0 first:pt-0"),children:[i.jsx("p",{className:"aimapui-popup-attr-label text-sm leading-5 text-on-surface-variant m-0",children:l.label}),i.jsx("p",{className:"aimapui-popup-attr-value text-sm leading-5 font-medium text-on-surface m-0 text-right",style:l.valueColor?{color:l.valueColor}:void 0,children:l.value})]},s))})}function un({actions:e}){return i.jsx("div",{className:"aimapui-popup-actions flex gap-3 px-4 pb-4",children:e.map((t,n)=>i.jsx("button",{className:fe("aimapui-popup-action-btn","flex-1 py-2.5 text-sm leading-5 font-semibold rounded-lg border-none cursor-pointer transition-all duration-150 active:scale-[0.98]",t.variant==="secondary"?"aimapui-popup-action-btn--secondary bg-transparent text-on-surface border-2 border-solid border-outline-variant hover:bg-surface-container-low":"aimapui-popup-action-btn--primary bg-primary text-on-primary shadow-sm hover:shadow-[0_4px_12px_rgba(0,74,198,0.3)]"),onClick:t.onClick,children:t.label},n))})}function qe({longitude:e,latitude:t,content:n,closeButton:r=!0,size:o="standard",placement:l="auto",offset:s=8,header:a,attributes:c,actions:d,visible:h,singleton:f=!1,overlayContainer:p,onClose:g,className:y}){const C=me(),b=h!==void 0,[x,k]=u.useState(!0),L=b?h:x,[z,E]=u.useState(!1),[T,M]=u.useState("top"),H=u.useRef(null),N=u.useRef(!0);u.useRef(!1);const V=u.useRef(Symbol("popup")),[F,A]=u.useState(null);u.useEffect(()=>{if(p||!C)return;const Y=()=>{try{const te=C.mapService;if(te&&typeof te.getMarkerContainer=="function"){const _=te.getMarkerContainer();if(_)return A(_),!0}}catch{}return!1};if(Y())return;const X=()=>{Y()};return C.loaded?X():C.on("loaded",X),()=>{C.off("loaded",X)}},[C,p]);const I=p??F,m=u.useCallback(()=>{z||(E(!0),setTimeout(()=>{b||k(!1),g==null||g(),E(!1)},150))},[b,g,z]);u.useEffect(()=>{if(!f||!L)return;const Y=V.current;return nn(Y),()=>rn(Y)},[f,L,m]),u.useEffect(()=>{if(!f)return;const Y=V.current,X=te=>{te!==Y&&L&&m()};return dt.add(X),()=>{dt.delete(X)}},[f,L,m]);const w=u.useRef(()=>{});w.current=(Y,X)=>{var R;const te=H.current;if(!te)return;const _=Math.round(Y),U=Math.round(X);let ce=0,ie=0;try{const B=C==null?void 0:C.mapService,G=(R=B==null?void 0:B.getContainer)==null?void 0:R.call(B);if(G){const ne=G.getBoundingClientRect();ce=ne.width||G.clientWidth||G.scrollWidth,ie=ne.height||G.clientHeight||G.scrollHeight}}catch{}const Q=te.querySelector(".aimapui-popup-content"),le=(Q==null?void 0:Q.offsetWidth)||320,Z=(Q==null?void 0:Q.offsetHeight)||200,{placement:v,transform:D}=on(_,U,le,Z,ce,ie,l,s);M(v),te.style.left="0",te.style.top="0",te.style.transform=`translate3d(${_}px, ${U}px, 0) ${D}`;let S;if(ce>0&&ie>0)S=_>=-2&&_<=ce+2&&U>=-2&&U<=ie+2;else{const B=te.parentElement;B&&B.clientWidth>0&&B.clientHeight>0?S=_>=0&&_<=B.clientWidth&&U>=0&&U<=B.clientHeight:S=N.current}N.current=S,te.style.display=S?"":"none"};const P=u.useCallback(()=>{if(C)try{const Y=C.mapService,X=Y?Y.lngLatToContainer([e,t]):C.lngLatToContainer([e,t]);X&&w.current(X.x,X.y)}catch{}},[C,e,t]);if(u.useEffect(()=>{if(!I||!L)return;const Y=requestAnimationFrame(()=>{P()});return()=>cancelAnimationFrame(Y)},[I,L,P]),u.useEffect(()=>{if(!L)return;const Y=X=>{X.key==="Escape"&&m()};return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[L,m]),u.useEffect(()=>{var _;if(!L||!I)return;const Y=U=>{const ce=H.current;if(!ce||ce.contains(U.target))return;const ie=U.target;ie.closest(".aimapui-marker")||ie.closest("[data-marker]")||m()};let X=null;try{const U=C==null?void 0:C.mapService;U&&(X=(_=U.getContainer)==null?void 0:_.call(U))}catch{}const te=X||I.parentElement||I;return te.addEventListener("click",Y,!0),()=>te.removeEventListener("click",Y,!0)},[L,I,C,m]),ut(C,e,t,(Y,X)=>{w.current(Y,X)}),!L||!I)return null;const $=a||c||d,j=!!(a!=null&&a.coverUrl),O=T==="left"||T==="right",K=()=>$?i.jsxs(i.Fragment,{children:[a&&j&&i.jsx(ln,{header:a,onClose:m}),a&&i.jsx(an,{header:a,onClose:m,hasCover:j,showStatusDot:o==="compact"}),i.jsxs("div",{className:fe("aimapui-popup-body relative p-4 text-sm leading-5 text-on-surface break-words whitespace-normal",!a&&r&&"pr-10"),children:[!a&&r&&i.jsx(Je,{onClick:m}),n&&!Ge(n)&&typeof n!="string"&&i.jsx("div",{children:n}),n&&Ge(n)&&i.jsx("div",{dangerouslySetInnerHTML:{__html:n}}),n&&!Ge(n)&&typeof n=="string"&&i.jsx("div",{children:n}),!n&&!(c!=null&&c.length)&&!(d!=null&&d.length)&&!a&&i.jsx("div",{style:{color:"var(--color-on-surface-variant)"},children:"无内容"}),c&&c.length>0&&i.jsx(cn,{attributes:c,size:o})]}),d&&d.length>0&&i.jsx(un,{actions:d})]}):Ge(n)?i.jsxs("div",{className:"aimapui-popup-body relative p-4 pt-2 pr-10 text-sm leading-5 text-on-surface break-words whitespace-normal",children:[r&&i.jsx(Je,{onClick:m}),i.jsx("div",{dangerouslySetInnerHTML:{__html:n}})]}):i.jsxs("div",{className:"aimapui-popup-body relative p-4 pt-2 pr-10 text-sm leading-5 text-on-surface break-words whitespace-normal",children:[r&&i.jsx(Je,{onClick:m}),i.jsx("div",{children:n??""})]}),ee=O?{display:"flex",alignItems:"center"}:{display:"flex",flexDirection:"column",alignItems:"center"};return Ie.createPortal(i.jsxs("div",{ref:H,className:fe("aimapui-popup",`aimapui-popup--${o}`),style:{position:"absolute",left:0,top:0,transform:"translate(-9999px, -9999px)",display:"none",zIndex:30,pointerEvents:"auto",...ee},children:[T==="bottom"&&i.jsx(Ke,{placement:T}),T==="right"&&i.jsx(Ke,{placement:T}),i.jsx("div",{className:fe("aimapui-popup-content overflow-hidden rounded-xl",z&&"aimapui-popup-content--exit",y),children:K()}),T==="top"&&i.jsx(Ke,{placement:T}),T==="left"&&i.jsx(Ke,{placement:T})]}),I)}const dn={top:"bottom",bottom:"top",left:"right",right:"left"},hn={top:"translate(-50%, -100%)",bottom:"translate(-50%, 0)",left:"translate(-100%, -50%)",right:"translate(0, -50%)"};function ht({content:e,variant:t="dark",longitude:n,latitude:r,targetElement:o,placement:l="top",offset:s=8,trigger:a="hover",visible:c,title:d,items:h,overlayContainer:f,className:p}){const{resolvedTheme:g}=r1(),y=me(),C=c!==void 0,[b,x]=u.useState(!1),k=C?c:b,L=u.useRef(null),z=u.useRef(null),E=n!==void 0&&r!==void 0;u.useEffect(()=>{if(E||!o||C)return;const m=()=>{z.current=setTimeout(()=>x(!0),100)},w=()=>{z.current&&(clearTimeout(z.current),z.current=null),x(!1)},P=()=>{z.current&&clearTimeout(z.current),x($=>!$)};return a==="hover"?(o.addEventListener("mouseenter",m),o.addEventListener("mouseleave",w)):o.addEventListener("click",P),()=>{z.current&&clearTimeout(z.current),o.removeEventListener("mouseenter",m),o.removeEventListener("mouseleave",w),o.removeEventListener("click",P)}},[o,a,E,C]);const T=u.useCallback(()=>{if(!o||!L.current)return;const m=o.getBoundingClientRect(),w=L.current.getBoundingClientRect();let P=0,$=0;switch(l){case"right":P=m.right+s,$=m.top+m.height/2-w.height/2;break;case"bottom":P=m.left+m.width/2-w.width/2,$=m.bottom+s;break;case"left":P=m.left-w.width-s,$=m.top+m.height/2-w.height/2;break;case"top":default:P=m.left+m.width/2-w.width/2,$=m.top-w.height-s;break}const j=8;P=Math.max(j,Math.min(P,window.innerWidth-w.width-j)),$=Math.max(j,Math.min($,window.innerHeight-w.height-j)),L.current.style.display="",L.current.style.left=`${P}px`,L.current.style.top=`${$}px`},[o,l,s]);u.useEffect(()=>{if(E||!k||!o)return;T();const m=()=>T();return window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),()=>{window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0)}},[k,o,E,T]);const M=u.useCallback(()=>{var m,w;if(!y)return null;try{const P=y.mapService,$=((m=P==null?void 0:P.getContainer)==null?void 0:m.call(P))??((w=y.getMapContainer)==null?void 0:w.call(y))??y.container;if($ instanceof HTMLElement)return $.getBoundingClientRect()}catch{}return null},[y]),H=u.useRef(()=>{});H.current=(m,w)=>{const P=L.current;if(!P||!E)return;let $=0,j=0;switch(l){case"top":j=-s;break;case"bottom":j=s;break;case"left":$=-s;break;case"right":$=s;break}const O=M();let K=!0;if(O&&O.width>0&&O.height>0&&(K=m>=-2&&m<=O.width+2&&w>=-2&&w<=O.height+2),!K){P.style.display="none";return}const ee=O?O.left:0,Y=O?O.top:0,X=Math.round(m+$+ee),te=Math.round(w+j+Y),_=hn[l];P.style.display="",P.style.transform=`translate3d(${X}px, ${te}px, 0) ${_}`};const N=u.useCallback(()=>{if(!(!y||!E))try{const m=y.mapService,w=m?m.lngLatToContainer([n,r]):y.lngLatToContainer([n,r]);if(!w||isNaN(w.x)||isNaN(w.y))return;H.current(w.x,w.y)}catch{}},[y,n,r,E]);if(u.useEffect(()=>{if(!E||!k)return;const m=requestAnimationFrame(()=>N());return()=>cancelAnimationFrame(m)},[k,E,N]),ut(E?y:null,n??0,r??0,(m,w)=>{H.current(m,w)}),!k)return null;const V=dn[l],F=d||h&&h.length>0,A=()=>e?typeof e=="string"?i.jsx("span",{dangerouslySetInnerHTML:{__html:e}}):e:F?i.jsxs(i.Fragment,{children:[d&&i.jsx("p",{className:"font-sans text-xs leading-4 font-semibold m-0 mb-0.5",children:d}),h&&h.length>0&&i.jsx("div",{className:"flex flex-col gap-0.5",children:h.map((m,w)=>i.jsxs("div",{className:"flex justify-between items-center gap-3",children:[i.jsx("span",{className:"text-xs leading-4 font-normal opacity-70 m-0",children:m.label}),i.jsx("span",{className:"font-mono text-xs leading-4 font-[450] text-right m-0",children:m.value})]},w))})]}):null,I=i.jsxs("div",{ref:L,"data-theme":g,className:fe("aimapui-tooltip",t!=="dark"&&`aimapui-tooltip--${t}`),style:{position:"fixed",left:0,top:0,transform:"translate(-9999px, -9999px)",display:"none",zIndex:9999,pointerEvents:"none"},children:[i.jsx("div",{className:fe("aimapui-tooltip-content",p),children:A()}),i.jsx("div",{className:`aimapui-tooltip-arrow aimapui-tooltip-arrow--${V}`})]});return Ie.createPortal(I,document.body)}function pn(e,t){let n;switch(e.type){case"point":n=u1(e);break;case"line":n=d1(e);break;case"polygon":n=h1(e);break;case"heatmap":n=p1(e);break;case"raster":n=f1(e);break;case"image":n=g1(e);break;default:return console.warn(`[aimapui] Unknown layer type: ${e.type}`),null}return fn(n)}function fn(e,t){var h;const n=ge[e.type];if(!n)throw new Error(`[aimapui] L7 layer class "${e.type}" not found`);const r=new n({...e.schema.zIndex!==void 0?{zIndex:e.schema.zIndex}:{},...e.schema.name?{name:e.schema.name}:{}}),{data:o,options:l}=e.sourceConfig;l?r.source(o,l):r.source(o);const{color:s,size:a,shape:c,style:d}=e.visual;if(s&&(s.field&&s.values?r.color(s.field,s.values):s.values&&r.color(s.values)),a&&(a.field&&a.values?r.size(a.field,a.values):a.values!==void 0&&r.size(a.values)),c&&(c.field&&c.values?r.shape(c.field,c.values):c.values&&r.shape(c.values)),d&&Object.keys(d).length>0&&r.style(d),e.type==="PointLayer"&&!c&&r.shape("circle"),e.type==="LineLayer"&&!c&&r.shape("line"),e.schema.filterField&&e.schema.filterValues){const f=e.schema.filterField,p=e.schema.filterValues;r.filter(f,g=>p.includes(g))}return(h=e.schema.animate)!=null&&h.enable&&r.animate(!0,e.schema.animate),e.schema.active&&r.active(e.schema.active),e.schema.select&&r.select(e.schema.select),e.schema.opacity!==void 0&&r.style({opacity:e.schema.opacity}),e.schema.blend&&r.blend(e.schema.blend),e.schema.visible===!1&&r.hide(),e.schema.minZoom!==void 0&&r.minZoom(e.schema.minZoom),e.schema.maxZoom!==void 0&&r.maxZoom(e.schema.maxZoom),r}function Qe(e,t,n){var a,c,d,h,f,p,g,y;const r=n,o=Number.isFinite((a=r==null?void 0:r.lnglat)==null?void 0:a.lng)?r.lnglat.lng:Number.isFinite((c=r==null?void 0:r.lngLat)==null?void 0:c.lng)?r.lngLat.lng:Number.isFinite((d=r==null?void 0:r.coordinate)==null?void 0:d.lng)?r.coordinate.lng:0,l=Number.isFinite((h=r==null?void 0:r.lnglat)==null?void 0:h.lat)?r.lnglat.lat:Number.isFinite((f=r==null?void 0:r.lngLat)==null?void 0:f.lat)?r.lngLat.lat:Number.isFinite((p=r==null?void 0:r.coordinate)==null?void 0:p.lat)?r.coordinate.lat:0,s=((g=r==null?void 0:r.feature)==null?void 0:g.properties)??(r==null?void 0:r.feature)??((y=r==null?void 0:r.data)==null?void 0:y.properties)??(r==null?void 0:r.data)??void 0;return{layerId:e,layerType:t,originalEvent:n,lng:o,lat:l,feature:s}}function Pe({schema:e,scene:t,eventHandlers:n,onLayerCreated:r}){const o=u.useRef(null),l=lt(),s=u.useRef(n);s.current=n;const a=u.useMemo(()=>{const{source:h,...f}=e;let p;if(ArrayBuffer.isView(h))p=`TypedArray:${h.length}`;else if(h&&typeof h=="object"&&"width"in h){const g=h;p=`Rasters:${g.width}x${g.height}:${g.length}`}else if(typeof h=="string")p=h;else try{p=JSON.stringify(h)}catch{p=String(h)}return p+"|"+gn(f)},[e]),[c,d]=u.useState({visible:!1,lng:0,lat:0,content:"",trigger:"click"});return u.useEffect(()=>{var T,M,H,N;const h=pn(e);if(!h)return;let f=!1;o.current=h;const p=e.id??e.name??`layer-${e.type}`,g=e.events,y=!!(g!=null&&g.enablePopup),C=(g==null?void 0:g.popupTrigger)??"click",b=V=>{if(!y)return;const F=V.feature;if(!F)return;const A=yn(F,g==null?void 0:g.popupFields,g==null?void 0:g.popupTemplate);d({visible:!0,lng:V.lng,lat:V.lat,content:A,trigger:C})},x=()=>{d(V=>({...V,visible:!1}))},k=!!((T=s.current)!=null&&T.onClick||g!=null&&g.click||y&&C==="click"),L=!!((M=s.current)!=null&&M.onMouseMove||g!=null&&g.mousemove||y&&C==="hover"),z=!!((H=s.current)!=null&&H.onMouseEnter||g!=null&&g.mouseenter),E=!!((N=s.current)!=null&&N.onMouseLeave||g!=null&&g.mouseleave||y&&C==="hover");return k&&h.on("click",V=>{var A,I;const F=Qe(p,e.type,V);(I=(A=s.current)==null?void 0:A.onClick)==null||I.call(A,F),g!=null&&g.click&&l.emit(g.click,F),C==="click"&&b(F)}),L&&h.on("mousemove",V=>{var A,I;const F=Qe(p,e.type,V);(I=(A=s.current)==null?void 0:A.onMouseMove)==null||I.call(A,F),C==="hover"&&b(F),g!=null&&g.mousemove&&l.emit(g.mousemove,F)}),z&&h.on("mouseenter",V=>{var A,I;const F=Qe(p,e.type,V);(I=(A=s.current)==null?void 0:A.onMouseEnter)==null||I.call(A,F),g!=null&&g.mouseenter&&l.emit(g.mouseenter,F)}),E&&h.on("mouseleave",V=>{var A,I;const F=Qe(p,e.type,V);(I=(A=s.current)==null?void 0:A.onMouseLeave)==null||I.call(A,F),C==="hover"&&x(),g!=null&&g.mouseleave&&l.emit(g.mouseleave,F)}),t.addLayer(h),r==null||r(h),h.on("inited",()=>{var V,F;if(!f){if(e.autoFit){const A=(F=(V=h.getSource)==null?void 0:V.call(h))==null?void 0:F.extent;if(A&&Array.isArray(A)&&A.length>=4){const[I,m,w,P]=A;isFinite(I)&&isFinite(m)&&isFinite(w)&&isFinite(P)&&I<w&&m<P&&t.fitBounds([[I,m],[w,P]])}}t.render()}}),()=>{if(f=!0,o.current){try{t.removeLayer(o.current)}catch{}o.current=null}d(V=>({...V,visible:!1}))}},[a,t,l]),u.useEffect(()=>{o.current&&(e.visible===!1?o.current.hide():o.current.show(),e.zIndex!==void 0&&(o.current.zIndex=e.zIndex))},[e.visible,e.zIndex]),c.visible?c.trigger==="hover"?i.jsx(ht,{longitude:c.lng,latitude:c.lat,content:c.content,variant:"dark",placement:"top",visible:!0}):i.jsx(qe,{longitude:c.lng,latitude:c.lat,content:c.content,closeButton:!0,size:"compact",onClose:()=>d(h=>({...h,visible:!1}))}):null}function gn(e){return JSON.stringify(pt(e))}function pt(e){if(ArrayBuffer.isView(e))return`[TypedArray:${e.length}]`;if(e instanceof ArrayBuffer)return`[ArrayBuffer:${e.byteLength}]`;if(Array.isArray(e))return e.length>1e3?`[Array:${e.length}]`:e.map(pt);if(e&&typeof e=="object"){const t=e,n=Object.keys(t).sort(),r={};return n.forEach(o=>{r[o]=pt(t[o])}),r}return e}function yn(e,t,n){return n?n.replace(/\{\{(\w+)\}\}/g,(l,s)=>String(e[s]??"")):`<table style="font-size:12px">${(t??Object.keys(e).filter(l=>!["_id","id","geometry","coordinates"].includes(l))).map(l=>`<tr><td style="font-weight:600;padding-right:8px">${l}</td><td>${e[l]??""}</td></tr>`).join("")}</table>`}function y1({layers:e,eventHandlers:t}){const n=me();return n?i.jsx(i.Fragment,{children:e.map((r,o)=>i.jsx(Pe,{schema:r,scene:n,eventHandlers:t},r.id??`layer-${o}`))}):null}const m1=u.createContext(!1);function Me(){return u.useContext(m1)}const ft=new Set,we={mark(e){e&&typeof e=="object"&&"$$typeof"in e&&ft.add(e),e&&typeof e=="function"&&ft.add(e)},check(e){if("position"in e.props)return!0;const t=e.type;if(ft.has(t))return!0;const n=t==null?void 0:t.displayName;return!!(typeof n=="string"&&n.endsWith("Control"))}};function gt({children:e,className:t,style:n}){const{controlGroups:r,otherChildren:o}=mn(e);return i.jsx(m1.Provider,{value:!0,children:i.jsxs("div",{className:`l7-control-container${t?` ${t}`:""}`,style:n,children:[Object.entries(r).map(([l,s])=>{const a=vn(l);return i.jsx("div",{className:`l7-control-anchor ${a}`,children:s},l)}),o]})})}function mn(e){const t={},n=[];return u.Children.forEach(e,(r,o)=>{var l;if(!u.isValidElement(r)){n.push(r);return}if(we.check(r)){const s=((l=r.props)==null?void 0:l.position)??"topright";t[s]||(t[s]=[]),t[s].push(r)}else n.push(u.isValidElement(r)?u.cloneElement(r,{key:r.key??`non-ctrl-${o}`}):r)}),{controlGroups:t,otherChildren:n}}function Cn(e){switch(e){case"topleft":return{vSide:"top",hSide:"left",direction:"column"};case"topright":return{vSide:"top",hSide:"right",direction:"column"};case"bottomleft":return{vSide:"bottom",hSide:"left",direction:"column"};case"bottomright":return{vSide:"bottom",hSide:"right",direction:"column"};case"topcenter":return{vSide:"top",hSide:"left",direction:"row"};case"bottomcenter":return{vSide:"bottom",hSide:"left",direction:"row"};case"lefttop":return{vSide:"top",hSide:"left",direction:"row"};case"leftbottom":return{vSide:"bottom",hSide:"left",direction:"row"};case"righttop":return{vSide:"top",hSide:"right",direction:"row"};case"rightbottom":return{vSide:"bottom",hSide:"right",direction:"row"};default:return{vSide:"top",hSide:"right",direction:"column"}}}function vn(e){if(e==="rightcenter")return"l7-rightcenter l7-column";if(e==="leftcenter")return"l7-leftcenter l7-column";const{vSide:t,hSide:n,direction:r}=Cn(e);return`l7-${t} l7-${n} l7-${r}`}function ke(e){const t=me(),n=u.useMemo(()=>{if(!t)return null;try{return t.mapService??null}catch{return null}},[t]),r=u.useCallback(()=>{var l;if(!t)return null;try{return n&&typeof n.getContainer=="function"?n.getContainer():((l=t.getContainer)==null?void 0:l.call(t))??null}catch{return null}},[t,n]),o=u.useMemo(()=>{if(e==="rightcenter")return"l7-rightcenter l7-column";if(e==="leftcenter")return"l7-leftcenter l7-column";const{vSide:l,hSide:s,direction:a}=bn(e??"topright");return`l7-${l} l7-${s} l7-${a}`},[e]);return{scene:t,mapsService:n,getMapContainer:r,positionClassName:o}}function bn(e){switch(e){case"topleft":return{vSide:"top",hSide:"left",direction:"column"};case"topright":return{vSide:"top",hSide:"right",direction:"column"};case"bottomleft":return{vSide:"bottom",hSide:"left",direction:"column"};case"bottomright":return{vSide:"bottom",hSide:"right",direction:"column"};case"topcenter":return{vSide:"top",hSide:"left",direction:"row"};case"bottomcenter":return{vSide:"bottom",hSide:"left",direction:"row"};case"lefttop":return{vSide:"top",hSide:"left",direction:"row"};case"leftbottom":return{vSide:"bottom",hSide:"left",direction:"row"};case"righttop":return{vSide:"top",hSide:"right",direction:"row"};case"rightbottom":return{vSide:"bottom",hSide:"right",direction:"row"};case"rightcenter":return{vSide:"top",hSide:"right",direction:"column"};case"leftcenter":return{vSide:"top",hSide:"left",direction:"column"};default:return{vSide:"top",hSide:"right",direction:"column"}}}function yt({position:e="bottomright",zoomInText:t,zoomInTitle:n="Zoom in",zoomOutText:r,zoomOutTitle:o="Zoom out",showZoom:l=!1,className:s,style:a}){const{scene:c,mapsService:d,positionClassName:h}=ke(e),f=Me(),[p,g]=u.useState(0),[y,C]=u.useState(!0),[b,x]=u.useState(!0),k=u.useRef(()=>{if(!d)return;const T=Math.floor(d.getZoom());g(T),C(d.getZoom()<d.getMaxZoom()),x(d.getZoom()>d.getMinZoom())});u.useEffect(()=>{if(!d)return;k.current();const T=()=>k.current();return d.on("zoomend",T),d.on("zoomchange",T),()=>{d.off("zoomend",T),d.off("zoomchange",T)}},[d]);const L=()=>{if(!d||!c)return;const T=d.getZoom(),M=d.getMaxZoom();if(T<M){const H=Math.min(T+1,M);c.setZoom(H)}},z=()=>{if(!d||!c)return;const T=d.getZoom(),M=d.getMinZoom();if(T>M){const H=Math.max(T-1,M);c.setZoom(H)}},E=i.jsxs("div",{className:`l7-control l7-control-zoom l7-control--glass${s?` ${s}`:""}`,style:a,children:[i.jsx("button",{className:"l7-button-control",onClick:L,disabled:!y,title:n,"aria-label":n,children:t??i.jsx("span",{className:"material-symbols-outlined",children:"add"})}),l&&i.jsx("button",{className:"l7-button-control l7-control-zoom__number",disabled:!0,children:p}),i.jsx("button",{className:"l7-button-control",onClick:z,disabled:!b,title:o,"aria-label":o,children:r??i.jsx("span",{className:"material-symbols-outlined",children:"remove"})})]});return f?E:i.jsx("div",{className:`l7-control-anchor ${h}`,children:E})}we.mark(yt);function Ln(e,t){const[n,r]=e,[o,l]=t,s=63710088e-1,a=(l-r)*Math.PI/180,c=(o-n)*Math.PI/180,d=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r*Math.PI/180)*Math.cos(l*Math.PI/180)*Math.sin(c/2)*Math.sin(c/2),h=2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d));return s*h}function mt(e){const t=Math.pow(10,Math.floor(Math.abs(e)).toString().length-1);let n=e/t;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,t*n}function Ct({position:e="bottomleft",maxWidth:t=100,metric:n=!0,imperial:r=!1,updateWhenIdle:o=!1,className:l,style:s}){const{mapsService:a,positionClassName:c}=ke(e),d=Me(),[h,f]=u.useState([]),p=u.useRef(()=>{if(a)try{const C=a.getSize()[1]/2,b=a.containerToLngLat([0,C]),x=a.containerToLngLat([t,C]);if(!b||!x)return;const k=Ln([b.lng,b.lat],[x.lng,x.lat]),L=[];if(n&&k){const z=mt(k),E=z<1e3?`${z} m`:`${z/1e3} km`;L.push({text:E,width:Math.round(t*(z/k))})}if(r&&k){const z=k*3.2808399;if(z>5280){const E=z/5280,T=mt(E);L.push({text:`${T} mi`,width:Math.round(t*(T/E))})}else{const E=mt(z);L.push({text:`${E} ft`,width:Math.round(t*(E/z))})}}f(L)}catch{}});u.useEffect(()=>{if(!a)return;p.current();const y=()=>p.current(),C=o?"moveend":"mapmove",b=o?"zoomend":"zoomchange";return a.on(C,y),a.on(b,y),()=>{a.off(C,y),a.off(b,y)}},[a,t,n,r,o]);const g=i.jsx("div",{className:`l7-control l7-control-scale l7-control--glass${l?` ${l}`:""}`,style:s,children:h.map((y,C)=>i.jsx("div",{className:"l7-control-scale-line",style:{width:y.width},children:y.text},C))});return d?g:i.jsx("div",{className:`l7-control-anchor ${c}`,children:g})}we.mark(Ct);function vt({position:e="topright",container:t,className:n,style:r}){const{getMapContainer:o,positionClassName:l}=ke(e),s=Me(),[a,c]=u.useState(!1),d=u.useCallback(()=>t??o()??document.documentElement,[t,o]),h=u.useCallback(()=>{const p=d();a?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():p.requestFullscreen?p.requestFullscreen():p.webkitRequestFullscreen&&p.webkitRequestFullscreen()},[a,d]);u.useEffect(()=>{const p=()=>{c(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",p),()=>document.removeEventListener("fullscreenchange",p)},[]);const f=i.jsx("div",{className:`l7-control l7-control--glass${n?` ${n}`:""}`,style:r,children:i.jsx("button",{className:"l7-button-control",onClick:h,title:a?"退出全屏":"全屏","aria-label":a?"退出全屏":"全屏",children:i.jsx("span",{className:"material-symbols-outlined",children:a?"fullscreen_exit":"fullscreen"})})});return s?f:i.jsx("div",{className:`l7-control-anchor ${l}`,children:f})}we.mark(vt);function bt({position:e="topright",transform:t,className:n,style:r}){const{mapsService:o,positionClassName:l}=ke(e),s=Me(),a=u.useCallback(async()=>{if(!window.navigator.geolocation){console.warn("[aimapui] Geolocation is not supported by this browser");return}if(o)try{const d=await new Promise((C,b)=>{window.navigator.geolocation.getCurrentPosition(({coords:x})=>C(x),x=>b(x))}),{longitude:h,latitude:f}=d;if(isNaN(h)||isNaN(f))return;const p=[h,f],g=t?await t(p):p,y=o.getZoom();o.setZoomAndCenter(y>15?y:15,g)}catch(d){console.warn("[aimapui] Geolocation error:",d)}},[o,t]),c=i.jsx("div",{className:`l7-control l7-control--glass${n?` ${n}`:""}`,style:r,children:i.jsx("button",{className:"l7-button-control",onClick:a,title:"定位","aria-label":"定位",children:i.jsx("span",{className:"material-symbols-outlined",children:"my_location"})})});return s?c:i.jsx("div",{className:`l7-control-anchor ${l}`,children:c})}we.mark(bt);const xn=["l7-popper-left","l7-popper-right","l7-popper-top","l7-popper-bottom"],wn=["l7-popper-start","l7-popper-end"];function Lt(e){switch(e){case"topleft":return"l7-popper-bottom l7-popper-start";case"topright":return"l7-popper-bottom l7-popper-end";case"bottomleft":return"l7-popper-top l7-popper-start";case"bottomright":return"l7-popper-top l7-popper-end";case"lefttop":return"l7-popper-right l7-popper-start";case"leftbottom":return"l7-popper-right l7-popper-end";case"righttop":return"l7-popper-left l7-popper-start";case"rightbottom":return"l7-popper-left l7-popper-end";default:return"l7-popper-bottom"}}function xt(e,t,n){const r=u.useRef(null),[o,l]=u.useState(()=>Lt(e));return u.useEffect(()=>{if(!t)return;const s=Lt(e);l(s),requestAnimationFrame(()=>{const a=r.current;if(!a)return;const c=a.getBoundingClientRect(),d=window.innerWidth,h=window.innerHeight;let f="",p="";if(c.bottom>h-8?f="l7-popper-top":c.top<8&&(f="l7-popper-bottom"),c.right>d-8?p="l7-popper-end":c.left<8&&(p="l7-popper-start"),!f&&!p)return;const g=s.split(" "),y=g.find(b=>xn.includes(b))??"",C=g.find(b=>wn.includes(b))??"";l(`${f||y} ${p||C}`.trim())})},[t,e]),{popperRef:r,popperClass:o}}const wt=[{text:"Standard",value:"normal",preview:"linear-gradient(135deg, #e8e8e8 0%, #c8d8e8 40%, #a8c8d8 100%)"},{text:"Light",value:"light",preview:"linear-gradient(135deg, #f0f4f8 0%, #d6e4f0 40%, #e8eff5 100%)"},{text:"Dark",value:"dark",preview:"linear-gradient(135deg, #0d1b2a 0%, #1b2838 40%, #162032 100%)"},{text:"Dark Blue",value:"darkblue",preview:"linear-gradient(135deg, #0a1628 0%, #0f2040 40%, #091a30 100%)"},{text:"Satellite",value:"satellite",preview:"linear-gradient(135deg, #1a3a1a 0%, #2d5a2d 40%, #1d4a2d 100%)"},{text:"Fresh",value:"fresh",preview:"linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 40%, #d4edda 100%)"}],Mn=[{text:"Positron",value:"https://tiles.openfreemap.org/styles/positron",preview:"linear-gradient(135deg, #f2f3f0 0%, #d8dcd6 40%, #e8ebe5 100%)"},{text:"Bright",value:"https://tiles.openfreemap.org/styles/bright",preview:"linear-gradient(135deg, #e8e8e8 0%, #c8d8e8 40%, #a8c8d8 100%)"},{text:"Dark",value:"https://tiles.openfreemap.org/styles/dark",preview:"linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%)"},{text:"Liberty",value:"https://tiles.openfreemap.org/styles/liberty",preview:"linear-gradient(135deg, #f0ece2 0%, #dfd7c8 40%, #c8bfad 100%)"},{text:"Fiord",value:"https://tiles.openfreemap.org/styles/fiord",preview:"linear-gradient(135deg, #2c3e50 0%, #34495e 40%, #415b76 100%)"}],kn=[{text:"Light",value:"light",preview:"linear-gradient(135deg, #f0f4f8 0%, #d6e4f0 40%, #e8eff5 100%)"},{text:"Dark",value:"dark",preview:"linear-gradient(135deg, #0d1b2a 0%, #1b2838 40%, #162032 100%)"},{text:"Normal",value:"normal",preview:"linear-gradient(135deg, #e8e8e8 0%, #c8d8e8 40%, #a8c8d8 100%)"}];function Mt({position:e="topright",options:t,defaultValue:n,onThemeChange:r,className:o,style:l}){const{mapsService:s,positionClassName:a}=ke(e),c=Me(),[d,h]=u.useState(!1),[f,p]=u.useState(n??""),[g,y]=u.useState(t??[]),C=u.useRef(null),{popperRef:b,popperClass:x}=xt(e,d);u.useEffect(()=>{var z;if(t&&t.length>0){y(t);return}if(s){try{const E=(z=s.getMapStyleConfig)==null?void 0:z.call(s);if(E&&typeof E=="object"){const T=Object.entries(E).filter(([,M])=>typeof M=="string").map(([M,H])=>{const N=wt.find(V=>V.value===H);return{text:M,value:H,preview:N==null?void 0:N.preview}});if(T.length>0){y(T);return}}}catch{}y(wt)}},[s,t]),u.useEffect(()=>{var z;if(n){p(n);return}if(s)try{const E=(z=s.getMapStyle)==null?void 0:z.call(s);E&&p(E)}catch{}},[s,n]),u.useEffect(()=>{if(!d)return;const z=E=>{C.current&&!C.current.contains(E.target)&&h(!1)};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[d]);const k=u.useCallback(z=>{if(p(z),s)try{s.setMapStyle(z)}catch{}r==null||r(z)},[s,r]),L=i.jsxs("div",{ref:C,className:`l7-control l7-control--glass${o?` ${o}`:""}`,style:l,children:[i.jsx("button",{className:"l7-button-control",onClick:()=>h(!d),title:"地图样式","aria-label":"地图样式",children:i.jsx("span",{className:"material-symbols-outlined",children:"palette"})}),d&&g.length>0&&i.jsx("div",{ref:b,className:`l7-popper ${x}`,children:i.jsxs("div",{className:"l7-popper-content l7-theme-panel",children:[i.jsxs("div",{className:"l7-theme-panel__title",children:[i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"palette"}),"Map Themes"]}),i.jsx("div",{className:"l7-theme-panel__grid",children:g.map(z=>{const E=f===z.value,T=z.preview??"linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%)";return i.jsxs("button",{className:`l7-theme-card${E?" l7-theme-card--active":""}`,onClick:()=>k(z.value),title:z.text,children:[i.jsx("div",{className:"l7-theme-card__preview",style:{background:T}}),E&&i.jsx("span",{className:"material-symbols-outlined l7-theme-card__check",style:{fontVariationSettings:"'FILL' 1"},children:"check_circle"}),i.jsx("span",{className:"l7-theme-card__label",children:z.text})]},z.value)})})]})})]});return c?L:i.jsx("div",{className:`l7-control-anchor ${a}`,children:L})}we.mark(Mt);function kt({position:e="bottomleft",precision:t=6,transform:n,className:r,style:o}){const s=n??(([p,g])=>[+p.toFixed(t),+g.toFixed(t)]),{mapsService:a,positionClassName:c}=ke(e),d=Me(),h=u.useRef(null);u.useEffect(()=>{if(!a)return;const p=g=>{const y=g.lngLat??g.lnglat;if(!y)return;const C=[y.lng,y.lat],b=s(C);h.current&&(h.current.innerText=b.join(", "))};return a.on("mousemove",p),()=>{a.off("mousemove",p)}},[a,s]);const f=i.jsx("div",{ref:h,className:`l7-control l7-control-mouse-location l7-control--glass${r?` ${r}`:""}`,style:o,children:" "});return d?f:i.jsx("div",{className:`l7-control-anchor ${c}`,children:f})}we.mark(kt);function St({position:e="topright",format:t="png",onExport:n,className:r,style:o}){const{scene:l,mapsService:s,positionClassName:a}=ke(e),c=Me(),d=t==="jpg"?"jpeg":"png",h=u.useCallback(async()=>{var g,y;try{const C=s?await((g=s.exportMap)==null?void 0:g.call(s,d)):void 0,b=l?await((y=l.exportPng)==null?void 0:y.call(l,d)):void 0,x=[C,b].filter(k=>!!k);return x.length===0?void 0:x.length===1?x[0]:Sn(x,d)}catch{return}},[l,s,d]),f=u.useCallback(async()=>{var y;const g=await h();if(n&&g){n(g);return}if(g){const C=document.createElement("a");C.download=`aimap-export.${d==="jpeg"?"jpg":"png"}`,C.href=g,C.click()}else try{if(s){const C=(y=s.getContainer)==null?void 0:y.call(s),b=C==null?void 0:C.querySelector("canvas");if(b&&typeof b.toDataURL=="function"){const x=b.toDataURL(`image/${d}`),k=document.createElement("a");k.download=`aimap-export.${d==="jpeg"?"jpg":"png"}`,k.href=x,k.click()}}}catch(C){console.warn("[aimapui] Export image failed:",C)}},[h,n,d,s]),p=i.jsx("div",{className:`l7-control l7-control--glass${r?` ${r}`:""}`,style:o,children:i.jsx("button",{className:"l7-button-control",onClick:f,title:"导出图片","aria-label":"导出图片",children:i.jsx("span",{className:"material-symbols-outlined",children:"photo_camera"})})});return c?p:i.jsx("div",{className:`l7-control-anchor ${a}`,children:p})}async function Sn(e,t){const n=document.querySelector(".l7-map")||document.documentElement,{width:r=0,height:o=0}=n.getBoundingClientRect(),l=document.createElement("canvas");l.width=r,l.height=o;const s=l.getContext("2d");return(await Promise.all(e.map(c=>new Promise(d=>{const h=new Image;h.onload=()=>d(h),h.src=c})))).forEach(c=>{s==null||s.drawImage(c,0,0,r,o)}),l.toDataURL(`image/${t}`)}we.mark(St);function zt({position:e="topright",layers:t,onToggle:n,onOpacityChange:r,className:o,style:l}){const[s,a]=u.useState(!1),c=u.useRef(null),[d,h]=u.useState(()=>{const x={};return t.forEach(k=>{x[k.id]=k.opacity??1}),x});u.useEffect(()=>{h(x=>{const k={...x};return t.forEach(L=>{L.opacity!==void 0&&(k[L.id]=L.opacity)}),k})},[t]);const{positionClassName:f}=ke(e),p=Me(),{popperRef:g,popperClass:y}=xt(e,s);if(u.useEffect(()=>{if(!s)return;const x=k=>{c.current&&!c.current.contains(k.target)&&a(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[s]),!t.length)return null;const C=(x,k)=>{h(L=>({...L,[x]:k})),r==null||r(x,k)},b=i.jsxs("div",{ref:c,className:`l7-control l7-control--glass${o?` ${o}`:""}`,style:l,children:[i.jsx("button",{className:"l7-button-control",onClick:()=>a(!s),title:"图层控制","aria-label":"图层控制",children:i.jsx("span",{className:"material-symbols-outlined",children:"layers"})}),s&&i.jsx("div",{ref:g,className:`l7-popper ${y}`,children:i.jsxs("div",{className:"l7-popper-content l7-layer-panel",children:[i.jsxs("div",{className:"l7-layer-panel__title",children:[i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"layers"}),"Layers"]}),i.jsx("div",{className:"l7-layer-panel__list",children:t.map(x=>{const k=x.visible!==!1,L=d[x.id]??x.opacity??1,z=x.icon??"layers";return i.jsxs("div",{className:`l7-layer-item${k?"":" l7-layer-item--disabled"}`,children:[i.jsxs("div",{className:"l7-layer-item__header",children:[i.jsx("span",{className:"material-symbols-outlined l7-layer-item__icon",children:z}),i.jsx("span",{className:"l7-layer-item__name",children:x.name??x.id}),i.jsxs("label",{className:"l7-layer-toggle",children:[i.jsx("input",{type:"checkbox",checked:k,onChange:()=>n(x.id,!k)}),i.jsx("span",{className:"l7-layer-toggle__track"})]})]}),r&&i.jsxs("div",{className:"l7-layer-item__slider",children:[i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"opacity"}),i.jsx("input",{type:"range",min:0,max:100,value:Math.round(L*100),onChange:E=>C(x.id,+E.target.value/100),className:"l7-layer-slider"})]})]},x.id)})})]})})]});return p?b:i.jsx("div",{className:`l7-control-anchor ${f}`,children:b})}we.mark(zt);function zn(e){return{mode:"none",features:e?[...e]:[],selectedFeatureId:null,isDrawing:!1,currentVertices:[],startPoint:null,mousePoint:null,dragVertexIndex:null,isDragging:!1,mergeSelectedIds:[],splitTargetId:null}}const ze={point:{color:"#3f51b5",size:6,strokeColor:"#ffffff",strokeWidth:2},line:{color:"#3f51b5",size:2,opacity:1},polygon:{fill:"#3f51b5",fillOpacity:.2,stroke:"#3f51b5",strokeWidth:2},drawing:{fill:"#3f51b5",fillOpacity:.2,stroke:"#3f51b5",strokeWidth:2,dashStroke:"#3f51b5",dashWidth:1.5,dashArray:[4,4]},selected:{stroke:"#3f51b5",strokeWidth:3,fill:"#ffb95f",fillOpacity:.12,dashArray:[6,3]},vertex:{color:"#3f51b5",size:6,strokeColor:"#ffffff",strokeWidth:2,activeColor:"#ffb95f",activeSize:6}};function Hn(e){return e?{point:{...ze.point,...e.point},line:{...ze.line,...e.line},polygon:{...ze.polygon,...e.polygon},drawing:{...ze.drawing,...e.drawing},selected:{...ze.selected,...e.selected},vertex:{...ze.vertex,...e.vertex}}:{...ze}}let Vn=0;function En(){return`draw-${++Vn}`}function C1(e){return{type:"LineString",coordinates:e.map(([t,n])=>[t,n])}}function v1(e){const t=e.map(([n,r])=>[n,r]);if(t.length>0){const n=t[0],r=t[t.length-1];(n[0]!==r[0]||n[1]!==r[1])&&t.push([n[0],n[1]])}return{type:"Polygon",coordinates:[t]}}function b1(e,t){const[n,r]=e,[o,l]=t;return{type:"Polygon",coordinates:[[[n,r],[o,r],[o,l],[n,l],[n,r]]]}}function L1(e,t,n=64){const[r,o]=e,l=[];for(let s=0;s<n;s++){const a=s/n*2*Math.PI,c=t/(111320*Math.cos(o*Math.PI/180))*Math.cos(a),d=t/110540*Math.sin(a);l.push([r+c,o+d])}return l.push(l[0]),{type:"Polygon",coordinates:[l]}}function An(e){return{type:"Point",coordinates:[e[0],e[1]]}}function x1(e,t){const r=c=>c*Math.PI/180,o=r(t[1]-e[1]),l=r(t[0]-e[0]),s=Math.sin(o/2)*Math.sin(o/2)+Math.cos(r(e[1]))*Math.cos(r(t[1]))*Math.sin(l/2)*Math.sin(l/2);return 6371e3*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}function w1(e,t){const n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)}function Fe(e,t,n){return{type:"Feature",id:En(),geometry:e,properties:{drawType:t}}}function Zn(e,t,n){const r=e.geometry,o=Fn(r,t,n);return{...e,geometry:o,properties:{...e.properties}}}function Fn(e,t,n){switch(e.type){case"Point":return{type:"Point",coordinates:[e.coordinates[0]+t,e.coordinates[1]+n]};case"LineString":return{type:"LineString",coordinates:e.coordinates.map(([r,o])=>[r+t,o+n])};case"Polygon":return{type:"Polygon",coordinates:e.coordinates.map(r=>r.map(([o,l])=>[o+t,l+n]))};default:return e}}function Tn(e,t,n,r){const o=e.geometry;let l;if(o.type==="Point")l={type:"Point",coordinates:[n,r]};else if(o.type==="LineString"){const s=o.coordinates.map(a=>[...a]);t>=0&&t<s.length&&(s[t]=[n,r]),l={type:"LineString",coordinates:s}}else if(o.type==="Polygon"){const s=o.coordinates.map(d=>d.map(h=>[...h])),a=s[0],c=a.length>1&&a[0][0]===a[a.length-1][0]&&a[0][1]===a[a.length-1][1]?a.length-1:a.length;t>=0&&t<c&&(a[t]=[n,r],t===0&&(a[a.length-1]=[n,r])),l={type:"Polygon",coordinates:s}}else l=o;return{...e,geometry:l,properties:{...e.properties}}}function Re(e){const t=e.geometry,n=[];if(t.type==="Point")n.push([t.coordinates[0],t.coordinates[1]]);else if(t.type==="LineString")t.coordinates.forEach(([r,o])=>{n.push([r,o])});else if(t.type==="Polygon"){const r=t.coordinates[0];if(r&&r.length>1){const o=r[0][0]===r[r.length-1][0]&&r[0][1]===r[r.length-1][1]?r.length-1:r.length;for(let l=0;l<o;l++)n.push([r[l][0],r[l][1]])}}return n}function De(e){const t=e.lnglat,n=e.lngLat;if(t&&typeof t.lng=="number"&&typeof t.lat=="number")return[t.lng,t.lat];if(n&&typeof n.lng=="number"&&typeof n.lat=="number")return[n.lng,n.lat];const r=e.coordinate;return r&&typeof r[0]=="number"&&typeof r[1]=="number"?[r[0],r[1]]:null}function Nn(e){return{type:"FeatureCollection",features:e.filter(t=>t.geometry.type==="LineString")}}function In(e){return{type:"FeatureCollection",features:e.filter(t=>t.geometry.type==="Polygon")}}function Pn(e,t){const n=M1(e.coordinates[0]),r=M1(t.coordinates[0]);let o=0;const l=new Set(n.map(s=>`${s[0].toFixed(7)},${s[1].toFixed(7)}`));for(const s of r)l.has(`${s[0].toFixed(7)},${s[1].toFixed(7)}`)&&o++;if(o>=2)return!0;for(let s=0;s<n.length;s++){const a=(s+1)%n.length;for(let c=0;c<r.length;c++){const d=(c+1)%r.length;if(S1(n[s],n[a],r[c],r[d],!0))return!0}}for(const s of n)if(k1(s,r))return!0;for(const s of r)if(k1(s,n))return!0;return!1}function M1(e){const t=[],n=e.length>1&&e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]?e.length-1:e.length;for(let r=0;r<n;r++)t.push([e[r][0],e[r][1]]);return t}function k1(e,t){let n=!1;for(let r=0,o=t.length-1;r<t.length;o=r++){const l=t[r][0],s=t[r][1],a=t[o][0],c=t[o][1];s>e[1]!=c>e[1]&&e[0]<(a-l)*(e[1]-s)/(c-s)+l&&(n=!n)}return n}function Dn(e){if(e.length<2)return null;const t=e.filter(a=>a.geometry.type==="Polygon");if(t.length<2)return null;for(let a=0;a<t.length;a++){const c=t[a].geometry;let d=!1;for(let h=0;h<t.length;h++)if(a!==h&&Pn(c,t[h].geometry)){d=!0;break}if(!d)return null}const n=[];for(const a of t){const c=a.geometry.coordinates[0];if(!c)continue;const d=c.length>1&&c[0][0]===c[c.length-1][0]&&c[0][1]===c[c.length-1][1]?c.length-1:c.length;for(let h=0;h<d;h++)n.push([c[h][0],c[h][1]])}if(n.length<3)return null;const r=[],o=new Set;for(const a of n){const c=`${a[0].toFixed(6)},${a[1].toFixed(6)}`;o.has(c)||(o.add(c),r.push(a))}if(r.length<3)return null;const l=$n(r);return l.length<3?null:(l.push(l[0]),Fe({type:"Polygon",coordinates:[l]},"polygon"))}function $n(e){if(e.length<3)return[...e];let t=0;for(let l=1;l<e.length;l++)(e[l][1]<e[t][1]||e[l][1]===e[t][1]&&e[l][0]<e[t][0])&&(t=l);const n=e[t],r=e.filter(l=>l[0]!==n[0]||l[1]!==n[1]).sort((l,s)=>{const a=Math.atan2(l[1]-n[1],l[0]-n[0]),c=Math.atan2(s[1]-n[1],s[0]-n[0]);if(a!==c)return a-c;const d=(l[0]-n[0])**2+(l[1]-n[1])**2,h=(s[0]-n[0])**2+(s[1]-n[1])**2;return d-h}),o=[n];for(const l of r){for(;o.length>1;){const s=o[o.length-2],a=o[o.length-1];if((a[0]-s[0])*(l[1]-s[1])-(a[1]-s[1])*(l[0]-s[0])<=0)o.pop();else break}o.push(l)}return o}function _n(e,t){if(e.geometry.type!=="Polygon"||t.length<2)return null;const n=e.geometry.coordinates[0];if(!n||n.length<4)return null;const r=[],o=n.length>1&&n[0][0]===n[n.length-1][0]&&n[0][1]===n[n.length-1][1]?n.length-1:n.length;for(let p=0;p<o;p++)r.push([n[p][0],n[p][1]]);const l=[];for(let p=0;p<t.length-1;p++){const g=t[p],y=t[p+1];for(let C=0;C<r.length;C++){const b=(C+1)%r.length,x=r[C],k=r[b],L=S1(g,y,x,k);L&&l.push({edgeIndex:C,point:L,t:p})}}if(l.length<2)return null;l.sort((p,g)=>p.edgeIndex-g.edgeIndex);const s=l[0],a=l[l.length-1],c=[],d=[];c.push(s.point);for(let p=s.edgeIndex+1;p<=a.edgeIndex;p++)c.push(r[p%r.length]);c.push(a.point),c.push(s.point),d.push(a.point);for(let p=a.edgeIndex+1;p<r.length;p++)d.push(r[p]);for(let p=0;p<=s.edgeIndex;p++)d.push(r[p]);if(d.push(s.point),d.push(a.point),c.length<4||d.length<4)return null;const h={type:"Polygon",coordinates:[c]},f={type:"Polygon",coordinates:[d]};return[Fe(h,"polygon"),Fe(f,"polygon")]}function S1(e,t,n,r,o=!1){const l=t[0]-e[0],s=t[1]-e[1],a=r[0]-n[0],c=r[1]-n[1],d=l*c-s*a;if(Math.abs(d)<1e-12)return null;const h=((n[0]-e[0])*c-(n[1]-e[1])*a)/d,f=((n[0]-e[0])*s-(n[1]-e[1])*l)/d;if(o){if(h<=1e-6||h>=.999999||f<=1e-6||f>=.999999)return null}else if(h<0||h>1||f<0||f>1)return null;return[e[0]+h*l,e[1]+h*s]}const et={type:"FeatureCollection",features:[]},Le="aimap-draw-";class On{constructor(t,n,r){this.featurePointLayer=null,this.featureLineLayer=null,this.featurePolygonLayer=null,this.featurePolygonOutlineLayer=null,this.drawingLineLayer=null,this.drawingDashLineLayer=null,this.drawingPolygonLayer=null,this.drawingPointLayer=null,this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null,this.vertexLayer=null,this.midpointLayer=null,this.snapIndicatorLayer=null,this.mergeHighlightLayer=null,this.mergeHighlightOutlineLayer=null,this.splitHighlightLayer=null,this.splitHighlightOutlineLayer=null,this.tooltipEl=null,this.containerEl=null,this.hiddenFeatureId=null,this.allFeatures=[],this.onFeatureClick=null,this.onFeatureMouseDown=null,this.onVertexClick=null,this.onVertexRightClick=null,this.onEmptyClick=null,this.onMidpointClick=null,this.editClickHandlersBound=!1,this.scene=t,this.mapsService=r,this.styles={point:{...ze.point,...n==null?void 0:n.point},line:{...ze.line,...n==null?void 0:n.line},polygon:{...ze.polygon,...n==null?void 0:n.polygon},drawing:{...ze.drawing,...n==null?void 0:n.drawing},selected:{...ze.selected,...n==null?void 0:n.selected},vertex:{...ze.vertex,...n==null?void 0:n.vertex}};try{this.initTooltip()}catch{}}removeAndDestroy(t){var n;if(t){try{this.scene.removeLayer(t)}catch{}try{(n=t.destroy)==null||n.call(t)}catch{}}}addLayerWithRender(t){t.once("inited",()=>{try{this.scene.render()}catch{}}),this.scene.addLayer(t)}initTooltip(){const t=document.createElement("div");t.style.cssText=["position:fixed","pointer-events:none","z-index:9999","padding:6px 10px","border-radius:4px","background:rgba(26,27,34,0.92)","color:#f2eff9",'font:500 11px/16px "JetBrains Mono",monospace',"letter-spacing:0.02em","white-space:nowrap","display:none","flex-direction:column","gap:2px","box-shadow:0 2px 8px rgba(0,0,0,0.3)"].join(";"),document.body.appendChild(t),this.tooltipEl=t,this.containerEl=null}showTooltip(t,n,r,o){if(!this.tooltipEl)return;this.tooltipEl.innerHTML="";const l=document.createElement("div");if(l.textContent=t,l.style.cssText="color:#f2eff9;font-size:11px;line-height:16px;",this.tooltipEl.appendChild(l),o&&o.length>0){const s=document.createElement("div");s.style.cssText="display:flex;gap:8px;";for(const a of o){const c=document.createElement("span");c.textContent=a,c.style.cssText="font-size:9px;line-height:12px;color:#ffc107;font-weight:600;",s.appendChild(c)}this.tooltipEl.appendChild(s)}this.tooltipEl.style.display="flex",this.tooltipEl.style.left=`${n+16}px`,this.tooltipEl.style.top=`${r-8}px`}showSnapTooltip(t,n,r,o,l){if(!this.tooltipEl)return;this.tooltipEl.innerHTML="";const s=document.createElement("div");s.style.cssText="display:flex;gap:6px;align-items:center;";const a=document.createElement("span");a.textContent=t==="vertex"?"Vertex":"Edge",a.style.cssText="color:#ffc107;font-weight:700;font-size:10px;",s.appendChild(a);const c=document.createElement("span");c.textContent=`${r.toFixed(4)}, ${n.toFixed(4)}`,c.style.cssText="color:rgba(242,239,249,0.6);font-size:10px;",s.appendChild(c),this.tooltipEl.appendChild(s),this.tooltipEl.style.display="flex",this.tooltipEl.style.left=`${o+16}px`,this.tooltipEl.style.top=`${l-8}px`}hideTooltip(){this.tooltipEl&&(this.tooltipEl.style.display="none")}destroyTooltip(){var t;this.tooltipEl&&((t=this.tooltipEl.parentElement)==null||t.removeChild(this.tooltipEl),this.tooltipEl=null)}updateFeatures(t){this.scene&&(this.allFeatures=t,this.renderFeatures())}hideFeatureFromStatic(t){this.hiddenFeatureId=t,this.renderFeatures()}showAllFeatures(){this.hiddenFeatureId=null,this.renderFeatures()}renderFeatures(){const t=this.hiddenFeatureId?this.allFeatures.filter(s=>s.id!==this.hiddenFeatureId):this.allFeatures,n=this.styles;this.removeAndDestroy(this.featurePointLayer);const r=t.filter(s=>s.geometry.type==="Point").map(s=>{const a=s.geometry.coordinates;return{lng:a[0],lat:a[1],id:s.id,drawType:s.properties.drawType}});this.featurePointLayer=new ge.PointLayer({name:`${Le}feature-point`,zIndex:12}).source(r,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(n.point.color).size(n.point.size).style({stroke:n.point.strokeColor,strokeWidth:n.point.strokeWidth}),this.addLayerWithRender(this.featurePointLayer),this.removeAndDestroy(this.featureLineLayer),this.featureLineLayer=new ge.LineLayer({name:`${Le}feature-line`,zIndex:11}).source(Nn(t)).shape("line").color(n.line.color).size(n.line.size).style({opacity:n.line.opacity}),this.addLayerWithRender(this.featureLineLayer),this.removeAndDestroy(this.featurePolygonLayer),this.featurePolygonLayer=new ge.PolygonLayer({name:`${Le}feature-polygon`,zIndex:10}).source(In(t)).shape("fill").color(n.polygon.fill).style({opacity:n.polygon.fillOpacity}),this.addLayerWithRender(this.featurePolygonLayer),this.removeAndDestroy(this.featurePolygonOutlineLayer);const o=t.filter(s=>s.geometry.type==="Polygon"),l=o.length>0?{type:"FeatureCollection",features:o.map(s=>({type:"Feature",geometry:{type:"LineString",coordinates:s.geometry.coordinates[0]},properties:s.properties}))}:et;this.featurePolygonOutlineLayer=new ge.LineLayer({name:`${Le}feature-polygon-outline`,zIndex:10}).source(l).shape("line").color(n.polygon.stroke).size(n.polygon.strokeWidth).style({opacity:1}),this.addLayerWithRender(this.featurePolygonOutlineLayer),this.editClickHandlersBound&&this.rebindEditClickHandlers()}showDrawingFeedback(t,n,r,o){if(!this.scene||r==="point")return;const l=this.styles;let s=et,a=et,c=et,d=[];if(r==="rectangle"&&o&&n){const g=b1(o,n);c={type:"FeatureCollection",features:[{type:"Feature",geometry:g,properties:{}}]},s={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:g.coordinates[0]},properties:{}}]}}else if(r==="circle"&&o&&n){const y=E=>E*Math.PI/180,C=y(n[1]-o[1]),b=y(n[0]-o[0]),x=Math.sin(C/2)**2+Math.cos(y(o[1]))*Math.cos(y(n[1]))*Math.sin(b/2)**2,L=6371e3*(2*Math.atan2(Math.sqrt(x),Math.sqrt(1-x))),z=L1(o,Math.max(L,1));c={type:"FeatureCollection",features:[{type:"Feature",geometry:z,properties:{}}]},s={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:z.coordinates[0]},properties:{}}]},d=[{lng:o[0],lat:o[1],vertexIndex:0}]}else if((r==="polyline"||r==="polygon")&&t.length>0){if(t.length>=2&&(s={type:"FeatureCollection",features:[{type:"Feature",geometry:C1(t),properties:{}}]}),n&&t.length>=1){const g=t[t.length-1],y=[{type:"Feature",geometry:{type:"LineString",coordinates:[[g[0],g[1]],[n[0],n[1]]]},properties:{}}];r==="polygon"&&t.length>=2&&y.push({type:"Feature",geometry:{type:"LineString",coordinates:[[n[0],n[1]],[t[0][0],t[0][1]]]},properties:{}}),a={type:"FeatureCollection",features:y}}if(r==="polygon"&&t.length>=2&&n){const g=[...t,n];g.length>=3&&(c={type:"FeatureCollection",features:[{type:"Feature",geometry:v1(g),properties:{}}]})}d=t.map(([g,y],C)=>({lng:g,lat:y,vertexIndex:C,isFirst:C===0}))}this.drawingLineLayer?this.drawingLineLayer.setData(s):(this.drawingLineLayer=new ge.LineLayer({name:`${Le}drawing-line`,zIndex:13}).source(s).shape("line").color(l.drawing.stroke).size(l.drawing.strokeWidth).style({opacity:1}),this.addLayerWithRender(this.drawingLineLayer));const h=l.drawing.dashArray??[4,4],f=l.drawing.dashStroke??l.drawing.stroke,p=l.drawing.dashWidth??1.5;this.drawingDashLineLayer?this.drawingDashLineLayer.setData(a):(this.drawingDashLineLayer=new ge.LineLayer({name:`${Le}drawing-dash-line`,zIndex:14}).source(a).shape("line").color(f).size(p).style({opacity:1,lineType:"dash",dashArray:h}),this.addLayerWithRender(this.drawingDashLineLayer)),this.drawingPolygonLayer?this.drawingPolygonLayer.setData(c):(this.drawingPolygonLayer=new ge.PolygonLayer({name:`${Le}drawing-polygon`,zIndex:13}).source(c).shape("fill").color(l.drawing.fill).style({opacity:l.drawing.fillOpacity}),this.addLayerWithRender(this.drawingPolygonLayer)),this.drawingPointLayer?this.drawingPointLayer.setData(d):(this.drawingPointLayer=new ge.PointLayer({name:`${Le}drawing-point`,zIndex:15}).source(d,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(l.vertex.color).size(l.vertex.size).style({stroke:l.vertex.strokeColor,strokeWidth:l.vertex.strokeWidth}),this.addLayerWithRender(this.drawingPointLayer))}clearDrawingFeedback(){this.removeAndDestroy(this.drawingLineLayer),this.removeAndDestroy(this.drawingDashLineLayer),this.removeAndDestroy(this.drawingPolygonLayer),this.removeAndDestroy(this.drawingPointLayer),this.drawingLineLayer=null,this.drawingDashLineLayer=null,this.drawingPolygonLayer=null,this.drawingPointLayer=null}removeDrawingLayers(){this.clearDrawingFeedback()}updateSelectionHighlight(t){var l,s,a;if(!this.scene)return;const n=this.styles;if(this.removeAndDestroy(this.selectionPolygonLayer),this.removeAndDestroy(this.selectionLineLayer),this.removeAndDestroy(this.selectionPointLayer),!t){this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null;return}const r={type:"FeatureCollection",features:[t]},o=n.selected.dashArray??[6,3];if(t.geometry.type==="Point")this.selectionPointLayer=new ge.PointLayer({name:`${Le}selection-point`,zIndex:15}).source([{lng:t.geometry.coordinates[0],lat:t.geometry.coordinates[1],id:t.id}],{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(n.selected.stroke).size((n.point.size??6)+4).style({stroke:n.selected.stroke,strokeWidth:n.selected.strokeWidth}),this.addLayerWithRender(this.selectionPointLayer);else if(t.geometry.type==="LineString")this.selectionLineLayer=new ge.LineLayer({name:`${Le}selection-line`,zIndex:15}).source(r).shape("line").color(n.selected.stroke).size(n.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:o}),this.addLayerWithRender(this.selectionLineLayer);else if(t.geometry.type==="Polygon"){this.selectionPolygonLayer=new ge.PolygonLayer({name:`${Le}selection-polygon`,zIndex:15}).source(r).shape("fill").color(n.selected.fill).style({opacity:n.selected.fillOpacity}),this.addLayerWithRender(this.selectionPolygonLayer);const c={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:t.geometry.coordinates[0]},properties:{}}]};this.selectionLineLayer=new ge.LineLayer({name:`${Le}selection-line`,zIndex:15}).source(c).shape("line").color(n.selected.stroke).size(n.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:o}),this.addLayerWithRender(this.selectionLineLayer)}if(this.editClickHandlersBound&&this.onFeatureMouseDown){const c=d=>{var f;const h=d.feature;if(h&&this.onFeatureMouseDown){const p=((f=h.properties)==null?void 0:f.id)??h.id;if(p){const g=d.lngLat??d.lnglat;let y=[0,0];if(g&&typeof g=="object"){const C=g;y=[C.lng??C.x??0,C.lat??C.y??0]}this.onFeatureMouseDown(String(p),y)}}};(l=this.selectionPolygonLayer)==null||l.on("mousedown",c),(s=this.selectionLineLayer)==null||s.on("mousedown",c),(a=this.selectionPointLayer)==null||a.on("mousedown",c)}}clearSelectionHighlight(){this.removeAndDestroy(this.selectionPolygonLayer),this.removeAndDestroy(this.selectionLineLayer),this.removeAndDestroy(this.selectionPointLayer),this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null}removeSelectionLayers(){this.clearSelectionHighlight()}highlightMergeSelected(t,n){if(!this.scene)return;const r=this.styles;if(this.removeAndDestroy(this.mergeHighlightLayer),this.removeAndDestroy(this.mergeHighlightOutlineLayer),this.mergeHighlightLayer=null,this.mergeHighlightOutlineLayer=null,t.length===0)return;const o=n.filter(a=>t.includes(a.id));if(o.length===0)return;const l={type:"FeatureCollection",features:o};this.mergeHighlightLayer=new ge.PolygonLayer({name:`${Le}merge-highlight`,zIndex:15}).source(l).shape("fill").color(r.selected.fill).style({opacity:r.selected.fillOpacity}),this.addLayerWithRender(this.mergeHighlightLayer);const s=o.filter(a=>a.geometry.type==="Polygon").map(a=>({type:"Feature",geometry:{type:"LineString",coordinates:a.geometry.coordinates[0]},properties:{}}));if(s.length>0){const a={type:"FeatureCollection",features:s};this.mergeHighlightOutlineLayer=new ge.LineLayer({name:`${Le}merge-highlight-outline`,zIndex:15}).source(a).shape("line").color(r.selected.stroke).size(r.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:r.selected.dashArray??[6,3]}),this.addLayerWithRender(this.mergeHighlightOutlineLayer)}}clearMergeHighlight(){this.removeAndDestroy(this.mergeHighlightLayer),this.removeAndDestroy(this.mergeHighlightOutlineLayer),this.mergeHighlightLayer=null,this.mergeHighlightOutlineLayer=null}highlightSplitTarget(t,n){if(!this.scene)return;const r=this.styles;this.removeAndDestroy(this.splitHighlightLayer),this.removeAndDestroy(this.splitHighlightOutlineLayer),this.splitHighlightLayer=null,this.splitHighlightOutlineLayer=null;const o=n.find(a=>a.id===t);if(!o)return;const l={type:"FeatureCollection",features:[o]};this.splitHighlightLayer=new ge.PolygonLayer({name:`${Le}split-highlight`,zIndex:15}).source(l).shape("fill").color(r.selected.fill).style({opacity:r.selected.fillOpacity}),this.addLayerWithRender(this.splitHighlightLayer);const s={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:o.geometry.coordinates[0]},properties:{}}]};this.splitHighlightOutlineLayer=new ge.LineLayer({name:`${Le}split-highlight-outline`,zIndex:15}).source(s).shape("line").color(r.selected.stroke).size(r.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:r.selected.dashArray??[6,3]}),this.addLayerWithRender(this.splitHighlightOutlineLayer)}clearSplitHighlight(){this.removeAndDestroy(this.splitHighlightLayer),this.removeAndDestroy(this.splitHighlightOutlineLayer),this.splitHighlightLayer=null,this.splitHighlightOutlineLayer=null}updateVertexHandles(t){if(!this.scene)return;const n=this.styles;if(this.removeAndDestroy(this.vertexLayer),this.removeAndDestroy(this.midpointLayer),!t){this.vertexLayer=null,this.midpointLayer=null;return}const r=Re(t);if(r.length===0){this.vertexLayer=null,this.midpointLayer=null;return}const o=r.map(([l,s],a)=>({lng:l,lat:s,vertexIndex:a,featureId:t.id}));if(this.vertexLayer=new ge.PointLayer({name:`${Le}vertex-handles`,zIndex:16}).source(o,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(n.vertex.color).size(n.vertex.size).style({stroke:n.vertex.strokeColor,strokeWidth:n.vertex.strokeWidth}),this.addLayerWithRender(this.vertexLayer),t.geometry.type==="LineString"||t.geometry.type==="Polygon"){const l=[],s=t.geometry.type==="Polygon"?r.length:r.length-1;for(let a=0;a<s;a++){const c=(a+1)%r.length;l.push({lng:(r[a][0]+r[c][0])/2,lat:(r[a][1]+r[c][1])/2,edgeIndex:a})}this.midpointLayer=new ge.PointLayer({name:`${Le}midpoint-handles`,zIndex:16}).source(l,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(n.vertex.strokeColor).size(n.vertex.size-1).style({stroke:n.vertex.strokeColor,strokeWidth:.5,opacity:.5}),this.addLayerWithRender(this.midpointLayer)}else this.midpointLayer=null;this.editClickHandlersBound&&this.rebindVertexAndMidpointEvents()}clearVertexHandles(){this.removeAndDestroy(this.vertexLayer),this.removeAndDestroy(this.midpointLayer),this.vertexLayer=null,this.midpointLayer=null}removeVertexLayer(){this.clearVertexHandles()}setupEditClickHandlers(t,n,r,o,l,s){this.onFeatureClick=t,this.onVertexClick=n,this.onEmptyClick=r,this.onVertexRightClick=o??null,this.onMidpointClick=l??null,this.onFeatureMouseDown=s??null,this.editClickHandlersBound=!0,this.rebindEditClickHandlers()}rebindEditClickHandlers(){var l,s,a,c,d,h,f,p,g,y,C,b,x,k,L,z,E,T,M,H,N,V,F,A,I;const t=m=>{var P;const w=m.feature;if(w){const $=((P=w.properties)==null?void 0:P.id)??w.id;$&&this.onFeatureClick&&this.onFeatureClick(String($))}},n=m=>{var P;const w=m.feature;if(w){const $=((P=w.properties)==null?void 0:P.id)??w.id;if($&&this.onFeatureMouseDown){const j=m.lngLat??m.lnglat;let O=[0,0];if(j&&typeof j=="object"){const K=j;O=[K.lng??K.x??0,K.lat??K.y??0]}this.onFeatureMouseDown(String($),O)}}};(l=this.featurePointLayer)==null||l.on("click",t),(s=this.featureLineLayer)==null||s.on("click",t),(a=this.featurePolygonLayer)==null||a.on("click",t),(c=this.featurePolygonOutlineLayer)==null||c.on("click",t),(d=this.featurePointLayer)==null||d.on("mousedown",n),(h=this.featureLineLayer)==null||h.on("mousedown",n),(f=this.featurePolygonLayer)==null||f.on("mousedown",n),(p=this.featurePolygonOutlineLayer)==null||p.on("mousedown",n);const r=()=>{this.setCursorClass("l7-draw-cursor-grab")},o=()=>{this.clearEditCursors(),this.hideTooltip()};(g=this.featurePointLayer)==null||g.on("mouseenter",r),(y=this.featurePointLayer)==null||y.on("mouseleave",o),(C=this.featureLineLayer)==null||C.on("mouseenter",r),(b=this.featureLineLayer)==null||b.on("mouseleave",o),(x=this.featurePolygonLayer)==null||x.on("mouseenter",r),(k=this.featurePolygonLayer)==null||k.on("mouseleave",o),(L=this.featurePolygonOutlineLayer)==null||L.on("mouseenter",r),(z=this.featurePolygonOutlineLayer)==null||z.on("mouseleave",o),(E=this.selectionPolygonLayer)==null||E.on("mousedown",n),(T=this.selectionLineLayer)==null||T.on("mousedown",n),(M=this.selectionPointLayer)==null||M.on("mousedown",n),(H=this.selectionPolygonLayer)==null||H.on("mouseenter",r),(N=this.selectionPolygonLayer)==null||N.on("mouseleave",o),(V=this.selectionLineLayer)==null||V.on("mouseenter",r),(F=this.selectionLineLayer)==null||F.on("mouseleave",o),(A=this.selectionPointLayer)==null||A.on("mouseenter",r),(I=this.selectionPointLayer)==null||I.on("mouseleave",o),this.rebindVertexAndMidpointEvents()}extractClientXY(t){var s,a,c,d;const n=t.originalEvent??t.originEvent??t.e;if(n&&typeof n.clientX=="number"&&typeof n.clientY=="number")return[n.clientX,n.clientY];const r=t.x,o=t.y;if(r!==void 0&&o!==void 0){const h=(a=(s=this.mapsService)==null?void 0:s.getContainer)==null?void 0:a.call(s);if(h){const f=h.getBoundingClientRect();return[r+f.left,o+f.top]}}const l=t.pixel;if(l){const h=(d=(c=this.mapsService)==null?void 0:c.getContainer)==null?void 0:d.call(c);if(h){const f=h.getBoundingClientRect();return[(l.x??0)+f.left,(l.y??0)+f.top]}}return[0,0]}extractFeatureProp(t,n){const r=t.properties;return r&&r[n]!==void 0?r[n]:t[n]}setCursorClass(t){var r,o;const n=(o=(r=this.mapsService)==null?void 0:r.getContainer)==null?void 0:o.call(r);n&&(n.classList.remove("l7-draw-cursor-pointer","l7-draw-cursor-grab","l7-draw-cursor-move"),t&&n.classList.add(t))}clearEditCursors(){var n,r;const t=(r=(n=this.mapsService)==null?void 0:n.getContainer)==null?void 0:r.call(n);t&&t.classList.remove("l7-draw-cursor-pointer","l7-draw-cursor-grab","l7-draw-cursor-move")}rebindVertexAndMidpointEvents(){var t,n,r,o,l,s,a,c,d;(t=this.vertexLayer)==null||t.on("mouseenter",()=>{this.setCursorClass("l7-draw-cursor-pointer")}),(n=this.vertexLayer)==null||n.on("mousemove",h=>{const[f,p]=this.extractClientXY(h);(f||p)&&this.showTooltip("拖拽移动顶点,右键删除",f,p)}),(r=this.vertexLayer)==null||r.on("mouseleave",()=>{this.clearEditCursors(),this.hideTooltip()}),(o=this.midpointLayer)==null||o.on("mouseenter",()=>{this.setCursorClass("l7-draw-cursor-pointer")}),(l=this.midpointLayer)==null||l.on("mousemove",h=>{const[f,p]=this.extractClientXY(h);(f||p)&&this.showTooltip("单击添加新顶点",f,p)}),(s=this.midpointLayer)==null||s.on("mouseleave",()=>{this.clearEditCursors(),this.hideTooltip()}),(a=this.vertexLayer)==null||a.on("mousedown",h=>{var p,g,y,C;const f=h.feature;if(f&&this.onVertexClick){const b=this.extractFeatureProp(f,"vertexIndex");b!==void 0&&((g=(p=this.mapsService)==null?void 0:p.setMapStatus)==null||g.call(p,{dragEnable:!1,zoomEnable:!1}),(C=(y=h.originalEvent)==null?void 0:y.stopPropagation)==null||C.call(y),this.onVertexClick(b))}}),(c=this.vertexLayer)==null||c.on("contextmenu",h=>{var p,g;const f=h.feature;if(f&&this.onVertexRightClick){const y=this.extractFeatureProp(f,"vertexIndex");y!==void 0&&((g=(p=h.originalEvent)==null?void 0:p.preventDefault)==null||g.call(p),this.onVertexRightClick(y))}}),(d=this.midpointLayer)==null||d.on("click",h=>{const f=h.feature;if(f&&this.onMidpointClick){const p=this.extractFeatureProp(f,"edgeIndex"),g=this.extractFeatureProp(f,"lng"),y=this.extractFeatureProp(f,"lat");p!==void 0&&g!==void 0&&y!==void 0&&this.onMidpointClick(p,[g,y])}})}removeEditClickHandlers(){this.onFeatureClick=null,this.onVertexClick=null,this.onVertexRightClick=null,this.onEmptyClick=null,this.onMidpointClick=null,this.editClickHandlersBound=!1}showSnapIndicator(t,n,r){if(!this.scene)return;const o="#ffc107",l=r==="vertex"?8:6;this.removeAndDestroy(this.snapIndicatorLayer),this.snapIndicatorLayer=new ge.PointLayer({name:`${Le}snap-indicator`,zIndex:20}).source([{lng:t,lat:n}],{parser:{type:"json",x:"lng",y:"lat"}}).shape("square").color(o).size(l).style({stroke:o,strokeWidth:1.5,opacity:.9}),this.addLayerWithRender(this.snapIndicatorLayer)}hideSnapIndicator(){this.removeAndDestroy(this.snapIndicatorLayer),this.snapIndicatorLayer=null}destroy(){this.removeEditClickHandlers(),this.destroyTooltip();const t=[this.featurePointLayer,this.featureLineLayer,this.featurePolygonLayer,this.featurePolygonOutlineLayer,this.drawingLineLayer,this.drawingDashLineLayer,this.drawingPolygonLayer,this.drawingPointLayer,this.selectionPolygonLayer,this.selectionLineLayer,this.selectionPointLayer,this.vertexLayer,this.midpointLayer,this.snapIndicatorLayer];for(const n of t)this.removeAndDestroy(n);this.featurePointLayer=null,this.featureLineLayer=null,this.featurePolygonLayer=null,this.featurePolygonOutlineLayer=null,this.drawingLineLayer=null,this.drawingDashLineLayer=null,this.drawingPolygonLayer=null,this.drawingPointLayer=null,this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null,this.vertexLayer=null,this.midpointLayer=null,this.snapIndicatorLayer=null}}const Ht={enabled:!0,threshold:8,vertex:!0,edge:!0};function jn(e){return e===!1?{...Ht,enabled:!1}:e===!0||e===void 0?{...Ht}:{...Ht,...e}}function Bn(e,t,n,r,o){if(!n.enabled||t.length===0)return{snapped:!1,lng:e[0],lat:e[1],type:"none"};const l=r(e);if(!l)return{snapped:!1,lng:e[0],lat:e[1],type:"none"};const s=n.threshold;let a=1/0,c={snapped:!1,lng:e[0],lat:e[1],type:"none"};for(const d of t){if(d.id===o)continue;const h=Re(d);if(h.length!==0){if(n.vertex)for(let f=0;f<h.length;f++){const p=r(h[f]);if(!p)continue;const g=l.x-p.x,y=l.y-p.y,C=Math.sqrt(g*g+y*y);C<s&&C<a&&(a=C,c={snapped:!0,lng:h[f][0],lat:h[f][1],type:"vertex",featureId:d.id,vertexIndex:f})}if(n.edge&&c.type!=="vertex"){const f=d.geometry.type==="Polygon"?h.length:Math.max(0,h.length-1);for(let p=0;p<f;p++){const g=(p+1)%h.length,y=r(h[p]),C=r(h[g]);if(!y||!C)continue;const b=Wn(l,y,C);if(b.t>=0&&b.t<=1&&b.dist<s&&b.dist<a){const x=b.t,k=h[p][0]+x*(h[g][0]-h[p][0]),L=h[p][1]+x*(h[g][1]-h[p][1]);a=b.dist,c={snapped:!0,lng:k,lat:L,type:"edge",featureId:d.id,edgeIndex:p}}}}}}return c}function Wn(e,t,n){const r=n.x-t.x,o=n.y-t.y,l=r*r+o*o;if(l===0)return{t:0,dist:Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)};let s=((e.x-t.x)*r+(e.y-t.y)*o)/l;s=Math.max(0,Math.min(1,s));const a=t.x+s*r,c=t.y+s*o,d=Math.sqrt((e.x-a)**2+(e.y-c)**2);return{t:s,dist:d}}const Un=5;function $e(e){const t=e.originalEvent??e.originEvent??e.e;return(t==null?void 0:t.clientX)??e.x??0}function _e(e){const t=e.originalEvent??e.originEvent??e.e;return(t==null?void 0:t.clientY)??e.y??0}function z1(e,t,n){const r=De(e);if(!r)return null;const o=n(r);if(!o){for(const s of t)if(s.geometry.type==="Polygon"&&V1(r,s.geometry.coordinates[0]))return s;return null}const l=8;for(const s of t)if(s.geometry.type==="Polygon"){if(V1(r,s.geometry.coordinates[0]))return s;const a=s.geometry.coordinates[0];for(let c=0;c<a.length-1;c++)if(H1(o,a[c],a[c+1],n)<=l)return s}else if(s.geometry.type==="Point"){const a=s.geometry.coordinates,c=n(a);if(c){const d=c.x-o.x,h=c.y-o.y;if(Math.sqrt(d*d+h*h)<=l)return s}}else if(s.geometry.type==="LineString"){const a=s.geometry.coordinates;for(let c=0;c<a.length-1;c++)if(H1(o,a[c],a[c+1],n)<=l)return s}return null}function H1(e,t,n,r){const o=r(t),l=r(n);if(!o||!l)return 1/0;const s=l.x-o.x,a=l.y-o.y,c=s*s+a*a;if(c===0){const y=e.x-o.x,C=e.y-o.y;return Math.sqrt(y*y+C*C)}const d=Math.max(0,Math.min(1,((e.x-o.x)*s+(e.y-o.y)*a)/c)),h=o.x+d*s,f=o.y+d*a,p=e.x-h,g=e.y-f;return Math.sqrt(p*p+g*g)}function V1(e,t){let n=!1;for(let r=0,o=t.length-1;r<t.length;o=r++){const l=t[r][0],s=t[r][1],a=t[o][0],c=t[o][1];s>e[1]!=c>e[1]&&e[0]<(a-l)*(e[1]-s)/(c-s)+l&&(n=!n)}return n}function E1(e,t,n){const r=n[0]-t[0],o=n[1]-t[1],l=r*r+o*o;if(l===0){const d=Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2);return{point:t,t:0,dist:d}}let s=((e[0]-t[0])*r+(e[1]-t[1])*o)/l;s=Math.max(0,Math.min(1,s));const a=[t[0]+s*r,t[1]+s*o],c=Math.sqrt((e[0]-a[0])**2+(e[1]-a[1])**2);return{point:a,t:s,dist:c}}function A1(e,t,n){if(e.geometry.type!=="LineString")return null;const r=[...e.geometry.coordinates.map(o=>[...o])];return t<0||t>=r.length-1?null:(r.splice(t+1,0,n),{...e,geometry:{type:"LineString",coordinates:r},properties:{...e.properties}})}function Z1(e,t,n){if(e.geometry.type!=="Polygon")return null;const r=e.geometry.coordinates.map(a=>a.map(c=>[...c])),o=r[0],l=o.length>1&&o[0][0]===o[o.length-1][0]&&o[0][1]===o[o.length-1][1]?o.length-1:o.length;if(t<0||t>=l)return null;const s=t+1;return o.splice(s,0,n),o[0][0]===o[o.length-2][0]&&(o[0][1],o[o.length-2][1]),o[o.length-1]=[o[0][0],o[0][1]],{...e,geometry:{type:"Polygon",coordinates:r},properties:{...e.properties}}}function qn(e,t){if(e.geometry.type!=="LineString")return null;const n=e.geometry.coordinates.map(r=>[...r]);return n.length<=2||t<0||t>=n.length?null:(n.splice(t,1),{...e,geometry:{type:"LineString",coordinates:n},properties:{...e.properties}})}function Yn(e,t){if(e.geometry.type!=="Polygon")return null;const n=e.geometry.coordinates.map(l=>l.map(s=>[...s])),r=n[0],o=r.length>1&&r[0][0]===r[r.length-1][0]&&r[0][1]===r[r.length-1][1]?r.length-1:r.length;return o<=3||t<0||t>=o?null:(r.splice(t,1),r[r.length-1]=[r[0][0],r[0][1]],{...e,geometry:{type:"Polygon",coordinates:n},properties:{...e.properties}})}function Xn(e){const{scene:t,mapsService:n,styles:r,snap:o,defaultFeatures:l,features:s,onDrawCreate:a,onDrawUpdate:c,onDrawDelete:d,onDrawSelect:h,onModeChange:f,onChange:p}=e,g=u.useRef(zn(l)),y=u.useRef(null),C=u.useMemo(()=>Hn(r),[r]),b=u.useMemo(()=>jn(o),[o]),x=u.useRef({onDrawCreate:a,onDrawUpdate:c,onDrawDelete:d,onDrawSelect:h,onModeChange:f,onChange:p});x.current={onDrawCreate:a,onDrawUpdate:c,onDrawDelete:d,onDrawSelect:h,onModeChange:f,onChange:p};const k=u.useRef("none"),L=u.useRef(l?[...l]:[]),z=u.useRef(null),E=s!==void 0,T=u.useRef(null),M=u.useRef(null),H=u.useRef(null),N=u.useCallback(Z=>{var v;if(!n)return null;try{const D=(v=n.lngLatToContainer)==null?void 0:v.call(n,[Z[0],Z[1]]);if(D)return{x:D.x??D[0],y:D.y??D[1]}}catch{}return null},[n]),V=u.useCallback(Z=>{var v,D,S;L.current=Z,g.current.features=Z,(v=y.current)==null||v.updateFeatures(Z),(S=(D=x.current).onChange)==null||S.call(D,Z)},[]),F=u.useCallback(Z=>{var D,S;z.current=Z,g.current.selectedFeatureId=Z;const v=Z?L.current.find(R=>R.id===Z)??null:null;(S=(D=x.current).onDrawSelect)==null||S.call(D,v)},[]);u.useEffect(()=>{if(!t)return;const Z=new On(t,C,n);return y.current=Z,L.current.length>0&&Z.updateFeatures(L.current),()=>{Z.destroy(),y.current=null}},[t]);const A=u.useCallback(Z=>{var se,J,re,q;const v=g.current,D=De(Z);if(!D)return;const S=y.current;if(!S)return;const R=H.current,B=R!=null&&R.snapped?R.lng:D[0],G=R!=null&&R.snapped?R.lat:D[1],ne=k.current;if(ne==="point"){const ae=Fe(An([B,G]),"point"),he=[...L.current,ae];V(he),(J=(se=x.current).onDrawCreate)==null||J.call(se,[ae]);return}if(ne==="polyline"){v.currentVertices.push([B,G]),v.isDrawing=!0,S.showDrawingFeedback(v.currentVertices,v.mousePoint,ne,v.startPoint);return}if(ne==="polygon"){v.currentVertices.push([B,G]),v.isDrawing=!0,S.showDrawingFeedback(v.currentVertices,v.mousePoint,ne,v.startPoint);return}if(ne==="circle"){if(!v.startPoint)v.startPoint=[B,G],v.isDrawing=!0;else{const ae=x1(v.startPoint,[B,G]);if(ae>.5){const he=L1(v.startPoint,ae),de=Fe(he,"circle"),Ce=[...L.current,de];V(Ce),(q=(re=x.current).onDrawCreate)==null||q.call(re,[de])}v.startPoint=null,v.isDrawing=!1,S.clearDrawingFeedback()}return}if(ne==="merge"){const ae=z1(Z,L.current,N);if(ae&&(ae.geometry.type==="Polygon"||ae.properties.drawType==="circle")){const he=ae.id,de=[...v.mergeSelectedIds],Ce=de.indexOf(he);Ce>=0?de.splice(Ce,1):de.push(he),v.mergeSelectedIds=de,S.highlightMergeSelected(de,L.current),de.length>=2?S.showTooltip(`已选中 ${de.length} 个面,双击合并`,$e(Z),_e(Z),["[ESC] 取消"]):de.length===1&&S.showTooltip("继续点击选中更多面",$e(Z),_e(Z),["[ESC] 取消"])}else v.mergeSelectedIds=[],S.highlightMergeSelected([],L.current),S.showTooltip("点击面要素选中",$e(Z),_e(Z),["[ESC] 取消"]);return}if(ne==="split"){if(!v.splitTargetId){const ae=z1(Z,L.current,N);ae&&(ae.geometry.type==="Polygon"||ae.properties.drawType==="circle")?(v.splitTargetId=ae.id,S.highlightSplitTarget(ae.id,L.current),S.showTooltip("已选目标面,单击绘制切线起点",$e(Z),_e(Z),["[ESC] 取消"])):S.showTooltip("先点击选择要切分的面",$e(Z),_e(Z),["[ESC] 取消"]);return}v.currentVertices.push([B,G]),v.isDrawing=!0,S.showDrawingFeedback(v.currentVertices,v.mousePoint,"polyline",v.startPoint),v.currentVertices.length===1?S.showTooltip("单击继续绘制切线,双击完成切分",$e(Z),_e(Z),["[ESC] 取消"]):S.showTooltip(`切线 ${v.currentVertices.length} 个顶点,双击完成切分`,$e(Z),_e(Z),["[ESC] 取消"]);return}},[V,N]),I=u.useCallback(Z=>{var R,B,G,ne,se,J,re,q,ae,he,de,Ce,xe,Ze,oe,ue;const v=g.current,D=k.current,S=y.current;if(S){if(D==="edit"&&z.current){De(Z);return}if(Z.originalEvent&&((B=(R=Z.originalEvent).preventDefault)==null||B.call(R),(ne=(G=Z.originalEvent).stopPropagation)==null||ne.call(G)),D==="merge"){if(v.mergeSelectedIds.length>=2){const ye=L.current.filter(ve=>v.mergeSelectedIds.includes(ve.id)),pe=Dn(ye);if(pe){const Ee=[...L.current.filter(be=>!v.mergeSelectedIds.includes(be.id)),pe];V(Ee),(J=(se=x.current).onDrawCreate)==null||J.call(se,[pe]),(q=(re=x.current).onDrawDelete)==null||q.call(re,ye[0])}v.mergeSelectedIds=[],S.highlightMergeSelected([],L.current),S.hideTooltip()}return}if(D==="split"&&v.splitTargetId&&v.currentVertices.length>=2){const ye=L.current.find(pe=>pe.id===v.splitTargetId);if(ye){const pe=_n(ye,v.currentVertices);if(pe){const Ee=[...L.current.filter(be=>be.id!==v.splitTargetId),...pe];V(Ee),(he=(ae=x.current).onDrawCreate)==null||he.call(ae,pe),(Ce=(de=x.current).onDrawDelete)==null||Ce.call(de,ye)}}v.currentVertices=[],v.isDrawing=!1,v.mousePoint=null,v.splitTargetId=null,S.clearDrawingFeedback(),S.clearSplitHighlight(),S.hideTooltip();return}if(D==="polyline"&&v.currentVertices.length>=2){const ye=C1(v.currentVertices),pe=Fe(ye,"polyline"),ve=[...L.current,pe];V(ve),(Ze=(xe=x.current).onDrawCreate)==null||Ze.call(xe,[pe]),v.currentVertices=[],v.isDrawing=!1,v.mousePoint=null,S.clearDrawingFeedback();return}if(D==="polygon"&&v.currentVertices.length>=3){const ye=v1(v.currentVertices),pe=Fe(ye,"polygon"),ve=[...L.current,pe];V(ve),(ue=(oe=x.current).onDrawCreate)==null||ue.call(oe,[pe]),v.currentVertices=[],v.isDrawing=!1,v.mousePoint=null,S.clearDrawingFeedback();return}(D==="polyline"||D==="polygon")&&(v.currentVertices=[],v.isDrawing=!1,v.mousePoint=null,S.clearDrawingFeedback())}},[V]),m=u.useCallback(Z=>{const v=g.current,D=De(Z);if(!D)return;const[S,R]=D,B=y.current,G=k.current,ne=Z.originalEvent??Z.originEvent??Z.e,se=(ne==null?void 0:ne.clientX)??Z.x??0,J=(ne==null?void 0:ne.clientY)??Z.y??0;if(v.mousePoint=[S,R],B&&(se||J)){const q=H.current;if((G==="point"||G==="polyline"||G==="polygon"||G==="circle"||G==="rectangle")&&(q!=null&&q.snapped)&&q.type!=="none")B.showSnapTooltip(q.type,q.lng,q.lat,se,J);else if(G==="point")B.showTooltip("单击放置点",se,J,["[ESC] 取消"]);else if(G==="polyline")v.isDrawing?B.showTooltip("单击添加顶点,双击结束",se,J,["[ESC] 取消"]):B.showTooltip("单击开始绘制线",se,J,["[ESC] 取消"]);else if(G==="polygon")v.isDrawing?v.currentVertices.length<3?B.showTooltip("单击添加顶点",se,J,["[ESC] 取消"]):B.showTooltip("单击继续,双击闭合",se,J,["[ESC] 取消"]):B.showTooltip("单击开始绘制面",se,J,["[ESC] 取消"]);else if(G==="rectangle")v.isDragging||B.showTooltip("按住拖拽绘制矩形",se,J,["[SHIFT] 正方形","[ESC] 取消"]);else if(G==="circle")if(!v.startPoint)B.showTooltip("单击设定圆心",se,J,["[ESC] 取消"]);else{const he=x1(v.startPoint,[S,R]),de=he>1e3?`${(he/1e3).toFixed(1)} km`:`${Math.round(he)} m`;B.showTooltip(`半径 ${de},单击完成`,se,J,["[ESC] 取消"])}else G==="merge"?v.mergeSelectedIds.length>=2?B.showTooltip(`已选中 ${v.mergeSelectedIds.length} 个面,双击合并`,se,J,["[ESC] 取消"]):v.mergeSelectedIds.length===1?B.showTooltip("继续点击选中更多面",se,J,["[ESC] 取消"]):B.showTooltip("点击面要素选中",se,J,["[ESC] 取消"]):G==="split"?v.splitTargetId?v.isDrawing?B.showTooltip(`切线 ${v.currentVertices.length} 个顶点,双击完成切分`,se,J,["[ESC] 取消"]):B.showTooltip("单击绘制切线起点",se,J,["[ESC] 取消"]):B.showTooltip("先点击选择要切分的面",se,J,["[ESC] 取消"]):G==="edit"||B.hideTooltip()}if((G==="point"||G==="polyline"||G==="polygon"||G==="circle")&&b.enabled&&B){const q=Bn([S,R],L.current,b,N);H.current=q,q.snapped&&q.type!=="none"?(B.showSnapIndicator(q.lng,q.lat,q.type),v.mousePoint=[q.lng,q.lat]):B.hideSnapIndicator()}else H.current=null,B==null||B.hideSnapIndicator();if((G==="polyline"||G==="polygon")&&v.isDrawing){B==null||B.showDrawingFeedback(v.currentVertices,v.mousePoint,G,v.startPoint);return}if(G==="circle"&&v.startPoint&&v.isDrawing){B==null||B.showDrawingFeedback(v.currentVertices,v.mousePoint,G,v.startPoint);return}if(G==="rectangle"&&v.isDragging&&v.startPoint){B==null||B.showDrawingFeedback(v.currentVertices,v.mousePoint,G,v.startPoint);return}if(G==="edit"&&v.isDragging&&v.selectedFeatureId&&v.dragVertexIndex!==null&&T.current){const q=L.current.find(ae=>ae.id===v.selectedFeatureId);if(q){const ae=Tn(q,v.dragVertexIndex,S,R),he=L.current.map(de=>de.id===ae.id?ae:de);V(he),B==null||B.updateVertexHandles(ae),B==null||B.updateSelectionHighlight(ae),T.current=[S,R]}return}if(G==="edit"&&v.isDragging&&v.selectedFeatureId&&v.dragVertexIndex===null&&T.current){const[q,ae]=T.current,he=S-q,de=R-ae;if(Math.abs(he)>1e-10||Math.abs(de)>1e-10){const Ce=L.current.find(xe=>xe.id===v.selectedFeatureId);if(Ce){const xe=Zn(Ce,he,de),Ze=L.current.map(oe=>oe.id===xe.id?xe:oe);V(Ze),B==null||B.updateVertexHandles(xe),B==null||B.updateSelectionHighlight(xe),T.current=[S,R]}}return}},[V]),w=u.useCallback(Z=>{var S,R;const v=g.current,D=k.current;if(n&&D==="rectangle"){const B=(S=n.getContainer)==null?void 0:S.call(n);if(!B)return;const G=B.getBoundingClientRect(),ne=Z.clientX-G.left,se=Z.clientY-G.top,J=(R=n.containerToLngLat)==null?void 0:R.call(n,[ne,se]);if(!J)return;v.startPoint=[J.lng,J.lat],v.isDragging=!0,M.current={x:Z.clientX,y:Z.clientY},n.setMapStatus({dragEnable:!1,zoomEnable:!1});return}},[n]),P=u.useCallback(Z=>{var R,B,G,ne,se,J;const v=g.current,D=k.current,S=y.current;if(n){if(D==="rectangle"&&v.isDragging&&v.startPoint){const re=(R=n.getContainer)==null?void 0:R.call(n);if(re){const q=re.getBoundingClientRect(),ae=Z.clientX-q.left,he=Z.clientY-q.top,de=(B=n.containerToLngLat)==null?void 0:B.call(n,[ae,he]),Ce=M.current,xe=Ce?w1(Ce,{x:Z.clientX,y:Z.clientY}):1/0;if(de&&xe>Un){const Ze=[de.lng,de.lat],oe=b1(v.startPoint,Ze),ue=Fe(oe,"rectangle"),ye=[...L.current,ue];V(ye),(ne=(G=x.current).onDrawCreate)==null||ne.call(G,[ue])}}v.startPoint=null,v.isDragging=!1,v.mousePoint=null,M.current=null,S==null||S.clearDrawingFeedback(),n.setMapStatus({dragEnable:!0,zoomEnable:!0});return}if(D==="edit"&&v.isDragging&&v.selectedFeatureId){n.setMapStatus({dragEnable:!0,zoomEnable:!0});const re=L.current.find(q=>q.id===v.selectedFeatureId);re&&((J=(se=x.current).onDrawUpdate)==null||J.call(se,re)),v.isDragging=!1,v.dragVertexIndex=null,T.current=null;return}}},[n,V]),$=u.useCallback(Z=>{var D,S,R;if(k.current!=="edit")return;const v=L.current.find(B=>B.id===Z)??null;v&&(F(Z),(D=y.current)==null||D.hideFeatureFromStatic(Z),(S=y.current)==null||S.updateSelectionHighlight(v),(R=y.current)==null||R.updateVertexHandles(v))},[F]),j=u.useCallback(Z=>{if(k.current!=="edit"||!n||!z.current)return;const v=g.current,D=L.current.find(R=>R.id===z.current);if(!D)return;const S=Re(D);Z>=0&&Z<S.length&&(T.current=S[Z]),v.isDragging=!0,v.dragVertexIndex=Z,n.setMapStatus({dragEnable:!1,zoomEnable:!1})},[n]),O=u.useCallback((Z,v)=>{if(k.current!=="edit")return;const D=g.current;D.isDragging||!L.current.find(R=>R.id===Z)||D.selectedFeatureId===Z&&(D.isDragging=!0,D.dragVertexIndex=null,T.current=v,n.setMapStatus({dragEnable:!1,zoomEnable:!1}))},[n]),K=u.useCallback(Z=>{var S,R,B,G;if(k.current!=="edit"||!z.current)return;const v=L.current.find(ne=>ne.id===z.current);if(!v)return;let D=null;if(v.geometry.type==="LineString"?D=qn(v,Z):v.geometry.type==="Polygon"&&(D=Yn(v,Z)),D){const ne=L.current.map(se=>se.id===D.id?D:se);V(ne),(R=(S=x.current).onDrawUpdate)==null||R.call(S,D),(B=y.current)==null||B.updateVertexHandles(D),(G=y.current)==null||G.updateSelectionHighlight(D)}},[V]);u.useCallback(Z=>{var R,B,G,ne;if(k.current!=="edit"||!z.current)return;const v=L.current.find(se=>se.id===z.current);if(!v)return;const D=Re(v);let S=null;if(v.geometry.type==="LineString"&&D.length>=2){let se=-1,J=1/0;for(let re=0;re<D.length-1;re++){const{dist:q}=E1(Z,D[re],D[re+1]);q<J&&(J=q,se=re)}se>=0&&J<.001&&(S=A1(v,se,Z))}else if(v.geometry.type==="Polygon"&&D.length>=3){let se=-1,J=1/0;for(let re=0;re<D.length;re++){const q=(re+1)%D.length,{dist:ae}=E1(Z,D[re],D[q]);ae<J&&(J=ae,se=re)}se>=0&&J<.001&&(S=Z1(v,se,Z))}if(S){const se=L.current.map(J=>J.id===S.id?S:J);V(se),(B=(R=x.current).onDrawUpdate)==null||B.call(R,S),(G=y.current)==null||G.updateVertexHandles(S),(ne=y.current)==null||ne.updateSelectionHighlight(S)}},[V]);const ee=u.useCallback((Z,v)=>{var R,B,G,ne;if(k.current!=="edit"||!z.current)return;const D=L.current.find(se=>se.id===z.current);if(!D)return;let S=null;if(D.geometry.type==="LineString"?S=A1(D,Z,v):D.geometry.type==="Polygon"&&(S=Z1(D,Z,v)),S){const se=L.current.map(J=>J.id===S.id?S:J);V(se),(B=(R=x.current).onDrawUpdate)==null||B.call(R,S),(G=y.current)==null||G.updateVertexHandles(S),(ne=y.current)==null||ne.updateSelectionHighlight(S)}},[V]),Y=u.useCallback(()=>{var Z,v,D;k.current==="edit"&&z.current&&(F(null),(Z=y.current)==null||Z.showAllFeatures(),(v=y.current)==null||v.clearSelectionHighlight(),(D=y.current)==null||D.clearVertexHandles())},[F]),X=u.useCallback(Z=>{var R,B,G,ne,se,J,re;const v=k.current;if(v===Z)return;const D=g.current,S=y.current;if(D.isDrawing&&(D.currentVertices=[],D.startPoint=null,D.mousePoint=null,D.isDrawing=!1,S==null||S.clearDrawingFeedback(),S==null||S.removeDrawingLayers()),v==="merge"&&(D.mergeSelectedIds=[],S==null||S.clearMergeHighlight(),S==null||S.hideTooltip()),v==="split"&&(D.splitTargetId=null,D.currentVertices=[],D.isDrawing=!1,S==null||S.clearDrawingFeedback(),S==null||S.clearSplitHighlight(),S==null||S.hideTooltip()),v==="edit"&&(F(null),S==null||S.showAllFeatures(),S==null||S.clearSelectionHighlight(),S==null||S.clearVertexHandles(),S==null||S.removeSelectionLayers(),S==null||S.removeVertexLayer(),S==null||S.removeEditClickHandlers(),S==null||S.clearEditCursors(),S==null||S.hideTooltip(),n&&n.setMapStatus({doubleClickZoom:!0})),v!=="edit"&&v!=="none"&&v!=="merge"&&v!=="split"){S==null||S.removeDrawingLayers(),S==null||S.hideTooltip(),n&&n.setMapStatus({doubleClickZoom:!0});const q=(R=n==null?void 0:n.getContainer)==null?void 0:R.call(n);q&&q.classList.remove("l7-draw-cursor-crosshair")}if(k.current=Z,D.mode=Z,Z==="merge"){D.mergeSelectedIds=[];const q=(B=n==null?void 0:n.getContainer)==null?void 0:B.call(n);q&&q.classList.add("l7-draw-cursor-crosshair")}else if(Z==="split"){D.splitTargetId=null,D.currentVertices=[],D.isDrawing=!1,n&&n.setMapStatus({doubleClickZoom:!1});const q=(G=n==null?void 0:n.getContainer)==null?void 0:G.call(n);q&&q.classList.add("l7-draw-cursor-crosshair")}else if(Z==="edit")S==null||S.setupEditClickHandlers($,j,Y,K,ee,O),n&&n.setMapStatus({doubleClickZoom:!1});else if(Z!=="none"){n&&(Z==="polyline"||Z==="polygon")&&n.setMapStatus({doubleClickZoom:!1});const q=(ne=n==null?void 0:n.getContainer)==null?void 0:ne.call(n);q&&q.classList.add("l7-draw-cursor-crosshair")}else{const q=(se=n==null?void 0:n.getContainer)==null?void 0:se.call(n);q&&q.classList.remove("l7-draw-cursor-crosshair")}(re=(J=x.current).onModeChange)==null||re.call(J,Z)},[n,$,j,Y,F]),te=u.useCallback(Z=>{var R,B;const v=g.current,D=k.current,S=y.current;if(Z.key==="Escape"){v.isDrawing&&(v.currentVertices=[],v.startPoint=null,v.mousePoint=null,v.isDrawing=!1,S==null||S.clearDrawingFeedback()),z.current&&(F(null),S==null||S.showAllFeatures(),S==null||S.clearSelectionHighlight(),S==null||S.clearVertexHandles()),S==null||S.hideTooltip();return}if((Z.key==="Delete"||Z.key==="Backspace")&&D==="edit"&&z.current){Z.preventDefault();const G=z.current,ne=L.current.find(se=>se.id===G);if(ne){const se=L.current.filter(J=>J.id!==G);V(se),(B=(R=x.current).onDrawDelete)==null||B.call(R,ne),F(null),S==null||S.showAllFeatures(),S==null||S.clearSelectionHighlight(),S==null||S.clearVertexHandles()}return}},[V,F]);u.useEffect(()=>{var B;if(!t||!n)return;const Z=G=>A(G),v=G=>I(G),D=G=>m(G),S=(B=n.getContainer)==null?void 0:B.call(n);n.on("click",Z),n.on("dblclick",v),n.on("mousemove",D),S&&S.addEventListener("mousedown",w),document.addEventListener("mouseup",P),document.addEventListener("keydown",te);const R=G=>{k.current==="edit"&&G.preventDefault()};return S&&S.addEventListener("contextmenu",R),()=>{n.off("click",Z),n.off("dblclick",v),n.off("mousemove",D),S&&(S.removeEventListener("mousedown",w),S.removeEventListener("contextmenu",R)),document.removeEventListener("mouseup",P),document.removeEventListener("keydown",te);try{n.setMapStatus({dragEnable:!0,zoomEnable:!0,doubleClickZoom:!0})}catch{}S&&S.classList.remove("l7-draw-cursor-crosshair")}},[t,n,A,I,m,w,P,te]),u.useEffect(()=>{var Z;E&&s&&(L.current=[...s],g.current.features=[...s],(Z=y.current)==null||Z.updateFeatures(s))},[E,s]);const _=u.useCallback(Z=>{var D,S;if(E)return;const v=[...L.current,...Z];V(v),(S=(D=x.current).onDrawCreate)==null||S.call(D,Z)},[E,V]),U=u.useCallback(Z=>{var S,R,B,G,ne;if(E)return;const v=L.current.find(se=>se.id===Z);if(!v)return;const D=L.current.filter(se=>se.id!==Z);V(D),(R=(S=x.current).onDrawDelete)==null||R.call(S,v),z.current===Z&&(F(null),(B=y.current)==null||B.showAllFeatures(),(G=y.current)==null||G.clearSelectionHighlight(),(ne=y.current)==null||ne.clearVertexHandles())},[E,V,F]),ce=u.useCallback(()=>{z.current&&U(z.current)},[U]),ie=u.useCallback(()=>{var Z,v,D;E||(V([]),F(null),(Z=y.current)==null||Z.showAllFeatures(),(v=y.current)==null||v.clearSelectionHighlight(),(D=y.current)==null||D.clearVertexHandles())},[E,V,F]),Q=u.useCallback(()=>[...L.current],[]),le=u.useCallback(Z=>{var v,D,S,R,B,G;if(k.current==="edit")if(Z){const ne=L.current.find(se=>se.id===Z)??null;F(Z),ne&&((v=y.current)==null||v.hideFeatureFromStatic(Z),(D=y.current)==null||D.updateSelectionHighlight(ne),(S=y.current)==null||S.updateVertexHandles(ne))}else F(null),(R=y.current)==null||R.showAllFeatures(),(B=y.current)==null||B.clearSelectionHighlight(),(G=y.current)==null||G.clearVertexHandles()},[F]);return{mode:k.current,features:L.current,selectedFeatureId:z.current,setMode:X,addFeatures:_,deleteFeature:U,deleteSelectedFeature:ce,clearAll:ie,getFeatures:Q,selectFeature:le,layerManager:y.current}}const F1=[{mode:"none",icon:"pan_tool",title:"手型 — 关闭绘制态,恢复地图交互",label:"手型"},{mode:"point",icon:"location_on",title:"点 — 单击放置",label:"点"},{mode:"polyline",icon:"timeline",title:"线 — 单击添加顶点,双击结束",label:"线"},{mode:"polygon",icon:"pentagon",title:"面 — 单击添加顶点,双击闭合",label:"面"},{mode:"circle",icon:"radio_button_unchecked",title:"圆 — 单击圆心,再单击确定半径",label:"圆形"},{mode:"rectangle",icon:"crop_square",title:"矩形 — 按住拖拽绘制",label:"矩形"},{mode:"edit",icon:"edit_square",title:"编辑 — 选中要素后拖拽移动或编辑顶点",label:"编辑"}],T1=[{mode:"merge",icon:"call_merge",title:"合并 — 选中2+要素合并为一个",label:"合并"},{mode:"split",icon:"content_cut",title:"切分 — 绘制切线将要素分割",label:"切分"}];function N1(){const e=u.useRef(null),t=u.useCallback((r,o)=>{if(!e.current){const p=document.createElement("div");p.style.cssText=["position:fixed","pointer-events:none","z-index:9999","padding:5px 10px","border-radius:4px","background:rgba(26,27,34,0.92)","color:#f2eff9",'font:500 11px/16px "JetBrains Mono",monospace',"white-space:nowrap","box-shadow:0 2px 8px rgba(0,0,0,0.3)"].join(";"),document.body.appendChild(p),e.current=p}const l=e.current;l.textContent=o,l.style.display="block";const s=l.getBoundingClientRect(),a=r.currentTarget.getBoundingClientRect();let c=a.right+8,d=a.top+a.height/2-s.height/2;const h=window.innerWidth,f=window.innerHeight;c+s.width>h-4&&(c=a.left-s.width-8),c<4&&(c=a.left+a.width/2-s.width/2,d=a.top-s.height-8),d<4&&(d=a.bottom+8),d+s.height>f-4&&(d=a.top-s.height-8),l.style.left=`${Math.max(4,c)}px`,l.style.top=`${Math.max(4,d)}px`},[]),n=u.useCallback(()=>{e.current&&(e.current.style.display="none")},[]);return u.useEffect(()=>()=>{var r;e.current&&((r=e.current.parentElement)==null||r.removeChild(e.current),e.current=null)},[]),{showTooltip:t,hideTooltip:n}}function I1(e,t,n,r,o,l){return e.map(s=>i.jsx("button",{className:`l7-button-control ${l}${t===s.mode?" l7-button-control--active":""}`,onClick:()=>n(s.mode),onMouseEnter:a=>r(a,s.title),onMouseLeave:o,"aria-label":s.title,"aria-pressed":t===s.mode,children:i.jsx("span",{className:"material-symbols-outlined",children:s.icon})},s.mode))}const Gn=({activeMode:e,onModeChange:t,modes:n,showDelete:r=!0,hasSelection:o=!1,hasFeatures:l=!1,onDeleteSelected:s,onClearAll:a,className:c,style:d})=>{const{showTooltip:h,hideTooltip:f}=N1(),p=u.useMemo(()=>n?F1.filter(y=>y.mode==="none"||n.includes(y.mode)):F1,[n]),g=u.useCallback(y=>{t(y==="none"||e===y?"none":y)},[e,t]);return i.jsxs("div",{className:`l7-control l7-control-draw l7-control--glass${c?` ${c}`:""}`,style:d,role:"toolbar","aria-label":"基础绘制工具",children:[I1(p,e,g,h,f,"l7-draw-tool-btn"),r&&e==="edit"&&o&&s&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"l7-draw-separator"}),i.jsx("button",{className:"l7-button-control l7-draw-action-btn",onClick:s,onMouseEnter:y=>h(y,"删除选中要素"),onMouseLeave:f,"aria-label":"删除选中要素",children:i.jsx("span",{className:"material-symbols-outlined",children:"delete"})})]}),r&&l&&a&&i.jsx("button",{className:"l7-button-control l7-draw-action-btn",onClick:a,onMouseEnter:y=>h(y,"清除所有要素"),onMouseLeave:f,"aria-label":"清除所有要素",children:i.jsx("span",{className:"material-symbols-outlined",children:"delete_sweep"})})]})},Jn=({activeMode:e,onModeChange:t,modes:n,className:r,style:o})=>{const{showTooltip:l,hideTooltip:s}=N1(),a=u.useMemo(()=>n?T1.filter(d=>d.mode==="none"||n.includes(d.mode)):T1,[n]),c=u.useCallback(d=>{t(d==="none"||e===d?"none":d)},[e,t]);return i.jsx("div",{className:`l7-control l7-control-draw l7-control--glass${r?` ${r}`:""}`,style:o,role:"toolbar","aria-label":"高级操作工具",children:I1(a,e,c,l,s,"l7-draw-advanced-btn")})},Vt=u.forwardRef(function({position:t="topright",defaultFeatures:n,features:r,modes:o,showDelete:l=!0,styles:s,snap:a,className:c,style:d,onDrawCreate:h,onDrawUpdate:f,onDrawDelete:p,onDrawSelect:g,onModeChange:y,onChange:C},b){const{scene:x,mapsService:k,positionClassName:L}=ke(t),z=Me(),E=Xn({scene:x,mapsService:k,styles:s,snap:a,defaultFeatures:n,features:r,onDrawCreate:h,onDrawUpdate:f,onDrawDelete:p,onDrawSelect:g,onModeChange:y,onChange:C}),[T,M]=u.useState("none");u.useImperativeHandle(b,()=>({setMode:E.setMode,addFeatures:E.addFeatures,deleteFeature:E.deleteFeature,clearAll:E.clearAll,getFeatures:E.getFeatures,selectFeature:E.selectFeature}),[E]);const H=u.useCallback(m=>{M(m),E.setMode(m)},[E]),N=u.useCallback(()=>{E.deleteSelectedFeature()},[E]),V=u.useCallback(()=>{E.clearAll()},[E]),F=E.selectedFeatureId!==null,A=E.features.length>0,I=i.jsxs(i.Fragment,{children:[i.jsx(Gn,{activeMode:T,onModeChange:H,modes:o,showDelete:l,hasSelection:F,hasFeatures:A,onDeleteSelected:N,onClearAll:V}),i.jsx(Jn,{activeMode:T,onModeChange:H,modes:o})]});return z?i.jsx("div",{className:c,style:d,children:I}):i.jsx("div",{className:`l7-control-anchor ${L}`,children:I})});we.mark(Vt);async function P1(e){let t,n;e instanceof File?(t=URL.createObjectURL(e),n=()=>URL.revokeObjectURL(t)):t=e;const{width:r,height:o}=await Kn(t);return{url:t,width:r,height:o,revokeUrl:n}}function Kn(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>t({width:r.naturalWidth,height:r.naturalHeight}),r.onerror=()=>n(new Error("Failed to load image")),r.crossOrigin="anonymous",r.src=e})}function D1(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=()=>n(new Error("Failed to load image")),r.crossOrigin="anonymous",r.src=e})}async function Qn(e,t,n="image/png",r=.92){const o=await D1(e),l=document.createElement("canvas");l.width=Math.round(t.width),l.height=Math.round(t.height);const s=l.getContext("2d");if(!s)throw new Error("Canvas 2D context unavailable");s.drawImage(o,Math.round(t.x),Math.round(t.y),Math.round(t.width),Math.round(t.height),0,0,l.width,l.height);const a=await new Promise((h,f)=>{l.toBlob(p=>p?h(p):f(new Error("Canvas toBlob failed")),n,r)}),c=URL.createObjectURL(a);return{blob:a,url:c,revokeUrl:()=>URL.revokeObjectURL(c),width:l.width,height:l.height}}function Rn(e,t,n){const r=Math.max(0,Math.min(e.x,t-e.width)),o=Math.max(0,Math.min(e.y,n-e.height)),l=Math.max(1,Math.min(e.width,t-r)),s=Math.max(1,Math.min(e.height,n-o));return{x:r,y:o,width:l,height:s}}function er(e,t,n){const r=360/Math.pow(2,t)*.3,o=r*n/2,l=r/2,[s,a]=e;return[[s-o,a+l],[s+o,a+l],[s+o,a-l],[s-o,a-l]]}function tr(e){const t=e.map(r=>r[0]),n=e.map(r=>r[1]);return[Math.min(...t),Math.min(...n),Math.max(...t),Math.max(...n)]}function nr(e,t){const n=[],r=[];for(let l=0;l<4;l++){const[s,a]=e[l],[c,d]=t[l];n.push([-s,-a,-1,0,0,0,c*s,c*a]),r.push(-c),n.push([0,0,0,-s,-a,-1,d*s,d*a]),r.push(-d)}const o=ir(n,r);return[o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],1]}function rr(e,t,n,r){const o="naturalWidth"in e?e.naturalWidth:e.width,l="naturalHeight"in e?e.naturalHeight:e.height,s=t.map(H=>H[0]),a=t.map(H=>H[1]),c=Math.min(...s),d=Math.max(...s),h=Math.min(...a),f=Math.max(...a),p=H=>[(H[0]-c)/(d-c)*n,(f-H[1])/(f-h)*r],g=t.map(p),C=nr(g,[[0,0],[o,0],[o,l],[0,l]]),b=document.createElement("canvas");b.width=n,b.height=r;const x=b.getContext("2d"),k=document.createElement("canvas");k.width=o,k.height=l;const L=k.getContext("2d");L.drawImage(e,0,0);const z=L.getImageData(0,0,o,l),E=x.createImageData(n,r),T=z.data,M=E.data;for(let H=0;H<r;H++)for(let N=0;N<n;N++){const V=C[6]*N+C[7]*H+C[8];if(Math.abs(V)<1e-10)continue;const F=(C[0]*N+C[1]*H+C[2])/V,A=(C[3]*N+C[4]*H+C[5])/V;if(F>=0&&F<o-1&&A>=0&&A<l-1){const I=Math.floor(F),m=Math.floor(A),w=F-I,P=A-m,$=(m*o+I)*4,j=(H*n+N)*4;for(let O=0;O<4;O++)M[j+O]=Math.round(T[$+O]*(1-w)*(1-P)+T[$+4+O]*w*(1-P)+T[$+o*4+O]*(1-w)*P+T[$+o*4+4+O]*w*P)}}return x.putImageData(E,0,0),b}function or(e,t,n,r,o,l,s){const a=document.createElement("canvas");return a.width=r,a.height=o,a.getContext("2d").drawImage(e,t,n,r,o,0,0,r,o),new Promise((d,h)=>{a.toBlob(f=>f?d(f):h(new Error("tile export failed")),l,s)})}async function sr(e,t,n){const{outputWidth:r,outputHeight:o,cols:l,rows:s,format:a="image/png",quality:c=.92}=n,d=rr(e,t,r,o),h=t.map(M=>M[0]),f=t.map(M=>M[1]),p=Math.min(...h),g=Math.max(...h),y=Math.min(...f),C=Math.max(...f),b=[p,y,g,C],x=await new Promise((M,H)=>{d.toBlob(N=>N?M(N):H(new Error("export failed")),a,c)}),k=Math.floor(r/l),L=Math.floor(o/s),z=(g-p)/l,E=(C-y)/s,T=[];for(let M=0;M<s;M++)for(let H=0;H<l;H++){const N=H*k,V=M*L,F=H===l-1?r-N:k,A=M===s-1?o-V:L,I=p+H*z,m=H===l-1?g:I+z,w=C-M*E,P=M===s-1?y:w-E,$=[I,P,m,w],j=[[I,w],[m,w],[m,P],[I,P]],O=await or(d,N,V,F,A,a,c);T.push({blob:O,row:M,col:H,extent:$,corners:j,width:F,height:A})}return{canvas:d,fullBlob:x,tiles:T,extent:b}}function ir(e,t){const r=[];for(let o=0;o<8;o++)r.push([...e[o],t[o]]);for(let o=0;o<8;o++){let l=o,s=Math.abs(r[o][o]);for(let c=o+1;c<8;c++)Math.abs(r[c][o])>s&&(s=Math.abs(r[c][o]),l=c);[r[o],r[l]]=[r[l],r[o]];const a=r[o][o];if(Math.abs(a)<1e-12)throw new Error("Singular matrix in homography computation");for(let c=o;c<=8;c++)r[o][c]/=a;for(let c=0;c<8;c++){if(c===o)continue;const d=r[c][o];for(let h=o;h<=8;h++)r[c][h]-=d*r[o][h]}}return r.map(o=>o[8])}function lr({scene:e,mapsService:t,corners:n,defaultCorners:r,imageSource:o,opacity:l=.7,onCornersChange:s,onImageLoad:a}){const[c,d]=u.useState({phase:"idle",imageUrl:null,imageDimensions:null,corners:r??null,draggingCorner:null,opacity:l}),[h,f]=u.useState(null),p=u.useRef(c.corners),g=u.useRef(null),y=u.useRef(null),C=u.useRef(s);C.current=s;const b=u.useRef(null),x=n!==void 0,k=x?n:c.corners;u.useEffect(()=>{p.current=k??null},[k]),u.useEffect(()=>{x&&n&&d(m=>({...m,corners:n}))},[x,n]),u.useEffect(()=>{o&&M(o)},[o]);const[L,z]=u.useState(k??null);u.useEffect(()=>{c.draggingCorner||z(k??null)},[k,c.draggingCorner]),u.useEffect(()=>{if(!e||!c.imageUrl||!L){if(b.current){try{e==null||e.removeLayer(b.current)}catch{}b.current=null}return}const m=[L[0],L[1],L[2],L[3]];if(b.current){try{e.removeLayer(b.current)}catch{}b.current=null}const w=new ge.ImageLayer({zIndex:10,name:"__calibration_image__"});return w.source(c.imageUrl,{parser:{type:"image",coordinates:m}}),w.style({opacity:c.opacity}),e.addLayer(w),b.current=w,()=>{if(b.current){try{e.removeLayer(b.current)}catch{}b.current=null}}},[e,c.imageUrl,L,c.opacity]);const E=u.useCallback(()=>{if(!t||!p.current){f(null);return}try{const m=p.current.map(w=>{const P=t.lngLatToContainer([w[0],w[1]]);return[P.x,P.y]});f(m)}catch{}},[t]);u.useEffect(()=>{if(!t||!k)return;E();const m=()=>E();return t.on("camerachange",m),t.on("viewchange",m),()=>{t.off("camerachange",m),t.off("viewchange",m)}},[t,k,E]);const T=u.useCallback(m=>{var j;if(!t)return;g.current=m,d(O=>({...O,draggingCorner:m})),t.setMapStatus({dragEnable:!1,zoomEnable:!1});const w=(j=t.getContainer)==null?void 0:j.call(t),P=O=>{var _;if(g.current===null||!p.current||!w)return;const K=w.getBoundingClientRect(),ee=O.clientX-K.left,Y=O.clientY-K.top,X=t.containerToLngLat([ee,Y]);if(!X)return;const te=[...p.current];te[g.current]=[X.lng,X.lat],p.current=te,x||d(U=>({...U,corners:te})),(_=C.current)==null||_.call(C,te),E()},$=()=>{g.current=null,d(O=>({...O,draggingCorner:null})),t.setMapStatus({dragEnable:!0,zoomEnable:!0}),document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",$)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",$)},[t,x,E]),M=u.useCallback(async(m,w)=>{var P,$;(P=y.current)==null||P.call(y),y.current=null;try{const j=await P1(m);y.current=j.revokeUrl??null;let O=w??p.current;if(!O&&t){const K=t.getCenter(),ee=t.getZoom(),Y=j.width/j.height;O=er([K.lng,K.lat],ee,Y)}d(K=>({...K,phase:"calibrating",imageUrl:j.url,imageDimensions:{width:j.width,height:j.height},corners:x?K.corners:O})),!x&&O&&(p.current=O,($=C.current)==null||$.call(C,O)),a==null||a({width:j.width,height:j.height}),requestAnimationFrame(E)}catch(j){console.error("Failed to load image:",j)}},[t,x,a,E]),H=u.useCallback(m=>{d(w=>({...w,phase:m}))},[]),N=u.useCallback(m=>{d(w=>({...w,opacity:m}))},[]),V=u.useCallback(()=>{var m;if((m=y.current)==null||m.call(y),y.current=null,p.current=null,b.current&&e){try{e.removeLayer(b.current)}catch{}b.current=null}d({phase:"idle",imageUrl:null,imageDimensions:null,corners:null,draggingCorner:null,opacity:l}),f(null)},[l,e]),F=u.useCallback(()=>p.current,[]),A=u.useCallback(m=>{var w;p.current=m,x||d(P=>({...P,corners:m})),(w=C.current)==null||w.call(C,m),E()},[x,E]),I=u.useCallback(async m=>{if(!c.imageUrl||!p.current||!c.imageDimensions)throw new Error("No image or corners to export");const w=await D1(c.imageUrl),P=p.current,$=(m==null?void 0:m.outputWidth)||c.imageDimensions.width,j=(m==null?void 0:m.outputHeight)||c.imageDimensions.height,O=(m==null?void 0:m.cols)||1,K=(m==null?void 0:m.rows)||1,{fullBlob:ee,tiles:Y,extent:X}=await sr(w,P,{outputWidth:$,outputHeight:j,cols:O,rows:K,format:m==null?void 0:m.format,quality:m==null?void 0:m.quality}),te=URL.createObjectURL(ee);return{tiles:Y.map(U=>({blob:U.blob,previewUrl:URL.createObjectURL(U.blob),row:U.row,col:U.col,extent:U.extent,corners:U.corners,width:U.width,height:U.height})),extent:X,previewUrl:te,blob:ee,outputWidth:$,outputHeight:j}},[c.imageUrl,c.imageDimensions]);return u.useEffect(()=>()=>{var m;if((m=y.current)==null||m.call(y),b.current&&e)try{e.removeLayer(b.current)}catch{}},[e]),{state:c,screenPositions:h,setImage:M,setPhase:H,setOpacity:N,startDrag:T,clear:V,getCorners:F,setCorners:A,exportImage:I}}const ar=["TL","TR","BR","BL"],tt=14;function cr({screenPositions:e,draggingCorner:t,phase:n,onStartDrag:r}){const o=u.useCallback(a=>c=>{c.preventDefault(),c.stopPropagation(),r(a)},[r]),l=n==="calibrating",s=`M ${e[0][0]},${e[0][1]} L ${e[1][0]},${e[1][1]} L ${e[2][0]},${e[2][1]} L ${e[3][0]},${e[3][1]} Z`;return i.jsxs(i.Fragment,{children:[i.jsx("svg",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"},children:i.jsx("path",{d:s,fill:"none",stroke:"#f59e0b",strokeWidth:"2",strokeDasharray:"6 3"})}),l&&e.map((a,c)=>i.jsx("div",{onMouseDown:o(c),style:{position:"absolute",left:a[0]-tt/2,top:a[1]-tt/2,width:tt,height:tt,borderRadius:"50%",backgroundColor:"#fff",border:"2px solid #f59e0b",boxShadow:"0 2px 4px rgba(0,0,0,0.3)",cursor:t===c?"grabbing":"grab",transform:t===c?"scale(1.3)":"scale(1)",transition:t===null?"transform 0.15s ease":"none",zIndex:t===c?10:1,pointerEvents:"auto"},title:`${ar[c]} 角点`},c))]})}const $1=["左上 (TL)","右上 (TR)","右下 (BR)","左下 (BL)"],Ae=10;function ur({imageUrl:e,imageDimensions:t,mapCenter:n,mapZoom:r,showInitialCoords:o=!0,onConfirm:l,onCancel:s}){const[a,c]=u.useState({x:0,y:0,width:t.width,height:t.height}),[d,h]=u.useState(null),[f,p]=u.useState(!0),[g,y]=u.useState([[0,0],[0,0],[0,0],[0,0]]),C=u.useRef(null),[b,x]=u.useState(1);u.useEffect(()=>{const F=()=>{if(!C.current)return;const A=C.current.clientWidth,I=C.current.clientHeight,m=A/t.width,w=I/t.height;x(Math.min(m,w,1))};return F(),window.addEventListener("resize",F),()=>window.removeEventListener("resize",F)},[t]);const k=u.useRef(null);u.useCallback((F,A)=>{if(!k.current)return{imgX:0,imgY:0};const I=k.current.getBoundingClientRect(),m=(F-I.left)/b,w=(A-I.top)/b;return{imgX:m,imgY:w}},[b]);const L=u.useCallback((F,A)=>{F.preventDefault(),F.stopPropagation(),h({handle:A,startMouseX:F.clientX,startMouseY:F.clientY,startCrop:{...a}})},[a]);u.useEffect(()=>{if(!d)return;const F=I=>{const m=(I.clientX-d.startMouseX)/b,w=(I.clientY-d.startMouseY)/b,P=d.startCrop;let $;switch(d.handle){case"move":$={...P,x:P.x+m,y:P.y+w};break;case"tl":$={x:P.x+m,y:P.y+w,width:P.width-m,height:P.height-w};break;case"tr":$={x:P.x,y:P.y+w,width:P.width+m,height:P.height-w};break;case"br":$={x:P.x,y:P.y,width:P.width+m,height:P.height+w};break;case"bl":$={x:P.x+m,y:P.y,width:P.width-m,height:P.height+w};break;default:$=P}$.width<20&&((d.handle==="tl"||d.handle==="bl")&&($.x=P.x+P.width-20),$.width=20),$.height<20&&((d.handle==="tl"||d.handle==="tr")&&($.y=P.y+P.height-20),$.height=20),c(Rn($,t.width,t.height))},A=()=>{h(null)};return document.addEventListener("mousemove",F),document.addEventListener("mouseup",A),()=>{document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",A)}},[d,b,t]);const z=u.useCallback((F,A,I)=>{const m=parseFloat(I);if(isNaN(m))return;const w=[...g];w[F]=[A==="lng"?m:w[F][0],A==="lat"?m:w[F][1]],y(w)},[g]);u.useEffect(()=>{if(f&&n&&r!==null){const F=a.width/a.height,A=360/Math.pow(2,r)*.3,I=A*F/2,m=A/2,[w,P]=n;y([[w-I,P+m],[w+I,P+m],[w+I,P-m],[w-I,P-m]])}},[f,n,r,a.width,a.height]);const E=u.useCallback(()=>{l(a,f?null:g)},[a,f,g,l]),T=a.x*b,M=a.y*b,H=a.width*b,N=a.height*b,V=F=>({position:"absolute",left:0,top:0,width:t.width*b,height:t.height*b,background:"rgba(0, 0, 0, 0.45)",clipPath:F,pointerEvents:"none"});return i.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.6)"},onClick:s,children:i.jsxs("div",{style:{background:"#fff",borderRadius:10,padding:0,width:680,maxHeight:"90vh",overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)",display:"flex",flexDirection:"column"},onClick:F=>F.stopPropagation(),children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 20px",borderBottom:"1px solid #e5e7eb",fontSize:15,fontWeight:600},children:[i.jsx("span",{children:"图片裁剪 & 初始坐标"}),i.jsx("button",{onClick:s,style:{border:"none",background:"transparent",fontSize:20,cursor:"pointer",color:"#666",lineHeight:1},children:"✕"})]}),i.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[i.jsx("div",{ref:C,style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:16,background:"#f9fafb",overflow:"hidden",minHeight:300},children:i.jsxs("div",{style:{position:"relative",lineHeight:0},children:[i.jsx("img",{ref:k,src:e,style:{width:t.width*b,height:t.height*b,display:"block",userSelect:"none",pointerEvents:"none"},draggable:!1}),i.jsx("div",{style:V(`polygon(0% 0%, 100% 0%, 100% ${M}px, ${T}px ${M}px, ${T}px ${M+N}px, 0% ${M+N}px)`)}),i.jsx("div",{style:V(`polygon(100% 0%, 100% 100%, ${T+H}px 100%, ${T+H}px ${M}px, 100% ${M}px)`)}),i.jsx("div",{style:V(`polygon(${T+H}px ${M}px, 100% ${M}px, 100% 100%, ${T+H}px 100%, ${T+H}px ${M+N}px)`)}),i.jsx("div",{style:V(`polygon(0% ${M+N}px, ${T}px ${M+N}px, ${T+H}px ${M+N}px, ${T+H}px 100%, 0% 100%)`)}),i.jsxs("div",{onMouseDown:F=>L(F,"move"),style:{position:"absolute",left:T,top:M,width:H,height:N,border:"2px solid #f59e0b",cursor:(d==null?void 0:d.handle)==="move"?"grabbing":"grab",pointerEvents:"auto",boxSizing:"border-box"},children:[i.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[i.jsx("div",{style:{position:"absolute",top:"33.3%",left:0,right:0,height:1,background:"rgba(245,158,7,0.3)"}}),i.jsx("div",{style:{position:"absolute",top:"66.6%",left:0,right:0,height:1,background:"rgba(245,158,7,0.3)"}}),i.jsx("div",{style:{position:"absolute",left:"33.3%",top:0,bottom:0,width:1,background:"rgba(245,158,7,0.3)"}}),i.jsx("div",{style:{position:"absolute",left:"66.6%",top:0,bottom:0,width:1,background:"rgba(245,158,7,0.3)"}})]}),["tl","tr","br","bl"].map(F=>{const A={tl:{left:-Ae/2,top:-Ae/2,cursor:"nwse-resize"},tr:{right:-Ae/2,top:-Ae/2,cursor:"nesw-resize"},br:{right:-Ae/2,bottom:-Ae/2,cursor:"nwse-resize"},bl:{left:-Ae/2,bottom:-Ae/2,cursor:"nesw-resize"}};return i.jsx("div",{onMouseDown:I=>L(I,F),style:{position:"absolute",width:Ae,height:Ae,background:"#fff",border:"2px solid #f59e0b",borderRadius:2,pointerEvents:"auto",...A[F]}},F)}),i.jsxs("div",{style:{position:"absolute",bottom:-22,left:"50%",transform:"translateX(-50%)",fontSize:10,color:"#f59e0b",whiteSpace:"nowrap",pointerEvents:"none",fontFamily:"monospace",background:"rgba(0,0,0,0.5)",padding:"1px 4px",borderRadius:2},children:[Math.round(a.width)," × ",Math.round(a.height)]})]})]})}),o&&i.jsxs("div",{style:{width:260,padding:"16px 20px",borderLeft:"1px solid #e5e7eb",display:"flex",flexDirection:"column",gap:12,overflowY:"auto",fontSize:12},children:[i.jsx("div",{style:{fontWeight:600,marginBottom:4,color:"#333"},children:"裁剪区域"}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"6px 12px",color:"#666",fontFamily:"monospace",fontSize:11},children:[i.jsxs("span",{children:["X: ",Math.round(a.x),"px"]}),i.jsxs("span",{children:["Y: ",Math.round(a.y),"px"]}),i.jsxs("span",{children:["W: ",Math.round(a.width),"px"]}),i.jsxs("span",{children:["H: ",Math.round(a.height),"px"]})]}),i.jsx("button",{onClick:()=>c({x:0,y:0,width:t.width,height:t.height}),style:{padding:"4px 12px",fontSize:11,border:"1px solid #d1d5db",borderRadius:4,background:"#fff",cursor:"pointer",alignSelf:"flex-start"},children:"重置裁剪区域"}),i.jsx("div",{style:{fontWeight:600,color:"#333",marginTop:8},children:"初始坐标"}),i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:4,cursor:"pointer"},children:[i.jsx("input",{type:"radio",name:"coordMode",checked:f,onChange:()=>p(!0)}),i.jsx("span",{children:"自动计算"})]}),i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:4,cursor:"pointer"},children:[i.jsx("input",{type:"radio",name:"coordMode",checked:!f,onChange:()=>p(!1)}),i.jsx("span",{children:"手动输入"})]})]}),f&&i.jsx("div",{style:{color:"#888",fontSize:11,lineHeight:1.5},children:"基于当前地图视口中心自动计算4个角点坐标。确认后将图片放置到地图视口中。"}),!f&&i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:g.map((F,A)=>i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[i.jsx("span",{style:{width:64,color:"#666",fontSize:11},children:$1[A]}),i.jsx("input",{type:"number",step:"any",value:F[0],onChange:I=>z(A,"lng",I.target.value),placeholder:"经度",style:{width:72,padding:"3px 6px",border:"1px solid #d1d5db",borderRadius:3,fontSize:11,fontFamily:"monospace"}}),i.jsx("input",{type:"number",step:"any",value:F[1],onChange:I=>z(A,"lat",I.target.value),placeholder:"纬度",style:{width:72,padding:"3px 6px",border:"1px solid #d1d5db",borderRadius:3,fontSize:11,fontFamily:"monospace"}})]},A))}),i.jsxs("div",{style:{fontSize:10,color:"#999",fontFamily:"monospace",lineHeight:1.6,marginTop:4},children:[f?"自动模式":"手动模式",":",g.map((F,A)=>i.jsxs("div",{children:[$1[A],": [",F[0].toFixed(4),", ",F[1].toFixed(4),"]"]},A))]})]})]}),i.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,padding:"12px 20px",borderTop:"1px solid #e5e7eb"},children:[i.jsx("button",{onClick:s,style:{padding:"6px 20px",fontSize:13,border:"1px solid #d1d5db",borderRadius:5,background:"#fff",cursor:"pointer"},children:"取消"}),i.jsx("button",{onClick:E,style:{padding:"6px 20px",fontSize:13,border:"none",borderRadius:5,background:"#2563eb",color:"#fff",cursor:"pointer",fontWeight:500},children:"确认裁剪 & 开始配准"})]})]})})}class dr{constructor(){this.entries=[]}addFile(t,n){typeof n=="string"?this.entries.push({name:t,data:new TextEncoder().encode(n)}):n instanceof Blob?this.entries.push({name:t,data:new Uint8Array(0)}):this.entries.push({name:t,data:n})}async addBlob(t,n){const r=await n.arrayBuffer();this.entries.push({name:t,data:new Uint8Array(r)})}generate(){const t=[],n=[];let r=0;for(const a of this.entries){const c=new TextEncoder().encode(a.name),d=hr(a.data),h=a.data.length,f=new Uint8Array(30+c.length),p=new DataView(f.buffer);p.setUint32(0,67324752,!0),p.setUint16(4,20,!0),p.setUint16(6,0,!0),p.setUint16(8,0,!0),p.setUint16(10,0,!0),p.setUint16(12,0,!0),p.setUint32(14,d,!0),p.setUint32(18,h,!0),p.setUint32(22,h,!0),p.setUint16(26,c.length,!0),p.setUint16(28,0,!0),f.set(c,30),t.push(f),t.push(a.data);const g=new Uint8Array(46+c.length),y=new DataView(g.buffer);y.setUint32(0,33639248,!0),y.setUint16(4,20,!0),y.setUint16(6,20,!0),y.setUint16(8,0,!0),y.setUint16(10,0,!0),y.setUint16(12,0,!0),y.setUint16(14,0,!0),y.setUint32(16,d,!0),y.setUint32(20,h,!0),y.setUint32(24,h,!0),y.setUint16(28,c.length,!0),y.setUint16(30,0,!0),y.setUint16(32,0,!0),y.setUint16(34,0,!0),y.setUint16(36,0,!0),y.setUint32(38,0,!0),y.setUint32(42,r,!0),g.set(c,46),n.push(g),r+=f.length+a.data.length}const o=n.reduce((a,c)=>a+c.length,0),l=new Uint8Array(22),s=new DataView(l.buffer);return s.setUint32(0,101010256,!0),s.setUint16(4,0,!0),s.setUint16(6,0,!0),s.setUint16(8,this.entries.length,!0),s.setUint16(10,this.entries.length,!0),s.setUint32(12,o,!0),s.setUint32(16,r,!0),s.setUint16(20,0,!0),new Blob([...t,...n,l],{type:"application/zip"})}}const _1=new Uint32Array(256);for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t=t&1?3988292384^t>>>1:t>>>1;_1[e]=t}function hr(e){let t=4294967295;for(let n=0;n<e.length;n++)t=_1[(t^e[n])&255]^t>>>8;return(t^4294967295)>>>0}function Be({icon:e,tip:t,onClick:n,disabled:r}){const[o,l]=u.useState(!1);return i.jsxs("div",{style:{position:"relative",display:"flex"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[i.jsx("button",{className:"l7-button-control",onClick:n,disabled:r,"aria-label":t,children:i.jsx("span",{className:"material-symbols-outlined",children:e})}),o&&i.jsx("div",{style:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:6,padding:"4px 8px",borderRadius:4,background:"rgba(0,0,0,0.75)",color:"#fff",fontSize:11,whiteSpace:"nowrap",pointerEvents:"none",lineHeight:1.4},children:t})]})}const Et=u.forwardRef(function({position:t="topright",layout:n="vertical",corners:r,defaultCorners:o,imageSource:l,opacity:s=.7,accept:a="image/*",enableCrop:c=!0,enableInitialCoords:d=!0,className:h,style:f,onCornersChange:p,onCalibrate:g,onExport:y,onImageLoad:C,onPreprocess:b,onClear:x},k){const{scene:L,mapsService:z,positionClassName:E,getMapContainer:T}=ke(t),M=Me(),H=u.useRef(null),N=lr({scene:L,mapsService:z,corners:r,defaultCorners:o,imageSource:l,opacity:s,onCornersChange:p,onImageLoad:C}),{state:V,screenPositions:F,setImage:A,setPhase:I,setOpacity:m,startDrag:w,clear:P,getCorners:$,setCorners:j,exportImage:O}=N;u.useImperativeHandle(k,()=>({getCorners:$,setCorners:j,setImage:A,exportImage:O,clear:se}));const K=u.useCallback(async oe=>{var ye;const ue=(ye=oe.target.files)==null?void 0:ye[0];if(ue)if(oe.target.value="",c||d)try{const pe=await P1(ue);Y({url:pe.url,dimensions:{width:pe.width,height:pe.height},revokeUrl:pe.revokeUrl??null})}catch(pe){console.error("Failed to load image for crop:",pe)}else A(ue)},[c,d,A]),[ee,Y]=u.useState(null),X=u.useCallback(async(oe,ue)=>{var ye;if(ee){try{if(oe.x!==0||oe.y!==0||oe.width!==ee.dimensions.width||oe.height!==ee.dimensions.height){const ve=await Qn(ee.url,oe);(ye=ee.revokeUrl)==null||ye.call(ee),A(ve.url,ue),_.current=ve.revokeUrl,b==null||b({croppedDimensions:{width:ve.width,height:ve.height},initialCorners:ue}),C==null||C({width:ve.width,height:ve.height})}else A(ee.url,ue),b==null||b({croppedDimensions:ee.dimensions,initialCorners:ue}),C==null||C(ee.dimensions)}catch(pe){console.error("Crop/setImage failed:",pe)}Y(null)}},[ee,A,b,C]),te=u.useCallback(()=>{var oe;ee&&((oe=ee.revokeUrl)==null||oe.call(ee),Y(null))},[ee]),_=u.useRef(null),U=u.useCallback(()=>{const oe=$();oe&&(I("confirmed"),g==null||g({corners:oe,extent:tr(oe)}))},[$,I,g]),[ce,ie]=u.useState(!1),[Q,le]=u.useState({outputWidth:0,outputHeight:0,cols:1,rows:1}),[Z,v]=u.useState(null),[D,S]=u.useState(!1),R=u.useCallback(()=>{const oe=V.imageDimensions;le({outputWidth:(oe==null?void 0:oe.width)||1024,outputHeight:(oe==null?void 0:oe.height)||1024,cols:1,rows:1}),v(null),ie(!0)},[V.imageDimensions]),B=u.useCallback(async()=>{S(!0);try{const oe=await O(Q);v(oe)}catch(oe){console.error("Export failed:",oe)}S(!1)},[O,Q]),G=u.useCallback(async()=>{if(!Z)return;const oe=new dr;for(const be of Z.tiles)await oe.addBlob(`tile_${be.row}_${be.col}.png`,be.blob);const ue=Z.tiles.map(be=>({file:`tile_${be.row}_${be.col}.png`,row:be.row,col:be.col,width:be.width,height:be.height,extent:be.extent,corners:be.corners})),ye=JSON.stringify({extent:Z.extent,outputWidth:Z.outputWidth,outputHeight:Z.outputHeight,tiles:ue},null,2);oe.addFile("tiles.json",ye);const pe=oe.generate(),ve=URL.createObjectURL(pe),Ee=document.createElement("a");Ee.href=ve,Ee.download="calibrated-tiles.zip",Ee.click(),URL.revokeObjectURL(ve),y==null||y(Z)},[Z,y]),ne=u.useCallback(()=>{Z&&(URL.revokeObjectURL(Z.previewUrl),Z.tiles.forEach(oe=>URL.revokeObjectURL(oe.previewUrl))),v(null),ie(!1)},[Z]),se=u.useCallback(()=>{var oe;P(),(oe=_.current)==null||oe.call(_),_.current=null,x==null||x()},[P,x]),J=u.useCallback(()=>{I("calibrating")},[I]),re=u.useCallback(oe=>{m(Number(oe.target.value))},[m]),q=u.useCallback(()=>{if(!z||V.phase==="idle")return;const oe=z.getBounds();if(!oe)return;const[[ue,ye],[pe,ve]]=oe,Ee=(pe-ue)*.1,be=(ve-ye)*.1,n5=[[ue+Ee,ve-be],[pe-Ee,ve-be],[pe-Ee,ye+be],[ue+Ee,ye+be]];j(n5)},[z,V.phase,j]),[ae,he]=u.useState(!1),de=T(),Ce=V.phase!=="idle"&&F&&de?Ie.createPortal(i.jsx("div",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:100},children:i.jsx(cr,{screenPositions:F,draggingCorner:V.draggingCorner,phase:V.phase,onStartDrag:w})}),de):null,xe=n==="horizontal",Ze=i.jsxs("div",{className:`l7-control l7-control--glass l7-control-image-calibration ${xe?"l7-control-image-calibration--horizontal":""} ${h??""}`,style:{position:"relative",...f},children:[i.jsx(Be,{icon:"upload",tip:V.phase==="idle"?"上传图片":"更换图片",onClick:()=>{var oe;return(oe=H.current)==null?void 0:oe.click()}}),i.jsx(Be,{icon:"fit_screen",tip:"放置到当前位置",onClick:q,disabled:V.phase==="idle"}),i.jsx(Be,{icon:V.phase==="confirmed"?"edit":"check_circle",tip:V.phase==="confirmed"?"重新校准":"确认校准",onClick:V.phase==="confirmed"?J:U,disabled:V.phase==="idle"}),i.jsx(Be,{icon:"opacity",tip:"透明度",onClick:()=>he(!ae),disabled:V.phase==="idle"}),i.jsx(Be,{icon:"download",tip:"导出",onClick:R,disabled:V.phase==="idle"}),i.jsx(Be,{icon:"delete",tip:"清除",onClick:se,disabled:V.phase==="idle"}),ae&&V.phase!=="idle"&&i.jsxs("div",{className:"l7-control--glass",style:{position:"absolute",left:xe?0:"100%",top:xe?"100%":0,marginLeft:xe?0:6,marginTop:xe?6:0,padding:"8px 10px",borderRadius:6,display:"flex",alignItems:"center",gap:6,fontSize:11,whiteSpace:"nowrap",minWidth:140},children:[i.jsx("input",{type:"range",min:"0",max:"1",step:"0.05",value:V.opacity,onChange:re,style:{flex:1,height:4}}),i.jsxs("span",{style:{minWidth:28,textAlign:"right"},children:[Math.round(V.opacity*100),"%"]})]}),i.jsx("input",{ref:H,type:"file",accept:a,onChange:K,style:{display:"none"}}),Ce,ee&&(c||d)&&Ie.createPortal(i.jsx(ur,{imageUrl:ee.url,imageDimensions:ee.dimensions,mapCenter:z?[z.getCenter().lng,z.getCenter().lat]:null,mapZoom:z?z.getZoom():null,showInitialCoords:d,onConfirm:X,onCancel:te}),document.body),ce&&Ie.createPortal(i.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.5)"},onClick:ne,children:i.jsxs("div",{style:{background:"#fff",borderRadius:8,padding:20,width:520,maxHeight:"85vh",overflow:"auto",boxShadow:"0 8px 32px rgba(0,0,0,0.25)"},onClick:oe=>oe.stopPropagation(),children:[i.jsx("div",{style:{fontSize:15,fontWeight:600,marginBottom:16},children:"导出配准图片"}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 16px",marginBottom:12,fontSize:12},children:[i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["宽度(px)",i.jsx("input",{type:"number",value:Q.outputWidth,min:64,max:8192,onChange:oe=>le(ue=>({...ue,outputWidth:+oe.target.value||1024})),style:{width:72,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]}),i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["高度(px)",i.jsx("input",{type:"number",value:Q.outputHeight,min:64,max:8192,onChange:oe=>le(ue=>({...ue,outputHeight:+oe.target.value||1024})),style:{width:72,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]}),i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["切片列数",i.jsx("input",{type:"number",value:Q.cols,min:1,max:20,onChange:oe=>le(ue=>({...ue,cols:Math.max(1,+oe.target.value||1)})),style:{width:48,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]}),i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["切片行数",i.jsx("input",{type:"number",value:Q.rows,min:1,max:20,onChange:oe=>le(ue=>({...ue,rows:Math.max(1,+oe.target.value||1)})),style:{width:48,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]})]}),i.jsx("button",{onClick:B,disabled:D,style:{padding:"6px 16px",fontSize:12,border:"none",borderRadius:4,background:"#2563eb",color:"#fff",cursor:"pointer",marginBottom:12},children:D?"生成中...":"生成预览"}),Z&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{style:{position:"relative",marginBottom:12,border:"1px solid #e5e7eb",borderRadius:4,overflow:"hidden"},children:[i.jsx("img",{src:Z.previewUrl,style:{width:"100%",display:"block"}}),(Q.cols>1||Q.rows>1)&&i.jsxs("svg",{style:{position:"absolute",inset:0,width:"100%",height:"100%",pointerEvents:"none"},children:[Array.from({length:Q.cols-1},(oe,ue)=>i.jsx("line",{x1:`${(ue+1)/Q.cols*100}%`,y1:"0",x2:`${(ue+1)/Q.cols*100}%`,y2:"100%",stroke:"#f59e0b",strokeWidth:"1",strokeDasharray:"4 2"},`c${ue}`)),Array.from({length:Q.rows-1},(oe,ue)=>i.jsx("line",{x1:"0",y1:`${(ue+1)/Q.rows*100}%`,x2:"100%",y2:`${(ue+1)/Q.rows*100}%`,stroke:"#f59e0b",strokeWidth:"1",strokeDasharray:"4 2"},`r${ue}`))]})]}),i.jsxs("div",{style:{fontSize:11,color:"#666",fontFamily:"monospace",marginBottom:12,maxHeight:160,overflow:"auto"},children:[i.jsxs("div",{style:{marginBottom:4,fontWeight:600,color:"#333"},children:["总计 ",Z.tiles.length," 个切片 | ",Z.outputWidth,"×",Z.outputHeight,"px"]}),i.jsxs("div",{style:{marginBottom:4},children:["Extent: [",Z.extent.map(oe=>oe.toFixed(5)).join(", "),"]"]}),Z.tiles.map(oe=>i.jsxs("div",{style:{padding:"2px 0",borderBottom:"1px solid #f3f4f6"},children:["tile_",oe.row,"_",oe.col,".png (",oe.width,"×",oe.height,") — [",oe.extent.map(ue=>ue.toFixed(5)).join(", "),"]"]},`${oe.row}_${oe.col}`))]}),i.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[i.jsx("button",{onClick:ne,style:{padding:"6px 16px",fontSize:12,border:"1px solid #d1d5db",borderRadius:4,background:"#fff",cursor:"pointer"},children:"取消"}),i.jsxs("button",{onClick:G,style:{padding:"6px 16px",fontSize:12,border:"none",borderRadius:4,background:"#2563eb",color:"#fff",cursor:"pointer"},children:["打包下载 ZIP(",Z.tiles.length," 张 + 坐标JSON)"]})]})]}),!Z&&i.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:i.jsx("button",{onClick:ne,style:{padding:"6px 16px",fontSize:12,border:"1px solid #d1d5db",borderRadius:4,background:"#fff",cursor:"pointer"},children:"取消"})})]})}),document.body)]});return!L||!z?null:M?Ze:i.jsx("div",{className:`l7-control-anchor ${E}`,children:Ze})});we.mark(Et);function O1({controls:e,layers:t,onLayerToggle:n,containerRef:r}){const o=me();return i.jsx(gt,{children:e.map((l,s)=>i.jsx(pr,{control:l,layers:t,onLayerToggle:n,scene:o,containerRef:r},`${l.type}-${s}`))})}function pr({control:e,layers:t,onLayerToggle:n,scene:r,containerRef:o}){var s,a,c,d,h,f,p,g,y;const l=e.position??void 0;switch(e.type){case"zoom":return i.jsx(yt,{position:l??"bottomright"});case"scale":return i.jsx(Ct,{position:l??"bottomleft",maxWidth:(s=e.options)==null?void 0:s.maxWidth,metric:((a=e.options)==null?void 0:a.unit)!=="imperial",imperial:((c=e.options)==null?void 0:c.unit)==="imperial"});case"fullscreen":return i.jsx(vt,{position:l??"topright",container:o==null?void 0:o.current});case"geoLocate":return i.jsx(bt,{position:l??"topright"});case"mapTheme":return i.jsx(Mt,{position:l??"topright"});case"mouseLocation":return i.jsx(kt,{position:l??"bottomleft",precision:(d=e.options)==null?void 0:d.precision});case"exportImage":return i.jsx(St,{position:l??"topright",format:(h=e.options)==null?void 0:h.format});case"layerSwitch":return i.jsx(zt,{position:l??"topright",layers:t.map((C,b)=>({id:C.id??`layer-${b}`,name:C.name,visible:C.visible})),onToggle:n??(()=>{})});case"draw":return i.jsx(Vt,{position:l??"topright",modes:(f=e.options)==null?void 0:f.modes,showDelete:(p=e.options)==null?void 0:p.showDelete});case"imageCalibration":return i.jsx(Et,{position:l??"topright",opacity:(g=e.options)==null?void 0:g.opacity,imageSource:(y=e.options)==null?void 0:y.imageSource});default:return null}}const Te={aerialway:"M13,5H8V2.6c0.1854-0.1047,0.3325-0.2659,0.42-0.46L13.5,1.5C13.7761,1.5,14,1.2761,14,1s-0.2239-0.5-0.5-0.5L8.28,1.15 C8.0954,0.9037,7.8077,0.7562,7.5,0.75C7.0963,0.752,6.7334,0.9966,6.58,1.37L1.5,2C1.2239,2,1,2.2239,1,2.5S1.2239,3,1.5,3 l5.22-0.65C6.7967,2.4503,6.8917,2.5351,7,2.6V5H2C1.4477,5,1,5.4477,1,6v7c0,0.5523,0.4477,1,1,1h11c0.5523,0,1-0.4477,1-1V6 C14,5.4477,13.5523,5,13,5z M7,11H3V7h4V11z M12,11H8V7h4V11z",airfield:"M6.8182,0.6818H4.7727 C4.0909,0.6818,4.0909,0,4.7727,0h5.4545c0.6818,0,0.6818,0.6818,0,0.6818H8.1818c0,0,0.8182,0.5909,0.8182,1.9545V4h6v2L9,8l-0.5,5 l2.5,1.3182V15H4v-0.6818L6.5,13L6,8L0,6V4h6V2.6364C6,1.2727,6.8182,0.6818,6.8182,0.6818z",airport:"M15,6.8182L15,8.5l-6.5-1 l-0.3182,4.7727L11,14v1l-3.5-0.6818L4,15v-1l2.8182-1.7273L6.5,7.5L0,8.5V6.8182L6.5,4.5v-3c0,0,0-1.5,1-1.5s1,1.5,1,1.5v2.8182 L15,6.8182z","alcohol-shop":"M14,4h-4v3.44l0,0c0,0,0,0,0,0.06c0.003,0.9096,0.6193,1.7026,1.5,1.93V13H11c-0.2761,0-0.5,0.2239-0.5,0.5 S10.7239,14,11,14h2c0.2761,0,0.5-0.2239,0.5-0.5S13.2761,13,13,13h-0.5V9.43c0.8807-0.2274,1.497-1.0204,1.5-1.93c0,0,0,0,0-0.06 l0,0V4z M13,7.5c0,0.5523-0.4477,1-1,1s-1-0.4477-1-1V5h2V7.5z M5.5,2.5V2C5.7761,2,6,1.7761,6,1.5S5.7761,1,5.5,1V0.5 C5.5,0.2239,5.2761,0,5,0H4C3.7239,0,3.5,0.2239,3.5,0.5V1C3.2239,1,3,1.2239,3,1.5S3.2239,2,3.5,2v0.5C3.5,3.93,1,5.57,1,7v6 c0,0.5523,0.4477,1,1,1h5c0.5318-0.0465,0.9535-0.4682,1-1V7C8,5.65,5.5,3.85,5.5,2.5z M4.5,12C3.1193,12,2,10.8807,2,9.5 S3.1193,7,4.5,7S7,8.1193,7,9.5S5.8807,12,4.5,12z","american-football":"M7.53,3C3.09,3,1,7.5,1,7.5S3.09,12,7.53,12S14,7.5,14,7.5S12,3,7.53,3z M11,7v1.5C11,8.7761,10.7761,9,10.5,9 S10,8.7761,10,8.5V8H8v0.5C8,8.7761,7.7761,9,7.5,9S7,8.7761,7,8.5V8H5v0.5C5,8.7761,4.7761,9,4.5,9S4,8.7761,4,8.5v-2 C4,6.2239,4.2239,6,4.5,6S5,6.2239,5,6.5V7h2V6.5C7,6.2239,7.2239,6,7.5,6S8,6.2239,8,6.5V7h2V6.5C10,6.2239,10.2239,6,10.5,6 S11,6.2239,11,6.5V7z","amusement-park":"M13.5 7C13.5 9.02798 12.4939 10.821 10.9535 11.907L12 13.9999H3L4.04645 11.907C2.50613 10.821 1.5 9.02798 1.5 7C1.5 3.68629 4.18629 1 7.5 1C10.8137 1 13.5 3.68629 13.5 7ZM12.2984 7.125H8.99487C8.96844 7.4453 8.84138 7.73706 8.64538 7.96861L10.9814 10.3046C11.7719 9.47202 12.2669 8.35614 12.2984 7.125ZM10.8046 10.4814L8.46861 8.14538C8.33136 8.26156 8.17296 8.35351 8 8.41465V11.7743C9.08206 11.6623 10.0574 11.1908 10.8046 10.4814ZM6.00513 7.125H2.7016C2.73307 8.35614 3.2281 9.47202 4.01864 10.3046L6.35462 7.96861C6.15862 7.73706 6.03156 7.4453 6.00513 7.125ZM4.19542 10.4814C4.94259 11.1908 5.91794 11.6623 7 11.7743V8.41465C6.82704 8.35351 6.66864 8.26156 6.53139 8.14538L4.19542 10.4814ZM12.2984 6.875C12.2669 5.64386 11.7719 4.52798 10.9814 3.69542L8.64538 6.03139C8.84138 6.26294 8.96844 6.5547 8.99487 6.875H12.2984ZM10.8046 3.51864C9.97202 2.7281 8.85614 2.23307 7.625 2.2016V5.50513C7.9453 5.53156 8.23706 5.65862 8.46861 5.85462L10.8046 3.51864ZM7.375 5.50513V2.2016C6.14386 2.23307 5.02798 2.7281 4.19542 3.51864L6.53139 5.85462C6.76294 5.65862 7.0547 5.53156 7.375 5.50513ZM6.35462 6.03139L4.01864 3.69542C3.2281 4.52798 2.73307 5.64386 2.7016 6.875H6.00513C6.03156 6.5547 6.15862 6.26294 6.35462 6.03139Z","animal-shelter":"M 7.528,0.895 9,2 h 1 L 11.473,0.896 C 11.689502,0.73373378 12,0.8884387 12,1.159 V 4.5 c 0,0.722 -0.522,1.184 -1,1.573 V 10 l 0.8,2.4 0.706,0.353 c 0.302922,0.151551 0.494181,0.461283 0.494,0.8 C 13,13.8 12.8,14 12.553,14 H 4.25 C 3.017,14 2,13 2,11.713 2,9.5424588 2.4530836,7.9300225 2.745,6.845 2.8910836,6.3020225 3.0352907,5.8946079 3.138,5.614 3.1956028,5.4566256 3.253276,5.3110749 3.33,5.165 3.7788405,4.3104525 5.0743666,4.9556117 4.672,5.833 4.6232251,5.9393571 4.5778358,6.0512046 4.539,6.15 4.4477518,6.3821288 4.325004,6.7430011 4.193,7.234 3.947004,8.1490011 3.674,9.521 3.558,11.367 3.926,9.307 5.98,7.239 7.635,5.758 7.29,5.432 7.001,5.038 7.001,4.5 l 0,-3.342 c 0,-0.2705613 0.3106215,-0.42543084 0.527,-0.263 z",aquarium:"M1.13505 8.57743C1.98919 6.14741 4.72075 2 10 2C12.6518 2 14 3 14 3C14 3 11.6865 3 10.6203 3.44512C10.54 3.47864 10.4747 3.53744 10.4329 3.61375C10.2432 3.95995 9.75252 5.04744 10.3231 6.19506C10.4172 6.38427 10.6364 6.46548 10.8383 6.40312C11.3474 6.24589 12.3301 5.89727 13.0761 5.35729C13.2973 5.1972 13.615 5.25773 13.6797 5.52298C13.9401 6.59045 13.9401 8.40955 13.6797 9.47702C13.615 9.74227 13.2973 9.8028 13.0761 9.64271C12.3301 9.10273 11.3474 8.75411 10.8383 8.59688C10.6364 8.53452 10.4172 8.61573 10.3231 8.80494C9.75252 9.95256 10.2432 11.04 10.4329 11.3863C10.4747 11.4626 10.54 11.5214 10.6203 11.5549C11.6865 12 14 12 14 12C13.5 12.3333 11.8 13 9.00001 13C4.51722 13 2.02736 10.3427 1.25972 9.35985C1.08546 9.13673 1.04117 8.84452 1.13505 8.57743ZM5.00001 9C5.69037 9 6.25001 8.44036 6.25001 7.75C6.25001 7.05964 5.69037 6.5 5.00001 6.5C4.30966 6.5 3.75001 7.05964 3.75001 7.75C3.75001 8.44036 4.30966 9 5.00001 9Z",arrow:"M8.29289 2.29289C8.68342 1.90237 9.31658 1.90237 9.70711 2.29289L14.2071 6.79289C14.5976 7.18342 14.5976 7.81658 14.2071 8.20711L9.70711 12.7071C9.31658 13.0976 8.68342 13.0976 8.29289 12.7071C7.90237 12.3166 7.90237 11.6834 8.29289 11.2929L11 8.5H1.5C0.947715 8.5 0.5 8.05228 0.5 7.5C0.5 6.94772 0.947715 6.5 1.5 6.5H11L8.29289 3.70711C7.90237 3.31658 7.90237 2.68342 8.29289 2.29289Z","art-gallery":"m10.71 3-2.86-2.849996c-.1945-.1960996-.511-.1973996-.7071-.0029-.001.001-.0019.0019-.0029.0029l-2.85 2.849996h-2.79c-.2761 0-.5.2239-.5.5v9c0 .2761.2239.5.5.5h12c.2761 0 .5-.2239.5-.5v-9c0-.2761-.2239-.5-.5-.5zm-3.21-1.79 1.79 1.79h-3.58zm5.5 10.79h-11v-8h11zm-8-5c-.5523 0-1-.4477-1-1s.4477-1 1-1 1 .4477 1 1-.4477 1-1 1zm7 4h-7.5l1.5-3 1.25 2.5 2.25-4.5z",attraction:"M6,2C5.446,2,5.2478,2.5045,5,3L4.5,4h-2C1.669,4,1,4.669,1,5.5v5C1,11.331,1.669,12,2.5,12h10 c0.831,0,1.5-0.669,1.5-1.5v-5C14,4.669,13.331,4,12.5,4h-2L10,3C9.75,2.5,9.554,2,9,2H6z M2.5,5C2.7761,5,3,5.2239,3,5.5 S2.7761,6,2.5,6S2,5.7761,2,5.5S2.2239,5,2.5,5z M7.5,5c1.6569,0,3,1.3431,3,3s-1.3431,3-3,3s-3-1.3431-3-3S5.8431,5,7.5,5z M7.5,6.5C6.6716,6.5,6,7.1716,6,8l0,0c0,0.8284,0.6716,1.5,1.5,1.5l0,0C8.3284,9.5,9,8.8284,9,8l0,0C9,7.1716,8.3284,6.5,7.5,6.5 L7.5,6.5z",bakery:"M5.294,4.382,6,9.5a.979.979,0,0,0,1,1H8a.979.979,0,0,0,1-1l.706-5.118C9.706,3,7.5,3,7.5,3S5.291,3,5.294,4.382ZM3.5,5C2,5,2,6,2,6l1,4H4.5a.793.793,0,0,0,.794-.765L4.5,5Zm-2,2.5a1.533,1.533,0,0,0-1.059.412A1.366,1.366,0,0,0,0,8.794V11H.882A1.02,1.02,0,0,0,2,10ZM11.5,5C13,5,13,6,13,6l-1,4H10.5a.793.793,0,0,1-.794-.765L10.5,5Zm2,2.5a1.533,1.533,0,0,1,1.059.412A1.366,1.366,0,0,1,15,8.794V11h-.882A1.02,1.02,0,0,1,13,10Z",bank:"M1,3C0.446,3,0,3.446,0,4v7c0,0.554,0.446,1,1,1h13c0.554,0,1-0.446,1-1V4c0-0.554-0.446-1-1-1H1z M1,4h1.5 C2.7761,4,3,4.2239,3,4.5S2.7761,5,2.5,5S2,4.7761,2,4.5L1.5,5C1.7761,5,2,5.2239,2,5.5S1.7761,6,1.5,6S1,5.7761,1,5.5V4z M7.5,4 C8.8807,4,10,5.567,10,7.5l0,0C10,9.433,8.8807,11,7.5,11S5,9.433,5,7.5S6.1193,4,7.5,4z M12.5,4H14v1.5C14,5.7761,13.7761,6,13.5,6 S13,5.7761,13,5.5S13.2239,5,13.5,5L13,4.5C13,4.7761,12.7761,5,12.5,5S12,4.7761,12,4.5S12.2239,4,12.5,4z M7.5,5.5 c-0.323,0-0.5336,0.1088-0.6816,0.25h1.3633C8.0336,5.6088,7.823,5.5,7.5,5.5z M6.625,6C6.5795,6.091,6.5633,6.1711,6.5449,6.25 h1.9102C8.4367,6.1711,8.4205,6.091,8.375,6H6.625z M6.5,6.5v0.25h2V6.5H6.5z M6.5,7v0.25h2V7H6.5z M6.5,7.5v0.25h2V7.5H6.5z M6.5,8 L6.25,8.25h2L8.5,8H6.5z M6,8.5c0,0,0.0353,0.1024,0.1016,0.25H8.375L8,8.5H6z M1.5,9C1.7761,9,2,9.2239,2,9.5S1.7761,10,1.5,10 L2,10.5C2,10.2239,2.2239,10,2.5,10S3,10.2239,3,10.5S2.7761,11,2.5,11H1V9.5C1,9.2239,1.2239,9,1.5,9z M6.2383,9 C6.2842,9.0856,6.3144,9.159,6.375,9.25h2.2676C8.7092,9.1121,8.75,9,8.75,9H6.2383z M13.5,9C13.7761,9,14,9.2239,14,9.5V11h-1.5 c-0.2761,0-0.5-0.2239-0.5-0.5s0.2239-0.5,0.5-0.5s0.5,0.2239,0.5,0.5l0.5-0.5C13.2239,10,13,9.7761,13,9.5S13.2239,9,13.5,9z M6.5664,9.5c0.0786,0.0912,0.1647,0.1763,0.2598,0.25h1.4199C8.3462,9.6727,8.4338,9.5883,8.5,9.5H6.5664z","bank-JP":"M12.2808,3.3763l-2.9,3.625H11.25a.75.75,0,0,1,0,1.5H8.5v1h2.75a.75.75,0,0,1,0,1.5H8.5v1.25a1,1,0,0,1-2,0v-1.25H3.75a.75.75,0,1,1,0-1.5H6.5v-1H3.75a.75.75,0,0,1,0-1.5H5.6193l-2.9-3.625A1,1,0,0,1,4.2771,2.1216l.0037.0047L7.5,6.15l3.2192-4.024a1,1,0,0,1,1.5653,1.2453Z",bar:"M7.5,1c-2,0-7,0.25-6.5,0.75L7,8v4 c0,1-3,0.5-3,2h7c0-1.5-3-1-3-2V8l6-6.25C14.5,1.25,9.5,1,7.5,1z M7.5,2c2.5,0,4.75,0.25,4.75,0.25L11.5,3h-8L2.75,2.25 C2.75,2.25,5,2,7.5,2z",barrier:"m13 2h-11c-.26522 0-.51957.10536-.70711.29289-.18753.18754-.29289.44189-.29289.70711v6c0 .26522.10536.51957.29289.70711.18754.18753.44189.29289.70711.29289h1v2.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-.5h7v.5c0 .1326.0527.2598.1464.3536.0938.0937.221.1464.3536.1464s.2598-.0527.3536-.1464c.0937-.0938.1464-.221.1464-.3536v-2.5h1c.2652 0 .5196-.10536.7071-.29289.1875-.18754.2929-.44189.2929-.70711v-6c0-.26522-.1054-.51957-.2929-.70711-.1875-.18753-.4419-.29289-.7071-.29289zm0 1v2l-2-2zm-3.5 0 3.5 3.5v2.5l-6-6zm-4 6-3.5-3.5v-2.5l6 6zm-3.5 0v-2l2 2zm9 2h-7v-1h7zm-.207-2h-1.293l-6-6h2l6 6z",baseball:"m9.00003 3.5c0 .8284-.6716 1.5-1.5 1.5s-1.5-.6716-1.5-1.5.6716-1.5 1.5-1.5 1.5.6716 1.5 1.5zm-3-3.22c0-.1546-.1254-.28-.28-.28-.0979.0262-.1852.0821-.25.16l-2.47 4.43c-.0059.0431-.0059.0869 0 .13 0 .1546.1254.28.28.28.1015-.0243.1926-.0803.26-.16l2.46-4.43c.006-.0431.006-.0869 0-.13zm5.89997 13.92-2.89997-7.81c-.0474-.2273-.2478-.3901-.48-.39h-5c-.2761 0-.5.2239-.5.5s.2239.5.5.5h2.48l1.45 2.51-4.27 4.61c-.1141.0932-.1802.2327-.18.38 0 .2761.2239.5.5.5.1224-.0006.2401-.047.33-.13l4.45-4.15 2.75997 4c.0895.1592.2574.2584.44.26.2796.0002.5092-.2207.52-.5-.0042-.1013-.039-.199-.1-.28z",basketball:"M3.66001 7H2.03C2.11012 6.02077 2.45969 5.05281 3.04001 4.26C3.39039 5.12432 3.59972 6.0693 3.66001 7ZM4.73501 7H7V2C5.78985 2.1061 4.72468 2.61284 3.83501 3.44C4.36491 4.54578 4.67079 5.77549 4.73501 7ZM8 2V7H10.265C10.3292 5.77549 10.6351 4.54578 11.165 3.44C10.2753 2.61284 9.21014 2.1061 8 2ZM11.96 4.26C11.6096 5.12432 11.4003 6.0693 11.34 7H12.97C12.8899 6.02077 12.5403 5.05281 11.96 4.26ZM14 8.49919C14 8.77489 13.7765 8.99838 13.5008 8.99838H11.72L10.96 10.5184V12.8984C10.9578 12.9736 10.934 13.0466 10.8915 13.1087C10.8489 13.1707 10.7894 13.2192 10.72 13.2484C10.6743 13.2607 10.6273 13.2674 10.58 13.2684C10.5312 13.2706 10.4825 13.2619 10.4375 13.2428C10.3925 13.2238 10.3524 13.195 10.32 13.1584L9.3 12.1484L7.71 13.2084C7.64698 13.2476 7.57423 13.2684 7.5 13.2684C7.42577 13.2684 7.35303 13.2476 7.29 13.2084L5.7 12.1484L4.68 13.1584C4.62956 13.211 4.56471 13.2477 4.49357 13.2637C4.42243 13.2797 4.34814 13.2744 4.28 13.2484C4.21063 13.2192 4.1511 13.1707 4.10854 13.1087C4.06599 13.0466 4.04219 12.9736 4.04 12.8984V10.5184L3.28 8.99838H1.49919C1.2235 8.99838 1 8.77489 1 8.4992C0.999998 8.2235 1.22349 8 1.49919 8H13.5008C13.7765 8 14 8.2235 14 8.49919ZM6.86 8.99838H4.12L4.75 10.2684C4.7772 10.3173 4.791 10.3725 4.79 10.4284V11.9884L5.35 11.4384L6.86 8.99838ZM8.84 11.5484L7.5 9.38838L6.16 11.5484L7.5 12.4484L8.84 11.5484ZM10.89 8.99838H8.14L9.65 11.4384L10.21 11.9884V10.4284C10.209 10.3725 10.2228 10.3173 10.25 10.2684L10.89 8.99838Z",bbq:"M9.32,7.655C10.8782,7.108,11.9471,5.6506,12,4H3c0.053,1.6299,1.0978,3.0728,2.63,3.631L4.923,9.044 c-1.3571-0.2355-2.6482,0.6737-2.8837,2.0308s0.6737,2.6482,2.0308,2.8837C4.9927,14.1187,5.9273,13.7485,6.49,13h4.223l0.335,0.717 c0.0836,0.1735,0.2594,0.2836,0.452,0.283c0.0733,0.0003,0.1457-0.0158,0.212-0.047c0.2497-0.117,0.3575-0.4141,0.241-0.664 L9.32,7.655z M4.5,12.75c-0.6904,0-1.25-0.5596-1.25-1.25s0.5596-1.25,1.25-1.25s1.25,0.5596,1.25,1.25 C5.7484,12.1897,5.1897,12.7484,4.5,12.75z M6.95,12c0.2066-1.007-0.2268-2.0374-1.091-2.594L6.6,7.923 c0.577,0.1042,1.168,0.1042,1.745,0l1.9,4.07L6.95,12z M4.75,1C4.6119,1,4.5,1.1119,4.5,1.25c0,0.5-0.5,0.5-0.5,0.5c-1,0-1,1-1,1 C3,2.8881,3.1119,3,3.25,3S3.5,2.8881,3.5,2.75c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C5,1.1119,4.8881,1,4.75,1z M6.75,1 C6.6119,1,6.5,1.1119,6.5,1.25c0,0.5-0.5,0.5-0.5,0.5c-1,0-1,1-1,1C5,2.8881,5.1119,3,5.25,3S5.5,2.8881,5.5,2.75 c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C7,1.1119,6.8881,1,6.75,1z M8.75,1C8.6119,1,8.5,1.1119,8.5,1.25c0,0.5-0.5,0.5-0.5,0.5 c-1,0-1,1-1,1C7,2.8881,7.1119,3,7.25,3S7.5,2.8881,7.5,2.75c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C9,1.1119,8.8881,1,8.75,1z M10.75,1 c-0.1381,0-0.25,0.1119-0.25,0.25c0,0.5-0.5,0.5-0.5,0.5c-1,0-1,1-1,1C9,2.8881,9.1119,3,9.25,3S9.5,2.8881,9.5,2.75 c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C11,1.1119,10.8881,1,10.75,1z M12.75,1c-0.1381,0-0.25,0.1119-0.25,0.25c0,0.5-0.5,0.5-0.5,0.5 c-1,0-1,1-1,1C11,2.8881,11.1119,3,11.25,3s0.25-0.1119,0.25-0.25c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C13,1.1119,12.8881,1,12.75,1z",beach:"M5.3608,1.67l-.01,4.02a4.4523,4.4523,0,0,0-1.1-.11c-.37.1-.74.63-1.1.76A4.2019,4.2019,0,0,1,5.3608,1.67Zm2.41-.64,2.03,3.45a3.1832,3.1832,0,0,1,.84-.61c.36-.1.94.17,1.34.11A4.2018,4.2018,0,0,0,7.7708,1.03ZM1.0008,13h13c-.66-.66-2.64-1.11-4.34-1.33l-1.87-7c.52-.05,1.15.03,1.53,0l-2.11-3.6h-.01a6.1743,6.1743,0,0,0-.7.14,4.3792,4.3792,0,0,0-.64.22l-.01,4.15c.35-.17.84-.54,1.3-.74l1.8,6.74c-.58-.05-1.09-.08-1.45-.08C6.0308,11.5,2.0008,12,1.0008,13Z",beer:"M12,5V2c0,0-1-1-4.5-1S3,2,3,2v3c0.0288,1.3915,0.3706,2.7586,1,4c0.6255,1.4348,0.6255,3.0652,0,4.5c0,0,0,1,3.5,1 s3.5-1,3.5-1c-0.6255-1.4348-0.6255-3.0652,0-4.5C11.6294,7.7586,11.9712,6.3915,12,5z M7.5,13.5 c-0.7966,0.035-1.5937-0.0596-2.36-0.28c0.203-0.7224,0.304-1.4696,0.3-2.22h4.12c-0.004,0.7504,0.097,1.4976,0.3,2.22 C9.0937,13.4404,8.2966,13.535,7.5,13.5z M7.5,5C6.3136,5.0299,5.1306,4.8609,4,4.5v-2C5.131,2.1411,6.3137,1.9722,7.5,2 C8.6863,1.9722,9.869,2.1411,11,2.5v2C9.8694,4.8609,8.6864,5.0299,7.5,5z",bicycle:"M7.5,2c-0.6761-0.01-0.6761,1.0096,0,1H9v1.2656l-2.8027,2.334L5.2226,4H5.5c0.6761,0.01,0.6761-1.0096,0-1h-2 c-0.6761-0.01-0.6761,1.0096,0,1h0.6523L5.043,6.375C4.5752,6.1424,4.0559,6,3.5,6C1.5729,6,0,7.5729,0,9.5S1.5729,13,3.5,13 S7,11.4271,7,9.5c0-0.6699-0.2003-1.2911-0.5293-1.8242L9.291,5.3262l0.4629,1.1602C8.7114,7.0937,8,8.2112,8,9.5 c0,1.9271,1.5729,3.5,3.5,3.5S15,11.4271,15,9.5S13.4271,6,11.5,6c-0.2831,0-0.5544,0.0434-0.8184,0.1074L10,4.4023V2.5 c0-0.2761-0.2239-0.5-0.5-0.5H7.5z M3.5,7c0.5923,0,1.1276,0.2119,1.5547,0.5527l-1.875,1.5625 c-0.5109,0.4273,0.1278,1.1945,0.6406,0.7695l1.875-1.5625C5.8835,8.674,6,9.0711,6,9.5C6,10.8866,4.8866,12,3.5,12S1,10.8866,1,9.5 S2.1133,7,3.5,7L3.5,7z M11.5,7C12.8866,7,14,8.1134,14,9.5S12.8866,12,11.5,12S9,10.8866,9,9.5c0-0.877,0.4468-1.6421,1.125-2.0879 l0.9102,2.2734c0.246,0.6231,1.1804,0.2501,0.9297-0.3711l-0.9082-2.2695C11.2009,7.0193,11.3481,7,11.5,7L11.5,7z","bicycle-share":"M10,1C9.4477,1,9,1.4477,9,2c0,0.5523,0.4477,1,1,1s1-0.4477,1-1C11,1.4477,10.5523,1,10,1z M8.1445,2.9941 c-0.13,0.0005-0.2547,0.0517-0.3477,0.1426l-2.6406,2.5c-0.2256,0.2128-0.2051,0.5775,0.043,0.7637L7,7.75v2.75 c-0.01,0.6762,1.0096,0.6762,1,0v-3c0.0003-0.1574-0.0735-0.3057-0.1992-0.4004L7.0332,6.5234l1.818-1.7212l0.7484,0.9985 C9.6943,5.9265,9.8426,6.0003,10,6h1.5c0.6761,0.01,0.6761-1.0096,0-1h-1.25L9.5,4L8.9004,3.1992 C8.8103,3.0756,8.6685,3,8.5156,2.9941H8.1445z M3,7c-1.6569,0-3,1.3432-3,3s1.3431,3,3,3s3-1.3432,3-3S4.6569,7,3,7z M12,7 c-1.6569,0-3,1.3432-3,3s1.3431,3,3,3s3-1.3432,3-3S13.6569,7,12,7z M3,8c1.1046,0,2,0.8954,2,2s-0.8954,2-2,2s-2-0.8954-2-2 S1.8954,8,3,8z M12,8c1.1046,0,2,0.8954,2,2s-0.8954,2-2,2s-2-0.8954-2-2S10.8954,8,12,8z","blood-bank":"m11.2 6.1-3.7-5.1-3.7 5.1c-.5.7-.8 1.6-.8 2.5 0 2.4 2 4.4 4.5 4.4s4.5-2 4.5-4.4c0-.9-.3-1.8-.8-2.5zm-1.2 2.9h-2v2h-1v-2h-2v-1h2v-2h1v2h2z","bowling-alley":"M10.922 3.166c0 1.006-.335 1.857-.693 2.77-.414 1.052-.86 2.185-.86 3.73 0 2.166.687 4.333 1.409 4.333h1.444c.723 0 1.409-2.166 1.409-4.333 0-1.545-.446-2.678-.86-3.73-.358-.912-.693-1.764-.693-2.77 0-.722.144-.723.144-1.445A.743.743 0 0 0 11.5.999a.743.743 0 0 0-.722.722c0 .723.144.723.144 1.445Zm-2.552 6.5c0-1.234.254-2.236.55-3.091a4.5 4.5 0 1 0-.17 6.038c-.237-.865-.38-1.91-.38-2.947ZM5.24 7.12a.62.62 0 1 1-1.24 0 .62.62 0 0 1 1.24 0Zm-1 2a.62.62 0 1 1-1.24 0 .62.62 0 0 1 1.24 0Zm2 0a.62.62 0 1 1-1.24 0 .62.62 0 0 1 1.24 0Z",bridge:"m0 6.84201v4.15799h2v-1c.036-1.08899.911-1.96399 2-1.99999 1.089.036 1.964.911 2 1.99999v1h3v-1c.036-1.08899.911-1.96399 2-1.99999 1.089.036 1.964.911 2 1.99999v1h2v-4.15799c-4.4-5.76-11.929-4.442-15 0zm9.5-3.108c.514.121 1.016.289 1.5.5v2.766h-1.5zm-.5-.1v3.366h-1.5v-3.494c.503 0 1.005.043 1.5.128zm-5.5.843c.48-.248.982-.451 1.5-.606v3.129h-1.5zm2 2.523v-3.27c.493-.115.995-.187 1.5-.215v3.485zm-2.5-2.256v2.256h-2.5c.676-.906 1.532-1.672 2.5-2.256zm8.5 2.256v-2.5l-.053-.053c1.202.603 2.247 1.477 3.053 2.553z",building:"M3,2v11h5v-3h3v3h1V2H3z M7,12H4v-2h3V12z M7,9H4V7h3V9z M7,6H4V4h3V6z M11,9H8V7h3V9z M11,6H8V4h3V6z","building-alt1":"M11,13.5v-9C11,4.2,10.8,4,10.5,4H9V1L5,2.1v11.4H2V14h11v-0.5H11z M7,13.5V3h1v10.5H7z",bus:"M2 3C2 1.9 2.9 1 4 1H11C12.1 1 13 1.9 13 3V11C13 12 12 12 12 12V13C12 13.55 11.55 14 11 14C10.45 14 10 13.55 10 13V12H5V13C5 13.55 4.55 14 4 14C3.45 14 3 13.55 3 13V12C2 12 2 11 2 11V3ZM3.5 4C3.22 4 3 4.22 3 4.5V7.5C3 7.78 3.22 8 3.5 8H11.5C11.78 8 12 7.78 12 7.5V4.5C12 4.22 11.78 4 11.5 4H3.5ZM4 9C3.45 9 3 9.45 3 10C3 10.55 3.45 11 4 11C4.55 11 5 10.55 5 10C5 9.45 4.55 9 4 9ZM11 9C10.45 9 10 9.45 10 10C10 10.55 10.45 11 11 11C11.55 11 12 10.55 12 10C12 9.45 11.55 9 11 9ZM4 2.5C4 2.78 4.22 3 4.5 3H10.5C10.78 3 11 2.78 11 2.5C11 2.22 10.78 2 10.5 2H4.5C4.22 2 4 2.22 4 2.5Z",cafe:"M12,5h-2V3H2v4c0.0133,2.2091,1.8149,3.9891,4.024,3.9758C7.4345,10.9673,8.7362,10.2166,9.45,9H12c1.1046,0,2-0.8954,2-2 S13.1046,5,12,5z M12,8H9.86C9.9487,7.6739,9.9958,7.3379,10,7V6h2c0.5523,0,1,0.4477,1,1S12.5523,8,12,8z M10,12.5 c0,0.2761-0.2239,0.5-0.5,0.5h-7C2.2239,13,2,12.7761,2,12.5S2.2239,12,2.5,12h7C9.7761,12,10,12.2239,10,12.5z",campsite:"M14 10V11C14 11.5523 13.5523 12 13 12H2C1.44772 12 1 11.5523 1 11V10C1 9.44772 1.44772 9.00001 2 9.00001H2.25L7.03206 1.25762C7.24699 0.90965 7.75302 0.909651 7.96794 1.25762L12.75 9.00001H13C13.5523 9.00001 14 9.44772 14 10ZM10.5 9.00001L7.5 4.00001L4.5 9.00001H10.5Z",car:"M13.84,6.852,12.6,5.7,11.5,3.5a1.05,1.05,0,0,0-.9-.5H4.4a1.05,1.05,0,0,0-.9.5L2.4,5.7,1.16,6.852A.5.5,0,0,0,1,7.219V11.5a.5.5,0,0,0,.5.5h2c.2,0,.5-.2.5-.4V11h7v.5c0,.2.2.5.4.5h2.1a.5.5,0,0,0,.5-.5V7.219A.5.5,0,0,0,13.84,6.852ZM4.5,4h6l1,2h-8ZM5,8.6c0,.2-.3.4-.5.4H2.4C2.2,9,2,8.7,2,8.5V7.4c.1-.3.3-.5.6-.4l2,.4c.2,0,.4.3.4.5Zm8-.1c0,.2-.2.5-.4.5H10.5c-.2,0-.5-.2-.5-.4V7.9c0-.2.2-.5.4-.5l2-.4c.3-.1.5.1.6.4Z","car-rental":"M10.5 1C9.94772 1 9.5 1.44772 9.5 2H2V3L3 4 4 3 5 4 6 3 7 4H9.5C9.5 4.55228 9.94772 5 10.5 5H12.5C12.7761 5 13 4.77614 13 4.5V1.5C13 1.22386 12.7761 1 12.5 1H10.5ZM11 2.5C11 2.22386 11.2239 2 11.5 2 11.7761 2 12 2.22386 12 2.5V3.5C12 3.77614 11.7761 4 11.5 4 11.2239 4 11 3.77614 11 3.5V2.5ZM2.14645 9.35355C2.05268 9.44732 2 9.5745 2 9.70711V13.5C2 13.7761 2.22386 14 2.5 14H4C4.27614 14 4.5 13.7761 4.5 13.5V13H10.5V13.5C10.5 13.7761 10.7239 14 11 14H12.5C12.7761 14 13 13.7761 13 13.5V9.70711C13 9.5745 12.9473 9.44732 12.8536 9.35355L12 8.5 10.6457 6.24275C10.5553 6.09215 10.3925 6 10.2169 6H4.7831C4.60746 6 4.44471 6.09215 4.35435 6.24275L3 8.5 2.14645 9.35355ZM11.1338 9H3.86623L5.06619 7H9.93381L11.1338 9ZM5.5 10.8279V11.2C5.5 11.3657 5.36569 11.5 5.2 11.5H3.3C3.13431 11.5 3 11.3657 3 11.2V10.3659C3 10.1766 3.1732 10.0346 3.35884 10.0718L5.17845 10.4357C5.36542 10.4731 5.5 10.6372 5.5 10.8279ZM12 10.4879V11.2C12 11.3657 11.8657 11.5 11.7 11.5H9.8C9.63431 11.5 9.5 11.3657 9.5 11.2V10.7459C9.5 10.6029 9.60094 10.4798 9.74117 10.4518L11.5216 10.0957C11.7691 10.0462 12 10.2355 12 10.4879Z","car-repair":"M3 5C3.74028 5 4.38662 4.5978 4.73243 4H12C12.5523 4 13 3.55228 13 3 13 2.44772 12.5523 2 12 2H4.73243C4.38662 1.4022 3.74028 1 3 1 2.25972 1 1.61337 1.4022 1.26756 2H3V4H1.26756C1.61337 4.5978 2.25972 5 3 5ZM2.14645 9.35355C2.05268 9.44732 2 9.5745 2 9.70711V13.5C2 13.7761 2.22386 14 2.5 14H4C4.27614 14 4.5 13.7761 4.5 13.5V13H10.5V13.5C10.5 13.7761 10.7239 14 11 14H12.5C12.7761 14 13 13.7761 13 13.5V9.70711C13 9.5745 12.9473 9.44732 12.8536 9.35355L12 8.5 10.6456 6.24275C10.5553 6.09215 10.3925 6 10.2169 6H4.78309C4.60746 6 4.44471 6.09215 4.35435 6.24275L3 8.5 2.14645 9.35355ZM11.1338 9H3.86622L5.06619 7H9.93381L11.1338 9ZM5.5 10.8279V11.2C5.5 11.3657 5.36568 11.5 5.2 11.5H3.3C3.13431 11.5 3 11.3657 3 11.2V10.3659C3 10.1766 3.1732 10.0346 3.35883 10.0718L5.17844 10.4357C5.36541 10.4731 5.5 10.6372 5.5 10.8279ZM12 10.4879V11.2C12 11.3657 11.8657 11.5 11.7 11.5H9.8C9.63431 11.5 9.5 11.3657 9.5 11.2V10.7459C9.5 10.6029 9.60094 10.4798 9.74116 10.4518L11.5216 10.0957C11.7691 10.0462 12 10.2355 12 10.4879Z",casino:"M8.5,10c0.4561,0.6072,1.1821,1,2,1c1.3807,0,2.5-1.1193,2.5-2.5c0-0.5642-0.1938-1.0789-0.509-1.4973L12.5,7l-5-6l-5,6 l0.009,0.0027C2.1938,7.4211,2,7.9358,2,8.5C2,9.8807,3.1193,11,4.5,11c0.8179,0,1.5439-0.3928,2-1 C6.5997,9.8672,6.7902,9.6135,7,9.3337V11.5C7,13,4.5,13,4.5,13C4.2239,13,4,13.2238,4,13.5C4,13.7761,4.2239,14,4.5,14H7h1h2.5 c0.2761,0,0.5-0.2239,0.5-0.5c0-0.2762-0.2239-0.5-0.5-0.5c0,0-2.5,0-2.5-1.5V9.3337C8.2098,9.6135,8.4003,9.8672,8.5,10z",castle:"M11,4H4C3.4477,4,3,3.5523,3,3V0.5C3,0.2239,3.2239,0,3.5,0S4,0.2239,4,0.5V2h1V1c0-0.5523,0.4477-1,1-1s1,0.4477,1,1v1h1V1 c0-0.5523,0.4477-1,1-1s1,0.4477,1,1v1h1V0.5C11,0.2239,11.2239,0,11.5,0S12,0.2239,12,0.5V3C12,3.5523,11.5523,4,11,4z M14,14.5 c0,0.2761-0.2239,0.5-0.5,0.5h-12C1.2239,15,1,14.7761,1,14.5S1.2239,14,1.5,14H2c0.5523,0,1-0.4477,1-1c0,0,1-6,1-7 c0-0.5523,0.4477-1,1-1h5c0.5523,0,1,0.4477,1,1c0,1,1,7,1,7c0,0.5523,0.4477,1,1,1h0.5c0.2723-0.0001,0.4946,0.2178,0.5,0.49V14.5z M9,10.5C9,9.6716,8.3284,9,7.5,9S6,9.6716,6,10.5V14h3V10.5z","castle-JP":"M12.5,12.75a1,1,0,0,1-1-.9995V7.25H10a1,1,0,0,1-1-1v-2H6v2a1,1,0,0,1-1,1H3.5v4.5a1,1,0,0,1-2,0V6.25a1,1,0,0,1,1-1H4v-2a1,1,0,0,1,1-1h5a1,1,0,0,1,1,1v2h1.5a1,1,0,0,1,1,1v5.5a1,1,0,0,1-.9995,1Z",caution:"M1.09302 11.8924L6.84044 1.3905C7.12539 0.869834 7.87461 0.869834 8.15956 1.3905L13.907 11.8924C14.1805 12.3922 13.818 13.0019 13.2474 13.0019H1.75258C1.18195 13.0019 0.819505 12.3922 1.09302 11.8924ZM8.29999 8L8.70296 5.5822C8.75375 5.27743 8.51873 5 8.20976 5H6.79022C6.48125 5 6.24623 5.27743 6.29703 5.5822L6.69999 8H8.29999ZM8.59999 9.9C8.59999 9.29249 8.10751 8.8 7.49999 8.8C6.89248 8.8 6.39999 9.29249 6.39999 9.9C6.39999 10.5075 6.89248 11 7.49999 11C8.10751 11 8.59999 10.5075 8.59999 9.9Z",cemetery:"M11.46,12h-0.68L12,3.55c0.0175-0.2867-0.2008-0.5332-0.4874-0.5507C11.4884,2.9979,11.4641,2.9981,11.44,3h-1.18 c0-0.92-1.23-2-2.75-2S4.77,2.08,4.77,3H3.54C3.253,2.9885,3.0111,3.2117,2.9995,3.4987C2.9988,3.5158,2.999,3.5329,3,3.55L4.2,12 H3.55C3.2609,11.9886,3.0162,12.2112,3,12.5V14h9v-1.51C11.9839,12.2067,11.7435,11.9886,11.46,12z M4.5,5h6v1h-6V5z","cemetery-JP":"M11.5,11h-3V2.5a.9448.9448,0,0,0-1-1,.9448.9448,0,0,0-1,1V11h-3a1,1,0,0,0,0,2h8a.9448.9448,0,0,0,1-1A1.0022,1.0022,0,0,0,11.5,11Z","charging-station":"m14 4v-1.51c-.0054-.2722-.2277-.4901-.5-.49-.2816.0047-.5062.2367-.5015.5184.0002.0105.0007.0211.0015.0316v2.45c0 .5523.4477 1 1 1v5.5c0 .2761-.2239.5-.5.5s-.5-.2239-.5-.5v-2c0-.8284-.6716-1.5-1.5-1.5h-1.5v-6c0-.5523-.4477-1-1-1h-6c-.5523 0-1 .4477-1 1v11c0 .5523.4477 1 1 1h6c.5523 0 1-.4477 1-1v-4h1.5c.2761 0 .5.2239.5.5v2c0 .8284.6716 1.5 1.5 1.5s1.5-.6716 1.5-1.5v-6.5c0-.5523-.4477-1-1-1zm-5.7996 3.3995-2.6006 3.4674-.0164-.0072c-.0465.0787-.1167.1403-.2146.1403-.1476 0-.2672-.1196-.2672-.2672 0-.028.0217-.0463.0297-.0717l-.0177-.0078.7766-2.3245c.054-.1617-.0664-.3288-.2369-.3288h-1.6539c-.2058 0-.3232-.2349-.1998-.3995l2.6006-3.4674.0164.0072c.0465-.0787.1167-.1403.2146-.1403.1476 0 .2672.1196.2672.2672 0 .028-.0217.0463-.0297.0717l.0176.0078-.7764 2.3244c-.0541.1618.0663.3289.2368.3289h1.6539c.2058 0 .3232.2349.1998.3995z",cinema:"M14,7.5v2c0,0.2761-0.2239,0.5-0.5,0.5S13,9.7761,13,9.5c0,0,0.06-0.5-1-0.5h-1v2.5c0,0.2761-0.2239,0.5-0.5,0.5h-8 C2.2239,12,2,11.7761,2,11.5v-4C2,7.2239,2.2239,7,2.5,7h8C10.7761,7,11,7.2239,11,7.5V8h1c1.06,0,1-0.5,1-0.5 C13,7.2239,13.2239,7,13.5,7S14,7.2239,14,7.5z M4,3C2.8954,3,2,3.8954,2,5s0.8954,2,2,2s2-0.8954,2-2S5.1046,3,4,3z M4,6 C3.4477,6,3,5.5523,3,5s0.4477-1,1-1s1,0.4477,1,1S4.5523,6,4,6z M8.5,2C7.1193,2,6,3.1193,6,4.5S7.1193,7,8.5,7S11,5.8807,11,4.5 S9.8807,2,8.5,2z M8.5,6C7.6716,6,7,5.3284,7,4.5S7.6716,3,8.5,3S10,3.6716,10,4.5S9.3284,6,8.5,6z",circle:"M14,7.5c0,3.5899-2.9101,6.5-6.5,6.5S1,11.0899,1,7.5S3.9101,1,7.5,1S14,3.9101,14,7.5z","circle-stroked":"M7.5 12.3C4.84898 12.3 2.7 10.151 2.7 7.5C2.7 4.84898 4.84898 2.7 7.5 2.7C10.151 2.7 12.3 4.84898 12.3 7.5C12.3 10.151 10.151 12.3 7.5 12.3ZM7.5 14C11.0899 14 14 11.0899 14 7.5C14 3.9101 11.0899 1 7.5 1C3.9101 1 1 3.9101 1 7.5C1 11.0899 3.9101 14 7.5 14Z",city:"M12.6368 3.9994H10.9981V2.3608C10.998 2.16148 10.8364 1.99994 10.6371 2H10.3591C10.1598 2 9.9982 2.16158 9.9982 2.3609V3.9994H8.36C8.16068 3.9994 7.9991 4.16098 7.9991 4.3603V9.9984H4.3621C4.16168 9.9984 3.9992 10.1609 3.9992 10.3613V12.6358C3.99975 12.8358 4.16207 12.9977 4.3621 12.9977H12.6368C12.8361 12.9977 12.9977 12.8361 12.9977 12.6368V4.36C12.9977 4.16068 12.8361 3.9994 12.6368 3.9994ZM5.9989 11.9981H4.9989V10.9981H5.9989V11.9981ZM7.9989 11.9981H6.9989V10.9981H7.9989V11.9981ZM9.9989 11.9981H8.9989V10.9981H9.9989V11.9981ZM9.9989 9.9981H8.9989V8.9981H9.9989V9.9981ZM9.9989 7.9981H8.9989V6.9981H9.9989V7.9981ZM9.9989 5.9981H8.9989V4.9981H9.9989V5.9981ZM11.9989 11.9971H10.9989V10.9971H11.9989V11.9971ZM11.9989 9.9971H10.9989V8.9971H11.9989V9.9971ZM11.9989 7.9971H10.9989V6.9971H11.9989V7.9971ZM11.9989 5.9971H10.9989V4.9971H11.9989V5.9971ZM6.9987 2.3608C6.99864 2.16152 6.83708 2 6.6378 2H4.36C4.16068 2 3.9991 2.16158 3.9991 2.3609V4H2.36C2.16138 4.00049 2.00049 4.16138 2 4.36V12.6474C2 12.8407 2.1567 12.9974 2.35 12.9974H2.9994V8.9986H6.9987V2.3608ZM4 7.9981H3V6.9981H4V7.9981ZM4 5.9981H3V4.9981H4V5.9981ZM6 7.9981H5V6.9981H6V7.9981ZM6 5.9981H5V4.9981H6V5.9981ZM6 3.9981H5V3H6V4V3.9981Z","clothing-store":"M4 2L1 4.5L1 7H4V13H11V7H14V4.5L11 2H9.5L7.5 6L5.5 2L4 2Z",college:"M7.5,1L0,4.5l2,0.9v1.7C1.4,7.3,1,7.9,1,8.5s0.4,1.2,1,1.4V10l-0.9,2.1 C0.8,13,1,14,2.5,14s1.7-1,1.4-1.9L3,10c0.6-0.3,1-0.8,1-1.5S3.6,7.3,3,7.1V5.9L7.5,8L15,4.5L7.5,1z M11.9,7.5l-4.5,2L5,8.4v0.1 c0,0.7-0.3,1.3-0.8,1.8l0.6,1.4v0.1C4.9,12.2,5,12.6,4.9,13c0.7,0.3,1.5,0.5,2.5,0.5c3.3,0,4.5-2,4.5-3L11.9,7.5L11.9,7.5z","college-JP":"M12.5,2.9992h-4v-1a1,1,0,0,0-2,0v1h-4a1,1,0,0,0,0,2h.67A10.8169,10.8169,0,0,0,5.15,8.8105c.3331.4313.6594.8248.9785,1.1936a14.3825,14.3825,0,0,1-2.6074,2.117,1,1,0,1,0,.955,1.7581h0A15.65,15.65,0,0,0,7.5,11.4613a15.65,15.65,0,0,0,3.0239,2.4179,1,1,0,1,0,.9551-1.7578,14.3789,14.3789,0,0,1-2.6073-2.1171c.3191-.3688.6453-.7622.9784-1.1935a10.818,10.818,0,0,0,1.98-3.8116h.67a1,1,0,0,0,0-2ZM8.2671,7.5879c-.2614.3385-.5154.6413-.767.937-.2517-.2957-.5057-.5985-.7672-.937A9.5885,9.5885,0,0,1,5.2676,4.9992H9.7319A9.5789,9.5789,0,0,1,8.2671,7.5879Z",commercial:"m14 6h-13c.0881-1.3829.427-2.7383 1-4h11c.5731 1.2617.9119 2.6171 1 4zm-11 1h9v6h-1v-5h-3v5h-5zm1 3h3v-2h-3z","communications-tower":"M11.8545,6.4336l-.4131-.2813a4.7623,4.7623,0,0,0,.2813-4.8779l-.0835-.1533L12.0747.875l.0908.167a5.2619,5.2619,0,0,1-.311,5.3916Zm1.1521,7.1316V14h-11v-.4348H4.4952L6.0439,6.4a.5.5,0,0,1,.4888-.3945h.7255V4.6014A1.14,1.14,0,0,1,6.3756,3.5a1.1568,1.1568,0,1,1,2.3136,0,1.14,1.14,0,0,1-.931,1.1112V6.0059h.7223A.5.5,0,0,1,8.9692,6.4l1.5478,7.1648ZM8.4543,8.751H6.5588L6.236,10.2441H8.777ZM6.1279,10.7441l-.3233,1.4952H9.2082l-.3231-1.4952ZM6.936,7.0059,6.6669,8.251H8.3463L8.0771,7.0059ZM5.5179,13.5652H9.4948l-.1786-.8259h-3.62ZM5.21,5.0137a2.7523,2.7523,0,0,1,.0161-3.0518L4.812,1.6826a3.25,3.25,0,0,0-.019,3.6065ZM10.7568,3.5a3.2433,3.2433,0,0,0-.5341-1.7861l-.418.2754a2.7517,2.7517,0,0,1-.0176,3.0488l.4141.2793A3.2341,3.2341,0,0,0,10.7568,3.5ZM3.5342,6.1182A4.7637,4.7637,0,0,1,3.3813,1.13L2.9478.88a5.2643,5.2643,0,0,0,.1694,5.5137Z",confectionery:"M13,4a1,1,0,0,0-1-1,1,1,0,0,0-2,0V5.0673A3.4808,3.4808,0,0,0,4.3583,9H2a1,1,0,0,0,0,2,1,1,0,0,0,1,1,1,1,0,0,0,2,0V9.9326A3.4807,3.4807,0,0,0,10.6417,6H13a1,1,0,0,0,0-2ZM7.5,9.9925A2.484,2.484,0,0,1,6.3184,5.319a1.0809,1.0809,0,0,1,.5459.307A2.1243,2.1243,0,0,1,7.25,7.0117l.001.9561A2.5821,2.5821,0,0,0,7.76,9.7031a1.5462,1.5462,0,0,0,.2591.2333A2.4861,2.4861,0,0,1,7.5,9.9925ZM8.6815,9.681a1.0813,1.0813,0,0,1-.5458-.307A2.1243,2.1243,0,0,1,7.75,7.9883l-.001-.9561A2.5821,2.5821,0,0,0,7.24,5.2969a1.5557,1.5557,0,0,0-.2592-.2334A2.4843,2.4843,0,0,1,8.6815,9.681Z",construction:"M13.5 11h-1.8L8.2.5C8-.2 7-.2 6.8.5L3.3 11H1.5c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h12c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5ZM7 3h1l.7 2H6.4L7 3ZM5.7 7h3.6l.7 2H5l.7-2Z",convenience:"M2.9982,3.0687s.1875-1.062,1-1.062H5.0043V1.7276a.5.5,0,0,1,.5-.5H9.4882a.5.5,0,0,1,.5.5v.2791h1.01a.8324.8324,0,0,1,.6373.2937,1.7589,1.7589,0,0,1,.3627.7683s.3108,1.5719.5921,2.9181h-.938L11,3,3.982,2.9956,3.3336,5.9868H2.382Zm11,4.9144a1,1,0,0,1-.9992,1l-1.0008,3.973s-.1875,1.0417-1,1.0417h-7c-.8125,0-1-1.0417-1-1.0417L1.9822,8.98a.9985.9985,0,0,1,.016-1.9968h11A1,1,0,0,1,13.9982,7.9831ZM5.0327,12.13,5.03,11.0051,4.6392,9.4686a.5373.5373,0,1,0-1.0649.1445L3.78,11.0075l.1874,1.2672A.5373.5373,0,1,0,5.0327,12.13Zm2-2.5967A.5332.5332,0,0,0,6.4994,9l-.0039.0008L6.4886,9a.4992.4992,0,0,0-.3575.1509.529.529,0,0,0-.1648.3828v2.68a.5332.5332,0,1,0,1.0663,0Zm1.998,0A.5314.5314,0,0,0,8.694,9.04a.4992.4992,0,0,0-.393,0,.5312.5312,0,0,0-.3366.4934v2.68a.5331.5331,0,1,0,1.0662,0Zm2.3857.08a.5373.5373,0,1,0-1.0649-.1445L9.96,10.9938,9.9579,12.13a.5373.5373,0,1,0,1.0649.1446Z",cricket:"M8,1.5C8,2.3284,7.3284,3,6.5,3S5,2.3284,5,1.5S5.6716,0,6.5,0S8,0.6716,8,1.5z M10.88,7.18L10.88,7.18l-2-2l0,0l0,0 C8.7815,5.0616,8.6339,4.9952,8.48,5H3.75C3.3736,4.9915,3.0508,5.2669,3,5.64l0,0l-1,7.7l0,0c-0.0068,0.0464-0.0068,0.0936,0,0.14 c0,0.2761,0.2239,0.5,0.5,0.5c0.2251,0.0153,0.4315-0.1251,0.5-0.34l0,0l1.2-3.89l0,0l0.26-0.83l0.4,0.44l0,0L6,10.6v2.9 C6,13.7761,6.2239,14,6.5,14S7,13.7761,7,13.5v-3l0,0l0,0c-0.0081-0.0788-0.0356-0.1544-0.08-0.22l0,0L5.48,8.5l1-2.5h1.71l2,1.84 l0,0c0.0928,0.1077,0.2278,0.1697,0.37,0.17C10.8163,7.9791,11.007,7.7581,11,7.5C10.9997,7.3824,10.9571,7.2688,10.88,7.18z M14,11.27c-0.4142,0-0.75,0.3358-0.75,0.75s0.3358,0.75,0.75,0.75s0.75-0.3358,0.75-0.75S14.4142,11.27,14,11.27z M10.76,9.74V9 c0-0.1381-0.1119-0.25-0.25-0.25S10.26,8.8619,10.26,9v0.74c-0.1522,0.0855-0.2474,0.2455-0.25,0.42v3.34 c0,0.2761,0.2239,0.5,0.5,0.5s0.5-0.2239,0.5-0.5v-3.34C11.0074,9.9855,10.9122,9.8255,10.76,9.74z",cross:"M3.64 2.27L7.5 6.13L11.34 2.29C11.5114 2.1076 11.7497 2.0029 12 2C12.5523 2 13 2.4477 13 3C13.0047 3.2478 12.907 3.4866 12.73 3.66L8.84 7.5L12.73 11.39C12.8948 11.5512 12.9915 11.7696 13 12C13 12.5523 12.5523 13 12 13C11.7423 13.0107 11.492 12.9127 11.31 12.73L7.5 8.87L3.65 12.72C3.4793 12.8963 3.2453 12.9971 3 13C2.4477 13 2 12.5523 2 12C1.9953 11.7522 2.093 11.5134 2.27 11.34L6.16 7.5L2.27 3.61C2.1052 3.4488 2.0085 3.2304 2 3C2 2.4477 2.4477 2 3 2C3.2404 2.0029 3.4701 2.0998 3.64 2.27Z",dam:"M13.94,9.5c0,0.2761-0.2239,0.5-0.5,0.5l0,0c-0.259,0.0219-0.4994,0.1439-0.67,0.34c-0.2714,0.2887-0.6175,0.4964-1,0.6 c-0.6115,0.1816-1.2734,0.0424-1.76-0.37l-0.39-0.35c-0.2976-0.3038-0.7851-0.3087-1.0889-0.0111 C8.5274,10.2126,8.5237,10.2163,8.52,10.22c-0.14,0.12-0.27,0.25-0.42,0.37c-0.7278,0.5784-1.7663,0.5489-2.46-0.07L5.3,10.19 l-0.1-0.06l0.3,1.22l0.49,2c0.0829,0.2634-0.0634,0.5441-0.3267,0.6271C5.6105,13.9937,5.5553,14.0014,5.5,14h-4 C1.2239,14,1,13.7761,1,13.5v-12C1,1.2239,1.2239,1,1.5,1h1.1c0.2346-0.0011,0.4384,0.1611,0.49,0.39L4,5.06V5.2 c0.6569-0.314,1.4361-0.2205,2,0.24c0.16,0.13,0.31,0.28,0.47,0.41c0.2847,0.2546,0.7153,0.2546,1,0c0.16-0.13,0.31-0.28,0.47-0.41 c0.7076-0.5968,1.7424-0.5968,2.45,0c0.15,0.13,0.29,0.27,0.44,0.39c0.2847,0.2546,0.7153,0.2546,1,0l0.47-0.41 c0.3163-0.2672,0.7159-0.4157,1.13-0.42l0,0c0.2761,0,0.5,0.2239,0.5,0.5S13.7061,6,13.43,6l0,0 c-0.259,0.0219-0.4994,0.1439-0.67,0.34c-0.2714,0.2887-0.6175,0.4964-1,0.6C11.1485,7.1216,10.4866,6.9824,10,6.57L9.67,6.23 C9.3724,5.9262,8.8849,5.9213,8.5811,6.2189C8.5774,6.2226,8.5737,6.2263,8.57,6.23C8.43,6.35,8.3,6.48,8.15,6.6 C7.4222,7.1784,6.3837,7.1489,5.69,6.53L5.3,6.19c-0.2847-0.2546-0.7153-0.2546-1,0L4.24,6.24L4.93,9 C5.3226,9.029,5.6965,9.1793,6,9.43c0.16,0.13,0.31,0.28,0.47,0.41c0.2847,0.2546,0.7153,0.2546,1,0c0.16-0.13,0.31-0.28,0.47-0.41 c0.7076-0.5968,1.7424-0.5968,2.45,0c0.15,0.13,0.29,0.27,0.44,0.39c0.2847,0.2546,0.7153,0.2546,1,0l0.47-0.41 c0.3177-0.2636,0.7172-0.4085,1.13-0.41l0,0c0.2761-0.0055,0.5044,0.2138,0.5099,0.4899C13.94,9.4933,13.94,9.4966,13.94,9.5z",danger:"M13.94,14.68c-0.0749,0.194-0.262,0.3215-0.47,0.32c-0.0595,0.0107-0.1205,0.0107-0.18,0L7.5,12.56L1.7,15 c-0.2572,0.1005-0.5472-0.0266-0.6476-0.2838C1.0516,14.7141,1.0508,14.7121,1.05,14.71c-0.1291-0.2441-0.0358-0.5467,0.2084-0.6757 C1.2845,14.0205,1.3118,14.009,1.34,14l4.85-2l-4.85-2C1.0758,9.9197,0.9267,9.6404,1.007,9.3762s0.3596-0.4133,0.6238-0.333 C1.6545,9.0504,1.6776,9.0594,1.7,9.07l5.8,2.41l5.8-2.41c0.2494-0.1185,0.5477-0.0124,0.6662,0.237 c0.1185,0.2494,0.0124,0.5477-0.237,0.6662C13.7068,9.9839,13.6837,9.9928,13.66,10L8.8,12l4.85,2 c0.2607,0.091,0.3983,0.3761,0.3074,0.6368C13.9523,14.6515,13.9465,14.6659,13.94,14.68z M12,4.23v0.45 c-0.0021,0.2129-0.0722,0.4196-0.2,0.59C11.2414,5.8883,10.6399,6.4664,10,7v1.16c0.0015,0.208-0.126,0.3951-0.32,0.47L7.52,9.5 H7.45L5.28,8.63C5.1016,8.5428,4.9917,8.3584,5,8.16V7C4.3528,6.4675,3.7446,5.8893,3.18,5.27C3.0593,5.0972,2.9963,4.8907,3,4.68 V4.23C3.1669,2.0117,4.8974,0.2307,7.11,0h0.36l0,0h0.39C10.0862,0.2131,11.8348,1.9997,12,4.23z M6,4c0-0.5523-0.4477-1-1-1 S4,3.4477,4,4s0.4477,1,1,1S6,4.5523,6,4z M7,7c0-0.2761-0.2239-0.5-0.5-0.5S6,6.7239,6,7v0.5C6,7.7761,6.2239,8,6.5,8 S7,7.7761,7,7.5V7z M9,7c0-0.2761-0.2239-0.5-0.5-0.5S8,6.7239,8,7v0.5C8,7.7761,8.2239,8,8.5,8S9,7.7761,9,7.5V7z M11,4 c0-0.5523-0.4477-1-1-1S9,3.4477,9,4s0.4477,1,1,1S11,4.5523,11,4z",defibrillator:"m1.54995 7.33811c-2.386799-4.5965 3.63-7.660899 5.952-3.0644 2.3215-4.596499 8.33875-1.5322 5.95235 3.0644-.0869.1671-.2028.3456-.3114.5212h-1.8079l-1.81455-2.7216c-.06321-.09473-.1511-.1704-.25417-.21884-.10308-.04843-.21743-.06779-.3307-.05599-.11327.01181-.22117.05433-.31205.12298-.09087.06865-.16126.16082-.20358.26655l-1.6484 4.12-1.33-1.33c-.11716-.11707-.27597-.18288-.4416-.183h-3.1389c-.1086-.1757-.2245-.3542-.3111-.5213zm9.45005 1.7713c-.103-.00003-.2044-.02545-.2951-.07399-.0908-.04854-.1682-.11871-.2254-.20431l-1.34085-2.0111-1.5587 3.89679c-.03839.096-.10002.181-.17936.2474-.07935.0663-.17393.1119-.27524.1326-.04125.0086-.08327.0128-.1254.0126-.16568.0001-.32462-.0656-.4419-.1826l-1.8169-1.81739h-2.0054c1.36645 1.66819 2.85739 3.23039 4.46 4.67319.08531.077.19616.1197.3111.1197s.22579-.0427.3111-.1197c1.59778-1.4447 3.08545-3.0068 4.45055-4.67319z",dentist:"M4.36,14c-1,0-0.56-2.67-0.86-5c-0.1-0.76-1-1.49-1.12-2.06C2,5,1.39,1.44,3.66,1S6,3,7.54,3s1.57-2.36,3.85-2 s1.59,3.9,1.29,5.9c-0.1,0.45-1.1,1.48-1.18,2.06c-0.33,2.4,0.32,5-0.8,5c-0.93,0-1.32-2.72-2-4.5C8.43,8.63,8.06,8,7.54,8 C6,8,5.75,14,4.36,14z",diamond:"M7.03715 1.20147L2.12542 6.7C2.04962 6.78393 2.00568 6.89005 2.00051 7C1.99535 7.10994 2.02925 7.21013 2.09689 7.3L7.0065 13.7601C7.06233 13.8343 7.13629 13.8947 7.22216 13.9365C7.30803 13.9782 7.40331 14 7.5 14C7.59669 14 7.69197 13.9782 7.77784 13.9365C7.86371 13.8947 7.93766 13.8343 7.9935 13.7601L12.9031 7.3C12.9707 7.21013 13.0047 7.10994 12.9995 7C12.9943 6.89005 12.9504 6.78393 12.8746 6.7L7.96285 1.20147C7.90591 1.13833 7.83501 1.08761 7.75508 1.05282C7.67514 1.01802 7.5881 1 7.5 1C7.4119 1 7.32486 1.01802 7.24492 1.05282C7.16499 1.08761 7.09409 1.13833 7.03715 1.20147Z",doctor:"M5.5,7C4.1193,7,3,5.8807,3,4.5l0,0v-2C3,2.2239,3.2239,2,3.5,2H4c0.2761,0,0.5-0.2239,0.5-0.5S4.2761,1,4,1H3.5 C2.6716,1,2,1.6716,2,2.5v2c0.0013,1.1466,0.5658,2.2195,1.51,2.87l0,0C4.4131,8.1662,4.9514,9.297,5,10.5C5,12.433,6.567,14,8.5,14 s3.5-1.567,3.5-3.5V9.93c1.0695-0.2761,1.7126-1.367,1.4365-2.4365C13.1603,6.424,12.0695,5.7809,11,6.057 C9.9305,6.3332,9.2874,7.424,9.5635,8.4935C9.7454,9.198,10.2955,9.7481,11,9.93v0.57c0,1.3807-1.1193,2.5-2.5,2.5S6,11.8807,6,10.5 c0.0511-1.2045,0.5932-2.3356,1.5-3.13l0,0C8.4404,6.7172,9.001,5.6448,9,4.5v-2C9,1.6716,8.3284,1,7.5,1H7 C6.7239,1,6.5,1.2239,6.5,1.5S6.7239,2,7,2h0.5C7.7761,2,8,2.2239,8,2.5v2l0,0C8,5.8807,6.8807,7,5.5,7 M11.5,9 c-0.5523,0-1-0.4477-1-1s0.4477-1,1-1s1,0.4477,1,1S12.0523,9,11.5,9z","dog-park":"M 10.300781 1.2207031 C 9.9144812 1.2207031 9.6 1.2 9.5 2 L 9.0996094 4.5214844 L 11.5 6.5 L 13.5 6.5 C 14.9 6.5 15 5.5410156 15 5.5410156 L 13.099609 3.3222656 C 12.399609 2.6222656 11.7 2.5 11 2.5 L 11 2 C 11 2 11.067481 1.2206031 10.300781 1.2207031 z M 4.75 1.5 C 4.75 1.5 3.7992187 1.5206031 3.1992188 1.7207031 C 2.5992187 1.9207031 2 2.6210938 2 3.6210938 L 2 7.5214844 C 2 9.2214844 1.3 9.5 1 9.5 C 1 9.5 0 9.5214844 0 10.521484 L 0 12.720703 C 0 12.720703 0.00078125 13.521484 0.80078125 13.521484 L 1 13.521484 L 1.5 13.521484 L 2 13.521484 L 2 13.021484 L 2 12.822266 C 2 12.422266 1.8 12.221094 1.5 12.121094 L 1.5 11.021484 C 2.5 11.021484 2.6 10.820703 3 10.720703 L 3.5507812 12.917969 C 3.6507813 13.217969 3.7507813 13.417578 4.0507812 13.517578 L 5.0507812 13.517578 L 6 13.5 L 6 12.699219 C 6 12.022819 5 12 5 12 L 5 9.5 L 8.5 9.5 L 9.1992188 12.121094 C 9.5992188 13.521094 10.5 13.5 10.5 13.5 L 11 13.5 L 12 13.5 L 12 12.699219 C 12 11.987419 11 12 11 12 L 11.099609 7.921875 L 8 5.5 L 3.5 5.5 L 3.5 3.5 C 3.5 3.1 3.7765 3.0053 4 3 C 4.4941 2.9882 4.75 3 4.75 3 C 5.1642 3 5.5 2.6642 5.5 2.25 C 5.5 1.8358 5.1642 1.5 4.75 1.5 z M 11.75 4 C 11.8881 4 12 4.1119 12 4.25 C 12 4.3881 11.8881 4.5 11.75 4.5 C 11.6119 4.5 11.5 4.3881 11.5 4.25 C 11.5 4.1119 11.6119 4 11.75 4 z","drinking-water":"M6,1A2,2,0,0,0,4,3V6.5a.5.5,0,0,0,.5.5h2A.5.5,0,0,0,7,6.5v-2A.5.5,0,0,1,7.5,4H14V1ZM7,15H4a.5.5,0,0,1-.48-.38L2,8.62a.5.5,0,0,1,.365-.606A.558.558,0,0,1,2.5,8h6a.5.5,0,0,1,.514.485A.47.47,0,0,1,9,8.62l-1.5,6A.5.5,0,0,1,7,15ZM3.65,11H7.36l.5-2H3.14Z",elevator:"M11,1H4A1,1,0,0,0,3,2V13a1,1,0,0,0,1,1h7a1,1,0,0,0,1-1V2A1,1,0,0,0,11,1ZM7.5,12.5l-2-4h4Zm-2-6,2-4,2,4Z",embassy:"M6.65,2C5.43,2,4.48,3.38,4.11,3.82C4.0365,3.9102,3.9975,4.0237,4,4.14v4.4C3.9884,8.7827,4.1758,8.9889,4.4185,9.0005 C4.528,9.0057,4.6355,8.9699,4.72,8.9c0.4665-0.6264,1.1589-1.0461,1.93-1.17C8.06,7.73,8.6,9,10.07,9 c0.9948-0.0976,1.9415-0.4756,2.73-1.09c0.1272-0.0934,0.2016-0.2422,0.2-0.4V2.45c0.0275-0.2414-0.1459-0.4595-0.3874-0.487 C12.5332,1.954,12.4527,1.9668,12.38,2c-0.6813,0.5212-1.4706,0.8834-2.31,1.06C8.6,3.08,8.12,2,6.65,2z M2.5,3 c-0.5523,0-1-0.4477-1-1s0.4477-1,1-1s1,0.4477,1,1S3.0523,3,2.5,3z M3,4v9.48c0,0.2761-0.2239,0.5-0.5,0.5S2,13.7561,2,13.48V4 c0-0.2761,0.2239-0.5,0.5-0.5S3,3.7239,3,4z","emergency-phone":"M7.875,11.49a.51.51,0,0,0,.72,0l.72-.72,2.18,2.16-.37.37a2.24,2.24,0,0,1-1.44.7H8.24a2.24,2.24,0,0,1-1.45-.7L1.72,8.23A2.24,2.24,0,0,1,1,6.78V5.33a2.24,2.24,0,0,1,.72-1.45l.36-.36L4.26,5.69l-.73.73a.51.51,0,0,0,0,.72Zm4.72.38a1,1,0,0,0,.036-1.414h0l-.036-.036-.72-.72a1,1,0,0,0-1.414-.036h0l-.036.036ZM5.315,4.62a1,1,0,0,0,.036-1.414h0L4.595,2.45a1,1,0,0,0-1.414-.036h0L3.14,2.45ZM10,2V4H8V5h2V7h1V5h2V4H11V2Z",entrance:"m8 6.5v-1c0-.26522-.10536-.51957-.29289-.70711-.18754-.18753-.44189-.29289-.70711-.29289s-.51957.10536-.70711.29289c-.18753.18754-.29289.44189-.29289.70711v3zm-2-3.5c0-.19778.05865-.39112.16853-.55557s.26606-.29262.44879-.36831c.18272-.07569.38379-.09549.57777-.0569.19398.03858.37216.13382.51202.27367.13985.13986.23509.31804.27368.51202.03858.19398.01878.39505-.05691.57777-.07569.18273-.20386.33891-.36831.44879s-.35779.16853-.55557.16853c-.26522 0-.51957-.10536-.70711-.29289-.18753-.18754-.29289-.44189-.29289-.70711zm9 3c0 .26522-.1054.51957-.2929.70711-.1875.18753-.4419.29289-.7071.29289h-1.58c-.1316-.00076-.2621.02446-.3839.07423-.1218.04976-.2327.12309-.3261.21577l-5.42 5.42c-.18626.1847-.43766.2889-.7.29h-2.59c-.26522 0-.51957-.1054-.70711-.2929-.18753-.1875-.29289-.4419-.29289-.7071s.10536-.5196.29289-.7071c.18754-.1875.44189-.2929.70711-.2929h1.59c.26234-.0011.51374-.1053.7-.29l5.42-5.42c.0934-.09268.2043-.16601.3261-.21577.1218-.04977.2523-.07499.3839-.07423h2.58c.2652 0 .5196.10536.7071.29289.1875.18754.2929.44189.2929.70711z","entrance-alt1":"M6.554,9.639a.5.5,0,0,0,.707.707L9.928,7.669a.25.25,0,0,0,0-.354h0L7.261,4.639a.5.5,0,0,0-.707.707L8.2,7H1.5a.5.5,0,0,0,0,1H8.2ZM12,1H5.5a.5.5,0,0,0,0,1h6a.5.5,0,0,1,.5.5v10a.5.5,0,0,1-.5.5H5.25a.5.5,0,0,0,0,1H12a1,1,0,0,0,1-1V2A1,1,0,0,0,12,1Z",farm:"m8 6-3-2-3 2-1 2v4h2v-2h4v2h2v-4zm-2 2h-2v-2h2zm8 4h-3v-9.5c0-.39782.158-.77936.4393-1.06066s.6629-.43934 1.0607-.43934.7794.15804 1.0607.43934.4393.66284.4393 1.06066z","fast-food":"M14,8c0,0.5523-0.4477,1-1,1H2C1.4477,9,1,8.5523,1,8s0.4477-1,1-1h11C13.5523,7,14,7.4477,14,8z M3.5,10H2 c0,1.6569,1.3431,3,3,3h5c1.6569,0,3-1.3431,3-3H3.5z M3,6H2V4c0-1.1046,0.8954-2,2-2h7c1.1046,0,2,0.8954,2,2v2H3z M11,4.5 C11,4.7761,11.2239,5,11.5,5S12,4.7761,12,4.5S11.7761,4,11.5,4S11,4.2239,11,4.5z M9,3.5C9,3.7761,9.2239,4,9.5,4S10,3.7761,10,3.5 S9.7761,3,9.5,3S9,3.2239,9,3.5z M7,4.5C7,4.7761,7.2239,5,7.5,5S8,4.7761,8,4.5S7.7761,4,7.5,4S7,4.2239,7,4.5z M5,3.5 C5,3.7761,5.2239,4,5.5,4S6,3.7761,6,3.5S5.7761,3,5.5,3S5,3.2239,5,3.5z M3,4.5C3,4.7761,3.2239,5,3.5,5S4,4.7761,4,4.5 S3.7761,4,3.5,4S3,4.2239,3,4.5z",fence:"m13.5 9h-.5v-3h.5c.1326 0 .2598-.05268.3536-.14644.0937-.09377.1464-.22095.1464-.35356s-.0527-.25978-.1464-.35355c-.0938-.09377-.221-.14645-.3536-.14645h-.5v-2l-.286-.573c-.0218-.03651-.0525-.06683-.0894-.08809-.0368-.02125-.0784-.03273-.1209-.03333s-.0845.00969-.1219.0299c-.0374.0202-.069.04964-.0918.08552l-.29.579v2h-1v-2l-.286-.573c-.0218-.03651-.0525-.06683-.0894-.08809-.0368-.02125-.0784-.03273-.1209-.03333s-.0845.00969-.1219.0299c-.0374.0202-.069.04964-.0918.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-.5c-.13261 0-.25979.05268-.35355.14645-.09377.09377-.14645.22094-.14645.35355s.05268.25979.14645.35356c.09376.09376.22094.14644.35355.14644h.5v3h-.5c-.13261 0-.25979.05268-.35355.14645-.09377.09377-.14645.22094-.14645.35355s.05268.25979.14645.35356c.09376.09376.22094.14644.35355.14644h.5v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.0527.2598.1464.3536.0938.0937.221.1464.3536.1464s.2598-.0527.3536-.1464c.0937-.0938.1464-.221.1464-.3536v-1.5h1v1.5c0 .1326.0527.2598.1464.3536.0938.0937.221.1464.3536.1464s.2598-.0527.3536-.1464c.0937-.0938.1464-.221.1464-.3536v-1.5h.5c.1326 0 .2598-.05268.3536-.14644.0937-.09377.1464-.22095.1464-.35356s-.0527-.25978-.1464-.35355c-.0938-.09377-.221-.14645-.3536-.14645zm-10.5 0v-3h1v3zm2 0v-3h1v3zm2 0v-3h1v3zm2 0v-3h1v3zm2 0v-3h1v3z",ferry:"M5.33,11c0.6745,0.009,1.3262,0.245,1.85,0.67l0.26,0.23h0.05l0.31-0.28c0.9817-0.8115,2.379-0.8846,3.44-0.18L13.5,7L12,6 V2.45c-0.0466-0.8-0.6989-1.4305-1.5-1.45H10c0.0343-0.518-0.3579-0.9657-0.8759-1C9.0828-0.0027,9.0413-0.0027,9,0H6 C5.482-0.0343,5.0343,0.3579,5,0.8759C4.9973,0.9172,4.9973,0.9587,5,1H4.5C3.6989,1.0195,3.0466,1.65,3,2.45V6L1.5,7l2.25,4.53 C4.2143,11.2041,4.7631,11.02,5.33,11z M4,2.45c0.0105-0.2594,0.2293-0.4611,0.4886-0.4506C4.4924,1.9996,4.4962,1.9998,4.5,2h6 c0.259-0.0171,0.4829,0.1789,0.5,0.4379c0.0014,0.0207,0.0014,0.0414,0,0.0621v3l-3.5-2L4,5.45C4,5.45,4,2.45,4,2.45z M14,13v1 c-0.2626,0.0194-0.5069,0.1416-0.68,0.34c-0.2717,0.2883-0.6178,0.4959-1,0.6c-0.6147,0.1815-1.2795,0.0425-1.77-0.37l-0.39-0.35 c-0.3043-0.3026-0.7957-0.3026-1.1,0c-0.14,0.12-0.27,0.25-0.42,0.37c-0.7328,0.5856-1.7814,0.556-2.48-0.07l-0.39-0.35 c-0.2864-0.2502-0.7136-0.2502-1,0c-0.19,0.15-0.36,0.32-0.55,0.47c-0.7043,0.5215-1.6732,0.4968-2.35-0.06l-0.31-0.27 C1.4153,14.1443,1.2172,14.0346,1,14v-1c0.2585-0.032,0.5205,0.0169,0.75,0.14c0.2782,0.1722,0.5424,0.3661,0.79,0.58 c0.2051,0.2235,0.5147,0.319,0.81,0.25c0.1125-0.0333,0.2177-0.0876,0.31-0.16c0.16-0.12,0.29-0.26,0.45-0.39 c0.7106-0.5888,1.7394-0.5888,2.45,0c0.16,0.13,0.31,0.28,0.47,0.41c0.2864,0.2502,0.7136,0.2502,1,0c0.16-0.13,0.31-0.28,0.47-0.41 c0.7123-0.5943,1.7477-0.5943,2.46,0c0.15,0.13,0.29,0.27,0.44,0.39c0.2864,0.2502,0.7136,0.2502,1,0l0.47-0.41 C13.1895,13.1408,13.5886,12.9995,14,13z","ferry-JP":"M9.5 12.5H5.5L5.5 8C5.5 6.91153 6.07979 5.44812 6.85389 4.13809C7.07346 3.76652 7.29495 3.43049 7.5 3.1451C7.70505 3.43049 7.92654 3.76652 8.14611 4.13809C8.92021 5.44812 9.5 6.91153 9.5 8V12.5ZM7.5 1C7 1 4 5 4 8V12.5C4 13.3284 4.67157 14 5.5 14H9.5C10.3284 14 11 13.329 11 12.5006V8C11 5 8 1 7.5 1Z","fire-station":"M7.5 14C11.0899 14 14 11 14 7.50003C14 4.5 11.5 2 11.5 2L10.5 5.5L7.5 1L4.5 5.5L3.5 2C3.5 2 1 4.5 1 7.50003C1 11 3.91015 14 7.5 14ZM7.5 12.5C6.11929 12.5 5 11.3807 5 10C5 8.61929 7.5 5.5 7.5 5.5C7.5 5.5 10 8.61929 10 10C10 11.3807 8.88071 12.5 7.5 12.5Z","fire-station-JP":"M8.5,8.1489V11.75a1,1,0,0,1-2,0V8.1489A5.0084,5.0084,0,0,1,2.5,3.25a1,1,0,0,1,2,0,3,3,0,0,0,6,0,1,1,0,0,1,2,0A5.0082,5.0082,0,0,1,8.5,8.1489Z","fitness-centre":"M14.5,7V8h-1v2h-1v1H11V8H4v3H2.5V10h-1V8H.5V7h1V5h1V4H4V7h7V4h1.5V5h1V7Z",florist:"M1.5,1A2.7,2.7,0,0,1,4,3l.5-3L5,3A2.7,2.7,0,0,1,7.5,1c-.2.03-1,.26-1,2v.083A1.959,1.959,0,0,1,4.5,5H4.417A1.959,1.959,0,0,1,2.5,3C2.5,1.261,1.7,1.03,1.5,1ZM12.012,11l3-.5-3-.5A2.686,2.686,0,0,0,14,7.5c-.03.2-.248,1-1.988,1a2,2,0,0,0,0,4c1.739,0,1.958.8,1.988,1A2.686,2.686,0,0,0,12.012,11ZM9.688,5.548a1,1,0,0,1,0-2,1,1,0,0,1,0-2,.986.986,0,0,1,.852.507l.023-.012a.978.978,0,0,1-.116-.444,1,1,0,1,1,2,0,.978.978,0,0,1-.116.444l.019.01a.986.986,0,0,1,.85-.5,1,1,0,0,1,.025,2,1,1,0,0,1-.025,2,.986.986,0,0,1-.85-.5l-.016.009a.978.978,0,0,1,.113.44,1,1,0,0,1-2,0,.978.978,0,0,1,.113-.44l-.02-.011a.986.986,0,0,1-.852.507Zm.71-1.995A1.051,1.051,0,1,0,11.449,2.5,1.051,1.051,0,0,0,10.4,3.553v0ZM4.946,11.444l-.516-.515L8.892,6.475A1.746,1.746,0,0,1,8.44,6.22L4.076,10.575l-.519-.518A16.051,16.051,0,0,0,4.912,6a3.373,3.373,0,0,1-.412.035c-.041,0-.073-.008-.112-.01A16.953,16.953,0,0,1,3.131,9.631L2.76,9.26a.246.246,0,0,0-.4.079L.231,14.445a.287.287,0,0,0-.016.089.25.25,0,0,0,.25.25.289.289,0,0,0,.1-.019l5.1-2.124a.246.246,0,0,0,.079-.4l-.372-.372a16.874,16.874,0,0,1,3.612-1.256c0-.059-.015-.106-.015-.166A3.349,3.349,0,0,1,9,10.089,16.076,16.076,0,0,0,4.946,11.444Z",fuel:"m14 6v5.5c0 .2761-.2239.5-.5.5s-.5-.2239-.5-.5v-2c0-.8284-.6716-1.5-1.5-1.5h-1.5v-6c0-.5523-.4477-1-1-1h-6c-.5523 0-1 .4477-1 1v11c0 .5523.4477 1 1 1h6c.5523 0 1-.4477 1-1v-4h1.5c.2761 0 .5.2239.5.5v2c0 .8284.6716 1.5 1.5 1.5s1.5-.6716 1.5-1.5v-6.5c0-.5523-.4477-1-1-1v-1.51c-.0054-.2722-.2277-.4901-.5-.49-.2816.0047-.5062.2367-.5015.5184.0002.0105.0007.0211.0015.0316v2.45c0 .5523.4477 1 1 1s1-.4477 1-1-.4477-1-1-1zm-5 .5c0 .2761-.2239.5-.5.5h-5c-.2761 0-.5-.2239-.5-.5v-3c0-.2761.2239-.5.5-.5h5c.2761 0 .5.2239.5.5z",furniture:"m8.69099 10.142v-1.642c0-.13261-.05268-.25979-.14645-.35355-.09377-.09377-.22094-.14645-.35355-.14645h-1c-.13261 0-.25979.05268-.35356.14645-.09376.09376-.14644.22094-.14644.35355v1.641c-.75987.1945-1.4456.6085-1.9715 1.1905-.52591.5819-.86868 1.3059-.9855 2.0815-.01141.0723-.00702.1462.01285.2167.01987.0704.05476.1357.10227.1914s.10651.1004.17295.1311c.06643.0307.13873.0467.21193.0468h6.92201c.0732-.0001.1455-.0161.2119-.0468.0665-.0307.1255-.0754.173-.1311s.0824-.121.1022-.1914c.0199-.0705.0243-.1444.0129-.2167-.1176-.7765-.4616-1.501-.989-2.0828-.5275-.5819-1.2148-.9952-1.97601-1.1882zm4.63901-3.863-2.5-5c-.0412-.08351-.1048-.15387-.1838-.20316s-.1701-.07556-.2632-.07584h-5.38401c-.09261.00019-.18335.02609-.2621.07483-.07875.04873-.14241.11837-.1839.20117l-2.5 5c-.03809.076-.05617.16046-.05253.24539.00363.08494.02886.16754.07331.24001.04444.07247.10663.13241.18068.17416s.15753.06393.24254.06444h8.19401v1.5c0 .13261.0527.25979.1464.35355.0938.09377.221.14645.3536.14645s.2598-.05268.3535-.14645c.0938-.09376.1465-.22094.1465-.35355v-1.5h1.194c.0847-.00059.1678-.02269.2416-.06421s.1359-.1011.1804-.17317c.0444-.07207.0699-.15425.0739-.23884s-.0135-.16882-.0509-.24478z",gaming:"m13.1 11.5c-.6.3-1.4.1-1.8-.5l-1.1-1.4h-5.40002l-1.1 1.4c-.5.7-1.4.8-2.1.3-.5-.4-.700004-1-.600004-1.5l.700004-3.7c.2-1.2 1.3-2.1 2.5-2.1h2.8v-1.5c0-.8.6-1.5 1.4-1.5h3.10002c.3 0 .5.2.5.5s-.2.5-.5.5h-3.00002c-.3 0-.5.2-.5.4v.1 1.5h2.80002c1.2 0 2.3.9 2.5 2.1l.7 3.7c.1.7-.2 1.4-.9 1.7zm-7.10002-5c0-.8-.7-1.5-1.5-1.5s-1.5.7-1.5 1.5.7 1.5 1.5 1.5 1.5-.7 1.5-1.5zm6.00002 0c0-.3-.2-.5-.5-.5h-.5v-.5c0-.3-.2-.5-.5-.5s-.50002.2-.50002.5v.5h-.5c-.3 0-.5.2-.5.5s.2.5.5.5h.5v.5c0 .3.20002.5.50002.5s.5-.2.5-.5v-.5h.5c.3 0 .5-.2.5-.5z",garden:"M13,8c0,3.31-2.19,6-5.5,6S2,11.31,2,8c2.2643,0.0191,4.2694,1.4667,5,3.61V7H4.5C3.6716,7,3,6.3284,3,5.5v-3 C3,2.2239,3.2239,2,3.5,2c0.1574,0,0.3056,0.0741,0.4,0.2l1.53,2l1.65-3c0.1498-0.232,0.4593-0.2985,0.6913-0.1487 C7.8308,1.0898,7.8815,1.1404,7.92,1.2l1.65,3l1.53-2c0.1657-0.2209,0.4791-0.2657,0.7-0.1C11.9259,2.1944,12,2.3426,12,2.5v3 C12,6.3284,11.3284,7,10.5,7H8v4.61C8.7306,9.4667,10.7357,8.0191,13,8z","garden-centre":"M4,5L4,4.5C4,3.12 5.12,2 6.5,2C7.88,2 9,3.12 9,4.5L9,10.293L11.365,7.928L11.018,6.633C11.018,6.631 11.017,6.629 11.017,6.627L11.016,6.627L11.016,6.627C10.973,6.461 11.016,6.276 11.147,6.146C11.342,5.951 11.659,5.951 11.854,6.146L13.854,8.146C14.049,8.341 14.049,8.658 13.854,8.853C13.724,8.983 13.541,9.027 13.375,8.984C13.375,8.984 13.375,8.984 13.375,8.984C13.372,8.983 13.369,8.982 13.365,8.981L12.072,8.635L9,11.707L9,12C9,12.552 8.552,13 8,13L5,13C4.448,13 4,12.552 4,12L4,11.536L1.732,9.268C0.757,8.292 0.757,6.708 1.732,5.732C2.22,5.244 2.86,5 3.5,5L3.5,5L4,5ZM4,6L3.5,6L3.5,6C3.116,6 2.732,6.147 2.439,6.439C1.854,7.025 1.854,7.975 2.439,8.561L4,10.121L4,6ZM8,5L8,4.5C8,3.672 7.328,3 6.5,3C5.672,3 5,3.672 5,4.5L5,5L8,5Z",gate:"M1 2.75A.75.75 0 0 1 1.75 2h1.114c.09 0 .18.016.263.048l3.386 1.27A.75.75 0 0 1 7 4.02v5.96a.75.75 0 0 1-.487.702L3 12v.25a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1-.75-.75v-9.5Zm3 5.736v-4.87a.25.25 0 0 0-.162-.234l-.5-.187A.25.25 0 0 0 3 3.429v5.224c0 .17.167.291.33.237l.5-.166A.25.25 0 0 0 4 8.486ZM5 4.18v3.807a.25.25 0 0 0 .33.238l.5-.167A.25.25 0 0 0 6 7.82V4.366a.25.25 0 0 0-.162-.234l-.5-.187A.25.25 0 0 0 5 4.179Zm9-1.43a.75.75 0 0 0-.75-.75h-1.114a.75.75 0 0 0-.263.048l-3.386 1.27A.75.75 0 0 0 8 4.02v5.96a.75.75 0 0 0 .487.702L12 12v.25c0 .414.336.75.75.75h.5a.75.75 0 0 0 .75-.75v-9.5Zm-2.83 5.974a.25.25 0 0 1-.17-.238v-4.87a.25.25 0 0 1 .162-.234l.5-.187a.25.25 0 0 1 .338.234v5.224a.25.25 0 0 1-.33.237l-.5-.166ZM10 4.179v3.807a.25.25 0 0 1-.33.238l-.5-.167A.25.25 0 0 1 9 7.82V4.366a.25.25 0 0 1 .162-.234l.5-.187a.25.25 0 0 1 .338.234Z",gift:"M10.5 1.00152C9.0967.957116 7.8503 1.89192 7.5 3.25152 7.1497 1.89192 5.9033.957116 4.5 1.00152 2.7678.947006 2.23515 2.79746 2.81831 4H1.5C1.22386 4 1 4.22386 1 4.5V5.5C1 5.77614 1.22386 6 1.5 6H13.5C13.7761 6 14 5.77614 14 5.5V4.5C14 4.22386 13.7761 4 13.5 4H12.1938C12.8 2.81516 12.2922 1.00143 10.5404 1.00112 10.5269 1.00112 10.5135 1.00122 10.5 1.00152ZM10.6831 4H8.5C8.50082 2.8961 9.3959 2.00152 10.5 2.00152 11.675 2.00152 11.8827 3.87414 10.6831 4ZM6.5 4H4.29187C3.25675 3.88256 3.19576 2.10553 4.3323 2.00152 4.3881 1.99642 4.4442 1.99642 4.5 2.00152 5.60409 2.00152 6.49918 2.8961 6.5 4ZM2 7.00146V11.5015C2 12.3299 2.6716 13.0015 3.5 13.0015H6.5V7.00146H2ZM8.5 7.00146V13.0015H11.5C12.3284 13.0015 13 12.3299 13 11.5015V7.00146H8.5Z",globe:"M11.981,9.481,11.26,8.76A4.979,4.979,0,1,1,4.24,1.74l-.721-.721A5.991,5.991,0,0,0,7,11.475V13H6.5a.5.5,0,0,0,0,1h2a.5.5,0,0,0,0-1H8V11.473A5.983,5.983,0,0,0,11.981,9.481ZM7.5,9A3.5,3.5,0,1,0,4,5.5,3.5,3.5,0,0,0,7.5,9Zm1-5,.364-.592a2.5,2.5,0,0,1,.823.9L9.5,5h-1ZM6.656,3.156,7.5,4V5L8,6H9.94a2.494,2.494,0,0,1-1.5,1.814L8,7H6.5L5.05,5A2.5,2.5,0,0,1,6.656,3.156Z",golf:"M3.3999,1.1c0,0.1,0,0.2,0,0.2c0,0.4,0.3,0.7,0.7,0.7c0.3,0,0.5-0.2,0.6-0.5l0,0L4.9,1l5.6,2.3L6.6,6C6.2,6.3,6.2,6.7,6.3,7.1 l0.9,2.1l-1.3,3.9C5.7,13.6,6.1,14,6.5,14c0.3,0,0.5-0.1,0.6-0.5l1.4-4l0.1,0.3v3.5c0,0,0,0.7,0.7,0.7s0.7-0.7,0.7-0.7V10 c0-0.2,0-0.3-0.1-0.5L8.5,6.1l2.7-1.9c0.2-0.2,0.4-0.3,0.4-0.6s-0.2-0.5-0.4-0.6L4,0.1c-0.0878,0-0.118,0.0179-0.2001,0.1 L3.3999,1.1z M5.5,3C4.7,3,4,3.7,4,4.5S4.7,6,5.5,6S7,5.3,7,4.5S6.2999,3,5.5,3z",grocery:"M 13.199219 1.5 C 13.199219 1.5 11.808806 1.4588 11.253906 2 C 10.720406 2.5202 10.5 2.9177 10.5 4 L 1.1992188 4 L 2.59375 8.8144531 C 2.59725 8.8217531 2.6036219 8.8287375 2.6074219 8.8359375 C 2.8418219 9.4932375 3.4545469 9.9666406 4.1855469 9.9941406 C 4.1885469 9.9954406 4.1992187 10 4.1992188 10 L 10.699219 10 L 10.699219 10.199219 C 10.699219 10.199219 10.7 10.500391 10.5 10.900391 C 10.3 11.300391 10.200391 11.5 9.4003906 11.5 L 2.9003906 11.5 C 1.9003906 11.5 1.9003906 13 2.9003906 13 L 4.0996094 13 L 4.1992188 13 L 9.0996094 13 L 9.1992188 13 L 9.3007812 13 C 10.500781 13 11.399219 12.299609 11.699219 11.599609 C 11.999219 10.899609 12 10.300781 12 10.300781 L 12 10 L 12 4 C 12 3.4764 12.228619 3 12.699219 3 L 13.25 3 C 13.6642 3 14 2.6642 14 2.25 C 14 1.8358 13.6642 1.5 13.25 1.5 L 13.199219 1.5 z M 9.1992188 13 C 8.5992188 13 8.1992188 13.4 8.1992188 14 C 8.1992188 14.6 8.5992187 15 9.1992188 15 C 9.7992187 15 10.199219 14.6 10.199219 14 C 10.199219 13.4 9.7992188 13 9.1992188 13 z M 4.1992188 13 C 3.5992188 13 3.1992188 13.4 3.1992188 14 C 3.1992188 14.6 3.5992187 15 4.1992188 15 C 4.7992188 15 5.1992188 14.6 5.1992188 14 C 5.1992188 13.4 4.7992187 13 4.1992188 13 z",hairdresser:"M15,3c0,0-2-0.6-3.5,0.5l-4.3,3C6.4,5.9,5.2,5.2,4,4.8V4c0-1.1-0.9-2-2-2C0.9,2,0,2.9,0,4v1.5 C0,6,0.5,6,0.5,6H2h0.5C4.5,6,6,7.5,6,7.5S4.5,9,2.5,9H2H0.5C0.5,9,0,9,0,9.5V11c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2v-0.8 c1.2-0.4,2.4-1.1,3.2-1.7l4.3,3C13,12.6,15,12,15,12L8.5,7.5L15,3z M3,5H2H1V4c0-0.6,0.4-1,1-1c0.6,0,1,0.4,1,1V5z M3,11 c0,0.6-0.4,1-1,1c-0.6,0-1-0.4-1-1v-1h1h1V11z M7.25,8c-0.2761,0-0.5-0.2239-0.5-0.5S6.9739,7,7.25,7s0.5,0.2239,0.5,0.5 S7.5261,8,7.25,8z",harbor:"M7.5,0C5.5,0,4,1.567,4,3.5c0.0024,1.5629,1.0397,2.902,2.5,3.3379v6.0391 c-0.9305-0.1647-1.8755-0.5496-2.6484-1.2695C2.7992,10.6273,2.002,9.0676,2.002,6.498c0.0077-0.5646-0.4531-1.0236-1.0176-1.0137 C0.4329,5.493-0.0076,5.9465,0,6.498c0,3.0029,1.0119,5.1955,2.4902,6.5723C3.9685,14.4471,5.8379,15,7.5,15 c1.6656,0,3.535-0.5596,5.0117-1.9395S14.998,9.4868,14.998,6.498c0.0648-1.3953-2.0628-1.3953-1.998,0 c0,2.553-0.7997,4.1149-1.8535,5.0996C10.3731,12.3203,9.4288,12.7084,8.5,12.875V6.8418C9.9607,6.4058,10.9986,5.0642,11,3.5 C11,1.567,9.5,0,7.5,0z M7.5,2C8.3284,2,9,2.6716,9,3.5S8.3284,5,7.5,5S6,4.3284,6,3.5S6.6716,2,7.5,2z",hardware:"M13.7919,3.2619c0,0-1.676,1.675-2.1163,2.1208c-0.085,0.0861-0.1688,0.1135-0.282,0.0961 c-0.1481-0.0226-0.2974-0.038-0.4462-0.0558c-0.4072-0.0485-0.8145-0.0966-1.2292-0.1458C9.649,4.6852,9.5787,4.1049,9.5177,3.5236 C9.512,3.4689,9.5509,3.3943,9.5925,3.3522c0.5071-0.5134,1.9261-1.9287,2.134-2.136c-0.4508-0.2129-1.2243-0.2968-1.8007-0.2031 c-2.1801,0.3543-3.5112,2.534-2.8206,4.625C7.1432,5.753,7.1194,5.8201,7.0374,5.902C5.1891,7.7454,3.3436,9.5914,1.498,11.4374 c-0.0616,0.0616-0.1231,0.124-0.1779,0.1913c-0.5264,0.6473-0.3873,1.6264,0.2974,2.102c0.6044,0.4197,1.3658,0.3442,1.9053-0.1948 c1.8534-1.8519,3.7059-3.7047,5.556-5.5598C9.1707,7.884,9.2437,7.8526,9.3779,7.8983c0.6189,0.2109,1.2524,0.2354,1.8884,0.0884 c1.9386-0.4478,3.1251-2.3732,2.6549-4.3034C13.8895,3.5532,13.843,3.4244,13.7919,3.2619z",heart:"m13.91 7.75001c-1.17 2.24999-4.30002 5.30999-6.07002 6.93999-.1903.1718-.4797.1718-.67 0-1.78-1.63-4.91-4.69-6.08-6.93999-2.57-4.95 3.91-8.250002 6.41-3.3 2.5-4.950002 8.98002-1.65 6.41002 3.3z",heliport:"M4,2C3,2,3,3,4,3h4v1C7.723,4,7.5,4.223,7.5,4.5V5H5H3.9707H3.9316 C3.7041,4.1201,2.9122,3.5011,2,3.5c-1.1046,0-2,0.8954-2,2s0.8954,2,2,2c0.3722-0.001,0.7368-0.1058,1.0527-0.3027L5.5,10.5 C6.5074,11.9505,8.3182,12,9,12h5c0,0,1,0,1-1v-0.9941C15,9.2734,14.874,8.874,14.5,8.5l-3-3c0,0-0.5916-0.5-1.2734-0.5H9.5V4.5 C9.5,4.223,9.277,4,9,4V3h4c1,0,1-1,0-1C13,2,4,2,4,2z M2,4.5c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1s-1-0.4477-1-1 C1,4.9477,1.4477,4.5,2,4.5z M10,6c0.5,0,0.7896,0.3231,1,0.5L13.5,9H10c0,0-1,0-1-1V7C9,7,9,6,10,6z","highway-rest-area":"M13.5,13h-3V9h3a.5.5,0,0,0,.4092-.7871L11.66,5h.84a.5.5,0,0,0,.3838-.82l-2.5-3a.5155.5155,0,0,0-.7676,0l-2.5,3A.5.5,0,0,0,7.5,5h.84L6.0908,8.2129A.5.5,0,0,0,6.5,9h3v4H4V11H5.5a.5.5,0,0,0,0-1h-4a.5.5,0,0,0,0,1H3v2H1.5a.5.5,0,0,0,0,1h12a.5.5,0,0,0,0-1Z",historic:"m7.5 1c-1 0-1 1-2 1h-3.5c-.54467 0-1 .45533-1 1v7c0 .5447.45533 1 1 1h5v2.5s0 .5.5.5.5-.5.5-.5v-2.5h5c.5447 0 1-.4553 1-1v-7c0-.54467-.4553-1-1-1h-3.5c-1 0-1-1-2-1zm-4.5 4v-1h9v1zm0 1h4v1h-4zm0 2h7v1h-7z",home:"M2,13.7478c0,0.13807,0.11193,0.25,0.25,0.25h3.749v-3h3v3h3.749c0.13807,0,0.25-0.11193,0.25-0.25V7.9987H2 C2,7.9987,2,13.7478,2,13.7478z M13.93,6.5778l-0.9319-0.8189V2c0-0.55228-0.44771-1-1-1s-1,0.44772-1,1v2L7.6808,1.09 C7.5863,0.9897,7.42846,0.98478,7.3279,1.079L7.3169,1.09L1.0678,6.553C0.9734,6.65376,0.97856,6.81197,1.07932,6.90637 C1.12478,6.94896,1.18451,6.97304,1.2468,6.9739L3,6.9989h10.7468c0.13807,0.00046,0.25037-0.1111,0.25083-0.24917 C13.99784,6.68592,13.97365,6.62445,13.93,6.5779V6.5778z","horse-riding":"M6,1A1,1,0,1,1,7,2,1,1,0,0,1,6,1ZM8,3.5a.484.484,0,0,0,0-.058A.472.472,0,0,0,7.5,3h-1a.484.484,0,0,0-.058,0A.472.472,0,0,0,6,3.5V7H8Zm6.85,3.644L12.8,4.8l.085-.509a.478.478,0,0,0,.008-.063.25.25,0,0,0-.25-.25.346.346,0,0,0-.158.056L9,7H8L9,8V9.5a.5.5,0,0,1-1,0v-1L6,7H4a1.5,1.5,0,0,0-1.243.661A1.466,1.466,0,0,0,1.563,7H1.5A1.449,1.449,0,0,0,0,8.4v.086A3.781,3.781,0,0,0,.559,10.4a.278.278,0,0,0,.191.1A.25.25,0,0,0,1,10.25V9s-.02-.924.753-1c.5-.048.747.253.747.5V11L2,13v1.75a.25.25,0,0,0,.25.25.254.254,0,0,0,.25-.234V13L4,11v1l.5,2.8a.255.255,0,0,0,.246.2A.25.25,0,0,0,5,14.754H5L4.855,12.3,5.5,11H8v1l.508,2.813A.257.257,0,0,0,8.75,15,.25.25,0,0,0,9,14.75V12l.367-1a1.155,1.155,0,0,0,.543-.6l2.161-3.767a.863.863,0,0,0,1.023.4l1.066.818a.591.591,0,0,0,.35.135.487.487,0,0,0,.475-.4A.552.552,0,0,0,14.85,7.144Z",hospital:"M7,1C6.4,1,6,1.4,6,2v4H2C1.4,6,1,6.4,1,7v1 c0,0.6,0.4,1,1,1h4v4c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1V9h4c0.6,0,1-0.4,1-1V7c0-0.6-0.4-1-1-1H9V2c0-0.6-0.4-1-1-1H7z","hospital-JP":"m12.5038 3h-10.00777c-.26639.00235-.52096.11039-.70772.30036-.18677.18998-.29046.44634-.28828.71274v5.5807c-.00063.18713.05047.37079.14765.5307.09718.1599.23667.2899.40305.3755l4.78 2.8394c.20725.1056.43653.1606.6691.1606.23258 0 .46186-.055.6691-.1606l4.78037-2.8394c.1664-.0856.3059-.2155.4031-.3755.0972-.15989.1483-.34357.1476-.5307v-5.5807c.0012-.13194-.0237-.2628-.0732-.38512-.0494-.12232-.1225-.2337-.215-.32777-.0925-.09408-.2027-.16901-.3241-.22052-.1215-.05151-.2519-.07859-.3839-.07969zm-2.0038 5.5h-1.99997v2h-2v-2h-2v-2h2v-2h2v2h1.99997z","hot-spring":"M6.682,5.759c-.505-.725-.781-1.121-.63-2.376,.139-1.156,.678-1.616,1.198-2.059,.404-.345,.797-.68,.981-1.324,.301,.722-.036,1.47-.349,2.164-.311,.691-.599,1.329-.211,1.836,.971,1.271,1.963,2.88,.971,4.586-.214,.393-.539,.681-.861,.968-.422,.375-.841,.747-1.004,1.348-.269-.677,.008-1.366,.285-2.052,.306-.759,.61-1.516,.172-2.251-.203-.34-.389-.607-.551-.84Zm3.371-1.174c-.098-.632,.034-1.281,.368-1.809,.367-.45,.701-.642,.991-.81,.345-.199,.627-.362,.83-.877,.289,.684,0,1.188-.304,1.718-.119,.207-.24,.418-.329,.645-.191,.61,.101,.893,.467,1.247,.358,.346,.786,.76,.899,1.617,.083,.635-.036,1.156-.372,1.684-.356,.436-.681,.655-.965,.846-.356,.24-.648,.437-.856,.965-.292-.688,.031-1.259,.353-1.828,.123-.217,.246-.434,.334-.658,.073-.558-.234-.867-.581-1.217-.357-.36-.757-.763-.834-1.523Zm-8.018,0c-.098-.632,.005-1.3,.368-1.809,.376-.528,.729-.717,1.035-.881,.323-.173,.594-.318,.786-.806,.289,.683-.014,1.208-.325,1.749-.122,.212-.246,.427-.336,.655-.152,.385,.131,1.014,.501,1.242,1.002,.801,1.227,2.286,.547,3.353-.366,.448-.704,.648-.999,.823-.353,.209-.645,.382-.849,.898-.278-.656,.008-1.18,.3-1.714,.131-.24,.263-.481,.345-.737,.179-.557-.134-.884-.51-1.277-.349-.365-.752-.785-.863-1.498Zm10.965,4.414c.7,2.616-3.474,3-5.5,3s-6.2-.484-5.5-3c-.633,.316-1,.961-1,1.5,0,1.519,2.91,2.9,6.5,2.9s6.5-1.381,6.5-2.9c0-.539-.367-1.184-1-1.5Z","ice-cream":"M5.44,8.17a3.473,3.473,0,0,0,2-.63A3.5,3.5,0,0,0,9,8.14h.44L8,13.7a.5.5,0,0,1-.92,0Zm6-3.473a2,2,0,0,1-4,0h0a2,2,0,1,1-2-2h.12a2,2,0,1,1,3.75,0h.13A2,2,0,0,1,11.439,4.7Z",industry:"M14,1v12H1V8.72c0.0016-0.1419,0.0634-0.2764,0.17-0.37l3-3.22c0.2074-0.1823,0.5234-0.1618,0.7056,0.0456 C4.9568,5.268,5.0011,5.387,5,5.51v3l3.16-3.37c0.2025-0.1878,0.5188-0.1759,0.7066,0.0266C8.9532,5.2599,9.0009,5.3827,9,5.51V11h3 V1H14z",information:"M7.5,1 C6.7,1,6,1.7,6,2.5S6.7,4,7.5,4S9,3.3,9,2.5S8.3,1,7.5,1z M4,5v1c0,0,2,0,2,2v2c0,2-2,2-2,2v1h7v-1c0,0-2,0-2-2V6c0-0.5-0.5-1-1-1H4 z","jewelry-store":"M12,8.5c0,2.4853-2.0147,4.5-4.5,4.5S3,10.9853,3,8.5c0-1.8483,1.1164-3.4329,2.7099-4.1255l0.1761,0.137l0.7739,0.6019 C5.1366,5.4922,4,6.8611,4,8.5C4,10.4299,5.5701,12,7.5,12S11,10.4299,11,8.5c0-1.6389-1.1366-3.0078-2.6599-3.3866l0.95-0.7388 C10.8836,5.0672,12,6.6517,12,8.5z M7.5,4.5L10,2.5555L9,1H6L5,2.5555l1.5,1.1667L7.5,4.5z",karaoke:"M12.1,2.952A2.988,2.988,0,0,0,6.99,4.917l3.142,3.142A2.988,2.988,0,0,0,12.1,2.952Zm-7.428,5.3L2.55,10.377a1,1,0,0,0,0,1.414l.707.707a1,1,0,0,0,1.414,0l2.121-2.121L8.914,8.255,6.793,6.134Zm.741,2.087-.707-.707L6.793,7.548l.707.707Z",landmark:"M12.5,12H12v-0.5c0-0.3-0.2-0.5-0.5-0.5H11V6h1l1-2c-1,0.1-2,0.1-3,0C9.2,3.4,8.6,2.8,8,2V1.5C8,1.2,7.8,1,7.5,1 S7,1.2,7,1.5V2C6.4,2.8,5.8,3.4,5,4C4,4.1,3,4.1,2,4l1,2h1v5c0,0-0.5,0-0.5,0C3.2,11,3,11.2,3,11.5V12H2.5C2.2,12,2,12.2,2,12.5V13 h11v-0.5C13,12.2,12.8,12,12.5,12z M7,11H5V6h2V11z M10,11H8V6h2V11z","landmark-JP":"m9.5 4c0 .39556-.1173.78224-.33706 1.11114s-.53212.58524-.89757.73662c-.36545.15137-.76759.19098-1.15555.11381s-.74433-.26765-1.02403-.54736c-.27971-.2797-.47019-.63607-.54736-1.02403s-.03756-.79009.11381-1.15555c.15138-.36545.40772-.67781.73662-.89757s.71558-.33706 1.11114-.33706c.53043 0 1.03914.21071 1.41421.58579.37508.37507.58579.88378.58579 1.41421zm-6 4c-.39556 0-.78224.1173-1.11114.33706s-.58524.53212-.73662.89757c-.15137.36546-.19098.76757-.11381 1.15557.07717.3879.26765.7443.54736 1.024.2797.2797.63607.4702 1.02403.5474.38796.0771.7901.0375 1.15555-.1138.36545-.1514.67781-.4078.89757-.7367s.33706-.7155.33706-1.1111c0-.53043-.21071-1.03914-.58579-1.41421-.37507-.37508-.88378-.58579-1.41421-.58579zm8 0c-.3956 0-.7822.1173-1.1111.33706s-.58528.53212-.73666.89757c-.15137.36546-.19098.76757-.11381 1.15557.07717.3879.26765.7443.54737 1.024.2797.2797.6361.4702 1.024.5474.388.0771.7901.0375 1.1556-.1138.3654-.1514.6778-.4078.8975-.7367.2198-.3289.3371-.7155.3371-1.1111 0-.53043-.2107-1.03914-.5858-1.41421-.3751-.37508-.8838-.58579-1.4142-.58579z",landuse:"m8.911 2.85401c.02782.02324.05021.0523.06558.08512.01538.03283.02337.06863.02342.10488v3.706c0 .0663-.02634.12989-.07322.17678-.04689.04688-.11048.07322-.17678.07322h-2.5c-.0663 0-.12989-.02634-.17678-.07322-.04688-.04689-.07322-.11048-.07322-.17678v-1.75h-1v1.75c0 .0663-.02634.12989-.07322.17678-.04689.04688-.11048.07322-.17678.07322h-2.5c-.0663 0-.12989-.02634-.17678-.07322-.04688-.04689-.07322-.11048-.07322-.17678v-3.7c.00005-.03625.00804-.07205.02342-.10488.01537-.03282.03776-.06188.06558-.08512l3.254-2.728c.04413-.0370337.09989-.0573335.1575-.0573335s.11337.0202998.1575.0573335zm-1.159 5.646c-.04915.00002-.09718.01464-.138.042l-2.614 1.95799h-1v-1.99999c0-.13261-.05268-.25979-.14645-.35355-.09376-.09377-.22094-.14645-.35355-.14645s-.25979.05268-.35355.14645c-.09377.09376-.14645.22094-.14645.35355v1.99999h-1v-1.99999c0-.13261-.05268-.25979-.14645-.35355-.09376-.09377-.22094-.14645-.35355-.14645s-.25979.05268-.35355.14645c-.09377.09376-.14645.22094-.14645.35355v4.24999c0 .0663.02634.1299.07322.1768.04689.0469.11048.0732.17678.0732h6.5c.0663 0 .12989-.0263.17678-.0732.04688-.0469.07322-.1105.07322-.1768v-3.99999c.00026-.03274-.00596-.0652-.0183-.09552-.01235-.03032-.03057-.0579-.05363-.08114-.02305-.02324-.05048-.04168-.0807-.05427s-.06263-.01907-.09537-.01907zm6.248-3.255v6.49999c0 .0671-.0267.1315-.0741.1789-.0474.0475-.1118.0741-.1789.0741h-3.494c-.0668 0-.1308-.0264-.1782-.0734s-.0743-.1108-.0748-.1776v-6.49699c-.00013-.03287.0062-.06544.0188-.09583.0125-.03039.0309-.058.0541-.08124.0233-.02324.0509-.04165.0813-.05417s.0629-.01889.0958-.01876h.75v-.751c0-.06604.0262-.12937.0729-.17607s.1101-.07293.1761-.07293h1.5c.0668.00053.1306.02742.1776.07481.047.04738.0734.11144.0734.17819v.747h.755c.065 0 .1273.02581.1732.07176.046.04595.0718.10826.0718.17324zm-1 4.75499h-2v1h2zm0-1.99999h-2v1h2zm0-2h-2v1h2z",laundry:"M8,1L6,3H3c0,0-1,0-1,1v9c0,1,1,1,1,1h9c0,0,1,0,1-1V2c0-1-1-1-1-1 S8,1,8,1z M8.5,2h2C10.777,2,11,2.223,11,2.5S10.777,3,10.5,3h-2C8.223,3,8,2.777,8,2.5S8.223,2,8.5,2z M7.5,6 c1.6569,0,3,1.3431,3,3s-1.3431,3-3,3s-3-1.3431-3-3S5.8431,6,7.5,6z",library:"M1.0819,9.9388C0.9871,9.867,1.0007,9.7479,1.0007,9.7479L1.5259,3.5c0,0,0.0082-0.0688,0.0388-0.104 C1.584,3.374,1.6084,3.342,1.6544,3.3232C2.1826,3.1072,5.0537,1.5519,6.5,3c0.2397,0.2777,0.4999,0.6876,0.4999,1v5.2879 c0,0,0.0062,0.1122-0.0953,0.1801c-0.0239,0.016-0.124,0.0616-0.242,0.0026c-2.2253-1.1134-4.711,0.1546-5.3381,0.4871 C1.1987,10.0244,1.1006,9.9531,1.0819,9.9388z M13.6754,9.9577c-0.6271-0.3325-3.1128-1.6005-5.3381-0.4871 c-0.118,0.059-0.2181,0.0134-0.242-0.0026C7.9939,9.4001,8.0001,9.2879,8.0001,9.2879V4c0-0.3124,0.2602-0.7223,0.4999-1 c1.4463-1.4481,4.2991,0.1071,4.8273,0.3232c0.046,0.0188,0.0704,0.0508,0.0897,0.0728C13.4476,3.4312,13.4558,3.5,13.4558,3.5 l0.5435,6.2479c0,0,0.0136,0.1191-0.0812,0.1909C13.8994,9.9531,13.8013,10.0244,13.6754,9.9577z M8.8647,12.6863 c0.0352-0.0085,0.0964-0.0443,0.1179-0.0775c0.0236-0.0364,0.0378-0.0617,0.0423-0.1088c0.0495-0.9379,1.6245-1.8119,4.6477-0.0298 c0.0775,0.0441,0.1666,0.0396,0.2425-0.0155C14.0014,12.392,14,12.2859,14,12.2859v-0.5542c0,0,0.0003-0.0764-0.0272-0.1184 c-0.0205-0.0312-0.0476-0.0643-0.0926-0.0858c-2.0254-1.3145-4.5858-1.8972-5.8854-0.1592 c-0.0181,0.0423-0.0353,0.0613-0.0728,0.0905C7.8654,11.5028,7.7964,11.5,7.7964,11.5H7.2109c0,0-0.069,0.0028-0.1256-0.0412 c-0.0375-0.0292-0.0547-0.0482-0.0728-0.0905c-1.2996-1.738-3.86-1.1828-5.8854,0.1317c-0.045,0.0215-0.0721,0.0546-0.0926,0.0858 c-0.0275,0.042-0.0272,0.1184-0.0272,0.1184v0.5542c0,0-0.0014,0.1061,0.0849,0.1688c0.0759,0.0551,0.165,0.0596,0.2425,0.0155 c3.0232-1.7821,4.5982-0.8806,4.6477,0.0573c0.0045,0.0471,0.0187,0.0724,0.0423,0.1088c0.0215,0.0332,0.0827,0.069,0.1179,0.0775 C6.8645,12.8656,7.9112,12.9363,8.8647,12.6863z","lift-gate":"M1 4a2 2 0 1 1 4 0v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4Zm3 0a1 1 0 1 0-2 0 1 1 0 0 0 2 0Zm4.5 2L7 3H6v3h2.5ZM10 6h1.5L10 3H8.5L10 6Zm3.25 0H13l-1.5-3h1.75a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-.75.75Z",lighthouse:"M4.5,6L0,7V6.5l4.5-1V6z M4.5,3.5L0,2.5V3l4.5,1V3.5z M10.5,3.5V4L15,3V2.5L10.5,3.5z M10.5,6L15,7V6.5l-4.5-1V6z M8,7V2 h2.5c0.2761,0.0552,0.5448-0.1239,0.6-0.4c0.0552-0.2761-0.1239-0.5448-0.4-0.6l-3-1C7.5696-0.0586,7.4204-0.0586,7.29,0l-3,1 c-0.2761,0.0552-0.4552,0.3239-0.4,0.6S4.2139,2.0552,4.49,2H7v5H5l-2,7h9l-2-7H8z","lighthouse-JP":"M9.5,7.4c0,1.1-0.9,2-2,2s-2-0.9-2-2s0.9-2,2-2C8.6,5.4,9.5,6.3,9.5,7.4z M14,7.5C14,7.8,13.8,8,13.5,8h-1.6 c-0.1,0.9-0.311,1.582-0.911,2.282l1.064,1.064c0.2,0.2,0.196,0.504-0.004,0.704c-0.209,0.209-0.5,0.207-0.704,0.004L10.3,11 c-0.6,0.5-1.4,0.8-2.3,0.9v1.6C8,13.8,7.8,14,7.5,14S7,13.8,7,13.5v-1.6c-0.9-0.1-1.7-0.4-2.3-0.9l-1.1,1.1 c-0.207,0.207-0.48,0.213-0.696-0.004c-0.2-0.2-0.207-0.5-0.007-0.7L4,10.3C3.5,9.7,3.1,8.9,3,8H1.5C1.2,8,1,7.8,1,7.5S1.2,7,1.5,7 H3c0.1-0.9,0.4-1.7,1-2.4l-1-1C2.8,3.4,2.8,3.1,3,2.9s0.5-0.2,0.7,0l1,1l0,0C5.3,3.4,6.1,3.1,7,3V1.5C7,1.2,7.2,1,7.5,1S8,1.2,8,1.5 V3c0.9,0.1,1.7,0.5,2.3,1l0,0l1.1-1.1c0.2-0.2,0.5-0.2,0.7,0s0.2,0.5,0,0.7L11,4.7l0,0c0.5,0.7,0.8,1.4,0.9,2.3h1.6 C13.8,7,14,7.2,14,7.5z M11.1,7.4c0-2-1.6-3.6-3.6-3.6S3.8,5.5,3.8,7.4S5.4,11,7.4,11S11.1,9.4,11.1,7.4z",lodging:"M0.5,2.5C0.2,2.5,0,2.7,0,3v7.5v2C0,12.8,0.2,13,0.5,13S1,12.8,1,12.5V11h13v1.5 c0,0.3,0.2,0.5,0.5,0.5s0.5-0.2,0.5-0.5v-2c0-0.3-0.2-0.5-0.5-0.5H1V3C1,2.7,0.8,2.5,0.5,2.5z M3.5,3C2.7,3,2,3.7,2,4.5l0,0 C2,5.3,2.7,6,3.5,6l0,0C4.3,6,5,5.3,5,4.5l0,0C5,3.7,4.3,3,3.5,3L3.5,3z M7,4C5.5,4,5.5,5.5,5.5,5.5V7h-3C2.2,7,2,7.2,2,7.5v1 C2,8.8,2.2,9,2.5,9H6h9V6.5C15,4,12.5,4,12.5,4H7z",logging:"M13.91,3.41,13.5,3l.2-.28c.02-.03.04-.05.06-.08A.969.969,0,0,0,14,1.99a1,1,0,0,0-1.62-.77c-.03.02-.06.05-.09.07L12,1.5l-.386-.386a.354.354,0,0,0-.525.475l.417.417-.5.5-.392-.392a.354.354,0,0,0-.525.475L10.5,3l-.5.5-.381-.381a.354.354,0,1,0-.528.472h0l.028.028L9.5,4,9,4.5l-.395-.395a.354.354,0,0,0-.517.483L8.5,5,8,5.5l-.365-.365a.354.354,0,0,0-.556.439h0C7.1,5.6,7.508,6,7.508,6L7,6.5l-.394-.392a.392.392,0,0,0-.5-.028.384.384,0,0,0-.028.5L6.1,6.6l.4.4L6,7.5l-.4-.4a.37.37,0,0,0-.5,0L6.248,8.244,12.09,2.41,12.5,2H13v.5l-.41.41L6.751,8.749,7.9,9.9a.355.355,0,0,0,0-.5l-.008-.009L7.5,9,8,8.5l.384.384a.354.354,0,0,0,.528-.472L8.5,8,9,7.5l.38.38a.354.354,0,0,0,.528-.472l-.02-.02L9.5,7l.5-.5.377.377A.35.35,0,0,0,10.64,7a.347.347,0,0,0,.252-.6L10.5,6l.5-.5.38.38a.354.354,0,0,0,.528-.472L11.88,5.38,11.5,5l.5-.5.381.381a.354.354,0,0,0,.528-.472l-.025-.025L12.5,4l.5-.5.382.382a.354.354,0,0,0,.528-.472ZM4.39,7.916C3.893,7.419,3.641,7,3,7H1.5a.5.5,0,0,0-.5.5v3A2.19,2.19,0,0,0,1.5,12l.815.811A2.251,2.251,0,0,0,5.493,13h0L7.5,11ZM3.5,10,2.262,11.238A1.3,1.3,0,0,1,2,10.5V8H3a.545.545,0,0,1,.335.194.455.455,0,0,1,.165.418Z",marker:"M7.5 1C5.42312 1 3 2.2883 3 5.56759C3 7.79276 6.46156 12.7117 7.5 14C8.42309 12.7117 12 7.90993 12 5.56759C12 2.2883 9.57688 1 7.5 1Z","marker-stroked":"M5.11697 2.81756C5.76952 2.26561 6.65195 2 7.5 2C8.34805 2 9.23048 2.26561 9.88303 2.81756C10.5075 3.34579 11 4.20017 11 5.56759C11 5.94031 10.8461 6.52407 10.5105 7.29145C10.1859 8.03354 9.73523 8.85087 9.24257 9.65811C8.64175 10.6426 7.999 11.5793 7.48195 12.3097C6.96023 11.5798 6.31599 10.6233 5.71947 9.62296C5.2343 8.80934 4.79303 7.98717 4.47608 7.24844C4.14708 6.48162 4 5.91216 4 5.56759C4 4.20017 4.49248 3.34579 5.11697 2.81756ZM8.10767 13.1554C9.45904 11.2632 12 7.54181 12 5.56759C12 2.2883 9.57688 1 7.5 1C5.42312 1 3 2.2883 3 5.56759C3 7.44926 5.47533 11.2572 6.86751 13.1671C7.12165 13.5157 7.3397 13.8011 7.5 14C7.55627 13.9215 7.62241 13.8299 7.697 13.7266C7.81469 13.5636 7.95343 13.3714 8.10767 13.1554Z","mobile-phone":"M10,2h0V1.5a.5.5,0,0,0-1,0V2H5A1,1,0,0,0,4,3V13a1,1,0,0,0,1,1h5a1,1,0,0,0,1-1V3A1,1,0,0,0,10,2ZM6,13H5V12H6Zm0-2H5V10H6ZM6,9H5V8H6Zm2,4H7V12H8Zm0-2H7V10H8ZM8,9H7V8H8Zm2,4H9V12h1Zm0-2H9V10h1Zm0-2H9V8h1Zm0-2.5a.5.5,0,0,1-.5.5h-4A.5.5,0,0,1,5,6.5v-3A.5.5,0,0,1,5.5,3h4a.5.5,0,0,1,.5.5Z",monument:"M7.5,0L6,2.5v7h3v-7L7.5,0z M3,11.5 L3,15h9v-3.5L10.5,10h-6L3,11.5z","monument-JP":"M12,13H4c-0.5,0-1-0.5-1-1V5c0-2,0.8-4,4-4c3.1,0,4,2,4,4v6h1c0.5,0,1,0.5,1,1S12.5,13,12,13z M5,11h4V5c0-1,0-2-2-2 S5,4,5,5V11z",mountain:"m7.5 1c-.3 0-.4.2-.6.4l-5.8 9.5c-.1.1-.1.3-.1.4 0 .5.4.7.7.7h11.6c.4 0 .7-.2.7-.7 0-.2 0-.2-.1-.4l-5.7-9.5c-.2-.2-.4-.4-.7-.4zm0 1.5 3.3 5.5h-.8l-1.5-1.5-1 1.5-1-1.5-1.5 1.5h-.9z",museum:"M7.5,0L1,3.5V4h13V3.5L7.5,0z M2,5v5l-1,1.6V13h13v-1.4L13,10V5H2z M4,6h1v5.5H4V6z M7,6h1v5.5H7V6z M10,6h1 v5.5h-1V6z",music:"m12.5 0c-.0804.0008-.1594.0213999-.23.0599999l-8.77 2.4400001c-.2761 0-.5.2239-.5.5v6.28c-.3029-.1798-.6478-.2763-1-.28-1.1046 0-2 .8954-2 2s.8954 2 2 2 2-.8954 2-2v-4.64l8-2.22v3.64c-.3029-.1798-.6478-.2763-1-.28-1.1046 0-2 .8954-2 2s.8954 2 2 2 2-.8954 2-2v-9c0-.2761-.2239-.5-.5-.5zm-.5 3.14-8 2.22v-2l8-2.22z",natural:"M8.753,6.278a.5.5,0,0,1-.51,0A4.109,4.109,0,0,1,6.5,3.5a2.779,2.779,0,0,0-.59-1.506l-.019-.027a.257.257,0,0,1-.056-.144.237.237,0,0,1,.25-.25.264.264,0,0,1,.057.011A3.523,3.523,0,0,1,7.5,2.5L8.28.94a.246.246,0,0,1,.44,0L9.5,2.5a3.4,3.4,0,0,1,1.339-.907.283.283,0,0,1,.1-.021c.175.009.212.119.221.249a.35.35,0,0,1-.043.141A5.2,5.2,0,0,0,10.5,3.5,4.113,4.113,0,0,1,8.753,6.278ZM5,8H6.289a.25.25,0,0,0,.25-.25.241.241,0,0,0-.061-.15L4.7,5.235a.255.255,0,0,0-.391,0L2.518,7.589a.274.274,0,0,0-.062.161.25.25,0,0,0,.25.25H4L1.335,10.6a.273.273,0,0,0-.058.152A.25.25,0,0,0,1.529,11H3L1.435,12.565a.255.255,0,0,0,.18.435H4v1H5V13H7.385a.255.255,0,0,0,.18-.435L6,11H7.471a.25.25,0,0,0,.25-.25.233.233,0,0,0-.058-.149Zm9.345,3.748a.252.252,0,0,1-.252.252H8.908a.252.252,0,0,1-.226-.365L11.27,6.451a.252.252,0,0,1,.451,0l2.6,5.184h0A.251.251,0,0,1,14.345,11.748ZM12.75,10,11.5,7.5,10.25,10Z","observation-tower":"M12 12.5H11.5L10 9V7C10.9951 7 10.9951 6.25 10.9951 6.25L11.5 3C11.5 3 11.5 2.5 11 2.5H10C10 2.5 10 2 9.5 2H8.5V1.5C8.5 1.5 8.5 0.5 7.5 0.5C6.5 0.5 6.5 1.5 6.5 1.5V2H5.5C5 2 5 2.5 5 2.5H4C3.5 2.5 3.5 3 3.5 3L4.0049 6.25C4.0049 6.25 4.0049 7 5 7V9L3.5 12.5H3C3 12.5 2 12.5 2 13.25C2 14 3 14 3 14H12C12 14 13 14 13 13.25C13 12.5 12 12.5 12 12.5ZM10.25 3.5L10 5H5L4.75 3.4971L10.25 3.5ZM8.5 7V8H6.5V7H8.5ZM6.5006 9.4971H8.4994L9.5 12.5H5.5L6.5006 9.4971Z",optician:"M1.78483 3.81169C2.03375 3.31421 2.54231 3 3.09859 3C3.48821 3 3.86186 3.15477 4.13736 3.43027L4.85354 4.14645C5.0488 4.34171 5.0488 4.65829 4.85354 4.85355C4.65827 5.04882 4.34169 5.04882 4.14643 4.85355L3.43017 4.1373C3.34226 4.04939 3.22303 4 3.09871 4C2.92116 4 2.75884 4.10032 2.67944 4.25912L1.309 7H5.2476C6.0654 7 6.7487 7.5656 6.941 8.3245C7.1146 8.2834 7.3009 8.25 7.5 8.25C7.6991 8.25 7.8854 8.2835 8.059 8.3246C8.2513 7.5656 8.9344 7 9.752 7H13.691L12.3206 4.25912C12.2412 4.10032 12.0788 4 11.9013 4C11.777 4 11.6577 4.04939 11.5698 4.1373L10.8536 4.85355C10.6583 5.04882 10.3417 5.04882 10.1465 4.85355C9.9512 4.65829 9.9512 4.34171 10.1465 4.14645L10.8626 3.43027C11.1381 3.15477 11.5118 3 11.9014 3C12.4577 3 12.9663 3.31421 13.2152 3.81169L14.9414 7.26172L14.9404 7.26308C14.9784 7.33359 15 7.41428 15 7.5V8.5C15 8.7761 14.7761 9 14.5 9H14V9.5C14 11.0889 12.998 12 11.25 12H10.75C9.002 12 8 11.0889 8 9.5V9.3413C7.8499 9.2933 7.6693 9.25 7.5 9.25C7.3307 9.25 7.1503 9.2933 7 9.3413V9.5C7 11.0889 5.9976 12 4.25 12H3.75C2.0024 12 1 11.0889 1 9.5V9H0.4992C0.2235 9 0 8.7765 0 8.5007V7.5C0 7.41428 0.0215731 7.33359 0.0595866 7.26308L0.0585938 7.26172L1.78483 3.81169ZM9.752 8C9.3369 8 9 8.3374 9 8.7524V9.5C9 10.1982 9.1992 11 10.75 11H11.25C12.8008 11 13 10.1982 13 9.5V8.7529C13 8.3379 12.6621 8 12.2471 8H9.752ZM2.7529 8C2.3379 8 2 8.3374 2 8.7524V9.5C2 10.1982 2.1987 11 3.75 11H4.25C5.8013 11 6 10.1982 6 9.5V8.7524C6 8.3374 5.6626 8 5.2475 8H2.7529Z",paint:"m13.5 3.5h-1v-.9973c0-.2777-.2251-.5027-.5027-.5027h-10.4946c-.2776 0-.5027.225-.5027.5027v2.9946c0 .2776.2251.5027.5027.5027h10.4946c.2776 0 .5027-.2251.5027-.5027v-.9973h.5v3.1021l-6.1123 1.4106c-.2271.0527-.3877.2549-.3877.4873v1.5074c-.2783.02-.5.246-.5.5295v2.9261c0 .2966.2404.537.5369.537h.9261c.2966 0 .537-.2404.537-.5369v-2.9261c0-.2834-.2217-.5095-.5-.5295v-1.11l6.1123-1.4102c.2266-.0522.3877-.2544.3877-.4873v-4c0-.2764-.2236-.5-.5-.5z",park:"M14,5.75c0.0113-0.6863-0.3798-1.3159-1-1.61C12.9475,3.4906,12.4014,2.9926,11.75,3 c-0.0988,0.0079-0.1962,0.0281-0.29,0.06c-0.0607-0.66-0.6449-1.1458-1.3048-1.0851C9.8965,1.9987,9.6526,2.1058,9.46,2.28l0,0 c0-0.6904-0.5596-1.25-1.25-1.25S6.96,1.5896,6.96,2.28C6.96,2.28,7,2.3,7,2.33C6.4886,1.8913,5.7184,1.9503,5.2797,2.4618 C5.1316,2.6345,5.0347,2.8451,5,3.07C4.8417,3.0195,4.6761,2.9959,4.51,3C3.6816,2.9931,3.0044,3.659,2.9975,4.4874 C2.9958,4.6872,3.0341,4.8852,3.11,5.07C2.3175,5.2915,1.8546,6.1136,2.0761,6.9061C2.2163,7.4078,2.6083,7.7998,3.11,7.94 c0.2533,0.7829,1.0934,1.2123,1.8763,0.959C5.5216,8.7258,5.9137,8.2659,6,7.71C6.183,7.8691,6.4093,7.9701,6.65,8v5L5,14h5l-1.6-1 v-2c0.7381-0.8915,1.6915-1.5799,2.77-2c0.8012,0.1879,1.603-0.3092,1.7909-1.1103C12.9893,7.7686,13.0025,7.6444,13,7.52 c0.0029-0.0533,0.0029-0.1067,0-0.16C13.6202,7.0659,14.0113,6.4363,14,5.75z M8.4,10.26V6.82C8.6703,7.3007,9.1785,7.5987,9.73,7.6 h0.28c0.0156,0.4391,0.2242,0.849,0.57,1.12C9.7643,9.094,9.0251,9.6162,8.4,10.26z","park-alt1":"M9.428,10.429a.269.269,0,0,1-.074-.18A.25.25,0,0,1,9.6,10h1.447a.25.25,0,0,0,.25-.25.258.258,0,0,0-.079-.179L9.07,7.419a.3.3,0,0,1-.063-.17A.249.249,0,0,1,9.257,7H10.4a.251.251,0,0,0,.25-.251.247.247,0,0,0-.077-.178L8.432,4.434,8.418,4.42a.262.262,0,0,1-.066-.17A.25.25,0,0,1,8.6,4h.866a.25.25,0,0,0,.25-.25.246.246,0,0,0-.068-.164h.006L7.7,1.238a.253.253,0,0,0-.042-.044A.249.249,0,0,0,7.5,1.139h0a.249.249,0,0,0-.158.055.253.253,0,0,0-.042.044L5.352,3.586a.246.246,0,0,0-.068.164.25.25,0,0,0,.25.25H6.4a.241.241,0,0,1,.184.42l-.014.014L4.431,6.571a.247.247,0,0,0-.077.178A.251.251,0,0,0,4.6,7H5.745a.249.249,0,0,1,.25.249.3.3,0,0,1-.063.17L3.782,9.571A.258.258,0,0,0,3.7,9.75a.25.25,0,0,0,.25.25H5.4a.25.25,0,0,1,.248.249.269.269,0,0,1-.074.18l-2.14,2.132-.009.009a.248.248,0,0,0,0,.351A.256.256,0,0,0,3.605,13H7v1l1-.008V13h3.391a.263.263,0,0,0,.26-.254.248.248,0,0,0-.071-.177Z",parking:"M4 2V13H6V9H8.5C10.433 9 12 7.433 12 5.5C12 3.567 10.433 2 8.5 2H4ZM6 7V4H8.5C9.32843 4 10 4.67157 10 5.5C10 6.32843 9.32843 7 8.5 7H6Z","parking-garage":"M10.5,10.14c-0.6637,0.4788-1.4732,0.7121-2.29,0.66h-1.9V14h-1.9V5h3.92 c0.7801-0.0414,1.5484,0.2041,2.16,0.69c0.5779,0.5595,0.875,1.3483,0.81,2.15C11.4042,8.6892,11.1088,9.5388,10.5,10.14z M9,6.9 C8.711,6.6881,8.3579,6.5822,8,6.6H6.31v2.65H8c0.3612,0.0191,0.717-0.0947,1-0.32c0.2559-0.2675,0.3867-0.6308,0.36-1 C9.4072,7.5493,9.274,7.1684,9,6.9z M14.41,4.21c0.114-0.2486,0.007-0.5427-0.24-0.66L7.5,0.45l-6.71,3.1 C0.5387,3.666,0.429,3.9637,0.545,4.215C0.661,4.4663,0.9587,4.576,1.21,4.46l0,0L7.5,1.55l6.29,2.9 c0.2486,0.114,0.5427,0.007,0.66-0.24H14.41z","parking-paid":"M1 13V2h4.5a3.5 3.5 0 0 1 3.21 2.103 3.36 3.36 0 0 0-.504.676c-.23.41-.232.837-.174 1.154l.3 1.625A3.495 3.495 0 0 1 5.5 9H3v4H1Zm4.5-6a1.5 1.5 0 1 0 0-3H3v3h2.5Zm3.516-1.248a.716.716 0 0 1 .062-.484C9.315 4.848 9.978 4 11.5 4c1.521 0 2.185.847 2.421 1.268a.716.716 0 0 1 .064.484L13.019 11H12v2h-1v-2H9.981l-.965-5.248ZM12.75 7 13 5.655C12.83 5.409 12.42 5 11.5 5s-1.33.41-1.5.655L10.25 7h2.5Z",pharmacy:"M9.5,4l1.07-1.54c0.0599,0.0046,0.1201,0.0046,0.18,0c0.6904-0.0004,1.2497-0.5603,1.2494-1.2506 C11.999,0.519,11.4391-0.0404,10.7487-0.04C10.0584-0.0396,9.499,0.5203,9.4994,1.2106c0,0.0131,0.0002,0.0262,0.0006,0.0394 c0,0,0,0.07,0,0.1L7,4H9.5z M12,6V5H3v1l1.5,3.5L3,13v1h9v-1l-1-3.5L12,6z M10,10H8v2H7v-2H5V9h2V7h1v2h2V10z","picnic-site":"M4,3C3.446,3,3,3.446,3,4s0.446,1,1,1h1.2969 L4.6523,7H2.5c-0.554,0-1,0.446-1,1s0.446,1,1,1h1.5098L3.041,12.0098c-0.1284,0.3939,0.0868,0.8173,0.4807,0.9457 s0.8173-0.0868,0.9457-0.4807c0.0005-0.0013,0.0009-0.0027,0.0013-0.004L5.5859,9h3.8281l1.1172,3.4707 c0.1273,0.3943,0.5501,0.6107,0.9443,0.4834s0.6107-0.5501,0.4834-0.9443l0,0L10.9902,9H12.5c0.554,0,1-0.446,1-1s-0.446-1-1-1 h-2.1523L9.7031,5H11c0.554,0,1-0.446,1-1s-0.446-1-1-1H4z M6.873,5H8.127l0.6445,2h-2.543L6.873,5z",pitch:"M5,3C4.4477,3,4,2.5523,4,2s0.4477-1,1-1s1,0.4477,1,1S5.5523,3,5,3z M12.5,10H10L9,7L8,5.25L9,5l2.3,1l0,0 c0.2761,0.1105,0.5895-0.0239,0.7-0.3S11.9761,5.1105,11.7,5l0,0L9,4H7L5,5L4,6H2.5C2.2239,6,2,6.2239,2,6.5S2.2239,7,2.5,7H5l1-1 l1,2l-2,2v3.5C5,13.7761,5.2239,14,5.5,14S6,13.7761,6,13.5v-3.11L8,9l1,2h3.5c0.2761,0,0.5-0.2239,0.5-0.5S12.7761,10,12.5,10z","place-of-worship":"M7.5,0l-2,2v2h4V2 L7.5,0z M5.5,4.5L4,6h7L9.5,4.5H5.5z M2,6.5c-0.5523,0-1,0.4477-1,1V13h2V7.5C3,6.9477,2.5523,6.5,2,6.5z M4,6.5V13h7V6.5H4z M13,6.5c-0.5523,0-1,0.4477-1,1V13h2V7.5C14,6.9477,13.5523,6.5,13,6.5z",playground:"m3.00002 1.15c.2091-.8016 1.0284-1.2819 1.83-1.0729s1.2819 1.0284 1.0729 1.83c-.2003.7681-.9643 1.2471-1.7429 1.0929-.8126-.161-1.3409-.9502-1.18-1.7629.0058-.0292.0125-.0583.02-.0871zm10.99998 11.17c.1032.5426-.2531 1.066-.7956 1.1692-.0015.0003-.0029.0006-.0044.0008-.4252.086-.8574-.1119-1.07-.49l-1.68-3.37-1.44998.29-.22.08h-.06v2.15l.62-.15h.14c.2871.0054.5155.2425.5101.5297-.0039.2064-.1295.391-.3201.4703l-5 1c-.0563.0095-.1137.0095-.17 0-.2872 0-.52-.2328-.52-.52 0-.2099.1262-.3993.32-.48l4.15-.83v-2.17l-3.22.58c-.164.0423-.336.0423-.5 0-.3394-.0867-.6088-.3446-.71-.68h-.02l-1-4.07c-.0312-.1416-.0312-.2884 0-.43.0936-.387.4078-.6815.8-.75l4.7-.52v-4.13h.22v4.1h.06l.22-.02.4-.08h.21c.2673.0643.43258.3323.37.6-.0439.235-.251.4041-.49.4l-.49.08h-.22-.06v2.86h.06l.22-.06 1.80998-.36c.4275-.0352.8299.2062 1 .6l2 3.94c.077.0758.1411.1636.19.26zm-5.49998-7.19-2.5.27.74 2.94 1.76-.34z",police:"M5.5,1L6,2h5l0.5-1H5.5z M6,2.5v1.25c0,0,0,2.75,2.5,2.75S11,3.75,11,3.75V2.5H6z M1.9844,3.9863 C1.4329,3.9949,0.9924,4.4485,1,5v4c-0.0001,0.6398,0.5922,1.1152,1.2168,0.9766L5,9.3574V14l5.8789-6.9297 C10.7391,7.0294,10.5947,7,10.4414,7H6.5L3,7.7539V5C3.0077,4.4362,2.5481,3.9775,1.9844,3.9863z M11.748,7.7109L6.4121,14H12 V8.5586C12,8.2451,11.9061,7.9548,11.748,7.7109z","police-JP":"M7.5,1A6.5,6.5,0,1,0,14,7.5,6.5,6.5,0,0,0,7.5,1Zm2.6,2.84L7.5,6.44,4.9,3.84A4.4428,4.4428,0,0,1,10.1,3.84ZM3.84,4.9007,6.4394,7.5l-2.6,2.5993A4.4429,4.4429,0,0,1,3.84,4.9007ZM4.9,11.16l2.6-2.6,2.6,2.6A4.4428,4.4428,0,0,1,4.9,11.16Zm6.26-1.0606L8.5606,7.5l2.6-2.5993a4.4429,4.4429,0,0,1-.0006,5.1986Z",post:"M13.5 3.65139C13.5 3.86918 13.3912 4.07257 13.2099 4.19338L7.5 8L1.79006 4.19338C1.60885 4.07257 1.5 3.86918 1.5 3.65139C1.5 3.29164 1.79164 3 2.15139 3L12.8486 3C13.2084 3 13.5 3.29164 13.5 3.65139Z M13.5 5.96713V11C13.5 11.5523 13.0523 12 12.5 12H2.5C1.94772 12 1.5 11.5523 1.5 11L1.5 5.96713C1.5 5.76746 1.72254 5.64836 1.88868 5.75912L7.5 9.5L13.1113 5.75912C13.2775 5.64836 13.5 5.76746 13.5 5.96713Z","post-JP":"m1.5 4c0-.26522.10536-.51957.29289-.70711.18754-.18753.44189-.29289.70711-.29289h10c.2652 0 .5196.10536.7071.29289.1875.18754.2929.44189.2929.70711s-.1054.51957-.2929.70711c-.1875.18753-.4419.29289-.7071.29289h-10c-.26513 0-.51941-.10529-.70693-.29272-.18752-.18742-.29294-.44165-.29307-.70678zm11 2.5h-10c-.26522 0-.51957.10536-.70711.29289-.18753.18754-.29289.44189-.29289.70711s.10536.51957.29289.70711c.18754.18753.44189.29289.70711.29289h4v4.5c0 .2652.10536.5196.29289.7071.18754.1875.44189.2929.70711.2929s.51957-.1054.70711-.2929c.18753-.1875.29289-.4419.29289-.7071v-4.5h4c.2652 0 .5196-.10536.7071-.29289.1875-.18754.2929-.44189.2929-.70711s-.1054-.51957-.2929-.70711c-.1875-.18753-.4419-.29289-.7071-.29289z",prison:"M3.5,1v13H12V1H3.5z M9.5,2H11v3.5H9.5V2z M4.5,2.0547H6V7H4.5V2.0547z M7,2.0547h1.5V7H7V2.0547z M10.25,6.5 C10.6642,6.5,11,6.8358,11,7.25S10.6642,8,10.25,8l0,0C9.8358,8,9.5,7.6642,9.5,7.25l0,0C9.5,6.8358,9.8358,6.5,10.25,6.5z M7,8 h1.4727L8.5,13H7.0273L7,8z M4.5,8.166H6V13H4.5V8.166z M9.5,9H11v4H9.5V9z",racetrack:"M4.99321 1.58228C5.03861 1.30989 4.8546 1.05228 4.58222 1.00688C4.30983 0.961484 4.05222 1.14549 4.00682 1.41788L2.00682 13.4179C1.96142 13.6903 2.14543 13.9479 2.41782 13.9933C2.6902 14.0387 2.94782 13.8547 2.99321 13.5823L3.6632 9.56238C4.46947 9.67976 5.3398 9.7187 6.026 10.2C6.45057 10.505 6.94151 10.7047 7.45839 10.7828C8.424 10.9286 9.28807 10.3976 10.242 10.549L11.531 10.743C11.7908 10.7822 12.0609 10.5828 12.1 10.323L12.984 4.38899L12.988 4.38499C13.0241 4.12469 12.8213 3.85686 12.561 3.82099L11.272 3.62699C10.3092 3.48421 9.44342 3.9997 8.48942 3.85618C8.06155 3.79181 7.65443 3.62915 7.3 3.38099C6.56128 2.86385 5.68119 2.77814 4.81426 2.656L4.99321 1.58228ZM4.40351 5.12049L4.73218 3.14849C5.33161 3.22962 5.96556 3.27693 6.521 3.51699L6.22626 5.48223C5.65576 5.24949 5.01279 5.2037 4.40351 5.12049ZM3.74549 9.0686L4.07436 7.09542C4.69451 7.18147 5.35159 7.22405 5.933 7.46299L6.23273 5.48673C6.89067 5.75614 7.3918 6.21952 8.126 6.32799L8.426 4.34799C9.16402 4.45947 9.77459 4.17131 10.484 4.11399L10.184 6.07999C9.47389 6.1406 8.85956 6.44062 8.124 6.32999L7.83802 8.30784C7.10186 8.19874 6.59996 7.73286 5.939 7.46399L5.639 9.43999C5.04421 9.20148 4.3764 9.15882 3.74549 9.0686ZM7.83898 8.30813C8.57282 8.41936 9.19002 8.11708 9.9 8.05799L10.184 6.07999C10.8385 6.01968 11.5087 6.19133 12.152 6.28899L11.872 8.26499C11.2277 8.16793 10.5563 7.99624 9.901 8.05799L9.601 10.034C8.89229 10.0817 8.26589 10.3943 7.539 10.284L7.83898 8.30813Z","racetrack-boat":"m10.0643 11.2159c.4691-.5125.9358-1.0224 1.5938-1.2417.9212-.3071 1.5902.0778 1.8665.2805.7241.531 1.3904-.2204.5914-.8064-.4269-.3131-1.4451-.86577-2.7741-.4228-.7202.2401-1.2127.7667-1.70487 1.2931-.40012.4279-.80009.8556-1.32212 1.1291-.61911.3243-1.06486-.0266-1.06486-.6352v-.0121c.00021-.7982-.40819-1.3004-1.25-1.3004-.49071 0-.99216.2582-1.50001.5-1.17511.5596-2.31799 1.2859-3.31714 2.1134-.210639.1751-.243189.4951-.06696.7066.2505.3006.58076.1621.82938-.0379.41361-.3329 1.78116-1.3913 2.93376-1.94.47652-.227.86169-.3421 1.12097-.3421.24997 0 .24997.1016.24997.3396-.00202 1.3264 1.29025 2.1428 2.52893 1.4939.50415-.2641.89557-.6917 1.28535-1.1176zm-7.56426-2.2159c1.5-1 3.25492-2 5-2 .75 0 .75.375.75.75s0 .75.75.75c2.52746 0 5.36316-3.21377 5.49996-5.5l-2.5 1-2.34195-.97445c-.61176-.20392-.92799.74476-.31623.94868l1.15818.52577-1.49996.5-4-1.25c-.23606-.07869-.38872.02744-.5.25l-1.5 3-2.00004 1zm2.5-7c0-.5523.4477-1 1-1s1 .4477 1 1-.4477 1-1 1-1-.4477-1-1z","racetrack-cycling":"M8 1L11 4H12C14 4 14 1 12 1H8ZM8.463 3C8.34323 3.00901 8.2307 3.06084 8.146 3.146L5.646 5.646C5.59615 5.69579 5.55739 5.75555 5.53225 5.82136C5.50711 5.88718 5.49617 5.95757 5.50014 6.02791C5.5041 6.09825 5.52289 6.16696 5.55526 6.22953C5.58764 6.2921 5.63287 6.34713 5.688 6.391L7.846 8.117L6.57 10.242C6.50157 10.356 6.48125 10.4926 6.51351 10.6216C6.54577 10.7506 6.62796 10.8616 6.742 10.93C6.85604 10.9984 6.9926 11.0187 7.12162 10.9865C7.25065 10.9542 7.36157 10.872 7.43 10.758L8.93 8.258C8.99256 8.15404 9.01519 8.03088 8.99366 7.91148C8.97214 7.79207 8.90793 7.68457 8.813 7.609L7.304 6.402L9 4.707L10.146 5.854C10.1925 5.9004 10.2477 5.93718 10.3085 5.96223C10.3692 5.98728 10.4343 6.00012 10.5 6H13C13.1326 6 13.2598 5.94732 13.3536 5.85355C13.4473 5.75979 13.5 5.63261 13.5 5.5C13.5 5.36739 13.4473 5.24021 13.3536 5.14645C13.2598 5.05268 13.1326 5 13 5H10.707L8.854 3.146C8.80319 3.09493 8.74195 3.05545 8.67446 3.03025C8.60698 3.00505 8.53484 2.99473 8.463 3ZM2.949 7C2.16222 7.01338 1.4122 7.33534 0.860573 7.89651C0.308947 8.45767 -0.000113683 9.21311 3.13683e-08 10C3.13683e-08 10.7956 0.316071 11.5587 0.87868 12.1213C1.44129 12.6839 2.20435 13 3 13C3.79565 13 4.55871 12.6839 5.12132 12.1213C5.68393 11.5587 6 10.7956 6 10C6.00006 9.60179 5.92083 9.20756 5.76695 8.84028C5.61307 8.47301 5.38761 8.14004 5.10372 7.8608C4.81982 7.58157 4.48318 7.36164 4.11341 7.21385C3.74364 7.06606 3.34815 6.99336 2.95 7H2.949ZM11.949 7C11.1622 7.01338 10.4122 7.33534 9.86057 7.89651C9.30895 8.45767 8.99989 9.21311 9 10C9 10.7956 9.31607 11.5587 9.87868 12.1213C10.4413 12.6839 11.2044 13 12 13C12.7956 13 13.5587 12.6839 14.1213 12.1213C14.6839 11.5587 15 10.7956 15 10C15.0001 9.60179 14.9208 9.20756 14.767 8.84028C14.6131 8.47301 14.3876 8.14004 14.1037 7.8608C13.8198 7.58157 13.4832 7.36164 13.1134 7.21385C12.7436 7.06606 12.3482 6.99336 11.95 7H11.949ZM12.049 8C12.5709 8.01279 13.0671 8.22914 13.4316 8.60283C13.7962 8.97653 14.0002 9.47795 14 10C14 10.5304 13.7893 11.0391 13.4142 11.4142C13.0391 11.7893 12.5304 12 12 12C11.4696 12 10.9609 11.7893 10.5858 11.4142C10.2107 11.0391 10 10.5304 10 10C9.99992 9.73318 10.0532 9.46904 10.1568 9.22314C10.2603 8.97724 10.4121 8.75455 10.603 8.56818C10.7939 8.3818 11.0202 8.23552 11.2686 8.13794C11.5169 8.04036 11.7823 7.99346 12.049 8V8Z","racetrack-horse":"M10 1C9.73478 1 9.48043 1.10536 9.29289 1.29289C9.10536 1.48043 9 1.73478 9 2C9 2.26522 9.10536 2.51957 9.29289 2.70711C9.48043 2.89464 9.73478 3 10 3C10.2652 3 10.5196 2.89464 10.7071 2.70711C10.8946 2.51957 11 2.26522 11 2C11 1.73478 10.8946 1.48043 10.7071 1.29289C10.5196 1.10536 10.2652 1 10 1ZM5.5 3C5.25 3 4.5 3 5 3.75L6.25 6H4.5C4.223 6.003 3.983 6.1 3.75 6.25C2.944 5.121 2.242 5.552 1.51 6C1.107 6.247 0.694 6.499 0.25 6.5C0.184332 6.50201 0.121902 6.52899 0.0754461 6.57545C0.0289898 6.6219 0.00200653 6.68433 0 6.75C0.00200653 6.81567 0.0289898 6.8781 0.0754461 6.92455C0.121902 6.97101 0.184332 6.99799 0.25 7C0.626 7.02 1.057 6.907 1.488 6.793C2.144 6.62 2.798 6.448 3.254 6.75C3.16 6.937 3 7.5 3 8L2.998 9.51C2.792 9.714 2.619 9.633 2.443 9.55C2.303 9.485 2.16 9.42 2 9.5L1 12.45C1 12.7 1.393 12.752 1.5 12.5L2.25 10.744C2.998 10.744 4.5 10 5 9L9 10L11.5 12.5C11.697 12.697 12.12 12.362 11.96 12.115L10 9L12 6.5C12.248 7 12.495 7 12.986 7H13L13.6 7.75C13.988 8.235 14.82 7.743 14.5 7.25L12.834 4.79L13 4.5C13.062 4.313 12.637 3.924 12.5 4L10.5 5.5L8.89 3.187C8.84314 3.12862 8.78377 3.08151 8.71627 3.04915C8.64877 3.01678 8.57486 2.99999 8.5 3H5.5ZM9 5.25L9.5 6L6.777 7.916C6.72243 7.95469 6.66065 7.98204 6.59532 7.99643C6.52999 8.01081 6.46244 8.01194 6.39666 7.99975C6.33089 7.98756 6.26823 7.96229 6.2124 7.92545C6.15656 7.8886 6.10869 7.84093 6.07162 7.78525C6.03454 7.72957 6.00901 7.66701 5.99655 7.60129C5.98409 7.53556 5.98494 7.46801 5.99905 7.40262C6.01317 7.33723 6.04026 7.27534 6.07873 7.22061C6.1172 7.16588 6.16626 7.11943 6.223 7.084L9 5.25Z",rail:"M 3 1 C 2.4477 1 2 1.4477 2 2 L 2 10 C 2 10.5523 2.4477 11 3 11 L 12 11 C 12.5523 11 13 10.5523 13 10 L 13 2 C 13 1.4477 12.5523 1 12 1 L 3 1 z M 5.75 1.5 L 5.7597656 1.5 L 9.2597656 1.5 C 9.3978656 1.5 9.5097656 1.6119 9.5097656 1.75 C 9.5097656 1.8881 9.3978656 2 9.2597656 2 L 5.75 2 C 5.6119 2 5.5 1.8881 5.5 1.75 C 5.5 1.6119 5.6119 1.5 5.75 1.5 z M 3.5 3 L 7 3 L 7 7 L 3.5 7 C 3.2239 7 3 6.7761 3 6.5 L 3 3.5 C 3 3.2239 3.2239 3 3.5 3 z M 8 3 L 11.5 3 C 11.7761 3 12 3.2239 12 3.5 L 12 6.5 C 12 6.7761 11.7761 7 11.5 7 L 8 7 L 8 3 z M 5 8 C 5.5523 8 6 8.4477 6 9 C 6 9.5523 5.5523 10 5 10 C 4.4477 10 4 9.5523 4 9 C 4 8.4477 4.4477 8 5 8 z M 10 8 C 10.5523 8 11 8.4477 11 9 C 11 9.5523 10.5523 10 10 10 C 9.4477 10 9 9.5523 9 9 C 9 8.4477 9.4477 8 10 8 z M 10.445312 11.994141 C 10.380597 11.999652 10.314981 12.018581 10.253906 12.050781 C 10.030606 12.168381 9.9302313 12.433922 10.019531 12.669922 L 10.189453 13 L 4.8105469 13 L 4.9394531 12.730469 C 5.0371531 12.472169 4.9067375 12.183637 4.6484375 12.085938 C 4.4124375 11.996738 4.1468969 12.097113 4.0292969 12.320312 L 3.0292969 14.320312 C 3.0080969 14.377912 2.9986 14.4387 3 14.5 C 3 14.7761 3.2239 15 3.5 15 C 3.6802 14.999 3.8450875 14.899434 3.9296875 14.740234 L 3.9296875 14.689453 L 4 14.689453 L 4.3105469 14 L 10.689453 14 L 11 14.689453 L 11 14.740234 C 11.0846 14.899434 11.249488 14.999 11.429688 15 C 11.705787 15 11.929688 14.7761 11.929688 14.5 C 11.949587 14.4212 11.949587 14.338566 11.929688 14.259766 L 10.929688 12.259766 C 10.833163 12.076541 10.639459 11.977608 10.445312 11.994141 z","rail-light":"M5.5,0C5,0,5,0.5,5,0.5v1C5,1.777,5.223,2,5.5,2S6,1.777,6,1.5V1h1v2H6c0,0-2,0-2,2v3c0,3,3,3,3,3h1 c0,0,3,0,3-3V5c0-2-2-2-2-2H8V1h1v0.5C9,1.777,9.223,2,9.5,2S10,1.777,10,1.5v-1C10,0,9.5,0,9.5,0H5.5z M7.5,4l2.0449,0.7734L10,6.5 C10.1316,7,9.5,7,9.5,7h-4c0,0-0.6316,0-0.5-0.5l0.4551-1.7266L7.5,4z M7.5,8C7.7761,8,8,8.2239,8,8.5S7.7761,9,7.5,9 S7,8.7761,7,8.5S7.2239,8,7.5,8z M4.125,12L3,15h1.5l0.375-1h5.25l0.375,1H12l-1.125-3h-1.5l0.375,1h-4.5l0.375-1H4.125z","rail-metro":"M5.5,0c0,0-0.75,0-1,1L3,6.5V10c0,1,1,1,1,1h7c0,0,1,0,1-1V6.5L10.5,1c-0.2727-1-1-1-1-1H5.5z M6.5,1.5h2 c0,0,0.5357,0,0.75,1L10,6c0.2146,1.0017-1,1-1,1H6c0,0-1.2146,0.0017-1-1l0.75-3.5C5.9643,1.5,6.5,1.5,6.5,1.5z M5,8 c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1S4,9.5523,4,9S4.4477,8,5,8z M6.75,8h1.5C8.3885,8,8.5,8.1115,8.5,8.25S8.3885,8.5,8.25,8.5 h-1.5C6.6115,8.5,6.5,8.3885,6.5,8.25S6.6115,8,6.75,8z M10,8c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1S9,9.5523,9,9S9.4477,8,10,8z M4.125,12L3,15h1.5l0.375-1h5.25l0.375,1H12l-1.125-3h-1.5l0.375,1h-4.5l0.375-1H4.125z","ranger-station":"M9,0.5l-2,1v3.7734L2,8v6h4v-4h3 v4h4V8L8,5.2734V4l1-0.5l2,1l2-1v-3l-2,1L9,0.5z",recycling:"M2.4556,8.6134C2.118,9.2112,1.501,10.3021,2.593,11.0312c0.3432,0.2268,0.7275,0.3836,1.131,0.4614 C4.0314,11.5382,4.0466,12.0111,3.6855,12c-0.3849-0.0193-2.2596-0.1934-2.5606-1.5995c-0.1556-0.8213,0.0204-1.5571,0.504-2.3556 L2.3263,6.812L1.0196,6.0688L4.5,4v4L3.1941,7.3057L2.4556,8.6134z M6.7,2.034c1.155-0.628,1.823,0.43,2.191,1.007l0.8059,1.2631 L8.431,5.112L12,6.986L11.803,2.96l-1.2639,0.8066L9.779,2.578C9.2572,1.8321,8.875,1.2812,7.944,1.033 C6.307,0.7203,5.3007,2.6194,5.311,2.607c-0.1639,0.2871,0.2156,0.5399,0.451,0.21C6.0202,2.4969,6.339,2.2309,6.7,2.034z M13.294,8.221c-0.0877-0.1897-0.5487-0.1413-0.419,0.267c0.1312,0.3892,0.1845,0.8003,0.157,1.21C12.939,11.01,11.684,11,11,11H9.5 V9.5l-3.5,2l3.488,2.025L9.4926,12H11c0.8906,0.0153,1.5999-0.1759,2.2-0.713C14.4,10.226,13.294,8.221,13.294,8.221z","religious-buddhist":"M13.4978,6.9989h-0.5329c-0.09997-1.10708-0.53528-2.15731-1.2478-3.0105l0.378-0.3784 c0.19605-0.19447,0.19733-0.51105,0.00286-0.7071C11.90698,2.71037,11.59733,2.70518,11.4,2.8912l0,0l-0.0123,0.0123L11.01,3.2815 c-0.85331-0.71298-1.90385-1.14864-3.0113-1.2488V1.5c0-0.27614-0.22386-0.5-0.5-0.5s-0.5,0.22386-0.5,0.5v0.5327 C5.8916,2.13306,4.84144,2.56871,3.9884,3.2815L3.61,2.9C3.41007,2.70952,3.09358,2.71717,2.9031,2.9171 c-0.184,0.19312-0.184,0.49668,0,0.6898l0.3784,0.3775C2.56787,4.83856,2.13216,5.89031,2.0327,6.9989H1.5 c-0.27614,0-0.5,0.22386-0.5,0.5s0.22386,0.5,0.5,0.5h0.5327c0.09987,1.10695,0.535,2.15711,1.2473,3.0103l-0.3779,0.3779 c-0.19538,0.19514-0.19557,0.51173-0.00043,0.70711c0.19053,0.19076,0.49798,0.19611,0.69503,0.01209L3.609,12.094l0.3779-0.3779 c0.8533,0.71312,1.90395,1.1488,3.0115,1.2488v0.5329c0,0.27614,0.22386,0.5,0.5,0.5s0.5-0.22386,0.5-0.5v-0.5329 c1.10719-0.10026,2.15744-0.53592,3.0105-1.2488l0.3779,0.3779c0.19514,0.19538,0.51173,0.19557,0.70711,0.00043 c0.19076-0.19053,0.19611-0.49798,0.01209-0.69503l-0.0123-0.0123l0,0l-0.3779-0.3779c0.71283-0.8531,1.14848-1.90333,1.2488-3.0105 h0.5329c0.27609-0.00544,0.49549-0.23366,0.49006-0.50975C13.98227,7.22064,13.76611,7.00435,13.4978,6.9989z M7.9987,3.0505 c0.83871,0.09248,1.63383,0.42154,2.2926,0.9488l-2.15,2.15c-0.04663-0.0218-0.09436-0.04116-0.143-0.058V3.0505H7.9987z M6.9987,3.0505V6.091c-0.04864,0.01684-0.09637,0.0362-0.143,0.058l-2.15-2.15c0.65897-0.52726,1.45431-0.85622,2.2932-0.9485 H6.9987z M3.9987,4.7062l2.15,2.15c-0.0218,0.04663-0.04116,0.09436-0.058,0.143H3.0505 c0.09243-0.83886,0.42154-1.63413,0.9489-2.293L3.9987,4.7062z M3.0505,7.9987H6.091c0.01687,0.04863,0.03623,0.09636,0.058,0.143 l-2.15,2.15C3.47173,9.63281,3.14276,8.83753,3.0505,7.9987z M6.9989,11.9471c-0.83871-0.09248-1.63383-0.42154-2.2926-0.9488 l2.15-2.15c0.04663,0.0218,0.09436,0.04116,0.143,0.058v3.0405L6.9989,11.9471z M7.9989,11.9471V8.9066 c0.04864-0.01683,0.09638-0.03619,0.143-0.058l2.15,2.15c-0.65895,0.5273-1.4543,0.85627-2.2932,0.9485H7.9989z M10.9989,10.2914 l-2.15-2.15c0.02177-0.04664,0.04113-0.09437,0.058-0.143h3.0415c-0.09276,0.83901-0.42232,1.6343-0.9502,2.293H10.9989z M8.9066,6.9989c-0.01684-0.04864-0.0362-0.09637-0.058-0.143l2.15-2.15c0.52726,0.65877,0.85632,1.45389,0.9488,2.2926H8.9066 V6.9989z","religious-christian":"M6,0.9552V4H3v3h3v8h3V7h3V4H9V1 c0-1-0.9776-1-0.9776-1H6.9887C6.9887,0,6,0,6,0.9552z","religious-jewish":"M7.50049 0.5L5.49949 4H1L3.49949 7.5L1 11H5.49949L7.50049 14.5L9.50049 11H14L11.5005 7.5L14 4H9.50049L7.50049 0.5Z","religious-muslim":"M12.0962 12.0962C9.55779 14.6346 5.44221 14.6346 2.90381 12.0962C0.365398 9.55779 0.365398 5.44221 2.90381 2.90381C5.44221 0.365398 9.55779 0.365398 12.0962 2.90381C12.2675 3.07512 12.4273 3.25362 12.5754 3.43832C10.5566 1.86336 7.63341 2.00437 5.77643 3.86135C3.76685 5.87092 3.76685 9.12908 5.77643 11.1387C7.63341 12.9956 10.5566 13.1366 12.5754 11.5617C12.4273 11.7464 12.2675 11.9249 12.0962 12.0962Z M10.1 6.5H8L9.7 8L9 10.5L11 9L13 10.5L12.3 8L14 6.5H11.9L11 4.5L10.1 6.5Z","religious-shinto":"M12.5,2.5H2.5a.9448.9448,0,0,0-1,1,.9448.9448,0,0,0,1,1H3V12a.9448.9448,0,0,0,1,1,.9448.9448,0,0,0,1-1V8h5v4a.9448.9448,0,0,0,1,1,.9448.9448,0,0,0,1-1V4.5h.5a.9448.9448,0,0,0,1-1,.9448.9448,0,0,0-1-1ZM10,6H8V4.5h2ZM7,6H5V4.5H7Z","residential-community":"m11.8 12.5v-2.5c.7-.1 1.2-.7 1.2-1.5s-.7-1.5-1.5-1.5-1.5.7-1.5 1.5c0 .7.5 1.4 1.2 1.5v2.5h-4.2v-11.5h-5v11.5h-1v.5h13v-.5zm-5.8-2.5h-3v-1h3zm0-2h-3v-1h3zm0-2h-3v-1h3zm0-2h-3v-1h3z",restaurant:"M3.5,0l-1,5.5c-0.1464,0.805,1.7815,1.181,1.75,2L4,14c-0.0384,0.9993,1,1,1,1s1.0384-0.0007,1-1L5.75,7.5 c-0.0314-0.8176,1.7334-1.1808,1.75-2L6.5,0H6l0.25,4L5.5,4.5L5.25,0h-0.5L4.5,4.5L3.75,4L4,0H3.5z M12,0 c-0.7364,0-1.9642,0.6549-2.4551,1.6367C9.1358,2.3731,9,4.0182,9,5v2.5c0,0.8182,1.0909,1,1.5,1L10,14c-0.0905,0.9959,1,1,1,1 s1,0,1-1V0z","restaurant-bbq":"M12.0166,12.5H14.5L12,15V12.5165a1.6189,1.6189,0,0,1-1.1367.4806,1.6,1.6,0,0,1-.9931-.3448A6.7838,6.7838,0,0,1,9.8783,2.3418,1.6179,1.6179,0,0,1,12,2.462V0l2.5,2.5H12.036a1.5927,1.5927,0,0,1,.1225.1289,1.6239,1.6239,0,0,1-.2871,2.2793A3.5148,3.5148,0,0,0,10.75,7.4951a3.5578,3.5578,0,0,0,1.1465,2.6162,1.6352,1.6352,0,0,1,.2325,2.2783C12.0949,12.4315,12.0535,12.4624,12.0166,12.5ZM2.504,0l-1,5.5c-.1464.805,1.7815,1.181,1.75,2L3.004,14a.9625.9625,0,0,0,1,1,.9625.9625,0,0,0,1-1l-.25-6.5c-.0314-.8176,1.7334-1.1808,1.75-2l-1-5.5h-.5l.25,4-.75.5L4.254,0h-.5l-.25,4.5L2.754,4l.25-4Z","restaurant-noodle":"M4.457,11.9892,1,8V7H14V8l-3.4961,3.9891ZM3.9882,2.5a.5.5,0,0,0-1,0v.5671l-1.7969.3675a.25.25,0,1,0,.094.4911l1.7029-.2776v.5662l-1.75.0357a.25.25,0,0,0,0,.5l1.75.0357V5.998h1Zm9.5,1.5-7.5.2625V2.9951l7.594-1.0737a.5.5,0,0,0-.1881-.9822L5.9792,2.4555a.4963.4963,0,0,0-.991.0445v.2276l-.493.1009V3.18l.493-.08V4.2974l-.493.01v.4608L13.4882,5a.5.5,0,0,0,0-1ZM10,13H5v.5757h5Z","restaurant-pizza":"M1.393 7.931.025 7.315A14.05 14.05 0 0 1 7.764-.001l.027.07.511 1.331-.003.001a12.613 12.613 0 0 0-6.906 6.53Zm10.963 4.96L2.42 8.414a11.604 11.604 0 0 1 6.354-6.009l.003-.001.817 2.122c-.028-.002-.052-.016-.081-.016a1.062 1.062 0 1 0 .764 1.793l2.413 6.273a.249.249 0 0 1-.334.316ZM7.426 7.52a.925.925 0 1 0-1.849 0 .925.925 0 0 0 1.849 0Zm3.017 2.03a.925.925 0 1 0-.07.353.924.924 0 0 0 .07-.354Z","restaurant-seafood":"M11.433,10.0889h2.49v.75H11.8525A4.81,4.81,0,0,1,13.4751,13.14l-.71.2422a4.01,4.01,0,0,0-1.74-2.1971,1.7775,1.7775,0,0,1-1.0352.4538L8.4374,12.9852H6.5188L4.9839,11.623a2.0222,2.0222,0,0,1-1.0929-.44,4.0093,4.0093,0,0,0-1.7426,2.1988l-.71-.2422a4.8146,4.8146,0,0,1,1.622-2.3007H.99v-.75H3.4839l.8633-.6764L3.3329,7.7567a2.2738,2.2738,0,0,1-.269.0293,2.0192,2.0192,0,0,1-2.0532-2.08c0-2.08,1.979-4.16,1.979-4.16L2.2531,5.9931l1.7255-.0012L4.9913,2.9852l0,2.9956a2.0936,2.0936,0,0,1-.6993,1.4121l.8536,1.3936L5.23,8.7208a3.8669,3.8669,0,0,1,4.4784,0l.0605.0474.869-1.4152a2.1177,2.1177,0,0,1-.6433-1.3722l0-2.9956.9836,3.0067,1.7547.0012-.7367-4.4466s1.982,2.08,1.982,4.16a2.0211,2.0211,0,0,1-2.0562,2.08,2.3125,2.3125,0,0,1-.3441-.0376L10.5676,9.3945l.8407.6593C11.4212,10.0638,11.4218,10.0782,11.433,10.0889Z","restaurant-sushi":"M5.5,3C5.2239,3,5,3.2239,5,3.5H2.75C1.2265,3.5,0,4.7265,0,6.25c0,0.8274,0.3687,1.5592,0.9434,2.0625 C0.3803,8.6675,0,9.2893,0,10c0,1.0994,0.9006,2,2,2h3.5h2H10c1.0994,0,2-0.9006,2-2c0-0.4883-0.1863-0.9294-0.4805-1.2773 l2.1777,0.9629c0.3716,0.1831,0.8213,0.0303,1.0044-0.3413c0.1831-0.3716,0.0303-0.8213-0.3413-1.0044 c-0.0188-0.0093-0.038-0.0178-0.0576-0.0254l-1.8105-0.8027l1.6309-0.2715c0.4099-0.0599,0.6936-0.4408,0.6337-0.8507 c-0.0544-0.3724-0.3765-0.6469-0.7528-0.6415c-0.0426,0.0003-0.085,0.0042-0.127,0.0117l-2.1309,0.3555 C11.2595,4.9521,10.0387,3.7837,8,3.5488V3.5C8,3.2239,7.7761,3,7.5,3H5.5z M6,4h1v5v2H6V9V4z M9.5,8 c0.259,0,0.4638,0.1974,0.4902,0.4492l0.0762-0.1328c0.1385-0.2399,0.4437-0.3201,0.6836-0.1816s0.3201,0.4418,0.1816,0.6816 l-0.2578,0.4473C10.8727,9.445,11,9.7021,11,10c0,0.5626-0.4374,1-1,1H8V9h1V8.5C9,8.223,9.223,8,9.5,8z M2.4395,8.0703 c0.1934-0.0242,0.3903,0.0662,0.4941,0.2461l0.2012,0.3477C3.226,8.5647,3.3538,8.5,3.5,8.5C3.777,8.5,4,8.723,4,9h1v2H2 c-0.5626,0-1-0.4374-1-1s0.4374-1,1-1h0.1738L2.0684,8.8164C1.9299,8.5765,2.0101,8.2733,2.25,8.1348 C2.31,8.1001,2.375,8.0784,2.4395,8.0703z","road-accident":"M12.6,8.7,11.5,6.5a1.05,1.05,0,0,0-.9-.5H4.4a1.05,1.05,0,0,0-.9.5L2.4,8.7,1.16,9.852a.5.5,0,0,0-.16.366V14.5a.5.5,0,0,0,.5.5h2c.2,0,.5-.2.5-.4V14h7v.5c0,.2.2.5.4.5h2.1a.5.5,0,0,0,.5-.5V10.218a.5.5,0,0,0-.16-.366ZM4.5,7h6l1,2h-8ZM5,11.6c0,.2-.3.4-.5.4H2.4c-.2,0-.4-.3-.4-.5V10.4c.1-.3.3-.5.6-.4l2,.4c.2,0,.4.3.4.5Zm8-.1c0,.2-.2.5-.4.5H10.5c-.2,0-.5-.2-.5-.4v-.7c0-.2.2-.5.4-.5l2-.4c.3-.1.5.1.6.4ZM8,4H7L6,0H9ZM1.1,1.8,3.7.3l1.1,4L4,4.7ZM11.3.3l2.6,1.5L11,4.8l-.9-.5Z",roadblock:"M7.5 14C11.0899 14 14 11.0899 14 7.5C14 3.91015 11.0899 1 7.5 1C3.91015 1 1 3.91015 1 7.5C1 11.0899 3.91015 14 7.5 14ZM12 6V9H3V6H12Z",rocket:"m11.5547 2c-2.14407 0-5.02107 1.471-6.95307 4h-1.6016c-1.1573 0-1.8206.8638-2.277302 1.7773l-.6114 1.2227h1.443402 1.4453l1.5 1.5 1.5 1.5v1.4453 1.4434l1.2227-.6113c.9135-.4568 1.7773-1.1201 1.7773-2.2774v-1.6016c2.52897-1.932 3.99997-4.809 3.99997-6.9531v-1.4453zm-2.55467 3c.5523 0 .99997.4477.99997 1s-.44767 1-.99997 1-1-.4477-1-1 .4477-1 1-1zm-6.5 6-.5.5c-.7222.7222-1 2.5-1 2.5s1.698-.198 2.5-1l.5-.5z",school:"M5.542 3.647 3.106 3l.443-1.63a.505.505 0 0 1 .618-.352l1.46.392a.5.5 0 0 1 .355.613l-.44 1.624Zm-4.52 7.356a.496.496 0 0 1-.005-.276l1.819-6.726 2.435.647-1.819 6.726a.499.499 0 0 1-.143.237l-1.457 1.347a.152.152 0 0 1-.247-.066l-.583-1.889ZM10 5c-2.25 0-3-.75-3-3 2.25 0 3 .75 3 3Zm-1.4 7.984c-1.37.21-3.126-1.706-3.52-3.8L5.969 5.9c.399-.35.903-.533 1.419-.533a2.71 2.71 0 0 1 1.564.489.964.964 0 0 0 1.089-.01 2.438 2.438 0 0 1 1.46-.479c.77 0 1.643.489 2.05 1.201 1.536 2.696-1.194 6.709-3.144 6.417a.867.867 0 0 1-.255-.093 1.427 1.427 0 0 0-1.302 0 .866.866 0 0 1-.25.092Z","school-JP":"M12.5,2.9992h-4v-1a1,1,0,0,0-2,0v1h-4a1,1,0,0,0,0,2h.67A10.8169,10.8169,0,0,0,5.15,8.8105c.3331.4313.6594.8248.9785,1.1936a14.3825,14.3825,0,0,1-2.6074,2.117,1,1,0,1,0,.955,1.7581h0A15.65,15.65,0,0,0,7.5,11.4613a15.65,15.65,0,0,0,3.0239,2.4179,1,1,0,1,0,.9551-1.7578,14.3789,14.3789,0,0,1-2.6073-2.1171c.3191-.3688.6453-.7622.9784-1.1935a10.818,10.818,0,0,0,1.98-3.8116h.67a1,1,0,0,0,0-2ZM8.2671,7.5879c-.2614.3385-.5154.6413-.767.937-.2517-.2957-.5057-.5985-.7672-.937A9.5885,9.5885,0,0,1,5.2676,4.9992H9.7319A9.5789,9.5789,0,0,1,8.2671,7.5879Z",scooter:"M4.908,12a1.5,1.5,0,1,1-2.816,0Zm8.65-6C13.539,6,13,6,13,6V3h.351a.282.282,0,0,0,.223-.148l.268-.536a.334.334,0,0,0,.009-.066A.25.25,0,0,0,13.6,2H13V1.7a.215.215,0,0,0-.2-.2H9.25a.25.25,0,0,0,0,.5H12V6.6L7.6,10H6V7.5A.5.5,0,0,0,5.5,7H5V5H6.75a.25.25,0,0,0,0-.5L2.266,4.034c-.006,0-.01-.007-.016-.007a.25.25,0,0,0-.25.25V4.75A.25.25,0,0,0,2.25,5H3V7H2.5A1.538,1.538,0,0,0,1,8.5v2a.472.472,0,0,0,.442.5C1.461,11,7.5,11,7.5,11L10,10h3.5a.472.472,0,0,0,.5-.442C14,9.539,14,6.5,14,6.5A.472.472,0,0,0,13.558,6ZM12.5,11A1.5,1.5,0,1,0,14,12.5,1.538,1.538,0,0,0,12.5,11Z",shelter:"M13 2L1 6V8L2 7.66667V13H12V11H4V7L13 4V2Z",shoe:"M9.5,7a9.97,9.97,0,0,1-1.315-.948L6.01,3.221a.558.558,0,0,0-1,.279H5V5H3.209a.5.5,0,0,1-.357-.148S2.5,4,2,4H1.5a.5.5,0,0,0-.5.5V9H6.5c1.5,0,2,1,3.5,1h4V9.5C14,8,10.547,7.594,9.5,7Zm0,4a3.131,3.131,0,0,1-1.526-.447A4.1,4.1,0,0,0,6,10H1v1.5a.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5V11a3.134,3.134,0,0,1,1.526.447A4.1,4.1,0,0,0,9.5,12h4a.5.5,0,0,0,.5-.5V11Z",shop:"m13.33 5h-1.83l-.39-2.33c-.1601-.7182-.7017-1.2905-1.41-1.49-.3493-.1124-.7131-.173-1.08-.18h-2.24c-.3669.007-.7307.0676-1.08.18-.7083.1995-1.2499.7718-1.41 1.49l-.39 2.33h-1.83c-.2761-.0017-.5013.2208-.503.497-.0003.0519.0074.1035.023.153l1.88 6.3c.1964.6246.7753 1.0496 1.43 1.05h6c.651-.0047 1.2247-.4289 1.42-1.05l1.88-6.3c.0829-.2634-.0635-.5441-.3269-.627-.0463-.0146-.0945-.0223-.1431-.023zm-8.81 0 .36-2.17c.0807-.3625.3736-.6395.74-.7.2463-.0776.5019-.1213.76-.13h2.24c.2614.0078.5205.0515.77.13.3664.0605.6593.3375.74.7l.35 2.17h-6z",skateboard:"M1.25 5.25V5H2.75V5.25C2.75 5.94036 3.30964 6.5 4 6.5H11C11.6904 6.5 12.25 5.94036 12.25 5.25V5H13.75V5.25C13.75 6.76878 12.5188 8 11 8H4C2.48122 8 1.25 6.76878 1.25 5.25ZM5 10C5 10.5523 4.55228 11 4 11 3.44772 11 3 10.5523 3 10 3 9.44772 3.44772 9 4 9 4.55228 9 5 9.44772 5 10ZM12 10C12 10.5523 11.5523 11 11 11 10.4477 11 10 10.5523 10 10 10 9.44772 10.4477 9 11 9 11.5523 9 12 9.44772 12 10Z",skiing:"M15,4.5C15,5.3284,14.3284,6,13.5,6S12,5.3284,12,4.5S12.6716,3,13.5,3S15,3.6716,15,4.5z M13.72,11.89 c-0.0623-0.1197-0.2083-0.1684-0.33-0.11c-0.6846,0.4194-1.5208,0.5111-2.28,0.25L4.78,8.86L7.5,7.5v-3L9,5.25v3L10.5,9L12,8.25 L10.5,7.5V3l-3-1.5L6,2.25v4.5L3.28,8.11L0.61,6.78C0.4857,6.7192,0.3358,6.7707,0.275,6.895C0.2142,7.0193,0.2657,7.1692,0.39,7.23 l10.5,5.25c0.3156,0.135,0.6568,0.1998,1,0.19c0.5998-0.0103,1.1889-0.161,1.72-0.44c0.1236-0.0615,0.174-0.2116,0.1125-0.3352 C13.7217,11.8932,13.7208,11.8916,13.72,11.89z",slaughterhouse:"M15 6.1c0 1.376-1.363.694-1.363.694L12.5 7H11a5.31 5.31 0 0 1-1.5 2 3.272 3.272 0 0 1-.523 1.125c-.077.091-.06.2-.068.33l.091 2.3a.264.264 0 0 1-.266.25.242.242 0 0 1-.234-.205L8 9.5H4v3.253a.247.247 0 0 1-.247.247.25.25 0 0 1-.24-.2L3 10v-.5a8.2 8.2 0 0 1-1.426-.1A1.886 1.886 0 0 1 .9 10.826c-.128.083-.148.211-.133.386l.19 1.538a.25.25 0 0 1-.25.25.238.238 0 0 1-.23-.174l-.427-1.7a.35.35 0 0 1 .055-.3c.437-.68-.049-2.55-.049-2.55A1.354 1.354 0 0 1 0 7.922V5.5a2.027 2.027 0 0 1 2.736-1.914s.1.03.142.049a15.15 15.15 0 0 0 3.814.038l.18-.062a1.842 1.842 0 0 1 1.26 0c.078.02.154.05.226.089.1.049.196.106.287.171A1.8 1.8 0 0 0 9.5 4h1V3l.5.5c.5-1.5 2.5-1 2.5-1a1.687 1.687 0 0 0-1.5 1l2.5 2a.612.612 0 0 1 .186-.069.318.318 0 0 1 .314.321V6.1Z",slipway:"m2 10 12 1.495V12H2v-2Zm12-4-1 1v.583L5.196 4.332l.063-.125L6.61 2.845h.831a.35.35 0 0 0 0-.7h-.976a.352.352 0 0 0-.248.103L4.723 3.753a.371.371 0 0 0-.066.09l-.109.219L2 3c0 2-.03 3.958 2.86 4.5C6.28 7.765 13 9 13 9l2-2-1-1Z",snowmobile:"M15 10a1 1 0 0 1-1 1H9.414a1 1 0 0 1-.707-.293L7.146 9.146A.499.499 0 0 0 6.793 9H3.334a1 1 0 0 1-.601-.2L1.386 7.788A1.013 1.013 0 0 1 1 7a.995.995 0 0 1 .472-.844L5 4l1.038-1.692A.5.5 0 0 1 7 2.5V6l1 1h1l5.412-.992a.5.5 0 0 1 .355.915L13 8l1.631 1.224A.99.99 0 0 1 15 10Zm-9.5 0H3.225c-.504 0-.999-.127-1.44-.368L.74 9.062a.5.5 0 0 0-.48.877l1.269.693c.441.242.937.368 1.44.368H5.5a.5.5 0 0 0 0-1Z",soccer:"M11,1.5C11,2.3284,10.3284,3,9.5,3S8,2.3284,8,1.5S8.6716,0,9.5,0S11,0.6716,11,1.5z M11,11c-0.5523,0-1,0.4477-1,1 s0.4477,1,1,1s1-0.4477,1-1S11.5523,11,11,11z M12.84,6.09l-1.91-1.91l0,0C10.8399,4.0675,10.7041,4.0014,10.56,4H3.5 C3.2239,4,3,4.2239,3,4.5S3.2239,5,3.5,5h2.7L3,11.3l0,0c-0.0138,0.066-0.0138,0.134,0,0.2c-0.058,0.2761,0.1189,0.547,0.395,0.605 C3.6711,12.163,3.942,11.9861,4,11.71l0,0L5,10h2l-1.93,4.24l0,0C5.0228,14.3184,4.9986,14.4085,5,14.5 c-0.0552,0.2761,0.1239,0.5448,0.4,0.6c0.2761,0.0552,0.5448-0.1239,0.6-0.4l0,0l4.7-9.38l1.44,1.48 c0.211,0.1782,0.5264,0.1516,0.7046-0.0593C13.0037,6.5523,13.0018,6.2761,12.84,6.09z",square:"M12 13H3C2.4477 13 2 12.5523 2 12V3C2 2.4477 2.4477 2 3 2H12C12.5523 2 13 2.4477 13 3V12C13 12.5523 12.5523 13 12 13Z","square-stroked":"M11.7 3.3V11.7H3.3V3.3H11.7ZM12 2H3C2.4477 2 2 2.4477 2 3V12C2 12.5523 2.4477 13 3 13H12C12.5523 13 13 12.5523 13 12V3C13 2.4477 12.5523 2 12 2Z",stadium:"M7,1v2v1.5v0.5098C4.1695,5.1037,2.0021,5.9665,2,7v4.5c0,1.1046,2.4624,2,5.5,2s5.5-0.8954,5.5-2V7 c-0.0021-1.0335-2.1695-1.8963-5-1.9902V4.0625L11,2.75L7,1z M3,8.1465c0.5148,0.2671,1.2014,0.4843,2,0.6328v2.9668 C3.7948,11.477,3,11.0199,3,10.5V8.1465z M12,8.1484V10.5c0,0.5199-0.7948,0.977-2,1.2461V8.7812 C10.7986,8.6328,11.4852,8.4155,12,8.1484z M6,8.9219C6.4877,8.973,6.9925,8.9992,7.5,9C8.0073,8.9999,8.5121,8.9743,9,8.9238 v2.9844C8.5287,11.964,8.0288,12,7.5,12S6.4713,11.964,6,11.9082V8.9219z",star:"M7.5,0l-2,5h-5l4,3.5l-2,6l5-3.5 l5,3.5l-2-6l4-3.5h-5L7.5,0z","star-stroked":"m7.5 2.69 1.07 2.68.25.63h3l-2 1.75-.5.44.23.63 1 3.13-2.48-1.77-.57-.4-.57.4-2.52 1.77 1-3.13.21-.63-.5-.44-2-1.75h3l.25-.63zm0-2.69-2 5h-5l4 3.5-2 6 5-3.5 5 3.5-2-6 4-3.5h-5z",suitcase:"M4.5 4V2C4.5 1.44772 4.94772 1 5.5 1H9.5C10.0523 1 10.5 1.44772 10.5 2V4H12C12.5523 4 13 4.44772 13 5V11C13 11.5523 12.5523 12 12 12H3C2.44771 12 2 11.5523 2 11V5C2 4.44772 2.44772 4 3 4H4.5ZM5.5 2V4H9.5V2H5.5Z",swimming:"M10.1113,2C9.9989,2,9.6758,2.1465,9.6758,2.1465L6.3535,3.8262 C5.9111,4.0024,5.7358,4.7081,6.002,5.0605l0.9707,1.4082L3.002,8.498L5,9.998l2.502-1.5l2.5,1.5l1.002-1.002l-3-4l2.5566-1.5293 c0.5286-0.2662,0.4434-0.7045,0.4434-0.9707C10.9999,2.2861,10.6437,2,10.1113,2z M12.252,5C11.2847,5,10.5,5.7827,10.5,6.75 s0.7847,1.752,1.752,1.752s1.75-0.7847,1.75-1.752S13.2192,5,12.252,5z M2.5,10L0,11.5V13l2.5-1.5L5,13l2.502-1.5l2.5,1.5L12,11.5 l3,1.5v-1.5L12,10l-1.998,1.5l-2.5-1.5L5,11.5L2.5,10z","table-tennis":"M11.9676,10.2275a3.8116,3.8116,0,0,1-1.9122.9831L3.7678,4.9338A4.0283,4.0283,0,0,1,4.7725,3.0324C7.03.7745,9.98.2235,12.3781,2.6219S14.2255,7.97,11.9676,10.2275Zm-6.987,1.6093A3.8422,3.8422,0,0,1,6.149,11.278,4.5328,4.5328,0,0,1,8,11.4452L3.5456,7a4.4126,4.4126,0,0,1,.1572,1.9223,3.6639,3.6639,0,0,1-.5208,1.1159c-1.072,1.263-2.132,1.727-2.132,2.1879A1.8378,1.8378,0,0,0,2.7739,13.95C3.2348,13.95,3.6917,12.9368,4.9806,11.8368Z",teahouse:"M8.00002 5C8.00002 5 10 4.9 10 3.4 10 2.46598 9.17751 2.20864 8.47606 1.98917 7.95458 1.82601 7.5 1.68378 7.5 1.3 7.5.386843 8 0 8 0 8 0 7 .531581 7 1.5 7 2.21063 7.54045 2.46176 8.05947 2.70292 8.53888 2.92568 9 3.13994 9 3.7 9 4.7 8.00002 5 8.00002 5ZM11.8372 6.67447C11.3755 8.62063 10.7854 11.1073 9 12V14H6V12C4.21455 11.1073 3.62454 8.62063 3.16276 6.67447 3.10728 6.44061 3.05364 6.21455 3 6H12C11.9464 6.21453 11.8927 6.44063 11.8372 6.67447ZM6.99998 4C6.99998 5 5.49998 5 5.49998 5 5.49998 5 6.29295 4.9 6.29295 4.3 6.29295 4.02526 6.01604 3.85489 5.71852 3.67184 5.37315 3.45935 5 3.22977 5 2.8 5 1.9661 5.99998 1.5 5.99998 1.5 5.99998 1.5 5.49998 1.77344 5.49998 2.5 5.49998 2.88823 5.85322 3.04095 6.21687 3.19818 6.60257 3.36494 6.99998 3.53675 6.99998 4Z",telephone:"M4.51,8.88a0.51,0.51,0,0,0,0,.72l0.72,0.72L3.07,12.5,2.7,12.13A2.24,2.24,0,0,1,2,10.69V9.24a2.24,2.24,0,0,1,.7-1.45L7.77,2.72A2.24,2.24,0,0,1,9.22,2h1.45a2.24,2.24,0,0,1,1.45.72l0.36,0.36L10.31,5.26,9.58,4.53a0.51,0.51,0,0,0-.72,0ZM4.13,13.6a1,1,0,0,0,1.4137.0363Q5.5623,13.6186,5.58,13.6l0.72-.72a1,1,0,0,0,.0363-1.4137Q6.3186,11.4477,6.3,11.43Zm7.25-7.28a1,1,0,0,0,1.4137.0363C12.8061,6.3445,13.55,5.6,13.55,5.6a1,1,0,0,0,.0363-1.4137Q13.5686,4.1677,13.55,4.15Z",tennis:"M13.1284,1.87c-1.5418-1.5406-4.5535-.7759-6.28,1.05a6.8282,6.8282,0,0,0-1.88,4.4,5.7275,5.7275,0,0,1-.57,2.72.6814.6814,0,0,0-.67.17l-2.49,2.5a.6941.6941,0,0,0,0,.98l.07.07a.7051.7051,0,0,0,.98,0l2.5-2.49a.683.683,0,0,0,.18-.66,8.5694,8.5694,0,0,1,3.12-.58,6.5487,6.5487,0,0,0,3.99-1.87C14.1084,6.13,14.579,3.3194,13.1284,1.87Zm-2.2-.04a2.3071,2.3071,0,0,1,1.64.61,2.548,2.548,0,0,1,.5,2.44l-2.95-2.96A3.8648,3.8648,0,0,1,10.9284,1.83Zm-4.57,6.81a2.6485,2.6485,0,0,1-.48-2.55l3.04,3.04A2.8522,2.8522,0,0,1,6.3584,8.64Zm2.88.39-3.26-3.27a5.1623,5.1623,0,0,1,.49-1.08l3.85,3.85A5.5093,5.5093,0,0,1,9.2384,9.03Zm1.34-.66-3.94-3.95a5.2032,5.2032,0,0,1,.74-.9l4.1,4.1A5.6869,5.6869,0,0,1,10.5784,8.37Zm1.11-.96-4.1-4.1a5.5714,5.5714,0,0,1,.84-.65l3.92,3.92A5.7187,5.7187,0,0,1,11.6884,7.41Zm.82-1.09L8.6984,2.5a4.1707,4.1707,0,0,1,1.09-.48l3.2,3.2A5.5656,5.5656,0,0,1,12.5084,6.32Z",theatre:"M2,1c0,0-1,0-1,1v5.1582C1,8.8885,1.354,11,4.5,11H5V8L2.5,9c0,0,0-2.5,2.5-2.5V5 c0-0.7078,0.0868-1.3209,0.5-1.7754C5.8815,2.805,6.5046,1.9674,8.1562,2.7539L9,3.3027V2c0,0,0-1-1-1C7.2922,1,6.0224,2,5,2 S2.7865,1,2,1z M3,3c0.5523,0,1,0.4477,1,1S3.5523,5,3,5S2,4.5523,2,4S2.4477,3,3,3z M7,4c0,0-1,0-1,1v5c0,2,1,4,4,4s4-2,4-4V5 c0-1-1-1-1-1c-0.7078,0-1.9776,1-3,1S7.7865,4,7,4z M8,6c0.5523,0,1,0.4477,1,1S8.5523,8,8,8S7,7.5523,7,7S7.4477,6,8,6z M12,6 c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1s-1-0.4477-1-1S11.4477,6,12,6z M7.5,10H10h2.5c0,0,0,2.5-2.5,2.5S7.5,10,7.5,10z",toilet:"M3 1.5a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0ZM11.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM3.29 4a1 1 0 0 0-.868.504L.566 7.752a.5.5 0 1 0 .868.496l1.412-2.472A345.048 345.048 0 0 0 1 11h2v2.5a.5.5 0 0 0 1 0V11h1v2.5a.5.5 0 0 0 1 0V11h2L6.103 5.687l1.463 2.561a.5.5 0 1 0 .868-.496L6.578 4.504A1 1 0 0 0 5.71 4H3.29ZM9 4.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0v4a.5.5 0 0 1-1 0v-4h-1v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 1-1 0v-5Z",toll:"M2.5 1C2.22386 1 2 1.22386 2 1.5V2V13H1.5C1.22386 13 1 13.2239 1 13.5C1 13.7761 1.22386 14 1.5 14H8.5C8.77614 14 9 13.7761 9 13.5C9 13.2239 8.77614 13 8.5 13H7V10.0987L13.7761 5.54576C14.0053 5.39175 14.0663 5.08109 13.9123 4.85189L13.6334 4.43687C13.4794 4.20766 13.1688 4.1467 12.9396 4.3007L7 8.29152V2H7.5C7.77614 2 8 1.77614 8 1.5C8 1.22386 7.77614 1 7.5 1H2.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5.5C5.77614 3 6 3.22386 6 3.5V7.5C6 7.77614 5.77614 8 5.5 8H3.5C3.22386 8 3 7.77614 3 7.5V3.5Z",town:"m10.651 6.121c-.0445-.0357-.0999-.05516-.157-.05516s-.1125.01946-.157.05516l-2.245 1.808c-.02881.02323-.05204.05263-.06796.08603-.01593.03341-.02414.06997-.02404.10697v4.625c0 .0671.02666.1315.0741.1789.04745.0474.1118.0741.1789.0741h1.494c.0671 0 .13145-.0267.1789-.0741s.0741-.1118.0741-.1789v-1.747h1v1.747c0 .0671.0267.1315.0741.1789.0475.0474.1118.0741.1789.0741h1.494c.0671 0 .1315-.0267.1789-.0741s.0741-.1118.0741-.1789v-4.627c.0007-.03831-.0074-.07627-.0237-.11095s-.0404-.06514-.0703-.08905zm-.651 3.879h-1v-1h1zm2 0h-1v-1h1zm-6.29-9.184997c-.02299-.034654-.05419-.063081-.09083-.082746s-.07758-.029956-.11917-.029956c-.04158 0-.08252.010291-.11916.029956-.03665.019665-.06785.048092-.09084.082746l-3.248 4.120997c-.02752.0415-.04214.09021-.042.14v7.671c-.00013.0331.00626.0659.0188.0965s.031.0585.0543.082c.02331.0235.05102.0422.08154.0549.03053.0128.06327.0195.09636.0196h2.5c.06632-.0008.12964-.0277.17626-.0749.04661-.0471.07275-.1108.07274-.1771v-1.748h1v1.748c0 .0668.02655.1309.07381.1782s.11136.0738.17819.0738h.748v-6c-.00004-.07511.01684-.14926.04938-.21695.03255-.06769.07993-.12718.13862-.17405l1.812-1.609c0-.05-3.29-4.184997-3.29-4.184997zm-1.71 8.184997h-1v-1h1zm0-3h-1v-1h1zm2 3h-1v-1h1zm0-3h-1v-1h1z","town-hall":"M13,4H9l0-3L7.5,0L6,1v3H2L1,5v1h13V5L13,4z M7.5,1.5c0.4,0,0.7,0.3,0.7,0.8S7.9,3,7.5,3S6.7,2.7,6.7,2.2 C6.7,1.8,7.1,1.5,7.5,1.5z M13,7H2v4l-1,1.5V14h13v-1.5L13,11V7z M5,12.5H4V8h1V12.5z M8,12.5H7V8h1V12.5z M11,12.5h-1V8h1V12.5z",triangle:"m7.5385 1c-.2948 0-.4883.1772-.6154.3846l-5.8462 9.5385c-.0769.0769-.0769.2307-.0769.3846 0 .5385.3846.6923.6923.6923h11.6154c.3846 0 .6923-.1538.6923-.6923 0-.1538 0-.2308-.0769-.3846l-5.7693-9.5385c-.1258-.2081-.3656-.3846-.6153-.3846z","triangle-stroked":"m7.52427.500405c-.2814-.0091-.5456.1419-.6907.3948l-5.5 9.869195c-.3118.5434.0614 1.2355.6664 1.2356h11.00003c.605-.0001.9782-.6922.6664-1.2355l-5.50003-9.869195c-.1362-.2374-.378-.3861-.6421-.3949zm-.0243 2.398895 4.12673 7.4704h-8.25343z",tunnel:"M4 2C2.34315 2 1 3.32706 1 4.96406V12.012C1 12.5576 1.44772 13 2 13H3V8.55391C3 6.09839 5.01472 4.10781 7.5 4.10781C9.98528 4.10781 12 6.09842 12 8.55393V13H13C13.5523 13 14 12.5576 14 12.012V4.96406C14 3.32706 12.6569 2 11 2H4ZM11 10V9.04794C11 6.86526 9.43299 5.09583 7.5 5.09583C5.56701 5.09583 4.00001 6.86526 4 9.04794V13L11 10Z",veterinary:"M7.5,6c-2.5,0-3,2.28-3,3.47h0a6.149,6.149,0,0,0-1.7.89,2,2,0,0,0-.4,2.78,2.06,2.06,0,0,0,2.8.4,4,4,0,0,1,2.3-.69,4,4,0,0,1,2.3.69,2,2,0,0,0,2.8-.3,1.929,1.929,0,0,0-.226-2.72c-.024-.021-.049-.041-.074-.06l-.1-.1a8.992,8.992,0,0,0-1.7-.89h0C10.5,8.29,10,6,7.5,6ZM2.08,4.3a1.58,1.58,0,0,0-.76,2A1.52,1.52,0,0,0,2.93,7.7a1.58,1.58,0,0,0,.76-2A1.52,1.52,0,0,0,2.08,4.3Zm10.85,0a1.58,1.58,0,0,1,.76,2,1.52,1.52,0,0,1-1.61,1.4,1.58,1.58,0,0,1-.76-2A1.52,1.52,0,0,1,12.93,4.3Zm-7.85-3c-.68.09-1,.94-.76,1.87A1.77,1.77,0,0,0,5.93,4.7c.68-.09,1-.94.76-1.87A1.77,1.77,0,0,0,5.08,1.3Zm4.85,0c.68.09,1,.94.76,1.87A1.77,1.77,0,0,1,9.07,4.7c-.68-.08-1-.94-.76-1.87A1.769,1.769,0,0,1,9.93,1.3Z",viewpoint:"M6.02,8.425a2.3859,2.3859,0,0,0-.46.44l-4.55-3.5a7.9976,7.9976,0,0,1,1.51-1.51Zm6.46-4.56-3.5,4.55a2.3971,2.3971,0,0,1,.45.45l4.56-3.5A7.945,7.945,0,0,0,12.48,3.865ZM7.3042,10.0129a1.5,1.5,0,1,0,1.6829,1.2914h0A1.5,1.5,0,0,0,7.3042,10.0129ZM6.43,2.235a7.9329,7.9329,0,0,0-2.06.55l2.2,5.32a2.0438,2.0438,0,0,1,.61-.17Zm2.14.01-.75,5.69a2.49,2.49,0,0,1,.61.16l2.2-5.3A7.2129,7.2129,0,0,0,8.57,2.245Z",village:"M6.176 1.176a.249.249 0 0 0-.352 0l-4.4 4.4A.25.25 0 0 0 1.6 6H3v6.751a.25.25 0 0 0 .249.249h3.5A.248.248 0 0 0 7 12.753v-7.43c0-.066.026-.13.073-.176L8.5 3.5 6.176 1.176ZM6 11H5v-1h1v1Zm0-2H5V8h1v1Zm0-3v1H5V6h1Z M12.75 3h-.5a.25.25 0 0 0-.25.25V5l-1.324-1.824a.249.249 0 0 0-.352 0L8.056 5.932A.246.246 0 0 0 8 6.088v6.66a.249.249 0 0 0 .246.252h1.5a.253.253 0 0 0 .254-.252V11h1v1.747a.253.253 0 0 0 .253.253h1.5a.25.25 0 0 0 .247-.249V3.25a.25.25 0 0 0-.25-.25ZM10 8H9V7h1v1Zm2 0h-1V7h1v1Zm-2 2H9V9h1v1Zm2 0h-1V9h1v1Z",volcano:"M8.4844,1.0002 c-0.1464,0.005-0.2835,0.0731-0.375,0.1875L6.4492,3.2619L4.8438,1.7385C4.4079,1.3374,3.7599,1.893,4.0899,2.385l1.666,2.4004 C5.9472,5.061,6.3503,5.0737,6.5586,4.8108C6.7249,4.6009,7,4.133,7.5,4.133s0.7929,0.4907,0.9414,0.6777 c0.175,0.2204,0.4973,0.2531,0.7129,0.0723l1.668-1.4004c0.4408-0.3741,0.0006-1.0735-0.5273-0.8379L9,3.2268V1.5002 C9.0002,1.2179,8.7666,0.9915,8.4844,1.0002L8.4844,1.0002z M5,6.0002L2.0762,11.924C1.9993,12.0009,2,12.155,2,12.3088 c0,0.5385,0.3837,0.6914,0.6914,0.6914h9.6172c0.3846,0,0.6914-0.153,0.6914-0.6914c0-0.1538,0.0008-0.2309-0.0762-0.3848L10,6.0002 c-0.5,0-1,0.5-1,1v0.5c0,0.277-0.223,0.5-0.5,0.5S8,7.7772,8,7.5002v-0.5c0-0.2761-0.2238-0.5-0.5-0.5S7,6.7241,7,7.0002v2 c0,0.277-0.223,0.5-0.5,0.5S6,9.2772,6,9.0002v-2C6,6.5002,5.5,6.0002,5,6.0002z",volleyball:"M13.91,7.94a5.9086,5.9086,0,0,1-.13.94,8.8218,8.8218,0,0,0-2.17-1.49,8.89,8.89,0,0,0-1.4-.56,8.6142,8.6142,0,0,0-1.82-.35.221.221,0,0,0-.08-.01A7.32,7.32,0,0,1,7.5,4.59c-.01-.01-.01-.01,0-.02a7.7573,7.7573,0,0,1,1.52.15,7.0987,7.0987,0,0,1,1.56.5,6.8585,6.8585,0,0,1,1.4.78A7.4165,7.4165,0,0,1,13.91,7.94Zm-1.87-5a6.2232,6.2232,0,0,0-1.85-1.27,4.2725,4.2725,0,0,0-.98-.36,5.6412,5.6412,0,0,0-1.55-.23,1.2882,1.2882,0,0,0-.32,0A7.4263,7.4263,0,0,0,7.21,2.5c0,.2.01.39.02.58a2.28,2.28,0,0,1,.26-.01,2.6438,2.6438,0,0,1,.28.01,8.2865,8.2865,0,0,1,1.49.16,8.9879,8.9879,0,0,1,1.35.37,8.7922,8.7922,0,0,1,1.53.7,10.18,10.18,0,0,1,1.39.97A6.4588,6.4588,0,0,0,12.04,2.94ZM4.01,8.76a9.4084,9.4084,0,0,1-.62-1.37,9.1038,9.1038,0,0,1-.37-1.41,9.1748,9.1748,0,0,1-.16-1.67V4.28a8.455,8.455,0,0,1,.1-1.34A6.28,6.28,0,0,0,1.47,5.3a6.2222,6.2222,0,0,0-.4,2.2c0,.15.01.3.02.44a5.9086,5.9086,0,0,0,.13.94,5.7343,5.7343,0,0,0,.41,1.23c.22-.05.44-.11.65-.17a8.0188,8.0188,0,0,0,1.9-.88C4.12,8.96,4.06,8.86,4.01,8.76Zm2.6-2.28a9,9,0,0,1-.63-1.76,9.135,9.135,0,0,1-.24-1.48c-.02-.25-.03-.49-.03-.74a9.3777,9.3777,0,0,1,.08-1.19,4.2725,4.2725,0,0,0-.98.36,7.7038,7.7038,0,0,0-.42,1.94c-.02.22-.03.44-.03.67a7.2659,7.2659,0,0,0,.06.93,7.4258,7.4258,0,0,0,.37,1.63,6.4705,6.4705,0,0,0,.59,1.28A8.0174,8.0174,0,0,0,6.65,6.55.2522.2522,0,0,1,6.61,6.48ZM12.7,9.93s0-.01-.01,0a7.0128,7.0128,0,0,0-1.7-1.16c-.06.1-.11.19-.17.29a8.783,8.783,0,0,1-.88,1.22,8.9125,8.9125,0,0,1-1.06,1.07,10.4181,10.4181,0,0,1-1.38.98,8.9933,8.9933,0,0,1-2.64,1.02,6.2985,6.2985,0,0,0,5.28,0,5.9674,5.9674,0,0,0,2.42-1.89,4.8258,4.8258,0,0,0,.65-1.03A6.0315,6.0315,0,0,0,12.7,9.93Zm-5.17-2c-.01.01-.02.03-.03.04a9.26,9.26,0,0,1-1.25,1.4,9.5925,9.5925,0,0,1-1.19.91,9.2683,9.2683,0,0,1-2.62,1.18,6.0989,6.0989,0,0,0,.53.61,7.7353,7.7353,0,0,0,3.15-.72,7.3839,7.3839,0,0,0,1.38-.82A7.6429,7.6429,0,0,0,8.75,9.37a7.7441,7.7441,0,0,0,.82-1.15A7.3414,7.3414,0,0,0,7.53,7.93Z",warehouse:"M13.5,5c-0.0762,0.0003-0.1514-0.0168-0.22-0.05L7.5,2L1.72,4.93C1.4632,5.0515,1.1565,4.9418,1.035,4.685 S1.0232,4.1215,1.28,4L7.5,0.92L13.72,4c0.2761,0.0608,0.4508,0.3339,0.39,0.61C14.0492,4.8861,13.7761,5.0608,13.5,5z M5,10H2v3h3 V10z M9,10H6v3h3V10z M13,10h-3v3h3V10z M11,6H8v3h3V6z M7,6H4v3h3V6z","waste-basket":"M12.41,5.58l-1.34,8c-0.0433,0.2368-0.2493,0.4091-0.49,0.41H4.42c-0.2407-0.0009-0.4467-0.1732-0.49-0.41l-1.34-8 C2.5458,5.3074,2.731,5.0506,3.0035,5.0064C3.0288,5.0023,3.0544,5.0002,3.08,5h8.83c0.2761-0.0036,0.5028,0.2174,0.5064,0.4935 C12.4168,5.5225,12.4146,5.5514,12.41,5.58z M13,3.5C13,3.7761,12.7761,4,12.5,4h-10C2.2239,4,2,3.7761,2,3.5S2.2239,3,2.5,3H5V1.5 C5,1.2239,5.2239,1,5.5,1h4C9.7761,1,10,1.2239,10,1.5V3h2.5C12.7761,3,13,3.2239,13,3.5z M9,3V2H6v1H9z",watch:"M12.5,7H12a.426.426,0,0,0-.049.01A4.484,4.484,0,0,0,10,3.76V1.5A.5.5,0,0,0,9.5,1h-4a.5.5,0,0,0-.5.5V3.76a4.5,4.5,0,0,0,0,7.48V13.5a.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5V11.24a4.486,4.486,0,0,0,1.951-3.25A.426.426,0,0,0,12,8h.5a.5.5,0,0,0,0-1Zm-5,4A3.5,3.5,0,1,1,11,7.5,3.5,3.5,0,0,1,7.5,11ZM9,7H8V5.5a.5.5,0,0,0-1,0v2a.5.5,0,0,0,.5.5H9A.5.5,0,0,0,9,7Z",water:"M7.5 14C9.57688 14 12 12.7117 12 9.43241C12 7.20724 8.53844 2.2883 7.5 1C6.57691 2.2883 3 7.09007 3 9.43241C3 12.7117 5.42312 14 7.5 14Z",waterfall:"M14 1H5C3.34315 1 2 2.34314 2 4V8.87918C1.39704 9.28261 1 9.96937 1 10.75C1 11.9927 2.00736 13 3.25 13C3.7127 13 4.14279 12.8599 4.5 12.6209C4.85721 12.8599 5.2873 13 5.75 13C6.28601 13 6.77826 12.812 7.16413 12.5H7.51743C8.01909 12.8165 8.61403 13 9.25 13C11.0449 13 12.5 11.5449 12.5 9.75002C12.5 8.39777 11.6747 7.23919 10.5 6.74934V5C10.5 3.89543 11.3954 3 12.5 3H14V1ZM11.5 9.75C11.5 10.9926 10.4926 12 9.25 12C8.71418 12 8.2221 11.8127 7.83567 11.5H6.75009C6.52204 11.8036 6.15895 12 5.75 12C5.34105 12 4.97796 11.8036 4.74991 11.5H4.25009C4.02204 11.8036 3.65895 12 3.25 12C2.55964 12 2 11.4404 2 10.75C2 10.1453 2.42944 9.64082 3 9.525V5.75C3 5.33579 3.33579 5 3.75 5C4.16421 5 4.5 5.33579 4.5 5.75V9C4.5 9.27614 4.72386 9.5 5 9.5C5.27614 9.5 5.5 9.27614 5.5 9V6.75C5.5 6.33579 5.83579 6 6.25 6C6.66421 6 7 6.33579 7 6.75V9C7 9.27614 7.22386 9.5 7.5 9.5C7.77614 9.5 8 9.27614 8 9V5.75C8 5.33579 8.33579 5 8.75 5C9.16421 5 9.5 5.33579 9.5 5.75V7.51373C10.625 7.63809 11.5 8.59186 11.5 9.75Z",watermill:"M2,10.2L4,9l2.5,1.5l1.4659-0.8788C7.6592,9.4698,7.3716,9.285,7.1231,9.0536l1.4131-1.4131 C8.7672,7.836,9.0557,7.9606,9.375,7.9874V9.224l0.25,0.1501V7.9874c0.3193-0.0268,0.6078-0.1514,0.8388-0.3469l1.4131,1.4131 c-0.4059,0.3781-0.9044,0.6492-1.4528,0.8003L11.5,10.5l0.6984-0.4191C13.2863,9.2595,14,7.9682,14,6.5C14,4.0147,11.9853,2,9.5,2 C8.1917,2,7.0241,2.5674,6.2018,3.4587L4.5,2L1,5h1V10.2z M12.0536,8.8769l-1.4131-1.4131c0.1954-0.231,0.3201-0.5196,0.3469-0.8388 h1.9999C12.956,7.4946,12.6089,8.2806,12.0536,8.8769z M12.9874,6.375h-1.9999c-0.0268-0.3193-0.1514-0.6078-0.3469-0.8388 l1.4131-1.4131C12.6089,4.7193,12.956,5.5054,12.9874,6.375z M9.625,3.0126c0.8696,0.0314,1.6557,0.3784,2.2519,0.9337 l-1.4131,1.4131c-0.231-0.1954-0.5196-0.32-0.8388-0.3468C9.625,5.0126,9.625,3.0126,9.625,3.0126z M9.375,3.0126v1.9999 C9.0558,5.0394,8.7672,5.164,8.5362,5.3594L7.1231,3.9463C7.7193,3.3911,8.5054,3.044,9.375,3.0126z M6.9464,4.1231l1.4131,1.4131 C8.164,5.7672,8.0394,6.0557,8.0126,6.375h-2C6.044,5.5054,6.3911,4.7193,6.9464,4.1231z M8.0126,6.625 c0.0268,0.3192,0.1515,0.6078,0.3469,0.8388L6.9464,8.8769C6.3911,8.2807,6.044,7.4946,6.0126,6.625H8.0126z M9.002,10L6.5,11.5 L4,10l-2.5,1.5V13L4,11.5L6.5,13l2.502-1.5L11.5,13l2.5-1.5V10l-2.5,1.5L9.002,10z",wetland:"M1.48,4.5C1.905,4.1467,2.4483,3.968,3,4c1.2273-0.0869,2.3154,0.7836,2.5,2l0.78,4.68c-0.6394-0.2893-1.3759-0.2709-2,0.05 L3.48,6C3.1874,5.1347,2.3926,4.5387,1.48,4.5z M7.48,11.24c0.3816-0.3076,0.825-0.5293,1.3-0.65L10,3 c0.2926-0.8653,1.0874-1.4613,2-1.5c-0.4198-0.3485-0.955-0.5269-1.5-0.5C9.2727,0.9131,8.1846,1.7836,8,3l-1.3,7.79 C6.9786,10.9052,7.2408,11.0565,7.48,11.24z M11.8,10.74L11.8,10.74c0.1565-0.1277,0.3238-0.2414,0.5-0.34L13,6 c0.2926-0.8653,1.0874-1.4613,2-1.5c-0.4198-0.3485-0.955-0.5269-1.5-0.5c-1.2273-0.0869-2.3154,0.7836-2.5,2l-0.67,4 C10.8731,10.123,11.3778,10.377,11.8,10.74z M14,12L14,12c-0.4346-0.01-0.8579,0.1394-1.19,0.42l-0.47,0.41 c-0.2847,0.2546-0.7153,0.2546-1,0c-0.15-0.12-0.29-0.26-0.44-0.39c-0.7076-0.5968-1.7424-0.5968-2.45,0 c-0.16,0.13-0.31,0.28-0.47,0.41c-0.2847,0.2546-0.7153,0.2546-1,0c-0.16-0.13-0.31-0.28-0.47-0.41 c-0.7059-0.5912-1.7341-0.5912-2.44,0c-0.15,0.13-0.29,0.27-0.44,0.39c-0.0892,0.0715-0.1909,0.1258-0.3,0.16 c-0.2922,0.0652-0.5969-0.0301-0.8-0.25c-0.2475-0.214-0.5117-0.4079-0.79-0.58C1.5336,12.0421,1.2974,11.9865,1.06,12H1 c-0.2761,0-0.5,0.2239-0.5,0.5S0.7239,13,1,13l0,0c0.246,0.0145,0.4762,0.126,0.64,0.31L2,13.57 c0.6717,0.55,1.6308,0.5747,2.33,0.06c0.19-0.14,0.36-0.32,0.55-0.47c0.2847-0.2546,0.7153-0.2546,1,0l0.39,0.35 c0.6937,0.6189,1.7322,0.6484,2.46,0.07c0.15-0.11,0.27-0.25,0.42-0.37c0.2976-0.3038,0.7851-0.3087,1.0889-0.0111 c0.0037,0.0037,0.0074,0.0074,0.0111,0.0111l0.39,0.35c0.4866,0.4124,1.1485,0.5516,1.76,0.37c0.3825-0.1036,0.7286-0.3113,1-0.6 c0.1549-0.1772,0.3674-0.294,0.6-0.33l0,0c0.2761,0,0.5-0.2239,0.5-0.5S14.2761,12,14,12z",wheelchair:"M12,1.5C12,2.3284,11.3284,3,10.5,3S9,2.3284,9,1.5S9.6716,0,10.5,0S12,0.6716,12,1.5z M2.82,4.87l1.74-1.71l1.85,1.29 L5.67,5.7c1.0747,0.3341,2.0207,0.9904,2.71,1.88l0.88-1.5c0.2295-0.4158,0.0785-0.939-0.3373-1.1685 C8.9218,4.911,8.9209,4.9105,8.92,4.91L8.3,4.54L4.79,2.1C4.5927,1.9594,4.3231,1.9805,4.15,2.15l-2,2 C1.9852,4.3716,2.0312,4.6848,2.2528,4.8496C2.4193,4.9735,2.645,4.9816,2.82,4.87z M8.13,10.94 c-0.0143,1.2308-0.5794,2.3904-1.54,3.16c-0.7118,0.5804-1.6016,0.8982-2.52,0.9C1.8261,15,0.0055,13.1839,0,10.94 c0.0023-0.9231,0.3238-1.8169,0.91-2.53c0.1868-0.232,0.398-0.4432,0.63-0.63c0.7131-0.5862,1.6069-0.9077,2.53-0.91 C6.3139,6.8755,8.13,8.6961,8.13,10.94z M6,12.21C6.7679,11.2051,6.5758,9.7679,5.5709,9C4.7501,8.3727,3.6109,8.3727,2.79,9 C2.5283,9.151,2.311,9.3683,2.16,9.63c-0.6923,1.0584-0.3956,2.4777,0.6628,3.17c0.7615,0.4981,1.7457,0.4981,2.5072,0 C5.5805,12.6365,5.8061,12.4378,6,12.21z M14.2,13.21l-2.49-5C11.5906,7.9251,11.3088,7.7425,11,7.75H8.51 c0.3293,0.4578,0.5856,0.9638,0.76,1.5h1.26l2.29,4.58c0.185,0.3728,0.6372,0.525,1.01,0.34c0.3728-0.185,0.525-0.6372,0.34-1.01 L14.2,13.21z",windmill:"M6,5L3.5,7.5l1,1L7,6V5.5L7.5,5L8,5.5V6l2.5,2.5l1-1L9,5H8.5L8,4.5L8.5,4H9l2.5-2.5l-1-1L8,3v0.5L7.5,4L7,3.5V3L4.5,0.5 l-1,1L6,4h0.5L7,4.5L6.5,5H6z M11.5,13h-1l-1-4l-2-2l-2,2l-1,4h-1C3.2239,13,3,13.2238,3,13.5C3,13.7761,3.2239,14,3.5,14h8 c0.2761,0,0.5-0.2239,0.5-0.5C12,13.2238,11.7761,13,11.5,13z M8,13H7v-1.5024C7,11.2228,7.2228,11,7.4976,11 C7.7751,11,8,11.2249,8,11.5024V13z",zoo:"M8.3879,3.8928C8.3879,3.8928,7.6818,5,7,5H4.5C3.8182,5,3.2016,5.4086,2.7273,5.8636L0.5,8C0.231,8.258,0.0072,8.7681,0,9 c-0.0156,0.5,0,1,0,1s1,0,1-1V8.5l1-1h0.5l0.158,0.2892c0,0-0.9535,1.8244-0.9535,3.5289C1.7046,12,2.3864,12,2.3864,12h0.6818 c0,0,0.3409,0,0-0.3409l-0.3409-0.3409C2.7273,10.6364,3.5002,9.6667,4,9c0,0,0.0168,1.1579,0,2c-0.008,0.4096,0.2721,1,0.6818,1 h0.6818c0,0,0.3409,0,0-0.3409l-0.3409-0.3409C4.7105,10.7495,5.5,8.5,5.5,8.5C6.7716,8.5,7,9,8.5,9l0.3636,2.3182 C8.975,12.0282,9.5,12,9.5,12H11c0.3409,0,0.9611-0.3115,0.3409-0.7736L11,11V9c1.2142-0.1722,2-1,2-2h1c0.3214,0,1,0,1-0.5v-1 l-1.7045-1.6818C12.5444,3.0772,12,2.5,11,2.5C9.5469,2.5,8.8636,3.0688,8.3879,3.8928z"},fr=Object.keys(Te);function j1(e,t){const n=Te[e];n||console.warn(`[MakiIcon] Unknown icon: "${e}", falling back to "marker"`);const r=n??Te.marker??"",o=(t==null?void 0:t.size)??32,l=(t==null?void 0:t.fill)??"#333",s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="${o}" height="${o}"><path fill="${l}" d="${r}"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(s)}`}function gr(e,t){const n={};for(const r of e)n[r]=j1(r,t);return n}const yr="M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z";function B1(e,t){const n=Te[e];n||console.warn(`[MakiIcon] Unknown icon: "${e}", falling back to "marker"`);const r=n??Te.marker??"",o=(t==null?void 0:t.size)??40,l=(t==null?void 0:t.fill)??"#2563eb",s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 40" width="${o}" height="${Math.round(o*1.25)}"><path d="${yr}" fill="${l}" stroke="white" stroke-width="1.5"/>`+(r?`<svg x="8" y="8" viewBox="0 0 15 15" width="16" height="16"><path fill="white" d="${r}"/></svg>`:"")+"</svg>";return`data:image/svg+xml,${encodeURIComponent(s)}`}function W1(e,t){const n={};for(const r of e)n[r]=B1(r,t);return n}const nt={primary:{fill:"#2563eb",bg:"rgba(37, 99, 235, 0.2)",ring:"rgba(37, 99, 235, 0.2)"},success:{fill:"#00854d",bg:"rgba(0, 133, 77, 0.2)",ring:"rgba(0, 133, 77, 0.2)"},warning:{fill:"#943700",bg:"rgba(148, 55, 0, 0.2)",ring:"rgba(148, 55, 0, 0.2)"},error:{fill:"#ba1a1a",bg:"rgba(186, 26, 26, 0.2)",ring:"rgba(186, 26, 26, 0.2)"}};function mr(e){return typeof e=="string"&&/<[a-zA-Z][^>]*>/.test(e)}function U1({color:e="primary"}){const{fill:t}=nt[e];return i.jsxs("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"aimapui-marker-pin",style:{width:32,height:40,display:"block",filter:"drop-shadow(0 4px 3px rgba(0,0,0,0.07)) drop-shadow(0 2px 2px rgba(0,0,0,0.06))"},children:[i.jsx("path",{d:"M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z",fill:t,stroke:"white",strokeWidth:1.5}),i.jsx("circle",{cx:"16",cy:"16",r:"4",fill:"white"})]})}function Cr({icon:e,color:t="primary"}){const{fill:n}=nt[t],r=Te[e]??Te.marker??"";return i.jsxs("div",{className:"aimapui-marker-pin aimapui-marker-pin--icon",style:{position:"relative",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",width:32,height:40,filter:"drop-shadow(0 4px 3px rgba(0,0,0,0.07)) drop-shadow(0 2px 2px rgba(0,0,0,0.06))"},children:[i.jsx("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{position:"absolute",inset:0,width:"100%",height:"100%"},children:i.jsx("path",{d:"M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z",fill:n,stroke:"white",strokeWidth:1.5})}),r&&i.jsx("svg",{viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",style:{position:"relative",zIndex:1,width:16,height:16,marginTop:8,fill:"white"},children:i.jsx("path",{d:r,style:{fill:"white"}})})]})}function vr({color:e="primary"}){const{fill:t,bg:n}=nt[e];return i.jsx("div",{className:"aimapui-marker-circle",style:{position:"relative",width:24,height:24,borderRadius:"50%",border:"1.5px solid white",boxShadow:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",justifyContent:"center",background:n,borderColor:t},children:i.jsx("div",{className:"aimapui-marker-circle__inner",style:{width:6,height:6,borderRadius:"50%",background:t}})})}function br({color:e="primary"}){const{fill:t}=nt[e];return i.jsx("div",{className:"aimapui-marker-dot",style:{width:8,height:8,borderRadius:"50%",border:"1.5px solid white",boxShadow:"0 1px 3px rgba(0,0,0,0.3)",background:t}})}function Lr({text:e}){return i.jsx("div",{className:"aimapui-marker-label",style:{position:"absolute",top:"calc(100% + 4px)",left:"50%",transform:"translateX(-50%)",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:12,lineHeight:"16px",fontWeight:450,color:"#1d1d1f",whiteSpace:"nowrap",pointerEvents:"none",textShadow:"-1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff, 0 0 2px #fff, 0 0 4px rgba(255,255,255,0.5)"},children:e})}const q1={center:"translate(-50%, -50%)",top:"translate(-50%, 0)",bottom:"translate(-50%, -100%)",left:"translate(0, -50%)",right:"translate(-100%, -50%)","top-left":"translate(0, 0)","top-right":"translate(-100%, 0)","bottom-left":"translate(0, -100%)","bottom-right":"translate(-100%, -100%)"},xr=[0,0];function wr(e,t,n,r){let o;switch(e){case"pin":o=i.jsx(U1,{color:t});break;case"circle":o=i.jsx(vr,{color:t});break;case"icon":o=i.jsx(Cr,{icon:n||"marker",color:t});break;case"dot":o=i.jsx(br,{color:t});break;default:o=i.jsx(U1,{color:t})}return r?i.jsxs("div",{style:{position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center"},children:[o,i.jsx(Lr,{text:r})]}):o}function Oe({longitude:e,latitude:t,variant:n="pin",color:r="primary",icon:o,label:l,content:s,children:a,draggable:c=!1,className:d,overlayContainer:h,onClick:f,onMouseEnter:p,onMouseLeave:g,onDoubleClick:y,onDragEnd:C,onDragging:b,onDragStart:x,selected:k=!1,inactive:L=!1,anchor:z="bottom",offsets:E=xr,overflowHide:T=!0}){const M=me(),H=u.useRef(null),N=u.useRef(null),V=u.useRef({lng:e,lat:t}),F=u.useRef({width:0,height:0}),A=E[0]??0,I=E[1]??0,m=u.useRef(null),w=u.useRef(f);w.current=f;const P=u.useRef(p);P.current=p;const $=u.useRef(g);$.current=g;const j=u.useRef(y);j.current=y;const O=u.useRef(x);O.current=x;const K=u.useRef(b);K.current=b;const ee=u.useRef(C);ee.current=C;const Y=u.useMemo(()=>{const _=["aimapui-marker"];return k&&_.push("aimapui-marker--selected"),L&&_.push("aimapui-marker--inactive"),_.push(`aimapui-marker--${r}`),d&&_.push(d),_.join(" ")},[k,L,r,d]),X=u.useMemo(()=>s||a||wr(n,r,o,l),[s,a,n,r,o,l]),te=_=>{const U=H.current;if(!U||!_)return;const{lng:ce,lat:ie}=V.current;if(isNaN(ce)||isNaN(ie))return;let Q;try{Q=_.lngLatToContainer([ce,ie])}catch{return}if(!Q||isNaN(Q.x)||isNaN(Q.y))return;const le=Q.x+A,Z=Q.y-I,v=q1[z]||q1.bottom,D=Math.round(le),S=Math.round(Z);if(U.style.left="0",U.style.top="0",U.style.transform=`translate3d(${D}px, ${S}px, 0) ${v}`,T){const{width:R,height:B}=F.current;U.style.visibility=le<0||le>R||Z<0||Z>B?"hidden":"visible"}};return u.useEffect(()=>{if(!M)return;let _=!1;const U=M.mapService;if(!U){console.error("[Marker] mapService not available");return}const ce=()=>{var D;const v=(D=U.getContainer)==null?void 0:D.call(U);v&&(F.current={width:v.scrollWidth||v.clientWidth||0,height:v.scrollHeight||v.clientHeight||0})},ie=()=>{H.current&&te(U)},Q=(v,D,S)=>{var R;try{(R=v==null?void 0:v.on)==null||R.call(v,D,S)}catch{}},le=(v,D,S)=>{var R;try{(R=v==null?void 0:v.off)==null||R.call(v,D,S)}catch{}};return ce(),Q(U,"camerachange",ie),Q(U,"viewchange",ie),Q(M,"resize",ce),(async()=>{var se;if(M.loaded||await new Promise(J=>{M.once("loaded",()=>J())}),_)return;const v=document.createElement("div");v.className=Y,v.style.position="absolute",v.style.left="0",v.style.top="0",v.style.whiteSpace="nowrap",v.style.pointerEvents="auto",H.current=v;const D=h??((se=U.getMarkerContainer)==null?void 0:se.call(U));if(D)D.appendChild(v);else{console.error("[Marker] getMarkerContainer not available");return}te(U);let S=!1,R={lng:0,lat:0};const B=J=>{var ae;if(!c)return;S=!0,U.setMapStatus({dragEnable:!1,zoomEnable:!1});const re=U.getContainer(),q=(ae=re==null?void 0:re.getClientRects())==null?void 0:ae[0];if(q){const he=q.left,de=q.top,Ce=J.x||J.clientX,xe=J.y||J.clientY;R=U.containerToLngLat([Ce-he,xe-de])}U.on("mousemove",G),document.addEventListener("mouseup",ne),O.current&&O.current(V.current.lng,V.current.lat)},G=J=>{if(!S)return;const re=J.lngLat||J.lnglat,{lng:q,lat:ae}=R,{lng:he,lat:de}=re,Ce={lng:V.current.lng+he-q,lat:V.current.lat+de-ae};V.current=Ce,R=re,te(U),K.current&&K.current(Ce.lng,Ce.lat)},ne=()=>{S&&(S=!1,U.setMapStatus({dragEnable:!0,zoomEnable:!0}),U.off("mousemove",G),document.removeEventListener("mouseup",ne),ee.current&&ee.current(V.current.lng,V.current.lat))};v.addEventListener("click",(J=>{var re;return(re=w.current)==null?void 0:re.call(w,J)})),v.addEventListener("mouseenter",(J=>{var re;return(re=P.current)==null?void 0:re.call(P,J)})),v.addEventListener("mouseleave",(J=>{var re;return(re=$.current)==null?void 0:re.call($,J)})),v.addEventListener("dblclick",(J=>{var re;return(re=j.current)==null?void 0:re.call(j,J)})),c&&v.addEventListener("mousedown",B),m.current={updatePosition:ie,handleDragStart:B,handleDragMove:G,handleDragEnd:ne}})(),()=>{if(_=!0,le(U,"camerachange",ie),le(U,"viewchange",ie),le(M,"resize",ce),m.current&&c&&U.setMapStatus({dragEnable:!0,zoomEnable:!0}),H.current){const D=N.current,S=H.current;N.current=null,H.current=null,queueMicrotask(()=>{D&&D.unmount(),S.parentNode&&S.parentNode.removeChild(S)})}m.current=null}},[M,z,A,I,T,c,h]),u.useEffect(()=>{if(!H.current)return;const _=H.current;mr(X)?_.innerHTML=X:(N.current||(N.current=k0.createRoot(_)),N.current.render(i.jsx(i.Fragment,{children:X})))},[X]),u.useEffect(()=>{H.current&&(H.current.className=Y)},[Y]),u.useEffect(()=>{if(V.current={lng:e,lat:t},M&&H.current){const _=M.mapService;_&&te(_)}},[e,t,M]),null}function Y1({interactions:e}){const t=me(),[n,r]=u.useState(null);u.useEffect(()=>{if(!t)return;const s=()=>{try{const c=t.mapService;if(c&&typeof c.getMarkerContainer=="function"){const d=c.getMarkerContainer();if(d){r(d);return}}}catch{}const a=setTimeout(()=>{try{const c=t.mapService;if(c&&typeof c.getMarkerContainer=="function"){const d=c.getMarkerContainer();d&&r(d)}}catch{}},100);return()=>clearTimeout(a)};return t.loaded?s():(t.on("loaded",s),()=>{t.off("loaded",s)})},[t]);const o=e.filter(s=>s.type==="marker"),l=e.filter(s=>s.type==="popup");return i.jsxs(i.Fragment,{children:[n&&o.map((s,a)=>i.jsx(Oe,{...s,overlayContainer:n},`marker-${a}`)),n&&l.map((s,a)=>i.jsx(qe,{...s,overlayContainer:n},`popup-${a}`))]})}function At({title:e,labels:t,colors:n,swatchShape:r="square",grid:o=!1,className:l,interaction:s}){const[a,c]=u.useState(-1),[d,h]=u.useState(new Set),f=y=>{var C;c(y),(C=s==null?void 0:s.onHover)==null||C.call(s,y)},p=()=>{var y;c(-1),(y=s==null?void 0:s.onHover)==null||y.call(s,-1)},g=y=>{var C;h(b=>{const x=new Set(b);return x.has(y)?x.delete(y):x.add(y),x}),(C=s==null?void 0:s.onToggle)==null||C.call(s,y)};return i.jsxs("div",{className:fe(l),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsx("div",{className:fe("flex flex-col gap-1",o&&"grid grid-cols-2 gap-x-3 gap-y-1"),children:t.map((y,C)=>{const b=a>=0?a!==C:d.has(C);return i.jsxs("div",{className:fe("flex items-center gap-2 rounded px-1 py-0.5 cursor-pointer select-none transition-[background,opacity] duration-150 hover:bg-primary/[0.06]",b&&"opacity-35"),onMouseEnter:()=>f(C),onMouseLeave:p,onClick:()=>g(C),children:[i.jsx("span",{className:fe("size-3 shrink-0 rounded-sm shadow-[inset_0_0_0_1px_rgba(0,0,0,0.08)] transition-opacity duration-150",r==="circle"&&"rounded-full"),style:{backgroundColor:n[C]??"#ccc"}}),i.jsx("span",{className:"text-xs leading-4 text-on-surface truncate",children:y})]},C)})})]})}function Zt({title:e,labels:t,colors:n,isContinuous:r=!1,showTicks:o=!1,brushable:l=!1,className:s,interaction:a}){const[c,d]=u.useState([0,100]),h=u.useRef(null),f=n.join(", "),p=u.useCallback(g=>y=>{y.stopPropagation(),y.preventDefault();const C=h.current;if(!C)return;const b=C.getBoundingClientRect().width,x=L=>{const z=C.getBoundingClientRect(),E=L.clientX-z.left,T=Math.max(0,Math.min(100,E/b*100));d(M=>{var N;let H;return g==="left"?H=[Math.min(T,M[1]-5),M[1]]:H=[M[0],Math.max(T,M[0]+5)],(N=a==null?void 0:a.onBrush)==null||N.call(a,H),H})},k=()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k)};document.addEventListener("mousemove",x),document.addEventListener("mouseup",k)},[a,h]);return i.jsxs("div",{className:fe(s),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsxs("div",{className:"flex flex-col gap-1",ref:h,children:[i.jsx("div",{className:fe("flex h-3 rounded overflow-hidden shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",r&&"bg-[length:100%_100%]"),style:r?{background:`linear-gradient(to right, ${f})`}:void 0,children:!r&&n.map((g,y)=>i.jsx("div",{className:"flex-1 relative",style:{backgroundColor:g}},y))}),o&&i.jsx("div",{className:"flex justify-between h-1.5 mt-0.5",children:n.map((g,y)=>y===0?null:i.jsx("div",{className:"w-px h-full bg-outline-variant",style:{position:"absolute",left:`${y/(n.length-1)*100}%`}},y))}),i.jsxs("div",{className:"flex justify-between font-mono text-[11px] leading-3.5 font-[450] text-on-surface-variant",children:[i.jsx("span",{children:t[0]}),t.length>2&&i.jsx("span",{children:t[Math.floor(t.length/2)]}),i.jsx("span",{children:t[t.length-1]})]}),l&&i.jsxs("div",{className:"relative h-3 mt-1 cursor-ew-resize",children:[i.jsx("div",{className:"absolute top-0 h-full border-2 border-primary rounded-sm bg-primary/10 pointer-events-none",style:{left:`${c[0]}%`,width:`${c[1]-c[0]}%`}}),i.jsx("div",{className:"absolute top-1/2 w-2 h-4 bg-primary rounded-sm -translate-x-1/2 -translate-y-1/2 cursor-ew-resize shadow-sm hover:shadow-md hover:shadow-primary/30 transition-shadow duration-150",style:{left:`${c[0]}%`},onMouseDown:p("left")}),i.jsx("div",{className:"absolute top-1/2 w-2 h-4 bg-primary rounded-sm -translate-x-1/2 -translate-y-1/2 cursor-ew-resize shadow-sm hover:shadow-md hover:shadow-primary/30 transition-shadow duration-150",style:{left:`${c[1]}%`},onMouseDown:p("right")})]})]})]})}function Ft({title:e,colors:t,labels:n,middleLabel:r,className:o}){const l=t.join(", ");return i.jsxs("div",{className:fe(o),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsxs("div",{className:"flex flex-col gap-1",children:[i.jsxs("div",{style:{position:"relative"},children:[i.jsx("div",{className:"flex h-3 rounded overflow-hidden shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{background:`linear-gradient(to right, ${l})`}}),i.jsx("div",{style:{position:"absolute",top:-4,left:"50%",transform:"translateX(-50%)",width:1,height:20,background:"var(--color-outline-variant, #c3c6d7)"}}),r&&i.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-[18px] font-mono text-[11px] text-on-surface-variant whitespace-nowrap",children:r})]}),i.jsxs("div",{className:"flex justify-between font-mono text-[11px] leading-3.5 font-[450] text-on-surface-variant",style:r?{marginBottom:12}:void 0,children:[i.jsx("span",{children:n[0]}),i.jsx("span",{children:n[1]})]})]})]})}function Tt({title:e,ranges:t,colors:n,className:r,interaction:o}){const[l,s]=u.useState(-1),[a,c]=u.useState(new Set),d=p=>{var g;s(p),(g=o==null?void 0:o.onHover)==null||g.call(o,p)},h=()=>{var p;s(-1),(p=o==null?void 0:o.onHover)==null||p.call(o,-1)},f=p=>{var g;c(y=>{const C=new Set(y);return C.has(p)?C.delete(p):C.add(p),C}),(g=o==null?void 0:o.onToggle)==null||g.call(o,p)};return i.jsxs("div",{className:fe(r),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsx("div",{className:"flex flex-col gap-1.5",children:t.map(([p,g],y)=>{const C=l>=0?l!==y:a.has(y);return i.jsxs("div",{className:fe("flex items-center gap-2 cursor-pointer select-none transition-opacity duration-150 hover:opacity-80",C&&"opacity-35"),onMouseEnter:()=>d(y),onMouseLeave:h,onClick:()=>f(y),children:[i.jsx("span",{className:"w-6 h-3 shrink-0 rounded-sm shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{backgroundColor:n[y]??"#ccc"}}),i.jsxs("span",{className:"font-mono text-[11px] leading-3.5 text-on-surface-variant",children:["[",p,", ",g,")"]})]},y)})})]})}function Nt({title:e,fillColor:t="#4A90D9",items:n,className:r}){const o=Math.max(...n.map(l=>l.size),1);return i.jsxs("div",{className:fe(r),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("div",{className:"flex items-end gap-2 px-1",children:n.map((l,s)=>i.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:o},children:i.jsx("div",{className:"rounded-full shrink-0 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{width:l.size,height:l.size,backgroundColor:t,opacity:.85}})},s))}),i.jsx("div",{className:"flex items-end gap-2 mt-1",children:n.map((l,s)=>i.jsx("span",{className:"font-mono text-[11px] leading-3.5 text-on-surface-variant whitespace-nowrap",children:l.label},s))})]})]})}function It({title:e,color:t="#4A90D9",items:n,className:r,interaction:o}){const[l,s]=u.useState(-1),[a,c]=u.useState(new Set),d=p=>{var g;s(p),(g=o==null?void 0:o.onHover)==null||g.call(o,p)},h=()=>{var p;s(-1),(p=o==null?void 0:o.onHover)==null||p.call(o,-1)},f=p=>{var g;c(y=>{const C=new Set(y);return C.has(p)?C.delete(p):C.add(p),C}),(g=o==null?void 0:o.onToggle)==null||g.call(o,p)};return i.jsxs("div",{className:fe(r),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsx("div",{className:"flex flex-col gap-1.5",children:n.map((p,g)=>{const y=l>=0?l!==g:a.has(g);return i.jsxs("div",{className:fe("flex items-center gap-2.5 py-0.5 cursor-pointer select-none transition-opacity duration-150 hover:opacity-80",y&&"opacity-35"),onMouseEnter:()=>d(g),onMouseLeave:h,onClick:()=>f(g),children:[i.jsx("div",{className:"w-7 shrink-0 rounded-full shadow-[0_0_0_1px_rgba(0,0,0,0.06)]",style:{height:p.width,backgroundColor:t,opacity:.85}}),i.jsx("span",{className:"text-xs leading-4 text-on-surface whitespace-nowrap",children:p.label})]},g)})})]})}function Pt({title:e,labels:t,fillColor:n="#4A90D9",className:r}){return i.jsxs("div",{className:fe(r),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("div",{className:"flex items-end gap-2 px-1",children:t.map(([s,a],c)=>{const h=6+c/Math.max(t.length-1,1)*18;return i.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:24},children:i.jsx("div",{className:"rounded-full shrink-0 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{width:h,height:h,backgroundColor:n,opacity:.85}})},c)})}),i.jsx("div",{className:"flex items-end gap-2 mt-1",children:t.map(([s,a],c)=>i.jsxs("span",{className:"font-mono text-[11px] leading-3.5 text-on-surface-variant whitespace-nowrap",children:[s,"–",a]},c))})]})]})}function X1(e){return/^(https?:|\/\/|data:)/i.test(e)}function Dt({title:e,items:t,className:n,interaction:r}){const[o,l]=u.useState(-1),[s,a]=u.useState(new Set),c=f=>{var p;l(f),(p=r==null?void 0:r.onHover)==null||p.call(r,f)},d=()=>{var f;l(-1),(f=r==null?void 0:r.onHover)==null||f.call(r,-1)},h=f=>{var p;a(g=>{const y=new Set(g);return y.has(f)?y.delete(f):y.add(f),y}),(p=r==null?void 0:r.onToggle)==null||p.call(r,f)};return i.jsxs("div",{className:fe(n),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsx("div",{className:"flex flex-col gap-1",children:t.map((f,p)=>{const g=o>=0?o!==p:s.has(p);return i.jsxs("div",{className:fe("flex items-center gap-2 px-1 py-0.5 rounded cursor-pointer select-none transition-[background,opacity] duration-150 hover:bg-primary/[0.06]",g&&"opacity-35"),onMouseEnter:()=>c(p),onMouseLeave:d,onClick:()=>h(p),children:[X1(f.icon)?i.jsx("img",{src:f.icon,alt:f.label,className:"size-5 object-contain shrink-0",onError:y=>{const C=y.target;C.style.display="none";const b=C.nextElementSibling;b&&(b.style.display="flex")}}):i.jsx("span",{className:"size-5 flex items-center justify-center shrink-0 text-base leading-none",children:f.icon}),X1(f.icon)&&i.jsx("span",{className:"size-5 hidden items-center justify-center shrink-0 text-base leading-none text-on-surface-variant",children:"□"}),i.jsx("span",{className:"text-xs leading-4 text-on-surface",children:f.label})]},p)})})]})}function G1({legends:e,className:t,style:n,interaction:r}){return e.length?i.jsx("div",{className:fe("absolute z-20 bottom-6 left-6 max-h-[40%] overflow-y-auto rounded-xl border border-outline-variant/30 bg-surface/80 backdrop-blur-md p-3 px-3.5 text-on-surface shadow-lg scrollbar-thin scrollbar-track-transparent scrollbar-thumb-outline-variant",t),style:n,children:i.jsx("div",{className:"flex flex-col gap-4 [&>*+*]:border-t [&>*+*]:border-outline-variant/20 [&>*+*]:pt-4",children:e.map((o,l)=>i.jsx(Mr,{legend:o,interaction:r},`legend-${l}`))})}):null}function Mr({legend:e,interaction:t}){switch(e.type){case"categories":return i.jsx(At,{...e,interaction:t});case"ramp":return i.jsx(Zt,{...e,interaction:t});case"diverging":return i.jsx(Ft,{...e,interaction:t});case"threshold":return i.jsx(Tt,{...e,interaction:t});case"size":return i.jsx(Nt,{...e,interaction:t});case"lineWidth":return i.jsx(It,{...e,interaction:t});case"proportion":return i.jsx(Pt,{...e,interaction:t});case"icon":return i.jsx(Dt,{...e,interaction:t});default:return null}}const J1=u.createContext({isMobile:!1,breakpoint:768,width:typeof window<"u"?window.innerWidth:1024,schema:void 0});function kr({responsive:e,children:t}){const[n,r]=u.useState(typeof window<"u"?window.innerWidth:1024);u.useEffect(()=>{const a=()=>r(window.innerWidth);return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]);const o=(e==null?void 0:e.breakpoint)??768,l=n<o,s=u.useMemo(()=>({isMobile:l,breakpoint:o,width:n,schema:e}),[l,o,n,e]);return i.jsx(J1.Provider,{value:s,children:t})}function K1(){return u.useContext(J1)}function Q1({config:e,className:t}){const n=me(),{items:r,position:o="bottom"}=e,l=c=>{switch(c){case"zoomIn":n==null||n.zoomIn();break;case"zoomOut":n==null||n.zoomOut();break;case"locate":navigator.geolocation&&navigator.geolocation.getCurrentPosition(d=>{n==null||n.setCenter([d.coords.longitude,d.coords.latitude]),n==null||n.setZoom(14)});break;case"reset":n==null||n.setCenter([105,35]),n==null||n.setZoom(4);break}},s={zoomIn:i.jsx("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:i.jsx("path",{d:"M12 5v14m-7-7h14"})}),zoomOut:i.jsx("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:i.jsx("path",{d:"M5 12h14"})}),locate:i.jsxs("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:[i.jsx("circle",{cx:"12",cy:"12",r:"3"}),i.jsx("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2"})]}),reset:i.jsxs("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:[i.jsx("path",{d:"M3 12a9 9 0 1 1 3.3 6.9"}),i.jsx("path",{d:"M3 22v-7h7"})]}),layers:i.jsx("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:i.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"})})},a={zoomIn:"放大",zoomOut:"缩小",locate:"定位",reset:"复位",layers:"图层"};return i.jsx("div",{className:fe("aimapui-mobile-toolbar pointer-events-none",o==="bottom"?"aimapui-mobile-toolbar--bottom":"aimapui-mobile-toolbar--top",t),children:i.jsx("div",{className:"aimapui-mobile-toolbar__bar pointer-events-auto",children:r.map((c,d)=>i.jsxs("button",{onClick:()=>l(c),className:"aimapui-mobile-toolbar__button group",style:{background:"none",border:"none",cursor:"pointer"},"aria-label":a[c]??c,title:a[c]??c,children:[i.jsx("span",{className:"aimapui-mobile-toolbar__icon",children:s[c]}),i.jsx("span",{className:"aimapui-mobile-toolbar__label",children:a[c]??c})]},`${c}-${d}`))})})}function R1({legends:e,className:t,interaction:n}){const[r,o]=u.useState(!1);return e.length?i.jsx("div",{className:fe("aimapui-mobile-sheet-legend",t),children:i.jsxs("div",{className:"aimapui-mobile-sheet-legend__panel",children:[i.jsx("div",{className:"aimapui-mobile-sheet-legend__handle","aria-hidden":"true"}),i.jsxs("button",{onClick:()=>o(!r),className:"aimapui-mobile-sheet-legend__toggle",style:{background:"none",border:"none",cursor:"pointer"},children:[i.jsxs("span",{className:"aimapui-mobile-sheet-legend__toggle-copy",children:[i.jsx("span",{className:"aimapui-mobile-sheet-legend__eyebrow",children:"Legend Panel"}),i.jsxs("span",{className:"aimapui-mobile-sheet-legend__title-row",children:[i.jsx("span",{className:"aimapui-mobile-sheet-legend__title",children:"图例"}),i.jsxs("span",{className:"aimapui-mobile-sheet-legend__badge",children:[e.length," 项"]})]})]}),i.jsx("span",{className:"aimapui-mobile-sheet-legend__chevron-shell","aria-hidden":"true",children:i.jsx("svg",{viewBox:"0 0 24 24",className:fe("aimapui-mobile-sheet-legend__chevron",r&&"aimapui-mobile-sheet-legend__chevron--expanded"),fill:"none",stroke:"currentColor",strokeWidth:2,children:i.jsx("path",{d:"M6 9l6 6 6-6"})})})]}),i.jsx("div",{className:fe("aimapui-mobile-sheet-legend__content custom-scrollbar",r?"aimapui-mobile-sheet-legend__content--expanded":"aimapui-mobile-sheet-legend__content--collapsed"),children:e.map((l,s)=>i.jsx("div",{className:"aimapui-mobile-sheet-legend__section",children:i.jsx(Sr,{legend:l,interaction:n})},`mobile-legend-${s}`))})]})}):null}function Sr({legend:e,interaction:t}){switch(e.type){case"categories":return i.jsx(At,{...e,interaction:t});case"ramp":return i.jsx(Zt,{...e,interaction:t});case"diverging":return i.jsx(Ft,{...e,interaction:t});case"threshold":return i.jsx(Tt,{...e,interaction:t});case"size":return i.jsx(Nt,{...e,interaction:t});case"lineWidth":return i.jsx(It,{...e,interaction:t});case"proportion":return i.jsx(Pt,{...e,interaction:t});case"icon":return i.jsx(Dt,{...e,interaction:t});default:return null}}function zr({map:e,schema:t,theme:n="light",onSceneReady:r,onLayerClick:o,onLayerMouseMove:l,onLayerMouseEnter:s,onLayerMouseLeave:a,onMapMove:c,onMapZoom:d,autoFit:h,events:f,children:p,className:g,style:y}){const C=u.useRef(null),b=u.useMemo(()=>{if(t)return it(Xt(t));const E=e??{basemap:"gaode"};return!E.basemap&&!E.engine&&(E.basemap="gaode"),{map:Vr(E),layers:[],controls:[],interactions:[],legends:[]}},[t,e]),x=!t&&!!e,k=u.useMemo(()=>({onClick:o,onMouseMove:l,onMouseEnter:s,onMouseLeave:a}),[o,l,s,a]),L=u.useMemo(()=>({onMove:c,onZoom:d}),[c,d]),z=u.useCallback(E=>{r==null||r(E)},[r]);return i.jsx(n1,{defaultTheme:n,target:"container",children:i.jsx(Jt,{schema:b,children:i.jsx(e1,{events:f,children:i.jsx(D0,{responsive:b.responsive,children:i.jsx(Er,{schema:b,isComposableMode:x,autoFit:h,onSceneReady:z,layerEventHandlers:k,mapEventHandlers:L,containerRef:C,className:g,style:y,children:p})})})})})}function Hr(){const e=me();return u.useEffect(()=>{if(!e)return;let t=!1,n=null,r=null;const o=new Set,l=()=>{var b,x;if(t)return;const h=((b=e.getLayers)==null?void 0:b.call(e))??[];if(h.length===0)return;let f=1/0,p=1/0,g=-1/0,y=-1/0,C=!1;for(const k of h)try{const L=(x=k.getSource)==null?void 0:x.call(k),z=L==null?void 0:L.extent;if(!z||!Array.isArray(z)||z.length<4)continue;const[E,T,M,H]=z;if(!isFinite(E)||!isFinite(T)||!isFinite(M)||!isFinite(H)||E>=M||T>=H)continue;f=Math.min(f,E),p=Math.min(p,T),g=Math.max(g,M),y=Math.max(y,H),C=!0}catch{}if(!(!C||f>=g||p>=y))try{e.fitBounds([[f,p],[g,y]]),t=!0}catch{}},s=()=>{t||(n&&clearTimeout(n),n=setTimeout(l,200))};let a=0;const c=50,d=()=>{var f;if(t)return;a+=1;const h=((f=e.getLayers)==null?void 0:f.call(e))??[];for(const p of h)o.has(p)||(o.add(p),p.inited&&s(),typeof p.on=="function"&&p.on("inited",s));!t&&a<c&&(r=setTimeout(d,100))};return r=setTimeout(d,100),()=>{n&&clearTimeout(n),r&&clearTimeout(r)}},[e]),null}function Vr(e){return{basemap:e.basemap??(e.engine?void 0:"gaode"),engine:e.engine,token:e.token,style:e.style,center:e.center??[105,35],zoom:e.zoom??4,pitch:e.pitch??0,rotation:e.rotation??0,minZoom:e.minZoom,maxZoom:e.maxZoom,bounds:e.bounds,gestureConfig:e.gestureConfig}}function Er({schema:e,isComposableMode:t,autoFit:n,onSceneReady:r,layerEventHandlers:o,mapEventHandlers:l,containerRef:s,className:a,style:c,children:d}){var b,x;const{isMobile:h}=K1(),[f,p]=u.useState(e.layers??[]),g=u.useMemo(()=>{var L,z;if(t||!h||!((z=(L=e.responsive)==null?void 0:L.mobile)!=null&&z.layers))return e.layers;const k=e.responsive.mobile.layers;if("*"in k){const E=k["*"];return e.layers.map(T=>({...T,...E,id:T.id}))}return e.layers.map(E=>E.id&&k[E.id]?{...E,...k[E.id],id:E.id}:E)},[e.layers,e.responsive,h,t]),y=u.useMemo(()=>{var z,E;const k=e.controls??[];if(!h||!((E=(z=e.responsive)==null?void 0:z.mobile)!=null&&E.controls))return k;const L=e.responsive.mobile.controls;return L.hide?k.filter(T=>!L.hide.includes(T.type)):k},[e.controls,e.responsive,h]),C=u.useCallback((k,L)=>{p(z=>z.map(E=>E.id===k?{...E,visible:L}:E))},[]);return i.jsx("div",{ref:s,className:a??"aimapui-container",style:c??{width:"100%",height:"100%"},children:i.jsxs(l1,{mapSchema:e.map,onSceneReady:r,mapEventHandlers:l,events:e.events,style:{width:"100%",height:"100%"},children:[n&&i.jsx(Hr,{}),!t&&g.length>0&&i.jsx(y1,{layers:g,eventHandlers:o}),!t&&i.jsx(O1,{controls:y,layers:g,onLayerToggle:C,containerRef:s}),!t&&e.interactions&&e.interactions.length>0&&i.jsx(Y1,{interactions:e.interactions}),!t&&(h?e.legends&&e.legends.length>0&&i.jsx(R1,{legends:e.legends}):i.jsx(G1,{legends:e.legends??[]})),!t&&h&&((x=(b=e.responsive)==null?void 0:b.mobile)==null?void 0:x.toolbar)&&i.jsx(Q1,{config:e.responsive.mobile.toolbar}),t?i.jsx(Ar,{children:d}):null]})})}function Ar({children:e}){const{controls:t,others:n}=u.useMemo(()=>{const r=[],o=[];return u.Children.forEach(e,(l,s)=>{u.isValidElement(l)&&we.check(l)?r.push(l):o.push(l)}),{controls:r,others:o}},[e]);return i.jsxs(i.Fragment,{children:[t.length>0&&i.jsx(gt,{children:t}),n]})}function Ye(e,t){if(e===t)return!1;if(e==null||t==null||typeof e!=typeof t||typeof e!="object")return!0;try{return JSON.stringify(e)!==JSON.stringify(t)}catch{return!0}}function Zr(e,t){const n=Ye(e.map,t.map),r=new Map;(e.layers??[]).forEach(b=>{b.id&&r.set(b.id,b)});const o=new Map;(t.layers??[]).forEach(b=>{b.id&&o.set(b.id,b)});const l=[],s=[],a=[];(t.layers??[]).forEach((b,x)=>{const k=b.id??`__index_${x}`;if(!r.has(k))l.push(b);else{const L=r.get(k);Ye(L,b)&&a.push({id:k,prev:L,next:b})}}),(e.layers??[]).forEach((b,x)=>{const k=b.id??`__index_${x}`;o.has(k)||s.push(k)});const c=e.controls??[],d=t.controls??[],h=[],f=[],p=[],g=Math.max(c.length,d.length);for(let b=0;b<g;b++)b>=c.length?h.push(d[b]):b>=d.length?f.push(c[b]):Ye(c[b],d[b])&&p.push({index:b,prev:c[b],next:d[b]});const y=Ye(e.interactions,t.interactions),C=Ye(e.legends,t.legends);return{mapChanged:n,layersAdded:l,layersRemoved:s,layersUpdated:a,controlsAdded:h,controlsRemoved:f,controlsUpdated:p,interactionsChanged:y,legendsChanged:C}}function Fr(e){const t=[];return e.map?t.push(...Tr(e.map)):t.push({path:"map",message:"map is required",severity:"error"}),!e.layers||!Array.isArray(e.layers)?t.push({path:"layers",message:"layers must be an array",severity:"error"}):e.layers.forEach((n,r)=>{t.push(...Nr(n,r))}),e.controls&&(Array.isArray(e.controls)?e.controls.forEach((n,r)=>{n.type||t.push({path:`controls[${r}].type`,message:"control type is required",severity:"error"})}):t.push({path:"controls",message:"controls must be an array",severity:"error"})),e.interactions&&(Array.isArray(e.interactions)?e.interactions.forEach((n,r)=>{(n.type==="marker"||n.type==="popup")&&(typeof n.longitude!="number"||typeof n.latitude!="number")&&t.push({path:`interactions[${r}]`,message:"marker/popup requires longitude and latitude as numbers",severity:"error"})}):t.push({path:"interactions",message:"interactions must be an array",severity:"error"})),e.legends&&(Array.isArray(e.legends)?e.legends.forEach((n,r)=>{n.type||t.push({path:`legends[${r}].type`,message:"legend type is required",severity:"error"})}):t.push({path:"legends",message:"legends must be an array",severity:"error"})),t}function Tr(e){const t=[],n=["gaode","mapbox","maplibre","tianditu","tencent","baidu","google","map"];if(e.basemap&&!n.includes(e.basemap)&&t.push({path:"map.basemap",message:`Invalid basemap "${e.basemap}". Valid values: ${n.join(", ")}`,severity:"error"}),e.center){const[r,o]=e.center;(r<-180||r>180)&&t.push({path:"map.center[0]",message:"Longitude must be between -180 and 180",severity:"error"}),(o<-90||o>90)&&t.push({path:"map.center[1]",message:"Latitude must be between -90 and 90",severity:"error"})}return e.zoom!==void 0&&(e.zoom<0||e.zoom>22)&&t.push({path:"map.zoom",message:"Zoom must be between 0 and 22",severity:"warning"}),e.basemap&&["gaode","mapbox","tianditu","tencent","baidu","google"].includes(e.basemap)&&!e.token&&t.push({path:"map.token",message:`basemap "${e.basemap}" requires a token`,severity:"warning"}),t}function Nr(e,t){const n=[],r=`layers[${t}]`,o=["point","line","polygon","heatmap","raster","image"];return e.type?o.includes(e.type)||n.push({path:`${r}.type`,message:`Invalid layer type "${e.type}". Valid values: ${o.join(", ")}`,severity:"error"}):n.push({path:`${r}.type`,message:"layer type is required",severity:"error"}),e.source===void 0&&e.source,e.colorField&&!e.colorValues&&!e.color&&n.push({path:`${r}.colorValues`,message:"colorField is set but colorValues is not. L7 will use default scale.",severity:"warning"}),e.sizeField&&!e.sizeValues&&e.size===void 0&&n.push({path:`${r}.sizeValues`,message:"sizeField is set but sizeValues is not. L7 will use default scale.",severity:"warning"}),n}const Ir={$schema:"http://json-schema.org/draft-07/schema#",title:"AiMapSchema",description:"Schema-driven React map visualization component configuration",type:"object",required:["map","layers"],properties:{map:{type:"object",required:["basemap"],properties:{basemap:{type:"string",enum:["gaode","mapbox","maplibre","tianditu","tencent","baidu","google","map"],description:"Map base tile provider"},token:{type:"string",description:"API token for the map service"},style:{type:"string",description:"Map style preset (light/dark/normal/darkblue/satellite) or custom URL"},center:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"Map center [longitude, latitude], default [105, 35]"},zoom:{type:"number",description:"Map zoom level, default 4"},pitch:{type:"number",description:"Map pitch in degrees, default 0"},rotation:{type:"number",description:"Map rotation in degrees, default 0"},minZoom:{type:"number",description:"Minimum zoom level"},maxZoom:{type:"number",description:"Maximum zoom level"},bounds:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2,description:"Initial bounds [[swLng, swLat], [neLng, neLat]]"},gestureConfig:{type:"object",properties:{dragPan:{type:"boolean"},pinchZoom:{type:"boolean"},dragRotate:{type:"boolean"}}}}},layers:{type:"array",description:"Array of map layers",items:{type:"object",required:["type","source"],properties:{id:{type:"string",description:"Unique layer ID (auto-generated if omitted)"},type:{type:"string",enum:["point","line","polygon","heatmap","raster","image"],description:"Layer visualization type"},name:{type:"string",description:"Human-readable layer name"},visible:{type:"boolean",default:!0},zIndex:{type:"number",default:0},minZoom:{type:"number"},maxZoom:{type:"number"},autoFit:{type:"boolean",default:!1},source:{description:"GeoJSON, JSON array, or URL string"},sourceType:{type:"string",enum:["geojson","json","csv"]},sourceConfig:{type:"object",properties:{x:{type:"string",description:"Longitude field name"},y:{type:"string",description:"Latitude field name"},x1:{type:"string",description:"End longitude field (for arc lines)"},y1:{type:"string",description:"End latitude field (for arc lines)"},coordinates:{type:"string",description:"Coordinates field"}}},color:{type:"string",description:"Fixed color"},colorField:{type:"string",description:"Field to map color to"},colorValues:{oneOf:[{type:"string",description:"Color palette name"},{type:"array",items:{type:"string"},description:"Array of color values"}]},size:{type:"number",description:"Fixed size"},sizeField:{type:"string",description:"Field to map size to"},sizeValues:{type:"array",items:{type:"number"},description:"Size range [min, max]"},shape:{type:"string",description:"Fixed shape"},shapeField:{type:"string",description:"Field to map shape to"},shapeValues:{type:"array",items:{type:"string"}},style:{type:"object",description:"Additional style properties"},filterField:{type:"string"},filterValues:{type:"array"},animate:{type:"object",properties:{enable:{type:"boolean"},speed:{type:"number"},duration:{type:"number"},trailLength:{type:"number"},repeat:{type:"number"}}},active:{oneOf:[{type:"boolean"},{type:"object",properties:{color:{type:"string"}}}]},select:{oneOf:[{type:"boolean"},{type:"object",properties:{color:{type:"string"}}}]},events:{type:"object",description:"Layer event configuration",properties:{click:{type:"string",description:"Event identifier emitted on click (via EventBus)"},mousemove:{type:"string",description:"Event identifier emitted on mousemove"},mouseenter:{type:"string",description:"Event identifier emitted on mouseenter"},mouseleave:{type:"string",description:"Event identifier emitted on mouseleave"},enablePopup:{type:"boolean",description:"Auto-show popup on click"},popupFields:{type:"array",items:{type:"string"},description:"Fields to show in popup"},popupTemplate:{type:"string",description:"HTML template with {{field}} interpolation"}}}}}},controls:{type:"array",description:"Map control widgets",items:{type:"object",required:["type"],properties:{type:{type:"string",enum:["zoom","scale","fullscreen","geoLocate","mapTheme","mouseLocation","exportImage","layerSwitch"]},position:{type:"string",enum:["topleft","topright","bottomleft","bottomright","topcenter","bottomcenter"]},options:{type:"object"}}}},interactions:{type:"array",description:"Interactive elements (markers, popups, tooltips)",items:{oneOf:[{type:"object",required:["type","longitude","latitude"],properties:{type:{type:"string",const:"marker"},longitude:{type:"number"},latitude:{type:"number"},content:{type:"string"},draggable:{type:"boolean"}}},{type:"object",required:["type","longitude","latitude","content"],properties:{type:{type:"string",const:"popup"},longitude:{type:"number"},latitude:{type:"number"},content:{type:"string"},closeButton:{type:"boolean"}}},{type:"object",required:["type","content"],properties:{type:{type:"string",const:"tooltip"},content:{type:"string"},trigger:{type:"string",enum:["hover","click"]}}}]}},legends:{type:"array",description:"Legend configurations",items:{oneOf:[{type:"object",required:["type","labels","colors"],properties:{type:{type:"string",const:"categories"},title:{type:"string"},labels:{type:"array",items:{type:"string"}},colors:{type:"array",items:{type:"string"}}}},{type:"object",required:["type","labels","colors"],properties:{type:{type:"string",const:"ramp"},title:{type:"string"},labels:{type:"array",items:{type:"string"}},colors:{type:"array",items:{type:"string"}},isContinuous:{type:"boolean"}}},{type:"object",required:["type","labels"],properties:{type:{type:"string",const:"proportion"},title:{type:"string"},labels:{type:"array",items:{type:"array",items:{type:"number"}}},fillColor:{type:"string"}}},{type:"object",required:["type","items"],properties:{type:{type:"string",const:"icon"},title:{type:"string"},items:{type:"array",items:{type:"object",properties:{icon:{type:"string"},label:{type:"string"}}}}}}]}},responsive:{type:"object",properties:{breakpoint:{type:"number",default:768},mobile:{type:"object",properties:{controls:{type:"object",properties:{position:{type:"string"},scale:{type:"number"},hide:{type:"array",items:{type:"string"}}}},legends:{type:"object",properties:{compact:{type:"boolean"},position:{type:"string"}}},toolbar:{type:"object",required:["items","position"],properties:{items:{type:"array",items:{type:"string"}},position:{type:"string",enum:["bottom","top"]}}}}}}},events:{type:"object",description:"Global event identifier mappings for map and interactions",properties:{mapMove:{type:"string",description:"Event identifier for map move"},mapZoom:{type:"string",description:"Event identifier for map zoom"},markerDragEnd:{type:"string",description:"Event identifier for marker drag end"}}}}};function Se({source:e,sourceType:t,sourceConfig:n,onClick:r,onMouseMove:o,onMouseEnter:l,onMouseLeave:s,onLayerCreated:a,...c}){const d=me();if(!d)return null;const h={...c,type:"point",source:e,sourceType:t??"json",sourceConfig:n},f=r||o||l||s?{onClick:r,onMouseMove:o,onMouseEnter:l,onMouseLeave:s}:void 0;return i.jsx(Pe,{schema:h,scene:d,eventHandlers:f,onLayerCreated:a})}function Ve({source:e,sourceType:t,sourceConfig:n,onClick:r,onMouseMove:o,onMouseEnter:l,onMouseLeave:s,onLayerCreated:a,...c}){const d=me();if(!d)return null;const h={...c,type:"line",source:e,sourceType:t??"json",sourceConfig:n},f=r||o||l||s?{onClick:r,onMouseMove:o,onMouseEnter:l,onMouseLeave:s}:void 0;return i.jsx(Pe,{schema:h,scene:d,eventHandlers:f,onLayerCreated:a})}function rt({source:e,sourceType:t,sourceConfig:n,onClick:r,onMouseMove:o,onMouseEnter:l,onMouseLeave:s,onLayerCreated:a,...c}){const d=me();if(!d)return null;const h={...c,type:"polygon",source:e,sourceType:t??"geojson",sourceConfig:n},f=r||o||l||s?{onClick:r,onMouseMove:o,onMouseEnter:l,onMouseLeave:s}:void 0;return i.jsx(Pe,{schema:h,scene:d,eventHandlers:f,onLayerCreated:a})}function e0({source:e,sourceType:t,sourceConfig:n,onClick:r,onMouseMove:o,onMouseEnter:l,onMouseLeave:s,onLayerCreated:a,...c}){const d=me();if(!d)return null;const h={...c,type:"heatmap",source:e,sourceType:t??"json",sourceConfig:n},f=r||o||l||s?{onClick:r,onMouseMove:o,onMouseEnter:l,onMouseLeave:s}:void 0;return i.jsx(Pe,{schema:h,scene:d,eventHandlers:f,onLayerCreated:a})}function t0({source:e,sourceType:t="json",sourceConfig:n,hexSize:r=100,weightField:o="h12",weightMethod:l="sum",onClick:s,onMouseMove:a,style:c,...d}){const h=[{type:"hexagon",size:r,field:o,method:l}];return i.jsx(e0,{...d,source:e,sourceType:t,sourceConfig:{...n,transforms:h},shape:"hexagonColumn",style:{coverage:.8,angle:0,...c??{}},onClick:s,onMouseMove:a})}function n0({source:e,sourceType:t,sourceConfig:n,onClick:r,...o}){const l=me();if(!l)return null;const s={...o,type:"raster",source:e,sourceType:t??"raster",sourceConfig:n},a=r?{onClick:r}:void 0;return i.jsx(Pe,{schema:s,scene:l,eventHandlers:a})}function Pr({source:e,sourceType:t,sourceConfig:n,onClick:r,...o}){const l=me();if(!l)return null;const s={...o,type:"image",source:e,sourceType:t??"image",sourceConfig:n},a=r?{onClick:r}:void 0;return i.jsx(Pe,{schema:s,scene:l,eventHandlers:a})}const Dr=[8,16,32,48,64],ot={primary:"#2563eb",warning:"#f59e0b",error:"#ef4444",success:"#10b981"};function $r({source:e,sourceType:t="geojson",sourceConfig:n,labelField:r="name",labelColor:o="#0b3b8c",labelSize:l=12,showLabel:s=!0,labelOffset:a,sizeDomain:c,bubbleAnchor:d="bottom",labelAnchor:h="top",hoverEffect:f=!0,clickEffect:p=!0,tooltipEffect:g=!0,tooltipFields:y,tooltipTemplate:C,semanticColorField:b,color:x="#2563eb",size:k=16,sizeField:L,sizeValues:z,style:E,active:T,select:M,onClick:H,onMouseMove:N,onMouseEnter:V,onMouseLeave:F,...A}){const I=b??A.colorField,m=A.colorValues??(b?[ot.primary,ot.warning,ot.error,ot.success]:void 0),w=L?z??[...Dr]:z,P={color:"#60a5fa"},$={color:"#1d4ed8"},j=(()=>{const X=A.events;return g?{...X,enablePopup:(X==null?void 0:X.enablePopup)??!0,popupFields:(X==null?void 0:X.popupFields)??y,popupTemplate:(X==null?void 0:X.popupTemplate)??C}:X})(),[O,K]=u.useState(!1);u.useEffect(()=>{const X=requestAnimationFrame(()=>K(!0));return()=>cancelAnimationFrame(X)},[]);const ee=s&&O,Y=L?{sizeField:L,sizeValues:w}:{size:k};return i.jsxs(i.Fragment,{children:[i.jsx(Se,{source:e,sourceType:t,sourceConfig:n,shape:"circle",color:x,colorField:I,colorValues:m,...Y,opacity:.75,active:f?T??P:T,select:p?M??$:M,events:j,zIndex:A.zIndex??0,autoFit:A.autoFit,visible:A.visible,name:A.name??"bubble-circle",onClick:H,onMouseMove:N,onMouseEnter:V,onMouseLeave:F,style:{stroke:x??"#004ac6",strokeWidth:2,strokeOpacity:1,...E??{}}}),ee&&i.jsx(Se,{source:e,sourceType:t,sourceConfig:n,shapeField:r,shapeValues:"text",color:o,size:l,zIndex:(A.zIndex??0)+1,style:{textAnchor:h,textOffset:a??[0,0],stroke:"#fff",strokeWidth:2,textAllowOverlap:!0}})]})}function _r({source:e,sourceType:t="geojson",sourceConfig:n,gridSize:r=60,minClusterSize:o=2,animationDuration:l=300,easing:s="cubic-bezier(0.4, 0, 0.2, 1)",onPointClick:a,onClusterClick:c}){const d=me(),[h,f]=u.useState([]),[p,g]=u.useState(null),[y,C]=u.useState(null),b=u.useRef(null),x=u.useRef(-1),k=u.useMemo(()=>Br(e,t,n),[e,t,n]);u.useEffect(()=>{if(k.length===0){b.current=null,f([]),x.current=-1;return}const M=new S0({radius:r,minPoints:o,maxZoom:20,minZoom:0}),H=k.map(N=>({type:"Feature",properties:{id:N.id,...N.properties},geometry:{type:"Point",coordinates:[N.lng,N.lat]}}));M.load(H),b.current=M,x.current=-1},[k,r,o]);const L=u.useCallback((M,H)=>{try{const N=Math.floor(H.getZoom());if(N===x.current)return;x.current=N;let V=[-180,-90,180,90];try{const I=H.getBounds();I&&(V=[I[0][0],I[0][1],I[1][0],I[1][1]])}catch{}const A=M.getClusters(V,N).map(I=>{const m=I.geometry.coordinates,w=m[0],P=m[1];return I.properties.cluster?{id:`cluster-${I.properties.cluster_id}`,clusterId:I.properties.cluster_id,lng:w,lat:P,pointCount:I.properties.point_count,isCluster:!0,properties:{}}:{id:`point-${I.properties.id}`,clusterId:-1,lng:w,lat:P,pointCount:1,isCluster:!1,properties:I.properties}});f(A),g(null)}catch{}},[]);u.useEffect(()=>{var V,F;if(!d)return;const M=d.mapService,H=()=>{requestAnimationFrame(()=>{const A=b.current;A&&d.loaded&&L(A,d)})};d.loaded?H():d.once("loaded",H);const N=()=>{const A=b.current;A&&L(A,d)};return(V=M==null?void 0:M.on)==null||V.call(M,"camerachange",N),(F=M==null?void 0:M.on)==null||F.call(M,"viewchange",N),()=>{var A,I;d.off("loaded",H),(A=M==null?void 0:M.off)==null||A.call(M,"camerachange",N),(I=M==null?void 0:M.off)==null||I.call(M,"viewchange",N)}},[d,L]);const z=u.useCallback(M=>{if(!d||!M.isCluster)return;let H=[];const N=b.current;N&&(H=N.getLeaves(M.clusterId,1/0)),c==null||c(M,H);try{if(d.getZoom()>=20-.5){g(A=>A===M.id?null:M.id);return}if(H.length>0){const A=H.map($=>$.geometry.coordinates),I=A.map($=>$[0]),m=A.map($=>$[1]),w=[Math.min(...I),Math.min(...m)],P=[Math.max(...I),Math.max(...m)];d.fitBounds([w,P],{padding:[40,40,40,40],duration:l})}}catch{}},[d,c,l]),E=u.useMemo(()=>{if(!d||!p||!b.current)return[];const M=h.find(H=>H.id===p&&H.isCluster);if(!M)return[];try{const H=b.current.getLeaves(M.clusterId,1/0),N=d.mapService;if(!N)return[];const V=N.lngLatToContainer([M.lng,M.lat]);if(!V)return[];const F=H.length,A=Math.max(24,Math.min(72,18+F*2));return H.map((I,m)=>{var O,K;const w=Math.PI*2*m/F-Math.PI/2,P=V.x+Math.cos(w)*A,$=V.y+Math.sin(w)*A,j=N.containerToLngLat([P,$]);return{id:`spider-${M.id}-${((O=I.properties)==null?void 0:O.id)??m}`,lng:j.lng,lat:j.lat,point:{id:String(((K=I.properties)==null?void 0:K.id)??m),lng:I.geometry.coordinates[0],lat:I.geometry.coordinates[1],properties:I.properties??{}}}})}catch{return[]}},[d,p,h]),T=u.useMemo(()=>p?h.find(M=>M.id===p&&M.isCluster)??null:null,[p,h]);return i.jsxs(i.Fragment,{children:[p&&T&&E.map(M=>i.jsx(Oe,{longitude:M.lng,latitude:M.lat,anchor:"center",content:i.jsx(Or,{centerLng:T.lng,centerLat:T.lat,lineLng:M.lng,lineLat:M.lat})},`line-${M.id}`)),h.map(M=>{var F;if(!M.isCluster)return i.jsx(Oe,{longitude:M.lng,latitude:M.lat,anchor:"center",content:i.jsx("div",{title:String(((F=M.properties)==null?void 0:F.name)??"单点"),onClick:()=>{var A;return a==null?void 0:a({id:String(((A=M.properties)==null?void 0:A.id)??""),lng:M.lng,lat:M.lat,properties:M.properties})},style:{width:14,height:14,borderRadius:9999,background:"#2563eb",border:"2px solid #fff",boxShadow:"0 2px 10px rgba(37,99,235,.5), 0 0 0 3px rgba(37,99,235,.15)",transition:"transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1)",cursor:"pointer"}})},M.id);const H=M.pointCount,N=jr(H),V=y===M.id;return i.jsx(Oe,{longitude:M.lng,latitude:M.lat,anchor:"center",content:i.jsxs("div",{title:`包含 ${H} 个要素`,onClick:()=>z(M),onMouseEnter:()=>C(M.id),onMouseLeave:()=>C(A=>A===M.id?null:A),style:{width:N.size,height:N.size,borderRadius:9999,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:N.fontWeight,fontSize:N.fontSize,background:N.background,border:N.border,boxShadow:N.shadow,position:"relative",cursor:"pointer",transition:"transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1)",transform:V?"scale(1.1)":"scale(1)"},children:[N.pulse&&i.jsx("span",{style:{position:"absolute",inset:-6,borderRadius:9999,background:"rgba(37,99,235,0.25)",animation:"aimapui-cluster-pulse 1.6s ease-out infinite"}}),i.jsx("span",{style:{position:"relative",zIndex:1},children:H})]})},M.id)}),E.map(M=>{var H;return i.jsx(Oe,{longitude:M.lng,latitude:M.lat,anchor:"center",content:i.jsx("div",{title:String(((H=M.point.properties)==null?void 0:H.name)??M.point.id),onClick:()=>a==null?void 0:a(M.point),style:{width:10,height:10,borderRadius:9999,background:"#fff",border:"2px solid #2563eb",boxShadow:"0 2px 8px rgba(0,0,0,.2)",cursor:"pointer"}})},M.id)})]})}function Or({centerLng:e,centerLat:t,lineLng:n,lineLat:r}){const o=me(),l=u.useRef(null);return u.useEffect(()=>{if(!o)return;const s=o.mapService;if(!s)return;const a=()=>{const h=l.current;if(h)try{const f=s.lngLatToContainer([e,t]),p=s.lngLatToContainer([n,r]);if(!f||!p)return;const g=p.x-f.x,y=p.y-f.y,C=Math.sqrt(g*g+y*y),b=Math.atan2(y,g)*180/Math.PI;h.style.width=`${C}px`,h.style.transform=`rotate(${b}deg)`}catch{}};a();const c=(h,f,p)=>{var g;try{(g=h==null?void 0:h.on)==null||g.call(h,f,p)}catch{}},d=(h,f,p)=>{var g;try{(g=h==null?void 0:h.off)==null||g.call(h,f,p)}catch{}};return c(s,"camerachange",a),c(s,"viewchange",a),()=>{d(s,"camerachange",a),d(s,"viewchange",a)}},[o,e,t,n,r]),i.jsx("div",{ref:l,style:{position:"absolute",left:0,top:0,height:1,background:"rgba(195, 198, 215, 0.5)",transformOrigin:"0 50%",pointerEvents:"none"}})}function jr(e){return e>=1e3?{size:48,fontSize:14,fontWeight:700,background:"linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%)",border:"2px solid rgba(255,255,255,0.55)",shadow:"0 10px 24px rgba(37,99,235,.45)",pulse:!0}:e>=100?{size:40,fontSize:13,fontWeight:700,background:"rgba(37,99,235,0.30)",border:"2px solid rgba(255,255,255,0.5)",shadow:"0 6px 16px rgba(37,99,235,.25)",pulse:!1}:{size:32,fontSize:12,fontWeight:600,background:"radial-gradient(circle, #2563eb 60%, rgba(37,99,235,0.20) 61%)",border:"1px solid rgba(255,255,255,0.55)",shadow:"0 4px 12px rgba(37,99,235,.2)",pulse:!1}}function Br(e,t,n){if(!e)return[];if(t==="geojson"&&typeof e=="object"&&e!==null){const r=e;return(Array.isArray(r.features)?r.features:[]).map((l,s)=>{var d,h,f;const a=l,c=(d=a==null?void 0:a.geometry)==null?void 0:d.coordinates;return!Array.isArray(c)||c.length<2?null:{id:String(((h=a==null?void 0:a.properties)==null?void 0:h.id)??((f=a==null?void 0:a.properties)==null?void 0:f.Id)??s),lng:Number(c[0]),lat:Number(c[1]),properties:(a==null?void 0:a.properties)??{}}}).filter(Boolean)}if(Array.isArray(e)){const r=(n==null?void 0:n.x)??"lng",o=(n==null?void 0:n.y)??"lat";return e.map((l,s)=>{const a=l,c=Number(a[r]),d=Number(a[o]);return Number.isNaN(c)||Number.isNaN(d)?null:{id:String(a.id??s),lng:c,lat:d,properties:a}}).filter(Boolean)}return[]}const Wr=["#dbeafe","#93c5fd","#60a5fa","#3b82f6","#2563eb"],Ur=["#dc2626","#fca5a5","#e5e7eb","#86efac","#16a34a"],qr=["#2563eb","#f59e0b","#ef4444","#10b981","#8b5cf6","#14b8a6","#f97316","#64748b"];function Yr({source:e,sourceType:t="geojson",colorMapping:n="sequential",showStroke:r=!0,strokeColor:o="rgba(255,255,255,0.30)",strokeWidth:l=.5,hoverEffect:s=!0,clickEffect:a=!0,stickySelection:c=!0,tooltipEffect:d=!0,tooltipFields:h,tooltipTemplate:f,regionIdField:p="name",highlightStrokeColor:g="#2563eb",highlightStrokeWidth:y=2,zoomToRegionOnClick:C=!0,clickZoomPadding:b=40,clickZoomDelta:x=1.2,onRegionClick:k,onDrilldown:L,onLayerCreated:z,showLabel:E=!1,labelField:T="name",labelColor:M="#0f172a",labelSize:H=11,labelAreaThreshold:N=5e-5,labelHaloWidth:V=2,minLabelZoom:F,valueField:A,percentageField:I,nameField:m,color:w,colorField:P,colorValues:$,active:j,select:O,events:K,style:ee,...Y}){const X=me(),[te,_]=u.useState(null),[U,ce]=u.useState(null),[ie,Q]=u.useState(()=>{if(!X)return 0;try{return X.getZoom()}catch{return 0}});u.useEffect(()=>{if(!X)return;const q=()=>{try{Q(X.getZoom())}catch{}};return q(),X.on("zoomchange",q),()=>{X.off("zoomchange",q)}},[X]);const le=F===void 0||ie>=F,Z=u.useMemo(()=>{if($)return $;switch(n){case"diverging":return[...Ur];case"categorical":return[...qr];case"sequential":default:return[...Wr]}},[$,n]),v=A??P??"value",D=m??T,S=u.useMemo(()=>f??Xr(D,v,I),[f,D,v,I]),R={color:"#ffffff"},B={color:"#0f172a"},G=u.useMemo(()=>Gr(e,t,T,p,N),[e,t,T,p,N]),ne=u.useCallback(q=>{k==null||k(q);const ae=o0(q.feature,p);if(ae!==null&&a&&ce(de=>!c&&de===ae?null:ae),q.feature&&(L==null||L(q.feature)),!X||!C)return;const he=Number.isFinite(q.lng)&&Number.isFinite(q.lat)?[q.lng,q.lat]:Kr(q.originalEvent);if(he)try{const de=X.getZoom(),Ce=Math.abs(x);X.setCenter(he),X.setZoom(de+Ce)}catch{}},[k,p,a,c,L,X,C,x]),se=u.useCallback(q=>{if(!s)return;const ae=o0(q.feature,p);_(ae)},[s,p]),J=u.useCallback(()=>{s&&_(null)},[s]),re=u.useMemo(()=>{const q=K;return d?{...q,enablePopup:(q==null?void 0:q.enablePopup)??!0,popupTrigger:(q==null?void 0:q.popupTrigger)??"hover",popupFields:(q==null?void 0:q.popupFields)??h,popupTemplate:(q==null?void 0:q.popupTemplate)??S}:q},[K,d,h,S]);return i.jsxs(i.Fragment,{children:[i.jsx(rt,{...Y,source:e,sourceType:t,shape:Y.shape??"fill",color:w??"#2563eb",colorField:P,colorValues:Z,active:s?j??R:j,select:a?O??B:O,events:re,onClick:ne,onMouseEnter:se,onMouseLeave:J,onLayerCreated:z,style:{opacity:.8,...ee??{}}}),r&&i.jsx(Ve,{source:e,sourceType:t,color:o,size:l,zIndex:2}),s&&te!==null&&i.jsxs(i.Fragment,{children:[i.jsx(Ve,{source:e,sourceType:t,color:r0(g,.35),size:y+2,filterField:p,filterValues:[te],zIndex:3}),i.jsx(Ve,{source:e,sourceType:t,color:g,size:y,filterField:p,filterValues:[te],zIndex:4})]}),a&&U!==null&&i.jsx(Ve,{source:e,sourceType:t,color:r0(g,.9),size:Math.max(1.5,y),filterField:p,filterValues:[U],zIndex:5}),E&&le&&i.jsx(Se,{source:G.data,sourceType:G.sourceType,sourceConfig:G.sourceConfig,shapeField:T,shapeValues:"text",color:M,size:H,style:{textAllowOverlap:!1,stroke:"#ffffff",strokeWidth:V,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace"}})]})}function Xr(e,t,n){const r=n?`<tr><td style="padding-right:8px;color:#64748b">占比</td><td style="font-weight:600">{{${n}}}%</td></tr>`:"";return['<div style="min-width:160px">',`<div style="font-weight:700;margin-bottom:6px">{{${e}}}</div>`,'<table style="font-size:12px;line-height:1.4">',`<tr><td style="padding-right:8px;color:#64748b">指标</td><td style="font-weight:600">{{${t}}}</td></tr>`,r,"</table>","</div>"].join("")}function r0(e,t){if(e.startsWith("#")){const n=e.replace("#",""),r=n.length===3?`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n;if(r.length===6){const o=parseInt(r.slice(0,2),16),l=parseInt(r.slice(2,4),16),s=parseInt(r.slice(4,6),16);return`rgba(${o},${l},${s},${t})`}}return e}function o0(e,t){if(!e)return null;const n=e[t]??e.id??e.name;return typeof n=="string"||typeof n=="number"?n:null}function Gr(e,t,n,r,o){return t!=="geojson"||!Jr(e)?{data:e,sourceType:t}:{data:e.features.map(s=>{if(!s||!s.geometry||!s.properties)return null;const a=s0(s.geometry),c=Rr(s.geometry);if(!a||c<o)return null;const d=s.properties;return{lng:a[0],lat:a[1],[n]:d[n],[r]:d[r]}}).filter(s=>s!==null),sourceType:"json",sourceConfig:{x:"lng",y:"lat"}}}function Jr(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="FeatureCollection"&&Array.isArray(t.features)}function Kr(e){const t=Qr(e);return t?s0(t):null}function Qr(e){var n,r;const t=e;return((n=t==null?void 0:t.feature)==null?void 0:n.geometry)??((r=t==null?void 0:t.data)==null?void 0:r.geometry)??null}function s0(e){if(e.type==="Polygon")return i0(e.coordinates[0]);if(e.type==="MultiPolygon"){let t=0,n=null;return e.coordinates.forEach(r=>{const o=r[0],l=Math.abs($t(o));l>t&&(t=l,n=i0(o))}),n}return null}function Rr(e){return e.type==="Polygon"?Math.abs($t(e.coordinates[0])):e.type==="MultiPolygon"?e.coordinates.reduce((t,n)=>t+Math.abs($t(n[0])),0):0}function i0(e){if(!e||e.length<3)return null;let t=0,n=0,r=0;for(let l=0;l<e.length-1;l+=1){const[s,a]=e[l],[c,d]=e[l+1],h=s*d-c*a;t+=h,n+=(s+c)*h,r+=(a+d)*h}const o=t/2;if(Math.abs(o)<1e-12){const l=e[0];return l?[l[0],l[1]]:null}return[n/(6*o),r/(6*o)]}function $t(e){if(!e||e.length<3)return 0;let t=0;for(let n=0;n<e.length-1;n+=1){const[r,o]=e[n],[l,s]=e[n+1];t+=r*s-l*o}return t/2}const l0=["#eff6ff","#bfdbfe","#60a5fa","#2563eb","#1d4ed8","#1e3a8a"],a0="https://mdn.alipayobjects.com/antforest/afts/file/A*T2OJQ7XZzeEAAAAAgCAAAAgAerd2AQ/original_中国_省.json",c0="https://mdn.alipayobjects.com/antforest/afts/file/A*Xd8TQoduwj8AAAAAgEAAAAgAerd2AQ/original_中国_市.json",u0="https://mdn.alipayobjects.com/portal_moelhz/afts/file/A*Rb96Tac1p8EAAAAAgKAAAAgAegAAAQ",eo=u.forwardRef(function(t,n){const{provinceSource:r=a0,citySource:o=c0,districtSource:l=u0,level:s="province",drillEnabled:a=!0,drillPath:c,onDrill:d,onDrillUp:h,autoFitOnDrill:f=!0,data:p,joinField:g="name",dataJoinField:y="name",valueField:C="value",colors:b=[...l0],fillOpacity:x=.8,strokeColor:k="rgba(255,255,255,0.5)",strokeWidth:L=1.5,dimOpacity:z=.12,showLabel:E=!0,labelField:T="name",labelSize:M=12,hoverHighlight:H=!0,clickSelect:N=!0,showTooltip:V=!0,tooltipFields:F,onRegionClick:A,zIndex:I=0}=t,m=me(),[w,P]=u.useState(null),[$,j]=u.useState(null),[O,K]=u.useState(null),[ee,Y]=u.useState(null),[X,te]=u.useState([{level:"province",name:"中国"}]),_=c??X,U=a?no(_):s,ce=u.useCallback(()=>{if(_.length<=1)return;const J=_.slice(0,-1);c?h==null||h(J):(te(J),h==null||h(J),d==null||d(J)),le(null)},[_,c,h,d]),ie=u.useCallback(J=>{if(J<0||J>=_.length-1)return;const re=_.slice(0,J+1);c?h==null||h(re):(te(re),h==null||h(re),d==null||d(re)),le(null)},[_,c,h,d]),[Q,le]=u.useState(null);u.useImperativeHandle(n,()=>({drillUp:ce,drillUpTo:ie,getDrillPath:()=>_}),[ce,ie,_]);const Z=u.useRef(_.length);u.useEffect(()=>{_t(r,P,Y)},[r]),u.useEffect(()=>{o&&_t(o,j)},[o]),u.useEffect(()=>{l&&_t(l,K)},[l]);const v=u.useMemo(()=>{switch(U){case"city":return $;case"district":return O;default:return w}},[U,w,$,O]),D=u.useMemo(()=>!v||!p||p.length===0?v:lo(v,p,g,y,C),[v,p,g,y,C]),S=u.useMemo(()=>{if(!a||_.length<=1)return D;if(!D)return null;const J=_[_.length-1];return!J.adcode&&!J.name?D:co(D,J)},[a,_,D,g]),R=u.useMemo(()=>!a||_.length<=1?null:(_.length===2?w:$)??null,[a,_,w,$]);u.useMemo(()=>`<div style="min-width:140px"><table style="font-size:12px;line-height:1.6">${(F??[T,C]).map(q=>`<tr><td style="padding-right:8px;color:#64748b">${q}</td><td style="font-weight:600">{{${q}}}</td></tr>`).join("")}</table></div>`,[F,T,C]);const B=!!(p&&p.length>0),G=u.useMemo(()=>D?S??D:null,[S,D]),ne=U==="province"?L:L*.6;u.useEffect(()=>{if(!(!f||!m||!G||Z.current===_.length)){Z.current=_.length;try{const re=fo(G);re&&m.fitBounds(re,{padding:[40,40,40,40]})}catch{}}},[f,m,G,_.length]);const se=u.useCallback(J=>{const re=J.feature;if(!re)return;const q=String(re[T]??re.name??""),ae=re.adcode??re.gb;if(A==null||A(re,U),N&&le(he=>he===q?null:q),a&&ro(U)){const he=[..._,{level:U,name:q,adcode:ae}];c||te(he),d==null||d(he),le(null)}},[T,U,N,a,_,c,d,A]);return!m||!G?null:i.jsxs(i.Fragment,{children:[a&&R&&_.length>1&&i.jsxs(i.Fragment,{children:[i.jsx(rt,{source:R,sourceType:"geojson",shape:"fill",color:"#94a3b8",style:{opacity:z},zIndex:I}),i.jsx(Ve,{source:R,sourceType:"geojson",color:"rgba(148,163,184,0.2)",size:.5,zIndex:I+1})]}),i.jsx(rt,{source:G,sourceType:"geojson",shape:"fill",...B?{colorField:C,colorValues:b}:{color:b[2]??"#3b82f6"},active:H?{color:"#ffffff"}:void 0,select:N?{color:"#0f172a"}:void 0,style:{opacity:x},onClick:se,zIndex:I+2}),i.jsx(Ve,{source:G,sourceType:"geojson",color:k,size:ne,zIndex:I+3}),ee&&U==="province"&&_.length<=1&&i.jsx(Ve,{source:ee,sourceType:"geojson",color:"#94a3b8",size:1,zIndex:I+3}),E&&G&&i.jsx(to,{geoData:G,labelField:T,labelSize:M,zIndex:I+4})]})});function to({geoData:e,labelField:t,labelSize:n,zIndex:r}){const o=u.useMemo(()=>uo(e,t),[e,t]);return!o||o.data.length===0?null:i.jsx(Se,{source:o.data,sourceType:o.sourceType,sourceConfig:o.sourceConfig,shapeField:t,shapeValues:"text",color:"#0f172a",size:n,style:{textAllowOverlap:!1,stroke:"#ffffff",strokeWidth:2,fontFamily:"PingFang SC, Microsoft YaHei, sans-serif"},zIndex:r})}function no(e){return e.length<=1?"province":e.length===2?"city":"district"}function ro(e){return e!=="district"}const oo=new Set(["境界线","边界线","九段线","十段线"]);function so(e){var n,r,o;const t=(n=e.properties)==null?void 0:n.name;if(typeof t!="string")return!1;if(t==="九段线"||t==="十段线")return!0;if(t==="境界线"){const l=(r=e.geometry)==null?void 0:r.type;if(l!=="MultiLineString"&&l!=="LineString")return!1;const s=(o=e.geometry)==null?void 0:o.coordinates;if(!s)return!1;const a=l==="MultiLineString"?s.flat():s;if(Math.min(...a.map(d=>d[1]))<10)return!0}return!1}function io(e){var r,o;const t=(r=e.properties)==null?void 0:r.name;if(!t||typeof t!="string"||oo.has(t))return!1;const n=(o=e.geometry)==null?void 0:o.type;return!(n==="LineString"||n==="MultiLineString")}function d0(e){const t=[],n=[];for(const r of e.features)so(r)?n.push(r):io(r)&&t.push(r);return{admin:{type:"FeatureCollection",features:t},dashLine:n.length>0?{type:"FeatureCollection",features:n}:null}}function _t(e,t,n){if(typeof e=="string")fetch(e).then(r=>r.json()).then(r=>{if(r&&r.type==="FeatureCollection"){const o=d0(r);t(o.admin),n==null||n(o.dashLine)}}).catch(()=>{});else if(e&&e.type==="FeatureCollection"){const r=d0(e);t(r.admin),n==null||n(r.dashLine)}}function lo(e,t,n,r,o){const l=new Map;for(const a of t){const c=String(a[r]??"");c&&l.set(c,a)}return{type:"FeatureCollection",features:e.features.map(a=>{const c=String(a.properties[n]??""),d=l.get(c),h=d?d[o]??d.value??0:0;return{...a,properties:{...a.properties,...d??{},[o]:h}}})}}function h0(e){const t=String(e);return t.startsWith("156")&&t.length>=9?t.slice(3):t}const ao=["省","市","自治区","特别行政区","壮族","回族","维吾尔","藏族","彝族","苗","侗","瑶","白","哈尼","傣","傈僳","佤","畲","拉祜","水","景颇","土家","羌","毛南","仫佬","布朗","撒拉","裕固","塔吉克","柯尔克孜","锡伯","达斡尔","鄂温克","鄂伦春","赫哲","德昂","门巴","珞巴","基诺","怒","保安","京","独龙","仡佬","阿昌","普米"];function Ot(e){let t=e;for(const n of ao)if(t.endsWith(n)){t=t.slice(0,-n.length);break}return t}function co(e,t,n){const r=t.name,o=t.adcode,s=t.level==="province"?2:4;return{type:"FeatureCollection",features:e.features.filter(c=>{const d=c.properties;if(d.parent&&String(d.parent)===r||d.parentName&&String(d.parentName)===r)return!0;const h=d.adcode??d.gb;if(o&&h){const p=h0(String(o)),g=h0(String(h));if(g.length>=s&&g.slice(0,s)===p.slice(0,s)&&g!==p)return!0}const f=Ot(r);return!!(d.province&&(String(d.province)===r||Ot(String(d.province))===f)||d.city&&(String(d.city)===r||Ot(String(d.city))===f))})}}function uo(e,t){const n=[];for(const r of e.features){if(!r.geometry||!r.properties)continue;const o=ho(r.geometry);o&&n.push({lng:o[0],lat:o[1],[t]:r.properties[t]??r.properties.name??""})}return n.length===0?null:{data:n,sourceType:"json",sourceConfig:{x:"lng",y:"lat"}}}function ho(e){const t=e.type,n=e.coordinates;if(!n)return null;if(t==="Point")return n;if(t==="Polygon")return p0(n);if(t==="MultiPolygon"){const r=n;let o=0,l=null;for(const s of r){const a=Math.abs(po(s[0]));a>o&&(o=a,l=p0(s))}return l}return null}function p0(e){const t=e[0];if(!t||t.length===0)return null;let n=0,r=0;const o=t.length;for(const l of t)n+=l[0],r+=l[1];return[n/o,r/o]}function po(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const o=(r+1)%n;t+=e[r][0]*e[o][1],t-=e[o][0]*e[r][1]}return t/2}function fo(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;for(const l of e.features)go(l.geometry,(s,a)=>{s<t&&(t=s),a<n&&(n=a),s>r&&(r=s),a>o&&(o=a)});return!isFinite(t)||!isFinite(n)?null:[[t,n],[r,o]]}function go(e,t){const n=e.type,r=e.coordinates;if(r){if(n==="Point"){const[o,l]=r;t(o,l)}else if(n==="LineString"||n==="MultiPoint")for(const[o,l]of r)t(o,l);else if(n==="Polygon"||n==="MultiLineString")for(const o of r)for(const[l,s]of o)t(l,s);else if(n==="MultiPolygon")for(const o of r)for(const l of o)for(const[s,a]of l)t(s,a)}}const yo=[["sunny","&#xe81a;"],["cloud","&#xf15c;"],["cloudy","&#xf15c;"],["partly_cloudy_day","&#xf172;"],["partly_cloudy_night","&#xf174;"],["rainy","&#xf176;"],["rainy_heavy","&#xf61f;"],["rainy_light","&#xf61e;"],["rainy_snow","&#xf61d;"],["thunderstorm","&#xebdb;"],["foggy","&#xe818;"],["air","&#xefd8;"],["water_drop","&#xe798;"],["ac_unit","&#xeb3b;"],["filter_drama","&#xe3dd;"],["cloudy_snowing","&#xe810;"],["snowing","&#xe80f;"],["snowflake","&#xed5b;"],["severe_cold","&#xebd3;"],["umbrella","&#xf1ad;"],["storm","&#xf070;"],["tornado","&#xe199;"],["thermostat","&#xf076;"],["heat","&#xf537;"],["hot","&#xef23;"],["flight","&#xe539;"],["flight_takeoff","&#xe905;"],["flight_land","&#xe904;"],["train","&#xe570;"],["directions_transit","&#xeffa;"],["directions_railway","&#xeff8;"],["directions_bus","&#xeff6;"],["directions_car","&#xeff7;"],["directions_boat","&#xeff5;"],["directions_bike","&#xe52f;"],["directions_walk","&#xe536;"],["directions_run","&#xe566;"],["taxi","&#xe559;"],["local_taxi","&#xe559;"],["local_airport","&#xe53d;"],["connecting_airports","&#xe7c9;"],["two_wheeler","&#xe9f9;"],["tram","&#xe571;"],["subway","&#xe56f;"],["ferry","&#xe572;"],["cable_car","&#xf479;"],["ev_station","&#xe56d;"],["local_gas_station","&#xe546;"],["location_on","&#xf1db;"],["place","&#xf1db;"],["room","&#xf1db;"],["pin","&#xf045;"],["pin_drop","&#xe55e;"],["near_me","&#xe569;"],["my_location","&#xe55c;"],["gps_fixed","&#xe55c;"],["navigation","&#xe55d;"],["explore","&#xe87a;"],["map","&#xe55b;"],["restaurant","&#xe56c;"],["local_cafe","&#xeb44;"],["coffee","&#xefef;"],["local_bar","&#xe540;"],["hotel","&#xe549;"],["local_hospital","&#xe548;"],["local_pharmacy","&#xe550;"],["local_atm","&#xe53e;"],["local_police","&#xef56;"],["local_fire_department","&#xef55;"],["local_post_office","&#xe554;"],["local_library","&#xe54b;"],["local_mall","&#xe54c;"],["local_grocery_store","&#xe8cc;"],["store","&#xe8d1;"],["school","&#xe80c;"],["church","&#xeaae;"],["mosque","&#xeab2;"],["synagogue","&#xeab0;"],["temple_buddhist","&#xeab3;"],["temple_hindu","&#xeaaf;"],["museum","&#xea36;"],["castle","&#xeab1;"],["stadium","&#xeb90;"],["theater_comedy","&#xea66;"],["pool","&#xeb48;"],["fitness_center","&#xeb43;"],["spa","&#xeb4c;"],["park","&#xea63;"],["forest","&#xea99;"],["attractions","&#xea52;"],["celebration","&#xea65;"],["festival","&#xea68;"],["nightlife","&#xea62;"],["sports","&#xea30;"],["sports_soccer","&#xea2f;"],["sports_basketball","&#xea26;"],["sports_football","&#xea29;"],["sports_tennis","&#xea32;"],["sports_golf","&#xea2a;"],["layers","&#xe53b;"],["layers_clear","&#xe53c;"],["terrain","&#xe564;"],["landscape","&#xe564;"],["share","&#xe80d;"],["favorite","&#xe87e;"],["star","&#xf09a;"],["home","&#xe9b2;"],["work","&#xe943;"],["person","&#xf0d3;"],["people","&#xea21;"],["trip","&#xe6fb;"],["warning","&#xf083;"],["emergency","&#xe1eb;"],["photo_camera","&#xe412;"],["shopping_bag","&#xf1cc;"],["search","&#xe8b6;"],["settings","&#xe8b8;"],["info","&#xe88e;"],["help","&#xe8fd;"],["close","&#xe5cd;"],["check","&#xe876;"],["add","&#xe145;"],["remove","&#xe15b;"],["edit","&#xe254;"],["delete","&#xe872;"],["refresh","&#xe5d5;"],["download","&#xe2c4;"],["upload","&#xe2c3;"],["visibility","&#xe8f4;"],["visibility_off","&#xe8f6;"]],f0="Material Symbols Outlined",mo="https://fonts.gstatic.com/s/materialsymbolsoutlined/v261/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsI.woff2",Co="M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z";function vo(e){const t=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 40"><path d="${Co}" fill="${e}" stroke="white" stroke-width="1.5"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(t)}`}function bo({source:e,sourceType:t="json",sourceConfig:n,iconField:r,iconFontFamily:o="material-symbols",iconFontPath:l,iconFontMap:s,iconColor:a="#3b82f6",iconSize:c=20,iconHaloColor:d="#fff",iconHaloWidth:h=1,iconStyle:f,iconAnchor:p="center",iconBgShape:g="pin",iconBgShapeColor:y,iconBgShapeSize:C=24,iconBgStrokeColor:b,iconBgStrokeWidth:x=0,iconBgPadding:k=0,iconBgCornerRadius:L=0,showLabel:z=!0,labelField:E,labelColor:T="#333",labelSize:M=11,labelAnchor:H="top",labelOffset:N=[0,0],labelHaloColor:V="#fff",labelHaloWidth:F=2,labelStyle:A,textAllowOverlap:I=!1,iconAllowOverlap:m=!0,zoomAdaption:w=!0,zoomShowLabel:P=14,zoomDegradeToPoint:$=10,onClick:j,onMouseEnter:O,onMouseLeave:K,...ee}){const Y=me(),[X,te]=u.useState(!1),[_,U]=u.useState(!1),[ce,ie]=u.useState(!1),[Q,le]=u.useState(14),Z=u.useRef(!1);u.useEffect(()=>{if(!Y||g!=="pin"||!y)return;const ne=vo(y);Y.addImage("glyph-pin-bg",ne),ie(!0)},[Y,g,y]);const{fontFamily:v,fontPath:D,iconMappings:S}=u.useMemo(()=>{switch(o){case"material-symbols":return{fontFamily:f0,fontPath:mo,iconMappings:yo};default:return{fontFamily:o,fontPath:l??null,iconMappings:s??[]}}},[o,l,s]);if(u.useEffect(()=>{if(!Y||Z.current)return;Z.current=!0;let ne=!1;return(async()=>{D&&Y.addFontFace(v,D),S.length>0&&Y.addIconFonts(S);try{if(v===f0){const J=S.slice(0,10).map(([,re])=>String.fromCharCode(parseInt(re.replace("&#x","").replace(";",""),16))).join("");await document.fonts.load(`${c}px "${v}"`,J)}else D&&await new Promise(J=>{const re=setTimeout(()=>{J()},3e3),q=()=>{clearTimeout(re),Y.off("fontloaded",q),J()};Y.on("fontloaded",q),document.fonts.load(`${c}px "${v}"`).then(()=>{clearTimeout(re),Y.off("fontloaded",q),J()}).catch(()=>{clearTimeout(re),Y.off("fontloaded",q),J()})})}catch{console.warn(`[GlyphLayer] 字体 "${v}" 加载超时,尝试继续渲染`)}try{const re=`${c}px "${v}"`;document.fonts.check(re,"X")||await document.fonts.ready}catch{}ne||te(!0)})(),()=>{ne=!0}},[Y,v,D,S,c]),u.useEffect(()=>{if(!Y)return;const ne=()=>U(!0);return Y.loaded?ne():Y.on("loaded",ne),()=>{Y.off("loaded",ne)}},[Y]),u.useEffect(()=>{if(!Y||!w)return;const ne=()=>{le(Y.getZoom())};return ne(),Y.on("zoomchange",ne),()=>{Y.off("zoomchange",ne)}},[Y,w]),!X||!_||g==="pin"&&y&&!ce)return null;const R=E??r,B=!w||Q>=P;return w&&Q<$?i.jsx(Se,{source:e,sourceType:t,sourceConfig:n,shape:"circle",color:typeof a=="string"?a:"#3b82f6",size:4,style:{opacity:.7}}):i.jsxs(i.Fragment,{children:[i.jsx(Se,{...ee,source:e,sourceType:t,sourceConfig:n,shapeField:r,shapeValues:"text",color:a,size:c,style:{fontFamily:v,iconfont:!0,textAllowOverlap:m,textAnchor:p,backgroundColor:y,backgroundPadding:k,backgroundRadius:L,backgroundShape:g==="pin"?void 0:"circle",stroke:b,strokeWidth:x,...f??{}},onClick:j,onMouseEnter:O,onMouseLeave:K}),z&&B&&i.jsx(Se,{source:e,sourceType:t,sourceConfig:n,shapeField:R,shapeValues:"text",color:T,size:M,style:{textAnchor:H,textOffset:N,stroke:V,strokeWidth:F,fontWeight:"500",textAllowOverlap:I,...A??{}}})]})}function g0({source:e,sourceType:t="json",sourceConfig:n,iconField:r,iconMap:o,iconSize:l=24,iconAnchor:s="bottom",size:a,showLabel:c=!0,labelField:d,labelColor:h="#333",labelSize:f=12,labelAnchor:p="top",labelOffset:g=[0,0],labelHaloColor:y="#fff",labelHaloWidth:C=2,labelStyle:b,textAllowOverlap:x=!1,iconAllowOverlap:k=!0,zoomAdaption:L=!0,zoomShowLabel:z=15,zoomDegradeToPoint:E=10,onClick:T,onMouseEnter:M,onMouseLeave:H,...N}){const V=me(),[F,A]=u.useState(!1),[I,m]=u.useState(15),w=u.useMemo(()=>Object.keys(o),[o]),P=a??l,$=d??r;if(u.useEffect(()=>{V&&(w.forEach(K=>{V.addImage(K,o[K])}),A(!0))},[V,w,o]),u.useEffect(()=>{if(!V||!L)return;const K=()=>{m(V.getZoom())};return K(),V.on("zoomchange",K),()=>{V.off("zoomchange",K)}},[V,L]),!F)return null;const j=!L||I>=z;return L&&I<E?i.jsx(Se,{source:e,sourceType:t,sourceConfig:n,shape:"circle",color:N.color??"#3b82f6",size:6,style:{opacity:.8}}):i.jsxs(i.Fragment,{children:[i.jsx(Se,{source:e,sourceType:t,sourceConfig:n,shapeField:r,shapeValues:w,size:P,style:{...N.style??{},anchor:s,allowOverlap:k},onClick:T,onMouseEnter:M,onMouseLeave:H}),c&&j&&i.jsx(Se,{source:e,sourceType:t,sourceConfig:n,shapeField:$,shapeValues:"text",color:h,size:f,style:{textAnchor:p,textOffset:g,stroke:y,strokeWidth:C,fontWeight:"500",textAllowOverlap:x,...b??{}}})]})}const Lo={gaode:()=>"https://webst0{1-4}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",google:()=>"https://gwxc.shipxy.com/tile.g?z={z}&x={x}&y={y}",tianditu:(e="4043dde46add842282bacc412299311d")=>`https://t{0-7}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=${e}`},xo={gaode:"高德卫星",tianditu:"天地图卫星",google:"谷歌卫星"};function wo({provider:e="gaode",zIndex:t=0,opacity:n=1,tiandituToken:r,visible:o=!0}){if(!o)return null;const l=Lo[e](r);return i.jsx(n0,{source:l,sourceType:"rasterTile",sourceConfig:{parser:{type:"rasterTile",tileSize:256,zoomOffset:1}},zIndex:t,opacity:n})}function Mo({source:e,sourceType:t="json",sourceConfig:n,shape:r="arc",color:o="#2563EB",gradientColors:l,colorMode:s="single",colorField:a,colorValues:c,lineWidth:d=1.5,lineWidthRange:h,weightField:f="weight",opacity:p=.8,blur:g=.6,animate:y=!1,animateSpeed:C=1,animateTrailLength:b=.3,animateDuration:x=2e3,showNodes:k=!0,nodeColor:L,nodeSize:z=4,nodeSizeRange:E,nodePulse:T=!1,showTooltip:M=!0,showNodePopup:H=!0,activeColor:N="#FFD93D",onArcHover:V,onArcClick:F,onNodeClick:A,style:I}){const m=u.useMemo(()=>n??{x:"fromLng",y:"fromLat",x1:"toLng",y1:"toLat"},[n]),w=u.useMemo(()=>s==="gradient"&&l?l:o,[s,l,o]),P=u.useMemo(()=>d,[d,h]),$=u.useMemo(()=>{if(y)return{enable:!0,speed:C,duration:x,trailLength:b}},[y,C,x,b]),j=u.useMemo(()=>({opacity:p,blur:g,...I}),[p,g,I]),O=u.useMemo(()=>{if(!k||typeof e=="string")return[];const ie=new Map,Q=m.x??"fromLng",le=m.y??"fromLat",Z=m.x1??"toLng",v=m.y1??"toLat";return e.forEach(D=>{const S=`${D[Q]}_${D[le]}`,R=`${D[Z]}_${D[v]}`;ie.has(S)||ie.set(S,{lng:Number(D[Q]),lat:Number(D[le]),degree:0,name:D.fromName}),ie.has(R)||ie.set(R,{lng:Number(D[Z]),lat:Number(D[v]),degree:0,name:D.toName}),ie.get(S).degree++,ie.get(R).degree++}),Array.from(ie.values())},[e,k,m]),K=L??o,[ee,Y]=u.useState({visible:!1,lng:0,lat:0,from:"",to:"",weight:0}),X=u.useCallback(ie=>{if(V==null||V(ie),!M)return;const Q=ie.feature;Q&&Y({visible:!0,lng:ie.lng,lat:ie.lat,from:String(Q.fromName??""),to:String(Q.toName??""),weight:Number(Q[f]??0)})},[V,M,f]),te=u.useCallback(()=>{Y(ie=>({...ie,visible:!1}))},[]),[_,U]=u.useState({visible:!1,lng:0,lat:0,name:"",degree:0}),ce=u.useCallback(ie=>{if(A==null||A(ie),!H)return;const Q=ie.feature;Q&&U({visible:!0,lng:ie.lng,lat:ie.lat,name:String(Q.name??""),degree:Number(Q.degree??0)})},[A,H]);return i.jsxs(i.Fragment,{children:[i.jsx(Ve,{source:e,sourceType:t,sourceConfig:m,shape:r,color:w,colorField:s==="field"?a:void 0,colorValues:s==="field"?c:void 0,size:P,sizeField:h?f:void 0,sizeValues:h||void 0,animate:$,active:N?{color:N}:!1,style:j,onMouseMove:X,onMouseLeave:te,onClick:F}),k&&O.length>0&&i.jsx(Se,{source:O,sourceConfig:{x:"lng",y:"lat"},color:K,size:z,sizeField:E?"degree":void 0,sizeValues:E,shape:"circle",style:{opacity:.9,strokeWidth:1,stroke:"#fff"},animate:T?{enable:!0,speed:.6}:void 0,active:N?{color:N}:!1,onClick:ce}),M&&ee.visible&&i.jsx(ht,{longitude:ee.lng,latitude:ee.lat,visible:!0,variant:"dark",items:[{label:"起点",value:ee.from},{label:"终点",value:ee.to},{label:"流量",value:ee.weight}]}),H&&_.visible&&i.jsx(qe,{longitude:_.lng,latitude:_.lat,content:`<div style="min-width:80px"><div style="font-weight:700;font-size:13px;margin-bottom:4px">${_.name||"节点"}</div><div style="font-size:12px;color:#64748b">连接数: ${_.degree}</div></div>`,closeButton:!0,size:"compact",onClose:()=>U(ie=>({...ie,visible:!1}))})]})}function ko({path:e,segments:t,stops:n=[],routeType:r="straight",onRouteQuery:o,onRouteResult:l,color:s="#2563eb",lineWidth:a=4,opacity:c=.9,glow:d=!0,animate:h=!1,animateSpeed:f=1,stopSize:p=14,stopColor:g,endColor:y="#10b981",showStopIndex:C=!0,stopRenderer:b="point",stopMarkerVariant:x="circle",stopIconMap:k,stopIconField:L="iconValue",stopIconSize:z=16,stopIconAnchor:E="bottom",showStopPopup:T=!0,activeColor:M="#fbbf24",onPathClick:H,onStopClick:N}){const[V,F]=u.useState(null),A=u.useRef(0),I=r==="walking"||r==="cycling"||r==="driving"||r==="transit";u.useEffect(()=>{if(!I||!o||n.length<2){F(null);return}const _=[n[0].lng,n[0].lat],U=[n[n.length-1].lng,n[n.length-1].lat],ce=n.length>2?n.slice(1,-1).map(Q=>[Q.lng,Q.lat]):[],ie=++A.current;o({origin:_,destination:U,waypoints:ce.length>0?ce:void 0,routeType:r}).then(Q=>{A.current===ie&&(F(Q),l==null||l(Q))}).catch(()=>{A.current===ie&&F(null)})},[I,o,n,r]);const m=I&&V?V.path:e,w=I&&(V!=null&&V.segments)?V.segments:t,P=I&&(V!=null&&V.stops)?V.stops:[],$=r==="arc"?"arc":"line",j=u.useMemo(()=>w&&w.length>0?{type:"FeatureCollection",features:w.map((_,U)=>({type:"Feature",properties:{color:_.color||s,width:_.width||a,index:U},geometry:{type:"LineString",coordinates:_.coordinates}}))}:m&&m.length>1?{type:"FeatureCollection",features:[{type:"Feature",properties:{color:s,width:a},geometry:{type:"LineString",coordinates:m}}]}:null,[m,w,s,a]),O=w&&w.some(_=>_.color),K=u.useMemo(()=>{const _=m??(w&&w.length>0?[...w[0].coordinates.slice(0,1),...w[w.length-1].coordinates.slice(-1)]:null);let U=[...n,...P];if(_&&_.length>=2){const[ce,ie]=_[0],[Q,le]=_[_.length-1],Z=n.some(D=>Math.abs(D.lng-ce)<1e-6&&Math.abs(D.lat-ie)<1e-6),v=n.some(D=>Math.abs(D.lng-Q)<1e-6&&Math.abs(D.lat-le)<1e-6);Z||(U=[{lng:ce,lat:ie,name:"起点",type:"start"},...U]),v||(U=[...U,{lng:Q,lat:le,name:"终点",type:"end"}])}return U.map((ce,ie)=>({...ce,index:ce.index??ie+1,type:ce.type??(ie===0?"start":ie===U.length-1?"end":"waypoint"),stopColor:ce.type==="end"||!ce.type&&ie===U.length-1?y:g??s,iconValue:ce.icon??"marker",indexLabel:String(ce.index??ie+1),markerColorValue:ce.markerColor??So(ce.type??(ie===0?"start":ie===U.length-1?"end":"waypoint"))}))},[n,P,m,w,s,g,y]),ee=u.useMemo(()=>{if(b!=="icon")return;if(k)return k;const _=[...new Set(K.map(U=>U.iconValue).filter(Boolean))];if(_.length)return W1(_,{fill:g??s,size:Math.max(24,z+8)})},[b,k,K,g,s,z]),[Y,X]=u.useState({visible:!1,lng:0,lat:0,name:"",index:""}),te=u.useCallback(_=>{if(N==null||N(_),!T)return;const U=_.feature;U&&X({visible:!0,lng:_.lng,lat:_.lat,name:String(U.name??""),index:String(U.indexLabel??U.index??"")})},[N,T]);return j?i.jsxs(i.Fragment,{children:[d&&i.jsx(Ve,{source:j,sourceType:"geojson",shape:$,color:O?void 0:s,colorField:O?"color":void 0,colorValues:O?w.map(_=>_.color||s):void 0,size:a*2.5,style:{opacity:.15}}),i.jsx(Ve,{source:j,sourceType:"geojson",shape:$,color:O?void 0:s,colorField:O?"color":void 0,colorValues:O?w.map(_=>_.color||s):void 0,size:O?void 0:a,sizeField:O?"width":void 0,sizeValues:O?w.map(_=>_.width||a):void 0,style:{opacity:c},active:M?{color:M}:!1,onClick:H}),h&&i.jsx(Ve,{source:j,sourceType:"geojson",shape:"line",color:"#ffffff",size:Math.max(1.5,a*.5),style:{opacity:.6,lineType:"dash",lineDash:[8,16]},animate:{enable:!0,speed:f,duration:1500},zIndex:10}),K.length>0&&b==="point"&&i.jsx(Se,{source:K,sourceConfig:{x:"lng",y:"lat"},colorField:"stopColor",colorValues:[...new Set(K.map(_=>_.stopColor))],size:p,shape:"circle",style:{opacity:1,strokeWidth:2,stroke:"#ffffff"},active:M?{color:M}:!1,onClick:te}),K.length>0&&b==="point"&&C&&i.jsx(Se,{source:K,sourceConfig:{x:"lng",y:"lat"},shapeField:"indexLabel",shapeValues:"text",color:"#ffffff",size:Math.max(10,Math.round(p*.75)),style:{textAnchor:"center",stroke:"rgba(18, 28, 42, 0.28)",strokeWidth:1.5,fontWeight:"700",textAllowOverlap:!0}}),K.length>0&&b==="icon"&&ee&&i.jsx(g0,{source:K,sourceType:"json",sourceConfig:{x:"lng",y:"lat"},iconField:L,iconMap:ee,iconSize:z,iconAnchor:E,showLabel:C,labelField:"indexLabel",labelColor:"#ffffff",labelSize:11,labelAnchor:"top",labelOffset:[0,E==="bottom"?Math.max(10,Math.round(z*.6)):0],labelHaloColor:"rgba(18, 28, 42, 0.35)",labelHaloWidth:2,onClick:te}),K.length>0&&b==="marker"&&K.map((_,U)=>{const ce=_.markerVariant??x,ie=_.markerColorValue,Q=zo(_.indexLabel,_.stopColor,C,ce);return i.jsx(Oe,{longitude:_.lng,latitude:_.lat,variant:ce,color:ie,icon:_.icon,content:Q,label:Q?void 0:C?_.indexLabel:void 0,onClick:le=>{te({layerId:"route-stop-marker",layerType:"point",originalEvent:le,lng:_.lng,lat:_.lat,feature:_})}},`route-stop-marker-${U}`)}),T&&Y.visible&&i.jsx(qe,{longitude:Y.lng,latitude:Y.lat,content:`<div style="min-width:100px"><div style="font-weight:700;font-size:13px;margin-bottom:4px">${Y.name}</div><div style="font-size:12px;color:#64748b">第 ${Y.index} 站</div></div>`,closeButton:!0,size:"compact",onClose:()=>X(_=>({..._,visible:!1}))})]}):null}function So(e){switch(e){case"start":return"success";case"end":return"error";default:return"primary"}}function zo(e,t,n,r){if(!n||r!=="circle"&&r!=="dot")return;const o=r==="circle"?24:18,l=r==="circle"?11:10;return i.jsx("div",{style:{width:o,height:o,borderRadius:"9999px",border:"2px solid #ffffff",background:t,color:"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:l,lineHeight:1,fontWeight:700,boxShadow:"0 6px 12px rgba(0,0,0,0.14)"},children:e})}const y0=[73.482190241,3.8150178409999995,135.106618732,57.630045996],Ho={type:"linear",colors:["rgba(92,58,16,0)","rgba(92,58,16,0)","#fabd08","#f1e93f","#f1ff8f","#fcfff7"],positions:[0,3,9,22.5,45,90]};function m0(e){const t=e[0]/2003750834e-2*180;let n=e[1]/2003750834e-2*180;return n=180/Math.PI*(2*Math.atan(Math.exp(n*Math.PI/180))-Math.PI/2),[t,n]}function Vo({url:e,extent:t=y0,renderMode:n="raster",bandIndex:r=0,domain:o=[0,90],noDataValue:l=0,rampColors:s=Ho,clampLow:a=!1,clampHigh:c=!1,bands:d=[0,1,2],countCut:h,rMinMax:f,gMinMax:p,bMinMax:g,opacity:y=.8,mask:C=!1,maskData:b}){const[x,k]=u.useState(null),[L,z]=u.useState(null),[E,T]=u.useState(null);u.useEffect(()=>{let m=!1;async function w(){try{const P=await import("geotiff"),$=await fetch(e);if(!$.ok)throw new Error(`Fetch failed: ${$.status}`);const j=await $.arrayBuffer(),K=await(await P.fromArrayBuffer(j)).getImage(),ee=K.getWidth(),Y=K.getHeight(),X=await K.readRasters();let te;try{const _=K.getBoundingBox();_&&_.length===4&&(te=_)}catch{}m||(k({rasters:X,width:ee,height:Y,tiffExtent:te}),T(null))}catch(P){m||(T(P instanceof Error?P.message:"Failed to load TIFF"),console.error("[TiffRasterLayer] Load error:",P))}}return w(),()=>{m=!0}},[e]),u.useEffect(()=>{if(!C||!b)return;let m=!1;return typeof b=="string"?fetch(b).then(w=>w.json()).then(w=>{m||z(w)}).catch(w=>console.error("[TiffRasterLayer] Mask load error:",w)):z(b),()=>{m=!0}},[C,b]);const M=u.useMemo(()=>{if(t!==y0)return t;if(x!=null&&x.tiffExtent){const[m,w,P,$]=x.tiffExtent;if(Math.abs(m)>180||Math.abs(P)>180){const j=m0([m,w]),O=m0([P,$]);return[j[0],j[1],O[0],O[1]]}return x.tiffExtent}return t},[t,x==null?void 0:x.tiffExtent]),H=u.useMemo(()=>{if(!x)return null;if(n==="rgb"){const m={type:"rgb",width:x.width,height:x.height,bands:d,extent:M};return f&&(m.RMinMax=f),p&&(m.GMinMax=p),g&&(m.BMinMax=g),h&&(m.countCut=h),{parser:m}}return n==="ndi"?{parser:{type:"ndi",width:x.width,height:x.height,bands:d,extent:M}}:{parser:{type:"raster",width:x.width,height:x.height,extent:M}}},[x,n,d,M]),N=u.useMemo(()=>n==="rgb"?{opacity:y}:n==="ndi"?{domain:o,rampColors:s,opacity:y}:{clampLow:a,clampHigh:c,domain:o,noDataValue:l,rampColors:s,opacity:y},[n,a,c,o,l,s,y]),V=u.useMemo(()=>x?n==="rgb"||n==="ndi"?x.rasters:x.rasters[r]:null,[x,n,r]),F=me(),A=u.useRef(null);u.useRef(!1);const I=!C||!!L;return u.useEffect(()=>{if(!F||!H||!V||!I)return;A.current&&(F.removeLayer(A.current),A.current=null);const m={zIndex:10};C&&L&&(m.mask=!0,m.maskfence=L);const w=new ge.RasterLayer(m);return w.source(V,{parser:H.parser}),w.style(N),F.addLayer(w),A.current=w,()=>{A.current&&F&&(F.removeLayer(A.current),A.current=null)}},[F,H,V,I,L]),null}function C0({position:e="bottomleft",className:t,style:n,children:r}){const{positionClassName:o}=ke(e),l=Me();if(!r)return null;const s=i.jsx("div",{className:`l7-control l7-control-legend l7-control--glass${t?` ${t}`:""}`,style:{padding:"12px 14px",borderRadius:8,maxHeight:"40%",overflowY:"auto",...n},children:r});return l?s:i.jsx("div",{className:`l7-control-anchor ${o}`,children:s})}we.mark(C0);function Eo(e){return{mode:"select",features:e?[...e]:[],selectedFeatureId:null,isDrawing:!1,currentStrokeVertices:[],editingFeatureId:null}}let Ao=0;function v0(){return`annotation-${Date.now()}-${++Ao}`}function jt(e,t){if(e.length<=2)return e;let n=0,r=0;const o=e[0],l=e[e.length-1];for(let s=1;s<e.length-1;s++){const a=Zo(e[s],o,l);a>n&&(n=a,r=s)}if(n>t){const s=jt(e.slice(0,r+1),t),a=jt(e.slice(r),t);return s.slice(0,-1).concat(a)}return[o,l]}function Zo(e,t,n){const r=n[0]-t[0],o=n[1]-t[1],l=r*r+o*o;if(l===0){const f=e[0]-t[0],p=e[1]-t[1];return Math.sqrt(f*f+p*p)}const s=((e[0]-t[0])*r+(e[1]-t[1])*o)/l,a=t[0]+s*r,c=t[1]+s*o,d=e[0]-a,h=e[1]-c;return Math.sqrt(d*d+h*h)}function Fo(e){const{scene:t,mapsService:n,defaultFeatures:r,features:o,onAnnotationCreate:l,onAnnotationUpdate:s,onAnnotationDelete:a,onAnnotationSelect:c,onModeChange:d,onChange:h,activeColor:f,activeOpacity:p,activeStrokeWidth:g,activeFontSize:y}=e,C=u.useRef(Eo(r)),[,b]=u.useState(0),x=u.useCallback(()=>b(m=>m+1),[]);u.useEffect(()=>{o!==void 0&&(C.current.features=o,x())},[o,x]);const k=u.useCallback(()=>o??C.current.features,[o]),L=u.useCallback(m=>{o===void 0&&(C.current.features=m),h==null||h(m),x()},[o,h,x]),z=u.useCallback(m=>{var P;const w=C.current.mode;w!==m&&(w==="highlighter"&&C.current.isDrawing&&(C.current.isDrawing=!1,C.current.currentStrokeVertices=[],(P=n==null?void 0:n.setMapStatus)==null||P.call(n,{dragEnable:!0})),C.current.mode=m,C.current.editingFeatureId=null,m!=="select"&&(C.current.selectedFeatureId=null,c==null||c(null)),d==null||d(m),x())},[n,d,c,x]),E=u.useCallback(m=>{const w=[...k(),m];L(w),l==null||l(m)},[k,L,l]),T=u.useCallback((m,w)=>{const P=k().map($=>{if($.id!==m)return $;const j={...$,properties:{...$.properties,...w,updatedAt:new Date().toISOString()}};return s==null||s(j),j});L(P)},[k,L,s]),M=u.useCallback(m=>{const w=k().find($=>$.id===m);if(!w)return;const P=k().filter($=>$.id!==m);C.current.selectedFeatureId===m&&(C.current.selectedFeatureId=null,c==null||c(null)),C.current.editingFeatureId===m&&(C.current.editingFeatureId=null),L(P),a==null||a(w)},[k,L,a,c]),H=u.useCallback(m=>{C.current.selectedFeatureId=m;const w=m?k().find(P=>P.id===m)??null:null;c==null||c(w),x()},[k,c,x]),N=u.useCallback(()=>{C.current.selectedFeatureId=null,C.current.editingFeatureId=null,L([]),c==null||c(null)},[L,c]),V=u.useCallback((m,w,P)=>{const $=k().map(j=>{if(j.id!==m)return j;const O={...j,geometry:{type:"Point",coordinates:[w,P]},properties:{...j.properties,updatedAt:new Date().toISOString()}};return s==null||s(O),O});L($)},[k,L,s]),F=u.useCallback(m=>{C.current.editingFeatureId=m,x()},[x]),A=u.useCallback(()=>{C.current.editingFeatureId=null,x()},[x]),I=u.useCallback((m,w,P)=>{const $=new Date().toISOString(),j={type:"Feature",id:v0(),geometry:{type:"Point",coordinates:[m,w]}};switch(P){case"marker":return{...j,properties:{annotationType:"marker",color:f,createdAt:$}};case"text":return{...j,properties:{annotationType:"text",text:"",color:f,fontSize:y,createdAt:$}};case"note":return{...j,properties:{annotationType:"note",title:"",body:"",color:f,createdAt:$}};case"link":return{...j,properties:{annotationType:"link",url:"",title:"",color:f,createdAt:$}};case"image":return{...j,properties:{annotationType:"image",src:"",createdAt:$}};case"video":return{...j,properties:{annotationType:"video",url:"",createdAt:$}};default:return{...j,properties:{annotationType:"marker",color:f,createdAt:$}}}},[f,y]);return u.useEffect(()=>{if(!t||!n)return;const m=j=>{const O=C.current,K=De(j);if(!K)return;const[ee,Y]=K,X=O.mode;if(!(X==="select"||X==="none")&&X!=="highlighter"&&(X==="marker"||X==="text"||X==="note"||X==="link"||X==="image"||X==="video")){const te=I(ee,Y,X);E(te),C.current.mode=X,C.current.selectedFeatureId=te.id,c==null||c(te),X!=="marker"&&(C.current.editingFeatureId=te.id),X!=="marker"&&(C.current.mode="select",d==null||d("select")),x()}},w=j=>{var ee;const O=C.current;if(O.mode!=="highlighter")return;const K=De(j);K&&(O.isDrawing=!0,O.currentStrokeVertices=[K],(ee=n.setMapStatus)==null||ee.call(n,{dragEnable:!1}),x())},P=j=>{var Y,X;const O=C.current;if(!O.isDrawing||O.mode!=="highlighter")return;const K=De(j);if(!K)return;const ee=O.currentStrokeVertices;if(ee.length>0){const te=ee[ee.length-1],_=((Y=n.lngLatToContainer)==null?void 0:Y.call(n,te))??{x:0,y:0},U=((X=n.lngLatToContainer)==null?void 0:X.call(n,K))??{x:0,y:0};if(w1(_,U)<4)return}O.currentStrokeVertices=[...ee,K],x()},$=()=>{var Y;const j=C.current;if(!j.isDrawing||j.mode!=="highlighter")return;j.isDrawing=!1,(Y=n.setMapStatus)==null||Y.call(n,{dragEnable:!0});const O=j.currentStrokeVertices;if(O.length<2){j.currentStrokeVertices=[],x();return}const K=jt(O,5e-5);j.currentStrokeVertices=[];const ee={type:"Feature",id:v0(),geometry:{type:"LineString",coordinates:K},properties:{annotationType:"highlighter",color:f,strokeWidth:g,strokeOpacity:p,createdAt:new Date().toISOString()}};E(ee),x()};return t.on("click",m),t.on("mousedown",w),t.on("mousemove",P),t.on("mouseup",$),()=>{t.off("click",m),t.off("mousedown",w),t.off("mousemove",P),t.off("mouseup",$)}},[t,n,E,I,c,d,x]),u.useEffect(()=>{const m=w=>{var O,K;const P=(O=w.target)==null?void 0:O.tagName;if(P==="INPUT"||P==="TEXTAREA"||(K=w.target)!=null&&K.isContentEditable)return;if(w.key==="Escape"){z("select");return}if(w.key==="Delete"||w.key==="Backspace"){const ee=C.current.selectedFeatureId;ee&&M(ee);return}const j={m:"marker",h:"highlighter",t:"text",n:"note",k:"link",i:"image",v:"video"}[w.key.toLowerCase()];j&&z(j)};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[z,M]),{mode:C.current.mode,features:k(),selectedFeatureId:C.current.selectedFeatureId,editingFeatureId:C.current.editingFeatureId,isDrawing:C.current.isDrawing,currentStrokeVertices:C.current.currentStrokeVertices,setMode:z,addFeature:E,updateFeature:T,deleteFeature:M,selectFeature:H,clearAll:N,getFeatures:k,openEditor:F,closeEditor:A,moveFeature:V}}const b0=[{mode:"select",icon:"pan_tool",title:"选择 — 点击标注选中/拖拽移动",shortcut:"Esc"},{mode:"marker",icon:"location_on",title:"标记 — 单击放置地图钉",shortcut:"M"},{mode:"highlighter",icon:"ink_highlighter",title:"高亮 — 按住拖拽手绘",shortcut:"H"},{mode:"text",icon:"title",title:"文字 — 单击放置文字标签",shortcut:"T"},{mode:"note",icon:"sticky_note_2",title:"笔记 — 单击放置富文本笔记",shortcut:"N"},{mode:"link",icon:"link",title:"链接 — 单击放置链接",shortcut:"K"},{mode:"image",icon:"image",title:"图片 — 单击放置图片",shortcut:"I"},{mode:"video",icon:"videocam",title:"视频 — 单击放置视频",shortcut:"V"}];function To(){const e=u.useRef(null),t=u.useCallback((r,o,l)=>{var x;if(!e.current){const k=document.createElement("div");k.style.cssText=["position:fixed","pointer-events:none","z-index:9999","padding:5px 10px","border-radius:4px","background:rgba(26,27,34,0.92)","color:#f2eff9",'font:500 11px/16px "JetBrains Mono",monospace',"white-space:nowrap","box-shadow:0 2px 8px rgba(0,0,0,0.3)"].join(";"),document.body.appendChild(k),e.current=k}const s=e.current;s.textContent=`${o} ${l}`,s.style.display="block";const a=s.getBoundingClientRect(),c=r.currentTarget.getBoundingClientRect(),h=((x=r.currentTarget.closest('.l7-map-container, [id*="map"]'))==null?void 0:x.getBoundingClientRect())??{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight},f="right"in h?h.right:window.innerWidth,p="bottom"in h?h.bottom:window.innerHeight,g=h.left,y=h.top;let C=c.left-a.width-8,b=c.top+c.height/2-a.height/2;C<g+4&&(C=c.right+8),C+a.width>f-4&&(C=c.left+c.width/2-a.width/2,b=c.top-a.height-8),b<y+4&&(b=c.bottom+8),b+a.height>p-4&&(b=c.top-a.height-8),s.style.left=`${Math.max(g+4,Math.min(C,f-a.width-4))}px`,s.style.top=`${Math.max(y+4,Math.min(b,p-a.height-4))}px`},[]),n=u.useCallback(()=>{e.current&&(e.current.style.display="none")},[]);return u.useEffect(()=>()=>{var r;e.current&&((r=e.current.parentElement)==null||r.removeChild(e.current),e.current=null)},[]),{showTooltip:t,hideTooltip:n}}const No=({activeMode:e,onModeChange:t,tools:n,hasSelection:r=!1,hasFeatures:o=!1,onDeleteSelected:l,onClearAll:s,className:a,style:c})=>{const{showTooltip:d,hideTooltip:h}=To(),f=u.useMemo(()=>n?b0.filter(g=>n.includes(g.mode)):b0,[n]),p=u.useCallback(g=>{t(g==="select"||e===g?"select":g)},[e,t]);return i.jsxs("div",{className:`l7-control l7-control-annotation l7-control--glass${a?` ${a}`:""}`,style:c,role:"toolbar","aria-label":"标注工具",children:[f.map(g=>i.jsx("button",{className:`l7-button-control l7-annotation-tool-btn${e===g.mode?" l7-button-control--active":""}`,onClick:()=>p(g.mode),onMouseEnter:y=>d(y,g.title,g.shortcut),onMouseLeave:h,"aria-label":g.title,"aria-pressed":e===g.mode,children:i.jsx("span",{className:"material-symbols-outlined",children:g.icon})},g.mode)),r&&l&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"l7-draw-separator"}),i.jsx("button",{className:"l7-button-control l7-annotation-action-btn",onClick:l,onMouseEnter:g=>d(g,"删除选中标注","Del"),onMouseLeave:h,"aria-label":"删除选中标注",children:i.jsx("span",{className:"material-symbols-outlined",children:"delete"})})]}),o&&s&&i.jsx("button",{className:"l7-button-control l7-annotation-action-btn",onClick:s,onMouseEnter:g=>d(g,"清除所有标注",""),onMouseLeave:h,"aria-label":"清除所有标注",children:i.jsx("span",{className:"material-symbols-outlined",children:"delete_sweep"})})]})},Ne={marker:{color:"#3f51b5",size:32},highlighter:{color:"#ffeb3b",width:8,opacity:.5},text:{color:"#1a1a2e",fontSize:14,fontFamily:"inherit"},note:{color:"#3f51b5",maxWidth:240},link:{color:"#3f51b5"},image:{maxWidth:200,borderRadius:8},video:{maxWidth:200}},Io=["#3f51b5","#e53935","#43a047","#fb8c00","#8e24aa","#00897b","#5c6bc0","#d81b60"];function Po(e){return e?{marker:{...Ne.marker,...e.marker},highlighter:{...Ne.highlighter,...e.highlighter},text:{...Ne.text,...e.text},note:{...Ne.note,...e.note},link:{...Ne.link,...e.link},image:{...Ne.image,...e.image},video:{...Ne.video,...e.video}}:Ne}const Do={marker:"translate(-50%, -100%)",text:"translate(-50%, -50%)",note:"translate(-50%, -100%)",link:"translate(-50%, -100%)",image:"translate(-50%, -100%)",video:"translate(-50%, -100%)"};function $o(e,t){const{annotationType:n}=e.properties;switch(n){case"marker":{const r=e.properties,o=r.color||t.marker.color;return`
2
- <div class="aimapui-annotation-marker" style="color:${o}">
3
- <span class="material-symbols-outlined" style="font-size:${t.marker.size}px;color:${o}">location_on</span>
4
- ${r.label?`<div class="aimapui-annotation-marker-label">${We(r.label)}</div>`:""}
1
+ var AimapUI=(function(b0,g,w,pr,Pe,U2,j2,$2){"use strict";function W2(s){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const u in s)if(u!=="default"){const f=Object.getOwnPropertyDescriptor(s,u);Object.defineProperty(l,u,f.get?f:{enumerable:!0,get:()=>s[u]})}}return l.default=s,Object.freeze(l)}const EA=W2(pr),oe={basemap:"map",center:[105,35],zoom:4,pitch:0,rotation:0};function x1(s){return{basemap:s.basemap??oe.basemap,engine:s.engine,token:s.token,style:s.style,center:s.center??[...oe.center],zoom:s.zoom??oe.zoom,pitch:s.pitch??oe.pitch,rotation:s.rotation??oe.rotation,minZoom:s.minZoom,maxZoom:s.maxZoom,bounds:s.bounds,gestureConfig:s.gestureConfig}}let G2=0;function Y2(){return`aimap-layer-${++G2}`}function gr(s){return{id:s.id??Y2(),type:s.type,name:s.name??s.type,visible:s.visible??!0,zIndex:s.zIndex??0,minZoom:s.minZoom,maxZoom:s.maxZoom,autoFit:s.autoFit??!1,source:s.source,sourceType:s.sourceType,sourceConfig:s.sourceConfig,color:s.color,colorField:s.colorField,colorValues:s.colorValues,size:s.size,sizeField:s.sizeField,sizeValues:s.sizeValues,shape:s.shape,shapeField:s.shapeField,shapeValues:s.shapeValues,style:s.style,filterField:s.filterField,filterValues:s.filterValues,animate:s.animate,active:s.active,select:s.select,events:s.events}}const q2={zoom:"topright",scale:"bottomleft",fullscreen:"topright",geoLocate:"topright",mapTheme:"topright",mouseLocation:"bottomright",exportImage:"topright",layerSwitch:"topright",draw:"topright"};function yr(s){return{type:s.type,position:s.position??q2[s.type]??"topright",options:s.options}}const X2={breakpoint:768};function J2(s){return{breakpoint:(s==null?void 0:s.breakpoint)??X2.breakpoint,mobile:s==null?void 0:s.mobile}}function X1(s){return{map:x1(s.map),layers:(s.layers??[]).map(gr),controls:(s.controls??[]).map(yr),interactions:s.interactions??[],legends:s.legends??[],responsive:s.responsive?J2(s.responsive):void 0,events:s.events}}function mr(s){return X1(s)}function K2(s){const l=[];if(s.basemap||l.push("map.basemap is required"),s.center){const[u,f]=s.center;(u<-180||u>180)&&l.push("map.center[0] (longitude) must be between -180 and 180"),(f<-90||f>90)&&l.push("map.center[1] (latitude) must be between -90 and 90")}return l}function R2(s,l){const u=[];return s.type||u.push(`layers[${l}].type is required`),s.source===void 0&&s.source,s.colorField&&!s.colorValues&&s.color,u}function Ai(s){const l=[];return l.push(...K2(s.map)),(s.layers??[]).forEach((u,f)=>{l.push(...R2(u,f))}),{valid:l.length===0,errors:l}}const Cr=w.createContext(null);function vr({schema:s,children:l}){return g.jsx(Cr.Provider,{value:s,children:l})}function ei(){return w.useContext(Cr)}class br{constructor(){this.listeners=new Map}on(l,u){return this.listeners.has(l)||this.listeners.set(l,new Set),this.listeners.get(l).add(u),()=>{var f;(f=this.listeners.get(l))==null||f.delete(u)}}once(l,u){const f=(...m)=>{u(...m),h()},h=this.on(l,f);return h}emit(l,...u){const f=this.listeners.get(l);f&&f.forEach(h=>{try{h(...u)}catch(m){console.error(`[aimapui EventBus] Error in event "${l}":`,m)}})}off(l){this.listeners.delete(l)}clear(){this.listeners.clear()}}function wr(){return new br}const Lr=w.createContext(null);function kr({events:s,children:l}){const u=w.useRef(null);return u.current||(u.current=wr()),w.useEffect(()=>{if(!s||!u.current)return;const f=u.current,h=[];for(const[m,y]of Object.entries(s))y&&h.push(f.on(m,y));return()=>{h.forEach(m=>m())}},[s]),g.jsx(Lr.Provider,{value:u.current,children:l})}function J1(){const s=w.useContext(Lr);if(!s)throw new Error("[aimapui] useEventBus must be used within an EventBusProvider");return s}const Mr=w.createContext({resolvedTheme:"light",theme:"light",setTheme:()=>{},toggleTheme:()=>{}});function xr({defaultTheme:s="light",target:l="container",children:u}){const[f,h]=w.useState(s),[m,y]=w.useState("light");w.useEffect(()=>{const x=window.matchMedia("(prefers-color-scheme: dark)");y(x.matches?"dark":"light");const D=z=>{y(z.matches?"dark":"light")};return x.addEventListener("change",D),()=>x.removeEventListener("change",D)},[]);const C=f==="system"?m:f,b=w.useCallback(()=>{h(x=>x==="system"?m==="light"?"dark":"light":x==="light"?"dark":"light")},[m]);w.useEffect(()=>{l==="root"&&document.documentElement.setAttribute("data-theme",C)},[C,l]);const k=w.useMemo(()=>({resolvedTheme:C,theme:f,setTheme:h,toggleTheme:b}),[C,f,b]);return g.jsx(Mr.Provider,{value:k,children:l==="container"?g.jsx("div",{"data-theme":C,style:{display:"contents"},children:u}):u})}function Er(){return w.useContext(Mr)}const ti=w.createContext({isMobile:!1,breakpoint:768,width:typeof window<"u"?window.innerWidth:1024,schema:void 0});function ri({responsive:s,children:l}){const[u,f]=w.useState(typeof window<"u"?window.innerWidth:1024);w.useEffect(()=>{let C;const b=()=>{cancelAnimationFrame(C),C=requestAnimationFrame(()=>f(window.innerWidth))};return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b),cancelAnimationFrame(C)}},[]);const h=(s==null?void 0:s.breakpoint)??768,m=u<h,y=w.useMemo(()=>({isMobile:m,breakpoint:h,width:u,schema:s}),[m,h,u,s]);return g.jsx(ti.Provider,{value:y,children:l})}const zr=w.createContext(null);function Sr({scene:s,children:l}){const u=w.useRef(s);return u.current=s,g.jsx(zr.Provider,{value:u.current,children:l})}function DA(){return w.useContext(zr)}async function Dr(s){var m,y,C;const l=s.basemap??oe.basemap,u=s.token??"",f=s.style??"normal",h={center:s.center??oe.center,zoom:s.zoom??oe.zoom,pitch:s.pitch??oe.pitch,rotation:s.rotation??oe.rotation,minZoom:s.minZoom,maxZoom:s.maxZoom,dragEnable:((m=s.gestureConfig)==null?void 0:m.dragPan)??!0,zoomEnable:((y=s.gestureConfig)==null?void 0:y.pinchZoom)??!0,rotateEnable:((C=s.gestureConfig)==null?void 0:C.dragRotate)??!0};if(s.engine)return new s.engine({...h,style:f,token:u});switch(l){case"gaode":{const{GaodeMap:b}=await import("@antv/l7-maps/gaode");return new b({...h,style:ni(f),token:u})}case"mapbox":{const{Mapbox:b}=await import("@antv/l7-maps/mapbox");return new b({...h,style:ii(f),token:u})}case"tianditu":{const{TMap:b}=await import("@antv/l7-maps/tianditu");return new b({...h,token:u})}case"tencent":{const{TencentMap:b}=await import("@antv/l7-maps/tencent");return new b({...h,token:u})}case"baidu":{const{BaiduMap:b}=await import("@antv/l7-maps/baidu");return new b({...h,style:oi(f),token:u})}case"maplibre":{const{MapLibre:b}=await import("@antv/l7-maps/maplibre");return new b({...h,style:li(f),token:u})}case"google":{const{GoogleMap:b}=await import("@antv/l7-maps/google"),k=new b({...h,style:si(f),token:u});return ai(k),k}case"map":default:{const{Map:b}=await import("@antv/l7-maps/simple");return new b({center:s.center??oe.center,zoom:s.zoom??oe.zoom})}}}function ni(s){return{light:"light",dark:"dark",normal:"normal",darkblue:"dark",satellite:"satellite"}[s]??s}function ii(s){return{light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark",normal:"https://tiles.openfreemap.org/styles/bright",liberty:"https://tiles.openfreemap.org/styles/liberty",fiord:"https://tiles.openfreemap.org/styles/fiord"}[s]??s}function oi(s){return{light:"light",dark:"dark",normal:"normal",darkblue:"dark",satellite:"satellite"}[s]??s}function si(s){return{light:"roadmap",dark:"roadmap",normal:"roadmap",darkblue:"roadmap",satellite:"satellite",hybrid:"hybrid",terrain:"terrain"}[s]??"roadmap"}function li(s){return{light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark",normal:"https://tiles.openfreemap.org/styles/bright",liberty:"https://tiles.openfreemap.org/styles/liberty",fiord:"https://tiles.openfreemap.org/styles/fiord"}[s]??s}function ai(s){const l=["zoomControl","mapTypeControl","streetViewControl","fullscreenControl","scaleControl","rotateControl","panControl"],u={};for(const y of l)u[y]=!1;const f=()=>{const y=s.map;if(!y||typeof y.setOptions!="function")return!1;y.setOptions(u);const C=y.setOptions.bind(y);return y.setOptions=b=>{const k={...b};for(const x of l)x in k&&delete k[x];C(k)},!0};if(f())return;let h=0;const m=setInterval(()=>{h+=1,(f()||h>100)&&clearInterval(m)},50)}function Hr({mapSchema:s,children:l,onSceneReady:u,mapEventHandlers:f,events:h,className:m,style:y}){const C=w.useRef(null),b=w.useRef(null),[k,x]=w.useState(null),D=w.useRef(u);D.current=u;const z=w.useRef(f);z.current=f;const B=J1(),H=w.useCallback((Q,N)=>{var O,Y,n0;if(N.basemap==="map")return;const q=((O=N.gestureConfig)==null?void 0:O.dragPan)??!0,J=((Y=N.gestureConfig)==null?void 0:Y.pinchZoom)??!0,r0=((n0=N.gestureConfig)==null?void 0:n0.dragRotate)??!0;try{const A0=Q.mapService;if(A0&&typeof A0.setMapStatus=="function"&&A0.setMapStatus({dragEnable:q,zoomEnable:J,rotateEnable:r0,doubleClickZoom:J}),N.basemap==="google"&&(A0!=null&&A0.map)){const o0=A0.map;typeof o0.setOptions=="function"&&o0.setOptions({zoomControl:!1,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1,scaleControl:!1,rotateControl:!1,panControl:!1})}}catch{}},[]);w.useEffect(()=>{if(!C.current)return;let Q=!1;const N=x1(s),q=r0=>{if(Q||!C.current)return;const O=new pr.Scene({id:C.current,map:r0,logoVisible:!1});b.current=O,O.on("loaded",()=>{var Y;Q||(H(O,N),x(O),(Y=D.current)==null||Y.call(D,O),J(O))}),N.bounds&&O.on("loaded",()=>{try{const[Y,n0]=N.bounds;O.fitBounds([Y[0],Y[1],n0[0],n0[1]])}catch{}})};if(N.engine){const r0={center:N.center,zoom:N.zoom,pitch:N.pitch,rotation:N.rotation,minZoom:N.minZoom,maxZoom:N.maxZoom,style:N.style??"normal",token:N.token??""},O=new N.engine(r0);q(O)}else Dr(N).then(q);function J(r0){r0.on("mapmove",()=>{var Y,n0;const O={originalEvent:null,center:[r0.getCenter().lng,r0.getCenter().lat],zoom:r0.getZoom(),pitch:r0.getPitch(),rotation:r0.getRotation()};(n0=(Y=z.current)==null?void 0:Y.onMove)==null||n0.call(Y,O),h!=null&&h.mapMove&&B.emit(h.mapMove,O)}),r0.on("zoomchange",()=>{var Y,n0;const O={originalEvent:null,center:[r0.getCenter().lng,r0.getCenter().lat],zoom:r0.getZoom(),pitch:r0.getPitch(),rotation:r0.getRotation()};(n0=(Y=z.current)==null?void 0:Y.onZoom)==null||n0.call(Y,O),h!=null&&h.mapZoom&&B.emit(h.mapZoom,O)})}return()=>{if(Q=!0,b.current){try{b.current.destroy()}catch{}b.current=null}x(null)}},[s.basemap,s.engine,H]);const _=JSON.stringify(s.center),j=JSON.stringify(s.gestureConfig);w.useEffect(()=>{if(!k)return;const Q=x1(s);try{k.setCenter(Q.center)}catch{}try{k.setZoom(Q.zoom)}catch{}try{k.setPitch(Q.pitch)}catch{}try{k.setRotation(Q.rotation)}catch{}H(k,Q)},[k,_,s.zoom,s.pitch,s.rotation,j,H]);const Z=w.useCallback(()=>{if(b.current)try{const Q=b.current.map;Q&&typeof Q.resize=="function"&&Q.resize()}catch{}},[]);return w.useEffect(()=>(window.addEventListener("resize",Z),()=>window.removeEventListener("resize",Z)),[Z]),g.jsx("div",{ref:C,className:m??"aimapui-container",style:y??{width:"100%",height:"100%"},children:k&&g.jsx(Sr,{scene:k,children:l})})}function Br(s){if(s.colorField)return{field:s.colorField,values:s.colorValues};if(s.color)return{values:s.color}}function ci(s){if(s.sizeField)return{field:s.sizeField,values:s.sizeValues};if(s.size!==void 0)return{values:s.size}}function Vr(s){if(s.shapeField)return{field:s.shapeField,values:s.shapeValues};if(s.shape)return{values:s.shape}}function K1(s){return{color:Br(s),size:ci(s),shape:Vr(s),style:s.style?{...s.style}:void 0}}function ui(s){var l,u;return{data:s.source,options:{parser:{type:"json",x:((l=s.sourceConfig)==null?void 0:l.x)??"lng",y:((u=s.sourceConfig)==null?void 0:u.y)??"lat"}}}}function fi(s){var l,u;return{data:s.source,options:{parser:{type:"csv",x:(l=s.sourceConfig)==null?void 0:l.x,y:(u=s.sourceConfig)==null?void 0:u.y}}}}function R1(s){return{data:s.source,options:void 0}}function di(s){var l;return(l=s.sourceConfig)!=null&&l.parser?{data:s.source,options:{parser:s.sourceConfig.parser}}:s.sourceType==="geojson"?R1(s):s.sourceType==="csv"?fi(s):ui(s)}function _r(s){return{type:"PointLayer",sourceConfig:di(s),visual:K1(s),schema:s}}function Ir(s){return{type:"LineLayer",sourceConfig:hi(s),visual:K1(s),schema:s}}function hi(s){var l,u,f,h,m,y,C,b,k,x;return(l=s.sourceConfig)!=null&&l.parser?{data:s.source,options:{parser:s.sourceConfig.parser}}:s.sourceType==="geojson"?R1(s):s.sourceType==="csv"?{data:s.source,options:{parser:{type:"csv",x:(u=s.sourceConfig)==null?void 0:u.x,y:(f=s.sourceConfig)==null?void 0:f.y,x1:(h=s.sourceConfig)==null?void 0:h.x1,y1:(m=s.sourceConfig)==null?void 0:m.y1}}}:{data:s.source,options:{parser:{type:"json",x:((y=s.sourceConfig)==null?void 0:y.x)??"lng",y:((C=s.sourceConfig)==null?void 0:C.y)??"lat",x1:(b=s.sourceConfig)==null?void 0:b.x1,y1:(k=s.sourceConfig)==null?void 0:k.y1,coordinates:(x=s.sourceConfig)==null?void 0:x.coordinates}}}}function Pr(s){return{type:"PolygonLayer",sourceConfig:pi(s),visual:K1(s),schema:s}}function pi(s){var l;return s.sourceType==="geojson"?R1(s):{data:s.source,options:{parser:{type:"json",coordinates:((l=s.sourceConfig)==null?void 0:l.coordinates)??"coordinates"}}}}function Tr(s){return{type:"HeatmapLayer",sourceConfig:gi(s),visual:yi(s),schema:s}}function gi(s){var l,u,f,h,m,y,C,b;return(l=s.sourceConfig)!=null&&l.parser?{data:s.source,options:{parser:s.sourceConfig.parser,...s.sourceConfig.transforms?{transforms:s.sourceConfig.transforms}:{}}}:s.sourceType==="geojson"?{data:s.source,options:(u=s.sourceConfig)!=null&&u.transforms?{transforms:s.sourceConfig.transforms}:void 0}:s.sourceType==="csv"?{data:s.source,options:{parser:{type:"csv",x:(f=s.sourceConfig)==null?void 0:f.x,y:(h=s.sourceConfig)==null?void 0:h.y},...(m=s.sourceConfig)!=null&&m.transforms?{transforms:s.sourceConfig.transforms}:{}}}:{data:s.source,options:{parser:{type:"json",x:((y=s.sourceConfig)==null?void 0:y.x)??"lng",y:((C=s.sourceConfig)==null?void 0:C.y)??"lat"},...(b=s.sourceConfig)!=null&&b.transforms?{transforms:s.sourceConfig.transforms}:{}}}}function yi(s){const l=s.sizeField?{field:s.sizeField,values:s.sizeValues}:void 0,u=Br(s),f=Vr(s),h=s.style?{...s.style}:void 0;return{color:u,size:l,shape:f,style:h}}function Fr(s){return{type:"RasterLayer",sourceConfig:mi(s),visual:Ci(s),schema:s}}function mi(s){var l;return(l=s.sourceConfig)!=null&&l.parser?{data:s.source,options:{parser:s.sourceConfig.parser}}:{data:s.source,options:s.sourceType==="raster"?{parser:{type:"raster",extent:[73.482190241,3.82501784112,135.106618732,53.557926206]}}:s.sourceType==="rasterTile"?{parser:{type:"rasterTile",tileSize:256,zoomOffset:1}}:void 0}}function Ci(s){return{color:void 0,size:void 0,shape:void 0,style:s.style?{...s.style}:void 0}}function Nr(s){var l;return{type:"ImageLayer",sourceConfig:{data:s.source,options:{parser:((l=s.sourceConfig)==null?void 0:l.parser)??(s.sourceType==="image"?{type:"image"}:void 0)}},visual:{color:void 0,size:void 0,shape:void 0,style:s.style?{...s.style}:void 0},schema:s}}function At(s,l,u,f){const h=w.useRef(l),m=w.useRef(u);h.current=l,m.current=u;const y=w.useRef(f);y.current=f;const C=w.useRef(null),b=w.useRef(s);b.current=s;const k=w.useCallback(()=>{const D=b.current;if(D)try{const z=D.mapService;if(z){const B=z.lngLatToContainer([h.current,m.current]);B&&y.current(B.x,B.y)}else{const B=D.lngLatToContainer([h.current,m.current]);B&&y.current(B.x,B.y)}}catch{}},[]),x=w.useCallback(()=>{k()},[k]);w.useEffect(()=>{if(!s)return;const D=()=>{setTimeout(()=>k(),0)};return s.loaded?D():s.on("loaded",D),()=>{s.off("loaded",D)}},[s,k]),w.useEffect(()=>{k()},[l,u,k]),w.useEffect(()=>{if(s){try{const D=s.mapService;if(D)return D.on("camerachange",x),D.on("viewchange",x),()=>{D.off("camerachange",x),D.off("viewchange",x)}}catch{}return s.on("camerachange",x),s.on("resize",x),()=>{s.off("camerachange",x),s.off("resize",x)}}},[s,x]),w.useEffect(()=>()=>{C.current!==null&&(cancelAnimationFrame(C.current),C.current=null)},[])}function bA(...s){return U2(s)}function vi(s,l=1){const u=s.replace("#","").match(/.{2}/g);if(!u||u.length<3)return s;const[f,h,m]=u.map(y=>parseInt(y,16));return`rgba(${f}, ${h}, ${m}, ${l})`}function E1(s){return typeof s=="string"&&/<[a-zA-Z][^>]*>/.test(s)}let l1=null;const et=new Set;function bi(s,l){l1&&l1!==s&&et.forEach(u=>u(s)),l1=s}function wi(s){l1===s&&(l1=null)}function Li(s,l,u,f,h,m,y,C){if(y!=="auto")return qe(y,C);const b=l,k=m-l,x=s,D=h-s,z=8;if(b>=f+C+z)return qe("top",C);if(k>=f+C+z)return qe("bottom",C);if(D>=u+C+z)return qe("right",C);if(x>=u+C+z)return qe("left",C);const H=Object.entries({top:b,bottom:k,right:D,left:x}).sort((_,j)=>j[1]-_[1])[0][0];return qe(H,C)}function qe(s,l){switch(s){case"top":return{placement:"top",transform:`translate(-50%, -100%) translateY(-${l}px)`};case"bottom":return{placement:"bottom",transform:`translate(-50%, 0) translateY(${l}px)`};case"left":return{placement:"left",transform:`translate(-100%, -50%) translateX(-${l}px)`};case"right":return{placement:"right",transform:`translate(0, -50%) translateX(${l}px)`}}}function z1({onClick:s}){return g.jsx("button",{onClick:l=>{l.stopPropagation(),s()},className:"aimapui-popup-close-btn absolute top-2 right-2 size-8 flex items-center justify-center text-on-surface-variant rounded-lg transition-[color,background] duration-200 cursor-pointer bg-transparent border-none p-0 hover:text-on-surface hover:bg-surface-container-high [&_.material-symbols-outlined]:text-xl","aria-label":"关闭",children:g.jsx("span",{className:"material-symbols-outlined",children:"close"})})}const ki={top:"M0 0L8 8L16 0",bottom:"M0 8L8 0L16 8",left:"M0 0L8 8L0 16",right:"M8 0L0 8L8 16"};function S1({placement:s}){const l=s==="top"||s==="bottom",u=l?16:8,f=l?8:16,h=l?"0 0 16 8":"0 0 8 16",m=ki[s];return g.jsx("div",{className:`aimapui-popup-tip-arrow aimapui-popup-tip-arrow--${s==="top"?"bottom":s==="bottom"?"top":s}`,children:g.jsxs("svg",{width:u,height:f,viewBox:h,fill:"none",children:[g.jsx("path",{d:m,fill:"rgba(248, 249, 255, 0.95)"}),g.jsx("path",{d:m,stroke:"rgba(195, 198, 215, 0.3)",strokeWidth:"0.5",fill:"none"})]})})}function Mi({header:s,onClose:l}){return s.coverUrl?g.jsxs("div",{className:"aimapui-popup-cover relative aspect-video overflow-hidden",children:[g.jsx("img",{src:s.coverUrl,alt:s.title,className:"aimapui-popup-cover-img w-full h-full object-cover"}),g.jsx("button",{className:"aimapui-popup-close-btn aimapui-popup-close-btn--cover absolute top-2 right-2 size-8 bg-black/30 backdrop-blur-sm text-white flex items-center justify-center rounded-full border-none cursor-pointer transition-colors duration-200 z-10 hover:bg-black/50 [&_.material-symbols-outlined]:text-lg","aria-label":"关闭",onClick:u=>{u.stopPropagation(),l()},children:g.jsx("span",{className:"material-symbols-outlined",children:"close"})}),s.statusLabel&&g.jsxs("div",{className:"aimapui-popup-status-badge absolute bottom-2 left-2 flex items-center gap-1.5 px-2 py-0.5 bg-surface/90 backdrop-blur-sm rounded-md shadow-sm text-[10px] font-semibold uppercase tracking-wide text-on-surface",children:[g.jsx("div",{className:"size-2 rounded-full",style:{background:s.statusColor||"#10b981"}}),g.jsx("span",{children:s.statusLabel})]})]}):null}function xi({header:s,onClose:l,hasCover:u,showStatusDot:f}){return g.jsxs("div",{className:bA("aimapui-popup-header relative flex items-center p-4",!u&&"pr-10"),children:[f&&s.statusDot&&g.jsx("div",{className:"size-2 rounded-full shrink-0 mr-2 animate-pulse",style:{background:s.statusDot}}),g.jsx("h3",{className:"aimapui-popup-title text-xl leading-7 font-semibold text-on-surface m-0 flex-1 min-w-0 truncate",children:s.title}),!u&&g.jsx(z1,{onClick:l})]})}function Ei({attributes:s,size:l}){const u=l==="compact",f=l==="detailed",h=u?1:2;return g.jsx("div",{className:bA("aimapui-popup-attrs",u?"flex flex-col":"grid gap-2"),style:u?void 0:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:s.map((m,y)=>f&&m.icon?g.jsxs("div",{className:"aimapui-popup-attr flex items-center gap-2",children:[g.jsx("div",{className:"aimapui-popup-attr-icon size-12 rounded-lg bg-surface-container-highest flex items-center justify-center text-primary shrink-0 [&_.material-symbols-outlined]:text-[28px]",children:g.jsx("span",{className:"material-symbols-outlined",children:m.icon})}),g.jsxs("div",{children:[g.jsx("p",{className:"aimapui-popup-attr-label text-sm leading-5 text-on-surface-variant m-0",children:m.label}),g.jsx("p",{className:"aimapui-popup-attr-value text-sm leading-5 font-medium text-on-surface m-0",style:m.valueColor?{color:m.valueColor}:void 0,children:m.value})]})]},y):g.jsxs("div",{className:bA("aimapui-popup-attr","flex justify-between items-baseline gap-2",u&&"py-2 border-b border-outline-variant/30 last:border-b-0 last:pb-0 first:pt-0"),children:[g.jsx("p",{className:"aimapui-popup-attr-label text-sm leading-5 text-on-surface-variant m-0",children:m.label}),g.jsx("p",{className:"aimapui-popup-attr-value text-sm leading-5 font-medium text-on-surface m-0 text-right",style:m.valueColor?{color:m.valueColor}:void 0,children:m.value})]},y))})}function zi({actions:s}){return g.jsx("div",{className:"aimapui-popup-actions flex gap-3 px-4 pb-4",children:s.map((l,u)=>g.jsx("button",{className:bA("aimapui-popup-action-btn","flex-1 py-2.5 text-sm leading-5 font-semibold rounded-lg border-none cursor-pointer transition-all duration-150 active:scale-[0.98]",l.variant==="secondary"?"aimapui-popup-action-btn--secondary bg-transparent text-on-surface border-2 border-solid border-outline-variant hover:bg-surface-container-low":"aimapui-popup-action-btn--primary bg-primary text-on-primary shadow-sm hover:shadow-[0_4px_12px_rgba(0,74,198,0.3)]"),onClick:l.onClick,children:l.label},u))})}function a1({longitude:s,latitude:l,content:u,closeButton:f=!0,size:h="standard",placement:m="auto",offset:y=8,header:C,attributes:b,actions:k,visible:x,singleton:D=!1,overlayContainer:z,onClose:B,className:H}){const _=DA(),j=x!==void 0,[Z,Q]=w.useState(!0),N=j?x:Z,[q,J]=w.useState(!1),[r0,O]=w.useState("top"),Y=w.useRef(null),n0=w.useRef(!0);w.useRef(!1);const A0=w.useRef(Symbol("popup")),[o0,X]=w.useState(null);w.useEffect(()=>{if(z||!_)return;const w0=()=>{try{const N0=_.mapService;if(N0&&typeof N0.getMarkerContainer=="function"){const D0=N0.getMarkerContainer();if(D0)return X(D0),!0}}catch{}return!1};if(w0())return;const g0=()=>{w0()};return _.loaded?g0():_.on("loaded",g0),()=>{_.off("loaded",g0)}},[_,z]);const t0=z??o0,V=w.useCallback(()=>{q||(J(!0),setTimeout(()=>{j||Q(!1),B==null||B(),J(!1)},150))},[j,B,q]);w.useEffect(()=>{if(!D||!N)return;const w0=A0.current;return bi(w0),()=>wi(w0)},[D,N,V]),w.useEffect(()=>{if(!D)return;const w0=A0.current,g0=N0=>{N0!==w0&&N&&V()};return et.add(g0),()=>{et.delete(g0)}},[D,N,V]);const $=w.useRef(()=>{});$.current=(w0,g0)=>{var V0;const N0=Y.current;if(!N0)return;const D0=Math.round(w0),_0=Math.round(g0);let gA=0,z0=0;try{const d0=_==null?void 0:_.mapService,L0=(V0=d0==null?void 0:d0.getContainer)==null?void 0:V0.call(d0);if(L0){const T0=L0.getBoundingClientRect();gA=T0.width||L0.clientWidth||L0.scrollWidth,z0=T0.height||L0.clientHeight||L0.scrollHeight}}catch{}const B0=N0.querySelector(".aimapui-popup-content"),j0=(B0==null?void 0:B0.offsetWidth)||320,l0=(B0==null?void 0:B0.offsetHeight)||200,{placement:F,transform:a0}=Li(D0,_0,j0,l0,gA,z0,m,y);O(F),N0.style.left="0",N0.style.top="0",N0.style.transform=`translate3d(${D0}px, ${_0}px, 0) ${a0}`;let U;if(gA>0&&z0>0)U=D0>=-2&&D0<=gA+2&&_0>=-2&&_0<=z0+2;else{const d0=N0.parentElement;d0&&d0.clientWidth>0&&d0.clientHeight>0?U=D0>=0&&D0<=d0.clientWidth&&_0>=0&&_0<=d0.clientHeight:U=n0.current}n0.current=U,N0.style.display=U?"":"none"};const e0=w.useCallback(()=>{if(_)try{const w0=_.mapService,g0=w0?w0.lngLatToContainer([s,l]):_.lngLatToContainer([s,l]);g0&&$.current(g0.x,g0.y)}catch{}},[_,s,l]);if(w.useEffect(()=>{if(!t0||!N)return;const w0=requestAnimationFrame(()=>{e0()});return()=>cancelAnimationFrame(w0)},[t0,N,e0]),w.useEffect(()=>{if(!N)return;const w0=g0=>{g0.key==="Escape"&&V()};return document.addEventListener("keydown",w0),()=>document.removeEventListener("keydown",w0)},[N,V]),w.useEffect(()=>{var D0;if(!N||!t0)return;const w0=_0=>{const gA=Y.current;if(!gA||gA.contains(_0.target))return;const z0=_0.target;z0.closest(".aimapui-marker")||z0.closest("[data-marker]")||V()};let g0=null;try{const _0=_==null?void 0:_.mapService;_0&&(g0=(D0=_0.getContainer)==null?void 0:D0.call(_0))}catch{}const N0=g0||t0.parentElement||t0;return N0.addEventListener("click",w0,!0),()=>N0.removeEventListener("click",w0,!0)},[N,t0,_,V]),At(_,s,l,(w0,g0)=>{$.current(w0,g0)}),!N||!t0)return null;const c0=C||b||k,h0=!!(C!=null&&C.coverUrl),p0=r0==="left"||r0==="right",H0=()=>c0?g.jsxs(g.Fragment,{children:[C&&h0&&g.jsx(Mi,{header:C,onClose:V}),C&&g.jsx(xi,{header:C,onClose:V,hasCover:h0,showStatusDot:h==="compact"}),g.jsxs("div",{className:bA("aimapui-popup-body relative p-4 text-sm leading-5 text-on-surface break-words whitespace-normal",!C&&f&&"pr-10"),children:[!C&&f&&g.jsx(z1,{onClick:V}),u&&!E1(u)&&typeof u!="string"&&g.jsx("div",{children:u}),u&&E1(u)&&g.jsx("div",{dangerouslySetInnerHTML:{__html:u}}),u&&!E1(u)&&typeof u=="string"&&g.jsx("div",{children:u}),!u&&!(b!=null&&b.length)&&!(k!=null&&k.length)&&!C&&g.jsx("div",{style:{color:"var(--color-on-surface-variant)"},children:"无内容"}),b&&b.length>0&&g.jsx(Ei,{attributes:b,size:h})]}),k&&k.length>0&&g.jsx(zi,{actions:k})]}):E1(u)?g.jsxs("div",{className:"aimapui-popup-body relative p-4 pt-2 pr-10 text-sm leading-5 text-on-surface break-words whitespace-normal",children:[f&&g.jsx(z1,{onClick:V}),g.jsx("div",{dangerouslySetInnerHTML:{__html:u}})]}):g.jsxs("div",{className:"aimapui-popup-body relative p-4 pt-2 pr-10 text-sm leading-5 text-on-surface break-words whitespace-normal",children:[f&&g.jsx(z1,{onClick:V}),g.jsx("div",{children:u??""})]}),U0=p0?{display:"flex",alignItems:"center"}:{display:"flex",flexDirection:"column",alignItems:"center"};return Pe.createPortal(g.jsxs("div",{ref:Y,className:bA("aimapui-popup",`aimapui-popup--${h}`),style:{position:"absolute",left:0,top:0,transform:"translate(-9999px, -9999px)",display:"none",zIndex:30,pointerEvents:"auto",...U0},children:[r0==="bottom"&&g.jsx(S1,{placement:r0}),r0==="right"&&g.jsx(S1,{placement:r0}),g.jsx("div",{className:bA("aimapui-popup-content overflow-hidden rounded-xl",q&&"aimapui-popup-content--exit",H),children:H0()}),r0==="top"&&g.jsx(S1,{placement:r0}),r0==="left"&&g.jsx(S1,{placement:r0})]}),t0)}const Si={top:"bottom",bottom:"top",left:"right",right:"left"},Di={top:"translate(-50%, -100%)",bottom:"translate(-50%, 0)",left:"translate(-100%, -50%)",right:"translate(0, -50%)"};function tt({content:s,variant:l="dark",longitude:u,latitude:f,targetElement:h,placement:m="top",offset:y=8,trigger:C="hover",visible:b,title:k,items:x,overlayContainer:D,className:z}){const{resolvedTheme:B}=Er(),H=DA(),_=b!==void 0,[j,Z]=w.useState(!1),Q=_?b:j,N=w.useRef(null),q=w.useRef(null),J=u!==void 0&&f!==void 0;w.useEffect(()=>{if(J||!h||_)return;const V=()=>{q.current=setTimeout(()=>Z(!0),100)},$=()=>{q.current&&(clearTimeout(q.current),q.current=null),Z(!1)},e0=()=>{q.current&&clearTimeout(q.current),Z(c0=>!c0)};return C==="hover"?(h.addEventListener("mouseenter",V),h.addEventListener("mouseleave",$)):h.addEventListener("click",e0),()=>{q.current&&clearTimeout(q.current),h.removeEventListener("mouseenter",V),h.removeEventListener("mouseleave",$),h.removeEventListener("click",e0)}},[h,C,J,_]);const r0=w.useCallback(()=>{if(!h||!N.current)return;const V=h.getBoundingClientRect(),$=N.current.getBoundingClientRect();let e0=0,c0=0;switch(m){case"right":e0=V.right+y,c0=V.top+V.height/2-$.height/2;break;case"bottom":e0=V.left+V.width/2-$.width/2,c0=V.bottom+y;break;case"left":e0=V.left-$.width-y,c0=V.top+V.height/2-$.height/2;break;case"top":default:e0=V.left+V.width/2-$.width/2,c0=V.top-$.height-y;break}const h0=8;e0=Math.max(h0,Math.min(e0,window.innerWidth-$.width-h0)),c0=Math.max(h0,Math.min(c0,window.innerHeight-$.height-h0)),N.current.style.display="",N.current.style.left=`${e0}px`,N.current.style.top=`${c0}px`},[h,m,y]);w.useEffect(()=>{if(J||!Q||!h)return;r0();const V=()=>r0();return window.addEventListener("resize",V),window.addEventListener("scroll",V,!0),()=>{window.removeEventListener("resize",V),window.removeEventListener("scroll",V,!0)}},[Q,h,J,r0]);const O=w.useCallback(()=>{var V,$;if(!H)return null;try{const e0=H.mapService,c0=((V=e0==null?void 0:e0.getContainer)==null?void 0:V.call(e0))??(($=H.getMapContainer)==null?void 0:$.call(H))??H.container;if(c0 instanceof HTMLElement)return c0.getBoundingClientRect()}catch{}return null},[H]),Y=w.useRef(()=>{});Y.current=(V,$)=>{const e0=N.current;if(!e0||!J)return;let c0=0,h0=0;switch(m){case"top":h0=-y;break;case"bottom":h0=y;break;case"left":c0=-y;break;case"right":c0=y;break}const p0=O();let H0=!0;if(p0&&p0.width>0&&p0.height>0&&(H0=V>=-2&&V<=p0.width+2&&$>=-2&&$<=p0.height+2),!H0){e0.style.display="none";return}const U0=p0?p0.left:0,w0=p0?p0.top:0,g0=Math.round(V+c0+U0),N0=Math.round($+h0+w0),D0=Di[m];e0.style.display="",e0.style.transform=`translate3d(${g0}px, ${N0}px, 0) ${D0}`};const n0=w.useCallback(()=>{if(!(!H||!J))try{const V=H.mapService,$=V?V.lngLatToContainer([u,f]):H.lngLatToContainer([u,f]);if(!$||isNaN($.x)||isNaN($.y))return;Y.current($.x,$.y)}catch{}},[H,u,f,J]);if(w.useEffect(()=>{if(!J||!Q)return;const V=requestAnimationFrame(()=>n0());return()=>cancelAnimationFrame(V)},[Q,J,n0]),At(J?H:null,u??0,f??0,(V,$)=>{Y.current(V,$)}),!Q)return null;const A0=Si[m],o0=k||x&&x.length>0,X=()=>s?typeof s=="string"?g.jsx("span",{dangerouslySetInnerHTML:{__html:s}}):s:o0?g.jsxs(g.Fragment,{children:[k&&g.jsx("p",{className:"font-sans text-xs leading-4 font-semibold m-0 mb-0.5",children:k}),x&&x.length>0&&g.jsx("div",{className:"flex flex-col gap-0.5",children:x.map((V,$)=>g.jsxs("div",{className:"flex justify-between items-center gap-3",children:[g.jsx("span",{className:"text-xs leading-4 font-normal opacity-70 m-0",children:V.label}),g.jsx("span",{className:"font-mono text-xs leading-4 font-[450] text-right m-0",children:V.value})]},$))})]}):null,t0=g.jsxs("div",{ref:N,"data-theme":B,className:bA("aimapui-tooltip",l!=="dark"&&`aimapui-tooltip--${l}`),style:{position:"fixed",left:0,top:0,transform:"translate(-9999px, -9999px)",display:"none",zIndex:9999,pointerEvents:"none"},children:[g.jsx("div",{className:bA("aimapui-tooltip-content",z),children:X()}),g.jsx("div",{className:`aimapui-tooltip-arrow aimapui-tooltip-arrow--${A0}`})]});return Pe.createPortal(t0,document.body)}function Hi(s,l){let u;switch(s.type){case"point":u=_r(s);break;case"line":u=Ir(s);break;case"polygon":u=Pr(s);break;case"heatmap":u=Tr(s);break;case"raster":u=Fr(s);break;case"image":u=Nr(s);break;default:return console.warn(`[aimapui] Unknown layer type: ${s.type}`),null}return Bi(u)}function Bi(s,l){var x;const u=EA[s.type];if(!u)throw new Error(`[aimapui] L7 layer class "${s.type}" not found`);const f=new u({...s.schema.zIndex!==void 0?{zIndex:s.schema.zIndex}:{},...s.schema.name?{name:s.schema.name}:{}}),{data:h,options:m}=s.sourceConfig;m?f.source(h,m):f.source(h);const{color:y,size:C,shape:b,style:k}=s.visual;if(y&&(y.field&&y.values?f.color(y.field,y.values):y.values&&f.color(y.values)),C&&(C.field&&C.values?f.size(C.field,C.values):C.values!==void 0&&f.size(C.values)),b&&(b.field&&b.values?f.shape(b.field,b.values):b.values&&f.shape(b.values)),k&&Object.keys(k).length>0&&f.style(k),s.type==="PointLayer"&&!b&&f.shape("circle"),s.type==="LineLayer"&&!b&&f.shape("line"),s.schema.filterField&&s.schema.filterValues){const D=s.schema.filterField,z=s.schema.filterValues;f.filter(D,B=>z.includes(B))}return(x=s.schema.animate)!=null&&x.enable&&f.animate(!0,s.schema.animate),s.schema.active&&f.active(s.schema.active),s.schema.select&&f.select(s.schema.select),s.schema.opacity!==void 0&&f.style({opacity:s.schema.opacity}),s.schema.blend&&f.blend(s.schema.blend),s.schema.visible===!1&&f.hide(),s.schema.minZoom!==void 0&&f.minZoom(s.schema.minZoom),s.schema.maxZoom!==void 0&&f.maxZoom(s.schema.maxZoom),f}function D1(s,l,u){var C,b,k,x,D,z,B,H;const f=u,h=Number.isFinite((C=f==null?void 0:f.lnglat)==null?void 0:C.lng)?f.lnglat.lng:Number.isFinite((b=f==null?void 0:f.lngLat)==null?void 0:b.lng)?f.lngLat.lng:Number.isFinite((k=f==null?void 0:f.coordinate)==null?void 0:k.lng)?f.coordinate.lng:0,m=Number.isFinite((x=f==null?void 0:f.lnglat)==null?void 0:x.lat)?f.lnglat.lat:Number.isFinite((D=f==null?void 0:f.lngLat)==null?void 0:D.lat)?f.lngLat.lat:Number.isFinite((z=f==null?void 0:f.coordinate)==null?void 0:z.lat)?f.coordinate.lat:0,y=((B=f==null?void 0:f.feature)==null?void 0:B.properties)??(f==null?void 0:f.feature)??((H=f==null?void 0:f.data)==null?void 0:H.properties)??(f==null?void 0:f.data)??void 0;return{layerId:s,layerType:l,originalEvent:u,lng:h,lat:m,feature:y}}function Te({schema:s,scene:l,eventHandlers:u,onLayerCreated:f}){const h=w.useRef(null),m=J1(),y=w.useRef(u);y.current=u;const C=w.useMemo(()=>{const{source:x,...D}=s;let z;if(ArrayBuffer.isView(x))z=`TypedArray:${x.length}`;else if(x&&typeof x=="object"&&"width"in x){const B=x;z=`Rasters:${B.width}x${B.height}:${B.length}`}else if(typeof x=="string")z=x;else try{z=JSON.stringify(x)}catch{z=String(x)}return z+"|"+Vi(D)},[s]),[b,k]=w.useState({visible:!1,lng:0,lat:0,content:"",trigger:"click"});return w.useEffect(()=>{var r0,O,Y,n0;const x=Hi(s);if(!x)return;let D=!1;h.current=x;const z=s.id??s.name??`layer-${s.type}`,B=s.events,H=!!(B!=null&&B.enablePopup),_=(B==null?void 0:B.popupTrigger)??"click",j=A0=>{if(!H)return;const o0=A0.feature;if(!o0)return;const X=_i(o0,B==null?void 0:B.popupFields,B==null?void 0:B.popupTemplate);k({visible:!0,lng:A0.lng,lat:A0.lat,content:X,trigger:_})},Z=()=>{k(A0=>({...A0,visible:!1}))},Q=!!((r0=y.current)!=null&&r0.onClick||B!=null&&B.click||H&&_==="click"),N=!!((O=y.current)!=null&&O.onMouseMove||B!=null&&B.mousemove||H&&_==="hover"),q=!!((Y=y.current)!=null&&Y.onMouseEnter||B!=null&&B.mouseenter),J=!!((n0=y.current)!=null&&n0.onMouseLeave||B!=null&&B.mouseleave||H&&_==="hover");return Q&&x.on("click",A0=>{var X,t0;const o0=D1(z,s.type,A0);(t0=(X=y.current)==null?void 0:X.onClick)==null||t0.call(X,o0),B!=null&&B.click&&m.emit(B.click,o0),_==="click"&&j(o0)}),N&&x.on("mousemove",A0=>{var X,t0;const o0=D1(z,s.type,A0);(t0=(X=y.current)==null?void 0:X.onMouseMove)==null||t0.call(X,o0),_==="hover"&&j(o0),B!=null&&B.mousemove&&m.emit(B.mousemove,o0)}),q&&x.on("mouseenter",A0=>{var X,t0;const o0=D1(z,s.type,A0);(t0=(X=y.current)==null?void 0:X.onMouseEnter)==null||t0.call(X,o0),B!=null&&B.mouseenter&&m.emit(B.mouseenter,o0)}),J&&x.on("mouseleave",A0=>{var X,t0;const o0=D1(z,s.type,A0);(t0=(X=y.current)==null?void 0:X.onMouseLeave)==null||t0.call(X,o0),_==="hover"&&Z(),B!=null&&B.mouseleave&&m.emit(B.mouseleave,o0)}),l.addLayer(x),f==null||f(x),x.on("inited",()=>{var A0,o0;if(!D){if(s.autoFit){const X=(o0=(A0=x.getSource)==null?void 0:A0.call(x))==null?void 0:o0.extent;if(X&&Array.isArray(X)&&X.length>=4){const[t0,V,$,e0]=X;isFinite(t0)&&isFinite(V)&&isFinite($)&&isFinite(e0)&&t0<$&&V<e0&&l.fitBounds([[t0,V],[$,e0]])}}l.render()}}),()=>{if(D=!0,h.current){try{l.removeLayer(h.current)}catch{}h.current=null}k(A0=>({...A0,visible:!1}))}},[C,l,m]),w.useEffect(()=>{h.current&&(s.visible===!1?h.current.hide():h.current.show(),s.zIndex!==void 0&&(h.current.zIndex=s.zIndex))},[s.visible,s.zIndex]),b.visible?b.trigger==="hover"?g.jsx(tt,{longitude:b.lng,latitude:b.lat,content:b.content,variant:"dark",placement:"top",visible:!0}):g.jsx(a1,{longitude:b.lng,latitude:b.lat,content:b.content,closeButton:!0,size:"compact",onClose:()=>k(x=>({...x,visible:!1}))}):null}function Vi(s){return JSON.stringify(rt(s))}function rt(s){if(ArrayBuffer.isView(s))return`[TypedArray:${s.length}]`;if(s instanceof ArrayBuffer)return`[ArrayBuffer:${s.byteLength}]`;if(Array.isArray(s))return s.length>1e3?`[Array:${s.length}]`:s.map(rt);if(s&&typeof s=="object"){const l=s,u=Object.keys(l).sort(),f={};return u.forEach(h=>{f[h]=rt(l[h])}),f}return s}function _i(s,l,u){return u?u.replace(/\{\{(\w+)\}\}/g,(m,y)=>String(s[y]??"")):`<table style="font-size:12px">${(l??Object.keys(s).filter(m=>!["_id","id","geometry","coordinates"].includes(m))).map(m=>`<tr><td style="font-weight:600;padding-right:8px">${m}</td><td>${s[m]??""}</td></tr>`).join("")}</table>`}function Zr({layers:s,eventHandlers:l}){const u=DA();return u?g.jsx(g.Fragment,{children:s.map((f,h)=>g.jsx(Te,{schema:f,scene:u,eventHandlers:l},f.id??`layer-${h}`))}):null}const Qr=w.createContext(!1);function qA(){return w.useContext(Qr)}const nt=new Set,UA={mark(s){s&&typeof s=="object"&&"$$typeof"in s&&nt.add(s),s&&typeof s=="function"&&nt.add(s)},check(s){if("position"in s.props)return!0;const l=s.type;if(nt.has(l))return!0;const u=l==null?void 0:l.displayName;return!!(typeof u=="string"&&u.endsWith("Control"))}};function it({children:s,className:l,style:u}){const{controlGroups:f,otherChildren:h}=Ii(s);return g.jsx(Qr.Provider,{value:!0,children:g.jsxs("div",{className:`l7-control-container${l?` ${l}`:""}`,style:u,children:[Object.entries(f).map(([m,y])=>{const C=Ti(m);return g.jsx("div",{className:`l7-control-anchor ${C}`,children:y},m)}),h]})})}function Ii(s){const l={},u=[];return w.Children.forEach(s,(f,h)=>{var m;if(!w.isValidElement(f)){u.push(f);return}if(UA.check(f)){const y=((m=f.props)==null?void 0:m.position)??"topright";l[y]||(l[y]=[]),l[y].push(f)}else u.push(w.isValidElement(f)?w.cloneElement(f,{key:f.key??`non-ctrl-${h}`}):f)}),{controlGroups:l,otherChildren:u}}function Pi(s){switch(s){case"topleft":return{vSide:"top",hSide:"left",direction:"column"};case"topright":return{vSide:"top",hSide:"right",direction:"column"};case"bottomleft":return{vSide:"bottom",hSide:"left",direction:"column"};case"bottomright":return{vSide:"bottom",hSide:"right",direction:"column"};case"topcenter":return{vSide:"top",hSide:"left",direction:"row"};case"bottomcenter":return{vSide:"bottom",hSide:"left",direction:"row"};case"lefttop":return{vSide:"top",hSide:"left",direction:"row"};case"leftbottom":return{vSide:"bottom",hSide:"left",direction:"row"};case"righttop":return{vSide:"top",hSide:"right",direction:"row"};case"rightbottom":return{vSide:"bottom",hSide:"right",direction:"row"};default:return{vSide:"top",hSide:"right",direction:"column"}}}function Ti(s){if(s==="rightcenter")return"l7-rightcenter l7-column";if(s==="leftcenter")return"l7-leftcenter l7-column";const{vSide:l,hSide:u,direction:f}=Pi(s);return`l7-${l} l7-${u} l7-${f}`}function XA(s){const l=DA(),u=w.useMemo(()=>{if(!l)return null;try{return l.mapService??null}catch{return null}},[l]),f=w.useCallback(()=>{var m;if(!l)return null;try{return u&&typeof u.getContainer=="function"?u.getContainer():((m=l.getContainer)==null?void 0:m.call(l))??null}catch{return null}},[l,u]),h=w.useMemo(()=>{if(s==="rightcenter")return"l7-rightcenter l7-column";if(s==="leftcenter")return"l7-leftcenter l7-column";const{vSide:m,hSide:y,direction:C}=Fi(s??"topright");return`l7-${m} l7-${y} l7-${C}`},[s]);return{scene:l,mapsService:u,getMapContainer:f,positionClassName:h}}function Fi(s){switch(s){case"topleft":return{vSide:"top",hSide:"left",direction:"column"};case"topright":return{vSide:"top",hSide:"right",direction:"column"};case"bottomleft":return{vSide:"bottom",hSide:"left",direction:"column"};case"bottomright":return{vSide:"bottom",hSide:"right",direction:"column"};case"topcenter":return{vSide:"top",hSide:"left",direction:"row"};case"bottomcenter":return{vSide:"bottom",hSide:"left",direction:"row"};case"lefttop":return{vSide:"top",hSide:"left",direction:"row"};case"leftbottom":return{vSide:"bottom",hSide:"left",direction:"row"};case"righttop":return{vSide:"top",hSide:"right",direction:"row"};case"rightbottom":return{vSide:"bottom",hSide:"right",direction:"row"};case"rightcenter":return{vSide:"top",hSide:"right",direction:"column"};case"leftcenter":return{vSide:"top",hSide:"left",direction:"column"};default:return{vSide:"top",hSide:"right",direction:"column"}}}function ot({position:s="bottomright",zoomInText:l,zoomInTitle:u="Zoom in",zoomOutText:f,zoomOutTitle:h="Zoom out",showZoom:m=!1,className:y,style:C}){const{scene:b,mapsService:k,positionClassName:x}=XA(s),D=qA(),[z,B]=w.useState(0),[H,_]=w.useState(!0),[j,Z]=w.useState(!0),Q=w.useRef(()=>{if(!k)return;const r0=Math.floor(k.getZoom());B(r0),_(k.getZoom()<k.getMaxZoom()),Z(k.getZoom()>k.getMinZoom())});w.useEffect(()=>{if(!k)return;Q.current();const r0=()=>Q.current();return k.on("zoomend",r0),k.on("zoomchange",r0),()=>{k.off("zoomend",r0),k.off("zoomchange",r0)}},[k]);const N=()=>{if(!k||!b)return;const r0=k.getZoom(),O=k.getMaxZoom();if(r0<O){const Y=Math.min(r0+1,O);b.setZoom(Y)}},q=()=>{if(!k||!b)return;const r0=k.getZoom(),O=k.getMinZoom();if(r0>O){const Y=Math.max(r0-1,O);b.setZoom(Y)}},J=g.jsxs("div",{className:`l7-control l7-control-zoom l7-control--glass${y?` ${y}`:""}`,style:C,children:[g.jsx("button",{className:"l7-button-control",onClick:N,disabled:!H,title:u,"aria-label":u,children:l??g.jsx("span",{className:"material-symbols-outlined",children:"add"})}),m&&g.jsx("button",{className:"l7-button-control l7-control-zoom__number",disabled:!0,children:z}),g.jsx("button",{className:"l7-button-control",onClick:q,disabled:!j,title:h,"aria-label":h,children:f??g.jsx("span",{className:"material-symbols-outlined",children:"remove"})})]});return D?J:g.jsx("div",{className:`l7-control-anchor ${x}`,children:J})}UA.mark(ot);function Ni(s,l){const[u,f]=s,[h,m]=l,y=63710088e-1,C=(m-f)*Math.PI/180,b=(h-u)*Math.PI/180,k=Math.sin(C/2)*Math.sin(C/2)+Math.cos(f*Math.PI/180)*Math.cos(m*Math.PI/180)*Math.sin(b/2)*Math.sin(b/2),x=2*Math.atan2(Math.sqrt(k),Math.sqrt(1-k));return y*x}function st(s){const l=Math.pow(10,Math.floor(Math.abs(s)).toString().length-1);let u=s/l;return u=u>=10?10:u>=5?5:u>=3?3:u>=2?2:1,l*u}function lt({position:s="bottomleft",maxWidth:l=100,metric:u=!0,imperial:f=!1,updateWhenIdle:h=!1,className:m,style:y}){const{mapsService:C,positionClassName:b}=XA(s),k=qA(),[x,D]=w.useState([]),z=w.useRef(()=>{if(C)try{const _=C.getSize()[1]/2,j=C.containerToLngLat([0,_]),Z=C.containerToLngLat([l,_]);if(!j||!Z)return;const Q=Ni([j.lng,j.lat],[Z.lng,Z.lat]),N=[];if(u&&Q){const q=st(Q),J=q<1e3?`${q} m`:`${q/1e3} km`;N.push({text:J,width:Math.round(l*(q/Q))})}if(f&&Q){const q=Q*3.2808399;if(q>5280){const J=q/5280,r0=st(J);N.push({text:`${r0} mi`,width:Math.round(l*(r0/J))})}else{const J=st(q);N.push({text:`${J} ft`,width:Math.round(l*(J/q))})}}D(N)}catch{}});w.useEffect(()=>{if(!C)return;z.current();const H=()=>z.current(),_=h?"moveend":"mapmove",j=h?"zoomend":"zoomchange";return C.on(_,H),C.on(j,H),()=>{C.off(_,H),C.off(j,H)}},[C,l,u,f,h]);const B=g.jsx("div",{className:`l7-control l7-control-scale l7-control--glass${m?` ${m}`:""}`,style:y,children:x.map((H,_)=>g.jsx("div",{className:"l7-control-scale-line",style:{width:H.width},children:H.text},_))});return k?B:g.jsx("div",{className:`l7-control-anchor ${b}`,children:B})}UA.mark(lt);function at({position:s="topright",container:l,className:u,style:f}){const{getMapContainer:h,positionClassName:m}=XA(s),y=qA(),[C,b]=w.useState(!1),k=w.useCallback(()=>l??h()??document.documentElement,[l,h]),x=w.useCallback(()=>{const z=k();C?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():z.requestFullscreen?z.requestFullscreen():z.webkitRequestFullscreen&&z.webkitRequestFullscreen()},[C,k]);w.useEffect(()=>{const z=()=>{b(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",z),()=>document.removeEventListener("fullscreenchange",z)},[]);const D=g.jsx("div",{className:`l7-control l7-control--glass${u?` ${u}`:""}`,style:f,children:g.jsx("button",{className:"l7-button-control",onClick:x,title:C?"退出全屏":"全屏","aria-label":C?"退出全屏":"全屏",children:g.jsx("span",{className:"material-symbols-outlined",children:C?"fullscreen_exit":"fullscreen"})})});return y?D:g.jsx("div",{className:`l7-control-anchor ${m}`,children:D})}UA.mark(at);function ct({position:s="topright",transform:l,className:u,style:f}){const{mapsService:h,positionClassName:m}=XA(s),y=qA(),C=w.useCallback(async()=>{if(!window.navigator.geolocation){console.warn("[aimapui] Geolocation is not supported by this browser");return}if(h)try{const k=await new Promise((_,j)=>{window.navigator.geolocation.getCurrentPosition(({coords:Z})=>_(Z),Z=>j(Z))}),{longitude:x,latitude:D}=k;if(isNaN(x)||isNaN(D))return;const z=[x,D],B=l?await l(z):z,H=h.getZoom();h.setZoomAndCenter(H>15?H:15,B)}catch(k){console.warn("[aimapui] Geolocation error:",k)}},[h,l]),b=g.jsx("div",{className:`l7-control l7-control--glass${u?` ${u}`:""}`,style:f,children:g.jsx("button",{className:"l7-button-control",onClick:C,title:"定位","aria-label":"定位",children:g.jsx("span",{className:"material-symbols-outlined",children:"my_location"})})});return y?b:g.jsx("div",{className:`l7-control-anchor ${m}`,children:b})}UA.mark(ct);const Zi=["l7-popper-left","l7-popper-right","l7-popper-top","l7-popper-bottom"],Qi=["l7-popper-start","l7-popper-end"];function ut(s){switch(s){case"topleft":return"l7-popper-bottom l7-popper-start";case"topright":return"l7-popper-bottom l7-popper-end";case"bottomleft":return"l7-popper-top l7-popper-start";case"bottomright":return"l7-popper-top l7-popper-end";case"lefttop":return"l7-popper-right l7-popper-start";case"leftbottom":return"l7-popper-right l7-popper-end";case"righttop":return"l7-popper-left l7-popper-start";case"rightbottom":return"l7-popper-left l7-popper-end";default:return"l7-popper-bottom"}}function ft(s,l,u){const f=w.useRef(null),[h,m]=w.useState(()=>ut(s));return w.useEffect(()=>{if(!l)return;const y=ut(s);m(y);const C=()=>{const k=f.current;if(!k)return;const x=k.getBoundingClientRect(),D=window.innerWidth,z=window.innerHeight;let B="",H="";if(x.bottom>z-8?B="l7-popper-top":x.top<8&&(B="l7-popper-bottom"),x.right>D-8?H="l7-popper-end":x.left<8&&(H="l7-popper-start"),!B&&!H)return;const _=y.split(" "),j=_.find(Q=>Zi.includes(Q))??"",Z=_.find(Q=>Qi.includes(Q))??"";m(`${B||j} ${H||Z}`.trim())};requestAnimationFrame(C);const b=setTimeout(()=>requestAnimationFrame(C),50);return()=>clearTimeout(b)},[l,s]),{popperRef:f,popperClass:h}}const dt=[{text:"Standard",value:"normal",preview:"linear-gradient(135deg, #e8e8e8 0%, #c8d8e8 40%, #a8c8d8 100%)"},{text:"Light",value:"light",preview:"linear-gradient(135deg, #f0f4f8 0%, #d6e4f0 40%, #e8eff5 100%)"},{text:"Dark",value:"dark",preview:"linear-gradient(135deg, #0d1b2a 0%, #1b2838 40%, #162032 100%)"},{text:"Dark Blue",value:"darkblue",preview:"linear-gradient(135deg, #0a1628 0%, #0f2040 40%, #091a30 100%)"},{text:"Satellite",value:"satellite",preview:"linear-gradient(135deg, #1a3a1a 0%, #2d5a2d 40%, #1d4a2d 100%)"},{text:"Fresh",value:"fresh",preview:"linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 40%, #d4edda 100%)"}],Oi=[{text:"Positron",value:"https://tiles.openfreemap.org/styles/positron",preview:"linear-gradient(135deg, #f2f3f0 0%, #d8dcd6 40%, #e8ebe5 100%)"},{text:"Bright",value:"https://tiles.openfreemap.org/styles/bright",preview:"linear-gradient(135deg, #e8e8e8 0%, #c8d8e8 40%, #a8c8d8 100%)"},{text:"Dark",value:"https://tiles.openfreemap.org/styles/dark",preview:"linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%)"},{text:"Liberty",value:"https://tiles.openfreemap.org/styles/liberty",preview:"linear-gradient(135deg, #f0ece2 0%, #dfd7c8 40%, #c8bfad 100%)"},{text:"Fiord",value:"https://tiles.openfreemap.org/styles/fiord",preview:"linear-gradient(135deg, #2c3e50 0%, #34495e 40%, #415b76 100%)"}],Ui=[{text:"Light",value:"light",preview:"linear-gradient(135deg, #f0f4f8 0%, #d6e4f0 40%, #e8eff5 100%)"},{text:"Dark",value:"dark",preview:"linear-gradient(135deg, #0d1b2a 0%, #1b2838 40%, #162032 100%)"},{text:"Normal",value:"normal",preview:"linear-gradient(135deg, #e8e8e8 0%, #c8d8e8 40%, #a8c8d8 100%)"}];function ht({position:s="topright",options:l,defaultValue:u,onThemeChange:f,className:h,style:m}){const{mapsService:y,positionClassName:C}=XA(s),b=qA(),[k,x]=w.useState(!1),[D,z]=w.useState(u??""),[B,H]=w.useState(l??[]),_=w.useRef(null),{popperRef:j,popperClass:Z}=ft(s,k);w.useEffect(()=>{var q;if(l&&l.length>0){H(l);return}if(y){try{const J=(q=y.getMapStyleConfig)==null?void 0:q.call(y);if(J&&typeof J=="object"){const r0=Object.entries(J).filter(([,O])=>typeof O=="string").map(([O,Y])=>{const n0=dt.find(A0=>A0.value===Y);return{text:O,value:Y,preview:n0==null?void 0:n0.preview}});if(r0.length>0){H(r0);return}}}catch{}H(dt)}},[y,l]),w.useEffect(()=>{var q;if(u){z(u);return}if(y)try{const J=(q=y.getMapStyle)==null?void 0:q.call(y);J&&z(J)}catch{}},[y,u]),w.useEffect(()=>{if(!k)return;const q=J=>{_.current&&!_.current.contains(J.target)&&x(!1)};return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[k]);const Q=w.useCallback(q=>{if(z(q),y)try{y.setMapStyle(q)}catch{}f==null||f(q)},[y,f]),N=g.jsxs("div",{ref:_,className:`l7-control l7-control--glass${k?" l7-control--popper-open":""}${h?` ${h}`:""}`,style:m,children:[g.jsx("button",{className:"l7-button-control",onClick:()=>x(!k),title:"地图样式","aria-label":"地图样式",children:g.jsx("span",{className:"material-symbols-outlined",children:"palette"})}),k&&B.length>0&&g.jsx("div",{ref:j,className:`l7-popper ${Z}`,children:g.jsx("div",{className:"l7-popper-content l7-theme-panel",children:g.jsx("div",{className:"l7-theme-chips",children:B.map(q=>{const J=D===q.value,r0=q.preview??"linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%)";return g.jsxs("button",{className:`l7-theme-chip${J?" l7-theme-chip--active":""}`,onClick:()=>Q(q.value),title:q.text,children:[g.jsx("span",{className:"l7-theme-chip__dot",style:{background:r0}}),g.jsx("span",{className:"l7-theme-chip__label",children:q.text})]},q.value)})})})})]});return b?N:g.jsx("div",{className:`l7-control-anchor ${C}`,children:N})}UA.mark(ht);function pt({position:s="bottomleft",precision:l=6,transform:u,className:f,style:h}){const y=u??(([z,B])=>[+z.toFixed(l),+B.toFixed(l)]),{mapsService:C,positionClassName:b}=XA(s),k=qA(),x=w.useRef(null);w.useEffect(()=>{if(!C)return;const z=B=>{const H=B.lngLat??B.lnglat;if(!H)return;const _=[H.lng,H.lat],j=y(_);x.current&&(x.current.innerText=j.join(", "))};return C.on("mousemove",z),()=>{C.off("mousemove",z)}},[C,y]);const D=g.jsx("div",{ref:x,className:`l7-control l7-control-mouse-location l7-control--glass${f?` ${f}`:""}`,style:h,children:" "});return k?D:g.jsx("div",{className:`l7-control-anchor ${b}`,children:D})}UA.mark(pt);const gt=w.forwardRef(function({position:l="topright",format:u="png",onExport:f,className:h,style:m},y){const{scene:C,mapsService:b,positionClassName:k}=XA(l),x=qA(),D=w.useCallback(async H=>{var j,Z,Q,N;const _=H==="jpg"?"jpeg":"png";try{const q=b?await((j=b.exportMap)==null?void 0:j.call(b,_)):void 0,J=C?await((Z=C.exportPng)==null?void 0:Z.call(C,_)):void 0,r0=[q,J].filter(O=>!!O);if(r0.length===2)return ji(r0,_);if(r0.length===1)return r0[0]}catch{}try{const q=((Q=b==null?void 0:b.getContainer)==null?void 0:Q.call(b))??((N=C==null?void 0:C.getContainer)==null?void 0:N.call(C));if(!q)return;const J=q.querySelectorAll("canvas");return J.length===0?void 0:J.length===1?J[0].toDataURL(`image/${_}`):$i(Array.from(J),_)}catch{return}},[C,b]);w.useImperativeHandle(y,()=>({exportImage:D}));const z=w.useCallback(async()=>{const H=await D(u);if(f&&H){f(H);return}if(H){const _=document.createElement("a");_.download=`aimap-export.${u==="jpg"?"jpg":"png"}`,_.href=H,_.click()}},[D,u,f]),B=g.jsx("div",{className:`l7-control l7-control--glass${h?` ${h}`:""}`,style:m,children:g.jsx("button",{className:"l7-button-control",onClick:z,title:"导出图片","aria-label":"导出图片",children:g.jsx("span",{className:"material-symbols-outlined",children:"photo_camera"})})});return x?B:g.jsx("div",{className:`l7-control-anchor ${k}`,children:B})});async function ji(s,l){const u=document.querySelector(".l7-map")||document.documentElement,{width:f,height:h}=u.getBoundingClientRect();if(!f||!h)return s[0];const m=document.createElement("canvas");m.width=f,m.height=h;const y=m.getContext("2d");return(await Promise.all(s.map(Wi))).forEach(b=>y==null?void 0:y.drawImage(b,0,0,f,h)),m.toDataURL(`image/${l}`)}function $i(s,l){const{width:u,height:f}=s[0],h=document.createElement("canvas");h.width=u,h.height=f;const m=h.getContext("2d");return s.forEach(y=>m==null?void 0:m.drawImage(y,0,0)),h.toDataURL(`image/${l}`)}function Wi(s){return new Promise(l=>{const u=new Image;u.onload=()=>l(u),u.src=s})}UA.mark(gt);function yt({position:s="topright",layers:l,onToggle:u,onOpacityChange:f,className:h,style:m}){const[y,C]=w.useState(!1),b=w.useRef(null),[k,x]=w.useState(()=>{const Z={};return l.forEach(Q=>{Z[Q.id]=Q.opacity??1}),Z});w.useEffect(()=>{x(Z=>{const Q={...Z};return l.forEach(N=>{N.opacity!==void 0&&(Q[N.id]=N.opacity)}),Q})},[l]);const{positionClassName:D}=XA(s),z=qA(),{popperRef:B,popperClass:H}=ft(s,y);if(w.useEffect(()=>{if(!y)return;const Z=Q=>{b.current&&!b.current.contains(Q.target)&&C(!1)};return document.addEventListener("mousedown",Z),()=>document.removeEventListener("mousedown",Z)},[y]),!l.length)return null;const _=(Z,Q)=>{x(N=>({...N,[Z]:Q})),f==null||f(Z,Q)},j=g.jsxs("div",{ref:b,className:`l7-control l7-control--glass${y?" l7-control--popper-open":""}${h?` ${h}`:""}`,style:m,children:[g.jsx("button",{className:"l7-button-control",onClick:()=>C(!y),title:"图层控制","aria-label":"图层控制",children:g.jsx("span",{className:"material-symbols-outlined",children:"layers"})}),y&&g.jsx("div",{ref:B,className:`l7-popper ${H}`,children:g.jsxs("div",{className:"l7-popper-content l7-layer-panel",children:[g.jsxs("div",{className:"l7-layer-panel__title",children:[g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"layers"}),"Layers"]}),g.jsx("div",{className:"l7-layer-panel__list",children:l.map(Z=>{const Q=Z.visible!==!1,N=k[Z.id]??Z.opacity??1,q=Z.icon??"layers";return g.jsxs("div",{className:`l7-layer-item${Q?"":" l7-layer-item--disabled"}`,children:[g.jsxs("div",{className:"l7-layer-item__header",children:[g.jsx("span",{className:"material-symbols-outlined l7-layer-item__icon",children:q}),g.jsx("span",{className:"l7-layer-item__name",children:Z.name??Z.id}),g.jsxs("label",{className:"l7-layer-toggle",children:[g.jsx("input",{type:"checkbox",checked:Q,onChange:()=>u(Z.id,!Q)}),g.jsx("span",{className:"l7-layer-toggle__track"})]})]}),f&&g.jsxs("div",{className:"l7-layer-item__slider",children:[g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"opacity"}),g.jsx("input",{type:"range",min:0,max:100,value:Math.round(N*100),onChange:J=>_(Z.id,+J.target.value/100),className:"l7-layer-slider"})]})]},Z.id)})})]})})]});return z?j:g.jsx("div",{className:`l7-control-anchor ${D}`,children:j})}UA.mark(yt);function Gi(s){return{mode:"none",features:s?[...s]:[],selectedFeatureId:null,isDrawing:!1,currentVertices:[],startPoint:null,mousePoint:null,dragVertexIndex:null,isDragging:!1,mergeSelectedIds:[],splitTargetId:null}}const Ae={point:{color:"#3f51b5",size:6,strokeColor:"#ffffff",strokeWidth:2},line:{color:"#3f51b5",size:2,opacity:1},polygon:{fill:"#3f51b5",fillOpacity:.2,stroke:"#3f51b5",strokeWidth:2},drawing:{fill:"#3f51b5",fillOpacity:.2,stroke:"#3f51b5",strokeWidth:2,dashStroke:"#3f51b5",dashWidth:1.5,dashArray:[4,4]},selected:{stroke:"#3f51b5",strokeWidth:3,fill:"#ffb95f",fillOpacity:.12,dashArray:[6,3]},vertex:{color:"#3f51b5",size:6,strokeColor:"#ffffff",strokeWidth:2,activeColor:"#ffb95f",activeSize:6}};function Yi(s){return s?{point:{...Ae.point,...s.point},line:{...Ae.line,...s.line},polygon:{...Ae.polygon,...s.polygon},drawing:{...Ae.drawing,...s.drawing},selected:{...Ae.selected,...s.selected},vertex:{...Ae.vertex,...s.vertex}}:{...Ae}}let qi=0;function Xi(){return`draw-${++qi}`}function Or(s){return{type:"LineString",coordinates:s.map(([l,u])=>[l,u])}}function Ur(s){const l=s.map(([u,f])=>[u,f]);if(l.length>0){const u=l[0],f=l[l.length-1];(u[0]!==f[0]||u[1]!==f[1])&&l.push([u[0],u[1]])}return{type:"Polygon",coordinates:[l]}}function jr(s,l){const[u,f]=s,[h,m]=l;return{type:"Polygon",coordinates:[[[u,f],[h,f],[h,m],[u,m],[u,f]]]}}function $r(s,l,u=64){const[f,h]=s,m=[];for(let y=0;y<u;y++){const C=y/u*2*Math.PI,b=l/(111320*Math.cos(h*Math.PI/180))*Math.cos(C),k=l/110540*Math.sin(C);m.push([f+b,h+k])}return m.push(m[0]),{type:"Polygon",coordinates:[m]}}function Ji(s){return{type:"Point",coordinates:[s[0],s[1]]}}function Wr(s,l){const f=b=>b*Math.PI/180,h=f(l[1]-s[1]),m=f(l[0]-s[0]),y=Math.sin(h/2)*Math.sin(h/2)+Math.cos(f(s[1]))*Math.cos(f(l[1]))*Math.sin(m/2)*Math.sin(m/2);return 6371e3*(2*Math.atan2(Math.sqrt(y),Math.sqrt(1-y)))}function Gr(s,l){const u=l.x-s.x,f=l.y-s.y;return Math.sqrt(u*u+f*f)}function Le(s,l,u){return{type:"Feature",id:Xi(),geometry:s,properties:{drawType:l}}}function Ki(s,l,u){const f=s.geometry,h=Ri(f,l,u);return{...s,geometry:h,properties:{...s.properties}}}function Ri(s,l,u){switch(s.type){case"Point":return{type:"Point",coordinates:[s.coordinates[0]+l,s.coordinates[1]+u]};case"LineString":return{type:"LineString",coordinates:s.coordinates.map(([f,h])=>[f+l,h+u])};case"Polygon":return{type:"Polygon",coordinates:s.coordinates.map(f=>f.map(([h,m])=>[h+l,m+u]))};default:return s}}function Ao(s,l,u,f){const h=s.geometry;let m;if(h.type==="Point")m={type:"Point",coordinates:[u,f]};else if(h.type==="LineString"){const y=h.coordinates.map(C=>[...C]);l>=0&&l<y.length&&(y[l]=[u,f]),m={type:"LineString",coordinates:y}}else if(h.type==="Polygon"){const y=h.coordinates.map(k=>k.map(x=>[...x])),C=y[0],b=C.length>1&&C[0][0]===C[C.length-1][0]&&C[0][1]===C[C.length-1][1]?C.length-1:C.length;l>=0&&l<b&&(C[l]=[u,f],l===0&&(C[C.length-1]=[u,f])),m={type:"Polygon",coordinates:y}}else m=h;return{...s,geometry:m,properties:{...s.properties}}}function H1(s){const l=s.geometry,u=[];if(l.type==="Point")u.push([l.coordinates[0],l.coordinates[1]]);else if(l.type==="LineString")l.coordinates.forEach(([f,h])=>{u.push([f,h])});else if(l.type==="Polygon"){const f=l.coordinates[0];if(f&&f.length>1){const h=f[0][0]===f[f.length-1][0]&&f[0][1]===f[f.length-1][1]?f.length-1:f.length;for(let m=0;m<h;m++)u.push([f[m][0],f[m][1]])}}return u}function Fe(s){const l=s.lnglat,u=s.lngLat;if(l&&typeof l.lng=="number"&&typeof l.lat=="number")return[l.lng,l.lat];if(u&&typeof u.lng=="number"&&typeof u.lat=="number")return[u.lng,u.lat];const f=s.coordinate;return f&&typeof f[0]=="number"&&typeof f[1]=="number"?[f[0],f[1]]:null}function eo(s){return{type:"FeatureCollection",features:s.filter(l=>l.geometry.type==="LineString")}}function to(s){return{type:"FeatureCollection",features:s.filter(l=>l.geometry.type==="Polygon")}}function ro(s,l){const u=Yr(s.coordinates[0]),f=Yr(l.coordinates[0]);let h=0;const m=new Set(u.map(y=>`${y[0].toFixed(7)},${y[1].toFixed(7)}`));for(const y of f)m.has(`${y[0].toFixed(7)},${y[1].toFixed(7)}`)&&h++;if(h>=2)return!0;for(let y=0;y<u.length;y++){const C=(y+1)%u.length;for(let b=0;b<f.length;b++){const k=(b+1)%f.length;if(Xr(u[y],u[C],f[b],f[k],!0))return!0}}for(const y of u)if(qr(y,f))return!0;for(const y of f)if(qr(y,u))return!0;return!1}function Yr(s){const l=[],u=s.length>1&&s[0][0]===s[s.length-1][0]&&s[0][1]===s[s.length-1][1]?s.length-1:s.length;for(let f=0;f<u;f++)l.push([s[f][0],s[f][1]]);return l}function qr(s,l){let u=!1;for(let f=0,h=l.length-1;f<l.length;h=f++){const m=l[f][0],y=l[f][1],C=l[h][0],b=l[h][1];y>s[1]!=b>s[1]&&s[0]<(C-m)*(s[1]-y)/(b-y)+m&&(u=!u)}return u}function no(s){if(s.length<2)return null;const l=s.filter(C=>C.geometry.type==="Polygon");if(l.length<2)return null;for(let C=0;C<l.length;C++){const b=l[C].geometry;let k=!1;for(let x=0;x<l.length;x++)if(C!==x&&ro(b,l[x].geometry)){k=!0;break}if(!k)return null}const u=[];for(const C of l){const b=C.geometry.coordinates[0];if(!b)continue;const k=b.length>1&&b[0][0]===b[b.length-1][0]&&b[0][1]===b[b.length-1][1]?b.length-1:b.length;for(let x=0;x<k;x++)u.push([b[x][0],b[x][1]])}if(u.length<3)return null;const f=[],h=new Set;for(const C of u){const b=`${C[0].toFixed(6)},${C[1].toFixed(6)}`;h.has(b)||(h.add(b),f.push(C))}if(f.length<3)return null;const m=io(f);return m.length<3?null:(m.push(m[0]),Le({type:"Polygon",coordinates:[m]},"polygon"))}function io(s){if(s.length<3)return[...s];let l=0;for(let m=1;m<s.length;m++)(s[m][1]<s[l][1]||s[m][1]===s[l][1]&&s[m][0]<s[l][0])&&(l=m);const u=s[l],f=s.filter(m=>m[0]!==u[0]||m[1]!==u[1]).sort((m,y)=>{const C=Math.atan2(m[1]-u[1],m[0]-u[0]),b=Math.atan2(y[1]-u[1],y[0]-u[0]);if(C!==b)return C-b;const k=(m[0]-u[0])**2+(m[1]-u[1])**2,x=(y[0]-u[0])**2+(y[1]-u[1])**2;return k-x}),h=[u];for(const m of f){for(;h.length>1;){const y=h[h.length-2],C=h[h.length-1];if((C[0]-y[0])*(m[1]-y[1])-(C[1]-y[1])*(m[0]-y[0])<=0)h.pop();else break}h.push(m)}return h}function oo(s,l){if(s.geometry.type!=="Polygon"||l.length<2)return null;const u=s.geometry.coordinates[0];if(!u||u.length<4)return null;const f=[],h=u.length>1&&u[0][0]===u[u.length-1][0]&&u[0][1]===u[u.length-1][1]?u.length-1:u.length;for(let z=0;z<h;z++)f.push([u[z][0],u[z][1]]);const m=[];for(let z=0;z<l.length-1;z++){const B=l[z],H=l[z+1];for(let _=0;_<f.length;_++){const j=(_+1)%f.length,Z=f[_],Q=f[j],N=Xr(B,H,Z,Q);N&&m.push({edgeIndex:_,point:N,t:z})}}if(m.length<2)return null;m.sort((z,B)=>z.edgeIndex-B.edgeIndex);const y=m[0],C=m[m.length-1],b=[],k=[];b.push(y.point);for(let z=y.edgeIndex+1;z<=C.edgeIndex;z++)b.push(f[z%f.length]);b.push(C.point),b.push(y.point),k.push(C.point);for(let z=C.edgeIndex+1;z<f.length;z++)k.push(f[z]);for(let z=0;z<=y.edgeIndex;z++)k.push(f[z]);if(k.push(y.point),k.push(C.point),b.length<4||k.length<4)return null;const x={type:"Polygon",coordinates:[b]},D={type:"Polygon",coordinates:[k]};return[Le(x,"polygon"),Le(D,"polygon")]}function Xr(s,l,u,f,h=!1){const m=l[0]-s[0],y=l[1]-s[1],C=f[0]-u[0],b=f[1]-u[1],k=m*b-y*C;if(Math.abs(k)<1e-12)return null;const x=((u[0]-s[0])*b-(u[1]-s[1])*C)/k,D=((u[0]-s[0])*y-(u[1]-s[1])*m)/k;if(h){if(x<=1e-6||x>=.999999||D<=1e-6||D>=.999999)return null}else if(x<0||x>1||D<0||D>1)return null;return[s[0]+x*m,s[1]+x*y]}const B1={type:"FeatureCollection",features:[]},IA="aimap-draw-";class so{constructor(l,u,f){this.featurePointLayer=null,this.featureLineLayer=null,this.featurePolygonLayer=null,this.featurePolygonOutlineLayer=null,this.drawingLineLayer=null,this.drawingDashLineLayer=null,this.drawingPolygonLayer=null,this.drawingPointLayer=null,this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null,this.vertexLayer=null,this.midpointLayer=null,this.snapIndicatorLayer=null,this.mergeHighlightLayer=null,this.mergeHighlightOutlineLayer=null,this.splitHighlightLayer=null,this.splitHighlightOutlineLayer=null,this.tooltipEl=null,this.containerEl=null,this.hiddenFeatureId=null,this.allFeatures=[],this.onFeatureClick=null,this.onFeatureMouseDown=null,this.onVertexClick=null,this.onVertexRightClick=null,this.onEmptyClick=null,this.onMidpointClick=null,this.editClickHandlersBound=!1,this.scene=l,this.mapsService=f,this.styles={point:{...Ae.point,...u==null?void 0:u.point},line:{...Ae.line,...u==null?void 0:u.line},polygon:{...Ae.polygon,...u==null?void 0:u.polygon},drawing:{...Ae.drawing,...u==null?void 0:u.drawing},selected:{...Ae.selected,...u==null?void 0:u.selected},vertex:{...Ae.vertex,...u==null?void 0:u.vertex}};try{this.initTooltip()}catch{}}removeAndDestroy(l){var u;if(l){try{this.scene.removeLayer(l)}catch{}try{(u=l.destroy)==null||u.call(l)}catch{}}}addLayerWithRender(l){l.once("inited",()=>{try{this.scene.render()}catch{}}),this.scene.addLayer(l)}initTooltip(){const l=document.createElement("div");l.style.cssText=["position:fixed","pointer-events:none","z-index:9999","padding:6px 10px","border-radius:4px","background:rgba(26,27,34,0.92)","color:#f2eff9",'font:500 11px/16px "JetBrains Mono",monospace',"letter-spacing:0.02em","white-space:nowrap","display:none","flex-direction:column","gap:2px","box-shadow:0 2px 8px rgba(0,0,0,0.3)"].join(";"),document.body.appendChild(l),this.tooltipEl=l,this.containerEl=null}showTooltip(l,u,f,h){if(!this.tooltipEl)return;this.tooltipEl.innerHTML="";const m=document.createElement("div");if(m.textContent=l,m.style.cssText="color:#f2eff9;font-size:11px;line-height:16px;",this.tooltipEl.appendChild(m),h&&h.length>0){const y=document.createElement("div");y.style.cssText="display:flex;gap:8px;";for(const C of h){const b=document.createElement("span");b.textContent=C,b.style.cssText="font-size:9px;line-height:12px;color:#ffc107;font-weight:600;",y.appendChild(b)}this.tooltipEl.appendChild(y)}this.tooltipEl.style.display="flex",this.tooltipEl.style.left=`${u+16}px`,this.tooltipEl.style.top=`${f-8}px`}showSnapTooltip(l,u,f,h,m){if(!this.tooltipEl)return;this.tooltipEl.innerHTML="";const y=document.createElement("div");y.style.cssText="display:flex;gap:6px;align-items:center;";const C=document.createElement("span");C.textContent=l==="vertex"?"Vertex":"Edge",C.style.cssText="color:#ffc107;font-weight:700;font-size:10px;",y.appendChild(C);const b=document.createElement("span");b.textContent=`${f.toFixed(4)}, ${u.toFixed(4)}`,b.style.cssText="color:rgba(242,239,249,0.6);font-size:10px;",y.appendChild(b),this.tooltipEl.appendChild(y),this.tooltipEl.style.display="flex",this.tooltipEl.style.left=`${h+16}px`,this.tooltipEl.style.top=`${m-8}px`}hideTooltip(){this.tooltipEl&&(this.tooltipEl.style.display="none")}destroyTooltip(){var l;this.tooltipEl&&((l=this.tooltipEl.parentElement)==null||l.removeChild(this.tooltipEl),this.tooltipEl=null)}updateFeatures(l){this.scene&&(this.allFeatures=l,this.renderFeatures())}hideFeatureFromStatic(l){this.hiddenFeatureId=l,this.renderFeatures()}showAllFeatures(){this.hiddenFeatureId=null,this.renderFeatures()}renderFeatures(){const l=this.hiddenFeatureId?this.allFeatures.filter(y=>y.id!==this.hiddenFeatureId):this.allFeatures,u=this.styles;this.removeAndDestroy(this.featurePointLayer);const f=l.filter(y=>y.geometry.type==="Point").map(y=>{const C=y.geometry.coordinates;return{lng:C[0],lat:C[1],id:y.id,drawType:y.properties.drawType}});this.featurePointLayer=new EA.PointLayer({name:`${IA}feature-point`,zIndex:12}).source(f,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(u.point.color).size(u.point.size).style({stroke:u.point.strokeColor,strokeWidth:u.point.strokeWidth}),this.addLayerWithRender(this.featurePointLayer),this.removeAndDestroy(this.featureLineLayer),this.featureLineLayer=new EA.LineLayer({name:`${IA}feature-line`,zIndex:11}).source(eo(l)).shape("line").color(u.line.color).size(u.line.size).style({opacity:u.line.opacity}),this.addLayerWithRender(this.featureLineLayer),this.removeAndDestroy(this.featurePolygonLayer),this.featurePolygonLayer=new EA.PolygonLayer({name:`${IA}feature-polygon`,zIndex:10}).source(to(l)).shape("fill").color(u.polygon.fill).style({opacity:u.polygon.fillOpacity}),this.addLayerWithRender(this.featurePolygonLayer),this.removeAndDestroy(this.featurePolygonOutlineLayer);const h=l.filter(y=>y.geometry.type==="Polygon"),m=h.length>0?{type:"FeatureCollection",features:h.map(y=>({type:"Feature",geometry:{type:"LineString",coordinates:y.geometry.coordinates[0]},properties:y.properties}))}:B1;this.featurePolygonOutlineLayer=new EA.LineLayer({name:`${IA}feature-polygon-outline`,zIndex:10}).source(m).shape("line").color(u.polygon.stroke).size(u.polygon.strokeWidth).style({opacity:1}),this.addLayerWithRender(this.featurePolygonOutlineLayer),this.editClickHandlersBound&&this.rebindEditClickHandlers()}showDrawingFeedback(l,u,f,h){if(!this.scene||f==="point")return;const m=this.styles;let y=B1,C=B1,b=B1,k=[];if(f==="rectangle"&&h&&u){const B=jr(h,u);b={type:"FeatureCollection",features:[{type:"Feature",geometry:B,properties:{}}]},y={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:B.coordinates[0]},properties:{}}]}}else if(f==="circle"&&h&&u){const H=J=>J*Math.PI/180,_=H(u[1]-h[1]),j=H(u[0]-h[0]),Z=Math.sin(_/2)**2+Math.cos(H(h[1]))*Math.cos(H(u[1]))*Math.sin(j/2)**2,N=6371e3*(2*Math.atan2(Math.sqrt(Z),Math.sqrt(1-Z))),q=$r(h,Math.max(N,1));b={type:"FeatureCollection",features:[{type:"Feature",geometry:q,properties:{}}]},y={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:q.coordinates[0]},properties:{}}]},k=[{lng:h[0],lat:h[1],vertexIndex:0}]}else if((f==="polyline"||f==="polygon")&&l.length>0){if(l.length>=2&&(y={type:"FeatureCollection",features:[{type:"Feature",geometry:Or(l),properties:{}}]}),u&&l.length>=1){const B=l[l.length-1],H=[{type:"Feature",geometry:{type:"LineString",coordinates:[[B[0],B[1]],[u[0],u[1]]]},properties:{}}];f==="polygon"&&l.length>=2&&H.push({type:"Feature",geometry:{type:"LineString",coordinates:[[u[0],u[1]],[l[0][0],l[0][1]]]},properties:{}}),C={type:"FeatureCollection",features:H}}if(f==="polygon"&&l.length>=2&&u){const B=[...l,u];B.length>=3&&(b={type:"FeatureCollection",features:[{type:"Feature",geometry:Ur(B),properties:{}}]})}k=l.map(([B,H],_)=>({lng:B,lat:H,vertexIndex:_,isFirst:_===0}))}this.drawingLineLayer?this.drawingLineLayer.setData(y):(this.drawingLineLayer=new EA.LineLayer({name:`${IA}drawing-line`,zIndex:13}).source(y).shape("line").color(m.drawing.stroke).size(m.drawing.strokeWidth).style({opacity:1}),this.addLayerWithRender(this.drawingLineLayer));const x=m.drawing.dashArray??[4,4],D=m.drawing.dashStroke??m.drawing.stroke,z=m.drawing.dashWidth??1.5;this.drawingDashLineLayer?this.drawingDashLineLayer.setData(C):(this.drawingDashLineLayer=new EA.LineLayer({name:`${IA}drawing-dash-line`,zIndex:14}).source(C).shape("line").color(D).size(z).style({opacity:1,lineType:"dash",dashArray:x}),this.addLayerWithRender(this.drawingDashLineLayer)),this.drawingPolygonLayer?this.drawingPolygonLayer.setData(b):(this.drawingPolygonLayer=new EA.PolygonLayer({name:`${IA}drawing-polygon`,zIndex:13}).source(b).shape("fill").color(m.drawing.fill).style({opacity:m.drawing.fillOpacity}),this.addLayerWithRender(this.drawingPolygonLayer)),this.drawingPointLayer?this.drawingPointLayer.setData(k):(this.drawingPointLayer=new EA.PointLayer({name:`${IA}drawing-point`,zIndex:15}).source(k,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(m.vertex.color).size(m.vertex.size).style({stroke:m.vertex.strokeColor,strokeWidth:m.vertex.strokeWidth}),this.addLayerWithRender(this.drawingPointLayer))}clearDrawingFeedback(){this.removeAndDestroy(this.drawingLineLayer),this.removeAndDestroy(this.drawingDashLineLayer),this.removeAndDestroy(this.drawingPolygonLayer),this.removeAndDestroy(this.drawingPointLayer),this.drawingLineLayer=null,this.drawingDashLineLayer=null,this.drawingPolygonLayer=null,this.drawingPointLayer=null}removeDrawingLayers(){this.clearDrawingFeedback()}updateSelectionHighlight(l){var m,y,C;if(!this.scene)return;const u=this.styles;if(this.removeAndDestroy(this.selectionPolygonLayer),this.removeAndDestroy(this.selectionLineLayer),this.removeAndDestroy(this.selectionPointLayer),!l){this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null;return}const f={type:"FeatureCollection",features:[l]},h=u.selected.dashArray??[6,3];if(l.geometry.type==="Point")this.selectionPointLayer=new EA.PointLayer({name:`${IA}selection-point`,zIndex:15}).source([{lng:l.geometry.coordinates[0],lat:l.geometry.coordinates[1],id:l.id}],{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(u.selected.stroke).size((u.point.size??6)+4).style({stroke:u.selected.stroke,strokeWidth:u.selected.strokeWidth}),this.addLayerWithRender(this.selectionPointLayer);else if(l.geometry.type==="LineString")this.selectionLineLayer=new EA.LineLayer({name:`${IA}selection-line`,zIndex:15}).source(f).shape("line").color(u.selected.stroke).size(u.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:h}),this.addLayerWithRender(this.selectionLineLayer);else if(l.geometry.type==="Polygon"){this.selectionPolygonLayer=new EA.PolygonLayer({name:`${IA}selection-polygon`,zIndex:15}).source(f).shape("fill").color(u.selected.fill).style({opacity:u.selected.fillOpacity}),this.addLayerWithRender(this.selectionPolygonLayer);const b={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:l.geometry.coordinates[0]},properties:{}}]};this.selectionLineLayer=new EA.LineLayer({name:`${IA}selection-line`,zIndex:15}).source(b).shape("line").color(u.selected.stroke).size(u.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:h}),this.addLayerWithRender(this.selectionLineLayer)}if(this.editClickHandlersBound&&this.onFeatureMouseDown){const b=k=>{var D;const x=k.feature;if(x&&this.onFeatureMouseDown){const z=((D=x.properties)==null?void 0:D.id)??x.id;if(z){const B=k.lngLat??k.lnglat;let H=[0,0];if(B&&typeof B=="object"){const _=B;H=[_.lng??_.x??0,_.lat??_.y??0]}this.onFeatureMouseDown(String(z),H)}}};(m=this.selectionPolygonLayer)==null||m.on("mousedown",b),(y=this.selectionLineLayer)==null||y.on("mousedown",b),(C=this.selectionPointLayer)==null||C.on("mousedown",b)}}clearSelectionHighlight(){this.removeAndDestroy(this.selectionPolygonLayer),this.removeAndDestroy(this.selectionLineLayer),this.removeAndDestroy(this.selectionPointLayer),this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null}removeSelectionLayers(){this.clearSelectionHighlight()}highlightMergeSelected(l,u){if(!this.scene)return;const f=this.styles;if(this.removeAndDestroy(this.mergeHighlightLayer),this.removeAndDestroy(this.mergeHighlightOutlineLayer),this.mergeHighlightLayer=null,this.mergeHighlightOutlineLayer=null,l.length===0)return;const h=u.filter(C=>l.includes(C.id));if(h.length===0)return;const m={type:"FeatureCollection",features:h};this.mergeHighlightLayer=new EA.PolygonLayer({name:`${IA}merge-highlight`,zIndex:15}).source(m).shape("fill").color(f.selected.fill).style({opacity:f.selected.fillOpacity}),this.addLayerWithRender(this.mergeHighlightLayer);const y=h.filter(C=>C.geometry.type==="Polygon").map(C=>({type:"Feature",geometry:{type:"LineString",coordinates:C.geometry.coordinates[0]},properties:{}}));if(y.length>0){const C={type:"FeatureCollection",features:y};this.mergeHighlightOutlineLayer=new EA.LineLayer({name:`${IA}merge-highlight-outline`,zIndex:15}).source(C).shape("line").color(f.selected.stroke).size(f.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:f.selected.dashArray??[6,3]}),this.addLayerWithRender(this.mergeHighlightOutlineLayer)}}clearMergeHighlight(){this.removeAndDestroy(this.mergeHighlightLayer),this.removeAndDestroy(this.mergeHighlightOutlineLayer),this.mergeHighlightLayer=null,this.mergeHighlightOutlineLayer=null}highlightSplitTarget(l,u){if(!this.scene)return;const f=this.styles;this.removeAndDestroy(this.splitHighlightLayer),this.removeAndDestroy(this.splitHighlightOutlineLayer),this.splitHighlightLayer=null,this.splitHighlightOutlineLayer=null;const h=u.find(C=>C.id===l);if(!h)return;const m={type:"FeatureCollection",features:[h]};this.splitHighlightLayer=new EA.PolygonLayer({name:`${IA}split-highlight`,zIndex:15}).source(m).shape("fill").color(f.selected.fill).style({opacity:f.selected.fillOpacity}),this.addLayerWithRender(this.splitHighlightLayer);const y={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:h.geometry.coordinates[0]},properties:{}}]};this.splitHighlightOutlineLayer=new EA.LineLayer({name:`${IA}split-highlight-outline`,zIndex:15}).source(y).shape("line").color(f.selected.stroke).size(f.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:f.selected.dashArray??[6,3]}),this.addLayerWithRender(this.splitHighlightOutlineLayer)}clearSplitHighlight(){this.removeAndDestroy(this.splitHighlightLayer),this.removeAndDestroy(this.splitHighlightOutlineLayer),this.splitHighlightLayer=null,this.splitHighlightOutlineLayer=null}updateVertexHandles(l){if(!this.scene)return;const u=this.styles;if(this.removeAndDestroy(this.vertexLayer),this.removeAndDestroy(this.midpointLayer),!l){this.vertexLayer=null,this.midpointLayer=null;return}const f=H1(l);if(f.length===0){this.vertexLayer=null,this.midpointLayer=null;return}const h=f.map(([m,y],C)=>({lng:m,lat:y,vertexIndex:C,featureId:l.id}));if(this.vertexLayer=new EA.PointLayer({name:`${IA}vertex-handles`,zIndex:16}).source(h,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(u.vertex.color).size(u.vertex.size).style({stroke:u.vertex.strokeColor,strokeWidth:u.vertex.strokeWidth}),this.addLayerWithRender(this.vertexLayer),l.geometry.type==="LineString"||l.geometry.type==="Polygon"){const m=[],y=l.geometry.type==="Polygon"?f.length:f.length-1;for(let C=0;C<y;C++){const b=(C+1)%f.length;m.push({lng:(f[C][0]+f[b][0])/2,lat:(f[C][1]+f[b][1])/2,edgeIndex:C})}this.midpointLayer=new EA.PointLayer({name:`${IA}midpoint-handles`,zIndex:16}).source(m,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(u.vertex.strokeColor).size(u.vertex.size-1).style({stroke:u.vertex.strokeColor,strokeWidth:.5,opacity:.5}),this.addLayerWithRender(this.midpointLayer)}else this.midpointLayer=null;this.editClickHandlersBound&&this.rebindVertexAndMidpointEvents()}clearVertexHandles(){this.removeAndDestroy(this.vertexLayer),this.removeAndDestroy(this.midpointLayer),this.vertexLayer=null,this.midpointLayer=null}removeVertexLayer(){this.clearVertexHandles()}setupEditClickHandlers(l,u,f,h,m,y){this.onFeatureClick=l,this.onVertexClick=u,this.onEmptyClick=f,this.onVertexRightClick=h??null,this.onMidpointClick=m??null,this.onFeatureMouseDown=y??null,this.editClickHandlersBound=!0,this.rebindEditClickHandlers()}rebindEditClickHandlers(){var m,y,C,b,k,x,D,z,B,H,_,j,Z,Q,N,q,J,r0,O,Y,n0,A0,o0,X,t0;const l=V=>{var e0;const $=V.feature;if($){const c0=((e0=$.properties)==null?void 0:e0.id)??$.id;c0&&this.onFeatureClick&&this.onFeatureClick(String(c0))}},u=V=>{var e0;const $=V.feature;if($){const c0=((e0=$.properties)==null?void 0:e0.id)??$.id;if(c0&&this.onFeatureMouseDown){const h0=V.lngLat??V.lnglat;let p0=[0,0];if(h0&&typeof h0=="object"){const H0=h0;p0=[H0.lng??H0.x??0,H0.lat??H0.y??0]}this.onFeatureMouseDown(String(c0),p0)}}};(m=this.featurePointLayer)==null||m.on("click",l),(y=this.featureLineLayer)==null||y.on("click",l),(C=this.featurePolygonLayer)==null||C.on("click",l),(b=this.featurePolygonOutlineLayer)==null||b.on("click",l),(k=this.featurePointLayer)==null||k.on("mousedown",u),(x=this.featureLineLayer)==null||x.on("mousedown",u),(D=this.featurePolygonLayer)==null||D.on("mousedown",u),(z=this.featurePolygonOutlineLayer)==null||z.on("mousedown",u);const f=()=>{this.setCursorClass("l7-draw-cursor-grab")},h=()=>{this.clearEditCursors(),this.hideTooltip()};(B=this.featurePointLayer)==null||B.on("mouseenter",f),(H=this.featurePointLayer)==null||H.on("mouseleave",h),(_=this.featureLineLayer)==null||_.on("mouseenter",f),(j=this.featureLineLayer)==null||j.on("mouseleave",h),(Z=this.featurePolygonLayer)==null||Z.on("mouseenter",f),(Q=this.featurePolygonLayer)==null||Q.on("mouseleave",h),(N=this.featurePolygonOutlineLayer)==null||N.on("mouseenter",f),(q=this.featurePolygonOutlineLayer)==null||q.on("mouseleave",h),(J=this.selectionPolygonLayer)==null||J.on("mousedown",u),(r0=this.selectionLineLayer)==null||r0.on("mousedown",u),(O=this.selectionPointLayer)==null||O.on("mousedown",u),(Y=this.selectionPolygonLayer)==null||Y.on("mouseenter",f),(n0=this.selectionPolygonLayer)==null||n0.on("mouseleave",h),(A0=this.selectionLineLayer)==null||A0.on("mouseenter",f),(o0=this.selectionLineLayer)==null||o0.on("mouseleave",h),(X=this.selectionPointLayer)==null||X.on("mouseenter",f),(t0=this.selectionPointLayer)==null||t0.on("mouseleave",h),this.rebindVertexAndMidpointEvents()}extractClientXY(l){var y,C,b,k;const u=l.originalEvent??l.originEvent??l.e;if(u&&typeof u.clientX=="number"&&typeof u.clientY=="number")return[u.clientX,u.clientY];const f=l.x,h=l.y;if(f!==void 0&&h!==void 0){const x=(C=(y=this.mapsService)==null?void 0:y.getContainer)==null?void 0:C.call(y);if(x){const D=x.getBoundingClientRect();return[f+D.left,h+D.top]}}const m=l.pixel;if(m){const x=(k=(b=this.mapsService)==null?void 0:b.getContainer)==null?void 0:k.call(b);if(x){const D=x.getBoundingClientRect();return[(m.x??0)+D.left,(m.y??0)+D.top]}}return[0,0]}extractFeatureProp(l,u){const f=l.properties;return f&&f[u]!==void 0?f[u]:l[u]}setCursorClass(l){var f,h;const u=(h=(f=this.mapsService)==null?void 0:f.getContainer)==null?void 0:h.call(f);u&&(u.classList.remove("l7-draw-cursor-pointer","l7-draw-cursor-grab","l7-draw-cursor-move"),l&&u.classList.add(l))}clearEditCursors(){var u,f;const l=(f=(u=this.mapsService)==null?void 0:u.getContainer)==null?void 0:f.call(u);l&&l.classList.remove("l7-draw-cursor-pointer","l7-draw-cursor-grab","l7-draw-cursor-move")}rebindVertexAndMidpointEvents(){var l,u,f,h,m,y,C,b,k;(l=this.vertexLayer)==null||l.on("mouseenter",()=>{this.setCursorClass("l7-draw-cursor-pointer")}),(u=this.vertexLayer)==null||u.on("mousemove",x=>{const[D,z]=this.extractClientXY(x);(D||z)&&this.showTooltip("拖拽移动顶点,右键删除",D,z)}),(f=this.vertexLayer)==null||f.on("mouseleave",()=>{this.clearEditCursors(),this.hideTooltip()}),(h=this.midpointLayer)==null||h.on("mouseenter",()=>{this.setCursorClass("l7-draw-cursor-pointer")}),(m=this.midpointLayer)==null||m.on("mousemove",x=>{const[D,z]=this.extractClientXY(x);(D||z)&&this.showTooltip("单击添加新顶点",D,z)}),(y=this.midpointLayer)==null||y.on("mouseleave",()=>{this.clearEditCursors(),this.hideTooltip()}),(C=this.vertexLayer)==null||C.on("mousedown",x=>{var z,B,H,_;const D=x.feature;if(D&&this.onVertexClick){const j=this.extractFeatureProp(D,"vertexIndex");j!==void 0&&((B=(z=this.mapsService)==null?void 0:z.setMapStatus)==null||B.call(z,{dragEnable:!1,zoomEnable:!1}),(_=(H=x.originalEvent)==null?void 0:H.stopPropagation)==null||_.call(H),this.onVertexClick(j))}}),(b=this.vertexLayer)==null||b.on("contextmenu",x=>{var z,B;const D=x.feature;if(D&&this.onVertexRightClick){const H=this.extractFeatureProp(D,"vertexIndex");H!==void 0&&((B=(z=x.originalEvent)==null?void 0:z.preventDefault)==null||B.call(z),this.onVertexRightClick(H))}}),(k=this.midpointLayer)==null||k.on("click",x=>{const D=x.feature;if(D&&this.onMidpointClick){const z=this.extractFeatureProp(D,"edgeIndex"),B=this.extractFeatureProp(D,"lng"),H=this.extractFeatureProp(D,"lat");z!==void 0&&B!==void 0&&H!==void 0&&this.onMidpointClick(z,[B,H])}})}removeEditClickHandlers(){this.onFeatureClick=null,this.onVertexClick=null,this.onVertexRightClick=null,this.onEmptyClick=null,this.onMidpointClick=null,this.editClickHandlersBound=!1}showSnapIndicator(l,u,f){if(!this.scene)return;const h="#ffc107",m=f==="vertex"?8:6;this.removeAndDestroy(this.snapIndicatorLayer),this.snapIndicatorLayer=new EA.PointLayer({name:`${IA}snap-indicator`,zIndex:20}).source([{lng:l,lat:u}],{parser:{type:"json",x:"lng",y:"lat"}}).shape("square").color(h).size(m).style({stroke:h,strokeWidth:1.5,opacity:.9}),this.addLayerWithRender(this.snapIndicatorLayer)}hideSnapIndicator(){this.removeAndDestroy(this.snapIndicatorLayer),this.snapIndicatorLayer=null}destroy(){this.removeEditClickHandlers(),this.destroyTooltip();const l=[this.featurePointLayer,this.featureLineLayer,this.featurePolygonLayer,this.featurePolygonOutlineLayer,this.drawingLineLayer,this.drawingDashLineLayer,this.drawingPolygonLayer,this.drawingPointLayer,this.selectionPolygonLayer,this.selectionLineLayer,this.selectionPointLayer,this.vertexLayer,this.midpointLayer,this.snapIndicatorLayer];for(const u of l)this.removeAndDestroy(u);this.featurePointLayer=null,this.featureLineLayer=null,this.featurePolygonLayer=null,this.featurePolygonOutlineLayer=null,this.drawingLineLayer=null,this.drawingDashLineLayer=null,this.drawingPolygonLayer=null,this.drawingPointLayer=null,this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null,this.vertexLayer=null,this.midpointLayer=null,this.snapIndicatorLayer=null}}const mt={enabled:!0,threshold:8,vertex:!0,edge:!0};function lo(s){return s===!1?{...mt,enabled:!1}:s===!0||s===void 0?{...mt}:{...mt,...s}}function ao(s,l,u,f,h){if(!u.enabled||l.length===0)return{snapped:!1,lng:s[0],lat:s[1],type:"none"};const m=f(s);if(!m)return{snapped:!1,lng:s[0],lat:s[1],type:"none"};const y=u.threshold;let C=1/0,b={snapped:!1,lng:s[0],lat:s[1],type:"none"};for(const k of l){if(k.id===h)continue;const x=H1(k);if(x.length!==0){if(u.vertex)for(let D=0;D<x.length;D++){const z=f(x[D]);if(!z)continue;const B=m.x-z.x,H=m.y-z.y,_=Math.sqrt(B*B+H*H);_<y&&_<C&&(C=_,b={snapped:!0,lng:x[D][0],lat:x[D][1],type:"vertex",featureId:k.id,vertexIndex:D})}if(u.edge&&b.type!=="vertex"){const D=k.geometry.type==="Polygon"?x.length:Math.max(0,x.length-1);for(let z=0;z<D;z++){const B=(z+1)%x.length,H=f(x[z]),_=f(x[B]);if(!H||!_)continue;const j=co(m,H,_);if(j.t>=0&&j.t<=1&&j.dist<y&&j.dist<C){const Z=j.t,Q=x[z][0]+Z*(x[B][0]-x[z][0]),N=x[z][1]+Z*(x[B][1]-x[z][1]);C=j.dist,b={snapped:!0,lng:Q,lat:N,type:"edge",featureId:k.id,edgeIndex:z}}}}}}return b}function co(s,l,u){const f=u.x-l.x,h=u.y-l.y,m=f*f+h*h;if(m===0)return{t:0,dist:Math.sqrt((s.x-l.x)**2+(s.y-l.y)**2)};let y=((s.x-l.x)*f+(s.y-l.y)*h)/m;y=Math.max(0,Math.min(1,y));const C=l.x+y*f,b=l.y+y*h,k=Math.sqrt((s.x-C)**2+(s.y-b)**2);return{t:y,dist:k}}const uo=5;function Ne(s){const l=s.originalEvent??s.originEvent??s.e;return(l==null?void 0:l.clientX)??s.x??0}function Ze(s){const l=s.originalEvent??s.originEvent??s.e;return(l==null?void 0:l.clientY)??s.y??0}function Jr(s,l,u){const f=Fe(s);if(!f)return null;const h=u(f);if(!h){for(const y of l)if(y.geometry.type==="Polygon"&&Rr(f,y.geometry.coordinates[0]))return y;return null}const m=8;for(const y of l)if(y.geometry.type==="Polygon"){if(Rr(f,y.geometry.coordinates[0]))return y;const C=y.geometry.coordinates[0];for(let b=0;b<C.length-1;b++)if(Kr(h,C[b],C[b+1],u)<=m)return y}else if(y.geometry.type==="Point"){const C=y.geometry.coordinates,b=u(C);if(b){const k=b.x-h.x,x=b.y-h.y;if(Math.sqrt(k*k+x*x)<=m)return y}}else if(y.geometry.type==="LineString"){const C=y.geometry.coordinates;for(let b=0;b<C.length-1;b++)if(Kr(h,C[b],C[b+1],u)<=m)return y}return null}function Kr(s,l,u,f){const h=f(l),m=f(u);if(!h||!m)return 1/0;const y=m.x-h.x,C=m.y-h.y,b=y*y+C*C;if(b===0){const H=s.x-h.x,_=s.y-h.y;return Math.sqrt(H*H+_*_)}const k=Math.max(0,Math.min(1,((s.x-h.x)*y+(s.y-h.y)*C)/b)),x=h.x+k*y,D=h.y+k*C,z=s.x-x,B=s.y-D;return Math.sqrt(z*z+B*B)}function Rr(s,l){let u=!1;for(let f=0,h=l.length-1;f<l.length;h=f++){const m=l[f][0],y=l[f][1],C=l[h][0],b=l[h][1];y>s[1]!=b>s[1]&&s[0]<(C-m)*(s[1]-y)/(b-y)+m&&(u=!u)}return u}function An(s,l,u){const f=u[0]-l[0],h=u[1]-l[1],m=f*f+h*h;if(m===0){const k=Math.sqrt((s[0]-l[0])**2+(s[1]-l[1])**2);return{point:l,t:0,dist:k}}let y=((s[0]-l[0])*f+(s[1]-l[1])*h)/m;y=Math.max(0,Math.min(1,y));const C=[l[0]+y*f,l[1]+y*h],b=Math.sqrt((s[0]-C[0])**2+(s[1]-C[1])**2);return{point:C,t:y,dist:b}}function en(s,l,u){if(s.geometry.type!=="LineString")return null;const f=[...s.geometry.coordinates.map(h=>[...h])];return l<0||l>=f.length-1?null:(f.splice(l+1,0,u),{...s,geometry:{type:"LineString",coordinates:f},properties:{...s.properties}})}function tn(s,l,u){if(s.geometry.type!=="Polygon")return null;const f=s.geometry.coordinates.map(C=>C.map(b=>[...b])),h=f[0],m=h.length>1&&h[0][0]===h[h.length-1][0]&&h[0][1]===h[h.length-1][1]?h.length-1:h.length;if(l<0||l>=m)return null;const y=l+1;return h.splice(y,0,u),h[0][0]===h[h.length-2][0]&&(h[0][1],h[h.length-2][1]),h[h.length-1]=[h[0][0],h[0][1]],{...s,geometry:{type:"Polygon",coordinates:f},properties:{...s.properties}}}function fo(s,l){if(s.geometry.type!=="LineString")return null;const u=s.geometry.coordinates.map(f=>[...f]);return u.length<=2||l<0||l>=u.length?null:(u.splice(l,1),{...s,geometry:{type:"LineString",coordinates:u},properties:{...s.properties}})}function ho(s,l){if(s.geometry.type!=="Polygon")return null;const u=s.geometry.coordinates.map(m=>m.map(y=>[...y])),f=u[0],h=f.length>1&&f[0][0]===f[f.length-1][0]&&f[0][1]===f[f.length-1][1]?f.length-1:f.length;return h<=3||l<0||l>=h?null:(f.splice(l,1),f[f.length-1]=[f[0][0],f[0][1]],{...s,geometry:{type:"Polygon",coordinates:u},properties:{...s.properties}})}function po(s){const{scene:l,mapsService:u,styles:f,snap:h,defaultFeatures:m,features:y,onDrawCreate:C,onDrawUpdate:b,onDrawDelete:k,onDrawSelect:x,onModeChange:D,onChange:z}=s,B=w.useRef(Gi(m)),H=w.useRef(null),_=w.useMemo(()=>Yi(f),[f]),j=w.useMemo(()=>lo(h),[h]),Z=w.useRef({onDrawCreate:C,onDrawUpdate:b,onDrawDelete:k,onDrawSelect:x,onModeChange:D,onChange:z});Z.current={onDrawCreate:C,onDrawUpdate:b,onDrawDelete:k,onDrawSelect:x,onModeChange:D,onChange:z};const Q=w.useRef("none"),N=w.useRef(m?[...m]:[]),q=w.useRef(null),J=y!==void 0,r0=w.useRef(null),O=w.useRef(null),Y=w.useRef(null),n0=w.useCallback(l0=>{var F;if(!u)return null;try{const a0=(F=u.lngLatToContainer)==null?void 0:F.call(u,[l0[0],l0[1]]);if(a0)return{x:a0.x??a0[0],y:a0.y??a0[1]}}catch{}return null},[u]),A0=w.useCallback(l0=>{var F,a0,U;N.current=l0,B.current.features=l0,(F=H.current)==null||F.updateFeatures(l0),(U=(a0=Z.current).onChange)==null||U.call(a0,l0)},[]),o0=w.useCallback(l0=>{var a0,U;q.current=l0,B.current.selectedFeatureId=l0;const F=l0?N.current.find(V0=>V0.id===l0)??null:null;(U=(a0=Z.current).onDrawSelect)==null||U.call(a0,F)},[]);w.useEffect(()=>{if(!l)return;const l0=new so(l,_,u);return H.current=l0,N.current.length>0&&l0.updateFeatures(N.current),()=>{l0.destroy(),H.current=null}},[l]);const X=w.useCallback(l0=>{var Z0,M0,P0,v0;const F=B.current,a0=Fe(l0);if(!a0)return;const U=H.current;if(!U)return;const V0=Y.current,d0=V0!=null&&V0.snapped?V0.lng:a0[0],L0=V0!=null&&V0.snapped?V0.lat:a0[1],T0=Q.current;if(T0==="point"){const q0=Le(Ji([d0,L0]),"point"),lA=[...N.current,q0];A0(lA),(M0=(Z0=Z.current).onDrawCreate)==null||M0.call(Z0,[q0]);return}if(T0==="polyline"){F.currentVertices.push([d0,L0]),F.isDrawing=!0,U.showDrawingFeedback(F.currentVertices,F.mousePoint,T0,F.startPoint);return}if(T0==="polygon"){F.currentVertices.push([d0,L0]),F.isDrawing=!0,U.showDrawingFeedback(F.currentVertices,F.mousePoint,T0,F.startPoint);return}if(T0==="circle"){if(!F.startPoint)F.startPoint=[d0,L0],F.isDrawing=!0;else{const q0=Wr(F.startPoint,[d0,L0]);if(q0>.5){const lA=$r(F.startPoint,q0),dA=Le(lA,"circle"),xA=[...N.current,dA];A0(xA),(v0=(P0=Z.current).onDrawCreate)==null||v0.call(P0,[dA])}F.startPoint=null,F.isDrawing=!1,U.clearDrawingFeedback()}return}if(T0==="merge"){const q0=Jr(l0,N.current,n0);if(q0&&(q0.geometry.type==="Polygon"||q0.properties.drawType==="circle")){const lA=q0.id,dA=[...F.mergeSelectedIds],xA=dA.indexOf(lA);xA>=0?dA.splice(xA,1):dA.push(lA),F.mergeSelectedIds=dA,U.highlightMergeSelected(dA,N.current),dA.length>=2?U.showTooltip(`已选中 ${dA.length} 个面,双击合并`,Ne(l0),Ze(l0),["[ESC] 取消"]):dA.length===1&&U.showTooltip("继续点击选中更多面",Ne(l0),Ze(l0),["[ESC] 取消"])}else F.mergeSelectedIds=[],U.highlightMergeSelected([],N.current),U.showTooltip("点击面要素选中",Ne(l0),Ze(l0),["[ESC] 取消"]);return}if(T0==="split"){if(!F.splitTargetId){const q0=Jr(l0,N.current,n0);q0&&(q0.geometry.type==="Polygon"||q0.properties.drawType==="circle")?(F.splitTargetId=q0.id,U.highlightSplitTarget(q0.id,N.current),U.showTooltip("已选目标面,单击绘制切线起点",Ne(l0),Ze(l0),["[ESC] 取消"])):U.showTooltip("先点击选择要切分的面",Ne(l0),Ze(l0),["[ESC] 取消"]);return}F.currentVertices.push([d0,L0]),F.isDrawing=!0,U.showDrawingFeedback(F.currentVertices,F.mousePoint,"polyline",F.startPoint),F.currentVertices.length===1?U.showTooltip("单击继续绘制切线,双击完成切分",Ne(l0),Ze(l0),["[ESC] 取消"]):U.showTooltip(`切线 ${F.currentVertices.length} 个顶点,双击完成切分`,Ne(l0),Ze(l0),["[ESC] 取消"]);return}},[A0,n0]),t0=w.useCallback(l0=>{var V0,d0,L0,T0,Z0,M0,P0,v0,q0,lA,dA,xA,FA,se,te,re;const F=B.current,a0=Q.current,U=H.current;if(U){if(a0==="edit"&&q.current){Fe(l0);return}if(l0.originalEvent&&((d0=(V0=l0.originalEvent).preventDefault)==null||d0.call(V0),(T0=(L0=l0.originalEvent).stopPropagation)==null||T0.call(L0)),a0==="merge"){if(F.mergeSelectedIds.length>=2){const OA=N.current.filter(le=>F.mergeSelectedIds.includes(le.id)),VA=no(OA);if(VA){const me=[...N.current.filter(xe=>!F.mergeSelectedIds.includes(xe.id)),VA];A0(me),(M0=(Z0=Z.current).onDrawCreate)==null||M0.call(Z0,[VA]),(v0=(P0=Z.current).onDrawDelete)==null||v0.call(P0,OA[0])}F.mergeSelectedIds=[],U.highlightMergeSelected([],N.current),U.hideTooltip()}return}if(a0==="split"&&F.splitTargetId&&F.currentVertices.length>=2){const OA=N.current.find(VA=>VA.id===F.splitTargetId);if(OA){const VA=oo(OA,F.currentVertices);if(VA){const me=[...N.current.filter(xe=>xe.id!==F.splitTargetId),...VA];A0(me),(lA=(q0=Z.current).onDrawCreate)==null||lA.call(q0,VA),(xA=(dA=Z.current).onDrawDelete)==null||xA.call(dA,OA)}}F.currentVertices=[],F.isDrawing=!1,F.mousePoint=null,F.splitTargetId=null,U.clearDrawingFeedback(),U.clearSplitHighlight(),U.hideTooltip();return}if(a0==="polyline"&&F.currentVertices.length>=2){const OA=Or(F.currentVertices),VA=Le(OA,"polyline"),le=[...N.current,VA];A0(le),(se=(FA=Z.current).onDrawCreate)==null||se.call(FA,[VA]),F.currentVertices=[],F.isDrawing=!1,F.mousePoint=null,U.clearDrawingFeedback();return}if(a0==="polygon"&&F.currentVertices.length>=3){const OA=Ur(F.currentVertices),VA=Le(OA,"polygon"),le=[...N.current,VA];A0(le),(re=(te=Z.current).onDrawCreate)==null||re.call(te,[VA]),F.currentVertices=[],F.isDrawing=!1,F.mousePoint=null,U.clearDrawingFeedback();return}(a0==="polyline"||a0==="polygon")&&(F.currentVertices=[],F.isDrawing=!1,F.mousePoint=null,U.clearDrawingFeedback())}},[A0]),V=w.useCallback(l0=>{const F=B.current,a0=Fe(l0);if(!a0)return;const[U,V0]=a0,d0=H.current,L0=Q.current,T0=l0.originalEvent??l0.originEvent??l0.e,Z0=(T0==null?void 0:T0.clientX)??l0.x??0,M0=(T0==null?void 0:T0.clientY)??l0.y??0;if(F.mousePoint=[U,V0],d0&&(Z0||M0)){const v0=Y.current;if((L0==="point"||L0==="polyline"||L0==="polygon"||L0==="circle"||L0==="rectangle")&&(v0!=null&&v0.snapped)&&v0.type!=="none")d0.showSnapTooltip(v0.type,v0.lng,v0.lat,Z0,M0);else if(L0==="point")d0.showTooltip("单击放置点",Z0,M0,["[ESC] 取消"]);else if(L0==="polyline")F.isDrawing?d0.showTooltip("单击添加顶点,双击结束",Z0,M0,["[ESC] 取消"]):d0.showTooltip("单击开始绘制线",Z0,M0,["[ESC] 取消"]);else if(L0==="polygon")F.isDrawing?F.currentVertices.length<3?d0.showTooltip("单击添加顶点",Z0,M0,["[ESC] 取消"]):d0.showTooltip("单击继续,双击闭合",Z0,M0,["[ESC] 取消"]):d0.showTooltip("单击开始绘制面",Z0,M0,["[ESC] 取消"]);else if(L0==="rectangle")F.isDragging||d0.showTooltip("按住拖拽绘制矩形",Z0,M0,["[SHIFT] 正方形","[ESC] 取消"]);else if(L0==="circle")if(!F.startPoint)d0.showTooltip("单击设定圆心",Z0,M0,["[ESC] 取消"]);else{const lA=Wr(F.startPoint,[U,V0]),dA=lA>1e3?`${(lA/1e3).toFixed(1)} km`:`${Math.round(lA)} m`;d0.showTooltip(`半径 ${dA},单击完成`,Z0,M0,["[ESC] 取消"])}else L0==="merge"?F.mergeSelectedIds.length>=2?d0.showTooltip(`已选中 ${F.mergeSelectedIds.length} 个面,双击合并`,Z0,M0,["[ESC] 取消"]):F.mergeSelectedIds.length===1?d0.showTooltip("继续点击选中更多面",Z0,M0,["[ESC] 取消"]):d0.showTooltip("点击面要素选中",Z0,M0,["[ESC] 取消"]):L0==="split"?F.splitTargetId?F.isDrawing?d0.showTooltip(`切线 ${F.currentVertices.length} 个顶点,双击完成切分`,Z0,M0,["[ESC] 取消"]):d0.showTooltip("单击绘制切线起点",Z0,M0,["[ESC] 取消"]):d0.showTooltip("先点击选择要切分的面",Z0,M0,["[ESC] 取消"]):L0==="edit"||d0.hideTooltip()}if((L0==="point"||L0==="polyline"||L0==="polygon"||L0==="circle")&&j.enabled&&d0){const v0=ao([U,V0],N.current,j,n0);Y.current=v0,v0.snapped&&v0.type!=="none"?(d0.showSnapIndicator(v0.lng,v0.lat,v0.type),F.mousePoint=[v0.lng,v0.lat]):d0.hideSnapIndicator()}else Y.current=null,d0==null||d0.hideSnapIndicator();if((L0==="polyline"||L0==="polygon")&&F.isDrawing){d0==null||d0.showDrawingFeedback(F.currentVertices,F.mousePoint,L0,F.startPoint);return}if(L0==="circle"&&F.startPoint&&F.isDrawing){d0==null||d0.showDrawingFeedback(F.currentVertices,F.mousePoint,L0,F.startPoint);return}if(L0==="rectangle"&&F.isDragging&&F.startPoint){d0==null||d0.showDrawingFeedback(F.currentVertices,F.mousePoint,L0,F.startPoint);return}if(L0==="edit"&&F.isDragging&&F.selectedFeatureId&&F.dragVertexIndex!==null&&r0.current){const v0=N.current.find(q0=>q0.id===F.selectedFeatureId);if(v0){const q0=Ao(v0,F.dragVertexIndex,U,V0),lA=N.current.map(dA=>dA.id===q0.id?q0:dA);A0(lA),d0==null||d0.updateVertexHandles(q0),d0==null||d0.updateSelectionHighlight(q0),r0.current=[U,V0]}return}if(L0==="edit"&&F.isDragging&&F.selectedFeatureId&&F.dragVertexIndex===null&&r0.current){const[v0,q0]=r0.current,lA=U-v0,dA=V0-q0;if(Math.abs(lA)>1e-10||Math.abs(dA)>1e-10){const xA=N.current.find(FA=>FA.id===F.selectedFeatureId);if(xA){const FA=Ki(xA,lA,dA),se=N.current.map(te=>te.id===FA.id?FA:te);A0(se),d0==null||d0.updateVertexHandles(FA),d0==null||d0.updateSelectionHighlight(FA),r0.current=[U,V0]}}return}},[A0]),$=w.useCallback(l0=>{var U,V0;const F=B.current,a0=Q.current;if(u&&a0==="rectangle"){const d0=(U=u.getContainer)==null?void 0:U.call(u);if(!d0)return;const L0=d0.getBoundingClientRect(),T0=l0.clientX-L0.left,Z0=l0.clientY-L0.top,M0=(V0=u.containerToLngLat)==null?void 0:V0.call(u,[T0,Z0]);if(!M0)return;F.startPoint=[M0.lng,M0.lat],F.isDragging=!0,O.current={x:l0.clientX,y:l0.clientY},u.setMapStatus({dragEnable:!1,zoomEnable:!1});return}},[u]),e0=w.useCallback(l0=>{var V0,d0,L0,T0,Z0,M0;const F=B.current,a0=Q.current,U=H.current;if(u){if(a0==="rectangle"&&F.isDragging&&F.startPoint){const P0=(V0=u.getContainer)==null?void 0:V0.call(u);if(P0){const v0=P0.getBoundingClientRect(),q0=l0.clientX-v0.left,lA=l0.clientY-v0.top,dA=(d0=u.containerToLngLat)==null?void 0:d0.call(u,[q0,lA]),xA=O.current,FA=xA?Gr(xA,{x:l0.clientX,y:l0.clientY}):1/0;if(dA&&FA>uo){const se=[dA.lng,dA.lat],te=jr(F.startPoint,se),re=Le(te,"rectangle"),OA=[...N.current,re];A0(OA),(T0=(L0=Z.current).onDrawCreate)==null||T0.call(L0,[re])}}F.startPoint=null,F.isDragging=!1,F.mousePoint=null,O.current=null,U==null||U.clearDrawingFeedback(),u.setMapStatus({dragEnable:!0,zoomEnable:!0});return}if(a0==="edit"&&F.isDragging&&F.selectedFeatureId){u.setMapStatus({dragEnable:!0,zoomEnable:!0});const P0=N.current.find(v0=>v0.id===F.selectedFeatureId);P0&&((M0=(Z0=Z.current).onDrawUpdate)==null||M0.call(Z0,P0)),F.isDragging=!1,F.dragVertexIndex=null,r0.current=null;return}}},[u,A0]),c0=w.useCallback(l0=>{var a0,U,V0;if(Q.current!=="edit")return;const F=N.current.find(d0=>d0.id===l0)??null;F&&(o0(l0),(a0=H.current)==null||a0.hideFeatureFromStatic(l0),(U=H.current)==null||U.updateSelectionHighlight(F),(V0=H.current)==null||V0.updateVertexHandles(F))},[o0]),h0=w.useCallback(l0=>{if(Q.current!=="edit"||!u||!q.current)return;const F=B.current,a0=N.current.find(V0=>V0.id===q.current);if(!a0)return;const U=H1(a0);l0>=0&&l0<U.length&&(r0.current=U[l0]),F.isDragging=!0,F.dragVertexIndex=l0,u.setMapStatus({dragEnable:!1,zoomEnable:!1})},[u]),p0=w.useCallback((l0,F)=>{if(Q.current!=="edit")return;const a0=B.current;a0.isDragging||!N.current.find(V0=>V0.id===l0)||a0.selectedFeatureId===l0&&(a0.isDragging=!0,a0.dragVertexIndex=null,r0.current=F,u.setMapStatus({dragEnable:!1,zoomEnable:!1}))},[u]),H0=w.useCallback(l0=>{var U,V0,d0,L0;if(Q.current!=="edit"||!q.current)return;const F=N.current.find(T0=>T0.id===q.current);if(!F)return;let a0=null;if(F.geometry.type==="LineString"?a0=fo(F,l0):F.geometry.type==="Polygon"&&(a0=ho(F,l0)),a0){const T0=N.current.map(Z0=>Z0.id===a0.id?a0:Z0);A0(T0),(V0=(U=Z.current).onDrawUpdate)==null||V0.call(U,a0),(d0=H.current)==null||d0.updateVertexHandles(a0),(L0=H.current)==null||L0.updateSelectionHighlight(a0)}},[A0]);w.useCallback(l0=>{var V0,d0,L0,T0;if(Q.current!=="edit"||!q.current)return;const F=N.current.find(Z0=>Z0.id===q.current);if(!F)return;const a0=H1(F);let U=null;if(F.geometry.type==="LineString"&&a0.length>=2){let Z0=-1,M0=1/0;for(let P0=0;P0<a0.length-1;P0++){const{dist:v0}=An(l0,a0[P0],a0[P0+1]);v0<M0&&(M0=v0,Z0=P0)}Z0>=0&&M0<.001&&(U=en(F,Z0,l0))}else if(F.geometry.type==="Polygon"&&a0.length>=3){let Z0=-1,M0=1/0;for(let P0=0;P0<a0.length;P0++){const v0=(P0+1)%a0.length,{dist:q0}=An(l0,a0[P0],a0[v0]);q0<M0&&(M0=q0,Z0=P0)}Z0>=0&&M0<.001&&(U=tn(F,Z0,l0))}if(U){const Z0=N.current.map(M0=>M0.id===U.id?U:M0);A0(Z0),(d0=(V0=Z.current).onDrawUpdate)==null||d0.call(V0,U),(L0=H.current)==null||L0.updateVertexHandles(U),(T0=H.current)==null||T0.updateSelectionHighlight(U)}},[A0]);const U0=w.useCallback((l0,F)=>{var V0,d0,L0,T0;if(Q.current!=="edit"||!q.current)return;const a0=N.current.find(Z0=>Z0.id===q.current);if(!a0)return;let U=null;if(a0.geometry.type==="LineString"?U=en(a0,l0,F):a0.geometry.type==="Polygon"&&(U=tn(a0,l0,F)),U){const Z0=N.current.map(M0=>M0.id===U.id?U:M0);A0(Z0),(d0=(V0=Z.current).onDrawUpdate)==null||d0.call(V0,U),(L0=H.current)==null||L0.updateVertexHandles(U),(T0=H.current)==null||T0.updateSelectionHighlight(U)}},[A0]),w0=w.useCallback(()=>{var l0,F,a0;Q.current==="edit"&&q.current&&(o0(null),(l0=H.current)==null||l0.showAllFeatures(),(F=H.current)==null||F.clearSelectionHighlight(),(a0=H.current)==null||a0.clearVertexHandles())},[o0]),g0=w.useCallback(l0=>{var V0,d0,L0,T0,Z0,M0,P0;const F=Q.current;if(F===l0)return;const a0=B.current,U=H.current;if(a0.isDrawing&&(a0.currentVertices=[],a0.startPoint=null,a0.mousePoint=null,a0.isDrawing=!1,U==null||U.clearDrawingFeedback(),U==null||U.removeDrawingLayers()),F==="merge"&&(a0.mergeSelectedIds=[],U==null||U.clearMergeHighlight(),U==null||U.hideTooltip()),F==="split"&&(a0.splitTargetId=null,a0.currentVertices=[],a0.isDrawing=!1,U==null||U.clearDrawingFeedback(),U==null||U.clearSplitHighlight(),U==null||U.hideTooltip()),F==="edit"&&(o0(null),U==null||U.showAllFeatures(),U==null||U.clearSelectionHighlight(),U==null||U.clearVertexHandles(),U==null||U.removeSelectionLayers(),U==null||U.removeVertexLayer(),U==null||U.removeEditClickHandlers(),U==null||U.clearEditCursors(),U==null||U.hideTooltip(),u&&u.setMapStatus({doubleClickZoom:!0})),F!=="edit"&&F!=="none"&&F!=="merge"&&F!=="split"){U==null||U.removeDrawingLayers(),U==null||U.hideTooltip(),u&&u.setMapStatus({doubleClickZoom:!0});const v0=(V0=u==null?void 0:u.getContainer)==null?void 0:V0.call(u);v0&&v0.classList.remove("l7-draw-cursor-crosshair")}if(Q.current=l0,a0.mode=l0,l0==="merge"){a0.mergeSelectedIds=[];const v0=(d0=u==null?void 0:u.getContainer)==null?void 0:d0.call(u);v0&&v0.classList.add("l7-draw-cursor-crosshair")}else if(l0==="split"){a0.splitTargetId=null,a0.currentVertices=[],a0.isDrawing=!1,u&&u.setMapStatus({doubleClickZoom:!1});const v0=(L0=u==null?void 0:u.getContainer)==null?void 0:L0.call(u);v0&&v0.classList.add("l7-draw-cursor-crosshair")}else if(l0==="edit")U==null||U.setupEditClickHandlers(c0,h0,w0,H0,U0,p0),u&&u.setMapStatus({doubleClickZoom:!1});else if(l0!=="none"){u&&(l0==="polyline"||l0==="polygon")&&u.setMapStatus({doubleClickZoom:!1});const v0=(T0=u==null?void 0:u.getContainer)==null?void 0:T0.call(u);v0&&v0.classList.add("l7-draw-cursor-crosshair")}else{const v0=(Z0=u==null?void 0:u.getContainer)==null?void 0:Z0.call(u);v0&&v0.classList.remove("l7-draw-cursor-crosshair")}(P0=(M0=Z.current).onModeChange)==null||P0.call(M0,l0)},[u,c0,h0,w0,o0]),N0=w.useCallback(l0=>{var V0,d0;const F=B.current,a0=Q.current,U=H.current;if(l0.key==="Escape"){F.isDrawing&&(F.currentVertices=[],F.startPoint=null,F.mousePoint=null,F.isDrawing=!1,U==null||U.clearDrawingFeedback()),q.current&&(o0(null),U==null||U.showAllFeatures(),U==null||U.clearSelectionHighlight(),U==null||U.clearVertexHandles()),U==null||U.hideTooltip();return}if((l0.key==="Delete"||l0.key==="Backspace")&&a0==="edit"&&q.current){l0.preventDefault();const L0=q.current,T0=N.current.find(Z0=>Z0.id===L0);if(T0){const Z0=N.current.filter(M0=>M0.id!==L0);A0(Z0),(d0=(V0=Z.current).onDrawDelete)==null||d0.call(V0,T0),o0(null),U==null||U.showAllFeatures(),U==null||U.clearSelectionHighlight(),U==null||U.clearVertexHandles()}return}},[A0,o0]);w.useEffect(()=>{var d0;if(!l||!u)return;const l0=L0=>X(L0),F=L0=>t0(L0),a0=L0=>V(L0),U=(d0=u.getContainer)==null?void 0:d0.call(u);u.on("click",l0),u.on("dblclick",F),u.on("mousemove",a0),U&&U.addEventListener("mousedown",$),document.addEventListener("mouseup",e0),document.addEventListener("keydown",N0);const V0=L0=>{Q.current==="edit"&&L0.preventDefault()};return U&&U.addEventListener("contextmenu",V0),()=>{u.off("click",l0),u.off("dblclick",F),u.off("mousemove",a0),U&&(U.removeEventListener("mousedown",$),U.removeEventListener("contextmenu",V0)),document.removeEventListener("mouseup",e0),document.removeEventListener("keydown",N0);try{u.setMapStatus({dragEnable:!0,zoomEnable:!0,doubleClickZoom:!0})}catch{}U&&U.classList.remove("l7-draw-cursor-crosshair")}},[l,u,X,t0,V,$,e0,N0]),w.useEffect(()=>{var l0;J&&y&&(N.current=[...y],B.current.features=[...y],(l0=H.current)==null||l0.updateFeatures(y))},[J,y]);const D0=w.useCallback(l0=>{var a0,U;if(J)return;const F=[...N.current,...l0];A0(F),(U=(a0=Z.current).onDrawCreate)==null||U.call(a0,l0)},[J,A0]),_0=w.useCallback(l0=>{var U,V0,d0,L0,T0;if(J)return;const F=N.current.find(Z0=>Z0.id===l0);if(!F)return;const a0=N.current.filter(Z0=>Z0.id!==l0);A0(a0),(V0=(U=Z.current).onDrawDelete)==null||V0.call(U,F),q.current===l0&&(o0(null),(d0=H.current)==null||d0.showAllFeatures(),(L0=H.current)==null||L0.clearSelectionHighlight(),(T0=H.current)==null||T0.clearVertexHandles())},[J,A0,o0]),gA=w.useCallback(()=>{q.current&&_0(q.current)},[_0]),z0=w.useCallback(()=>{var l0,F,a0;J||(A0([]),o0(null),(l0=H.current)==null||l0.showAllFeatures(),(F=H.current)==null||F.clearSelectionHighlight(),(a0=H.current)==null||a0.clearVertexHandles())},[J,A0,o0]),B0=w.useCallback(()=>[...N.current],[]),j0=w.useCallback(l0=>{var F,a0,U,V0,d0,L0;if(Q.current==="edit")if(l0){const T0=N.current.find(Z0=>Z0.id===l0)??null;o0(l0),T0&&((F=H.current)==null||F.hideFeatureFromStatic(l0),(a0=H.current)==null||a0.updateSelectionHighlight(T0),(U=H.current)==null||U.updateVertexHandles(T0))}else o0(null),(V0=H.current)==null||V0.showAllFeatures(),(d0=H.current)==null||d0.clearSelectionHighlight(),(L0=H.current)==null||L0.clearVertexHandles()},[o0]);return{mode:Q.current,features:N.current,selectedFeatureId:q.current,setMode:g0,addFeatures:D0,deleteFeature:_0,deleteSelectedFeature:gA,clearAll:z0,getFeatures:B0,selectFeature:j0,layerManager:H.current}}const rn=[{mode:"none",icon:"pan_tool",title:"手型 — 关闭绘制态,恢复地图交互",label:"手型"},{mode:"point",icon:"location_on",title:"点 — 单击放置",label:"点"},{mode:"polyline",icon:"timeline",title:"线 — 单击添加顶点,双击结束",label:"线"},{mode:"polygon",icon:"pentagon",title:"面 — 单击添加顶点,双击闭合",label:"面"},{mode:"circle",icon:"radio_button_unchecked",title:"圆 — 单击圆心,再单击确定半径",label:"圆形"},{mode:"rectangle",icon:"crop_square",title:"矩形 — 按住拖拽绘制",label:"矩形"},{mode:"edit",icon:"edit_square",title:"编辑 — 选中要素后拖拽移动或编辑顶点",label:"编辑"}],nn=[{mode:"merge",icon:"call_merge",title:"合并 — 选中2+要素合并为一个",label:"合并"},{mode:"split",icon:"content_cut",title:"切分 — 绘制切线将要素分割",label:"切分"}];function on(){const s=w.useRef(null),l=w.useCallback((f,h)=>{if(!s.current){const z=document.createElement("div");z.style.cssText=["position:fixed","pointer-events:none","z-index:9999","padding:5px 10px","border-radius:4px","background:rgba(26,27,34,0.92)","color:#f2eff9",'font:500 11px/16px "JetBrains Mono",monospace',"white-space:nowrap","box-shadow:0 2px 8px rgba(0,0,0,0.3)"].join(";"),document.body.appendChild(z),s.current=z}const m=s.current;m.textContent=h,m.style.display="block";const y=m.getBoundingClientRect(),C=f.currentTarget.getBoundingClientRect();let b=C.right+8,k=C.top+C.height/2-y.height/2;const x=window.innerWidth,D=window.innerHeight;b+y.width>x-4&&(b=C.left-y.width-8),b<4&&(b=C.left+C.width/2-y.width/2,k=C.top-y.height-8),k<4&&(k=C.bottom+8),k+y.height>D-4&&(k=C.top-y.height-8),m.style.left=`${Math.max(4,b)}px`,m.style.top=`${Math.max(4,k)}px`},[]),u=w.useCallback(()=>{s.current&&(s.current.style.display="none")},[]);return w.useEffect(()=>()=>{var f;s.current&&((f=s.current.parentElement)==null||f.removeChild(s.current),s.current=null)},[]),{showTooltip:l,hideTooltip:u}}function sn(s,l,u,f,h,m){return s.map(y=>g.jsx("button",{className:`l7-button-control ${m}${l===y.mode?" l7-button-control--active":""}`,onClick:()=>u(y.mode),onMouseEnter:C=>f(C,y.title),onMouseLeave:h,"aria-label":y.title,"aria-pressed":l===y.mode,children:g.jsx("span",{className:"material-symbols-outlined",children:y.icon})},y.mode))}const go=({activeMode:s,onModeChange:l,modes:u,showDelete:f=!0,hasSelection:h=!1,hasFeatures:m=!1,onDeleteSelected:y,onClearAll:C,className:b,style:k})=>{const{showTooltip:x,hideTooltip:D}=on(),z=w.useMemo(()=>u?rn.filter(H=>H.mode==="none"||u.includes(H.mode)):rn,[u]),B=w.useCallback(H=>{l(H==="none"||s===H?"none":H)},[s,l]);return g.jsxs("div",{className:`l7-control l7-control-draw l7-control--glass${b?` ${b}`:""}`,style:k,role:"toolbar","aria-label":"基础绘制工具",children:[sn(z,s,B,x,D,"l7-draw-tool-btn"),f&&s==="edit"&&h&&y&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"l7-draw-separator"}),g.jsx("button",{className:"l7-button-control l7-draw-action-btn",onClick:y,onMouseEnter:H=>x(H,"删除选中要素"),onMouseLeave:D,"aria-label":"删除选中要素",children:g.jsx("span",{className:"material-symbols-outlined",children:"delete"})})]}),f&&m&&C&&g.jsx("button",{className:"l7-button-control l7-draw-action-btn",onClick:C,onMouseEnter:H=>x(H,"清除所有要素"),onMouseLeave:D,"aria-label":"清除所有要素",children:g.jsx("span",{className:"material-symbols-outlined",children:"delete_sweep"})})]})},yo=({activeMode:s,onModeChange:l,modes:u,className:f,style:h})=>{const{showTooltip:m,hideTooltip:y}=on(),C=w.useMemo(()=>u?nn.filter(k=>k.mode==="none"||u.includes(k.mode)):nn,[u]),b=w.useCallback(k=>{l(k==="none"||s===k?"none":k)},[s,l]);return g.jsx("div",{className:`l7-control l7-control-draw l7-control--glass${f?` ${f}`:""}`,style:h,role:"toolbar","aria-label":"高级操作工具",children:sn(C,s,b,m,y,"l7-draw-advanced-btn")})},Ct=w.forwardRef(function({position:l="topright",defaultFeatures:u,features:f,modes:h,showDelete:m=!0,styles:y,snap:C,className:b,style:k,onDrawCreate:x,onDrawUpdate:D,onDrawDelete:z,onDrawSelect:B,onModeChange:H,onChange:_},j){const{scene:Z,mapsService:Q,positionClassName:N}=XA(l),q=qA(),J=po({scene:Z,mapsService:Q,styles:y,snap:C,defaultFeatures:u,features:f,onDrawCreate:x,onDrawUpdate:D,onDrawDelete:z,onDrawSelect:B,onModeChange:H,onChange:_}),[r0,O]=w.useState("none");w.useImperativeHandle(j,()=>({setMode:J.setMode,addFeatures:J.addFeatures,deleteFeature:J.deleteFeature,clearAll:J.clearAll,getFeatures:J.getFeatures,selectFeature:J.selectFeature}),[J]);const Y=w.useCallback(V=>{O(V),J.setMode(V)},[J]),n0=w.useCallback(()=>{J.deleteSelectedFeature()},[J]),A0=w.useCallback(()=>{J.clearAll()},[J]),o0=J.selectedFeatureId!==null,X=J.features.length>0,t0=g.jsxs(g.Fragment,{children:[g.jsx(go,{activeMode:r0,onModeChange:Y,modes:h,showDelete:m,hasSelection:o0,hasFeatures:X,onDeleteSelected:n0,onClearAll:A0}),g.jsx(yo,{activeMode:r0,onModeChange:Y,modes:h})]});return q?g.jsx("div",{className:b,style:k,children:t0}):g.jsx("div",{className:`l7-control-anchor ${N}`,children:t0})});UA.mark(Ct);async function vt(s){let l,u;s instanceof File?(l=URL.createObjectURL(s),u=()=>URL.revokeObjectURL(l)):l=s;const{width:f,height:h}=await mo(l);return{url:l,width:f,height:h,revokeUrl:u}}function mo(s){return new Promise((l,u)=>{const f=new Image;f.onload=()=>l({width:f.naturalWidth,height:f.naturalHeight}),f.onerror=()=>u(new Error("Failed to load image")),f.crossOrigin="anonymous",f.src=s})}function ln(s){return new Promise((l,u)=>{const f=new Image;f.onload=()=>l(f),f.onerror=()=>u(new Error("Failed to load image")),f.crossOrigin="anonymous",f.src=s})}async function Co(s,l,u="image/png",f=.92){const h=await ln(s),m=document.createElement("canvas");m.width=Math.round(l.width),m.height=Math.round(l.height);const y=m.getContext("2d");if(!y)throw new Error("Canvas 2D context unavailable");y.drawImage(h,Math.round(l.x),Math.round(l.y),Math.round(l.width),Math.round(l.height),0,0,m.width,m.height);const C=await new Promise((x,D)=>{m.toBlob(z=>z?x(z):D(new Error("Canvas toBlob failed")),u,f)}),b=URL.createObjectURL(C);return{blob:C,url:b,revokeUrl:()=>URL.revokeObjectURL(b),width:m.width,height:m.height}}function vo(s,l,u){const f=Math.max(0,Math.min(s.x,l-s.width)),h=Math.max(0,Math.min(s.y,u-s.height)),m=Math.max(1,Math.min(s.width,l-f)),y=Math.max(1,Math.min(s.height,u-h));return{x:f,y:h,width:m,height:y}}function bo(s,l,u){const f=360/Math.pow(2,l)*.3,h=f*u/2,m=f/2,[y,C]=s;return[[y-h,C+m],[y+h,C+m],[y+h,C-m],[y-h,C-m]]}function an(s){const l=s.map(f=>f[0]),u=s.map(f=>f[1]);return[Math.min(...l),Math.min(...u),Math.max(...l),Math.max(...u)]}function wo(s,l){const u=[],f=[];for(let m=0;m<4;m++){const[y,C]=s[m],[b,k]=l[m];u.push([-y,-C,-1,0,0,0,b*y,b*C]),f.push(-b),u.push([0,0,0,-y,-C,-1,k*y,k*C]),f.push(-k)}const h=xo(u,f);return[h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],1]}function Lo(s,l,u,f){const h="naturalWidth"in s?s.naturalWidth:s.width,m="naturalHeight"in s?s.naturalHeight:s.height,y=l.map(Y=>Y[0]),C=l.map(Y=>Y[1]),b=Math.min(...y),k=Math.max(...y),x=Math.min(...C),D=Math.max(...C),z=Y=>[(Y[0]-b)/(k-b)*u,(D-Y[1])/(D-x)*f],B=l.map(z),_=wo(B,[[0,0],[h,0],[h,m],[0,m]]),j=document.createElement("canvas");j.width=u,j.height=f;const Z=j.getContext("2d"),Q=document.createElement("canvas");Q.width=h,Q.height=m;const N=Q.getContext("2d");N.drawImage(s,0,0);const q=N.getImageData(0,0,h,m),J=Z.createImageData(u,f),r0=q.data,O=J.data;for(let Y=0;Y<f;Y++)for(let n0=0;n0<u;n0++){const A0=_[6]*n0+_[7]*Y+_[8];if(Math.abs(A0)<1e-10)continue;const o0=(_[0]*n0+_[1]*Y+_[2])/A0,X=(_[3]*n0+_[4]*Y+_[5])/A0;if(o0>=0&&o0<h-1&&X>=0&&X<m-1){const t0=Math.floor(o0),V=Math.floor(X),$=o0-t0,e0=X-V,c0=(V*h+t0)*4,h0=(Y*u+n0)*4;for(let p0=0;p0<4;p0++)O[h0+p0]=Math.round(r0[c0+p0]*(1-$)*(1-e0)+r0[c0+4+p0]*$*(1-e0)+r0[c0+h*4+p0]*(1-$)*e0+r0[c0+h*4+4+p0]*$*e0)}}return Z.putImageData(J,0,0),j}function ko(s,l,u,f,h,m,y){const C=document.createElement("canvas");return C.width=f,C.height=h,C.getContext("2d").drawImage(s,l,u,f,h,0,0,f,h),new Promise((k,x)=>{C.toBlob(D=>D?k(D):x(new Error("tile export failed")),m,y)})}async function Mo(s,l,u){const{outputWidth:f,outputHeight:h,cols:m,rows:y,format:C="image/png",quality:b=.92}=u,k=Lo(s,l,f,h),x=l.map(O=>O[0]),D=l.map(O=>O[1]),z=Math.min(...x),B=Math.max(...x),H=Math.min(...D),_=Math.max(...D),j=[z,H,B,_],Z=await new Promise((O,Y)=>{k.toBlob(n0=>n0?O(n0):Y(new Error("export failed")),C,b)}),Q=Math.floor(f/m),N=Math.floor(h/y),q=(B-z)/m,J=(_-H)/y,r0=[];for(let O=0;O<y;O++)for(let Y=0;Y<m;Y++){const n0=Y*Q,A0=O*N,o0=Y===m-1?f-n0:Q,X=O===y-1?h-A0:N,t0=z+Y*q,V=Y===m-1?B:t0+q,$=_-O*J,e0=O===y-1?H:$-J,c0=[t0,e0,V,$],h0=[[t0,$],[V,$],[V,e0],[t0,e0]],p0=await ko(k,n0,A0,o0,X,C,b);r0.push({blob:p0,row:O,col:Y,extent:c0,corners:h0,width:o0,height:X})}return{canvas:k,fullBlob:Z,tiles:r0,extent:j}}function xo(s,l){const f=[];for(let h=0;h<8;h++)f.push([...s[h],l[h]]);for(let h=0;h<8;h++){let m=h,y=Math.abs(f[h][h]);for(let b=h+1;b<8;b++)Math.abs(f[b][h])>y&&(y=Math.abs(f[b][h]),m=b);[f[h],f[m]]=[f[m],f[h]];const C=f[h][h];if(Math.abs(C)<1e-12)throw new Error("Singular matrix in homography computation");for(let b=h;b<=8;b++)f[h][b]/=C;for(let b=0;b<8;b++){if(b===h)continue;const k=f[b][h];for(let x=h;x<=8;x++)f[b][x]-=k*f[h][x]}}return f.map(h=>h[8])}function Eo({scene:s,mapsService:l,corners:u,defaultCorners:f,imageSource:h,opacity:m=.7,onCornersChange:y,onImageLoad:C}){const[b,k]=w.useState({phase:"idle",imageUrl:null,imageDimensions:null,corners:f??null,draggingCorner:null,opacity:m}),[x,D]=w.useState(null),z=w.useRef(b.corners),B=w.useRef(null),H=w.useRef(null),_=w.useRef(y);_.current=y;const j=w.useRef(null),Z=u!==void 0,Q=Z?u:b.corners;w.useEffect(()=>{z.current=Q??null},[Q]),w.useEffect(()=>{Z&&u&&k(V=>({...V,corners:u}))},[Z,u]),w.useEffect(()=>{h&&O(h)},[h]);const[N,q]=w.useState(Q??null);w.useEffect(()=>{b.draggingCorner||q(Q??null)},[Q,b.draggingCorner]),w.useEffect(()=>{if(!s||!b.imageUrl||!N){if(j.current){try{s==null||s.removeLayer(j.current)}catch{}j.current=null}return}const V=[N[0],N[1],N[2],N[3]];if(j.current){try{s.removeLayer(j.current)}catch{}j.current=null}const $=new EA.ImageLayer({zIndex:10,name:"__calibration_image__"});return $.source(b.imageUrl,{parser:{type:"image",coordinates:V}}),$.style({opacity:b.opacity}),s.addLayer($),j.current=$,()=>{if(j.current){try{s.removeLayer(j.current)}catch{}j.current=null}}},[s,b.imageUrl,N,b.opacity]);const J=w.useCallback(()=>{if(!l||!z.current){D(null);return}try{const V=z.current.map($=>{const e0=l.lngLatToContainer([$[0],$[1]]);return[e0.x,e0.y]});D(V)}catch{}},[l]);w.useEffect(()=>{if(!l||!Q)return;J();const V=()=>J();return l.on("camerachange",V),l.on("viewchange",V),()=>{l.off("camerachange",V),l.off("viewchange",V)}},[l,Q,J]);const r0=w.useCallback(V=>{var h0;if(!l)return;B.current=V,k(p0=>({...p0,draggingCorner:V})),l.setMapStatus({dragEnable:!1,zoomEnable:!1});const $=(h0=l.getContainer)==null?void 0:h0.call(l),e0=p0=>{var D0;if(B.current===null||!z.current||!$)return;const H0=$.getBoundingClientRect(),U0=p0.clientX-H0.left,w0=p0.clientY-H0.top,g0=l.containerToLngLat([U0,w0]);if(!g0)return;const N0=[...z.current];N0[B.current]=[g0.lng,g0.lat],z.current=N0,Z||k(_0=>({..._0,corners:N0})),(D0=_.current)==null||D0.call(_,N0),J()},c0=()=>{B.current=null,k(p0=>({...p0,draggingCorner:null})),l.setMapStatus({dragEnable:!0,zoomEnable:!0}),document.removeEventListener("mousemove",e0),document.removeEventListener("mouseup",c0)};document.addEventListener("mousemove",e0),document.addEventListener("mouseup",c0)},[l,Z,J]),O=w.useCallback(async(V,$)=>{var e0,c0;(e0=H.current)==null||e0.call(H),H.current=null;try{const h0=await vt(V);H.current=h0.revokeUrl??null;let p0=$??z.current;if(!p0&&l){const H0=l.getCenter(),U0=l.getZoom(),w0=h0.width/h0.height;p0=bo([H0.lng,H0.lat],U0,w0)}k(H0=>({...H0,phase:"calibrating",imageUrl:h0.url,imageDimensions:{width:h0.width,height:h0.height},corners:Z?H0.corners:p0})),!Z&&p0&&(z.current=p0,(c0=_.current)==null||c0.call(_,p0)),C==null||C({width:h0.width,height:h0.height}),requestAnimationFrame(J)}catch(h0){console.error("Failed to load image:",h0)}},[l,Z,C,J]),Y=w.useCallback(V=>{k($=>({...$,phase:V}))},[]),n0=w.useCallback(V=>{k($=>({...$,opacity:V}))},[]),A0=w.useCallback(()=>{var V;if((V=H.current)==null||V.call(H),H.current=null,z.current=null,j.current&&s){try{s.removeLayer(j.current)}catch{}j.current=null}k({phase:"idle",imageUrl:null,imageDimensions:null,corners:null,draggingCorner:null,opacity:m}),D(null)},[m,s]),o0=w.useCallback(()=>z.current,[]),X=w.useCallback(V=>{var $;z.current=V,Z||k(e0=>({...e0,corners:V})),($=_.current)==null||$.call(_,V),J()},[Z,J]),t0=w.useCallback(async V=>{if(!b.imageUrl||!z.current||!b.imageDimensions)throw new Error("No image or corners to export");const $=await ln(b.imageUrl),e0=z.current,c0=(V==null?void 0:V.outputWidth)||b.imageDimensions.width,h0=(V==null?void 0:V.outputHeight)||b.imageDimensions.height,p0=(V==null?void 0:V.cols)||1,H0=(V==null?void 0:V.rows)||1,{fullBlob:U0,tiles:w0,extent:g0}=await Mo($,e0,{outputWidth:c0,outputHeight:h0,cols:p0,rows:H0,format:V==null?void 0:V.format,quality:V==null?void 0:V.quality}),N0=URL.createObjectURL(U0);return{tiles:w0.map(_0=>({blob:_0.blob,previewUrl:URL.createObjectURL(_0.blob),row:_0.row,col:_0.col,extent:_0.extent,corners:_0.corners,width:_0.width,height:_0.height})),extent:g0,previewUrl:N0,blob:U0,outputWidth:c0,outputHeight:h0}},[b.imageUrl,b.imageDimensions]);return w.useEffect(()=>()=>{var V;if((V=H.current)==null||V.call(H),j.current&&s)try{s.removeLayer(j.current)}catch{}},[s]),{state:b,screenPositions:x,setImage:O,setPhase:Y,setOpacity:n0,startDrag:r0,clear:A0,getCorners:o0,setCorners:X,exportImage:t0}}const zo=["TL","TR","BR","BL"],V1=14;function So({screenPositions:s,draggingCorner:l,phase:u,onStartDrag:f}){const h=w.useCallback(C=>b=>{b.preventDefault(),b.stopPropagation(),f(C)},[f]),m=u==="calibrating",y=`M ${s[0][0]},${s[0][1]} L ${s[1][0]},${s[1][1]} L ${s[2][0]},${s[2][1]} L ${s[3][0]},${s[3][1]} Z`;return g.jsxs(g.Fragment,{children:[g.jsx("svg",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"},children:g.jsx("path",{d:y,fill:"none",stroke:"#f59e0b",strokeWidth:"2",strokeDasharray:"6 3"})}),m&&s.map((C,b)=>g.jsx("div",{onMouseDown:h(b),style:{position:"absolute",left:C[0]-V1/2,top:C[1]-V1/2,width:V1,height:V1,borderRadius:"50%",backgroundColor:"#fff",border:"2px solid #f59e0b",boxShadow:"0 2px 4px rgba(0,0,0,0.3)",cursor:l===b?"grabbing":"grab",transform:l===b?"scale(1.3)":"scale(1)",transition:l===null?"transform 0.15s ease":"none",zIndex:l===b?10:1,pointerEvents:"auto"},title:`${zo[b]} 角点`},b))]})}const cn=["左上 (TL)","右上 (TR)","右下 (BR)","左下 (BL)"],ge=10;function Do({imageUrl:s,imageDimensions:l,mapCenter:u,mapZoom:f,showInitialCoords:h=!0,onConfirm:m,onCancel:y}){const[C,b]=w.useState({x:0,y:0,width:l.width,height:l.height}),[k,x]=w.useState(null),[D,z]=w.useState(!0),[B,H]=w.useState([[0,0],[0,0],[0,0],[0,0]]),_=w.useRef(null),[j,Z]=w.useState(1);w.useEffect(()=>{const o0=()=>{if(!_.current)return;const X=_.current.clientWidth,t0=_.current.clientHeight,V=X/l.width,$=t0/l.height;Z(Math.min(V,$,1))};return o0(),window.addEventListener("resize",o0),()=>window.removeEventListener("resize",o0)},[l]);const Q=w.useRef(null);w.useCallback((o0,X)=>{if(!Q.current)return{imgX:0,imgY:0};const t0=Q.current.getBoundingClientRect(),V=(o0-t0.left)/j,$=(X-t0.top)/j;return{imgX:V,imgY:$}},[j]);const N=w.useCallback((o0,X)=>{o0.preventDefault(),o0.stopPropagation(),x({handle:X,startMouseX:o0.clientX,startMouseY:o0.clientY,startCrop:{...C}})},[C]);w.useEffect(()=>{if(!k)return;const o0=t0=>{const V=(t0.clientX-k.startMouseX)/j,$=(t0.clientY-k.startMouseY)/j,e0=k.startCrop;let c0;switch(k.handle){case"move":c0={...e0,x:e0.x+V,y:e0.y+$};break;case"tl":c0={x:e0.x+V,y:e0.y+$,width:e0.width-V,height:e0.height-$};break;case"tr":c0={x:e0.x,y:e0.y+$,width:e0.width+V,height:e0.height-$};break;case"br":c0={x:e0.x,y:e0.y,width:e0.width+V,height:e0.height+$};break;case"bl":c0={x:e0.x+V,y:e0.y,width:e0.width-V,height:e0.height+$};break;default:c0=e0}c0.width<20&&((k.handle==="tl"||k.handle==="bl")&&(c0.x=e0.x+e0.width-20),c0.width=20),c0.height<20&&((k.handle==="tl"||k.handle==="tr")&&(c0.y=e0.y+e0.height-20),c0.height=20),b(vo(c0,l.width,l.height))},X=()=>{x(null)};return document.addEventListener("mousemove",o0),document.addEventListener("mouseup",X),()=>{document.removeEventListener("mousemove",o0),document.removeEventListener("mouseup",X)}},[k,j,l]);const q=w.useCallback((o0,X,t0)=>{const V=parseFloat(t0);if(isNaN(V))return;const $=[...B];$[o0]=[X==="lng"?V:$[o0][0],X==="lat"?V:$[o0][1]],H($)},[B]);w.useEffect(()=>{if(D&&u&&f!==null){const o0=C.width/C.height,X=360/Math.pow(2,f)*.3,t0=X*o0/2,V=X/2,[$,e0]=u;H([[$-t0,e0+V],[$+t0,e0+V],[$+t0,e0-V],[$-t0,e0-V]])}},[D,u,f,C.width,C.height]);const J=w.useCallback(()=>{m(C,D?null:B)},[C,D,B,m]),r0=C.x*j,O=C.y*j,Y=C.width*j,n0=C.height*j,A0=o0=>({position:"absolute",left:0,top:0,width:l.width*j,height:l.height*j,background:"rgba(0, 0, 0, 0.45)",clipPath:o0,pointerEvents:"none"});return g.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.6)"},onClick:y,children:g.jsxs("div",{style:{background:"#fff",borderRadius:10,padding:0,width:"90vw",maxWidth:900,maxHeight:"90vh",overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)",display:"flex",flexDirection:"column"},onClick:o0=>o0.stopPropagation(),children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 20px",borderBottom:"1px solid #e5e7eb",fontSize:15,fontWeight:600},children:[g.jsx("span",{children:"图片裁剪 & 初始坐标"}),g.jsx("button",{onClick:y,style:{border:"none",background:"transparent",fontSize:20,cursor:"pointer",color:"#666",lineHeight:1},children:"✕"})]}),g.jsxs("div",{style:{display:"flex",flex:1,minHeight:0,overflow:"hidden"},children:[g.jsx("div",{ref:_,style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:16,background:"#f9fafb",overflow:"auto",position:"relative"},children:g.jsxs("div",{style:{position:"relative",lineHeight:0},children:[g.jsx("img",{ref:Q,src:s,style:{width:l.width*j,height:l.height*j,display:"block",userSelect:"none",pointerEvents:"none"},draggable:!1}),g.jsx("div",{style:A0(`polygon(0% 0%, 100% 0%, 100% ${O}px, ${r0}px ${O}px, ${r0}px ${O+n0}px, 0% ${O+n0}px)`)}),g.jsx("div",{style:A0(`polygon(100% 0%, 100% 100%, ${r0+Y}px 100%, ${r0+Y}px ${O}px, 100% ${O}px)`)}),g.jsx("div",{style:A0(`polygon(${r0+Y}px ${O}px, 100% ${O}px, 100% 100%, ${r0+Y}px 100%, ${r0+Y}px ${O+n0}px)`)}),g.jsx("div",{style:A0(`polygon(0% ${O+n0}px, ${r0}px ${O+n0}px, ${r0+Y}px ${O+n0}px, ${r0+Y}px 100%, 0% 100%)`)}),g.jsxs("div",{onMouseDown:o0=>N(o0,"move"),style:{position:"absolute",left:r0,top:O,width:Y,height:n0,border:"2px solid #f59e0b",cursor:(k==null?void 0:k.handle)==="move"?"grabbing":"grab",pointerEvents:"auto",boxSizing:"border-box"},children:[g.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[g.jsx("div",{style:{position:"absolute",top:"33.3%",left:0,right:0,height:1,background:"rgba(245,158,7,0.3)"}}),g.jsx("div",{style:{position:"absolute",top:"66.6%",left:0,right:0,height:1,background:"rgba(245,158,7,0.3)"}}),g.jsx("div",{style:{position:"absolute",left:"33.3%",top:0,bottom:0,width:1,background:"rgba(245,158,7,0.3)"}}),g.jsx("div",{style:{position:"absolute",left:"66.6%",top:0,bottom:0,width:1,background:"rgba(245,158,7,0.3)"}})]}),["tl","tr","br","bl"].map(o0=>{const X={tl:{left:-ge/2,top:-ge/2,cursor:"nwse-resize"},tr:{right:-ge/2,top:-ge/2,cursor:"nesw-resize"},br:{right:-ge/2,bottom:-ge/2,cursor:"nwse-resize"},bl:{left:-ge/2,bottom:-ge/2,cursor:"nesw-resize"}};return g.jsx("div",{onMouseDown:t0=>N(t0,o0),style:{position:"absolute",width:ge,height:ge,background:"#fff",border:"2px solid #f59e0b",borderRadius:2,pointerEvents:"auto",...X[o0]}},o0)}),g.jsxs("div",{style:{position:"absolute",bottom:-22,left:"50%",transform:"translateX(-50%)",fontSize:10,color:"#f59e0b",whiteSpace:"nowrap",pointerEvents:"none",fontFamily:"monospace",background:"rgba(0,0,0,0.5)",padding:"1px 4px",borderRadius:2},children:[Math.round(C.width)," × ",Math.round(C.height)]})]})]})}),h&&g.jsxs("div",{style:{width:260,padding:"16px 20px",borderLeft:"1px solid #e5e7eb",display:"flex",flexDirection:"column",gap:12,overflowY:"auto",fontSize:12},children:[g.jsx("div",{style:{fontWeight:600,marginBottom:4,color:"#333"},children:"裁剪区域"}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"6px 12px",color:"#666",fontFamily:"monospace",fontSize:11},children:[g.jsxs("span",{children:["X: ",Math.round(C.x),"px"]}),g.jsxs("span",{children:["Y: ",Math.round(C.y),"px"]}),g.jsxs("span",{children:["W: ",Math.round(C.width),"px"]}),g.jsxs("span",{children:["H: ",Math.round(C.height),"px"]})]}),g.jsx("button",{onClick:()=>b({x:0,y:0,width:l.width,height:l.height}),style:{padding:"4px 12px",fontSize:11,border:"1px solid #d1d5db",borderRadius:4,background:"#fff",cursor:"pointer",alignSelf:"flex-start"},children:"重置裁剪区域"}),g.jsx("div",{style:{fontWeight:600,color:"#333",marginTop:8},children:"初始坐标"}),g.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:4,cursor:"pointer"},children:[g.jsx("input",{type:"radio",name:"coordMode",checked:D,onChange:()=>z(!0)}),g.jsx("span",{children:"自动计算"})]}),g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:4,cursor:"pointer"},children:[g.jsx("input",{type:"radio",name:"coordMode",checked:!D,onChange:()=>z(!1)}),g.jsx("span",{children:"手动输入"})]})]}),D&&g.jsx("div",{style:{color:"#888",fontSize:11,lineHeight:1.5},children:"基于当前地图视口中心自动计算4个角点坐标。确认后将图片放置到地图视口中。"}),!D&&g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:B.map((o0,X)=>g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[g.jsx("span",{style:{width:64,color:"#666",fontSize:11},children:cn[X]}),g.jsx("input",{type:"number",step:"any",value:o0[0],onChange:t0=>q(X,"lng",t0.target.value),placeholder:"经度",style:{width:72,padding:"3px 6px",border:"1px solid #d1d5db",borderRadius:3,fontSize:11,fontFamily:"monospace"}}),g.jsx("input",{type:"number",step:"any",value:o0[1],onChange:t0=>q(X,"lat",t0.target.value),placeholder:"纬度",style:{width:72,padding:"3px 6px",border:"1px solid #d1d5db",borderRadius:3,fontSize:11,fontFamily:"monospace"}})]},X))}),g.jsxs("div",{style:{fontSize:10,color:"#999",fontFamily:"monospace",lineHeight:1.6,marginTop:4},children:[D?"自动模式":"手动模式",":",B.map((o0,X)=>g.jsxs("div",{children:[cn[X],": [",o0[0].toFixed(4),", ",o0[1].toFixed(4),"]"]},X))]})]})]}),g.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,padding:"12px 20px",borderTop:"1px solid #e5e7eb"},children:[g.jsx("button",{onClick:y,style:{padding:"6px 20px",fontSize:13,border:"1px solid #d1d5db",borderRadius:5,background:"#fff",cursor:"pointer"},children:"取消"}),g.jsx("button",{onClick:J,style:{padding:"6px 20px",fontSize:13,border:"none",borderRadius:5,background:"#2563eb",color:"#fff",cursor:"pointer",fontWeight:500},children:"确认裁剪 & 开始配准"})]})]})})}class Ho{constructor(){this.entries=[]}addFile(l,u){typeof u=="string"?this.entries.push({name:l,data:new TextEncoder().encode(u)}):u instanceof Blob?this.entries.push({name:l,data:new Uint8Array(0)}):this.entries.push({name:l,data:u})}async addBlob(l,u){const f=await u.arrayBuffer();this.entries.push({name:l,data:new Uint8Array(f)})}generate(){const l=[],u=[];let f=0;for(const C of this.entries){const b=new TextEncoder().encode(C.name),k=Bo(C.data),x=C.data.length,D=new Uint8Array(30+b.length),z=new DataView(D.buffer);z.setUint32(0,67324752,!0),z.setUint16(4,20,!0),z.setUint16(6,0,!0),z.setUint16(8,0,!0),z.setUint16(10,0,!0),z.setUint16(12,0,!0),z.setUint32(14,k,!0),z.setUint32(18,x,!0),z.setUint32(22,x,!0),z.setUint16(26,b.length,!0),z.setUint16(28,0,!0),D.set(b,30),l.push(D),l.push(C.data);const B=new Uint8Array(46+b.length),H=new DataView(B.buffer);H.setUint32(0,33639248,!0),H.setUint16(4,20,!0),H.setUint16(6,20,!0),H.setUint16(8,0,!0),H.setUint16(10,0,!0),H.setUint16(12,0,!0),H.setUint16(14,0,!0),H.setUint32(16,k,!0),H.setUint32(20,x,!0),H.setUint32(24,x,!0),H.setUint16(28,b.length,!0),H.setUint16(30,0,!0),H.setUint16(32,0,!0),H.setUint16(34,0,!0),H.setUint16(36,0,!0),H.setUint32(38,0,!0),H.setUint32(42,f,!0),B.set(b,46),u.push(B),f+=D.length+C.data.length}const h=u.reduce((C,b)=>C+b.length,0),m=new Uint8Array(22),y=new DataView(m.buffer);return y.setUint32(0,101010256,!0),y.setUint16(4,0,!0),y.setUint16(6,0,!0),y.setUint16(8,this.entries.length,!0),y.setUint16(10,this.entries.length,!0),y.setUint32(12,h,!0),y.setUint32(16,f,!0),y.setUint16(20,0,!0),new Blob([...l,...u,m],{type:"application/zip"})}}const un=new Uint32Array(256);for(let s=0;s<256;s++){let l=s;for(let u=0;u<8;u++)l=l&1?3988292384^l>>>1:l>>>1;un[s]=l}function Bo(s){let l=4294967295;for(let u=0;u<s.length;u++)l=un[(l^s[u])&255]^l>>>8;return(l^4294967295)>>>0}function fn({icon:s,tip:l,onClick:u,disabled:f,direction:h}){const[m,y]=w.useState(!1),b=h==="horizontal"?{left:"50%",top:"100%",transform:"translateX(-50%)",marginTop:6}:{left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:6};return g.jsxs("div",{style:{position:"relative",display:"flex"},onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:[g.jsx("button",{className:"l7-button-control",onClick:u,disabled:f,"aria-label":l,children:g.jsx("span",{className:"material-symbols-outlined",children:s})}),m&&g.jsx("div",{style:{position:"absolute",...b,padding:"4px 8px",borderRadius:4,background:"rgba(0,0,0,0.75)",color:"#fff",fontSize:11,whiteSpace:"nowrap",pointerEvents:"none",lineHeight:1.4,zIndex:300},children:l})]})}const bt=w.forwardRef(function({position:l="topright",layout:u="vertical",corners:f,defaultCorners:h,imageSource:m,opacity:y=1,accept:C="image/*",enableCrop:b=!0,enableInitialCoords:k=!0,className:x,style:D,onCornersChange:z,onCalibrate:B,onExport:H,onImageLoad:_,onPreprocess:j,onClear:Z,onImagesChange:Q,onImageSwitch:N,onImageRename:q,onImagesReorder:J,onImageAdd:r0,onImageRemove:O},Y){const{scene:n0,mapsService:A0,positionClassName:o0,getMapContainer:X}=XA(l),t0=qA(),V=w.useRef(null),$=w.useRef(null),[e0,c0]=w.useState(null),[h0,p0]=w.useState([]),[H0,U0]=w.useState(null),[w0,g0]=w.useState(!1),[N0,D0]=w.useState(null),[_0,gA]=w.useState(null),[z0,B0]=w.useState(null),[j0,l0]=w.useState(""),F=w.useRef(h0);F.current=h0;const a0=w.useRef(H0);a0.current=H0;const U=w.useRef(new Map);w.useEffect(()=>{if(!n0)return;const K=a0.current,L=new Set;h0.forEach(F0=>{if(F0.id===K||!F0.corners||F0.phase==="idle")return;L.add(F0.id);const X0=U.current.get(F0.id);if(X0){X0.style({opacity:F0.opacity});return}try{const AA=[F0.corners[0],F0.corners[1],F0.corners[2],F0.corners[3]],uA=new EA.ImageLayer({zIndex:9,name:`__calibration_static_${F0.id}__`});uA.source(F0.thumbnailUrl,{parser:{type:"image",coordinates:AA}}),uA.style({opacity:F0.opacity}),n0.addLayer(uA),U.current.set(F0.id,uA)}catch(AA){console.error("Failed to create static layer:",AA)}}),U.current.forEach((F0,X0)=>{if(!L.has(X0)){try{n0.removeLayer(F0)}catch{}U.current.delete(X0)}})},[n0,h0,H0]),w.useEffect(()=>()=>{U.current.forEach(K=>{try{n0==null||n0.removeLayer(K)}catch{}}),U.current.clear()},[n0]);const V0=Eo({scene:n0,mapsService:A0,corners:f,defaultCorners:h,imageSource:m,opacity:y,onCornersChange:K=>{const L=a0.current;L&&(z==null||z(L,K))},onImageLoad:K=>{const L=a0.current;L&&(_==null||_(L,K))}}),{state:d0,screenPositions:L0,setImage:T0,setPhase:Z0,setOpacity:M0,startDrag:P0,clear:v0,getCorners:q0,setCorners:lA,exportImage:dA}=V0,xA=w.useRef(q0);xA.current=q0;const FA=w.useRef(d0.phase);FA.current=d0.phase;const se=w.useRef(d0.opacity);se.current=d0.opacity;const te=w.useRef(d0);te.current=d0;const re=w.useCallback((K,L)=>{p0(F0=>F0.map(X0=>X0.id===K?{...X0,...L}:X0))},[]),OA=w.useRef(d0.phase),VA=w.useRef(d0.opacity),le=w.useRef(d0.corners);H0&&(OA.current!==d0.phase||VA.current!==d0.opacity||le.current!==d0.corners)&&(OA.current=d0.phase,VA.current=d0.opacity,le.current=d0.corners,setTimeout(()=>{re(H0,{phase:d0.phase,opacity:d0.opacity,corners:d0.corners})},0));const me=w.useCallback(()=>{const K=a0.current;K&&p0(L=>L.map(F0=>F0.id!==K?F0:{...F0,corners:xA.current(),phase:FA.current,opacity:se.current}))},[]),xe=w.useCallback(()=>{const K=q0();if(K){Z0("confirmed");const L=a0.current;B==null||B(L??"",{corners:K,extent:an(K)})}},[q0,Z0,B]),Ke=w.useCallback(()=>{Z0("calibrating")},[Z0]),Ft=w.useCallback(K=>{const L=Number(K.target.value);M0(L);const F0=a0.current;F0&&re(F0,{opacity:L})},[M0,re]),N1=w.useCallback(()=>{if(!A0||te.current.phase==="idle")return;const K=A0.getBounds();if(!K)return;const[[L,F0],[X0,AA]]=K,uA=(X0-L)*.1,kA=(AA-F0)*.1,pe=[[L+uA,AA-kA],[X0-uA,AA-kA],[X0-uA,F0+kA],[L+uA,F0+kA]];lA(pe)},[A0,lA]),k0=w.useCallback(K=>{const L=F.current.find(X0=>X0.id===K);if(!(L!=null&&L.corners)||!A0)return;const F0=an(L.corners);A0.fitBounds([[F0[0],F0[1]],[F0[2],F0[3]]])},[A0]),[Nt,f1]=w.useState(!1),[jA,Oe]=w.useState({outputWidth:0,outputHeight:0,cols:1,rows:1}),[zA,Re]=w.useState(null),[d1,h1]=w.useState(!1),Ee=w.useCallback(()=>{const K=te.current.imageDimensions;Oe({outputWidth:(K==null?void 0:K.width)||1024,outputHeight:(K==null?void 0:K.height)||1024,cols:1,rows:1}),Re(null),f1(!0)},[]),p1=w.useCallback(async()=>{h1(!0);try{const K=await dA(jA);Re(K)}catch(K){console.error("Export failed:",K)}h1(!1)},[dA,jA]),ze=w.useCallback(async()=>{if(!zA)return;const K=new Ho;for(const uA of zA.tiles)await K.addBlob(`tile_${uA.row}_${uA.col}.png`,uA.blob);K.addFile("tiles.json",JSON.stringify({extent:zA.extent,outputWidth:zA.outputWidth,outputHeight:zA.outputHeight,tiles:zA.tiles.map(uA=>({file:`tile_${uA.row}_${uA.col}.png`,row:uA.row,col:uA.col,width:uA.width,height:uA.height,extent:uA.extent,corners:uA.corners}))},null,2));const L=K.generate(),F0=URL.createObjectURL(L),X0=document.createElement("a");X0.href=F0,X0.download="calibrated-tiles.zip",X0.click(),URL.revokeObjectURL(F0);const AA=a0.current;H==null||H(AA??"",zA)},[zA,H]),f0=w.useCallback(()=>{zA&&(URL.revokeObjectURL(zA.previewUrl),zA.tiles.forEach(K=>URL.revokeObjectURL(K.previewUrl))),Re(null),f1(!1)},[zA]),m0=w.useCallback(()=>{me();const K=a0.current;v0(),K&&(re(K,{phase:"idle",corners:null}),Z==null||Z(K))},[me,v0,re,Z]),I0=w.useCallback((K,L=!1)=>{me();const F0=U.current.get(K.id);if(F0&&n0){try{n0.removeLayer(F0)}catch{}U.current.delete(K.id)}p0(X0=>X0.find(uA=>uA.id===K.id)?X0:(L&&(r0==null||r0(K)),[...X0,K])),U0(K.id),N==null||N(K.id),setTimeout(()=>{Q==null||Q(F.current)},0),v0(),setTimeout(()=>{K.corners?T0(K.source,K.corners):T0(K.source)},50)},[me,v0,T0,N,Q,r0,n0]),y0=w.useCallback(K=>{if(K===a0.current)return;const L=F.current.find(F0=>F0.id===K);L&&I0(L)},[I0]),t=w.useCallback(K=>{var AA,uA;const L=F.current.find(kA=>kA.id===K);L&&((AA=L.revokeUrl)==null||AA.call(L),(uA=L.croppedRevokeUrl)==null||uA.call(L));const F0=U.current.get(K);if(F0&&n0){try{n0.removeLayer(F0)}catch{}U.current.delete(K)}const X0=F.current.filter(kA=>kA.id!==K);p0(X0),Q==null||Q(X0),O==null||O(K),K===a0.current&&(X0.length>0?I0(X0[0]):(U0(null),v0(),Z==null||Z(K)))},[v0,I0,Z,Q,O,n0]),M=w.useRef({opacity:K=>{D0(L=>L===K?null:K)},"place-to-view":()=>{N1()},"scale-to":K=>{k0(K)},calibrate:()=>{xe()},"re-edit":()=>{Ke()},export:()=>{Ee()},delete:K=>{t(K)}});M.current={opacity:K=>{D0(L=>L===K?null:K)},"place-to-view":()=>{N1()},"scale-to":K=>{k0(K)},calibrate:()=>{xe()},"re-edit":()=>{Ke()},export:()=>{Ee()},delete:K=>{t(K)}};const hA=w.useCallback((K,L)=>{if(K!==a0.current){y0(K),setTimeout(()=>{M.current[L](K)},150);return}M.current[L](K)},[y0]),CA=w.useCallback((K,L)=>{gA(K),l0(L)},[]),BA=w.useCallback(K=>{const L=F.current.find(AA=>AA.id===K),F0=j0.trim();if(!F0||!L||F0===L.name){gA(null);return}const X0=L.name;p0(AA=>AA.map(uA=>uA.id===K?{...uA,name:F0}:uA)),q==null||q(K,X0,F0),gA(null)},[j0,q]),aA=w.useCallback(()=>{gA(null)},[]),yA=w.useCallback((K,L)=>{K.dataTransfer.effectAllowed="move",K.dataTransfer.setData("text/plain",L),K.currentTarget.style.opacity="0.4"},[]),Ce=w.useCallback((K,L)=>{K.preventDefault(),K.dataTransfer.dropEffect="move",B0(L)},[]),mA=w.useCallback(()=>{B0(null)},[]),cA=w.useCallback((K,L)=>{K.preventDefault();const F0=K.dataTransfer.getData("text/plain");if(!F0||F0===L){B0(null);return}p0(X0=>{const AA=X0.findIndex(ae=>ae.id===F0),uA=X0.findIndex(ae=>ae.id===L);if(AA===-1||uA===-1)return X0;const kA=[...X0],[pe]=kA.splice(AA,1);return kA.splice(uA,0,pe),kA}),B0(null),setTimeout(()=>{J==null||J(F.current)},0)},[J]),JA=w.useCallback(K=>{K.currentTarget.style.opacity="1",B0(null)},[]),A1=w.useCallback(async K=>{var F0;const L=(F0=K.target.files)==null?void 0:F0[0];if(L)if(K.target.value="",b||k)try{const X0=await vt(L);de({url:X0.url,dimensions:{width:X0.width,height:X0.height},revokeUrl:X0.revokeUrl??null,file:L})}catch(X0){console.error("Failed to load image for crop:",X0)}else{const X0=URL.createObjectURL(L),AA={id:`calib-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,name:L.name,source:L,thumbnailUrl:X0,dimensions:null,phase:"idle",corners:null,opacity:y,revokeUrl:null,croppedRevokeUrl:null};I0(AA,!0)}},[b,k,y,I0]),Zt=w.useCallback(async K=>{var X0,AA,uA;const L=(X0=K.target.files)==null?void 0:X0[0];if(!L||!e0)return;K.target.value="";const F0=F.current.find(kA=>kA.id===e0);if(F0&&((AA=F0.revokeUrl)==null||AA.call(F0),(uA=F0.croppedRevokeUrl)==null||uA.call(F0)),b||k)try{const kA=await vt(L);de({url:kA.url,dimensions:{width:kA.width,height:kA.height},revokeUrl:kA.revokeUrl??null,file:L}),Ue(!0)}catch(kA){console.error("Failed to load image for crop:",kA)}else{const kA=URL.createObjectURL(L),pe={id:e0,name:L.name,source:L,thumbnailUrl:kA,dimensions:null,phase:"idle",corners:null,opacity:y,revokeUrl:null,croppedRevokeUrl:null};p0(ae=>ae.map(Se=>Se.id===e0?pe:Se)),I0(pe),c0(null)}},[e0,b,k,y,I0]),g1=w.useCallback(K=>{var L;c0(K),(L=$.current)==null||L.click()},[]),[vA,de]=w.useState(null),[WA,Ue]=w.useState(!1),Qt=w.useCallback(async(K,L)=>{var AA;if(!vA)return;const F0=vA.file,X0=URL.createObjectURL(F0);try{const uA=K.x!==0||K.y!==0||K.width!==vA.dimensions.width||K.height!==vA.dimensions.height;let kA=null,pe=F0,ae=vA.dimensions;if(uA){const be=await Co(vA.url,K);(AA=vA.revokeUrl)==null||AA.call(vA),kA=be.revokeUrl,pe=be.url,ae={width:be.width,height:be.height},j==null||j(a0.current??"",{croppedDimensions:ae,initialCorners:L})}const Se={id:WA&&e0?e0:`calib-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,name:F0.name,source:pe,thumbnailUrl:X0,dimensions:ae,phase:"calibrating",corners:L??null,opacity:y,revokeUrl:null,croppedRevokeUrl:kA};WA&&e0&&(p0(be=>be.map(ne=>ne.id===e0?Se:ne)),c0(null)),I0(Se,!WA)}catch(uA){console.error("Crop/setImage failed:",uA)}de(null),Ue(!1)},[vA,WA,e0,y,I0,j]),he=w.useCallback(()=>{var K;vA&&((K=vA.revokeUrl)==null||K.call(vA),de(null)),Ue(!1),c0(null)},[vA]),nA=X(),S=d0.phase!=="idle"&&L0&&nA?Pe.createPortal(g.jsx("div",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:100},children:g.jsx(So,{screenPositions:L0,draggingCorner:d0.draggingCorner,phase:d0.phase,onStartDrag:P0})}),nA):null,R0=K=>K==="idle"?"未配准":K==="calibrating"?"配准中":K==="confirmed"?"已配准":K;w.useImperativeHandle(Y,()=>({getCorners:q0,setCorners:lA,setImage:T0,exportImage:dA,clear:m0,getImages:()=>F.current,switchImage:K=>y0(K),deleteImage:K=>t(K),getActiveImageId:()=>a0.current}));const y1=u==="horizontal",m1=l==="topright"||l==="bottomright",Ot=y1?{left:m1?"auto":0,right:m1?0:"auto",top:"100%",marginTop:6}:m1?{right:"100%",top:0,marginRight:6}:{left:"100%",top:0,marginLeft:6},Z1=g.jsxs("div",{className:`l7-control l7-control--glass l7-control-image-calibration ${y1?"l7-control-image-calibration--horizontal":""} ${x??""}`,style:{position:"relative",...D},children:[g.jsx(fn,{icon:"upload",tip:"上传图片",onClick:()=>{var K;return(K=V.current)==null?void 0:K.click()},direction:u}),g.jsx(fn,{icon:"list",tip:"校准列表",onClick:()=>g0(!w0),direction:u}),w0&&g.jsxs("div",{className:"l7-control l7-control--glass",style:{position:"absolute",...Ot,padding:0,borderRadius:8,width:400,maxHeight:360,display:"flex",flexDirection:"column",zIndex:200,overflow:"hidden"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid #c2c6d8",flexShrink:0},children:[g.jsx("span",{style:{fontSize:14,fontWeight:700,color:"#191c1e"},children:"校准列表"}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[g.jsx("button",{title:"上传图片",onClick:()=>{var K;return(K=V.current)==null?void 0:K.click()},style:{width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",border:"none",borderRadius:4,background:"transparent",cursor:"pointer",color:"#0050cb",fontSize:16},children:g.jsx("span",{className:"material-symbols-outlined",children:"upload"})}),g.jsx("button",{title:"导出全部",disabled:h0.length===0,onClick:()=>{H0&&Ee()},style:{width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",border:"none",borderRadius:4,background:"transparent",cursor:"pointer",color:"#0050cb",fontSize:16,opacity:h0.length===0?.35:1},children:g.jsx("span",{className:"material-symbols-outlined",children:"download"})})]})]}),g.jsxs("div",{style:{padding:"12px",overflowY:"auto",flex:1,display:"flex",flexDirection:"column",gap:8},children:[h0.length===0&&g.jsx("div",{style:{fontSize:12,color:"#999",textAlign:"center",padding:"20px 0"},children:"暂无校准图片,请先上传"}),h0.map(K=>{const L=K.id===H0,F0=K.phase==="idle",X0=K.phase==="confirmed";return g.jsxs("div",{draggable:!0,className:`l7-calibration-list-item ${L?"l7-calibration-list-item--active":""} ${z0===K.id?"l7-calibration-list-item--drag-over":""}`,onClick:()=>y0(K.id),onDragStart:AA=>yA(AA,K.id),onDragOver:AA=>Ce(AA,K.id),onDragLeave:mA,onDrop:AA=>cA(AA,K.id),onDragEnd:JA,style:{cursor:"ns-resize"},children:[g.jsxs("div",{className:"l7-calibration-list-item__thumbnail",children:[g.jsx("img",{src:K.thumbnailUrl,alt:K.name}),g.jsx("div",{className:"l7-calibration-list-item__thumbnail-overlay",onClick:AA=>{AA.stopPropagation(),g1(K.id)},children:g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18,color:"#fff"},children:"swap_horiz"})})]}),g.jsxs("div",{className:"l7-calibration-list-item__info",children:[_0===K.id?g.jsx("input",{value:j0,onChange:AA=>l0(AA.target.value),onBlur:()=>BA(K.id),onKeyDown:AA=>{AA.key==="Enter"&&BA(K.id),AA.key==="Escape"&&aA()},onClick:AA=>AA.stopPropagation(),autoFocus:!0,style:{width:"100%",fontSize:13,fontWeight:600,padding:"2px 4px",border:"1px solid #0066ff",borderRadius:3,outline:"none"}}):g.jsxs("div",{className:"l7-calibration-list-item__name-row",children:[g.jsx("span",{className:"l7-calibration-list-item__name",title:K.name,children:K.name}),g.jsx("button",{className:"l7-calibration-list-item__rename-btn",title:"编辑名称",onClick:AA=>{AA.stopPropagation(),CA(K.id,K.name)},children:g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:12},children:"edit"})})]}),g.jsx("div",{className:"l7-calibration-list-item__phase",children:R0(K.phase)}),N0===K.id&&L&&!F0&&g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,marginTop:4,fontSize:10},onClick:AA=>AA.stopPropagation(),children:[g.jsx("input",{type:"range",min:"0",max:"1",step:"0.05",value:K.opacity,onChange:Ft,style:{flex:1,height:3,maxWidth:80}}),g.jsxs("span",{style:{minWidth:24,textAlign:"right",color:"#666"},children:[Math.round(K.opacity*100),"%"]})]})]}),g.jsxs("div",{className:"l7-calibration-list-item__actions",onClick:AA=>AA.stopPropagation(),children:[g.jsx("button",{className:"l7-calibration-list-item__action-btn",title:"透明度",disabled:F0,onClick:()=>hA(K.id,"opacity"),children:g.jsx("span",{className:"material-symbols-outlined",children:"opacity"})}),g.jsx("button",{className:"l7-calibration-list-item__action-btn",title:"放置到当前位置",disabled:F0,onClick:()=>hA(K.id,"place-to-view"),children:g.jsx("span",{className:"material-symbols-outlined",children:"filter_center_focus"})}),g.jsx("button",{className:"l7-calibration-list-item__action-btn",title:"缩放到图片范围",disabled:F0||!K.corners,onClick:()=>hA(K.id,"scale-to"),children:g.jsx("span",{className:"material-symbols-outlined",children:"zoom_in"})}),g.jsx("button",{className:"l7-calibration-list-item__action-btn",title:X0?"重新校准":"确认配准",disabled:F0,onClick:()=>hA(K.id,X0?"re-edit":"calibrate"),children:g.jsx("span",{className:"material-symbols-outlined",children:X0?"edit":"my_location"})}),g.jsx("button",{className:"l7-calibration-list-item__action-btn",title:"导出",disabled:F0,onClick:()=>hA(K.id,"export"),children:g.jsx("span",{className:"material-symbols-outlined",children:"download"})}),g.jsx("button",{className:"l7-calibration-list-item__action-btn l7-calibration-list-item__action-btn--danger",title:"删除",onClick:()=>hA(K.id,"delete"),children:g.jsx("span",{className:"material-symbols-outlined",children:"delete"})})]})]},K.id)})]})]}),g.jsx("input",{ref:V,type:"file",accept:C,onChange:A1,style:{display:"none"}}),g.jsx("input",{ref:$,type:"file",accept:C,onChange:Zt,style:{display:"none"}}),S,vA&&(b||k)&&Pe.createPortal(g.jsx(Do,{imageUrl:vA.url,imageDimensions:vA.dimensions,mapCenter:A0?[A0.getCenter().lng,A0.getCenter().lat]:null,mapZoom:A0?A0.getZoom():null,showInitialCoords:k,onConfirm:Qt,onCancel:he}),document.body),Nt&&Pe.createPortal(g.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.5)"},onClick:f0,children:g.jsxs("div",{style:{background:"#fff",borderRadius:8,padding:20,width:520,maxHeight:"85vh",overflow:"auto",boxShadow:"0 8px 32px rgba(0,0,0,0.25)"},onClick:K=>K.stopPropagation(),children:[g.jsx("div",{style:{fontSize:15,fontWeight:600,marginBottom:16},children:"导出配准图片"}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 16px",marginBottom:12,fontSize:12},children:[g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["宽度(px)",g.jsx("input",{type:"number",value:jA.outputWidth,min:64,max:8192,onChange:K=>Oe(L=>({...L,outputWidth:+K.target.value||1024})),style:{width:72,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]}),g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["高度(px)",g.jsx("input",{type:"number",value:jA.outputHeight,min:64,max:8192,onChange:K=>Oe(L=>({...L,outputHeight:+K.target.value||1024})),style:{width:72,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]}),g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["切片列数",g.jsx("input",{type:"number",value:jA.cols,min:1,max:20,onChange:K=>Oe(L=>({...L,cols:Math.max(1,+K.target.value||1)})),style:{width:48,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]}),g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["切片行数",g.jsx("input",{type:"number",value:jA.rows,min:1,max:20,onChange:K=>Oe(L=>({...L,rows:Math.max(1,+K.target.value||1)})),style:{width:48,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]})]}),g.jsx("button",{onClick:p1,disabled:d1,style:{padding:"6px 16px",fontSize:12,border:"none",borderRadius:4,background:"#2563eb",color:"#fff",cursor:"pointer",marginBottom:12},children:d1?"生成中...":"生成预览"}),zA&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{style:{position:"relative",marginBottom:12,border:"1px solid #e5e7eb",borderRadius:4,overflow:"hidden"},children:[g.jsx("img",{src:zA.previewUrl,style:{width:"100%",display:"block"}}),(jA.cols>1||jA.rows>1)&&g.jsxs("svg",{style:{position:"absolute",inset:0,width:"100%",height:"100%",pointerEvents:"none"},children:[Array.from({length:jA.cols-1},(K,L)=>g.jsx("line",{x1:`${(L+1)/jA.cols*100}%`,y1:"0",x2:`${(L+1)/jA.cols*100}%`,y2:"100%",stroke:"#f59e0b",strokeWidth:"1",strokeDasharray:"4 2"},`c${L}`)),Array.from({length:jA.rows-1},(K,L)=>g.jsx("line",{x1:"0",y1:`${(L+1)/jA.rows*100}%`,x2:"100%",y2:`${(L+1)/jA.rows*100}%`,stroke:"#f59e0b",strokeWidth:"1",strokeDasharray:"4 2"},`r${L}`))]})]}),g.jsxs("div",{style:{fontSize:11,color:"#666",fontFamily:"monospace",marginBottom:12,maxHeight:160,overflow:"auto"},children:[g.jsxs("div",{style:{marginBottom:4,fontWeight:600,color:"#333"},children:["总计 ",zA.tiles.length," 个切片 | ",zA.outputWidth,"×",zA.outputHeight,"px"]}),g.jsxs("div",{style:{marginBottom:4},children:["Extent: [",zA.extent.map(K=>K.toFixed(5)).join(", "),"]"]}),zA.tiles.map(K=>g.jsxs("div",{style:{padding:"2px 0",borderBottom:"1px solid #f3f4f6"},children:["tile_",K.row,"_",K.col,".png (",K.width,"×",K.height,") — [",K.extent.map(L=>L.toFixed(5)).join(", "),"]"]},`${K.row}_${K.col}`))]}),g.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[g.jsx("button",{onClick:f0,style:{padding:"6px 16px",fontSize:12,border:"1px solid #d1d5db",borderRadius:4,background:"#fff",cursor:"pointer"},children:"取消"}),g.jsxs("button",{onClick:ze,style:{padding:"6px 16px",fontSize:12,border:"none",borderRadius:4,background:"#2563eb",color:"#fff",cursor:"pointer"},children:["打包下载 ZIP(",zA.tiles.length," 张 + 坐标JSON)"]})]})]}),!zA&&g.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:g.jsx("button",{onClick:f0,style:{padding:"6px 16px",fontSize:12,border:"1px solid #d1d5db",borderRadius:4,background:"#fff",cursor:"pointer"},children:"取消"})})]})}),document.body)]});return!n0||!A0?null:t0?Z1:g.jsx("div",{className:`l7-control-anchor ${o0}`,children:Z1})});UA.mark(bt);function dn({controls:s,layers:l,onLayerToggle:u,containerRef:f}){const h=DA();return g.jsx(it,{children:s.map((m,y)=>g.jsx(Vo,{control:m,layers:l,onLayerToggle:u,scene:h,containerRef:f},`${m.type}-${y}`))})}function Vo({control:s,layers:l,onLayerToggle:u,scene:f,containerRef:h}){var y,C,b,k,x,D,z,B,H;const m=s.position??void 0;switch(s.type){case"zoom":return g.jsx(ot,{position:m??"bottomright"});case"scale":return g.jsx(lt,{position:m??"bottomleft",maxWidth:(y=s.options)==null?void 0:y.maxWidth,metric:((C=s.options)==null?void 0:C.unit)!=="imperial",imperial:((b=s.options)==null?void 0:b.unit)==="imperial"});case"fullscreen":return g.jsx(at,{position:m??"topright",container:h==null?void 0:h.current});case"geoLocate":return g.jsx(ct,{position:m??"topright"});case"mapTheme":return g.jsx(ht,{position:m??"topright"});case"mouseLocation":return g.jsx(pt,{position:m??"bottomleft",precision:(k=s.options)==null?void 0:k.precision});case"exportImage":return g.jsx(gt,{position:m??"topright",format:(x=s.options)==null?void 0:x.format});case"layerSwitch":return g.jsx(yt,{position:m??"topright",layers:l.map((_,j)=>({id:_.id??`layer-${j}`,name:_.name,visible:_.visible})),onToggle:u??(()=>{})});case"draw":return g.jsx(Ct,{position:m??"topright",modes:(D=s.options)==null?void 0:D.modes,showDelete:(z=s.options)==null?void 0:z.showDelete});case"imageCalibration":return g.jsx(bt,{position:m??"topright",opacity:(B=s.options)==null?void 0:B.opacity,imageSource:(H=s.options)==null?void 0:H.imageSource});default:return null}}const ke={aerialway:"M13,5H8V2.6c0.1854-0.1047,0.3325-0.2659,0.42-0.46L13.5,1.5C13.7761,1.5,14,1.2761,14,1s-0.2239-0.5-0.5-0.5L8.28,1.15 C8.0954,0.9037,7.8077,0.7562,7.5,0.75C7.0963,0.752,6.7334,0.9966,6.58,1.37L1.5,2C1.2239,2,1,2.2239,1,2.5S1.2239,3,1.5,3 l5.22-0.65C6.7967,2.4503,6.8917,2.5351,7,2.6V5H2C1.4477,5,1,5.4477,1,6v7c0,0.5523,0.4477,1,1,1h11c0.5523,0,1-0.4477,1-1V6 C14,5.4477,13.5523,5,13,5z M7,11H3V7h4V11z M12,11H8V7h4V11z",airfield:"M6.8182,0.6818H4.7727 C4.0909,0.6818,4.0909,0,4.7727,0h5.4545c0.6818,0,0.6818,0.6818,0,0.6818H8.1818c0,0,0.8182,0.5909,0.8182,1.9545V4h6v2L9,8l-0.5,5 l2.5,1.3182V15H4v-0.6818L6.5,13L6,8L0,6V4h6V2.6364C6,1.2727,6.8182,0.6818,6.8182,0.6818z",airport:"M15,6.8182L15,8.5l-6.5-1 l-0.3182,4.7727L11,14v1l-3.5-0.6818L4,15v-1l2.8182-1.7273L6.5,7.5L0,8.5V6.8182L6.5,4.5v-3c0,0,0-1.5,1-1.5s1,1.5,1,1.5v2.8182 L15,6.8182z","alcohol-shop":"M14,4h-4v3.44l0,0c0,0,0,0,0,0.06c0.003,0.9096,0.6193,1.7026,1.5,1.93V13H11c-0.2761,0-0.5,0.2239-0.5,0.5 S10.7239,14,11,14h2c0.2761,0,0.5-0.2239,0.5-0.5S13.2761,13,13,13h-0.5V9.43c0.8807-0.2274,1.497-1.0204,1.5-1.93c0,0,0,0,0-0.06 l0,0V4z M13,7.5c0,0.5523-0.4477,1-1,1s-1-0.4477-1-1V5h2V7.5z M5.5,2.5V2C5.7761,2,6,1.7761,6,1.5S5.7761,1,5.5,1V0.5 C5.5,0.2239,5.2761,0,5,0H4C3.7239,0,3.5,0.2239,3.5,0.5V1C3.2239,1,3,1.2239,3,1.5S3.2239,2,3.5,2v0.5C3.5,3.93,1,5.57,1,7v6 c0,0.5523,0.4477,1,1,1h5c0.5318-0.0465,0.9535-0.4682,1-1V7C8,5.65,5.5,3.85,5.5,2.5z M4.5,12C3.1193,12,2,10.8807,2,9.5 S3.1193,7,4.5,7S7,8.1193,7,9.5S5.8807,12,4.5,12z","american-football":"M7.53,3C3.09,3,1,7.5,1,7.5S3.09,12,7.53,12S14,7.5,14,7.5S12,3,7.53,3z M11,7v1.5C11,8.7761,10.7761,9,10.5,9 S10,8.7761,10,8.5V8H8v0.5C8,8.7761,7.7761,9,7.5,9S7,8.7761,7,8.5V8H5v0.5C5,8.7761,4.7761,9,4.5,9S4,8.7761,4,8.5v-2 C4,6.2239,4.2239,6,4.5,6S5,6.2239,5,6.5V7h2V6.5C7,6.2239,7.2239,6,7.5,6S8,6.2239,8,6.5V7h2V6.5C10,6.2239,10.2239,6,10.5,6 S11,6.2239,11,6.5V7z","amusement-park":"M13.5 7C13.5 9.02798 12.4939 10.821 10.9535 11.907L12 13.9999H3L4.04645 11.907C2.50613 10.821 1.5 9.02798 1.5 7C1.5 3.68629 4.18629 1 7.5 1C10.8137 1 13.5 3.68629 13.5 7ZM12.2984 7.125H8.99487C8.96844 7.4453 8.84138 7.73706 8.64538 7.96861L10.9814 10.3046C11.7719 9.47202 12.2669 8.35614 12.2984 7.125ZM10.8046 10.4814L8.46861 8.14538C8.33136 8.26156 8.17296 8.35351 8 8.41465V11.7743C9.08206 11.6623 10.0574 11.1908 10.8046 10.4814ZM6.00513 7.125H2.7016C2.73307 8.35614 3.2281 9.47202 4.01864 10.3046L6.35462 7.96861C6.15862 7.73706 6.03156 7.4453 6.00513 7.125ZM4.19542 10.4814C4.94259 11.1908 5.91794 11.6623 7 11.7743V8.41465C6.82704 8.35351 6.66864 8.26156 6.53139 8.14538L4.19542 10.4814ZM12.2984 6.875C12.2669 5.64386 11.7719 4.52798 10.9814 3.69542L8.64538 6.03139C8.84138 6.26294 8.96844 6.5547 8.99487 6.875H12.2984ZM10.8046 3.51864C9.97202 2.7281 8.85614 2.23307 7.625 2.2016V5.50513C7.9453 5.53156 8.23706 5.65862 8.46861 5.85462L10.8046 3.51864ZM7.375 5.50513V2.2016C6.14386 2.23307 5.02798 2.7281 4.19542 3.51864L6.53139 5.85462C6.76294 5.65862 7.0547 5.53156 7.375 5.50513ZM6.35462 6.03139L4.01864 3.69542C3.2281 4.52798 2.73307 5.64386 2.7016 6.875H6.00513C6.03156 6.5547 6.15862 6.26294 6.35462 6.03139Z","animal-shelter":"M 7.528,0.895 9,2 h 1 L 11.473,0.896 C 11.689502,0.73373378 12,0.8884387 12,1.159 V 4.5 c 0,0.722 -0.522,1.184 -1,1.573 V 10 l 0.8,2.4 0.706,0.353 c 0.302922,0.151551 0.494181,0.461283 0.494,0.8 C 13,13.8 12.8,14 12.553,14 H 4.25 C 3.017,14 2,13 2,11.713 2,9.5424588 2.4530836,7.9300225 2.745,6.845 2.8910836,6.3020225 3.0352907,5.8946079 3.138,5.614 3.1956028,5.4566256 3.253276,5.3110749 3.33,5.165 3.7788405,4.3104525 5.0743666,4.9556117 4.672,5.833 4.6232251,5.9393571 4.5778358,6.0512046 4.539,6.15 4.4477518,6.3821288 4.325004,6.7430011 4.193,7.234 3.947004,8.1490011 3.674,9.521 3.558,11.367 3.926,9.307 5.98,7.239 7.635,5.758 7.29,5.432 7.001,5.038 7.001,4.5 l 0,-3.342 c 0,-0.2705613 0.3106215,-0.42543084 0.527,-0.263 z",aquarium:"M1.13505 8.57743C1.98919 6.14741 4.72075 2 10 2C12.6518 2 14 3 14 3C14 3 11.6865 3 10.6203 3.44512C10.54 3.47864 10.4747 3.53744 10.4329 3.61375C10.2432 3.95995 9.75252 5.04744 10.3231 6.19506C10.4172 6.38427 10.6364 6.46548 10.8383 6.40312C11.3474 6.24589 12.3301 5.89727 13.0761 5.35729C13.2973 5.1972 13.615 5.25773 13.6797 5.52298C13.9401 6.59045 13.9401 8.40955 13.6797 9.47702C13.615 9.74227 13.2973 9.8028 13.0761 9.64271C12.3301 9.10273 11.3474 8.75411 10.8383 8.59688C10.6364 8.53452 10.4172 8.61573 10.3231 8.80494C9.75252 9.95256 10.2432 11.04 10.4329 11.3863C10.4747 11.4626 10.54 11.5214 10.6203 11.5549C11.6865 12 14 12 14 12C13.5 12.3333 11.8 13 9.00001 13C4.51722 13 2.02736 10.3427 1.25972 9.35985C1.08546 9.13673 1.04117 8.84452 1.13505 8.57743ZM5.00001 9C5.69037 9 6.25001 8.44036 6.25001 7.75C6.25001 7.05964 5.69037 6.5 5.00001 6.5C4.30966 6.5 3.75001 7.05964 3.75001 7.75C3.75001 8.44036 4.30966 9 5.00001 9Z",arrow:"M8.29289 2.29289C8.68342 1.90237 9.31658 1.90237 9.70711 2.29289L14.2071 6.79289C14.5976 7.18342 14.5976 7.81658 14.2071 8.20711L9.70711 12.7071C9.31658 13.0976 8.68342 13.0976 8.29289 12.7071C7.90237 12.3166 7.90237 11.6834 8.29289 11.2929L11 8.5H1.5C0.947715 8.5 0.5 8.05228 0.5 7.5C0.5 6.94772 0.947715 6.5 1.5 6.5H11L8.29289 3.70711C7.90237 3.31658 7.90237 2.68342 8.29289 2.29289Z","art-gallery":"m10.71 3-2.86-2.849996c-.1945-.1960996-.511-.1973996-.7071-.0029-.001.001-.0019.0019-.0029.0029l-2.85 2.849996h-2.79c-.2761 0-.5.2239-.5.5v9c0 .2761.2239.5.5.5h12c.2761 0 .5-.2239.5-.5v-9c0-.2761-.2239-.5-.5-.5zm-3.21-1.79 1.79 1.79h-3.58zm5.5 10.79h-11v-8h11zm-8-5c-.5523 0-1-.4477-1-1s.4477-1 1-1 1 .4477 1 1-.4477 1-1 1zm7 4h-7.5l1.5-3 1.25 2.5 2.25-4.5z",attraction:"M6,2C5.446,2,5.2478,2.5045,5,3L4.5,4h-2C1.669,4,1,4.669,1,5.5v5C1,11.331,1.669,12,2.5,12h10 c0.831,0,1.5-0.669,1.5-1.5v-5C14,4.669,13.331,4,12.5,4h-2L10,3C9.75,2.5,9.554,2,9,2H6z M2.5,5C2.7761,5,3,5.2239,3,5.5 S2.7761,6,2.5,6S2,5.7761,2,5.5S2.2239,5,2.5,5z M7.5,5c1.6569,0,3,1.3431,3,3s-1.3431,3-3,3s-3-1.3431-3-3S5.8431,5,7.5,5z M7.5,6.5C6.6716,6.5,6,7.1716,6,8l0,0c0,0.8284,0.6716,1.5,1.5,1.5l0,0C8.3284,9.5,9,8.8284,9,8l0,0C9,7.1716,8.3284,6.5,7.5,6.5 L7.5,6.5z",bakery:"M5.294,4.382,6,9.5a.979.979,0,0,0,1,1H8a.979.979,0,0,0,1-1l.706-5.118C9.706,3,7.5,3,7.5,3S5.291,3,5.294,4.382ZM3.5,5C2,5,2,6,2,6l1,4H4.5a.793.793,0,0,0,.794-.765L4.5,5Zm-2,2.5a1.533,1.533,0,0,0-1.059.412A1.366,1.366,0,0,0,0,8.794V11H.882A1.02,1.02,0,0,0,2,10ZM11.5,5C13,5,13,6,13,6l-1,4H10.5a.793.793,0,0,1-.794-.765L10.5,5Zm2,2.5a1.533,1.533,0,0,1,1.059.412A1.366,1.366,0,0,1,15,8.794V11h-.882A1.02,1.02,0,0,1,13,10Z",bank:"M1,3C0.446,3,0,3.446,0,4v7c0,0.554,0.446,1,1,1h13c0.554,0,1-0.446,1-1V4c0-0.554-0.446-1-1-1H1z M1,4h1.5 C2.7761,4,3,4.2239,3,4.5S2.7761,5,2.5,5S2,4.7761,2,4.5L1.5,5C1.7761,5,2,5.2239,2,5.5S1.7761,6,1.5,6S1,5.7761,1,5.5V4z M7.5,4 C8.8807,4,10,5.567,10,7.5l0,0C10,9.433,8.8807,11,7.5,11S5,9.433,5,7.5S6.1193,4,7.5,4z M12.5,4H14v1.5C14,5.7761,13.7761,6,13.5,6 S13,5.7761,13,5.5S13.2239,5,13.5,5L13,4.5C13,4.7761,12.7761,5,12.5,5S12,4.7761,12,4.5S12.2239,4,12.5,4z M7.5,5.5 c-0.323,0-0.5336,0.1088-0.6816,0.25h1.3633C8.0336,5.6088,7.823,5.5,7.5,5.5z M6.625,6C6.5795,6.091,6.5633,6.1711,6.5449,6.25 h1.9102C8.4367,6.1711,8.4205,6.091,8.375,6H6.625z M6.5,6.5v0.25h2V6.5H6.5z M6.5,7v0.25h2V7H6.5z M6.5,7.5v0.25h2V7.5H6.5z M6.5,8 L6.25,8.25h2L8.5,8H6.5z M6,8.5c0,0,0.0353,0.1024,0.1016,0.25H8.375L8,8.5H6z M1.5,9C1.7761,9,2,9.2239,2,9.5S1.7761,10,1.5,10 L2,10.5C2,10.2239,2.2239,10,2.5,10S3,10.2239,3,10.5S2.7761,11,2.5,11H1V9.5C1,9.2239,1.2239,9,1.5,9z M6.2383,9 C6.2842,9.0856,6.3144,9.159,6.375,9.25h2.2676C8.7092,9.1121,8.75,9,8.75,9H6.2383z M13.5,9C13.7761,9,14,9.2239,14,9.5V11h-1.5 c-0.2761,0-0.5-0.2239-0.5-0.5s0.2239-0.5,0.5-0.5s0.5,0.2239,0.5,0.5l0.5-0.5C13.2239,10,13,9.7761,13,9.5S13.2239,9,13.5,9z M6.5664,9.5c0.0786,0.0912,0.1647,0.1763,0.2598,0.25h1.4199C8.3462,9.6727,8.4338,9.5883,8.5,9.5H6.5664z","bank-JP":"M12.2808,3.3763l-2.9,3.625H11.25a.75.75,0,0,1,0,1.5H8.5v1h2.75a.75.75,0,0,1,0,1.5H8.5v1.25a1,1,0,0,1-2,0v-1.25H3.75a.75.75,0,1,1,0-1.5H6.5v-1H3.75a.75.75,0,0,1,0-1.5H5.6193l-2.9-3.625A1,1,0,0,1,4.2771,2.1216l.0037.0047L7.5,6.15l3.2192-4.024a1,1,0,0,1,1.5653,1.2453Z",bar:"M7.5,1c-2,0-7,0.25-6.5,0.75L7,8v4 c0,1-3,0.5-3,2h7c0-1.5-3-1-3-2V8l6-6.25C14.5,1.25,9.5,1,7.5,1z M7.5,2c2.5,0,4.75,0.25,4.75,0.25L11.5,3h-8L2.75,2.25 C2.75,2.25,5,2,7.5,2z",barrier:"m13 2h-11c-.26522 0-.51957.10536-.70711.29289-.18753.18754-.29289.44189-.29289.70711v6c0 .26522.10536.51957.29289.70711.18754.18753.44189.29289.70711.29289h1v2.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-.5h7v.5c0 .1326.0527.2598.1464.3536.0938.0937.221.1464.3536.1464s.2598-.0527.3536-.1464c.0937-.0938.1464-.221.1464-.3536v-2.5h1c.2652 0 .5196-.10536.7071-.29289.1875-.18754.2929-.44189.2929-.70711v-6c0-.26522-.1054-.51957-.2929-.70711-.1875-.18753-.4419-.29289-.7071-.29289zm0 1v2l-2-2zm-3.5 0 3.5 3.5v2.5l-6-6zm-4 6-3.5-3.5v-2.5l6 6zm-3.5 0v-2l2 2zm9 2h-7v-1h7zm-.207-2h-1.293l-6-6h2l6 6z",baseball:"m9.00003 3.5c0 .8284-.6716 1.5-1.5 1.5s-1.5-.6716-1.5-1.5.6716-1.5 1.5-1.5 1.5.6716 1.5 1.5zm-3-3.22c0-.1546-.1254-.28-.28-.28-.0979.0262-.1852.0821-.25.16l-2.47 4.43c-.0059.0431-.0059.0869 0 .13 0 .1546.1254.28.28.28.1015-.0243.1926-.0803.26-.16l2.46-4.43c.006-.0431.006-.0869 0-.13zm5.89997 13.92-2.89997-7.81c-.0474-.2273-.2478-.3901-.48-.39h-5c-.2761 0-.5.2239-.5.5s.2239.5.5.5h2.48l1.45 2.51-4.27 4.61c-.1141.0932-.1802.2327-.18.38 0 .2761.2239.5.5.5.1224-.0006.2401-.047.33-.13l4.45-4.15 2.75997 4c.0895.1592.2574.2584.44.26.2796.0002.5092-.2207.52-.5-.0042-.1013-.039-.199-.1-.28z",basketball:"M3.66001 7H2.03C2.11012 6.02077 2.45969 5.05281 3.04001 4.26C3.39039 5.12432 3.59972 6.0693 3.66001 7ZM4.73501 7H7V2C5.78985 2.1061 4.72468 2.61284 3.83501 3.44C4.36491 4.54578 4.67079 5.77549 4.73501 7ZM8 2V7H10.265C10.3292 5.77549 10.6351 4.54578 11.165 3.44C10.2753 2.61284 9.21014 2.1061 8 2ZM11.96 4.26C11.6096 5.12432 11.4003 6.0693 11.34 7H12.97C12.8899 6.02077 12.5403 5.05281 11.96 4.26ZM14 8.49919C14 8.77489 13.7765 8.99838 13.5008 8.99838H11.72L10.96 10.5184V12.8984C10.9578 12.9736 10.934 13.0466 10.8915 13.1087C10.8489 13.1707 10.7894 13.2192 10.72 13.2484C10.6743 13.2607 10.6273 13.2674 10.58 13.2684C10.5312 13.2706 10.4825 13.2619 10.4375 13.2428C10.3925 13.2238 10.3524 13.195 10.32 13.1584L9.3 12.1484L7.71 13.2084C7.64698 13.2476 7.57423 13.2684 7.5 13.2684C7.42577 13.2684 7.35303 13.2476 7.29 13.2084L5.7 12.1484L4.68 13.1584C4.62956 13.211 4.56471 13.2477 4.49357 13.2637C4.42243 13.2797 4.34814 13.2744 4.28 13.2484C4.21063 13.2192 4.1511 13.1707 4.10854 13.1087C4.06599 13.0466 4.04219 12.9736 4.04 12.8984V10.5184L3.28 8.99838H1.49919C1.2235 8.99838 1 8.77489 1 8.4992C0.999998 8.2235 1.22349 8 1.49919 8H13.5008C13.7765 8 14 8.2235 14 8.49919ZM6.86 8.99838H4.12L4.75 10.2684C4.7772 10.3173 4.791 10.3725 4.79 10.4284V11.9884L5.35 11.4384L6.86 8.99838ZM8.84 11.5484L7.5 9.38838L6.16 11.5484L7.5 12.4484L8.84 11.5484ZM10.89 8.99838H8.14L9.65 11.4384L10.21 11.9884V10.4284C10.209 10.3725 10.2228 10.3173 10.25 10.2684L10.89 8.99838Z",bbq:"M9.32,7.655C10.8782,7.108,11.9471,5.6506,12,4H3c0.053,1.6299,1.0978,3.0728,2.63,3.631L4.923,9.044 c-1.3571-0.2355-2.6482,0.6737-2.8837,2.0308s0.6737,2.6482,2.0308,2.8837C4.9927,14.1187,5.9273,13.7485,6.49,13h4.223l0.335,0.717 c0.0836,0.1735,0.2594,0.2836,0.452,0.283c0.0733,0.0003,0.1457-0.0158,0.212-0.047c0.2497-0.117,0.3575-0.4141,0.241-0.664 L9.32,7.655z M4.5,12.75c-0.6904,0-1.25-0.5596-1.25-1.25s0.5596-1.25,1.25-1.25s1.25,0.5596,1.25,1.25 C5.7484,12.1897,5.1897,12.7484,4.5,12.75z M6.95,12c0.2066-1.007-0.2268-2.0374-1.091-2.594L6.6,7.923 c0.577,0.1042,1.168,0.1042,1.745,0l1.9,4.07L6.95,12z M4.75,1C4.6119,1,4.5,1.1119,4.5,1.25c0,0.5-0.5,0.5-0.5,0.5c-1,0-1,1-1,1 C3,2.8881,3.1119,3,3.25,3S3.5,2.8881,3.5,2.75c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C5,1.1119,4.8881,1,4.75,1z M6.75,1 C6.6119,1,6.5,1.1119,6.5,1.25c0,0.5-0.5,0.5-0.5,0.5c-1,0-1,1-1,1C5,2.8881,5.1119,3,5.25,3S5.5,2.8881,5.5,2.75 c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C7,1.1119,6.8881,1,6.75,1z M8.75,1C8.6119,1,8.5,1.1119,8.5,1.25c0,0.5-0.5,0.5-0.5,0.5 c-1,0-1,1-1,1C7,2.8881,7.1119,3,7.25,3S7.5,2.8881,7.5,2.75c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C9,1.1119,8.8881,1,8.75,1z M10.75,1 c-0.1381,0-0.25,0.1119-0.25,0.25c0,0.5-0.5,0.5-0.5,0.5c-1,0-1,1-1,1C9,2.8881,9.1119,3,9.25,3S9.5,2.8881,9.5,2.75 c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C11,1.1119,10.8881,1,10.75,1z M12.75,1c-0.1381,0-0.25,0.1119-0.25,0.25c0,0.5-0.5,0.5-0.5,0.5 c-1,0-1,1-1,1C11,2.8881,11.1119,3,11.25,3s0.25-0.1119,0.25-0.25c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C13,1.1119,12.8881,1,12.75,1z",beach:"M5.3608,1.67l-.01,4.02a4.4523,4.4523,0,0,0-1.1-.11c-.37.1-.74.63-1.1.76A4.2019,4.2019,0,0,1,5.3608,1.67Zm2.41-.64,2.03,3.45a3.1832,3.1832,0,0,1,.84-.61c.36-.1.94.17,1.34.11A4.2018,4.2018,0,0,0,7.7708,1.03ZM1.0008,13h13c-.66-.66-2.64-1.11-4.34-1.33l-1.87-7c.52-.05,1.15.03,1.53,0l-2.11-3.6h-.01a6.1743,6.1743,0,0,0-.7.14,4.3792,4.3792,0,0,0-.64.22l-.01,4.15c.35-.17.84-.54,1.3-.74l1.8,6.74c-.58-.05-1.09-.08-1.45-.08C6.0308,11.5,2.0008,12,1.0008,13Z",beer:"M12,5V2c0,0-1-1-4.5-1S3,2,3,2v3c0.0288,1.3915,0.3706,2.7586,1,4c0.6255,1.4348,0.6255,3.0652,0,4.5c0,0,0,1,3.5,1 s3.5-1,3.5-1c-0.6255-1.4348-0.6255-3.0652,0-4.5C11.6294,7.7586,11.9712,6.3915,12,5z M7.5,13.5 c-0.7966,0.035-1.5937-0.0596-2.36-0.28c0.203-0.7224,0.304-1.4696,0.3-2.22h4.12c-0.004,0.7504,0.097,1.4976,0.3,2.22 C9.0937,13.4404,8.2966,13.535,7.5,13.5z M7.5,5C6.3136,5.0299,5.1306,4.8609,4,4.5v-2C5.131,2.1411,6.3137,1.9722,7.5,2 C8.6863,1.9722,9.869,2.1411,11,2.5v2C9.8694,4.8609,8.6864,5.0299,7.5,5z",bicycle:"M7.5,2c-0.6761-0.01-0.6761,1.0096,0,1H9v1.2656l-2.8027,2.334L5.2226,4H5.5c0.6761,0.01,0.6761-1.0096,0-1h-2 c-0.6761-0.01-0.6761,1.0096,0,1h0.6523L5.043,6.375C4.5752,6.1424,4.0559,6,3.5,6C1.5729,6,0,7.5729,0,9.5S1.5729,13,3.5,13 S7,11.4271,7,9.5c0-0.6699-0.2003-1.2911-0.5293-1.8242L9.291,5.3262l0.4629,1.1602C8.7114,7.0937,8,8.2112,8,9.5 c0,1.9271,1.5729,3.5,3.5,3.5S15,11.4271,15,9.5S13.4271,6,11.5,6c-0.2831,0-0.5544,0.0434-0.8184,0.1074L10,4.4023V2.5 c0-0.2761-0.2239-0.5-0.5-0.5H7.5z M3.5,7c0.5923,0,1.1276,0.2119,1.5547,0.5527l-1.875,1.5625 c-0.5109,0.4273,0.1278,1.1945,0.6406,0.7695l1.875-1.5625C5.8835,8.674,6,9.0711,6,9.5C6,10.8866,4.8866,12,3.5,12S1,10.8866,1,9.5 S2.1133,7,3.5,7L3.5,7z M11.5,7C12.8866,7,14,8.1134,14,9.5S12.8866,12,11.5,12S9,10.8866,9,9.5c0-0.877,0.4468-1.6421,1.125-2.0879 l0.9102,2.2734c0.246,0.6231,1.1804,0.2501,0.9297-0.3711l-0.9082-2.2695C11.2009,7.0193,11.3481,7,11.5,7L11.5,7z","bicycle-share":"M10,1C9.4477,1,9,1.4477,9,2c0,0.5523,0.4477,1,1,1s1-0.4477,1-1C11,1.4477,10.5523,1,10,1z M8.1445,2.9941 c-0.13,0.0005-0.2547,0.0517-0.3477,0.1426l-2.6406,2.5c-0.2256,0.2128-0.2051,0.5775,0.043,0.7637L7,7.75v2.75 c-0.01,0.6762,1.0096,0.6762,1,0v-3c0.0003-0.1574-0.0735-0.3057-0.1992-0.4004L7.0332,6.5234l1.818-1.7212l0.7484,0.9985 C9.6943,5.9265,9.8426,6.0003,10,6h1.5c0.6761,0.01,0.6761-1.0096,0-1h-1.25L9.5,4L8.9004,3.1992 C8.8103,3.0756,8.6685,3,8.5156,2.9941H8.1445z M3,7c-1.6569,0-3,1.3432-3,3s1.3431,3,3,3s3-1.3432,3-3S4.6569,7,3,7z M12,7 c-1.6569,0-3,1.3432-3,3s1.3431,3,3,3s3-1.3432,3-3S13.6569,7,12,7z M3,8c1.1046,0,2,0.8954,2,2s-0.8954,2-2,2s-2-0.8954-2-2 S1.8954,8,3,8z M12,8c1.1046,0,2,0.8954,2,2s-0.8954,2-2,2s-2-0.8954-2-2S10.8954,8,12,8z","blood-bank":"m11.2 6.1-3.7-5.1-3.7 5.1c-.5.7-.8 1.6-.8 2.5 0 2.4 2 4.4 4.5 4.4s4.5-2 4.5-4.4c0-.9-.3-1.8-.8-2.5zm-1.2 2.9h-2v2h-1v-2h-2v-1h2v-2h1v2h2z","bowling-alley":"M10.922 3.166c0 1.006-.335 1.857-.693 2.77-.414 1.052-.86 2.185-.86 3.73 0 2.166.687 4.333 1.409 4.333h1.444c.723 0 1.409-2.166 1.409-4.333 0-1.545-.446-2.678-.86-3.73-.358-.912-.693-1.764-.693-2.77 0-.722.144-.723.144-1.445A.743.743 0 0 0 11.5.999a.743.743 0 0 0-.722.722c0 .723.144.723.144 1.445Zm-2.552 6.5c0-1.234.254-2.236.55-3.091a4.5 4.5 0 1 0-.17 6.038c-.237-.865-.38-1.91-.38-2.947ZM5.24 7.12a.62.62 0 1 1-1.24 0 .62.62 0 0 1 1.24 0Zm-1 2a.62.62 0 1 1-1.24 0 .62.62 0 0 1 1.24 0Zm2 0a.62.62 0 1 1-1.24 0 .62.62 0 0 1 1.24 0Z",bridge:"m0 6.84201v4.15799h2v-1c.036-1.08899.911-1.96399 2-1.99999 1.089.036 1.964.911 2 1.99999v1h3v-1c.036-1.08899.911-1.96399 2-1.99999 1.089.036 1.964.911 2 1.99999v1h2v-4.15799c-4.4-5.76-11.929-4.442-15 0zm9.5-3.108c.514.121 1.016.289 1.5.5v2.766h-1.5zm-.5-.1v3.366h-1.5v-3.494c.503 0 1.005.043 1.5.128zm-5.5.843c.48-.248.982-.451 1.5-.606v3.129h-1.5zm2 2.523v-3.27c.493-.115.995-.187 1.5-.215v3.485zm-2.5-2.256v2.256h-2.5c.676-.906 1.532-1.672 2.5-2.256zm8.5 2.256v-2.5l-.053-.053c1.202.603 2.247 1.477 3.053 2.553z",building:"M3,2v11h5v-3h3v3h1V2H3z M7,12H4v-2h3V12z M7,9H4V7h3V9z M7,6H4V4h3V6z M11,9H8V7h3V9z M11,6H8V4h3V6z","building-alt1":"M11,13.5v-9C11,4.2,10.8,4,10.5,4H9V1L5,2.1v11.4H2V14h11v-0.5H11z M7,13.5V3h1v10.5H7z",bus:"M2 3C2 1.9 2.9 1 4 1H11C12.1 1 13 1.9 13 3V11C13 12 12 12 12 12V13C12 13.55 11.55 14 11 14C10.45 14 10 13.55 10 13V12H5V13C5 13.55 4.55 14 4 14C3.45 14 3 13.55 3 13V12C2 12 2 11 2 11V3ZM3.5 4C3.22 4 3 4.22 3 4.5V7.5C3 7.78 3.22 8 3.5 8H11.5C11.78 8 12 7.78 12 7.5V4.5C12 4.22 11.78 4 11.5 4H3.5ZM4 9C3.45 9 3 9.45 3 10C3 10.55 3.45 11 4 11C4.55 11 5 10.55 5 10C5 9.45 4.55 9 4 9ZM11 9C10.45 9 10 9.45 10 10C10 10.55 10.45 11 11 11C11.55 11 12 10.55 12 10C12 9.45 11.55 9 11 9ZM4 2.5C4 2.78 4.22 3 4.5 3H10.5C10.78 3 11 2.78 11 2.5C11 2.22 10.78 2 10.5 2H4.5C4.22 2 4 2.22 4 2.5Z",cafe:"M12,5h-2V3H2v4c0.0133,2.2091,1.8149,3.9891,4.024,3.9758C7.4345,10.9673,8.7362,10.2166,9.45,9H12c1.1046,0,2-0.8954,2-2 S13.1046,5,12,5z M12,8H9.86C9.9487,7.6739,9.9958,7.3379,10,7V6h2c0.5523,0,1,0.4477,1,1S12.5523,8,12,8z M10,12.5 c0,0.2761-0.2239,0.5-0.5,0.5h-7C2.2239,13,2,12.7761,2,12.5S2.2239,12,2.5,12h7C9.7761,12,10,12.2239,10,12.5z",campsite:"M14 10V11C14 11.5523 13.5523 12 13 12H2C1.44772 12 1 11.5523 1 11V10C1 9.44772 1.44772 9.00001 2 9.00001H2.25L7.03206 1.25762C7.24699 0.90965 7.75302 0.909651 7.96794 1.25762L12.75 9.00001H13C13.5523 9.00001 14 9.44772 14 10ZM10.5 9.00001L7.5 4.00001L4.5 9.00001H10.5Z",car:"M13.84,6.852,12.6,5.7,11.5,3.5a1.05,1.05,0,0,0-.9-.5H4.4a1.05,1.05,0,0,0-.9.5L2.4,5.7,1.16,6.852A.5.5,0,0,0,1,7.219V11.5a.5.5,0,0,0,.5.5h2c.2,0,.5-.2.5-.4V11h7v.5c0,.2.2.5.4.5h2.1a.5.5,0,0,0,.5-.5V7.219A.5.5,0,0,0,13.84,6.852ZM4.5,4h6l1,2h-8ZM5,8.6c0,.2-.3.4-.5.4H2.4C2.2,9,2,8.7,2,8.5V7.4c.1-.3.3-.5.6-.4l2,.4c.2,0,.4.3.4.5Zm8-.1c0,.2-.2.5-.4.5H10.5c-.2,0-.5-.2-.5-.4V7.9c0-.2.2-.5.4-.5l2-.4c.3-.1.5.1.6.4Z","car-rental":"M10.5 1C9.94772 1 9.5 1.44772 9.5 2H2V3L3 4 4 3 5 4 6 3 7 4H9.5C9.5 4.55228 9.94772 5 10.5 5H12.5C12.7761 5 13 4.77614 13 4.5V1.5C13 1.22386 12.7761 1 12.5 1H10.5ZM11 2.5C11 2.22386 11.2239 2 11.5 2 11.7761 2 12 2.22386 12 2.5V3.5C12 3.77614 11.7761 4 11.5 4 11.2239 4 11 3.77614 11 3.5V2.5ZM2.14645 9.35355C2.05268 9.44732 2 9.5745 2 9.70711V13.5C2 13.7761 2.22386 14 2.5 14H4C4.27614 14 4.5 13.7761 4.5 13.5V13H10.5V13.5C10.5 13.7761 10.7239 14 11 14H12.5C12.7761 14 13 13.7761 13 13.5V9.70711C13 9.5745 12.9473 9.44732 12.8536 9.35355L12 8.5 10.6457 6.24275C10.5553 6.09215 10.3925 6 10.2169 6H4.7831C4.60746 6 4.44471 6.09215 4.35435 6.24275L3 8.5 2.14645 9.35355ZM11.1338 9H3.86623L5.06619 7H9.93381L11.1338 9ZM5.5 10.8279V11.2C5.5 11.3657 5.36569 11.5 5.2 11.5H3.3C3.13431 11.5 3 11.3657 3 11.2V10.3659C3 10.1766 3.1732 10.0346 3.35884 10.0718L5.17845 10.4357C5.36542 10.4731 5.5 10.6372 5.5 10.8279ZM12 10.4879V11.2C12 11.3657 11.8657 11.5 11.7 11.5H9.8C9.63431 11.5 9.5 11.3657 9.5 11.2V10.7459C9.5 10.6029 9.60094 10.4798 9.74117 10.4518L11.5216 10.0957C11.7691 10.0462 12 10.2355 12 10.4879Z","car-repair":"M3 5C3.74028 5 4.38662 4.5978 4.73243 4H12C12.5523 4 13 3.55228 13 3 13 2.44772 12.5523 2 12 2H4.73243C4.38662 1.4022 3.74028 1 3 1 2.25972 1 1.61337 1.4022 1.26756 2H3V4H1.26756C1.61337 4.5978 2.25972 5 3 5ZM2.14645 9.35355C2.05268 9.44732 2 9.5745 2 9.70711V13.5C2 13.7761 2.22386 14 2.5 14H4C4.27614 14 4.5 13.7761 4.5 13.5V13H10.5V13.5C10.5 13.7761 10.7239 14 11 14H12.5C12.7761 14 13 13.7761 13 13.5V9.70711C13 9.5745 12.9473 9.44732 12.8536 9.35355L12 8.5 10.6456 6.24275C10.5553 6.09215 10.3925 6 10.2169 6H4.78309C4.60746 6 4.44471 6.09215 4.35435 6.24275L3 8.5 2.14645 9.35355ZM11.1338 9H3.86622L5.06619 7H9.93381L11.1338 9ZM5.5 10.8279V11.2C5.5 11.3657 5.36568 11.5 5.2 11.5H3.3C3.13431 11.5 3 11.3657 3 11.2V10.3659C3 10.1766 3.1732 10.0346 3.35883 10.0718L5.17844 10.4357C5.36541 10.4731 5.5 10.6372 5.5 10.8279ZM12 10.4879V11.2C12 11.3657 11.8657 11.5 11.7 11.5H9.8C9.63431 11.5 9.5 11.3657 9.5 11.2V10.7459C9.5 10.6029 9.60094 10.4798 9.74116 10.4518L11.5216 10.0957C11.7691 10.0462 12 10.2355 12 10.4879Z",casino:"M8.5,10c0.4561,0.6072,1.1821,1,2,1c1.3807,0,2.5-1.1193,2.5-2.5c0-0.5642-0.1938-1.0789-0.509-1.4973L12.5,7l-5-6l-5,6 l0.009,0.0027C2.1938,7.4211,2,7.9358,2,8.5C2,9.8807,3.1193,11,4.5,11c0.8179,0,1.5439-0.3928,2-1 C6.5997,9.8672,6.7902,9.6135,7,9.3337V11.5C7,13,4.5,13,4.5,13C4.2239,13,4,13.2238,4,13.5C4,13.7761,4.2239,14,4.5,14H7h1h2.5 c0.2761,0,0.5-0.2239,0.5-0.5c0-0.2762-0.2239-0.5-0.5-0.5c0,0-2.5,0-2.5-1.5V9.3337C8.2098,9.6135,8.4003,9.8672,8.5,10z",castle:"M11,4H4C3.4477,4,3,3.5523,3,3V0.5C3,0.2239,3.2239,0,3.5,0S4,0.2239,4,0.5V2h1V1c0-0.5523,0.4477-1,1-1s1,0.4477,1,1v1h1V1 c0-0.5523,0.4477-1,1-1s1,0.4477,1,1v1h1V0.5C11,0.2239,11.2239,0,11.5,0S12,0.2239,12,0.5V3C12,3.5523,11.5523,4,11,4z M14,14.5 c0,0.2761-0.2239,0.5-0.5,0.5h-12C1.2239,15,1,14.7761,1,14.5S1.2239,14,1.5,14H2c0.5523,0,1-0.4477,1-1c0,0,1-6,1-7 c0-0.5523,0.4477-1,1-1h5c0.5523,0,1,0.4477,1,1c0,1,1,7,1,7c0,0.5523,0.4477,1,1,1h0.5c0.2723-0.0001,0.4946,0.2178,0.5,0.49V14.5z M9,10.5C9,9.6716,8.3284,9,7.5,9S6,9.6716,6,10.5V14h3V10.5z","castle-JP":"M12.5,12.75a1,1,0,0,1-1-.9995V7.25H10a1,1,0,0,1-1-1v-2H6v2a1,1,0,0,1-1,1H3.5v4.5a1,1,0,0,1-2,0V6.25a1,1,0,0,1,1-1H4v-2a1,1,0,0,1,1-1h5a1,1,0,0,1,1,1v2h1.5a1,1,0,0,1,1,1v5.5a1,1,0,0,1-.9995,1Z",caution:"M1.09302 11.8924L6.84044 1.3905C7.12539 0.869834 7.87461 0.869834 8.15956 1.3905L13.907 11.8924C14.1805 12.3922 13.818 13.0019 13.2474 13.0019H1.75258C1.18195 13.0019 0.819505 12.3922 1.09302 11.8924ZM8.29999 8L8.70296 5.5822C8.75375 5.27743 8.51873 5 8.20976 5H6.79022C6.48125 5 6.24623 5.27743 6.29703 5.5822L6.69999 8H8.29999ZM8.59999 9.9C8.59999 9.29249 8.10751 8.8 7.49999 8.8C6.89248 8.8 6.39999 9.29249 6.39999 9.9C6.39999 10.5075 6.89248 11 7.49999 11C8.10751 11 8.59999 10.5075 8.59999 9.9Z",cemetery:"M11.46,12h-0.68L12,3.55c0.0175-0.2867-0.2008-0.5332-0.4874-0.5507C11.4884,2.9979,11.4641,2.9981,11.44,3h-1.18 c0-0.92-1.23-2-2.75-2S4.77,2.08,4.77,3H3.54C3.253,2.9885,3.0111,3.2117,2.9995,3.4987C2.9988,3.5158,2.999,3.5329,3,3.55L4.2,12 H3.55C3.2609,11.9886,3.0162,12.2112,3,12.5V14h9v-1.51C11.9839,12.2067,11.7435,11.9886,11.46,12z M4.5,5h6v1h-6V5z","cemetery-JP":"M11.5,11h-3V2.5a.9448.9448,0,0,0-1-1,.9448.9448,0,0,0-1,1V11h-3a1,1,0,0,0,0,2h8a.9448.9448,0,0,0,1-1A1.0022,1.0022,0,0,0,11.5,11Z","charging-station":"m14 4v-1.51c-.0054-.2722-.2277-.4901-.5-.49-.2816.0047-.5062.2367-.5015.5184.0002.0105.0007.0211.0015.0316v2.45c0 .5523.4477 1 1 1v5.5c0 .2761-.2239.5-.5.5s-.5-.2239-.5-.5v-2c0-.8284-.6716-1.5-1.5-1.5h-1.5v-6c0-.5523-.4477-1-1-1h-6c-.5523 0-1 .4477-1 1v11c0 .5523.4477 1 1 1h6c.5523 0 1-.4477 1-1v-4h1.5c.2761 0 .5.2239.5.5v2c0 .8284.6716 1.5 1.5 1.5s1.5-.6716 1.5-1.5v-6.5c0-.5523-.4477-1-1-1zm-5.7996 3.3995-2.6006 3.4674-.0164-.0072c-.0465.0787-.1167.1403-.2146.1403-.1476 0-.2672-.1196-.2672-.2672 0-.028.0217-.0463.0297-.0717l-.0177-.0078.7766-2.3245c.054-.1617-.0664-.3288-.2369-.3288h-1.6539c-.2058 0-.3232-.2349-.1998-.3995l2.6006-3.4674.0164.0072c.0465-.0787.1167-.1403.2146-.1403.1476 0 .2672.1196.2672.2672 0 .028-.0217.0463-.0297.0717l.0176.0078-.7764 2.3244c-.0541.1618.0663.3289.2368.3289h1.6539c.2058 0 .3232.2349.1998.3995z",cinema:"M14,7.5v2c0,0.2761-0.2239,0.5-0.5,0.5S13,9.7761,13,9.5c0,0,0.06-0.5-1-0.5h-1v2.5c0,0.2761-0.2239,0.5-0.5,0.5h-8 C2.2239,12,2,11.7761,2,11.5v-4C2,7.2239,2.2239,7,2.5,7h8C10.7761,7,11,7.2239,11,7.5V8h1c1.06,0,1-0.5,1-0.5 C13,7.2239,13.2239,7,13.5,7S14,7.2239,14,7.5z M4,3C2.8954,3,2,3.8954,2,5s0.8954,2,2,2s2-0.8954,2-2S5.1046,3,4,3z M4,6 C3.4477,6,3,5.5523,3,5s0.4477-1,1-1s1,0.4477,1,1S4.5523,6,4,6z M8.5,2C7.1193,2,6,3.1193,6,4.5S7.1193,7,8.5,7S11,5.8807,11,4.5 S9.8807,2,8.5,2z M8.5,6C7.6716,6,7,5.3284,7,4.5S7.6716,3,8.5,3S10,3.6716,10,4.5S9.3284,6,8.5,6z",circle:"M14,7.5c0,3.5899-2.9101,6.5-6.5,6.5S1,11.0899,1,7.5S3.9101,1,7.5,1S14,3.9101,14,7.5z","circle-stroked":"M7.5 12.3C4.84898 12.3 2.7 10.151 2.7 7.5C2.7 4.84898 4.84898 2.7 7.5 2.7C10.151 2.7 12.3 4.84898 12.3 7.5C12.3 10.151 10.151 12.3 7.5 12.3ZM7.5 14C11.0899 14 14 11.0899 14 7.5C14 3.9101 11.0899 1 7.5 1C3.9101 1 1 3.9101 1 7.5C1 11.0899 3.9101 14 7.5 14Z",city:"M12.6368 3.9994H10.9981V2.3608C10.998 2.16148 10.8364 1.99994 10.6371 2H10.3591C10.1598 2 9.9982 2.16158 9.9982 2.3609V3.9994H8.36C8.16068 3.9994 7.9991 4.16098 7.9991 4.3603V9.9984H4.3621C4.16168 9.9984 3.9992 10.1609 3.9992 10.3613V12.6358C3.99975 12.8358 4.16207 12.9977 4.3621 12.9977H12.6368C12.8361 12.9977 12.9977 12.8361 12.9977 12.6368V4.36C12.9977 4.16068 12.8361 3.9994 12.6368 3.9994ZM5.9989 11.9981H4.9989V10.9981H5.9989V11.9981ZM7.9989 11.9981H6.9989V10.9981H7.9989V11.9981ZM9.9989 11.9981H8.9989V10.9981H9.9989V11.9981ZM9.9989 9.9981H8.9989V8.9981H9.9989V9.9981ZM9.9989 7.9981H8.9989V6.9981H9.9989V7.9981ZM9.9989 5.9981H8.9989V4.9981H9.9989V5.9981ZM11.9989 11.9971H10.9989V10.9971H11.9989V11.9971ZM11.9989 9.9971H10.9989V8.9971H11.9989V9.9971ZM11.9989 7.9971H10.9989V6.9971H11.9989V7.9971ZM11.9989 5.9971H10.9989V4.9971H11.9989V5.9971ZM6.9987 2.3608C6.99864 2.16152 6.83708 2 6.6378 2H4.36C4.16068 2 3.9991 2.16158 3.9991 2.3609V4H2.36C2.16138 4.00049 2.00049 4.16138 2 4.36V12.6474C2 12.8407 2.1567 12.9974 2.35 12.9974H2.9994V8.9986H6.9987V2.3608ZM4 7.9981H3V6.9981H4V7.9981ZM4 5.9981H3V4.9981H4V5.9981ZM6 7.9981H5V6.9981H6V7.9981ZM6 5.9981H5V4.9981H6V5.9981ZM6 3.9981H5V3H6V4V3.9981Z","clothing-store":"M4 2L1 4.5L1 7H4V13H11V7H14V4.5L11 2H9.5L7.5 6L5.5 2L4 2Z",college:"M7.5,1L0,4.5l2,0.9v1.7C1.4,7.3,1,7.9,1,8.5s0.4,1.2,1,1.4V10l-0.9,2.1 C0.8,13,1,14,2.5,14s1.7-1,1.4-1.9L3,10c0.6-0.3,1-0.8,1-1.5S3.6,7.3,3,7.1V5.9L7.5,8L15,4.5L7.5,1z M11.9,7.5l-4.5,2L5,8.4v0.1 c0,0.7-0.3,1.3-0.8,1.8l0.6,1.4v0.1C4.9,12.2,5,12.6,4.9,13c0.7,0.3,1.5,0.5,2.5,0.5c3.3,0,4.5-2,4.5-3L11.9,7.5L11.9,7.5z","college-JP":"M12.5,2.9992h-4v-1a1,1,0,0,0-2,0v1h-4a1,1,0,0,0,0,2h.67A10.8169,10.8169,0,0,0,5.15,8.8105c.3331.4313.6594.8248.9785,1.1936a14.3825,14.3825,0,0,1-2.6074,2.117,1,1,0,1,0,.955,1.7581h0A15.65,15.65,0,0,0,7.5,11.4613a15.65,15.65,0,0,0,3.0239,2.4179,1,1,0,1,0,.9551-1.7578,14.3789,14.3789,0,0,1-2.6073-2.1171c.3191-.3688.6453-.7622.9784-1.1935a10.818,10.818,0,0,0,1.98-3.8116h.67a1,1,0,0,0,0-2ZM8.2671,7.5879c-.2614.3385-.5154.6413-.767.937-.2517-.2957-.5057-.5985-.7672-.937A9.5885,9.5885,0,0,1,5.2676,4.9992H9.7319A9.5789,9.5789,0,0,1,8.2671,7.5879Z",commercial:"m14 6h-13c.0881-1.3829.427-2.7383 1-4h11c.5731 1.2617.9119 2.6171 1 4zm-11 1h9v6h-1v-5h-3v5h-5zm1 3h3v-2h-3z","communications-tower":"M11.8545,6.4336l-.4131-.2813a4.7623,4.7623,0,0,0,.2813-4.8779l-.0835-.1533L12.0747.875l.0908.167a5.2619,5.2619,0,0,1-.311,5.3916Zm1.1521,7.1316V14h-11v-.4348H4.4952L6.0439,6.4a.5.5,0,0,1,.4888-.3945h.7255V4.6014A1.14,1.14,0,0,1,6.3756,3.5a1.1568,1.1568,0,1,1,2.3136,0,1.14,1.14,0,0,1-.931,1.1112V6.0059h.7223A.5.5,0,0,1,8.9692,6.4l1.5478,7.1648ZM8.4543,8.751H6.5588L6.236,10.2441H8.777ZM6.1279,10.7441l-.3233,1.4952H9.2082l-.3231-1.4952ZM6.936,7.0059,6.6669,8.251H8.3463L8.0771,7.0059ZM5.5179,13.5652H9.4948l-.1786-.8259h-3.62ZM5.21,5.0137a2.7523,2.7523,0,0,1,.0161-3.0518L4.812,1.6826a3.25,3.25,0,0,0-.019,3.6065ZM10.7568,3.5a3.2433,3.2433,0,0,0-.5341-1.7861l-.418.2754a2.7517,2.7517,0,0,1-.0176,3.0488l.4141.2793A3.2341,3.2341,0,0,0,10.7568,3.5ZM3.5342,6.1182A4.7637,4.7637,0,0,1,3.3813,1.13L2.9478.88a5.2643,5.2643,0,0,0,.1694,5.5137Z",confectionery:"M13,4a1,1,0,0,0-1-1,1,1,0,0,0-2,0V5.0673A3.4808,3.4808,0,0,0,4.3583,9H2a1,1,0,0,0,0,2,1,1,0,0,0,1,1,1,1,0,0,0,2,0V9.9326A3.4807,3.4807,0,0,0,10.6417,6H13a1,1,0,0,0,0-2ZM7.5,9.9925A2.484,2.484,0,0,1,6.3184,5.319a1.0809,1.0809,0,0,1,.5459.307A2.1243,2.1243,0,0,1,7.25,7.0117l.001.9561A2.5821,2.5821,0,0,0,7.76,9.7031a1.5462,1.5462,0,0,0,.2591.2333A2.4861,2.4861,0,0,1,7.5,9.9925ZM8.6815,9.681a1.0813,1.0813,0,0,1-.5458-.307A2.1243,2.1243,0,0,1,7.75,7.9883l-.001-.9561A2.5821,2.5821,0,0,0,7.24,5.2969a1.5557,1.5557,0,0,0-.2592-.2334A2.4843,2.4843,0,0,1,8.6815,9.681Z",construction:"M13.5 11h-1.8L8.2.5C8-.2 7-.2 6.8.5L3.3 11H1.5c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h12c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5ZM7 3h1l.7 2H6.4L7 3ZM5.7 7h3.6l.7 2H5l.7-2Z",convenience:"M2.9982,3.0687s.1875-1.062,1-1.062H5.0043V1.7276a.5.5,0,0,1,.5-.5H9.4882a.5.5,0,0,1,.5.5v.2791h1.01a.8324.8324,0,0,1,.6373.2937,1.7589,1.7589,0,0,1,.3627.7683s.3108,1.5719.5921,2.9181h-.938L11,3,3.982,2.9956,3.3336,5.9868H2.382Zm11,4.9144a1,1,0,0,1-.9992,1l-1.0008,3.973s-.1875,1.0417-1,1.0417h-7c-.8125,0-1-1.0417-1-1.0417L1.9822,8.98a.9985.9985,0,0,1,.016-1.9968h11A1,1,0,0,1,13.9982,7.9831ZM5.0327,12.13,5.03,11.0051,4.6392,9.4686a.5373.5373,0,1,0-1.0649.1445L3.78,11.0075l.1874,1.2672A.5373.5373,0,1,0,5.0327,12.13Zm2-2.5967A.5332.5332,0,0,0,6.4994,9l-.0039.0008L6.4886,9a.4992.4992,0,0,0-.3575.1509.529.529,0,0,0-.1648.3828v2.68a.5332.5332,0,1,0,1.0663,0Zm1.998,0A.5314.5314,0,0,0,8.694,9.04a.4992.4992,0,0,0-.393,0,.5312.5312,0,0,0-.3366.4934v2.68a.5331.5331,0,1,0,1.0662,0Zm2.3857.08a.5373.5373,0,1,0-1.0649-.1445L9.96,10.9938,9.9579,12.13a.5373.5373,0,1,0,1.0649.1446Z",cricket:"M8,1.5C8,2.3284,7.3284,3,6.5,3S5,2.3284,5,1.5S5.6716,0,6.5,0S8,0.6716,8,1.5z M10.88,7.18L10.88,7.18l-2-2l0,0l0,0 C8.7815,5.0616,8.6339,4.9952,8.48,5H3.75C3.3736,4.9915,3.0508,5.2669,3,5.64l0,0l-1,7.7l0,0c-0.0068,0.0464-0.0068,0.0936,0,0.14 c0,0.2761,0.2239,0.5,0.5,0.5c0.2251,0.0153,0.4315-0.1251,0.5-0.34l0,0l1.2-3.89l0,0l0.26-0.83l0.4,0.44l0,0L6,10.6v2.9 C6,13.7761,6.2239,14,6.5,14S7,13.7761,7,13.5v-3l0,0l0,0c-0.0081-0.0788-0.0356-0.1544-0.08-0.22l0,0L5.48,8.5l1-2.5h1.71l2,1.84 l0,0c0.0928,0.1077,0.2278,0.1697,0.37,0.17C10.8163,7.9791,11.007,7.7581,11,7.5C10.9997,7.3824,10.9571,7.2688,10.88,7.18z M14,11.27c-0.4142,0-0.75,0.3358-0.75,0.75s0.3358,0.75,0.75,0.75s0.75-0.3358,0.75-0.75S14.4142,11.27,14,11.27z M10.76,9.74V9 c0-0.1381-0.1119-0.25-0.25-0.25S10.26,8.8619,10.26,9v0.74c-0.1522,0.0855-0.2474,0.2455-0.25,0.42v3.34 c0,0.2761,0.2239,0.5,0.5,0.5s0.5-0.2239,0.5-0.5v-3.34C11.0074,9.9855,10.9122,9.8255,10.76,9.74z",cross:"M3.64 2.27L7.5 6.13L11.34 2.29C11.5114 2.1076 11.7497 2.0029 12 2C12.5523 2 13 2.4477 13 3C13.0047 3.2478 12.907 3.4866 12.73 3.66L8.84 7.5L12.73 11.39C12.8948 11.5512 12.9915 11.7696 13 12C13 12.5523 12.5523 13 12 13C11.7423 13.0107 11.492 12.9127 11.31 12.73L7.5 8.87L3.65 12.72C3.4793 12.8963 3.2453 12.9971 3 13C2.4477 13 2 12.5523 2 12C1.9953 11.7522 2.093 11.5134 2.27 11.34L6.16 7.5L2.27 3.61C2.1052 3.4488 2.0085 3.2304 2 3C2 2.4477 2.4477 2 3 2C3.2404 2.0029 3.4701 2.0998 3.64 2.27Z",dam:"M13.94,9.5c0,0.2761-0.2239,0.5-0.5,0.5l0,0c-0.259,0.0219-0.4994,0.1439-0.67,0.34c-0.2714,0.2887-0.6175,0.4964-1,0.6 c-0.6115,0.1816-1.2734,0.0424-1.76-0.37l-0.39-0.35c-0.2976-0.3038-0.7851-0.3087-1.0889-0.0111 C8.5274,10.2126,8.5237,10.2163,8.52,10.22c-0.14,0.12-0.27,0.25-0.42,0.37c-0.7278,0.5784-1.7663,0.5489-2.46-0.07L5.3,10.19 l-0.1-0.06l0.3,1.22l0.49,2c0.0829,0.2634-0.0634,0.5441-0.3267,0.6271C5.6105,13.9937,5.5553,14.0014,5.5,14h-4 C1.2239,14,1,13.7761,1,13.5v-12C1,1.2239,1.2239,1,1.5,1h1.1c0.2346-0.0011,0.4384,0.1611,0.49,0.39L4,5.06V5.2 c0.6569-0.314,1.4361-0.2205,2,0.24c0.16,0.13,0.31,0.28,0.47,0.41c0.2847,0.2546,0.7153,0.2546,1,0c0.16-0.13,0.31-0.28,0.47-0.41 c0.7076-0.5968,1.7424-0.5968,2.45,0c0.15,0.13,0.29,0.27,0.44,0.39c0.2847,0.2546,0.7153,0.2546,1,0l0.47-0.41 c0.3163-0.2672,0.7159-0.4157,1.13-0.42l0,0c0.2761,0,0.5,0.2239,0.5,0.5S13.7061,6,13.43,6l0,0 c-0.259,0.0219-0.4994,0.1439-0.67,0.34c-0.2714,0.2887-0.6175,0.4964-1,0.6C11.1485,7.1216,10.4866,6.9824,10,6.57L9.67,6.23 C9.3724,5.9262,8.8849,5.9213,8.5811,6.2189C8.5774,6.2226,8.5737,6.2263,8.57,6.23C8.43,6.35,8.3,6.48,8.15,6.6 C7.4222,7.1784,6.3837,7.1489,5.69,6.53L5.3,6.19c-0.2847-0.2546-0.7153-0.2546-1,0L4.24,6.24L4.93,9 C5.3226,9.029,5.6965,9.1793,6,9.43c0.16,0.13,0.31,0.28,0.47,0.41c0.2847,0.2546,0.7153,0.2546,1,0c0.16-0.13,0.31-0.28,0.47-0.41 c0.7076-0.5968,1.7424-0.5968,2.45,0c0.15,0.13,0.29,0.27,0.44,0.39c0.2847,0.2546,0.7153,0.2546,1,0l0.47-0.41 c0.3177-0.2636,0.7172-0.4085,1.13-0.41l0,0c0.2761-0.0055,0.5044,0.2138,0.5099,0.4899C13.94,9.4933,13.94,9.4966,13.94,9.5z",danger:"M13.94,14.68c-0.0749,0.194-0.262,0.3215-0.47,0.32c-0.0595,0.0107-0.1205,0.0107-0.18,0L7.5,12.56L1.7,15 c-0.2572,0.1005-0.5472-0.0266-0.6476-0.2838C1.0516,14.7141,1.0508,14.7121,1.05,14.71c-0.1291-0.2441-0.0358-0.5467,0.2084-0.6757 C1.2845,14.0205,1.3118,14.009,1.34,14l4.85-2l-4.85-2C1.0758,9.9197,0.9267,9.6404,1.007,9.3762s0.3596-0.4133,0.6238-0.333 C1.6545,9.0504,1.6776,9.0594,1.7,9.07l5.8,2.41l5.8-2.41c0.2494-0.1185,0.5477-0.0124,0.6662,0.237 c0.1185,0.2494,0.0124,0.5477-0.237,0.6662C13.7068,9.9839,13.6837,9.9928,13.66,10L8.8,12l4.85,2 c0.2607,0.091,0.3983,0.3761,0.3074,0.6368C13.9523,14.6515,13.9465,14.6659,13.94,14.68z M12,4.23v0.45 c-0.0021,0.2129-0.0722,0.4196-0.2,0.59C11.2414,5.8883,10.6399,6.4664,10,7v1.16c0.0015,0.208-0.126,0.3951-0.32,0.47L7.52,9.5 H7.45L5.28,8.63C5.1016,8.5428,4.9917,8.3584,5,8.16V7C4.3528,6.4675,3.7446,5.8893,3.18,5.27C3.0593,5.0972,2.9963,4.8907,3,4.68 V4.23C3.1669,2.0117,4.8974,0.2307,7.11,0h0.36l0,0h0.39C10.0862,0.2131,11.8348,1.9997,12,4.23z M6,4c0-0.5523-0.4477-1-1-1 S4,3.4477,4,4s0.4477,1,1,1S6,4.5523,6,4z M7,7c0-0.2761-0.2239-0.5-0.5-0.5S6,6.7239,6,7v0.5C6,7.7761,6.2239,8,6.5,8 S7,7.7761,7,7.5V7z M9,7c0-0.2761-0.2239-0.5-0.5-0.5S8,6.7239,8,7v0.5C8,7.7761,8.2239,8,8.5,8S9,7.7761,9,7.5V7z M11,4 c0-0.5523-0.4477-1-1-1S9,3.4477,9,4s0.4477,1,1,1S11,4.5523,11,4z",defibrillator:"m1.54995 7.33811c-2.386799-4.5965 3.63-7.660899 5.952-3.0644 2.3215-4.596499 8.33875-1.5322 5.95235 3.0644-.0869.1671-.2028.3456-.3114.5212h-1.8079l-1.81455-2.7216c-.06321-.09473-.1511-.1704-.25417-.21884-.10308-.04843-.21743-.06779-.3307-.05599-.11327.01181-.22117.05433-.31205.12298-.09087.06865-.16126.16082-.20358.26655l-1.6484 4.12-1.33-1.33c-.11716-.11707-.27597-.18288-.4416-.183h-3.1389c-.1086-.1757-.2245-.3542-.3111-.5213zm9.45005 1.7713c-.103-.00003-.2044-.02545-.2951-.07399-.0908-.04854-.1682-.11871-.2254-.20431l-1.34085-2.0111-1.5587 3.89679c-.03839.096-.10002.181-.17936.2474-.07935.0663-.17393.1119-.27524.1326-.04125.0086-.08327.0128-.1254.0126-.16568.0001-.32462-.0656-.4419-.1826l-1.8169-1.81739h-2.0054c1.36645 1.66819 2.85739 3.23039 4.46 4.67319.08531.077.19616.1197.3111.1197s.22579-.0427.3111-.1197c1.59778-1.4447 3.08545-3.0068 4.45055-4.67319z",dentist:"M4.36,14c-1,0-0.56-2.67-0.86-5c-0.1-0.76-1-1.49-1.12-2.06C2,5,1.39,1.44,3.66,1S6,3,7.54,3s1.57-2.36,3.85-2 s1.59,3.9,1.29,5.9c-0.1,0.45-1.1,1.48-1.18,2.06c-0.33,2.4,0.32,5-0.8,5c-0.93,0-1.32-2.72-2-4.5C8.43,8.63,8.06,8,7.54,8 C6,8,5.75,14,4.36,14z",diamond:"M7.03715 1.20147L2.12542 6.7C2.04962 6.78393 2.00568 6.89005 2.00051 7C1.99535 7.10994 2.02925 7.21013 2.09689 7.3L7.0065 13.7601C7.06233 13.8343 7.13629 13.8947 7.22216 13.9365C7.30803 13.9782 7.40331 14 7.5 14C7.59669 14 7.69197 13.9782 7.77784 13.9365C7.86371 13.8947 7.93766 13.8343 7.9935 13.7601L12.9031 7.3C12.9707 7.21013 13.0047 7.10994 12.9995 7C12.9943 6.89005 12.9504 6.78393 12.8746 6.7L7.96285 1.20147C7.90591 1.13833 7.83501 1.08761 7.75508 1.05282C7.67514 1.01802 7.5881 1 7.5 1C7.4119 1 7.32486 1.01802 7.24492 1.05282C7.16499 1.08761 7.09409 1.13833 7.03715 1.20147Z",doctor:"M5.5,7C4.1193,7,3,5.8807,3,4.5l0,0v-2C3,2.2239,3.2239,2,3.5,2H4c0.2761,0,0.5-0.2239,0.5-0.5S4.2761,1,4,1H3.5 C2.6716,1,2,1.6716,2,2.5v2c0.0013,1.1466,0.5658,2.2195,1.51,2.87l0,0C4.4131,8.1662,4.9514,9.297,5,10.5C5,12.433,6.567,14,8.5,14 s3.5-1.567,3.5-3.5V9.93c1.0695-0.2761,1.7126-1.367,1.4365-2.4365C13.1603,6.424,12.0695,5.7809,11,6.057 C9.9305,6.3332,9.2874,7.424,9.5635,8.4935C9.7454,9.198,10.2955,9.7481,11,9.93v0.57c0,1.3807-1.1193,2.5-2.5,2.5S6,11.8807,6,10.5 c0.0511-1.2045,0.5932-2.3356,1.5-3.13l0,0C8.4404,6.7172,9.001,5.6448,9,4.5v-2C9,1.6716,8.3284,1,7.5,1H7 C6.7239,1,6.5,1.2239,6.5,1.5S6.7239,2,7,2h0.5C7.7761,2,8,2.2239,8,2.5v2l0,0C8,5.8807,6.8807,7,5.5,7 M11.5,9 c-0.5523,0-1-0.4477-1-1s0.4477-1,1-1s1,0.4477,1,1S12.0523,9,11.5,9z","dog-park":"M 10.300781 1.2207031 C 9.9144812 1.2207031 9.6 1.2 9.5 2 L 9.0996094 4.5214844 L 11.5 6.5 L 13.5 6.5 C 14.9 6.5 15 5.5410156 15 5.5410156 L 13.099609 3.3222656 C 12.399609 2.6222656 11.7 2.5 11 2.5 L 11 2 C 11 2 11.067481 1.2206031 10.300781 1.2207031 z M 4.75 1.5 C 4.75 1.5 3.7992187 1.5206031 3.1992188 1.7207031 C 2.5992187 1.9207031 2 2.6210938 2 3.6210938 L 2 7.5214844 C 2 9.2214844 1.3 9.5 1 9.5 C 1 9.5 0 9.5214844 0 10.521484 L 0 12.720703 C 0 12.720703 0.00078125 13.521484 0.80078125 13.521484 L 1 13.521484 L 1.5 13.521484 L 2 13.521484 L 2 13.021484 L 2 12.822266 C 2 12.422266 1.8 12.221094 1.5 12.121094 L 1.5 11.021484 C 2.5 11.021484 2.6 10.820703 3 10.720703 L 3.5507812 12.917969 C 3.6507813 13.217969 3.7507813 13.417578 4.0507812 13.517578 L 5.0507812 13.517578 L 6 13.5 L 6 12.699219 C 6 12.022819 5 12 5 12 L 5 9.5 L 8.5 9.5 L 9.1992188 12.121094 C 9.5992188 13.521094 10.5 13.5 10.5 13.5 L 11 13.5 L 12 13.5 L 12 12.699219 C 12 11.987419 11 12 11 12 L 11.099609 7.921875 L 8 5.5 L 3.5 5.5 L 3.5 3.5 C 3.5 3.1 3.7765 3.0053 4 3 C 4.4941 2.9882 4.75 3 4.75 3 C 5.1642 3 5.5 2.6642 5.5 2.25 C 5.5 1.8358 5.1642 1.5 4.75 1.5 z M 11.75 4 C 11.8881 4 12 4.1119 12 4.25 C 12 4.3881 11.8881 4.5 11.75 4.5 C 11.6119 4.5 11.5 4.3881 11.5 4.25 C 11.5 4.1119 11.6119 4 11.75 4 z","drinking-water":"M6,1A2,2,0,0,0,4,3V6.5a.5.5,0,0,0,.5.5h2A.5.5,0,0,0,7,6.5v-2A.5.5,0,0,1,7.5,4H14V1ZM7,15H4a.5.5,0,0,1-.48-.38L2,8.62a.5.5,0,0,1,.365-.606A.558.558,0,0,1,2.5,8h6a.5.5,0,0,1,.514.485A.47.47,0,0,1,9,8.62l-1.5,6A.5.5,0,0,1,7,15ZM3.65,11H7.36l.5-2H3.14Z",elevator:"M11,1H4A1,1,0,0,0,3,2V13a1,1,0,0,0,1,1h7a1,1,0,0,0,1-1V2A1,1,0,0,0,11,1ZM7.5,12.5l-2-4h4Zm-2-6,2-4,2,4Z",embassy:"M6.65,2C5.43,2,4.48,3.38,4.11,3.82C4.0365,3.9102,3.9975,4.0237,4,4.14v4.4C3.9884,8.7827,4.1758,8.9889,4.4185,9.0005 C4.528,9.0057,4.6355,8.9699,4.72,8.9c0.4665-0.6264,1.1589-1.0461,1.93-1.17C8.06,7.73,8.6,9,10.07,9 c0.9948-0.0976,1.9415-0.4756,2.73-1.09c0.1272-0.0934,0.2016-0.2422,0.2-0.4V2.45c0.0275-0.2414-0.1459-0.4595-0.3874-0.487 C12.5332,1.954,12.4527,1.9668,12.38,2c-0.6813,0.5212-1.4706,0.8834-2.31,1.06C8.6,3.08,8.12,2,6.65,2z M2.5,3 c-0.5523,0-1-0.4477-1-1s0.4477-1,1-1s1,0.4477,1,1S3.0523,3,2.5,3z M3,4v9.48c0,0.2761-0.2239,0.5-0.5,0.5S2,13.7561,2,13.48V4 c0-0.2761,0.2239-0.5,0.5-0.5S3,3.7239,3,4z","emergency-phone":"M7.875,11.49a.51.51,0,0,0,.72,0l.72-.72,2.18,2.16-.37.37a2.24,2.24,0,0,1-1.44.7H8.24a2.24,2.24,0,0,1-1.45-.7L1.72,8.23A2.24,2.24,0,0,1,1,6.78V5.33a2.24,2.24,0,0,1,.72-1.45l.36-.36L4.26,5.69l-.73.73a.51.51,0,0,0,0,.72Zm4.72.38a1,1,0,0,0,.036-1.414h0l-.036-.036-.72-.72a1,1,0,0,0-1.414-.036h0l-.036.036ZM5.315,4.62a1,1,0,0,0,.036-1.414h0L4.595,2.45a1,1,0,0,0-1.414-.036h0L3.14,2.45ZM10,2V4H8V5h2V7h1V5h2V4H11V2Z",entrance:"m8 6.5v-1c0-.26522-.10536-.51957-.29289-.70711-.18754-.18753-.44189-.29289-.70711-.29289s-.51957.10536-.70711.29289c-.18753.18754-.29289.44189-.29289.70711v3zm-2-3.5c0-.19778.05865-.39112.16853-.55557s.26606-.29262.44879-.36831c.18272-.07569.38379-.09549.57777-.0569.19398.03858.37216.13382.51202.27367.13985.13986.23509.31804.27368.51202.03858.19398.01878.39505-.05691.57777-.07569.18273-.20386.33891-.36831.44879s-.35779.16853-.55557.16853c-.26522 0-.51957-.10536-.70711-.29289-.18753-.18754-.29289-.44189-.29289-.70711zm9 3c0 .26522-.1054.51957-.2929.70711-.1875.18753-.4419.29289-.7071.29289h-1.58c-.1316-.00076-.2621.02446-.3839.07423-.1218.04976-.2327.12309-.3261.21577l-5.42 5.42c-.18626.1847-.43766.2889-.7.29h-2.59c-.26522 0-.51957-.1054-.70711-.2929-.18753-.1875-.29289-.4419-.29289-.7071s.10536-.5196.29289-.7071c.18754-.1875.44189-.2929.70711-.2929h1.59c.26234-.0011.51374-.1053.7-.29l5.42-5.42c.0934-.09268.2043-.16601.3261-.21577.1218-.04977.2523-.07499.3839-.07423h2.58c.2652 0 .5196.10536.7071.29289.1875.18754.2929.44189.2929.70711z","entrance-alt1":"M6.554,9.639a.5.5,0,0,0,.707.707L9.928,7.669a.25.25,0,0,0,0-.354h0L7.261,4.639a.5.5,0,0,0-.707.707L8.2,7H1.5a.5.5,0,0,0,0,1H8.2ZM12,1H5.5a.5.5,0,0,0,0,1h6a.5.5,0,0,1,.5.5v10a.5.5,0,0,1-.5.5H5.25a.5.5,0,0,0,0,1H12a1,1,0,0,0,1-1V2A1,1,0,0,0,12,1Z",farm:"m8 6-3-2-3 2-1 2v4h2v-2h4v2h2v-4zm-2 2h-2v-2h2zm8 4h-3v-9.5c0-.39782.158-.77936.4393-1.06066s.6629-.43934 1.0607-.43934.7794.15804 1.0607.43934.4393.66284.4393 1.06066z","fast-food":"M14,8c0,0.5523-0.4477,1-1,1H2C1.4477,9,1,8.5523,1,8s0.4477-1,1-1h11C13.5523,7,14,7.4477,14,8z M3.5,10H2 c0,1.6569,1.3431,3,3,3h5c1.6569,0,3-1.3431,3-3H3.5z M3,6H2V4c0-1.1046,0.8954-2,2-2h7c1.1046,0,2,0.8954,2,2v2H3z M11,4.5 C11,4.7761,11.2239,5,11.5,5S12,4.7761,12,4.5S11.7761,4,11.5,4S11,4.2239,11,4.5z M9,3.5C9,3.7761,9.2239,4,9.5,4S10,3.7761,10,3.5 S9.7761,3,9.5,3S9,3.2239,9,3.5z M7,4.5C7,4.7761,7.2239,5,7.5,5S8,4.7761,8,4.5S7.7761,4,7.5,4S7,4.2239,7,4.5z M5,3.5 C5,3.7761,5.2239,4,5.5,4S6,3.7761,6,3.5S5.7761,3,5.5,3S5,3.2239,5,3.5z M3,4.5C3,4.7761,3.2239,5,3.5,5S4,4.7761,4,4.5 S3.7761,4,3.5,4S3,4.2239,3,4.5z",fence:"m13.5 9h-.5v-3h.5c.1326 0 .2598-.05268.3536-.14644.0937-.09377.1464-.22095.1464-.35356s-.0527-.25978-.1464-.35355c-.0938-.09377-.221-.14645-.3536-.14645h-.5v-2l-.286-.573c-.0218-.03651-.0525-.06683-.0894-.08809-.0368-.02125-.0784-.03273-.1209-.03333s-.0845.00969-.1219.0299c-.0374.0202-.069.04964-.0918.08552l-.29.579v2h-1v-2l-.286-.573c-.0218-.03651-.0525-.06683-.0894-.08809-.0368-.02125-.0784-.03273-.1209-.03333s-.0845.00969-.1219.0299c-.0374.0202-.069.04964-.0918.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-.5c-.13261 0-.25979.05268-.35355.14645-.09377.09377-.14645.22094-.14645.35355s.05268.25979.14645.35356c.09376.09376.22094.14644.35355.14644h.5v3h-.5c-.13261 0-.25979.05268-.35355.14645-.09377.09377-.14645.22094-.14645.35355s.05268.25979.14645.35356c.09376.09376.22094.14644.35355.14644h.5v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.0527.2598.1464.3536.0938.0937.221.1464.3536.1464s.2598-.0527.3536-.1464c.0937-.0938.1464-.221.1464-.3536v-1.5h1v1.5c0 .1326.0527.2598.1464.3536.0938.0937.221.1464.3536.1464s.2598-.0527.3536-.1464c.0937-.0938.1464-.221.1464-.3536v-1.5h.5c.1326 0 .2598-.05268.3536-.14644.0937-.09377.1464-.22095.1464-.35356s-.0527-.25978-.1464-.35355c-.0938-.09377-.221-.14645-.3536-.14645zm-10.5 0v-3h1v3zm2 0v-3h1v3zm2 0v-3h1v3zm2 0v-3h1v3zm2 0v-3h1v3z",ferry:"M5.33,11c0.6745,0.009,1.3262,0.245,1.85,0.67l0.26,0.23h0.05l0.31-0.28c0.9817-0.8115,2.379-0.8846,3.44-0.18L13.5,7L12,6 V2.45c-0.0466-0.8-0.6989-1.4305-1.5-1.45H10c0.0343-0.518-0.3579-0.9657-0.8759-1C9.0828-0.0027,9.0413-0.0027,9,0H6 C5.482-0.0343,5.0343,0.3579,5,0.8759C4.9973,0.9172,4.9973,0.9587,5,1H4.5C3.6989,1.0195,3.0466,1.65,3,2.45V6L1.5,7l2.25,4.53 C4.2143,11.2041,4.7631,11.02,5.33,11z M4,2.45c0.0105-0.2594,0.2293-0.4611,0.4886-0.4506C4.4924,1.9996,4.4962,1.9998,4.5,2h6 c0.259-0.0171,0.4829,0.1789,0.5,0.4379c0.0014,0.0207,0.0014,0.0414,0,0.0621v3l-3.5-2L4,5.45C4,5.45,4,2.45,4,2.45z M14,13v1 c-0.2626,0.0194-0.5069,0.1416-0.68,0.34c-0.2717,0.2883-0.6178,0.4959-1,0.6c-0.6147,0.1815-1.2795,0.0425-1.77-0.37l-0.39-0.35 c-0.3043-0.3026-0.7957-0.3026-1.1,0c-0.14,0.12-0.27,0.25-0.42,0.37c-0.7328,0.5856-1.7814,0.556-2.48-0.07l-0.39-0.35 c-0.2864-0.2502-0.7136-0.2502-1,0c-0.19,0.15-0.36,0.32-0.55,0.47c-0.7043,0.5215-1.6732,0.4968-2.35-0.06l-0.31-0.27 C1.4153,14.1443,1.2172,14.0346,1,14v-1c0.2585-0.032,0.5205,0.0169,0.75,0.14c0.2782,0.1722,0.5424,0.3661,0.79,0.58 c0.2051,0.2235,0.5147,0.319,0.81,0.25c0.1125-0.0333,0.2177-0.0876,0.31-0.16c0.16-0.12,0.29-0.26,0.45-0.39 c0.7106-0.5888,1.7394-0.5888,2.45,0c0.16,0.13,0.31,0.28,0.47,0.41c0.2864,0.2502,0.7136,0.2502,1,0c0.16-0.13,0.31-0.28,0.47-0.41 c0.7123-0.5943,1.7477-0.5943,2.46,0c0.15,0.13,0.29,0.27,0.44,0.39c0.2864,0.2502,0.7136,0.2502,1,0l0.47-0.41 C13.1895,13.1408,13.5886,12.9995,14,13z","ferry-JP":"M9.5 12.5H5.5L5.5 8C5.5 6.91153 6.07979 5.44812 6.85389 4.13809C7.07346 3.76652 7.29495 3.43049 7.5 3.1451C7.70505 3.43049 7.92654 3.76652 8.14611 4.13809C8.92021 5.44812 9.5 6.91153 9.5 8V12.5ZM7.5 1C7 1 4 5 4 8V12.5C4 13.3284 4.67157 14 5.5 14H9.5C10.3284 14 11 13.329 11 12.5006V8C11 5 8 1 7.5 1Z","fire-station":"M7.5 14C11.0899 14 14 11 14 7.50003C14 4.5 11.5 2 11.5 2L10.5 5.5L7.5 1L4.5 5.5L3.5 2C3.5 2 1 4.5 1 7.50003C1 11 3.91015 14 7.5 14ZM7.5 12.5C6.11929 12.5 5 11.3807 5 10C5 8.61929 7.5 5.5 7.5 5.5C7.5 5.5 10 8.61929 10 10C10 11.3807 8.88071 12.5 7.5 12.5Z","fire-station-JP":"M8.5,8.1489V11.75a1,1,0,0,1-2,0V8.1489A5.0084,5.0084,0,0,1,2.5,3.25a1,1,0,0,1,2,0,3,3,0,0,0,6,0,1,1,0,0,1,2,0A5.0082,5.0082,0,0,1,8.5,8.1489Z","fitness-centre":"M14.5,7V8h-1v2h-1v1H11V8H4v3H2.5V10h-1V8H.5V7h1V5h1V4H4V7h7V4h1.5V5h1V7Z",florist:"M1.5,1A2.7,2.7,0,0,1,4,3l.5-3L5,3A2.7,2.7,0,0,1,7.5,1c-.2.03-1,.26-1,2v.083A1.959,1.959,0,0,1,4.5,5H4.417A1.959,1.959,0,0,1,2.5,3C2.5,1.261,1.7,1.03,1.5,1ZM12.012,11l3-.5-3-.5A2.686,2.686,0,0,0,14,7.5c-.03.2-.248,1-1.988,1a2,2,0,0,0,0,4c1.739,0,1.958.8,1.988,1A2.686,2.686,0,0,0,12.012,11ZM9.688,5.548a1,1,0,0,1,0-2,1,1,0,0,1,0-2,.986.986,0,0,1,.852.507l.023-.012a.978.978,0,0,1-.116-.444,1,1,0,1,1,2,0,.978.978,0,0,1-.116.444l.019.01a.986.986,0,0,1,.85-.5,1,1,0,0,1,.025,2,1,1,0,0,1-.025,2,.986.986,0,0,1-.85-.5l-.016.009a.978.978,0,0,1,.113.44,1,1,0,0,1-2,0,.978.978,0,0,1,.113-.44l-.02-.011a.986.986,0,0,1-.852.507Zm.71-1.995A1.051,1.051,0,1,0,11.449,2.5,1.051,1.051,0,0,0,10.4,3.553v0ZM4.946,11.444l-.516-.515L8.892,6.475A1.746,1.746,0,0,1,8.44,6.22L4.076,10.575l-.519-.518A16.051,16.051,0,0,0,4.912,6a3.373,3.373,0,0,1-.412.035c-.041,0-.073-.008-.112-.01A16.953,16.953,0,0,1,3.131,9.631L2.76,9.26a.246.246,0,0,0-.4.079L.231,14.445a.287.287,0,0,0-.016.089.25.25,0,0,0,.25.25.289.289,0,0,0,.1-.019l5.1-2.124a.246.246,0,0,0,.079-.4l-.372-.372a16.874,16.874,0,0,1,3.612-1.256c0-.059-.015-.106-.015-.166A3.349,3.349,0,0,1,9,10.089,16.076,16.076,0,0,0,4.946,11.444Z",fuel:"m14 6v5.5c0 .2761-.2239.5-.5.5s-.5-.2239-.5-.5v-2c0-.8284-.6716-1.5-1.5-1.5h-1.5v-6c0-.5523-.4477-1-1-1h-6c-.5523 0-1 .4477-1 1v11c0 .5523.4477 1 1 1h6c.5523 0 1-.4477 1-1v-4h1.5c.2761 0 .5.2239.5.5v2c0 .8284.6716 1.5 1.5 1.5s1.5-.6716 1.5-1.5v-6.5c0-.5523-.4477-1-1-1v-1.51c-.0054-.2722-.2277-.4901-.5-.49-.2816.0047-.5062.2367-.5015.5184.0002.0105.0007.0211.0015.0316v2.45c0 .5523.4477 1 1 1s1-.4477 1-1-.4477-1-1-1zm-5 .5c0 .2761-.2239.5-.5.5h-5c-.2761 0-.5-.2239-.5-.5v-3c0-.2761.2239-.5.5-.5h5c.2761 0 .5.2239.5.5z",furniture:"m8.69099 10.142v-1.642c0-.13261-.05268-.25979-.14645-.35355-.09377-.09377-.22094-.14645-.35355-.14645h-1c-.13261 0-.25979.05268-.35356.14645-.09376.09376-.14644.22094-.14644.35355v1.641c-.75987.1945-1.4456.6085-1.9715 1.1905-.52591.5819-.86868 1.3059-.9855 2.0815-.01141.0723-.00702.1462.01285.2167.01987.0704.05476.1357.10227.1914s.10651.1004.17295.1311c.06643.0307.13873.0467.21193.0468h6.92201c.0732-.0001.1455-.0161.2119-.0468.0665-.0307.1255-.0754.173-.1311s.0824-.121.1022-.1914c.0199-.0705.0243-.1444.0129-.2167-.1176-.7765-.4616-1.501-.989-2.0828-.5275-.5819-1.2148-.9952-1.97601-1.1882zm4.63901-3.863-2.5-5c-.0412-.08351-.1048-.15387-.1838-.20316s-.1701-.07556-.2632-.07584h-5.38401c-.09261.00019-.18335.02609-.2621.07483-.07875.04873-.14241.11837-.1839.20117l-2.5 5c-.03809.076-.05617.16046-.05253.24539.00363.08494.02886.16754.07331.24001.04444.07247.10663.13241.18068.17416s.15753.06393.24254.06444h8.19401v1.5c0 .13261.0527.25979.1464.35355.0938.09377.221.14645.3536.14645s.2598-.05268.3535-.14645c.0938-.09376.1465-.22094.1465-.35355v-1.5h1.194c.0847-.00059.1678-.02269.2416-.06421s.1359-.1011.1804-.17317c.0444-.07207.0699-.15425.0739-.23884s-.0135-.16882-.0509-.24478z",gaming:"m13.1 11.5c-.6.3-1.4.1-1.8-.5l-1.1-1.4h-5.40002l-1.1 1.4c-.5.7-1.4.8-2.1.3-.5-.4-.700004-1-.600004-1.5l.700004-3.7c.2-1.2 1.3-2.1 2.5-2.1h2.8v-1.5c0-.8.6-1.5 1.4-1.5h3.10002c.3 0 .5.2.5.5s-.2.5-.5.5h-3.00002c-.3 0-.5.2-.5.4v.1 1.5h2.80002c1.2 0 2.3.9 2.5 2.1l.7 3.7c.1.7-.2 1.4-.9 1.7zm-7.10002-5c0-.8-.7-1.5-1.5-1.5s-1.5.7-1.5 1.5.7 1.5 1.5 1.5 1.5-.7 1.5-1.5zm6.00002 0c0-.3-.2-.5-.5-.5h-.5v-.5c0-.3-.2-.5-.5-.5s-.50002.2-.50002.5v.5h-.5c-.3 0-.5.2-.5.5s.2.5.5.5h.5v.5c0 .3.20002.5.50002.5s.5-.2.5-.5v-.5h.5c.3 0 .5-.2.5-.5z",garden:"M13,8c0,3.31-2.19,6-5.5,6S2,11.31,2,8c2.2643,0.0191,4.2694,1.4667,5,3.61V7H4.5C3.6716,7,3,6.3284,3,5.5v-3 C3,2.2239,3.2239,2,3.5,2c0.1574,0,0.3056,0.0741,0.4,0.2l1.53,2l1.65-3c0.1498-0.232,0.4593-0.2985,0.6913-0.1487 C7.8308,1.0898,7.8815,1.1404,7.92,1.2l1.65,3l1.53-2c0.1657-0.2209,0.4791-0.2657,0.7-0.1C11.9259,2.1944,12,2.3426,12,2.5v3 C12,6.3284,11.3284,7,10.5,7H8v4.61C8.7306,9.4667,10.7357,8.0191,13,8z","garden-centre":"M4,5L4,4.5C4,3.12 5.12,2 6.5,2C7.88,2 9,3.12 9,4.5L9,10.293L11.365,7.928L11.018,6.633C11.018,6.631 11.017,6.629 11.017,6.627L11.016,6.627L11.016,6.627C10.973,6.461 11.016,6.276 11.147,6.146C11.342,5.951 11.659,5.951 11.854,6.146L13.854,8.146C14.049,8.341 14.049,8.658 13.854,8.853C13.724,8.983 13.541,9.027 13.375,8.984C13.375,8.984 13.375,8.984 13.375,8.984C13.372,8.983 13.369,8.982 13.365,8.981L12.072,8.635L9,11.707L9,12C9,12.552 8.552,13 8,13L5,13C4.448,13 4,12.552 4,12L4,11.536L1.732,9.268C0.757,8.292 0.757,6.708 1.732,5.732C2.22,5.244 2.86,5 3.5,5L3.5,5L4,5ZM4,6L3.5,6L3.5,6C3.116,6 2.732,6.147 2.439,6.439C1.854,7.025 1.854,7.975 2.439,8.561L4,10.121L4,6ZM8,5L8,4.5C8,3.672 7.328,3 6.5,3C5.672,3 5,3.672 5,4.5L5,5L8,5Z",gate:"M1 2.75A.75.75 0 0 1 1.75 2h1.114c.09 0 .18.016.263.048l3.386 1.27A.75.75 0 0 1 7 4.02v5.96a.75.75 0 0 1-.487.702L3 12v.25a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1-.75-.75v-9.5Zm3 5.736v-4.87a.25.25 0 0 0-.162-.234l-.5-.187A.25.25 0 0 0 3 3.429v5.224c0 .17.167.291.33.237l.5-.166A.25.25 0 0 0 4 8.486ZM5 4.18v3.807a.25.25 0 0 0 .33.238l.5-.167A.25.25 0 0 0 6 7.82V4.366a.25.25 0 0 0-.162-.234l-.5-.187A.25.25 0 0 0 5 4.179Zm9-1.43a.75.75 0 0 0-.75-.75h-1.114a.75.75 0 0 0-.263.048l-3.386 1.27A.75.75 0 0 0 8 4.02v5.96a.75.75 0 0 0 .487.702L12 12v.25c0 .414.336.75.75.75h.5a.75.75 0 0 0 .75-.75v-9.5Zm-2.83 5.974a.25.25 0 0 1-.17-.238v-4.87a.25.25 0 0 1 .162-.234l.5-.187a.25.25 0 0 1 .338.234v5.224a.25.25 0 0 1-.33.237l-.5-.166ZM10 4.179v3.807a.25.25 0 0 1-.33.238l-.5-.167A.25.25 0 0 1 9 7.82V4.366a.25.25 0 0 1 .162-.234l.5-.187a.25.25 0 0 1 .338.234Z",gift:"M10.5 1.00152C9.0967.957116 7.8503 1.89192 7.5 3.25152 7.1497 1.89192 5.9033.957116 4.5 1.00152 2.7678.947006 2.23515 2.79746 2.81831 4H1.5C1.22386 4 1 4.22386 1 4.5V5.5C1 5.77614 1.22386 6 1.5 6H13.5C13.7761 6 14 5.77614 14 5.5V4.5C14 4.22386 13.7761 4 13.5 4H12.1938C12.8 2.81516 12.2922 1.00143 10.5404 1.00112 10.5269 1.00112 10.5135 1.00122 10.5 1.00152ZM10.6831 4H8.5C8.50082 2.8961 9.3959 2.00152 10.5 2.00152 11.675 2.00152 11.8827 3.87414 10.6831 4ZM6.5 4H4.29187C3.25675 3.88256 3.19576 2.10553 4.3323 2.00152 4.3881 1.99642 4.4442 1.99642 4.5 2.00152 5.60409 2.00152 6.49918 2.8961 6.5 4ZM2 7.00146V11.5015C2 12.3299 2.6716 13.0015 3.5 13.0015H6.5V7.00146H2ZM8.5 7.00146V13.0015H11.5C12.3284 13.0015 13 12.3299 13 11.5015V7.00146H8.5Z",globe:"M11.981,9.481,11.26,8.76A4.979,4.979,0,1,1,4.24,1.74l-.721-.721A5.991,5.991,0,0,0,7,11.475V13H6.5a.5.5,0,0,0,0,1h2a.5.5,0,0,0,0-1H8V11.473A5.983,5.983,0,0,0,11.981,9.481ZM7.5,9A3.5,3.5,0,1,0,4,5.5,3.5,3.5,0,0,0,7.5,9Zm1-5,.364-.592a2.5,2.5,0,0,1,.823.9L9.5,5h-1ZM6.656,3.156,7.5,4V5L8,6H9.94a2.494,2.494,0,0,1-1.5,1.814L8,7H6.5L5.05,5A2.5,2.5,0,0,1,6.656,3.156Z",golf:"M3.3999,1.1c0,0.1,0,0.2,0,0.2c0,0.4,0.3,0.7,0.7,0.7c0.3,0,0.5-0.2,0.6-0.5l0,0L4.9,1l5.6,2.3L6.6,6C6.2,6.3,6.2,6.7,6.3,7.1 l0.9,2.1l-1.3,3.9C5.7,13.6,6.1,14,6.5,14c0.3,0,0.5-0.1,0.6-0.5l1.4-4l0.1,0.3v3.5c0,0,0,0.7,0.7,0.7s0.7-0.7,0.7-0.7V10 c0-0.2,0-0.3-0.1-0.5L8.5,6.1l2.7-1.9c0.2-0.2,0.4-0.3,0.4-0.6s-0.2-0.5-0.4-0.6L4,0.1c-0.0878,0-0.118,0.0179-0.2001,0.1 L3.3999,1.1z M5.5,3C4.7,3,4,3.7,4,4.5S4.7,6,5.5,6S7,5.3,7,4.5S6.2999,3,5.5,3z",grocery:"M 13.199219 1.5 C 13.199219 1.5 11.808806 1.4588 11.253906 2 C 10.720406 2.5202 10.5 2.9177 10.5 4 L 1.1992188 4 L 2.59375 8.8144531 C 2.59725 8.8217531 2.6036219 8.8287375 2.6074219 8.8359375 C 2.8418219 9.4932375 3.4545469 9.9666406 4.1855469 9.9941406 C 4.1885469 9.9954406 4.1992187 10 4.1992188 10 L 10.699219 10 L 10.699219 10.199219 C 10.699219 10.199219 10.7 10.500391 10.5 10.900391 C 10.3 11.300391 10.200391 11.5 9.4003906 11.5 L 2.9003906 11.5 C 1.9003906 11.5 1.9003906 13 2.9003906 13 L 4.0996094 13 L 4.1992188 13 L 9.0996094 13 L 9.1992188 13 L 9.3007812 13 C 10.500781 13 11.399219 12.299609 11.699219 11.599609 C 11.999219 10.899609 12 10.300781 12 10.300781 L 12 10 L 12 4 C 12 3.4764 12.228619 3 12.699219 3 L 13.25 3 C 13.6642 3 14 2.6642 14 2.25 C 14 1.8358 13.6642 1.5 13.25 1.5 L 13.199219 1.5 z M 9.1992188 13 C 8.5992188 13 8.1992188 13.4 8.1992188 14 C 8.1992188 14.6 8.5992187 15 9.1992188 15 C 9.7992187 15 10.199219 14.6 10.199219 14 C 10.199219 13.4 9.7992188 13 9.1992188 13 z M 4.1992188 13 C 3.5992188 13 3.1992188 13.4 3.1992188 14 C 3.1992188 14.6 3.5992187 15 4.1992188 15 C 4.7992188 15 5.1992188 14.6 5.1992188 14 C 5.1992188 13.4 4.7992187 13 4.1992188 13 z",hairdresser:"M15,3c0,0-2-0.6-3.5,0.5l-4.3,3C6.4,5.9,5.2,5.2,4,4.8V4c0-1.1-0.9-2-2-2C0.9,2,0,2.9,0,4v1.5 C0,6,0.5,6,0.5,6H2h0.5C4.5,6,6,7.5,6,7.5S4.5,9,2.5,9H2H0.5C0.5,9,0,9,0,9.5V11c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2v-0.8 c1.2-0.4,2.4-1.1,3.2-1.7l4.3,3C13,12.6,15,12,15,12L8.5,7.5L15,3z M3,5H2H1V4c0-0.6,0.4-1,1-1c0.6,0,1,0.4,1,1V5z M3,11 c0,0.6-0.4,1-1,1c-0.6,0-1-0.4-1-1v-1h1h1V11z M7.25,8c-0.2761,0-0.5-0.2239-0.5-0.5S6.9739,7,7.25,7s0.5,0.2239,0.5,0.5 S7.5261,8,7.25,8z",harbor:"M7.5,0C5.5,0,4,1.567,4,3.5c0.0024,1.5629,1.0397,2.902,2.5,3.3379v6.0391 c-0.9305-0.1647-1.8755-0.5496-2.6484-1.2695C2.7992,10.6273,2.002,9.0676,2.002,6.498c0.0077-0.5646-0.4531-1.0236-1.0176-1.0137 C0.4329,5.493-0.0076,5.9465,0,6.498c0,3.0029,1.0119,5.1955,2.4902,6.5723C3.9685,14.4471,5.8379,15,7.5,15 c1.6656,0,3.535-0.5596,5.0117-1.9395S14.998,9.4868,14.998,6.498c0.0648-1.3953-2.0628-1.3953-1.998,0 c0,2.553-0.7997,4.1149-1.8535,5.0996C10.3731,12.3203,9.4288,12.7084,8.5,12.875V6.8418C9.9607,6.4058,10.9986,5.0642,11,3.5 C11,1.567,9.5,0,7.5,0z M7.5,2C8.3284,2,9,2.6716,9,3.5S8.3284,5,7.5,5S6,4.3284,6,3.5S6.6716,2,7.5,2z",hardware:"M13.7919,3.2619c0,0-1.676,1.675-2.1163,2.1208c-0.085,0.0861-0.1688,0.1135-0.282,0.0961 c-0.1481-0.0226-0.2974-0.038-0.4462-0.0558c-0.4072-0.0485-0.8145-0.0966-1.2292-0.1458C9.649,4.6852,9.5787,4.1049,9.5177,3.5236 C9.512,3.4689,9.5509,3.3943,9.5925,3.3522c0.5071-0.5134,1.9261-1.9287,2.134-2.136c-0.4508-0.2129-1.2243-0.2968-1.8007-0.2031 c-2.1801,0.3543-3.5112,2.534-2.8206,4.625C7.1432,5.753,7.1194,5.8201,7.0374,5.902C5.1891,7.7454,3.3436,9.5914,1.498,11.4374 c-0.0616,0.0616-0.1231,0.124-0.1779,0.1913c-0.5264,0.6473-0.3873,1.6264,0.2974,2.102c0.6044,0.4197,1.3658,0.3442,1.9053-0.1948 c1.8534-1.8519,3.7059-3.7047,5.556-5.5598C9.1707,7.884,9.2437,7.8526,9.3779,7.8983c0.6189,0.2109,1.2524,0.2354,1.8884,0.0884 c1.9386-0.4478,3.1251-2.3732,2.6549-4.3034C13.8895,3.5532,13.843,3.4244,13.7919,3.2619z",heart:"m13.91 7.75001c-1.17 2.24999-4.30002 5.30999-6.07002 6.93999-.1903.1718-.4797.1718-.67 0-1.78-1.63-4.91-4.69-6.08-6.93999-2.57-4.95 3.91-8.250002 6.41-3.3 2.5-4.950002 8.98002-1.65 6.41002 3.3z",heliport:"M4,2C3,2,3,3,4,3h4v1C7.723,4,7.5,4.223,7.5,4.5V5H5H3.9707H3.9316 C3.7041,4.1201,2.9122,3.5011,2,3.5c-1.1046,0-2,0.8954-2,2s0.8954,2,2,2c0.3722-0.001,0.7368-0.1058,1.0527-0.3027L5.5,10.5 C6.5074,11.9505,8.3182,12,9,12h5c0,0,1,0,1-1v-0.9941C15,9.2734,14.874,8.874,14.5,8.5l-3-3c0,0-0.5916-0.5-1.2734-0.5H9.5V4.5 C9.5,4.223,9.277,4,9,4V3h4c1,0,1-1,0-1C13,2,4,2,4,2z M2,4.5c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1s-1-0.4477-1-1 C1,4.9477,1.4477,4.5,2,4.5z M10,6c0.5,0,0.7896,0.3231,1,0.5L13.5,9H10c0,0-1,0-1-1V7C9,7,9,6,10,6z","highway-rest-area":"M13.5,13h-3V9h3a.5.5,0,0,0,.4092-.7871L11.66,5h.84a.5.5,0,0,0,.3838-.82l-2.5-3a.5155.5155,0,0,0-.7676,0l-2.5,3A.5.5,0,0,0,7.5,5h.84L6.0908,8.2129A.5.5,0,0,0,6.5,9h3v4H4V11H5.5a.5.5,0,0,0,0-1h-4a.5.5,0,0,0,0,1H3v2H1.5a.5.5,0,0,0,0,1h12a.5.5,0,0,0,0-1Z",historic:"m7.5 1c-1 0-1 1-2 1h-3.5c-.54467 0-1 .45533-1 1v7c0 .5447.45533 1 1 1h5v2.5s0 .5.5.5.5-.5.5-.5v-2.5h5c.5447 0 1-.4553 1-1v-7c0-.54467-.4553-1-1-1h-3.5c-1 0-1-1-2-1zm-4.5 4v-1h9v1zm0 1h4v1h-4zm0 2h7v1h-7z",home:"M2,13.7478c0,0.13807,0.11193,0.25,0.25,0.25h3.749v-3h3v3h3.749c0.13807,0,0.25-0.11193,0.25-0.25V7.9987H2 C2,7.9987,2,13.7478,2,13.7478z M13.93,6.5778l-0.9319-0.8189V2c0-0.55228-0.44771-1-1-1s-1,0.44772-1,1v2L7.6808,1.09 C7.5863,0.9897,7.42846,0.98478,7.3279,1.079L7.3169,1.09L1.0678,6.553C0.9734,6.65376,0.97856,6.81197,1.07932,6.90637 C1.12478,6.94896,1.18451,6.97304,1.2468,6.9739L3,6.9989h10.7468c0.13807,0.00046,0.25037-0.1111,0.25083-0.24917 C13.99784,6.68592,13.97365,6.62445,13.93,6.5779V6.5778z","horse-riding":"M6,1A1,1,0,1,1,7,2,1,1,0,0,1,6,1ZM8,3.5a.484.484,0,0,0,0-.058A.472.472,0,0,0,7.5,3h-1a.484.484,0,0,0-.058,0A.472.472,0,0,0,6,3.5V7H8Zm6.85,3.644L12.8,4.8l.085-.509a.478.478,0,0,0,.008-.063.25.25,0,0,0-.25-.25.346.346,0,0,0-.158.056L9,7H8L9,8V9.5a.5.5,0,0,1-1,0v-1L6,7H4a1.5,1.5,0,0,0-1.243.661A1.466,1.466,0,0,0,1.563,7H1.5A1.449,1.449,0,0,0,0,8.4v.086A3.781,3.781,0,0,0,.559,10.4a.278.278,0,0,0,.191.1A.25.25,0,0,0,1,10.25V9s-.02-.924.753-1c.5-.048.747.253.747.5V11L2,13v1.75a.25.25,0,0,0,.25.25.254.254,0,0,0,.25-.234V13L4,11v1l.5,2.8a.255.255,0,0,0,.246.2A.25.25,0,0,0,5,14.754H5L4.855,12.3,5.5,11H8v1l.508,2.813A.257.257,0,0,0,8.75,15,.25.25,0,0,0,9,14.75V12l.367-1a1.155,1.155,0,0,0,.543-.6l2.161-3.767a.863.863,0,0,0,1.023.4l1.066.818a.591.591,0,0,0,.35.135.487.487,0,0,0,.475-.4A.552.552,0,0,0,14.85,7.144Z",hospital:"M7,1C6.4,1,6,1.4,6,2v4H2C1.4,6,1,6.4,1,7v1 c0,0.6,0.4,1,1,1h4v4c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1V9h4c0.6,0,1-0.4,1-1V7c0-0.6-0.4-1-1-1H9V2c0-0.6-0.4-1-1-1H7z","hospital-JP":"m12.5038 3h-10.00777c-.26639.00235-.52096.11039-.70772.30036-.18677.18998-.29046.44634-.28828.71274v5.5807c-.00063.18713.05047.37079.14765.5307.09718.1599.23667.2899.40305.3755l4.78 2.8394c.20725.1056.43653.1606.6691.1606.23258 0 .46186-.055.6691-.1606l4.78037-2.8394c.1664-.0856.3059-.2155.4031-.3755.0972-.15989.1483-.34357.1476-.5307v-5.5807c.0012-.13194-.0237-.2628-.0732-.38512-.0494-.12232-.1225-.2337-.215-.32777-.0925-.09408-.2027-.16901-.3241-.22052-.1215-.05151-.2519-.07859-.3839-.07969zm-2.0038 5.5h-1.99997v2h-2v-2h-2v-2h2v-2h2v2h1.99997z","hot-spring":"M6.682,5.759c-.505-.725-.781-1.121-.63-2.376,.139-1.156,.678-1.616,1.198-2.059,.404-.345,.797-.68,.981-1.324,.301,.722-.036,1.47-.349,2.164-.311,.691-.599,1.329-.211,1.836,.971,1.271,1.963,2.88,.971,4.586-.214,.393-.539,.681-.861,.968-.422,.375-.841,.747-1.004,1.348-.269-.677,.008-1.366,.285-2.052,.306-.759,.61-1.516,.172-2.251-.203-.34-.389-.607-.551-.84Zm3.371-1.174c-.098-.632,.034-1.281,.368-1.809,.367-.45,.701-.642,.991-.81,.345-.199,.627-.362,.83-.877,.289,.684,0,1.188-.304,1.718-.119,.207-.24,.418-.329,.645-.191,.61,.101,.893,.467,1.247,.358,.346,.786,.76,.899,1.617,.083,.635-.036,1.156-.372,1.684-.356,.436-.681,.655-.965,.846-.356,.24-.648,.437-.856,.965-.292-.688,.031-1.259,.353-1.828,.123-.217,.246-.434,.334-.658,.073-.558-.234-.867-.581-1.217-.357-.36-.757-.763-.834-1.523Zm-8.018,0c-.098-.632,.005-1.3,.368-1.809,.376-.528,.729-.717,1.035-.881,.323-.173,.594-.318,.786-.806,.289,.683-.014,1.208-.325,1.749-.122,.212-.246,.427-.336,.655-.152,.385,.131,1.014,.501,1.242,1.002,.801,1.227,2.286,.547,3.353-.366,.448-.704,.648-.999,.823-.353,.209-.645,.382-.849,.898-.278-.656,.008-1.18,.3-1.714,.131-.24,.263-.481,.345-.737,.179-.557-.134-.884-.51-1.277-.349-.365-.752-.785-.863-1.498Zm10.965,4.414c.7,2.616-3.474,3-5.5,3s-6.2-.484-5.5-3c-.633,.316-1,.961-1,1.5,0,1.519,2.91,2.9,6.5,2.9s6.5-1.381,6.5-2.9c0-.539-.367-1.184-1-1.5Z","ice-cream":"M5.44,8.17a3.473,3.473,0,0,0,2-.63A3.5,3.5,0,0,0,9,8.14h.44L8,13.7a.5.5,0,0,1-.92,0Zm6-3.473a2,2,0,0,1-4,0h0a2,2,0,1,1-2-2h.12a2,2,0,1,1,3.75,0h.13A2,2,0,0,1,11.439,4.7Z",industry:"M14,1v12H1V8.72c0.0016-0.1419,0.0634-0.2764,0.17-0.37l3-3.22c0.2074-0.1823,0.5234-0.1618,0.7056,0.0456 C4.9568,5.268,5.0011,5.387,5,5.51v3l3.16-3.37c0.2025-0.1878,0.5188-0.1759,0.7066,0.0266C8.9532,5.2599,9.0009,5.3827,9,5.51V11h3 V1H14z",information:"M7.5,1 C6.7,1,6,1.7,6,2.5S6.7,4,7.5,4S9,3.3,9,2.5S8.3,1,7.5,1z M4,5v1c0,0,2,0,2,2v2c0,2-2,2-2,2v1h7v-1c0,0-2,0-2-2V6c0-0.5-0.5-1-1-1H4 z","jewelry-store":"M12,8.5c0,2.4853-2.0147,4.5-4.5,4.5S3,10.9853,3,8.5c0-1.8483,1.1164-3.4329,2.7099-4.1255l0.1761,0.137l0.7739,0.6019 C5.1366,5.4922,4,6.8611,4,8.5C4,10.4299,5.5701,12,7.5,12S11,10.4299,11,8.5c0-1.6389-1.1366-3.0078-2.6599-3.3866l0.95-0.7388 C10.8836,5.0672,12,6.6517,12,8.5z M7.5,4.5L10,2.5555L9,1H6L5,2.5555l1.5,1.1667L7.5,4.5z",karaoke:"M12.1,2.952A2.988,2.988,0,0,0,6.99,4.917l3.142,3.142A2.988,2.988,0,0,0,12.1,2.952Zm-7.428,5.3L2.55,10.377a1,1,0,0,0,0,1.414l.707.707a1,1,0,0,0,1.414,0l2.121-2.121L8.914,8.255,6.793,6.134Zm.741,2.087-.707-.707L6.793,7.548l.707.707Z",landmark:"M12.5,12H12v-0.5c0-0.3-0.2-0.5-0.5-0.5H11V6h1l1-2c-1,0.1-2,0.1-3,0C9.2,3.4,8.6,2.8,8,2V1.5C8,1.2,7.8,1,7.5,1 S7,1.2,7,1.5V2C6.4,2.8,5.8,3.4,5,4C4,4.1,3,4.1,2,4l1,2h1v5c0,0-0.5,0-0.5,0C3.2,11,3,11.2,3,11.5V12H2.5C2.2,12,2,12.2,2,12.5V13 h11v-0.5C13,12.2,12.8,12,12.5,12z M7,11H5V6h2V11z M10,11H8V6h2V11z","landmark-JP":"m9.5 4c0 .39556-.1173.78224-.33706 1.11114s-.53212.58524-.89757.73662c-.36545.15137-.76759.19098-1.15555.11381s-.74433-.26765-1.02403-.54736c-.27971-.2797-.47019-.63607-.54736-1.02403s-.03756-.79009.11381-1.15555c.15138-.36545.40772-.67781.73662-.89757s.71558-.33706 1.11114-.33706c.53043 0 1.03914.21071 1.41421.58579.37508.37507.58579.88378.58579 1.41421zm-6 4c-.39556 0-.78224.1173-1.11114.33706s-.58524.53212-.73662.89757c-.15137.36546-.19098.76757-.11381 1.15557.07717.3879.26765.7443.54736 1.024.2797.2797.63607.4702 1.02403.5474.38796.0771.7901.0375 1.15555-.1138.36545-.1514.67781-.4078.89757-.7367s.33706-.7155.33706-1.1111c0-.53043-.21071-1.03914-.58579-1.41421-.37507-.37508-.88378-.58579-1.41421-.58579zm8 0c-.3956 0-.7822.1173-1.1111.33706s-.58528.53212-.73666.89757c-.15137.36546-.19098.76757-.11381 1.15557.07717.3879.26765.7443.54737 1.024.2797.2797.6361.4702 1.024.5474.388.0771.7901.0375 1.1556-.1138.3654-.1514.6778-.4078.8975-.7367.2198-.3289.3371-.7155.3371-1.1111 0-.53043-.2107-1.03914-.5858-1.41421-.3751-.37508-.8838-.58579-1.4142-.58579z",landuse:"m8.911 2.85401c.02782.02324.05021.0523.06558.08512.01538.03283.02337.06863.02342.10488v3.706c0 .0663-.02634.12989-.07322.17678-.04689.04688-.11048.07322-.17678.07322h-2.5c-.0663 0-.12989-.02634-.17678-.07322-.04688-.04689-.07322-.11048-.07322-.17678v-1.75h-1v1.75c0 .0663-.02634.12989-.07322.17678-.04689.04688-.11048.07322-.17678.07322h-2.5c-.0663 0-.12989-.02634-.17678-.07322-.04688-.04689-.07322-.11048-.07322-.17678v-3.7c.00005-.03625.00804-.07205.02342-.10488.01537-.03282.03776-.06188.06558-.08512l3.254-2.728c.04413-.0370337.09989-.0573335.1575-.0573335s.11337.0202998.1575.0573335zm-1.159 5.646c-.04915.00002-.09718.01464-.138.042l-2.614 1.95799h-1v-1.99999c0-.13261-.05268-.25979-.14645-.35355-.09376-.09377-.22094-.14645-.35355-.14645s-.25979.05268-.35355.14645c-.09377.09376-.14645.22094-.14645.35355v1.99999h-1v-1.99999c0-.13261-.05268-.25979-.14645-.35355-.09376-.09377-.22094-.14645-.35355-.14645s-.25979.05268-.35355.14645c-.09377.09376-.14645.22094-.14645.35355v4.24999c0 .0663.02634.1299.07322.1768.04689.0469.11048.0732.17678.0732h6.5c.0663 0 .12989-.0263.17678-.0732.04688-.0469.07322-.1105.07322-.1768v-3.99999c.00026-.03274-.00596-.0652-.0183-.09552-.01235-.03032-.03057-.0579-.05363-.08114-.02305-.02324-.05048-.04168-.0807-.05427s-.06263-.01907-.09537-.01907zm6.248-3.255v6.49999c0 .0671-.0267.1315-.0741.1789-.0474.0475-.1118.0741-.1789.0741h-3.494c-.0668 0-.1308-.0264-.1782-.0734s-.0743-.1108-.0748-.1776v-6.49699c-.00013-.03287.0062-.06544.0188-.09583.0125-.03039.0309-.058.0541-.08124.0233-.02324.0509-.04165.0813-.05417s.0629-.01889.0958-.01876h.75v-.751c0-.06604.0262-.12937.0729-.17607s.1101-.07293.1761-.07293h1.5c.0668.00053.1306.02742.1776.07481.047.04738.0734.11144.0734.17819v.747h.755c.065 0 .1273.02581.1732.07176.046.04595.0718.10826.0718.17324zm-1 4.75499h-2v1h2zm0-1.99999h-2v1h2zm0-2h-2v1h2z",laundry:"M8,1L6,3H3c0,0-1,0-1,1v9c0,1,1,1,1,1h9c0,0,1,0,1-1V2c0-1-1-1-1-1 S8,1,8,1z M8.5,2h2C10.777,2,11,2.223,11,2.5S10.777,3,10.5,3h-2C8.223,3,8,2.777,8,2.5S8.223,2,8.5,2z M7.5,6 c1.6569,0,3,1.3431,3,3s-1.3431,3-3,3s-3-1.3431-3-3S5.8431,6,7.5,6z",library:"M1.0819,9.9388C0.9871,9.867,1.0007,9.7479,1.0007,9.7479L1.5259,3.5c0,0,0.0082-0.0688,0.0388-0.104 C1.584,3.374,1.6084,3.342,1.6544,3.3232C2.1826,3.1072,5.0537,1.5519,6.5,3c0.2397,0.2777,0.4999,0.6876,0.4999,1v5.2879 c0,0,0.0062,0.1122-0.0953,0.1801c-0.0239,0.016-0.124,0.0616-0.242,0.0026c-2.2253-1.1134-4.711,0.1546-5.3381,0.4871 C1.1987,10.0244,1.1006,9.9531,1.0819,9.9388z M13.6754,9.9577c-0.6271-0.3325-3.1128-1.6005-5.3381-0.4871 c-0.118,0.059-0.2181,0.0134-0.242-0.0026C7.9939,9.4001,8.0001,9.2879,8.0001,9.2879V4c0-0.3124,0.2602-0.7223,0.4999-1 c1.4463-1.4481,4.2991,0.1071,4.8273,0.3232c0.046,0.0188,0.0704,0.0508,0.0897,0.0728C13.4476,3.4312,13.4558,3.5,13.4558,3.5 l0.5435,6.2479c0,0,0.0136,0.1191-0.0812,0.1909C13.8994,9.9531,13.8013,10.0244,13.6754,9.9577z M8.8647,12.6863 c0.0352-0.0085,0.0964-0.0443,0.1179-0.0775c0.0236-0.0364,0.0378-0.0617,0.0423-0.1088c0.0495-0.9379,1.6245-1.8119,4.6477-0.0298 c0.0775,0.0441,0.1666,0.0396,0.2425-0.0155C14.0014,12.392,14,12.2859,14,12.2859v-0.5542c0,0,0.0003-0.0764-0.0272-0.1184 c-0.0205-0.0312-0.0476-0.0643-0.0926-0.0858c-2.0254-1.3145-4.5858-1.8972-5.8854-0.1592 c-0.0181,0.0423-0.0353,0.0613-0.0728,0.0905C7.8654,11.5028,7.7964,11.5,7.7964,11.5H7.2109c0,0-0.069,0.0028-0.1256-0.0412 c-0.0375-0.0292-0.0547-0.0482-0.0728-0.0905c-1.2996-1.738-3.86-1.1828-5.8854,0.1317c-0.045,0.0215-0.0721,0.0546-0.0926,0.0858 c-0.0275,0.042-0.0272,0.1184-0.0272,0.1184v0.5542c0,0-0.0014,0.1061,0.0849,0.1688c0.0759,0.0551,0.165,0.0596,0.2425,0.0155 c3.0232-1.7821,4.5982-0.8806,4.6477,0.0573c0.0045,0.0471,0.0187,0.0724,0.0423,0.1088c0.0215,0.0332,0.0827,0.069,0.1179,0.0775 C6.8645,12.8656,7.9112,12.9363,8.8647,12.6863z","lift-gate":"M1 4a2 2 0 1 1 4 0v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4Zm3 0a1 1 0 1 0-2 0 1 1 0 0 0 2 0Zm4.5 2L7 3H6v3h2.5ZM10 6h1.5L10 3H8.5L10 6Zm3.25 0H13l-1.5-3h1.75a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-.75.75Z",lighthouse:"M4.5,6L0,7V6.5l4.5-1V6z M4.5,3.5L0,2.5V3l4.5,1V3.5z M10.5,3.5V4L15,3V2.5L10.5,3.5z M10.5,6L15,7V6.5l-4.5-1V6z M8,7V2 h2.5c0.2761,0.0552,0.5448-0.1239,0.6-0.4c0.0552-0.2761-0.1239-0.5448-0.4-0.6l-3-1C7.5696-0.0586,7.4204-0.0586,7.29,0l-3,1 c-0.2761,0.0552-0.4552,0.3239-0.4,0.6S4.2139,2.0552,4.49,2H7v5H5l-2,7h9l-2-7H8z","lighthouse-JP":"M9.5,7.4c0,1.1-0.9,2-2,2s-2-0.9-2-2s0.9-2,2-2C8.6,5.4,9.5,6.3,9.5,7.4z M14,7.5C14,7.8,13.8,8,13.5,8h-1.6 c-0.1,0.9-0.311,1.582-0.911,2.282l1.064,1.064c0.2,0.2,0.196,0.504-0.004,0.704c-0.209,0.209-0.5,0.207-0.704,0.004L10.3,11 c-0.6,0.5-1.4,0.8-2.3,0.9v1.6C8,13.8,7.8,14,7.5,14S7,13.8,7,13.5v-1.6c-0.9-0.1-1.7-0.4-2.3-0.9l-1.1,1.1 c-0.207,0.207-0.48,0.213-0.696-0.004c-0.2-0.2-0.207-0.5-0.007-0.7L4,10.3C3.5,9.7,3.1,8.9,3,8H1.5C1.2,8,1,7.8,1,7.5S1.2,7,1.5,7 H3c0.1-0.9,0.4-1.7,1-2.4l-1-1C2.8,3.4,2.8,3.1,3,2.9s0.5-0.2,0.7,0l1,1l0,0C5.3,3.4,6.1,3.1,7,3V1.5C7,1.2,7.2,1,7.5,1S8,1.2,8,1.5 V3c0.9,0.1,1.7,0.5,2.3,1l0,0l1.1-1.1c0.2-0.2,0.5-0.2,0.7,0s0.2,0.5,0,0.7L11,4.7l0,0c0.5,0.7,0.8,1.4,0.9,2.3h1.6 C13.8,7,14,7.2,14,7.5z M11.1,7.4c0-2-1.6-3.6-3.6-3.6S3.8,5.5,3.8,7.4S5.4,11,7.4,11S11.1,9.4,11.1,7.4z",lodging:"M0.5,2.5C0.2,2.5,0,2.7,0,3v7.5v2C0,12.8,0.2,13,0.5,13S1,12.8,1,12.5V11h13v1.5 c0,0.3,0.2,0.5,0.5,0.5s0.5-0.2,0.5-0.5v-2c0-0.3-0.2-0.5-0.5-0.5H1V3C1,2.7,0.8,2.5,0.5,2.5z M3.5,3C2.7,3,2,3.7,2,4.5l0,0 C2,5.3,2.7,6,3.5,6l0,0C4.3,6,5,5.3,5,4.5l0,0C5,3.7,4.3,3,3.5,3L3.5,3z M7,4C5.5,4,5.5,5.5,5.5,5.5V7h-3C2.2,7,2,7.2,2,7.5v1 C2,8.8,2.2,9,2.5,9H6h9V6.5C15,4,12.5,4,12.5,4H7z",logging:"M13.91,3.41,13.5,3l.2-.28c.02-.03.04-.05.06-.08A.969.969,0,0,0,14,1.99a1,1,0,0,0-1.62-.77c-.03.02-.06.05-.09.07L12,1.5l-.386-.386a.354.354,0,0,0-.525.475l.417.417-.5.5-.392-.392a.354.354,0,0,0-.525.475L10.5,3l-.5.5-.381-.381a.354.354,0,1,0-.528.472h0l.028.028L9.5,4,9,4.5l-.395-.395a.354.354,0,0,0-.517.483L8.5,5,8,5.5l-.365-.365a.354.354,0,0,0-.556.439h0C7.1,5.6,7.508,6,7.508,6L7,6.5l-.394-.392a.392.392,0,0,0-.5-.028.384.384,0,0,0-.028.5L6.1,6.6l.4.4L6,7.5l-.4-.4a.37.37,0,0,0-.5,0L6.248,8.244,12.09,2.41,12.5,2H13v.5l-.41.41L6.751,8.749,7.9,9.9a.355.355,0,0,0,0-.5l-.008-.009L7.5,9,8,8.5l.384.384a.354.354,0,0,0,.528-.472L8.5,8,9,7.5l.38.38a.354.354,0,0,0,.528-.472l-.02-.02L9.5,7l.5-.5.377.377A.35.35,0,0,0,10.64,7a.347.347,0,0,0,.252-.6L10.5,6l.5-.5.38.38a.354.354,0,0,0,.528-.472L11.88,5.38,11.5,5l.5-.5.381.381a.354.354,0,0,0,.528-.472l-.025-.025L12.5,4l.5-.5.382.382a.354.354,0,0,0,.528-.472ZM4.39,7.916C3.893,7.419,3.641,7,3,7H1.5a.5.5,0,0,0-.5.5v3A2.19,2.19,0,0,0,1.5,12l.815.811A2.251,2.251,0,0,0,5.493,13h0L7.5,11ZM3.5,10,2.262,11.238A1.3,1.3,0,0,1,2,10.5V8H3a.545.545,0,0,1,.335.194.455.455,0,0,1,.165.418Z",marker:"M7.5 1C5.42312 1 3 2.2883 3 5.56759C3 7.79276 6.46156 12.7117 7.5 14C8.42309 12.7117 12 7.90993 12 5.56759C12 2.2883 9.57688 1 7.5 1Z","marker-stroked":"M5.11697 2.81756C5.76952 2.26561 6.65195 2 7.5 2C8.34805 2 9.23048 2.26561 9.88303 2.81756C10.5075 3.34579 11 4.20017 11 5.56759C11 5.94031 10.8461 6.52407 10.5105 7.29145C10.1859 8.03354 9.73523 8.85087 9.24257 9.65811C8.64175 10.6426 7.999 11.5793 7.48195 12.3097C6.96023 11.5798 6.31599 10.6233 5.71947 9.62296C5.2343 8.80934 4.79303 7.98717 4.47608 7.24844C4.14708 6.48162 4 5.91216 4 5.56759C4 4.20017 4.49248 3.34579 5.11697 2.81756ZM8.10767 13.1554C9.45904 11.2632 12 7.54181 12 5.56759C12 2.2883 9.57688 1 7.5 1C5.42312 1 3 2.2883 3 5.56759C3 7.44926 5.47533 11.2572 6.86751 13.1671C7.12165 13.5157 7.3397 13.8011 7.5 14C7.55627 13.9215 7.62241 13.8299 7.697 13.7266C7.81469 13.5636 7.95343 13.3714 8.10767 13.1554Z","mobile-phone":"M10,2h0V1.5a.5.5,0,0,0-1,0V2H5A1,1,0,0,0,4,3V13a1,1,0,0,0,1,1h5a1,1,0,0,0,1-1V3A1,1,0,0,0,10,2ZM6,13H5V12H6Zm0-2H5V10H6ZM6,9H5V8H6Zm2,4H7V12H8Zm0-2H7V10H8ZM8,9H7V8H8Zm2,4H9V12h1Zm0-2H9V10h1Zm0-2H9V8h1Zm0-2.5a.5.5,0,0,1-.5.5h-4A.5.5,0,0,1,5,6.5v-3A.5.5,0,0,1,5.5,3h4a.5.5,0,0,1,.5.5Z",monument:"M7.5,0L6,2.5v7h3v-7L7.5,0z M3,11.5 L3,15h9v-3.5L10.5,10h-6L3,11.5z","monument-JP":"M12,13H4c-0.5,0-1-0.5-1-1V5c0-2,0.8-4,4-4c3.1,0,4,2,4,4v6h1c0.5,0,1,0.5,1,1S12.5,13,12,13z M5,11h4V5c0-1,0-2-2-2 S5,4,5,5V11z",mountain:"m7.5 1c-.3 0-.4.2-.6.4l-5.8 9.5c-.1.1-.1.3-.1.4 0 .5.4.7.7.7h11.6c.4 0 .7-.2.7-.7 0-.2 0-.2-.1-.4l-5.7-9.5c-.2-.2-.4-.4-.7-.4zm0 1.5 3.3 5.5h-.8l-1.5-1.5-1 1.5-1-1.5-1.5 1.5h-.9z",museum:"M7.5,0L1,3.5V4h13V3.5L7.5,0z M2,5v5l-1,1.6V13h13v-1.4L13,10V5H2z M4,6h1v5.5H4V6z M7,6h1v5.5H7V6z M10,6h1 v5.5h-1V6z",music:"m12.5 0c-.0804.0008-.1594.0213999-.23.0599999l-8.77 2.4400001c-.2761 0-.5.2239-.5.5v6.28c-.3029-.1798-.6478-.2763-1-.28-1.1046 0-2 .8954-2 2s.8954 2 2 2 2-.8954 2-2v-4.64l8-2.22v3.64c-.3029-.1798-.6478-.2763-1-.28-1.1046 0-2 .8954-2 2s.8954 2 2 2 2-.8954 2-2v-9c0-.2761-.2239-.5-.5-.5zm-.5 3.14-8 2.22v-2l8-2.22z",natural:"M8.753,6.278a.5.5,0,0,1-.51,0A4.109,4.109,0,0,1,6.5,3.5a2.779,2.779,0,0,0-.59-1.506l-.019-.027a.257.257,0,0,1-.056-.144.237.237,0,0,1,.25-.25.264.264,0,0,1,.057.011A3.523,3.523,0,0,1,7.5,2.5L8.28.94a.246.246,0,0,1,.44,0L9.5,2.5a3.4,3.4,0,0,1,1.339-.907.283.283,0,0,1,.1-.021c.175.009.212.119.221.249a.35.35,0,0,1-.043.141A5.2,5.2,0,0,0,10.5,3.5,4.113,4.113,0,0,1,8.753,6.278ZM5,8H6.289a.25.25,0,0,0,.25-.25.241.241,0,0,0-.061-.15L4.7,5.235a.255.255,0,0,0-.391,0L2.518,7.589a.274.274,0,0,0-.062.161.25.25,0,0,0,.25.25H4L1.335,10.6a.273.273,0,0,0-.058.152A.25.25,0,0,0,1.529,11H3L1.435,12.565a.255.255,0,0,0,.18.435H4v1H5V13H7.385a.255.255,0,0,0,.18-.435L6,11H7.471a.25.25,0,0,0,.25-.25.233.233,0,0,0-.058-.149Zm9.345,3.748a.252.252,0,0,1-.252.252H8.908a.252.252,0,0,1-.226-.365L11.27,6.451a.252.252,0,0,1,.451,0l2.6,5.184h0A.251.251,0,0,1,14.345,11.748ZM12.75,10,11.5,7.5,10.25,10Z","observation-tower":"M12 12.5H11.5L10 9V7C10.9951 7 10.9951 6.25 10.9951 6.25L11.5 3C11.5 3 11.5 2.5 11 2.5H10C10 2.5 10 2 9.5 2H8.5V1.5C8.5 1.5 8.5 0.5 7.5 0.5C6.5 0.5 6.5 1.5 6.5 1.5V2H5.5C5 2 5 2.5 5 2.5H4C3.5 2.5 3.5 3 3.5 3L4.0049 6.25C4.0049 6.25 4.0049 7 5 7V9L3.5 12.5H3C3 12.5 2 12.5 2 13.25C2 14 3 14 3 14H12C12 14 13 14 13 13.25C13 12.5 12 12.5 12 12.5ZM10.25 3.5L10 5H5L4.75 3.4971L10.25 3.5ZM8.5 7V8H6.5V7H8.5ZM6.5006 9.4971H8.4994L9.5 12.5H5.5L6.5006 9.4971Z",optician:"M1.78483 3.81169C2.03375 3.31421 2.54231 3 3.09859 3C3.48821 3 3.86186 3.15477 4.13736 3.43027L4.85354 4.14645C5.0488 4.34171 5.0488 4.65829 4.85354 4.85355C4.65827 5.04882 4.34169 5.04882 4.14643 4.85355L3.43017 4.1373C3.34226 4.04939 3.22303 4 3.09871 4C2.92116 4 2.75884 4.10032 2.67944 4.25912L1.309 7H5.2476C6.0654 7 6.7487 7.5656 6.941 8.3245C7.1146 8.2834 7.3009 8.25 7.5 8.25C7.6991 8.25 7.8854 8.2835 8.059 8.3246C8.2513 7.5656 8.9344 7 9.752 7H13.691L12.3206 4.25912C12.2412 4.10032 12.0788 4 11.9013 4C11.777 4 11.6577 4.04939 11.5698 4.1373L10.8536 4.85355C10.6583 5.04882 10.3417 5.04882 10.1465 4.85355C9.9512 4.65829 9.9512 4.34171 10.1465 4.14645L10.8626 3.43027C11.1381 3.15477 11.5118 3 11.9014 3C12.4577 3 12.9663 3.31421 13.2152 3.81169L14.9414 7.26172L14.9404 7.26308C14.9784 7.33359 15 7.41428 15 7.5V8.5C15 8.7761 14.7761 9 14.5 9H14V9.5C14 11.0889 12.998 12 11.25 12H10.75C9.002 12 8 11.0889 8 9.5V9.3413C7.8499 9.2933 7.6693 9.25 7.5 9.25C7.3307 9.25 7.1503 9.2933 7 9.3413V9.5C7 11.0889 5.9976 12 4.25 12H3.75C2.0024 12 1 11.0889 1 9.5V9H0.4992C0.2235 9 0 8.7765 0 8.5007V7.5C0 7.41428 0.0215731 7.33359 0.0595866 7.26308L0.0585938 7.26172L1.78483 3.81169ZM9.752 8C9.3369 8 9 8.3374 9 8.7524V9.5C9 10.1982 9.1992 11 10.75 11H11.25C12.8008 11 13 10.1982 13 9.5V8.7529C13 8.3379 12.6621 8 12.2471 8H9.752ZM2.7529 8C2.3379 8 2 8.3374 2 8.7524V9.5C2 10.1982 2.1987 11 3.75 11H4.25C5.8013 11 6 10.1982 6 9.5V8.7524C6 8.3374 5.6626 8 5.2475 8H2.7529Z",paint:"m13.5 3.5h-1v-.9973c0-.2777-.2251-.5027-.5027-.5027h-10.4946c-.2776 0-.5027.225-.5027.5027v2.9946c0 .2776.2251.5027.5027.5027h10.4946c.2776 0 .5027-.2251.5027-.5027v-.9973h.5v3.1021l-6.1123 1.4106c-.2271.0527-.3877.2549-.3877.4873v1.5074c-.2783.02-.5.246-.5.5295v2.9261c0 .2966.2404.537.5369.537h.9261c.2966 0 .537-.2404.537-.5369v-2.9261c0-.2834-.2217-.5095-.5-.5295v-1.11l6.1123-1.4102c.2266-.0522.3877-.2544.3877-.4873v-4c0-.2764-.2236-.5-.5-.5z",park:"M14,5.75c0.0113-0.6863-0.3798-1.3159-1-1.61C12.9475,3.4906,12.4014,2.9926,11.75,3 c-0.0988,0.0079-0.1962,0.0281-0.29,0.06c-0.0607-0.66-0.6449-1.1458-1.3048-1.0851C9.8965,1.9987,9.6526,2.1058,9.46,2.28l0,0 c0-0.6904-0.5596-1.25-1.25-1.25S6.96,1.5896,6.96,2.28C6.96,2.28,7,2.3,7,2.33C6.4886,1.8913,5.7184,1.9503,5.2797,2.4618 C5.1316,2.6345,5.0347,2.8451,5,3.07C4.8417,3.0195,4.6761,2.9959,4.51,3C3.6816,2.9931,3.0044,3.659,2.9975,4.4874 C2.9958,4.6872,3.0341,4.8852,3.11,5.07C2.3175,5.2915,1.8546,6.1136,2.0761,6.9061C2.2163,7.4078,2.6083,7.7998,3.11,7.94 c0.2533,0.7829,1.0934,1.2123,1.8763,0.959C5.5216,8.7258,5.9137,8.2659,6,7.71C6.183,7.8691,6.4093,7.9701,6.65,8v5L5,14h5l-1.6-1 v-2c0.7381-0.8915,1.6915-1.5799,2.77-2c0.8012,0.1879,1.603-0.3092,1.7909-1.1103C12.9893,7.7686,13.0025,7.6444,13,7.52 c0.0029-0.0533,0.0029-0.1067,0-0.16C13.6202,7.0659,14.0113,6.4363,14,5.75z M8.4,10.26V6.82C8.6703,7.3007,9.1785,7.5987,9.73,7.6 h0.28c0.0156,0.4391,0.2242,0.849,0.57,1.12C9.7643,9.094,9.0251,9.6162,8.4,10.26z","park-alt1":"M9.428,10.429a.269.269,0,0,1-.074-.18A.25.25,0,0,1,9.6,10h1.447a.25.25,0,0,0,.25-.25.258.258,0,0,0-.079-.179L9.07,7.419a.3.3,0,0,1-.063-.17A.249.249,0,0,1,9.257,7H10.4a.251.251,0,0,0,.25-.251.247.247,0,0,0-.077-.178L8.432,4.434,8.418,4.42a.262.262,0,0,1-.066-.17A.25.25,0,0,1,8.6,4h.866a.25.25,0,0,0,.25-.25.246.246,0,0,0-.068-.164h.006L7.7,1.238a.253.253,0,0,0-.042-.044A.249.249,0,0,0,7.5,1.139h0a.249.249,0,0,0-.158.055.253.253,0,0,0-.042.044L5.352,3.586a.246.246,0,0,0-.068.164.25.25,0,0,0,.25.25H6.4a.241.241,0,0,1,.184.42l-.014.014L4.431,6.571a.247.247,0,0,0-.077.178A.251.251,0,0,0,4.6,7H5.745a.249.249,0,0,1,.25.249.3.3,0,0,1-.063.17L3.782,9.571A.258.258,0,0,0,3.7,9.75a.25.25,0,0,0,.25.25H5.4a.25.25,0,0,1,.248.249.269.269,0,0,1-.074.18l-2.14,2.132-.009.009a.248.248,0,0,0,0,.351A.256.256,0,0,0,3.605,13H7v1l1-.008V13h3.391a.263.263,0,0,0,.26-.254.248.248,0,0,0-.071-.177Z",parking:"M4 2V13H6V9H8.5C10.433 9 12 7.433 12 5.5C12 3.567 10.433 2 8.5 2H4ZM6 7V4H8.5C9.32843 4 10 4.67157 10 5.5C10 6.32843 9.32843 7 8.5 7H6Z","parking-garage":"M10.5,10.14c-0.6637,0.4788-1.4732,0.7121-2.29,0.66h-1.9V14h-1.9V5h3.92 c0.7801-0.0414,1.5484,0.2041,2.16,0.69c0.5779,0.5595,0.875,1.3483,0.81,2.15C11.4042,8.6892,11.1088,9.5388,10.5,10.14z M9,6.9 C8.711,6.6881,8.3579,6.5822,8,6.6H6.31v2.65H8c0.3612,0.0191,0.717-0.0947,1-0.32c0.2559-0.2675,0.3867-0.6308,0.36-1 C9.4072,7.5493,9.274,7.1684,9,6.9z M14.41,4.21c0.114-0.2486,0.007-0.5427-0.24-0.66L7.5,0.45l-6.71,3.1 C0.5387,3.666,0.429,3.9637,0.545,4.215C0.661,4.4663,0.9587,4.576,1.21,4.46l0,0L7.5,1.55l6.29,2.9 c0.2486,0.114,0.5427,0.007,0.66-0.24H14.41z","parking-paid":"M1 13V2h4.5a3.5 3.5 0 0 1 3.21 2.103 3.36 3.36 0 0 0-.504.676c-.23.41-.232.837-.174 1.154l.3 1.625A3.495 3.495 0 0 1 5.5 9H3v4H1Zm4.5-6a1.5 1.5 0 1 0 0-3H3v3h2.5Zm3.516-1.248a.716.716 0 0 1 .062-.484C9.315 4.848 9.978 4 11.5 4c1.521 0 2.185.847 2.421 1.268a.716.716 0 0 1 .064.484L13.019 11H12v2h-1v-2H9.981l-.965-5.248ZM12.75 7 13 5.655C12.83 5.409 12.42 5 11.5 5s-1.33.41-1.5.655L10.25 7h2.5Z",pharmacy:"M9.5,4l1.07-1.54c0.0599,0.0046,0.1201,0.0046,0.18,0c0.6904-0.0004,1.2497-0.5603,1.2494-1.2506 C11.999,0.519,11.4391-0.0404,10.7487-0.04C10.0584-0.0396,9.499,0.5203,9.4994,1.2106c0,0.0131,0.0002,0.0262,0.0006,0.0394 c0,0,0,0.07,0,0.1L7,4H9.5z M12,6V5H3v1l1.5,3.5L3,13v1h9v-1l-1-3.5L12,6z M10,10H8v2H7v-2H5V9h2V7h1v2h2V10z","picnic-site":"M4,3C3.446,3,3,3.446,3,4s0.446,1,1,1h1.2969 L4.6523,7H2.5c-0.554,0-1,0.446-1,1s0.446,1,1,1h1.5098L3.041,12.0098c-0.1284,0.3939,0.0868,0.8173,0.4807,0.9457 s0.8173-0.0868,0.9457-0.4807c0.0005-0.0013,0.0009-0.0027,0.0013-0.004L5.5859,9h3.8281l1.1172,3.4707 c0.1273,0.3943,0.5501,0.6107,0.9443,0.4834s0.6107-0.5501,0.4834-0.9443l0,0L10.9902,9H12.5c0.554,0,1-0.446,1-1s-0.446-1-1-1 h-2.1523L9.7031,5H11c0.554,0,1-0.446,1-1s-0.446-1-1-1H4z M6.873,5H8.127l0.6445,2h-2.543L6.873,5z",pitch:"M5,3C4.4477,3,4,2.5523,4,2s0.4477-1,1-1s1,0.4477,1,1S5.5523,3,5,3z M12.5,10H10L9,7L8,5.25L9,5l2.3,1l0,0 c0.2761,0.1105,0.5895-0.0239,0.7-0.3S11.9761,5.1105,11.7,5l0,0L9,4H7L5,5L4,6H2.5C2.2239,6,2,6.2239,2,6.5S2.2239,7,2.5,7H5l1-1 l1,2l-2,2v3.5C5,13.7761,5.2239,14,5.5,14S6,13.7761,6,13.5v-3.11L8,9l1,2h3.5c0.2761,0,0.5-0.2239,0.5-0.5S12.7761,10,12.5,10z","place-of-worship":"M7.5,0l-2,2v2h4V2 L7.5,0z M5.5,4.5L4,6h7L9.5,4.5H5.5z M2,6.5c-0.5523,0-1,0.4477-1,1V13h2V7.5C3,6.9477,2.5523,6.5,2,6.5z M4,6.5V13h7V6.5H4z M13,6.5c-0.5523,0-1,0.4477-1,1V13h2V7.5C14,6.9477,13.5523,6.5,13,6.5z",playground:"m3.00002 1.15c.2091-.8016 1.0284-1.2819 1.83-1.0729s1.2819 1.0284 1.0729 1.83c-.2003.7681-.9643 1.2471-1.7429 1.0929-.8126-.161-1.3409-.9502-1.18-1.7629.0058-.0292.0125-.0583.02-.0871zm10.99998 11.17c.1032.5426-.2531 1.066-.7956 1.1692-.0015.0003-.0029.0006-.0044.0008-.4252.086-.8574-.1119-1.07-.49l-1.68-3.37-1.44998.29-.22.08h-.06v2.15l.62-.15h.14c.2871.0054.5155.2425.5101.5297-.0039.2064-.1295.391-.3201.4703l-5 1c-.0563.0095-.1137.0095-.17 0-.2872 0-.52-.2328-.52-.52 0-.2099.1262-.3993.32-.48l4.15-.83v-2.17l-3.22.58c-.164.0423-.336.0423-.5 0-.3394-.0867-.6088-.3446-.71-.68h-.02l-1-4.07c-.0312-.1416-.0312-.2884 0-.43.0936-.387.4078-.6815.8-.75l4.7-.52v-4.13h.22v4.1h.06l.22-.02.4-.08h.21c.2673.0643.43258.3323.37.6-.0439.235-.251.4041-.49.4l-.49.08h-.22-.06v2.86h.06l.22-.06 1.80998-.36c.4275-.0352.8299.2062 1 .6l2 3.94c.077.0758.1411.1636.19.26zm-5.49998-7.19-2.5.27.74 2.94 1.76-.34z",police:"M5.5,1L6,2h5l0.5-1H5.5z M6,2.5v1.25c0,0,0,2.75,2.5,2.75S11,3.75,11,3.75V2.5H6z M1.9844,3.9863 C1.4329,3.9949,0.9924,4.4485,1,5v4c-0.0001,0.6398,0.5922,1.1152,1.2168,0.9766L5,9.3574V14l5.8789-6.9297 C10.7391,7.0294,10.5947,7,10.4414,7H6.5L3,7.7539V5C3.0077,4.4362,2.5481,3.9775,1.9844,3.9863z M11.748,7.7109L6.4121,14H12 V8.5586C12,8.2451,11.9061,7.9548,11.748,7.7109z","police-JP":"M7.5,1A6.5,6.5,0,1,0,14,7.5,6.5,6.5,0,0,0,7.5,1Zm2.6,2.84L7.5,6.44,4.9,3.84A4.4428,4.4428,0,0,1,10.1,3.84ZM3.84,4.9007,6.4394,7.5l-2.6,2.5993A4.4429,4.4429,0,0,1,3.84,4.9007ZM4.9,11.16l2.6-2.6,2.6,2.6A4.4428,4.4428,0,0,1,4.9,11.16Zm6.26-1.0606L8.5606,7.5l2.6-2.5993a4.4429,4.4429,0,0,1-.0006,5.1986Z",post:"M13.5 3.65139C13.5 3.86918 13.3912 4.07257 13.2099 4.19338L7.5 8L1.79006 4.19338C1.60885 4.07257 1.5 3.86918 1.5 3.65139C1.5 3.29164 1.79164 3 2.15139 3L12.8486 3C13.2084 3 13.5 3.29164 13.5 3.65139Z M13.5 5.96713V11C13.5 11.5523 13.0523 12 12.5 12H2.5C1.94772 12 1.5 11.5523 1.5 11L1.5 5.96713C1.5 5.76746 1.72254 5.64836 1.88868 5.75912L7.5 9.5L13.1113 5.75912C13.2775 5.64836 13.5 5.76746 13.5 5.96713Z","post-JP":"m1.5 4c0-.26522.10536-.51957.29289-.70711.18754-.18753.44189-.29289.70711-.29289h10c.2652 0 .5196.10536.7071.29289.1875.18754.2929.44189.2929.70711s-.1054.51957-.2929.70711c-.1875.18753-.4419.29289-.7071.29289h-10c-.26513 0-.51941-.10529-.70693-.29272-.18752-.18742-.29294-.44165-.29307-.70678zm11 2.5h-10c-.26522 0-.51957.10536-.70711.29289-.18753.18754-.29289.44189-.29289.70711s.10536.51957.29289.70711c.18754.18753.44189.29289.70711.29289h4v4.5c0 .2652.10536.5196.29289.7071.18754.1875.44189.2929.70711.2929s.51957-.1054.70711-.2929c.18753-.1875.29289-.4419.29289-.7071v-4.5h4c.2652 0 .5196-.10536.7071-.29289.1875-.18754.2929-.44189.2929-.70711s-.1054-.51957-.2929-.70711c-.1875-.18753-.4419-.29289-.7071-.29289z",prison:"M3.5,1v13H12V1H3.5z M9.5,2H11v3.5H9.5V2z M4.5,2.0547H6V7H4.5V2.0547z M7,2.0547h1.5V7H7V2.0547z M10.25,6.5 C10.6642,6.5,11,6.8358,11,7.25S10.6642,8,10.25,8l0,0C9.8358,8,9.5,7.6642,9.5,7.25l0,0C9.5,6.8358,9.8358,6.5,10.25,6.5z M7,8 h1.4727L8.5,13H7.0273L7,8z M4.5,8.166H6V13H4.5V8.166z M9.5,9H11v4H9.5V9z",racetrack:"M4.99321 1.58228C5.03861 1.30989 4.8546 1.05228 4.58222 1.00688C4.30983 0.961484 4.05222 1.14549 4.00682 1.41788L2.00682 13.4179C1.96142 13.6903 2.14543 13.9479 2.41782 13.9933C2.6902 14.0387 2.94782 13.8547 2.99321 13.5823L3.6632 9.56238C4.46947 9.67976 5.3398 9.7187 6.026 10.2C6.45057 10.505 6.94151 10.7047 7.45839 10.7828C8.424 10.9286 9.28807 10.3976 10.242 10.549L11.531 10.743C11.7908 10.7822 12.0609 10.5828 12.1 10.323L12.984 4.38899L12.988 4.38499C13.0241 4.12469 12.8213 3.85686 12.561 3.82099L11.272 3.62699C10.3092 3.48421 9.44342 3.9997 8.48942 3.85618C8.06155 3.79181 7.65443 3.62915 7.3 3.38099C6.56128 2.86385 5.68119 2.77814 4.81426 2.656L4.99321 1.58228ZM4.40351 5.12049L4.73218 3.14849C5.33161 3.22962 5.96556 3.27693 6.521 3.51699L6.22626 5.48223C5.65576 5.24949 5.01279 5.2037 4.40351 5.12049ZM3.74549 9.0686L4.07436 7.09542C4.69451 7.18147 5.35159 7.22405 5.933 7.46299L6.23273 5.48673C6.89067 5.75614 7.3918 6.21952 8.126 6.32799L8.426 4.34799C9.16402 4.45947 9.77459 4.17131 10.484 4.11399L10.184 6.07999C9.47389 6.1406 8.85956 6.44062 8.124 6.32999L7.83802 8.30784C7.10186 8.19874 6.59996 7.73286 5.939 7.46399L5.639 9.43999C5.04421 9.20148 4.3764 9.15882 3.74549 9.0686ZM7.83898 8.30813C8.57282 8.41936 9.19002 8.11708 9.9 8.05799L10.184 6.07999C10.8385 6.01968 11.5087 6.19133 12.152 6.28899L11.872 8.26499C11.2277 8.16793 10.5563 7.99624 9.901 8.05799L9.601 10.034C8.89229 10.0817 8.26589 10.3943 7.539 10.284L7.83898 8.30813Z","racetrack-boat":"m10.0643 11.2159c.4691-.5125.9358-1.0224 1.5938-1.2417.9212-.3071 1.5902.0778 1.8665.2805.7241.531 1.3904-.2204.5914-.8064-.4269-.3131-1.4451-.86577-2.7741-.4228-.7202.2401-1.2127.7667-1.70487 1.2931-.40012.4279-.80009.8556-1.32212 1.1291-.61911.3243-1.06486-.0266-1.06486-.6352v-.0121c.00021-.7982-.40819-1.3004-1.25-1.3004-.49071 0-.99216.2582-1.50001.5-1.17511.5596-2.31799 1.2859-3.31714 2.1134-.210639.1751-.243189.4951-.06696.7066.2505.3006.58076.1621.82938-.0379.41361-.3329 1.78116-1.3913 2.93376-1.94.47652-.227.86169-.3421 1.12097-.3421.24997 0 .24997.1016.24997.3396-.00202 1.3264 1.29025 2.1428 2.52893 1.4939.50415-.2641.89557-.6917 1.28535-1.1176zm-7.56426-2.2159c1.5-1 3.25492-2 5-2 .75 0 .75.375.75.75s0 .75.75.75c2.52746 0 5.36316-3.21377 5.49996-5.5l-2.5 1-2.34195-.97445c-.61176-.20392-.92799.74476-.31623.94868l1.15818.52577-1.49996.5-4-1.25c-.23606-.07869-.38872.02744-.5.25l-1.5 3-2.00004 1zm2.5-7c0-.5523.4477-1 1-1s1 .4477 1 1-.4477 1-1 1-1-.4477-1-1z","racetrack-cycling":"M8 1L11 4H12C14 4 14 1 12 1H8ZM8.463 3C8.34323 3.00901 8.2307 3.06084 8.146 3.146L5.646 5.646C5.59615 5.69579 5.55739 5.75555 5.53225 5.82136C5.50711 5.88718 5.49617 5.95757 5.50014 6.02791C5.5041 6.09825 5.52289 6.16696 5.55526 6.22953C5.58764 6.2921 5.63287 6.34713 5.688 6.391L7.846 8.117L6.57 10.242C6.50157 10.356 6.48125 10.4926 6.51351 10.6216C6.54577 10.7506 6.62796 10.8616 6.742 10.93C6.85604 10.9984 6.9926 11.0187 7.12162 10.9865C7.25065 10.9542 7.36157 10.872 7.43 10.758L8.93 8.258C8.99256 8.15404 9.01519 8.03088 8.99366 7.91148C8.97214 7.79207 8.90793 7.68457 8.813 7.609L7.304 6.402L9 4.707L10.146 5.854C10.1925 5.9004 10.2477 5.93718 10.3085 5.96223C10.3692 5.98728 10.4343 6.00012 10.5 6H13C13.1326 6 13.2598 5.94732 13.3536 5.85355C13.4473 5.75979 13.5 5.63261 13.5 5.5C13.5 5.36739 13.4473 5.24021 13.3536 5.14645C13.2598 5.05268 13.1326 5 13 5H10.707L8.854 3.146C8.80319 3.09493 8.74195 3.05545 8.67446 3.03025C8.60698 3.00505 8.53484 2.99473 8.463 3ZM2.949 7C2.16222 7.01338 1.4122 7.33534 0.860573 7.89651C0.308947 8.45767 -0.000113683 9.21311 3.13683e-08 10C3.13683e-08 10.7956 0.316071 11.5587 0.87868 12.1213C1.44129 12.6839 2.20435 13 3 13C3.79565 13 4.55871 12.6839 5.12132 12.1213C5.68393 11.5587 6 10.7956 6 10C6.00006 9.60179 5.92083 9.20756 5.76695 8.84028C5.61307 8.47301 5.38761 8.14004 5.10372 7.8608C4.81982 7.58157 4.48318 7.36164 4.11341 7.21385C3.74364 7.06606 3.34815 6.99336 2.95 7H2.949ZM11.949 7C11.1622 7.01338 10.4122 7.33534 9.86057 7.89651C9.30895 8.45767 8.99989 9.21311 9 10C9 10.7956 9.31607 11.5587 9.87868 12.1213C10.4413 12.6839 11.2044 13 12 13C12.7956 13 13.5587 12.6839 14.1213 12.1213C14.6839 11.5587 15 10.7956 15 10C15.0001 9.60179 14.9208 9.20756 14.767 8.84028C14.6131 8.47301 14.3876 8.14004 14.1037 7.8608C13.8198 7.58157 13.4832 7.36164 13.1134 7.21385C12.7436 7.06606 12.3482 6.99336 11.95 7H11.949ZM12.049 8C12.5709 8.01279 13.0671 8.22914 13.4316 8.60283C13.7962 8.97653 14.0002 9.47795 14 10C14 10.5304 13.7893 11.0391 13.4142 11.4142C13.0391 11.7893 12.5304 12 12 12C11.4696 12 10.9609 11.7893 10.5858 11.4142C10.2107 11.0391 10 10.5304 10 10C9.99992 9.73318 10.0532 9.46904 10.1568 9.22314C10.2603 8.97724 10.4121 8.75455 10.603 8.56818C10.7939 8.3818 11.0202 8.23552 11.2686 8.13794C11.5169 8.04036 11.7823 7.99346 12.049 8V8Z","racetrack-horse":"M10 1C9.73478 1 9.48043 1.10536 9.29289 1.29289C9.10536 1.48043 9 1.73478 9 2C9 2.26522 9.10536 2.51957 9.29289 2.70711C9.48043 2.89464 9.73478 3 10 3C10.2652 3 10.5196 2.89464 10.7071 2.70711C10.8946 2.51957 11 2.26522 11 2C11 1.73478 10.8946 1.48043 10.7071 1.29289C10.5196 1.10536 10.2652 1 10 1ZM5.5 3C5.25 3 4.5 3 5 3.75L6.25 6H4.5C4.223 6.003 3.983 6.1 3.75 6.25C2.944 5.121 2.242 5.552 1.51 6C1.107 6.247 0.694 6.499 0.25 6.5C0.184332 6.50201 0.121902 6.52899 0.0754461 6.57545C0.0289898 6.6219 0.00200653 6.68433 0 6.75C0.00200653 6.81567 0.0289898 6.8781 0.0754461 6.92455C0.121902 6.97101 0.184332 6.99799 0.25 7C0.626 7.02 1.057 6.907 1.488 6.793C2.144 6.62 2.798 6.448 3.254 6.75C3.16 6.937 3 7.5 3 8L2.998 9.51C2.792 9.714 2.619 9.633 2.443 9.55C2.303 9.485 2.16 9.42 2 9.5L1 12.45C1 12.7 1.393 12.752 1.5 12.5L2.25 10.744C2.998 10.744 4.5 10 5 9L9 10L11.5 12.5C11.697 12.697 12.12 12.362 11.96 12.115L10 9L12 6.5C12.248 7 12.495 7 12.986 7H13L13.6 7.75C13.988 8.235 14.82 7.743 14.5 7.25L12.834 4.79L13 4.5C13.062 4.313 12.637 3.924 12.5 4L10.5 5.5L8.89 3.187C8.84314 3.12862 8.78377 3.08151 8.71627 3.04915C8.64877 3.01678 8.57486 2.99999 8.5 3H5.5ZM9 5.25L9.5 6L6.777 7.916C6.72243 7.95469 6.66065 7.98204 6.59532 7.99643C6.52999 8.01081 6.46244 8.01194 6.39666 7.99975C6.33089 7.98756 6.26823 7.96229 6.2124 7.92545C6.15656 7.8886 6.10869 7.84093 6.07162 7.78525C6.03454 7.72957 6.00901 7.66701 5.99655 7.60129C5.98409 7.53556 5.98494 7.46801 5.99905 7.40262C6.01317 7.33723 6.04026 7.27534 6.07873 7.22061C6.1172 7.16588 6.16626 7.11943 6.223 7.084L9 5.25Z",rail:"M 3 1 C 2.4477 1 2 1.4477 2 2 L 2 10 C 2 10.5523 2.4477 11 3 11 L 12 11 C 12.5523 11 13 10.5523 13 10 L 13 2 C 13 1.4477 12.5523 1 12 1 L 3 1 z M 5.75 1.5 L 5.7597656 1.5 L 9.2597656 1.5 C 9.3978656 1.5 9.5097656 1.6119 9.5097656 1.75 C 9.5097656 1.8881 9.3978656 2 9.2597656 2 L 5.75 2 C 5.6119 2 5.5 1.8881 5.5 1.75 C 5.5 1.6119 5.6119 1.5 5.75 1.5 z M 3.5 3 L 7 3 L 7 7 L 3.5 7 C 3.2239 7 3 6.7761 3 6.5 L 3 3.5 C 3 3.2239 3.2239 3 3.5 3 z M 8 3 L 11.5 3 C 11.7761 3 12 3.2239 12 3.5 L 12 6.5 C 12 6.7761 11.7761 7 11.5 7 L 8 7 L 8 3 z M 5 8 C 5.5523 8 6 8.4477 6 9 C 6 9.5523 5.5523 10 5 10 C 4.4477 10 4 9.5523 4 9 C 4 8.4477 4.4477 8 5 8 z M 10 8 C 10.5523 8 11 8.4477 11 9 C 11 9.5523 10.5523 10 10 10 C 9.4477 10 9 9.5523 9 9 C 9 8.4477 9.4477 8 10 8 z M 10.445312 11.994141 C 10.380597 11.999652 10.314981 12.018581 10.253906 12.050781 C 10.030606 12.168381 9.9302313 12.433922 10.019531 12.669922 L 10.189453 13 L 4.8105469 13 L 4.9394531 12.730469 C 5.0371531 12.472169 4.9067375 12.183637 4.6484375 12.085938 C 4.4124375 11.996738 4.1468969 12.097113 4.0292969 12.320312 L 3.0292969 14.320312 C 3.0080969 14.377912 2.9986 14.4387 3 14.5 C 3 14.7761 3.2239 15 3.5 15 C 3.6802 14.999 3.8450875 14.899434 3.9296875 14.740234 L 3.9296875 14.689453 L 4 14.689453 L 4.3105469 14 L 10.689453 14 L 11 14.689453 L 11 14.740234 C 11.0846 14.899434 11.249488 14.999 11.429688 15 C 11.705787 15 11.929688 14.7761 11.929688 14.5 C 11.949587 14.4212 11.949587 14.338566 11.929688 14.259766 L 10.929688 12.259766 C 10.833163 12.076541 10.639459 11.977608 10.445312 11.994141 z","rail-light":"M5.5,0C5,0,5,0.5,5,0.5v1C5,1.777,5.223,2,5.5,2S6,1.777,6,1.5V1h1v2H6c0,0-2,0-2,2v3c0,3,3,3,3,3h1 c0,0,3,0,3-3V5c0-2-2-2-2-2H8V1h1v0.5C9,1.777,9.223,2,9.5,2S10,1.777,10,1.5v-1C10,0,9.5,0,9.5,0H5.5z M7.5,4l2.0449,0.7734L10,6.5 C10.1316,7,9.5,7,9.5,7h-4c0,0-0.6316,0-0.5-0.5l0.4551-1.7266L7.5,4z M7.5,8C7.7761,8,8,8.2239,8,8.5S7.7761,9,7.5,9 S7,8.7761,7,8.5S7.2239,8,7.5,8z M4.125,12L3,15h1.5l0.375-1h5.25l0.375,1H12l-1.125-3h-1.5l0.375,1h-4.5l0.375-1H4.125z","rail-metro":"M5.5,0c0,0-0.75,0-1,1L3,6.5V10c0,1,1,1,1,1h7c0,0,1,0,1-1V6.5L10.5,1c-0.2727-1-1-1-1-1H5.5z M6.5,1.5h2 c0,0,0.5357,0,0.75,1L10,6c0.2146,1.0017-1,1-1,1H6c0,0-1.2146,0.0017-1-1l0.75-3.5C5.9643,1.5,6.5,1.5,6.5,1.5z M5,8 c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1S4,9.5523,4,9S4.4477,8,5,8z M6.75,8h1.5C8.3885,8,8.5,8.1115,8.5,8.25S8.3885,8.5,8.25,8.5 h-1.5C6.6115,8.5,6.5,8.3885,6.5,8.25S6.6115,8,6.75,8z M10,8c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1S9,9.5523,9,9S9.4477,8,10,8z M4.125,12L3,15h1.5l0.375-1h5.25l0.375,1H12l-1.125-3h-1.5l0.375,1h-4.5l0.375-1H4.125z","ranger-station":"M9,0.5l-2,1v3.7734L2,8v6h4v-4h3 v4h4V8L8,5.2734V4l1-0.5l2,1l2-1v-3l-2,1L9,0.5z",recycling:"M2.4556,8.6134C2.118,9.2112,1.501,10.3021,2.593,11.0312c0.3432,0.2268,0.7275,0.3836,1.131,0.4614 C4.0314,11.5382,4.0466,12.0111,3.6855,12c-0.3849-0.0193-2.2596-0.1934-2.5606-1.5995c-0.1556-0.8213,0.0204-1.5571,0.504-2.3556 L2.3263,6.812L1.0196,6.0688L4.5,4v4L3.1941,7.3057L2.4556,8.6134z M6.7,2.034c1.155-0.628,1.823,0.43,2.191,1.007l0.8059,1.2631 L8.431,5.112L12,6.986L11.803,2.96l-1.2639,0.8066L9.779,2.578C9.2572,1.8321,8.875,1.2812,7.944,1.033 C6.307,0.7203,5.3007,2.6194,5.311,2.607c-0.1639,0.2871,0.2156,0.5399,0.451,0.21C6.0202,2.4969,6.339,2.2309,6.7,2.034z M13.294,8.221c-0.0877-0.1897-0.5487-0.1413-0.419,0.267c0.1312,0.3892,0.1845,0.8003,0.157,1.21C12.939,11.01,11.684,11,11,11H9.5 V9.5l-3.5,2l3.488,2.025L9.4926,12H11c0.8906,0.0153,1.5999-0.1759,2.2-0.713C14.4,10.226,13.294,8.221,13.294,8.221z","religious-buddhist":"M13.4978,6.9989h-0.5329c-0.09997-1.10708-0.53528-2.15731-1.2478-3.0105l0.378-0.3784 c0.19605-0.19447,0.19733-0.51105,0.00286-0.7071C11.90698,2.71037,11.59733,2.70518,11.4,2.8912l0,0l-0.0123,0.0123L11.01,3.2815 c-0.85331-0.71298-1.90385-1.14864-3.0113-1.2488V1.5c0-0.27614-0.22386-0.5-0.5-0.5s-0.5,0.22386-0.5,0.5v0.5327 C5.8916,2.13306,4.84144,2.56871,3.9884,3.2815L3.61,2.9C3.41007,2.70952,3.09358,2.71717,2.9031,2.9171 c-0.184,0.19312-0.184,0.49668,0,0.6898l0.3784,0.3775C2.56787,4.83856,2.13216,5.89031,2.0327,6.9989H1.5 c-0.27614,0-0.5,0.22386-0.5,0.5s0.22386,0.5,0.5,0.5h0.5327c0.09987,1.10695,0.535,2.15711,1.2473,3.0103l-0.3779,0.3779 c-0.19538,0.19514-0.19557,0.51173-0.00043,0.70711c0.19053,0.19076,0.49798,0.19611,0.69503,0.01209L3.609,12.094l0.3779-0.3779 c0.8533,0.71312,1.90395,1.1488,3.0115,1.2488v0.5329c0,0.27614,0.22386,0.5,0.5,0.5s0.5-0.22386,0.5-0.5v-0.5329 c1.10719-0.10026,2.15744-0.53592,3.0105-1.2488l0.3779,0.3779c0.19514,0.19538,0.51173,0.19557,0.70711,0.00043 c0.19076-0.19053,0.19611-0.49798,0.01209-0.69503l-0.0123-0.0123l0,0l-0.3779-0.3779c0.71283-0.8531,1.14848-1.90333,1.2488-3.0105 h0.5329c0.27609-0.00544,0.49549-0.23366,0.49006-0.50975C13.98227,7.22064,13.76611,7.00435,13.4978,6.9989z M7.9987,3.0505 c0.83871,0.09248,1.63383,0.42154,2.2926,0.9488l-2.15,2.15c-0.04663-0.0218-0.09436-0.04116-0.143-0.058V3.0505H7.9987z M6.9987,3.0505V6.091c-0.04864,0.01684-0.09637,0.0362-0.143,0.058l-2.15-2.15c0.65897-0.52726,1.45431-0.85622,2.2932-0.9485 H6.9987z M3.9987,4.7062l2.15,2.15c-0.0218,0.04663-0.04116,0.09436-0.058,0.143H3.0505 c0.09243-0.83886,0.42154-1.63413,0.9489-2.293L3.9987,4.7062z M3.0505,7.9987H6.091c0.01687,0.04863,0.03623,0.09636,0.058,0.143 l-2.15,2.15C3.47173,9.63281,3.14276,8.83753,3.0505,7.9987z M6.9989,11.9471c-0.83871-0.09248-1.63383-0.42154-2.2926-0.9488 l2.15-2.15c0.04663,0.0218,0.09436,0.04116,0.143,0.058v3.0405L6.9989,11.9471z M7.9989,11.9471V8.9066 c0.04864-0.01683,0.09638-0.03619,0.143-0.058l2.15,2.15c-0.65895,0.5273-1.4543,0.85627-2.2932,0.9485H7.9989z M10.9989,10.2914 l-2.15-2.15c0.02177-0.04664,0.04113-0.09437,0.058-0.143h3.0415c-0.09276,0.83901-0.42232,1.6343-0.9502,2.293H10.9989z M8.9066,6.9989c-0.01684-0.04864-0.0362-0.09637-0.058-0.143l2.15-2.15c0.52726,0.65877,0.85632,1.45389,0.9488,2.2926H8.9066 V6.9989z","religious-christian":"M6,0.9552V4H3v3h3v8h3V7h3V4H9V1 c0-1-0.9776-1-0.9776-1H6.9887C6.9887,0,6,0,6,0.9552z","religious-jewish":"M7.50049 0.5L5.49949 4H1L3.49949 7.5L1 11H5.49949L7.50049 14.5L9.50049 11H14L11.5005 7.5L14 4H9.50049L7.50049 0.5Z","religious-muslim":"M12.0962 12.0962C9.55779 14.6346 5.44221 14.6346 2.90381 12.0962C0.365398 9.55779 0.365398 5.44221 2.90381 2.90381C5.44221 0.365398 9.55779 0.365398 12.0962 2.90381C12.2675 3.07512 12.4273 3.25362 12.5754 3.43832C10.5566 1.86336 7.63341 2.00437 5.77643 3.86135C3.76685 5.87092 3.76685 9.12908 5.77643 11.1387C7.63341 12.9956 10.5566 13.1366 12.5754 11.5617C12.4273 11.7464 12.2675 11.9249 12.0962 12.0962Z M10.1 6.5H8L9.7 8L9 10.5L11 9L13 10.5L12.3 8L14 6.5H11.9L11 4.5L10.1 6.5Z","religious-shinto":"M12.5,2.5H2.5a.9448.9448,0,0,0-1,1,.9448.9448,0,0,0,1,1H3V12a.9448.9448,0,0,0,1,1,.9448.9448,0,0,0,1-1V8h5v4a.9448.9448,0,0,0,1,1,.9448.9448,0,0,0,1-1V4.5h.5a.9448.9448,0,0,0,1-1,.9448.9448,0,0,0-1-1ZM10,6H8V4.5h2ZM7,6H5V4.5H7Z","residential-community":"m11.8 12.5v-2.5c.7-.1 1.2-.7 1.2-1.5s-.7-1.5-1.5-1.5-1.5.7-1.5 1.5c0 .7.5 1.4 1.2 1.5v2.5h-4.2v-11.5h-5v11.5h-1v.5h13v-.5zm-5.8-2.5h-3v-1h3zm0-2h-3v-1h3zm0-2h-3v-1h3zm0-2h-3v-1h3z",restaurant:"M3.5,0l-1,5.5c-0.1464,0.805,1.7815,1.181,1.75,2L4,14c-0.0384,0.9993,1,1,1,1s1.0384-0.0007,1-1L5.75,7.5 c-0.0314-0.8176,1.7334-1.1808,1.75-2L6.5,0H6l0.25,4L5.5,4.5L5.25,0h-0.5L4.5,4.5L3.75,4L4,0H3.5z M12,0 c-0.7364,0-1.9642,0.6549-2.4551,1.6367C9.1358,2.3731,9,4.0182,9,5v2.5c0,0.8182,1.0909,1,1.5,1L10,14c-0.0905,0.9959,1,1,1,1 s1,0,1-1V0z","restaurant-bbq":"M12.0166,12.5H14.5L12,15V12.5165a1.6189,1.6189,0,0,1-1.1367.4806,1.6,1.6,0,0,1-.9931-.3448A6.7838,6.7838,0,0,1,9.8783,2.3418,1.6179,1.6179,0,0,1,12,2.462V0l2.5,2.5H12.036a1.5927,1.5927,0,0,1,.1225.1289,1.6239,1.6239,0,0,1-.2871,2.2793A3.5148,3.5148,0,0,0,10.75,7.4951a3.5578,3.5578,0,0,0,1.1465,2.6162,1.6352,1.6352,0,0,1,.2325,2.2783C12.0949,12.4315,12.0535,12.4624,12.0166,12.5ZM2.504,0l-1,5.5c-.1464.805,1.7815,1.181,1.75,2L3.004,14a.9625.9625,0,0,0,1,1,.9625.9625,0,0,0,1-1l-.25-6.5c-.0314-.8176,1.7334-1.1808,1.75-2l-1-5.5h-.5l.25,4-.75.5L4.254,0h-.5l-.25,4.5L2.754,4l.25-4Z","restaurant-noodle":"M4.457,11.9892,1,8V7H14V8l-3.4961,3.9891ZM3.9882,2.5a.5.5,0,0,0-1,0v.5671l-1.7969.3675a.25.25,0,1,0,.094.4911l1.7029-.2776v.5662l-1.75.0357a.25.25,0,0,0,0,.5l1.75.0357V5.998h1Zm9.5,1.5-7.5.2625V2.9951l7.594-1.0737a.5.5,0,0,0-.1881-.9822L5.9792,2.4555a.4963.4963,0,0,0-.991.0445v.2276l-.493.1009V3.18l.493-.08V4.2974l-.493.01v.4608L13.4882,5a.5.5,0,0,0,0-1ZM10,13H5v.5757h5Z","restaurant-pizza":"M1.393 7.931.025 7.315A14.05 14.05 0 0 1 7.764-.001l.027.07.511 1.331-.003.001a12.613 12.613 0 0 0-6.906 6.53Zm10.963 4.96L2.42 8.414a11.604 11.604 0 0 1 6.354-6.009l.003-.001.817 2.122c-.028-.002-.052-.016-.081-.016a1.062 1.062 0 1 0 .764 1.793l2.413 6.273a.249.249 0 0 1-.334.316ZM7.426 7.52a.925.925 0 1 0-1.849 0 .925.925 0 0 0 1.849 0Zm3.017 2.03a.925.925 0 1 0-.07.353.924.924 0 0 0 .07-.354Z","restaurant-seafood":"M11.433,10.0889h2.49v.75H11.8525A4.81,4.81,0,0,1,13.4751,13.14l-.71.2422a4.01,4.01,0,0,0-1.74-2.1971,1.7775,1.7775,0,0,1-1.0352.4538L8.4374,12.9852H6.5188L4.9839,11.623a2.0222,2.0222,0,0,1-1.0929-.44,4.0093,4.0093,0,0,0-1.7426,2.1988l-.71-.2422a4.8146,4.8146,0,0,1,1.622-2.3007H.99v-.75H3.4839l.8633-.6764L3.3329,7.7567a2.2738,2.2738,0,0,1-.269.0293,2.0192,2.0192,0,0,1-2.0532-2.08c0-2.08,1.979-4.16,1.979-4.16L2.2531,5.9931l1.7255-.0012L4.9913,2.9852l0,2.9956a2.0936,2.0936,0,0,1-.6993,1.4121l.8536,1.3936L5.23,8.7208a3.8669,3.8669,0,0,1,4.4784,0l.0605.0474.869-1.4152a2.1177,2.1177,0,0,1-.6433-1.3722l0-2.9956.9836,3.0067,1.7547.0012-.7367-4.4466s1.982,2.08,1.982,4.16a2.0211,2.0211,0,0,1-2.0562,2.08,2.3125,2.3125,0,0,1-.3441-.0376L10.5676,9.3945l.8407.6593C11.4212,10.0638,11.4218,10.0782,11.433,10.0889Z","restaurant-sushi":"M5.5,3C5.2239,3,5,3.2239,5,3.5H2.75C1.2265,3.5,0,4.7265,0,6.25c0,0.8274,0.3687,1.5592,0.9434,2.0625 C0.3803,8.6675,0,9.2893,0,10c0,1.0994,0.9006,2,2,2h3.5h2H10c1.0994,0,2-0.9006,2-2c0-0.4883-0.1863-0.9294-0.4805-1.2773 l2.1777,0.9629c0.3716,0.1831,0.8213,0.0303,1.0044-0.3413c0.1831-0.3716,0.0303-0.8213-0.3413-1.0044 c-0.0188-0.0093-0.038-0.0178-0.0576-0.0254l-1.8105-0.8027l1.6309-0.2715c0.4099-0.0599,0.6936-0.4408,0.6337-0.8507 c-0.0544-0.3724-0.3765-0.6469-0.7528-0.6415c-0.0426,0.0003-0.085,0.0042-0.127,0.0117l-2.1309,0.3555 C11.2595,4.9521,10.0387,3.7837,8,3.5488V3.5C8,3.2239,7.7761,3,7.5,3H5.5z M6,4h1v5v2H6V9V4z M9.5,8 c0.259,0,0.4638,0.1974,0.4902,0.4492l0.0762-0.1328c0.1385-0.2399,0.4437-0.3201,0.6836-0.1816s0.3201,0.4418,0.1816,0.6816 l-0.2578,0.4473C10.8727,9.445,11,9.7021,11,10c0,0.5626-0.4374,1-1,1H8V9h1V8.5C9,8.223,9.223,8,9.5,8z M2.4395,8.0703 c0.1934-0.0242,0.3903,0.0662,0.4941,0.2461l0.2012,0.3477C3.226,8.5647,3.3538,8.5,3.5,8.5C3.777,8.5,4,8.723,4,9h1v2H2 c-0.5626,0-1-0.4374-1-1s0.4374-1,1-1h0.1738L2.0684,8.8164C1.9299,8.5765,2.0101,8.2733,2.25,8.1348 C2.31,8.1001,2.375,8.0784,2.4395,8.0703z","road-accident":"M12.6,8.7,11.5,6.5a1.05,1.05,0,0,0-.9-.5H4.4a1.05,1.05,0,0,0-.9.5L2.4,8.7,1.16,9.852a.5.5,0,0,0-.16.366V14.5a.5.5,0,0,0,.5.5h2c.2,0,.5-.2.5-.4V14h7v.5c0,.2.2.5.4.5h2.1a.5.5,0,0,0,.5-.5V10.218a.5.5,0,0,0-.16-.366ZM4.5,7h6l1,2h-8ZM5,11.6c0,.2-.3.4-.5.4H2.4c-.2,0-.4-.3-.4-.5V10.4c.1-.3.3-.5.6-.4l2,.4c.2,0,.4.3.4.5Zm8-.1c0,.2-.2.5-.4.5H10.5c-.2,0-.5-.2-.5-.4v-.7c0-.2.2-.5.4-.5l2-.4c.3-.1.5.1.6.4ZM8,4H7L6,0H9ZM1.1,1.8,3.7.3l1.1,4L4,4.7ZM11.3.3l2.6,1.5L11,4.8l-.9-.5Z",roadblock:"M7.5 14C11.0899 14 14 11.0899 14 7.5C14 3.91015 11.0899 1 7.5 1C3.91015 1 1 3.91015 1 7.5C1 11.0899 3.91015 14 7.5 14ZM12 6V9H3V6H12Z",rocket:"m11.5547 2c-2.14407 0-5.02107 1.471-6.95307 4h-1.6016c-1.1573 0-1.8206.8638-2.277302 1.7773l-.6114 1.2227h1.443402 1.4453l1.5 1.5 1.5 1.5v1.4453 1.4434l1.2227-.6113c.9135-.4568 1.7773-1.1201 1.7773-2.2774v-1.6016c2.52897-1.932 3.99997-4.809 3.99997-6.9531v-1.4453zm-2.55467 3c.5523 0 .99997.4477.99997 1s-.44767 1-.99997 1-1-.4477-1-1 .4477-1 1-1zm-6.5 6-.5.5c-.7222.7222-1 2.5-1 2.5s1.698-.198 2.5-1l.5-.5z",school:"M5.542 3.647 3.106 3l.443-1.63a.505.505 0 0 1 .618-.352l1.46.392a.5.5 0 0 1 .355.613l-.44 1.624Zm-4.52 7.356a.496.496 0 0 1-.005-.276l1.819-6.726 2.435.647-1.819 6.726a.499.499 0 0 1-.143.237l-1.457 1.347a.152.152 0 0 1-.247-.066l-.583-1.889ZM10 5c-2.25 0-3-.75-3-3 2.25 0 3 .75 3 3Zm-1.4 7.984c-1.37.21-3.126-1.706-3.52-3.8L5.969 5.9c.399-.35.903-.533 1.419-.533a2.71 2.71 0 0 1 1.564.489.964.964 0 0 0 1.089-.01 2.438 2.438 0 0 1 1.46-.479c.77 0 1.643.489 2.05 1.201 1.536 2.696-1.194 6.709-3.144 6.417a.867.867 0 0 1-.255-.093 1.427 1.427 0 0 0-1.302 0 .866.866 0 0 1-.25.092Z","school-JP":"M12.5,2.9992h-4v-1a1,1,0,0,0-2,0v1h-4a1,1,0,0,0,0,2h.67A10.8169,10.8169,0,0,0,5.15,8.8105c.3331.4313.6594.8248.9785,1.1936a14.3825,14.3825,0,0,1-2.6074,2.117,1,1,0,1,0,.955,1.7581h0A15.65,15.65,0,0,0,7.5,11.4613a15.65,15.65,0,0,0,3.0239,2.4179,1,1,0,1,0,.9551-1.7578,14.3789,14.3789,0,0,1-2.6073-2.1171c.3191-.3688.6453-.7622.9784-1.1935a10.818,10.818,0,0,0,1.98-3.8116h.67a1,1,0,0,0,0-2ZM8.2671,7.5879c-.2614.3385-.5154.6413-.767.937-.2517-.2957-.5057-.5985-.7672-.937A9.5885,9.5885,0,0,1,5.2676,4.9992H9.7319A9.5789,9.5789,0,0,1,8.2671,7.5879Z",scooter:"M4.908,12a1.5,1.5,0,1,1-2.816,0Zm8.65-6C13.539,6,13,6,13,6V3h.351a.282.282,0,0,0,.223-.148l.268-.536a.334.334,0,0,0,.009-.066A.25.25,0,0,0,13.6,2H13V1.7a.215.215,0,0,0-.2-.2H9.25a.25.25,0,0,0,0,.5H12V6.6L7.6,10H6V7.5A.5.5,0,0,0,5.5,7H5V5H6.75a.25.25,0,0,0,0-.5L2.266,4.034c-.006,0-.01-.007-.016-.007a.25.25,0,0,0-.25.25V4.75A.25.25,0,0,0,2.25,5H3V7H2.5A1.538,1.538,0,0,0,1,8.5v2a.472.472,0,0,0,.442.5C1.461,11,7.5,11,7.5,11L10,10h3.5a.472.472,0,0,0,.5-.442C14,9.539,14,6.5,14,6.5A.472.472,0,0,0,13.558,6ZM12.5,11A1.5,1.5,0,1,0,14,12.5,1.538,1.538,0,0,0,12.5,11Z",shelter:"M13 2L1 6V8L2 7.66667V13H12V11H4V7L13 4V2Z",shoe:"M9.5,7a9.97,9.97,0,0,1-1.315-.948L6.01,3.221a.558.558,0,0,0-1,.279H5V5H3.209a.5.5,0,0,1-.357-.148S2.5,4,2,4H1.5a.5.5,0,0,0-.5.5V9H6.5c1.5,0,2,1,3.5,1h4V9.5C14,8,10.547,7.594,9.5,7Zm0,4a3.131,3.131,0,0,1-1.526-.447A4.1,4.1,0,0,0,6,10H1v1.5a.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5V11a3.134,3.134,0,0,1,1.526.447A4.1,4.1,0,0,0,9.5,12h4a.5.5,0,0,0,.5-.5V11Z",shop:"m13.33 5h-1.83l-.39-2.33c-.1601-.7182-.7017-1.2905-1.41-1.49-.3493-.1124-.7131-.173-1.08-.18h-2.24c-.3669.007-.7307.0676-1.08.18-.7083.1995-1.2499.7718-1.41 1.49l-.39 2.33h-1.83c-.2761-.0017-.5013.2208-.503.497-.0003.0519.0074.1035.023.153l1.88 6.3c.1964.6246.7753 1.0496 1.43 1.05h6c.651-.0047 1.2247-.4289 1.42-1.05l1.88-6.3c.0829-.2634-.0635-.5441-.3269-.627-.0463-.0146-.0945-.0223-.1431-.023zm-8.81 0 .36-2.17c.0807-.3625.3736-.6395.74-.7.2463-.0776.5019-.1213.76-.13h2.24c.2614.0078.5205.0515.77.13.3664.0605.6593.3375.74.7l.35 2.17h-6z",skateboard:"M1.25 5.25V5H2.75V5.25C2.75 5.94036 3.30964 6.5 4 6.5H11C11.6904 6.5 12.25 5.94036 12.25 5.25V5H13.75V5.25C13.75 6.76878 12.5188 8 11 8H4C2.48122 8 1.25 6.76878 1.25 5.25ZM5 10C5 10.5523 4.55228 11 4 11 3.44772 11 3 10.5523 3 10 3 9.44772 3.44772 9 4 9 4.55228 9 5 9.44772 5 10ZM12 10C12 10.5523 11.5523 11 11 11 10.4477 11 10 10.5523 10 10 10 9.44772 10.4477 9 11 9 11.5523 9 12 9.44772 12 10Z",skiing:"M15,4.5C15,5.3284,14.3284,6,13.5,6S12,5.3284,12,4.5S12.6716,3,13.5,3S15,3.6716,15,4.5z M13.72,11.89 c-0.0623-0.1197-0.2083-0.1684-0.33-0.11c-0.6846,0.4194-1.5208,0.5111-2.28,0.25L4.78,8.86L7.5,7.5v-3L9,5.25v3L10.5,9L12,8.25 L10.5,7.5V3l-3-1.5L6,2.25v4.5L3.28,8.11L0.61,6.78C0.4857,6.7192,0.3358,6.7707,0.275,6.895C0.2142,7.0193,0.2657,7.1692,0.39,7.23 l10.5,5.25c0.3156,0.135,0.6568,0.1998,1,0.19c0.5998-0.0103,1.1889-0.161,1.72-0.44c0.1236-0.0615,0.174-0.2116,0.1125-0.3352 C13.7217,11.8932,13.7208,11.8916,13.72,11.89z",slaughterhouse:"M15 6.1c0 1.376-1.363.694-1.363.694L12.5 7H11a5.31 5.31 0 0 1-1.5 2 3.272 3.272 0 0 1-.523 1.125c-.077.091-.06.2-.068.33l.091 2.3a.264.264 0 0 1-.266.25.242.242 0 0 1-.234-.205L8 9.5H4v3.253a.247.247 0 0 1-.247.247.25.25 0 0 1-.24-.2L3 10v-.5a8.2 8.2 0 0 1-1.426-.1A1.886 1.886 0 0 1 .9 10.826c-.128.083-.148.211-.133.386l.19 1.538a.25.25 0 0 1-.25.25.238.238 0 0 1-.23-.174l-.427-1.7a.35.35 0 0 1 .055-.3c.437-.68-.049-2.55-.049-2.55A1.354 1.354 0 0 1 0 7.922V5.5a2.027 2.027 0 0 1 2.736-1.914s.1.03.142.049a15.15 15.15 0 0 0 3.814.038l.18-.062a1.842 1.842 0 0 1 1.26 0c.078.02.154.05.226.089.1.049.196.106.287.171A1.8 1.8 0 0 0 9.5 4h1V3l.5.5c.5-1.5 2.5-1 2.5-1a1.687 1.687 0 0 0-1.5 1l2.5 2a.612.612 0 0 1 .186-.069.318.318 0 0 1 .314.321V6.1Z",slipway:"m2 10 12 1.495V12H2v-2Zm12-4-1 1v.583L5.196 4.332l.063-.125L6.61 2.845h.831a.35.35 0 0 0 0-.7h-.976a.352.352 0 0 0-.248.103L4.723 3.753a.371.371 0 0 0-.066.09l-.109.219L2 3c0 2-.03 3.958 2.86 4.5C6.28 7.765 13 9 13 9l2-2-1-1Z",snowmobile:"M15 10a1 1 0 0 1-1 1H9.414a1 1 0 0 1-.707-.293L7.146 9.146A.499.499 0 0 0 6.793 9H3.334a1 1 0 0 1-.601-.2L1.386 7.788A1.013 1.013 0 0 1 1 7a.995.995 0 0 1 .472-.844L5 4l1.038-1.692A.5.5 0 0 1 7 2.5V6l1 1h1l5.412-.992a.5.5 0 0 1 .355.915L13 8l1.631 1.224A.99.99 0 0 1 15 10Zm-9.5 0H3.225c-.504 0-.999-.127-1.44-.368L.74 9.062a.5.5 0 0 0-.48.877l1.269.693c.441.242.937.368 1.44.368H5.5a.5.5 0 0 0 0-1Z",soccer:"M11,1.5C11,2.3284,10.3284,3,9.5,3S8,2.3284,8,1.5S8.6716,0,9.5,0S11,0.6716,11,1.5z M11,11c-0.5523,0-1,0.4477-1,1 s0.4477,1,1,1s1-0.4477,1-1S11.5523,11,11,11z M12.84,6.09l-1.91-1.91l0,0C10.8399,4.0675,10.7041,4.0014,10.56,4H3.5 C3.2239,4,3,4.2239,3,4.5S3.2239,5,3.5,5h2.7L3,11.3l0,0c-0.0138,0.066-0.0138,0.134,0,0.2c-0.058,0.2761,0.1189,0.547,0.395,0.605 C3.6711,12.163,3.942,11.9861,4,11.71l0,0L5,10h2l-1.93,4.24l0,0C5.0228,14.3184,4.9986,14.4085,5,14.5 c-0.0552,0.2761,0.1239,0.5448,0.4,0.6c0.2761,0.0552,0.5448-0.1239,0.6-0.4l0,0l4.7-9.38l1.44,1.48 c0.211,0.1782,0.5264,0.1516,0.7046-0.0593C13.0037,6.5523,13.0018,6.2761,12.84,6.09z",square:"M12 13H3C2.4477 13 2 12.5523 2 12V3C2 2.4477 2.4477 2 3 2H12C12.5523 2 13 2.4477 13 3V12C13 12.5523 12.5523 13 12 13Z","square-stroked":"M11.7 3.3V11.7H3.3V3.3H11.7ZM12 2H3C2.4477 2 2 2.4477 2 3V12C2 12.5523 2.4477 13 3 13H12C12.5523 13 13 12.5523 13 12V3C13 2.4477 12.5523 2 12 2Z",stadium:"M7,1v2v1.5v0.5098C4.1695,5.1037,2.0021,5.9665,2,7v4.5c0,1.1046,2.4624,2,5.5,2s5.5-0.8954,5.5-2V7 c-0.0021-1.0335-2.1695-1.8963-5-1.9902V4.0625L11,2.75L7,1z M3,8.1465c0.5148,0.2671,1.2014,0.4843,2,0.6328v2.9668 C3.7948,11.477,3,11.0199,3,10.5V8.1465z M12,8.1484V10.5c0,0.5199-0.7948,0.977-2,1.2461V8.7812 C10.7986,8.6328,11.4852,8.4155,12,8.1484z M6,8.9219C6.4877,8.973,6.9925,8.9992,7.5,9C8.0073,8.9999,8.5121,8.9743,9,8.9238 v2.9844C8.5287,11.964,8.0288,12,7.5,12S6.4713,11.964,6,11.9082V8.9219z",star:"M7.5,0l-2,5h-5l4,3.5l-2,6l5-3.5 l5,3.5l-2-6l4-3.5h-5L7.5,0z","star-stroked":"m7.5 2.69 1.07 2.68.25.63h3l-2 1.75-.5.44.23.63 1 3.13-2.48-1.77-.57-.4-.57.4-2.52 1.77 1-3.13.21-.63-.5-.44-2-1.75h3l.25-.63zm0-2.69-2 5h-5l4 3.5-2 6 5-3.5 5 3.5-2-6 4-3.5h-5z",suitcase:"M4.5 4V2C4.5 1.44772 4.94772 1 5.5 1H9.5C10.0523 1 10.5 1.44772 10.5 2V4H12C12.5523 4 13 4.44772 13 5V11C13 11.5523 12.5523 12 12 12H3C2.44771 12 2 11.5523 2 11V5C2 4.44772 2.44772 4 3 4H4.5ZM5.5 2V4H9.5V2H5.5Z",swimming:"M10.1113,2C9.9989,2,9.6758,2.1465,9.6758,2.1465L6.3535,3.8262 C5.9111,4.0024,5.7358,4.7081,6.002,5.0605l0.9707,1.4082L3.002,8.498L5,9.998l2.502-1.5l2.5,1.5l1.002-1.002l-3-4l2.5566-1.5293 c0.5286-0.2662,0.4434-0.7045,0.4434-0.9707C10.9999,2.2861,10.6437,2,10.1113,2z M12.252,5C11.2847,5,10.5,5.7827,10.5,6.75 s0.7847,1.752,1.752,1.752s1.75-0.7847,1.75-1.752S13.2192,5,12.252,5z M2.5,10L0,11.5V13l2.5-1.5L5,13l2.502-1.5l2.5,1.5L12,11.5 l3,1.5v-1.5L12,10l-1.998,1.5l-2.5-1.5L5,11.5L2.5,10z","table-tennis":"M11.9676,10.2275a3.8116,3.8116,0,0,1-1.9122.9831L3.7678,4.9338A4.0283,4.0283,0,0,1,4.7725,3.0324C7.03.7745,9.98.2235,12.3781,2.6219S14.2255,7.97,11.9676,10.2275Zm-6.987,1.6093A3.8422,3.8422,0,0,1,6.149,11.278,4.5328,4.5328,0,0,1,8,11.4452L3.5456,7a4.4126,4.4126,0,0,1,.1572,1.9223,3.6639,3.6639,0,0,1-.5208,1.1159c-1.072,1.263-2.132,1.727-2.132,2.1879A1.8378,1.8378,0,0,0,2.7739,13.95C3.2348,13.95,3.6917,12.9368,4.9806,11.8368Z",teahouse:"M8.00002 5C8.00002 5 10 4.9 10 3.4 10 2.46598 9.17751 2.20864 8.47606 1.98917 7.95458 1.82601 7.5 1.68378 7.5 1.3 7.5.386843 8 0 8 0 8 0 7 .531581 7 1.5 7 2.21063 7.54045 2.46176 8.05947 2.70292 8.53888 2.92568 9 3.13994 9 3.7 9 4.7 8.00002 5 8.00002 5ZM11.8372 6.67447C11.3755 8.62063 10.7854 11.1073 9 12V14H6V12C4.21455 11.1073 3.62454 8.62063 3.16276 6.67447 3.10728 6.44061 3.05364 6.21455 3 6H12C11.9464 6.21453 11.8927 6.44063 11.8372 6.67447ZM6.99998 4C6.99998 5 5.49998 5 5.49998 5 5.49998 5 6.29295 4.9 6.29295 4.3 6.29295 4.02526 6.01604 3.85489 5.71852 3.67184 5.37315 3.45935 5 3.22977 5 2.8 5 1.9661 5.99998 1.5 5.99998 1.5 5.99998 1.5 5.49998 1.77344 5.49998 2.5 5.49998 2.88823 5.85322 3.04095 6.21687 3.19818 6.60257 3.36494 6.99998 3.53675 6.99998 4Z",telephone:"M4.51,8.88a0.51,0.51,0,0,0,0,.72l0.72,0.72L3.07,12.5,2.7,12.13A2.24,2.24,0,0,1,2,10.69V9.24a2.24,2.24,0,0,1,.7-1.45L7.77,2.72A2.24,2.24,0,0,1,9.22,2h1.45a2.24,2.24,0,0,1,1.45.72l0.36,0.36L10.31,5.26,9.58,4.53a0.51,0.51,0,0,0-.72,0ZM4.13,13.6a1,1,0,0,0,1.4137.0363Q5.5623,13.6186,5.58,13.6l0.72-.72a1,1,0,0,0,.0363-1.4137Q6.3186,11.4477,6.3,11.43Zm7.25-7.28a1,1,0,0,0,1.4137.0363C12.8061,6.3445,13.55,5.6,13.55,5.6a1,1,0,0,0,.0363-1.4137Q13.5686,4.1677,13.55,4.15Z",tennis:"M13.1284,1.87c-1.5418-1.5406-4.5535-.7759-6.28,1.05a6.8282,6.8282,0,0,0-1.88,4.4,5.7275,5.7275,0,0,1-.57,2.72.6814.6814,0,0,0-.67.17l-2.49,2.5a.6941.6941,0,0,0,0,.98l.07.07a.7051.7051,0,0,0,.98,0l2.5-2.49a.683.683,0,0,0,.18-.66,8.5694,8.5694,0,0,1,3.12-.58,6.5487,6.5487,0,0,0,3.99-1.87C14.1084,6.13,14.579,3.3194,13.1284,1.87Zm-2.2-.04a2.3071,2.3071,0,0,1,1.64.61,2.548,2.548,0,0,1,.5,2.44l-2.95-2.96A3.8648,3.8648,0,0,1,10.9284,1.83Zm-4.57,6.81a2.6485,2.6485,0,0,1-.48-2.55l3.04,3.04A2.8522,2.8522,0,0,1,6.3584,8.64Zm2.88.39-3.26-3.27a5.1623,5.1623,0,0,1,.49-1.08l3.85,3.85A5.5093,5.5093,0,0,1,9.2384,9.03Zm1.34-.66-3.94-3.95a5.2032,5.2032,0,0,1,.74-.9l4.1,4.1A5.6869,5.6869,0,0,1,10.5784,8.37Zm1.11-.96-4.1-4.1a5.5714,5.5714,0,0,1,.84-.65l3.92,3.92A5.7187,5.7187,0,0,1,11.6884,7.41Zm.82-1.09L8.6984,2.5a4.1707,4.1707,0,0,1,1.09-.48l3.2,3.2A5.5656,5.5656,0,0,1,12.5084,6.32Z",theatre:"M2,1c0,0-1,0-1,1v5.1582C1,8.8885,1.354,11,4.5,11H5V8L2.5,9c0,0,0-2.5,2.5-2.5V5 c0-0.7078,0.0868-1.3209,0.5-1.7754C5.8815,2.805,6.5046,1.9674,8.1562,2.7539L9,3.3027V2c0,0,0-1-1-1C7.2922,1,6.0224,2,5,2 S2.7865,1,2,1z M3,3c0.5523,0,1,0.4477,1,1S3.5523,5,3,5S2,4.5523,2,4S2.4477,3,3,3z M7,4c0,0-1,0-1,1v5c0,2,1,4,4,4s4-2,4-4V5 c0-1-1-1-1-1c-0.7078,0-1.9776,1-3,1S7.7865,4,7,4z M8,6c0.5523,0,1,0.4477,1,1S8.5523,8,8,8S7,7.5523,7,7S7.4477,6,8,6z M12,6 c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1s-1-0.4477-1-1S11.4477,6,12,6z M7.5,10H10h2.5c0,0,0,2.5-2.5,2.5S7.5,10,7.5,10z",toilet:"M3 1.5a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0ZM11.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM3.29 4a1 1 0 0 0-.868.504L.566 7.752a.5.5 0 1 0 .868.496l1.412-2.472A345.048 345.048 0 0 0 1 11h2v2.5a.5.5 0 0 0 1 0V11h1v2.5a.5.5 0 0 0 1 0V11h2L6.103 5.687l1.463 2.561a.5.5 0 1 0 .868-.496L6.578 4.504A1 1 0 0 0 5.71 4H3.29ZM9 4.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0v4a.5.5 0 0 1-1 0v-4h-1v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 1-1 0v-5Z",toll:"M2.5 1C2.22386 1 2 1.22386 2 1.5V2V13H1.5C1.22386 13 1 13.2239 1 13.5C1 13.7761 1.22386 14 1.5 14H8.5C8.77614 14 9 13.7761 9 13.5C9 13.2239 8.77614 13 8.5 13H7V10.0987L13.7761 5.54576C14.0053 5.39175 14.0663 5.08109 13.9123 4.85189L13.6334 4.43687C13.4794 4.20766 13.1688 4.1467 12.9396 4.3007L7 8.29152V2H7.5C7.77614 2 8 1.77614 8 1.5C8 1.22386 7.77614 1 7.5 1H2.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5.5C5.77614 3 6 3.22386 6 3.5V7.5C6 7.77614 5.77614 8 5.5 8H3.5C3.22386 8 3 7.77614 3 7.5V3.5Z",town:"m10.651 6.121c-.0445-.0357-.0999-.05516-.157-.05516s-.1125.01946-.157.05516l-2.245 1.808c-.02881.02323-.05204.05263-.06796.08603-.01593.03341-.02414.06997-.02404.10697v4.625c0 .0671.02666.1315.0741.1789.04745.0474.1118.0741.1789.0741h1.494c.0671 0 .13145-.0267.1789-.0741s.0741-.1118.0741-.1789v-1.747h1v1.747c0 .0671.0267.1315.0741.1789.0475.0474.1118.0741.1789.0741h1.494c.0671 0 .1315-.0267.1789-.0741s.0741-.1118.0741-.1789v-4.627c.0007-.03831-.0074-.07627-.0237-.11095s-.0404-.06514-.0703-.08905zm-.651 3.879h-1v-1h1zm2 0h-1v-1h1zm-6.29-9.184997c-.02299-.034654-.05419-.063081-.09083-.082746s-.07758-.029956-.11917-.029956c-.04158 0-.08252.010291-.11916.029956-.03665.019665-.06785.048092-.09084.082746l-3.248 4.120997c-.02752.0415-.04214.09021-.042.14v7.671c-.00013.0331.00626.0659.0188.0965s.031.0585.0543.082c.02331.0235.05102.0422.08154.0549.03053.0128.06327.0195.09636.0196h2.5c.06632-.0008.12964-.0277.17626-.0749.04661-.0471.07275-.1108.07274-.1771v-1.748h1v1.748c0 .0668.02655.1309.07381.1782s.11136.0738.17819.0738h.748v-6c-.00004-.07511.01684-.14926.04938-.21695.03255-.06769.07993-.12718.13862-.17405l1.812-1.609c0-.05-3.29-4.184997-3.29-4.184997zm-1.71 8.184997h-1v-1h1zm0-3h-1v-1h1zm2 3h-1v-1h1zm0-3h-1v-1h1z","town-hall":"M13,4H9l0-3L7.5,0L6,1v3H2L1,5v1h13V5L13,4z M7.5,1.5c0.4,0,0.7,0.3,0.7,0.8S7.9,3,7.5,3S6.7,2.7,6.7,2.2 C6.7,1.8,7.1,1.5,7.5,1.5z M13,7H2v4l-1,1.5V14h13v-1.5L13,11V7z M5,12.5H4V8h1V12.5z M8,12.5H7V8h1V12.5z M11,12.5h-1V8h1V12.5z",triangle:"m7.5385 1c-.2948 0-.4883.1772-.6154.3846l-5.8462 9.5385c-.0769.0769-.0769.2307-.0769.3846 0 .5385.3846.6923.6923.6923h11.6154c.3846 0 .6923-.1538.6923-.6923 0-.1538 0-.2308-.0769-.3846l-5.7693-9.5385c-.1258-.2081-.3656-.3846-.6153-.3846z","triangle-stroked":"m7.52427.500405c-.2814-.0091-.5456.1419-.6907.3948l-5.5 9.869195c-.3118.5434.0614 1.2355.6664 1.2356h11.00003c.605-.0001.9782-.6922.6664-1.2355l-5.50003-9.869195c-.1362-.2374-.378-.3861-.6421-.3949zm-.0243 2.398895 4.12673 7.4704h-8.25343z",tunnel:"M4 2C2.34315 2 1 3.32706 1 4.96406V12.012C1 12.5576 1.44772 13 2 13H3V8.55391C3 6.09839 5.01472 4.10781 7.5 4.10781C9.98528 4.10781 12 6.09842 12 8.55393V13H13C13.5523 13 14 12.5576 14 12.012V4.96406C14 3.32706 12.6569 2 11 2H4ZM11 10V9.04794C11 6.86526 9.43299 5.09583 7.5 5.09583C5.56701 5.09583 4.00001 6.86526 4 9.04794V13L11 10Z",veterinary:"M7.5,6c-2.5,0-3,2.28-3,3.47h0a6.149,6.149,0,0,0-1.7.89,2,2,0,0,0-.4,2.78,2.06,2.06,0,0,0,2.8.4,4,4,0,0,1,2.3-.69,4,4,0,0,1,2.3.69,2,2,0,0,0,2.8-.3,1.929,1.929,0,0,0-.226-2.72c-.024-.021-.049-.041-.074-.06l-.1-.1a8.992,8.992,0,0,0-1.7-.89h0C10.5,8.29,10,6,7.5,6ZM2.08,4.3a1.58,1.58,0,0,0-.76,2A1.52,1.52,0,0,0,2.93,7.7a1.58,1.58,0,0,0,.76-2A1.52,1.52,0,0,0,2.08,4.3Zm10.85,0a1.58,1.58,0,0,1,.76,2,1.52,1.52,0,0,1-1.61,1.4,1.58,1.58,0,0,1-.76-2A1.52,1.52,0,0,1,12.93,4.3Zm-7.85-3c-.68.09-1,.94-.76,1.87A1.77,1.77,0,0,0,5.93,4.7c.68-.09,1-.94.76-1.87A1.77,1.77,0,0,0,5.08,1.3Zm4.85,0c.68.09,1,.94.76,1.87A1.77,1.77,0,0,1,9.07,4.7c-.68-.08-1-.94-.76-1.87A1.769,1.769,0,0,1,9.93,1.3Z",viewpoint:"M6.02,8.425a2.3859,2.3859,0,0,0-.46.44l-4.55-3.5a7.9976,7.9976,0,0,1,1.51-1.51Zm6.46-4.56-3.5,4.55a2.3971,2.3971,0,0,1,.45.45l4.56-3.5A7.945,7.945,0,0,0,12.48,3.865ZM7.3042,10.0129a1.5,1.5,0,1,0,1.6829,1.2914h0A1.5,1.5,0,0,0,7.3042,10.0129ZM6.43,2.235a7.9329,7.9329,0,0,0-2.06.55l2.2,5.32a2.0438,2.0438,0,0,1,.61-.17Zm2.14.01-.75,5.69a2.49,2.49,0,0,1,.61.16l2.2-5.3A7.2129,7.2129,0,0,0,8.57,2.245Z",village:"M6.176 1.176a.249.249 0 0 0-.352 0l-4.4 4.4A.25.25 0 0 0 1.6 6H3v6.751a.25.25 0 0 0 .249.249h3.5A.248.248 0 0 0 7 12.753v-7.43c0-.066.026-.13.073-.176L8.5 3.5 6.176 1.176ZM6 11H5v-1h1v1Zm0-2H5V8h1v1Zm0-3v1H5V6h1Z M12.75 3h-.5a.25.25 0 0 0-.25.25V5l-1.324-1.824a.249.249 0 0 0-.352 0L8.056 5.932A.246.246 0 0 0 8 6.088v6.66a.249.249 0 0 0 .246.252h1.5a.253.253 0 0 0 .254-.252V11h1v1.747a.253.253 0 0 0 .253.253h1.5a.25.25 0 0 0 .247-.249V3.25a.25.25 0 0 0-.25-.25ZM10 8H9V7h1v1Zm2 0h-1V7h1v1Zm-2 2H9V9h1v1Zm2 0h-1V9h1v1Z",volcano:"M8.4844,1.0002 c-0.1464,0.005-0.2835,0.0731-0.375,0.1875L6.4492,3.2619L4.8438,1.7385C4.4079,1.3374,3.7599,1.893,4.0899,2.385l1.666,2.4004 C5.9472,5.061,6.3503,5.0737,6.5586,4.8108C6.7249,4.6009,7,4.133,7.5,4.133s0.7929,0.4907,0.9414,0.6777 c0.175,0.2204,0.4973,0.2531,0.7129,0.0723l1.668-1.4004c0.4408-0.3741,0.0006-1.0735-0.5273-0.8379L9,3.2268V1.5002 C9.0002,1.2179,8.7666,0.9915,8.4844,1.0002L8.4844,1.0002z M5,6.0002L2.0762,11.924C1.9993,12.0009,2,12.155,2,12.3088 c0,0.5385,0.3837,0.6914,0.6914,0.6914h9.6172c0.3846,0,0.6914-0.153,0.6914-0.6914c0-0.1538,0.0008-0.2309-0.0762-0.3848L10,6.0002 c-0.5,0-1,0.5-1,1v0.5c0,0.277-0.223,0.5-0.5,0.5S8,7.7772,8,7.5002v-0.5c0-0.2761-0.2238-0.5-0.5-0.5S7,6.7241,7,7.0002v2 c0,0.277-0.223,0.5-0.5,0.5S6,9.2772,6,9.0002v-2C6,6.5002,5.5,6.0002,5,6.0002z",volleyball:"M13.91,7.94a5.9086,5.9086,0,0,1-.13.94,8.8218,8.8218,0,0,0-2.17-1.49,8.89,8.89,0,0,0-1.4-.56,8.6142,8.6142,0,0,0-1.82-.35.221.221,0,0,0-.08-.01A7.32,7.32,0,0,1,7.5,4.59c-.01-.01-.01-.01,0-.02a7.7573,7.7573,0,0,1,1.52.15,7.0987,7.0987,0,0,1,1.56.5,6.8585,6.8585,0,0,1,1.4.78A7.4165,7.4165,0,0,1,13.91,7.94Zm-1.87-5a6.2232,6.2232,0,0,0-1.85-1.27,4.2725,4.2725,0,0,0-.98-.36,5.6412,5.6412,0,0,0-1.55-.23,1.2882,1.2882,0,0,0-.32,0A7.4263,7.4263,0,0,0,7.21,2.5c0,.2.01.39.02.58a2.28,2.28,0,0,1,.26-.01,2.6438,2.6438,0,0,1,.28.01,8.2865,8.2865,0,0,1,1.49.16,8.9879,8.9879,0,0,1,1.35.37,8.7922,8.7922,0,0,1,1.53.7,10.18,10.18,0,0,1,1.39.97A6.4588,6.4588,0,0,0,12.04,2.94ZM4.01,8.76a9.4084,9.4084,0,0,1-.62-1.37,9.1038,9.1038,0,0,1-.37-1.41,9.1748,9.1748,0,0,1-.16-1.67V4.28a8.455,8.455,0,0,1,.1-1.34A6.28,6.28,0,0,0,1.47,5.3a6.2222,6.2222,0,0,0-.4,2.2c0,.15.01.3.02.44a5.9086,5.9086,0,0,0,.13.94,5.7343,5.7343,0,0,0,.41,1.23c.22-.05.44-.11.65-.17a8.0188,8.0188,0,0,0,1.9-.88C4.12,8.96,4.06,8.86,4.01,8.76Zm2.6-2.28a9,9,0,0,1-.63-1.76,9.135,9.135,0,0,1-.24-1.48c-.02-.25-.03-.49-.03-.74a9.3777,9.3777,0,0,1,.08-1.19,4.2725,4.2725,0,0,0-.98.36,7.7038,7.7038,0,0,0-.42,1.94c-.02.22-.03.44-.03.67a7.2659,7.2659,0,0,0,.06.93,7.4258,7.4258,0,0,0,.37,1.63,6.4705,6.4705,0,0,0,.59,1.28A8.0174,8.0174,0,0,0,6.65,6.55.2522.2522,0,0,1,6.61,6.48ZM12.7,9.93s0-.01-.01,0a7.0128,7.0128,0,0,0-1.7-1.16c-.06.1-.11.19-.17.29a8.783,8.783,0,0,1-.88,1.22,8.9125,8.9125,0,0,1-1.06,1.07,10.4181,10.4181,0,0,1-1.38.98,8.9933,8.9933,0,0,1-2.64,1.02,6.2985,6.2985,0,0,0,5.28,0,5.9674,5.9674,0,0,0,2.42-1.89,4.8258,4.8258,0,0,0,.65-1.03A6.0315,6.0315,0,0,0,12.7,9.93Zm-5.17-2c-.01.01-.02.03-.03.04a9.26,9.26,0,0,1-1.25,1.4,9.5925,9.5925,0,0,1-1.19.91,9.2683,9.2683,0,0,1-2.62,1.18,6.0989,6.0989,0,0,0,.53.61,7.7353,7.7353,0,0,0,3.15-.72,7.3839,7.3839,0,0,0,1.38-.82A7.6429,7.6429,0,0,0,8.75,9.37a7.7441,7.7441,0,0,0,.82-1.15A7.3414,7.3414,0,0,0,7.53,7.93Z",warehouse:"M13.5,5c-0.0762,0.0003-0.1514-0.0168-0.22-0.05L7.5,2L1.72,4.93C1.4632,5.0515,1.1565,4.9418,1.035,4.685 S1.0232,4.1215,1.28,4L7.5,0.92L13.72,4c0.2761,0.0608,0.4508,0.3339,0.39,0.61C14.0492,4.8861,13.7761,5.0608,13.5,5z M5,10H2v3h3 V10z M9,10H6v3h3V10z M13,10h-3v3h3V10z M11,6H8v3h3V6z M7,6H4v3h3V6z","waste-basket":"M12.41,5.58l-1.34,8c-0.0433,0.2368-0.2493,0.4091-0.49,0.41H4.42c-0.2407-0.0009-0.4467-0.1732-0.49-0.41l-1.34-8 C2.5458,5.3074,2.731,5.0506,3.0035,5.0064C3.0288,5.0023,3.0544,5.0002,3.08,5h8.83c0.2761-0.0036,0.5028,0.2174,0.5064,0.4935 C12.4168,5.5225,12.4146,5.5514,12.41,5.58z M13,3.5C13,3.7761,12.7761,4,12.5,4h-10C2.2239,4,2,3.7761,2,3.5S2.2239,3,2.5,3H5V1.5 C5,1.2239,5.2239,1,5.5,1h4C9.7761,1,10,1.2239,10,1.5V3h2.5C12.7761,3,13,3.2239,13,3.5z M9,3V2H6v1H9z",watch:"M12.5,7H12a.426.426,0,0,0-.049.01A4.484,4.484,0,0,0,10,3.76V1.5A.5.5,0,0,0,9.5,1h-4a.5.5,0,0,0-.5.5V3.76a4.5,4.5,0,0,0,0,7.48V13.5a.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5V11.24a4.486,4.486,0,0,0,1.951-3.25A.426.426,0,0,0,12,8h.5a.5.5,0,0,0,0-1Zm-5,4A3.5,3.5,0,1,1,11,7.5,3.5,3.5,0,0,1,7.5,11ZM9,7H8V5.5a.5.5,0,0,0-1,0v2a.5.5,0,0,0,.5.5H9A.5.5,0,0,0,9,7Z",water:"M7.5 14C9.57688 14 12 12.7117 12 9.43241C12 7.20724 8.53844 2.2883 7.5 1C6.57691 2.2883 3 7.09007 3 9.43241C3 12.7117 5.42312 14 7.5 14Z",waterfall:"M14 1H5C3.34315 1 2 2.34314 2 4V8.87918C1.39704 9.28261 1 9.96937 1 10.75C1 11.9927 2.00736 13 3.25 13C3.7127 13 4.14279 12.8599 4.5 12.6209C4.85721 12.8599 5.2873 13 5.75 13C6.28601 13 6.77826 12.812 7.16413 12.5H7.51743C8.01909 12.8165 8.61403 13 9.25 13C11.0449 13 12.5 11.5449 12.5 9.75002C12.5 8.39777 11.6747 7.23919 10.5 6.74934V5C10.5 3.89543 11.3954 3 12.5 3H14V1ZM11.5 9.75C11.5 10.9926 10.4926 12 9.25 12C8.71418 12 8.2221 11.8127 7.83567 11.5H6.75009C6.52204 11.8036 6.15895 12 5.75 12C5.34105 12 4.97796 11.8036 4.74991 11.5H4.25009C4.02204 11.8036 3.65895 12 3.25 12C2.55964 12 2 11.4404 2 10.75C2 10.1453 2.42944 9.64082 3 9.525V5.75C3 5.33579 3.33579 5 3.75 5C4.16421 5 4.5 5.33579 4.5 5.75V9C4.5 9.27614 4.72386 9.5 5 9.5C5.27614 9.5 5.5 9.27614 5.5 9V6.75C5.5 6.33579 5.83579 6 6.25 6C6.66421 6 7 6.33579 7 6.75V9C7 9.27614 7.22386 9.5 7.5 9.5C7.77614 9.5 8 9.27614 8 9V5.75C8 5.33579 8.33579 5 8.75 5C9.16421 5 9.5 5.33579 9.5 5.75V7.51373C10.625 7.63809 11.5 8.59186 11.5 9.75Z",watermill:"M2,10.2L4,9l2.5,1.5l1.4659-0.8788C7.6592,9.4698,7.3716,9.285,7.1231,9.0536l1.4131-1.4131 C8.7672,7.836,9.0557,7.9606,9.375,7.9874V9.224l0.25,0.1501V7.9874c0.3193-0.0268,0.6078-0.1514,0.8388-0.3469l1.4131,1.4131 c-0.4059,0.3781-0.9044,0.6492-1.4528,0.8003L11.5,10.5l0.6984-0.4191C13.2863,9.2595,14,7.9682,14,6.5C14,4.0147,11.9853,2,9.5,2 C8.1917,2,7.0241,2.5674,6.2018,3.4587L4.5,2L1,5h1V10.2z M12.0536,8.8769l-1.4131-1.4131c0.1954-0.231,0.3201-0.5196,0.3469-0.8388 h1.9999C12.956,7.4946,12.6089,8.2806,12.0536,8.8769z M12.9874,6.375h-1.9999c-0.0268-0.3193-0.1514-0.6078-0.3469-0.8388 l1.4131-1.4131C12.6089,4.7193,12.956,5.5054,12.9874,6.375z M9.625,3.0126c0.8696,0.0314,1.6557,0.3784,2.2519,0.9337 l-1.4131,1.4131c-0.231-0.1954-0.5196-0.32-0.8388-0.3468C9.625,5.0126,9.625,3.0126,9.625,3.0126z M9.375,3.0126v1.9999 C9.0558,5.0394,8.7672,5.164,8.5362,5.3594L7.1231,3.9463C7.7193,3.3911,8.5054,3.044,9.375,3.0126z M6.9464,4.1231l1.4131,1.4131 C8.164,5.7672,8.0394,6.0557,8.0126,6.375h-2C6.044,5.5054,6.3911,4.7193,6.9464,4.1231z M8.0126,6.625 c0.0268,0.3192,0.1515,0.6078,0.3469,0.8388L6.9464,8.8769C6.3911,8.2807,6.044,7.4946,6.0126,6.625H8.0126z M9.002,10L6.5,11.5 L4,10l-2.5,1.5V13L4,11.5L6.5,13l2.502-1.5L11.5,13l2.5-1.5V10l-2.5,1.5L9.002,10z",wetland:"M1.48,4.5C1.905,4.1467,2.4483,3.968,3,4c1.2273-0.0869,2.3154,0.7836,2.5,2l0.78,4.68c-0.6394-0.2893-1.3759-0.2709-2,0.05 L3.48,6C3.1874,5.1347,2.3926,4.5387,1.48,4.5z M7.48,11.24c0.3816-0.3076,0.825-0.5293,1.3-0.65L10,3 c0.2926-0.8653,1.0874-1.4613,2-1.5c-0.4198-0.3485-0.955-0.5269-1.5-0.5C9.2727,0.9131,8.1846,1.7836,8,3l-1.3,7.79 C6.9786,10.9052,7.2408,11.0565,7.48,11.24z M11.8,10.74L11.8,10.74c0.1565-0.1277,0.3238-0.2414,0.5-0.34L13,6 c0.2926-0.8653,1.0874-1.4613,2-1.5c-0.4198-0.3485-0.955-0.5269-1.5-0.5c-1.2273-0.0869-2.3154,0.7836-2.5,2l-0.67,4 C10.8731,10.123,11.3778,10.377,11.8,10.74z M14,12L14,12c-0.4346-0.01-0.8579,0.1394-1.19,0.42l-0.47,0.41 c-0.2847,0.2546-0.7153,0.2546-1,0c-0.15-0.12-0.29-0.26-0.44-0.39c-0.7076-0.5968-1.7424-0.5968-2.45,0 c-0.16,0.13-0.31,0.28-0.47,0.41c-0.2847,0.2546-0.7153,0.2546-1,0c-0.16-0.13-0.31-0.28-0.47-0.41 c-0.7059-0.5912-1.7341-0.5912-2.44,0c-0.15,0.13-0.29,0.27-0.44,0.39c-0.0892,0.0715-0.1909,0.1258-0.3,0.16 c-0.2922,0.0652-0.5969-0.0301-0.8-0.25c-0.2475-0.214-0.5117-0.4079-0.79-0.58C1.5336,12.0421,1.2974,11.9865,1.06,12H1 c-0.2761,0-0.5,0.2239-0.5,0.5S0.7239,13,1,13l0,0c0.246,0.0145,0.4762,0.126,0.64,0.31L2,13.57 c0.6717,0.55,1.6308,0.5747,2.33,0.06c0.19-0.14,0.36-0.32,0.55-0.47c0.2847-0.2546,0.7153-0.2546,1,0l0.39,0.35 c0.6937,0.6189,1.7322,0.6484,2.46,0.07c0.15-0.11,0.27-0.25,0.42-0.37c0.2976-0.3038,0.7851-0.3087,1.0889-0.0111 c0.0037,0.0037,0.0074,0.0074,0.0111,0.0111l0.39,0.35c0.4866,0.4124,1.1485,0.5516,1.76,0.37c0.3825-0.1036,0.7286-0.3113,1-0.6 c0.1549-0.1772,0.3674-0.294,0.6-0.33l0,0c0.2761,0,0.5-0.2239,0.5-0.5S14.2761,12,14,12z",wheelchair:"M12,1.5C12,2.3284,11.3284,3,10.5,3S9,2.3284,9,1.5S9.6716,0,10.5,0S12,0.6716,12,1.5z M2.82,4.87l1.74-1.71l1.85,1.29 L5.67,5.7c1.0747,0.3341,2.0207,0.9904,2.71,1.88l0.88-1.5c0.2295-0.4158,0.0785-0.939-0.3373-1.1685 C8.9218,4.911,8.9209,4.9105,8.92,4.91L8.3,4.54L4.79,2.1C4.5927,1.9594,4.3231,1.9805,4.15,2.15l-2,2 C1.9852,4.3716,2.0312,4.6848,2.2528,4.8496C2.4193,4.9735,2.645,4.9816,2.82,4.87z M8.13,10.94 c-0.0143,1.2308-0.5794,2.3904-1.54,3.16c-0.7118,0.5804-1.6016,0.8982-2.52,0.9C1.8261,15,0.0055,13.1839,0,10.94 c0.0023-0.9231,0.3238-1.8169,0.91-2.53c0.1868-0.232,0.398-0.4432,0.63-0.63c0.7131-0.5862,1.6069-0.9077,2.53-0.91 C6.3139,6.8755,8.13,8.6961,8.13,10.94z M6,12.21C6.7679,11.2051,6.5758,9.7679,5.5709,9C4.7501,8.3727,3.6109,8.3727,2.79,9 C2.5283,9.151,2.311,9.3683,2.16,9.63c-0.6923,1.0584-0.3956,2.4777,0.6628,3.17c0.7615,0.4981,1.7457,0.4981,2.5072,0 C5.5805,12.6365,5.8061,12.4378,6,12.21z M14.2,13.21l-2.49-5C11.5906,7.9251,11.3088,7.7425,11,7.75H8.51 c0.3293,0.4578,0.5856,0.9638,0.76,1.5h1.26l2.29,4.58c0.185,0.3728,0.6372,0.525,1.01,0.34c0.3728-0.185,0.525-0.6372,0.34-1.01 L14.2,13.21z",windmill:"M6,5L3.5,7.5l1,1L7,6V5.5L7.5,5L8,5.5V6l2.5,2.5l1-1L9,5H8.5L8,4.5L8.5,4H9l2.5-2.5l-1-1L8,3v0.5L7.5,4L7,3.5V3L4.5,0.5 l-1,1L6,4h0.5L7,4.5L6.5,5H6z M11.5,13h-1l-1-4l-2-2l-2,2l-1,4h-1C3.2239,13,3,13.2238,3,13.5C3,13.7761,3.2239,14,3.5,14h8 c0.2761,0,0.5-0.2239,0.5-0.5C12,13.2238,11.7761,13,11.5,13z M8,13H7v-1.5024C7,11.2228,7.2228,11,7.4976,11 C7.7751,11,8,11.2249,8,11.5024V13z",zoo:"M8.3879,3.8928C8.3879,3.8928,7.6818,5,7,5H4.5C3.8182,5,3.2016,5.4086,2.7273,5.8636L0.5,8C0.231,8.258,0.0072,8.7681,0,9 c-0.0156,0.5,0,1,0,1s1,0,1-1V8.5l1-1h0.5l0.158,0.2892c0,0-0.9535,1.8244-0.9535,3.5289C1.7046,12,2.3864,12,2.3864,12h0.6818 c0,0,0.3409,0,0-0.3409l-0.3409-0.3409C2.7273,10.6364,3.5002,9.6667,4,9c0,0,0.0168,1.1579,0,2c-0.008,0.4096,0.2721,1,0.6818,1 h0.6818c0,0,0.3409,0,0-0.3409l-0.3409-0.3409C4.7105,10.7495,5.5,8.5,5.5,8.5C6.7716,8.5,7,9,8.5,9l0.3636,2.3182 C8.975,12.0282,9.5,12,9.5,12H11c0.3409,0,0.9611-0.3115,0.3409-0.7736L11,11V9c1.2142-0.1722,2-1,2-2h1c0.3214,0,1,0,1-0.5v-1 l-1.7045-1.6818C12.5444,3.0772,12,2.5,11,2.5C9.5469,2.5,8.8636,3.0688,8.3879,3.8928z"},_o=Object.keys(ke);function hn(s,l){const u=ke[s];u||console.warn(`[MakiIcon] Unknown icon: "${s}", falling back to "marker"`);const f=u??ke.marker??"",h=(l==null?void 0:l.size)??32,m=(l==null?void 0:l.fill)??"#333",y=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="${h}" height="${h}"><path fill="${m}" d="${f}"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(y)}`}function Io(s,l){const u={};for(const f of s)u[f]=hn(f,l);return u}const Po="M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z";function pn(s,l){const u=ke[s];u||console.warn(`[MakiIcon] Unknown icon: "${s}", falling back to "marker"`);const f=u??ke.marker??"",h=(l==null?void 0:l.size)??40,m=(l==null?void 0:l.fill)??"#2563eb",y=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 40" width="${h}" height="${Math.round(h*1.25)}"><path d="${Po}" fill="${m}" stroke="white" stroke-width="1.5"/>`+(f?`<svg x="8" y="8" viewBox="0 0 15 15" width="16" height="16"><path fill="white" d="${f}"/></svg>`:"")+"</svg>";return`data:image/svg+xml,${encodeURIComponent(y)}`}function gn(s,l){const u={};for(const f of s)u[f]=pn(f,l);return u}const _1={primary:{fill:"#2563eb",bg:"rgba(37, 99, 235, 0.2)",ring:"rgba(37, 99, 235, 0.2)"},success:{fill:"#00854d",bg:"rgba(0, 133, 77, 0.2)",ring:"rgba(0, 133, 77, 0.2)"},warning:{fill:"#943700",bg:"rgba(148, 55, 0, 0.2)",ring:"rgba(148, 55, 0, 0.2)"},error:{fill:"#ba1a1a",bg:"rgba(186, 26, 26, 0.2)",ring:"rgba(186, 26, 26, 0.2)"}};function To(s){return typeof s=="string"&&/<[a-zA-Z][^>]*>/.test(s)}function yn({color:s="primary"}){const{fill:l}=_1[s];return g.jsxs("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"aimapui-marker-pin",style:{width:32,height:40,display:"block",filter:"drop-shadow(0 4px 3px rgba(0,0,0,0.07)) drop-shadow(0 2px 2px rgba(0,0,0,0.06))"},children:[g.jsx("path",{d:"M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z",fill:l,stroke:"white",strokeWidth:1.5}),g.jsx("circle",{cx:"16",cy:"16",r:"4",fill:"white"})]})}function Fo({icon:s,color:l="primary"}){const{fill:u}=_1[l],f=ke[s]??ke.marker??"";return g.jsxs("div",{className:"aimapui-marker-pin aimapui-marker-pin--icon",style:{position:"relative",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",width:32,height:40,filter:"drop-shadow(0 4px 3px rgba(0,0,0,0.07)) drop-shadow(0 2px 2px rgba(0,0,0,0.06))"},children:[g.jsx("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{position:"absolute",inset:0,width:"100%",height:"100%"},children:g.jsx("path",{d:"M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z",fill:u,stroke:"white",strokeWidth:1.5})}),f&&g.jsx("svg",{viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",style:{position:"relative",zIndex:1,width:16,height:16,marginTop:8,fill:"white"},children:g.jsx("path",{d:f,style:{fill:"white"}})})]})}function No({color:s="primary"}){const{fill:l,bg:u}=_1[s];return g.jsx("div",{className:"aimapui-marker-circle",style:{position:"relative",width:24,height:24,borderRadius:"50%",border:"1.5px solid white",boxShadow:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",justifyContent:"center",background:u,borderColor:l},children:g.jsx("div",{className:"aimapui-marker-circle__inner",style:{width:6,height:6,borderRadius:"50%",background:l}})})}function Zo({color:s="primary"}){const{fill:l}=_1[s];return g.jsx("div",{className:"aimapui-marker-dot",style:{width:8,height:8,borderRadius:"50%",border:"1.5px solid white",boxShadow:"0 1px 3px rgba(0,0,0,0.3)",background:l}})}function Qo({text:s}){return g.jsx("div",{className:"aimapui-marker-label",style:{position:"absolute",top:"calc(100% + 4px)",left:"50%",transform:"translateX(-50%)",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:12,lineHeight:"16px",fontWeight:450,color:"#1d1d1f",whiteSpace:"nowrap",pointerEvents:"none",textShadow:"-1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff, 0 0 2px #fff, 0 0 4px rgba(255,255,255,0.5)"},children:s})}const mn={center:"translate(-50%, -50%)",top:"translate(-50%, 0)",bottom:"translate(-50%, -100%)",left:"translate(0, -50%)",right:"translate(-100%, -50%)","top-left":"translate(0, 0)","top-right":"translate(-100%, 0)","bottom-left":"translate(0, -100%)","bottom-right":"translate(-100%, -100%)"},Oo=[0,0];function Uo(s,l,u,f){let h;switch(s){case"pin":h=g.jsx(yn,{color:l});break;case"circle":h=g.jsx(No,{color:l});break;case"icon":h=g.jsx(Fo,{icon:u||"marker",color:l});break;case"dot":h=g.jsx(Zo,{color:l});break;default:h=g.jsx(yn,{color:l})}return f?g.jsxs("div",{style:{position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center"},children:[h,g.jsx(Qo,{text:f})]}):h}function Qe({longitude:s,latitude:l,variant:u="pin",color:f="primary",icon:h,label:m,content:y,children:C,draggable:b=!1,className:k,overlayContainer:x,onClick:D,onMouseEnter:z,onMouseLeave:B,onDoubleClick:H,onDragEnd:_,onDragging:j,onDragStart:Z,selected:Q=!1,inactive:N=!1,anchor:q="bottom",offsets:J=Oo,overflowHide:r0=!0}){const O=DA(),Y=w.useRef(null),n0=w.useRef(null),A0=w.useRef({lng:s,lat:l}),o0=w.useRef({width:0,height:0}),X=J[0]??0,t0=J[1]??0,V=w.useRef(null),$=w.useRef(D);$.current=D;const e0=w.useRef(z);e0.current=z;const c0=w.useRef(B);c0.current=B;const h0=w.useRef(H);h0.current=H;const p0=w.useRef(Z);p0.current=Z;const H0=w.useRef(j);H0.current=j;const U0=w.useRef(_);U0.current=_;const w0=w.useMemo(()=>{const D0=["aimapui-marker"];return Q&&D0.push("aimapui-marker--selected"),N&&D0.push("aimapui-marker--inactive"),D0.push(`aimapui-marker--${f}`),k&&D0.push(k),D0.join(" ")},[Q,N,f,k]),g0=w.useMemo(()=>y||C||Uo(u,f,h,m),[y,C,u,f,h,m]),N0=D0=>{const _0=Y.current;if(!_0||!D0)return;const{lng:gA,lat:z0}=A0.current;if(isNaN(gA)||isNaN(z0))return;let B0;try{B0=D0.lngLatToContainer([gA,z0])}catch{return}if(!B0||isNaN(B0.x)||isNaN(B0.y))return;const j0=B0.x+X,l0=B0.y-t0,F=mn[q]||mn.bottom,a0=Math.round(j0),U=Math.round(l0);if(_0.style.left="0",_0.style.top="0",_0.style.transform=`translate3d(${a0}px, ${U}px, 0) ${F}`,r0){const{width:V0,height:d0}=o0.current;_0.style.visibility=j0<0||j0>V0||l0<0||l0>d0?"hidden":"visible"}};return w.useEffect(()=>{if(!O)return;let D0=!1;const _0=O.mapService;if(!_0){console.error("[Marker] mapService not available");return}const gA=()=>{var a0;const F=(a0=_0.getContainer)==null?void 0:a0.call(_0);F&&(o0.current={width:F.scrollWidth||F.clientWidth||0,height:F.scrollHeight||F.clientHeight||0})},z0=()=>{Y.current&&N0(_0)},B0=(F,a0,U)=>{var V0;try{(V0=F==null?void 0:F.on)==null||V0.call(F,a0,U)}catch{}},j0=(F,a0,U)=>{var V0;try{(V0=F==null?void 0:F.off)==null||V0.call(F,a0,U)}catch{}};return gA(),B0(_0,"camerachange",z0),B0(_0,"viewchange",z0),B0(O,"resize",gA),(async()=>{var Z0;if(O.loaded||await new Promise(M0=>{O.once("loaded",()=>M0())}),D0)return;const F=document.createElement("div");F.className=w0,F.style.position="absolute",F.style.left="0",F.style.top="0",F.style.whiteSpace="nowrap",F.style.pointerEvents="auto",Y.current=F;const a0=x??((Z0=_0.getMarkerContainer)==null?void 0:Z0.call(_0));if(a0)a0.appendChild(F);else{console.error("[Marker] getMarkerContainer not available");return}N0(_0);let U=!1,V0={lng:0,lat:0};const d0=M0=>{var q0;if(!b)return;U=!0,_0.setMapStatus({dragEnable:!1,zoomEnable:!1});const P0=_0.getContainer(),v0=(q0=P0==null?void 0:P0.getClientRects())==null?void 0:q0[0];if(v0){const lA=v0.left,dA=v0.top,xA=M0.x||M0.clientX,FA=M0.y||M0.clientY;V0=_0.containerToLngLat([xA-lA,FA-dA])}_0.on("mousemove",L0),document.addEventListener("mouseup",T0),p0.current&&p0.current(A0.current.lng,A0.current.lat)},L0=M0=>{if(!U)return;const P0=M0.lngLat||M0.lnglat,{lng:v0,lat:q0}=V0,{lng:lA,lat:dA}=P0,xA={lng:A0.current.lng+lA-v0,lat:A0.current.lat+dA-q0};A0.current=xA,V0=P0,N0(_0),H0.current&&H0.current(xA.lng,xA.lat)},T0=()=>{U&&(U=!1,_0.setMapStatus({dragEnable:!0,zoomEnable:!0}),_0.off("mousemove",L0),document.removeEventListener("mouseup",T0),U0.current&&U0.current(A0.current.lng,A0.current.lat))};F.addEventListener("click",(M0=>{var P0;return(P0=$.current)==null?void 0:P0.call($,M0)})),F.addEventListener("mouseenter",(M0=>{var P0;return(P0=e0.current)==null?void 0:P0.call(e0,M0)})),F.addEventListener("mouseleave",(M0=>{var P0;return(P0=c0.current)==null?void 0:P0.call(c0,M0)})),F.addEventListener("dblclick",(M0=>{var P0;return(P0=h0.current)==null?void 0:P0.call(h0,M0)})),b&&F.addEventListener("mousedown",d0),V.current={updatePosition:z0,handleDragStart:d0,handleDragMove:L0,handleDragEnd:T0}})(),()=>{if(D0=!0,j0(_0,"camerachange",z0),j0(_0,"viewchange",z0),j0(O,"resize",gA),V.current&&b&&_0.setMapStatus({dragEnable:!0,zoomEnable:!0}),Y.current){const a0=n0.current,U=Y.current;n0.current=null,Y.current=null,queueMicrotask(()=>{a0&&a0.unmount(),U.parentNode&&U.parentNode.removeChild(U)})}V.current=null}},[O,q,X,t0,r0,b,x]),w.useEffect(()=>{if(!Y.current)return;const D0=Y.current;To(g0)?D0.innerHTML=g0:(n0.current||(n0.current=j2.createRoot(D0)),n0.current.render(g.jsx(g.Fragment,{children:g0})))},[g0]),w.useEffect(()=>{Y.current&&(Y.current.className=w0)},[w0]),w.useEffect(()=>{if(A0.current={lng:s,lat:l},O&&Y.current){const D0=O.mapService;D0&&N0(D0)}},[s,l,O]),null}function Cn({interactions:s}){const l=DA(),[u,f]=w.useState(null);w.useEffect(()=>{if(!l)return;const y=()=>{try{const b=l.mapService;if(b&&typeof b.getMarkerContainer=="function"){const k=b.getMarkerContainer();if(k){f(k);return}}}catch{}const C=setTimeout(()=>{try{const b=l.mapService;if(b&&typeof b.getMarkerContainer=="function"){const k=b.getMarkerContainer();k&&f(k)}}catch{}},100);return()=>clearTimeout(C)};return l.loaded?y():(l.on("loaded",y),()=>{l.off("loaded",y)})},[l]);const h=s.filter(y=>y.type==="marker"),m=s.filter(y=>y.type==="popup");return g.jsxs(g.Fragment,{children:[u&&h.map((y,C)=>g.jsx(Qe,{...y,overlayContainer:u},`marker-${C}`)),u&&m.map((y,C)=>g.jsx(a1,{...y,overlayContainer:u},`popup-${C}`))]})}function wt({title:s,labels:l,colors:u,swatchShape:f="square",grid:h=!1,className:m,interaction:y}){const[C,b]=w.useState(-1),[k,x]=w.useState(new Set),D=H=>{var _;b(H),(_=y==null?void 0:y.onHover)==null||_.call(y,H)},z=()=>{var H;b(-1),(H=y==null?void 0:y.onHover)==null||H.call(y,-1)},B=H=>{var _;x(j=>{const Z=new Set(j);return Z.has(H)?Z.delete(H):Z.add(H),Z}),(_=y==null?void 0:y.onToggle)==null||_.call(y,H)};return g.jsxs("div",{className:bA(m),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsx("div",{className:bA("flex flex-col gap-1",h&&"grid grid-cols-2 gap-x-3 gap-y-1"),children:l.map((H,_)=>{const j=C>=0?C!==_:k.has(_);return g.jsxs("div",{className:bA("flex items-center gap-2 rounded px-1 py-0.5 cursor-pointer select-none transition-[background,opacity] duration-150 hover:bg-primary/[0.06]",j&&"opacity-35"),onMouseEnter:()=>D(_),onMouseLeave:z,onClick:()=>B(_),children:[g.jsx("span",{className:bA("size-3 shrink-0 rounded-sm shadow-[inset_0_0_0_1px_rgba(0,0,0,0.08)] transition-opacity duration-150",f==="circle"&&"rounded-full"),style:{backgroundColor:u[_]??"#ccc"}}),g.jsx("span",{className:"text-xs leading-4 text-on-surface truncate",children:H})]},_)})})]})}function Lt({title:s,labels:l,colors:u,isContinuous:f=!1,showTicks:h=!1,brushable:m=!1,className:y,interaction:C}){const[b,k]=w.useState([0,100]),x=w.useRef(null),D=u.join(", "),z=w.useCallback(B=>H=>{H.stopPropagation(),H.preventDefault();const _=x.current;if(!_)return;const j=_.getBoundingClientRect().width,Z=N=>{const q=_.getBoundingClientRect(),J=N.clientX-q.left,r0=Math.max(0,Math.min(100,J/j*100));k(O=>{var n0;let Y;return B==="left"?Y=[Math.min(r0,O[1]-5),O[1]]:Y=[O[0],Math.max(r0,O[0]+5)],(n0=C==null?void 0:C.onBrush)==null||n0.call(C,Y),Y})},Q=()=>{document.removeEventListener("mousemove",Z),document.removeEventListener("mouseup",Q)};document.addEventListener("mousemove",Z),document.addEventListener("mouseup",Q)},[C,x]);return g.jsxs("div",{className:bA(y),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsxs("div",{className:"flex flex-col gap-1",ref:x,children:[g.jsx("div",{className:bA("flex h-3 rounded overflow-hidden shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",f&&"bg-[length:100%_100%]"),style:f?{background:`linear-gradient(to right, ${D})`}:void 0,children:!f&&u.map((B,H)=>g.jsx("div",{className:"flex-1 relative",style:{backgroundColor:B}},H))}),h&&g.jsx("div",{className:"flex justify-between h-1.5 mt-0.5",children:u.map((B,H)=>H===0?null:g.jsx("div",{className:"w-px h-full bg-outline-variant",style:{position:"absolute",left:`${H/(u.length-1)*100}%`}},H))}),g.jsxs("div",{className:"flex justify-between font-mono text-[11px] leading-3.5 font-[450] text-on-surface-variant",children:[g.jsx("span",{children:l[0]}),l.length>2&&g.jsx("span",{children:l[Math.floor(l.length/2)]}),g.jsx("span",{children:l[l.length-1]})]}),m&&g.jsxs("div",{className:"relative h-3 mt-1 cursor-ew-resize",children:[g.jsx("div",{className:"absolute top-0 h-full border-2 border-primary rounded-sm bg-primary/10 pointer-events-none",style:{left:`${b[0]}%`,width:`${b[1]-b[0]}%`}}),g.jsx("div",{className:"absolute top-1/2 w-2 h-4 bg-primary rounded-sm -translate-x-1/2 -translate-y-1/2 cursor-ew-resize shadow-sm hover:shadow-md hover:shadow-primary/30 transition-shadow duration-150",style:{left:`${b[0]}%`},onMouseDown:z("left")}),g.jsx("div",{className:"absolute top-1/2 w-2 h-4 bg-primary rounded-sm -translate-x-1/2 -translate-y-1/2 cursor-ew-resize shadow-sm hover:shadow-md hover:shadow-primary/30 transition-shadow duration-150",style:{left:`${b[1]}%`},onMouseDown:z("right")})]})]})]})}function kt({title:s,colors:l,labels:u,middleLabel:f,className:h}){const m=l.join(", ");return g.jsxs("div",{className:bA(h),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("div",{style:{position:"relative"},children:[g.jsx("div",{className:"flex h-3 rounded overflow-hidden shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{background:`linear-gradient(to right, ${m})`}}),g.jsx("div",{style:{position:"absolute",top:-4,left:"50%",transform:"translateX(-50%)",width:1,height:20,background:"var(--color-outline-variant, #c3c6d7)"}}),f&&g.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-[18px] font-mono text-[11px] text-on-surface-variant whitespace-nowrap",children:f})]}),g.jsxs("div",{className:"flex justify-between font-mono text-[11px] leading-3.5 font-[450] text-on-surface-variant",style:f?{marginBottom:12}:void 0,children:[g.jsx("span",{children:u[0]}),g.jsx("span",{children:u[1]})]})]})]})}function Mt({title:s,ranges:l,colors:u,className:f,interaction:h}){const[m,y]=w.useState(-1),[C,b]=w.useState(new Set),k=z=>{var B;y(z),(B=h==null?void 0:h.onHover)==null||B.call(h,z)},x=()=>{var z;y(-1),(z=h==null?void 0:h.onHover)==null||z.call(h,-1)},D=z=>{var B;b(H=>{const _=new Set(H);return _.has(z)?_.delete(z):_.add(z),_}),(B=h==null?void 0:h.onToggle)==null||B.call(h,z)};return g.jsxs("div",{className:bA(f),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsx("div",{className:"flex flex-col gap-1.5",children:l.map(([z,B],H)=>{const _=m>=0?m!==H:C.has(H);return g.jsxs("div",{className:bA("flex items-center gap-2 cursor-pointer select-none transition-opacity duration-150 hover:opacity-80",_&&"opacity-35"),onMouseEnter:()=>k(H),onMouseLeave:x,onClick:()=>D(H),children:[g.jsx("span",{className:"w-6 h-3 shrink-0 rounded-sm shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{backgroundColor:u[H]??"#ccc"}}),g.jsxs("span",{className:"font-mono text-[11px] leading-3.5 text-on-surface-variant",children:["[",z,", ",B,")"]})]},H)})})]})}function xt({title:s,fillColor:l="#4A90D9",items:u,className:f}){const h=Math.max(...u.map(m=>m.size),1);return g.jsxs("div",{className:bA(f),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("div",{className:"flex items-end gap-2 px-1",children:u.map((m,y)=>g.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:h},children:g.jsx("div",{className:"rounded-full shrink-0 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{width:m.size,height:m.size,backgroundColor:l,opacity:.85}})},y))}),g.jsx("div",{className:"flex items-end gap-2 mt-1",children:u.map((m,y)=>g.jsx("span",{className:"font-mono text-[11px] leading-3.5 text-on-surface-variant whitespace-nowrap",children:m.label},y))})]})]})}function Et({title:s,color:l="#4A90D9",items:u,className:f,interaction:h}){const[m,y]=w.useState(-1),[C,b]=w.useState(new Set),k=z=>{var B;y(z),(B=h==null?void 0:h.onHover)==null||B.call(h,z)},x=()=>{var z;y(-1),(z=h==null?void 0:h.onHover)==null||z.call(h,-1)},D=z=>{var B;b(H=>{const _=new Set(H);return _.has(z)?_.delete(z):_.add(z),_}),(B=h==null?void 0:h.onToggle)==null||B.call(h,z)};return g.jsxs("div",{className:bA(f),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsx("div",{className:"flex flex-col gap-1.5",children:u.map((z,B)=>{const H=m>=0?m!==B:C.has(B);return g.jsxs("div",{className:bA("flex items-center gap-2.5 py-0.5 cursor-pointer select-none transition-opacity duration-150 hover:opacity-80",H&&"opacity-35"),onMouseEnter:()=>k(B),onMouseLeave:x,onClick:()=>D(B),children:[g.jsx("div",{className:"w-7 shrink-0 rounded-full shadow-[0_0_0_1px_rgba(0,0,0,0.06)]",style:{height:z.width,backgroundColor:l,opacity:.85}}),g.jsx("span",{className:"text-xs leading-4 text-on-surface whitespace-nowrap",children:z.label})]},B)})})]})}function zt({title:s,labels:l,fillColor:u="#4A90D9",className:f}){return g.jsxs("div",{className:bA(f),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("div",{className:"flex items-end gap-2 px-1",children:l.map(([y,C],b)=>{const x=6+b/Math.max(l.length-1,1)*18;return g.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:24},children:g.jsx("div",{className:"rounded-full shrink-0 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{width:x,height:x,backgroundColor:u,opacity:.85}})},b)})}),g.jsx("div",{className:"flex items-end gap-2 mt-1",children:l.map(([y,C],b)=>g.jsxs("span",{className:"font-mono text-[11px] leading-3.5 text-on-surface-variant whitespace-nowrap",children:[y,"–",C]},b))})]})]})}function vn(s){return/^(https?:|\/\/|data:)/i.test(s)}function St({title:s,items:l,className:u,interaction:f}){const[h,m]=w.useState(-1),[y,C]=w.useState(new Set),b=D=>{var z;m(D),(z=f==null?void 0:f.onHover)==null||z.call(f,D)},k=()=>{var D;m(-1),(D=f==null?void 0:f.onHover)==null||D.call(f,-1)},x=D=>{var z;C(B=>{const H=new Set(B);return H.has(D)?H.delete(D):H.add(D),H}),(z=f==null?void 0:f.onToggle)==null||z.call(f,D)};return g.jsxs("div",{className:bA(u),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsx("div",{className:"flex flex-col gap-1",children:l.map((D,z)=>{const B=h>=0?h!==z:y.has(z);return g.jsxs("div",{className:bA("flex items-center gap-2 px-1 py-0.5 rounded cursor-pointer select-none transition-[background,opacity] duration-150 hover:bg-primary/[0.06]",B&&"opacity-35"),onMouseEnter:()=>b(z),onMouseLeave:k,onClick:()=>x(z),children:[vn(D.icon)?g.jsx("img",{src:D.icon,alt:D.label,className:"size-5 object-contain shrink-0",onError:H=>{const _=H.target;_.style.display="none";const j=_.nextElementSibling;j&&(j.style.display="flex")}}):g.jsx("span",{className:"size-5 flex items-center justify-center shrink-0 text-base leading-none",children:D.icon}),vn(D.icon)&&g.jsx("span",{className:"size-5 hidden items-center justify-center shrink-0 text-base leading-none text-on-surface-variant",children:"□"}),g.jsx("span",{className:"text-xs leading-4 text-on-surface",children:D.label})]},z)})})]})}function bn({legends:s,className:l,style:u,interaction:f}){return s.length?g.jsx("div",{className:bA("absolute z-20 bottom-6 left-6 max-h-[40%] overflow-y-auto rounded-xl border border-outline-variant/30 bg-surface/80 backdrop-blur-md p-3 px-3.5 text-on-surface shadow-lg scrollbar-thin scrollbar-track-transparent scrollbar-thumb-outline-variant",l),style:u,children:g.jsx("div",{className:"flex flex-col gap-4 [&>*+*]:border-t [&>*+*]:border-outline-variant/20 [&>*+*]:pt-4",children:s.map((h,m)=>g.jsx(jo,{legend:h,interaction:f},`legend-${m}`))})}):null}function jo({legend:s,interaction:l}){switch(s.type){case"categories":return g.jsx(wt,{...s,interaction:l});case"ramp":return g.jsx(Lt,{...s,interaction:l});case"diverging":return g.jsx(kt,{...s,interaction:l});case"threshold":return g.jsx(Mt,{...s,interaction:l});case"size":return g.jsx(xt,{...s,interaction:l});case"lineWidth":return g.jsx(Et,{...s,interaction:l});case"proportion":return g.jsx(zt,{...s,interaction:l});case"icon":return g.jsx(St,{...s,interaction:l});default:return null}}const wn=w.createContext({isMobile:!1,breakpoint:768,width:typeof window<"u"?window.innerWidth:1024,schema:void 0});function $o({responsive:s,children:l}){const[u,f]=w.useState(typeof window<"u"?window.innerWidth:1024);w.useEffect(()=>{const C=()=>f(window.innerWidth);return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]);const h=(s==null?void 0:s.breakpoint)??768,m=u<h,y=w.useMemo(()=>({isMobile:m,breakpoint:h,width:u,schema:s}),[m,h,u,s]);return g.jsx(wn.Provider,{value:y,children:l})}function Ln(){return w.useContext(wn)}function kn({config:s,className:l}){const u=DA(),{items:f,position:h="bottom"}=s,m=b=>{switch(b){case"zoomIn":u==null||u.zoomIn();break;case"zoomOut":u==null||u.zoomOut();break;case"locate":navigator.geolocation&&navigator.geolocation.getCurrentPosition(k=>{u==null||u.setCenter([k.coords.longitude,k.coords.latitude]),u==null||u.setZoom(14)});break;case"reset":u==null||u.setCenter([105,35]),u==null||u.setZoom(4);break}},y={zoomIn:g.jsx("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{d:"M12 5v14m-7-7h14"})}),zoomOut:g.jsx("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{d:"M5 12h14"})}),locate:g.jsxs("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:[g.jsx("circle",{cx:"12",cy:"12",r:"3"}),g.jsx("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2"})]}),reset:g.jsxs("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:[g.jsx("path",{d:"M3 12a9 9 0 1 1 3.3 6.9"}),g.jsx("path",{d:"M3 22v-7h7"})]}),layers:g.jsx("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"})})},C={zoomIn:"放大",zoomOut:"缩小",locate:"定位",reset:"复位",layers:"图层"};return g.jsx("div",{className:bA("aimapui-mobile-toolbar pointer-events-none",h==="bottom"?"aimapui-mobile-toolbar--bottom":"aimapui-mobile-toolbar--top",l),children:g.jsx("div",{className:"aimapui-mobile-toolbar__bar pointer-events-auto",children:f.map((b,k)=>g.jsxs("button",{onClick:()=>m(b),className:"aimapui-mobile-toolbar__button group",style:{background:"none",border:"none",cursor:"pointer"},"aria-label":C[b]??b,title:C[b]??b,children:[g.jsx("span",{className:"aimapui-mobile-toolbar__icon",children:y[b]}),g.jsx("span",{className:"aimapui-mobile-toolbar__label",children:C[b]??b})]},`${b}-${k}`))})})}function Mn({legends:s,className:l,interaction:u}){const[f,h]=w.useState(!1);return s.length?g.jsx("div",{className:bA("aimapui-mobile-sheet-legend",l),children:g.jsxs("div",{className:"aimapui-mobile-sheet-legend__panel",children:[g.jsx("div",{className:"aimapui-mobile-sheet-legend__handle","aria-hidden":"true"}),g.jsxs("button",{onClick:()=>h(!f),className:"aimapui-mobile-sheet-legend__toggle",style:{background:"none",border:"none",cursor:"pointer"},children:[g.jsxs("span",{className:"aimapui-mobile-sheet-legend__toggle-copy",children:[g.jsx("span",{className:"aimapui-mobile-sheet-legend__eyebrow",children:"Legend Panel"}),g.jsxs("span",{className:"aimapui-mobile-sheet-legend__title-row",children:[g.jsx("span",{className:"aimapui-mobile-sheet-legend__title",children:"图例"}),g.jsxs("span",{className:"aimapui-mobile-sheet-legend__badge",children:[s.length," 项"]})]})]}),g.jsx("span",{className:"aimapui-mobile-sheet-legend__chevron-shell","aria-hidden":"true",children:g.jsx("svg",{viewBox:"0 0 24 24",className:bA("aimapui-mobile-sheet-legend__chevron",f&&"aimapui-mobile-sheet-legend__chevron--expanded"),fill:"none",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{d:"M6 9l6 6 6-6"})})})]}),g.jsx("div",{className:bA("aimapui-mobile-sheet-legend__content custom-scrollbar",f?"aimapui-mobile-sheet-legend__content--expanded":"aimapui-mobile-sheet-legend__content--collapsed"),children:s.map((m,y)=>g.jsx("div",{className:"aimapui-mobile-sheet-legend__section",children:g.jsx(Wo,{legend:m,interaction:u})},`mobile-legend-${y}`))})]})}):null}function Wo({legend:s,interaction:l}){switch(s.type){case"categories":return g.jsx(wt,{...s,interaction:l});case"ramp":return g.jsx(Lt,{...s,interaction:l});case"diverging":return g.jsx(kt,{...s,interaction:l});case"threshold":return g.jsx(Mt,{...s,interaction:l});case"size":return g.jsx(xt,{...s,interaction:l});case"lineWidth":return g.jsx(Et,{...s,interaction:l});case"proportion":return g.jsx(zt,{...s,interaction:l});case"icon":return g.jsx(St,{...s,interaction:l});default:return null}}function Go({map:s,schema:l,theme:u="light",onSceneReady:f,onLayerClick:h,onLayerMouseMove:m,onLayerMouseEnter:y,onLayerMouseLeave:C,onMapMove:b,onMapZoom:k,autoFit:x,events:D,children:z,className:B,style:H}){const _=w.useRef(null),j=w.useMemo(()=>{if(l)return X1(mr(l));const J=s??{basemap:"gaode"};return!J.basemap&&!J.engine&&(J.basemap="gaode"),{map:qo(J),layers:[],controls:[],interactions:[],legends:[]}},[l,s]),Z=!l&&!!s,Q=w.useMemo(()=>({onClick:h,onMouseMove:m,onMouseEnter:y,onMouseLeave:C}),[h,m,y,C]),N=w.useMemo(()=>({onMove:b,onZoom:k}),[b,k]),q=w.useCallback(J=>{f==null||f(J)},[f]);return g.jsx(xr,{defaultTheme:u,target:"container",children:g.jsx(vr,{schema:j,children:g.jsx(kr,{events:D,children:g.jsx(ri,{responsive:j.responsive,children:g.jsx(Xo,{schema:j,isComposableMode:Z,autoFit:x,onSceneReady:q,layerEventHandlers:Q,mapEventHandlers:N,containerRef:_,className:B,style:H,children:z})})})})})}function Yo(){const s=DA();return w.useEffect(()=>{if(!s)return;let l=!1,u=null,f=null;const h=new Set,m=()=>{var j,Z;if(l)return;const x=((j=s.getLayers)==null?void 0:j.call(s))??[];if(x.length===0)return;let D=1/0,z=1/0,B=-1/0,H=-1/0,_=!1;for(const Q of x)try{const N=(Z=Q.getSource)==null?void 0:Z.call(Q),q=N==null?void 0:N.extent;if(!q||!Array.isArray(q)||q.length<4)continue;const[J,r0,O,Y]=q;if(!isFinite(J)||!isFinite(r0)||!isFinite(O)||!isFinite(Y)||J>=O||r0>=Y)continue;D=Math.min(D,J),z=Math.min(z,r0),B=Math.max(B,O),H=Math.max(H,Y),_=!0}catch{}if(!(!_||D>=B||z>=H))try{s.fitBounds([[D,z],[B,H]]),l=!0}catch{}},y=()=>{l||(u&&clearTimeout(u),u=setTimeout(m,200))};let C=0;const b=50,k=()=>{var D;if(l)return;C+=1;const x=((D=s.getLayers)==null?void 0:D.call(s))??[];for(const z of x)h.has(z)||(h.add(z),z.inited&&y(),typeof z.on=="function"&&z.on("inited",y));!l&&C<b&&(f=setTimeout(k,100))};return f=setTimeout(k,100),()=>{u&&clearTimeout(u),f&&clearTimeout(f)}},[s]),null}function qo(s){return{basemap:s.basemap??(s.engine?void 0:"gaode"),engine:s.engine,token:s.token,style:s.style,center:s.center??[105,35],zoom:s.zoom??4,pitch:s.pitch??0,rotation:s.rotation??0,minZoom:s.minZoom,maxZoom:s.maxZoom,bounds:s.bounds,gestureConfig:s.gestureConfig}}function Xo({schema:s,isComposableMode:l,autoFit:u,onSceneReady:f,layerEventHandlers:h,mapEventHandlers:m,containerRef:y,className:C,style:b,children:k}){var j,Z;const{isMobile:x}=Ln(),[D,z]=w.useState(s.layers??[]),B=w.useMemo(()=>{var N,q;if(l||!x||!((q=(N=s.responsive)==null?void 0:N.mobile)!=null&&q.layers))return s.layers;const Q=s.responsive.mobile.layers;if("*"in Q){const J=Q["*"];return s.layers.map(r0=>({...r0,...J,id:r0.id}))}return s.layers.map(J=>J.id&&Q[J.id]?{...J,...Q[J.id],id:J.id}:J)},[s.layers,s.responsive,x,l]),H=w.useMemo(()=>{var q,J;const Q=s.controls??[];if(!x||!((J=(q=s.responsive)==null?void 0:q.mobile)!=null&&J.controls))return Q;const N=s.responsive.mobile.controls;return N.hide?Q.filter(r0=>!N.hide.includes(r0.type)):Q},[s.controls,s.responsive,x]),_=w.useCallback((Q,N)=>{z(q=>q.map(J=>J.id===Q?{...J,visible:N}:J))},[]);return g.jsx("div",{ref:y,className:C??"aimapui-container",style:b??{width:"100%",height:"100%"},children:g.jsxs(Hr,{mapSchema:s.map,onSceneReady:f,mapEventHandlers:m,events:s.events,style:{width:"100%",height:"100%"},children:[u&&g.jsx(Yo,{}),!l&&B.length>0&&g.jsx(Zr,{layers:B,eventHandlers:h}),!l&&g.jsx(dn,{controls:H,layers:B,onLayerToggle:_,containerRef:y}),!l&&s.interactions&&s.interactions.length>0&&g.jsx(Cn,{interactions:s.interactions}),!l&&(x?s.legends&&s.legends.length>0&&g.jsx(Mn,{legends:s.legends}):g.jsx(bn,{legends:s.legends??[]})),!l&&x&&((Z=(j=s.responsive)==null?void 0:j.mobile)==null?void 0:Z.toolbar)&&g.jsx(kn,{config:s.responsive.mobile.toolbar}),l?g.jsx(Jo,{children:k}):null]})})}function Jo({children:s}){const{controls:l,others:u}=w.useMemo(()=>{const f=[],h=[];return w.Children.forEach(s,(m,y)=>{w.isValidElement(m)&&UA.check(m)?f.push(m):h.push(m)}),{controls:f,others:h}},[s]);return g.jsxs(g.Fragment,{children:[l.length>0&&g.jsx(it,{children:l}),u]})}function c1(s,l){if(s===l)return!1;if(s==null||l==null||typeof s!=typeof l||typeof s!="object")return!0;try{return JSON.stringify(s)!==JSON.stringify(l)}catch{return!0}}function Ko(s,l){const u=c1(s.map,l.map),f=new Map;(s.layers??[]).forEach(j=>{j.id&&f.set(j.id,j)});const h=new Map;(l.layers??[]).forEach(j=>{j.id&&h.set(j.id,j)});const m=[],y=[],C=[];(l.layers??[]).forEach((j,Z)=>{const Q=j.id??`__index_${Z}`;if(!f.has(Q))m.push(j);else{const N=f.get(Q);c1(N,j)&&C.push({id:Q,prev:N,next:j})}}),(s.layers??[]).forEach((j,Z)=>{const Q=j.id??`__index_${Z}`;h.has(Q)||y.push(Q)});const b=s.controls??[],k=l.controls??[],x=[],D=[],z=[],B=Math.max(b.length,k.length);for(let j=0;j<B;j++)j>=b.length?x.push(k[j]):j>=k.length?D.push(b[j]):c1(b[j],k[j])&&z.push({index:j,prev:b[j],next:k[j]});const H=c1(s.interactions,l.interactions),_=c1(s.legends,l.legends);return{mapChanged:u,layersAdded:m,layersRemoved:y,layersUpdated:C,controlsAdded:x,controlsRemoved:D,controlsUpdated:z,interactionsChanged:H,legendsChanged:_}}function Ro(s){const l=[];return s.map?l.push(...As(s.map)):l.push({path:"map",message:"map is required",severity:"error"}),!s.layers||!Array.isArray(s.layers)?l.push({path:"layers",message:"layers must be an array",severity:"error"}):s.layers.forEach((u,f)=>{l.push(...es(u,f))}),s.controls&&(Array.isArray(s.controls)?s.controls.forEach((u,f)=>{u.type||l.push({path:`controls[${f}].type`,message:"control type is required",severity:"error"})}):l.push({path:"controls",message:"controls must be an array",severity:"error"})),s.interactions&&(Array.isArray(s.interactions)?s.interactions.forEach((u,f)=>{(u.type==="marker"||u.type==="popup")&&(typeof u.longitude!="number"||typeof u.latitude!="number")&&l.push({path:`interactions[${f}]`,message:"marker/popup requires longitude and latitude as numbers",severity:"error"})}):l.push({path:"interactions",message:"interactions must be an array",severity:"error"})),s.legends&&(Array.isArray(s.legends)?s.legends.forEach((u,f)=>{u.type||l.push({path:`legends[${f}].type`,message:"legend type is required",severity:"error"})}):l.push({path:"legends",message:"legends must be an array",severity:"error"})),l}function As(s){const l=[],u=["gaode","mapbox","maplibre","tianditu","tencent","baidu","google","map"];if(s.basemap&&!u.includes(s.basemap)&&l.push({path:"map.basemap",message:`Invalid basemap "${s.basemap}". Valid values: ${u.join(", ")}`,severity:"error"}),s.center){const[f,h]=s.center;(f<-180||f>180)&&l.push({path:"map.center[0]",message:"Longitude must be between -180 and 180",severity:"error"}),(h<-90||h>90)&&l.push({path:"map.center[1]",message:"Latitude must be between -90 and 90",severity:"error"})}return s.zoom!==void 0&&(s.zoom<0||s.zoom>22)&&l.push({path:"map.zoom",message:"Zoom must be between 0 and 22",severity:"warning"}),s.basemap&&["gaode","mapbox","tianditu","tencent","baidu","google"].includes(s.basemap)&&!s.token&&l.push({path:"map.token",message:`basemap "${s.basemap}" requires a token`,severity:"warning"}),l}function es(s,l){const u=[],f=`layers[${l}]`,h=["point","line","polygon","heatmap","raster","image"];return s.type?h.includes(s.type)||u.push({path:`${f}.type`,message:`Invalid layer type "${s.type}". Valid values: ${h.join(", ")}`,severity:"error"}):u.push({path:`${f}.type`,message:"layer type is required",severity:"error"}),s.source===void 0&&s.source,s.colorField&&!s.colorValues&&!s.color&&u.push({path:`${f}.colorValues`,message:"colorField is set but colorValues is not. L7 will use default scale.",severity:"warning"}),s.sizeField&&!s.sizeValues&&s.size===void 0&&u.push({path:`${f}.sizeValues`,message:"sizeField is set but sizeValues is not. L7 will use default scale.",severity:"warning"}),u}const ts={$schema:"http://json-schema.org/draft-07/schema#",title:"AiMapSchema",description:"Schema-driven React map visualization component configuration",type:"object",required:["map","layers"],properties:{map:{type:"object",required:["basemap"],properties:{basemap:{type:"string",enum:["gaode","mapbox","maplibre","tianditu","tencent","baidu","google","map"],description:"Map base tile provider"},token:{type:"string",description:"API token for the map service"},style:{type:"string",description:"Map style preset (light/dark/normal/darkblue/satellite) or custom URL"},center:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"Map center [longitude, latitude], default [105, 35]"},zoom:{type:"number",description:"Map zoom level, default 4"},pitch:{type:"number",description:"Map pitch in degrees, default 0"},rotation:{type:"number",description:"Map rotation in degrees, default 0"},minZoom:{type:"number",description:"Minimum zoom level"},maxZoom:{type:"number",description:"Maximum zoom level"},bounds:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2,description:"Initial bounds [[swLng, swLat], [neLng, neLat]]"},gestureConfig:{type:"object",properties:{dragPan:{type:"boolean"},pinchZoom:{type:"boolean"},dragRotate:{type:"boolean"}}}}},layers:{type:"array",description:"Array of map layers",items:{type:"object",required:["type","source"],properties:{id:{type:"string",description:"Unique layer ID (auto-generated if omitted)"},type:{type:"string",enum:["point","line","polygon","heatmap","raster","image"],description:"Layer visualization type"},name:{type:"string",description:"Human-readable layer name"},visible:{type:"boolean",default:!0},zIndex:{type:"number",default:0},minZoom:{type:"number"},maxZoom:{type:"number"},autoFit:{type:"boolean",default:!1},source:{description:"GeoJSON, JSON array, or URL string"},sourceType:{type:"string",enum:["geojson","json","csv"]},sourceConfig:{type:"object",properties:{x:{type:"string",description:"Longitude field name"},y:{type:"string",description:"Latitude field name"},x1:{type:"string",description:"End longitude field (for arc lines)"},y1:{type:"string",description:"End latitude field (for arc lines)"},coordinates:{type:"string",description:"Coordinates field"}}},color:{type:"string",description:"Fixed color"},colorField:{type:"string",description:"Field to map color to"},colorValues:{oneOf:[{type:"string",description:"Color palette name"},{type:"array",items:{type:"string"},description:"Array of color values"}]},size:{type:"number",description:"Fixed size"},sizeField:{type:"string",description:"Field to map size to"},sizeValues:{type:"array",items:{type:"number"},description:"Size range [min, max]"},shape:{type:"string",description:"Fixed shape"},shapeField:{type:"string",description:"Field to map shape to"},shapeValues:{type:"array",items:{type:"string"}},style:{type:"object",description:"Additional style properties"},filterField:{type:"string"},filterValues:{type:"array"},animate:{type:"object",properties:{enable:{type:"boolean"},speed:{type:"number"},duration:{type:"number"},trailLength:{type:"number"},repeat:{type:"number"}}},active:{oneOf:[{type:"boolean"},{type:"object",properties:{color:{type:"string"}}}]},select:{oneOf:[{type:"boolean"},{type:"object",properties:{color:{type:"string"}}}]},events:{type:"object",description:"Layer event configuration",properties:{click:{type:"string",description:"Event identifier emitted on click (via EventBus)"},mousemove:{type:"string",description:"Event identifier emitted on mousemove"},mouseenter:{type:"string",description:"Event identifier emitted on mouseenter"},mouseleave:{type:"string",description:"Event identifier emitted on mouseleave"},enablePopup:{type:"boolean",description:"Auto-show popup on click"},popupFields:{type:"array",items:{type:"string"},description:"Fields to show in popup"},popupTemplate:{type:"string",description:"HTML template with {{field}} interpolation"}}}}}},controls:{type:"array",description:"Map control widgets",items:{type:"object",required:["type"],properties:{type:{type:"string",enum:["zoom","scale","fullscreen","geoLocate","mapTheme","mouseLocation","exportImage","layerSwitch"]},position:{type:"string",enum:["topleft","topright","bottomleft","bottomright","topcenter","bottomcenter"]},options:{type:"object"}}}},interactions:{type:"array",description:"Interactive elements (markers, popups, tooltips)",items:{oneOf:[{type:"object",required:["type","longitude","latitude"],properties:{type:{type:"string",const:"marker"},longitude:{type:"number"},latitude:{type:"number"},content:{type:"string"},draggable:{type:"boolean"}}},{type:"object",required:["type","longitude","latitude","content"],properties:{type:{type:"string",const:"popup"},longitude:{type:"number"},latitude:{type:"number"},content:{type:"string"},closeButton:{type:"boolean"}}},{type:"object",required:["type","content"],properties:{type:{type:"string",const:"tooltip"},content:{type:"string"},trigger:{type:"string",enum:["hover","click"]}}}]}},legends:{type:"array",description:"Legend configurations",items:{oneOf:[{type:"object",required:["type","labels","colors"],properties:{type:{type:"string",const:"categories"},title:{type:"string"},labels:{type:"array",items:{type:"string"}},colors:{type:"array",items:{type:"string"}}}},{type:"object",required:["type","labels","colors"],properties:{type:{type:"string",const:"ramp"},title:{type:"string"},labels:{type:"array",items:{type:"string"}},colors:{type:"array",items:{type:"string"}},isContinuous:{type:"boolean"}}},{type:"object",required:["type","labels"],properties:{type:{type:"string",const:"proportion"},title:{type:"string"},labels:{type:"array",items:{type:"array",items:{type:"number"}}},fillColor:{type:"string"}}},{type:"object",required:["type","items"],properties:{type:{type:"string",const:"icon"},title:{type:"string"},items:{type:"array",items:{type:"object",properties:{icon:{type:"string"},label:{type:"string"}}}}}}]}},responsive:{type:"object",properties:{breakpoint:{type:"number",default:768},mobile:{type:"object",properties:{controls:{type:"object",properties:{position:{type:"string"},scale:{type:"number"},hide:{type:"array",items:{type:"string"}}}},legends:{type:"object",properties:{compact:{type:"boolean"},position:{type:"string"}}},toolbar:{type:"object",required:["items","position"],properties:{items:{type:"array",items:{type:"string"}},position:{type:"string",enum:["bottom","top"]}}}}}}},events:{type:"object",description:"Global event identifier mappings for map and interactions",properties:{mapMove:{type:"string",description:"Event identifier for map move"},mapZoom:{type:"string",description:"Event identifier for map zoom"},markerDragEnd:{type:"string",description:"Event identifier for marker drag end"}}}}};function PA({source:s,sourceType:l,sourceConfig:u,onClick:f,onMouseMove:h,onMouseEnter:m,onMouseLeave:y,onLayerCreated:C,...b}){const k=DA();if(!k)return null;const x={...b,type:"point",source:s,sourceType:l??"json",sourceConfig:u},D=f||h||m||y?{onClick:f,onMouseMove:h,onMouseEnter:m,onMouseLeave:y}:void 0;return g.jsx(Te,{schema:x,scene:k,eventHandlers:D,onLayerCreated:C})}function ee({source:s,sourceType:l,sourceConfig:u,onClick:f,onMouseMove:h,onMouseEnter:m,onMouseLeave:y,onLayerCreated:C,...b}){const k=DA();if(!k)return null;const x={...b,type:"line",source:s,sourceType:l??"json",sourceConfig:u},D=f||h||m||y?{onClick:f,onMouseMove:h,onMouseEnter:m,onMouseLeave:y}:void 0;return g.jsx(Te,{schema:x,scene:k,eventHandlers:D,onLayerCreated:C})}function u1({source:s,sourceType:l,sourceConfig:u,onClick:f,onMouseMove:h,onMouseEnter:m,onMouseLeave:y,onLayerCreated:C,...b}){const k=DA();if(!k)return null;const x={...b,type:"polygon",source:s,sourceType:l??"geojson",sourceConfig:u},D=f||h||m||y?{onClick:f,onMouseMove:h,onMouseEnter:m,onMouseLeave:y}:void 0;return g.jsx(Te,{schema:x,scene:k,eventHandlers:D,onLayerCreated:C})}function xn({source:s,sourceType:l,sourceConfig:u,onClick:f,onMouseMove:h,onMouseEnter:m,onMouseLeave:y,onLayerCreated:C,...b}){const k=DA();if(!k)return null;const x={...b,type:"heatmap",source:s,sourceType:l??"json",sourceConfig:u},D=f||h||m||y?{onClick:f,onMouseMove:h,onMouseEnter:m,onMouseLeave:y}:void 0;return g.jsx(Te,{schema:x,scene:k,eventHandlers:D,onLayerCreated:C})}function En({source:s,sourceType:l="json",sourceConfig:u,hexSize:f=100,weightField:h="h12",weightMethod:m="sum",onClick:y,onMouseMove:C,style:b,...k}){const x=[{type:"hexagon",size:f,field:h,method:m}];return g.jsx(xn,{...k,source:s,sourceType:l,sourceConfig:{...u,transforms:x},shape:"hexagonColumn",style:{coverage:.8,angle:0,...b??{}},onClick:y,onMouseMove:C})}function zn({source:s,sourceType:l,sourceConfig:u,onClick:f,...h}){const m=DA();if(!m)return null;const y={...h,type:"raster",source:s,sourceType:l??"raster",sourceConfig:u},C=f?{onClick:f}:void 0;return g.jsx(Te,{schema:y,scene:m,eventHandlers:C})}function rs({source:s,sourceType:l,sourceConfig:u,onClick:f,...h}){const m=DA();if(!m)return null;const y={...h,type:"image",source:s,sourceType:l??"image",sourceConfig:u},C=f?{onClick:f}:void 0;return g.jsx(Te,{schema:y,scene:m,eventHandlers:C})}const Sn=[8,16,32,48,64],I1={primary:"#2563eb",warning:"#f59e0b",error:"#ef4444",success:"#10b981"};function ns({source:s,sourceType:l="geojson",sourceConfig:u,labelField:f="name",labelColor:h="#0b3b8c",labelSize:m=12,showLabel:y=!0,labelOffset:C,sizeDomain:b,bubbleAnchor:k="bottom",labelAnchor:x="top",hoverEffect:D=!0,clickEffect:z=!0,tooltipEffect:B=!0,tooltipFields:H,tooltipTemplate:_,semanticColorField:j,color:Z="#2563eb",size:Q=16,sizeField:N,sizeValues:q,style:J,active:r0,select:O,onClick:Y,onMouseMove:n0,onMouseEnter:A0,onMouseLeave:o0,...X}){const t0=j??X.colorField,V=X.colorValues??(j?[I1.primary,I1.warning,I1.error,I1.success]:void 0),$=N?q??[...Sn]:q,e0={color:"#60a5fa"},c0={color:"#1d4ed8"},h0=(()=>{const g0=X.events;return B?{...g0,enablePopup:(g0==null?void 0:g0.enablePopup)??!0,popupFields:(g0==null?void 0:g0.popupFields)??H,popupTemplate:(g0==null?void 0:g0.popupTemplate)??_}:g0})(),[p0,H0]=w.useState(!1);w.useEffect(()=>{const g0=requestAnimationFrame(()=>H0(!0));return()=>cancelAnimationFrame(g0)},[]);const U0=y&&p0,w0=N?{sizeField:N,sizeValues:$}:{size:Q};return g.jsxs(g.Fragment,{children:[g.jsx(PA,{source:s,sourceType:l,sourceConfig:u,shape:"circle",color:Z,colorField:t0,colorValues:V,...w0,opacity:.75,active:D?r0??e0:r0,select:z?O??c0:O,events:h0,zIndex:X.zIndex??0,autoFit:X.autoFit,visible:X.visible,name:X.name??"bubble-circle",onClick:Y,onMouseMove:n0,onMouseEnter:A0,onMouseLeave:o0,style:{stroke:Z??"#004ac6",strokeWidth:2,strokeOpacity:1,...J??{}}}),U0&&g.jsx(PA,{source:s,sourceType:l,sourceConfig:u,shapeField:f,shapeValues:"text",color:h,size:m,zIndex:(X.zIndex??0)+1,style:{textAnchor:x,textOffset:C??[0,0],stroke:"#fff",strokeWidth:2,textAllowOverlap:!0}})]})}function is({source:s,sourceType:l="geojson",sourceConfig:u,gridSize:f=60,minClusterSize:h=2,animationDuration:m=300,easing:y="cubic-bezier(0.4, 0, 0.2, 1)",onPointClick:C,onClusterClick:b}){const k=DA(),[x,D]=w.useState([]),[z,B]=w.useState(null),[H,_]=w.useState(null),j=w.useRef(null),Z=w.useRef(-1),Q=w.useMemo(()=>ls(s,l,u),[s,l,u]);w.useEffect(()=>{if(Q.length===0){j.current=null,D([]),Z.current=-1;return}const O=new $2({radius:f,minPoints:h,maxZoom:20,minZoom:0}),Y=Q.map(n0=>({type:"Feature",properties:{id:n0.id,...n0.properties},geometry:{type:"Point",coordinates:[n0.lng,n0.lat]}}));O.load(Y),j.current=O,Z.current=-1},[Q,f,h]);const N=w.useCallback((O,Y)=>{try{const n0=Math.floor(Y.getZoom());if(n0===Z.current)return;Z.current=n0;let A0=[-180,-90,180,90];try{const t0=Y.getBounds();t0&&(A0=[t0[0][0],t0[0][1],t0[1][0],t0[1][1]])}catch{}const X=O.getClusters(A0,n0).map(t0=>{const V=t0.geometry.coordinates,$=V[0],e0=V[1];return t0.properties.cluster?{id:`cluster-${t0.properties.cluster_id}`,clusterId:t0.properties.cluster_id,lng:$,lat:e0,pointCount:t0.properties.point_count,isCluster:!0,properties:{}}:{id:`point-${t0.properties.id}`,clusterId:-1,lng:$,lat:e0,pointCount:1,isCluster:!1,properties:t0.properties}});D(X),B(null)}catch{}},[]);w.useEffect(()=>{var A0,o0;if(!k)return;const O=k.mapService,Y=()=>{requestAnimationFrame(()=>{const X=j.current;X&&k.loaded&&N(X,k)})};k.loaded?Y():k.once("loaded",Y);const n0=()=>{const X=j.current;X&&N(X,k)};return(A0=O==null?void 0:O.on)==null||A0.call(O,"camerachange",n0),(o0=O==null?void 0:O.on)==null||o0.call(O,"viewchange",n0),()=>{var X,t0;k.off("loaded",Y),(X=O==null?void 0:O.off)==null||X.call(O,"camerachange",n0),(t0=O==null?void 0:O.off)==null||t0.call(O,"viewchange",n0)}},[k,N]);const q=w.useCallback(O=>{if(!k||!O.isCluster)return;let Y=[];const n0=j.current;n0&&(Y=n0.getLeaves(O.clusterId,1/0)),b==null||b(O,Y);try{if(k.getZoom()>=20-.5){B(X=>X===O.id?null:O.id);return}if(Y.length>0){const X=Y.map(c0=>c0.geometry.coordinates),t0=X.map(c0=>c0[0]),V=X.map(c0=>c0[1]),$=[Math.min(...t0),Math.min(...V)],e0=[Math.max(...t0),Math.max(...V)];k.fitBounds([$,e0],{padding:[40,40,40,40],duration:m})}}catch{}},[k,b,m]),J=w.useMemo(()=>{if(!k||!z||!j.current)return[];const O=x.find(Y=>Y.id===z&&Y.isCluster);if(!O)return[];try{const Y=j.current.getLeaves(O.clusterId,1/0),n0=k.mapService;if(!n0)return[];const A0=n0.lngLatToContainer([O.lng,O.lat]);if(!A0)return[];const o0=Y.length,X=Math.max(24,Math.min(72,18+o0*2));return Y.map((t0,V)=>{var p0,H0;const $=Math.PI*2*V/o0-Math.PI/2,e0=A0.x+Math.cos($)*X,c0=A0.y+Math.sin($)*X,h0=n0.containerToLngLat([e0,c0]);return{id:`spider-${O.id}-${((p0=t0.properties)==null?void 0:p0.id)??V}`,lng:h0.lng,lat:h0.lat,point:{id:String(((H0=t0.properties)==null?void 0:H0.id)??V),lng:t0.geometry.coordinates[0],lat:t0.geometry.coordinates[1],properties:t0.properties??{}}}})}catch{return[]}},[k,z,x]),r0=w.useMemo(()=>z?x.find(O=>O.id===z&&O.isCluster)??null:null,[z,x]);return g.jsxs(g.Fragment,{children:[z&&r0&&J.map(O=>g.jsx(Qe,{longitude:O.lng,latitude:O.lat,anchor:"center",content:g.jsx(os,{centerLng:r0.lng,centerLat:r0.lat,lineLng:O.lng,lineLat:O.lat})},`line-${O.id}`)),x.map(O=>{var o0;if(!O.isCluster)return g.jsx(Qe,{longitude:O.lng,latitude:O.lat,anchor:"center",content:g.jsx("div",{title:String(((o0=O.properties)==null?void 0:o0.name)??"单点"),onClick:()=>{var X;return C==null?void 0:C({id:String(((X=O.properties)==null?void 0:X.id)??""),lng:O.lng,lat:O.lat,properties:O.properties})},style:{width:14,height:14,borderRadius:9999,background:"#2563eb",border:"2px solid #fff",boxShadow:"0 2px 10px rgba(37,99,235,.5), 0 0 0 3px rgba(37,99,235,.15)",transition:"transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1)",cursor:"pointer"}})},O.id);const Y=O.pointCount,n0=ss(Y),A0=H===O.id;return g.jsx(Qe,{longitude:O.lng,latitude:O.lat,anchor:"center",content:g.jsxs("div",{title:`包含 ${Y} 个要素`,onClick:()=>q(O),onMouseEnter:()=>_(O.id),onMouseLeave:()=>_(X=>X===O.id?null:X),style:{width:n0.size,height:n0.size,borderRadius:9999,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:n0.fontWeight,fontSize:n0.fontSize,background:n0.background,border:n0.border,boxShadow:n0.shadow,position:"relative",cursor:"pointer",transition:"transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1)",transform:A0?"scale(1.1)":"scale(1)"},children:[n0.pulse&&g.jsx("span",{style:{position:"absolute",inset:-6,borderRadius:9999,background:"rgba(37,99,235,0.25)",animation:"aimapui-cluster-pulse 1.6s ease-out infinite"}}),g.jsx("span",{style:{position:"relative",zIndex:1},children:Y})]})},O.id)}),J.map(O=>{var Y;return g.jsx(Qe,{longitude:O.lng,latitude:O.lat,anchor:"center",content:g.jsx("div",{title:String(((Y=O.point.properties)==null?void 0:Y.name)??O.point.id),onClick:()=>C==null?void 0:C(O.point),style:{width:10,height:10,borderRadius:9999,background:"#fff",border:"2px solid #2563eb",boxShadow:"0 2px 8px rgba(0,0,0,.2)",cursor:"pointer"}})},O.id)})]})}function os({centerLng:s,centerLat:l,lineLng:u,lineLat:f}){const h=DA(),m=w.useRef(null);return w.useEffect(()=>{if(!h)return;const y=h.mapService;if(!y)return;const C=()=>{const x=m.current;if(x)try{const D=y.lngLatToContainer([s,l]),z=y.lngLatToContainer([u,f]);if(!D||!z)return;const B=z.x-D.x,H=z.y-D.y,_=Math.sqrt(B*B+H*H),j=Math.atan2(H,B)*180/Math.PI;x.style.width=`${_}px`,x.style.transform=`rotate(${j}deg)`}catch{}};C();const b=(x,D,z)=>{var B;try{(B=x==null?void 0:x.on)==null||B.call(x,D,z)}catch{}},k=(x,D,z)=>{var B;try{(B=x==null?void 0:x.off)==null||B.call(x,D,z)}catch{}};return b(y,"camerachange",C),b(y,"viewchange",C),()=>{k(y,"camerachange",C),k(y,"viewchange",C)}},[h,s,l,u,f]),g.jsx("div",{ref:m,style:{position:"absolute",left:0,top:0,height:1,background:"rgba(195, 198, 215, 0.5)",transformOrigin:"0 50%",pointerEvents:"none"}})}function ss(s){return s>=1e3?{size:48,fontSize:14,fontWeight:700,background:"linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%)",border:"2px solid rgba(255,255,255,0.55)",shadow:"0 10px 24px rgba(37,99,235,.45)",pulse:!0}:s>=100?{size:40,fontSize:13,fontWeight:700,background:"rgba(37,99,235,0.30)",border:"2px solid rgba(255,255,255,0.5)",shadow:"0 6px 16px rgba(37,99,235,.25)",pulse:!1}:{size:32,fontSize:12,fontWeight:600,background:"radial-gradient(circle, #2563eb 60%, rgba(37,99,235,0.20) 61%)",border:"1px solid rgba(255,255,255,0.55)",shadow:"0 4px 12px rgba(37,99,235,.2)",pulse:!1}}function ls(s,l,u){if(!s)return[];if(l==="geojson"&&typeof s=="object"&&s!==null){const f=s;return(Array.isArray(f.features)?f.features:[]).map((m,y)=>{var k,x,D;const C=m,b=(k=C==null?void 0:C.geometry)==null?void 0:k.coordinates;return!Array.isArray(b)||b.length<2?null:{id:String(((x=C==null?void 0:C.properties)==null?void 0:x.id)??((D=C==null?void 0:C.properties)==null?void 0:D.Id)??y),lng:Number(b[0]),lat:Number(b[1]),properties:(C==null?void 0:C.properties)??{}}}).filter(Boolean)}if(Array.isArray(s)){const f=(u==null?void 0:u.x)??"lng",h=(u==null?void 0:u.y)??"lat";return s.map((m,y)=>{const C=m,b=Number(C[f]),k=Number(C[h]);return Number.isNaN(b)||Number.isNaN(k)?null:{id:String(C.id??y),lng:b,lat:k,properties:C}}).filter(Boolean)}return[]}const as=["#dbeafe","#93c5fd","#60a5fa","#3b82f6","#2563eb"],cs=["#dc2626","#fca5a5","#e5e7eb","#86efac","#16a34a"],us=["#2563eb","#f59e0b","#ef4444","#10b981","#8b5cf6","#14b8a6","#f97316","#64748b"];function fs({source:s,sourceType:l="geojson",colorMapping:u="sequential",showStroke:f=!0,strokeColor:h="rgba(255,255,255,0.30)",strokeWidth:m=.5,hoverEffect:y=!0,clickEffect:C=!0,stickySelection:b=!0,tooltipEffect:k=!0,tooltipFields:x,tooltipTemplate:D,regionIdField:z="name",highlightStrokeColor:B="#2563eb",highlightStrokeWidth:H=2,zoomToRegionOnClick:_=!0,clickZoomPadding:j=40,clickZoomDelta:Z=1.2,onRegionClick:Q,onDrilldown:N,onLayerCreated:q,showLabel:J=!1,labelField:r0="name",labelColor:O="#0f172a",labelSize:Y=11,labelAreaThreshold:n0=5e-5,labelHaloWidth:A0=2,minLabelZoom:o0,valueField:X,percentageField:t0,nameField:V,color:$,colorField:e0,colorValues:c0,active:h0,select:p0,events:H0,style:U0,...w0}){const g0=DA(),[N0,D0]=w.useState(null),[_0,gA]=w.useState(null),[z0,B0]=w.useState(()=>{if(!g0)return 0;try{return g0.getZoom()}catch{return 0}});w.useEffect(()=>{if(!g0)return;const v0=()=>{try{B0(g0.getZoom())}catch{}};return v0(),g0.on("zoomchange",v0),()=>{g0.off("zoomchange",v0)}},[g0]);const j0=o0===void 0||z0>=o0,l0=w.useMemo(()=>{if(c0)return c0;switch(u){case"diverging":return[...cs];case"categorical":return[...us];case"sequential":default:return[...as]}},[c0,u]),F=X??e0??"value",a0=V??r0,U=w.useMemo(()=>D??ds(a0,F,t0),[D,a0,F,t0]),V0={color:"#ffffff"},d0={color:"#0f172a"},L0=w.useMemo(()=>hs(s,l,r0,z,n0),[s,l,r0,z,n0]),T0=w.useCallback(v0=>{Q==null||Q(v0);const q0=Hn(v0.feature,z);if(q0!==null&&C&&gA(dA=>!b&&dA===q0?null:q0),v0.feature&&(N==null||N(v0.feature)),!g0||!_)return;const lA=Number.isFinite(v0.lng)&&Number.isFinite(v0.lat)?[v0.lng,v0.lat]:gs(v0.originalEvent);if(lA)try{const dA=g0.getZoom(),xA=Math.abs(Z);g0.setCenter(lA),g0.setZoom(dA+xA)}catch{}},[Q,z,C,b,N,g0,_,Z]),Z0=w.useCallback(v0=>{if(!y)return;const q0=Hn(v0.feature,z);D0(q0)},[y,z]),M0=w.useCallback(()=>{y&&D0(null)},[y]),P0=w.useMemo(()=>{const v0=H0;return k?{...v0,enablePopup:(v0==null?void 0:v0.enablePopup)??!0,popupTrigger:(v0==null?void 0:v0.popupTrigger)??"hover",popupFields:(v0==null?void 0:v0.popupFields)??x,popupTemplate:(v0==null?void 0:v0.popupTemplate)??U}:v0},[H0,k,x,U]);return g.jsxs(g.Fragment,{children:[g.jsx(u1,{...w0,source:s,sourceType:l,shape:w0.shape??"fill",color:$??"#2563eb",colorField:e0,colorValues:l0,active:y?h0??V0:h0,select:C?p0??d0:p0,events:P0,onClick:T0,onMouseEnter:Z0,onMouseLeave:M0,onLayerCreated:q,style:{opacity:.8,...U0??{}}}),f&&g.jsx(ee,{source:s,sourceType:l,color:h,size:m,zIndex:2}),y&&N0!==null&&g.jsxs(g.Fragment,{children:[g.jsx(ee,{source:s,sourceType:l,color:Dn(B,.35),size:H+2,filterField:z,filterValues:[N0],zIndex:3}),g.jsx(ee,{source:s,sourceType:l,color:B,size:H,filterField:z,filterValues:[N0],zIndex:4})]}),C&&_0!==null&&g.jsx(ee,{source:s,sourceType:l,color:Dn(B,.9),size:Math.max(1.5,H),filterField:z,filterValues:[_0],zIndex:5}),J&&j0&&g.jsx(PA,{source:L0.data,sourceType:L0.sourceType,sourceConfig:L0.sourceConfig,shapeField:r0,shapeValues:"text",color:O,size:Y,style:{textAllowOverlap:!1,stroke:"#ffffff",strokeWidth:A0,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace"}})]})}function ds(s,l,u){const f=u?`<tr><td style="padding-right:8px;color:#64748b">占比</td><td style="font-weight:600">{{${u}}}%</td></tr>`:"";return['<div style="min-width:160px">',`<div style="font-weight:700;margin-bottom:6px">{{${s}}}</div>`,'<table style="font-size:12px;line-height:1.4">',`<tr><td style="padding-right:8px;color:#64748b">指标</td><td style="font-weight:600">{{${l}}}</td></tr>`,f,"</table>","</div>"].join("")}function Dn(s,l){if(s.startsWith("#")){const u=s.replace("#",""),f=u.length===3?`${u[0]}${u[0]}${u[1]}${u[1]}${u[2]}${u[2]}`:u;if(f.length===6){const h=parseInt(f.slice(0,2),16),m=parseInt(f.slice(2,4),16),y=parseInt(f.slice(4,6),16);return`rgba(${h},${m},${y},${l})`}}return s}function Hn(s,l){if(!s)return null;const u=s[l]??s.id??s.name;return typeof u=="string"||typeof u=="number"?u:null}function hs(s,l,u,f,h){return l!=="geojson"||!ps(s)?{data:s,sourceType:l}:{data:s.features.map(y=>{if(!y||!y.geometry||!y.properties)return null;const C=Bn(y.geometry),b=ms(y.geometry);if(!C||b<h)return null;const k=y.properties;return{lng:C[0],lat:C[1],[u]:k[u],[f]:k[f]}}).filter(y=>y!==null),sourceType:"json",sourceConfig:{x:"lng",y:"lat"}}}function ps(s){if(!s||typeof s!="object")return!1;const l=s;return l.type==="FeatureCollection"&&Array.isArray(l.features)}function gs(s){const l=ys(s);return l?Bn(l):null}function ys(s){var u,f;const l=s;return((u=l==null?void 0:l.feature)==null?void 0:u.geometry)??((f=l==null?void 0:l.data)==null?void 0:f.geometry)??null}function Bn(s){if(s.type==="Polygon")return Vn(s.coordinates[0]);if(s.type==="MultiPolygon"){let l=0,u=null;return s.coordinates.forEach(f=>{const h=f[0],m=Math.abs(Dt(h));m>l&&(l=m,u=Vn(h))}),u}return null}function ms(s){return s.type==="Polygon"?Math.abs(Dt(s.coordinates[0])):s.type==="MultiPolygon"?s.coordinates.reduce((l,u)=>l+Math.abs(Dt(u[0])),0):0}function Vn(s){if(!s||s.length<3)return null;let l=0,u=0,f=0;for(let m=0;m<s.length-1;m+=1){const[y,C]=s[m],[b,k]=s[m+1],x=y*k-b*C;l+=x,u+=(y+b)*x,f+=(C+k)*x}const h=l/2;if(Math.abs(h)<1e-12){const m=s[0];return m?[m[0],m[1]]:null}return[u/(6*h),f/(6*h)]}function Dt(s){if(!s||s.length<3)return 0;let l=0;for(let u=0;u<s.length-1;u+=1){const[f,h]=s[u],[m,y]=s[u+1];l+=f*y-m*h}return l/2}const _n=["#eff6ff","#bfdbfe","#60a5fa","#2563eb","#1d4ed8","#1e3a8a"],In="https://mdn.alipayobjects.com/antforest/afts/file/A*T2OJQ7XZzeEAAAAAgCAAAAgAerd2AQ/original_中国_省.json",Pn="https://mdn.alipayobjects.com/antforest/afts/file/A*Xd8TQoduwj8AAAAAgEAAAAgAerd2AQ/original_中国_市.json",Tn="https://mdn.alipayobjects.com/portal_moelhz/afts/file/A*Rb96Tac1p8EAAAAAgKAAAAgAegAAAQ",Cs=w.forwardRef(function(l,u){const{provinceSource:f=In,citySource:h=Pn,districtSource:m=Tn,level:y="province",drillEnabled:C=!0,drillPath:b,onDrill:k,onDrillUp:x,autoFitOnDrill:D=!0,data:z,joinField:B="name",dataJoinField:H="name",valueField:_="value",colors:j=[..._n],fillOpacity:Z=.8,strokeColor:Q="rgba(255,255,255,0.5)",strokeWidth:N=1.5,dimOpacity:q=.12,showLabel:J=!0,labelField:r0="name",labelSize:O=12,hoverHighlight:Y=!0,clickSelect:n0=!0,showTooltip:A0=!0,tooltipFields:o0,onRegionClick:X,zIndex:t0=0}=l,V=DA(),[$,e0]=w.useState(null),[c0,h0]=w.useState(null),[p0,H0]=w.useState(null),[U0,w0]=w.useState(null),[g0,N0]=w.useState([{level:"province",name:"中国"}]),D0=b??g0,_0=C?bs(D0):y,gA=w.useCallback(()=>{if(D0.length<=1)return;const M0=D0.slice(0,-1);b?x==null||x(M0):(N0(M0),x==null||x(M0),k==null||k(M0)),j0(null)},[D0,b,x,k]),z0=w.useCallback(M0=>{if(M0<0||M0>=D0.length-1)return;const P0=D0.slice(0,M0+1);b?x==null||x(P0):(N0(P0),x==null||x(P0),k==null||k(P0)),j0(null)},[D0,b,x,k]),[B0,j0]=w.useState(null);w.useImperativeHandle(u,()=>({drillUp:gA,drillUpTo:z0,getDrillPath:()=>D0}),[gA,z0,D0]);const l0=w.useRef(D0.length);w.useEffect(()=>{Ht(f,e0,w0)},[f]),w.useEffect(()=>{h&&Ht(h,h0)},[h]),w.useEffect(()=>{m&&Ht(m,H0)},[m]);const F=w.useMemo(()=>{switch(_0){case"city":return c0;case"district":return p0;default:return $}},[_0,$,c0,p0]),a0=w.useMemo(()=>!F||!z||z.length===0?F:xs(F,z,B,H,_),[F,z,B,H,_]),U=w.useMemo(()=>{if(!C||D0.length<=1)return a0;if(!a0)return null;const M0=D0[D0.length-1];return!M0.adcode&&!M0.name?a0:zs(a0,M0)},[C,D0,a0,B]),V0=w.useMemo(()=>!C||D0.length<=1?null:(D0.length===2?$:c0)??null,[C,D0,$,c0]);w.useMemo(()=>`<div style="min-width:140px"><table style="font-size:12px;line-height:1.6">${(o0??[r0,_]).map(v0=>`<tr><td style="padding-right:8px;color:#64748b">${v0}</td><td style="font-weight:600">{{${v0}}}</td></tr>`).join("")}</table></div>`,[o0,r0,_]);const d0=!!(z&&z.length>0),L0=w.useMemo(()=>a0?U??a0:null,[U,a0]),T0=_0==="province"?N:N*.6;w.useEffect(()=>{if(!(!D||!V||!L0||l0.current===D0.length)){l0.current=D0.length;try{const P0=Bs(L0);P0&&V.fitBounds(P0,{padding:[40,40,40,40]})}catch{}}},[D,V,L0,D0.length]);const Z0=w.useCallback(M0=>{const P0=M0.feature;if(!P0)return;const v0=String(P0[r0]??P0.name??""),q0=P0.adcode??P0.gb;if(X==null||X(P0,_0),n0&&j0(lA=>lA===v0?null:v0),C&&ws(_0)){const lA=[...D0,{level:_0,name:v0,adcode:q0}];b||N0(lA),k==null||k(lA),j0(null)}},[r0,_0,n0,C,D0,b,k,X]);return!V||!L0?null:g.jsxs(g.Fragment,{children:[C&&V0&&D0.length>1&&g.jsxs(g.Fragment,{children:[g.jsx(u1,{source:V0,sourceType:"geojson",shape:"fill",color:"#94a3b8",style:{opacity:q},zIndex:t0}),g.jsx(ee,{source:V0,sourceType:"geojson",color:"rgba(148,163,184,0.2)",size:.5,zIndex:t0+1})]}),g.jsx(u1,{source:L0,sourceType:"geojson",shape:"fill",...d0?{colorField:_,colorValues:j}:{color:j[2]??"#3b82f6"},active:Y?{color:"#ffffff"}:void 0,select:n0?{color:"#0f172a"}:void 0,style:{opacity:Z},onClick:Z0,zIndex:t0+2}),g.jsx(ee,{source:L0,sourceType:"geojson",color:Q,size:T0,zIndex:t0+3}),U0&&_0==="province"&&D0.length<=1&&g.jsx(ee,{source:U0,sourceType:"geojson",color:"#94a3b8",size:1,zIndex:t0+3}),J&&L0&&g.jsx(vs,{geoData:L0,labelField:r0,labelSize:O,zIndex:t0+4})]})});function vs({geoData:s,labelField:l,labelSize:u,zIndex:f}){const h=w.useMemo(()=>Ss(s,l),[s,l]);return!h||h.data.length===0?null:g.jsx(PA,{source:h.data,sourceType:h.sourceType,sourceConfig:h.sourceConfig,shapeField:l,shapeValues:"text",color:"#0f172a",size:u,style:{textAllowOverlap:!1,stroke:"#ffffff",strokeWidth:2,fontFamily:"PingFang SC, Microsoft YaHei, sans-serif"},zIndex:f})}function bs(s){return s.length<=1?"province":s.length===2?"city":"district"}function ws(s){return s!=="district"}const Ls=new Set(["境界线","边界线","九段线","十段线"]);function ks(s){var u,f,h;const l=(u=s.properties)==null?void 0:u.name;if(typeof l!="string")return!1;if(l==="九段线"||l==="十段线")return!0;if(l==="境界线"){const m=(f=s.geometry)==null?void 0:f.type;if(m!=="MultiLineString"&&m!=="LineString")return!1;const y=(h=s.geometry)==null?void 0:h.coordinates;if(!y)return!1;const C=m==="MultiLineString"?y.flat():y;if(Math.min(...C.map(k=>k[1]))<10)return!0}return!1}function Ms(s){var f,h;const l=(f=s.properties)==null?void 0:f.name;if(!l||typeof l!="string"||Ls.has(l))return!1;const u=(h=s.geometry)==null?void 0:h.type;return!(u==="LineString"||u==="MultiLineString")}function Fn(s){const l=[],u=[];for(const f of s.features)ks(f)?u.push(f):Ms(f)&&l.push(f);return{admin:{type:"FeatureCollection",features:l},dashLine:u.length>0?{type:"FeatureCollection",features:u}:null}}function Ht(s,l,u){if(typeof s=="string")fetch(s).then(f=>f.json()).then(f=>{if(f&&f.type==="FeatureCollection"){const h=Fn(f);l(h.admin),u==null||u(h.dashLine)}}).catch(()=>{});else if(s&&s.type==="FeatureCollection"){const f=Fn(s);l(f.admin),u==null||u(f.dashLine)}}function xs(s,l,u,f,h){const m=new Map;for(const C of l){const b=String(C[f]??"");b&&m.set(b,C)}return{type:"FeatureCollection",features:s.features.map(C=>{const b=String(C.properties[u]??""),k=m.get(b),x=k?k[h]??k.value??0:0;return{...C,properties:{...C.properties,...k??{},[h]:x}}})}}function Bt(s){const l=String(s);return l.startsWith("156")&&l.length>=9?l.slice(3):l}const Es=["省","市","自治区","特别行政区","壮族","回族","维吾尔","藏族","彝族","苗","侗","瑶","白","哈尼","傣","傈僳","佤","畲","拉祜","水","景颇","土家","羌","毛南","仫佬","布朗","撒拉","裕固","塔吉克","柯尔克孜","锡伯","达斡尔","鄂温克","鄂伦春","赫哲","德昂","门巴","珞巴","基诺","怒","保安","京","独龙","仡佬","阿昌","普米"];function Vt(s){let l=s;for(const u of Es)if(l.endsWith(u)){l=l.slice(0,-u.length);break}return l}function zs(s,l,u){const f=l.name,h=l.adcode,m=l.level,y=h?Bt(String(h)):"",C=m==="city"&&y.endsWith("0000"),b=m==="province"||C?2:4;return{type:"FeatureCollection",features:s.features.filter(x=>{const D=x.properties;if(D.parent&&String(D.parent)===f||D.parentName&&String(D.parentName)===f)return!0;const z=D.adcode??D.gb;if(h&&z){const H=Bt(String(h)),_=Bt(String(z));if(_.length>=b&&_.slice(0,b)===H.slice(0,b)&&(_!==H||m==="province"))return!0}const B=Vt(f);return!!(D.province&&(String(D.province)===f||Vt(String(D.province))===B)||D.city&&(String(D.city)===f||Vt(String(D.city))===B))})}}function Ss(s,l){const u=[];for(const f of s.features){if(!f.geometry||!f.properties)continue;const h=Ds(f.geometry);h&&u.push({lng:h[0],lat:h[1],[l]:f.properties[l]??f.properties.name??""})}return u.length===0?null:{data:u,sourceType:"json",sourceConfig:{x:"lng",y:"lat"}}}function Ds(s){const l=s.type,u=s.coordinates;if(!u)return null;if(l==="Point")return u;if(l==="Polygon")return Nn(u);if(l==="MultiPolygon"){const f=u;let h=0,m=null;for(const y of f){const C=Math.abs(Hs(y[0]));C>h&&(h=C,m=Nn(y))}return m}return null}function Nn(s){const l=s[0];if(!l||l.length===0)return null;let u=0,f=0;const h=l.length;for(const m of l)u+=m[0],f+=m[1];return[u/h,f/h]}function Hs(s){let l=0;const u=s.length;for(let f=0;f<u;f++){const h=(f+1)%u;l+=s[f][0]*s[h][1],l-=s[h][0]*s[f][1]}return l/2}function Bs(s){let l=1/0,u=1/0,f=-1/0,h=-1/0;for(const m of s.features)Vs(m.geometry,(y,C)=>{y<l&&(l=y),C<u&&(u=C),y>f&&(f=y),C>h&&(h=C)});return!isFinite(l)||!isFinite(u)?null:[[l,u],[f,h]]}function Vs(s,l){const u=s.type,f=s.coordinates;if(f){if(u==="Point"){const[h,m]=f;l(h,m)}else if(u==="LineString"||u==="MultiPoint")for(const[h,m]of f)l(h,m);else if(u==="Polygon"||u==="MultiLineString")for(const h of f)for(const[m,y]of h)l(m,y);else if(u==="MultiPolygon")for(const h of f)for(const m of h)for(const[y,C]of m)l(y,C)}}const _s=[["sunny","&#xe81a;"],["cloud","&#xf15c;"],["cloudy","&#xf15c;"],["partly_cloudy_day","&#xf172;"],["partly_cloudy_night","&#xf174;"],["rainy","&#xf176;"],["rainy_heavy","&#xf61f;"],["rainy_light","&#xf61e;"],["rainy_snow","&#xf61d;"],["thunderstorm","&#xebdb;"],["foggy","&#xe818;"],["air","&#xefd8;"],["water_drop","&#xe798;"],["ac_unit","&#xeb3b;"],["filter_drama","&#xe3dd;"],["cloudy_snowing","&#xe810;"],["snowing","&#xe80f;"],["snowflake","&#xed5b;"],["severe_cold","&#xebd3;"],["umbrella","&#xf1ad;"],["storm","&#xf070;"],["tornado","&#xe199;"],["thermostat","&#xf076;"],["heat","&#xf537;"],["hot","&#xef23;"],["flight","&#xe539;"],["flight_takeoff","&#xe905;"],["flight_land","&#xe904;"],["train","&#xe570;"],["directions_transit","&#xeffa;"],["directions_railway","&#xeff8;"],["directions_bus","&#xeff6;"],["directions_car","&#xeff7;"],["directions_boat","&#xeff5;"],["directions_bike","&#xe52f;"],["directions_walk","&#xe536;"],["directions_run","&#xe566;"],["taxi","&#xe559;"],["local_taxi","&#xe559;"],["local_airport","&#xe53d;"],["connecting_airports","&#xe7c9;"],["two_wheeler","&#xe9f9;"],["tram","&#xe571;"],["subway","&#xe56f;"],["ferry","&#xe572;"],["cable_car","&#xf479;"],["ev_station","&#xe56d;"],["local_gas_station","&#xe546;"],["location_on","&#xf1db;"],["place","&#xf1db;"],["room","&#xf1db;"],["pin","&#xf045;"],["pin_drop","&#xe55e;"],["near_me","&#xe569;"],["my_location","&#xe55c;"],["gps_fixed","&#xe55c;"],["navigation","&#xe55d;"],["explore","&#xe87a;"],["map","&#xe55b;"],["restaurant","&#xe56c;"],["local_cafe","&#xeb44;"],["coffee","&#xefef;"],["local_bar","&#xe540;"],["hotel","&#xe549;"],["local_hospital","&#xe548;"],["local_pharmacy","&#xe550;"],["local_atm","&#xe53e;"],["local_police","&#xef56;"],["local_fire_department","&#xef55;"],["local_post_office","&#xe554;"],["local_library","&#xe54b;"],["local_mall","&#xe54c;"],["local_grocery_store","&#xe8cc;"],["store","&#xe8d1;"],["school","&#xe80c;"],["church","&#xeaae;"],["mosque","&#xeab2;"],["synagogue","&#xeab0;"],["temple_buddhist","&#xeab3;"],["temple_hindu","&#xeaaf;"],["museum","&#xea36;"],["castle","&#xeab1;"],["stadium","&#xeb90;"],["theater_comedy","&#xea66;"],["pool","&#xeb48;"],["fitness_center","&#xeb43;"],["spa","&#xeb4c;"],["park","&#xea63;"],["forest","&#xea99;"],["attractions","&#xea52;"],["celebration","&#xea65;"],["festival","&#xea68;"],["nightlife","&#xea62;"],["sports","&#xea30;"],["sports_soccer","&#xea2f;"],["sports_basketball","&#xea26;"],["sports_football","&#xea29;"],["sports_tennis","&#xea32;"],["sports_golf","&#xea2a;"],["layers","&#xe53b;"],["layers_clear","&#xe53c;"],["terrain","&#xe564;"],["landscape","&#xe564;"],["share","&#xe80d;"],["favorite","&#xe87e;"],["star","&#xf09a;"],["home","&#xe9b2;"],["work","&#xe943;"],["person","&#xf0d3;"],["people","&#xea21;"],["trip","&#xe6fb;"],["warning","&#xf083;"],["emergency","&#xe1eb;"],["photo_camera","&#xe412;"],["shopping_bag","&#xf1cc;"],["search","&#xe8b6;"],["settings","&#xe8b8;"],["info","&#xe88e;"],["help","&#xe8fd;"],["close","&#xe5cd;"],["check","&#xe876;"],["add","&#xe145;"],["remove","&#xe15b;"],["edit","&#xe254;"],["delete","&#xe872;"],["refresh","&#xe5d5;"],["download","&#xe2c4;"],["upload","&#xe2c3;"],["visibility","&#xe8f4;"],["visibility_off","&#xe8f6;"]],Zn="Material Symbols Outlined",Is="https://fonts.gstatic.com/s/materialsymbolsoutlined/v261/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsI.woff2",Ps="M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z";function Ts(s){const l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 40"><path d="${Ps}" fill="${s}" stroke="white" stroke-width="1.5"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(l)}`}function Fs({source:s,sourceType:l="json",sourceConfig:u,iconField:f,iconFontFamily:h="material-symbols",iconFontPath:m,iconFontMap:y,iconColor:C="#3b82f6",iconSize:b=20,iconHaloColor:k="#fff",iconHaloWidth:x=1,iconStyle:D,iconAnchor:z="center",iconBgShape:B="pin",iconBgShapeColor:H,iconBgShapeSize:_=24,iconBgStrokeColor:j,iconBgStrokeWidth:Z=0,iconBgPadding:Q=0,iconBgCornerRadius:N=0,showLabel:q=!0,labelField:J,labelColor:r0="#333",labelSize:O=11,labelAnchor:Y="top",labelOffset:n0=[0,0],labelHaloColor:A0="#fff",labelHaloWidth:o0=2,labelStyle:X,textAllowOverlap:t0=!1,iconAllowOverlap:V=!0,zoomAdaption:$=!0,zoomShowLabel:e0=14,zoomDegradeToPoint:c0=10,onClick:h0,onMouseEnter:p0,onMouseLeave:H0,...U0}){const w0=DA(),[g0,N0]=w.useState(!1),[D0,_0]=w.useState(!1),[gA,z0]=w.useState(!1),[B0,j0]=w.useState(14),l0=w.useRef(!1);w.useEffect(()=>{if(!w0||B!=="pin"||!H)return;const T0=Ts(H);w0.addImage("glyph-pin-bg",T0),z0(!0)},[w0,B,H]);const{fontFamily:F,fontPath:a0,iconMappings:U}=w.useMemo(()=>{switch(h){case"material-symbols":return{fontFamily:Zn,fontPath:Is,iconMappings:_s};default:return{fontFamily:h,fontPath:m??null,iconMappings:y??[]}}},[h,m,y]);if(w.useEffect(()=>{if(!w0||l0.current)return;l0.current=!0;let T0=!1;return(async()=>{a0&&w0.addFontFace(F,a0),U.length>0&&w0.addIconFonts(U);try{if(F===Zn){const M0=U.slice(0,10).map(([,P0])=>String.fromCharCode(parseInt(P0.replace("&#x","").replace(";",""),16))).join("");await document.fonts.load(`${b}px "${F}"`,M0)}else a0&&await new Promise(M0=>{const P0=setTimeout(()=>{M0()},3e3),v0=()=>{clearTimeout(P0),w0.off("fontloaded",v0),M0()};w0.on("fontloaded",v0),document.fonts.load(`${b}px "${F}"`).then(()=>{clearTimeout(P0),w0.off("fontloaded",v0),M0()}).catch(()=>{clearTimeout(P0),w0.off("fontloaded",v0),M0()})})}catch{console.warn(`[GlyphLayer] 字体 "${F}" 加载超时,尝试继续渲染`)}try{const P0=`${b}px "${F}"`;document.fonts.check(P0,"X")||await document.fonts.ready}catch{}T0||N0(!0)})(),()=>{T0=!0}},[w0,F,a0,U,b]),w.useEffect(()=>{if(!w0)return;const T0=()=>_0(!0);return w0.loaded?T0():w0.on("loaded",T0),()=>{w0.off("loaded",T0)}},[w0]),w.useEffect(()=>{if(!w0||!$)return;const T0=()=>{j0(w0.getZoom())};return T0(),w0.on("zoomchange",T0),()=>{w0.off("zoomchange",T0)}},[w0,$]),!g0||!D0||B==="pin"&&H&&!gA)return null;const V0=J??f,d0=!$||B0>=e0;return $&&B0<c0?g.jsx(PA,{source:s,sourceType:l,sourceConfig:u,shape:"circle",color:typeof C=="string"?C:"#3b82f6",size:4,style:{opacity:.7}}):g.jsxs(g.Fragment,{children:[g.jsx(PA,{...U0,source:s,sourceType:l,sourceConfig:u,shapeField:f,shapeValues:"text",color:C,size:b,style:{fontFamily:F,iconfont:!0,textAllowOverlap:V,textAnchor:z,backgroundColor:H,backgroundPadding:Q,backgroundRadius:N,backgroundShape:B==="pin"?void 0:"circle",stroke:j,strokeWidth:Z,...D??{}},onClick:h0,onMouseEnter:p0,onMouseLeave:H0}),q&&d0&&g.jsx(PA,{source:s,sourceType:l,sourceConfig:u,shapeField:V0,shapeValues:"text",color:r0,size:O,style:{textAnchor:Y,textOffset:n0,stroke:A0,strokeWidth:o0,fontWeight:"500",textAllowOverlap:t0,...X??{}}})]})}function Qn({source:s,sourceType:l="json",sourceConfig:u,iconField:f,iconMap:h,iconSize:m=24,iconAnchor:y="bottom",size:C,showLabel:b=!0,labelField:k,labelColor:x="#333",labelSize:D=12,labelAnchor:z="top",labelOffset:B=[0,0],labelHaloColor:H="#fff",labelHaloWidth:_=2,labelStyle:j,textAllowOverlap:Z=!1,iconAllowOverlap:Q=!0,zoomAdaption:N=!0,zoomShowLabel:q=15,zoomDegradeToPoint:J=10,onClick:r0,onMouseEnter:O,onMouseLeave:Y,...n0}){const A0=DA(),[o0,X]=w.useState(!1),[t0,V]=w.useState(15),$=w.useMemo(()=>Object.keys(h),[h]),e0=C??m,c0=k??f;if(w.useEffect(()=>{A0&&($.forEach(H0=>{A0.addImage(H0,h[H0])}),X(!0))},[A0,$,h]),w.useEffect(()=>{if(!A0||!N)return;const H0=()=>{V(A0.getZoom())};return H0(),A0.on("zoomchange",H0),()=>{A0.off("zoomchange",H0)}},[A0,N]),!o0)return null;const h0=!N||t0>=q;return N&&t0<J?g.jsx(PA,{source:s,sourceType:l,sourceConfig:u,shape:"circle",color:n0.color??"#3b82f6",size:6,style:{opacity:.8}}):g.jsxs(g.Fragment,{children:[g.jsx(PA,{source:s,sourceType:l,sourceConfig:u,shapeField:f,shapeValues:$,size:e0,style:{...n0.style??{},anchor:y,allowOverlap:Q},onClick:r0,onMouseEnter:O,onMouseLeave:Y}),b&&h0&&g.jsx(PA,{source:s,sourceType:l,sourceConfig:u,shapeField:c0,shapeValues:"text",color:x,size:D,style:{textAnchor:z,textOffset:B,stroke:H,strokeWidth:_,fontWeight:"500",textAllowOverlap:Z,...j??{}}})]})}const Ns={gaode:()=>"https://webst0{1-4}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",google:()=>"https://gwxc.shipxy.com/tile.g?z={z}&x={x}&y={y}",tianditu:(s="4043dde46add842282bacc412299311d")=>`https://t{0-7}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=${s}`},Zs={gaode:"高德卫星",tianditu:"天地图卫星",google:"谷歌卫星"};function Qs({provider:s="gaode",zIndex:l=0,opacity:u=1,tiandituToken:f,visible:h=!0}){if(!h)return null;const m=Ns[s](f);return g.jsx(zn,{source:m,sourceType:"rasterTile",sourceConfig:{parser:{type:"rasterTile",tileSize:256,zoomOffset:1}},zIndex:l,opacity:u})}function Os({source:s,sourceType:l="json",sourceConfig:u,shape:f="arc",color:h="#2563EB",gradientColors:m,colorMode:y="single",colorField:C,colorValues:b,lineWidth:k=1.5,lineWidthRange:x,weightField:D="weight",opacity:z=.8,blur:B=.6,animate:H=!1,animateSpeed:_=1,animateTrailLength:j=.3,animateDuration:Z=2e3,showNodes:Q=!0,nodeColor:N,nodeSize:q=4,nodeSizeRange:J,nodePulse:r0=!1,showTooltip:O=!0,showNodePopup:Y=!0,activeColor:n0="#FFD93D",onArcHover:A0,onArcClick:o0,onNodeClick:X,style:t0}){const V=w.useMemo(()=>u??{x:"fromLng",y:"fromLat",x1:"toLng",y1:"toLat"},[u]),$=w.useMemo(()=>y==="gradient"&&m?m:h,[y,m,h]),e0=w.useMemo(()=>k,[k,x]),c0=w.useMemo(()=>{if(H)return{enable:!0,speed:_,duration:Z,trailLength:j}},[H,_,Z,j]),h0=w.useMemo(()=>({opacity:z,blur:B,...t0}),[z,B,t0]),p0=w.useMemo(()=>{if(!Q||typeof s=="string")return[];const z0=new Map,B0=V.x??"fromLng",j0=V.y??"fromLat",l0=V.x1??"toLng",F=V.y1??"toLat";return s.forEach(a0=>{const U=`${a0[B0]}_${a0[j0]}`,V0=`${a0[l0]}_${a0[F]}`;z0.has(U)||z0.set(U,{lng:Number(a0[B0]),lat:Number(a0[j0]),degree:0,name:a0.fromName}),z0.has(V0)||z0.set(V0,{lng:Number(a0[l0]),lat:Number(a0[F]),degree:0,name:a0.toName}),z0.get(U).degree++,z0.get(V0).degree++}),Array.from(z0.values())},[s,Q,V]),H0=N??h,[U0,w0]=w.useState({visible:!1,lng:0,lat:0,from:"",to:"",weight:0}),g0=w.useCallback(z0=>{if(A0==null||A0(z0),!O)return;const B0=z0.feature;B0&&w0({visible:!0,lng:z0.lng,lat:z0.lat,from:String(B0.fromName??""),to:String(B0.toName??""),weight:Number(B0[D]??0)})},[A0,O,D]),N0=w.useCallback(()=>{w0(z0=>({...z0,visible:!1}))},[]),[D0,_0]=w.useState({visible:!1,lng:0,lat:0,name:"",degree:0}),gA=w.useCallback(z0=>{if(X==null||X(z0),!Y)return;const B0=z0.feature;B0&&_0({visible:!0,lng:z0.lng,lat:z0.lat,name:String(B0.name??""),degree:Number(B0.degree??0)})},[X,Y]);return g.jsxs(g.Fragment,{children:[g.jsx(ee,{source:s,sourceType:l,sourceConfig:V,shape:f,color:$,colorField:y==="field"?C:void 0,colorValues:y==="field"?b:void 0,size:e0,sizeField:x?D:void 0,sizeValues:x||void 0,animate:c0,active:n0?{color:n0}:!1,style:h0,onMouseMove:g0,onMouseLeave:N0,onClick:o0}),Q&&p0.length>0&&g.jsx(PA,{source:p0,sourceConfig:{x:"lng",y:"lat"},color:H0,size:q,sizeField:J?"degree":void 0,sizeValues:J,shape:"circle",style:{opacity:.9,strokeWidth:1,stroke:"#fff"},animate:r0?{enable:!0,speed:.6}:void 0,active:n0?{color:n0}:!1,onClick:gA}),O&&U0.visible&&g.jsx(tt,{longitude:U0.lng,latitude:U0.lat,visible:!0,variant:"dark",items:[{label:"起点",value:U0.from},{label:"终点",value:U0.to},{label:"流量",value:U0.weight}]}),Y&&D0.visible&&g.jsx(a1,{longitude:D0.lng,latitude:D0.lat,content:`<div style="min-width:80px"><div style="font-weight:700;font-size:13px;margin-bottom:4px">${D0.name||"节点"}</div><div style="font-size:12px;color:#64748b">连接数: ${D0.degree}</div></div>`,closeButton:!0,size:"compact",onClose:()=>_0(z0=>({...z0,visible:!1}))})]})}function Us({path:s,segments:l,stops:u=[],routeType:f="straight",onRouteQuery:h,onRouteResult:m,color:y="#2563eb",lineWidth:C=4,opacity:b=.9,glow:k=!0,animate:x=!1,animateSpeed:D=1,stopSize:z=14,stopColor:B,endColor:H="#10b981",showStopIndex:_=!0,showStopName:j=!0,stopNameColor:Z="#334155",stopNameSize:Q=11,stopRenderer:N="point",stopMarkerVariant:q="circle",stopIconMap:J,stopIconField:r0="iconValue",stopIconSize:O=16,stopIconAnchor:Y="bottom",showStopPopup:n0=!0,activeColor:A0="#fbbf24",onPathClick:o0,onStopClick:X}){const[t0,V]=w.useState(null),$=w.useRef(0),e0=f==="walking"||f==="cycling"||f==="driving"||f==="transit";w.useEffect(()=>{if(!e0||!h||u.length<2){V(null);return}const z0=[u[0].lng,u[0].lat],B0=[u[u.length-1].lng,u[u.length-1].lat],j0=u.length>2?u.slice(1,-1).map(F=>[F.lng,F.lat]):[],l0=++$.current;h({origin:z0,destination:B0,waypoints:j0.length>0?j0:void 0,routeType:f}).then(F=>{$.current===l0&&(V(F),m==null||m(F))}).catch(()=>{$.current===l0&&V(null)})},[e0,h,u,f]);const c0=e0&&t0?t0.path:s,h0=e0&&(t0!=null&&t0.segments)?t0.segments:l,p0=e0&&(t0!=null&&t0.stops)?t0.stops:[],H0=f==="arc"?"arc":"line",U0=w.useMemo(()=>h0&&h0.length>0?{type:"FeatureCollection",features:h0.map((z0,B0)=>({type:"Feature",properties:{color:z0.color||y,width:z0.width||C,index:B0},geometry:{type:"LineString",coordinates:z0.coordinates}}))}:c0&&c0.length>1?{type:"FeatureCollection",features:[{type:"Feature",properties:{color:y,width:C},geometry:{type:"LineString",coordinates:c0}}]}:null,[c0,h0,y,C]),w0=h0&&h0.some(z0=>z0.color),g0=w.useMemo(()=>{const z0=c0??(h0&&h0.length>0?[...h0[0].coordinates.slice(0,1),...h0[h0.length-1].coordinates.slice(-1)]:null);let B0=[...u,...p0];if(z0&&z0.length>=2){const[j0,l0]=z0[0],[F,a0]=z0[z0.length-1],U=u.some(d0=>Math.abs(d0.lng-j0)<1e-6&&Math.abs(d0.lat-l0)<1e-6),V0=u.some(d0=>Math.abs(d0.lng-F)<1e-6&&Math.abs(d0.lat-a0)<1e-6);U||(B0=[{lng:j0,lat:l0,name:"起点",type:"start"},...B0]),V0||(B0=[...B0,{lng:F,lat:a0,name:"终点",type:"end"}])}return B0.map((j0,l0)=>({...j0,index:j0.index??l0+1,type:j0.type??(l0===0?"start":l0===B0.length-1?"end":"waypoint"),stopColor:j0.type==="end"||!j0.type&&l0===B0.length-1?H:B??y,iconValue:j0.icon??"marker",indexLabel:String(j0.index??l0+1),markerColorValue:j0.markerColor??js(j0.type??(l0===0?"start":l0===B0.length-1?"end":"waypoint"))}))},[u,p0,c0,h0,y,B,H]),N0=w.useMemo(()=>{if(N!=="icon")return;if(J)return J;const z0=[...new Set(g0.map(B0=>B0.iconValue).filter(Boolean))];if(z0.length)return gn(z0,{fill:B??y,size:Math.max(24,O+8)})},[N,J,g0,B,y,O]),[D0,_0]=w.useState({visible:!1,lng:0,lat:0,name:"",index:""}),gA=w.useCallback(z0=>{if(X==null||X(z0),!n0)return;const B0=z0.feature;B0&&_0({visible:!0,lng:z0.lng,lat:z0.lat,name:String(B0.name??""),index:String(B0.indexLabel??B0.index??"")})},[X,n0]);return U0?g.jsxs(g.Fragment,{children:[k&&g.jsx(ee,{source:U0,sourceType:"geojson",shape:H0,color:w0?void 0:y,colorField:w0?"color":void 0,colorValues:w0?h0.map(z0=>z0.color||y):void 0,size:C*2.5,style:{opacity:.15}}),g.jsx(ee,{source:U0,sourceType:"geojson",shape:H0,color:w0?void 0:y,colorField:w0?"color":void 0,colorValues:w0?h0.map(z0=>z0.color||y):void 0,size:w0?void 0:C,sizeField:w0?"width":void 0,sizeValues:w0?h0.map(z0=>z0.width||C):void 0,style:{opacity:b},active:A0?{color:A0}:!1,onClick:o0}),x&&g.jsx(ee,{source:U0,sourceType:"geojson",shape:"line",color:"#ffffff",size:Math.max(1.5,C*.5),style:{opacity:.6,lineType:"dash",lineDash:[8,16]},animate:{enable:!0,speed:D,duration:1500},zIndex:10}),g0.length>0&&N==="point"&&g.jsx(PA,{source:g0,sourceConfig:{x:"lng",y:"lat"},colorField:"stopColor",colorValues:[...new Set(g0.map(z0=>z0.stopColor))],size:z,shape:"circle",style:{opacity:1,strokeWidth:2,stroke:"#ffffff"},active:A0?{color:A0}:!1,onClick:gA}),g0.length>0&&N==="point"&&_&&g.jsx(PA,{source:g0,sourceConfig:{x:"lng",y:"lat"},shapeField:"indexLabel",shapeValues:"text",color:"#ffffff",size:Math.max(10,Math.round(z*.75)),style:{textAnchor:"center",stroke:"rgba(18, 28, 42, 0.28)",strokeWidth:1.5,fontWeight:"700",textAllowOverlap:!0}}),g0.length>0&&N==="point"&&j&&g.jsx(PA,{source:g0,sourceConfig:{x:"lng",y:"lat"},shapeField:"name",shapeValues:"text",color:Z,size:Q,style:{textAnchor:"top",textOffset:[0,z/2+4],stroke:"#ffffff",strokeWidth:2,fontWeight:"500"}}),g0.length>0&&N==="icon"&&N0&&g.jsx(Qn,{source:g0,sourceType:"json",sourceConfig:{x:"lng",y:"lat"},iconField:r0,iconMap:N0,iconSize:O,iconAnchor:Y,showLabel:_,labelField:"indexLabel",labelColor:"#ffffff",labelSize:11,labelAnchor:"top",labelOffset:[0,Y==="bottom"?Math.max(10,Math.round(O*.6)):0],labelHaloColor:"rgba(18, 28, 42, 0.35)",labelHaloWidth:2,onClick:gA}),g0.length>0&&N==="icon"&&j&&g.jsx(PA,{source:g0,sourceConfig:{x:"lng",y:"lat"},shapeField:"name",shapeValues:"text",color:Z,size:Q,style:{textAnchor:"top",textOffset:[0,(Y==="bottom"?O:0)+14],stroke:"#ffffff",strokeWidth:2,fontWeight:"500"}}),g0.length>0&&N==="marker"&&g0.map((z0,B0)=>{const j0=z0.markerVariant??q,l0=z0.markerColorValue,F=$s(z0.indexLabel,z0.stopColor,_,j0);return g.jsx(Qe,{longitude:z0.lng,latitude:z0.lat,variant:j0,color:l0,icon:z0.icon,content:F,label:F?void 0:_?z0.indexLabel:void 0,onClick:a0=>{gA({layerId:"route-stop-marker",layerType:"point",originalEvent:a0,lng:z0.lng,lat:z0.lat,feature:z0})}},`route-stop-marker-${B0}`)}),g0.length>0&&N==="marker"&&j&&g.jsx(PA,{source:g0,sourceConfig:{x:"lng",y:"lat"},shapeField:"name",shapeValues:"text",color:Z,size:Q,style:{textAnchor:"top",textOffset:[0,18],stroke:"#ffffff",strokeWidth:2,fontWeight:"500"}}),n0&&D0.visible&&g.jsx(a1,{longitude:D0.lng,latitude:D0.lat,content:`<div style="min-width:100px"><div style="font-weight:700;font-size:13px;margin-bottom:4px">${D0.name}</div><div style="font-size:12px;color:#64748b">第 ${D0.index} 站</div></div>`,closeButton:!0,size:"compact",onClose:()=>_0(z0=>({...z0,visible:!1}))})]}):null}function js(s){switch(s){case"start":return"success";case"end":return"error";default:return"primary"}}function $s(s,l,u,f){if(!u||f!=="circle"&&f!=="dot")return;const h=f==="circle"?24:18,m=f==="circle"?11:10;return g.jsx("div",{style:{width:h,height:h,borderRadius:"9999px",border:"2px solid #ffffff",background:l,color:"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:m,lineHeight:1,fontWeight:700,boxShadow:"0 6px 12px rgba(0,0,0,0.14)"},children:s})}const On=[73.482190241,3.8150178409999995,135.106618732,57.630045996],Ws={type:"linear",colors:["rgba(92,58,16,0)","rgba(92,58,16,0)","#fabd08","#f1e93f","#f1ff8f","#fcfff7"],positions:[0,3,9,22.5,45,90]};function Un(s){const l=s[0]/2003750834e-2*180;let u=s[1]/2003750834e-2*180;return u=180/Math.PI*(2*Math.atan(Math.exp(u*Math.PI/180))-Math.PI/2),[l,u]}function Gs({url:s,extent:l=On,renderMode:u="raster",bandIndex:f=0,domain:h=[0,90],noDataValue:m=0,rampColors:y=Ws,clampLow:C=!1,clampHigh:b=!1,bands:k=[0,1,2],countCut:x,rMinMax:D,gMinMax:z,bMinMax:B,opacity:H=.8,mask:_=!1,maskData:j}){const[Z,Q]=w.useState(null),[N,q]=w.useState(null),[J,r0]=w.useState(null);w.useEffect(()=>{let V=!1;async function $(){try{const e0=await import("geotiff"),c0=await fetch(s);if(!c0.ok)throw new Error(`Fetch failed: ${c0.status}`);const h0=await c0.arrayBuffer(),H0=await(await e0.fromArrayBuffer(h0)).getImage(),U0=H0.getWidth(),w0=H0.getHeight(),g0=await H0.readRasters();let N0;try{const D0=H0.getBoundingBox();D0&&D0.length===4&&(N0=D0)}catch{}V||(Q({rasters:g0,width:U0,height:w0,tiffExtent:N0}),r0(null))}catch(e0){V||(r0(e0 instanceof Error?e0.message:"Failed to load TIFF"),console.error("[TiffRasterLayer] Load error:",e0))}}return $(),()=>{V=!0}},[s]),w.useEffect(()=>{if(!_||!j)return;let V=!1;return typeof j=="string"?fetch(j).then($=>$.json()).then($=>{V||q($)}).catch($=>console.error("[TiffRasterLayer] Mask load error:",$)):q(j),()=>{V=!0}},[_,j]);const O=w.useMemo(()=>{if(l!==On)return l;if(Z!=null&&Z.tiffExtent){const[V,$,e0,c0]=Z.tiffExtent;if(Math.abs(V)>180||Math.abs(e0)>180){const h0=Un([V,$]),p0=Un([e0,c0]);return[h0[0],h0[1],p0[0],p0[1]]}return Z.tiffExtent}return l},[l,Z==null?void 0:Z.tiffExtent]),Y=w.useMemo(()=>{if(!Z)return null;if(u==="rgb"){const V={type:"rgb",width:Z.width,height:Z.height,bands:k,extent:O};return D&&(V.RMinMax=D),z&&(V.GMinMax=z),B&&(V.BMinMax=B),x&&(V.countCut=x),{parser:V}}return u==="ndi"?{parser:{type:"ndi",width:Z.width,height:Z.height,bands:k,extent:O}}:{parser:{type:"raster",width:Z.width,height:Z.height,extent:O}}},[Z,u,k,O]),n0=w.useMemo(()=>u==="rgb"?{opacity:H}:u==="ndi"?{domain:h,rampColors:y,opacity:H}:{clampLow:C,clampHigh:b,domain:h,noDataValue:m,rampColors:y,opacity:H},[u,C,b,h,m,y,H]),A0=w.useMemo(()=>Z?u==="rgb"||u==="ndi"?Z.rasters:Z.rasters[f]:null,[Z,u,f]),o0=DA(),X=w.useRef(null);w.useRef(!1);const t0=!_||!!N;return w.useEffect(()=>{if(!o0||!Y||!A0||!t0)return;X.current&&(o0.removeLayer(X.current),X.current=null);const V={zIndex:10};_&&N&&(V.mask=!0,V.maskfence=N);const $=new EA.RasterLayer(V);return $.source(A0,{parser:Y.parser}),$.style(n0),o0.addLayer($),X.current=$,()=>{X.current&&o0&&(o0.removeLayer(X.current),X.current=null)}},[o0,Y,A0,t0,N]),null}var ye=(function(s){s=s||{};var l=typeof s<"u"?s:{},u={},f;for(f in l)l.hasOwnProperty(f)&&(u[f]=l[f]);var h="";function m(f0){return l.locateFile?l.locateFile(f0,h):h+f0}var y;typeof document<"u"&&document.currentScript&&(h=document.currentScript.src),h.indexOf("blob:")!==0?h=h.substr(0,h.lastIndexOf("/")+1):h="",y=function(m0,I0,y0){var t=new XMLHttpRequest;t.open("GET",m0,!0),t.responseType="arraybuffer",t.onload=function(){if(t.status==200||t.status==0&&t.response){I0(t.response);return}var hA=Ke(m0);if(hA){I0(hA.buffer);return}y0()},t.onerror=y0,t.send(null)};var C=l.print||console.log.bind(console),b=l.printErr||console.warn.bind(console);for(f in u)u.hasOwnProperty(f)&&(l[f]=u[f]);u=null,l.arguments&&l.arguments;var k=0,x=function(f0){k=f0},D=function(){return k},z=8;function B(f0,m0,I0,y0){switch(I0=I0||"i8",I0.charAt(I0.length-1)==="*"&&(I0="i32"),I0){case"i1":X[f0>>0]=m0;break;case"i8":X[f0>>0]=m0;break;case"i16":V[f0>>1]=m0;break;case"i32":$[f0>>2]=m0;break;case"i64":dA=[m0>>>0,(lA=m0,+a0(lA)>=1?lA>0?(d0(+V0(lA/4294967296),4294967295)|0)>>>0:~~+U((lA-+(~~lA>>>0))/4294967296)>>>0:0)],$[f0>>2]=dA[0],$[f0+4>>2]=dA[1];break;case"float":e0[f0>>2]=m0;break;case"double":c0[f0>>3]=m0;break;default:ze("invalid type for setValue: "+I0)}}function H(f0,m0,I0){switch(m0=m0||"i8",m0.charAt(m0.length-1)==="*"&&(m0="i32"),m0){case"i1":return X[f0>>0];case"i8":return X[f0>>0];case"i16":return V[f0>>1];case"i32":return $[f0>>2];case"i64":return $[f0>>2];case"float":return e0[f0>>2];case"double":return c0[f0>>3];default:ze("invalid type for getValue: "+m0)}return null}var _=!1;function j(f0,m0){f0||ze("Assertion failed: "+m0)}function Z(f0){var m0=l["_"+f0];return j(m0,"Cannot call unknown function "+f0+", make sure it is exported"),m0}function Q(f0,m0,I0,y0,t){var M={string:function(cA){var JA=0;if(cA!=null&&cA!==0){var A1=(cA.length<<2)+1;JA=f1(A1),Y(cA,JA,A1)}return JA},array:function(cA){var JA=f1(cA.length);return n0(cA,JA),JA}};function hA(cA){return m0==="string"?r0(cA):m0==="boolean"?!!cA:cA}var CA=Z(f0),BA=[],aA=0;if(y0)for(var yA=0;yA<y0.length;yA++){var Ce=M[I0[yA]];Ce?(aA===0&&(aA=Oe()),BA[yA]=Ce(y0[yA])):BA[yA]=y0[yA]}var mA=CA.apply(null,BA);return mA=hA(mA),aA!==0&&jA(aA),mA}function N(f0,m0,I0,y0){I0=I0||[];var t=I0.every(function(hA){return hA==="number"}),M=m0!=="string";return M&&t&&!y0?Z(f0):function(){return Q(f0,m0,I0,arguments)}}var q=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function J(f0,m0,I0){for(var y0=m0+I0,t=m0;f0[t]&&!(t>=y0);)++t;if(t-m0>16&&f0.subarray&&q)return q.decode(f0.subarray(m0,t));for(var M="";m0<t;){var hA=f0[m0++];if(!(hA&128)){M+=String.fromCharCode(hA);continue}var CA=f0[m0++]&63;if((hA&224)==192){M+=String.fromCharCode((hA&31)<<6|CA);continue}var BA=f0[m0++]&63;if((hA&240)==224?hA=(hA&15)<<12|CA<<6|BA:hA=(hA&7)<<18|CA<<12|BA<<6|f0[m0++]&63,hA<65536)M+=String.fromCharCode(hA);else{var aA=hA-65536;M+=String.fromCharCode(55296|aA>>10,56320|aA&1023)}}return M}function r0(f0,m0){return f0?J(t0,f0,m0):""}function O(f0,m0,I0,y0){if(!(y0>0))return 0;for(var t=I0,M=I0+y0-1,hA=0;hA<f0.length;++hA){var CA=f0.charCodeAt(hA);if(CA>=55296&&CA<=57343){var BA=f0.charCodeAt(++hA);CA=65536+((CA&1023)<<10)|BA&1023}if(CA<=127){if(I0>=M)break;m0[I0++]=CA}else if(CA<=2047){if(I0+1>=M)break;m0[I0++]=192|CA>>6,m0[I0++]=128|CA&63}else if(CA<=65535){if(I0+2>=M)break;m0[I0++]=224|CA>>12,m0[I0++]=128|CA>>6&63,m0[I0++]=128|CA&63}else{if(I0+3>=M)break;m0[I0++]=240|CA>>18,m0[I0++]=128|CA>>12&63,m0[I0++]=128|CA>>6&63,m0[I0++]=128|CA&63}}return m0[I0]=0,I0-t}function Y(f0,m0,I0){return O(f0,t0,m0,I0)}typeof TextDecoder<"u"&&new TextDecoder("utf-16le");function n0(f0,m0){X.set(f0,m0)}function A0(f0,m0){return f0%m0>0&&(f0+=m0-f0%m0),f0}var o0,X,t0,V,$,e0,c0;function h0(f0){o0=f0,l.HEAP8=X=new Int8Array(f0),l.HEAP16=V=new Int16Array(f0),l.HEAP32=$=new Int32Array(f0),l.HEAPU8=t0=new Uint8Array(f0),l.HEAPU16=new Uint16Array(f0),l.HEAPU32=new Uint32Array(f0),l.HEAPF32=e0=new Float32Array(f0),l.HEAPF64=c0=new Float64Array(f0)}var p0=5271536,H0=28624,U0=l.TOTAL_MEMORY||33554432;l.buffer?o0=l.buffer:o0=new ArrayBuffer(U0),U0=o0.byteLength,h0(o0),$[H0>>2]=p0;function w0(f0){for(;f0.length>0;){var m0=f0.shift();if(typeof m0=="function"){m0();continue}var I0=m0.func;typeof I0=="number"?m0.arg===void 0?l.dynCall_v(I0):l.dynCall_vi(I0,m0.arg):I0(m0.arg===void 0?null:m0.arg)}}var g0=[],N0=[],D0=[],_0=[];function gA(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)l0(l.preRun.shift());w0(g0)}function z0(){w0(N0)}function B0(){w0(D0)}function j0(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)F(l.postRun.shift());w0(_0)}function l0(f0){g0.unshift(f0)}function F(f0){_0.unshift(f0)}var a0=Math.abs,U=Math.ceil,V0=Math.floor,d0=Math.min,L0=0,T0=null;function Z0(f0){L0++,l.monitorRunDependencies&&l.monitorRunDependencies(L0)}function M0(f0){if(L0--,l.monitorRunDependencies&&l.monitorRunDependencies(L0),L0==0&&T0){var m0=T0;T0=null,m0()}}l.preloadedImages={},l.preloadedAudios={};var P0=null,v0="data:application/octet-stream;base64,";function q0(f0){return String.prototype.startsWith?f0.startsWith(v0):f0.indexOf(v0)===0}var lA,dA;P0="data:application/octet-stream;base64,AAAAAAAAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAAAQAAAAQAAAADAAAABgAAAAUAAAACAAAAAAAAAAIAAAADAAAAAQAAAAQAAAAGAAAAAAAAAAUAAAADAAAABgAAAAQAAAAFAAAAAAAAAAEAAAACAAAABAAAAAUAAAAGAAAAAAAAAAIAAAADAAAAAQAAAAUAAAACAAAAAAAAAAEAAAADAAAABgAAAAQAAAAGAAAAAAAAAAUAAAACAAAAAQAAAAQAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAIAAAADAAAAAAAAAAAAAAACAAAAAAAAAAEAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAYAAAAAAAAABQAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAIAAAADAAAABQAAAAYAAAAAAAAAAQAAAAIAAAADAAAABAAAAAYAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAAAAAAAAYAAAAAAAAAAwAAAAIAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAFAAAABAAAAAAAAAABAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAYAAAAAAAAABAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAgAAAAQAAAADAAAACAAAAAEAAAAHAAAABgAAAAkAAAAAAAAAAwAAAAIAAAACAAAABgAAAAoAAAALAAAAAAAAAAEAAAAFAAAAAwAAAA0AAAABAAAABwAAAAQAAAAMAAAAAAAAAAQAAAB/AAAADwAAAAgAAAADAAAAAAAAAAwAAAAFAAAAAgAAABIAAAAKAAAACAAAAAAAAAAQAAAABgAAAA4AAAALAAAAEQAAAAEAAAAJAAAAAgAAAAcAAAAVAAAACQAAABMAAAADAAAADQAAAAEAAAAIAAAABQAAABYAAAAQAAAABAAAAAAAAAAPAAAACQAAABMAAAAOAAAAFAAAAAEAAAAHAAAABgAAAAoAAAALAAAAGAAAABcAAAAFAAAAAgAAABIAAAALAAAAEQAAABcAAAAZAAAAAgAAAAYAAAAKAAAADAAAABwAAAANAAAAGgAAAAQAAAAPAAAAAwAAAA0AAAAaAAAAFQAAAB0AAAADAAAADAAAAAcAAAAOAAAAfwAAABEAAAAbAAAACQAAABQAAAAGAAAADwAAABYAAAAcAAAAHwAAAAQAAAAIAAAADAAAABAAAAASAAAAIQAAAB4AAAAIAAAABQAAABYAAAARAAAACwAAAA4AAAAGAAAAIwAAABkAAAAbAAAAEgAAABgAAAAeAAAAIAAAAAUAAAAKAAAAEAAAABMAAAAiAAAAFAAAACQAAAAHAAAAFQAAAAkAAAAUAAAADgAAABMAAAAJAAAAKAAAABsAAAAkAAAAFQAAACYAAAATAAAAIgAAAA0AAAAdAAAABwAAABYAAAAQAAAAKQAAACEAAAAPAAAACAAAAB8AAAAXAAAAGAAAAAsAAAAKAAAAJwAAACUAAAAZAAAAGAAAAH8AAAAgAAAAJQAAAAoAAAAXAAAAEgAAABkAAAAXAAAAEQAAAAsAAAAtAAAAJwAAACMAAAAaAAAAKgAAAB0AAAArAAAADAAAABwAAAANAAAAGwAAACgAAAAjAAAALgAAAA4AAAAUAAAAEQAAABwAAAAfAAAAKgAAACwAAAAMAAAADwAAABoAAAAdAAAAKwAAACYAAAAvAAAADQAAABoAAAAVAAAAHgAAACAAAAAwAAAAMgAAABAAAAASAAAAIQAAAB8AAAApAAAALAAAADUAAAAPAAAAFgAAABwAAAAgAAAAHgAAABgAAAASAAAANAAAADIAAAAlAAAAIQAAAB4AAAAxAAAAMAAAABYAAAAQAAAAKQAAACIAAAATAAAAJgAAABUAAAA2AAAAJAAAADMAAAAjAAAALgAAAC0AAAA4AAAAEQAAABsAAAAZAAAAJAAAABQAAAAiAAAAEwAAADcAAAAoAAAANgAAACUAAAAnAAAANAAAADkAAAAYAAAAFwAAACAAAAAmAAAAfwAAACIAAAAzAAAAHQAAAC8AAAAVAAAAJwAAACUAAAAZAAAAFwAAADsAAAA5AAAALQAAACgAAAAbAAAAJAAAABQAAAA8AAAALgAAADcAAAApAAAAMQAAADUAAAA9AAAAFgAAACEAAAAfAAAAKgAAADoAAAArAAAAPgAAABwAAAAsAAAAGgAAACsAAAA+AAAALwAAAEAAAAAaAAAAKgAAAB0AAAAsAAAANQAAADoAAABBAAAAHAAAAB8AAAAqAAAALQAAACcAAAAjAAAAGQAAAD8AAAA7AAAAOAAAAC4AAAA8AAAAOAAAAEQAAAAbAAAAKAAAACMAAAAvAAAAJgAAACsAAAAdAAAARQAAADMAAABAAAAAMAAAADEAAAAeAAAAIQAAAEMAAABCAAAAMgAAADEAAAB/AAAAPQAAAEIAAAAhAAAAMAAAACkAAAAyAAAAMAAAACAAAAAeAAAARgAAAEMAAAA0AAAAMwAAAEUAAAA2AAAARwAAACYAAAAvAAAAIgAAADQAAAA5AAAARgAAAEoAAAAgAAAAJQAAADIAAAA1AAAAPQAAAEEAAABLAAAAHwAAACkAAAAsAAAANgAAAEcAAAA3AAAASQAAACIAAAAzAAAAJAAAADcAAAAoAAAANgAAACQAAABIAAAAPAAAAEkAAAA4AAAARAAAAD8AAABNAAAAIwAAAC4AAAAtAAAAOQAAADsAAABKAAAATgAAACUAAAAnAAAANAAAADoAAAB/AAAAPgAAAEwAAAAsAAAAQQAAACoAAAA7AAAAPwAAAE4AAABPAAAAJwAAAC0AAAA5AAAAPAAAAEgAAABEAAAAUAAAACgAAAA3AAAALgAAAD0AAAA1AAAAMQAAACkAAABRAAAASwAAAEIAAAA+AAAAKwAAADoAAAAqAAAAUgAAAEAAAABMAAAAPwAAAH8AAAA4AAAALQAAAE8AAAA7AAAATQAAAEAAAAAvAAAAPgAAACsAAABUAAAARQAAAFIAAABBAAAAOgAAADUAAAAsAAAAVgAAAEwAAABLAAAAQgAAAEMAAABRAAAAVQAAADEAAAAwAAAAPQAAAEMAAABCAAAAMgAAADAAAABXAAAAVQAAAEYAAABEAAAAOAAAADwAAAAuAAAAWgAAAE0AAABQAAAARQAAADMAAABAAAAALwAAAFkAAABHAAAAVAAAAEYAAABDAAAANAAAADIAAABTAAAAVwAAAEoAAABHAAAAWQAAAEkAAABbAAAAMwAAAEUAAAA2AAAASAAAAH8AAABJAAAANwAAAFAAAAA8AAAAWAAAAEkAAABbAAAASAAAAFgAAAA2AAAARwAAADcAAABKAAAATgAAAFMAAABcAAAANAAAADkAAABGAAAASwAAAEEAAAA9AAAANQAAAF4AAABWAAAAUQAAAEwAAABWAAAAUgAAAGAAAAA6AAAAQQAAAD4AAABNAAAAPwAAAEQAAAA4AAAAXQAAAE8AAABaAAAATgAAAEoAAAA7AAAAOQAAAF8AAABcAAAATwAAAE8AAABOAAAAPwAAADsAAABdAAAAXwAAAE0AAABQAAAARAAAAEgAAAA8AAAAYwAAAFoAAABYAAAAUQAAAFUAAABeAAAAZQAAAD0AAABCAAAASwAAAFIAAABgAAAAVAAAAGIAAAA+AAAATAAAAEAAAABTAAAAfwAAAEoAAABGAAAAZAAAAFcAAABcAAAAVAAAAEUAAABSAAAAQAAAAGEAAABZAAAAYgAAAFUAAABXAAAAZQAAAGYAAABCAAAAQwAAAFEAAABWAAAATAAAAEsAAABBAAAAaAAAAGAAAABeAAAAVwAAAFMAAABmAAAAZAAAAEMAAABGAAAAVQAAAFgAAABIAAAAWwAAAEkAAABjAAAAUAAAAGkAAABZAAAAYQAAAFsAAABnAAAARQAAAFQAAABHAAAAWgAAAE0AAABQAAAARAAAAGoAAABdAAAAYwAAAFsAAABJAAAAWQAAAEcAAABpAAAAWAAAAGcAAABcAAAAUwAAAE4AAABKAAAAbAAAAGQAAABfAAAAXQAAAE8AAABaAAAATQAAAG0AAABfAAAAagAAAF4AAABWAAAAUQAAAEsAAABrAAAAaAAAAGUAAABfAAAAXAAAAE8AAABOAAAAbQAAAGwAAABdAAAAYAAAAGgAAABiAAAAbgAAAEwAAABWAAAAUgAAAGEAAAB/AAAAYgAAAFQAAABnAAAAWQAAAG8AAABiAAAAbgAAAGEAAABvAAAAUgAAAGAAAABUAAAAYwAAAFAAAABpAAAAWAAAAGoAAABaAAAAcQAAAGQAAABmAAAAUwAAAFcAAABsAAAAcgAAAFwAAABlAAAAZgAAAGsAAABwAAAAUQAAAFUAAABeAAAAZgAAAGUAAABXAAAAVQAAAHIAAABwAAAAZAAAAGcAAABbAAAAYQAAAFkAAAB0AAAAaQAAAG8AAABoAAAAawAAAG4AAABzAAAAVgAAAF4AAABgAAAAaQAAAFgAAABnAAAAWwAAAHEAAABjAAAAdAAAAGoAAABdAAAAYwAAAFoAAAB1AAAAbQAAAHEAAABrAAAAfwAAAGUAAABeAAAAcwAAAGgAAABwAAAAbAAAAGQAAABfAAAAXAAAAHYAAAByAAAAbQAAAG0AAABsAAAAXQAAAF8AAAB1AAAAdgAAAGoAAABuAAAAYgAAAGgAAABgAAAAdwAAAG8AAABzAAAAbwAAAGEAAABuAAAAYgAAAHQAAABnAAAAdwAAAHAAAABrAAAAZgAAAGUAAAB4AAAAcwAAAHIAAABxAAAAYwAAAHQAAABpAAAAdQAAAGoAAAB5AAAAcgAAAHAAAABkAAAAZgAAAHYAAAB4AAAAbAAAAHMAAABuAAAAawAAAGgAAAB4AAAAdwAAAHAAAAB0AAAAZwAAAHcAAABvAAAAcQAAAGkAAAB5AAAAdQAAAH8AAABtAAAAdgAAAHEAAAB5AAAAagAAAHYAAAB4AAAAbAAAAHIAAAB1AAAAeQAAAG0AAAB3AAAAbwAAAHMAAABuAAAAeQAAAHQAAAB4AAAAeAAAAHMAAAByAAAAcAAAAHkAAAB3AAAAdgAAAHkAAAB0AAAAeAAAAHcAAAB1AAAAcQAAAHYAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAACAAAABQAAAAEAAAAAAAAA/////wEAAAAAAAAAAwAAAAQAAAACAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAwAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAUAAAABAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABAAAAAUAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAUAAAABAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAD//////////wEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAACAAAAAAAAAAAAAAABAAAAAgAAAAYAAAAEAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAKAAAAAgAAAAAAAAAAAAAAAQAAAAEAAAAFAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAAAAAAAAAAABAAAAAwAAAAcAAAAGAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABwAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADgAAAAIAAAAAAAAAAAAAAAEAAAAAAAAACQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAMAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAAAAAAAAAAAAAEAAAAEAAAACAAAAAoAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAACQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAgAAAAAAAAAAAAAAAQAAAAsAAAAPAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAIAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAAAAAAAAAAAAQAAAAwAAAAQAAAADAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAAAAAAAAAAABAAAACgAAABMAAAAIAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIAAAAAAAAAAAAAAAEAAAANAAAAEQAAAA0AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAACAAAAAAAAAAAAAAABAAAADgAAABIAAAAPAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAADwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABIAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAAAAAAAAQAAAP//////////EwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAASAAAAAAAAABgAAAAAAAAAIQAAAAAAAAAeAAAAAAAAACAAAAADAAAAMQAAAAEAAAAwAAAAAwAAADIAAAADAAAACAAAAAAAAAAFAAAABQAAAAoAAAAFAAAAFgAAAAAAAAAQAAAAAAAAABIAAAAAAAAAKQAAAAEAAAAhAAAAAAAAAB4AAAAAAAAABAAAAAAAAAAAAAAABQAAAAIAAAAFAAAADwAAAAEAAAAIAAAAAAAAAAUAAAAFAAAAHwAAAAEAAAAWAAAAAAAAABAAAAAAAAAAAgAAAAAAAAAGAAAAAAAAAA4AAAAAAAAACgAAAAAAAAALAAAAAAAAABEAAAADAAAAGAAAAAEAAAAXAAAAAwAAABkAAAADAAAAAAAAAAAAAAABAAAABQAAAAkAAAAFAAAABQAAAAAAAAACAAAAAAAAAAYAAAAAAAAAEgAAAAEAAAAKAAAAAAAAAAsAAAAAAAAABAAAAAEAAAADAAAABQAAAAcAAAAFAAAACAAAAAEAAAAAAAAAAAAAAAEAAAAFAAAAEAAAAAEAAAAFAAAAAAAAAAIAAAAAAAAABwAAAAAAAAAVAAAAAAAAACYAAAAAAAAACQAAAAAAAAATAAAAAAAAACIAAAADAAAADgAAAAEAAAAUAAAAAwAAACQAAAADAAAAAwAAAAAAAAANAAAABQAAAB0AAAAFAAAAAQAAAAAAAAAHAAAAAAAAABUAAAAAAAAABgAAAAEAAAAJAAAAAAAAABMAAAAAAAAABAAAAAIAAAAMAAAABQAAABoAAAAFAAAAAAAAAAEAAAADAAAAAAAAAA0AAAAFAAAAAgAAAAEAAAABAAAAAAAAAAcAAAAAAAAAGgAAAAAAAAAqAAAAAAAAADoAAAAAAAAAHQAAAAAAAAArAAAAAAAAAD4AAAADAAAAJgAAAAEAAAAvAAAAAwAAAEAAAAADAAAADAAAAAAAAAAcAAAABQAAACwAAAAFAAAADQAAAAAAAAAaAAAAAAAAACoAAAAAAAAAFQAAAAEAAAAdAAAAAAAAACsAAAAAAAAABAAAAAMAAAAPAAAABQAAAB8AAAAFAAAAAwAAAAEAAAAMAAAAAAAAABwAAAAFAAAABwAAAAEAAAANAAAAAAAAABoAAAAAAAAAHwAAAAAAAAApAAAAAAAAADEAAAAAAAAALAAAAAAAAAA1AAAAAAAAAD0AAAADAAAAOgAAAAEAAABBAAAAAwAAAEsAAAADAAAADwAAAAAAAAAWAAAABQAAACEAAAAFAAAAHAAAAAAAAAAfAAAAAAAAACkAAAAAAAAAKgAAAAEAAAAsAAAAAAAAADUAAAAAAAAABAAAAAQAAAAIAAAABQAAABAAAAAFAAAADAAAAAEAAAAPAAAAAAAAABYAAAAFAAAAGgAAAAEAAAAcAAAAAAAAAB8AAAAAAAAAMgAAAAAAAAAwAAAAAAAAADEAAAADAAAAIAAAAAAAAAAeAAAAAwAAACEAAAADAAAAGAAAAAMAAAASAAAAAwAAABAAAAADAAAARgAAAAAAAABDAAAAAAAAAEIAAAADAAAANAAAAAMAAAAyAAAAAAAAADAAAAAAAAAAJQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAUwAAAAAAAABXAAAAAwAAAFUAAAADAAAASgAAAAMAAABGAAAAAAAAAEMAAAAAAAAAOQAAAAEAAAA0AAAAAwAAADIAAAAAAAAAGQAAAAAAAAAXAAAAAAAAABgAAAADAAAAEQAAAAAAAAALAAAAAwAAAAoAAAADAAAADgAAAAMAAAAGAAAAAwAAAAIAAAADAAAALQAAAAAAAAAnAAAAAAAAACUAAAADAAAAIwAAAAMAAAAZAAAAAAAAABcAAAAAAAAAGwAAAAMAAAARAAAAAAAAAAsAAAADAAAAPwAAAAAAAAA7AAAAAwAAADkAAAADAAAAOAAAAAMAAAAtAAAAAAAAACcAAAAAAAAALgAAAAMAAAAjAAAAAwAAABkAAAAAAAAAJAAAAAAAAAAUAAAAAAAAAA4AAAADAAAAIgAAAAAAAAATAAAAAwAAAAkAAAADAAAAJgAAAAMAAAAVAAAAAwAAAAcAAAADAAAANwAAAAAAAAAoAAAAAAAAABsAAAADAAAANgAAAAMAAAAkAAAAAAAAABQAAAAAAAAAMwAAAAMAAAAiAAAAAAAAABMAAAADAAAASAAAAAAAAAA8AAAAAwAAAC4AAAADAAAASQAAAAMAAAA3AAAAAAAAACgAAAAAAAAARwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAQAAAAAAAAAAvAAAAAAAAACYAAAADAAAAPgAAAAAAAAArAAAAAwAAAB0AAAADAAAAOgAAAAMAAAAqAAAAAwAAABoAAAADAAAAVAAAAAAAAABFAAAAAAAAADMAAAADAAAAUgAAAAMAAABAAAAAAAAAAC8AAAAAAAAATAAAAAMAAAA+AAAAAAAAACsAAAADAAAAYQAAAAAAAABZAAAAAwAAAEcAAAADAAAAYgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAYAAAAAMAAABSAAAAAwAAAEAAAAAAAAAASwAAAAAAAABBAAAAAAAAADoAAAADAAAAPQAAAAAAAAA1AAAAAwAAACwAAAADAAAAMQAAAAMAAAApAAAAAwAAAB8AAAADAAAAXgAAAAAAAABWAAAAAAAAAEwAAAADAAAAUQAAAAMAAABLAAAAAAAAAEEAAAAAAAAAQgAAAAMAAAA9AAAAAAAAADUAAAADAAAAawAAAAAAAABoAAAAAwAAAGAAAAADAAAAZQAAAAMAAABeAAAAAAAAAFYAAAAAAAAAVQAAAAMAAABRAAAAAwAAAEsAAAAAAAAAOQAAAAAAAAA7AAAAAAAAAD8AAAADAAAASgAAAAAAAABOAAAAAwAAAE8AAAADAAAAUwAAAAMAAABcAAAAAwAAAF8AAAADAAAAJQAAAAAAAAAnAAAAAwAAAC0AAAADAAAANAAAAAAAAAA5AAAAAAAAADsAAAAAAAAARgAAAAMAAABKAAAAAAAAAE4AAAADAAAAGAAAAAAAAAAXAAAAAwAAABkAAAADAAAAIAAAAAMAAAAlAAAAAAAAACcAAAADAAAAMgAAAAMAAAA0AAAAAAAAADkAAAAAAAAALgAAAAAAAAA8AAAAAAAAAEgAAAADAAAAOAAAAAAAAABEAAAAAwAAAFAAAAADAAAAPwAAAAMAAABNAAAAAwAAAFoAAAADAAAAGwAAAAAAAAAoAAAAAwAAADcAAAADAAAAIwAAAAAAAAAuAAAAAAAAADwAAAAAAAAALQAAAAMAAAA4AAAAAAAAAEQAAAADAAAADgAAAAAAAAAUAAAAAwAAACQAAAADAAAAEQAAAAMAAAAbAAAAAAAAACgAAAADAAAAGQAAAAMAAAAjAAAAAAAAAC4AAAAAAAAARwAAAAAAAABZAAAAAAAAAGEAAAADAAAASQAAAAAAAABbAAAAAwAAAGcAAAADAAAASAAAAAMAAABYAAAAAwAAAGkAAAADAAAAMwAAAAAAAABFAAAAAwAAAFQAAAADAAAANgAAAAAAAABHAAAAAAAAAFkAAAAAAAAANwAAAAMAAABJAAAAAAAAAFsAAAADAAAAJgAAAAAAAAAvAAAAAwAAAEAAAAADAAAAIgAAAAMAAAAzAAAAAAAAAEUAAAADAAAAJAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAYAAAAAAAAABoAAAAAAAAAGsAAAADAAAAYgAAAAAAAABuAAAAAwAAAHMAAAADAAAAYQAAAAMAAABvAAAAAwAAAHcAAAADAAAATAAAAAAAAABWAAAAAwAAAF4AAAADAAAAUgAAAAAAAABgAAAAAAAAAGgAAAAAAAAAVAAAAAMAAABiAAAAAAAAAG4AAAADAAAAOgAAAAAAAABBAAAAAwAAAEsAAAADAAAAPgAAAAMAAABMAAAAAAAAAFYAAAADAAAAQAAAAAMAAABSAAAAAAAAAGAAAAAAAAAAVQAAAAAAAABXAAAAAAAAAFMAAAADAAAAZQAAAAAAAABmAAAAAwAAAGQAAAADAAAAawAAAAMAAABwAAAAAwAAAHIAAAADAAAAQgAAAAAAAABDAAAAAwAAAEYAAAADAAAAUQAAAAAAAABVAAAAAAAAAFcAAAAAAAAAXgAAAAMAAABlAAAAAAAAAGYAAAADAAAAMQAAAAAAAAAwAAAAAwAAADIAAAADAAAAPQAAAAMAAABCAAAAAAAAAEMAAAADAAAASwAAAAMAAABRAAAAAAAAAFUAAAAAAAAAXwAAAAAAAABcAAAAAAAAAFMAAAAAAAAATwAAAAAAAABOAAAAAAAAAEoAAAADAAAAPwAAAAEAAAA7AAAAAwAAADkAAAADAAAAbQAAAAAAAABsAAAAAAAAAGQAAAAFAAAAXQAAAAEAAABfAAAAAAAAAFwAAAAAAAAATQAAAAEAAABPAAAAAAAAAE4AAAAAAAAAdQAAAAQAAAB2AAAABQAAAHIAAAAFAAAAagAAAAEAAABtAAAAAAAAAGwAAAAAAAAAWgAAAAEAAABdAAAAAQAAAF8AAAAAAAAAWgAAAAAAAABNAAAAAAAAAD8AAAAAAAAAUAAAAAAAAABEAAAAAAAAADgAAAADAAAASAAAAAEAAAA8AAAAAwAAAC4AAAADAAAAagAAAAAAAABdAAAAAAAAAE8AAAAFAAAAYwAAAAEAAABaAAAAAAAAAE0AAAAAAAAAWAAAAAEAAABQAAAAAAAAAEQAAAAAAAAAdQAAAAMAAABtAAAABQAAAF8AAAAFAAAAcQAAAAEAAABqAAAAAAAAAF0AAAAAAAAAaQAAAAEAAABjAAAAAQAAAFoAAAAAAAAAaQAAAAAAAABYAAAAAAAAAEgAAAAAAAAAZwAAAAAAAABbAAAAAAAAAEkAAAADAAAAYQAAAAEAAABZAAAAAwAAAEcAAAADAAAAcQAAAAAAAABjAAAAAAAAAFAAAAAFAAAAdAAAAAEAAABpAAAAAAAAAFgAAAAAAAAAbwAAAAEAAABnAAAAAAAAAFsAAAAAAAAAdQAAAAIAAABqAAAABQAAAFoAAAAFAAAAeQAAAAEAAABxAAAAAAAAAGMAAAAAAAAAdwAAAAEAAAB0AAAAAQAAAGkAAAAAAAAAdwAAAAAAAABvAAAAAAAAAGEAAAAAAAAAcwAAAAAAAABuAAAAAAAAAGIAAAADAAAAawAAAAEAAABoAAAAAwAAAGAAAAADAAAAeQAAAAAAAAB0AAAAAAAAAGcAAAAFAAAAeAAAAAEAAAB3AAAAAAAAAG8AAAAAAAAAcAAAAAEAAABzAAAAAAAAAG4AAAAAAAAAdQAAAAEAAABxAAAABQAAAGkAAAAFAAAAdgAAAAEAAAB5AAAAAAAAAHQAAAAAAAAAcgAAAAEAAAB4AAAAAQAAAHcAAAAAAAAAcgAAAAAAAABwAAAAAAAAAGsAAAAAAAAAZAAAAAAAAABmAAAAAAAAAGUAAAADAAAAUwAAAAEAAABXAAAAAwAAAFUAAAADAAAAdgAAAAAAAAB4AAAAAAAAAHMAAAAFAAAAbAAAAAEAAAByAAAAAAAAAHAAAAAAAAAAXAAAAAEAAABkAAAAAAAAAGYAAAAAAAAAdQAAAAAAAAB5AAAABQAAAHcAAAAFAAAAbQAAAAEAAAB2AAAAAAAAAHgAAAAAAAAAXwAAAAEAAABsAAAAAQAAAHIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAGAAAAAgAAAAUAAAABAAAABAAAAAAAAAAAAAAABQAAAAMAAAABAAAABgAAAAQAAAACAAAAAAAAAH6iBfbytuk/Gq6akm/58z/Xrm0Liez0P5doSdOpSwRAWs602ULg8D/dT7Rcbo/1v1N1RQHFNOM/g9Snx7HW3L8HWsP8Q3jfP6VwOLosutk/9rjk1YQcxj+gnmKMsNn6P/HDeuPFY+M/YHwDjqKhB0Ci19/fCVrbP4UxKkDWOP6/pvljWa09tL9wi7wrQXjnv/Z6yLImkM2/3yTlOzY14D+m+WNZrT20PzwKVQnrQwNA9nrIsiaQzT/g40rFrRQFwPa45NWEHMa/kbslHEZq97/xw3rjxWPjv4cLC2SMBci/otff3wla27+rKF5oIAv0P1N1RQHFNOO/iDJPGyWHBUAHWsP8Q3jfvwQf/by16gXAfqIF9vK26b8XrO0Vh0r+v9eubQuJ7PS/BxLrA0ZZ479azrTZQuDwv1MK1EuItPw/yscgV9Z6FkAwHBR2WjQMQJNRzXsQ5vY/GlUHVJYKF0DONuFv2lMNQNCGZ28QJfk/0WUwoIL36D8ggDOMQuATQNqMOeAy/wZAWFYOYM+M2z/LWC4uH3oSQDE+LyTsMgRAkJzhRGWFGEDd4soovCQQQKqk0DJMEP8/rGmNdwOLBUAW2X/9xCbjP4hu3dcqJhNAzuYItRvdB0CgzW3zJW/sPxotm/Y2TxRAQAk9XmdDDEC1Kx9MKgT3P1M+NctcghZAFVqcLlb0C0Bgzd3sB2b2P77mZDPUWhZAFROHJpUGCEDAfma5CxXtPz1DWq/zYxRAmhYY5824F0DOuQKWSbAOQNCMqrvu3fs/L6DR22K2wT9nAAxPBU8RQGiN6mW43AFAZhu25b633D8c1YgmzowSQNM25BRKWARArGS08/lNxD+LFssHwmMRQLC5aNcxBgJABL9HT0WRF0CjCmJmOGEOQHsuaVzMP/s/TWJCaGGwBUCeu1PAPLzjP9nqN9DZOBNAKE4JcydbCkCGtbd1qjPzP8dgm9U8jhVAtPeKTkVwDkCeCLss5l37P401XMPLmBdAFd29VMVQDUBg0yA55h75Pz6odcYLCRdApBM4rBrkAkDyAVWgQxbRP4XDMnK20hFAymLlF7EmzD8GUgo9XBHlP3lbK7T9COc/k+OhPthhy7+YGEpnrOvCPzBFhLs15u4/epbqB6H4uz9IuuLF5svev6lzLKY31es/CaQ0envF5z8ZY0xlUADXv7zaz7HYEuI/CfbK1sn16T8uAQfWwxLWPzKn/YuFN94/5KdbC1AFu793fyCSnlfvPzK2y4doAMY/NRg5t1/X6b/shq4QJaHDP5yNIAKPOeI/vpn7BSE30r/X4YQrO6nrv78Ziv/Thto/DqJ1Y6+y5z9l51NaxFrlv8QlA65HOLS/86dxiEc96z+Hj0+LFjneP6LzBZ8LTc2/DaJ1Y6+y579l51NaxFrlP8QlA65HOLQ/8qdxiEc967+Jj0+LFjnev6LzBZ8LTc0/1qdbC1AFuz93fyCSnlfvvzK2y4doAMa/NRg5t1/X6T/vhq4QJaHDv5yNIAKPOeK/wJn7BSE30j/W4YQrO6nrP78Ziv/Thtq/CaQ0envF578XY0xlUADXP7zaz7HYEuK/CvbK1sn16b8rAQfWwxLWvzKn/YuFN96/zWLlF7EmzL8GUgo9XBHlv3lbK7T9COe/kOOhPthhyz+cGEpnrOvCvzBFhLs15u6/c5bqB6H4u79IuuLF5sveP6lzLKY31eu/AQAAAP////8HAAAA/////zEAAAD/////VwEAAP////9hCQAA/////6dBAAD/////kcsBAP/////3kAwA/////8H2VwAAAAAAAAAAAAAAAAACAAAA/////w4AAAD/////YgAAAP////+uAgAA/////8ISAAD/////ToMAAP////8ilwMA/////+4hGQD/////gu2vAAAAAAAAAAAAAAAAAAAAAAACAAAA//////////8BAAAAAwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////AgAAAP//////////AQAAAAAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD/////////////////////AQAAAP///////////////wIAAAD///////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP///////////////////////////////wIAAAD///////////////8BAAAA/////////////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAABAAAA//////////8CAAAA//////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAAAQAAAP//////////AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAACAAAAAAAAAAIAAAABAAAAAQAAAAIAAAACAAAAAAAAAAUAAAAFAAAAAAAAAAIAAAACAAAAAwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAAEAAAACAAAAAgAAAAIAAAAAAAAABQAAAAYAAAAAAAAAAgAAAAIAAAADAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAAAAAACAAAAAQAAAAMAAAACAAAAAgAAAAAAAAAFAAAABwAAAAAAAAACAAAAAgAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAACAAAAAAAAAAIAAAABAAAABAAAAAIAAAACAAAAAAAAAAUAAAAIAAAAAAAAAAIAAAACAAAAAwAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAIAAAAAAAAAAgAAAAEAAAAAAAAAAgAAAAIAAAAAAAAABQAAAAkAAAAAAAAAAgAAAAIAAAADAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAgAAAAIAAAAAAAAAAwAAAA4AAAACAAAAAAAAAAIAAAADAAAAAAAAAAAAAAACAAAAAgAAAAMAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAACAAAAAgAAAAAAAAADAAAACgAAAAIAAAAAAAAAAgAAAAMAAAABAAAAAAAAAAIAAAACAAAAAwAAAAcAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAACAAAAAAAAAAMAAAALAAAAAgAAAAAAAAACAAAAAwAAAAIAAAAAAAAAAgAAAAIAAAADAAAACAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAIAAAAAAAAAAwAAAAwAAAACAAAAAAAAAAIAAAADAAAAAwAAAAAAAAACAAAAAgAAAAMAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAACAAAAAgAAAAAAAAADAAAADQAAAAIAAAAAAAAAAgAAAAMAAAAEAAAAAAAAAAIAAAACAAAAAwAAAAoAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAACAAAAAAAAAAMAAAAGAAAAAgAAAAAAAAACAAAAAwAAAA8AAAAAAAAAAgAAAAIAAAADAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAgAAAAIAAAAAAAAAAwAAAAcAAAACAAAAAAAAAAIAAAADAAAAEAAAAAAAAAACAAAAAgAAAAMAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAgAAAAAAAAADAAAACAAAAAIAAAAAAAAAAgAAAAMAAAARAAAAAAAAAAIAAAACAAAAAwAAAA0AAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIAAAACAAAAAAAAAAMAAAAJAAAAAgAAAAAAAAACAAAAAwAAABIAAAAAAAAAAgAAAAIAAAADAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAgAAAAIAAAAAAAAAAwAAAAUAAAACAAAAAAAAAAIAAAADAAAAEwAAAAAAAAACAAAAAgAAAAMAAAAPAAAAAAAAAAAAAAAAAAAAAAAAABAAAAACAAAAAAAAAAIAAAABAAAAEwAAAAIAAAACAAAAAAAAAAUAAAAKAAAAAAAAAAIAAAACAAAAAwAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAIAAAAAAAAAAgAAAAEAAAAPAAAAAgAAAAIAAAAAAAAABQAAAAsAAAAAAAAAAgAAAAIAAAADAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAgAAAAAAAAACAAAAAQAAABAAAAACAAAAAgAAAAAAAAAFAAAADAAAAAAAAAACAAAAAgAAAAMAAAASAAAAAAAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAIAAAABAAAAEQAAAAIAAAACAAAAAAAAAAUAAAANAAAAAAAAAAIAAAACAAAAAwAAABMAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAIAAAAAAAAAAgAAAAEAAAASAAAAAgAAAAIAAAAAAAAABQAAAA4AAAAAAAAAAgAAAAIAAAADAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAAAAAAUAAAAEAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAQAAAAAAAAABQAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAAAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAEAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAQAAAAAAAAABQAAAAUAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAABAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAEAAAAAAQAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAABAAAAAAAAAAAAAQAAAAAAAAAAAAA6B6FaUp9QQTPXMuL4myJBraiDfBwx9UBYJseitzTIQOL5if9jqZtAnXX+Z+ycb0C3pucbhRBCQG8wJBYqpRRAlWbDCzCY5z/eFWBUEve6P/+qo4Q50Y4/D9YM3iCcYT8fcA2QJSA0P4ADxu0qAAc/BNcGolVJ2j5d9FACqwquPh9z7MthtI9CSUSYJke/YUJQ/64OyjU0Qpi0+HCmFQdCm3GfIVdh2kHsJ11kAyauQYC3UDFJOoFBSJsFV1OwU0FK5fcxX4AmQWhy/zZIt/lACqaCPsBjzUDbdUNIScugQMYQlVJ4MXNANiuq8GTvRUDxTXnulxEZQFZ8QX5kpuw/qmG/JwYFlEAluh3Q6DB+QKn4vyNq0GZAKOXekas+UUB8xabXXhI6QG63C2pLtSNAdDBtyNfLDUDyOcu67ID2P0rCMvRXAeE/Ki2TSVyzyT9Dk+8Sz2uzP5J+w5ARWp0/NQAoOiMuhj9YnP+RyMJwPxgW7TvQVFk/KgsLYF0kQz9g5dAC6IwzQcgHPVvDex1B1XjppodHBkHJq3OMM9fwQNvcmJ7wddlAInGPpQs/w0BRobq5EBmtQJZ2ai7n+ZVAtv2G5E+bgECG+gIfKBlpQK5f8jdI91JAL39sL/WpPEB8rGxhDqklQK6yUf43XhBAxL9y/tK8+D86XyZpgrHiPwAAAAD/////AAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAP////8AAAAAAAAAAAAAAAABAAAAAAAAAAAAAAD/////AAAAAAAAAAABAAAAAQAAAAAAAAAAAAAA/////wAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAP////8FAAAABQAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAFAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAEAAAAAAAAABQAAAAEAAAABAAAAAAAAAAAAAAABAAAAAQAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQAAAAAAAQABAAABAQAAAAAAAQAAAAEAAAABAAEAAAAAAAAAAAAAAAAAAAAAquJYWJZl+D9jaeZNtj/zPwwdI9KqaeO/qGefXwdHdz+q4lhYlmX4P+OrlPMN3PI/DB0j0qpp47+7SQLV4VIEQKriWFiWZfg/r2kma3tz8T82eQmLqNIGwMRIWXMqSvo/fcCszPux9j+jara6ozTwP6hnn18HR3c/MSoKLequ8r+SabgA2nj0P7jBLbDOHO8/1Ym/ICfH4T+6lxjvlFXHv73m373LRPU/0vXyDVxo7T+ToKRHJXMAQF/33578aPE/pAyy64tD9T8+U/hCvyruPwxv8Y7YYwLAuXYr8NAiCEB4+LDK0Sn0P1Qeuy4j+eo/OMx50n7K7L+TrGB/nyf8v5ehC2fbYPM/aXMKexiT6z8mFRIMjg/zP7yUVwGGBNw/E6opHERf8z/z0wR2g9DqPw4pBpcOhvu/NbA29uWAA8DMaTExyXzyP02biiQ+Ruk/S8jz2/FKBEB1pzZnpbb9P7pQU4wLfPI//7ZcQXeG6D9CqEQvAYoIwDB2VB6sSgRAVyv8H5We8T+EHWF8XNPmPzB2wT8Nrrg/SEi+cX+w4L8of+GtdSDxP1sjk5AdouU/6ZjOVru13r8K0obqI6bxvwVbdNXyhfA/w5GG024n5z+rwmtMzP8BwLw9pSX49QXABe/2uQxP8D+b6wCzCvXkP7uGT87fK+Q/pz/JWw4coj+qoBf2J0nwP/yE3PUo0+I/vFJeHcaC+D96luSIqvntP/bf8sHUYu8/gZNN41mL4z9bhOqVOF4FwO6lmAh1hQhAbCVxbdhk7z+1C8NdDcfiPwG36x/0OQBAx0WJ76c2+D9nlSHXANfuP2HlfZ3gqOE/EwnVlVPg9r96+oHzEH//v5bXzdT1Auw/DM3GwLsA4D9p/8uoKcr+v+U9x5DQVAPAehjSdghb7D9sc1IetODgP8MVwwB1pu6/azPk6OGe978W8t/TUc3rP+0QMvYfP+A/RsG/QpSE8D+l3uwScxzgPwQaifgujuw/k1Vti1I43z8MAwLnSh0GQH5nYnwwZgJAiGUzWC5s6j8WyyI/BbLgPw4iUapGeQJAB3W+imnp/j9BLWR4ssrpP2t+gG5Pstk/cpBsfm6DCMCOpU9dOZsFQEv8nFypHeo/ehJ6i+6S2D9jqlGEmarLv7STC5TRiOa/bC+x8WZD6D9H3yUkWpDZP8gZvmCMuQLAreY19/eRBsCoPOc8UzzpP6KI/QV+y9g/t/MoboyWzT+Hv5q3Zu3Mvy2xROCT4uY/9gQitMMg1T9abAqhWMDkv1oLTavoUfG/PMUJP9CD5j+fHRX3t6fSPz7W2gk6bvs/WRnuHwqN9D8YFturGCTmP1EZczv0b9I/5t4exabB5D/1ESLh5fTEP9X2z6SYweQ/6lv3I2zT0D9zkRGNUNMAQKoSvc4EIfs/Xggt8wQI5T+mJHHg/w/SP4lhT/9t8vQ/DrZ/DbwH7D+XlhbYZrjkP34LIpFt6c4/lwfp8fLX9L+j96CTTf76v3WdNhEv9uM/d8c3o4lV0D/vFdCHVcsFwAHeDq0F1QhApbYqcZiN5D9KoilqByXLPwX0/diA0vq/0fo0GxnxAMBbaTkvlCzjP/RrFrWXrMs/UYTrky7jA0DB9f4FiZYAQEGAk/3QzeE/r/TeqE8t0D/OqjlsnPbvvz8RKU8JOfW/smSEbK/O4T8MzuyPm3DDP/rFtctq9gZAfb1EVEaSA0Dts5dVInnhP18SFMc79MM/7y34cw6LAMDFrRJsZO0DwC2KLvLSYuA/hx5wcUHewz+49SnK/4ruPyeS0PX9a+E/ZxaaLvvZ3z8WPu5T2QS8Pygo4RIvMqa/BJ0Kqsd0279cKW4ay8jdP3b05bmZ364/10/qtdxk2r+Bcz6CDMvpv54qOw+Amdw/qLV71pW7sT/YKc80nIPUP8OfIaBJ77G/LyTuD1un2z+diYu8efWzP1wU7ACkfwjAZroyPL1yBkAmv3lKJJbbPysKSE4W+p0/dIgqY79TA8ATLTOQ3tsGwJ2zweD/Xdg/XO/jXeFUaL8VW2qLFKfov1cA9Aa6XfK/tIa7YGgI2T+f3hu/sxqPv2nXdPpf3Pc/jkw8Jbda8j+tT/z8tGPVP1yBHpJd35k/KYvYOy1s8j/yz+kCQjPrP9+agH7x59g/PZfJ9aBhpr/rDKzvYBb+PwtkiaGCt/c/vb1mVr+f1T/JIHwHc8Govw7aeF6+9vG/Xv7kD6fp979isYioQYHVP7AIQZuSFrG/3z1AdUTnAUDN3XY9O7f9P0AdQ9ljYNQ/dJANJPTOrb8kLECUiiPlP4yF7UgmStA/9xGmXxCG1T9qZzix4W2zv2SGJRJVrPe/Fh9a2M/B/b8IexzFCoPSP9y1QFD2bLe/Q86cWLJe/b+mOOfYm78BwOTjkPAGE9E/8aPCUKu/ub9pPZyLCiUGwBA7Mev/BQlALOmrlRi+0j+AMJ/dKULBv7iLtL6a6QRAEMDV/yajAUDa62dE3crJP1P70RgBUbq/38hVnR6esT/s1tG10Z/Ov/zLwalHPss/dTS9NKTXx78nMcRzCIEHQAabxDsAmQRA0tyLK3gSyT+Aui7nOhDGv5Gs58z3WgHATN3forJuBMCAui7nOhDGP9Lciyt4Esm/WAJyHQ4c7z8UP5HFIs3iP3U0vTSk18c//MvBqUc+y7+cvv8HLg/Kvy1I/mHsI+K/U/vRGAFRuj/a62dE3crJv8p+WV8KlQjAuQ/nOP43B0CAMJ/dKULBPyzpq5UYvtK/ZoU+VoLh4L9etLlRUfvtv/GjwlCrv7k/5OOQ8AYT0b9DfT9FhufXPwUX8hJp+4u/3LVAUPZstz8IexzFCoPSv9+L609E5fQ/q9Fz7X2J7T9qZzix4W2zP/cRpl8QhtW/vtNilqGX+j8MOy7QJoL0P3SQDST0zq0/QB1D2WNg1L8IIjSvGNkDwGB8Jou2GAfAsAhBm5IWsT9isYioQYHVvyS9D3zb6uy/gnwRa7uM9L/JIHwHc8GoP729Zla/n9W/CsAHJZwmAEDEW6OYT1r6Pz2XyfWgYaY/35qAfvHn2L83Tdy4lS30vxf2/gZ0jPq/XIEekl3fmb+tT/z8tGPVvybPr2zJ1/+/K7mJ0ypVAsCf3hu/sxqPPwCGu2BoCNm/5oITrpZn+r+UDUyDP+n/v1zv413hVGg/nbPB4P9d2L9MlmkxNvgCQMtZlKE85v8/KwpIThb6nb8mv3lKJJbbv8+SZsTvOOc/pQCIIOYw0j+diYu8efWzvy8k7g9bp9u/kxYDa+pKtD9XlYvA8HnVv6i1e9aVu7G/nio7D4CZ3L/WR6rNh5EGwCkgQweBkghAdvTluZnfrr9cKW4ay8jdvxbjhr1f1QVAR5C0MzivAkAWPu5T2QS8v2cWmi772d+/cKj4lzLJCEBx2QJfYrMFQIcecHFB3sO/LYou8tJi4L+jr7lhO38BwIcI0Nb7xgTAXxIUxzv0w7/ts5dVInnhv0T+l8DZLfE/MP3FoFvS5D8MzuyPm3DDv7JkhGyvzuG/tzhzRIRc0b9Ovv3/0z7mv6/03qhPLdC/m4CT/dDN4b9dwjU5VCQBQBBJX1ntCv0/9GsWtZesy79baTkvlCzjv1mjYgEz++S/oW6KnOQW8b9KoilqByXLv6W2KnGYjeS/SmaKz3Vx9z+BZB5yxGHwP3fHN6OJVdC/dZ02ES/2478PuaBjLrXaP4/JU81pPaO/fgsikW3pzr+XlhbYZrjkv4tSn7YDbP0/f2LnFKlF9z+mJHHg/w/Sv14ILfMECOW/mfg4qYhR/b+OP+RQDCACwOpb9yNs09C/1fbPpJjB5L9pN2WOVZ3wv3hHy9nxIve/URlzO/Rv0r8YFturGCTmv1d1/KKR8QPA8gsy9qzSB8CfHRX3t6fSvzzFCT/Qg+a/EYStnrzV9r/2QJqI7Lb9v/YEIrTDINW/LbFE4JPi5r/7kQEs5fEDQHunnf4GeQBAooj9BX7L2L+oPOc8Uzzpv+ydYY2SSAfAL4HK6CRTB0BH3yUkWpDZv2wvsfFmQ+i/Ik0Yzruh6T8fM3LoGoDUP3oSeovukti/S/ycXKkd6r9rEv+7UWcHQCRIQe/GfwNAa36Abk+y2b9BLWR4ssrpv9KT87qa0bM/FTyktw823L8WyyI/BbLgv4hlM1gubOq/DizMp9Ki6r8b5ckdjVrzv5NVbYtSON+/BBqJ+C6O7L/dUBFqgyXYv00Wh18r7+q/7RAy9h8/4L8W8t/TUc3rv4RM5DKx3wDAfvWIj94aBcBsc1IetODgv3oY0nYIW+y/oGcTFF54AUDkJqS/FKX6PwzNxsC7AOC/ltfN1PUC7L+5Wrz/zHnzP6688w2rNOc/YeV9neCo4b9nlSHXANfuvw9RsxKjY/s/1V8GteXE8j+1C8NdDcfiv2wlcW3YZO+/IOywaA7Q8b9bFP+4Tg36v4GTTeNZi+O/9t/ywdRi77+tRc3yFR7eP2bkcHXJkLO//ITc9SjT4r+qoBf2J0nwv2YHKoswwfm/iQcLspCjAcCb6wCzCvXkvwXv9rkMT/C/YkuwYAMXBMApCNUai9kIwMORhtNuJ+e/BVt01fKF8L+ZqWEfvIjsP6h693QZYNk/WyOTkB2i5b8of+GtdSDxvwpaaulDSwVADMQAX+lOAECEHWF8XNPmv1cr/B+VnvG/XyFG6opcCMD/mtR32/UEQP+2XEF3hui/ulBTjAt88r/imfCfRP+yP9zbvtc8XeO/TZuKJD5G6b/MaTExyXzyvxiTQeElXOO/rbJRQVGN9L/z0wR2g9DqvxOqKRxEX/O/FDGCEei99j9x8zV4VYTmP2lzCnsYk+u/l6ELZ9tg878pRXacaDT/v3k6GZRqoQXAVB67LiP56r94+LDK0Sn0vwO6pZ9b7wFAvK0nKVcc9j8+U/hCvyruv6QMsuuLQ/W/FPhKFYv46j8MyxaDTOW/v9L18g1caO2/vebfvctE9b/7GD8ZrF3xv3gx1AR9bQDAuMEtsM4c77+SabgA2nj0v5xKFIwxsATArKNSBaKsB0Cjara6ozTwv33ArMz7sfa/dF2U0FcWCcDxL357DJX/P69pJmt7c/G/quJYWJZl+L/YntVJlnrSP4sRLzXM+fe/46uU8w3c8r+q4lhYlmX4v85lu5+QRwRAsI0H/WU8479jaeZNtj/zv6riWFiWZfi/sI0H/WU847/OZbufkEcEQHAoPUBrnss/9exKzDtFtT88wM8kax+gP9OqeKeAYog/MW0ItiZvcj+ph+smvt5bP2lCaV5dEUU/StaUmQDaLz+kK9y22BMYP0O3whZuMwI/IIbgZGWE6z7UkjYaEM3UPuezxwa9cr8+LybxRMnFpz6E1N8DbPiRPsYjySMvK3s+//////8fAAj//////zMQCP////9/MiAI/////28yMAj/////YzJACP///z9iMlAI////N2IyYAj///8zYjJwCP//vzNiMoAI//+rM2IykAj/f6szYjKgCP8PqzNiMrAI/wOrM2IywAi/A6szYjLQCJ8DqzNiMuAImQOrM2Iy8Aj//////z8PCP//////Kx8I/////38pLwj/////Pyk/CP////85KU8I////PzgpXwj///8POClvCP///w44KX8I//8fDjgpjwj//w8OOCmfCP9/DQ44Ka8I/w8NDjgpvwj/DQ0OOCnPCP8MDQ44Kd8IxwwNDjgp7wjEDA0OOCn/CAcAAAAHAAAAAQAAAAIAAAAEAAAAAwAAAAAAAAAAAAAABwAAAAMAAAABAAAAAgAAAAUAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAGAAAAAgAAAAMAAAAFAAAABAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAwAAAAEAAAAFAAAABAAAAAAAAAAAAAAABwAAAAUAAAADAAAABAAAAAEAAAAAAAAAAgAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAABgtRFT7Ifk/GC1EVPsh+b8YLURU+yEJQBgtRFT7IQnAYWxnb3MuYwBoM05laWdoYm9yUm90YXRpb25zAGNvb3JkaWprLmMAX3VwQXA3Q2hlY2tlZABfdXBBcDdyQ2hlY2tlZABkaXJlY3RlZEVkZ2UuYwBkaXJlY3RlZEVkZ2VUb0JvdW5kYXJ5AGFkamFjZW50RmFjZURpclt0bXBGaWprLmZhY2VdW2ZpamsuZmFjZV0gPT0gS0kAZmFjZWlqay5jAF9mYWNlSWprUGVudFRvQ2VsbEJvdW5kYXJ5AGFkamFjZW50RmFjZURpcltjZW50ZXJJSksuZmFjZV1bZmFjZTJdID09IEtJAF9mYWNlSWprVG9DZWxsQm91bmRhcnkAaDNJbmRleC5jAGNvbXBhY3RDZWxscwBsYXRMbmdUb0NlbGwAY2VsbFRvQ2hpbGRQb3MAdmFsaWRhdGVDaGlsZFBvcwBsYXRMbmcuYwBjZWxsQXJlYVJhZHMyAHBvbHlnb24tPm5leHQgPT0gTlVMTABsaW5rZWRHZW8uYwBhZGROZXdMaW5rZWRQb2x5Z29uAG5leHQgIT0gTlVMTABsb29wICE9IE5VTEwAYWRkTmV3TGlua2VkTG9vcABwb2x5Z29uLT5maXJzdCA9PSBOVUxMAGFkZExpbmtlZExvb3AAY29vcmQgIT0gTlVMTABhZGRMaW5rZWRDb29yZABsb29wLT5maXJzdCA9PSBOVUxMAGlubmVyTG9vcHMgIT0gTlVMTABub3JtYWxpemVNdWx0aVBvbHlnb24AYmJveGVzICE9IE5VTEwAY2FuZGlkYXRlcyAhPSBOVUxMAGZpbmRQb2x5Z29uRm9ySG9sZQBjYW5kaWRhdGVCQm94ZXMgIT0gTlVMTAByZXZEaXIgIT0gSU5WQUxJRF9ESUdJVABsb2NhbGlqLmMAY2VsbFRvTG9jYWxJamsAYmFzZUNlbGwgIT0gb3JpZ2luQmFzZUNlbGwAIShvcmlnaW5PblBlbnQgJiYgaW5kZXhPblBlbnQpAGJhc2VDZWxsID09IG9yaWdpbkJhc2VDZWxsAGJhc2VDZWxsICE9IElOVkFMSURfQkFTRV9DRUxMAGxvY2FsSWprVG9DZWxsACFfaXNCYXNlQ2VsbFBlbnRhZ29uKGJhc2VDZWxsKQBiYXNlQ2VsbFJvdGF0aW9ucyA+PSAwAGdyaWRQYXRoQ2VsbHMAcG9seWZpbGwuYwBpdGVyU3RlcFBvbHlnb25Db21wYWN0ADAAdmVydGV4LmMAdmVydGV4Um90YXRpb25zAGNlbGxUb1ZlcnRleABncmFwaC0+YnVja2V0cyAhPSBOVUxMAHZlcnRleEdyYXBoLmMAaW5pdFZlcnRleEdyYXBoAG5vZGUgIT0gTlVMTABhZGRWZXJ0ZXhOb2Rl";var xA=28640;function FA(f0,m0,I0,y0){ze("Assertion failed: "+r0(f0)+", at: "+[m0?r0(m0):"unknown filename",I0,y0?r0(y0):"unknown function"])}function se(){return X.length}function te(f0,m0,I0){t0.set(t0.subarray(m0,m0+I0),f0)}function re(f0){return l.___errno_location&&($[l.___errno_location()>>2]=f0),f0}function OA(f0){ze("OOM")}function VA(f0){try{var m0=new ArrayBuffer(f0);return m0.byteLength!=f0?void 0:(new Int8Array(m0).set(X),Nt(m0),h0(m0),1)}catch{}}function le(f0){var m0=se(),I0=16777216,y0=2147483648-I0;if(f0>y0)return!1;for(var t=16777216,M=Math.max(m0,t);M<f0;)M<=536870912?M=A0(2*M,I0):M=Math.min(A0((3*M+2147483648)/4,I0),y0);var hA=VA(M);return!!hA}var me=typeof atob=="function"?atob:function(f0){var m0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",I0="",y0,t,M,hA,CA,BA,aA,yA=0;f0=f0.replace(/[^A-Za-z0-9\+\/\=]/g,"");do hA=m0.indexOf(f0.charAt(yA++)),CA=m0.indexOf(f0.charAt(yA++)),BA=m0.indexOf(f0.charAt(yA++)),aA=m0.indexOf(f0.charAt(yA++)),y0=hA<<2|CA>>4,t=(CA&15)<<4|BA>>2,M=(BA&3)<<6|aA,I0=I0+String.fromCharCode(y0),BA!==64&&(I0=I0+String.fromCharCode(t)),aA!==64&&(I0=I0+String.fromCharCode(M));while(yA<f0.length);return I0};function xe(f0){try{for(var m0=me(f0),I0=new Uint8Array(m0.length),y0=0;y0<m0.length;++y0)I0[y0]=m0.charCodeAt(y0);return I0}catch{throw new Error("Converting base64 string to bytes failed.")}}function Ke(f0){if(q0(f0))return xe(f0.slice(v0.length))}var Ft={Math,Int8Array,Int32Array,Uint8Array,Float32Array,Float64Array},N1={b:x,c:D,d:FA,e:re,f:se,g:te,h:le,i:OA,o:xA,p:H0},k0=(function(f0,m0,I0){"almost asm";var y0=new f0.Int8Array(I0),t=new f0.Int32Array(I0);new f0.Uint8Array(I0),new f0.Float32Array(I0);var M=new f0.Float64Array(I0),hA=m0.o|0,CA=m0.p|0,BA=f0.Math.floor,aA=f0.Math.abs,yA=f0.Math.sqrt,Ce=f0.Math.pow,mA=f0.Math.cos,cA=f0.Math.sin,JA=f0.Math.tan,A1=f0.Math.acos,Zt=f0.Math.asin,g1=f0.Math.atan,vA=f0.Math.atan2,de=f0.Math.ceil,WA=f0.Math.imul,Ue=f0.Math.min,Qt=f0.Math.max,he=f0.Math.clz32,nA=m0.b,S=m0.c,R0=m0.d,y1=m0.e,m1=m0.f,Ot=m0.g,Z1=m0.h,K=m0.i,L=28656;function F0(e){return y0=new Int8Array(e),t=new Int32Array(e),M=new Float64Array(e),I0=e,!0}function X0(e){e=e|0;var A=0;return A=L,L=L+e|0,L=L+15&-16,A|0}function AA(){return L|0}function uA(e){e=e|0,L=e}function kA(e,A){e=e|0,L=e}function pe(e,A){e=e|0,A=A|0;var r=0,n=0,i=0;return(e|0)<0?(A=2,A|0):(e|0)>13780509?(A=$1(15,A)|0,A|0):(r=((e|0)<0)<<31>>31,i=QA(e|0,r|0,3,0)|0,n=S()|0,r=G0(e|0,r|0,1,0)|0,r=QA(i|0,n|0,r|0,S()|0)|0,r=G0(r|0,S()|0,1,0)|0,e=S()|0,t[A>>2]=r,t[A+4>>2]=e,A=0,A|0)}function ae(e,A,r,n){return e=e|0,A=A|0,r=r|0,n=n|0,Se(e,A,r,n,0)|0}function Se(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0,p=0;if(d=L,L=L+16|0,a=d,!(be(e,A,r,n,i)|0))return n=0,L=d,n|0;do if((r|0)>=0){if((r|0)>13780509){if(o=$1(15,a)|0,o|0)break;c=a,a=t[c>>2]|0,c=t[c+4>>2]|0}else o=((r|0)<0)<<31>>31,p=QA(r|0,o|0,3,0)|0,c=S()|0,o=G0(r|0,o|0,1,0)|0,o=QA(p|0,c|0,o|0,S()|0)|0,o=G0(o|0,S()|0,1,0)|0,c=S()|0,t[a>>2]=o,t[a+4>>2]=c,a=o;if(_e(n|0,0,a<<3|0)|0,i|0){_e(i|0,0,a<<2|0)|0,o=ne(e,A,r,n,i,a,c,0)|0;break}o=RA(a,4)|0,o?(p=ne(e,A,r,n,o,a,c,0)|0,Y0(o),o=p):o=13}else o=2;while(!1);return p=o,L=d,p|0}function be(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0;if(W=L,L=L+16|0,P=W,T=W+8|0,I=P,t[I>>2]=e,t[I+4>>2]=A,(r|0)<0)return T=2,L=W,T|0;if(o=n,t[o>>2]=e,t[o+4>>2]=A,o=(i|0)!=0,o&&(t[i>>2]=0),MA(e,A)|0)return T=9,L=W,T|0;t[T>>2]=0;A:do if((r|0)>=1)if(o)for(v=1,p=0,E=0,I=1,o=e;;){if(!(p|E)){if(o=NA(o,A,4,T,P)|0,o|0)break A;if(A=P,o=t[A>>2]|0,A=t[A+4>>2]|0,MA(o,A)|0){o=9;break A}}if(o=NA(o,A,t[26800+(E<<2)>>2]|0,T,P)|0,o|0)break A;if(A=P,o=t[A>>2]|0,A=t[A+4>>2]|0,e=n+(v<<3)|0,t[e>>2]=o,t[e+4>>2]=A,t[i+(v<<2)>>2]=I,e=p+1|0,a=(e|0)==(I|0),c=E+1|0,d=(c|0)==6,MA(o,A)|0){o=9;break A}if(I=I+(d&a&1)|0,(I|0)>(r|0)){o=0;break}else v=v+1|0,p=a?0:e,E=a?d?0:c:E}else for(v=1,p=0,E=0,I=1,o=e;;){if(!(p|E)){if(o=NA(o,A,4,T,P)|0,o|0)break A;if(A=P,o=t[A>>2]|0,A=t[A+4>>2]|0,MA(o,A)|0){o=9;break A}}if(o=NA(o,A,t[26800+(E<<2)>>2]|0,T,P)|0,o|0)break A;if(A=P,o=t[A>>2]|0,A=t[A+4>>2]|0,e=n+(v<<3)|0,t[e>>2]=o,t[e+4>>2]=A,e=p+1|0,a=(e|0)==(I|0),c=E+1|0,d=(c|0)==6,MA(o,A)|0){o=9;break A}if(I=I+(d&a&1)|0,(I|0)>(r|0)){o=0;break}else v=v+1|0,p=a?0:e,E=a?d?0:c:E}else o=0;while(!1);return T=o,L=W,T|0}function ne(e,A,r,n,i,o,a,c){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0,o=o|0,a=a|0,c=c|0;var d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0;if(W=L,L=L+16|0,P=W+8|0,T=W,d=o1(e|0,A|0,o|0,a|0)|0,v=S()|0,E=n+(d<<3)|0,R=E,u0=t[R>>2]|0,R=t[R+4>>2]|0,p=(u0|0)==(e|0)&(R|0)==(A|0),!((u0|0)==0&(R|0)==0|p))do d=G0(d|0,v|0,1,0)|0,d=i1(d|0,S()|0,o|0,a|0)|0,v=S()|0,E=n+(d<<3)|0,u0=E,R=t[u0>>2]|0,u0=t[u0+4>>2]|0,p=(R|0)==(e|0)&(u0|0)==(A|0);while(!((R|0)==0&(u0|0)==0|p));if(d=i+(d<<2)|0,p&&(t[d>>2]|0)<=(c|0)||(u0=E,t[u0>>2]=e,t[u0+4>>2]=A,t[d>>2]=c,(c|0)>=(r|0)))return u0=0,L=W,u0|0;switch(p=c+1|0,t[P>>2]=0,d=NA(e,A,2,P,T)|0,d|0){case 9:{I=9;break}case 0:{d=T,d=ne(t[d>>2]|0,t[d+4>>2]|0,r,n,i,o,a,p)|0,d||(I=9);break}}A:do if((I|0)==9){switch(t[P>>2]=0,d=NA(e,A,3,P,T)|0,d|0){case 9:break;case 0:{if(d=T,d=ne(t[d>>2]|0,t[d+4>>2]|0,r,n,i,o,a,p)|0,d|0)break A;break}default:break A}switch(t[P>>2]=0,d=NA(e,A,1,P,T)|0,d|0){case 9:break;case 0:{if(d=T,d=ne(t[d>>2]|0,t[d+4>>2]|0,r,n,i,o,a,p)|0,d|0)break A;break}default:break A}switch(t[P>>2]=0,d=NA(e,A,5,P,T)|0,d|0){case 9:break;case 0:{if(d=T,d=ne(t[d>>2]|0,t[d+4>>2]|0,r,n,i,o,a,p)|0,d|0)break A;break}default:break A}switch(t[P>>2]=0,d=NA(e,A,4,P,T)|0,d|0){case 9:break;case 0:{if(d=T,d=ne(t[d>>2]|0,t[d+4>>2]|0,r,n,i,o,a,p)|0,d|0)break A;break}default:break A}switch(t[P>>2]=0,d=NA(e,A,6,P,T)|0,d|0){case 9:break;case 0:{if(d=T,d=ne(t[d>>2]|0,t[d+4>>2]|0,r,n,i,o,a,p)|0,d|0)break A;break}default:break A}return u0=0,L=W,u0|0}while(!1);return u0=d,L=W,u0|0}function NA(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0;if(r>>>0>6)return i=1,i|0;if(E=(t[n>>2]|0)%6|0,t[n>>2]=E,(E|0)>0){o=0;do r=We(r)|0,o=o+1|0;while((o|0)<(t[n>>2]|0))}if(E=C0(e|0,A|0,45)|0,S()|0,v=E&127,v>>>0>121)return i=5,i|0;d=KA(e,A)|0,o=C0(e|0,A|0,52)|0,S()|0,o=o&15;A:do if(!o)p=8;else{for(;;){if(a=(15-o|0)*3|0,c=C0(e|0,A|0,a|0)|0,S()|0,c=c&7,(c|0)==7){A=5;break}if(T=(ce(o)|0)==0,o=o+-1|0,I=x0(7,0,a|0)|0,A=A&~(S()|0),P=x0(t[(T?432:16)+(c*28|0)+(r<<2)>>2]|0,0,a|0)|0,a=S()|0,r=t[(T?640:224)+(c*28|0)+(r<<2)>>2]|0,e=P|e&~I,A=a|A,!r){r=0;break A}if(!o){p=8;break A}}return A|0}while(!1);(p|0)==8&&(T=t[848+(v*28|0)+(r<<2)>>2]|0,P=x0(T|0,0,45)|0,e=P|e,A=S()|0|A&-1040385,r=t[4272+(v*28|0)+(r<<2)>>2]|0,(T&127|0)==127&&(T=x0(t[848+(v*28|0)+20>>2]|0,0,45)|0,A=S()|0|A&-1040385,r=t[4272+(v*28|0)+20>>2]|0,e=Ge(T|e,A)|0,A=S()|0,t[n>>2]=(t[n>>2]|0)+1)),c=C0(e|0,A|0,45)|0,S()|0,c=c&127;A:do if(SA(c)|0){e:do if((KA(e,A)|0)==1){if((v|0)!=(c|0))if(t2(c,t[7696+(v*28|0)>>2]|0)|0){e=rr(e,A)|0,a=1,A=S()|0;break}else R0(27795,26864,533,26872);switch(d|0){case 3:{e=Ge(e,A)|0,A=S()|0,t[n>>2]=(t[n>>2]|0)+1,a=0;break e}case 5:{e=rr(e,A)|0,A=S()|0,t[n>>2]=(t[n>>2]|0)+5,a=0;break e}case 0:return T=9,T|0;default:return T=1,T|0}}else a=0;while(!1);if((r|0)>0){o=0;do e=tr(e,A)|0,A=S()|0,o=o+1|0;while((o|0)!=(r|0))}if((v|0)!=(c|0)){if(!(jt(c)|0)){if((a|0)!=0|(KA(e,A)|0)!=5)break;t[n>>2]=(t[n>>2]|0)+1;break}switch(E&127){case 8:case 118:break A}(KA(e,A)|0)!=3&&(t[n>>2]=(t[n>>2]|0)+1)}}else if((r|0)>0){o=0;do e=Ge(e,A)|0,A=S()|0,o=o+1|0;while((o|0)!=(r|0))}while(!1);return t[n>>2]=((t[n>>2]|0)+r|0)%6|0,T=i,t[T>>2]=e,t[T+4>>2]=A,T=0,T|0}function el(e,A,r,n){return e=e|0,A=A|0,r=r|0,n=n|0,Rn(e,A,r,n)|0?(_e(n|0,0,r*48|0)|0,n=tl(e,A,r,n)|0,n|0):(n=0,n|0)}function Rn(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0;if(T=L,L=L+16|0,I=T,P=T+8|0,E=I,t[E>>2]=e,t[E+4>>2]=A,(r|0)<0)return P=2,L=T,P|0;if(!r)return P=n,t[P>>2]=e,t[P+4>>2]=A,P=0,L=T,P|0;t[P>>2]=0;A:do if(MA(e,A)|0)e=9;else{i=0,E=e;do{if(e=NA(E,A,4,P,I)|0,e|0)break A;if(A=I,E=t[A>>2]|0,A=t[A+4>>2]|0,i=i+1|0,MA(E,A)|0){e=9;break A}}while((i|0)<(r|0));v=n,t[v>>2]=E,t[v+4>>2]=A,v=r+-1|0,p=0,e=1;do{if(i=26800+(p<<2)|0,(p|0)==5)for(a=t[i>>2]|0,o=0,i=e;;){if(e=I,e=NA(t[e>>2]|0,t[e+4>>2]|0,a,P,I)|0,e|0)break A;if((o|0)!=(v|0))if(d=I,c=t[d>>2]|0,d=t[d+4>>2]|0,e=n+(i<<3)|0,t[e>>2]=c,t[e+4>>2]=d,!(MA(c,d)|0))e=i+1|0;else{e=9;break A}else e=i;if(o=o+1|0,(o|0)>=(r|0))break;i=e}else for(a=I,d=t[i>>2]|0,c=0,i=e,o=t[a>>2]|0,a=t[a+4>>2]|0;;){if(e=NA(o,a,d,P,I)|0,e|0)break A;if(a=I,o=t[a>>2]|0,a=t[a+4>>2]|0,e=n+(i<<3)|0,t[e>>2]=o,t[e+4>>2]=a,e=i+1|0,MA(o,a)|0){e=9;break A}if(c=c+1|0,(c|0)>=(r|0))break;i=e}p=p+1|0}while(p>>>0<6);e=I,e=(E|0)==(t[e>>2]|0)&&(A|0)==(t[e+4>>2]|0)?0:9}while(!1);return P=e,L=T,P|0}function tl(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0;if(E=L,L=L+16|0,a=E,!r)return t[n>>2]=e,t[n+4>>2]=A,n=0,L=E,n|0;do if((r|0)>=0){if((r|0)>13780509){if(i=$1(15,a)|0,i|0)break;o=a,i=t[o>>2]|0,o=t[o+4>>2]|0}else i=((r|0)<0)<<31>>31,v=QA(r|0,i|0,3,0)|0,o=S()|0,i=G0(r|0,i|0,1,0)|0,i=QA(v|0,o|0,i|0,S()|0)|0,i=G0(i|0,S()|0,1,0)|0,o=S()|0,v=a,t[v>>2]=i,t[v+4>>2]=o;if(p=RA(i,8)|0,!p)i=13;else{if(v=RA(i,4)|0,!v){Y0(p),i=13;break}if(i=ne(e,A,r,p,v,i,o,0)|0,i|0){Y0(p),Y0(v);break}if(A=t[a>>2]|0,a=t[a+4>>2]|0,(a|0)>0|(a|0)==0&A>>>0>0){i=0,c=0,d=0;do e=p+(c<<3)|0,o=t[e>>2]|0,e=t[e+4>>2]|0,!((o|0)==0&(e|0)==0)&&(t[v+(c<<2)>>2]|0)==(r|0)&&(I=n+(i<<3)|0,t[I>>2]=o,t[I+4>>2]=e,i=i+1|0),c=G0(c|0,d|0,1,0)|0,d=S()|0;while((d|0)<(a|0)|(d|0)==(a|0)&c>>>0<A>>>0)}Y0(p),Y0(v),i=0}}else i=2;while(!1);return I=i,L=E,I|0}function Ut(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0;for(c=L,L=L+16|0,o=c,a=c+8|0,i=(MA(e,A)|0)==0,i=i?1:2;;){if(t[a>>2]=0,p=(NA(e,A,i,a,o)|0)==0,d=o,p&((t[d>>2]|0)==(r|0)?(t[d+4>>2]|0)==(n|0):0)){e=4;break}if(i=i+1|0,i>>>0>=7){i=7,e=4;break}}return(e|0)==4?(L=c,i|0):0}function rl(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0;if(c=L,L=L+48|0,i=c+16|0,o=c+8|0,a=c,r=k1(r)|0,r|0)return a=r,L=c,a|0;if(p=e,d=t[p+4>>2]|0,r=o,t[r>>2]=t[p>>2],t[r+4>>2]=d,z2(o,i),r=o2(i,A,a)|0,!r){if(A=t[o>>2]|0,o=t[e+8>>2]|0,(o|0)>0){i=t[e+12>>2]|0,r=0;do A=(t[i+(r<<3)>>2]|0)+A|0,r=r+1|0;while((r|0)<(o|0))}r=a,i=t[r>>2]|0,r=t[r+4>>2]|0,o=((A|0)<0)<<31>>31,(r|0)<(o|0)|(r|0)==(o|0)&i>>>0<A>>>0?(r=a,t[r>>2]=A,t[r+4>>2]=o,r=o):A=i,d=G0(A|0,r|0,12,0)|0,p=S()|0,r=a,t[r>>2]=d,t[r+4>>2]=p,r=n,t[r>>2]=d,t[r+4>>2]=p,r=0}return p=r,L=c,p|0}function A2(e,A,r,n,i,o,a){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0,o=o|0,a=a|0;var c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0,G=0,S0=0,$0=0,O0=0,iA=0,oA=0,pA=0,eA=0,W0=0,E0=0,fA=0,wA=0,sA=0,LA=0,YA=0,O2=0;if(wA=L,L=L+64|0,eA=wA+48|0,W0=wA+32|0,E0=wA+24|0,S0=wA+8|0,$0=wA,d=t[e>>2]|0,(d|0)<=0)return fA=0,L=wA,fA|0;for(O0=e+4|0,iA=eA+8|0,oA=W0+8|0,pA=S0+8|0,c=0,i0=0;;){p=t[O0>>2]|0,s0=p+(i0<<4)|0,t[eA>>2]=t[s0>>2],t[eA+4>>2]=t[s0+4>>2],t[eA+8>>2]=t[s0+8>>2],t[eA+12>>2]=t[s0+12>>2],(i0|0)==(d+-1|0)?(t[W0>>2]=t[p>>2],t[W0+4>>2]=t[p+4>>2],t[W0+8>>2]=t[p+8>>2],t[W0+12>>2]=t[p+12>>2]):(s0=p+(i0+1<<4)|0,t[W0>>2]=t[s0>>2],t[W0+4>>2]=t[s0+4>>2],t[W0+8>>2]=t[s0+8>>2],t[W0+12>>2]=t[s0+12>>2]),d=pl(eA,W0,n,E0)|0;A:do if(d)p=0,c=d;else if(d=E0,p=t[d>>2]|0,d=t[d+4>>2]|0,(d|0)>0|(d|0)==0&p>>>0>0){u0=0,s0=0;e:for(;;){if(LA=1/(+(p>>>0)+4294967296*+(d|0)),O2=+M[eA>>3],d=ZA(p|0,d|0,u0|0,s0|0)|0,YA=+(d>>>0)+4294967296*+(S()|0),sA=+(u0>>>0)+4294967296*+(s0|0),M[S0>>3]=LA*(O2*YA)+LA*(+M[W0>>3]*sA),M[pA>>3]=LA*(+M[iA>>3]*YA)+LA*(+M[oA>>3]*sA),d=nr(S0,n,$0)|0,d|0){c=d;break}R=$0,W=t[R>>2]|0,R=t[R+4>>2]|0,I=o1(W|0,R|0,A|0,r|0)|0,v=S()|0,d=a+(I<<3)|0,E=d,p=t[E>>2]|0,E=t[E+4>>2]|0;t:do if((p|0)==0&(E|0)==0)G=d,fA=16;else for(P=0,T=0;;){if((P|0)>(r|0)|(P|0)==(r|0)&T>>>0>A>>>0){c=1;break e}if((p|0)==(W|0)&(E|0)==(R|0))break t;if(d=G0(I|0,v|0,1,0)|0,I=i1(d|0,S()|0,A|0,r|0)|0,v=S()|0,T=G0(T|0,P|0,1,0)|0,P=S()|0,d=a+(I<<3)|0,E=d,p=t[E>>2]|0,E=t[E+4>>2]|0,(p|0)==0&(E|0)==0){G=d,fA=16;break}}while(!1);if((fA|0)==16&&(fA=0,!((W|0)==0&(R|0)==0))&&(T=G,t[T>>2]=W,t[T+4>>2]=R,T=o+(t[i>>2]<<3)|0,t[T>>2]=W,t[T+4>>2]=R,T=i,T=G0(t[T>>2]|0,t[T+4>>2]|0,1,0)|0,W=S()|0,R=i,t[R>>2]=T,t[R+4>>2]=W),u0=G0(u0|0,s0|0,1,0)|0,s0=S()|0,d=E0,p=t[d>>2]|0,d=t[d+4>>2]|0,!((d|0)>(s0|0)|(d|0)==(s0|0)&p>>>0>u0>>>0)){p=1;break A}}p=0}else p=1;while(!1);if(i0=i0+1|0,!p){fA=21;break}if(d=t[e>>2]|0,(i0|0)>=(d|0)){c=0,fA=21;break}}return(fA|0)==21?(L=wA,c|0):0}function nl(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0,G=0,S0=0,$0=0,O0=0,iA=0,oA=0,pA=0,eA=0,W0=0,E0=0,fA=0,wA=0,sA=0,LA=0,YA=0;if(YA=L,L=L+112|0,fA=YA+80|0,d=YA+72|0,wA=YA,sA=YA+56|0,i=k1(r)|0,i|0)return LA=i,L=YA,LA|0;if(p=e+8|0,LA=ve((t[p>>2]<<5)+32|0)|0,!LA)return LA=13,L=YA,LA|0;if(ur(e,LA),i=k1(r)|0,!i){if(W0=e,E0=t[W0+4>>2]|0,i=d,t[i>>2]=t[W0>>2],t[i+4>>2]=E0,z2(d,fA),i=o2(fA,A,wA)|0,i)W0=0,E0=0;else{if(i=t[d>>2]|0,o=t[p>>2]|0,(o|0)>0){a=t[e+12>>2]|0,r=0;do i=(t[a+(r<<3)>>2]|0)+i|0,r=r+1|0;while((r|0)!=(o|0));r=i}else r=i;i=wA,o=t[i>>2]|0,i=t[i+4>>2]|0,a=((r|0)<0)<<31>>31,(i|0)<(a|0)|(i|0)==(a|0)&o>>>0<r>>>0?(i=wA,t[i>>2]=r,t[i+4>>2]=a,i=a):r=o,W0=G0(r|0,i|0,12,0)|0,E0=S()|0,i=wA,t[i>>2]=W0,t[i+4>>2]=E0,i=0}if(!i){if(r=RA(W0,8)|0,!r)return Y0(LA),LA=13,L=YA,LA|0;if(c=RA(W0,8)|0,!c)return Y0(LA),Y0(r),LA=13,L=YA,LA|0;pA=fA,t[pA>>2]=0,t[pA+4>>2]=0,pA=e,eA=t[pA+4>>2]|0,i=d,t[i>>2]=t[pA>>2],t[i+4>>2]=eA,i=A2(d,W0,E0,A,fA,r,c)|0;A:do if(i)Y0(r),Y0(c),Y0(LA);else{e:do if((t[p>>2]|0)>0){for(a=e+12|0,o=0;i=A2((t[a>>2]|0)+(o<<3)|0,W0,E0,A,fA,r,c)|0,o=o+1|0,!(i|0);)if((o|0)>=(t[p>>2]|0))break e;Y0(r),Y0(c),Y0(LA);break A}while(!1);(E0|0)>0|(E0|0)==0&W0>>>0>0&&_e(c|0,0,W0<<3|0)|0,eA=fA,pA=t[eA+4>>2]|0;e:do if((pA|0)>0|(pA|0)==0&(t[eA>>2]|0)>>>0>0){O0=r,iA=c,oA=r,pA=c,eA=r,i=r,G=r,S0=c,$0=c,r=c;t:for(;;){for(R=0,u0=0,s0=0,i0=0,o=0,a=0;;){c=wA,d=c+56|0;do t[c>>2]=0,c=c+4|0;while((c|0)<(d|0));if(A=O0+(R<<3)|0,p=t[A>>2]|0,A=t[A+4>>2]|0,be(p,A,1,wA,0)|0){c=wA,d=c+56|0;do t[c>>2]=0,c=c+4|0;while((c|0)<(d|0));c=RA(7,4)|0,c|0&&(ne(p,A,1,wA,c,7,0,0)|0,Y0(c))}for(W=0;;){T=wA+(W<<3)|0,P=t[T>>2]|0,T=t[T+4>>2]|0;r:do if((P|0)==0&(T|0)==0)c=o,d=a;else{if(v=o1(P|0,T|0,W0|0,E0|0)|0,p=S()|0,c=n+(v<<3)|0,A=c,d=t[A>>2]|0,A=t[A+4>>2]|0,!((d|0)==0&(A|0)==0)){E=0,I=0;do{if((E|0)>(E0|0)|(E|0)==(E0|0)&I>>>0>W0>>>0)break t;if((d|0)==(P|0)&(A|0)==(T|0)){c=o,d=a;break r}c=G0(v|0,p|0,1,0)|0,v=i1(c|0,S()|0,W0|0,E0|0)|0,p=S()|0,I=G0(I|0,E|0,1,0)|0,E=S()|0,c=n+(v<<3)|0,A=c,d=t[A>>2]|0,A=t[A+4>>2]|0}while(!((d|0)==0&(A|0)==0))}if((P|0)==0&(T|0)==0){c=o,d=a;break}Ye(P,T,sA)|0,fr(e,LA,sA)|0&&(I=G0(o|0,a|0,1,0)|0,a=S()|0,E=c,t[E>>2]=P,t[E+4>>2]=T,o=iA+(o<<3)|0,t[o>>2]=P,t[o+4>>2]=T,o=I),c=o,d=a}while(!1);if(W=W+1|0,W>>>0>=7)break;o=c,a=d}if(R=G0(R|0,u0|0,1,0)|0,u0=S()|0,s0=G0(s0|0,i0|0,1,0)|0,i0=S()|0,a=fA,o=t[a>>2]|0,a=t[a+4>>2]|0,(i0|0)<(a|0)|(i0|0)==(a|0)&s0>>>0<o>>>0)o=c,a=d;else break}if((a|0)>0|(a|0)==0&o>>>0>0){o=0,a=0;do i0=O0+(o<<3)|0,t[i0>>2]=0,t[i0+4>>2]=0,o=G0(o|0,a|0,1,0)|0,a=S()|0,i0=fA,s0=t[i0+4>>2]|0;while((a|0)<(s0|0)|((a|0)==(s0|0)?o>>>0<(t[i0>>2]|0)>>>0:0))}if(i0=fA,t[i0>>2]=c,t[i0+4>>2]=d,(d|0)>0|(d|0)==0&c>>>0>0)W=r,R=$0,u0=eA,s0=S0,i0=iA,r=G,$0=i,S0=oA,G=W,i=R,eA=pA,pA=u0,oA=s0,iA=O0,O0=i0;else break e}Y0(oA),Y0(pA),Y0(LA),i=1;break A}else i=c;while(!1);Y0(LA),Y0(r),Y0(i),i=0}while(!1);return LA=i,L=YA,LA|0}}return Y0(LA),LA=i,L=YA,LA|0}function il(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(v=L,L=L+176|0,d=v,(A|0)<1)return _2(r,0,0),p=0,L=v,p|0;for(c=e,c=C0(t[c>>2]|0,t[c+4>>2]|0,52)|0,S()|0,_2(r,(A|0)>6?A:6,c&15),c=0;n=e+(c<<3)|0,n=r1(t[n>>2]|0,t[n+4>>2]|0,d)|0,!(n|0);){if(n=t[d>>2]|0,(n|0)>0){a=0;do o=d+8+(a<<4)|0,a=a+1|0,n=d+8+(((a|0)%(n|0)|0)<<4)|0,i=_3(r,n,o)|0,i?T2(r,i)|0:V3(r,o,n)|0,n=t[d>>2]|0;while((a|0)<(n|0))}if(c=c+1|0,(c|0)>=(A|0)){n=0,p=13;break}}return(p|0)==13?(L=v,n|0):(I2(r),p=n,L=v,p|0)}function ol(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0;if(o=L,L=L+32|0,n=o,i=o+16|0,e=il(e,A,i)|0,e|0)return r=e,L=o,r|0;if(t[r>>2]=0,t[r+4>>2]=0,t[r+8>>2]=0,e=P2(i)|0,e|0)do{A=a3(r)|0;do c3(A,e)|0,a=e+16|0,t[n>>2]=t[a>>2],t[n+4>>2]=t[a+4>>2],t[n+8>>2]=t[a+8>>2],t[n+12>>2]=t[a+12>>2],T2(i,e)|0,e=I3(i,n)|0;while((e|0)!=0);e=P2(i)|0}while((e|0)!=0);return I2(i),e=u3(r)|0,e?(k2(r),a=e,L=o,a|0):(a=0,L=o,a|0)}function SA(e){return e=e|0,e>>>0>121?(e=0,e|0):(e=t[7696+(e*28|0)+16>>2]|0,e|0)}function jt(e){return e=e|0,(e|0)==4|(e|0)==117|0}function e2(e){return e=e|0,t[11120+((t[e>>2]|0)*216|0)+((t[e+4>>2]|0)*72|0)+((t[e+8>>2]|0)*24|0)+(t[e+12>>2]<<3)>>2]|0}function sl(e){return e=e|0,t[11120+((t[e>>2]|0)*216|0)+((t[e+4>>2]|0)*72|0)+((t[e+8>>2]|0)*24|0)+(t[e+12>>2]<<3)+4>>2]|0}function ll(e,A){e=e|0,A=A|0,e=7696+(e*28|0)|0,t[A>>2]=t[e>>2],t[A+4>>2]=t[e+4>>2],t[A+8>>2]=t[e+8>>2],t[A+12>>2]=t[e+12>>2]}function al(e,A){e=e|0,A=A|0;var r=0,n=0;if(A>>>0>20)return A=-1,A|0;do if((t[11120+(A*216|0)>>2]|0)!=(e|0))if((t[11120+(A*216|0)+8>>2]|0)!=(e|0))if((t[11120+(A*216|0)+16>>2]|0)!=(e|0))if((t[11120+(A*216|0)+24>>2]|0)!=(e|0))if((t[11120+(A*216|0)+32>>2]|0)!=(e|0))if((t[11120+(A*216|0)+40>>2]|0)!=(e|0))if((t[11120+(A*216|0)+48>>2]|0)!=(e|0))if((t[11120+(A*216|0)+56>>2]|0)!=(e|0))if((t[11120+(A*216|0)+64>>2]|0)!=(e|0))if((t[11120+(A*216|0)+72>>2]|0)!=(e|0))if((t[11120+(A*216|0)+80>>2]|0)!=(e|0))if((t[11120+(A*216|0)+88>>2]|0)!=(e|0))if((t[11120+(A*216|0)+96>>2]|0)!=(e|0))if((t[11120+(A*216|0)+104>>2]|0)!=(e|0))if((t[11120+(A*216|0)+112>>2]|0)!=(e|0))if((t[11120+(A*216|0)+120>>2]|0)!=(e|0))if((t[11120+(A*216|0)+128>>2]|0)!=(e|0))if((t[11120+(A*216|0)+136>>2]|0)==(e|0))e=2,r=1,n=2;else{if((t[11120+(A*216|0)+144>>2]|0)==(e|0)){e=0,r=2,n=0;break}if((t[11120+(A*216|0)+152>>2]|0)==(e|0)){e=0,r=2,n=1;break}if((t[11120+(A*216|0)+160>>2]|0)==(e|0)){e=0,r=2,n=2;break}if((t[11120+(A*216|0)+168>>2]|0)==(e|0)){e=1,r=2,n=0;break}if((t[11120+(A*216|0)+176>>2]|0)==(e|0)){e=1,r=2,n=1;break}if((t[11120+(A*216|0)+184>>2]|0)==(e|0)){e=1,r=2,n=2;break}if((t[11120+(A*216|0)+192>>2]|0)==(e|0)){e=2,r=2,n=0;break}if((t[11120+(A*216|0)+200>>2]|0)==(e|0)){e=2,r=2,n=1;break}if((t[11120+(A*216|0)+208>>2]|0)==(e|0)){e=2,r=2,n=2;break}else e=-1;return e|0}else e=2,r=1,n=1;else e=2,r=1,n=0;else e=1,r=1,n=2;else e=1,r=1,n=1;else e=1,r=1,n=0;else e=0,r=1,n=2;else e=0,r=1,n=1;else e=0,r=1,n=0;else e=2,r=0,n=2;else e=2,r=0,n=1;else e=2,r=0,n=0;else e=1,r=0,n=2;else e=1,r=0,n=1;else e=1,r=0,n=0;else e=0,r=0,n=2;else e=0,r=0,n=1;else e=0,r=0,n=0;while(!1);return A=t[11120+(A*216|0)+(r*72|0)+(e*24|0)+(n<<3)+4>>2]|0,A|0}function t2(e,A){return e=e|0,A=A|0,(t[7696+(e*28|0)+20>>2]|0)==(A|0)?(A=1,A|0):(A=(t[7696+(e*28|0)+24>>2]|0)==(A|0),A|0)}function $t(e,A){return e=e|0,A=A|0,t[848+(e*28|0)+(A<<2)>>2]|0}function Wt(e,A){return e=e|0,A=A|0,(t[848+(e*28|0)>>2]|0)==(A|0)?(A=0,A|0):(t[848+(e*28|0)+4>>2]|0)==(A|0)?(A=1,A|0):(t[848+(e*28|0)+8>>2]|0)==(A|0)?(A=2,A|0):(t[848+(e*28|0)+12>>2]|0)==(A|0)?(A=3,A|0):(t[848+(e*28|0)+16>>2]|0)==(A|0)?(A=4,A|0):(t[848+(e*28|0)+20>>2]|0)==(A|0)?(A=5,A|0):((t[848+(e*28|0)+24>>2]|0)==(A|0)?6:7)|0}function cl(){return 122}function ul(e){e=e|0;var A=0,r=0,n=0;A=0;do x0(A|0,0,45)|0,n=S()|0|134225919,r=e+(A<<3)|0,t[r>>2]=-1,t[r+4>>2]=n,A=A+1|0;while((A|0)!=122);return 0}function fl(e){e=e|0;var A=0,r=0,n=0;return n=+M[e+16>>3],r=+M[e+24>>3],A=n-r,+(n<r?A+6.283185307179586:A)}function r2(e){return e=e|0,+M[e+16>>3]<+M[e+24>>3]|0}function dl(e){return e=e|0,+(+M[e>>3]-+M[e+8>>3])}function Gt(e,A){e=e|0,A=A|0;var r=0,n=0,i=0;return r=+M[A>>3],!(r>=+M[e+8>>3])||!(r<=+M[e>>3])?(A=0,A|0):(n=+M[e+16>>3],r=+M[e+24>>3],i=+M[A+8>>3],A=i>=r,e=i<=n&1,n<r?A&&(e=1):A||(e=0),A=(e|0)!=0,A|0)}function Yt(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;return+M[e>>3]<+M[A+8>>3]||+M[e+8>>3]>+M[A>>3]?(n=0,n|0):(o=+M[e+16>>3],r=e+24|0,v=+M[r>>3],a=o<v,n=A+16|0,p=+M[n>>3],i=A+24|0,d=+M[i>>3],c=p<d,A=v-p<d-o,e=a?c|A?1:2:0,A=c?a?1:A?2:1:0,o=+ie(o,e),o<+ie(+M[i>>3],A)||(v=+ie(+M[r>>3],e),v>+ie(+M[n>>3],A))?(c=0,c|0):(c=1,c|0))}function hl(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0;o=+M[e+16>>3],d=+M[e+24>>3],e=o<d,c=+M[A+16>>3],a=+M[A+24>>3],i=c<a,A=d-c<a-o,t[r>>2]=e?i|A?1:2:0,t[n>>2]=i?e?1:A?2:1:0}function n2(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;return+M[e>>3]<+M[A>>3]||+M[e+8>>3]>+M[A+8>>3]?(n=0,n|0):(n=e+16|0,d=+M[n>>3],o=+M[e+24>>3],a=d<o,r=A+16|0,v=+M[r>>3],i=A+24|0,p=+M[i>>3],c=v<p,A=o-v<p-d,e=a?c|A?1:2:0,A=c?a?1:A?2:1:0,o=+ie(o,e),o<=+ie(+M[i>>3],A)?(v=+ie(+M[n>>3],e),c=v>=+ie(+M[r>>3],A),c|0):(c=0,c|0))}function i2(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0;i=L,L=L+176|0,n=i,t[n>>2]=4,c=+M[A>>3],M[n+8>>3]=c,o=+M[A+16>>3],M[n+16>>3]=o,M[n+24>>3]=c,c=+M[A+24>>3],M[n+32>>3]=c,a=+M[A+8>>3],M[n+40>>3]=a,M[n+48>>3]=c,M[n+56>>3]=a,M[n+64>>3]=o,A=n+72|0,r=A+96|0;do t[A>>2]=0,A=A+4|0;while((A|0)<(r|0));s1(e|0,n|0,168)|0,L=i}function o2(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0;T=L,L=L+288|0,v=T+264|0,E=T+96|0,p=T,c=p,d=c+96|0;do t[c>>2]=0,c=c+4|0;while((c|0)<(d|0));return A=or(A,p)|0,A|0?(P=A,L=T,P|0):(d=p,p=t[d>>2]|0,d=t[d+4>>2]|0,Ye(p,d,v)|0,r1(p,d,E)|0,a=+w1(v,E+8|0),M[v>>3]=+M[e>>3],d=v+8|0,M[d>>3]=+M[e+16>>3],M[E>>3]=+M[e+8>>3],p=E+8|0,M[p>>3]=+M[e+24>>3],i=+w1(v,E),R=+M[d>>3]-+M[p>>3],o=+aA(+R),W=+M[v>>3]-+M[E>>3],n=+aA(+W),!(R==0|W==0)&&(R=+Z2(+o,+n),R=+de(+(i*i/+Y1(+(R/+Y1(+o,+n)),3)/(a*(a*2.59807621135)*.8))),M[hA>>3]=R,I=~~R>>>0,P=+aA(R)>=1?R>0?~~+Ue(+BA(R/4294967296),4294967295)>>>0:~~+de((R-+(~~R>>>0))/4294967296)>>>0:0,(t[hA+4>>2]&2146435072|0)!=2146435072)?(E=(I|0)==0&(P|0)==0,A=r,t[A>>2]=E?1:I,t[A+4>>2]=E?0:P,A=0):A=1,P=A,L=T,P|0)}function pl(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0;p=L,L=L+288|0,a=p+264|0,c=p+96|0,d=p,i=d,o=i+96|0;do t[i>>2]=0,i=i+4|0;while((i|0)<(o|0));return r=or(r,d)|0,r|0?(n=r,L=p,n|0):(r=d,i=t[r>>2]|0,r=t[r+4>>2]|0,Ye(i,r,a)|0,r1(i,r,c)|0,v=+w1(a,c+8|0),v=+de(+(+w1(e,A)/(v*2))),M[hA>>3]=v,r=~~v>>>0,i=+aA(v)>=1?v>0?~~+Ue(+BA(v/4294967296),4294967295)>>>0:~~+de((v-+(~~v>>>0))/4294967296)>>>0:0,(t[hA+4>>2]&2146435072|0)==2146435072?(n=1,L=p,n|0):(d=(r|0)==0&(i|0)==0,t[n>>2]=d?1:r,t[n+4>>2]=d?0:i,n=0,L=p,n|0))}function gl(e,A){e=e|0,A=+A;var r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;o=e+16|0,a=+M[o>>3],r=e+24|0,i=+M[r>>3],n=a-i,n=a<i?n+6.283185307179586:n,p=+M[e>>3],c=e+8|0,d=+M[c>>3],v=p-d,n=(n*A-n)*.5,A=(v*A-v)*.5,p=p+A,M[e>>3]=p>1.5707963267948966?1.5707963267948966:p,A=d-A,M[c>>3]=A<-1.5707963267948966?-1.5707963267948966:A,A=a+n,A=A>3.141592653589793?A+-6.283185307179586:A,M[o>>3]=A<-3.141592653589793?A+6.283185307179586:A,A=i-n,A=A>3.141592653589793?A+-6.283185307179586:A,M[r>>3]=A<-3.141592653589793?A+6.283185307179586:A}function yl(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0,t[e>>2]=A,t[e+4>>2]=r,t[e+8>>2]=n}function ml(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0;E=A+8|0,t[E>>2]=0,d=+M[e>>3],a=+aA(+d),p=+M[e+8>>3],c=+aA(+p)*1.1547005383792515,a=a+c*.5,r=~~a,e=~~c,a=a-+(r|0),c=c-+(e|0);do if(a<.5)if(a<.3333333333333333)if(t[A>>2]=r,c<(a+1)*.5){t[A+4>>2]=e;break}else{e=e+1|0,t[A+4>>2]=e;break}else if(I=1-a,e=(!(c<I)&1)+e|0,t[A+4>>2]=e,I<=c&c<a*2){r=r+1|0,t[A>>2]=r;break}else{t[A>>2]=r;break}else{if(!(a<.6666666666666666))if(r=r+1|0,t[A>>2]=r,c<a*.5){t[A+4>>2]=e;break}else{e=e+1|0,t[A+4>>2]=e;break}if(c<1-a){if(t[A+4>>2]=e,a*2+-1<c){t[A>>2]=r;break}}else e=e+1|0,t[A+4>>2]=e;r=r+1|0,t[A>>2]=r}while(!1);do if(d<0)if(e&1){v=(e+1|0)/2|0,v=ZA(r|0,((r|0)<0)<<31>>31|0,v|0,((v|0)<0)<<31>>31|0)|0,r=~~(+(r|0)-((+(v>>>0)+4294967296*+(S()|0))*2+1)),t[A>>2]=r;break}else{v=(e|0)/2|0,v=ZA(r|0,((r|0)<0)<<31>>31|0,v|0,((v|0)<0)<<31>>31|0)|0,r=~~(+(r|0)-(+(v>>>0)+4294967296*+(S()|0))*2),t[A>>2]=r;break}while(!1);v=A+4|0,p<0&&(r=r-((e<<1|1|0)/2|0)|0,t[A>>2]=r,e=0-e|0,t[v>>2]=e),n=e-r|0,(r|0)<0?(i=0-r|0,t[v>>2]=n,t[E>>2]=i,t[A>>2]=0,e=n,r=0):i=0,(e|0)<0&&(r=r-e|0,t[A>>2]=r,i=i-e|0,t[E>>2]=i,t[v>>2]=0,e=0),o=r-i|0,n=e-i|0,(i|0)<0&&(t[A>>2]=o,t[v>>2]=n,t[E>>2]=0,e=n,r=o,i=0),n=(e|0)<(r|0)?e:r,n=(i|0)<(n|0)?i:n,!((n|0)<=0)&&(t[A>>2]=r-n,t[v>>2]=e-n,t[E>>2]=i-n)}function $A(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0;A=t[e>>2]|0,a=e+4|0,r=t[a>>2]|0,(A|0)<0&&(r=r-A|0,t[a>>2]=r,o=e+8|0,t[o>>2]=(t[o>>2]|0)-A,t[e>>2]=0,A=0),(r|0)<0?(A=A-r|0,t[e>>2]=A,o=e+8|0,i=(t[o>>2]|0)-r|0,t[o>>2]=i,t[a>>2]=0,r=0):(i=e+8|0,o=i,i=t[i>>2]|0),(i|0)<0&&(A=A-i|0,t[e>>2]=A,r=r-i|0,t[a>>2]=r,t[o>>2]=0,i=0),n=(r|0)<(A|0)?r:A,n=(i|0)<(n|0)?i:n,!((n|0)<=0)&&(t[e>>2]=A-n,t[a>>2]=r-n,t[o>>2]=i-n)}function je(e,A){e=e|0,A=A|0;var r=0,n=0;n=t[e+8>>2]|0,r=+((t[e+4>>2]|0)-n|0),M[A>>3]=+((t[e>>2]|0)-n|0)-r*.5,M[A+8>>3]=r*.8660254037844386}function GA(e,A,r){e=e|0,A=A|0,r=r|0,t[r>>2]=(t[A>>2]|0)+(t[e>>2]|0),t[r+4>>2]=(t[A+4>>2]|0)+(t[e+4>>2]|0),t[r+8>>2]=(t[A+8>>2]|0)+(t[e+8>>2]|0)}function qt(e,A,r){e=e|0,A=A|0,r=r|0,t[r>>2]=(t[e>>2]|0)-(t[A>>2]|0),t[r+4>>2]=(t[e+4>>2]|0)-(t[A+4>>2]|0),t[r+8>>2]=(t[e+8>>2]|0)-(t[A+8>>2]|0)}function s2(e,A){e=e|0,A=A|0;var r=0,n=0;r=WA(t[e>>2]|0,A)|0,t[e>>2]=r,r=e+4|0,n=WA(t[r>>2]|0,A)|0,t[r>>2]=n,e=e+8|0,A=WA(t[e>>2]|0,A)|0,t[e>>2]=A}function Q1(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0;a=t[e>>2]|0,c=(a|0)<0,n=(t[e+4>>2]|0)-(c?a:0)|0,o=(n|0)<0,i=(o?0-n|0:0)+((t[e+8>>2]|0)-(c?a:0))|0,r=(i|0)<0,e=r?0:i,A=(o?0:n)-(r?i:0)|0,i=(c?0:a)-(o?n:0)-(r?i:0)|0,r=(A|0)<(i|0)?A:i,r=(e|0)<(r|0)?e:r,n=(r|0)>0,e=e-(n?r:0)|0,A=A-(n?r:0)|0;A:do switch(i-(n?r:0)|0){case 0:switch(A|0){case 0:return c=(e|0)==0?0:(e|0)==1?1:7,c|0;case 1:return c=(e|0)==0?2:(e|0)==1?3:7,c|0;default:break A}case 1:switch(A|0){case 0:return c=(e|0)==0?4:(e|0)==1?5:7,c|0;case 1:{if(!e)e=6;else break A;return e|0}default:break A}}while(!1);return c=7,c|0}function Cl(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0;if(d=e+8|0,a=t[d>>2]|0,c=(t[e>>2]|0)-a|0,p=e+4|0,a=(t[p>>2]|0)-a|0,c>>>0>715827881|a>>>0>715827881){if(n=(c|0)>0,i=2147483647-c|0,o=-2147483648-c|0,(n?(i|0)<(c|0):(o|0)>(c|0))||(r=c<<1,n?(2147483647-r|0)<(c|0):(-2147483648-r|0)>(c|0))||((a|0)>0?(2147483647-a|0)<(a|0):(-2147483648-a|0)>(a|0))||(A=c*3|0,r=a<<1,(n?(i|0)<(r|0):(o|0)>(r|0))||((c|0)>-1?(A|-2147483648|0)>=(a|0):(A^-2147483648|0)<(a|0))))return p=1,p|0}else r=a<<1,A=c*3|0;return n=Be(+(A-a|0)*.14285714285714285)|0,t[e>>2]=n,i=Be(+(r+c|0)*.14285714285714285)|0,t[p>>2]=i,t[d>>2]=0,r=(i|0)<(n|0),A=r?n:i,r=r?i:n,(r|0)<0&&(((r|0)==-2147483648||((A|0)>0?(2147483647-A|0)<(r|0):(-2147483648-A|0)>(r|0)))&&R0(27795,26892,354,26903),((A|0)>-1?(A|-2147483648|0)>=(r|0):(A^-2147483648|0)<(r|0))&&R0(27795,26892,354,26903)),A=i-n|0,(n|0)<0?(r=0-n|0,t[p>>2]=A,t[d>>2]=r,t[e>>2]=0,n=0):(A=i,r=0),(A|0)<0&&(n=n-A|0,t[e>>2]=n,r=r-A|0,t[d>>2]=r,t[p>>2]=0,A=0),o=n-r|0,i=A-r|0,(r|0)<0?(t[e>>2]=o,t[p>>2]=i,t[d>>2]=0,A=i,i=o,r=0):i=n,n=(A|0)<(i|0)?A:i,n=(r|0)<(n|0)?r:n,(n|0)<=0?(p=0,p|0):(t[e>>2]=i-n,t[p>>2]=A-n,t[d>>2]=r-n,p=0,p|0)}function vl(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0,d=0;if(a=e+8|0,i=t[a>>2]|0,o=(t[e>>2]|0)-i|0,c=e+4|0,i=(t[c>>2]|0)-i|0,o>>>0>715827881|i>>>0>715827881){if(r=(o|0)>0,(r?(2147483647-o|0)<(o|0):(-2147483648-o|0)>(o|0))||(A=o<<1,n=(i|0)>0,n?(2147483647-i|0)<(i|0):(-2147483648-i|0)>(i|0)))return c=1,c|0;if(d=i<<1,(n?(2147483647-d|0)<(i|0):(-2147483648-d|0)>(i|0))||(r?(2147483647-A|0)<(i|0):(-2147483648-A|0)>(i|0))||(r=i*3|0,(i|0)>-1?(r|-2147483648|0)>=(o|0):(r^-2147483648|0)<(o|0)))return d=1,d|0}else r=i*3|0,A=o<<1;return n=Be(+(A+i|0)*.14285714285714285)|0,t[e>>2]=n,i=Be(+(r-o|0)*.14285714285714285)|0,t[c>>2]=i,t[a>>2]=0,r=(i|0)<(n|0),A=r?n:i,r=r?i:n,(r|0)<0&&(((r|0)==-2147483648||((A|0)>0?(2147483647-A|0)<(r|0):(-2147483648-A|0)>(r|0)))&&R0(27795,26892,402,26917),((A|0)>-1?(A|-2147483648|0)>=(r|0):(A^-2147483648|0)<(r|0))&&R0(27795,26892,402,26917)),A=i-n|0,(n|0)<0?(r=0-n|0,t[c>>2]=A,t[a>>2]=r,t[e>>2]=0,n=0):(A=i,r=0),(A|0)<0&&(n=n-A|0,t[e>>2]=n,r=r-A|0,t[a>>2]=r,t[c>>2]=0,A=0),o=n-r|0,i=A-r|0,(r|0)<0?(t[e>>2]=o,t[c>>2]=i,t[a>>2]=0,A=i,i=o,r=0):i=n,n=(A|0)<(i|0)?A:i,n=(r|0)<(n|0)?r:n,(n|0)<=0?(d=0,d|0):(t[e>>2]=i-n,t[c>>2]=A-n,t[a>>2]=r-n,d=0,d|0)}function bl(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0;a=e+8|0,r=t[a>>2]|0,A=(t[e>>2]|0)-r|0,c=e+4|0,r=(t[c>>2]|0)-r|0,n=Be(+((A*3|0)-r|0)*.14285714285714285)|0,t[e>>2]=n,A=Be(+((r<<1)+A|0)*.14285714285714285)|0,t[c>>2]=A,t[a>>2]=0,r=A-n|0,(n|0)<0?(o=0-n|0,t[c>>2]=r,t[a>>2]=o,t[e>>2]=0,A=r,n=0,r=o):r=0,(A|0)<0&&(n=n-A|0,t[e>>2]=n,r=r-A|0,t[a>>2]=r,t[c>>2]=0,A=0),o=n-r|0,i=A-r|0,(r|0)<0?(t[e>>2]=o,t[c>>2]=i,t[a>>2]=0,A=i,i=o,r=0):i=n,n=(A|0)<(i|0)?A:i,n=(r|0)<(n|0)?r:n,!((n|0)<=0)&&(t[e>>2]=i-n,t[c>>2]=A-n,t[a>>2]=r-n)}function l2(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0;a=e+8|0,r=t[a>>2]|0,A=(t[e>>2]|0)-r|0,c=e+4|0,r=(t[c>>2]|0)-r|0,n=Be(+((A<<1)+r|0)*.14285714285714285)|0,t[e>>2]=n,A=Be(+((r*3|0)-A|0)*.14285714285714285)|0,t[c>>2]=A,t[a>>2]=0,r=A-n|0,(n|0)<0?(o=0-n|0,t[c>>2]=r,t[a>>2]=o,t[e>>2]=0,A=r,n=0,r=o):r=0,(A|0)<0&&(n=n-A|0,t[e>>2]=n,r=r-A|0,t[a>>2]=r,t[c>>2]=0,A=0),o=n-r|0,i=A-r|0,(r|0)<0?(t[e>>2]=o,t[c>>2]=i,t[a>>2]=0,A=i,i=o,r=0):i=n,n=(A|0)<(i|0)?A:i,n=(r|0)<(n|0)?r:n,!((n|0)<=0)&&(t[e>>2]=i-n,t[c>>2]=A-n,t[a>>2]=r-n)}function O1(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0;A=t[e>>2]|0,a=e+4|0,r=t[a>>2]|0,c=e+8|0,n=t[c>>2]|0,i=r+(A*3|0)|0,t[e>>2]=i,r=n+(r*3|0)|0,t[a>>2]=r,A=(n*3|0)+A|0,t[c>>2]=A,n=r-i|0,(i|0)<0?(A=A-i|0,t[a>>2]=n,t[c>>2]=A,t[e>>2]=0,r=n,n=0):n=i,(r|0)<0&&(n=n-r|0,t[e>>2]=n,A=A-r|0,t[c>>2]=A,t[a>>2]=0,r=0),o=n-A|0,i=r-A|0,(A|0)<0?(t[e>>2]=o,t[a>>2]=i,t[c>>2]=0,n=o,A=0):i=r,r=(i|0)<(n|0)?i:n,r=(A|0)<(r|0)?A:r,!((r|0)<=0)&&(t[e>>2]=n-r,t[a>>2]=i-r,t[c>>2]=A-r)}function $e(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0;i=t[e>>2]|0,a=e+4|0,A=t[a>>2]|0,c=e+8|0,r=t[c>>2]|0,n=(A*3|0)+i|0,i=r+(i*3|0)|0,t[e>>2]=i,t[a>>2]=n,A=(r*3|0)+A|0,t[c>>2]=A,r=n-i|0,(i|0)<0?(A=A-i|0,t[a>>2]=r,t[c>>2]=A,t[e>>2]=0,i=0):r=n,(r|0)<0&&(i=i-r|0,t[e>>2]=i,A=A-r|0,t[c>>2]=A,t[a>>2]=0,r=0),o=i-A|0,n=r-A|0,(A|0)<0?(t[e>>2]=o,t[a>>2]=n,t[c>>2]=0,i=o,A=0):n=r,r=(n|0)<(i|0)?n:i,r=(A|0)<(r|0)?A:r,!((r|0)<=0)&&(t[e>>2]=i-r,t[a>>2]=n-r,t[c>>2]=A-r)}function a2(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0;(A+-1|0)>>>0>=6||(i=(t[15440+(A*12|0)>>2]|0)+(t[e>>2]|0)|0,t[e>>2]=i,c=e+4|0,n=(t[15440+(A*12|0)+4>>2]|0)+(t[c>>2]|0)|0,t[c>>2]=n,a=e+8|0,A=(t[15440+(A*12|0)+8>>2]|0)+(t[a>>2]|0)|0,t[a>>2]=A,r=n-i|0,(i|0)<0?(A=A-i|0,t[c>>2]=r,t[a>>2]=A,t[e>>2]=0,n=0):(r=n,n=i),(r|0)<0&&(n=n-r|0,t[e>>2]=n,A=A-r|0,t[a>>2]=A,t[c>>2]=0,r=0),o=n-A|0,i=r-A|0,(A|0)<0?(t[e>>2]=o,t[c>>2]=i,t[a>>2]=0,n=o,A=0):i=r,r=(i|0)<(n|0)?i:n,r=(A|0)<(r|0)?A:r,!((r|0)<=0)&&(t[e>>2]=n-r,t[c>>2]=i-r,t[a>>2]=A-r))}function c2(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0;i=t[e>>2]|0,a=e+4|0,A=t[a>>2]|0,c=e+8|0,r=t[c>>2]|0,n=A+i|0,i=r+i|0,t[e>>2]=i,t[a>>2]=n,A=r+A|0,t[c>>2]=A,r=n-i|0,(i|0)<0?(A=A-i|0,t[a>>2]=r,t[c>>2]=A,t[e>>2]=0,n=0):(r=n,n=i),(r|0)<0&&(n=n-r|0,t[e>>2]=n,A=A-r|0,t[c>>2]=A,t[a>>2]=0,r=0),o=n-A|0,i=r-A|0,(A|0)<0?(t[e>>2]=o,t[a>>2]=i,t[c>>2]=0,n=o,A=0):i=r,r=(i|0)<(n|0)?i:n,r=(A|0)<(r|0)?A:r,!((r|0)<=0)&&(t[e>>2]=n-r,t[a>>2]=i-r,t[c>>2]=A-r)}function U1(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0;A=t[e>>2]|0,a=e+4|0,n=t[a>>2]|0,c=e+8|0,r=t[c>>2]|0,i=n+A|0,t[e>>2]=i,n=r+n|0,t[a>>2]=n,A=r+A|0,t[c>>2]=A,r=n-i|0,(i|0)<0?(A=A-i|0,t[a>>2]=r,t[c>>2]=A,t[e>>2]=0,n=0):(r=n,n=i),(r|0)<0&&(n=n-r|0,t[e>>2]=n,A=A-r|0,t[c>>2]=A,t[a>>2]=0,r=0),o=n-A|0,i=r-A|0,(A|0)<0?(t[e>>2]=o,t[a>>2]=i,t[c>>2]=0,n=o,A=0):i=r,r=(i|0)<(n|0)?i:n,r=(A|0)<(r|0)?A:r,!((r|0)<=0)&&(t[e>>2]=n-r,t[a>>2]=i-r,t[c>>2]=A-r)}function We(e){switch(e=e|0,e|0){case 1:{e=5;break}case 5:{e=4;break}case 4:{e=6;break}case 6:{e=2;break}case 2:{e=3;break}case 3:{e=1;break}}return e|0}function De(e){switch(e=e|0,e|0){case 1:{e=3;break}case 3:{e=2;break}case 2:{e=6;break}case 6:{e=4;break}case 4:{e=5;break}case 5:{e=1;break}}return e|0}function u2(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0;A=t[e>>2]|0,a=e+4|0,r=t[a>>2]|0,c=e+8|0,n=t[c>>2]|0,i=r+(A<<1)|0,t[e>>2]=i,r=n+(r<<1)|0,t[a>>2]=r,A=(n<<1)+A|0,t[c>>2]=A,n=r-i|0,(i|0)<0?(A=A-i|0,t[a>>2]=n,t[c>>2]=A,t[e>>2]=0,r=n,n=0):n=i,(r|0)<0&&(n=n-r|0,t[e>>2]=n,A=A-r|0,t[c>>2]=A,t[a>>2]=0,r=0),o=n-A|0,i=r-A|0,(A|0)<0?(t[e>>2]=o,t[a>>2]=i,t[c>>2]=0,n=o,A=0):i=r,r=(i|0)<(n|0)?i:n,r=(A|0)<(r|0)?A:r,!((r|0)<=0)&&(t[e>>2]=n-r,t[a>>2]=i-r,t[c>>2]=A-r)}function f2(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0;i=t[e>>2]|0,a=e+4|0,A=t[a>>2]|0,c=e+8|0,r=t[c>>2]|0,n=(A<<1)+i|0,i=r+(i<<1)|0,t[e>>2]=i,t[a>>2]=n,A=(r<<1)+A|0,t[c>>2]=A,r=n-i|0,(i|0)<0?(A=A-i|0,t[a>>2]=r,t[c>>2]=A,t[e>>2]=0,i=0):r=n,(r|0)<0&&(i=i-r|0,t[e>>2]=i,A=A-r|0,t[c>>2]=A,t[a>>2]=0,r=0),o=i-A|0,n=r-A|0,(A|0)<0?(t[e>>2]=o,t[a>>2]=n,t[c>>2]=0,i=o,A=0):n=r,r=(n|0)<(i|0)?n:i,r=(A|0)<(r|0)?A:r,!((r|0)<=0)&&(t[e>>2]=i-r,t[a>>2]=n-r,t[c>>2]=A-r)}function Xt(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0;return a=(t[e>>2]|0)-(t[A>>2]|0)|0,c=(a|0)<0,n=(t[e+4>>2]|0)-(t[A+4>>2]|0)-(c?a:0)|0,o=(n|0)<0,i=(c?0-a|0:0)+(t[e+8>>2]|0)-(t[A+8>>2]|0)+(o?0-n|0:0)|0,e=(i|0)<0,A=e?0:i,r=(o?0:n)-(e?i:0)|0,i=(c?0:a)-(o?n:0)-(e?i:0)|0,e=(r|0)<(i|0)?r:i,e=(A|0)<(e|0)?A:e,n=(e|0)>0,A=A-(n?e:0)|0,r=r-(n?e:0)|0,e=i-(n?e:0)|0,e=(e|0)>-1?e:0-e|0,r=(r|0)>-1?r:0-r|0,A=(A|0)>-1?A:0-A|0,A=(r|0)>(A|0)?r:A,((e|0)>(A|0)?e:A)|0}function wl(e,A){e=e|0,A=A|0;var r=0;r=t[e+8>>2]|0,t[A>>2]=(t[e>>2]|0)-r,t[A+4>>2]=(t[e+4>>2]|0)-r}function Ll(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0;return n=t[e>>2]|0,t[A>>2]=n,i=t[e+4>>2]|0,a=A+4|0,t[a>>2]=i,c=A+8|0,t[c>>2]=0,r=(i|0)<(n|0),e=r?n:i,r=r?i:n,(r|0)<0&&((r|0)==-2147483648||((e|0)>0?(2147483647-e|0)<(r|0):(-2147483648-e|0)>(r|0))||((e|0)>-1?(e|-2147483648|0)>=(r|0):(e^-2147483648|0)<(r|0)))?(A=1,A|0):(e=i-n|0,(n|0)<0?(r=0-n|0,t[a>>2]=e,t[c>>2]=r,t[A>>2]=0,n=0):(e=i,r=0),(e|0)<0&&(n=n-e|0,t[A>>2]=n,r=r-e|0,t[c>>2]=r,t[a>>2]=0,e=0),o=n-r|0,i=e-r|0,(r|0)<0?(t[A>>2]=o,t[a>>2]=i,t[c>>2]=0,e=i,i=o,r=0):i=n,n=(e|0)<(i|0)?e:i,n=(r|0)<(n|0)?r:n,(n|0)<=0?(A=0,A|0):(t[A>>2]=i-n,t[a>>2]=e-n,t[c>>2]=r-n,A=0,A|0))}function d2(e){e=e|0;var A=0,r=0,n=0,i=0;A=e+8|0,i=t[A>>2]|0,r=i-(t[e>>2]|0)|0,t[e>>2]=r,n=e+4|0,e=(t[n>>2]|0)-i|0,t[n>>2]=e,t[A>>2]=0-(e+r)}function kl(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0;r=t[e>>2]|0,A=0-r|0,t[e>>2]=A,a=e+8|0,t[a>>2]=0,c=e+4|0,n=t[c>>2]|0,i=n+r|0,(r|0)>0?(t[c>>2]=i,t[a>>2]=r,t[e>>2]=0,A=0,n=i):r=0,(n|0)<0?(o=A-n|0,t[e>>2]=o,r=r-n|0,t[a>>2]=r,t[c>>2]=0,i=o-r|0,A=0-r|0,(r|0)<0?(t[e>>2]=i,t[c>>2]=A,t[a>>2]=0,n=A,r=0):(n=0,i=o)):i=A,A=(n|0)<(i|0)?n:i,A=(r|0)<(A|0)?r:A,!((A|0)<=0)&&(t[e>>2]=i-A,t[c>>2]=n-A,t[a>>2]=r-A)}function Ml(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0;if(E=L,L=L+64|0,v=E,c=E+56|0,!(!0&(A&2013265920|0)==134217728&(!0&(n&2013265920|0)==134217728)))return i=5,L=E,i|0;if((e|0)==(r|0)&(A|0)==(n|0))return t[i>>2]=0,i=0,L=E,i|0;if(a=C0(e|0,A|0,52)|0,S()|0,a=a&15,p=C0(r|0,n|0,52)|0,S()|0,(a|0)!=(p&15|0))return i=12,L=E,i|0;if(o=a+-1|0,a>>>0>1){er(e,A,o,v)|0,er(r,n,o,c)|0,p=v,d=t[p>>2]|0,p=t[p+4>>2]|0;A:do if((d|0)==(t[c>>2]|0)&&(p|0)==(t[c+4>>2]|0)){a=(a^15)*3|0,o=C0(e|0,A|0,a|0)|0,S()|0,o=o&7,a=C0(r|0,n|0,a|0)|0,S()|0,a=a&7;do if((o|0)==0|(a|0)==0)t[i>>2]=1,o=0;else if((o|0)==7)o=5;else{if((o|0)==1|(a|0)==1&&MA(d,p)|0){o=5;break}if((t[15536+(o<<2)>>2]|0)!=(a|0)&&(t[15568+(o<<2)>>2]|0)!=(a|0))break A;t[i>>2]=1,o=0}while(!1);return i=o,L=E,i|0}while(!1)}o=v,a=o+56|0;do t[o>>2]=0,o=o+4|0;while((o|0)<(a|0));return ae(e,A,1,v)|0,A=v,!((t[A>>2]|0)==(r|0)&&(t[A+4>>2]|0)==(n|0))&&(A=v+8|0,!((t[A>>2]|0)==(r|0)&&(t[A+4>>2]|0)==(n|0)))&&(A=v+16|0,!((t[A>>2]|0)==(r|0)&&(t[A+4>>2]|0)==(n|0)))&&(A=v+24|0,!((t[A>>2]|0)==(r|0)&&(t[A+4>>2]|0)==(n|0)))&&(A=v+32|0,!((t[A>>2]|0)==(r|0)&&(t[A+4>>2]|0)==(n|0)))&&(A=v+40|0,!((t[A>>2]|0)==(r|0)&&(t[A+4>>2]|0)==(n|0)))?(o=v+48|0,o=((t[o>>2]|0)==(r|0)?(t[o+4>>2]|0)==(n|0):0)&1):o=1,t[i>>2]=o,i=0,L=E,i|0}function xl(e,A,r,n,i){return e=e|0,A=A|0,r=r|0,n=n|0,i=i|0,r=Ut(e,A,r,n)|0,(r|0)==7?(i=11,i|0):(n=x0(r|0,0,56)|0,A=A&-2130706433|(S()|0)|268435456,t[i>>2]=e|n,t[i+4>>2]=A,i=0,i|0)}function El(e,A,r){return e=e|0,A=A|0,r=r|0,!0&(A&2013265920|0)==268435456?(t[r>>2]=e,t[r+4>>2]=A&-2130706433|134217728,r=0,r|0):(r=6,r|0)}function zl(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0;return i=L,L=L+16|0,n=i,t[n>>2]=0,!0&(A&2013265920|0)==268435456?(o=C0(e|0,A|0,56)|0,S()|0,n=NA(e,A&-2130706433|134217728,o&7,n,r)|0,L=i,n|0):(n=6,L=i,n|0)}function h2(e,A){e=e|0,A=A|0;var r=0;switch(r=C0(e|0,A|0,56)|0,S()|0,r&7){case 0:case 7:return r=0,r|0}return r=A&-2130706433|134217728,!(!0&(A&2013265920|0)==268435456)||!0&(A&117440512|0)==16777216&(MA(e,r)|0)!=0?(r=0,r|0):(r=Rt(e,r)|0,r|0)}function Sl(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0;return i=L,L=L+16|0,n=i,!0&(A&2013265920|0)==268435456?(o=A&-2130706433|134217728,a=r,t[a>>2]=e,t[a+4>>2]=o,t[n>>2]=0,A=C0(e|0,A|0,56)|0,S()|0,n=NA(e,o,A&7,n,r+8|0)|0,L=i,n|0):(n=6,L=i,n|0)}function Dl(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0;return i=(MA(e,A)|0)==0,A=A&-2130706433,n=r,t[n>>2]=i?e:0,t[n+4>>2]=i?A|285212672:0,n=r+8|0,t[n>>2]=e,t[n+4>>2]=A|301989888,n=r+16|0,t[n>>2]=e,t[n+4>>2]=A|318767104,n=r+24|0,t[n>>2]=e,t[n+4>>2]=A|335544320,n=r+32|0,t[n>>2]=e,t[n+4>>2]=A|352321536,r=r+40|0,t[r>>2]=e,t[r+4>>2]=A|369098752,0}function j1(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0;return a=L,L=L+16|0,i=a,o=A&-2130706433|134217728,!0&(A&2013265920|0)==268435456?(n=C0(e|0,A|0,56)|0,S()|0,n=D3(e,o,n&7)|0,(n|0)==-1?(t[r>>2]=0,o=6,L=a,o|0):(t1(e,o,i)|0&&R0(27795,26932,282,26947),A=C0(e|0,A|0,52)|0,S()|0,A=A&15,MA(e,o)|0?Jt(i,A,n,2,r):Kt(i,A,n,2,r),o=0,L=a,o|0)):(o=6,L=a,o|0)}function Hl(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0;n=L,L=L+16|0,i=n,Bl(e,A,r,i),ml(i,r+4|0),L=n}function Bl(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0;if(c=L,L=L+16|0,d=c,Vl(e,r,d),o=+A1(+(1-+M[d>>3]*.5)),o<1e-16){t[n>>2]=0,t[n+4>>2]=0,t[n+8>>2]=0,t[n+12>>2]=0,L=c;return}if(d=t[r>>2]|0,i=+M[15920+(d*24|0)>>3],i=+b1(i-+b1(+Rl(15600+(d<<4)|0,e))),ce(A)|0?a=+b1(i+-.3334731722518321):a=i,i=+JA(+o)*2.618033988749896,(A|0)>0){e=0;do i=i*2.6457513110645907,e=e+1|0;while((e|0)!=(A|0))}o=+mA(+a)*i,M[n>>3]=o,a=+cA(+a)*i,M[n+8>>3]=a,L=c}function Vl(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0;if(o=L,L=L+32|0,i=o,S3(e,i),t[A>>2]=0,M[r>>3]=5,n=+_A(16400,i),n<+M[r>>3]&&(t[A>>2]=0,M[r>>3]=n),n=+_A(16424,i),n<+M[r>>3]&&(t[A>>2]=1,M[r>>3]=n),n=+_A(16448,i),n<+M[r>>3]&&(t[A>>2]=2,M[r>>3]=n),n=+_A(16472,i),n<+M[r>>3]&&(t[A>>2]=3,M[r>>3]=n),n=+_A(16496,i),n<+M[r>>3]&&(t[A>>2]=4,M[r>>3]=n),n=+_A(16520,i),n<+M[r>>3]&&(t[A>>2]=5,M[r>>3]=n),n=+_A(16544,i),n<+M[r>>3]&&(t[A>>2]=6,M[r>>3]=n),n=+_A(16568,i),n<+M[r>>3]&&(t[A>>2]=7,M[r>>3]=n),n=+_A(16592,i),n<+M[r>>3]&&(t[A>>2]=8,M[r>>3]=n),n=+_A(16616,i),n<+M[r>>3]&&(t[A>>2]=9,M[r>>3]=n),n=+_A(16640,i),n<+M[r>>3]&&(t[A>>2]=10,M[r>>3]=n),n=+_A(16664,i),n<+M[r>>3]&&(t[A>>2]=11,M[r>>3]=n),n=+_A(16688,i),n<+M[r>>3]&&(t[A>>2]=12,M[r>>3]=n),n=+_A(16712,i),n<+M[r>>3]&&(t[A>>2]=13,M[r>>3]=n),n=+_A(16736,i),n<+M[r>>3]&&(t[A>>2]=14,M[r>>3]=n),n=+_A(16760,i),n<+M[r>>3]&&(t[A>>2]=15,M[r>>3]=n),n=+_A(16784,i),n<+M[r>>3]&&(t[A>>2]=16,M[r>>3]=n),n=+_A(16808,i),n<+M[r>>3]&&(t[A>>2]=17,M[r>>3]=n),n=+_A(16832,i),n<+M[r>>3]&&(t[A>>2]=18,M[r>>3]=n),n=+_A(16856,i),!(n<+M[r>>3])){L=o;return}t[A>>2]=19,M[r>>3]=n,L=o}function C1(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0;if(o=+z3(e),o<1e-16){A=15600+(A<<4)|0,t[i>>2]=t[A>>2],t[i+4>>2]=t[A+4>>2],t[i+8>>2]=t[A+8>>2],t[i+12>>2]=t[A+12>>2];return}if(a=+vA(+ +M[e+8>>3],+ +M[e>>3]),(r|0)>0){e=0;do o=o*.37796447300922725,e=e+1|0;while((e|0)!=(r|0))}c=o*.3333333333333333,n?(r=(ce(r)|0)==0,o=+g1(+((r?c:c*.37796447300922725)*.381966011250105))):(o=+g1(+(o*.381966011250105)),ce(r)|0&&(a=+b1(a+.3334731722518321))),A3(15600+(A<<4)|0,+b1(+M[15920+(A*24|0)>>3]-a),o,i)}function _l(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0;n=L,L=L+16|0,i=n,je(e+4|0,i),C1(i,t[e>>2]|0,A,0,r),L=n}function Jt(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0,G=0,S0=0,$0=0,O0=0,iA=0,oA=0,pA=0,eA=0,W0=0,E0=0,fA=0,wA=0,sA=0;if(fA=L,L=L+272|0,o=fA+256|0,s0=fA+240|0,eA=fA,W0=fA+224|0,E0=fA+208|0,i0=fA+176|0,G=fA+160|0,S0=fA+192|0,$0=fA+144|0,O0=fA+128|0,iA=fA+112|0,oA=fA+96|0,pA=fA+80|0,t[o>>2]=A,t[s0>>2]=t[e>>2],t[s0+4>>2]=t[e+4>>2],t[s0+8>>2]=t[e+8>>2],t[s0+12>>2]=t[e+12>>2],p2(s0,o,eA),t[i>>2]=0,s0=n+r+((n|0)==5&1)|0,(s0|0)<=(r|0)){L=fA;return}d=t[o>>2]|0,p=W0+4|0,v=i0+4|0,E=r+5|0,I=16880+(d<<2)|0,P=16960+(d<<2)|0,T=O0+8|0,W=iA+8|0,R=oA+8|0,u0=E0+4|0,c=r;A:for(;;){a=eA+(((c|0)%5|0)<<4)|0,t[E0>>2]=t[a>>2],t[E0+4>>2]=t[a+4>>2],t[E0+8>>2]=t[a+8>>2],t[E0+12>>2]=t[a+12>>2];do;while((e1(E0,d,0,1)|0)==2);if((c|0)>(r|0)&(ce(A)|0)!=0){if(t[i0>>2]=t[E0>>2],t[i0+4>>2]=t[E0+4>>2],t[i0+8>>2]=t[E0+8>>2],t[i0+12>>2]=t[E0+12>>2],je(p,G),n=t[i0>>2]|0,o=t[17040+(n*80|0)+(t[W0>>2]<<2)>>2]|0,t[i0>>2]=t[18640+(n*80|0)+(o*20|0)>>2],a=t[18640+(n*80|0)+(o*20|0)+16>>2]|0,(a|0)>0){e=0;do c2(v),e=e+1|0;while((e|0)<(a|0))}switch(a=18640+(n*80|0)+(o*20|0)+4|0,t[S0>>2]=t[a>>2],t[S0+4>>2]=t[a+4>>2],t[S0+8>>2]=t[a+8>>2],s2(S0,(t[I>>2]|0)*3|0),GA(v,S0,v),$A(v),je(v,$0),wA=+(t[P>>2]|0),M[O0>>3]=wA*3,M[T>>3]=0,sA=wA*-1.5,M[iA>>3]=sA,M[W>>3]=wA*2.598076211353316,M[oA>>3]=sA,M[R>>3]=wA*-2.598076211353316,t[17040+((t[i0>>2]|0)*80|0)+(t[E0>>2]<<2)>>2]|0){case 1:{e=iA,n=O0;break}case 3:{e=oA,n=iA;break}case 2:{e=O0,n=oA;break}default:{e=12;break A}}H2(G,$0,n,e,pA),C1(pA,t[i0>>2]|0,d,1,i+8+(t[i>>2]<<4)|0),t[i>>2]=(t[i>>2]|0)+1}if((c|0)<(E|0)&&(je(u0,i0),C1(i0,t[E0>>2]|0,d,1,i+8+(t[i>>2]<<4)|0),t[i>>2]=(t[i>>2]|0)+1),t[W0>>2]=t[E0>>2],t[W0+4>>2]=t[E0+4>>2],t[W0+8>>2]=t[E0+8>>2],t[W0+12>>2]=t[E0+12>>2],c=c+1|0,(c|0)>=(s0|0)){e=3;break}}if((e|0)==3){L=fA;return}else(e|0)==12&&R0(26970,27017,572,27027)}function p2(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0;d=L,L=L+128|0,n=d+64|0,i=d,o=n,a=20240,c=o+60|0;do t[o>>2]=t[a>>2],o=o+4|0,a=a+4|0;while((o|0)<(c|0));o=i,a=20304,c=o+60|0;do t[o>>2]=t[a>>2],o=o+4|0,a=a+4|0;while((o|0)<(c|0));c=(ce(t[A>>2]|0)|0)==0,n=c?n:i,i=e+4|0,u2(i),f2(i),ce(t[A>>2]|0)|0&&($e(i),t[A>>2]=(t[A>>2]|0)+1),t[r>>2]=t[e>>2],A=r+4|0,GA(i,n,A),$A(A),t[r+16>>2]=t[e>>2],A=r+20|0,GA(i,n+12|0,A),$A(A),t[r+32>>2]=t[e>>2],A=r+36|0,GA(i,n+24|0,A),$A(A),t[r+48>>2]=t[e>>2],A=r+52|0,GA(i,n+36|0,A),$A(A),t[r+64>>2]=t[e>>2],r=r+68|0,GA(i,n+48|0,r),$A(r),L=d}function e1(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0;if(T=L,L=L+32|0,I=T+12|0,c=T,P=e+4|0,E=t[16960+(A<<2)>>2]|0,v=(n|0)!=0,E=v?E*3|0:E,i=t[P>>2]|0,p=e+8|0,a=t[p>>2]|0,v){if(o=e+12|0,n=t[o>>2]|0,i=a+i+n|0,(i|0)==(E|0))return P=1,L=T,P|0;d=o}else d=e+12|0,n=t[d>>2]|0,i=a+i+n|0;if((i|0)<=(E|0))return P=0,L=T,P|0;do if((n|0)>0){if(n=t[e>>2]|0,(a|0)>0){o=18640+(n*80|0)+60|0,n=e;break}n=18640+(n*80|0)+40|0,r?(yl(I,E,0,0),qt(P,I,c),U1(c),GA(c,I,P),o=n,n=e):(o=n,n=e)}else o=18640+((t[e>>2]|0)*80|0)+20|0,n=e;while(!1);if(t[n>>2]=t[o>>2],i=o+16|0,(t[i>>2]|0)>0){n=0;do c2(P),n=n+1|0;while((n|0)<(t[i>>2]|0))}return e=o+4|0,t[I>>2]=t[e>>2],t[I+4>>2]=t[e+4>>2],t[I+8>>2]=t[e+8>>2],A=t[16880+(A<<2)>>2]|0,s2(I,v?A*3|0:A),GA(P,I,P),$A(P),v?n=((t[p>>2]|0)+(t[P>>2]|0)+(t[d>>2]|0)|0)==(E|0)?1:2:n=2,P=n,L=T,P|0}function Il(e,A){e=e|0,A=A|0;var r=0;do r=e1(e,A,0,1)|0;while((r|0)==2);return r|0}function Kt(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0,G=0,S0=0,$0=0,O0=0,iA=0,oA=0,pA=0,eA=0;if(oA=L,L=L+240|0,o=oA+224|0,S0=oA+208|0,$0=oA,O0=oA+192|0,iA=oA+176|0,R=oA+160|0,u0=oA+144|0,s0=oA+128|0,i0=oA+112|0,G=oA+96|0,t[o>>2]=A,t[S0>>2]=t[e>>2],t[S0+4>>2]=t[e+4>>2],t[S0+8>>2]=t[e+8>>2],t[S0+12>>2]=t[e+12>>2],g2(S0,o,$0),t[i>>2]=0,W=n+r+((n|0)==6&1)|0,(W|0)<=(r|0)){L=oA;return}d=t[o>>2]|0,p=r+6|0,v=16960+(d<<2)|0,E=u0+8|0,I=s0+8|0,P=i0+8|0,T=O0+4|0,a=0,c=r,n=-1;A:for(;;){if(o=(c|0)%6|0,e=$0+(o<<4)|0,t[O0>>2]=t[e>>2],t[O0+4>>2]=t[e+4>>2],t[O0+8>>2]=t[e+8>>2],t[O0+12>>2]=t[e+12>>2],e=a,a=e1(O0,d,0,1)|0,(c|0)>(r|0)&(ce(A)|0)!=0&&(e|0)!=1&&(t[O0>>2]|0)!=(n|0)){switch(je($0+(((o+5|0)%6|0)<<4)+4|0,iA),je($0+(o<<4)+4|0,R),pA=+(t[v>>2]|0),M[u0>>3]=pA*3,M[E>>3]=0,eA=pA*-1.5,M[s0>>3]=eA,M[I>>3]=pA*2.598076211353316,M[i0>>3]=eA,M[P>>3]=pA*-2.598076211353316,o=t[S0>>2]|0,t[17040+(o*80|0)+(((n|0)==(o|0)?t[O0>>2]|0:n)<<2)>>2]|0){case 1:{e=s0,n=u0;break}case 3:{e=i0,n=s0;break}case 2:{e=u0,n=i0;break}default:{e=8;break A}}H2(iA,R,n,e,G),!(B2(iA,G)|0)&&!(B2(R,G)|0)&&(C1(G,t[S0>>2]|0,d,1,i+8+(t[i>>2]<<4)|0),t[i>>2]=(t[i>>2]|0)+1)}if((c|0)<(p|0)&&(je(T,iA),C1(iA,t[O0>>2]|0,d,1,i+8+(t[i>>2]<<4)|0),t[i>>2]=(t[i>>2]|0)+1),c=c+1|0,(c|0)>=(W|0)){e=3;break}else n=t[O0>>2]|0}if((e|0)==3){L=oA;return}else(e|0)==8&&R0(27054,27017,737,27099)}function g2(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0;d=L,L=L+160|0,n=d+80|0,i=d,o=n,a=20368,c=o+72|0;do t[o>>2]=t[a>>2],o=o+4|0,a=a+4|0;while((o|0)<(c|0));o=i,a=20448,c=o+72|0;do t[o>>2]=t[a>>2],o=o+4|0,a=a+4|0;while((o|0)<(c|0));c=(ce(t[A>>2]|0)|0)==0,n=c?n:i,i=e+4|0,u2(i),f2(i),ce(t[A>>2]|0)|0&&($e(i),t[A>>2]=(t[A>>2]|0)+1),t[r>>2]=t[e>>2],A=r+4|0,GA(i,n,A),$A(A),t[r+16>>2]=t[e>>2],A=r+20|0,GA(i,n+12|0,A),$A(A),t[r+32>>2]=t[e>>2],A=r+36|0,GA(i,n+24|0,A),$A(A),t[r+48>>2]=t[e>>2],A=r+52|0,GA(i,n+36|0,A),$A(A),t[r+64>>2]=t[e>>2],A=r+68|0,GA(i,n+48|0,A),$A(A),t[r+80>>2]=t[e>>2],r=r+84|0,GA(i,n+60|0,r),$A(r),L=d}function Pl(e,A){return e=e|0,A=A|0,A=C0(e|0,A|0,52)|0,S()|0,A&15|0}function y2(e,A){return e=e|0,A=A|0,A=C0(e|0,A|0,45)|0,S()|0,A&127|0}function Tl(e,A,r,n){return e=e|0,A=A|0,r=r|0,n=n|0,(r+-1|0)>>>0>14?(n=4,n|0):(r=C0(e|0,A|0,(15-r|0)*3|0)|0,S()|0,t[n>>2]=r&7,n=0,n|0)}function Fl(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0;if(e>>>0>15)return n=4,n|0;if(A>>>0>121)return n=17,n|0;a=x0(e|0,0,52)|0,i=S()|0,c=x0(A|0,0,45)|0,i=i|(S()|0)|134225919;A:do if((e|0)>=1){for(c=1,a=(y0[20528+A>>0]|0)!=0,o=-1;;){if(A=t[r+(c+-1<<2)>>2]|0,A>>>0>6){i=18,A=10;break}if(!((A|0)==0|a^1))if((A|0)==1){i=19,A=10;break}else a=0;if(p=(15-c|0)*3|0,d=x0(7,0,p|0)|0,i=i&~(S()|0),A=x0(A|0,((A|0)<0)<<31>>31|0,p|0)|0,o=A|o&~d,i=S()|0|i,(c|0)<(e|0))c=c+1|0;else break A}if((A|0)==10)return i|0}else o=-1;while(!1);return p=n,t[p>>2]=o,t[p+4>>2]=i,p=0,p|0}function Rt(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0;return!(!0&(A&-16777216|0)==134217728)||(n=C0(e|0,A|0,52)|0,S()|0,n=n&15,r=C0(e|0,A|0,45)|0,S()|0,r=r&127,r>>>0>121)?(e=0,e|0):(a=(n^15)*3|0,i=C0(e|0,A|0,a|0)|0,a=x0(i|0,S()|0,a|0)|0,i=S()|0,o=ZA(-1227133514,-1171,a|0,i|0)|0,!((a&613566756&o|0)==0&(i&4681&(S()|0)|0)==0)||(a=(n*3|0)+19|0,o=x0(~e|0,~A|0,a|0)|0,a=C0(o|0,S()|0,a|0)|0,!((n|0)==15|(a|0)==0&(S()|0)==0))?(a=0,a|0):!(y0[20528+r>>0]|0)||(A=A&8191,(e|0)==0&(A|0)==0)?(a=1,a|0):(a=hr(e|0,A|0)|0,S()|0,((63-a|0)%3|0|0)!=0|0))}function Nl(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0;return!0&(A&-16777216|0)==134217728&&(n=C0(e|0,A|0,52)|0,S()|0,n=n&15,r=C0(e|0,A|0,45)|0,S()|0,r=r&127,r>>>0<=121)&&(a=(n^15)*3|0,i=C0(e|0,A|0,a|0)|0,a=x0(i|0,S()|0,a|0)|0,i=S()|0,o=ZA(-1227133514,-1171,a|0,i|0)|0,(a&613566756&o|0)==0&(i&4681&(S()|0)|0)==0)&&(a=(n*3|0)+19|0,o=x0(~e|0,~A|0,a|0)|0,a=C0(o|0,S()|0,a|0)|0,(n|0)==15|(a|0)==0&(S()|0)==0)&&(!(y0[20528+r>>0]|0)||(r=A&8191,(e|0)==0&(r|0)==0)||(a=hr(e|0,r|0)|0,S()|0,(63-a|0)%3|0|0))||h2(e,A)|0?(a=1,a|0):(a=(V2(e,A)|0)!=0&1,a|0)}function Ar(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0;if(i=x0(A|0,0,52)|0,o=S()|0,r=x0(r|0,0,45)|0,r=o|(S()|0)|134225919,(A|0)<1){o=-1,n=r,A=e,t[A>>2]=o,e=e+4|0,t[e>>2]=n;return}for(o=1,i=-1;a=(15-o|0)*3|0,c=x0(7,0,a|0)|0,r=r&~(S()|0),a=x0(n|0,0,a|0)|0,i=i&~c|a,r=r|(S()|0),(o|0)!=(A|0);)o=o+1|0;c=e,a=c,t[a>>2]=i,c=c+4|0,t[c>>2]=r}function er(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0;if(o=C0(e|0,A|0,52)|0,S()|0,o=o&15,r>>>0>15)return n=4,n|0;if((o|0)<(r|0))return n=12,n|0;if((o|0)==(r|0))return t[n>>2]=e,t[n+4>>2]=A,n=0,n|0;if(i=x0(r|0,0,52)|0,i=i|e,e=S()|0|A&-15728641,(o|0)>(r|0))do A=x0(7,0,(14-r|0)*3|0)|0,r=r+1|0,i=A|i,e=S()|0|e;while((r|0)<(o|0));return t[n>>2]=i,t[n+4>>2]=e,n=0,n|0}function v1(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0;if(o=C0(e|0,A|0,52)|0,S()|0,o=o&15,!((r|0)<16&(o|0)<=(r|0)))return n=4,n|0;i=r-o|0,r=C0(e|0,A|0,45)|0,S()|0;A:do if(!(SA(r&127)|0))r=He(7,0,i,((i|0)<0)<<31>>31)|0,i=S()|0;else{e:do if(o|0){for(r=1;a=x0(7,0,(15-r|0)*3|0)|0,!!((a&e|0)==0&((S()|0)&A|0)==0);)if(r>>>0<o>>>0)r=r+1|0;else break e;r=He(7,0,i,((i|0)<0)<<31>>31)|0,i=S()|0;break A}while(!1);r=He(7,0,i,((i|0)<0)<<31>>31)|0,r=QA(r|0,S()|0,5,0)|0,r=G0(r|0,S()|0,-5,-1)|0,r=Ve(r|0,S()|0,6,0)|0,r=G0(r|0,S()|0,1,0)|0,i=S()|0}while(!1);return a=n,t[a>>2]=r,t[a+4>>2]=i,a=0,a|0}function MA(e,A){e=e|0,A=A|0;var r=0,n=0,i=0;if(i=C0(e|0,A|0,45)|0,S()|0,!(SA(i&127)|0))return i=0,i|0;i=C0(e|0,A|0,52)|0,S()|0,i=i&15;A:do if(!i)r=0;else for(n=1;;){if(r=C0(e|0,A|0,(15-n|0)*3|0)|0,S()|0,r=r&7,r|0)break A;if(n>>>0<i>>>0)n=n+1|0;else{r=0;break}}while(!1);return i=(r|0)==0&1,i|0}function Zl(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0;if(a=L,L=L+16|0,o=a,sr(o,e,A,r),A=o,e=t[A>>2]|0,A=t[A+4>>2]|0,(e|0)==0&(A|0)==0)return L=a,0;i=0,r=0;do c=n+(i<<3)|0,t[c>>2]=e,t[c+4>>2]=A,i=G0(i|0,r|0,1,0)|0,r=S()|0,lr(o),c=o,e=t[c>>2]|0,A=t[c+4>>2]|0;while(!((e|0)==0&(A|0)==0));return L=a,0}function m2(e,A,r,n){return e=e|0,A=A|0,r=r|0,n=n|0,(n|0)<(r|0)?(r=A,n=e,nA(r|0),n|0):(r=x0(-1,-1,((n-r|0)*3|0)+3|0)|0,n=x0(~r|0,~(S()|0)|0,(15-n|0)*3|0)|0,r=~(S()|0)&A,n=~n&e,nA(r|0),n|0)}function C2(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0;return i=C0(e|0,A|0,52)|0,S()|0,i=i&15,(r|0)<16&(i|0)<=(r|0)?((i|0)<(r|0)&&(i=x0(-1,-1,((r+-1-i|0)*3|0)+3|0)|0,i=x0(~i|0,~(S()|0)|0,(15-r|0)*3|0)|0,A=~(S()|0)&A,e=~i&e),i=x0(r|0,0,52)|0,r=A&-15728641|(S()|0),t[n>>2]=e|i,t[n+4>>2]=r,n=0,n|0):(n=4,n|0)}function Ql(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0,G=0,S0=0,$0=0,O0=0,iA=0,oA=0,pA=0,eA=0,W0=0,E0=0;if((r|0)==0&(n|0)==0)return E0=0,E0|0;if(i=e,o=t[i>>2]|0,i=t[i+4>>2]|0,!0&(i&15728640|0)==0){if(!((n|0)>0|(n|0)==0&r>>>0>0)||(E0=A,t[E0>>2]=o,t[E0+4>>2]=i,(r|0)==1&(n|0)==0))return E0=0,E0|0;i=1,o=0;do eA=e+(i<<3)|0,W0=t[eA+4>>2]|0,E0=A+(i<<3)|0,t[E0>>2]=t[eA>>2],t[E0+4>>2]=W0,i=G0(i|0,o|0,1,0)|0,o=S()|0;while((o|0)<(n|0)|(o|0)==(n|0)&i>>>0<r>>>0);return i=0,i|0}if(pA=r<<3,W0=ve(pA)|0,!W0)return E0=13,E0|0;if(s1(W0|0,e|0,pA|0)|0,eA=RA(r,8)|0,!eA)return Y0(W0),E0=13,E0|0;A:for(;;){i=W0,p=t[i>>2]|0,i=t[i+4>>2]|0,iA=C0(p|0,i|0,52)|0,S()|0,iA=iA&15,oA=iA+-1|0,O0=(iA|0)!=0,$0=(n|0)>0|(n|0)==0&r>>>0>0;e:do if(O0&$0){if(s0=x0(oA|0,0,52)|0,i0=S()|0,oA>>>0>15){if(!((p|0)==0&(i|0)==0)){E0=16;break A}for(o=0,e=0;;){if(o=G0(o|0,e|0,1,0)|0,e=S()|0,!((e|0)<(n|0)|(e|0)==(n|0)&o>>>0<r>>>0))break e;if(a=W0+(o<<3)|0,S0=t[a>>2]|0,a=t[a+4>>2]|0,!((S0|0)==0&(a|0)==0)){i=a,E0=16;break A}}}for(c=p,e=i,o=0,a=0;;){if(!((c|0)==0&(e|0)==0)){if(!(!0&(e&117440512|0)==0)){E0=21;break A}if(v=C0(c|0,e|0,52)|0,S()|0,v=v&15,(v|0)<(oA|0)){i=12,E0=27;break A}if((v|0)!=(oA|0)&&(c=c|s0,e=e&-15728641|i0,v>>>0>=iA>>>0)){d=oA;do S0=x0(7,0,(14-d|0)*3|0)|0,d=d+1|0,c=S0|c,e=S()|0|e;while(d>>>0<v>>>0)}if(I=o1(c|0,e|0,r|0,n|0)|0,P=S()|0,d=eA+(I<<3)|0,v=d,E=t[v>>2]|0,v=t[v+4>>2]|0,!((E|0)==0&(v|0)==0)){R=0,u0=0;do{if((R|0)>(n|0)|(R|0)==(n|0)&u0>>>0>r>>>0){E0=31;break A}if((E|0)==(c|0)&(v&-117440513|0)==(e|0)){T=C0(E|0,v|0,56)|0,S()|0,T=T&7,W=T+1|0,S0=C0(E|0,v|0,45)|0,S()|0;t:do if(!(SA(S0&127)|0))v=7;else{if(E=C0(E|0,v|0,52)|0,S()|0,E=E&15,!E){v=6;break}for(v=1;;){if(S0=x0(7,0,(15-v|0)*3|0)|0,!((S0&c|0)==0&((S()|0)&e|0)==0)){v=7;break t}if(v>>>0<E>>>0)v=v+1|0;else{v=6;break}}}while(!1);if((T+2|0)>>>0>v>>>0){E0=41;break A}S0=x0(W|0,0,56)|0,e=S()|0|e&-117440513,G=d,t[G>>2]=0,t[G+4>>2]=0,c=S0|c}else I=G0(I|0,P|0,1,0)|0,I=i1(I|0,S()|0,r|0,n|0)|0,P=S()|0;u0=G0(u0|0,R|0,1,0)|0,R=S()|0,d=eA+(I<<3)|0,v=d,E=t[v>>2]|0,v=t[v+4>>2]|0}while(!((E|0)==0&(v|0)==0))}S0=d,t[S0>>2]=c,t[S0+4>>2]=e}if(o=G0(o|0,a|0,1,0)|0,a=S()|0,!((a|0)<(n|0)|(a|0)==(n|0)&o>>>0<r>>>0))break e;e=W0+(o<<3)|0,c=t[e>>2]|0,e=t[e+4>>2]|0}}while(!1);if(S0=G0(r|0,n|0,5,0)|0,G=S()|0,G>>>0<0|(G|0)==0&S0>>>0<11){E0=85;break}if(S0=Ve(r|0,n|0,6,0)|0,S()|0,S0=RA(S0,8)|0,!S0){E0=48;break}do if($0){for(W=0,e=0,T=0,R=0;;){if(v=eA+(W<<3)|0,a=v,o=t[a>>2]|0,a=t[a+4>>2]|0,(o|0)==0&(a|0)==0)G=T;else{E=C0(o|0,a|0,56)|0,S()|0,E=E&7,c=E+1|0,I=a&-117440513,G=C0(o|0,a|0,45)|0,S()|0;e:do if(SA(G&127)|0){if(P=C0(o|0,a|0,52)|0,S()|0,P=P&15,P|0)for(d=1;;){if(G=x0(7,0,(15-d|0)*3|0)|0,!((o&G|0)==0&(I&(S()|0)|0)==0))break e;if(d>>>0<P>>>0)d=d+1|0;else break}a=x0(c|0,0,56)|0,o=a|o,a=S()|0|I,c=v,t[c>>2]=o,t[c+4>>2]=a,c=E+2|0}while(!1);(c|0)==7?(G=S0+(e<<3)|0,t[G>>2]=o,t[G+4>>2]=a&-117440513,e=G0(e|0,T|0,1,0)|0,G=S()|0):G=T}if(W=G0(W|0,R|0,1,0)|0,R=S()|0,(R|0)<(n|0)|(R|0)==(n|0)&W>>>0<r>>>0)T=G;else break}if($0){if(u0=oA>>>0>15,s0=x0(oA|0,0,52)|0,i0=S()|0,!O0){for(o=0,d=0,c=0,a=0;(p|0)==0&(i|0)==0||(oA=A+(o<<3)|0,t[oA>>2]=p,t[oA+4>>2]=i,o=G0(o|0,d|0,1,0)|0,d=S()|0),c=G0(c|0,a|0,1,0)|0,a=S()|0,!!((a|0)<(n|0)|(a|0)==(n|0)&c>>>0<r>>>0);)i=W0+(c<<3)|0,p=t[i>>2]|0,i=t[i+4>>2]|0;i=G;break}for(o=0,d=0,a=0,c=0;;){do if(!((p|0)==0&(i|0)==0)){if(P=C0(p|0,i|0,52)|0,S()|0,P=P&15,u0|(P|0)<(oA|0)){E0=80;break A}if((P|0)!=(oA|0)){if(v=p|s0,E=i&-15728641|i0,P>>>0>=iA>>>0){I=oA;do O0=x0(7,0,(14-I|0)*3|0)|0,I=I+1|0,v=O0|v,E=S()|0|E;while(I>>>0<P>>>0)}}else v=p,E=i;T=o1(v|0,E|0,r|0,n|0)|0,I=0,P=0,R=S()|0;do{if((I|0)>(n|0)|(I|0)==(n|0)&P>>>0>r>>>0){E0=81;break A}if(O0=eA+(T<<3)|0,W=t[O0+4>>2]|0,(W&-117440513|0)==(E|0)&&(t[O0>>2]|0)==(v|0)){E0=65;break}O0=G0(T|0,R|0,1,0)|0,T=i1(O0|0,S()|0,r|0,n|0)|0,R=S()|0,P=G0(P|0,I|0,1,0)|0,I=S()|0,O0=eA+(T<<3)|0}while(!((t[O0>>2]|0)==(v|0)&&(t[O0+4>>2]|0)==(E|0)));if((E0|0)==65&&(E0=0,!0&(W&117440512|0)==100663296))break;O0=A+(o<<3)|0,t[O0>>2]=p,t[O0+4>>2]=i,o=G0(o|0,d|0,1,0)|0,d=S()|0}while(!1);if(a=G0(a|0,c|0,1,0)|0,c=S()|0,!((c|0)<(n|0)|(c|0)==(n|0)&a>>>0<r>>>0))break;i=W0+(a<<3)|0,p=t[i>>2]|0,i=t[i+4>>2]|0}i=G}else o=0,i=G}else o=0,e=0,i=0;while(!1);if(_e(eA|0,0,pA|0)|0,s1(W0|0,S0|0,e<<3|0)|0,Y0(S0),(e|0)==0&(i|0)==0){E0=89;break}else A=A+(o<<3)|0,n=i,r=e}if((E0|0)==16)!0&(i&117440512|0)==0?(i=4,E0=27):E0=21;else if((E0|0)==31)R0(27795,27122,620,27132);else{if((E0|0)==41)return Y0(W0),Y0(eA),E0=10,E0|0;if((E0|0)==48)return Y0(W0),Y0(eA),E0=13,E0|0;(E0|0)==80?R0(27795,27122,711,27132):(E0|0)==81?R0(27795,27122,723,27132):(E0|0)==85&&(s1(A|0,W0|0,r<<3|0)|0,E0=89)}return(E0|0)==21?(Y0(W0),Y0(eA),E0=5,E0|0):(E0|0)==27?(Y0(W0),Y0(eA),E0=i,E0|0):(E0|0)==89?(Y0(W0),Y0(eA),E0=0,E0|0):0}function Ol(e,A,r,n,i,o,a){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0,o=o|0,a=a|0;var c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0;if(W=L,L=L+16|0,T=W,!((r|0)>0|(r|0)==0&A>>>0>0))return T=0,L=W,T|0;if((a|0)>=16)return T=12,L=W,T|0;I=0,P=0,E=0,c=0;A:for(;;){if(p=e+(I<<3)|0,d=t[p>>2]|0,p=t[p+4>>2]|0,v=C0(d|0,p|0,52)|0,S()|0,(v&15|0)>(a|0)){c=12,d=11;break}if(sr(T,d,p,a),v=T,p=t[v>>2]|0,v=t[v+4>>2]|0,(p|0)==0&(v|0)==0)d=E;else{d=E;do{if(!((c|0)<(o|0)|(c|0)==(o|0)&d>>>0<i>>>0)){d=10;break A}E=n+(d<<3)|0,t[E>>2]=p,t[E+4>>2]=v,d=G0(d|0,c|0,1,0)|0,c=S()|0,lr(T),E=T,p=t[E>>2]|0,v=t[E+4>>2]|0}while(!((p|0)==0&(v|0)==0))}if(I=G0(I|0,P|0,1,0)|0,P=S()|0,(P|0)<(r|0)|(P|0)==(r|0)&I>>>0<A>>>0)E=d;else{c=0,d=11;break}}return(d|0)==10?(T=14,L=W,T|0):(d|0)==11?(L=W,c|0):0}function Ul(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0;I=L,L=L+16|0,E=I;A:do if((r|0)>0|(r|0)==0&A>>>0>0){for(p=0,a=0,o=0,v=0;;){if(d=e+(p<<3)|0,c=t[d>>2]|0,d=t[d+4>>2]|0,!((c|0)==0&(d|0)==0)&&(d=(v1(c,d,n,E)|0)==0,c=E,a=G0(t[c>>2]|0,t[c+4>>2]|0,a|0,o|0)|0,o=S()|0,!d)){o=12;break}if(p=G0(p|0,v|0,1,0)|0,v=S()|0,!((v|0)<(r|0)|(v|0)==(r|0)&p>>>0<A>>>0))break A}return L=I,o|0}else a=0,o=0;while(!1);return t[i>>2]=a,t[i+4>>2]=o,i=0,L=I,i|0}function jl(e,A){return e=e|0,A=A|0,A=C0(e|0,A|0,52)|0,S()|0,A&1|0}function KA(e,A){e=e|0,A=A|0;var r=0,n=0,i=0;if(i=C0(e|0,A|0,52)|0,S()|0,i=i&15,!i)return i=0,i|0;for(n=1;;){if(r=C0(e|0,A|0,(15-n|0)*3|0)|0,S()|0,r=r&7,r|0){n=5;break}if(n>>>0<i>>>0)n=n+1|0;else{r=0,n=5;break}}return(n|0)==5?r|0:0}function tr(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0,d=0;if(d=C0(e|0,A|0,52)|0,S()|0,d=d&15,!d)return c=A,d=e,nA(c|0),d|0;for(c=1,r=0;;){o=(15-c|0)*3|0,n=x0(7,0,o|0)|0,i=S()|0,a=C0(e|0,A|0,o|0)|0,S()|0,o=x0(We(a&7)|0,0,o|0)|0,a=S()|0,e=o|e&~n,A=a|A&~i;A:do if(!r)if((o&n|0)==0&(a&i|0)==0)r=0;else if(n=C0(e|0,A|0,52)|0,S()|0,n=n&15,!n)r=1;else{r=1;e:for(;;){switch(a=C0(e|0,A|0,(15-r|0)*3|0)|0,S()|0,a&7){case 1:break e;case 0:break;default:{r=1;break A}}if(r>>>0<n>>>0)r=r+1|0;else{r=1;break A}}for(r=1;;)if(a=(15-r|0)*3|0,i=C0(e|0,A|0,a|0)|0,S()|0,o=x0(7,0,a|0)|0,A=A&~(S()|0),a=x0(We(i&7)|0,0,a|0)|0,e=e&~o|a,A=A|(S()|0),r>>>0<n>>>0)r=r+1|0;else{r=1;break}}while(!1);if(c>>>0<d>>>0)c=c+1|0;else break}return nA(A|0),e|0}function Ge(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0;if(n=C0(e|0,A|0,52)|0,S()|0,n=n&15,!n)return r=A,n=e,nA(r|0),n|0;for(r=1;o=(15-r|0)*3|0,a=C0(e|0,A|0,o|0)|0,S()|0,i=x0(7,0,o|0)|0,A=A&~(S()|0),o=x0(We(a&7)|0,0,o|0)|0,e=o|e&~i,A=S()|0|A,r>>>0<n>>>0;)r=r+1|0;return nA(A|0),e|0}function $l(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0,d=0;if(d=C0(e|0,A|0,52)|0,S()|0,d=d&15,!d)return c=A,d=e,nA(c|0),d|0;for(c=1,r=0;;){o=(15-c|0)*3|0,n=x0(7,0,o|0)|0,i=S()|0,a=C0(e|0,A|0,o|0)|0,S()|0,o=x0(De(a&7)|0,0,o|0)|0,a=S()|0,e=o|e&~n,A=a|A&~i;A:do if(!r)if((o&n|0)==0&(a&i|0)==0)r=0;else if(n=C0(e|0,A|0,52)|0,S()|0,n=n&15,!n)r=1;else{r=1;e:for(;;){switch(a=C0(e|0,A|0,(15-r|0)*3|0)|0,S()|0,a&7){case 1:break e;case 0:break;default:{r=1;break A}}if(r>>>0<n>>>0)r=r+1|0;else{r=1;break A}}for(r=1;;)if(i=(15-r|0)*3|0,o=x0(7,0,i|0)|0,a=A&~(S()|0),A=C0(e|0,A|0,i|0)|0,S()|0,A=x0(De(A&7)|0,0,i|0)|0,e=e&~o|A,A=a|(S()|0),r>>>0<n>>>0)r=r+1|0;else{r=1;break}}while(!1);if(c>>>0<d>>>0)c=c+1|0;else break}return nA(A|0),e|0}function rr(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0;if(n=C0(e|0,A|0,52)|0,S()|0,n=n&15,!n)return r=A,n=e,nA(r|0),n|0;for(r=1;a=(15-r|0)*3|0,o=x0(7,0,a|0)|0,i=A&~(S()|0),A=C0(e|0,A|0,a|0)|0,S()|0,A=x0(De(A&7)|0,0,a|0)|0,e=A|e&~o,A=S()|0|i,r>>>0<n>>>0;)r=r+1|0;return nA(A|0),e|0}function Wl(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(d=L,L=L+64|0,c=d+40|0,n=d+24|0,i=d+12|0,o=d,x0(A|0,0,52)|0,r=S()|0|134225919,!A)return(t[e+4>>2]|0)>2||(t[e+8>>2]|0)>2||(t[e+12>>2]|0)>2?(a=0,c=0,nA(a|0),L=d,c|0):(x0(e2(e)|0,0,45)|0,a=S()|0|r,c=-1,nA(a|0),L=d,c|0);if(t[c>>2]=t[e>>2],t[c+4>>2]=t[e+4>>2],t[c+8>>2]=t[e+8>>2],t[c+12>>2]=t[e+12>>2],a=c+4|0,(A|0)>0)for(e=-1;t[n>>2]=t[a>>2],t[n+4>>2]=t[a+4>>2],t[n+8>>2]=t[a+8>>2],A&1?(bl(a),t[i>>2]=t[a>>2],t[i+4>>2]=t[a+4>>2],t[i+8>>2]=t[a+8>>2],O1(i)):(l2(a),t[i>>2]=t[a>>2],t[i+4>>2]=t[a+4>>2],t[i+8>>2]=t[a+8>>2],$e(i)),qt(n,i,o),$A(o),v=(15-A|0)*3|0,p=x0(7,0,v|0)|0,r=r&~(S()|0),v=x0(Q1(o)|0,0,v|0)|0,e=v|e&~p,r=S()|0|r,(A|0)>1;)A=A+-1|0;else e=-1;A:do if((t[a>>2]|0)<=2&&(t[c+8>>2]|0)<=2&&(t[c+12>>2]|0)<=2){if(n=e2(c)|0,A=x0(n|0,0,45)|0,A=A|e,e=S()|0|r&-1040385,o=sl(c)|0,!(SA(n)|0)){if((o|0)<=0)break;for(i=0;;){if(n=C0(A|0,e|0,52)|0,S()|0,n=n&15,n)for(r=1;v=(15-r|0)*3|0,c=C0(A|0,e|0,v|0)|0,S()|0,p=x0(7,0,v|0)|0,e=e&~(S()|0),v=x0(We(c&7)|0,0,v|0)|0,A=A&~p|v,e=e|(S()|0),r>>>0<n>>>0;)r=r+1|0;if(i=i+1|0,(i|0)==(o|0))break A}}i=C0(A|0,e|0,52)|0,S()|0,i=i&15;e:do if(i){r=1;t:for(;;){switch(v=C0(A|0,e|0,(15-r|0)*3|0)|0,S()|0,v&7){case 1:break t;case 0:break;default:break e}if(r>>>0<i>>>0)r=r+1|0;else break e}if(t2(n,t[c>>2]|0)|0)for(r=1;c=(15-r|0)*3|0,p=x0(7,0,c|0)|0,v=e&~(S()|0),e=C0(A|0,e|0,c|0)|0,S()|0,e=x0(De(e&7)|0,0,c|0)|0,A=A&~p|e,e=v|(S()|0),r>>>0<i>>>0;)r=r+1|0;else for(r=1;v=(15-r|0)*3|0,c=C0(A|0,e|0,v|0)|0,S()|0,p=x0(7,0,v|0)|0,e=e&~(S()|0),v=x0(We(c&7)|0,0,v|0)|0,A=A&~p|v,e=e|(S()|0),r>>>0<i>>>0;)r=r+1|0}while(!1);if((o|0)>0){r=0;do A=tr(A,e)|0,e=S()|0,r=r+1|0;while((r|0)!=(o|0))}}else A=0,e=0;while(!1);return p=e,v=A,nA(p|0),L=d,v|0}function ce(e){return e=e|0,(e|0)%2|0|0}function nr(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0;return i=L,L=L+16|0,n=i,A>>>0>15?(n=4,L=i,n|0):(t[e+4>>2]&2146435072|0)==2146435072||(t[e+8+4>>2]&2146435072|0)==2146435072?(n=3,L=i,n|0):(Hl(e,A,n),A=Wl(n,A)|0,n=S()|0,t[r>>2]=A,t[r+4>>2]=n,(A|0)==0&(n|0)==0&&R0(27795,27122,1050,27145),n=0,L=i,n|0)}function ir(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0;if(i=r+4|0,o=C0(e|0,A|0,52)|0,S()|0,o=o&15,a=C0(e|0,A|0,45)|0,S()|0,n=(o|0)==0,SA(a&127)|0){if(n)return a=1,a|0;n=1}else{if(n)return a=0,a|0;(t[i>>2]|0)==0&&(t[r+8>>2]|0)==0?n=(t[r+12>>2]|0)!=0&1:n=1}for(r=1;r&1?O1(i):$e(i),a=C0(e|0,A|0,(15-r|0)*3|0)|0,S()|0,a2(i,a&7),r>>>0<o>>>0;)r=r+1|0;return n|0}function t1(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(v=L,L=L+16|0,d=v,p=C0(e|0,A|0,45)|0,S()|0,p=p&127,p>>>0>121)return t[r>>2]=0,t[r+4>>2]=0,t[r+8>>2]=0,t[r+12>>2]=0,p=5,L=v,p|0;A:do if((SA(p)|0)!=0&&(o=C0(e|0,A|0,52)|0,S()|0,o=o&15,(o|0)!=0)){n=1;e:for(;;){switch(c=C0(e|0,A|0,(15-n|0)*3|0)|0,S()|0,c&7){case 5:break e;case 0:break;default:{n=A;break A}}if(n>>>0<o>>>0)n=n+1|0;else{n=A;break A}}for(i=1,n=A;A=(15-i|0)*3|0,a=x0(7,0,A|0)|0,c=n&~(S()|0),n=C0(e|0,n|0,A|0)|0,S()|0,n=x0(De(n&7)|0,0,A|0)|0,e=e&~a|n,n=c|(S()|0),i>>>0<o>>>0;)i=i+1|0}else n=A;while(!1);if(c=7696+(p*28|0)|0,t[r>>2]=t[c>>2],t[r+4>>2]=t[c+4>>2],t[r+8>>2]=t[c+8>>2],t[r+12>>2]=t[c+12>>2],!(ir(e,n,r)|0))return p=0,L=v,p|0;if(a=r+4|0,t[d>>2]=t[a>>2],t[d+4>>2]=t[a+4>>2],t[d+8>>2]=t[a+8>>2],o=C0(e|0,n|0,52)|0,S()|0,c=o&15,o&1?($e(a),o=c+1|0):o=c,!(SA(p)|0))n=0;else{A:do if(!c)n=0;else for(A=1;;){if(i=C0(e|0,n|0,(15-A|0)*3|0)|0,S()|0,i=i&7,i|0){n=i;break A}if(A>>>0<c>>>0)A=A+1|0;else{n=0;break}}while(!1);n=(n|0)==4&1}if(!(e1(r,o,n,0)|0))(o|0)!=(c|0)&&(t[a>>2]=t[d>>2],t[a+4>>2]=t[d+4>>2],t[a+8>>2]=t[d+8>>2]);else{if(SA(p)|0)do;while((e1(r,o,0,0)|0)!=0);(o|0)!=(c|0)&&l2(a)}return p=0,L=v,p|0}function Ye(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0;return o=L,L=L+16|0,n=o,i=t1(e,A,n)|0,i|0?(L=o,i|0):(i=C0(e|0,A|0,52)|0,S()|0,_l(n,i&15,r),i=0,L=o,i|0)}function r1(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0;if(a=L,L=L+16|0,o=a,n=t1(e,A,o)|0,n|0)return o=n,L=a,o|0;n=C0(e|0,A|0,45)|0,S()|0,n=(SA(n&127)|0)==0,i=C0(e|0,A|0,52)|0,S()|0,i=i&15;A:do if(!n){if(i|0)for(n=1;;){if(c=x0(7,0,(15-n|0)*3|0)|0,!((c&e|0)==0&((S()|0)&A|0)==0))break A;if(n>>>0<i>>>0)n=n+1|0;else break}return Jt(o,i,0,5,r),c=0,L=a,c|0}while(!1);return Kt(o,i,0,6,r),c=0,L=a,c|0}function Gl(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0;if(i=C0(e|0,A|0,45)|0,S()|0,!(SA(i&127)|0))return i=2,t[r>>2]=i,0;if(i=C0(e|0,A|0,52)|0,S()|0,i=i&15,!i)return i=5,t[r>>2]=i,0;for(n=1;;){if(o=x0(7,0,(15-n|0)*3|0)|0,!((o&e|0)==0&((S()|0)&A|0)==0)){n=2,e=6;break}if(n>>>0<i>>>0)n=n+1|0;else{n=5,e=6;break}}return(e|0)==6&&(t[r>>2]=n),0}function v2(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0;E=L,L=L+128|0,p=E+112|0,o=E+96|0,v=E,i=C0(e|0,A|0,52)|0,S()|0,c=i&15,t[p>>2]=c,a=C0(e|0,A|0,45)|0,S()|0,a=a&127;A:do if(SA(a)|0){if(c|0)for(n=1;;){if(d=x0(7,0,(15-n|0)*3|0)|0,!((d&e|0)==0&((S()|0)&A|0)==0)){i=0;break A}if(n>>>0<c>>>0)n=n+1|0;else break}if(i&1)i=1;else return d=x0(c+1|0,0,52)|0,v=S()|0|A&-15728641,p=x0(7,0,(14-c|0)*3|0)|0,v=v2((d|e)&~p,v&~(S()|0),r)|0,L=E,v|0}else i=0;while(!1);if(n=t1(e,A,o)|0,!n){i?(p2(o,p,v),d=5):(g2(o,p,v),d=6);A:do if(SA(a)|0)if(!c)e=5;else for(n=1;;){if(a=x0(7,0,(15-n|0)*3|0)|0,!((a&e|0)==0&((S()|0)&A|0)==0)){e=2;break A}if(n>>>0<c>>>0)n=n+1|0;else{e=5;break}}else e=2;while(!1);_e(r|0,-1,e<<2|0)|0;A:do if(i)for(o=0;;){if(a=v+(o<<4)|0,Il(a,t[p>>2]|0)|0,a=t[a>>2]|0,c=t[r>>2]|0,(c|0)==-1|(c|0)==(a|0))n=r;else{i=0;do{if(i=i+1|0,i>>>0>=e>>>0){n=1;break A}n=r+(i<<2)|0,c=t[n>>2]|0}while(!((c|0)==-1|(c|0)==(a|0)))}if(t[n>>2]=a,o=o+1|0,o>>>0>=d>>>0){n=0;break}}else for(o=0;;){if(a=v+(o<<4)|0,e1(a,t[p>>2]|0,0,1)|0,a=t[a>>2]|0,c=t[r>>2]|0,(c|0)==-1|(c|0)==(a|0))n=r;else{i=0;do{if(i=i+1|0,i>>>0>=e>>>0){n=1;break A}n=r+(i<<2)|0,c=t[n>>2]|0}while(!((c|0)==-1|(c|0)==(a|0)))}if(t[n>>2]=a,o=o+1|0,o>>>0>=d>>>0){n=0;break}}while(!1)}return v=n,L=E,v|0}function Yl(){return 12}function or(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0,d=0;if(e>>>0>15)return c=4,c|0;if(x0(e|0,0,52)|0,c=S()|0|134225919,!e){r=0,n=0;do SA(n)|0&&(x0(n|0,0,45)|0,a=c|(S()|0),e=A+(r<<3)|0,t[e>>2]=-1,t[e+4>>2]=a,r=r+1|0),n=n+1|0;while((n|0)!=122);return r=0,r|0}r=0,a=0;do{if(SA(a)|0){for(x0(a|0,0,45)|0,n=1,i=-1,o=c|(S()|0);d=x0(7,0,(15-n|0)*3|0)|0,i=i&~d,o=o&~(S()|0),(n|0)!=(e|0);)n=n+1|0;d=A+(r<<3)|0,t[d>>2]=i,t[d+4>>2]=o,r=r+1|0}a=a+1|0}while((a|0)!=122);return r=0,r|0}function ql(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0;if(s0=L,L=L+16|0,R=s0,u0=C0(e|0,A|0,52)|0,S()|0,u0=u0&15,r>>>0>15)return u0=4,L=s0,u0|0;if((u0|0)<(r|0))return u0=12,L=s0,u0|0;if((u0|0)!=(r|0))if(o=x0(r|0,0,52)|0,o=o|e,c=S()|0|A&-15728641,(u0|0)>(r|0)){d=r;do W=x0(7,0,(14-d|0)*3|0)|0,d=d+1|0,o=W|o,c=S()|0|c;while((d|0)<(u0|0));W=o}else W=o;else W=e,c=A;T=C0(W|0,c|0,45)|0,S()|0;A:do if(SA(T&127)|0){if(d=C0(W|0,c|0,52)|0,S()|0,d=d&15,d|0)for(o=1;;){if(T=x0(7,0,(15-o|0)*3|0)|0,!((T&W|0)==0&((S()|0)&c|0)==0)){p=33;break A}if(o>>>0<d>>>0)o=o+1|0;else break}if(T=n,t[T>>2]=0,t[T+4>>2]=0,(u0|0)>(r|0)){for(T=A&-15728641,P=u0;;){if(I=P,P=P+-1|0,P>>>0>15|(u0|0)<(P|0)){p=19;break}if((u0|0)!=(P|0))if(o=x0(P|0,0,52)|0,o=o|e,d=S()|0|T,(u0|0)<(I|0))E=o;else{p=P;do E=x0(7,0,(14-p|0)*3|0)|0,p=p+1|0,o=E|o,d=S()|0|d;while((p|0)<(u0|0));E=o}else E=e,d=A;if(v=C0(E|0,d|0,45)|0,S()|0,!(SA(v&127)|0))o=0;else{v=C0(E|0,d|0,52)|0,S()|0,v=v&15;e:do if(!v)o=0;else for(p=1;;){if(o=C0(E|0,d|0,(15-p|0)*3|0)|0,S()|0,o=o&7,o|0)break e;if(p>>>0<v>>>0)p=p+1|0;else{o=0;break}}while(!1);o=(o|0)==0&1}if(d=C0(e|0,A|0,(15-I|0)*3|0)|0,S()|0,d=d&7,(d|0)==7){i=5,p=42;break}if(o=(o|0)!=0,(d|0)==1&o){i=5,p=42;break}if(E=d+(((d|0)!=0&o)<<31>>31)|0,E|0&&(p=u0-I|0,p=He(7,0,p,((p|0)<0)<<31>>31)|0,v=S()|0,o?(o=QA(p|0,v|0,5,0)|0,o=G0(o|0,S()|0,-5,-1)|0,o=Ve(o|0,S()|0,6,0)|0,o=G0(o|0,S()|0,1,0)|0,d=S()|0):(o=p,d=v),I=E+-1|0,I=QA(p|0,v|0,I|0,((I|0)<0)<<31>>31|0)|0,I=G0(o|0,d|0,I|0,S()|0)|0,E=S()|0,v=n,v=G0(I|0,E|0,t[v>>2]|0,t[v+4>>2]|0)|0,E=S()|0,I=n,t[I>>2]=v,t[I+4>>2]=E),(P|0)<=(r|0)){p=37;break}}if((p|0)==19)R0(27795,27122,1367,27158);else if((p|0)==37){a=n,i=t[a+4>>2]|0,a=t[a>>2]|0;break}else if((p|0)==42)return L=s0,i|0}else i=0,a=0}else p=33;while(!1);A:do if((p|0)==33)if(T=n,t[T>>2]=0,t[T+4>>2]=0,(u0|0)>(r|0)){for(o=u0;;){if(i=C0(e|0,A|0,(15-o|0)*3|0)|0,S()|0,i=i&7,(i|0)==7){i=5;break}if(a=u0-o|0,a=He(7,0,a,((a|0)<0)<<31>>31)|0,i=QA(a|0,S()|0,i|0,0)|0,a=S()|0,T=n,a=G0(t[T>>2]|0,t[T+4>>2]|0,i|0,a|0)|0,i=S()|0,T=n,t[T>>2]=a,t[T+4>>2]=i,o=o+-1|0,(o|0)<=(r|0))break A}return L=s0,i|0}else i=0,a=0;while(!1);return v1(W,c,u0,R)|0&&R0(27795,27122,1327,27173),u0=R,R=t[u0+4>>2]|0,((i|0)>-1|(i|0)==-1&a>>>0>4294967295)&((R|0)>(i|0)|((R|0)==(i|0)?(t[u0>>2]|0)>>>0>a>>>0:0))?(u0=0,L=s0,u0|0):(R0(27795,27122,1407,27158),0)}function Xl(e,A,r,n,i,o){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0,o=o|0;var a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0;if(E=L,L=L+16|0,a=E,i>>>0>15)return o=4,L=E,o|0;if(c=C0(r|0,n|0,52)|0,S()|0,c=c&15,(c|0)>(i|0))return o=12,L=E,o|0;if(v1(r,n,i,a)|0&&R0(27795,27122,1327,27173),v=a,p=t[v+4>>2]|0,!(((A|0)>-1|(A|0)==-1&e>>>0>4294967295)&((p|0)>(A|0)|((p|0)==(A|0)?(t[v>>2]|0)>>>0>e>>>0:0))))return o=2,L=E,o|0;v=i-c|0,i=x0(i|0,0,52)|0,d=S()|0|n&-15728641,p=o,t[p>>2]=i|r,t[p+4>>2]=d,p=C0(r|0,n|0,45)|0,S()|0;A:do if(SA(p&127)|0){if(c|0)for(a=1;;){if(p=x0(7,0,(15-a|0)*3|0)|0,!((p&r|0)==0&((S()|0)&n|0)==0))break A;if(a>>>0<c>>>0)a=a+1|0;else break}if((v|0)<1)return o=0,L=E,o|0;for(p=c^15,n=-1,d=1,a=1;;){c=v-d|0,c=He(7,0,c,((c|0)<0)<<31>>31)|0,r=S()|0;do if(a)if(a=QA(c|0,r|0,5,0)|0,a=G0(a|0,S()|0,-5,-1)|0,a=Ve(a|0,S()|0,6,0)|0,i=S()|0,(A|0)>(i|0)|(A|0)==(i|0)&e>>>0>a>>>0){A=G0(e|0,A|0,-1,-1)|0,A=ZA(A|0,S()|0,a|0,i|0)|0,a=S()|0,I=o,T=t[I>>2]|0,I=t[I+4>>2]|0,W=(p+n|0)*3|0,P=x0(7,0,W|0)|0,I=I&~(S()|0),n=Ve(A|0,a|0,c|0,r|0)|0,e=S()|0,i=G0(n|0,e|0,2,0)|0,W=x0(i|0,S()|0,W|0)|0,I=S()|0|I,i=o,t[i>>2]=W|T&~P,t[i+4>>2]=I,e=QA(n|0,e|0,c|0,r|0)|0,e=ZA(A|0,a|0,e|0,S()|0)|0,a=0,A=S()|0;break}else{W=o,P=t[W>>2]|0,W=t[W+4>>2]|0,T=x0(7,0,(p+n|0)*3|0)|0,W=W&~(S()|0),a=o,t[a>>2]=P&~T,t[a+4>>2]=W,a=1;break}else P=o,i=t[P>>2]|0,P=t[P+4>>2]|0,n=(p+n|0)*3|0,I=x0(7,0,n|0)|0,P=P&~(S()|0),W=Ve(e|0,A|0,c|0,r|0)|0,a=S()|0,n=x0(W|0,a|0,n|0)|0,P=S()|0|P,T=o,t[T>>2]=n|i&~I,t[T+4>>2]=P,a=QA(W|0,a|0,c|0,r|0)|0,e=ZA(e|0,A|0,a|0,S()|0)|0,a=0,A=S()|0;while(!1);if((v|0)>(d|0))n=~d,d=d+1|0;else{A=0;break}}return L=E,A|0}while(!1);if((v|0)<1)return W=0,L=E,W|0;for(i=c^15,a=1;;)if(T=v-a|0,T=He(7,0,T,((T|0)<0)<<31>>31)|0,W=S()|0,d=o,r=t[d>>2]|0,d=t[d+4>>2]|0,c=(i-a|0)*3|0,n=x0(7,0,c|0)|0,d=d&~(S()|0),I=Ve(e|0,A|0,T|0,W|0)|0,P=S()|0,c=x0(I|0,P|0,c|0)|0,d=S()|0|d,p=o,t[p>>2]=c|r&~n,t[p+4>>2]=d,W=QA(I|0,P|0,T|0,W|0)|0,e=ZA(e|0,A|0,W|0,S()|0)|0,A=S()|0,(v|0)<=(a|0)){A=0;break}else a=a+1|0;return L=E,A|0}function sr(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0;i=C0(A|0,r|0,52)|0,S()|0,i=i&15,(A|0)==0&(r|0)==0|((n|0)>15|(i|0)>(n|0))?(o=-1,A=-1,r=0,i=0):(A=m2(A,r,i+1|0,n)|0,a=(S()|0)&-15728641,r=x0(n|0,0,52)|0,r=A|r,a=a|(S()|0),A=(MA(r,a)|0)==0,o=i,A=A?-1:n,i=a),a=e,t[a>>2]=r,t[a+4>>2]=i,t[e+8>>2]=o,t[e+12>>2]=A}function b2(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0;if(i=C0(e|0,A|0,52)|0,S()|0,i=i&15,o=n+8|0,t[o>>2]=i,(e|0)==0&(A|0)==0|((r|0)>15|(i|0)>(r|0))){r=n,t[r>>2]=0,t[r+4>>2]=0,t[o>>2]=-1,t[n+12>>2]=-1;return}if(e=m2(e,A,i+1|0,r)|0,o=(S()|0)&-15728641,i=x0(r|0,0,52)|0,i=e|i,o=o|(S()|0),e=n,t[e>>2]=i,t[e+4>>2]=o,e=n+12|0,MA(i,o)|0){t[e>>2]=r;return}else{t[e>>2]=-1;return}}function lr(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0;if(r=e,A=t[r>>2]|0,r=t[r+4>>2]|0,!((A|0)==0&(r|0)==0)&&(n=C0(A|0,r|0,52)|0,S()|0,n=n&15,c=x0(1,0,(n^15)*3|0)|0,A=G0(c|0,S()|0,A|0,r|0)|0,r=S()|0,c=e,t[c>>2]=A,t[c+4>>2]=r,c=e+8|0,a=t[c>>2]|0,!((n|0)<(a|0)))){for(d=e+12|0,o=n;;){if((o|0)==(a|0)){n=5;break}if(p=(o|0)==(t[d>>2]|0),i=(15-o|0)*3|0,n=C0(A|0,r|0,i|0)|0,S()|0,n=n&7,p&((n|0)==1&!0)){n=7;break}if(!((n|0)==7&!0)){n=10;break}if(p=x0(1,0,i|0)|0,A=G0(A|0,r|0,p|0,S()|0)|0,r=S()|0,p=e,t[p>>2]=A,t[p+4>>2]=r,(o|0)>(a|0))o=o+-1|0;else{n=10;break}}if((n|0)==5){p=e,t[p>>2]=0,t[p+4>>2]=0,t[c>>2]=-1,t[d>>2]=-1;return}else if((n|0)==7){a=x0(1,0,i|0)|0,a=G0(A|0,r|0,a|0,S()|0)|0,c=S()|0,p=e,t[p>>2]=a,t[p+4>>2]=c,t[d>>2]=o+-1;return}else if((n|0)==10)return}}function b1(e){e=+e;var A=0;return A=e<0?e+6.283185307179586:e,+(e>=6.283185307179586?A+-6.283185307179586:A)}function n1(e,A){return e=e|0,A=A|0,+aA(+(+M[e>>3]-+M[A>>3]))<17453292519943298e-27?(A=+aA(+(+M[e+8>>3]-+M[A+8>>3]))<17453292519943298e-27,A|0):(A=0,A|0)}function ie(e,A){switch(e=+e,A=A|0,A|0){case 1:{e=e<0?e+6.283185307179586:e;break}case 2:{e=e>0?e+-6.283185307179586:e;break}}return+e}function Jl(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0;return i=+M[A>>3],n=+M[e>>3],o=+cA(+((i-n)*.5)),r=+cA(+((+M[A+8>>3]-+M[e+8>>3])*.5)),r=o*o+r*(+mA(+i)*+mA(+n)*r),+(+vA(+ +yA(+r),+ +yA(+(1-r)))*2)}function w1(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0;return i=+M[A>>3],n=+M[e>>3],o=+cA(+((i-n)*.5)),r=+cA(+((+M[A+8>>3]-+M[e+8>>3])*.5)),r=o*o+r*(+mA(+i)*+mA(+n)*r),+(+vA(+ +yA(+r),+ +yA(+(1-r)))*2*6371.007180918475)}function Kl(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0;return i=+M[A>>3],n=+M[e>>3],o=+cA(+((i-n)*.5)),r=+cA(+((+M[A+8>>3]-+M[e+8>>3])*.5)),r=o*o+r*(+mA(+i)*+mA(+n)*r),+(+vA(+ +yA(+r),+ +yA(+(1-r)))*2*6371.007180918475*1e3)}function Rl(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0;return o=+M[A>>3],n=+mA(+o),i=+M[A+8>>3]-+M[e+8>>3],a=n*+cA(+i),r=+M[e>>3],+ +vA(+a,+(+cA(+o)*+mA(+r)-+mA(+i)*(n*+cA(+r))))}function A3(e,A,r,n){e=e|0,A=+A,r=+r,n=n|0;var i=0,o=0,a=0,c=0;if(r<1e-16){t[n>>2]=t[e>>2],t[n+4>>2]=t[e+4>>2],t[n+8>>2]=t[e+8>>2],t[n+12>>2]=t[e+12>>2];return}o=A<0?A+6.283185307179586:A,o=A>=6.283185307179586?o+-6.283185307179586:o;do if(o<1e-16)A=+M[e>>3]+r,M[n>>3]=A,i=n;else{if(i=+aA(+(o+-3.141592653589793))<1e-16,A=+M[e>>3],i){A=A-r,M[n>>3]=A,i=n;break}if(a=+mA(+r),r=+cA(+r),A=a*+cA(+A)+ +mA(+o)*(r*+mA(+A)),A=A>1?1:A,A=+Zt(+(A<-1?-1:A)),M[n>>3]=A,+aA(+(A+-1.5707963267948966))<1e-16){M[n>>3]=1.5707963267948966,M[n+8>>3]=0;return}if(+aA(+(A+1.5707963267948966))<1e-16){M[n>>3]=-1.5707963267948966,M[n+8>>3]=0;return}if(c=1/+mA(+A),o=r*+cA(+o)*c,r=+M[e>>3],A=c*((a-+cA(+A)*+cA(+r))/+mA(+r)),a=o>1?1:o,A=A>1?1:A,A=+M[e+8>>3]+ +vA(+(a<-1?-1:a),+(A<-1?-1:A)),A>3.141592653589793)do A=A+-6.283185307179586;while(A>3.141592653589793);if(A<-3.141592653589793)do A=A+6.283185307179586;while(A<-3.141592653589793);M[n+8>>3]=A;return}while(!1);if(+aA(+(A+-1.5707963267948966))<1e-16){M[i>>3]=1.5707963267948966,M[n+8>>3]=0;return}if(+aA(+(A+1.5707963267948966))<1e-16){M[i>>3]=-1.5707963267948966,M[n+8>>3]=0;return}if(A=+M[e+8>>3],A>3.141592653589793)do A=A+-6.283185307179586;while(A>3.141592653589793);if(A<-3.141592653589793)do A=A+6.283185307179586;while(A<-3.141592653589793);M[n+8>>3]=A}function w2(e,A){return e=e|0,A=A|0,e>>>0>15?(A=4,A|0):(M[A>>3]=+M[20656+(e<<3)>>3],A=0,A|0)}function e3(e,A){return e=e|0,A=A|0,e>>>0>15?(A=4,A|0):(M[A>>3]=+M[20784+(e<<3)>>3],A=0,A|0)}function t3(e,A){return e=e|0,A=A|0,e>>>0>15?(A=4,A|0):(M[A>>3]=+M[20912+(e<<3)>>3],A=0,A|0)}function r3(e,A){return e=e|0,A=A|0,e>>>0>15?(A=4,A|0):(M[A>>3]=+M[21040+(e<<3)>>3],A=0,A|0)}function $1(e,A){e=e|0,A=A|0;var r=0;return e>>>0>15?(A=4,A|0):(r=He(7,0,e,((e|0)<0)<<31>>31)|0,r=QA(r|0,S()|0,120,0)|0,e=S()|0,t[A>>2]=r|2,t[A+4>>2]=e,A=0,A|0)}function L2(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0;return I=+M[A>>3],v=+M[e>>3],d=+cA(+((I-v)*.5)),o=+M[A+8>>3],p=+M[e+8>>3],a=+cA(+((o-p)*.5)),c=+mA(+v),E=+mA(+I),a=d*d+a*(E*c*a),a=+vA(+ +yA(+a),+ +yA(+(1-a)))*2,d=+M[r>>3],I=+cA(+((d-I)*.5)),n=+M[r+8>>3],o=+cA(+((n-o)*.5)),i=+mA(+d),o=I*I+o*(E*i*o),o=+vA(+ +yA(+o),+ +yA(+(1-o)))*2,d=+cA(+((v-d)*.5)),n=+cA(+((p-n)*.5)),n=d*d+n*(c*i*n),n=+vA(+ +yA(+n),+ +yA(+(1-n)))*2,i=(a+o+n)*.5,+(+g1(+ +yA(+(+JA(+(i*.5))*+JA(+((i-a)*.5))*+JA(+((i-o)*.5))*+JA(+((i-n)*.5)))))*4)}function ar(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0;if(c=L,L=L+192|0,o=c+168|0,a=c,i=Ye(e,A,o)|0,i|0)return r=i,L=c,r|0;if(r1(e,A,a)|0&&R0(27795,27190,415,27199),A=t[a>>2]|0,(A|0)>0){if(n=+L2(a+8|0,a+8+(((A|0)!=1&1)<<4)|0,o)+0,(A|0)!=1){e=1;do i=e,e=e+1|0,n=n+ +L2(a+8+(i<<4)|0,a+8+(((e|0)%(A|0)|0)<<4)|0,o);while((e|0)<(A|0))}}else n=0;return M[r>>3]=n,r=0,L=c,r|0}function n3(e,A,r){return e=e|0,A=A|0,r=r|0,e=ar(e,A,r)|0,e|0||(M[r>>3]=+M[r>>3]*6371.007180918475*6371.007180918475),e|0}function i3(e,A,r){return e=e|0,A=A|0,r=r|0,e=ar(e,A,r)|0,e|0||(M[r>>3]=+M[r>>3]*6371.007180918475*6371.007180918475*1e3*1e3),e|0}function o3(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(c=L,L=L+176|0,a=c,e=j1(e,A,a)|0,e|0)return a=e,L=c,a|0;if(M[r>>3]=0,e=t[a>>2]|0,(e|0)<=1)return a=0,L=c,a|0;A=e+-1|0,e=0,n=+M[a+8>>3],i=+M[a+16>>3],o=0;do e=e+1|0,p=n,n=+M[a+8+(e<<4)>>3],v=+cA(+((n-p)*.5)),d=i,i=+M[a+8+(e<<4)+8>>3],d=+cA(+((i-d)*.5)),d=v*v+d*(+mA(+n)*+mA(+p)*d),o=o+ +vA(+ +yA(+d),+ +yA(+(1-d)))*2;while((e|0)<(A|0));return M[r>>3]=o,a=0,L=c,a|0}function s3(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(c=L,L=L+176|0,a=c,e=j1(e,A,a)|0,e|0)return a=e,o=+M[r>>3],o=o*6371.007180918475,M[r>>3]=o,L=c,a|0;if(M[r>>3]=0,e=t[a>>2]|0,(e|0)<=1)return a=0,o=0,o=o*6371.007180918475,M[r>>3]=o,L=c,a|0;A=e+-1|0,e=0,n=+M[a+8>>3],i=+M[a+16>>3],o=0;do e=e+1|0,p=n,n=+M[a+8+(e<<4)>>3],v=+cA(+((n-p)*.5)),d=i,i=+M[a+8+(e<<4)+8>>3],d=+cA(+((i-d)*.5)),d=v*v+d*(+mA(+p)*+mA(+n)*d),o=o+ +vA(+ +yA(+d),+ +yA(+(1-d)))*2;while((e|0)!=(A|0));return M[r>>3]=o,a=0,v=o,v=v*6371.007180918475,M[r>>3]=v,L=c,a|0}function l3(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(c=L,L=L+176|0,a=c,e=j1(e,A,a)|0,e|0)return a=e,o=+M[r>>3],o=o*6371.007180918475,o=o*1e3,M[r>>3]=o,L=c,a|0;if(M[r>>3]=0,e=t[a>>2]|0,(e|0)<=1)return a=0,o=0,o=o*6371.007180918475,o=o*1e3,M[r>>3]=o,L=c,a|0;A=e+-1|0,e=0,n=+M[a+8>>3],i=+M[a+16>>3],o=0;do e=e+1|0,p=n,n=+M[a+8+(e<<4)>>3],v=+cA(+((n-p)*.5)),d=i,i=+M[a+8+(e<<4)+8>>3],d=+cA(+((i-d)*.5)),d=v*v+d*(+mA(+p)*+mA(+n)*d),o=o+ +vA(+ +yA(+d),+ +yA(+(1-d)))*2;while((e|0)!=(A|0));return M[r>>3]=o,a=0,v=o,v=v*6371.007180918475,v=v*1e3,M[r>>3]=v,L=c,a|0}function a3(e){e=e|0;var A=0,r=0,n=0;return A=RA(1,12)|0,A||R0(27280,27235,49,27293),r=e+4|0,n=t[r>>2]|0,n|0?(n=n+8|0,t[n>>2]=A,t[r>>2]=A,A|0):(t[e>>2]|0&&R0(27310,27235,61,27333),n=e,t[n>>2]=A,t[r>>2]=A,A|0)}function c3(e,A){e=e|0,A=A|0;var r=0,n=0;return n=ve(24)|0,n||R0(27347,27235,78,27361),t[n>>2]=t[A>>2],t[n+4>>2]=t[A+4>>2],t[n+8>>2]=t[A+8>>2],t[n+12>>2]=t[A+12>>2],t[n+16>>2]=0,A=e+4|0,r=t[A>>2]|0,r|0?(t[r+16>>2]=n,t[A>>2]=n,n|0):(t[e>>2]|0&&R0(27376,27235,82,27361),t[e>>2]=n,t[A>>2]=n,n|0)}function k2(e){e=e|0;var A=0,r=0,n=0,i=0;if(e)for(n=1;;){if(A=t[e>>2]|0,A|0)do{if(r=t[A>>2]|0,r|0)do i=r,r=t[r+16>>2]|0,Y0(i);while((r|0)!=0);i=A,A=t[A+8>>2]|0,Y0(i)}while((A|0)!=0);if(A=e,e=t[e+8>>2]|0,n||Y0(A),e)n=0;else break}}function u3(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0,G=0,S0=0,$0=0,O0=0,iA=0,oA=0,pA=0,eA=0,W0=0,E0=0,fA=0,wA=0,sA=0;if(i=e+8|0,t[i>>2]|0)return sA=1,sA|0;if(n=t[e>>2]|0,!n)return sA=0,sA|0;A=n,r=0;do r=r+1|0,A=t[A+8>>2]|0;while((A|0)!=0);if(r>>>0<2)return sA=0,sA|0;fA=ve(r<<2)|0,fA||R0(27396,27235,317,27415),E0=ve(r<<5)|0,E0||R0(27437,27235,321,27415),t[e>>2]=0,$0=e+4|0,t[$0>>2]=0,t[i>>2]=0,r=0,W0=0,S0=0,E=0;A:for(;;){if(v=t[n>>2]|0,v){o=0,a=v;do{if(d=+M[a+8>>3],A=a,a=t[a+16>>2]|0,p=(a|0)==0,i=p?v:a,c=+M[i+8>>3],+aA(+(d-c))>3.141592653589793){sA=14;break}o=o+(c-d)*(+M[A>>3]+ +M[i>>3])}while(!p);if((sA|0)==14){sA=0,o=0,A=v;do G=+M[A+8>>3],eA=A+16|0,pA=t[eA>>2]|0,pA=(pA|0)==0?v:pA,i0=+M[pA+8>>3],o=o+(+M[A>>3]+ +M[pA>>3])*((i0<0?i0+6.283185307179586:i0)-(G<0?G+6.283185307179586:G)),A=t[((A|0)==0?n:eA)>>2]|0;while((A|0)!=0)}o>0?(t[fA+(W0<<2)>>2]=n,W0=W0+1|0,i=S0,A=E):sA=19}else sA=19;if((sA|0)==19){sA=0;do if(r){if(A=r+8|0,t[A>>2]|0){sA=21;break A}if(r=RA(1,12)|0,!r){sA=23;break A}t[A>>2]=r,i=r+4|0,a=r,A=E}else if(E){i=$0,a=E+8|0,A=n,r=e;break}else if(t[e>>2]|0){sA=27;break A}else{i=$0,a=e,A=n,r=e;break}while(!1);if(t[a>>2]=n,t[i>>2]=n,a=E0+(S0<<5)|0,p=t[n>>2]|0,p){for(v=E0+(S0<<5)+8|0,M[v>>3]=17976931348623157e292,E=E0+(S0<<5)+24|0,M[E>>3]=17976931348623157e292,M[a>>3]=-17976931348623157e292,I=E0+(S0<<5)+16|0,M[I>>3]=-17976931348623157e292,u0=17976931348623157e292,s0=-17976931348623157e292,i=0,P=p,d=17976931348623157e292,W=17976931348623157e292,R=-17976931348623157e292,c=-17976931348623157e292;o=+M[P>>3],G=+M[P+8>>3],P=t[P+16>>2]|0,T=(P|0)==0,i0=+M[(T?p:P)+8>>3],o<d&&(M[v>>3]=o,d=o),G<W&&(M[E>>3]=G,W=G),o>R?M[a>>3]=o:o=R,G>c&&(M[I>>3]=G,c=G),u0=G>0&G<u0?G:u0,s0=G<0&G>s0?G:s0,i=i|+aA(+(G-i0))>3.141592653589793,!T;)R=o;i&&(M[I>>3]=s0,M[E>>3]=u0)}else t[a>>2]=0,t[a+4>>2]=0,t[a+8>>2]=0,t[a+12>>2]=0,t[a+16>>2]=0,t[a+20>>2]=0,t[a+24>>2]=0,t[a+28>>2]=0;i=S0+1|0}if(eA=n+8|0,n=t[eA>>2]|0,t[eA>>2]=0,n)S0=i,E=A;else{sA=45;break}}if((sA|0)==21)R0(27213,27235,35,27247);else if((sA|0)==23)R0(27267,27235,37,27247);else if((sA|0)==27)R0(27310,27235,61,27333);else if((sA|0)==45){A:do if((W0|0)>0){for(eA=(i|0)==0,oA=i<<2,pA=(e|0)==0,iA=0,A=0;;){if(O0=t[fA+(iA<<2)>>2]|0,eA)sA=73;else{if(S0=ve(oA)|0,!S0){sA=50;break}if($0=ve(oA)|0,!$0){sA=52;break}e:do if(pA)r=0;else{for(i=0,r=0,a=e;n=E0+(i<<5)|0,M2(t[a>>2]|0,n,t[O0>>2]|0)|0?(t[S0+(r<<2)>>2]=a,t[$0+(r<<2)>>2]=n,T=r+1|0):T=r,a=t[a+8>>2]|0,a;)i=i+1|0,r=T;if((T|0)>0)if(n=t[S0>>2]|0,(T|0)==1)r=n;else for(I=0,P=-1,r=n,E=n;;){for(p=t[E>>2]|0,n=0,a=0;i=t[t[S0+(a<<2)>>2]>>2]|0,(i|0)==(p|0)?v=n:v=n+((M2(i,t[$0+(a<<2)>>2]|0,t[p>>2]|0)|0)&1)|0,a=a+1|0,(a|0)!=(T|0);)n=v;if(i=(v|0)>(P|0),r=i?E:r,n=I+1|0,(n|0)==(T|0))break e;I=n,P=i?v:P,E=t[S0+(n<<2)>>2]|0}else r=0}while(!1);if(Y0(S0),Y0($0),r){if(i=r+4|0,n=t[i>>2]|0,n)r=n+8|0;else if(t[r>>2]|0){sA=70;break}t[r>>2]=O0,t[i>>2]=O0}else sA=73}if((sA|0)==73){if(sA=0,A=t[O0>>2]|0,A|0)do $0=A,A=t[A+16>>2]|0,Y0($0);while((A|0)!=0);Y0(O0),A=1}if(iA=iA+1|0,(iA|0)>=(W0|0)){wA=A;break A}}(sA|0)==50?R0(27452,27235,249,27471):(sA|0)==52?R0(27490,27235,252,27471):(sA|0)==70&&R0(27310,27235,61,27333)}else wA=0;while(!1);return Y0(fA),Y0(E0),sA=wA,sA|0}return 0}function M2(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(!(Gt(A,r)|0)||(A=r2(A)|0,n=+M[r>>3],i=+M[r+8>>3],i=A&i<0?i+6.283185307179586:i,e=t[e>>2]|0,!e))return e=0,e|0;if(A){A=0,p=i,r=e;A:for(;;){for(;a=+M[r>>3],i=+M[r+8>>3],r=r+16|0,v=t[r>>2]|0,v=(v|0)==0?e:v,o=+M[v>>3],c=+M[v+8>>3],a>o?(d=a,a=c):(d=o,o=a,a=i,i=c),n=n==o|n==d?n+2220446049250313e-31:n,!!(n<o|n>d);)if(r=t[r>>2]|0,!r){r=22;break A}if(c=a<0?a+6.283185307179586:a,a=i<0?i+6.283185307179586:i,p=c==p|a==p?p+-2220446049250313e-31:p,d=c+(a-c)*((n-o)/(d-o)),(d<0?d+6.283185307179586:d)>p&&(A=A^1),r=t[r>>2]|0,!r){r=22;break}}if((r|0)==22)return A|0}else{A=0,p=i,r=e;A:for(;;){for(;a=+M[r>>3],i=+M[r+8>>3],r=r+16|0,v=t[r>>2]|0,v=(v|0)==0?e:v,o=+M[v>>3],c=+M[v+8>>3],a>o?(d=a,a=c):(d=o,o=a,a=i,i=c),n=n==o|n==d?n+2220446049250313e-31:n,!!(n<o|n>d);)if(r=t[r>>2]|0,!r){r=22;break A}if(p=a==p|i==p?p+-2220446049250313e-31:p,a+(i-a)*((n-o)/(d-o))>p&&(A=A^1),r=t[r>>2]|0,!r){r=22;break}}if((r|0)==22)return A|0}return 0}function we(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0;if(s0=L,L=L+32|0,u0=s0+16|0,R=s0,o=C0(e|0,A|0,52)|0,S()|0,o=o&15,P=C0(r|0,n|0,52)|0,S()|0,(o|0)!=(P&15|0))return u0=12,L=s0,u0|0;if(p=C0(e|0,A|0,45)|0,S()|0,p=p&127,v=C0(r|0,n|0,45)|0,S()|0,v=v&127,p>>>0>121|v>>>0>121)return u0=5,L=s0,u0|0;if(P=(p|0)!=(v|0),P){if(c=Wt(p,v)|0,(c|0)==7)return u0=1,L=s0,u0|0;d=Wt(v,p)|0,(d|0)==7?R0(27514,27538,161,27548):(T=c,a=d)}else T=0,a=0;E=SA(p)|0,I=SA(v)|0,t[u0>>2]=0,t[u0+4>>2]=0,t[u0+8>>2]=0,t[u0+12>>2]=0;do if(T){if(v=t[4272+(p*28|0)+(T<<2)>>2]|0,c=(v|0)>0,I)if(c){p=0,d=r,c=n;do d=$l(d,c)|0,c=S()|0,a=De(a)|0,(a|0)==1&&(a=De(1)|0),p=p+1|0;while((p|0)!=(v|0));v=a,p=d,d=c}else v=a,p=r,d=n;else if(c){p=0,d=r,c=n;do d=rr(d,c)|0,c=S()|0,a=De(a)|0,p=p+1|0;while((p|0)!=(v|0));v=a,p=d,d=c}else v=a,p=r,d=n;if(ir(p,d,u0)|0,P||R0(27563,27538,191,27548),c=(E|0)!=0,a=(I|0)!=0,c&a&&R0(27590,27538,192,27548),c){if(a=KA(e,A)|0,(a|0)==7){o=5;break}if(y0[22e3+(a*7|0)+T>>0]|0){o=1;break}d=t[21168+(a*28|0)+(T<<2)>>2]|0,p=d}else if(a){if(a=KA(p,d)|0,(a|0)==7){o=5;break}if(y0[22e3+(a*7|0)+v>>0]|0){o=1;break}p=0,d=t[21168+(v*28|0)+(a<<2)>>2]|0}else p=0,d=0;if((p|d|0)<0)o=5;else{if((d|0)>0){c=u0+4|0,a=0;do U1(c),a=a+1|0;while((a|0)!=(d|0))}if(t[R>>2]=0,t[R+4>>2]=0,t[R+8>>2]=0,a2(R,T),o|0)for(;ce(o)|0?O1(R):$e(R),(o|0)>1;)o=o+-1|0;if((p|0)>0){o=0;do U1(R),o=o+1|0;while((o|0)!=(p|0))}W=u0+4|0,GA(W,R,W),$A(W),W=51}}else if(ir(r,n,u0)|0,(E|0)!=0&(I|0)!=0)if((v|0)!=(p|0)&&R0(27621,27538,261,27548),a=KA(e,A)|0,o=KA(r,n)|0,(a|0)==7|(o|0)==7)o=5;else if(y0[22e3+(a*7|0)+o>>0]|0)o=1;else if(a=t[21168+(a*28|0)+(o<<2)>>2]|0,(a|0)>0){c=u0+4|0,o=0;do U1(c),o=o+1|0;while((o|0)!=(a|0));W=51}else W=51;else W=51;while(!1);return(W|0)==51&&(o=u0+4|0,t[i>>2]=t[o>>2],t[i+4>>2]=t[o+4>>2],t[i+8>>2]=t[o+8>>2],o=0),u0=o,L=s0,u0|0}function x2(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0;if(W=L,L=L+48|0,p=W+36|0,a=W+24|0,c=W+12|0,d=W,i=C0(e|0,A|0,52)|0,S()|0,i=i&15,I=C0(e|0,A|0,45)|0,S()|0,I=I&127,I>>>0>121)return n=5,L=W,n|0;if(v=SA(I)|0,x0(i|0,0,52)|0,R=S()|0|134225919,o=n,t[o>>2]=-1,t[o+4>>2]=R,!i)return i=Q1(r)|0,(i|0)==7||(i=$t(I,i)|0,(i|0)==127)?(R=1,L=W,R|0):(P=x0(i|0,0,45)|0,T=S()|0,I=n,T=t[I+4>>2]&-1040385|T,R=n,t[R>>2]=t[I>>2]|P,t[R+4>>2]=T,R=0,L=W,R|0);for(t[p>>2]=t[r>>2],t[p+4>>2]=t[r+4>>2],t[p+8>>2]=t[r+8>>2],r=i;;){if(o=r,r=r+-1|0,t[a>>2]=t[p>>2],t[a+4>>2]=t[p+4>>2],t[a+8>>2]=t[p+8>>2],ce(o)|0){if(i=Cl(p)|0,i|0){r=13;break}t[c>>2]=t[p>>2],t[c+4>>2]=t[p+4>>2],t[c+8>>2]=t[p+8>>2],O1(c)}else{if(i=vl(p)|0,i|0){r=13;break}t[c>>2]=t[p>>2],t[c+4>>2]=t[p+4>>2],t[c+8>>2]=t[p+8>>2],$e(c)}if(qt(a,c,d),$A(d),i=n,s0=t[i>>2]|0,i=t[i+4>>2]|0,i0=(15-o|0)*3|0,u0=x0(7,0,i0|0)|0,i=i&~(S()|0),i0=x0(Q1(d)|0,0,i0|0)|0,i=S()|0|i,R=n,t[R>>2]=i0|s0&~u0,t[R+4>>2]=i,(o|0)<=1){r=14;break}}A:do if((r|0)!=13&&(r|0)==14)if((t[p>>2]|0)<=1&&(t[p+4>>2]|0)<=1&&(t[p+8>>2]|0)<=1){r=Q1(p)|0,i=$t(I,r)|0,(i|0)==127?d=0:d=SA(i)|0;e:do if(r){if(v){if(i=KA(e,A)|0,(i|0)==7){i=5;break A}if(o=t[21376+(i*28|0)+(r<<2)>>2]|0,(o|0)>0){i=r,r=0;do i=We(i)|0,r=r+1|0;while((r|0)!=(o|0))}else i=r;if((i|0)==1){i=9;break A}r=$t(I,i)|0,(r|0)==127&&R0(27648,27538,411,27678),SA(r)|0?R0(27693,27538,412,27678):(T=r,P=o,E=i)}else T=i,P=0,E=r;if(c=t[4272+(I*28|0)+(E<<2)>>2]|0,(c|0)<=-1&&R0(27724,27538,419,27678),!d){if((P|0)<0){i=5;break A}if(P|0){o=n,i=0,r=t[o>>2]|0,o=t[o+4>>2]|0;do r=Ge(r,o)|0,o=S()|0,i0=n,t[i0>>2]=r,t[i0+4>>2]=o,i=i+1|0;while((i|0)<(P|0))}if((c|0)<=0){i=T,r=58;break}for(o=n,i=0,r=t[o>>2]|0,o=t[o+4>>2]|0;;)if(r=Ge(r,o)|0,o=S()|0,i0=n,t[i0>>2]=r,t[i0+4>>2]=o,i=i+1|0,(i|0)==(c|0)){i=T,r=58;break e}}if(a=Wt(T,I)|0,(a|0)==7&&R0(27514,27538,428,27678),i=n,r=t[i>>2]|0,i=t[i+4>>2]|0,(c|0)>0){o=0;do r=Ge(r,i)|0,i=S()|0,i0=n,t[i0>>2]=r,t[i0+4>>2]=i,o=o+1|0;while((o|0)!=(c|0))}if(i=KA(r,i)|0,(i|0)==7&&R0(27795,27538,440,27678),r=jt(T)|0,r=t[(r?21792:21584)+(a*28|0)+(i<<2)>>2]|0,(r|0)<0&&R0(27795,27538,454,27678),!r)i=T,r=58;else{a=n,i=0,o=t[a>>2]|0,a=t[a+4>>2]|0;do o=tr(o,a)|0,a=S()|0,i0=n,t[i0>>2]=o,t[i0+4>>2]=a,i=i+1|0;while((i|0)<(r|0));i=T,r=58}}else if((v|0)!=0&(d|0)!=0){if(r=KA(e,A)|0,o=n,o=KA(t[o>>2]|0,t[o+4>>2]|0)|0,(r|0)==7|(o|0)==7){i=5;break A}if(o=t[21376+(r*28|0)+(o<<2)>>2]|0,(o|0)<0){i=5;break A}if(!o)r=59;else{c=n,r=0,a=t[c>>2]|0,c=t[c+4>>2]|0;do a=Ge(a,c)|0,c=S()|0,i0=n,t[i0>>2]=a,t[i0+4>>2]=c,r=r+1|0;while((r|0)<(o|0));r=58}}else r=58;while(!1);if((r|0)==58&&d&&(r=59),(r|0)==59&&(i0=n,(KA(t[i0>>2]|0,t[i0+4>>2]|0)|0)==1)){i=9;break}i0=n,u0=t[i0>>2]|0,i0=t[i0+4>>2]&-1040385,s0=x0(i|0,0,45)|0,i0=i0|(S()|0),i=n,t[i>>2]=u0|s0,t[i+4>>2]=i0,i=0}else i=1;while(!1);return i0=i,L=W,i0|0}function f3(e,A,r,n,i,o){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0,o=o|0;var a=0,c=0;return c=L,L=L+16|0,a=c,i?e=15:(e=we(e,A,r,n,a)|0,e||(wl(a,o),e=0)),L=c,e|0}function d3(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0;return a=L,L=L+16|0,o=a,n?r=15:(r=Ll(r,o)|0,r||(r=x2(e,A,o,i)|0)),L=a,r|0}function h3(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0;return d=L,L=L+32|0,a=d+12|0,c=d,o=we(e,A,e,A,a)|0,o|0?(c=o,L=d,c|0):(e=we(e,A,r,n,c)|0,e|0?(c=e,L=d,c|0):(a=Xt(a,c)|0,c=i,t[c>>2]=a,t[c+4>>2]=((a|0)<0)<<31>>31,c=0,L=d,c|0))}function p3(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0;return d=L,L=L+32|0,a=d+12|0,c=d,o=we(e,A,e,A,a)|0,!o&&(o=we(e,A,r,n,c)|0,!o)?(n=Xt(a,c)|0,n=G0(n|0,((n|0)<0)<<31>>31|0,1,0)|0,a=S()|0,c=i,t[c>>2]=n,t[c+4>>2]=a,c=0,L=d,c|0):(c=o,L=d,c|0)}function g3(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0,G=0,S0=0,$0=0,O0=0,iA=0;if(O0=L,L=L+48|0,S0=O0+24|0,a=O0+12|0,$0=O0,o=we(e,A,e,A,S0)|0,!o&&(o=we(e,A,r,n,a)|0,!o)){i0=Xt(S0,a)|0,G=((i0|0)<0)<<31>>31,t[S0>>2]=0,t[S0+4>>2]=0,t[S0+8>>2]=0,t[a>>2]=0,t[a+4>>2]=0,t[a+8>>2]=0,we(e,A,e,A,S0)|0&&R0(27795,27538,692,27747),we(e,A,r,n,a)|0&&R0(27795,27538,697,27747),d2(S0),d2(a),v=(i0|0)==0?0:1/+(i0|0),r=t[S0>>2]|0,W=v*+((t[a>>2]|0)-r|0),R=S0+4|0,n=t[R>>2]|0,u0=v*+((t[a+4>>2]|0)-n|0),s0=S0+8|0,o=t[s0>>2]|0,v=v*+((t[a+8>>2]|0)-o|0),t[$0>>2]=r,E=$0+4|0,t[E>>2]=n,I=$0+8|0,t[I>>2]=o;A:do if((i0|0)<0)o=0;else for(P=0,T=0;;){d=+(T>>>0)+4294967296*+(P|0),iA=W*d+ +(r|0),c=u0*d+ +(n|0),d=v*d+ +(o|0),r=~~+q1(+iA),a=~~+q1(+c),o=~~+q1(+d),iA=+aA(+(+(r|0)-iA)),c=+aA(+(+(a|0)-c)),d=+aA(+(+(o|0)-d));do if(iA>c&iA>d)r=0-(a+o)|0,n=a;else if(p=0-r|0,c>d){n=p-o|0;break}else{n=a,o=p-a|0;break}while(!1);if(t[$0>>2]=r,t[E>>2]=n,t[I>>2]=o,kl($0),o=x2(e,A,$0,i+(T<<3)|0)|0,o|0)break A;if(!((P|0)<(G|0)|(P|0)==(G|0)&T>>>0<i0>>>0)){o=0;break A}r=G0(T|0,P|0,1,0)|0,n=S()|0,P=n,T=r,r=t[S0>>2]|0,n=t[R>>2]|0,o=t[s0>>2]|0}while(!1);return $0=o,L=O0,$0|0}return $0=o,L=O0,$0|0}function He(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0;if((r|0)==0&(n|0)==0)return i=0,o=1,nA(i|0),o|0;o=e,i=A,e=1,A=0;do a=(r&1|0)==0&!0,e=QA((a?1:o)|0,(a?0:i)|0,e|0,A|0)|0,A=S()|0,r=N2(r|0,n|0,1)|0,n=S()|0,o=QA(o|0,i|0,o|0,i|0)|0,i=S()|0;while(!((r|0)==0&(n|0)==0));return nA(A|0),e|0}function cr(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0;c=L,L=L+16|0,o=c,a=C0(e|0,A|0,52)|0,S()|0,a=a&15;do if(a){if(i=Ye(e,A,o)|0,!i){p=+M[o>>3],d=1/+mA(+p),v=+M[25968+(a<<3)>>3],M[r>>3]=p+v,M[r+8>>3]=p-v,p=+M[o+8>>3],d=v*d,M[r+16>>3]=d+p,M[r+24>>3]=p-d;break}return a=i,L=c,a|0}else{if(i=C0(e|0,A|0,45)|0,S()|0,i=i&127,i>>>0>121)return a=5,L=c,a|0;o=22064+(i<<5)|0,t[r>>2]=t[o>>2],t[r+4>>2]=t[o+4>>2],t[r+8>>2]=t[o+8>>2],t[r+12>>2]=t[o+12>>2],t[r+16>>2]=t[o+16>>2],t[r+20>>2]=t[o+20>>2],t[r+24>>2]=t[o+24>>2],t[r+28>>2]=t[o+28>>2];break}while(!1);return gl(r,n?1.4:1.1),n=26096+(a<<3)|0,(t[n>>2]|0)==(e|0)&&(t[n+4>>2]|0)==(A|0)&&(M[r>>3]=1.5707963267948966),a=26224+(a<<3)|0,(t[a>>2]|0)==(e|0)&&(t[a+4>>2]|0)==(A|0)&&(M[r+8>>3]=-1.5707963267948966),+M[r>>3]!=1.5707963267948966&&+M[r+8>>3]!=-1.5707963267948966?(a=0,L=c,a|0):(M[r+16>>3]=3.141592653589793,M[r+24>>3]=-3.141592653589793,a=0,L=c,a|0)}function y3(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0;p=L,L=L+48|0,a=p+32|0,o=p+40|0,c=p,Ar(a,0,0,0),d=t[a>>2]|0,a=t[a+4>>2]|0;do if(r>>>0<=15){if(i=k1(n)|0,i|0){n=c,t[n>>2]=0,t[n+4>>2]=0,t[c+8>>2]=i,t[c+12>>2]=-1,n=c+16|0,d=c+29|0,t[n>>2]=0,t[n+4>>2]=0,t[n+8>>2]=0,y0[n+12>>0]=0,y0[d>>0]=y0[o>>0]|0,y0[d+1>>0]=y0[o+1>>0]|0,y0[d+2>>0]=y0[o+2>>0]|0;break}if(i=RA((t[A+8>>2]|0)+1|0,32)|0,i){ur(A,i),v=c,t[v>>2]=d,t[v+4>>2]=a,t[c+8>>2]=0,t[c+12>>2]=r,t[c+16>>2]=n,t[c+20>>2]=A,t[c+24>>2]=i,y0[c+28>>0]=0,d=c+29|0,y0[d>>0]=y0[o>>0]|0,y0[d+1>>0]=y0[o+1>>0]|0,y0[d+2>>0]=y0[o+2>>0]|0;break}else{n=c,t[n>>2]=0,t[n+4>>2]=0,t[c+8>>2]=13,t[c+12>>2]=-1,n=c+16|0,d=c+29|0,t[n>>2]=0,t[n+4>>2]=0,t[n+8>>2]=0,y0[n+12>>0]=0,y0[d>>0]=y0[o>>0]|0,y0[d+1>>0]=y0[o+1>>0]|0,y0[d+2>>0]=y0[o+2>>0]|0;break}}else d=c,t[d>>2]=0,t[d+4>>2]=0,t[c+8>>2]=4,t[c+12>>2]=-1,d=c+16|0,v=c+29|0,t[d>>2]=0,t[d+4>>2]=0,t[d+8>>2]=0,y0[d+12>>0]=0,y0[v>>0]=y0[o>>0]|0,y0[v+1>>0]=y0[o+1>>0]|0,y0[v+2>>0]=y0[o+2>>0]|0;while(!1);W1(c),t[e>>2]=t[c>>2],t[e+4>>2]=t[c+4>>2],t[e+8>>2]=t[c+8>>2],t[e+12>>2]=t[c+12>>2],t[e+16>>2]=t[c+16>>2],t[e+20>>2]=t[c+20>>2],t[e+24>>2]=t[c+24>>2],t[e+28>>2]=t[c+28>>2],L=p}function W1(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0,G=0;if(G=L,L=L+336|0,P=G+168|0,T=G,n=e,r=t[n>>2]|0,n=t[n+4>>2]|0,(r|0)==0&(n|0)==0){L=G;return}if(A=e+28|0,y0[A>>0]|0?(r=E2(r,n)|0,n=S()|0):y0[A>>0]=1,i0=e+20|0,!(t[t[i0>>2]>>2]|0)){A=e+24|0,r=t[A>>2]|0,r|0&&Y0(r),s0=e,t[s0>>2]=0,t[s0+4>>2]=0,t[e+8>>2]=0,t[i0>>2]=0,t[e+12>>2]=-1,t[e+16>>2]=0,t[A>>2]=0,L=G;return}s0=e+16|0,A=t[s0>>2]|0,i=A&15;A:do if((r|0)==0&(n|0)==0)u0=e+24|0;else{W=e+12|0,E=(i|0)==3,v=A&255,d=(i|1|0)==3,I=e+24|0,p=(i+-1|0)>>>0<3,a=(i|2|0)==3,c=T+8|0;e:for(;;){if(o=C0(r|0,n|0,52)|0,S()|0,o=o&15,(o|0)==(t[W>>2]|0)){switch(v&15){case 0:case 2:case 3:{if(i=Ye(r,n,P)|0,i|0){R=15;break e}if(fr(t[i0>>2]|0,t[I>>2]|0,P)|0){R=19;break e}break}}if(d&&(i=t[(t[i0>>2]|0)+4>>2]|0,t[P>>2]=t[i>>2],t[P+4>>2]=t[i+4>>2],t[P+8>>2]=t[i+8>>2],t[P+12>>2]=t[i+12>>2],Gt(26832,P)|0)){if(nr(t[(t[i0>>2]|0)+4>>2]|0,o,T)|0){R=25;break}if(i=T,(t[i>>2]|0)==(r|0)&&(t[i+4>>2]|0)==(n|0)){R=29;break}}if(p){if(i=r1(r,n,P)|0,i|0){R=32;break}if(cr(r,n,T,0)|0){R=36;break}if(a&&S2(t[i0>>2]|0,t[I>>2]|0,P,T)|0){R=42;break}if(d&&D2(t[i0>>2]|0,t[I>>2]|0,P,T)|0){R=42;break}}if(E){if(A=cr(r,n,P,1)|0,i=t[I>>2]|0,A|0){R=45;break}if(Yt(i,P)|0){if(i2(T,P),n2(P,t[I>>2]|0)|0){R=53;break}if(fr(t[i0>>2]|0,t[I>>2]|0,c)|0){R=53;break}if(D2(t[i0>>2]|0,t[I>>2]|0,T,P)|0){R=53;break}}}}do if((o|0)<(t[W>>2]|0)){if(A=cr(r,n,P,1)|0,i=t[I>>2]|0,A|0){R=58;break e}if(!(Yt(i,P)|0)){R=73;break}if(n2(t[I>>2]|0,P)|0&&(i2(T,P),S2(t[i0>>2]|0,t[I>>2]|0,T,P)|0)){R=65;break e}if(r=C2(r,n,o+1|0,T)|0,r|0){R=67;break e}n=T,r=t[n>>2]|0,n=t[n+4>>2]|0}else R=73;while(!1);if((R|0)==73&&(R=0,r=E2(r,n)|0,n=S()|0),(r|0)==0&(n|0)==0){u0=I;break A}}switch(R|0){case 15:{A=t[I>>2]|0,A|0&&Y0(A),R=e,t[R>>2]=0,t[R+4>>2]=0,t[i0>>2]=0,t[W>>2]=-1,t[s0>>2]=0,t[I>>2]=0,t[e+8>>2]=i,R=20;break}case 19:{t[e>>2]=r,t[e+4>>2]=n,R=20;break}case 25:{R0(27795,27761,470,27772);break}case 29:{t[e>>2]=r,t[e+4>>2]=n,L=G;return}case 32:{A=t[I>>2]|0,A|0&&Y0(A),u0=e,t[u0>>2]=0,t[u0+4>>2]=0,t[i0>>2]=0,t[W>>2]=-1,t[s0>>2]=0,t[I>>2]=0,t[e+8>>2]=i,L=G;return}case 36:{R0(27795,27761,493,27772);break}case 42:{t[e>>2]=r,t[e+4>>2]=n,L=G;return}case 45:{i|0&&Y0(i),R=e,t[R>>2]=0,t[R+4>>2]=0,t[i0>>2]=0,t[W>>2]=-1,t[s0>>2]=0,t[I>>2]=0,t[e+8>>2]=A,R=55;break}case 53:{t[e>>2]=r,t[e+4>>2]=n,R=55;break}case 58:{i|0&&Y0(i),R=e,t[R>>2]=0,t[R+4>>2]=0,t[i0>>2]=0,t[W>>2]=-1,t[s0>>2]=0,t[I>>2]=0,t[e+8>>2]=A,R=71;break}case 65:{t[e>>2]=r,t[e+4>>2]=n,R=71;break}case 67:{A=t[I>>2]|0,A|0&&Y0(A),u0=e,t[u0>>2]=0,t[u0+4>>2]=0,t[i0>>2]=0,t[W>>2]=-1,t[s0>>2]=0,t[I>>2]=0,t[e+8>>2]=r,L=G;return}}if((R|0)==20){L=G;return}else if((R|0)==55){L=G;return}else if((R|0)==71){L=G;return}}while(!1);A=t[u0>>2]|0,A|0&&Y0(A),R=e,t[R>>2]=0,t[R+4>>2]=0,t[e+8>>2]=0,t[i0>>2]=0,t[e+12>>2]=-1,t[s0>>2]=0,t[u0>>2]=0,L=G}function E2(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0;E=L,L=L+16|0,v=E,n=C0(e|0,A|0,52)|0,S()|0,n=n&15,r=C0(e|0,A|0,45)|0,S()|0;do if(n){for(;r=x0(n+4095|0,0,52)|0,i=S()|0|A&-15728641,o=(15-n|0)*3|0,a=x0(7,0,o|0)|0,c=S()|0,r=r|e|a,i=i|c,d=C0(e|0,A|0,o|0)|0,S()|0,d=d&7,n=n+-1|0,!(d>>>0<6);)if(n)A=i,e=r;else{p=4;break}if((p|0)==4){r=C0(r|0,i|0,45)|0,S()|0;break}return v=(d|0)==0&(MA(r,i)|0)!=0,v=x0((v?2:1)+d|0,0,o|0)|0,p=S()|0|A&~c,v=v|e&~a,nA(p|0),L=E,v|0}while(!1);return r=r&127,r>>>0>120?(p=0,v=0,nA(p|0),L=E,v|0):(Ar(v,0,r+1|0,0),p=t[v+4>>2]|0,v=t[v>>2]|0,nA(p|0),L=E,v|0)}function m3(e,A,r,n,i,o){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0,o=o|0;var a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0;R=L,L=L+160|0,E=R+80|0,c=R+64|0,I=R+112|0,W=R,y3(E,e,A,r),p=E,sr(c,t[p>>2]|0,t[p+4>>2]|0,A),p=c,d=t[p>>2]|0,p=t[p+4>>2]|0,a=t[E+8>>2]|0,P=I+4|0,t[P>>2]=t[E>>2],t[P+4>>2]=t[E+4>>2],t[P+8>>2]=t[E+8>>2],t[P+12>>2]=t[E+12>>2],t[P+16>>2]=t[E+16>>2],t[P+20>>2]=t[E+20>>2],t[P+24>>2]=t[E+24>>2],t[P+28>>2]=t[E+28>>2],P=W,t[P>>2]=d,t[P+4>>2]=p,P=W+8|0,t[P>>2]=a,e=W+12|0,A=I,r=e+36|0;do t[e>>2]=t[A>>2],e=e+4|0,A=A+4|0;while((e|0)<(r|0));if(I=W+48|0,t[I>>2]=t[c>>2],t[I+4>>2]=t[c+4>>2],t[I+8>>2]=t[c+8>>2],t[I+12>>2]=t[c+12>>2],(d|0)==0&(p|0)==0)return W=a,L=R,W|0;r=W+16|0,v=W+24|0,E=W+28|0,a=0,c=0,A=d,e=p;do{if(!((a|0)<(i|0)|(a|0)==(i|0)&c>>>0<n>>>0)){T=4;break}if(p=c,c=G0(c|0,a|0,1,0)|0,a=S()|0,p=o+(p<<3)|0,t[p>>2]=A,t[p+4>>2]=e,lr(I),e=I,A=t[e>>2]|0,e=t[e+4>>2]|0,(A|0)==0&(e|0)==0){if(W1(r),A=r,e=t[A>>2]|0,A=t[A+4>>2]|0,(e|0)==0&(A|0)==0){T=10;break}b2(e,A,t[E>>2]|0,I),e=I,A=t[e>>2]|0,e=t[e+4>>2]|0}p=W,t[p>>2]=A,t[p+4>>2]=e}while(!((A|0)==0&(e|0)==0));return(T|0)==4?(e=W+40|0,A=t[e>>2]|0,A|0&&Y0(A),T=W+16|0,t[T>>2]=0,t[T+4>>2]=0,t[v>>2]=0,t[W+36>>2]=0,t[E>>2]=-1,t[W+32>>2]=0,t[e>>2]=0,b2(0,0,0,I),t[W>>2]=0,t[W+4>>2]=0,t[P>>2]=0,W=14,L=R,W|0):((T|0)==10&&(t[W>>2]=0,t[W+4>>2]=0,t[P>>2]=t[v>>2]),W=t[P>>2]|0,L=R,W|0)}function C3(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0;if(E=L,L=L+48|0,d=E+32|0,c=E+40|0,p=E,!(t[e>>2]|0))return v=n,t[v>>2]=0,t[v+4>>2]=0,v=0,L=E,v|0;Ar(d,0,0,0),a=d,i=t[a>>2]|0,a=t[a+4>>2]|0;do if(A>>>0>15)v=p,t[v>>2]=0,t[v+4>>2]=0,t[p+8>>2]=4,t[p+12>>2]=-1,v=p+16|0,r=p+29|0,t[v>>2]=0,t[v+4>>2]=0,t[v+8>>2]=0,y0[v+12>>0]=0,y0[r>>0]=y0[c>>0]|0,y0[r+1>>0]=y0[c+1>>0]|0,y0[r+2>>0]=y0[c+2>>0]|0,r=4,v=9;else{if(r=k1(r)|0,r|0){d=p,t[d>>2]=0,t[d+4>>2]=0,t[p+8>>2]=r,t[p+12>>2]=-1,d=p+16|0,v=p+29|0,t[d>>2]=0,t[d+4>>2]=0,t[d+8>>2]=0,y0[d+12>>0]=0,y0[v>>0]=y0[c>>0]|0,y0[v+1>>0]=y0[c+1>>0]|0,y0[v+2>>0]=y0[c+2>>0]|0,v=9;break}if(r=RA((t[e+8>>2]|0)+1|0,32)|0,!r){v=p,t[v>>2]=0,t[v+4>>2]=0,t[p+8>>2]=13,t[p+12>>2]=-1,v=p+16|0,r=p+29|0,t[v>>2]=0,t[v+4>>2]=0,t[v+8>>2]=0,y0[v+12>>0]=0,y0[r>>0]=y0[c>>0]|0,y0[r+1>>0]=y0[c+1>>0]|0,y0[r+2>>0]=y0[c+2>>0]|0,r=13,v=9;break}ur(e,r),P=p,t[P>>2]=i,t[P+4>>2]=a,a=p+8|0,t[a>>2]=0,t[p+12>>2]=A,t[p+20>>2]=e,t[p+24>>2]=r,y0[p+28>>0]=0,i=p+29|0,y0[i>>0]=y0[c>>0]|0,y0[i+1>>0]=y0[c+1>>0]|0,y0[i+2>>0]=y0[c+2>>0]|0,t[p+16>>2]=3,I=+dl(r),I=I*+fl(r),o=+aA(+ +M[r>>3]),o=I/+mA(+ +Y1(+o,+ +aA(+ +M[r+8>>3])))*6371.007180918475*6371.007180918475,i=p+12|0,r=t[i>>2]|0;A:do if((r|0)>0)do{if(w2(r+-1|0,d)|0,!(o/+M[d>>3]>10))break A;P=t[i>>2]|0,r=P+-1|0,t[i>>2]=r}while((P|0)>1);while(!1);if(W1(p),i=n,t[i>>2]=0,t[i+4>>2]=0,i=p,r=t[i>>2]|0,i=t[i+4>>2]|0,!((r|0)==0&(i|0)==0))do v1(r,i,A,d)|0,c=d,e=n,c=G0(t[e>>2]|0,t[e+4>>2]|0,t[c>>2]|0,t[c+4>>2]|0)|0,e=S()|0,P=n,t[P>>2]=c,t[P+4>>2]=e,W1(p),P=p,r=t[P>>2]|0,i=t[P+4>>2]|0;while(!((r|0)==0&(i|0)==0));r=t[a>>2]|0}while(!1);return P=r,L=E,P|0}function L1(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0;if(!(Gt(A,r)|0)||(A=r2(A)|0,n=+M[r>>3],i=+M[r+8>>3],i=A&i<0?i+6.283185307179586:i,I=t[e>>2]|0,(I|0)<=0))return I=0,I|0;if(E=t[e+4>>2]|0,A){A=0,v=i,r=-1,e=0;A:for(;;){for(p=e;a=+M[E+(p<<4)>>3],i=+M[E+(p<<4)+8>>3],e=(r+2|0)%(I|0)|0,o=+M[E+(e<<4)>>3],c=+M[E+(e<<4)+8>>3],a>o?(d=a,a=c):(d=o,o=a,a=i,i=c),n=n==o|n==d?n+2220446049250313e-31:n,!!(n<o|n>d);)if(r=p+1|0,(r|0)>=(I|0)){r=22;break A}else e=p,p=r,r=e;if(c=a<0?a+6.283185307179586:a,a=i<0?i+6.283185307179586:i,v=c==v|a==v?v+-2220446049250313e-31:v,d=c+(a-c)*((n-o)/(d-o)),(d<0?d+6.283185307179586:d)>v&&(A=A^1),e=p+1|0,(e|0)>=(I|0)){r=22;break}else r=p}if((r|0)==22)return A|0}else{A=0,v=i,r=-1,e=0;A:for(;;){for(p=e;a=+M[E+(p<<4)>>3],i=+M[E+(p<<4)+8>>3],e=(r+2|0)%(I|0)|0,o=+M[E+(e<<4)>>3],c=+M[E+(e<<4)+8>>3],a>o?(d=a,a=c):(d=o,o=a,a=i,i=c),n=n==o|n==d?n+2220446049250313e-31:n,!!(n<o|n>d);)if(r=p+1|0,(r|0)>=(I|0)){r=22;break A}else e=p,p=r,r=e;if(v=a==v|i==v?v+-2220446049250313e-31:v,a+(i-a)*((n-o)/(d-o))>v&&(A=A^1),e=p+1|0,(e|0)>=(I|0)){r=22;break}else r=p}if((r|0)==22)return A|0}return 0}function z2(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0;if(T=t[e>>2]|0,!T){t[A>>2]=0,t[A+4>>2]=0,t[A+8>>2]=0,t[A+12>>2]=0,t[A+16>>2]=0,t[A+20>>2]=0,t[A+24>>2]=0,t[A+28>>2]=0;return}if(W=A+8|0,M[W>>3]=17976931348623157e292,R=A+24|0,M[R>>3]=17976931348623157e292,M[A>>3]=-17976931348623157e292,u0=A+16|0,M[u0>>3]=-17976931348623157e292,!((T|0)<=0)){for(I=t[e+4>>2]|0,p=17976931348623157e292,v=-17976931348623157e292,E=0,e=-1,o=17976931348623157e292,a=17976931348623157e292,d=-17976931348623157e292,n=-17976931348623157e292,P=0;r=+M[I+(P<<4)>>3],c=+M[I+(P<<4)+8>>3],e=e+2|0,i=+M[I+(((e|0)==(T|0)?0:e)<<4)+8>>3],r<o&&(M[W>>3]=r,o=r),c<a&&(M[R>>3]=c,a=c),r>d?M[A>>3]=r:r=d,c>n&&(M[u0>>3]=c,n=c),p=c>0&c<p?c:p,v=c<0&c>v?c:v,E=E|+aA(+(c-i))>3.141592653589793,e=P+1|0,(e|0)!=(T|0);)s0=P,d=r,P=e,e=s0;E&&(M[u0>>3]=v,M[R>>3]=p)}}function k1(e){return e=e|0,(e>>>0<4?0:15)|0}function ur(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0,G=0,S0=0,$0=0,O0=0;if(T=t[e>>2]|0,T){if(W=A+8|0,M[W>>3]=17976931348623157e292,R=A+24|0,M[R>>3]=17976931348623157e292,M[A>>3]=-17976931348623157e292,u0=A+16|0,M[u0>>3]=-17976931348623157e292,(T|0)>0){for(i=t[e+4>>2]|0,I=17976931348623157e292,P=-17976931348623157e292,n=0,r=-1,d=17976931348623157e292,p=17976931348623157e292,E=-17976931348623157e292,a=-17976931348623157e292,s0=0;o=+M[i+(s0<<4)>>3],v=+M[i+(s0<<4)+8>>3],$0=r+2|0,c=+M[i+((($0|0)==(T|0)?0:$0)<<4)+8>>3],o<d&&(M[W>>3]=o,d=o),v<p&&(M[R>>3]=v,p=v),o>E?M[A>>3]=o:o=E,v>a&&(M[u0>>3]=v,a=v),I=v>0&v<I?v:I,P=v<0&v>P?v:P,n=n|+aA(+(v-c))>3.141592653589793,r=s0+1|0,(r|0)!=(T|0);)$0=s0,E=o,s0=r,r=$0;n&&(M[u0>>3]=P,M[R>>3]=I)}}else t[A>>2]=0,t[A+4>>2]=0,t[A+8>>2]=0,t[A+12>>2]=0,t[A+16>>2]=0,t[A+20>>2]=0,t[A+24>>2]=0,t[A+28>>2]=0;if($0=e+8|0,r=t[$0>>2]|0,!((r|0)<=0)){S0=e+12|0,G=0;do if(i=t[S0>>2]|0,n=G,G=G+1|0,R=A+(G<<5)|0,u0=t[i+(n<<3)>>2]|0,u0){if(s0=A+(G<<5)+8|0,M[s0>>3]=17976931348623157e292,e=A+(G<<5)+24|0,M[e>>3]=17976931348623157e292,M[R>>3]=-17976931348623157e292,i0=A+(G<<5)+16|0,M[i0>>3]=-17976931348623157e292,(u0|0)>0){for(T=t[i+(n<<3)+4>>2]|0,I=17976931348623157e292,P=-17976931348623157e292,i=0,n=-1,W=0,d=17976931348623157e292,p=17976931348623157e292,v=-17976931348623157e292,a=-17976931348623157e292;o=+M[T+(W<<4)>>3],E=+M[T+(W<<4)+8>>3],n=n+2|0,c=+M[T+(((n|0)==(u0|0)?0:n)<<4)+8>>3],o<d&&(M[s0>>3]=o,d=o),E<p&&(M[e>>3]=E,p=E),o>v?M[R>>3]=o:o=v,E>a&&(M[i0>>3]=E,a=E),I=E>0&E<I?E:I,P=E<0&E>P?E:P,i=i|+aA(+(E-c))>3.141592653589793,n=W+1|0,(n|0)!=(u0|0);)O0=W,W=n,v=o,n=O0;i&&(M[i0>>3]=P,M[e>>3]=I)}}else t[R>>2]=0,t[R+4>>2]=0,t[R+8>>2]=0,t[R+12>>2]=0,t[R+16>>2]=0,t[R+20>>2]=0,t[R+24>>2]=0,t[R+28>>2]=0,r=t[$0>>2]|0;while((G|0)<(r|0))}}function fr(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0;if(!(L1(e,A,r)|0))return i=0,i|0;if(i=e+8|0,(t[i>>2]|0)<=0)return i=1,i|0;for(n=e+12|0,e=0;;){if(o=e,e=e+1|0,L1((t[n>>2]|0)+(o<<3)|0,A+(e<<5)|0,r)|0){e=0,n=6;break}if((e|0)>=(t[i>>2]|0)){e=1,n=6;break}}return(n|0)==6?e|0:0}function S2(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(p=L,L=L+16|0,c=p,a=r+8|0,!(L1(e,A,a)|0))return d=0,L=p,d|0;d=e+8|0;A:do if((t[d>>2]|0)>0){for(o=e+12|0,i=0;;){if(v=i,i=i+1|0,L1((t[o>>2]|0)+(v<<3)|0,A+(i<<5)|0,a)|0){i=0;break}if((i|0)>=(t[d>>2]|0))break A}return L=p,i|0}while(!1);if(G1(e,A,r,n)|0)return v=0,L=p,v|0;t[c>>2]=t[r>>2],t[c+4>>2]=a,i=t[d>>2]|0;A:do if((i|0)>0)for(e=e+12|0,a=0,o=i;;){if(i=t[e>>2]|0,(t[i+(a<<3)>>2]|0)>0){if(L1(c,n,t[i+(a<<3)+4>>2]|0)|0){i=0;break A}if(i=a+1|0,G1((t[e>>2]|0)+(a<<3)|0,A+(i<<5)|0,r,n)|0){i=0;break A}o=t[d>>2]|0}else i=a+1|0;if((i|0)<(o|0))a=i;else{i=1;break}}else i=1;while(!1);return v=i,L=p,v|0}function G1(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0,G=0,S0=0,$0=0,O0=0,iA=0;if($0=L,L=L+176|0,s0=$0+172|0,i=$0+168|0,i0=$0,!(Yt(A,n)|0))return e=0,L=$0,e|0;if(hl(A,n,s0,i),s1(i0|0,r|0,168)|0,(t[r>>2]|0)>0){A=0;do O0=i0+8+(A<<4)+8|0,u0=+ie(+M[O0>>3],t[i>>2]|0),M[O0>>3]=u0,A=A+1|0;while((A|0)<(t[r>>2]|0))}W=+M[n>>3],R=+M[n+8>>3],u0=+ie(+M[n+16>>3],t[i>>2]|0),P=+ie(+M[n+24>>3],t[i>>2]|0);A:do if((t[e>>2]|0)>0){if(n=e+4|0,i=t[i0>>2]|0,(i|0)<=0){for(A=0;;)if(A=A+1|0,(A|0)>=(t[e>>2]|0)){A=0;break A}}for(r=0;;){if(A=t[n>>2]|0,I=+M[A+(r<<4)>>3],T=+ie(+M[A+(r<<4)+8>>3],t[s0>>2]|0),A=t[n>>2]|0,r=r+1|0,O0=(r|0)%(t[e>>2]|0)|0,o=+M[A+(O0<<4)>>3],a=+ie(+M[A+(O0<<4)+8>>3],t[s0>>2]|0),!(I>=W)|!(o>=W)&&!(I<=R)|!(o<=R)&&!(T<=P)|!(a<=P)&&!(T>=u0)|!(a>=u0)){E=o-I,p=a-T,A=0;do if(iA=A,A=A+1|0,O0=(A|0)==(i|0)?0:A,o=+M[i0+8+(iA<<4)+8>>3],a=+M[i0+8+(O0<<4)+8>>3]-o,c=+M[i0+8+(iA<<4)>>3],d=+M[i0+8+(O0<<4)>>3]-c,v=E*a-p*d,v!=0&&(G=T-o,S0=I-c,d=(G*d-a*S0)/v,!(d<0|d>1))&&(v=(E*G-p*S0)/v,v>=0&v<=1)){A=1;break A}while((A|0)<(i|0))}if((r|0)>=(t[e>>2]|0)){A=0;break}}}else A=0;while(!1);return iA=A,L=$0,iA|0}function D2(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0;if(G1(e,A,r,n)|0)return o=1,o|0;if(o=e+8|0,(t[o>>2]|0)<=0)return o=0,o|0;for(i=e+12|0,e=0;;){if(a=e,e=e+1|0,G1((t[i>>2]|0)+(a<<3)|0,A+(e<<5)|0,r,n)|0){e=1,i=6;break}if((e|0)>=(t[o>>2]|0)){e=0,i=6;break}}return(i|0)==6?e|0:0}function v3(){return 8}function b3(){return 16}function w3(){return 168}function L3(){return 8}function k3(){return 16}function M3(){return 12}function x3(){return 8}function E3(e){return e=e|0,+(+((t[e>>2]|0)>>>0)+4294967296*+(t[e+4>>2]|0))}function z3(e){e=e|0;var A=0,r=0;return r=+M[e>>3],A=+M[e+8>>3],+ +yA(+(r*r+A*A))}function H2(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0;p=+M[e>>3],d=+M[A>>3]-p,c=+M[e+8>>3],a=+M[A+8>>3]-c,E=+M[r>>3],o=+M[n>>3]-E,I=+M[r+8>>3],v=+M[n+8>>3]-I,o=(o*(c-I)-(p-E)*v)/(d*v-a*o),M[i>>3]=p+d*o,M[i+8>>3]=c+a*o}function B2(e,A){return e=e|0,A=A|0,+aA(+(+M[e>>3]-+M[A>>3]))<11920928955078125e-23?(A=+aA(+(+M[e+8>>3]-+M[A+8>>3]))<11920928955078125e-23,A|0):(A=0,A|0)}function _A(e,A){e=e|0,A=A|0;var r=0,n=0,i=0;return i=+M[e>>3]-+M[A>>3],n=+M[e+8>>3]-+M[A+8>>3],r=+M[e+16>>3]-+M[A+16>>3],+(i*i+n*n+r*r)}function S3(e,A){e=e|0,A=A|0;var r=0,n=0,i=0;r=+M[e>>3],n=+mA(+r),r=+cA(+r),M[A+16>>3]=r,r=+M[e+8>>3],i=n*+mA(+r),M[A>>3]=i,r=n*+cA(+r),M[A+8>>3]=r}function D3(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0;if(o=L,L=L+16|0,i=o,n=MA(e,A)|0,(r+-1|0)>>>0>5||(n=(n|0)!=0,(r|0)==1&n))return i=-1,L=o,i|0;do if(M1(e,A,i)|0)n=-1;else if(n){n=((t[26352+(r<<2)>>2]|0)+5-(t[i>>2]|0)|0)%5|0;break}else{n=((t[26384+(r<<2)>>2]|0)+6-(t[i>>2]|0)|0)%6|0;break}while(!1);return i=n,L=o,i|0}function M1(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(v=L,L=L+32|0,c=v+16|0,d=v,n=t1(e,A,c)|0,n|0)return r=n,L=v,r|0;o=y2(e,A)|0,p=KA(e,A)|0,ll(o,d),n=al(o,t[c>>2]|0)|0;do if(SA(o)|0){do switch(o|0){case 4:{i=0;break}case 14:{i=1;break}case 24:{i=2;break}case 38:{i=3;break}case 49:{i=4;break}case 58:{i=5;break}case 63:{i=6;break}case 72:{i=7;break}case 83:{i=8;break}case 97:{i=9;break}case 107:{i=10;break}case 117:{i=11;break}default:R0(27795,27797,75,27806)}while(!1);if(a=t[26416+(i*24|0)+8>>2]|0,A=t[26416+(i*24|0)+16>>2]|0,e=t[c>>2]|0,(e|0)!=(t[d>>2]|0)&&(d=jt(o)|0,e=t[c>>2]|0,d|(e|0)==(A|0)&&(n=(n+1|0)%6|0)),(p|0)==3&(e|0)==(A|0)){n=(n+5|0)%6|0;break}(p|0)==5&(e|0)==(a|0)&&(n=(n+1|0)%6|0)}while(!1);return t[r>>2]=n,r=0,L=v,r|0}function ue(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0;if(i0=L,L=L+32|0,s0=i0+24|0,R=i0+20|0,T=i0+8|0,P=i0+16|0,I=i0,d=(MA(e,A)|0)==0,d=d?6:5,v=C0(e|0,A|0,52)|0,S()|0,v=v&15,d>>>0<=r>>>0)return n=2,L=i0,n|0;E=(v|0)==0,!E&&(W=x0(7,0,(v^15)*3|0)|0,(W&e|0)==0&((S()|0)&A|0)==0)?i=r:o=4;A:do if((o|0)==4){if(i=(MA(e,A)|0)!=0,((i?4:5)|0)<(r|0)||M1(e,A,s0)|0||(o=(t[s0>>2]|0)+r|0,i?i=26704+(((o|0)%5|0)<<2)|0:i=26736+(((o|0)%6|0)<<2)|0,W=t[i>>2]|0,(W|0)==7))return n=1,L=i0,n|0;t[R>>2]=0,i=NA(e,A,W,R,T)|0;do if(!i){if(c=T,p=t[c>>2]|0,c=t[c+4>>2]|0,a=c>>>0<A>>>0|(c|0)==(A|0)&p>>>0<e>>>0,o=a?p:e,a=a?c:A,!E&&(E=x0(7,0,(v^15)*3|0)|0,(p&E|0)==0&(c&(S()|0)|0)==0))i=r;else{if(c=(r+-1+d|0)%(d|0)|0,i=MA(e,A)|0,(c|0)<0&&R0(27795,27797,248,27822),d=(i|0)!=0,((d?4:5)|0)<(c|0)&&R0(27795,27797,248,27822),M1(e,A,s0)|0&&R0(27795,27797,248,27822),i=(t[s0>>2]|0)+c|0,d?i=26704+(((i|0)%5|0)<<2)|0:i=26736+(((i|0)%6|0)<<2)|0,c=t[i>>2]|0,(c|0)==7&&R0(27795,27797,248,27822),t[P>>2]=0,i=NA(e,A,c,P,I)|0,i|0)break;p=I,d=t[p>>2]|0,p=t[p+4>>2]|0;do if(p>>>0<a>>>0|(p|0)==(a|0)&d>>>0<o>>>0){if(MA(d,p)|0?o=Ut(d,p,e,A)|0:o=t[26800+((((t[P>>2]|0)+(t[26768+(c<<2)>>2]|0)|0)%6|0)<<2)>>2]|0,i=MA(d,p)|0,(o+-1|0)>>>0>5){i=-1,o=d,a=p;break}if(i=(i|0)!=0,(o|0)==1&i){i=-1,o=d,a=p;break}do if(M1(d,p,s0)|0)i=-1;else if(i){i=((t[26352+(o<<2)>>2]|0)+5-(t[s0>>2]|0)|0)%5|0;break}else{i=((t[26384+(o<<2)>>2]|0)+6-(t[s0>>2]|0)|0)%6|0;break}while(!1);o=d,a=p}else i=r;while(!1);c=T,p=t[c>>2]|0,c=t[c+4>>2]|0}if((o|0)==(p|0)&(a|0)==(c|0)){if(d=(MA(p,c)|0)!=0,d?e=Ut(p,c,e,A)|0:e=t[26800+((((t[R>>2]|0)+(t[26768+(W<<2)>>2]|0)|0)%6|0)<<2)>>2]|0,i=MA(p,c)|0,(e+-1|0)>>>0<=5&&(u0=(i|0)!=0,!((e|0)==1&u0)))do if(M1(p,c,s0)|0)i=-1;else if(u0){i=((t[26352+(e<<2)>>2]|0)+5-(t[s0>>2]|0)|0)%5|0;break}else{i=((t[26384+(e<<2)>>2]|0)+6-(t[s0>>2]|0)|0)%6|0;break}while(!1);else i=-1;i=i+1|0,i=(i|0)==6|d&(i|0)==5?0:i}A=a,e=o;break A}while(!1);return n=i,L=i0,n|0}while(!1);return u0=x0(i|0,0,56)|0,s0=S()|0|A&-2130706433|536870912,t[n>>2]=u0|e,t[n+4>>2]=s0,n=0,L=i0,n|0}function H3(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0;return o=(MA(e,A)|0)==0,n=ue(e,A,0,r)|0,i=(n|0)==0,o?!i||(n=ue(e,A,1,r+8|0)|0,n|0)||(n=ue(e,A,2,r+16|0)|0,n|0)||(n=ue(e,A,3,r+24|0)|0,n|0)||(n=ue(e,A,4,r+32|0)|0,n)?(o=n,o|0):ue(e,A,5,r+40|0)|0:!i||(n=ue(e,A,1,r+8|0)|0,n|0)||(n=ue(e,A,2,r+16|0)|0,n|0)||(n=ue(e,A,3,r+24|0)|0,n|0)||(n=ue(e,A,4,r+32|0)|0,n|0)?(o=n,o|0):(o=r+40|0,t[o>>2]=0,t[o+4>>2]=0,o=0,o|0)}function B3(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0,c=0,d=0;return d=L,L=L+192|0,i=d,o=d+168|0,a=C0(e|0,A|0,56)|0,S()|0,a=a&7,c=A&-2130706433|134217728,n=t1(e,c,o)|0,n|0?(c=n,L=d,c|0):(A=C0(e|0,A|0,52)|0,S()|0,A=A&15,MA(e,c)|0?Jt(o,A,a,1,i):Kt(o,A,a,1,i),c=i+8|0,t[r>>2]=t[c>>2],t[r+4>>2]=t[c+4>>2],t[r+8>>2]=t[c+8>>2],t[r+12>>2]=t[c+12>>2],c=0,L=d,c|0)}function V2(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0;return i=L,L=L+16|0,r=i,!(!0&(A&2013265920|0)==536870912)||(n=A&-2130706433|134217728,!(Rt(e,n)|0))?(n=0,L=i,n|0):(o=C0(e|0,A|0,56)|0,S()|0,o=(ue(e,n,o&7,r)|0)==0,n=r,n=o&((t[n>>2]|0)==(e|0)?(t[n+4>>2]|0)==(A|0):0)&1,L=i,n|0)}function _2(e,A,r){e=e|0,A=A|0,r=r|0;var n=0;(A|0)>0?(n=RA(A,4)|0,t[e>>2]=n,n||R0(27835,27858,40,27872)):t[e>>2]=0,t[e+4>>2]=A,t[e+8>>2]=0,t[e+12>>2]=r}function I2(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0;i=e+4|0,o=e+12|0,a=e+8|0;A:for(;;){for(r=t[i>>2]|0,A=0;;){if((A|0)>=(r|0))break A;if(n=t[e>>2]|0,c=t[n+(A<<2)>>2]|0,!c)A=A+1|0;else break}A=n+(~~(+aA(+(+Ce(10,+ +(15-(t[o>>2]|0)|0))*(+M[c>>3]+ +M[c+8>>3])))%+(r|0))>>>0<<2)|0,r=t[A>>2]|0;e:do if(r|0){if(n=c+32|0,(r|0)==(c|0))t[A>>2]=t[n>>2];else{if(r=r+32|0,A=t[r>>2]|0,!A)break;for(;(A|0)!=(c|0);)if(r=A+32|0,A=t[r>>2]|0,!A)break e;t[r>>2]=t[n>>2]}Y0(c),t[a>>2]=(t[a>>2]|0)+-1}while(!1)}Y0(t[e>>2]|0)}function P2(e){e=e|0;var A=0,r=0,n=0;for(n=t[e+4>>2]|0,r=0;;){if((r|0)>=(n|0)){A=0,r=4;break}if(A=t[(t[e>>2]|0)+(r<<2)>>2]|0,!A)r=r+1|0;else{r=4;break}}return(r|0)==4?A|0:0}function T2(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0;if(r=~~(+aA(+(+Ce(10,+ +(15-(t[e+12>>2]|0)|0))*(+M[A>>3]+ +M[A+8>>3])))%+(t[e+4>>2]|0))>>>0,r=(t[e>>2]|0)+(r<<2)|0,n=t[r>>2]|0,!n)return o=1,o|0;o=A+32|0;do if((n|0)!=(A|0)){if(r=t[n+32>>2]|0,!r)return o=1,o|0;for(i=r;;){if((i|0)==(A|0)){i=8;break}if(r=t[i+32>>2]|0,r)n=i,i=r;else{r=1,i=10;break}}if((i|0)==8){t[n+32>>2]=t[o>>2];break}else if((i|0)==10)return r|0}else t[r>>2]=t[o>>2];while(!1);return Y0(A),o=e+8|0,t[o>>2]=(t[o>>2]|0)+-1,o=0,o|0}function V3(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0;o=ve(40)|0,o||R0(27888,27858,98,27901),t[o>>2]=t[A>>2],t[o+4>>2]=t[A+4>>2],t[o+8>>2]=t[A+8>>2],t[o+12>>2]=t[A+12>>2],i=o+16|0,t[i>>2]=t[r>>2],t[i+4>>2]=t[r+4>>2],t[i+8>>2]=t[r+8>>2],t[i+12>>2]=t[r+12>>2],t[o+32>>2]=0,i=~~(+aA(+(+Ce(10,+ +(15-(t[e+12>>2]|0)|0))*(+M[A>>3]+ +M[A+8>>3])))%+(t[e+4>>2]|0))>>>0,i=(t[e>>2]|0)+(i<<2)|0,n=t[i>>2]|0;do if(!n)t[i>>2]=o;else{for(;!(n1(n,A)|0&&n1(n+16|0,r)|0);)if(i=t[n+32>>2]|0,n=(i|0)==0?n:i,!(t[n+32>>2]|0)){a=10;break}if((a|0)==10){t[n+32>>2]=o;break}return Y0(o),a=n,a|0}while(!1);return a=e+8|0,t[a>>2]=(t[a>>2]|0)+1,a=o,a|0}function _3(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0;if(i=~~(+aA(+(+Ce(10,+ +(15-(t[e+12>>2]|0)|0))*(+M[A>>3]+ +M[A+8>>3])))%+(t[e+4>>2]|0))>>>0,i=t[(t[e>>2]|0)+(i<<2)>>2]|0,!i)return r=0,r|0;if(!r){for(e=i;;){if(n1(e,A)|0){n=10;break}if(e=t[e+32>>2]|0,!e){e=0,n=10;break}}if((n|0)==10)return e|0}for(e=i;;){if(n1(e,A)|0&&n1(e+16|0,r)|0){n=10;break}if(e=t[e+32>>2]|0,!e){e=0,n=10;break}}return(n|0)==10?e|0:0}function I3(e,A){e=e|0,A=A|0;var r=0;if(r=~~(+aA(+(+Ce(10,+ +(15-(t[e+12>>2]|0)|0))*(+M[A>>3]+ +M[A+8>>3])))%+(t[e+4>>2]|0))>>>0,e=t[(t[e>>2]|0)+(r<<2)>>2]|0,!e)return r=0,r|0;for(;;){if(n1(e,A)|0){A=5;break}if(e=t[e+32>>2]|0,!e){e=0,A=5;break}}return(A|0)==5?e|0:0}function P3(){return 27920}function Be(e){return e=+e,~~+Q2(+e)|0}function ve(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0,W=0,R=0,u0=0,s0=0,i0=0,G=0,S0=0;S0=L,L=L+16|0,I=S0;do if(e>>>0<245){if(p=e>>>0<11?16:e+11&-8,e=p>>>3,E=t[6981]|0,r=E>>>e,r&3|0)return A=(r&1^1)+e|0,e=27964+(A<<1<<2)|0,r=e+8|0,n=t[r>>2]|0,i=n+8|0,o=t[i>>2]|0,(o|0)==(e|0)?t[6981]=E&~(1<<A):(t[o+12>>2]=e,t[r>>2]=o),G=A<<3,t[n+4>>2]=G|3,G=n+G+4|0,t[G>>2]=t[G>>2]|1,G=i,L=S0,G|0;if(v=t[6983]|0,p>>>0>v>>>0){if(r|0)return A=2<<e,A=r<<e&(A|0-A),A=(A&0-A)+-1|0,c=A>>>12&16,A=A>>>c,r=A>>>5&8,A=A>>>r,o=A>>>2&4,A=A>>>o,e=A>>>1&2,A=A>>>e,n=A>>>1&1,n=(r|c|o|e|n)+(A>>>n)|0,A=27964+(n<<1<<2)|0,e=A+8|0,o=t[e>>2]|0,c=o+8|0,r=t[c>>2]|0,(r|0)==(A|0)?(e=E&~(1<<n),t[6981]=e):(t[r+12>>2]=A,t[e>>2]=r,e=E),G=n<<3,a=G-p|0,t[o+4>>2]=p|3,i=o+p|0,t[i+4>>2]=a|1,t[o+G>>2]=a,v|0&&(n=t[6986]|0,A=v>>>3,r=27964+(A<<1<<2)|0,A=1<<A,e&A?(e=r+8|0,A=t[e>>2]|0):(t[6981]=e|A,A=r,e=r+8|0),t[e>>2]=n,t[A+12>>2]=n,t[n+8>>2]=A,t[n+12>>2]=r),t[6983]=a,t[6986]=i,G=c,L=S0,G|0;if(o=t[6982]|0,o){for(r=(o&0-o)+-1|0,i=r>>>12&16,r=r>>>i,n=r>>>5&8,r=r>>>n,a=r>>>2&4,r=r>>>a,c=r>>>1&2,r=r>>>c,d=r>>>1&1,d=t[28228+((n|i|a|c|d)+(r>>>d)<<2)>>2]|0,r=d,c=d,d=(t[d+4>>2]&-8)-p|0;e=t[r+16>>2]|0,!(!e&&(e=t[r+20>>2]|0,!e));)a=(t[e+4>>2]&-8)-p|0,i=a>>>0<d>>>0,r=e,c=i?e:c,d=i?a:d;if(a=c+p|0,a>>>0>c>>>0){i=t[c+24>>2]|0,A=t[c+12>>2]|0;do if((A|0)==(c|0)){if(e=c+20|0,A=t[e>>2]|0,!A&&(e=c+16|0,A=t[e>>2]|0,!A)){r=0;break}for(;;)if(n=A+20|0,r=t[n>>2]|0,r)A=r,e=n;else if(n=A+16|0,r=t[n>>2]|0,r)A=r,e=n;else break;t[e>>2]=0,r=A}else r=t[c+8>>2]|0,t[r+12>>2]=A,t[A+8>>2]=r,r=A;while(!1);do if(i|0){if(A=t[c+28>>2]|0,e=28228+(A<<2)|0,(c|0)==(t[e>>2]|0)){if(t[e>>2]=r,!r){t[6982]=o&~(1<<A);break}}else if(G=i+16|0,t[((t[G>>2]|0)==(c|0)?G:i+20|0)>>2]=r,!r)break;t[r+24>>2]=i,A=t[c+16>>2]|0,A|0&&(t[r+16>>2]=A,t[A+24>>2]=r),A=t[c+20>>2]|0,A|0&&(t[r+20>>2]=A,t[A+24>>2]=r)}while(!1);return d>>>0<16?(G=d+p|0,t[c+4>>2]=G|3,G=c+G+4|0,t[G>>2]=t[G>>2]|1):(t[c+4>>2]=p|3,t[a+4>>2]=d|1,t[a+d>>2]=d,v|0&&(n=t[6986]|0,A=v>>>3,r=27964+(A<<1<<2)|0,A=1<<A,A&E?(e=r+8|0,A=t[e>>2]|0):(t[6981]=A|E,A=r,e=r+8|0),t[e>>2]=n,t[A+12>>2]=n,t[n+8>>2]=A,t[n+12>>2]=r),t[6983]=d,t[6986]=a),G=c+8|0,L=S0,G|0}else E=p}else E=p}else E=p}else if(e>>>0<=4294967231)if(e=e+11|0,p=e&-8,n=t[6982]|0,n){i=0-p|0,e=e>>>8,e?p>>>0>16777215?d=31:(E=(e+1048320|0)>>>16&8,W=e<<E,c=(W+520192|0)>>>16&4,W=W<<c,d=(W+245760|0)>>>16&2,d=14-(c|E|d)+(W<<d>>>15)|0,d=p>>>(d+7|0)&1|d<<1):d=0,r=t[28228+(d<<2)>>2]|0;A:do if(!r)r=0,e=0,W=61;else for(e=0,c=p<<((d|0)==31?0:25-(d>>>1)|0),o=0;;){if(a=(t[r+4>>2]&-8)-p|0,a>>>0<i>>>0)if(a)e=r,i=a;else{e=r,i=0,W=65;break A}if(W=t[r+20>>2]|0,r=t[r+16+(c>>>31<<2)>>2]|0,o=(W|0)==0|(W|0)==(r|0)?o:W,r)c=c<<1;else{r=o,W=61;break}}while(!1);if((W|0)==61){if((r|0)==0&(e|0)==0){if(e=2<<d,e=(e|0-e)&n,!e){E=p;break}E=(e&0-e)+-1|0,a=E>>>12&16,E=E>>>a,o=E>>>5&8,E=E>>>o,c=E>>>2&4,E=E>>>c,d=E>>>1&2,E=E>>>d,r=E>>>1&1,e=0,r=t[28228+((o|a|c|d|r)+(E>>>r)<<2)>>2]|0}r?W=65:(c=e,a=i)}if((W|0)==65)for(o=r;;)if(E=(t[o+4>>2]&-8)-p|0,r=E>>>0<i>>>0,i=r?E:i,e=r?o:e,r=t[o+16>>2]|0,r||(r=t[o+20>>2]|0),r)o=r;else{c=e,a=i;break}if((c|0)!=0&&a>>>0<((t[6983]|0)-p|0)>>>0&&(v=c+p|0,v>>>0>c>>>0)){o=t[c+24>>2]|0,A=t[c+12>>2]|0;do if((A|0)==(c|0)){if(e=c+20|0,A=t[e>>2]|0,!A&&(e=c+16|0,A=t[e>>2]|0,!A)){A=0;break}for(;;)if(i=A+20|0,r=t[i>>2]|0,r)A=r,e=i;else if(i=A+16|0,r=t[i>>2]|0,r)A=r,e=i;else break;t[e>>2]=0}else G=t[c+8>>2]|0,t[G+12>>2]=A,t[A+8>>2]=G;while(!1);do if(o){if(e=t[c+28>>2]|0,r=28228+(e<<2)|0,(c|0)==(t[r>>2]|0)){if(t[r>>2]=A,!A){n=n&~(1<<e),t[6982]=n;break}}else if(G=o+16|0,t[((t[G>>2]|0)==(c|0)?G:o+20|0)>>2]=A,!A)break;t[A+24>>2]=o,e=t[c+16>>2]|0,e|0&&(t[A+16>>2]=e,t[e+24>>2]=A),e=t[c+20>>2]|0,e&&(t[A+20>>2]=e,t[e+24>>2]=A)}while(!1);A:do if(a>>>0<16)G=a+p|0,t[c+4>>2]=G|3,G=c+G+4|0,t[G>>2]=t[G>>2]|1;else{if(t[c+4>>2]=p|3,t[v+4>>2]=a|1,t[v+a>>2]=a,A=a>>>3,a>>>0<256){r=27964+(A<<1<<2)|0,e=t[6981]|0,A=1<<A,e&A?(e=r+8|0,A=t[e>>2]|0):(t[6981]=e|A,A=r,e=r+8|0),t[e>>2]=v,t[A+12>>2]=v,t[v+8>>2]=A,t[v+12>>2]=r;break}if(A=a>>>8,A?a>>>0>16777215?r=31:(i0=(A+1048320|0)>>>16&8,G=A<<i0,s0=(G+520192|0)>>>16&4,G=G<<s0,r=(G+245760|0)>>>16&2,r=14-(s0|i0|r)+(G<<r>>>15)|0,r=a>>>(r+7|0)&1|r<<1):r=0,A=28228+(r<<2)|0,t[v+28>>2]=r,e=v+16|0,t[e+4>>2]=0,t[e>>2]=0,e=1<<r,!(n&e)){t[6982]=n|e,t[A>>2]=v,t[v+24>>2]=A,t[v+12>>2]=v,t[v+8>>2]=v;break}A=t[A>>2]|0;e:do if((t[A+4>>2]&-8|0)!=(a|0)){for(n=a<<((r|0)==31?0:25-(r>>>1)|0);r=A+16+(n>>>31<<2)|0,e=t[r>>2]|0,!!e;)if((t[e+4>>2]&-8|0)==(a|0)){A=e;break e}else n=n<<1,A=e;t[r>>2]=v,t[v+24>>2]=A,t[v+12>>2]=v,t[v+8>>2]=v;break A}while(!1);i0=A+8|0,G=t[i0>>2]|0,t[G+12>>2]=v,t[i0>>2]=v,t[v+8>>2]=G,t[v+12>>2]=A,t[v+24>>2]=0}while(!1);return G=c+8|0,L=S0,G|0}else E=p}else E=p;else E=-1;while(!1);if(r=t[6983]|0,r>>>0>=E>>>0)return A=r-E|0,e=t[6986]|0,A>>>0>15?(G=e+E|0,t[6986]=G,t[6983]=A,t[G+4>>2]=A|1,t[e+r>>2]=A,t[e+4>>2]=E|3):(t[6983]=0,t[6986]=0,t[e+4>>2]=r|3,G=e+r+4|0,t[G>>2]=t[G>>2]|1),G=e+8|0,L=S0,G|0;if(a=t[6984]|0,a>>>0>E>>>0)return s0=a-E|0,t[6984]=s0,G=t[6987]|0,i0=G+E|0,t[6987]=i0,t[i0+4>>2]=s0|1,t[G+4>>2]=E|3,G=G+8|0,L=S0,G|0;if(t[7099]|0?e=t[7101]|0:(t[7101]=4096,t[7100]=4096,t[7102]=-1,t[7103]=-1,t[7104]=0,t[7092]=0,t[7099]=I&-16^1431655768,e=4096),c=E+48|0,d=E+47|0,o=e+d|0,i=0-e|0,p=o&i,p>>>0<=E>>>0||(e=t[7091]|0,e|0&&(v=t[7089]|0,I=v+p|0,I>>>0<=v>>>0|I>>>0>e>>>0)))return G=0,L=S0,G|0;A:do if(t[7092]&4)A=0,W=143;else{r=t[6987]|0;e:do if(r){for(n=28372;I=t[n>>2]|0,!(I>>>0<=r>>>0&&(I+(t[n+4>>2]|0)|0)>>>0>r>>>0);)if(e=t[n+8>>2]|0,e)n=e;else{W=128;break e}if(A=o-a&i,A>>>0<2147483647)if(e=Ie(A|0)|0,(e|0)==((t[n>>2]|0)+(t[n+4>>2]|0)|0)){if((e|0)!=-1){a=A,o=e,W=145;break A}}else n=e,W=136;else A=0}else W=128;while(!1);do if((W|0)==128)if(r=Ie(0)|0,(r|0)!=-1&&(A=r,P=t[7100]|0,T=P+-1|0,A=((T&A|0)==0?0:(T+A&0-P)-A|0)+p|0,P=t[7089]|0,T=A+P|0,A>>>0>E>>>0&A>>>0<2147483647)){if(I=t[7091]|0,I|0&&T>>>0<=P>>>0|T>>>0>I>>>0){A=0;break}if(e=Ie(A|0)|0,(e|0)==(r|0)){a=A,o=r,W=145;break A}else n=e,W=136}else A=0;while(!1);do if((W|0)==136){if(r=0-A|0,!(c>>>0>A>>>0&(A>>>0<2147483647&(n|0)!=-1)))if((n|0)==-1){A=0;break}else{a=A,o=n,W=145;break A}if(e=t[7101]|0,e=d-A+e&0-e,e>>>0>=2147483647){a=A,o=n,W=145;break A}if((Ie(e|0)|0)==-1){Ie(r|0)|0,A=0;break}else{a=e+A|0,o=n,W=145;break A}}while(!1);t[7092]=t[7092]|4,W=143}while(!1);if((W|0)==143&&p>>>0<2147483647&&(s0=Ie(p|0)|0,T=Ie(0)|0,R=T-s0|0,u0=R>>>0>(E+40|0)>>>0,!((s0|0)==-1|u0^1|s0>>>0<T>>>0&((s0|0)!=-1&(T|0)!=-1)^1))&&(a=u0?R:A,o=s0,W=145),(W|0)==145){A=(t[7089]|0)+a|0,t[7089]=A,A>>>0>(t[7090]|0)>>>0&&(t[7090]=A),d=t[6987]|0;A:do if(d){for(A=28372;;){if(e=t[A>>2]|0,r=t[A+4>>2]|0,(o|0)==(e+r|0)){W=154;break}if(n=t[A+8>>2]|0,n)A=n;else break}if((W|0)==154&&(i0=A+4|0,(t[A+12>>2]&8|0)==0)&&o>>>0>d>>>0&e>>>0<=d>>>0){t[i0>>2]=r+a,G=(t[6984]|0)+a|0,s0=d+8|0,s0=(s0&7|0)==0?0:0-s0&7,i0=d+s0|0,s0=G-s0|0,t[6987]=i0,t[6984]=s0,t[i0+4>>2]=s0|1,t[d+G+4>>2]=40,t[6988]=t[7103];break}for(o>>>0<(t[6985]|0)>>>0&&(t[6985]=o),r=o+a|0,A=28372;;){if((t[A>>2]|0)==(r|0)){W=162;break}if(e=t[A+8>>2]|0,e)A=e;else break}if((W|0)==162&&(t[A+12>>2]&8|0)==0){t[A>>2]=o,v=A+4|0,t[v>>2]=(t[v>>2]|0)+a,v=o+8|0,v=o+((v&7|0)==0?0:0-v&7)|0,A=r+8|0,A=r+((A&7|0)==0?0:0-A&7)|0,p=v+E|0,c=A-v-E|0,t[v+4>>2]=E|3;e:do if((d|0)==(A|0))G=(t[6984]|0)+c|0,t[6984]=G,t[6987]=p,t[p+4>>2]=G|1;else{if((t[6986]|0)==(A|0)){G=(t[6983]|0)+c|0,t[6983]=G,t[6986]=p,t[p+4>>2]=G|1,t[p+G>>2]=G;break}if(e=t[A+4>>2]|0,(e&3|0)==1){a=e&-8,n=e>>>3;t:do if(e>>>0<256)if(e=t[A+8>>2]|0,r=t[A+12>>2]|0,(r|0)==(e|0)){t[6981]=t[6981]&~(1<<n);break}else{t[e+12>>2]=r,t[r+8>>2]=e;break}else{o=t[A+24>>2]|0,e=t[A+12>>2]|0;do if((e|0)==(A|0)){if(r=A+16|0,n=r+4|0,e=t[n>>2]|0,e)r=n;else if(e=t[r>>2]|0,!e){e=0;break}for(;;)if(i=e+20|0,n=t[i>>2]|0,n)e=n,r=i;else if(i=e+16|0,n=t[i>>2]|0,n)e=n,r=i;else break;t[r>>2]=0}else G=t[A+8>>2]|0,t[G+12>>2]=e,t[e+8>>2]=G;while(!1);if(!o)break;r=t[A+28>>2]|0,n=28228+(r<<2)|0;do if((t[n>>2]|0)!=(A|0)){if(G=o+16|0,t[((t[G>>2]|0)==(A|0)?G:o+20|0)>>2]=e,!e)break t}else{if(t[n>>2]=e,e|0)break;t[6982]=t[6982]&~(1<<r);break t}while(!1);if(t[e+24>>2]=o,r=A+16|0,n=t[r>>2]|0,n|0&&(t[e+16>>2]=n,t[n+24>>2]=e),r=t[r+4>>2]|0,!r)break;t[e+20>>2]=r,t[r+24>>2]=e}while(!1);A=A+a|0,i=a+c|0}else i=c;if(A=A+4|0,t[A>>2]=t[A>>2]&-2,t[p+4>>2]=i|1,t[p+i>>2]=i,A=i>>>3,i>>>0<256){r=27964+(A<<1<<2)|0,e=t[6981]|0,A=1<<A,e&A?(e=r+8|0,A=t[e>>2]|0):(t[6981]=e|A,A=r,e=r+8|0),t[e>>2]=p,t[A+12>>2]=p,t[p+8>>2]=A,t[p+12>>2]=r;break}A=i>>>8;do if(!A)n=0;else{if(i>>>0>16777215){n=31;break}i0=(A+1048320|0)>>>16&8,G=A<<i0,s0=(G+520192|0)>>>16&4,G=G<<s0,n=(G+245760|0)>>>16&2,n=14-(s0|i0|n)+(G<<n>>>15)|0,n=i>>>(n+7|0)&1|n<<1}while(!1);if(A=28228+(n<<2)|0,t[p+28>>2]=n,e=p+16|0,t[e+4>>2]=0,t[e>>2]=0,e=t[6982]|0,r=1<<n,!(e&r)){t[6982]=e|r,t[A>>2]=p,t[p+24>>2]=A,t[p+12>>2]=p,t[p+8>>2]=p;break}A=t[A>>2]|0;t:do if((t[A+4>>2]&-8|0)!=(i|0)){for(n=i<<((n|0)==31?0:25-(n>>>1)|0);r=A+16+(n>>>31<<2)|0,e=t[r>>2]|0,!!e;)if((t[e+4>>2]&-8|0)==(i|0)){A=e;break t}else n=n<<1,A=e;t[r>>2]=p,t[p+24>>2]=A,t[p+12>>2]=p,t[p+8>>2]=p;break e}while(!1);i0=A+8|0,G=t[i0>>2]|0,t[G+12>>2]=p,t[i0>>2]=p,t[p+8>>2]=G,t[p+12>>2]=A,t[p+24>>2]=0}while(!1);return G=v+8|0,L=S0,G|0}for(A=28372;e=t[A>>2]|0,!(e>>>0<=d>>>0&&(G=e+(t[A+4>>2]|0)|0,G>>>0>d>>>0));)A=t[A+8>>2]|0;i=G+-47|0,e=i+8|0,e=i+((e&7|0)==0?0:0-e&7)|0,i=d+16|0,e=e>>>0<i>>>0?d:e,A=e+8|0,r=a+-40|0,s0=o+8|0,s0=(s0&7|0)==0?0:0-s0&7,i0=o+s0|0,s0=r-s0|0,t[6987]=i0,t[6984]=s0,t[i0+4>>2]=s0|1,t[o+r+4>>2]=40,t[6988]=t[7103],r=e+4|0,t[r>>2]=27,t[A>>2]=t[7093],t[A+4>>2]=t[7094],t[A+8>>2]=t[7095],t[A+12>>2]=t[7096],t[7093]=o,t[7094]=a,t[7096]=0,t[7095]=A,A=e+24|0;do i0=A,A=A+4|0,t[A>>2]=7;while((i0+8|0)>>>0<G>>>0);if((e|0)!=(d|0)){if(o=e-d|0,t[r>>2]=t[r>>2]&-2,t[d+4>>2]=o|1,t[e>>2]=o,A=o>>>3,o>>>0<256){r=27964+(A<<1<<2)|0,e=t[6981]|0,A=1<<A,e&A?(e=r+8|0,A=t[e>>2]|0):(t[6981]=e|A,A=r,e=r+8|0),t[e>>2]=d,t[A+12>>2]=d,t[d+8>>2]=A,t[d+12>>2]=r;break}if(A=o>>>8,A?o>>>0>16777215?n=31:(i0=(A+1048320|0)>>>16&8,G=A<<i0,s0=(G+520192|0)>>>16&4,G=G<<s0,n=(G+245760|0)>>>16&2,n=14-(s0|i0|n)+(G<<n>>>15)|0,n=o>>>(n+7|0)&1|n<<1):n=0,r=28228+(n<<2)|0,t[d+28>>2]=n,t[d+20>>2]=0,t[i>>2]=0,A=t[6982]|0,e=1<<n,!(A&e)){t[6982]=A|e,t[r>>2]=d,t[d+24>>2]=r,t[d+12>>2]=d,t[d+8>>2]=d;break}A=t[r>>2]|0;e:do if((t[A+4>>2]&-8|0)!=(o|0)){for(n=o<<((n|0)==31?0:25-(n>>>1)|0);r=A+16+(n>>>31<<2)|0,e=t[r>>2]|0,!!e;)if((t[e+4>>2]&-8|0)==(o|0)){A=e;break e}else n=n<<1,A=e;t[r>>2]=d,t[d+24>>2]=A,t[d+12>>2]=d,t[d+8>>2]=d;break A}while(!1);i0=A+8|0,G=t[i0>>2]|0,t[G+12>>2]=d,t[i0>>2]=d,t[d+8>>2]=G,t[d+12>>2]=A,t[d+24>>2]=0}}else G=t[6985]|0,(G|0)==0|o>>>0<G>>>0&&(t[6985]=o),t[7093]=o,t[7094]=a,t[7096]=0,t[6990]=t[7099],t[6989]=-1,t[6994]=27964,t[6993]=27964,t[6996]=27972,t[6995]=27972,t[6998]=27980,t[6997]=27980,t[7e3]=27988,t[6999]=27988,t[7002]=27996,t[7001]=27996,t[7004]=28004,t[7003]=28004,t[7006]=28012,t[7005]=28012,t[7008]=28020,t[7007]=28020,t[7010]=28028,t[7009]=28028,t[7012]=28036,t[7011]=28036,t[7014]=28044,t[7013]=28044,t[7016]=28052,t[7015]=28052,t[7018]=28060,t[7017]=28060,t[7020]=28068,t[7019]=28068,t[7022]=28076,t[7021]=28076,t[7024]=28084,t[7023]=28084,t[7026]=28092,t[7025]=28092,t[7028]=28100,t[7027]=28100,t[7030]=28108,t[7029]=28108,t[7032]=28116,t[7031]=28116,t[7034]=28124,t[7033]=28124,t[7036]=28132,t[7035]=28132,t[7038]=28140,t[7037]=28140,t[7040]=28148,t[7039]=28148,t[7042]=28156,t[7041]=28156,t[7044]=28164,t[7043]=28164,t[7046]=28172,t[7045]=28172,t[7048]=28180,t[7047]=28180,t[7050]=28188,t[7049]=28188,t[7052]=28196,t[7051]=28196,t[7054]=28204,t[7053]=28204,t[7056]=28212,t[7055]=28212,G=a+-40|0,s0=o+8|0,s0=(s0&7|0)==0?0:0-s0&7,i0=o+s0|0,s0=G-s0|0,t[6987]=i0,t[6984]=s0,t[i0+4>>2]=s0|1,t[o+G+4>>2]=40,t[6988]=t[7103];while(!1);if(A=t[6984]|0,A>>>0>E>>>0)return s0=A-E|0,t[6984]=s0,G=t[6987]|0,i0=G+E|0,t[6987]=i0,t[i0+4>>2]=s0|1,t[G+4>>2]=E|3,G=G+8|0,L=S0,G|0}return G=P3()|0,t[G>>2]=12,G=0,L=S0,G|0}function Y0(e){e=e|0;var A=0,r=0,n=0,i=0,o=0,a=0,c=0,d=0;if(e){r=e+-8|0,i=t[6985]|0,e=t[e+-4>>2]|0,A=e&-8,d=r+A|0;do if(e&1)c=r,a=r;else{if(n=t[r>>2]|0,!(e&3)||(a=r+(0-n)|0,o=n+A|0,a>>>0<i>>>0))return;if((t[6986]|0)==(a|0)){if(e=d+4|0,A=t[e>>2]|0,(A&3|0)!=3){c=a,A=o;break}t[6983]=o,t[e>>2]=A&-2,t[a+4>>2]=o|1,t[a+o>>2]=o;return}if(r=n>>>3,n>>>0<256)if(e=t[a+8>>2]|0,A=t[a+12>>2]|0,(A|0)==(e|0)){t[6981]=t[6981]&~(1<<r),c=a,A=o;break}else{t[e+12>>2]=A,t[A+8>>2]=e,c=a,A=o;break}i=t[a+24>>2]|0,e=t[a+12>>2]|0;do if((e|0)==(a|0)){if(A=a+16|0,r=A+4|0,e=t[r>>2]|0,e)A=r;else if(e=t[A>>2]|0,!e){e=0;break}for(;;)if(n=e+20|0,r=t[n>>2]|0,r)e=r,A=n;else if(n=e+16|0,r=t[n>>2]|0,r)e=r,A=n;else break;t[A>>2]=0}else c=t[a+8>>2]|0,t[c+12>>2]=e,t[e+8>>2]=c;while(!1);if(i){if(A=t[a+28>>2]|0,r=28228+(A<<2)|0,(t[r>>2]|0)==(a|0)){if(t[r>>2]=e,!e){t[6982]=t[6982]&~(1<<A),c=a,A=o;break}}else if(c=i+16|0,t[((t[c>>2]|0)==(a|0)?c:i+20|0)>>2]=e,!e){c=a,A=o;break}t[e+24>>2]=i,A=a+16|0,r=t[A>>2]|0,r|0&&(t[e+16>>2]=r,t[r+24>>2]=e),A=t[A+4>>2]|0,A?(t[e+20>>2]=A,t[A+24>>2]=e,c=a,A=o):(c=a,A=o)}else c=a,A=o}while(!1);if(!(a>>>0>=d>>>0)&&(e=d+4|0,n=t[e>>2]|0,!!(n&1))){if(n&2)t[e>>2]=n&-2,t[c+4>>2]=A|1,t[a+A>>2]=A,i=A;else{if((t[6987]|0)==(d|0)){if(d=(t[6984]|0)+A|0,t[6984]=d,t[6987]=c,t[c+4>>2]=d|1,(c|0)!=(t[6986]|0))return;t[6986]=0,t[6983]=0;return}if((t[6986]|0)==(d|0)){d=(t[6983]|0)+A|0,t[6983]=d,t[6986]=a,t[c+4>>2]=d|1,t[a+d>>2]=d;return}i=(n&-8)+A|0,r=n>>>3;do if(n>>>0<256)if(A=t[d+8>>2]|0,e=t[d+12>>2]|0,(e|0)==(A|0)){t[6981]=t[6981]&~(1<<r);break}else{t[A+12>>2]=e,t[e+8>>2]=A;break}else{o=t[d+24>>2]|0,e=t[d+12>>2]|0;do if((e|0)==(d|0)){if(A=d+16|0,r=A+4|0,e=t[r>>2]|0,e)A=r;else if(e=t[A>>2]|0,!e){r=0;break}for(;;)if(n=e+20|0,r=t[n>>2]|0,r)e=r,A=n;else if(n=e+16|0,r=t[n>>2]|0,r)e=r,A=n;else break;t[A>>2]=0,r=e}else r=t[d+8>>2]|0,t[r+12>>2]=e,t[e+8>>2]=r,r=e;while(!1);if(o|0){if(e=t[d+28>>2]|0,A=28228+(e<<2)|0,(t[A>>2]|0)==(d|0)){if(t[A>>2]=r,!r){t[6982]=t[6982]&~(1<<e);break}}else if(n=o+16|0,t[((t[n>>2]|0)==(d|0)?n:o+20|0)>>2]=r,!r)break;t[r+24>>2]=o,e=d+16|0,A=t[e>>2]|0,A|0&&(t[r+16>>2]=A,t[A+24>>2]=r),e=t[e+4>>2]|0,e|0&&(t[r+20>>2]=e,t[e+24>>2]=r)}}while(!1);if(t[c+4>>2]=i|1,t[a+i>>2]=i,(c|0)==(t[6986]|0)){t[6983]=i;return}}if(e=i>>>3,i>>>0<256){r=27964+(e<<1<<2)|0,A=t[6981]|0,e=1<<e,A&e?(A=r+8|0,e=t[A>>2]|0):(t[6981]=A|e,e=r,A=r+8|0),t[A>>2]=c,t[e+12>>2]=c,t[c+8>>2]=e,t[c+12>>2]=r;return}e=i>>>8,e?i>>>0>16777215?n=31:(a=(e+1048320|0)>>>16&8,d=e<<a,o=(d+520192|0)>>>16&4,d=d<<o,n=(d+245760|0)>>>16&2,n=14-(o|a|n)+(d<<n>>>15)|0,n=i>>>(n+7|0)&1|n<<1):n=0,e=28228+(n<<2)|0,t[c+28>>2]=n,t[c+20>>2]=0,t[c+16>>2]=0,A=t[6982]|0,r=1<<n;A:do if(!(A&r))t[6982]=A|r,t[e>>2]=c,t[c+24>>2]=e,t[c+12>>2]=c,t[c+8>>2]=c;else{e=t[e>>2]|0;e:do if((t[e+4>>2]&-8|0)!=(i|0)){for(n=i<<((n|0)==31?0:25-(n>>>1)|0);r=e+16+(n>>>31<<2)|0,A=t[r>>2]|0,!!A;)if((t[A+4>>2]&-8|0)==(i|0)){e=A;break e}else n=n<<1,e=A;t[r>>2]=c,t[c+24>>2]=e,t[c+12>>2]=c,t[c+8>>2]=c;break A}while(!1);a=e+8|0,d=t[a>>2]|0,t[d+12>>2]=c,t[a>>2]=c,t[c+8>>2]=d,t[c+12>>2]=e,t[c+24>>2]=0}while(!1);if(d=(t[6989]|0)+-1|0,t[6989]=d,!(d|0)){for(e=28380;e=t[e>>2]|0,e;)e=e+8|0;t[6989]=-1}}}}function RA(e,A){e=e|0,A=A|0;var r=0;return e?(r=WA(A,e)|0,(A|e)>>>0>65535&&(r=((r>>>0)/(e>>>0)|0|0)==(A|0)?r:-1)):r=0,e=ve(r)|0,!e||!(t[e+-4>>2]&3)||_e(e|0,0,r|0)|0,e|0}function G0(e,A,r,n){return e=e|0,A=A|0,r=r|0,n=n|0,r=e+r>>>0,nA(A+n+(r>>>0<e>>>0|0)>>>0|0),r|0|0}function ZA(e,A,r,n){return e=e|0,A=A|0,r=r|0,n=n|0,n=A-n-(r>>>0>e>>>0|0)>>>0,nA(n|0),e-r>>>0|0|0}function F2(e){return e=e|0,(e?31-(he(e^e-1)|0)|0:32)|0}function dr(e,A,r,n,i){e=e|0,A=A|0,r=r|0,n=n|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,I=0,P=0,T=0;if(v=e,d=A,p=d,a=r,I=n,c=I,!p)return o=(i|0)!=0,c?o?(t[i>>2]=e|0,t[i+4>>2]=A&0,I=0,i=0,nA(I|0),i|0):(I=0,i=0,nA(I|0),i|0):(o&&(t[i>>2]=(v>>>0)%(a>>>0),t[i+4>>2]=0),I=0,i=(v>>>0)/(a>>>0)>>>0,nA(I|0),i|0);o=(c|0)==0;do if(a){if(!o){if(o=(he(c|0)|0)-(he(p|0)|0)|0,o>>>0<=31){E=o+1|0,c=31-o|0,A=o-31>>31,a=E,e=v>>>(E>>>0)&A|p<<c,A=p>>>(E>>>0)&A,o=0,c=v<<c;break}return i?(t[i>>2]=e|0,t[i+4>>2]=d|A&0,I=0,i=0,nA(I|0),i|0):(I=0,i=0,nA(I|0),i|0)}if(o=a-1|0,o&a|0){c=(he(a|0)|0)+33-(he(p|0)|0)|0,T=64-c|0,E=32-c|0,d=E>>31,P=c-32|0,A=P>>31,a=c,e=E-1>>31&p>>>(P>>>0)|(p<<E|v>>>(c>>>0))&A,A=A&p>>>(c>>>0),o=v<<T&d,c=(p<<T|v>>>(P>>>0))&d|v<<E&c-33>>31;break}return i|0&&(t[i>>2]=o&v,t[i+4>>2]=0),(a|0)==1?(P=d|A&0,T=e|0|0,nA(P|0),T|0):(T=F2(a|0)|0,P=p>>>(T>>>0)|0,T=p<<32-T|v>>>(T>>>0)|0,nA(P|0),T|0)}else{if(o)return i|0&&(t[i>>2]=(p>>>0)%(a>>>0),t[i+4>>2]=0),P=0,T=(p>>>0)/(a>>>0)>>>0,nA(P|0),T|0;if(!v)return i|0&&(t[i>>2]=0,t[i+4>>2]=(p>>>0)%(c>>>0)),P=0,T=(p>>>0)/(c>>>0)>>>0,nA(P|0),T|0;if(o=c-1|0,!(o&c))return i|0&&(t[i>>2]=e|0,t[i+4>>2]=o&p|A&0),P=0,T=p>>>((F2(c|0)|0)>>>0),nA(P|0),T|0;if(o=(he(c|0)|0)-(he(p|0)|0)|0,o>>>0<=30){A=o+1|0,c=31-o|0,a=A,e=p<<c|v>>>(A>>>0),A=p>>>(A>>>0),o=0,c=v<<c;break}return i?(t[i>>2]=e|0,t[i+4>>2]=d|A&0,P=0,T=0,nA(P|0),T|0):(P=0,T=0,nA(P|0),T|0)}while(!1);if(!a)p=c,d=0,c=0;else{E=r|0|0,v=I|n&0,p=G0(E|0,v|0,-1,-1)|0,r=S()|0,d=c,c=0;do n=d,d=o>>>31|d<<1,o=c|o<<1,n=e<<1|n>>>31|0,I=e>>>31|A<<1|0,ZA(p|0,r|0,n|0,I|0)|0,T=S()|0,P=T>>31|((T|0)<0?-1:0)<<1,c=P&1,e=ZA(n|0,I|0,P&E|0,(((T|0)<0?-1:0)>>31|((T|0)<0?-1:0)<<1)&v|0)|0,A=S()|0,a=a-1|0;while((a|0)!=0);p=d,d=0}return a=0,i|0&&(t[i>>2]=e,t[i+4>>2]=A),P=(o|0)>>>31|(p|a)<<1|(a<<1|o>>>31)&0|d,T=(o<<1|0)&-2|c,nA(P|0),T|0}function Ve(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0;return p=A>>31|((A|0)<0?-1:0)<<1,d=((A|0)<0?-1:0)>>31|((A|0)<0?-1:0)<<1,o=n>>31|((n|0)<0?-1:0)<<1,i=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1,c=ZA(p^e|0,d^A|0,p|0,d|0)|0,a=S()|0,e=o^p,A=i^d,ZA((dr(c,a,ZA(o^r|0,i^n|0,o|0,i|0)|0,S()|0,0)|0)^e|0,(S()|0)^A|0,e|0,A|0)|0}function T3(e,A){e=e|0,A=A|0;var r=0,n=0,i=0,o=0;return o=e&65535,i=A&65535,r=WA(i,o)|0,n=e>>>16,e=(r>>>16)+(WA(i,n)|0)|0,i=A>>>16,A=WA(i,o)|0,nA((e>>>16)+(WA(i,n)|0)+(((e&65535)+A|0)>>>16)|0),e+A<<16|r&65535|0|0}function QA(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0;return i=e,o=r,r=T3(i,o)|0,e=S()|0,nA((WA(A,o)|0)+(WA(n,i)|0)+e|e&0|0),r|0|0|0}function i1(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0,a=0,c=0,d=0,p=0;return i=L,L=L+16|0,c=i|0,a=A>>31|((A|0)<0?-1:0)<<1,o=((A|0)<0?-1:0)>>31|((A|0)<0?-1:0)<<1,p=n>>31|((n|0)<0?-1:0)<<1,d=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1,e=ZA(a^e|0,o^A|0,a|0,o|0)|0,A=S()|0,dr(e,A,ZA(p^r|0,d^n|0,p|0,d|0)|0,S()|0,c)|0,n=ZA(t[c>>2]^a|0,t[c+4>>2]^o|0,a|0,o|0)|0,r=S()|0,L=i,nA(r|0),n|0}function o1(e,A,r,n){e=e|0,A=A|0,r=r|0,n=n|0;var i=0,o=0;return o=L,L=L+16|0,i=o|0,dr(e,A,r,n,i)|0,L=o,nA(t[i+4>>2]|0),t[i>>2]|0|0}function N2(e,A,r){return e=e|0,A=A|0,r=r|0,(r|0)<32?(nA(A>>r|0),e>>>r|(A&(1<<r)-1)<<32-r):(nA(((A|0)<0?-1:0)|0),A>>r-32|0)}function C0(e,A,r){return e=e|0,A=A|0,r=r|0,(r|0)<32?(nA(A>>>r|0),e>>>r|(A&(1<<r)-1)<<32-r):(nA(0),A>>>r-32|0)}function x0(e,A,r){return e=e|0,A=A|0,r=r|0,(r|0)<32?(nA(A<<r|(e&(1<<r)-1<<32-r)>>>32-r|0),e<<r):(nA(e<<r-32|0),0)}function hr(e,A,r){return e=e|0,A=A|0,A=he(A)|0,(A|0)==32&&(A=A+(he(e)|0)|0),nA(0),A|0}function Z2(e,A){return e=+e,A=+A,e!=e?+A:A!=A?+e:+Qt(+e,+A)}function Y1(e,A){return e=+e,A=+A,e!=e?+A:A!=A?+e:+Ue(+e,+A)}function q1(e){return e=+e,e>=0?+BA(e+.5):+de(e-.5)}function s1(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0;if((r|0)>=8192)return Ot(e|0,A|0,r|0)|0,e|0;if(o=e|0,i=e+r|0,(e&3)==(A&3)){for(;e&3;){if(!r)return o|0;y0[e>>0]=y0[A>>0]|0,e=e+1|0,A=A+1|0,r=r-1|0}for(r=i&-4|0,n=r-64|0;(e|0)<=(n|0);)t[e>>2]=t[A>>2],t[e+4>>2]=t[A+4>>2],t[e+8>>2]=t[A+8>>2],t[e+12>>2]=t[A+12>>2],t[e+16>>2]=t[A+16>>2],t[e+20>>2]=t[A+20>>2],t[e+24>>2]=t[A+24>>2],t[e+28>>2]=t[A+28>>2],t[e+32>>2]=t[A+32>>2],t[e+36>>2]=t[A+36>>2],t[e+40>>2]=t[A+40>>2],t[e+44>>2]=t[A+44>>2],t[e+48>>2]=t[A+48>>2],t[e+52>>2]=t[A+52>>2],t[e+56>>2]=t[A+56>>2],t[e+60>>2]=t[A+60>>2],e=e+64|0,A=A+64|0;for(;(e|0)<(r|0);)t[e>>2]=t[A>>2],e=e+4|0,A=A+4|0}else for(r=i-4|0;(e|0)<(r|0);)y0[e>>0]=y0[A>>0]|0,y0[e+1>>0]=y0[A+1>>0]|0,y0[e+2>>0]=y0[A+2>>0]|0,y0[e+3>>0]=y0[A+3>>0]|0,e=e+4|0,A=A+4|0;for(;(e|0)<(i|0);)y0[e>>0]=y0[A>>0]|0,e=e+1|0,A=A+1|0;return o|0}function _e(e,A,r){e=e|0,A=A|0,r=r|0;var n=0,i=0,o=0,a=0;if(o=e+r|0,A=A&255,(r|0)>=67){for(;e&3;)y0[e>>0]=A,e=e+1|0;for(n=o&-4|0,a=A|A<<8|A<<16|A<<24,i=n-64|0;(e|0)<=(i|0);)t[e>>2]=a,t[e+4>>2]=a,t[e+8>>2]=a,t[e+12>>2]=a,t[e+16>>2]=a,t[e+20>>2]=a,t[e+24>>2]=a,t[e+28>>2]=a,t[e+32>>2]=a,t[e+36>>2]=a,t[e+40>>2]=a,t[e+44>>2]=a,t[e+48>>2]=a,t[e+52>>2]=a,t[e+56>>2]=a,t[e+60>>2]=a,e=e+64|0;for(;(e|0)<(n|0);)t[e>>2]=a,e=e+4|0}for(;(e|0)<(o|0);)y0[e>>0]=A,e=e+1|0;return o-r|0}function Q2(e){return e=+e,e>=0?+BA(e+.5):+de(e-.5)}function Ie(e){e=e|0;var A=0,r=0,n=0;return n=m1()|0,r=t[CA>>2]|0,A=r+e|0,(e|0)>0&(A|0)<(r|0)|(A|0)<0?(K(A|0)|0,y1(12),-1):(A|0)>(n|0)&&!(Z1(A|0)|0)?(y1(12),-1):(t[CA>>2]=A,r|0)}return{___divdi3:Ve,___muldi3:QA,___remdi3:i1,___uremdi3:o1,_areNeighborCells:Ml,_bitshift64Ashr:N2,_bitshift64Lshr:C0,_bitshift64Shl:x0,_calloc:RA,_cellAreaKm2:n3,_cellAreaM2:i3,_cellAreaRads2:ar,_cellToBoundary:r1,_cellToCenterChild:C2,_cellToChildPos:ql,_cellToChildren:Zl,_cellToChildrenSize:v1,_cellToLatLng:Ye,_cellToLocalIj:f3,_cellToParent:er,_cellToVertex:ue,_cellToVertexes:H3,_cellsToDirectedEdge:xl,_cellsToLinkedMultiPolygon:ol,_childPosToCell:Xl,_compactCells:Ql,_constructCell:Fl,_destroyLinkedMultiPolygon:k2,_directedEdgeToBoundary:j1,_directedEdgeToCells:Sl,_edgeLengthKm:s3,_edgeLengthM:l3,_edgeLengthRads:o3,_emscripten_replace_memory:F0,_free:Y0,_getBaseCellNumber:y2,_getDirectedEdgeDestination:zl,_getDirectedEdgeOrigin:El,_getHexagonAreaAvgKm2:w2,_getHexagonAreaAvgM2:e3,_getHexagonEdgeLengthAvgKm:t3,_getHexagonEdgeLengthAvgM:r3,_getIcosahedronFaces:v2,_getIndexDigit:Tl,_getNumCells:$1,_getPentagons:or,_getRes0Cells:ul,_getResolution:Pl,_greatCircleDistanceKm:w1,_greatCircleDistanceM:Kl,_greatCircleDistanceRads:Jl,_gridDisk:ae,_gridDiskDistances:Se,_gridDistance:h3,_gridPathCells:g3,_gridPathCellsSize:p3,_gridRing:el,_gridRingUnsafe:Rn,_i64Add:G0,_i64Subtract:ZA,_isPentagon:MA,_isResClassIII:jl,_isValidCell:Rt,_isValidDirectedEdge:h2,_isValidIndex:Nl,_isValidVertex:V2,_latLngToCell:nr,_llvm_ctlz_i64:hr,_llvm_maxnum_f64:Z2,_llvm_minnum_f64:Y1,_llvm_round_f64:q1,_localIjToCell:d3,_malloc:ve,_maxFaceCount:Gl,_maxGridDiskSize:pe,_maxPolygonToCellsSize:rl,_maxPolygonToCellsSizeExperimental:C3,_memcpy:s1,_memset:_e,_originToDirectedEdges:Dl,_pentagonCount:Yl,_polygonToCells:nl,_polygonToCellsExperimental:m3,_readInt64AsDoubleFromPointer:E3,_res0CellCount:cl,_round:Q2,_sbrk:Ie,_sizeOfCellBoundary:w3,_sizeOfCoordIJ:x3,_sizeOfGeoLoop:L3,_sizeOfGeoPolygon:k3,_sizeOfH3Index:v3,_sizeOfLatLng:b3,_sizeOfLinkedGeoPolygon:M3,_uncompactCells:Ol,_uncompactCellsSize:Ul,_vertexToLatLng:B3,establishStackSpace:kA,stackAlloc:X0,stackRestore:uA,stackSave:AA}})(Ft,N1,o0);l.___divdi3=k0.___divdi3,l.___muldi3=k0.___muldi3,l.___remdi3=k0.___remdi3,l.___uremdi3=k0.___uremdi3,l._areNeighborCells=k0._areNeighborCells,l._bitshift64Ashr=k0._bitshift64Ashr,l._bitshift64Lshr=k0._bitshift64Lshr,l._bitshift64Shl=k0._bitshift64Shl,l._calloc=k0._calloc,l._cellAreaKm2=k0._cellAreaKm2,l._cellAreaM2=k0._cellAreaM2,l._cellAreaRads2=k0._cellAreaRads2,l._cellToBoundary=k0._cellToBoundary,l._cellToCenterChild=k0._cellToCenterChild,l._cellToChildPos=k0._cellToChildPos,l._cellToChildren=k0._cellToChildren,l._cellToChildrenSize=k0._cellToChildrenSize,l._cellToLatLng=k0._cellToLatLng,l._cellToLocalIj=k0._cellToLocalIj,l._cellToParent=k0._cellToParent,l._cellToVertex=k0._cellToVertex,l._cellToVertexes=k0._cellToVertexes,l._cellsToDirectedEdge=k0._cellsToDirectedEdge,l._cellsToLinkedMultiPolygon=k0._cellsToLinkedMultiPolygon,l._childPosToCell=k0._childPosToCell,l._compactCells=k0._compactCells,l._constructCell=k0._constructCell,l._destroyLinkedMultiPolygon=k0._destroyLinkedMultiPolygon,l._directedEdgeToBoundary=k0._directedEdgeToBoundary,l._directedEdgeToCells=k0._directedEdgeToCells,l._edgeLengthKm=k0._edgeLengthKm,l._edgeLengthM=k0._edgeLengthM,l._edgeLengthRads=k0._edgeLengthRads;var Nt=l._emscripten_replace_memory=k0._emscripten_replace_memory;l._free=k0._free,l._getBaseCellNumber=k0._getBaseCellNumber,l._getDirectedEdgeDestination=k0._getDirectedEdgeDestination,l._getDirectedEdgeOrigin=k0._getDirectedEdgeOrigin,l._getHexagonAreaAvgKm2=k0._getHexagonAreaAvgKm2,l._getHexagonAreaAvgM2=k0._getHexagonAreaAvgM2,l._getHexagonEdgeLengthAvgKm=k0._getHexagonEdgeLengthAvgKm,l._getHexagonEdgeLengthAvgM=k0._getHexagonEdgeLengthAvgM,l._getIcosahedronFaces=k0._getIcosahedronFaces,l._getIndexDigit=k0._getIndexDigit,l._getNumCells=k0._getNumCells,l._getPentagons=k0._getPentagons,l._getRes0Cells=k0._getRes0Cells,l._getResolution=k0._getResolution,l._greatCircleDistanceKm=k0._greatCircleDistanceKm,l._greatCircleDistanceM=k0._greatCircleDistanceM,l._greatCircleDistanceRads=k0._greatCircleDistanceRads,l._gridDisk=k0._gridDisk,l._gridDiskDistances=k0._gridDiskDistances,l._gridDistance=k0._gridDistance,l._gridPathCells=k0._gridPathCells,l._gridPathCellsSize=k0._gridPathCellsSize,l._gridRing=k0._gridRing,l._gridRingUnsafe=k0._gridRingUnsafe,l._i64Add=k0._i64Add,l._i64Subtract=k0._i64Subtract,l._isPentagon=k0._isPentagon,l._isResClassIII=k0._isResClassIII,l._isValidCell=k0._isValidCell,l._isValidDirectedEdge=k0._isValidDirectedEdge,l._isValidIndex=k0._isValidIndex,l._isValidVertex=k0._isValidVertex,l._latLngToCell=k0._latLngToCell,l._llvm_ctlz_i64=k0._llvm_ctlz_i64,l._llvm_maxnum_f64=k0._llvm_maxnum_f64,l._llvm_minnum_f64=k0._llvm_minnum_f64,l._llvm_round_f64=k0._llvm_round_f64,l._localIjToCell=k0._localIjToCell,l._malloc=k0._malloc,l._maxFaceCount=k0._maxFaceCount,l._maxGridDiskSize=k0._maxGridDiskSize,l._maxPolygonToCellsSize=k0._maxPolygonToCellsSize,l._maxPolygonToCellsSizeExperimental=k0._maxPolygonToCellsSizeExperimental,l._memcpy=k0._memcpy,l._memset=k0._memset,l._originToDirectedEdges=k0._originToDirectedEdges,l._pentagonCount=k0._pentagonCount,l._polygonToCells=k0._polygonToCells,l._polygonToCellsExperimental=k0._polygonToCellsExperimental,l._readInt64AsDoubleFromPointer=k0._readInt64AsDoubleFromPointer,l._res0CellCount=k0._res0CellCount,l._round=k0._round,l._sbrk=k0._sbrk,l._sizeOfCellBoundary=k0._sizeOfCellBoundary,l._sizeOfCoordIJ=k0._sizeOfCoordIJ,l._sizeOfGeoLoop=k0._sizeOfGeoLoop,l._sizeOfGeoPolygon=k0._sizeOfGeoPolygon,l._sizeOfH3Index=k0._sizeOfH3Index,l._sizeOfLatLng=k0._sizeOfLatLng,l._sizeOfLinkedGeoPolygon=k0._sizeOfLinkedGeoPolygon,l._uncompactCells=k0._uncompactCells,l._uncompactCellsSize=k0._uncompactCellsSize,l._vertexToLatLng=k0._vertexToLatLng,l.establishStackSpace=k0.establishStackSpace;var f1=l.stackAlloc=k0.stackAlloc,jA=l.stackRestore=k0.stackRestore,Oe=l.stackSave=k0.stackSave;if(l.asm=k0,l.cwrap=N,l.setValue=B,l.getValue=H,P0){q0(P0)||(P0=m(P0));{Z0();var zA=function(f0){f0.byteLength&&(f0=new Uint8Array(f0)),t0.set(f0,z),l.memoryInitializerRequest&&delete l.memoryInitializerRequest.response,M0()},Re=function(){y(P0,zA,function(){throw"could not load memory initializer "+P0})},d1=Ke(P0);if(d1)zA(d1.buffer);else if(l.memoryInitializerRequest){var h1=function(){var f0=l.memoryInitializerRequest,m0=f0.response;if(f0.status!==200&&f0.status!==0){var I0=Ke(l.memoryInitializerRequestURL);if(I0)m0=I0.buffer;else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+f0.status+", retrying "+P0),Re();return}}zA(m0)};l.memoryInitializerRequest.response?setTimeout(h1,0):l.memoryInitializerRequest.addEventListener("load",h1)}else Re()}}var Ee;T0=function f0(){Ee||p1(),Ee||(T0=f0)};function p1(f0){if(L0>0||(gA(),L0>0))return;function m0(){Ee||(Ee=!0,!_&&(z0(),B0(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),j0()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),m0()},1)):m0()}l.run=p1;function ze(f0){throw l.onAbort&&l.onAbort(f0),f0+="",C(f0),b(f0),_=!0,"abort("+f0+"). Build with -s ASSERTIONS=1 for more info."}if(l.abort=ze,l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return p1(),s})(typeof ye=="object"?ye:{}),K0="number",J0=K0,Xe=K0,tA=K0,rA=K0,TA=K0,Q0=K0,Ys=[["sizeOfH3Index",K0],["sizeOfLatLng",K0],["sizeOfCellBoundary",K0],["sizeOfGeoLoop",K0],["sizeOfGeoPolygon",K0],["sizeOfLinkedGeoPolygon",K0],["sizeOfCoordIJ",K0],["readInt64AsDoubleFromPointer",K0],["isValidCell",Xe,[tA,rA]],["isValidIndex",Xe,[tA,rA]],["latLngToCell",J0,[K0,K0,TA,Q0]],["cellToLatLng",J0,[tA,rA,Q0]],["cellToBoundary",J0,[tA,rA,Q0]],["maxGridDiskSize",J0,[K0,Q0]],["gridDisk",J0,[tA,rA,K0,Q0]],["gridDiskDistances",J0,[tA,rA,K0,Q0,Q0]],["gridRing",J0,[tA,rA,K0,Q0]],["gridRingUnsafe",J0,[tA,rA,K0,Q0]],["maxPolygonToCellsSize",J0,[Q0,TA,K0,Q0]],["polygonToCells",J0,[Q0,TA,K0,Q0]],["maxPolygonToCellsSizeExperimental",J0,[Q0,TA,K0,Q0]],["polygonToCellsExperimental",J0,[Q0,TA,K0,K0,K0,Q0]],["cellsToLinkedMultiPolygon",J0,[Q0,K0,Q0]],["destroyLinkedMultiPolygon",null,[Q0]],["compactCells",J0,[Q0,Q0,K0,K0]],["uncompactCells",J0,[Q0,K0,K0,Q0,K0,TA]],["uncompactCellsSize",J0,[Q0,K0,K0,TA,Q0]],["isPentagon",Xe,[tA,rA]],["isResClassIII",Xe,[tA,rA]],["getBaseCellNumber",K0,[tA,rA]],["getResolution",K0,[tA,rA]],["getIndexDigit",K0,[tA,rA,K0]],["constructCell",J0,[K0,K0,Q0,Q0]],["maxFaceCount",J0,[tA,rA,Q0]],["getIcosahedronFaces",J0,[tA,rA,Q0]],["cellToParent",J0,[tA,rA,TA,Q0]],["cellToChildren",J0,[tA,rA,TA,Q0]],["cellToCenterChild",J0,[tA,rA,TA,Q0]],["cellToChildrenSize",J0,[tA,rA,TA,Q0]],["cellToChildPos",J0,[tA,rA,TA,Q0]],["childPosToCell",J0,[K0,K0,tA,rA,TA,Q0]],["areNeighborCells",J0,[tA,rA,tA,rA,Q0]],["cellsToDirectedEdge",J0,[tA,rA,tA,rA,Q0]],["getDirectedEdgeOrigin",J0,[tA,rA,Q0]],["getDirectedEdgeDestination",J0,[tA,rA,Q0]],["isValidDirectedEdge",Xe,[tA,rA]],["directedEdgeToCells",J0,[tA,rA,Q0]],["originToDirectedEdges",J0,[tA,rA,Q0]],["directedEdgeToBoundary",J0,[tA,rA,Q0]],["gridDistance",J0,[tA,rA,tA,rA,Q0]],["gridPathCells",J0,[tA,rA,tA,rA,Q0]],["gridPathCellsSize",J0,[tA,rA,tA,rA,Q0]],["cellToLocalIj",J0,[tA,rA,tA,rA,K0,Q0]],["localIjToCell",J0,[tA,rA,Q0,K0,Q0]],["getHexagonAreaAvgM2",J0,[TA,Q0]],["getHexagonAreaAvgKm2",J0,[TA,Q0]],["getHexagonEdgeLengthAvgM",J0,[TA,Q0]],["getHexagonEdgeLengthAvgKm",J0,[TA,Q0]],["greatCircleDistanceM",K0,[Q0,Q0]],["greatCircleDistanceKm",K0,[Q0,Q0]],["greatCircleDistanceRads",K0,[Q0,Q0]],["cellAreaM2",J0,[tA,rA,Q0]],["cellAreaKm2",J0,[tA,rA,Q0]],["cellAreaRads2",J0,[tA,rA,Q0]],["edgeLengthM",J0,[tA,rA,Q0]],["edgeLengthKm",J0,[tA,rA,Q0]],["edgeLengthRads",J0,[tA,rA,Q0]],["getNumCells",J0,[TA,Q0]],["getRes0Cells",J0,[Q0]],["res0CellCount",K0],["getPentagons",J0,[K0,Q0]],["pentagonCount",K0],["cellToVertex",J0,[tA,rA,K0,Q0]],["cellToVertexes",J0,[tA,rA,Q0]],["vertexToLatLng",J0,[tA,rA,Q0]],["isValidVertex",Xe,[tA,rA]]],qs=0,Xs=1,Js=2,Ks=3,Rs=4,A5=5,e5=6,t5=7,r5=8,n5=9,i5=10,o5=11,s5=12,l5=13,a5=14,c5=15,u5=16,f5=17,d5=18,h5=19,HA={};HA[qs]="Success",HA[Xs]="The operation failed but a more specific error is not available",HA[Js]="Argument was outside of acceptable range",HA[Ks]="Latitude or longitude arguments were outside of acceptable range",HA[Rs]="Resolution argument was outside of acceptable range",HA[A5]="Cell argument was not valid",HA[e5]="Directed edge argument was not valid",HA[t5]="Undirected edge argument was not valid",HA[r5]="Vertex argument was not valid",HA[n5]="Pentagon distortion was encountered",HA[i5]="Duplicate input",HA[o5]="Cell arguments were not neighbors",HA[s5]="Cell arguments had incompatible resolutions",HA[l5]="Memory allocation failed",HA[a5]="Bounds of provided memory were insufficient",HA[c5]="Mode or flags argument was not valid",HA[u5]="Index argument was not valid",HA[f5]="Base cell number was outside of acceptable range",HA[d5]="Child indexing digits invalid",HA[h5]="Child indexing digits refer to a deleted subsequence";var p5="Unknown error";function g5(s,l,u){var f=u&&"value"in u,h=new Error((s[l]||p5)+" (code: "+l+(f?", value: "+u.value:"")+")");return h.code=l,h}function y5(s,l){var u=arguments.length===2?{value:l}:{};return g5(HA,s,u)}function jn(s){if(s!==0)throw y5(s)}var fe={};Ys.forEach(function(l){fe[l[0]]=ye.cwrap.apply(ye,l)});var $n=16,P1=8;fe.sizeOfH3Index();var m5=fe.sizeOfLatLng(),C5=fe.sizeOfCellBoundary();fe.sizeOfGeoPolygon(),fe.sizeOfGeoLoop(),fe.sizeOfLinkedGeoPolygon(),fe.sizeOfCoordIJ();var v5=/[^0-9a-fA-F]/;function _t(s){if(Array.isArray(s)&&s.length===2&&Number.isInteger(s[0])&&Number.isInteger(s[1]))return s;if(typeof s!="string"||v5.test(s))return[0,0];var l=parseInt(s.substring(0,s.length-8),$n),u=parseInt(s.substring(s.length-8),$n);return[u,l]}function T1(s){return x5(ye.getValue(s,"double"))}function b5(s){return[T1(s),T1(s+P1)]}function w5(s){return[T1(s+P1),T1(s)]}function L5(s,l,u){for(var f=ye.getValue(s,"i32"),h=s+P1,m=[],y=w5,C=0;C<f*2;C+=2)m.push(y(h+P1*C));return m.push(m[0]),m}function Wn(s){var l=_t(s),u=l[0],f=l[1];return!!fe.isValidCell(u,f)}function k5(s){var l=ye._malloc(m5),u=_t(s),f=u[0],h=u[1];try{return jn(fe.cellToLatLng(f,h,l)),b5(l)}finally{ye._free(l)}}function M5(s,l){var u=ye._malloc(C5),f=_t(s),h=f[0],m=f[1];try{return jn(fe.cellToBoundary(h,m,u)),L5(u,l,l)}finally{ye._free(u)}}function x5(s){return s*180/Math.PI}const E5=["#dbeafe","#93c5fd","#60a5fa","#3b82f6","#2563eb"];function z5({source:s,h3Field:l="h3",color:u,colorField:f,colorValues:h,opacity:m=.8,showStroke:y=!0,strokeColor:C="rgba(255,255,255,0.3)",strokeWidth:b=.5,hoverEffect:k=!0,clickEffect:x=!1,showLabel:D=!1,labelField:z,labelColor:B="#333",labelSize:H=12,active:_,select:j,style:Z,onClick:Q,onMouseMove:N,onMouseEnter:q,onMouseLeave:J,...r0}){const O=w.useMemo(()=>!s||s.length===0?{type:"FeatureCollection",features:[]}:{type:"FeatureCollection",features:s.filter(X=>{const t0=X[l];return typeof t0=="string"&&Wn(t0)}).map(X=>{const t0=X[l],V=M5(t0,!0),$=[...V,V[0]],e0={};for(const c0 of Object.keys(X))c0!==l&&(e0[c0]=X[c0]);return e0._h3Index=t0,{type:"Feature",geometry:{type:"Polygon",coordinates:[$]},properties:e0}})},[s,l]),Y=w.useMemo(()=>!D||!s||s.length===0?{type:"FeatureCollection",features:[]}:{type:"FeatureCollection",features:s.filter(X=>{const t0=X[l];return typeof t0=="string"&&Wn(t0)}).map(X=>{const t0=X[l],[V,$]=k5(t0),e0={};for(const c0 of Object.keys(X))c0!==l&&(e0[c0]=X[c0]);return e0._h3Index=t0,{type:"Feature",geometry:{type:"Point",coordinates:[$,V]},properties:e0}})},[s,l,D]),n0=_??(k?{color:"#2563eb"}:!1),A0=j??(x?{color:"#1d4ed8"}:!1);return g.jsxs(g.Fragment,{children:[g.jsx(u1,{...r0,source:O,sourceType:"geojson",color:u,colorField:f,colorValues:h,opacity:m,active:n0,select:A0,style:Z,onClick:Q,onMouseMove:N,onMouseEnter:q,onMouseLeave:J}),y&&g.jsx(ee,{source:O,sourceType:"geojson",color:C,size:b,style:{opacity:1}}),D&&z&&g.jsx(PA,{source:Y,sourceType:"geojson",shapeField:z,shapeValues:"text",color:B,size:H,style:{textAnchor:"center",textOffset:[0,0],fontWeight:400,stroke:"#fff",strokeWidth:2}})]})}function Gn({position:s="bottomleft",className:l,style:u,children:f}){const{positionClassName:h}=XA(s),m=qA();if(!f)return null;const y=g.jsx("div",{className:`l7-control l7-control-legend l7-control--glass${l?` ${l}`:""}`,style:{padding:"12px 14px",borderRadius:8,maxHeight:"40%",overflowY:"auto",...u},children:f});return m?y:g.jsx("div",{className:`l7-control-anchor ${h}`,children:y})}UA.mark(Gn);function S5(s){return{mode:"select",features:s?[...s]:[],selectedFeatureId:null,isDrawing:!1,currentStrokeVertices:[],editingFeatureId:null}}let D5=0;function Yn(){return`annotation-${Date.now()}-${++D5}`}function It(s,l){if(s.length<=2)return s;let u=0,f=0;const h=s[0],m=s[s.length-1];for(let y=1;y<s.length-1;y++){const C=H5(s[y],h,m);C>u&&(u=C,f=y)}if(u>l){const y=It(s.slice(0,f+1),l),C=It(s.slice(f),l);return y.slice(0,-1).concat(C)}return[h,m]}function H5(s,l,u){const f=u[0]-l[0],h=u[1]-l[1],m=f*f+h*h;if(m===0){const D=s[0]-l[0],z=s[1]-l[1];return Math.sqrt(D*D+z*z)}const y=((s[0]-l[0])*f+(s[1]-l[1])*h)/m,C=l[0]+y*f,b=l[1]+y*h,k=s[0]-C,x=s[1]-b;return Math.sqrt(k*k+x*x)}function B5(s){const{scene:l,mapsService:u,defaultFeatures:f,features:h,onAnnotationCreate:m,onAnnotationUpdate:y,onAnnotationDelete:C,onAnnotationSelect:b,onModeChange:k,onChange:x,activeColor:D,activeOpacity:z,activeStrokeWidth:B,activeFontSize:H}=s,_=w.useRef(S5(f)),[,j]=w.useState(0),Z=w.useCallback(()=>j(V=>V+1),[]);w.useEffect(()=>{h!==void 0&&(_.current.features=h,Z())},[h,Z]);const Q=w.useCallback(()=>h??_.current.features,[h]),N=w.useCallback(V=>{h===void 0&&(_.current.features=V),x==null||x(V),Z()},[h,x,Z]),q=w.useCallback(V=>{var e0;const $=_.current.mode;$!==V&&($==="highlighter"&&_.current.isDrawing&&(_.current.isDrawing=!1,_.current.currentStrokeVertices=[],(e0=u==null?void 0:u.setMapStatus)==null||e0.call(u,{dragEnable:!0})),_.current.mode=V,_.current.editingFeatureId=null,V!=="select"&&(_.current.selectedFeatureId=null,b==null||b(null)),k==null||k(V),Z())},[u,k,b,Z]),J=w.useCallback(V=>{const $=[...Q(),V];N($),m==null||m(V)},[Q,N,m]),r0=w.useCallback((V,$)=>{const e0=Q().map(c0=>{if(c0.id!==V)return c0;const h0={...c0,properties:{...c0.properties,...$,updatedAt:new Date().toISOString()}};return y==null||y(h0),h0});N(e0)},[Q,N,y]),O=w.useCallback(V=>{const $=Q().find(c0=>c0.id===V);if(!$)return;const e0=Q().filter(c0=>c0.id!==V);_.current.selectedFeatureId===V&&(_.current.selectedFeatureId=null,b==null||b(null)),_.current.editingFeatureId===V&&(_.current.editingFeatureId=null),N(e0),C==null||C($)},[Q,N,C,b]),Y=w.useCallback(V=>{_.current.selectedFeatureId=V;const $=V?Q().find(e0=>e0.id===V)??null:null;b==null||b($),Z()},[Q,b,Z]),n0=w.useCallback(()=>{_.current.selectedFeatureId=null,_.current.editingFeatureId=null,N([]),b==null||b(null)},[N,b]),A0=w.useCallback((V,$,e0)=>{const c0=Q().map(h0=>{if(h0.id!==V)return h0;const p0={...h0,geometry:{type:"Point",coordinates:[$,e0]},properties:{...h0.properties,updatedAt:new Date().toISOString()}};return y==null||y(p0),p0});N(c0)},[Q,N,y]),o0=w.useCallback(V=>{_.current.editingFeatureId=V,Z()},[Z]),X=w.useCallback(()=>{_.current.editingFeatureId=null,Z()},[Z]),t0=w.useCallback((V,$,e0)=>{const c0=new Date().toISOString(),h0={type:"Feature",id:Yn(),geometry:{type:"Point",coordinates:[V,$]}};switch(e0){case"marker":return{...h0,properties:{annotationType:"marker",color:D,createdAt:c0}};case"text":return{...h0,properties:{annotationType:"text",text:"",color:D,fontSize:H,createdAt:c0}};case"note":return{...h0,properties:{annotationType:"note",title:"",body:"",color:D,createdAt:c0}};case"link":return{...h0,properties:{annotationType:"link",url:"",title:"",color:D,createdAt:c0}};case"image":return{...h0,properties:{annotationType:"image",src:"",createdAt:c0}};case"video":return{...h0,properties:{annotationType:"video",url:"",createdAt:c0}};default:return{...h0,properties:{annotationType:"marker",color:D,createdAt:c0}}}},[D,H]);return w.useEffect(()=>{if(!l||!u)return;const V=h0=>{const p0=_.current,H0=Fe(h0);if(!H0)return;const[U0,w0]=H0,g0=p0.mode;if(!(g0==="select"||g0==="none")&&g0!=="highlighter"&&(g0==="marker"||g0==="text"||g0==="note"||g0==="link"||g0==="image"||g0==="video")){const N0=t0(U0,w0,g0);J(N0),_.current.mode=g0,_.current.selectedFeatureId=N0.id,b==null||b(N0),g0!=="marker"&&(_.current.editingFeatureId=N0.id),g0!=="marker"&&(_.current.mode="select",k==null||k("select")),Z()}},$=h0=>{var U0;const p0=_.current;if(p0.mode!=="highlighter")return;const H0=Fe(h0);H0&&(p0.isDrawing=!0,p0.currentStrokeVertices=[H0],(U0=u.setMapStatus)==null||U0.call(u,{dragEnable:!1}),Z())},e0=h0=>{var w0,g0;const p0=_.current;if(!p0.isDrawing||p0.mode!=="highlighter")return;const H0=Fe(h0);if(!H0)return;const U0=p0.currentStrokeVertices;if(U0.length>0){const N0=U0[U0.length-1],D0=((w0=u.lngLatToContainer)==null?void 0:w0.call(u,N0))??{x:0,y:0},_0=((g0=u.lngLatToContainer)==null?void 0:g0.call(u,H0))??{x:0,y:0};if(Gr(D0,_0)<4)return}p0.currentStrokeVertices=[...U0,H0],Z()},c0=()=>{var w0;const h0=_.current;if(!h0.isDrawing||h0.mode!=="highlighter")return;h0.isDrawing=!1,(w0=u.setMapStatus)==null||w0.call(u,{dragEnable:!0});const p0=h0.currentStrokeVertices;if(p0.length<2){h0.currentStrokeVertices=[],Z();return}const H0=It(p0,5e-5);h0.currentStrokeVertices=[];const U0={type:"Feature",id:Yn(),geometry:{type:"LineString",coordinates:H0},properties:{annotationType:"highlighter",color:D,strokeWidth:B,strokeOpacity:z,createdAt:new Date().toISOString()}};J(U0),Z()};return l.on("click",V),l.on("mousedown",$),l.on("mousemove",e0),l.on("mouseup",c0),()=>{l.off("click",V),l.off("mousedown",$),l.off("mousemove",e0),l.off("mouseup",c0)}},[l,u,J,t0,b,k,Z]),w.useEffect(()=>{const V=$=>{var p0,H0;const e0=(p0=$.target)==null?void 0:p0.tagName;if(e0==="INPUT"||e0==="TEXTAREA"||(H0=$.target)!=null&&H0.isContentEditable)return;if($.key==="Escape"){q("select");return}if($.key==="Delete"||$.key==="Backspace"){const U0=_.current.selectedFeatureId;U0&&O(U0);return}const h0={m:"marker",h:"highlighter",t:"text",n:"note",k:"link",i:"image",v:"video"}[$.key.toLowerCase()];h0&&q(h0)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[q,O]),{mode:_.current.mode,features:Q(),selectedFeatureId:_.current.selectedFeatureId,editingFeatureId:_.current.editingFeatureId,isDrawing:_.current.isDrawing,currentStrokeVertices:_.current.currentStrokeVertices,setMode:q,addFeature:J,updateFeature:r0,deleteFeature:O,selectFeature:Y,clearAll:n0,getFeatures:Q,openEditor:o0,closeEditor:X,moveFeature:A0}}const qn=[{mode:"select",icon:"pan_tool",title:"选择 — 点击标注选中/拖拽移动",shortcut:"Esc"},{mode:"marker",icon:"location_on",title:"标记 — 单击放置地图钉",shortcut:"M"},{mode:"highlighter",icon:"ink_highlighter",title:"高亮 — 按住拖拽手绘",shortcut:"H"},{mode:"text",icon:"title",title:"文字 — 单击放置文字标签",shortcut:"T"},{mode:"note",icon:"sticky_note_2",title:"笔记 — 单击放置富文本笔记",shortcut:"N"},{mode:"link",icon:"link",title:"链接 — 单击放置链接",shortcut:"K"},{mode:"image",icon:"image",title:"图片 — 单击放置图片",shortcut:"I"},{mode:"video",icon:"videocam",title:"视频 — 单击放置视频",shortcut:"V"}];function V5(){const s=w.useRef(null),l=w.useCallback((f,h,m)=>{var Z;if(!s.current){const Q=document.createElement("div");Q.style.cssText=["position:fixed","pointer-events:none","z-index:9999","padding:5px 10px","border-radius:4px","background:rgba(26,27,34,0.92)","color:#f2eff9",'font:500 11px/16px "JetBrains Mono",monospace',"white-space:nowrap","box-shadow:0 2px 8px rgba(0,0,0,0.3)"].join(";"),document.body.appendChild(Q),s.current=Q}const y=s.current;y.textContent=`${h} ${m}`,y.style.display="block";const C=y.getBoundingClientRect(),b=f.currentTarget.getBoundingClientRect(),x=((Z=f.currentTarget.closest('.l7-map-container, [id*="map"]'))==null?void 0:Z.getBoundingClientRect())??{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight},D="right"in x?x.right:window.innerWidth,z="bottom"in x?x.bottom:window.innerHeight,B=x.left,H=x.top;let _=b.left-C.width-8,j=b.top+b.height/2-C.height/2;_<B+4&&(_=b.right+8),_+C.width>D-4&&(_=b.left+b.width/2-C.width/2,j=b.top-C.height-8),j<H+4&&(j=b.bottom+8),j+C.height>z-4&&(j=b.top-C.height-8),y.style.left=`${Math.max(B+4,Math.min(_,D-C.width-4))}px`,y.style.top=`${Math.max(H+4,Math.min(j,z-C.height-4))}px`},[]),u=w.useCallback(()=>{s.current&&(s.current.style.display="none")},[]);return w.useEffect(()=>()=>{var f;s.current&&((f=s.current.parentElement)==null||f.removeChild(s.current),s.current=null)},[]),{showTooltip:l,hideTooltip:u}}const _5=({activeMode:s,onModeChange:l,tools:u,hasSelection:f=!1,hasFeatures:h=!1,onDeleteSelected:m,onClearAll:y,className:C,style:b})=>{const{showTooltip:k,hideTooltip:x}=V5(),D=w.useMemo(()=>u?qn.filter(B=>u.includes(B.mode)):qn,[u]),z=w.useCallback(B=>{l(B==="select"||s===B?"select":B)},[s,l]);return g.jsxs("div",{className:`l7-control l7-control-annotation l7-control--glass${C?` ${C}`:""}`,style:b,role:"toolbar","aria-label":"标注工具",children:[D.map(B=>g.jsx("button",{className:`l7-button-control l7-annotation-tool-btn${s===B.mode?" l7-button-control--active":""}`,onClick:()=>z(B.mode),onMouseEnter:H=>k(H,B.title,B.shortcut),onMouseLeave:x,"aria-label":B.title,"aria-pressed":s===B.mode,children:g.jsx("span",{className:"material-symbols-outlined",children:B.icon})},B.mode)),f&&m&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"l7-draw-separator"}),g.jsx("button",{className:"l7-button-control l7-annotation-action-btn",onClick:m,onMouseEnter:B=>k(B,"删除选中标注","Del"),onMouseLeave:x,"aria-label":"删除选中标注",children:g.jsx("span",{className:"material-symbols-outlined",children:"delete"})})]}),h&&y&&g.jsx("button",{className:"l7-button-control l7-annotation-action-btn",onClick:y,onMouseEnter:B=>k(B,"清除所有标注",""),onMouseLeave:x,"aria-label":"清除所有标注",children:g.jsx("span",{className:"material-symbols-outlined",children:"delete_sweep"})})]})},Me={marker:{color:"#3f51b5",size:32},highlighter:{color:"#ffeb3b",width:8,opacity:.5},text:{color:"#1a1a2e",fontSize:14,fontFamily:"inherit"},note:{color:"#3f51b5",maxWidth:240},link:{color:"#3f51b5"},image:{maxWidth:200,borderRadius:8},video:{maxWidth:200}},I5=["#3f51b5","#e53935","#43a047","#fb8c00","#8e24aa","#00897b","#5c6bc0","#d81b60"];function P5(s){return s?{marker:{...Me.marker,...s.marker},highlighter:{...Me.highlighter,...s.highlighter},text:{...Me.text,...s.text},note:{...Me.note,...s.note},link:{...Me.link,...s.link},image:{...Me.image,...s.image},video:{...Me.video,...s.video}}:Me}const T5={marker:"translate(-50%, -100%)",text:"translate(-50%, -50%)",note:"translate(-50%, -100%)",link:"translate(-50%, -100%)",image:"translate(-50%, -100%)",video:"translate(-50%, -100%)"};function F5(s,l){const{annotationType:u}=s.properties;switch(u){case"marker":{const f=s.properties,h=f.color||l.marker.color;return`
2
+ <div class="aimapui-annotation-marker" style="color:${h}">
3
+ <span class="material-symbols-outlined" style="font-size:${l.marker.size}px;color:${h}">location_on</span>
4
+ ${f.label?`<div class="aimapui-annotation-marker-label">${Je(f.label)}</div>`:""}
5
5
  </div>
6
- `}case"text":{const r=e.properties,o=r.color||t.text.color,l=r.fontSize||t.text.fontSize,s=r.text||"(空文字)";return`
7
- <div class="aimapui-annotation-text" style="color:${o};font-size:${l}px">
8
- ${We(s)}
6
+ `}case"text":{const f=s.properties,h=f.color||l.text.color,m=f.fontSize||l.text.fontSize,y=f.text||"(空文字)";return`
7
+ <div class="aimapui-annotation-text" style="color:${h};font-size:${m}px">
8
+ ${Je(y)}
9
9
  </div>
10
- `}case"note":{const r=e.properties;return`
11
- <div class="aimapui-annotation-note" style="border-left-color:${r.color||t.note.color};max-width:${t.note.maxWidth}px">
12
- <div class="aimapui-annotation-note-title">${We(r.title||"无标题")}</div>
13
- ${r.body?`<div class="aimapui-annotation-note-body">${We(r.body)}</div>`:""}
10
+ `}case"note":{const f=s.properties;return`
11
+ <div class="aimapui-annotation-note" style="border-left-color:${f.color||l.note.color};max-width:${l.note.maxWidth}px">
12
+ <div class="aimapui-annotation-note-title">${Je(f.title||"无标题")}</div>
13
+ ${f.body?`<div class="aimapui-annotation-note-body">${Je(f.body)}</div>`:""}
14
14
  </div>
15
- `}case"link":{const r=e.properties;return`
16
- <div class="aimapui-annotation-link" style="--link-color:${r.color||t.link.color}">
15
+ `}case"link":{const f=s.properties;return`
16
+ <div class="aimapui-annotation-link" style="--link-color:${f.color||l.link.color}">
17
17
  <span class="material-symbols-outlined" style="font-size:16px">link</span>
18
- <span class="aimapui-annotation-link-title">${We(r.title||r.url||"未设置链接")}</span>
18
+ <span class="aimapui-annotation-link-title">${Je(f.title||f.url||"未设置链接")}</span>
19
19
  </div>
20
- `}case"image":{const r=e.properties,o=r.width||t.image.maxWidth,l=r.height;return r.src?`
21
- <div class="aimapui-annotation-image" style="width:${o}px"
22
- data-annotation-image-id="${e.id}">
23
- <img src="${st(r.src)}" alt="${st(r.alt||"")}"
24
- style="border-radius:${t.image.borderRadius}px;width:100%;display:block;${l?`height:${l}px;object-fit:cover;`:""}" />
25
- <div class="aimapui-annotation-image-resize-handle" data-resize-id="${e.id}"></div>
20
+ `}case"image":{const f=s.properties,h=f.width||l.image.maxWidth,m=f.height;return f.src?`
21
+ <div class="aimapui-annotation-image" style="width:${h}px"
22
+ data-annotation-image-id="${s.id}">
23
+ <img src="${F1(f.src)}" alt="${F1(f.alt||"")}"
24
+ style="border-radius:${l.image.borderRadius}px;width:100%;display:block;${m?`height:${m}px;object-fit:cover;`:""}" />
25
+ <div class="aimapui-annotation-image-resize-handle" data-resize-id="${s.id}"></div>
26
26
  </div>
27
27
  `:`
28
28
  <div class="aimapui-annotation-image-placeholder" style="width:80px;height:60px">
29
29
  <span class="material-symbols-outlined" style="font-size:32px;color:#999">image</span>
30
30
  </div>
31
- `}case"video":{const r=e.properties;return`
32
- <div class="aimapui-annotation-video" style="max-width:${t.video.maxWidth}px">
33
- ${r.thumbnailUrl?`<img src="${st(r.thumbnailUrl)}" class="aimapui-annotation-video-thumb" />`:'<div class="aimapui-annotation-video-placeholder"><span class="material-symbols-outlined" style="font-size:32px">videocam</span></div>'}
31
+ `}case"video":{const f=s.properties;return`
32
+ <div class="aimapui-annotation-video" style="max-width:${l.video.maxWidth}px">
33
+ ${f.thumbnailUrl?`<img src="${F1(f.thumbnailUrl)}" class="aimapui-annotation-video-thumb" />`:'<div class="aimapui-annotation-video-placeholder"><span class="material-symbols-outlined" style="font-size:32px">videocam</span></div>'}
34
34
  <div class="aimapui-annotation-video-play">
35
35
  <span class="material-symbols-outlined">play_arrow</span>
36
36
  </div>
37
- ${r.title?`<div class="aimapui-annotation-video-title">${We(r.title)}</div>`:""}
37
+ ${f.title?`<div class="aimapui-annotation-video-title">${Je(f.title)}</div>`:""}
38
38
  </div>
39
- `}default:return""}}function We(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function st(e){return e.replace(/"/g,"&quot;").replace(/'/g,"&#39;")}const _o=({features:e,selectedId:t,editingId:n,scene:r,mapsService:o,styles:l,onSelect:s,onDoubleClick:a,onMove:c,onInlineCommit:d,onInlineCancel:h,onResize:f})=>{const p=u.useRef(null),g=u.useRef(new Map),y=u.useRef(null),C=u.useRef(null),b=Po(l),x=u.useCallback(()=>{if(!o)return;const k=g.current;for(const L of e){if(L.properties.annotationType==="highlighter")continue;const z=k.get(L.id);if(!z)continue;const E=L.geometry.coordinates;try{const T=o.lngLatToContainer(E);if(!T||isNaN(T.x)||isNaN(T.y))continue;const M=Do[L.properties.annotationType]||"translate(-50%, -100%)",H=Math.round(T.x),N=Math.round(T.y);z.style.transform=`translate3d(${H}px, ${N}px, 0) ${M}`}catch{}}},[e,o]);return u.useEffect(()=>{if(!o)return;const k=()=>x();return o.on("camerachange",k),()=>{o.off("camerachange",k)}},[o,x]),u.useEffect(()=>{var M;if(!o)return;const k=(M=o.getMarkerContainer)==null?void 0:M.call(o);if(!k)return;if(!p.current){const H=document.createElement("div");H.className="aimapui-annotation-container",H.style.cssText="position:absolute;top:0;left:0;width:0;height:0;z-index:10;",k.appendChild(H),p.current=H}const L=p.current,z=g.current,E=new Map,T=e.filter(H=>H.properties.annotationType!=="highlighter");for(const H of T){let N=z.get(H.id);if(N||(N=document.createElement("div"),N.className="aimapui-annotation-item",N.style.cssText="position:absolute;left:0;top:0;pointer-events:auto;cursor:pointer;user-select:none;",N.dataset.annotationId=H.id,N.addEventListener("click",A=>{A.stopPropagation(),s(H.id)}),N.addEventListener("dblclick",A=>{A.stopPropagation(),a(H.id)}),N.addEventListener("mousedown",A=>{if(A.button!==0)return;const I=H.geometry.coordinates;y.current={id:H.id,startLng:I[0],startLat:I[1],startX:A.clientX,startY:A.clientY,isDragging:!1}}),L.appendChild(N)),H.id===n&&(H.properties.annotationType==="text"||H.properties.annotationType==="link")){const A=H.properties.annotationType,I=A==="text"?H.properties.text||"":H.properties.url||"",m=A==="text"?"Add text...":"https://...",w=H.properties.color||(A==="text"?b.text.color:b.link.color),P=A==="text"?H.properties.fontSize||b.text.fontSize:14;N.innerHTML=`
39
+ `}default:return""}}function Je(s){return s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function F1(s){return s.replace(/"/g,"&quot;").replace(/'/g,"&#39;")}const N5=({features:s,selectedId:l,editingId:u,scene:f,mapsService:h,styles:m,onSelect:y,onDoubleClick:C,onMove:b,onInlineCommit:k,onInlineCancel:x,onResize:D})=>{const z=w.useRef(null),B=w.useRef(new Map),H=w.useRef(null),_=w.useRef(null),j=P5(m),Z=w.useCallback(()=>{if(!h)return;const Q=B.current;for(const N of s){if(N.properties.annotationType==="highlighter")continue;const q=Q.get(N.id);if(!q)continue;const J=N.geometry.coordinates;try{const r0=h.lngLatToContainer(J);if(!r0||isNaN(r0.x)||isNaN(r0.y))continue;const O=T5[N.properties.annotationType]||"translate(-50%, -100%)",Y=Math.round(r0.x),n0=Math.round(r0.y);q.style.transform=`translate3d(${Y}px, ${n0}px, 0) ${O}`}catch{}}},[s,h]);return w.useEffect(()=>{if(!h)return;const Q=()=>Z();return h.on("camerachange",Q),()=>{h.off("camerachange",Q)}},[h,Z]),w.useEffect(()=>{var O;if(!h)return;const Q=(O=h.getMarkerContainer)==null?void 0:O.call(h);if(!Q)return;if(!z.current){const Y=document.createElement("div");Y.className="aimapui-annotation-container",Y.style.cssText="position:absolute;top:0;left:0;width:0;height:0;z-index:10;",Q.appendChild(Y),z.current=Y}const N=z.current,q=B.current,J=new Map,r0=s.filter(Y=>Y.properties.annotationType!=="highlighter");for(const Y of r0){let n0=q.get(Y.id);if(n0||(n0=document.createElement("div"),n0.className="aimapui-annotation-item",n0.style.cssText="position:absolute;left:0;top:0;pointer-events:auto;cursor:pointer;user-select:none;",n0.dataset.annotationId=Y.id,n0.addEventListener("click",X=>{X.stopPropagation(),y(Y.id)}),n0.addEventListener("dblclick",X=>{X.stopPropagation(),C(Y.id)}),n0.addEventListener("mousedown",X=>{if(X.button!==0)return;const t0=Y.geometry.coordinates;H.current={id:Y.id,startLng:t0[0],startLat:t0[1],startX:X.clientX,startY:X.clientY,isDragging:!1}}),N.appendChild(n0)),Y.id===u&&(Y.properties.annotationType==="text"||Y.properties.annotationType==="link")){const X=Y.properties.annotationType,t0=X==="text"?Y.properties.text||"":Y.properties.url||"",V=X==="text"?"Add text...":"https://...",$=Y.properties.color||(X==="text"?j.text.color:j.link.color),e0=X==="text"?Y.properties.fontSize||j.text.fontSize:14;n0.innerHTML=`
40
40
  <input
41
41
  class="aimapui-annotation-inline-input"
42
42
  type="text"
43
- value="${st(I)}"
44
- placeholder="${m}"
45
- style="color:${w};font-size:${P}px"
46
- data-annotation-inline="${H.id}"
47
- data-annotation-type="${A}"
43
+ value="${F1(t0)}"
44
+ placeholder="${V}"
45
+ style="color:${$};font-size:${e0}px"
46
+ data-annotation-inline="${Y.id}"
47
+ data-annotation-type="${X}"
48
48
  />
49
- `;const $=N.querySelector("input");$&&document.activeElement!==$&&requestAnimationFrame(()=>{$==null||$.focus(),$==null||$.select()}),N.dataset.inlineBound||(N.dataset.inlineBound="1",N.addEventListener("keydown",j=>{var ee;const O=j,K=O.target;if((ee=K==null?void 0:K.dataset)!=null&&ee.annotationInline){if(O.key==="Enter"){O.preventDefault(),O.stopPropagation();const Y=K.dataset.annotationInline,X=K.dataset.annotationType,te=K.value.trim();if(te){const _=X==="text"?{text:te}:{url:te,title:te};d==null||d(Y,_)}else h==null||h(Y)}else if(O.key==="Escape"){O.preventDefault(),O.stopPropagation();const Y=K.dataset.annotationInline;h==null||h(Y)}}}),N.addEventListener("blur",j=>{var X;const O=j.target;if(!((X=O==null?void 0:O.dataset)!=null&&X.annotationInline))return;const K=O.dataset.annotationInline,ee=O.dataset.annotationType,Y=O.value.trim();setTimeout(()=>{if(Y){const te=ee==="text"?{text:Y}:{url:Y,title:Y};d==null||d(K,te)}else h==null||h(K)},100)},!0))}else N.dataset.inlineBound="",N.innerHTML=$o(H,b);const F=N.querySelector("[data-resize-id]");F&&(F.onmousedown=A=>{A.stopPropagation(),A.preventDefault();const I=F.parentElement;C.current={id:H.id,startX:A.clientX,startY:A.clientY,startWidth:(I==null?void 0:I.offsetWidth)??200,startHeight:(I==null?void 0:I.offsetHeight)??150}}),H.id===t?N.classList.add("aimapui-annotation-item--selected"):N.classList.remove("aimapui-annotation-item--selected"),H.id===n?N.classList.add("aimapui-annotation-item--editing"):N.classList.remove("aimapui-annotation-item--editing"),E.set(H.id,N),z.delete(H.id)}for(const[,H]of z)L.removeChild(H);g.current=E,x()},[e,t,n,o,b,s,a,x]),u.useEffect(()=>{const k=z=>{var N;const E=C.current;if(E){const V=z.clientX-E.startX,F=z.clientY-E.startY,A=Math.max(60,E.startWidth+V),I=Math.max(40,E.startHeight+F),m=document.querySelector(`[data-annotation-image-id="${E.id}"]`);if(m){m.style.width=`${A}px`;const w=m.querySelector("img");w&&(w.style.height=`${I}px`,w.style.objectFit="cover")}return}const T=y.current;if(!T||!o)return;const M=z.clientX-T.startX,H=z.clientY-T.startY;if(!(!T.isDragging&&Math.abs(M)+Math.abs(H)<4)){T.isDragging=!0;try{const V=(N=o.getMapContainer)==null?void 0:N.call(o),F=V==null?void 0:V.getBoundingClientRect(),A=F?z.clientX-F.left:z.clientX,I=F?z.clientY-F.top:z.clientY,m=o.containerToLngLat({x:A,y:I});m&&c(T.id,m.lng,m.lat)}catch{}}},L=z=>{const E=C.current;if(E&&f){const T=z.clientX-E.startX,M=z.clientY-E.startY,H=Math.max(60,E.startWidth+T),N=Math.max(40,E.startHeight+M);f(E.id,H,N)}C.current=null,y.current=null};return document.addEventListener("mousemove",k),document.addEventListener("mouseup",L),()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",L)}},[o,c,f]),u.useEffect(()=>()=>{var k;p.current&&((k=p.current.parentElement)==null||k.removeChild(p.current),p.current=null),g.current.clear()},[]),null};function Oo(e,t,n){u.useEffect(()=>{if(!e||!t||!n.current)return;const r=()=>{if(!n.current||e.properties.annotationType==="highlighter")return;const l=e.geometry.coordinates;try{const s=t.lngLatToContainer(l);if(!s||isNaN(s.x)||isNaN(s.y))return;const a=document.querySelector(`[data-annotation-id="${e.id}"]`),h=((a==null?void 0:a.offsetHeight)??40)+8;n.current.style.transform=`translate3d(${Math.round(s.x)}px, ${Math.round(s.y-h)}px, 0) translate(-50%, -100%)`}catch{}};r();const o=requestAnimationFrame(r);return t.on("camerachange",r),()=>{cancelAnimationFrame(o),t.off("camerachange",r)}},[e,t,n])}const jo=({feature:e,onSave:t,onCancel:n,onDelete:r})=>{const[o,l]=u.useState(e.properties.text||""),s=u.useRef(null);u.useEffect(()=>{var c;(c=s.current)==null||c.focus()},[]);const a=()=>{o.trim()?t(e.id,{text:o.trim()}):r(e.id),n()};return i.jsxs("div",{className:"aimapui-annotation-editor-form",children:[i.jsx("input",{ref:s,className:"aimapui-annotation-editor-input",value:o,onChange:c=>l(c.target.value),onKeyDown:c=>{c.key==="Enter"&&a(),c.key==="Escape"&&n()},placeholder:"输入文字..."}),i.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[i.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:a,children:"确定"}),i.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:n,children:"取消"})]})]})},Bo=({feature:e,onSave:t,onCancel:n,onDelete:r})=>{const o=e.properties,[l,s]=u.useState(o.title||""),[a,c]=u.useState(o.body||""),d=u.useRef(null);u.useEffect(()=>{var f;(f=d.current)==null||f.focus()},[]);const h=()=>{l.trim()||a.trim()?t(e.id,{title:l.trim(),body:a.trim()}):r(e.id),n()};return i.jsxs("div",{className:"aimapui-annotation-editor-form",children:[i.jsx("input",{ref:d,className:"aimapui-annotation-editor-input",value:l,onChange:f=>s(f.target.value),placeholder:"标题...",onKeyDown:f=>{f.key==="Escape"&&n()}}),i.jsx("textarea",{className:"aimapui-annotation-editor-textarea",value:a,onChange:f=>c(f.target.value),placeholder:"正文内容...",rows:4,onKeyDown:f=>{f.key==="Escape"&&n()}}),i.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[i.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:h,children:"确定"}),i.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:n,children:"取消"})]})]})},Wo=({feature:e,onSave:t,onCancel:n,onDelete:r})=>{const o=e.properties,[l,s]=u.useState(o.url||""),[a,c]=u.useState(o.title||""),d=u.useRef(null);u.useEffect(()=>{var f;(f=d.current)==null||f.focus()},[]);const h=()=>{l.trim()?t(e.id,{url:l.trim(),title:a.trim()||l.trim()}):r(e.id),n()};return i.jsxs("div",{className:"aimapui-annotation-editor-form",children:[i.jsx("input",{ref:d,className:"aimapui-annotation-editor-input",value:l,onChange:f=>s(f.target.value),placeholder:"https://...",onKeyDown:f=>{f.key==="Enter"&&h(),f.key==="Escape"&&n()}}),i.jsx("input",{className:"aimapui-annotation-editor-input",value:a,onChange:f=>c(f.target.value),placeholder:"链接标题(可选)...",onKeyDown:f=>{f.key==="Enter"&&h(),f.key==="Escape"&&n()}}),i.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[i.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:h,children:"确定"}),i.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:n,children:"取消"})]})]})},Uo=({feature:e,onSave:t,onCancel:n,onDelete:r,onUpload:o})=>{const l=e.properties,[s,a]=u.useState(l.src||""),[c,d]=u.useState(l.alt||""),[h,f]=u.useState(!1),p=u.useRef(null);u.useEffect(()=>{!l.src&&o&&requestAnimationFrame(()=>{var C;return(C=p.current)==null?void 0:C.click()})},[]);const g=u.useCallback(async C=>{var x;const b=(x=C.target.files)==null?void 0:x[0];if(!b){l.src||(r(e.id),n());return}if(o){f(!0);try{const k=await o(b,"image");a(k),t(e.id,{src:k,alt:c.trim()}),n()}catch(k){console.error("[AnnotationEditor] Image upload failed:",k)}finally{f(!1)}}},[o,e.id,c,t,n,r,l.src]),y=()=>{s.trim()?t(e.id,{src:s.trim(),alt:c.trim()}):r(e.id),n()};return i.jsxs("div",{className:"aimapui-annotation-editor-form",children:[o&&i.jsxs("div",{className:"aimapui-annotation-editor-upload",children:[i.jsxs("button",{className:"aimapui-annotation-editor-btn",onClick:()=>{var C;return(C=p.current)==null?void 0:C.click()},disabled:h,children:[i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16,marginRight:4},children:"upload"}),h?"上传中...":"选择图片"]}),i.jsx("input",{ref:p,type:"file",accept:"image/*",onChange:g,style:{display:"none"}})]}),i.jsx("input",{className:"aimapui-annotation-editor-input",value:s,onChange:C=>a(C.target.value),placeholder:"或输入图片 URL...",onKeyDown:C=>{C.key==="Enter"&&y(),C.key==="Escape"&&n()}}),i.jsx("input",{className:"aimapui-annotation-editor-input",value:c,onChange:C=>d(C.target.value),placeholder:"图片描述(可选)...",onKeyDown:C=>{C.key==="Enter"&&y(),C.key==="Escape"&&n()}}),s&&i.jsx("div",{className:"aimapui-annotation-editor-preview",children:i.jsx("img",{src:s,alt:c,style:{maxWidth:"100%",maxHeight:120,borderRadius:4}})}),i.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[i.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:y,children:"确定"}),i.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:n,children:"取消"})]})]})},qo=({feature:e,onSave:t,onCancel:n,onDelete:r})=>{const o=e.properties,[l,s]=u.useState(o.url||""),[a,c]=u.useState(o.title||""),d=u.useRef(null);u.useEffect(()=>{var f;(f=d.current)==null||f.focus()},[]);const h=()=>{l.trim()?t(e.id,{url:l.trim(),title:a.trim()}):r(e.id),n()};return i.jsxs("div",{className:"aimapui-annotation-editor-form",children:[i.jsx("input",{ref:d,className:"aimapui-annotation-editor-input",value:l,onChange:f=>s(f.target.value),placeholder:"视频 URL...",onKeyDown:f=>{f.key==="Enter"&&h(),f.key==="Escape"&&n()}}),i.jsx("input",{className:"aimapui-annotation-editor-input",value:a,onChange:f=>c(f.target.value),placeholder:"视频标题(可选)...",onKeyDown:f=>{f.key==="Enter"&&h(),f.key==="Escape"&&n()}}),i.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[i.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:h,children:"确定"}),i.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:n,children:"取消"})]})]})},Yo=({feature:e,scene:t,mapsService:n,onSave:r,onCancel:o,onDelete:l,onUpload:s})=>{const a=u.useRef(null),c=u.useRef(null);if(Oo(e,n,a),u.useEffect(()=>{var g;if(!n)return;const f=(g=n.getMarkerContainer)==null?void 0:g.call(n);if(!f)return;const p=document.createElement("div");return p.className="aimapui-annotation-editor-container",p.style.cssText="position:absolute;top:0;left:0;width:0;height:0;z-index:20;pointer-events:none;",f.appendChild(p),c.current=p,()=>{var y;(y=p.parentElement)==null||y.removeChild(p),c.current=null}},[n]),!e||!c.current)return null;const{annotationType:d}=e.properties;if(d==="marker"||d==="highlighter")return null;const h=i.jsxs("div",{ref:a,className:"aimapui-annotation-editor",style:{position:"absolute",left:0,top:0,pointerEvents:"auto"},onClick:f=>f.stopPropagation(),children:[i.jsxs("div",{className:"aimapui-annotation-editor-header",children:[i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:d==="text"?"title":d==="note"?"sticky_note_2":d==="link"?"link":d==="image"?"image":"videocam"}),i.jsx("span",{style:{marginLeft:6,fontSize:12},children:d==="text"?"编辑文字":d==="note"?"编辑笔记":d==="link"?"编辑链接":d==="image"?"编辑图片":"编辑视频"})]}),d==="text"&&i.jsx(jo,{feature:e,onSave:r,onCancel:o,onDelete:l}),d==="note"&&i.jsx(Bo,{feature:e,onSave:r,onCancel:o,onDelete:l}),d==="link"&&i.jsx(Wo,{feature:e,onSave:r,onCancel:o,onDelete:l}),d==="image"&&i.jsx(Uo,{feature:e,onSave:r,onCancel:o,onDelete:l,onUpload:s}),d==="video"&&i.jsx(qo,{feature:e,onSave:r,onCancel:o,onDelete:l})]});return Ie.createPortal(h,c.current)},Xo=({value:e,onChange:t})=>i.jsxs("div",{className:"aimapui-style-panel-row",children:[i.jsx("span",{className:"aimapui-style-panel-label",children:"颜色"}),i.jsx("div",{className:"aimapui-style-panel-swatches",children:Io.map(n=>i.jsx("button",{className:`aimapui-style-panel-swatch${e===n?" aimapui-style-panel-swatch--active":""}`,style:{background:n},onClick:()=>t(n),"aria-label":n},n))})]}),Bt=({label:e,value:t,min:n,max:r,step:o,unit:l="",onChange:s})=>i.jsxs("div",{className:"aimapui-style-panel-row",children:[i.jsx("span",{className:"aimapui-style-panel-label",children:e}),i.jsx("input",{type:"range",className:"aimapui-style-panel-slider",min:n,max:r,step:o,value:t,onChange:a=>s(Number(a.target.value))}),i.jsxs("span",{className:"aimapui-style-panel-value",children:[t,l]})]});function Go(e,t){return t?t.properties.annotationType:e==="select"||e==="none"?null:e}const Jo=({mode:e,selectedFeature:t,activeColor:n,activeOpacity:r,activeStrokeWidth:o,activeFontSize:l,onColorChange:s,onOpacityChange:a,onStrokeWidthChange:c,onFontSizeChange:d,onUpdateFeature:h})=>{const f=Go(e,t),p=u.useCallback(z=>{s(z),t&&h&&h(t.id,{color:z})},[s,t,h]),g=u.useCallback(z=>{a(z),(t==null?void 0:t.properties.annotationType)==="highlighter"&&h&&h(t.id,{strokeOpacity:z})},[a,t,h]),y=u.useCallback(z=>{c(z),(t==null?void 0:t.properties.annotationType)==="highlighter"&&h&&h(t.id,{strokeWidth:z})},[c,t,h]),C=u.useCallback(z=>{d(z),(t==null?void 0:t.properties.annotationType)==="text"&&h&&h(t.id,{fontSize:z})},[d,t,h]);if(!f)return null;const b=["marker","highlighter","text","note","link"].includes(f),x=f==="highlighter",k=f==="highlighter",L=f==="text";return!b&&!x&&!k&&!L?null:i.jsxs("div",{className:"aimapui-style-panel l7-control--glass",children:[b&&i.jsx(Xo,{value:n,onChange:p}),x&&i.jsx(Bt,{label:"透明度",value:r,min:.1,max:1,step:.1,onChange:g}),k&&i.jsx(Bt,{label:"线宽",value:o,min:2,max:24,step:1,unit:"px",onChange:y}),L&&i.jsx(Bt,{label:"字号",value:l,min:10,max:48,step:1,unit:"px",onChange:C})]})},L0="aimapui-annotation-highlighter-";class Ko{constructor(t){this.completedLayer=null,this.drawingLayer=null,this.scene=t}removeAndDestroy(t){var n;if(t){try{this.scene.removeLayer(t)}catch{}try{(n=t.destroy)==null||n.call(t)}catch{}}}addLayerWithRender(t){t.once("inited",()=>{try{this.scene.render()}catch{}}),this.scene.addLayer(t)}updateCompleted(t){const r={type:"FeatureCollection",features:t.filter(o=>o.properties.annotationType==="highlighter").map(o=>({type:"Feature",geometry:o.geometry,properties:{id:o.id,color:o.properties.color||"#ffeb3b",width:o.properties.strokeWidth||8,opacity:o.properties.strokeOpacity||.5}}))};this.completedLayer?this.completedLayer.setData(r):(this.completedLayer=new ge.LineLayer({name:`${L0}completed`,zIndex:8}).source(r).color("color",o=>o).size("width",o=>o).style({opacity:.5,lineType:"solid",lineCap:"round",lineJoin:"round"}).shape("line"),this.addLayerWithRender(this.completedLayer))}updateDrawing(t){if(t.length<2){this.drawingLayer&&(this.removeAndDestroy(this.drawingLayer),this.drawingLayer=null);return}const n={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:t},properties:{color:"#ffeb3b",width:8,opacity:.5}}]};this.drawingLayer?this.drawingLayer.setData(n):(this.drawingLayer=new ge.LineLayer({name:`${L0}drawing`,zIndex:9}).source(n).color("#ffeb3b").size(8).style({opacity:.5,lineType:"solid",lineCap:"round",lineJoin:"round"}).shape("line"),this.addLayerWithRender(this.drawingLayer))}destroy(){this.removeAndDestroy(this.completedLayer),this.removeAndDestroy(this.drawingLayer),this.completedLayer=null,this.drawingLayer=null}}const x0=u.forwardRef(function({position:t="topright",defaultFeatures:n,features:r,tools:o,styles:l,onUpload:s,className:a,style:c,onAnnotationCreate:d,onAnnotationUpdate:h,onAnnotationDelete:f,onAnnotationSelect:p,onModeChange:g,onChange:y},C){const{scene:b,mapsService:x,positionClassName:k}=ke(t),L=Me(),z=u.useRef(null),E=u.useRef(null),[T,M]=u.useState("#3f51b5"),[H,N]=u.useState(.5),[V,F]=u.useState(8),[A,I]=u.useState(14),m=Fo({scene:b,mapsService:x,defaultFeatures:n,features:r,onAnnotationCreate:d,onAnnotationUpdate:h,onAnnotationDelete:f,onAnnotationSelect:p,onModeChange:g,onChange:y,activeColor:T,activeOpacity:H,activeStrokeWidth:V,activeFontSize:A});u.useImperativeHandle(C,()=>({setMode:m.setMode,addAnnotation:m.addFeature,updateAnnotation:m.updateFeature,deleteAnnotation:m.deleteFeature,clearAll:m.clearAll,getAnnotations:m.getFeatures,selectAnnotation:m.selectFeature}),[m]);const w=u.useCallback(Q=>{m.setMode(Q)},[m]),P=u.useCallback(()=>{m.selectedFeatureId&&m.deleteFeature(m.selectedFeatureId)},[m]),$=u.useCallback(()=>{m.clearAll()},[m]),j=u.useCallback((Q,le)=>{m.updateFeature(Q,le),m.closeEditor()},[m]),O=u.useCallback(Q=>{const le=m.getFeatures().find(Z=>Z.id===Q);le&&(le.properties.annotationType==="text"?!le.properties.text:!le.properties.url)&&m.deleteFeature(Q),m.closeEditor()},[m]),K=u.useCallback((Q,le,Z)=>{m.updateFeature(Q,{width:le,height:Z})},[m]);u.useEffect(()=>{if(b)return z.current=new Ko(b),()=>{var Q;(Q=z.current)==null||Q.destroy(),z.current=null}},[b]),u.useEffect(()=>{z.current&&z.current.updateCompleted(m.features)},[m.features]),u.useEffect(()=>{z.current&&z.current.updateDrawing(m.currentStrokeVertices)},[m.currentStrokeVertices]),u.useEffect(()=>{var Z;if(!x)return;const Q=(Z=x.getMapContainer)==null?void 0:Z.call(x);if(!Q)return;const le=m.mode;return le!=="select"&&le!=="none"?Q.style.cursor="crosshair":Q.style.cursor="",()=>{Q.style.cursor=""}},[m.mode,x]),u.useEffect(()=>{var Z;if(!x)return;const Q=(Z=x.getMapContainer)==null?void 0:Z.call(x);if(!Q)return;const le=document.createElement("div");return le.className="aimapui-style-panel-anchor",le.style.cssText="position:absolute;top:10px;left:10px;z-index:10;pointer-events:auto;",Q.appendChild(le),E.current=le,()=>{var v;(v=le.parentElement)==null||v.removeChild(le),E.current=null}},[x]);const ee=m.selectedFeatureId!==null,Y=m.features.length>0,X=m.selectedFeatureId?m.features.find(Q=>Q.id===m.selectedFeatureId)??null:null,te=m.editingFeatureId?m.features.find(Q=>Q.id===m.editingFeatureId):void 0,_=te&&(te.properties.annotationType==="text"||te.properties.annotationType==="link"),U=te&&!_,ce=i.jsxs(i.Fragment,{children:[i.jsx(No,{activeMode:m.mode,onModeChange:w,tools:o,hasSelection:ee,hasFeatures:Y,onDeleteSelected:P,onClearAll:$}),i.jsx(_o,{features:m.features,selectedId:m.selectedFeatureId,editingId:m.editingFeatureId,scene:b,mapsService:x,styles:l,onSelect:m.selectFeature,onDoubleClick:m.openEditor,onMove:m.moveFeature,onInlineCommit:j,onInlineCancel:O,onResize:K}),U&&i.jsx(Yo,{feature:te,scene:b,mapsService:x,onSave:m.updateFeature,onCancel:m.closeEditor,onDelete:m.deleteFeature,onUpload:s})]}),ie=E.current?Ie.createPortal(i.jsx(Jo,{mode:m.mode,selectedFeature:X,activeColor:T,activeOpacity:H,activeStrokeWidth:V,activeFontSize:A,onColorChange:M,onOpacityChange:N,onStrokeWidthChange:F,onFontSizeChange:I,onUpdateFeature:m.updateFeature}),E.current):null;return L?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:a,style:c,children:ce}),ie]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:`l7-control-anchor ${k}`,children:ce}),ie]})});we.mark(x0);function w0({logos:e,position:t="bottomleft",className:n,style:r}){const{positionClassName:o}=ke(t),l=Me(),s=i.jsx("div",{className:`l7-control l7-control-logo${n?` ${n}`:""}`,style:r,children:e.map((a,c)=>{const d=i.jsx("img",{src:a.src,alt:a.alt??"logo",width:a.width??24,height:a.width??24,style:{objectFit:"contain",display:"block"}},c);return a.href?i.jsx("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"l7-control-logo-link",children:d},c):i.jsx("div",{className:"l7-control-logo-link",children:d},c)})});return l?s:i.jsx("div",{className:`l7-control-anchor ${o}`,children:s})}we.mark(w0);function Qo({children:e,defaultSnap:t="collapsed",collapsedHeight:n=80,halfRatio:r=.45,expandedRatio:o=.85,onSnapChange:l,className:s,showHandle:a=!0,borderRadius:c=32}){const d=u.useRef(null),h=u.useRef(0),f=u.useRef(0),p=u.useRef(!1),[g,y]=u.useState(0),[C,b]=u.useState(t),[x,k]=u.useState(!1),L=u.useCallback(()=>{var F;const V=(F=d.current)==null?void 0:F.offsetParent;return V?V.clientHeight:window.innerHeight},[]),z=u.useCallback(V=>{const F=L();switch(V){case"collapsed":return n;case"half":return F*r;case"expanded":return F*o}},[n,r,o,L]);u.useEffect(()=>{y(z(t))},[t,z]);const E=u.useCallback((V,F)=>{const A=z("collapsed"),I=z("half"),m=z("expanded");let w;if(Math.abs(F)>.5)F>0?w=V>I?"expanded":"half":w=V<I?"collapsed":"half";else{const P=Math.abs(V-A),$=Math.abs(V-I),j=Math.abs(V-m),O=Math.min(P,$,j);O===P?w="collapsed":O===$?w="half":w="expanded"}k(!0),b(w),y(z(w)),l==null||l(w),setTimeout(()=>k(!1),300)},[z,l]),T=u.useCallback(V=>{p.current=!0,h.current=V.touches[0].clientY,f.current=g,k(!1)},[g]),M=u.useCallback(V=>{if(!p.current)return;const F=h.current-V.touches[0].clientY,A=L()*o,I=Math.max(n,Math.min(A,f.current+F));y(I)},[n,o,L]),H=u.useCallback(V=>{if(!p.current)return;p.current=!1;const A=(h.current-V.changedTouches[0].clientY)/100;E(g,A)},[g,E]),N=u.useCallback(V=>{p.current=!0,h.current=V.clientY,f.current=g,k(!1);const F=I=>{if(!p.current)return;const m=h.current-I.clientY,w=L()*o,P=Math.max(n,Math.min(w,f.current+m));y(P)},A=I=>{p.current=!1;const w=(h.current-I.clientY)/100,P=L()*o;E(Math.max(n,Math.min(P,f.current+(h.current-I.clientY))),w),document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",A)};document.addEventListener("mousemove",F),document.addEventListener("mouseup",A)},[g,n,o,E,L]);return u.useCallback(V=>{k(!0),b(V),y(z(V)),l==null||l(V),setTimeout(()=>k(!1),300)},[z,l]),i.jsx("div",{ref:d,className:s,style:{position:"absolute",bottom:0,left:0,width:"100%",height:g,zIndex:1e3,pointerEvents:"auto",transition:x?"height 0.3s cubic-bezier(0.4, 0, 0.2, 1)":"none",willChange:"height",touchAction:"none"},children:i.jsxs("div",{style:{width:"100%",height:"100%",background:"var(--color-surface, #f8f9ff)",borderTopLeftRadius:c,borderTopRightRadius:c,boxShadow:"0 -10px 40px rgba(0, 0, 0, 0.15)",borderTop:"1px solid rgba(195, 198, 215, 0.2)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[i.jsx("div",{onTouchStart:T,onTouchMove:M,onTouchEnd:H,onMouseDown:N,style:{padding:"12px 0 16px",cursor:"grab",userSelect:"none",flexShrink:0},children:a&&i.jsx("div",{style:{width:48,height:6,borderRadius:3,background:"rgba(195, 198, 215, 0.5)",margin:"0 auto"}})}),i.jsx("div",{style:{flex:1,overflowY:C==="collapsed"?"hidden":"auto",overflowX:"hidden",padding:"0 16px",WebkitOverflowScrolling:"touch",msOverflowStyle:"none",scrollbarWidth:"none"},children:e})]})})}function Ro({placeholder:e="搜索地点...",onSearch:t,onFilter:n,className:r,trailing:o}){const[l,s]=u.useState(""),a=u.useCallback(d=>{const h=d.target.value;s(h),t==null||t(h)},[t]),c=u.useCallback(()=>{s(""),t==null||t("")},[t]);return i.jsxs("div",{className:`glass-panel ${r??""}`,style:{display:"flex",alignItems:"center",padding:"12px 16px",borderRadius:16,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)",border:"1px solid rgba(195, 198, 215, 0.3)"},children:[i.jsx("span",{className:"material-symbols-outlined",style:{color:"var(--color-primary, #004ac6)",marginRight:12,fontSize:22},children:"search"}),i.jsx("input",{type:"text",value:l,onChange:a,placeholder:e,style:{flex:1,border:"none",background:"transparent",outline:"none",fontSize:14,lineHeight:"20px",color:"var(--color-on-surface, #121c2a)"}}),l&&i.jsx("button",{onClick:c,style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:999,display:"flex",alignItems:"center",justifyContent:"center"},children:i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18,color:"var(--color-on-surface-variant, #434655)"},children:"close"})}),n&&i.jsx("button",{onClick:n,style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:999,display:"flex",alignItems:"center",justifyContent:"center",marginLeft:4},children:i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:22,color:"var(--color-on-surface-variant, #434655)"},children:"tune"})}),o]})}function Wt(e,t){if(!t)return e;const n={...e};for(const r of Object.keys(t)){const o=t[r],l=n[r];o!==null&&typeof o=="object"&&!Array.isArray(o)&&l!==null&&typeof l=="object"&&!Array.isArray(l)?n[r]=Wt(l,o):o!==void 0&&(n[r]=o)}return n}function e5(e,t){return t?Wt(e,t):e}class t5 extends u.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){var r,o;(o=(r=this.props).onError)==null||o.call(r,t,n)}render(){if(this.state.hasError){const{fallback:t}=this.props,{error:n}=this.state;return typeof t=="function"?t(n):t||i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",padding:32,color:"#666",fontFamily:"system-ui, sans-serif"},children:[i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:48,marginBottom:16,color:"#e53e3e"},children:"error"}),i.jsx("p",{style:{fontSize:16,fontWeight:600,marginBottom:8},children:"地图加载失败"}),i.jsx("p",{style:{fontSize:13,color:"#999"},children:(n==null?void 0:n.message)??"未知错误"})]})}return this.props.children}}return W.ADMIN_SEQUENTIAL_COLORS=l0,W.AiMap=zr,W.AiMapJSONSchema=Ir,W.AnnotationControl=x0,W.ArcFlowLayer=Mo,W.BottomSheet=Qo,W.BubbleLayer=$r,W.ChinaDistrict=eo,W.ControlContainer=gt,W.ControlRegistry=we,W.ControlRenderer=O1,W.DEFAULT_CITY_SOURCE=c0,W.DEFAULT_DISTRICT_SOURCE=u0,W.DEFAULT_PROVINCE_SOURCE=a0,W.DrawControl=Vt,W.ErrorBoundary=t5,W.EventBus=Kt,W.EventBusProvider=e1,W.ExportImageControl=St,W.FillLayer=Yr,W.FullscreenControl=vt,W.GAODE_THEME_PRESETS=wt,W.GeoLocateControl=bt,W.GlyphLayer=bo,W.HeatmapHexagonLayer=t0,W.HeatmapLayer=e0,W.HexagonLayer=t0,W.INDEPENDENT_MAP_THEME_PRESETS=kn,W.IconLayer=g0,W.ImageCalibrationControl=Et,W.ImageLayer=Pr,W.InteractionRenderer=Y1,W.LayerRenderer=y1,W.LayerSwitchControl=zt,W.LegendCategories=At,W.LegendControl=C0,W.LegendDiverging=Ft,W.LegendIcon=Dt,W.LegendLineWidth=It,W.LegendProportion=Pt,W.LegendRamp=Zt,W.LegendRenderer=G1,W.LegendSize=Nt,W.LegendThreshold=Tt,W.LineLayer=Ve,W.LogoControl=w0,W.MAKI_ICONS=Te,W.MAKI_ICON_NAMES=fr,W.MapSceneRenderer=l1,W.MapThemeControl=Mt,W.Marker=Oe,W.MarkerClusterLayer=_r,W.MobileSheetLegend=R1,W.MobileToolbar=Q1,W.MouseLocationControl=kt,W.OPENFREEMAP_THEME_PRESETS=Mn,W.PointLayer=Se,W.PolygonLayer=rt,W.Popup=qe,W.RasterLayer=n0,W.ResponsiveProvider=kr,W.RouteLayer=ko,W.SATELLITE_PROVIDER_NAMES=xo,W.SatelliteLayer=wo,W.ScaleControl=Ct,W.SceneProvider=s1,W.SchemaProvider=Jt,W.SearchBar=Ro,W.ThemeProvider=n1,W.TiffRasterLayer=Vo,W.Tooltip=ht,W.ZoomControl=yt,W.adaptHeatmapLayer=p1,W.adaptImageLayer=g1,W.adaptLineLayer=d1,W.adaptPointLayer=u1,W.adaptPolygonLayer=h1,W.adaptRasterLayer=f1,W.applyControlDefaults=Yt,W.applyLayerDefaults=qt,W.applyMapDefaults=Xe,W.applyResponsiveOverrides=e5,W.applySchemaDefaults=it,W.createBasemap=i1,W.createEventBus=Qt,W.createMakiIconMap=gr,W.createMakiPinMap=W1,W.cx=fe,W.deepMerge=Wt,W.diffSchema=Zr,W.getPopperDirection=Lt,W.hexToRgba=tn,W.makiIconUrl=j1,W.makiPinUrl=B1,W.parseSchema=Xt,W.useControlContainer=Me,W.useEventBus=lt,W.useMapControl=ke,W.useMapPosition=ut,W.usePopperPosition=xt,W.useResponsive=K1,W.useScene=me,W.useSchema=I0,W.useTheme=r1,W.validateAiMapSchema=Fr,W.validateSchema=N0,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"}),W})({},React,React,L7,ReactDOM,clsx,ReactDOM,Supercluster);
49
+ `;const c0=n0.querySelector("input");c0&&document.activeElement!==c0&&requestAnimationFrame(()=>{c0==null||c0.focus(),c0==null||c0.select()}),n0.dataset.inlineBound||(n0.dataset.inlineBound="1",n0.addEventListener("keydown",h0=>{var U0;const p0=h0,H0=p0.target;if((U0=H0==null?void 0:H0.dataset)!=null&&U0.annotationInline){if(p0.key==="Enter"){p0.preventDefault(),p0.stopPropagation();const w0=H0.dataset.annotationInline,g0=H0.dataset.annotationType,N0=H0.value.trim();if(N0){const D0=g0==="text"?{text:N0}:{url:N0,title:N0};k==null||k(w0,D0)}else x==null||x(w0)}else if(p0.key==="Escape"){p0.preventDefault(),p0.stopPropagation();const w0=H0.dataset.annotationInline;x==null||x(w0)}}}),n0.addEventListener("blur",h0=>{var g0;const p0=h0.target;if(!((g0=p0==null?void 0:p0.dataset)!=null&&g0.annotationInline))return;const H0=p0.dataset.annotationInline,U0=p0.dataset.annotationType,w0=p0.value.trim();setTimeout(()=>{if(w0){const N0=U0==="text"?{text:w0}:{url:w0,title:w0};k==null||k(H0,N0)}else x==null||x(H0)},100)},!0))}else n0.dataset.inlineBound="",n0.innerHTML=F5(Y,j);const o0=n0.querySelector("[data-resize-id]");o0&&(o0.onmousedown=X=>{X.stopPropagation(),X.preventDefault();const t0=o0.parentElement;_.current={id:Y.id,startX:X.clientX,startY:X.clientY,startWidth:(t0==null?void 0:t0.offsetWidth)??200,startHeight:(t0==null?void 0:t0.offsetHeight)??150}}),Y.id===l?n0.classList.add("aimapui-annotation-item--selected"):n0.classList.remove("aimapui-annotation-item--selected"),Y.id===u?n0.classList.add("aimapui-annotation-item--editing"):n0.classList.remove("aimapui-annotation-item--editing"),J.set(Y.id,n0),q.delete(Y.id)}for(const[,Y]of q)N.removeChild(Y);B.current=J,Z()},[s,l,u,h,j,y,C,Z]),w.useEffect(()=>{const Q=q=>{var n0;const J=_.current;if(J){const A0=q.clientX-J.startX,o0=q.clientY-J.startY,X=Math.max(60,J.startWidth+A0),t0=Math.max(40,J.startHeight+o0),V=document.querySelector(`[data-annotation-image-id="${J.id}"]`);if(V){V.style.width=`${X}px`;const $=V.querySelector("img");$&&($.style.height=`${t0}px`,$.style.objectFit="cover")}return}const r0=H.current;if(!r0||!h)return;const O=q.clientX-r0.startX,Y=q.clientY-r0.startY;if(!(!r0.isDragging&&Math.abs(O)+Math.abs(Y)<4)){r0.isDragging=!0;try{const A0=(n0=h.getMapContainer)==null?void 0:n0.call(h),o0=A0==null?void 0:A0.getBoundingClientRect(),X=o0?q.clientX-o0.left:q.clientX,t0=o0?q.clientY-o0.top:q.clientY,V=h.containerToLngLat({x:X,y:t0});V&&b(r0.id,V.lng,V.lat)}catch{}}},N=q=>{const J=_.current;if(J&&D){const r0=q.clientX-J.startX,O=q.clientY-J.startY,Y=Math.max(60,J.startWidth+r0),n0=Math.max(40,J.startHeight+O);D(J.id,Y,n0)}_.current=null,H.current=null};return document.addEventListener("mousemove",Q),document.addEventListener("mouseup",N),()=>{document.removeEventListener("mousemove",Q),document.removeEventListener("mouseup",N)}},[h,b,D]),w.useEffect(()=>()=>{var Q;z.current&&((Q=z.current.parentElement)==null||Q.removeChild(z.current),z.current=null),B.current.clear()},[]),null};function Z5(s,l,u){w.useEffect(()=>{if(!s||!l||!u.current)return;const f=()=>{if(!u.current||s.properties.annotationType==="highlighter")return;const m=s.geometry.coordinates;try{const y=l.lngLatToContainer(m);if(!y||isNaN(y.x)||isNaN(y.y))return;const C=document.querySelector(`[data-annotation-id="${s.id}"]`),x=((C==null?void 0:C.offsetHeight)??40)+8;u.current.style.transform=`translate3d(${Math.round(y.x)}px, ${Math.round(y.y-x)}px, 0) translate(-50%, -100%)`}catch{}};f();const h=requestAnimationFrame(f);return l.on("camerachange",f),()=>{cancelAnimationFrame(h),l.off("camerachange",f)}},[s,l,u])}const Q5=({feature:s,onSave:l,onCancel:u,onDelete:f})=>{const[h,m]=w.useState(s.properties.text||""),y=w.useRef(null);w.useEffect(()=>{var b;(b=y.current)==null||b.focus()},[]);const C=()=>{h.trim()?l(s.id,{text:h.trim()}):f(s.id),u()};return g.jsxs("div",{className:"aimapui-annotation-editor-form",children:[g.jsx("input",{ref:y,className:"aimapui-annotation-editor-input",value:h,onChange:b=>m(b.target.value),onKeyDown:b=>{b.key==="Enter"&&C(),b.key==="Escape"&&u()},placeholder:"输入文字..."}),g.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[g.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:C,children:"确定"}),g.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:u,children:"取消"})]})]})},O5=({feature:s,onSave:l,onCancel:u,onDelete:f})=>{const h=s.properties,[m,y]=w.useState(h.title||""),[C,b]=w.useState(h.body||""),k=w.useRef(null);w.useEffect(()=>{var D;(D=k.current)==null||D.focus()},[]);const x=()=>{m.trim()||C.trim()?l(s.id,{title:m.trim(),body:C.trim()}):f(s.id),u()};return g.jsxs("div",{className:"aimapui-annotation-editor-form",children:[g.jsx("input",{ref:k,className:"aimapui-annotation-editor-input",value:m,onChange:D=>y(D.target.value),placeholder:"标题...",onKeyDown:D=>{D.key==="Escape"&&u()}}),g.jsx("textarea",{className:"aimapui-annotation-editor-textarea",value:C,onChange:D=>b(D.target.value),placeholder:"正文内容...",rows:4,onKeyDown:D=>{D.key==="Escape"&&u()}}),g.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[g.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:x,children:"确定"}),g.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:u,children:"取消"})]})]})},U5=({feature:s,onSave:l,onCancel:u,onDelete:f})=>{const h=s.properties,[m,y]=w.useState(h.url||""),[C,b]=w.useState(h.title||""),k=w.useRef(null);w.useEffect(()=>{var D;(D=k.current)==null||D.focus()},[]);const x=()=>{m.trim()?l(s.id,{url:m.trim(),title:C.trim()||m.trim()}):f(s.id),u()};return g.jsxs("div",{className:"aimapui-annotation-editor-form",children:[g.jsx("input",{ref:k,className:"aimapui-annotation-editor-input",value:m,onChange:D=>y(D.target.value),placeholder:"https://...",onKeyDown:D=>{D.key==="Enter"&&x(),D.key==="Escape"&&u()}}),g.jsx("input",{className:"aimapui-annotation-editor-input",value:C,onChange:D=>b(D.target.value),placeholder:"链接标题(可选)...",onKeyDown:D=>{D.key==="Enter"&&x(),D.key==="Escape"&&u()}}),g.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[g.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:x,children:"确定"}),g.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:u,children:"取消"})]})]})},j5=({feature:s,onSave:l,onCancel:u,onDelete:f,onUpload:h})=>{const m=s.properties,[y,C]=w.useState(m.src||""),[b,k]=w.useState(m.alt||""),[x,D]=w.useState(!1),z=w.useRef(null);w.useEffect(()=>{!m.src&&h&&requestAnimationFrame(()=>{var _;return(_=z.current)==null?void 0:_.click()})},[]);const B=w.useCallback(async _=>{var Z;const j=(Z=_.target.files)==null?void 0:Z[0];if(!j){m.src||(f(s.id),u());return}if(h){D(!0);try{const Q=await h(j,"image");C(Q),l(s.id,{src:Q,alt:b.trim()}),u()}catch(Q){console.error("[AnnotationEditor] Image upload failed:",Q)}finally{D(!1)}}},[h,s.id,b,l,u,f,m.src]),H=()=>{y.trim()?l(s.id,{src:y.trim(),alt:b.trim()}):f(s.id),u()};return g.jsxs("div",{className:"aimapui-annotation-editor-form",children:[h&&g.jsxs("div",{className:"aimapui-annotation-editor-upload",children:[g.jsxs("button",{className:"aimapui-annotation-editor-btn",onClick:()=>{var _;return(_=z.current)==null?void 0:_.click()},disabled:x,children:[g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16,marginRight:4},children:"upload"}),x?"上传中...":"选择图片"]}),g.jsx("input",{ref:z,type:"file",accept:"image/*",onChange:B,style:{display:"none"}})]}),g.jsx("input",{className:"aimapui-annotation-editor-input",value:y,onChange:_=>C(_.target.value),placeholder:"或输入图片 URL...",onKeyDown:_=>{_.key==="Enter"&&H(),_.key==="Escape"&&u()}}),g.jsx("input",{className:"aimapui-annotation-editor-input",value:b,onChange:_=>k(_.target.value),placeholder:"图片描述(可选)...",onKeyDown:_=>{_.key==="Enter"&&H(),_.key==="Escape"&&u()}}),y&&g.jsx("div",{className:"aimapui-annotation-editor-preview",children:g.jsx("img",{src:y,alt:b,style:{maxWidth:"100%",maxHeight:120,borderRadius:4}})}),g.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[g.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:H,children:"确定"}),g.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:u,children:"取消"})]})]})},$5=({feature:s,onSave:l,onCancel:u,onDelete:f})=>{const h=s.properties,[m,y]=w.useState(h.url||""),[C,b]=w.useState(h.title||""),k=w.useRef(null);w.useEffect(()=>{var D;(D=k.current)==null||D.focus()},[]);const x=()=>{m.trim()?l(s.id,{url:m.trim(),title:C.trim()}):f(s.id),u()};return g.jsxs("div",{className:"aimapui-annotation-editor-form",children:[g.jsx("input",{ref:k,className:"aimapui-annotation-editor-input",value:m,onChange:D=>y(D.target.value),placeholder:"视频 URL...",onKeyDown:D=>{D.key==="Enter"&&x(),D.key==="Escape"&&u()}}),g.jsx("input",{className:"aimapui-annotation-editor-input",value:C,onChange:D=>b(D.target.value),placeholder:"视频标题(可选)...",onKeyDown:D=>{D.key==="Enter"&&x(),D.key==="Escape"&&u()}}),g.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[g.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:x,children:"确定"}),g.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:u,children:"取消"})]})]})},W5=({feature:s,scene:l,mapsService:u,onSave:f,onCancel:h,onDelete:m,onUpload:y})=>{const C=w.useRef(null),b=w.useRef(null);if(Z5(s,u,C),w.useEffect(()=>{var B;if(!u)return;const D=(B=u.getMarkerContainer)==null?void 0:B.call(u);if(!D)return;const z=document.createElement("div");return z.className="aimapui-annotation-editor-container",z.style.cssText="position:absolute;top:0;left:0;width:0;height:0;z-index:20;pointer-events:none;",D.appendChild(z),b.current=z,()=>{var H;(H=z.parentElement)==null||H.removeChild(z),b.current=null}},[u]),!s||!b.current)return null;const{annotationType:k}=s.properties;if(k==="marker"||k==="highlighter")return null;const x=g.jsxs("div",{ref:C,className:"aimapui-annotation-editor",style:{position:"absolute",left:0,top:0,pointerEvents:"auto"},onClick:D=>D.stopPropagation(),children:[g.jsxs("div",{className:"aimapui-annotation-editor-header",children:[g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:k==="text"?"title":k==="note"?"sticky_note_2":k==="link"?"link":k==="image"?"image":"videocam"}),g.jsx("span",{style:{marginLeft:6,fontSize:12},children:k==="text"?"编辑文字":k==="note"?"编辑笔记":k==="link"?"编辑链接":k==="image"?"编辑图片":"编辑视频"})]}),k==="text"&&g.jsx(Q5,{feature:s,onSave:f,onCancel:h,onDelete:m}),k==="note"&&g.jsx(O5,{feature:s,onSave:f,onCancel:h,onDelete:m}),k==="link"&&g.jsx(U5,{feature:s,onSave:f,onCancel:h,onDelete:m}),k==="image"&&g.jsx(j5,{feature:s,onSave:f,onCancel:h,onDelete:m,onUpload:y}),k==="video"&&g.jsx($5,{feature:s,onSave:f,onCancel:h,onDelete:m})]});return Pe.createPortal(x,b.current)},G5=({value:s,onChange:l})=>g.jsxs("div",{className:"aimapui-style-panel-row",children:[g.jsx("span",{className:"aimapui-style-panel-label",children:"颜色"}),g.jsx("div",{className:"aimapui-style-panel-swatches",children:I5.map(u=>g.jsx("button",{className:`aimapui-style-panel-swatch${s===u?" aimapui-style-panel-swatch--active":""}`,style:{background:u},onClick:()=>l(u),"aria-label":u},u))})]}),Pt=({label:s,value:l,min:u,max:f,step:h,unit:m="",onChange:y})=>g.jsxs("div",{className:"aimapui-style-panel-row",children:[g.jsx("span",{className:"aimapui-style-panel-label",children:s}),g.jsx("input",{type:"range",className:"aimapui-style-panel-slider",min:u,max:f,step:h,value:l,onChange:C=>y(Number(C.target.value))}),g.jsxs("span",{className:"aimapui-style-panel-value",children:[l,m]})]});function Y5(s,l){return l?l.properties.annotationType:s==="select"||s==="none"?null:s}const q5=({mode:s,selectedFeature:l,activeColor:u,activeOpacity:f,activeStrokeWidth:h,activeFontSize:m,onColorChange:y,onOpacityChange:C,onStrokeWidthChange:b,onFontSizeChange:k,onUpdateFeature:x})=>{const D=Y5(s,l),z=w.useCallback(q=>{y(q),l&&x&&x(l.id,{color:q})},[y,l,x]),B=w.useCallback(q=>{C(q),(l==null?void 0:l.properties.annotationType)==="highlighter"&&x&&x(l.id,{strokeOpacity:q})},[C,l,x]),H=w.useCallback(q=>{b(q),(l==null?void 0:l.properties.annotationType)==="highlighter"&&x&&x(l.id,{strokeWidth:q})},[b,l,x]),_=w.useCallback(q=>{k(q),(l==null?void 0:l.properties.annotationType)==="text"&&x&&x(l.id,{fontSize:q})},[k,l,x]);if(!D)return null;const j=["marker","highlighter","text","note","link"].includes(D),Z=D==="highlighter",Q=D==="highlighter",N=D==="text";return!j&&!Z&&!Q&&!N?null:g.jsxs("div",{className:"aimapui-style-panel l7-control--glass",children:[j&&g.jsx(G5,{value:u,onChange:z}),Z&&g.jsx(Pt,{label:"透明度",value:f,min:.1,max:1,step:.1,onChange:B}),Q&&g.jsx(Pt,{label:"线宽",value:h,min:2,max:24,step:1,unit:"px",onChange:H}),N&&g.jsx(Pt,{label:"字号",value:m,min:10,max:48,step:1,unit:"px",onChange:_})]})},Xn="aimapui-annotation-highlighter-";class X5{constructor(l){this.completedLayer=null,this.drawingLayer=null,this.scene=l}removeAndDestroy(l){var u;if(l){try{this.scene.removeLayer(l)}catch{}try{(u=l.destroy)==null||u.call(l)}catch{}}}addLayerWithRender(l){l.once("inited",()=>{try{this.scene.render()}catch{}}),this.scene.addLayer(l)}updateCompleted(l){const f={type:"FeatureCollection",features:l.filter(h=>h.properties.annotationType==="highlighter").map(h=>({type:"Feature",geometry:h.geometry,properties:{id:h.id,color:h.properties.color||"#ffeb3b",width:h.properties.strokeWidth||8,opacity:h.properties.strokeOpacity||.5}}))};this.completedLayer?this.completedLayer.setData(f):(this.completedLayer=new EA.LineLayer({name:`${Xn}completed`,zIndex:8}).source(f).color("color",h=>h).size("width",h=>h).style({opacity:.5,lineType:"solid",lineCap:"round",lineJoin:"round"}).shape("line"),this.addLayerWithRender(this.completedLayer))}updateDrawing(l){if(l.length<2){this.drawingLayer&&(this.removeAndDestroy(this.drawingLayer),this.drawingLayer=null);return}const u={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:l},properties:{color:"#ffeb3b",width:8,opacity:.5}}]};this.drawingLayer?this.drawingLayer.setData(u):(this.drawingLayer=new EA.LineLayer({name:`${Xn}drawing`,zIndex:9}).source(u).color("#ffeb3b").size(8).style({opacity:.5,lineType:"solid",lineCap:"round",lineJoin:"round"}).shape("line"),this.addLayerWithRender(this.drawingLayer))}destroy(){this.removeAndDestroy(this.completedLayer),this.removeAndDestroy(this.drawingLayer),this.completedLayer=null,this.drawingLayer=null}}const Jn=w.forwardRef(function({position:l="topright",defaultFeatures:u,features:f,tools:h,styles:m,onUpload:y,className:C,style:b,onAnnotationCreate:k,onAnnotationUpdate:x,onAnnotationDelete:D,onAnnotationSelect:z,onModeChange:B,onChange:H},_){const{scene:j,mapsService:Z,positionClassName:Q}=XA(l),N=qA(),q=w.useRef(null),J=w.useRef(null),[r0,O]=w.useState("#3f51b5"),[Y,n0]=w.useState(.5),[A0,o0]=w.useState(8),[X,t0]=w.useState(14),V=B5({scene:j,mapsService:Z,defaultFeatures:u,features:f,onAnnotationCreate:k,onAnnotationUpdate:x,onAnnotationDelete:D,onAnnotationSelect:z,onModeChange:B,onChange:H,activeColor:r0,activeOpacity:Y,activeStrokeWidth:A0,activeFontSize:X});w.useImperativeHandle(_,()=>({setMode:V.setMode,addAnnotation:V.addFeature,updateAnnotation:V.updateFeature,deleteAnnotation:V.deleteFeature,clearAll:V.clearAll,getAnnotations:V.getFeatures,selectAnnotation:V.selectFeature}),[V]);const $=w.useCallback(B0=>{V.setMode(B0)},[V]),e0=w.useCallback(()=>{V.selectedFeatureId&&V.deleteFeature(V.selectedFeatureId)},[V]),c0=w.useCallback(()=>{V.clearAll()},[V]),h0=w.useCallback((B0,j0)=>{V.updateFeature(B0,j0),V.closeEditor()},[V]),p0=w.useCallback(B0=>{const j0=V.getFeatures().find(l0=>l0.id===B0);j0&&(j0.properties.annotationType==="text"?!j0.properties.text:!j0.properties.url)&&V.deleteFeature(B0),V.closeEditor()},[V]),H0=w.useCallback((B0,j0,l0)=>{V.updateFeature(B0,{width:j0,height:l0})},[V]);w.useEffect(()=>{if(j)return q.current=new X5(j),()=>{var B0;(B0=q.current)==null||B0.destroy(),q.current=null}},[j]),w.useEffect(()=>{q.current&&q.current.updateCompleted(V.features)},[V.features]),w.useEffect(()=>{q.current&&q.current.updateDrawing(V.currentStrokeVertices)},[V.currentStrokeVertices]),w.useEffect(()=>{var l0;if(!Z)return;const B0=(l0=Z.getMapContainer)==null?void 0:l0.call(Z);if(!B0)return;const j0=V.mode;return j0!=="select"&&j0!=="none"?B0.style.cursor="crosshair":B0.style.cursor="",()=>{B0.style.cursor=""}},[V.mode,Z]),w.useEffect(()=>{var l0;if(!Z)return;const B0=(l0=Z.getMapContainer)==null?void 0:l0.call(Z);if(!B0)return;const j0=document.createElement("div");return j0.className="aimapui-style-panel-anchor",j0.style.cssText="position:absolute;top:10px;left:10px;z-index:10;pointer-events:auto;",B0.appendChild(j0),J.current=j0,()=>{var F;(F=j0.parentElement)==null||F.removeChild(j0),J.current=null}},[Z]);const U0=V.selectedFeatureId!==null,w0=V.features.length>0,g0=V.selectedFeatureId?V.features.find(B0=>B0.id===V.selectedFeatureId)??null:null,N0=V.editingFeatureId?V.features.find(B0=>B0.id===V.editingFeatureId):void 0,D0=N0&&(N0.properties.annotationType==="text"||N0.properties.annotationType==="link"),_0=N0&&!D0,gA=g.jsxs(g.Fragment,{children:[g.jsx(_5,{activeMode:V.mode,onModeChange:$,tools:h,hasSelection:U0,hasFeatures:w0,onDeleteSelected:e0,onClearAll:c0}),g.jsx(N5,{features:V.features,selectedId:V.selectedFeatureId,editingId:V.editingFeatureId,scene:j,mapsService:Z,styles:m,onSelect:V.selectFeature,onDoubleClick:V.openEditor,onMove:V.moveFeature,onInlineCommit:h0,onInlineCancel:p0,onResize:H0}),_0&&g.jsx(W5,{feature:N0,scene:j,mapsService:Z,onSave:V.updateFeature,onCancel:V.closeEditor,onDelete:V.deleteFeature,onUpload:y})]}),z0=J.current?Pe.createPortal(g.jsx(q5,{mode:V.mode,selectedFeature:g0,activeColor:r0,activeOpacity:Y,activeStrokeWidth:A0,activeFontSize:X,onColorChange:O,onOpacityChange:n0,onStrokeWidthChange:o0,onFontSizeChange:t0,onUpdateFeature:V.updateFeature}),J.current):null;return N?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:C,style:b,children:gA}),z0]}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:`l7-control-anchor ${Q}`,children:gA}),z0]})});UA.mark(Jn);function Kn({logos:s,position:l="bottomleft",className:u,style:f}){const{positionClassName:h}=XA(l),m=qA(),y=g.jsx("div",{className:`l7-control l7-control-logo${u?` ${u}`:""}`,style:f,children:s.map((C,b)=>{const k=g.jsx("img",{src:C.src,alt:C.alt??"logo",width:C.width??24,height:C.width??24,style:{objectFit:"contain",display:"block"}},b);return C.href?g.jsx("a",{href:C.href,target:"_blank",rel:"noopener noreferrer",className:"l7-control-logo-link",children:k},b):g.jsx("div",{className:"l7-control-logo-link",children:k},b)})});return m?y:g.jsx("div",{className:`l7-control-anchor ${h}`,children:y})}UA.mark(Kn);function J5({children:s,defaultSnap:l="collapsed",collapsedHeight:u=80,halfRatio:f=.45,expandedRatio:h=.85,onSnapChange:m,className:y,showHandle:C=!0,borderRadius:b=32}){const k=w.useRef(null),x=w.useRef(0),D=w.useRef(0),z=w.useRef(!1),[B,H]=w.useState(0),[_,j]=w.useState(l),[Z,Q]=w.useState(!1),N=w.useCallback(()=>{var o0;const A0=(o0=k.current)==null?void 0:o0.offsetParent;return A0?A0.clientHeight:window.innerHeight},[]),q=w.useCallback(A0=>{const o0=N();switch(A0){case"collapsed":return u;case"half":return o0*f;case"expanded":return o0*h}},[u,f,h,N]);w.useEffect(()=>{H(q(l))},[l,q]);const J=w.useCallback((A0,o0)=>{const X=q("collapsed"),t0=q("half"),V=q("expanded");let $;if(Math.abs(o0)>.5)o0>0?$=A0>t0?"expanded":"half":$=A0<t0?"collapsed":"half";else{const e0=Math.abs(A0-X),c0=Math.abs(A0-t0),h0=Math.abs(A0-V),p0=Math.min(e0,c0,h0);p0===e0?$="collapsed":p0===c0?$="half":$="expanded"}Q(!0),j($),H(q($)),m==null||m($),setTimeout(()=>Q(!1),300)},[q,m]),r0=w.useCallback(A0=>{z.current=!0,x.current=A0.touches[0].clientY,D.current=B,Q(!1)},[B]),O=w.useCallback(A0=>{if(!z.current)return;const o0=x.current-A0.touches[0].clientY,X=N()*h,t0=Math.max(u,Math.min(X,D.current+o0));H(t0)},[u,h,N]),Y=w.useCallback(A0=>{if(!z.current)return;z.current=!1;const X=(x.current-A0.changedTouches[0].clientY)/100;J(B,X)},[B,J]),n0=w.useCallback(A0=>{z.current=!0,x.current=A0.clientY,D.current=B,Q(!1);const o0=t0=>{if(!z.current)return;const V=x.current-t0.clientY,$=N()*h,e0=Math.max(u,Math.min($,D.current+V));H(e0)},X=t0=>{z.current=!1;const $=(x.current-t0.clientY)/100,e0=N()*h;J(Math.max(u,Math.min(e0,D.current+(x.current-t0.clientY))),$),document.removeEventListener("mousemove",o0),document.removeEventListener("mouseup",X)};document.addEventListener("mousemove",o0),document.addEventListener("mouseup",X)},[B,u,h,J,N]);return w.useCallback(A0=>{Q(!0),j(A0),H(q(A0)),m==null||m(A0),setTimeout(()=>Q(!1),300)},[q,m]),g.jsx("div",{ref:k,className:y,style:{position:"absolute",bottom:0,left:0,width:"100%",height:B,zIndex:1e3,pointerEvents:"auto",transition:Z?"height 0.3s cubic-bezier(0.4, 0, 0.2, 1)":"none",willChange:"height",touchAction:"none"},children:g.jsxs("div",{style:{width:"100%",height:"100%",background:"var(--color-surface, #f8f9ff)",borderTopLeftRadius:b,borderTopRightRadius:b,boxShadow:"0 -10px 40px rgba(0, 0, 0, 0.15)",borderTop:"1px solid rgba(195, 198, 215, 0.2)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[g.jsx("div",{onTouchStart:r0,onTouchMove:O,onTouchEnd:Y,onMouseDown:n0,style:{padding:"12px 0 16px",cursor:"grab",userSelect:"none",flexShrink:0},children:C&&g.jsx("div",{style:{width:48,height:6,borderRadius:3,background:"rgba(195, 198, 215, 0.5)",margin:"0 auto"}})}),g.jsx("div",{style:{flex:1,overflowY:_==="collapsed"?"hidden":"auto",overflowX:"hidden",padding:"0 16px",WebkitOverflowScrolling:"touch",msOverflowStyle:"none",scrollbarWidth:"none"},children:s})]})})}function K5({placeholder:s="搜索地点...",onSearch:l,onFilter:u,className:f,trailing:h}){const[m,y]=w.useState(""),C=w.useCallback(k=>{const x=k.target.value;y(x),l==null||l(x)},[l]),b=w.useCallback(()=>{y(""),l==null||l("")},[l]);return g.jsxs("div",{className:`glass-panel ${f??""}`,style:{display:"flex",alignItems:"center",padding:"12px 16px",borderRadius:16,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)",border:"1px solid rgba(195, 198, 215, 0.3)"},children:[g.jsx("span",{className:"material-symbols-outlined",style:{color:"var(--color-primary, #004ac6)",marginRight:12,fontSize:22},children:"search"}),g.jsx("input",{type:"text",value:m,onChange:C,placeholder:s,style:{flex:1,border:"none",background:"transparent",outline:"none",fontSize:14,lineHeight:"20px",color:"var(--color-on-surface, #121c2a)"}}),m&&g.jsx("button",{onClick:b,style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:999,display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18,color:"var(--color-on-surface-variant, #434655)"},children:"close"})}),u&&g.jsx("button",{onClick:u,style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:999,display:"flex",alignItems:"center",justifyContent:"center",marginLeft:4},children:g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:22,color:"var(--color-on-surface-variant, #434655)"},children:"tune"})}),h]})}function Tt(s,l){if(!l)return s;const u={...s};for(const f of Object.keys(l)){const h=l[f],m=u[f];h!==null&&typeof h=="object"&&!Array.isArray(h)&&m!==null&&typeof m=="object"&&!Array.isArray(m)?u[f]=Tt(m,h):h!==void 0&&(u[f]=h)}return u}function R5(s,l){return l?Tt(s,l):s}class Al extends w.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null}}static getDerivedStateFromError(l){return{hasError:!0,error:l}}componentDidCatch(l,u){var f,h;(h=(f=this.props).onError)==null||h.call(f,l,u)}render(){if(this.state.hasError){const{fallback:l}=this.props,{error:u}=this.state;return typeof l=="function"?l(u):l||g.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",padding:32,color:"#666",fontFamily:"system-ui, sans-serif"},children:[g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:48,marginBottom:16,color:"#e53e3e"},children:"error"}),g.jsx("p",{style:{fontSize:16,fontWeight:600,marginBottom:8},children:"地图加载失败"}),g.jsx("p",{style:{fontSize:13,color:"#999"},children:(u==null?void 0:u.message)??"未知错误"})]})}return this.props.children}}return b0.ADMIN_SEQUENTIAL_COLORS=_n,b0.AiMap=Go,b0.AiMapJSONSchema=ts,b0.AnnotationControl=Jn,b0.ArcFlowLayer=Os,b0.BUBBLE_SIZE_LEVELS=Sn,b0.BottomSheet=J5,b0.BubbleLayer=ns,b0.ChinaDistrict=Cs,b0.ControlContainer=it,b0.ControlRegistry=UA,b0.ControlRenderer=dn,b0.DEFAULT_CITY_SOURCE=Pn,b0.DEFAULT_DISTRICT_SOURCE=Tn,b0.DEFAULT_PROVINCE_SOURCE=In,b0.DrawControl=Ct,b0.ErrorBoundary=Al,b0.EventBus=br,b0.EventBusProvider=kr,b0.ExportImageControl=gt,b0.FillLayer=fs,b0.FullscreenControl=at,b0.GAODE_THEME_PRESETS=dt,b0.GeoLocateControl=ct,b0.GlyphLayer=Fs,b0.H3Layer=z5,b0.H3_SEQUENTIAL_COLORS=E5,b0.HeatmapHexagonLayer=En,b0.HeatmapLayer=xn,b0.HexagonLayer=En,b0.INDEPENDENT_MAP_THEME_PRESETS=Ui,b0.IconLayer=Qn,b0.ImageCalibrationControl=bt,b0.ImageLayer=rs,b0.InteractionRenderer=Cn,b0.LayerRenderer=Zr,b0.LayerSwitchControl=yt,b0.LegendCategories=wt,b0.LegendControl=Gn,b0.LegendDiverging=kt,b0.LegendIcon=St,b0.LegendLineWidth=Et,b0.LegendProportion=zt,b0.LegendRamp=Lt,b0.LegendRenderer=bn,b0.LegendSize=xt,b0.LegendThreshold=Mt,b0.LineLayer=ee,b0.LogoControl=Kn,b0.MAKI_ICONS=ke,b0.MAKI_ICON_NAMES=_o,b0.MapSceneRenderer=Hr,b0.MapThemeControl=ht,b0.Marker=Qe,b0.MarkerClusterLayer=is,b0.MobileSheetLegend=Mn,b0.MobileToolbar=kn,b0.MouseLocationControl=pt,b0.OPENFREEMAP_THEME_PRESETS=Oi,b0.PointLayer=PA,b0.PolygonLayer=u1,b0.Popup=a1,b0.RasterLayer=zn,b0.ResponsiveProvider=$o,b0.RouteLayer=Us,b0.SATELLITE_PROVIDER_NAMES=Zs,b0.SatelliteLayer=Qs,b0.ScaleControl=lt,b0.SceneProvider=Sr,b0.SchemaProvider=vr,b0.SearchBar=K5,b0.ThemeProvider=xr,b0.TiffRasterLayer=Gs,b0.Tooltip=tt,b0.ZoomControl=ot,b0.adaptHeatmapLayer=Tr,b0.adaptImageLayer=Nr,b0.adaptLineLayer=Ir,b0.adaptPointLayer=_r,b0.adaptPolygonLayer=Pr,b0.adaptRasterLayer=Fr,b0.applyControlDefaults=yr,b0.applyLayerDefaults=gr,b0.applyMapDefaults=x1,b0.applyResponsiveOverrides=R5,b0.applySchemaDefaults=X1,b0.createBasemap=Dr,b0.createEventBus=wr,b0.createMakiIconMap=Io,b0.createMakiPinMap=gn,b0.cx=bA,b0.deepMerge=Tt,b0.diffSchema=Ko,b0.getPopperDirection=ut,b0.hexToRgba=vi,b0.makiIconUrl=hn,b0.makiPinUrl=pn,b0.parseSchema=mr,b0.useControlContainer=qA,b0.useEventBus=J1,b0.useMapControl=XA,b0.useMapPosition=At,b0.usePopperPosition=ft,b0.useResponsive=Ln,b0.useScene=DA,b0.useSchema=ei,b0.useTheme=Er,b0.validateAiMapSchema=Ro,b0.validateSchema=Ai,Object.defineProperty(b0,Symbol.toStringTag,{value:"Module"}),b0})({},React,React,L7,ReactDOM,clsx,ReactDOM,Supercluster);