1var Pa=Object.defineProperty;var Ca=(r,o,a)=>o in r?Pa(r,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[o]=a;var Hn=(r,o,a)=>Ca(r,typeof o!="symbol"?o+"":o,a);import{r as E,S as Sa,y as cs,c as Ee,j as n,u as dt,R as Ae,L as hs,a as cn,b as tn,d as Dr,e as es}from"./entry-index-BZ3gxf7g.js";import{u as Hr,a as us,b as ds,p as Ta,m as Ft}from"./chunk-LiveDataContext-DrqVsCQi.js";import{f as nn,c as ri,a as Ge,b as fs,S as yr,d as Na,e as Wn,L as vi,g as La,A as Ma,i as Wi,h as Ea,j as Wr,E as Oa,k as Vi,l as Aa,m as Ia,C as Ba,n as Ra,o as ti,p as Za,u as Fa,G as $a,q as Da,r as vr,s as Ha,t as $t,v as xi,B as Wa,X as Gi,Y as Ki,w as Ua,F as zi,x as ts,y as Pt,T as Va,U as Un,P as Ga,z as qi,D as Ka,H as sn,I as xr,J as is,K as wr,M as qa,N as Ur,O as ut,Q as ms,R as rn,V as Mt,W as on,Z as Ja,_ as br,$ as jr,a0 as zr,a1 as ii,a2 as st,a3 as Ui,a4 as Ya,a5 as Vn,a6 as Vr,a7 as Gr,a8 as Gn,a9 as Ji,aa as Xa,ab as Qa,ac as el,ad as tl,ae as il}from"./chunk-use-ping-summary-DAja585L.js";import{o as nl,s as sl,a as rl,v as ol,r as al,p as b,b as ll,c as cl,d as T,e as ns}from"./chunk-button-BJqZMhaL.js";import{o as Ct,I as hl,h as ul,g as dl,v as fl,u as kr,c as ml,X as pl,S as gl}from"./chunk-x-54Sfei4A.js";import{g as _l}from"./chunk-react-vendor-BN0qJr-I.js";const yl=["1","2","3"],vl=["soft","surface","outline"],Pr={...rl,size:{type:"enum",className:"rt-r-size",values:yl,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:vl,default:"soft"},...sl,...nl},Kr=E.createContext({}),ss=E.forwardRef((r,o)=>{const{size:a=Pr.size.default}=r,{asChild:c,children:u,className:f,color:d,..._}=ol(r,Pr,al),z=c?Sa:"div";return E.createElement(z,{"data-accent-color":d,..._,className:cs("rt-CalloutRoot",f),ref:o},E.createElement(Kr.Provider,{value:E.useMemo(()=>({size:a}),[a])},u))});ss.displayName="Callout.Root";const rs=E.forwardRef(({className:r,...o},a)=>E.createElement("div",{...o,className:cs("rt-CalloutIcon",r),ref:a}));rs.displayName="Callout.Icon";const os=E.forwardRef(({className:r,...o},a)=>{const{size:c}=E.useContext(Kr);return E.createElement(b,{as:"p",size:ll(c,cl),...o,asChild:!1,ref:a,className:cs("rt-CalloutText",r)})});os.displayName="Callout.Text";/** 2 * @license lucide-react v0.556.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const xl=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]],wl=Ee("arrow-down-up",xl);/** 7 * @license lucide-react v0.556.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const bl=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],jl=Ee("camera",bl);/** 12 * @license lucide-react v0.556.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const zl=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],kl=Ee("check",zl);/** 17 * @license lucide-react v0.556.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const Pl=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ps=Ee("chevron-down",Pl);/** 22 * @license lucide-react v0.556.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */const Cl=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Kn=Ee("chevron-left",Cl);/** 27 * @license lucide-react v0.556.0 - ISC 28 * 29 * This source code is licensed under the ISC license. 30 * See the LICENSE file in the root directory of this source tree. 31 */const Sl=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Yi=Ee("chevron-right",Sl);/** 32 * @license lucide-react v0.556.0 - ISC 33 * 34 * This source code is licensed under the ISC license. 35 * See the LICENSE file in the root directory of this source tree. 36 */const Tl=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],qr=Ee("chevron-up",Tl);/** 37 * @license lucide-react v0.556.0 - ISC 38 * 39 * This source code is licensed under the ISC license. 40 * See the LICENSE file in the root directory of this source tree. 41 */const Nl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ll=Ee("circle-alert",Nl);/** 42 * @license lucide-react v0.556.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const Ml=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],El=Ee("circle-check-big",Ml);/** 47 * @license lucide-react v0.556.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */const Ol=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Al=Ee("circle-x",Ol);/** 52 * @license lucide-react v0.556.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const Il=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Bl=Ee("clock",Il);/** 57 * @license lucide-react v0.556.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const Rl=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Jr=Ee("database",Rl);/** 62 * @license lucide-react v0.556.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const Zl=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Fl=Ee("download",Zl);/** 67 * @license lucide-react v0.556.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const $l=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Yr=Ee("gauge",$l);/** 72 * @license lucide-react v0.556.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const Dl=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Cr=Ee("git-branch",Dl);/** 77 * @license lucide-react v0.556.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const Hl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Xr=Ee("globe",Hl);/** 82 * @license lucide-react v0.556.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const Wl=[["path",{d:"M6 19v-3",key:"1nvgqn"}],["path",{d:"M10 19v-3",key:"iu8nkm"}],["path",{d:"M14 19v-3",key:"kcehxu"}],["path",{d:"M18 19v-3",key:"1vh91z"}],["path",{d:"M8 11V9",key:"63erz4"}],["path",{d:"M16 11V9",key:"fru6f3"}],["path",{d:"M12 11V9",key:"ha00sb"}],["path",{d:"M2 15h20",key:"16ne18"}],["path",{d:"M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z",key:"lhddv3"}]],Qr=Ee("memory-stick",Wl);/** 87 * @license lucide-react v0.556.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const Ul=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}
91],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],Vl=Ee("radar",Ul);/** 92 * @license lucide-react v0.556.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const Gl=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Kl=Ee("search",Gl);/** 97 * @license lucide-react v0.556.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const ql=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}],["path",{d:"M22 4v16",key:"sih9yq"}]],Jl=Ee("signal",ql);/** 102 * @license lucide-react v0.556.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const Yl=[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]],Xl=Ee("thermometer",Yl);/** 107 * @license lucide-react v0.556.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree. 111 */const Ql=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],eo=Ee("trending-down",Ql);/** 112 * @license lucide-react v0.556.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const ec=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],gs=Ee("trending-up",ec);/** 117 * @license lucide-react v0.556.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const tc=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Sr=Ee("triangle-alert",tc);/** 122 * @license lucide-react v0.556.0 - ISC 123 * 124 * This source code is licensed under the ISC license. 125 * See the LICENSE file in the root directory of this source tree. 126 */const ic=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],nc=Ee("upload",ic);/** 127 * @license lucide-react v0.556.0 - ISC 128 * 129 * This source code is licensed under the ISC license. 130 * See the LICENSE file in the root directory of this source tree. 131 */const sc=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],to=Ee("zap",sc),_s={"ðð°":{en:"Hong Kong",zh:"馿¸¯",aliases:["hk","hongkong","hong kong","馿¸¯","HK"],coordinates:[22.3193,114.1694]},"ð²ð´":{en:"Macau",zh:"æ¾³é¨",aliases:["mo","macao","macau","æ¾³é¨","æ¾³é","MO"],coordinates:[22.1987,113.5439]},"ð¨ð³":{en:"China",zh:"ä¸å½",aliases:["cn","china","ä¸å½","ä¸å人æ°å ±åå½","prc","CN"],coordinates:[39.9042,116.4074]},"ðºð¸":{en:"United States",zh:"ç¾å½",aliases:["us","usa","united states","america","ç¾å½","ç¾å©å","US","USA"],coordinates:[37.0902,-95.7129]},"ð¯ðµ":{en:"Japan",zh:"æ¥æ¬",aliases:["jp","japan","æ¥æ¬","JP"],coordinates:[35.6762,139.6503]},"ð°ð·":{en:"South Korea",zh:"é©å½",aliases:["kr","korea","south korea","é©å½","åé©","KR"],coordinates:[37.5665,126.978]},"ð¸ð¬":{en:"Singapore",zh:"æ°å å¡",aliases:["sg","singapore","æ°å å¡","SG"],coordinates:[1.3521,103.8198]},"ð¹ð¼":{en:"Taiwan",zh:"å°æ¹¾",aliases:["tw","taiwan","å°æ¹¾","å°ç£","TW"],coordinates:[25.033,121.5654]},"ð¬ð§":{en:"United Kingdom",zh:"è±å½",aliases:["gb","uk","united kingdom","britain","è±å½","è±å","GB","UK"],coordinates:[51.5074,-.1278]},"ð©ðª":{en:"Germany",zh:"å¾·å½",aliases:["de","germany","deutschland","å¾·å½","å¾·å","DE"],coordinates:[52.52,13.405]},"ð«ð·":{en:"France",zh:"æ³å½",aliases:["fr","france","æ³å½","æ³å","FR"],coordinates:[48.8566,2.3522]},"ð¨ð¦":{en:"Canada",zh:"å æ¿å¤§",aliases:["ca","canada","å æ¿å¤§","CA"],coordinates:[45.4215,-75.6972]},"ð¦ðº":{en:"Australia",zh:"澳大å©äº",aliases:["au","australia","澳大å©äº","澳洲","AU"],coordinates:[-33.8688,151.2093]},"ð·ðº":{en:"Russia",zh:"ä¿ç½æ¯",aliases:["ru","russia","ä¿ç½æ¯","ä¿å","RU"],coordinates:[55.7558,37.6173]},"ð®ð³":{en:"India",zh:"å°åº¦",aliases:["in","india","å°åº¦","IN"],coordinates:[28.6139,77.209]},"ð§ð·":{en:"Brazil",zh:"巴西",aliases:["br","brazil","巴西","BR"],coordinates:[-15.8267,-47.9218]},"ð³ð±":{en:"Netherlands",zh:"è·å °",aliases:["nl","netherlands","holland","è·å °","è·è","NL"],coordinates:[52.3676,4.9041]}
131,"ð®ð¹":{en:"Italy",zh:"æå¤§å©",aliases:["it","italy","æå¤§å©","IT"],coordinates:[41.9028,12.4964]},"ðªð¸":{en:"Spain",zh:"西çç",aliases:["es","spain","西çç","ES"],coordinates:[40.4168,-3.7038]},"ð¸ðª":{en:"Sweden",zh:"çå
¸",aliases:["se","sweden","çå
¸","SE"],coordinates:[59.3293,18.0686]},"ð³ð´":{en:"Norway",zh:"æªå¨",aliases:["no","norway","æªå¨","NO"],coordinates:[59.9139,10.7522]},"ð«ð®":{en:"Finland",zh:"è¬å
°",aliases:["fi","finland","è¬å
°","è¬è","FI"],coordinates:[60.1699,24.9384]},"ð¨ð":{en:"Switzerland",zh:"ç士",aliases:["ch","switzerland","ç士","CH"],coordinates:[46.9479,7.4474]},"ð¦ð¹":{en:"Austria",zh:"奥å°å©",aliases:["at","austria","奥å°å©","奧å°å©","AT"],coordinates:[48.2082,16.3738]},"ð§ðª":{en:"Belgium",zh:"æ¯å©æ¶",aliases:["be","belgium","æ¯å©æ¶","æ¯å©æ","BE"],coordinates:[50.8503,4.3517]},"ðµð¹":{en:"Portugal",zh:"è¡èç",aliases:["pt","portugal","è¡èç","PT"],coordinates:[38.7223,-9.1393]},"ð¬ð·":{en:"Greece",zh:"å¸è
",aliases:["gr","greece","å¸è
","å¸è","GR"],coordinates:[37.9838,23.7275]},"ð¹ð·":{en:"Turkey",zh:"åè³å
¶",aliases:["tr","turkey","åè³å
¶","TR"],coordinates:[39.9334,32.8597]},"ðµð±":{en:"Poland",zh:"æ³¢å
°",aliases:["pl","poland","æ³¢å
°","æ³¢è","PL"],coordinates:[52.2297,21.0122]},"ð¨ð¿":{en:"Czech Republic",zh:"æ·å
",aliases:["cz","czech","czech republic","æ·å
","CZ"],coordinates:[50.0755,14.4378]},"ððº":{en:"Hungary",zh:"åçå©",aliases:["hu","hungary","åçå©","HU"],coordinates:[47.4979,19.0402]},"ð·ð´":{en:"Romania",zh:"ç½é©¬å°¼äº",aliases:["ro","romania","ç½é©¬å°¼äº","ç¾
馬尼äº","RO"],coordinates:[44.4268,26.1025]},"ð§ð¬":{en:"Bulgaria",zh:"ä¿å å©äº",aliases:["bg","bulgaria","ä¿å å©äº","ä¿å å©äº","BG"],coordinates:[42.6977,23.3219]},"ðð·":{en:"Croatia",zh:"å
ç½å°äº",aliases:["hr","croatia","å
ç½å°äº","å
ç¾
å°äº","HR"],coordinates:[45.815,15.9819]},"ð¸ð®":{en:"Slovenia",zh:"æ¯æ´æå°¼äº",aliases:["si","slovenia","æ¯æ´æå°¼äº","æ¯æ´æå°¼äº","SI"],coordinates:[46.0569,14.5058]},"ð¸ð°":{en:"Slovakia",zh:"æ¯æ´ä¼å
",aliases:["sk","slovakia","æ¯æ´ä¼å
","SK"],coordinates:[48.1486,17.1077]},"ð±ð»":{en:"Latvia",zh:"æè±ç»´äº",aliases:["lv","latvia","æè±ç»´äº","æè«ç¶äº","LV"],coordinates:[56.9496,24.1052]},"ð±ð¹":{en:"Lithuania",zh:"ç«é¶å®",aliases:["lt","lithuania","ç«é¶å®","LT"],coordinates:[54.6872,25.2797]},"ðªðª":{en:"Estonia",zh:"ç±æ²å°¼äº",aliases:["ee","estonia","ç±æ²å°¼äº","ææ²å°¼äº","EE"],coordinates:[59.437,24.7536]}
131,"ð²ð½":{en:"Mexico",zh:"墨西å¥",aliases:["mx","mexico","墨西å¥","MX"],coordinates:[19.4326,-99.1332]},"ð¦ð·":{en:"Argentina",zh:"é¿æ ¹å»·",aliases:["ar","argentina","é¿æ ¹å»·","AR"],coordinates:[-34.6037,-58.3816]},"ð¨ð±":{en:"Chile",zh:"æºå©",aliases:["cl","chile","æºå©","CL"],coordinates:[-33.4489,-70.6693]},"ð¨ð´":{en:"Colombia",zh:"å¥ä¼¦æ¯äº",aliases:["co","colombia","å¥ä¼¦æ¯äº","å¥å«æ¯äº","CO"],coordinates:[4.711,-74.0721]},"ðµðª":{en:"Peru",zh:"ç§é²",aliases:["pe","peru","ç§é²","ç§é¯","PE"],coordinates:[-12.0464,-77.0428]},"ð»ðª":{en:"Venezuela",zh:"å§å
çæ",aliases:["ve","venezuela","å§å
çæ","å§å
§çæ","VE"],coordinates:[10.4806,-66.9036]},"ðºð¾":{en:"Uruguay",zh:"乿å",aliases:["uy","uruguay","乿å","çæå","UY"],coordinates:[-34.9011,-56.1645]},"ðªð¨":{en:"Ecuador",zh:"åçå¤å°",aliases:["ec","ecuador","åçå¤å°","åçå¤ç¾","EC"],coordinates:[-.1807,-78.4678]},"ð§ð´":{en:"Bolivia",zh:"ç»å©ç»´äº",aliases:["bo","bolivia","ç»å©ç»´äº","ç»å©ç¶äº","BO"],coordinates:[-16.2902,-63.5887]},"ðµð¾":{en:"Paraguay",zh:"å·´æå",aliases:["py","paraguay","å·´æå","PY"],coordinates:[-25.2637,-57.5759]},"ð¬ð¾":{en:"Guyana",zh:"åäºé£",aliases:["gy","guyana","åäºé£","åäºé£","GY"],coordinates:[6.8013,-58.1551]},"ð¸ð·":{en:"Suriname",zh:"èéå",aliases:["sr","suriname","èéå","èéå","SR"],coordinates:[5.852,-55.2038]},"ð«ð°":{en:"Falkland Islands",zh:"ç¦å
å
°ç¾¤å²",aliases:["fk","falkland","ç¦å
å
°","ç¦å
è","FK"],coordinates:[-51.7963,-59.5236]},"ð¬ð«":{en:"French Guiana",zh:"æ³å±åäºé£",aliases:["gf","french guiana","æ³å±åäºé£","æ³å±¬åäºé£","GF"],coordinates:[4.9371,-52.326]},"ðµð¦":{en:"Panama",zh:"å·´æ¿é©¬",aliases:["pa","panama","å·´æ¿é©¬","å·´æ¿é¦¬","PA"],coordinates:[8.9824,-79.5199]},"ð¨ð·":{en:"Costa Rica",zh:"奿¯è¾¾é»å ",aliases:["cr","costa rica","奿¯è¾¾é»å ","奿¯éé»å ","CR"],coordinates:[9.9281,-84.0907]},"ð³ð®":{en:"Nicaragua",zh:"å°¼å æç",aliases:["ni","nicaragua","å°¼å æç","NI"],coordinates:[12.1149,-86.2362]},"ðð³":{en:"Honduras",zh:"æ´ªé½ææ¯",aliases:["hn","honduras","æ´ªé½ææ¯","HN"],coordinates:[14.0723,-87.1921]},"ð¬ð¹":{en:"Guatemala",zh:"å±å°é©¬æ",aliases:["gt","guatemala","å±å°é©¬æ","å±å°é¦¬æ","GT"],coordinates:[14.6349,-90.5069]},"ð§ð¿":{en:"Belize",zh:"伯å©å
¹",aliases:["bz","belize","伯å©å
¹","伯å©è²","BZ"],coordinates:[17.1899,-88.4976]},"ð¸ð»":{en:"El Salvador",zh:"è¨å°ç¦å¤",aliases:["sv","el salvador","è¨å°ç¦å¤","è©ç¾ç¦å¤","SV"],coordinates:[13.6929,-89.2182]},"ð¯ð²":{en:"Jamaica",zh:"çä¹°å ",aliases:["jm","jamaica","çä¹°å ","çè²·å ","JM"],coordinates:[18.1096,-77.2975]}
131,"ð¨ðº":{en:"Cuba",zh:"å¤å·´",aliases:["cu","cuba","å¤å·´","CU"],coordinates:[23.1136,-82.3666]},"ð©ð´":{en:"Dominican Republic",zh:"å¤ç±³å°¼å å
±åå½",aliases:["do","dominican republic","å¤ç±³å°¼å å
±åå½","夿尼å ","DO"],coordinates:[18.4861,-69.9312]},"ðð¹":{en:"Haiti",zh:"æµ·å°",aliases:["ht","haiti","æµ·å°","HT"],coordinates:[18.5944,-72.3074]},"ð§ð¸":{en:"Bahamas",zh:"å·´å马",aliases:["bs","bahamas","å·´å马","å·´å馬","BS"],coordinates:[25.0343,-77.3963]},"ð§ð§":{en:"Barbados",zh:"巴巴夿¯",aliases:["bb","barbados","巴巴夿¯","BB"],coordinates:[13.1939,-59.5432]},"ð¹ð¹":{en:"Trinidad and Tobago",zh:"ç¹ç«å°¼è¾¾åå¤å·´å¥",aliases:["tt","trinidad","ç¹ç«å°¼è¾¾","ç¹ç«å°¼é","TT"],coordinates:[10.6918,-61.2225]},"ðµð":{en:"Philippines",zh:"è²å¾å®¾",aliases:["ph","philippines","è²å¾å®¾","è²å¾è³","PH"],coordinates:[14.5995,120.9842]},"ð¹ð":{en:"Thailand",zh:"æ³°å½",aliases:["th","thailand","æ³°å½","æ³°å","TH"],coordinates:[13.7563,100.5018]},"ð»ð³":{en:"Vietnam",zh:"è¶å",aliases:["vn","vietnam","è¶å","VN"],coordinates:[21.0285,105.8542]},"ð²ð¾":{en:"Malaysia",zh:"马æ¥è¥¿äº",aliases:["my","malaysia","马æ¥è¥¿äº","馬ä¾è¥¿äº","MY"],coordinates:[3.139,101.6869]},"ð®ð©":{en:"Indonesia",zh:"å°åº¦å°¼è¥¿äº",aliases:["id","indonesia","å°åº¦å°¼è¥¿äº","å°å°¼","ID"],coordinates:[-6.2088,106.8456]},"ð±ð¦":{en:"Laos",zh:"èæ",aliases:["la","laos","èæ","èæ¾","LA"],coordinates:[17.9757,102.6331]},"ð°ð":{en:"Cambodia",zh:"æ¬å寨",aliases:["kh","cambodia","æ¬å寨","KH"],coordinates:[11.5449,104.8922]},"ð²ð²":{en:"Myanmar",zh:"ç¼
ç¸",aliases:["mm","myanmar","burma","ç¼
ç¸","ç·¬ç¸","MM"],coordinates:[16.8661,96.1951]},"ð§ð³":{en:"Brunei",zh:"æè±",aliases:["bn","brunei","æè±","æ±¶è","BN"],coordinates:[4.5353,114.7277]},"ðªð¬":{en:"Egypt",zh:"åå",aliases:["eg","egypt","åå","EG"],coordinates:[30.0444,31.2357]},"ð¿ð¦":{en:"South Africa",zh:"åé",aliases:["za","south africa","åé","ZA"],coordinates:[-25.7479,28.2293]},"ð³ð¬":{en:"Nigeria",zh:"å°¼æ¥å©äº",aliases:["ng","nigeria","å°¼æ¥å©äº","å°¼æ¥å©äº","NG"],coordinates:[9.082,8.6753]},"ð°ðª":{en:"Kenya",zh:"è¯å°¼äº",aliases:["ke","kenya","è¯å°¼äº","è¯äº","KE"],coordinates:[-1.2921,36.8219]},"ðªð¹":{en:"Ethiopia",zh:"åå¡ä¿æ¯äº",aliases:["et","ethiopia","åå¡ä¿æ¯äº","åå¡ä¿æ¯äº","ET"],coordinates:[9.03,38.74]},"ð¬ð":{en:"Ghana",zh:"å 纳",aliases:["gh","ghana","å 纳","迦ç´","GH"],coordinates:[5.6037,-.187]},"ðºð¬":{en:"Uganda",zh:"ä¹å¹²è¾¾",aliases:["ug","uganda","ä¹å¹²è¾¾","çå¹²é","UG"],coordinates:[.3476,32.5825]},"ð¹ð¿":{en:"Tanzania",zh:"妿¡å°¼äº",aliases:["tz","tanzania","妿¡å°¼äº","å¦å°å°¼äº","TZ"],coordinates:[-6.7924,39.2083]},"ð·ð¼":{en:"Rwanda",zh:"墿ºè¾¾",aliases:["rw","rwanda","墿ºè¾¾","ç§æºé","RW"],coordinates:[-1.9403,29.8739]},"ð¿ð¼":{en:"Zimbabwe",zh:"津巴å¸é¦",aliases:["zw","zimbabwe","津巴å¸é¦","è¾å·´å¨","ZW"],coordinates:[-17.8292,31.0539]},"ð¿ð²":{en:"Zambia",zh:"èµæ¯äº",aliases:["zm","zambia","èµæ¯äº","å°æ¯äº","ZM"],coordinates:[-15.3875,28.3228]},"ð§ð¼":{en:"Botswana",zh:"åè¨ç¦çº³",aliases:["bw","botswana","åè¨ç¦çº³","æ³¢æé£","BW"],coordinates:[-24.6282,25.9231]},"ð³ð¦":{en:"Namibia",zh:"纳米æ¯äº",aliases:["na","namibia","纳米æ¯äº","ç´ç±³æ¯äº","NA"],coordinates:[-22.5597,17.0658]},"ð²ð¦":{en:"Morocco",zh:"æ©æ´å¥",aliases:["ma","morocco","æ©æ´å¥","MA"],coordinates:[33.9716,-6.8498]},"ð©ð¿":{en:"Algeria",zh:"é¿å°åå©äº",aliases:["dz","algeria","é¿å°åå©äº","é¿ç¾åå©äº","DZ"],coordinates:[36.7372,3.0866]},"ð¹ð³":{en:"Tunisia",zh:"çªå°¼æ¯",aliases:["tn","tunisia","çªå°¼æ¯","TN"],coordinates:[36.8065,10.1815]},"ð±ð¾":{en:"Libya",zh:"婿¯äº",aliases:["ly","libya","婿¯äº","婿¯äº","LY"],coordinates:[32.8872,13.1913]},"ð¸ð©":{en:"Sudan",zh:"è丹",aliases:["sd","sudan","è丹","è丹","SD"],coordinates:[15.5007,32.5599]},"ð¸ð¸":{en:"South Sudan",zh:"åè丹",aliases:["ss","south sudan","åè丹","åè丹","SS"],coordinates:[4.8517,31.5825]},"ð¨ð©":{en:"Democratic Republic of Congo",zh:"åææ°ä¸»å
±åå½",aliases:["cd","drc","dr congo","åææ°ä¸»å
±åå½","åæï¼éï¼","åææ°ä¸»å
±åå","æ°ä¸»åæ","CD"],coordinates:[-4.4419,15.2663]},"ð¨ð¬":{en:"Republic of Congo",zh:"åæå
±åå½",aliases:["cg","congo-brazzaville","åæå
±åå½","åæï¼å¸ï¼","åæå
±åå","CG"],coordinates:[-4.2634,15.2429]},"ð¨ð«":{en:"Central African Republic",zh:"ä¸éå
±åå½",aliases:["cf","central african","ä¸é","CF"],coordinates:[4.3947,18.5582]},"ð¨ð²":{en:"Cameroon",zh:"å麦é",aliases:["cm","cameroon","å麦é","å麥é","CM"],coordinates:[3.848,11.5021]},"ð¹ð©":{en:"Chad",zh:"ä¹å¾",aliases:["td","chad","ä¹å¾","TD"],coordinates:[12.1348,15.0557]},"ð³ðª":{en:"Niger",zh:"å°¼æ¥å°",aliases:["ne","niger","å°¼æ¥å°","å°¼æ¥ç¾","NE"],coordinates:[13.5117,2.1098]},"ð²ð±":{en:"Mali",zh:"马é",aliases:["ml","mali","马é","馬å©","ML"],coordinates:[12.6392,-8.0029]},"ð§ð«":{en:"Burkina Faso",zh:"å¸åºçº³æ³ç´¢",aliases:["bf","burkina","å¸åºçº³æ³ç´¢","å¸åç´æ³ç´¢","BF"],coordinates:[12.3714,-1.5197]},"ð¸ð³":{en:"Senegal",zh:"å¡å
å å°",aliases:["sn","senegal","å¡å
å å°","å¡å
§å ç¾","SN"],coordinates:[14.6928,-1
1317.4467]},"ð¬ð²":{en:"Gambia",zh:"忝äº",aliases:["gm","gambia","忝äº","çæ¯äº","GM"],coordinates:[13.4432,-16.5775]},"ð¬ð¼":{en:"Guinea-Bissau",zh:"å å
äºæ¯ç»",aliases:["gw","guinea-bissau","å å
äºæ¯ç»","å¹¾å
§äºæ¯ç´¢","GW"],coordinates:[11.8037,-15.1804]},"ð¬ð³":{en:"Guinea",zh:"å å
äº",aliases:["gn","guinea","å å
äº","å¹¾å
§äº","GN"],coordinates:[9.6412,-13.5784]},"ð¸ð±":{en:"Sierra Leone",zh:"塿婿",aliases:["sl","sierra leone","塿婿","SL"],coordinates:[8.4606,-13.2317]},"ð±ð·":{en:"Liberia",zh:"婿¯éäº",aliases:["lr","liberia","婿¯éäº","è³´æ¯çäº","LR"],coordinates:[6.2907,-10.7605]},"ð¨ð®":{en:"Ivory Coast",zh:"ç§ç¹è¿ªç¦",aliases:["ci","ivory coast","ç§ç¹è¿ªç¦","è±¡çæµ·å²¸","CI"],coordinates:[5.36,-4.0083]},"ð¹ð¬":{en:"Togo",zh:"å¤å¥",aliases:["tg","togo","å¤å¥","TG"],coordinates:[6.1375,1.2123]},"ð§ð¯":{en:"Benin",zh:"è´å®",aliases:["bj","benin","è´å®","è²å¯§","BJ"],coordinates:[6.3703,2.3912]},"ð¦ð¨":{en:"Ascension Island",zh:"é¿æ£®æ¾å²",aliases:["ac","ascension","é¿æ£®æ¾å²","AC"],coordinates:[-7.9467,-14.3559]},"ð¦ð©":{en:"Andorra",zh:"å®éå°",aliases:["ad","andorra","å®éå°","AD"],coordinates:[42.5063,1.5218]},"ð¦ðª":{en:"United Arab Emirates",zh:"é¿èé
",aliases:["ae","uae","emirates","é¿èé
","é¿æä¼¯èåé
é¿å½","AE","UAE"],coordinates:[24.4539,54.3773]},"ð¦ð«":{en:"Afghanistan",zh:"é¿å¯æ±",aliases:["af","afghanistan","é¿å¯æ±","AF"],coordinates:[34.5553,69.2075]},"ð¦ð¬":{en:"Antigua and Barbuda",zh:"宿çåå·´å¸è¾¾",aliases:["ag","antigua","宿ç","å®å°å¡åå·´å¸é","AG"],coordinates:[17.0608,-61.7964]},"ð¦ð®":{en:"Anguilla",zh:"å®åæ",aliases:["ai","anguilla","å®åæ","AI"],coordinates:[18.2206,-63.0686]},"ð¦ð±":{en:"Albania",zh:"é¿å°å·´å°¼äº",aliases:["al","albania","é¿å°å·´å°¼äº","é¿ç¾å·´å°¼äº","AL"],coordinates:[41.3275,19.8187]},"ð¦ð²":{en:"Armenia",zh:"äºç¾å°¼äº",aliases:["am","armenia","äºç¾å°¼äº","äºç¾å°¼äº","AM"],coordinates:[40.1792,44.4991]},"ð¦ð´":{en:"Angola",zh:"å®å¥æ",aliases:["ao","angola","å®å¥æ","AO"],coordinates:[-8.839,13.2894]},"ð¦ð¶":{en:"Antarctica",zh:"åææ´²",aliases:["aq","antarctica","åææ´²","忥µæ´²","AQ"],coordinates:[-90,0]},"ð¦ð¸":{en:"American Samoa",zh:"ç¾å±è¨æ©äº",aliases:["as","american samoa","ç¾å±è¨æ©äº","ç¾å±¬è©æ©äº","AS"],coordinates:[-14.271,-170.1322]},"ð¦ð¼":{en:"Aruba",zh:"é¿é²å·´",aliases:["aw","aruba","é¿é²å·´","é¿é¯å·´","AW"],coordinates:[12.5211,-69.9683]},"ð¦ð½":{en:"Ã
land Islands",zh:"奥å
°ç¾¤å²",aliases:["ax","aland","奥å
°","奧è","AX"],coordinates:[60.1785,20.2173]},"ð¦ð¿":{en:"Azerbaijan",zh:"é¿å¡æç",aliases:["az","azerbaijan","é¿å¡æç","äºå¡æç¶","AZ"],coordinates:[40.4093,49.8671]},"ð§ð¦":{en:"Bosnia and Herzegovina",zh:"æ³¢é»",aliases:["ba","bosnia","æ³¢é»","波士尼äºè赫å¡å¥ç¶ç´","BA"],coordinates:[43.8563,18.4131]},"ð§ð©":{en:"Bangladesh",zh:"åå æå½",aliases:["bd","bangladesh","åå æ","åå æå","BD"],coordinates:[23.8103,90.4125]},"ð§ð":{en:"Bahrain",zh:"å·´æ",aliases:["bh","bahrain","å·´æ","BH"],coordinates:[26.2235,50.583]},"ð§ð®":{en:"Burundi",zh:"å¸é迪",aliases:["bi","burundi","å¸é迪","è²éå°","BI"],coordinates:[-3.3731,29.9189]},"ð§ð±":{en:"Saint Barthélemy",zh:"å£å·´æ³°åç±³",aliases:["bl","st barts","å£å·´æ³°åç±³","èå·´çç±³","BL"],coordinates:[17.9,-62.8333]},"ð§ð²":{en:"Bermuda",zh:"ç¾æ
大",aliases:["bm","bermuda","ç¾æ
大","BM"],coordinates:[32.3078,-64.7505]},"ð§ð¶":{en:"Caribbean Netherlands",zh:"è·å
°å 忝åº",aliases:["bq","bonaire","è·å
°å 忝","è·å±¬å 忝","BQ"],coordinates:[12.2019,-68.2625]},"ð§ð¹":{en:"Bhutan",zh:"ä¸ä¸¹",aliases:["bt","bhutan","ä¸ä¸¹","BT"],coordinates:[27.5142,90.4336]},"ð§ð»":{en:"Bouvet Island",zh:"å¸é¦å²",aliases:["bv","bouvet","å¸é¦å²","å¸å¨å³¶","BV"],coordinates:[-54.4208,3.3464]},"ð§ð¾":{en:"Belarus",zh:"ç½ä¿ç½æ¯",aliases:["by","belarus","ç½ä¿ç½æ¯","ç½ä¿ç¾
æ¯","BY"],coordinates:[53.9045,27.5615]},"ð¨ð¨":{en:"Cocos Islands",zh:"ç§ç§æ¯ç¾¤å²",aliases:["cc","cocos","ç§ç§æ¯","CC"],coordinates:[-12.1642,96.871]},"ð¨ð°":{en:"Cook Islands",zh:"åºå
群å²",aliases:["ck","cook","åºå
","庫å
","CK"],coordinates:[-21.2367,-159.7777]},"ð¨ðµ":{en:"Clipperton Island",zh:"å
å©çé¡¿å²",aliases:["cp","clipperton","å
å©çé¡¿","CP"],
131coordinates:[10.3,-109.2167]},"ð¨ð»":{en:"Cape Verde",zh:"ä½å¾è§",aliases:["cv","cape verde","ä½å¾è§","ç¶å¾·è§","CV"],coordinates:[16.5388,-23.0418]},"ð¨ð¼":{en:"Curaçao",zh:"åºæç´¢",aliases:["cw","curacao","åºæç´¢","庫æç´¢","CW"],coordinates:[12.1696,-68.99]},"ð¨ð½":{en:"Christmas Island",zh:"å£è¯å²",aliases:["cx","christmas","å£è¯å²","èèªå³¶","CX"],coordinates:[-10.4475,105.6904]},"ð¨ð¾":{en:"Cyprus",zh:"塿µ¦è·¯æ¯",aliases:["cy","cyprus","塿µ¦è·¯æ¯","è³½æ®åæ¯","CY"],coordinates:[35.1264,33.4299]},"ð©ð¬":{en:"Diego Garcia",zh:"迪æå 西äºå²",aliases:["dg","diego garcia","迪æå 西äº","DG"],coordinates:[-7.3195,72.4229]},"ð©ð¯":{en:"Djibouti",zh:"å叿",aliases:["dj","djibouti","å叿","åå¸å°","DJ"],coordinates:[11.5721,43.1456]},"ð©ð°":{en:"Denmark",zh:"丹麦",aliases:["dk","denmark","丹麦","丹麥","DK"],coordinates:[55.6761,12.5683]},"ð©ð²":{en:"Dominica",zh:"å¤ç±³å°¼å
",aliases:["dm","dominica","å¤ç±³å°¼å
","DM"],coordinates:[15.415,-61.371]},"ðªð¦":{en:"Ceuta & Melilla",zh:"ä¼è¾¾ä¸æ¢
å©å©äº",aliases:["ea","ceuta melilla","ä¼è¾¾","ä¼é","EA"],coordinates:[35.8894,-5.3213]},"ðªð":{en:"Western Sahara",zh:"西æåæ",aliases:["eh","western sahara","西æåæ","EH"],coordinates:[24.2155,-12.8858]},"ðªð·":{en:"Eritrea",zh:"åç«ç¹éäº",aliases:["er","eritrea","åç«ç¹éäº","åå©åäº","ER"],coordinates:[15.3229,38.9251]},"ðªðº":{en:"European Union",zh:"欧ç",aliases:["eu","europe","欧ç","æç","EU"],coordinates:[50.8503,4.3517]},"ð«ð¯":{en:"Fiji",zh:"ææµ",aliases:["fj","fiji","ææµ","ææ¿","FJ"],coordinates:[-18.1248,178.4501]},"ð«ð²":{en:"Micronesia",zh:"å¯å
ç½å°¼è¥¿äº",aliases:["fm","micronesia","å¯å
ç½å°¼è¥¿äº","å¯å
ç¾
尼西äº","FM"],coordinates:[6.9248,158.1611]},"ð«ð´":{en:"Faroe Islands",zh:"æ³ç½ç¾¤å²",aliases:["fo","faroe","æ³ç½","æ³ç¾
","FO"],coordinates:[62.0079,-6.7541]},"ð¬ð¦":{en:"Gabon",zh:"å è¬",aliases:["ga","gabon","å è¬","å å½","GA"],coordinates:[.3924,9.4553]},"ð¬ð©":{en:"Grenada",zh:"æ ¼æçº³è¾¾",aliases:["gd","grenada","æ ¼æçº³è¾¾","æ ¼çé£é","GD"],coordinates:[12.1165,-61.679]},"ð¬ðª":{en:"Georgia",zh:"æ ¼é²åäº",aliases:["ge","georgia","æ ¼é²åäº","嬿²»äº","GE"],coordinates:[41.7151,44.8271]},"ð¬ð¬":{en:"Guernsey",zh:"æ ¹è¥¿å²",aliases:["gg","guernsey","æ ¹è¥¿","æ ¹æ¯","GG"],coordinates:[49.4657,-2.5853]},"ð¬ð®":{en:"Gibraltar",zh:"ç´å¸ç½é",aliases:["gi","gibraltar","ç´å¸ç½é","GI"],coordinates:[36.1377,-5.3453]},"ð¬ð±":{en:"Greenland",zh:"æ ¼éµå
°",aliases:["gl","greenland","æ ¼éµå
°","æ ¼éµè","GL"],coordinates:[71.7069,-42.6043]},"ð¬ðµ":{en:"Guadeloupe",zh:"çå¾·ç½æ®",aliases:["gp","guadeloupe","çå¾·ç½æ®","çå°æ´æ®","GP"],coordinates:[16.265,-61.551]},"ð¬ð¶":{en:"Equatorial Guinea",zh:"赤éå å
äº",aliases:["gq","equatorial guinea","赤éå å
äº","赤éå¹¾å
§äº","GQ"],coordinates:[3.7504,8.7371]},"ð¬ð¸":{en:"South Georgia and South Sandwich Islands",zh:"å乿²»äºååæ¡å¨å¥ç¾¤å²",aliases:["gs","south georgia","å乿²»äº","å嬿²»äº","åæ¡å¨å¥","GS"],coordinates:[-54.2806,-36.5079]},"ð¬ðº":{en:"Guam",zh:"å
³å²",aliases:["gu","guam","å
³å²","éå³¶","GU"],coordinates:[13.4443,144.7937]},"ðð²":{en:"Heard & McDonald Islands",zh:"赫德å²å麦å
å纳群å²",aliases:["hm","heard mcdonald","赫德å²","HM"],coordinates:[-53.0818,73.5042]},"ð®ð¨":{en:"Canary Islands",zh:"å é£å©ç¾¤å²",aliases:["ic","canary","å é£å©","IC"],coordinates:[28.2916,-16.6291]},"ð®ðª":{en:"Ireland",zh:"ç±å°å
°",aliases:["ie","ireland","ç±å°å
°","æç¾è","IE"],coordinates:[53.4129,-8.2439]},"ð®ð±":{en:"Israel",zh:"以è²å",aliases:["il","israel","以è²å","IL"],coordinates:[31.7683,35.2137]},"ð®ð²":{en:"Isle of Man",zh:"马æ©å²",aliases:["im","isle of man","马æ©å²","æ¼å³¶","IM"],coordinates:[54.2361,-4.5481]},"ð®ð´":{en:"British Indian Ocean Territory",zh:"è±å±å°åº¦æ´é¢å°",aliases:["io","british indian ocean","è±å±å°åº¦æ´","IO"],coordinates:[-6.3432,71.8765]},"ð®ð¶":{en:"Iraq",zh:"伿å
",aliases:["iq","iraq","伿å
","IQ"],coordinates:[33.3152,44.3661]},"ð®ð·":{en:"Iran",zh:"伿",aliases:["ir","iran","伿","IR"],coordinates:[35.6892,51.389]},"ð®ð¸":{en:"Iceland",zh:"å°å²",aliases:["is","iceland","å°å²","å°å³¶","IS"],coordinates:[64.1466,-21.9426]},"ð¯ðª":{en:"Jersey",zh:"泽西å²",aliases:["je","jersey","泽西","澤西","JE"],coordinates:[49.2144,-2.1313]},"ð¯ð´":{en:"Jordan",zh:"约æ¦",aliases:["jo","jordan","约æ¦","ç´æ¦","JO"],coordinates:[31.9454,35.9284]},"ð°ð¬":{en:"Kyrgyzstan",zh:"åå°åæ¯æ¯å¦",aliases:["kg","kyrgyzstan","å
131å°åæ¯","åç¾åæ¯","KG"],coordinates:[42.8746,74.5698]},"ð°ð®":{en:"Kiribati",zh:"åºéå·´æ¯",aliases:["ki","kiribati","åºéå·´æ¯","åéå·´æ¯","KI"],coordinates:[1.8739,-157.363]},"ð°ð²":{en:"Comoros",zh:"ç§æ©ç½",aliases:["km","comoros","ç§æ©ç½","èæ©","KM"],coordinates:[-11.875,43.8722]},"ð°ð³":{en:"Saint Kitts & Nevis",zh:"å£åºè¨å尼维æ¯",aliases:["kn","st kitts nevis","å£åºè¨","èå
鿝å¤ç¦åå°¼ç¶æ¯","KN"],coordinates:[17.3578,-62.783]},"ð°ðµ":{en:"North Korea",zh:"æé²",aliases:["kp","north korea","dprk","æé²","åé","KP"],coordinates:[39.0392,125.7625]},"ð°ð¼":{en:"Kuwait",zh:"ç§å¨ç¹",aliases:["kw","kuwait","ç§å¨ç¹","KW"],coordinates:[29.3759,47.9774]},"ð°ð¾":{en:"Cayman Islands",zh:"弿¼ç¾¤å²",aliases:["ky","cayman","弿¼","éæ¼","KY"],coordinates:[19.3133,-81.2546]},"ð°ð¿":{en:"Kazakhstan",zh:"åè¨å
æ¯å¦",aliases:["kz","kazakhstan","åè¨å
","åè©å
","KZ"],coordinates:[51.1605,71.4704]},"ð±ð§":{en:"Lebanon",zh:"é»å·´å«©",aliases:["lb","lebanon","é»å·´å«©","LB"],coordinates:[33.8886,35.4955]},"ð±ð¨":{en:"Saint Lucia",zh:"å£å¢è¥¿äº",aliases:["lc","st lucia","å£å¢è¥¿äº","èé²è¥¿äº","LC"],coordinates:[13.9094,-60.9789]},"ð±ð®":{en:"Liechtenstein",zh:"忝æ¦å£«ç»",aliases:["li","liechtenstein","忝æ¦å£«ç»","LI"],coordinates:[47.141,9.5209]},"ð±ð°":{en:"Sri Lanka",zh:"æ¯éå
°å¡",aliases:["lk","sri lanka","æ¯éå
°å¡","æ¯éèå¡","LK"],coordinates:[6.9271,79.8612]},"ð±ð¸":{en:"Lesotho",zh:"è±ç´¢æ",aliases:["ls","lesotho","è±ç´¢æ","è³´ç´¢æ","LS"],coordinates:[-29.61,28.2336]},"ð±ðº":{en:"Luxembourg",zh:"墿£®å ¡",aliases:["lu","luxembourg","墿£®å ¡","ç§æ£®å ¡","LU"],coordinates:[49.6116,6.1319]},"ð²ð¨":{en:"Monaco",zh:"æ©çº³å¥",aliases:["mc","monaco","æ©çº³å¥","æ©ç´å¥","MC"],coordinates:[43.7384,7.4246]},"ð²ð©":{en:"Moldova",zh:"æ©å°å¤ç¦",aliases:["md","moldova","æ©å°å¤ç¦","æ©ç¾å¤ç¦","MD"],coordinates:[47.0105,28.8638]},"ð²ðª":{en:"Montenegro",zh:"é»å±±",aliases:["me","montenegro","é»å±±","èç¹å
§å¥ç¾
","ME"],coordinates:[42.4304,19.2594]},"ð²ð«":{en:"Saint Martin",zh:"æ³å±å£é©¬ä¸",aliases:["mf","st martin","å£é©¬ä¸","è馬ä¸","MF"],coordinates:[18.0708,-63.0501]},"ð²ð¬":{en:"Madagascar",zh:"é©¬è¾¾å æ¯å ",aliases:["mg","madagascar","é©¬è¾¾å æ¯å ","馬éå æ¯å ","MG"],coordinates:[-18.7669,46.8691]},"ð²ð":{en:"Marshall Islands",zh:"马ç»å°ç¾¤å²",aliases:["mh","marshall","马ç»å°","馬紹ç¾","MH"],coordinates:[7.1315,171.1845]},"ð²ð°":{en:"North Macedonia",zh:"å马å
¶é¡¿",aliases:["mk","macedonia","马å
¶é¡¿","å馬å
¶é ","MK"],coordinates:[41.9981,21.4254]},"ð²ð³":{en:"Mongolia",zh:"èå¤",aliases:["mn","mongolia","èå¤","MN"],coordinates:[47.9213,106.9055]},"ð²ðµ":{en:"Northern Mariana Islands",zh:"å马éäºçº³ç¾¤å²",aliases:["mp","northern mariana","å马éäºçº³","å馬å©å®ç´","MP"],coordinates:[15.0979,145.6739]},"ð²ð¶":{en:"Martinique",zh:"马æå°¼å
",aliases:["mq","martinique","马æå°¼å
","馬ä¸å°¼å
","MQ"],coordinates:[14.6415,-61.0242]},"ð²ð·":{en:"Mauritania",zh:"æ¯éå¡å°¼äº",aliases:["mr","mauritania","æ¯éå¡å°¼äº","è
å©å¡å°¼äº","MR"],coordinates:[18.0735,-15.9582]},"ð²ð¸":{en:"Montserrat",zh:"èç¹å¡æç¹",aliases:["ms","montserrat","èç¹å¡æç¹","èå²è","MS"],coordinates:[16.7425,-62.1874]},"ð²ð¹":{en:"Malta",zh:"马è³ä»",aliases:["mt","malta","马è³ä»","馬ç¾ä»","MT"],coordinates:[35.8997,14.5146]},"ð²ðº":{en:"Mauritius",zh:"æ¯éæ±æ¯",aliases:["mu","mauritius","æ¯éæ±æ¯","模é西æ¯","MU"],coordinates:[-20.3484,57.5522]},"ð²ð»":{en:"Maldives",zh:"马å°ä»£å¤«",aliases:["mv","maldives","马å°ä»£å¤«","馬ç¾å°å¤«","MV"],coordinates:[4.1755,73.5093]},"ð²ð¼":{en:"Malawi",zh:"马æç»´",aliases:["mw","malawi","马æç»´","馬æå¨","MW"],coordinates:[-13.9626,33.7741]},"ð²ð¿":{en:"Mozambique",zh:"è«æ¡æ¯å
",aliases:["mz","mozambique","è«æ¡æ¯å
","è«ä¸æ¯å
","MZ"],coordinates:[-25.9653,32.5832]},"ð³ð¨":{en:"New Caledonia",zh:"æ°åéå¤å°¼äº",aliases:["nc","new caledonia","æ°åéå¤å°¼äº","æ°åéå¤å°¼äº","NC"],coordinates:[-21.1151,165.856]},"ð³ð«":{en:"Norfolk Island",zh:"诺ç¦å
å²",aliases:["nf","norfolk","诺ç¦å
","諾ç¦å
","NF"],coordinates:[-29.0408,167.9547]},"ð³ðµ":{en:"Nepal",zh:"å°¼æ³å°",aliases:["np","nepal","å°¼æ³å°","å°¼æ³ç¾","NP"],coordinates:[27.7172,85.324]},"ð³ð·":{en:"Nauru",zh:"çé²",aliases:["nr","nauru","çé²","諾é¯","NR"],coordinates:[-.5477,166.9209]},"ð³ðº":{en:"Niue",zh:"纽å",aliases:["nu","niue","纽å","ç´å","NU"],coordinates:[-19.0544,-169.8672]},"ð³ð¿":{en:"New Zealand",zh:"æ°è¥¿å
°",aliases:["nz","new zealand","æ°è¥¿å
°","ç´è¥¿è","NZ"],coordinates:[-40.9006,174.886]},"ð´ð²":{en:"Oman",zh:"é¿æ¼",aliases:["om","oman","é¿æ¼","OM"],coordinates:[21.5126,55.9233]},"ðµð«":{en:"French Polynesia",zh:"æ³å±æ³¢å©å°¼è¥¿äº",aliases:["pf","french polynesia","æ³å±æ³¢å©å°¼è¥¿äº","æ³å±¬ç»é尼西äº","PF"],coordinates:[-17.6797,-149.4068]},"ðµð¬":{en:"Papua New Guinea",zh:"å·´å¸äºæ°å å
äº",aliases:["pg","papua new guinea","å·´å¸äºæ°å å
äº","å·´å¸äºç´å¹¾å
§äº","PG"],coordinates:[-9.4438,147.1803]},"ðµð°":{en:"Pakistan",zh:"å·´åºæ¯å¦",aliases:["pk","pakistan","å·´åºæ¯å¦","PK"],coordinates:[33.6844,73.0479]},"ðµð²":{en:"Saint Pierre & Miquelon",zh:"å£ç®åå°åå¯å
é",aliases:["pm","st pierre miquelon","å£ç®åå°","èç®åç¾åå¯å
é","PM"],coordinates:[46.8852,-56.3159]},"ðµð³":{en:"Pitcairn Islands",zh:"ç®ç¹å¯æ©ç¾¤å²",aliases:["pn","pitcairn","ç®ç¹å¯æ©","ç®ç¹è¯ç¾¤å³¶","PN"],coordinates:[-25.0657,-130.1005]},"ðµð·":{en:"Puerto Rico",zh:"æ³¢å¤é»å",aliases:["pr","puerto rico","æ³¢å¤é»å","PR"],coordinates:[18.4655,-66.1057]},"ðµð¸":{en:"Palestine",zh:"巴忝å¦",aliases:["ps","palestine","巴忝å¦","PS"],coordinates:[31.9474,35.2272]},"ðµð¼":{en:"Palau",zh:"å¸å³",aliases:["pw","palau","å¸å³","å¸ç","PW"],coordinates:[7.515,134.5825]},"ð¶ð¦":{en:"Qatar",zh:"å¡å¡å°",aliases:["qa","qatar","å¡å¡å°","å¡é","QA"],coordinates:[25.2867,51.531]},"ð·ðª":{en:"Réunion",zh:"ç尼汪",aliases:["re","reunion","ç尼汪","çå°¼æº","RE"],coordinates:[-21.1151,55.5364]},"ð·ð¸":{en:"Serbia",zh:"å¡å°ç»´äº",aliases:["rs","serbia","å¡å°ç»´äº","å¡ç¾ç¶äº","RS"],coordinates:[44.8125,20.4612]},"ð¸ð¦":{en:"Saudi Arabia",zh:"æ²ç¹é¿æä¼¯",aliases:["sa","saudi","æ²ç¹","æ²çå°é¿æä¼¯","SA"],coordinates:[24.7136,46.6753]},"ð¸ð§":{en:"Solomon Islands",zh:"æç½é¨ç¾¤å²",aliases:["sb","solomon","æç½é¨","ç´¢ç¾
é群島","SB"],coordinates:[-9.6457,160.1562]},"ð¸ð¨":{en:"Seychelles",zh:"å¡èå°",aliases:["sc","seychelles","å¡èå°","å¡å¸ç¾","SC"],coordinates:[-4.6796,55.492]},"ð¸ð":{en:"Saint Helena",zh:"å£èµ«åæ¿",aliases:["sh","st helena","å£èµ«åæ¿","èæµ·å«å¨","SH"],coordinates:[-15.9387,-5.7089]},"ð¸ð¯":{en:"Svalbard & Jan Mayen",zh:"æ¯ç¦å°å·´åæ¬é©¬å»¶",aliases:["sj","svalbard","æ¯ç¦å°å·´","æ¯ç¦ç¾å·´","SJ"],coordinates:[78.2232,15.6468]},"ð¸ð²":{en:"San Marino",zh:"å£é©¬å诺",aliases:["sm","san marino","å£é©¬å诺","è馬å©è«¾","SM"],coordinates:[43.9333,12.4463]},"ð¸ð´":{en:"Somalia",zh:"索马é",aliases:["so","somalia","索马é","索馬å©äº","SO"],coordinates:[2.0469,45.3182]},"ð¸ð¹":{en:"São Tomé & PrÃncipe",zh:"å£å¤ç¾åæ®æè¥¿æ¯",aliases:["st","sao tome","å£å¤ç¾","èå¤ç¾æ®æè¥¿æ¯","ST"],coordinates:[.3365,6.7313]},"ð¸ð½":{en:"Sint Maarten",zh:"è·å±å£é©¬ä¸",aliases:["sx","sint maarten","è·å±å£é©¬ä¸","è·å±¬è馬ä¸","SX"],coordinates:[18.0425,-63.0548]},"ð¸ð¾":{en:"Syria",zh:"åå©äº",aliases:["sy","syria","åå©äº","æå©äº","SY"],coordinates:[33.5138,36.2765]},"ð¸ð¿":{en:"Eswatini",zh:"æ¯å¨å£«å
°",aliases:["sz","swaziland","eswatini","æ¯å¨å£«å
°","å²ç¦å¸å°¼","SZ"],coordinates:[-26.3054,31.1367]},"ð¹ð¦":{en:"Tristan da Cunha",zh:"ç¹éæ¯å¦-è¾¾åºå°¼äº",aliases:["ta","tristan da cunha","ç¹éæ¯å¦","TA"],coordinates:[-37.1052,-12.2777]},"ð¹ð¨":{en:"Turks & Caicos Islands",zh:"ç¹å
æ¯åå¯ç§æ¯ç¾¤å²",aliases:["tc","turks caicos","ç¹å
æ¯","åå
å±å¯ç¾¤å³¶","TC"],coordinates:[21.694,-71.7979]},"ð¹ð«":{en:"French Southern Territories",zh:"æ³å±åé¨é¢å°",aliases:["tf","french southern","æ³å±åé¨","æ³å±¬åé¨é å","TF"],coordinates:[-49.2804,69.3486]},"ð¹ð¯":{en:"Tajikistan",zh:"å¡åå
æ¯å¦",aliases:["tj","tajikistan","å¡åå
","å¡åå
","TJ"],coordinates:[38.5598,68.787]},"ð¹ð°":{en:"Tokelau",zh:"æå
å³",aliases:["tk","tokelau","æå
å³","TK"],coordinates:[-9.2005,-171.8484]},"ð¹ð±":{en:"Timor-Leste",zh:"ä¸å¸æ±¶",aliases:["tl","timor leste","east timor","ä¸å¸æ±¶","æ±å¸æ±¶","TL"],coordinates:[-8.5569,125.5603]},"ð¹ð²":{en:"Turkmenistan",zh:"ååºæ¼æ¯å¦",aliases:["tm","turkmenistan","ååºæ¼","å庫æ¼","TM"],coordinates:[37.9601,58.3261]},"ð¹ð´":{en:"Tonga",zh:"汤å ",aliases:["to","tonga","汤å ","æ±å ","TO"],coordinates:[-21.179,-175.1982]},"ð¹ð»":{en:"Tuvalu",zh:"å¾ç¦å¢",aliases:["tv","tuvalu","å¾ç¦å¢","åç¦é¯","TV"],coordinates:[-8.5243,179.1942]},"ðºð¦":{en:"Ukraine",zh:"ä¹å
å
°",aliases:["ua","ukraine","ä¹å
å
°","çå
è","UA"],coordinates:[50.4501,30.5234]},"ðºð²":{en:"U.S. Minor Outlying Islands",zh:"ç¾å½æ¬åå¤å°å²å±¿",aliases:["um","us minor islands","ç¾å½å°å²","UM"],coordinates:[19.2823,166.647]},"ðºð³":{en:"United Nations",zh:"èåå½",aliases:["un","united nations","èåå½","è¯åå","UN"],coordinates:[40.7489,-73.968]},"ðºð¿":{en:"Uzbekistan",zh:"ä¹å
¹å«å
æ¯å¦",aliases:["uz","uzbekistan","ä¹å
¹å«å
","çè²å¥å
","UZ"],coordinates:[41.2995,69.2401
131]},"ð»ð¦":{en:"Vatican City",zh:"梵èå",aliases:["va","vatican","梵èå","梵諦岡","VA"],coordinates:[41.9029,12.4534]},"ð»ð¨":{en:"Saint Vincent & Grenadines",zh:"å£ææ£®ç¹åæ ¼æçº³ä¸æ¯",aliases:["vc","st vincent","å£ææ£®ç¹","èææ£®åæ ¼çé£ä¸","VC"],coordinates:[13.2528,-61.1971]},"ð»ð¬":{en:"British Virgin Islands",zh:"è±å±ç»´å°äº¬ç¾¤å²",aliases:["vg","british virgin","è±å±ç»´å°äº¬","è±å±¬ç¶äº¬ç¾¤å³¶","VG"],coordinates:[18.4207,-64.64]},"ð»ð®":{en:"U.S. Virgin Islands",zh:"ç¾å±ç»´å°äº¬ç¾¤å²",aliases:["vi","us virgin","ç¾å±ç»´å°äº¬","ç¾å±¬ç¶äº¬ç¾¤å³¶","VI"],coordinates:[18.3358,-64.8963]},"ð»ðº":{en:"Vanuatu",zh:"ç¦åªé¿å¾",aliases:["vu","vanuatu","ç¦åªé¿å¾","è¬é£æ","VU"],coordinates:[-17.7333,168.3273]},"ð¼ð«":{en:"Wallis & Futuna",zh:"ç¦å©æ¯åå¯å¾çº³",aliases:["wf","wallis futuna","ç¦å©æ¯","ç¦å©æ¯åå¯åç´","WF"],coordinates:[-13.2825,-176.1764]},"ð¼ð¸":{en:"Samoa",zh:"è¨æ©äº",aliases:["ws","samoa","è¨æ©äº","è©æ©äº","WS"],coordinates:[-13.8484,-171.7518]},"ð½ð°":{en:"Kosovo",zh:"ç§ç´¢æ²",aliases:["xk","kosovo","ç§ç´¢æ²","XK"],coordinates:[42.6026,20.903]},"ð¾ðª":{en:"Yemen",zh:"ä¹é¨",aliases:["ye","yemen","ä¹é¨","èé","YE"],coordinates:[15.3694,44.191]},"ð¾ð¹":{en:"Mayotte",zh:"马约ç¹",aliases:["yt","mayotte","马约ç¹","馬ç´ç¹","YT"],coordinates:[-12.8275,45.1662]}},rc=(r,o)=>{const a=o.toLowerCase().trim();if(r===o)return!0;const c=_s[r];return c?c.en.toLowerCase().includes(a)||c.zh.includes(a)?!0:c.aliases.some(u=>u.toLowerCase().includes(a)):r.toLowerCase().includes(a)},oc=r=>{const o=_s[r];return o==null?void 0:o.coordinates};class ys{constructor(o=100){Hn(this,"cache");Hn(this,"maxSize");this.cache=new Map,this.maxSize=o}get(o){const a=this.cache.get(o);return a!==void 0&&(this.cache.delete(o),this.cache.set(o,a)),a}set(o,a){if(this.cache.has(o))this.cache.delete(o);else if(this.cache.size>=this.maxSize){const c=this.cache.keys().next().value;c!==void 0&&this.cache.delete(c)}this.cache.set(o,a)}clear(){this.cache.clear()}}const ac=new ys(200),lc=new ys(200),cc=new ys(200);function je(r,o=!1,a=2){let c,u;o?(c=lc,u=r.toString()):a!==2?(c=cc,u=`${r}_${a}`):(c=ac,u=r.toString());let f=c.get(u);return f===void 0&&(f=nn(r,o,a),c.set(u,f)),f}function hc({className:r,...o}){return n.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:n.jsx("table",{"data-slot":"table",className:ri("w-full caption-bottom text-sm",r),...o,style:{backgroundColor:"var(--accent-1)"}})})}function uc({className:r,...o}){return n.jsx("thead",{"data-slot":"table-header",className:ri("[&_tr]:border-b",r),style:{backgroundColor:"var(--accent-2)"},...o})}function dc({className:r,...o}){return n.jsx("tbody",{"data-slot":"table-body",className:ri("[&_tr:last-child]:border-0",r),...o})}function qn({className:r,...o}){return n.jsx("tr",{"data-slot":"table-row",className:ri("transition-colors border-b border-[var(--accent-2)] hover:bg-[var(--accent-2)] data-[state=selected]:bg-[var(--accent-3)]",r),...o})}function it({className:r,...o}){return n.jsx("th",{"data-slot":"table-head",className:ri("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-[var(--accent-12)] [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",r),style:{backgroundColor:"var(--accent-4)"},...o})}function Ye({className:r,...o}){return n.jsx("td",{"data-slot":"table-cell",className:ri("p-2 align-middle whitespace-nowrap text-[var(--accent-12)] [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",r),...o})}function nt({up:r,down:o,className:a,align:c="start"}){const u={start:"items-start",center:"items-center",end:"items-end"}[c];return n.jsxs("div",{className:`flex flex-col gap-0 ${u} ${a}`,children:[n.jsx("label",{className:"text-base font-bold",children:r}),n.jsx("label",{className:"text-sm text-muted-foreground -mt-1",children:o})]})}const fc=({uuid:r,gap:o,align:a})=>{var _,z,O,x,S,B,v;const{t:c}=dt(),{nodeList:u}=Hr(),{live_data:f}=us(),d=u==null?void 0:u.find(W=>W.uuid===r);return n.jsxs("div",{className:`flex flex-wrap gap-${o??"4"} max-w-180 basis-full justify-center ${a==="center"?"justify-between":""}`,children:[n.jsx(nt,{className:"md:w-128 flex-[0_0_calc(50%-0.5rem)]",up:"CPU",down:`${d==null?void 0:d.cpu_name}
131 (x${d==null?void 0:d.cpu_cores})`}),n.jsxs("label",{className:`flex flex-wrap gap-2 gap-x-8 flex-[0_0_calc(50%-0.5rem)] ${a==="center"?"justify-end":""}`,children:[n.jsx(nt,{up:c("nodeCard.arch"),down:(d==null?void 0:d.arch)??"Unknown"}),n.jsx(nt,{up:c("nodeCard.virtualization"),align:a==="center"?"end":"start",down:(d==null?void 0:d.virtualization)??"Unknown"})]}),n.jsx(nt,{up:"GPU",down:(d==null?void 0:d.gpu_name)??"Unknown",className:"flex-[0_0_calc(50%-0.5rem)]"}),n.jsx(nt,{className:"md:w-64 w-full flex-[0_0_calc(50%-0.5rem)]",up:c("nodeCard.os"),align:a==="center"?"end":"start",down:(d==null?void 0:d.os)??"Unknown"}),n.jsx(nt,{className:"md:w-64 w-full flex-[0_0_calc(50%-0.5rem)]",up:c("nodeCard.kernelVersion"),align:a==="center"?"end":"start",down:(d==null?void 0:d.kernel_version)??"Unknown"}),n.jsx(nt,{className:"md:w-64 w-full flex-[0_0_calc(50%-0.5rem)]",up:c("nodeCard.networkSpeed"),down:` â ${Ge(((_=f==null?void 0:f.data.data[r??""])==null?void 0:_.network.up)||0)}/s 132 â 133 ${Ge(((z=f==null?void 0:f.data.data[r??""])==null?void 0:z.network.down)||0)}/s`}),n.jsx(nt,{up:c("nodeCard.totalTraffic"),align:a==="center"?"end":"start",className:"flex-[0_0_calc(50%-0.5rem)]",down:`â 134 ${Ge(((O=f==null?void 0:f.data.data[r??""])==null?void 0:O.network.totalUp)||0)} 135 â 136 ${Ge(((x=f==null?void 0:f.data.data[r??""])==null?void 0:x.network.totalDown)||0)}`}),n.jsx(nt,{className:"md:w-70 w-full flex-[0_0_calc(50%-0.5rem)]",up:c("nodeCard.ram"),down:Ge((d==null?void 0:d.mem_total)||0)}),n.jsx(nt,{up:c("nodeCard.swap"),className:"flex-[0_0_calc(50%-0.5rem)]",align:a==="center"?"end":"start",down:Ge((d==null?void 0:d.swap_total)||0)}),n.jsx(nt,{className:"md:w-64 w-full flex-[0_0_calc(50%-0.5rem)]",up:c("nodeCard.disk"),down:Ge((d==null?void 0:d.disk_total)||0)}),n.jsx("div",{className:"flex-[0_0_calc(50%-0.5rem)]"}),n.jsx(nt,{up:c("nodeCard.uptime"),className:"flex-[0_0_calc(50%-0.5rem)]",down:(S=f==null?void 0:f.data.data[r??""])!=null&&S.uptime?fs((B=f==null?void 0:f.data.data[r??""])==null?void 0:B.uptime,c):"-"}),n.jsx("label",{className:`flex flex-wrap gap-2 flex-[0_0_calc(50%-0.5rem)] ${a==="center"?"justify-end":""}`,children:n.jsxs(T,{align:"center",gap:"2",children:[n.jsx(b,{size:"2",weight:"bold",wrap:"nowrap",children:c("nodeCard.last_updated")}),n.jsx(b,{size:"2",children:d!=null&&d.updated_at?new Date(((v=f==null?void 0:f.data.data[r??""])==null?void 0:v.updated_at)||d.updated_at).toLocaleString():"-"})]})})]})};function ni(r){"@babel/helpers - typeof";return ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ni(r)}function mc(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}function pc(r,o){for(var a=0;a<o.length;a++){var c=o[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(r,so(c.key),c)}}function gc(r,o,a){return o&&pc(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r}function _c(r,o,a){return o=an(o),yc(r,io()?Reflect.construct(o,a||[],an(r).constructor):o.apply(r,a))}function yc(r,o){if(o&&(ni(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vc(r)}function vc(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function io(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(io=function(){return!!r})()}function an(r){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},an(r)}function xc(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(o&&o.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),o&&as(r,o)}
vendor: 10,103 bytes, line 136
136function as(r,o){return as=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,u){return c.__proto__=u,c},as(r,o)}function no(r,o,a){return o=so(o),o in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a,r}function so(r){var o=wc(r,"string");return ni(o)=="symbol"?o:o+""}function wc(r,o){if(ni(r)!="object"||!r)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var c=a.call(r,o);if(ni(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var hn=function(r){function o(){return mc(this,o),_c(this,o,arguments)}return xc(o,r),gc(o,[{key:"render",value:function(){return null}}])}(Ae.Component);no(hn,"displayName","ZAxis");no(hn,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var bc=["option","isActive"];function bi(){return bi=Object.assign?Object.assign.bind():function(r){for(var o=1;o<arguments.length;o++){var a=arguments[o];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(r[c]=a[c])}return r},bi.apply(this,arguments)}function jc(r,o){if(r==null)return{};var a=zc(r,o),c,u;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(r);for(u=0;u<f.length;u++)c=f[u],!(o.indexOf(c)>=0)&&Object.prototype.propertyIsEnumerable.call(r,c)&&(a[c]=r[c])}return a}function zc(r,o){if(r==null)return{};var a={};for(var c in r)if(Object.prototype.hasOwnProperty.call(r,c)){if(o.indexOf(c)>=0)continue;a[c]=r[c]}return a}function kc(r){var o=r.option,a=r.isActive,c=jc(r,bc);return typeof o=="string"?Ae.createElement(yr,bi({option:Ae.createElement(Na,bi({type:o},c)),isActive:a,shapeType:"symbols"},c)):Ae.createElement(yr,bi({option:o,isActive:a,shapeType:"symbols"},c))}function si(r){"@babel/helpers - typeof";return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},si(r)}function ji(){return ji=Object.assign?Object.assign.bind():function(r){for(var o=1;o<arguments.length;o++){var a=arguments[o];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(r[c]=a[c])}return r},ji.apply(this,arguments)}function Tr(r,o){var a=Object.keys(r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);o&&(c=c.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),a.push.apply(a,c)}return a}function rt(r){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{};o%2?Tr(Object(a),!0).forEach(function(c){Lt(r,c,a[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):Tr(Object(a)).forEach(function(c){Object.defineProperty(r,c,Object.getOwnPropertyDescriptor(a,c))})}return r}function Pc(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}function Nr(r,o){for(var a=0;a<o.length;a++){var c=o[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(r,oo(c.key),c)}}function Cc(r,o,a){return o&&Nr(r.prototype,o),a&&Nr(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r}function Sc(r,o,a){return o=ln(o),Tc(r,ro()?Reflect.construct(o,a||[],ln(r).constructor):o.apply(r,a))}function Tc(r,o){if(o&&(si(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nc(r)}function Nc(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function ro(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ro=function(){return!!r})()}function ln(r){return ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},ln(r)}function Lc(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(o&&o.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),o&&ls(r,o)}function ls(r,o){return ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,u){return c.__proto__=u,c},ls(r,o)}function Lt(r,o,a){return o=oo(o),o in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a,r}function oo(r){var o=Mc(r,"string");return si(o)=="symbol"?o:o+""}function Mc(r,o){if(si(r)!="object"||!r)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var c=a.call(r,o);if(si(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var un=function(r){function o(){var a;Pc(this,o);for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];return a=Sc(this,o,[].concat(u)),Lt(a,"state",{isAnimationFinished:!1}),Lt(a,"handleAnimationEnd",function(){a.setState({isAnimationFinished:!0})}),Lt(a,"handleAnimationStart",function(){a.setState({isAnimationFinished:!1})}),Lt(a,"id",Fa("recharts-scatter-")),a}return Lc(o,r),Cc(o,[{key:"renderSymbolsStatically",value:function(c){var u=this,f=this.props,d=f.shape,_=f.activeShape,z=f.activeIndex,O=Wn(this.props,!1);return c.map(function(x,S){var B=z===S,v=B?_:d,W=rt(rt({},O),x);return Ae.createElement(vi,ji({className:"recharts-scatter-symbol",key:"symbol-".concat(x==null?void 0:x.cx,"-").concat(x==null?void 0:x.cy,"-").concat(x==null?void 0:x.size,"-").concat(S)},La(u.props,x,S),{role:"img"}),Ae.createElement(kc,ji({option:v,isActive:B,key:"symbol-".concat(S)},W)))})}},{key:"renderSymbolsWithAnimation",value:function(){var c=this,u=this.props,f=u.points,d=u.isAnimationActive,_=u.animationBegin,z=u.animationDuration,O=u.animationEasing,x=u.animationId,S=this.state.prevPoints;return Ae.createElement(Ma,{begin:_,duration:z,isActive:d,easing:O,from:{t:0},to:{t:1},key:"pie-".concat(x),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(B){var v=B.t,W=f.map(function(C,R){var ie=S&&S[R];if(ie){var ne=Wi(ie.cx,C.cx),$=Wi(ie.cy,C.cy),ee=Wi(ie.size,C.size);return rt(rt({},C),{},{cx:ne(v),cy:$(v),size:ee(v)})}var ue=Wi(0,C.size);return rt(rt({},C),{},{size:ue(v)})});return Ae.createElement(vi,null,c.renderSymbolsStatically(W))})}},{key:"renderSymbols",value:function(){var c=this.props,u=c.points,f=c.isAnimationActive,d=this.state.prevPoints;return f&&u&&u.length&&(!d||!Ea(d,u))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(u)}},{key:"renderErrorBar",value:function(){var c=this.props.isAnimationActive;if(c&&!this.state.isAnimationFinished)return null;var u=this.props,f=u.points,d=u.xAxis,_=u.yAxis,z=u.children,O=Wr(z,Oa);return O?O.map(function(x,S){var B=x.props,v=B.direction,W=B.dataKey;return Ae.cloneElement(x,{key:"".concat(v,"-").concat(W,"-").concat(f[S]),data:f,xAxis:d,yAxis:_,layout:v==="x"?"vertical":"horizontal",dataPointFormatter:function(R,ie){return{x:R.cx,y:R.cy,value:v==="x"?+R.node.x:+R.node.y,errorVal:Vi(R,ie)}}})}):null}},{key:"renderLine",value:function(){var c=this.props,u=c.points,f=c.line,d=c.lineType,_=c.lineJointType,z=Wn(this.props,!1),O=Wn(f,!1),x,S;if(d==="joint")x=u.map(function($){return{x:$.cx,y:$.cy}});else if(d==="fitting"){var B=Aa(u),v=B.xmin,W=B.xmax,C=B.a,R=B.b,ie=function(ee){return C*ee+R};x=[{x:v,y:ie(v)},{x:W,y:ie(W)}]}var ne=rt(rt(rt({},z),{},{fill:"none",stroke:z&&z.fill},O),{},{points:x});return Ae.isValidElement(f)?S=Ae.cloneElement(f,ne):Ia(f)?S=f(ne):S=Ae.createElement(Ba,ji({},ne,{type:_})),Ae.createElement(vi,{className:"recharts-scatter-line",key:"recharts-scatter-line"},S)}},{key:"render",value:function(){var c=this.props,u=c.hide,f=c.points,d=c.line,_=c.className,z=c.xAxis,O=c.yAxis,x=c.left,S=c.top,B=c.width,v=c.height,W=c.id,C=c.isAnimationActive;if(u||!f||!f.length)return null;var R=this.state.isAnimationFinished,ie=Ra("recharts-scatter",_),ne=z&&z.allowDataOverflow,$=O&&O.allowDataOverflow,ee=ne||$,ue=ti(W)?this.id:W;return Ae.createElement(vi,{className:ie,clipPath:ee?"url(#clipPath-".concat(ue,")"):null},ne||$?Ae.createElement("defs",null,Ae.createElement("clipPath",{id:"clipPath-".concat(ue)},Ae.createElement("rect",{x:ne?x:x-B/2,y:$?S:S-v/2,width:ne?B:B*2,height:$?v:v*2}))):null,d&&this.renderLine(),this.renderErrorBar(),Ae.createElement(vi,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!C||R)&&Za.renderCallByParent(this.props,f))}}],[{key:"getDerivedStateFromProps",value:function(c,u){return c.animationId!==u.prevAnimationId?{prevAnimationId:c.animationId,curPoints:c.points,prevPoints:u.curPoints}:c.points!==u.curPoints?{curPoints:c.points}:null}}])}(E.PureComponent);Lt(un,"displayName","Scatter");Lt(un,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!$a.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});Lt(un,"getComposedData",function(r){var o=r.xAxis,a=r.yAxis,c=r.zAxis,u=r.item,f=r.displayedData,d=r.xAxisTicks,_=r.yAxisTicks,z=r.offset,O=u.props.tooltipType,x=Wr(u.props.children,Da),S=ti(o.dataKey)?u.props.dataKey:o.dataKey,B=ti(a.dataKey)?u.props.dataKey:a.dataKey,v=c&&c.dataKey,W=c?c.range:hn.defaultProps.range,C=W&&W[0],R=o.scale.bandwidth?o.scale.bandwidth():0,ie=a.scale.bandwidth?a.scale.bandwidth():0,ne=f.map(function($,ee){var ue=Vi($,S),Y=Vi($,B),y=!ti(v)&&Vi($,v)||"-",k=[{name:ti(o.dataKey)?u.props.name:o.name||o.dataKey,unit:o.unit||"",value:ue,payload:$,dataKey:S,type:O},{name:ti(a.dataKey)?u.props.name:a.name||a.dataKey,unit:a.unit||"",value:Y,payload:$,dataKey:B,type:O}];y!=="-"&&k.push({name:c.name||c.dataKey,unit:c.unit||"",value:y,payload:$,dataKey:v,type:O});var I=vr({axis:o,ticks:d,bandSize:R,entry:$,index:ee,dataKey:S}),Q=vr({axis:a,ticks:_,bandSize:ie,entry:$,index:ee,dataKey:B}),G=y!=="-"?c.scale(y):C,X=Math.sqrt(Math.max(G,0)/Math.PI);return rt(rt({},$),{},{cx:I,cy:Q,x:I-X,y:Q-X,xAxis:o,yAxis:a,zAxis:c,width:2*X,height:2*X,size:G,node:{x:ue,y:Y,z:y},tooltipPayload:k,tooltipPosition:{x:I,y:Q},payload:$},x&&x[ee]&&x[ee].props)});return rt({points:ne},z)});
136var Ec=Ha({chartName:"ComposedChart",GraphicalChild:[$t,xi,Wa,un],axisComponents:[{axisType:"xAxis",AxisComp:Gi},{axisType:"yAxis",AxisComp:Ki},{axisType:"zAxis",AxisComp:hn}],formatAxisMap:Ua});const Oc=({nodes:r,liveData:o})=>{const[a]=dt(),[c,u]=E.useState(new Set),[f,d]=E.useState({field:null,order:"default"}),_=v=>{u(W=>{const C=new Set(W);return C.has(v)?C.delete(v):C.add(v),C})},z=v=>W=>{W.preventDefault(),d(C=>{if(C.field===v){const R=C.order==="default"?"asc":C.order==="asc"?"desc":"default";return{field:R==="default"?null:v,order:R}}else return{field:v,order:"asc"}})},O=v=>f.field!==v?null:f.order==="asc"?n.jsx(qr,{size:14}):n.jsx(ps,{size:14}),x=o&&o.online?o.online:[],S=v=>{const W={cpu:{usage:0},ram:{used:0},disk:{used:0},network:{up:0,down:0,totalUp:0,totalDown:0},uptime:0};return o&&o.data&&o.data[v]||W},B=[...r].sort((v,W)=>{const C=x.includes(v.uuid),R=x.includes(W.uuid),ie=S(v.uuid),ne=S(W.uuid);if(!f.field||f.order==="default")return 0;let $=0;switch(f.field){case"name":$=v.name.localeCompare(W.name);break;case"os":$=v.os.localeCompare(W.os);break;case"status":$=Number(R)-Number(C);break;case"cpu":$=ie.cpu.usage-ne.cpu.usage;break;case"ram":{const ee=v.mem_total?ie.ram.used/v.mem_total*100:0,ue=W.mem_total?ne.ram.used/W.mem_total*100:0;$=ee-ue;break}case"disk":{const ee=v.disk_total?ie.disk.used/v.disk_total*100:0,ue=W.disk_total?ne.disk.used/W.disk_total*100:0;$=ee-ue;break}case"price":$=v.price-W.price;break;case"networkUp":$=ie.network.up-ne.network.up;break;case"networkDown":$=ie.network.down-ne.network.down;break;case"totalUp":$=ie.network.totalUp-ne.network.totalUp;break;case"totalDown":$=ie.network.totalDown-ne.network.totalDown;break;default:$=0}return f.order==="desc"?-$:$});return n.jsx("div",{className:"mx-4 overflow-x-auto rounded-xl node-table-container",children:n.jsxs(hc,{children:[n.jsx(uc,{children:n.jsxs(qn,{children:[n.jsx(it,{className:"w-[24px]"}),n.jsx(it,{className:"w-[200px] min-w-[150px] cursor-pointer hover:bg-accent-2 select-none",onClick:z("name"),title:a("nodeCard.sortTooltip"),children:n.jsxs(T,{align:"center",gap:"1",children:[a("nodeCard.name"),O("name")]})}),n.jsx(it,{className:"cursor-pointer hover:bg-accent-2 select-none",onClick:z("os"),title:a("nodeCard.sortTooltip"),children:n.jsxs(T,{align:"center",gap:"1",children:[a("nodeCard.os"),O("os")]})}),n.jsx(it,{className:"max-w-[128px] cursor-pointer hover:bg-accent-2 select-none",onClick:z("status"),title:a("nodeCard.sortTooltip"),children:n.jsxs(T,{align:"center",gap:"1",children:[a("nodeCard.status"),O("status")]})}),n.jsx(it,{className:"cursor-pointer hover:bg-accent-2 select-none",onClick:z("cpu"),title:a("nodeCard.sortTooltip"),children:n.jsxs(T,{align:"center",gap:"1",children:[a("nodeCard.cpu"),O("cpu")]})}),n.jsx(it,{className:"cursor-pointer hover:bg-accent-2 select-none",onClick:z("ram"),title:a("nodeCard.sortTooltip"),children:n.jsxs(T,{align:"center",gap:"1",children:[a("nodeCard.ram"),O("ram")]})}),n.jsx(it,{className:"cursor-pointer hover:bg-accent-2 select-none",onClick:z("disk"),title:a("nodeCard.sortTooltip"),children:n.jsxs(T,{align:"center",gap:"1",children:[a("nodeCard.disk"),O("disk")]})}),n.jsx(it,{className:"cursor-pointer hover:bg-accent-2 select-none",onClick:z("price"),title:a("nodeCard.sortTooltip"),children:n.jsxs(T,{align:"center",gap:"1",children:[a("nodeCard.price"),O("price")]})}),n.jsx(it,{className:"cursor-pointer hover:bg-accent-2 select-none text-center min-w-[80px]",onClick:z("networkUp"),title:a("nodeCard.sortTooltip"),children:n.jsxs(T,{align:"center",gap:"1",justify:"center",children:[a("nodeCard.networkUploadSpeed"),O("networkUp")]})}),n.jsx(it,{className:"cursor-pointer hover:bg-accent-2 select-none text-center min-w-[80px]",onClick:z("networkDown"),title:a("nodeCard.sortTooltip"),children:n.jsxs(T,{align:"center",gap:"1",justify:"center",children:[a("nodeCard.networkDownloadSpeed"),O("networkDown")]})}),n.jsx(it,{className:"cursor-pointer hover:bg-accent-2 select-none text-center min-w-[80px]",onClick:z("totalUp"),title:a("nodeCard.sortTooltip"),children:n.jsxs(T,{align:"center",gap:"1",justify:"center",children:[a("nodeCard.totalUpload"),O("totalUp")]})}),n.jsx(it,{className:"cursor-pointer hover:bg-accent-2 select-none text-center min-w-[80px]",onClick:z("totalDown"),title:a("nodeCard.sortTooltip"),children:n.jsxs(T,{align:"center",gap:"1",justify:"center",children:[a("nodeCard.totalDownload"),O("totalDown")]})})]})}),n.jsx(dc,{children:B.map(v=>{const W=x.includes(v.uuid),C=S(v.uuid),R=c.has(v.uuid),ie=v.mem_total?C.ram.used/v.mem_total*100:0,ne=v.disk_total?C.disk.used/v.disk_total*100:0;return n.jsxs(Ae.Fragment,{children:[n.jsxs(qn,{className:`hover:bg-accent-2 transition-colors duration-200 table-row-hover ${W?"":"node-card-offline"}`,onClick:()=>_(v.uuid),children:[n.jsx(Ye,{children:n.jsx("div",{className:"flex justify-center items-center",children:n.jsx(Ct,{variant:"ghost",size:"1",className:`expand-button ${R?"expanded":""}`,"aria-label":"Expand row",children:n.jsx(Yi,{size:16})})})}),n.jsx(Ye,{className:"node-name-cell",children:n.jsxs(T,{align:"center",gap:"1",children:[n.jsx(zi,{flag:v.region}),n.jsx(hs,{to:`/instance/${v.uuid}`,className:"hover:underline",onClick:$=>$.stopPropagation(),children:n.jsxs(T,{direction:"column",gap:"0",children:[n.jsx("label",{className:"max-w-[150px] font-bold text-lg truncate",children:v.name}),W?n.jsx("label",{className:"-mt-1 text-muted-foreground text-xs",children:fs(C.uptime,a)}):n.jsx("label",{className:"-mt-1 text-muted-foreground",children:"-"})]})})]})}),n.jsx(Ye,{className:"w-4",children:n.jsx("img",{src:ts(v.os),alt:v.os,className:"w-5 h-5 mr-2"})}),n.jsx(Ye,{children:n.jsxs(T,{direction:"row",justify:"start",align:"center",gap:"1",children:[n.jsx("div",{children:n.jsx(Pt,{color:W?"green":"red",variant:"soft",size:"1",children:a(W?"nodeCard.online":"nodeCard.offline")})}),C.message&&n.jsx(Va,{color:"var(--red-9)",children:C.message})]})}),n.jsx(Ye,{children:n.jsx("div",{className:"w-[100px]",children:n.jsx(Un,{label:"",value:C.cpu.usage,compact:!0})})}),n.jsx(Ye,{children:n.jsx("div",{className:"w-[100px]",children:n.jsx(Un,{label:"",value:ie,compact:!0})})}),n.jsx(Ye,{children:n.jsx("div",{className:"w-[100px]",children:n.jsx(Un,{label:"",value:ne,compact:!0})})}),n.jsx(Ye,{children:n.jsx(Ga,{price:v.price,billing_cycle:v.billing_cycle,expired_at:v.expired_at,currency:v.currency,gap:"1",tags:v.tags||""})}),n.jsx(Ye,{className:"text-center min-w-[80px]",children:n.jsxs("label",{children:["â",Ge(C.network.up),"/s"]})}),n.jsx(Ye,{className:"text-center min-w-[80px]",children:n.jsxs("label",{children:["â",Ge(C.network.down),"/s"]})}),n.jsx(Ye,{className:"text-center min-w-[80px]",children:Number(v.traffic_limit)>0&&v.traffic_limit_type?n.jsxs(T,{direction:"column",align:"center",gap:"0",children:[n.jsxs("label",{style:{color:(()=>{const $=qi(C.network.totalUp,C.network.totalDown,v.traffic_limit,v.traffic_limit_type);return $>90?"var(--red-9)":$>70?"var(--amber-9)":$>50?"var(--blue-9)":"var(--green-9)"})(),fontWeight:"bold"},children:[qi(C.network.totalUp,C.network.totalDown,v.traffic_limit,v.traffic_limit_type).toFixed(0),"%"]}),n.jsxs("label",{style:{fontSize:"11px",color:"var(--gray-10)"},children:["â",Ge(C.network.totalUp)]})]}):n.jsxs("label",{children:["â",Ge(C.network.totalUp)]})}),n.jsx(Ye,{className:"text-center min-w-[80px]",children:Number(v.traffic_limit)>0&&v.traffic_limit_type?n.jsxs(T,{direction:"column",align:"center",gap:"0",children:[n.jsx("label",{style:{color:(()=>{const $=qi(C.network.totalUp,C.network.totalDown,v.traffic_limit,v.traffic_limit_type);return $>90?"var(--red-9)":$>70?"var(--amber-9)":$>50?"var(--blue-9)":"var(--green-9)"})(),fontWeight:"bold"},children:Ge(v.traffic_limit||0)}),n.jsxs("label",{style:{fontSize:"11px",color:"var(--gray-10)"},children:["â",Ge(C.network.totalDown)]})]}):n.jsxs("label",{children:["â",Ge(C.network.totalDown)]})})]}
136),R&&n.jsx(qn,{className:"expanded-row",children:n.jsx(Ye,{colSpan:12,className:"bg-accent-1",children:n.jsx("div",{className:"expand-content",children:n.jsx(Ac,{node:v,nodeData:C})})})})]},v.uuid)})})]})})},Ac=({node:r})=>n.jsxs("div",{className:"p-4 space-y-4",children:[n.jsx(fc,{gap:"0",uuid:r.uuid}),n.jsx("div",{style:{minHeight:"400px"},children:n.jsx(Ka,{uuid:r.uuid})})]}),Ic=({basic:r,online:o=!1,errorMessage:a,children:c})=>{const{t:u}=dt(),f=E.useMemo(()=>{if(r.price===0)return"";if(r.price===-1)return u("common.free");const O=r.billing_cycle;let x="";return O>=27&&O<=32?x=u("common.monthly"):O>=87&&O<=95?x=u("common.quarterly"):O>=175&&O<=185?x=u("common.semi_annual"):O>=360&&O<=370?x=u("common.annual"):O>=720&&O<=750?x=u("common.biennial"):O>=1080&&O<=1150?x=u("common.triennial"):O===-1?x=u("common.once"):x=`${O} ${u("nodeCard.time_day")}`,`${r.currency||"¥"}${r.price}/${x}`},[r.price,r.billing_cycle,r.currency,u]),d=E.useMemo(()=>{if(!r.expired_at||r.price===0)return null;const O=new Date(r.expired_at),x=new Date,S=O.getTime()-x.getTime(),B=Math.ceil(S/(1e3*60*60*24));let v;B<=0||B<=7?v="red":B<=15?v="orange":v="green";let W;return B<=0?W=u("common.expired"):B>36500?W=u("common.long_term"):W=u("common.expired_in",{days:B}),{color:v,text:W}},[r.expired_at,r.price,u]),_=E.useMemo(()=>{const O=f.length+(d?d.text.length:0);return O>25?{scale:.7,fontSize:"text-[8px]",padding:"px-1 py-0"}:O>20?{scale:.75,fontSize:"text-[8px]",padding:"px-1 py-0"}:O>15?{scale:.85,fontSize:"text-[9px]",padding:"px-1 py-0"}:O>10?{scale:.9,fontSize:"text-[9px]",padding:"px-1 py-0"}:{scale:1,fontSize:"text-[9px]",padding:"px-1 py-0"}},[f,d]),z=E.useMemo(()=>({scale:.75,fontSize:"text-[11px]",padding:"px-1 py-0.5"}),[]);return n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none select-none",style:{zIndex:0,userSelect:"none"},"aria-hidden":"true",children:n.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 opacity-5",children:n.jsx(sn,{size:128})})}),n.jsxs(T,{direction:"column",gap:"3",className:"p-3 sm:p-4 relative",style:{zIndex:1},children:[n.jsx("div",{className:"block sm:hidden",children:n.jsxs(T,{direction:"column",gap:"1",children:[n.jsxs(T,{align:"center",className:"min-w-0",children:[n.jsx("div",{className:"relative flex-shrink-0 flex items-center mr-2",children:n.jsx(zi,{flag:r.region})}),n.jsx(T,{align:"center",gap:"1",className:"flex-1 min-w-0",children:n.jsx(b,{size:"2",weight:"bold",className:"text-accent-12 whitespace-nowrap flex-shrink-0",children:r.name})}),a&&n.jsx(xr,{content:a,children:n.jsx(Pt,{color:"red",variant:"soft",size:"1",className:"flex-shrink-0 ml-auto",children:n.jsx(Sr,{size:10})})})]}),(r.tags||f||d)&&n.jsxs("div",{className:"flex items-center gap-0.5 ml-7 min-h-[20px] modern-tags-mobile-wrap",style:{transform:`scale(${_.scale})`,transformOrigin:"left center",width:`calc((100% - 1.75rem) / ${_.scale})`,marginRight:"0.5rem"},children:[r.tags&&n.jsx(is,{tags:r.tags,scale:1,fontSize:_.fontSize,padding:_.padding}),f&&n.jsx(Pt,{color:"iris",variant:"soft",size:"1",className:`${_.fontSize} ${_.padding} whitespace-nowrap`,style:{lineHeight:"1.2"},children:f}),d&&n.jsx(Pt,{color:d.color,variant:"soft",size:"1",className:`${_.fontSize} ${_.padding} whitespace-nowrap`,style:{lineHeight:"1.2"},children:d.text})]}),!(r.tags||f||d)&&n.jsx("div",{className:"min-h-[20px]"}),n.jsxs(T,{gap:"1",align:"center",className:"min-w-0 ml-7",children:[o&&n.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full flex-shrink-0"}),n.jsx("img",{src:ts(r.os),alt:r.os,className:"w-3 h-3 opacity-70 flex-shrink-0"}),n.jsxs(b,{size:"1",color:"gray",className:"whitespace-nowrap text-[11px]",children:[wr(r.os)," ⢠",r.arch,r.virtualization&&` ⢠${r.virtualization}`]})]})]})}),n.jsx("div",{className:"hidden sm:block",children:n.jsxs(T,{direction:"column",gap:"2",children:[n.jsxs(T,{align:"center",className:"min-w-0",children:[n.jsx("div",{className:"relative flex-shrink-0 flex items-center mr-3",children:n.jsx(zi,{flag:r.region})}),n.jsx(T,{align:"center",gap:"2",className:"flex-1 min-w-0",children:n.jsx(b,{size:"3",weight:"bold",className:"text-accent-12 whitespace-nowrap flex-shrink-0",children:r.name})}),a&&n.jsx(xr,{content:a,children:n.jsx(Pt,{color:"red",variant:"soft",size:"1",className:"flex-shrink-0 ml-auto",children:n.jsx(Sr,{size:12})})})]}),(r.tags||f||d)&&n.jsxs("div",{className:"flex items-center gap-1 ml-10 min-h-[24px] overflow-hidden whitespace-nowrap",style:{transform:`scale(${z.scale})`,transformOrigin:"left center",width:`calc((100% - 2.5rem) / ${z.scale})`,maxWidth:`calc((100% - 2.5rem) / ${z.scale})`,marginRight:"0.5rem"},children:[r.tags&&n.jsx(is,{tags:r.tags,scale:1,fontSize:z.fontSize,padding:z.padding}),f&&n.jsx(Pt,{color:"iris",variant:"soft",size:"1",className:`${z.fontSize} ${z.padding} whitespace-nowrap`,style:{lineHeight:"1.2"},children:f}),d&&n.jsx(Pt,{color:d.color,variant:"soft",size:"1",className:`${z.fontSize} ${z.padding} whitespace-nowrap`,style:{lineHeight:"1.2"},children:d.text})]}),!(r.tags||f||d)&&n.jsx("div",{className:"min-h-[24px]"}),n.jsxs(T,{gap:"2",align:"center",className:"min-w-0 ml-10",children:[o&&n.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse flex-shrink-0"}),n.jsx("img",{src:ts(r.os),alt:r.os,className:"w-4 h-4 opacity-70 flex-shrink-0"}),n.jsxs(b,{size:"1",color:"gray",className:"whitespace-nowrap",children:[wr(r.os)," ⢠",r.arch,r.virtualization&&` ⢠${r.virtualization}`]})]})]})}),c]})]})},Bc=Ae.memo(Ic,(r,o)=>r.basic.uuid===o.basic.uuid&&r.basic.name===o.basic.name&&r.basic.price===o.basic.price&&r.basic.billing_cycle===o.basic.billing_cycle&&r.basic.expired_at===o.basic.expired_at&&r.basic.region===o.basic.region&&r.basic.os===o.basic.os&&r.basic.arch===o.basic.arch&&r.basic.virtualization===o.basic.virtualization&&r.online===o.online&&r.errorMessage===o.errorMessage),Rc=(r,o)=>{if(r==null)return o;if(typeof r=="boolean")return r;if(typeof r=="number")return r!==0;if(typeof r=="string"){const a=r.trim().toLowerCase();if(["true","1","yes","on"].includes(a))return!0;
136if(["false","0","no","off"].includes(a))return!1}return o},Zc=r=>{const o=Number(r);return!Number.isFinite(o)||o<=0?24:Math.min(168,Math.max(1,o))},Fc=r=>r===null?"var(--red-9)":r<100?"var(--green-9)":r<220?"var(--amber-9)":"var(--red-9)",$c=r=>r===null?"-":`${Math.round(r)} ms`,Dc=r=>r===null?"-":`${r.toFixed(1)}%`,Hc=({basic:r,live:o,online:a,forceShowTrafficText:c=!1,children:u})=>{var G,X,w,A;const{t:f}=dt(),{publicInfo:d}=cn(),_=Rc((G=d==null?void 0:d.theme_settings)==null?void 0:G.showModernPingStats,!0),z=Zc((X=d==null?void 0:d.theme_settings)==null?void 0:X.modernPingStatsHours),O=qa(_&&a?r.uuid:void 0,z),S=o||{cpu:{usage:0},ram:{used:0},load:{load1:0},disk:{used:0},network:{up:0,down:0,totalUp:0,totalDown:0},uptime:0},B=r.mem_total?S.ram.used/r.mem_total*100:0,v=r.disk_total?S.disk.used/r.disk_total*100:0,W=Ur(S.network.totalUp,S.network.totalDown,r.traffic_limit,r.traffic_limit_type),C=W.percentage,R=W.usage,ie=E.useMemo(()=>({ramTotal:je(r.mem_total,!1,1),ramTotalCompact:je(r.mem_total,!0),diskTotal:je(r.disk_total,!1,1),diskTotalCompact:je(r.disk_total,!0),trafficLimit:je(r.traffic_limit||0,!1,1),trafficLimitCompact:je(r.traffic_limit||0,!0)}),[r.mem_total,r.disk_total,r.traffic_limit]),ne=Z=>Z>90?"var(--red-9)":Z>70?"var(--amber-9)":Z>50?"var(--blue-9)":"var(--green-9)",$={cpu:ne(S.cpu.usage),memory:ne(B),disk:ne(v),traffic:ne(C)},ee=O.items[0],ue=(ee==null?void 0:ee.samples)??[],Y=ee?ee.loss??(ue.length?ue.filter(Z=>Z===null).length/ue.length*100:null):null,y=ue.length>0,k=_,I=()=>a?S.cpu.usage>90||B>90?"from-red-500/5 to-orange-500/5":S.cpu.usage>70||B>70?"from-orange-500/5 to-yellow-500/5":"from-green-500/5 to-emerald-500/5":"from-gray-500/5 to-gray-600/5",Q=()=>a?S.cpu.usage>90||B>90?"shadow-lg shadow-red-500/20":S.cpu.usage>70||B>70?"shadow-lg shadow-orange-500/20":"shadow-lg shadow-green-500/20":"";return n.jsxs(ut,{className:` 137 modern-card modern-card-hover modern-card-shadow 138 relative overflow-visible 139 bg-gradient-to-br ${I()} 140 border border-accent-5 hover:border-accent-8 141 cursor-pointer ${Q()} 142 h-full min-h-fit 143 ${a?"":"modern-card-offline"} 144 `,style:{transform:"scale(1)",transformOrigin:"center"},children:[n.jsx("div",{className:`absolute top-0 left-0 right-0 h-1 ${a?"modern-card-status-online":"modern-card-status-offline"}`,style:{boxShadow:a?"0 0 10px rgba(16, 185, 129, 0.5)":"none"}}),n.jsxs(T,{direction:"column",gap:"3",className:"p-3 sm:p-4 relative z-10",children:[u,n.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3 min-w-0 relative",children:[n.jsxs("div",{className:"modern-metric-tile bg-accent-2/50 rounded-lg sm:rounded-xl p-2 sm:p-3 border border-accent-4 hover:bg-accent-3/50 min-w-0",children:[n.jsxs(T,{justify:"between",align:"center",mb:"2",children:[n.jsxs(T,{gap:"1",align:"center",children:[n.jsx(ms,{size:14,className:"text-accent-10"}),n.jsx(b,{size:"1",weight:"medium",children:"CPU"})]}),n.jsxs(b,{size:"2",weight:"bold",style:{color:$.cpu},children:[S.cpu.usage.toFixed(1),"%"]})]}),n.jsx("div",{className:"w-full bg-accent-4 rounded-full h-2 overflow-hidden",children:n.jsx("div",{className:"usage-fill-modern h-full rounded-full relative",style:{"--progress-width":`${S.cpu.usage}%`,"--progress-color":$.cpu}})}),r.cpu_cores&&n.jsxs(b,{size:"1",color:"gray",className:"mt-1 hidden sm:block",children:[r.cpu_cores," Cores"]})]}),n.jsxs("div",{className:"modern-metric-tile bg-accent-2/50 rounded-lg sm:rounded-xl p-2 sm:p-3 border border-accent-4 hover:bg-accent-3/50 min-w-0",children:[n.jsxs(T,{justify:"between",align:"center",mb:"2",children:[n.jsxs(T,{gap:"1",align:"center",children:[n.jsx(Qr,{size:14,className:"text-accent-10"}),n.jsx(b,{size:"1",weight:"medium",children:"RAM"})]}),n.jsxs(b,{size:"2",weight:"bold",style:{color:$.memory},children:[B.toFixed(1),"%"]})]}),n.jsx("div",{className:"w-full bg-accent-4 rounded-full h-2 overflow-hidden",children:n.jsx("div",{className:"usage-fill-modern h-full rounded-full relative",style:{"--progress-width":`${B}%`,"--progress-color":$.memory}})}),n.jsx("div",{className:"mt-1 text-[10px] sm:text-sm whitespace-nowrap overflow-hidden",children:n.jsx("div",{className:"transform origin-left scale-[0.85] sm:scale-100 inline-block",children:n.jsxs(b,{size:"1",color:"gray",children:[n.jsxs("span",{className:"inline sm:hidden",children:[je(S.ram.used,!0),"/",ie.ramTotalCompact]}),n.jsxs("span",{className:"hidden sm:inline",children:[je(S.ram.used,!1,1)," / ",ie.ramTotal]})]})})})]}),n.jsxs("div",{className:"modern-metric-tile bg-accent-2/50 rounded-lg sm:rounded-xl p-2 sm:p-3 border border-accent-4 hover:bg-accent-3/50 min-w-0 flex flex-col gap-2 min-h-[9rem] sm:min-h-[10rem]",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs(T,{justify:"between",align:"center",mb:"1",children:[n.jsxs(T,{gap:"1",align:"center",children:[n.jsx(rn,{size:12,className:"text-accent-10"}),n.jsx(b,{size:"1",weight:"medium",className:"text-xs",children:"Disk"})]}),n.jsxs(b,{size:"1",weight:"bold",style:{color:$.disk},children:[v.toFixed(1),"%"]})]}),n.jsx("div",{className:"w-full bg-accent-4 rounded-full h-1.5 overflow-hidden",children:n.jsx("div",{className:"usage-fill-modern h-full rounded-full relative",style:{"--progress-width":`${v}%`,"--progress-color":$.disk}
144})}),n.jsx("div",{className:"mt-0.5 text-[10px] sm:text-xs whitespace-nowrap overflow-hidden",children:n.jsx("div",{className:"transform origin-left scale-[0.75] sm:scale-100 inline-block",children:n.jsxs(b,{size:"1",color:"gray",children:[n.jsxs("span",{className:"inline sm:hidden",children:[je(S.disk.used,!0),"/",ie.diskTotalCompact]}),n.jsxs("span",{className:"hidden sm:inline",children:[je(S.disk.used,!1,1)," / ",ie.diskTotal]})]})})})]}),n.jsx("div",{className:"w-full h-[1px] bg-accent-4"}),n.jsxs("div",{className:"flex-1 min-h-[4rem]",children:[n.jsxs(T,{justify:"between",align:"center",mb:"1",children:[n.jsxs(T,{gap:"1",align:"center",children:[n.jsx(Mt,{size:12,className:"text-accent-10"}),n.jsx(b,{size:"1",weight:"medium",className:"text-xs",children:"Traffic"})]}),Number(r.traffic_limit)>0&&!c&&r.traffic_limit_type&&n.jsxs(b,{size:"1",weight:"bold",style:{color:$.traffic},children:[C.toFixed(1),"%"]})]}),Number(r.traffic_limit)>0&&!c&&r.traffic_limit_type?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"w-full bg-accent-4 rounded-full h-1.5 overflow-hidden",children:n.jsx("div",{className:"usage-fill-modern h-full rounded-full relative",style:{"--progress-width":`${Math.min(C,100)}%`,"--progress-color":$.traffic}})}),n.jsx("div",{className:"mt-0.5 text-[10px] sm:text-xs whitespace-nowrap overflow-hidden",children:n.jsx("div",{className:"transform origin-left scale-[0.75] sm:scale-100 inline-block",children:n.jsxs(b,{size:"1",color:"gray",children:[n.jsxs("span",{className:"inline sm:hidden",children:[je(R,!0),"/",ie.trafficLimitCompact]}),n.jsxs("span",{className:"hidden sm:inline",children:[je(R,!1,1)," / ",ie.trafficLimit]})]})})})]}):n.jsx("div",{className:"mt-0.5 text-[10px] sm:text-xs whitespace-nowrap overflow-hidden",children:n.jsx("div",{className:"transform origin-left scale-[0.75] sm:scale-100 inline-block",children:n.jsxs(b,{size:"1",color:"gray",children:[n.jsxs("span",{className:"inline sm:hidden",children:["â",je(S.network.totalUp,!0)," â",je(S.network.totalDown,!0)]}),n.jsxs("span",{className:"hidden sm:inline",children:["â ",je(S.network.totalUp,!1,1)," â ",je(S.network.totalDown,!1,1)]})]})})})]})]}),n.jsxs("div",{className:"modern-metric-tile bg-accent-2/50 rounded-lg sm:rounded-xl p-2 sm:p-3 border border-accent-4 hover:bg-accent-3/50 min-w-0",children:[n.jsxs(T,{gap:"1",align:"center",mb:"2",children:[n.jsx(on,{size:14,className:"text-accent-10"}),n.jsx(b,{size:"1",weight:"medium",children:"Speed"})]}),n.jsxs(T,{direction:"column",gap:"1",className:"sm:gap-2",children:[n.jsxs(T,{justify:"between",align:"center",className:"modern-speed-row modern-speed-up bg-green-500/10 rounded px-1.5 sm:px-2 py-0.5 sm:py-1 min-w-0",children:[n.jsxs(T,{gap:"1",align:"center",children:[n.jsx(gs,{size:10,className:"sm:w-3 sm:h-3",style:{color:"var(--green-11)"}}),n.jsx(b,{size:"1",weight:"medium",className:"text-xs sm:text-sm hidden sm:inline",children:"Up"})]}),n.jsx("div",{className:"overflow-hidden",children:n.jsx("div",{className:"transform origin-right scale-[0.85] sm:scale-100 inline-block",children:n.jsxs(b,{size:"1",weight:"bold",className:"text-xs sm:text-sm whitespace-nowrap",style:{color:"var(--green-11)"},children:[n.jsxs("span",{className:"inline sm:hidden",children:[je(S.network.up,!0),"/s"]}),n.jsxs("span",{className:"hidden sm:inline",children:[je(S.network.up,!1,1),"/s"]})]})})})]}),n.jsxs(T,{justify:"between",align:"center",className:"modern-speed-row modern-speed-down bg-blue-500/10 rounded px-1.5 sm:px-2 py-0.5 sm:py-1 min-w-0",children:[n.jsxs(T,{gap:"1",align:"center",children:[n.jsx(eo,{size:10,className:"sm:w-3 sm:h-3",style:{color:"var(--blue-11)"}}),n.jsx(b,{size:"1",weight:"medium",className:"text-xs sm:text-sm hidden sm:inline",children:"Down"})]}),n.jsx("div",{className:"overflow-hidden",children:n.jsx("div",{className:"transform origin-right scale-[0.85] sm:scale-100 inline-block",children:n.jsxs(b,{size:"1",weight:"bold",className:"text-xs sm:text-sm whitespace-nowrap",style:{color:"var(--blue-11)"},children:[n.jsxs("span",{className:"inline sm:hidden",children:[je(S.network.down,!0),"/s"]}),n.jsxs("span",{className:"hidden sm:inline",children:[je(S.network.down,!1,1),"/s"]})]})})})]})]})]})]}),k&&n.jsxs("div",{className:`modern-ping-panel ${a&&y?"":"is-empty"}`,children:[n.jsxs(T,{justify:"between",align:"center",className:"modern-ping-header",children:[n.jsxs(T,{align:"center",gap:"2",children:[n.jsx(Mt,{size:13,className:"text-accent-10"}),n.jsx(b,{size:"1",weight:"medium",children:f("modernCard.pingStats",{defaultValue:"Ping Stats"})})]}),n.jsxs(b,{size:"1",color:"gray",className:"tabular-nums",children:[z,"h"]})]}),n.jsxs("div",{className:"modern-ping-grid",children:[n.jsxs("div",{className:"modern-ping-metric",children:[n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:f("modernCard.latency",{defaultValue:"Latency"})}),n.jsx(b,{size:"1",weight:"bold",className:"tabular-nums",children:O.loading&&!ee?"-":$c((ee==null?void 0:ee.current)??(ee==null?void 0:ee.avg)??null)})]}),n.jsx("div",{className:"modern-ping-bars","aria-hidden":"true",children:(y?ue:Array(18).fill(null)).map((Z,D)=>n.jsx("span",{className:y?"":"is-loading",style:{height:y?`${Math.min(18,Math.max(8,(Z??260)/16))}px`:void 0,backgroundColor:y?Fc(Z):void 0}},`latency-${D}`))})]}),n.jsxs("div",{className:"modern-ping-metric",children:[n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:f("modernCard.loss",{defaultValue:"Loss"})}),n.jsx(b,{size:"1",weight:"bold",className:"tabular-nums",children:O.loading&&!ee?"-":Dc(Y)})]}),n.jsx("div",{className:"modern-ping-bars","aria-hidden":"true",children:(y?ue:Array(18).fill(null)).map((Z,D)=>n.jsx("span",{className:y?"":"is-loading",style:{height:y?Z===null?"18px":"10px":void 0,backgroundColor:y?Z===null?"var(--red-9)":"var(--green-9)":void 0}},`loss-${D}`))})]})]})]}),n.jsxs(T,{justify:"between",align:"center",className:"pt-2 sm:pt-3 border-t border-accent-4",children:[n.jsx(T,{gap:"2 sm:gap-3",align:"center",className:"min-w-0 flex-1",children:n.jsxs(T,{gap:"1",align:"center",className:"min-w-0",children:[n.jsx(Bl,{size:10,
144className:"text-accent-10 sm:w-3 sm:h-3 flex-shrink-0"}),n.jsx("div",{className:"transform origin-left scale-[0.8] sm:scale-100 inline-block",children:n.jsx(b,{size:"1",color:"gray",className:"whitespace-nowrap",children:a?fs(S.uptime,f):f("nodeCard.offline")})})]})}),a&&n.jsxs(T,{gap:"2 sm:gap-3",align:"center",className:"flex-shrink-0",children:[n.jsxs(T,{gap:"1",align:"center",className:"min-w-0 mr-0 sm:mr-3",children:[n.jsx(to,{size:10,className:"sm:w-3 sm:h-3 flex-shrink-0",style:{color:"var(--amber-11)"}}),n.jsx("div",{className:"transform origin-left scale-[0.8] sm:scale-100 inline-block",children:n.jsxs(b,{size:"1",color:"gray",className:"whitespace-nowrap",children:["Load: ",((A=(w=S.load)==null?void 0:w.load1)==null?void 0:A.toFixed(2))||"0.00"]})})]}),n.jsxs(T,{gap:"1",align:"center",className:"flex-shrink-0",children:[n.jsx(Mt,{size:10,className:"sm:w-3 sm:h-3",style:{color:"var(--green-11)"}}),n.jsx("div",{className:"transform origin-right scale-[0.8] sm:scale-100 inline-block",children:n.jsx(b,{size:"1",weight:"medium",className:"whitespace-nowrap",style:{color:"var(--green-11)"},children:"Active"})})]})]})]})]})]})},Wc=Ae.memo(Hc,(r,o)=>{if(r.basic.uuid!==o.basic.uuid||r.basic.mem_total!==o.basic.mem_total||r.basic.disk_total!==o.basic.disk_total||r.basic.traffic_limit!==o.basic.traffic_limit||r.basic.traffic_limit_type!==o.basic.traffic_limit_type||r.basic.cpu_cores!==o.basic.cpu_cores||r.online!==o.online||r.forceShowTrafficText!==o.forceShowTrafficText)return!1;if(!r.live&&!o.live)return!0;if(!r.live||!o.live)return!1;const a=r.live,c=o.live;return a.cpu.usage===c.cpu.usage&&a.ram.used===c.ram.used&&a.disk.used===c.disk.used&&a.network.up===c.network.up&&a.network.down===c.network.down&&a.network.totalUp===c.network.totalUp&&a.network.totalDown===c.network.totalDown&&a.load.load1===c.load.load1&&a.uptime===c.uptime&&a.message===c.message}),Uc=({basic:r,live:o,online:a,forceShowTrafficText:c=!1})=>n.jsx(hs,{to:`/instance/${r.uuid}`,className:"modern-card-link h-full block",style:{contain:"layout style paint",contentVisibility:"auto",containIntrinsicSize:"auto 300px"},children:n.jsx(Wc,{basic:r,live:o,online:a,forceShowTrafficText:c,children:n.jsx(Bc,{basic:r,online:a,errorMessage:o==null?void 0:o.message})})}),ao=Uc,Vc=({basic:r,live:o,online:a,className:c,style:u})=>{var ie,ne,$,ee,ue,Y,y,k,I,Q,G,X,w,A,Z,D,K,J,he,U,re,te,me;const[f,d]=E.useState(!1),_=ds(),{t:z}=dt(),O=E.useMemo(()=>{if(r.price===0)return"";if(r.price===-1)return z("common.free");const H=r.billing_cycle;let le="";return H>=27&&H<=32?le=z("common.monthly"):H>=87&&H<=95?le=z("common.quarterly"):H>=175&&H<=185?le=z("common.semi_annual"):H>=360&&H<=370?le=z("common.annual"):H>=720&&H<=750?le=z("common.biennial"):H>=1080&&H<=1150?le=z("common.triennial"):H===-1?le=z("common.once"):le=`${H} ${z("nodeCard.time_day")}`,`${r.currency||"ï¿¥"}${r.price}/${le}`},[r.price,r.billing_cycle,r.currency,z]),x=E.useMemo(()=>{if(!r.expired_at||r.price===0)return null;const H=new Date(r.expired_at),le=new Date,fe=H.getTime()-le.getTime(),Pe=Math.ceil(fe/(1e3*60*60*24));let Te;Pe<=0||Pe<=7?Te="red":Pe<=15?Te="orange":Te="green";let Ne;return Pe<=0?Ne=z("common.expired"):Pe>36500?Ne=z("common.long_term"):Ne=z("common.expired_in",{days:Pe}),{color:Te,text:Ne}},[r.expired_at,r.price,z]),S=((ie=o==null?void 0:o.cpu)==null?void 0:ie.usage)??0,B=r.mem_total>0&&((ne=o==null?void 0:o.ram)!=null&&ne.used)?o.ram.used/r.mem_total*100:0,v=r.disk_total>0&&(($=o==null?void 0:o.disk)!=null&&$.used)?o.disk.used/r.disk_total*100:0,W=((ee=o==null?void 0:o.load)==null?void 0:ee.load1)??0,C=Ur(((ue=o==null?void 0:o.network)==null?void 0:ue.totalUp)??0,((Y=o==null?void 0:o.network)==null?void 0:Y.totalDown)??0,r.traffic_limit,r.traffic_limit_type),R=r.traffic_limit&&r.traffic_limit>0&&r.traffic_limit_type?{usage:C.usage,limit:r.traffic_limit,percentage:C.percentage}:null;return n.jsx(ut,{size:"2",className:`node-compact-card ${f?"expanded":""} ${a?"":"offline"} ${c||""}`,style:u,children:n.jsxs(T,{direction:"column",gap:"3",children:[n.jsxs("div",{children:[n.jsxs(T,{justify:"between",align:"center",children:[n.jsxs(T,{align:"center",gap:"3",children:[n.jsx("div",{className:`status-indicator ${a?"online":"offline"}`}
144),n.jsx(zi,{flag:r.region}),n.jsxs(T,{direction:"column",gap:"1",className:"relative",children:[n.jsx(hs,{to:`/instance/${r.uuid}`,className:"modern-card-link",children:n.jsx(b,{weight:"bold",size:"3",className:r.tags||O||x?"":"flex items-center",children:r.name})}),r.tags||O||x?n.jsxs("div",{className:"flex flex-wrap items-center gap-0.5",style:{transform:"scale(0.85)",transformOrigin:"left center"},children:[r.tags&&n.jsx(is,{tags:r.tags,scale:1,fontSize:"text-[10px]",padding:"px-1 py-0"}),O&&n.jsx(Pt,{color:"iris",variant:"soft",size:"1",className:"text-[10px] px-1 py-0 whitespace-nowrap",style:{lineHeight:"1.2"},children:O}),x&&n.jsx(Pt,{color:x.color,variant:"soft",size:"1",className:"text-[10px] px-1 py-0 whitespace-nowrap",style:{lineHeight:"1.2"},children:x.text})]}):null]})]}),n.jsx(Ct,{variant:"ghost",size:"1",className:"expand-button",onClick:()=>d(!f),children:f?n.jsx(qr,{size:16}):n.jsx(ps,{size:16})})]}),n.jsxs(T,{direction:"column",gap:"2",mt:"2",children:[n.jsxs(T,{align:"center",gap:"3",wrap:"wrap",className:"micro-dashboard",style:{cursor:"pointer"},onClick:()=>d(!f),children:[n.jsxs(T,{align:"center",gap:"1",title:"CPU Usage",children:[n.jsx(ms,{size:12}),n.jsxs(b,{size:"1",children:[_?S.toFixed(0):S.toFixed(2),"%"]})]}),n.jsxs(T,{align:"center",gap:"1",title:"Memory Usage",children:[n.jsx(Qr,{size:12}),n.jsxs(b,{size:"1",children:[_?B.toFixed(0):B.toFixed(2),"%"]})]}),n.jsxs(T,{align:"center",gap:"1",title:"Disk Usage",children:[n.jsx(rn,{size:12}),n.jsxs(b,{size:"1",children:[_?v.toFixed(0):v.toFixed(2),"%"]})]}),n.jsxs(T,{align:"center",gap:"1",title:`Load Average (1min): ${W.toFixed(2)}`,children:[n.jsx(Mt,{size:12}),n.jsx(b,{size:"1",children:_?W.toFixed(1):W.toFixed(2)})]})]}),n.jsxs(T,{align:"center",gap:"3",className:"overflow-x-auto",style:{cursor:"pointer",flexWrap:"nowrap"},onClick:()=>d(!f),children:[n.jsxs(T,{align:"center",gap:"1",title:"Network Speed",style:{flexShrink:0},children:[n.jsx(wl,{size:12}),n.jsxs(b,{size:"1",style:{whiteSpace:"nowrap"},children:["â",je(((y=o==null?void 0:o.network)==null?void 0:y.down)??0,_),"/s â",je(((k=o==null?void 0:o.network)==null?void 0:k.up)??0,_),"/s"]})]}),R&&n.jsxs(T,{align:"center",gap:"1",title:`Traffic: ${je(R.usage)} / ${je(R.limit)} (${R.percentage.toFixed(1)}%)`,style:{flexShrink:0},children:[n.jsx(Yr,{size:12}),n.jsxs(b,{size:"1",style:{whiteSpace:"nowrap"},children:[n.jsxs("span",{children:[_?R.percentage.toFixed(0):R.percentage.toFixed(1),"%"]}),n.jsxs("span",{style:{marginLeft:"4px"},children:[je(R.usage,_),"/",je(R.limit,_)]})]})]})]})]})]}),f&&n.jsx("div",{className:"expanded-content",children:n.jsxs("div",{className:"pt-3",style:{borderTop:"1px solid var(--gray-a5)",display:"grid",gridTemplateColumns:_?"1fr":"repeat(3, 1fr)",gridTemplateRows:_?"auto":"repeat(2, auto)",gap:_?"8px":"16px",marginTop:_?"8px":"12px"},children:[n.jsxs("div",{className:"p-2 bg-gray-a2 rounded",style:{minHeight:_?"100px":"120px"},children:[n.jsx(b,{size:"2",weight:"bold",color:"gray",className:_?"mb-1 block":"mb-2 block",children:"System"}),n.jsxs(T,{direction:"column",gap:"1",children:[n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"OS:"}),n.jsx(b,{size:"1",style:{textAlign:"right",maxWidth:"60%",overflow:_?"auto":"hidden",textOverflow:_?"unset":"ellipsis",wordBreak:_?"break-word":"normal"},children:r.os})]}),n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Arch:"}),n.jsx(b,{size:"1",children:r.arch})]}),r.virtualization&&n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Virt:"}),n.jsx(b,{size:"1",children:r.virtualization})]}),r.kernel_version&&!_&&n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Kernel:"}),n.jsx(b,{size:"1",style:{fontSize:"10px",textAlign:"right",maxWidth:"60%",overflow:_?"auto":"hidden",textOverflow:_?"unset":"ellipsis",wordBreak:_?"break-word":"normal"},children:r.kernel_version})]})]})]}),n.jsxs("div",{className:"p-2 bg-gray-a2 rounded",style:{minHeight:_?"100px":"120px"},children:[n.jsx(b,{size:"2",weight:"bold",color:"gray",className:_?"mb-1 block":"mb-2 block",children:"Hardware"}),n.jsxs(T,{direction:"column",gap:"1",children:[n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"CPU:"}),n.jsxs(b,{size:"1",title:r.cpu_name,style:{textAlign:"right",maxWidth:"60%",overflow:_?"auto":"hidden",textOverflow:_?"unset":"ellipsis",wordBreak:_?"break-word":"normal"},children:[r.cpu_cores," Cores"]})]}),n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Memory:"}),n.jsx(b,{size:"1",children:je(r.mem_total,_)})]}),n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Disk:"}),n.jsx(b,{size:"1",children:je(r.disk_total,_)})]}),r.gpu_name&&n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"GPU:"}),n.jsx(b,{size:"1",title:r.gpu_name,style:{fontSize:"10px",textAlign:"right",maxWidth:"60%",overflow:_?"auto":"hidden",textOverflow:_?"unset":"ellipsis",wordBreak:_?"break-word":"normal"},children:_?r.gpu_name:r.gpu_name.split(" ").slice(0,2).join(" ")})]})]})]}
144),n.jsxs("div",{className:"p-2 bg-gray-a2 rounded",style:{minHeight:_?"100px":"120px"},children:[n.jsx(b,{size:"2",weight:"bold",color:"gray",className:_?"mb-1 block":"mb-2 block",children:"Load & Process"}),o?n.jsxs(T,{direction:"column",gap:"1",children:[n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Load 1m:"}),n.jsx(b,{size:"1",weight:"bold",children:((Q=(I=o.load)==null?void 0:I.load1)==null?void 0:Q.toFixed(2))??"-"})]}),n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Load 5m:"}),n.jsx(b,{size:"1",weight:"bold",children:((X=(G=o.load)==null?void 0:G.load5)==null?void 0:X.toFixed(2))??"-"})]}),n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Load 15m:"}),n.jsx(b,{size:"1",weight:"bold",children:((A=(w=o.load)==null?void 0:w.load15)==null?void 0:A.toFixed(2))??"-"})]}),n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Process:"}),n.jsx(b,{size:"1",weight:"bold",children:o.process??0})]})]}):n.jsx(b,{size:"1",color:"gray",children:"No data"})]}),n.jsxs("div",{className:"p-2 bg-gray-a2 rounded",style:{minHeight:_?"100px":"120px"},children:[n.jsx(b,{size:"2",weight:"bold",color:"gray",className:_?"mb-1 block":"mb-2 block",children:"Resources"}),o?n.jsxs(T,{direction:"column",gap:"1",children:[n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Memory:"}),n.jsxs(b,{size:"1",children:[je(((Z=o.ram)==null?void 0:Z.used)??0,_),"/",je(r.mem_total,_)]})]}),r.swap_total>0&&n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Swap:"}),n.jsxs(b,{size:"1",children:[je(((D=o.swap)==null?void 0:D.used)??0,_),"/",je(r.swap_total,_)]})]}),n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Disk:"}),n.jsxs(b,{size:"1",children:[je(((K=o.disk)==null?void 0:K.used)??0,_),"/",je(r.disk_total,_)]})]}),n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"TCP/UDP:"}),n.jsxs(b,{size:"1",children:[((J=o.connections)==null?void 0:J.tcp)??0,"/",((he=o.connections)==null?void 0:he.udp)??0]})]})]}):n.jsx(b,{size:"1",color:"gray",children:"No data"})]}),n.jsxs("div",{className:"p-2 bg-gray-a2 rounded",style:{minHeight:_?"100px":"120px"},children:[n.jsx(b,{size:"2",weight:"bold",color:"gray",className:_?"mb-1 block":"mb-2 block",children:"Network"}),o?n.jsxs(T,{direction:"column",gap:"1",children:[n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Speed:"}),n.jsxs(T,{direction:"column",align:"end",gap:"0",children:[n.jsxs(b,{size:"1",style:{lineHeight:"1.2"},children:["â",je(((U=o==null?void 0:o.network)==null?void 0:U.down)??0,_),"/s"]}),n.jsxs(b,{size:"1",style:{lineHeight:"1.2"},children:["â",je(((re=o==null?void 0:o.network)==null?void 0:re.up)??0,_),"/s"]})]})]}),n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Total:"}),n.jsxs(T,{direction:"column",align:"end",gap:"0",children:[n.jsxs(b,{size:"1",style:{lineHeight:"1.2"},children:["â",je(((te=o==null?void 0:o.network)==null?void 0:te.totalDown)??0,_)]}),n.jsxs(b,{size:"1",style:{lineHeight:"1.2"},children:["â",je(((me=o==null?void 0:o.network)==null?void 0:me.totalUp)??0,_)]})]})]})]}):n.jsx(b,{size:"1",color:"gray",children:"No data"})]}),n.jsxs("div",{className:"p-2 bg-gray-a2 rounded",style:{minHeight:_?"100px":"120px"},children:[n.jsx(b,{size:"2",weight:"bold",color:"gray",className:_?"mb-1 block":"mb-2 block",children:"Status"}),o?n.jsxs(T,{direction:"column",gap:"1",children:[n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Uptime:"}),n.jsx(b,{size:"1",children:Ja(o.uptime,z)})]}),o.updated_at&&n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Updated:"}),n.jsx(b,{size:"1",children:new Date(o.updated_at).toLocaleTimeString()})]}),r.version&&n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Version:"}),n.jsx(b,{size:"1",children:r.version})]}),o.message&&n.jsxs(T,{justify:"between",align:"center",children:[n.jsx(b,{size:"1",color:"gray",children:"Message:"}),n.jsx(b,{size:"1",title:o.message,style:{fontSize:"10px",textAlign:"right",maxWidth:"60%",overflow:_?"auto":"hidden",textOverflow:_?"unset":"ellipsis",wordBreak:_?"break-word":"normal"},children:o.message})]})]}):n.jsx(b,{size:"1",color:"gray",children:"Offline"})]})]})})]})})},Ue={cpu:{key:"cpu",label:"CPU",unit:"%",color:"#3B82F6",max:100,category:"system"},gpu:{key:"gpu",label:"GPU",unit:"%",color:"#8B5CF6",max:100,category:"system"},ram:{key:"ram",label:"RAM",unit:"%",color:"#10B981",max:100,category:"system"},swap:{key:"swap",label:"Swap",unit:"%",color:"#14B8A6",max:100,category:"system"},load:{key:"load",label:"Load",unit:"",color:"#F59E0B",category:"system"},temp:{key:"temp",label:"Temperature",unit:"°C",color:"#EF4444",category:"system"},disk:{key:"disk",label:"Disk",unit:"%",color:"#6366F1",max:100,category:"storage"},net_in:{key:"net_in",label:"Download Speed",unit:"B/s",color:"#06B6D4",category:"network"},net_out:{key:"net_out",label:"Upload Speed",unit:"B/s",color:"#0EA5E9",category:"network"},net_total_up:{key:"net_total_up",label:"Upload Bandwidth",unit:"B",color:"#0284C7",category:"network"},net_total_down:{key:"net_total_down",label:"Download Bandwidth",unit:"B",color:"#0891B2",category:"network"},process:{key:"process",label:"Processes",unit:"",color:"#EC4899",category:"process"},connections:{key:"connections",label:"Connections",unit:"",color:"#F97316",category:"process"},tcp:{key:"tcp",label:"TCP Connections",unit:"",color:"#F97316",category:"process"}
144,udp:{key:"udp",label:"UDP Connections",unit:"",color:"#FB923C",category:"process"},net_total:{key:"net_total",label:"Total Speed",unit:"B/s",color:"#22C55E",category:"network"},net_bandwidth:{key:"net_bandwidth",label:"Total Bandwidth",unit:"B",color:"#84CC16",category:"network"},traffic_limit:{key:"traffic_limit",label:"Traffic Limit",unit:"%",color:"#F59E0B",max:100,category:"network"}},Gc=["net_in","net_out","net_total","net_total_up","net_total_down","net_bandwidth"];function Kc(r){return Gc.includes(r)}var Xi={exports:{}};/*! dom-to-image-more 08-05-2025 */var qc=Xi.exports,Lr;function Jc(){return Lr||(Lr=1,function(r,o){(a=>{let c=(()=>{let y=0;return{escape:function(w){return w.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")},isDataUrl:function(w){return w.search(/^(data:)/)!==-1},canvasToBlob:function(w){return w.toBlob?new Promise(function(A){w.toBlob(A)}):(A=>new Promise(function(Z){var D=v(A.toDataURL().split(",")[1]),K=D.length,J=new Uint8Array(K);for(let he=0;he<K;he++)J[he]=D.charCodeAt(he);Z(new Blob([J],{type:"image/png"}))}))(w)},resolveUrl:function(w,A){var Z=document.implementation.createHTMLDocument(),D=Z.createElement("base"),K=(Z.head.appendChild(D),Z.createElement("a"));return Z.body.appendChild(K),D.href=A,K.href=w,K.href},getAndEncode:function(w){let A=x.impl.urlCache.find(function(Z){return Z.url===w});return A||(A={url:w,promise:null},x.impl.urlCache.push(A)),A.promise===null&&(x.impl.options.cacheBust&&(w+=(/\?/.test(w)?"&":"?")+new Date().getTime()),A.promise=new Promise(function(Z){let D=x.impl.options.httpTimeout,K=new XMLHttpRequest;if(K.onreadystatechange=function(){if(K.readyState===4)if(300<=K.status)he?Z(he):U(`cannot fetch resource: ${w}, status: `+K.status);else{let re=new FileReader;re.onloadend=function(){Z(re.result)},re.readAsDataURL(K.response)}},K.ontimeout=function(){he?Z(he):U(`timeout of ${D}ms occured while fetching resource: `+w)},K.responseType="blob",K.timeout=D,0<x.impl.options.useCredentialsFilters.length&&(x.impl.options.useCredentials=0<x.impl.options.useCredentialsFilters.filter(re=>0<=w.search(re)).length),x.impl.options.useCredentials&&(K.withCredentials=!0),x.impl.options.corsImg&&w.indexOf("http")===0&&w.indexOf(window.location.origin)===-1){var J=(x.impl.options.corsImg.method||"GET").toUpperCase()==="POST"?"POST":"GET";K.open(J,(x.impl.options.corsImg.url||"").replace("#{cors}",w),!0);let re=!1,te=x.impl.options.corsImg.headers||{},me=(Object.keys(te).forEach(function(H){te[H].indexOf("application/json")!==-1&&(re=!0),K.setRequestHeader(H,te[H])}),(H=>{try{return JSON.parse(JSON.stringify(H))}catch(le){U("corsImg.data is missing or invalid:"+le.toString())}})(x.impl.options.corsImg.data||""));Object.keys(me).forEach(function(H){typeof me[H]=="string"&&(me[H]=me[H].replace("#{cors}",w))}),K.send(re?JSON.stringify(me):me)}else K.open("GET",w,!0),K.send();let he;function U(re){console.error(re),Z("")}x.impl.options.imagePlaceholder&&(J=x.impl.options.imagePlaceholder.split(/,/))&&J[1]&&(he=J[1])})),A.promise},uid:function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+y++},delay:function(w){return function(A){return new Promise(function(Z){setTimeout(function(){Z(A)},w)})}},asArray:function(w){var A=[],Z=w.length;for(let D=0;D<Z;D++)A.push(w[D]);return A},escapeXhtml:function(w){return w.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(w){return w!=="data:,"?new Promise(function(A,Z){let D=document.createElementNS("http://www.w3.org/2000/svg","svg"),K=new Image;x.impl.options.useCredentials&&(K.crossOrigin="use-credentials"),K.onload=function(){document.body.removeChild(D),window&&window.requestAnimationFrame?window.requestAnimationFrame(function(){A(K)}):A(K)},K.onerror=J=>{document.body.removeChild(D),Z(J)},D.appendChild(K),K.src=w,document.body.appendChild(D)}):Promise.resolve()},width:function(w){var A=X(w,"width");
144if(!isNaN(A))return A;var A=X(w,"border-left-width"),Z=X(w,"border-right-width");return w.scrollWidth+A+Z},height:function(w){var A=X(w,"height");if(!isNaN(A))return A;var A=X(w,"border-top-width"),Z=X(w,"border-bottom-width");return w.scrollHeight+A+Z},getWindow:k,isElement:G,isElementHostForOpenShadowRoot:function(w){return G(w)&&w.shadowRoot!==null},isShadowRoot:I,isInShadowRoot:Q,isHTMLElement:function(w){return w instanceof k(w).HTMLElement},isHTMLCanvasElement:function(w){return w instanceof k(w).HTMLCanvasElement},isHTMLInputElement:function(w){return w instanceof k(w).HTMLInputElement},isHTMLImageElement:function(w){return w instanceof k(w).HTMLImageElement},isHTMLLinkElement:function(w){return w instanceof k(w).HTMLLinkElement},isHTMLScriptElement:function(w){return w instanceof k(w).HTMLScriptElement},isHTMLStyleElement:function(w){return w instanceof k(w).HTMLStyleElement},isHTMLTextAreaElement:function(w){return w instanceof k(w).HTMLTextAreaElement},isShadowSlotElement:function(w){return Q(w)&&w instanceof k(w).HTMLSlotElement},isSVGElement:function(w){return w instanceof k(w).SVGElement},isSVGRectElement:function(w){return w instanceof k(w).SVGRectElement},isDimensionMissing:function(w){return isNaN(w)||w<=0}};function k(w){return w=w?w.ownerDocument:void 0,(w?w.defaultView:void 0)||window||a}function I(w){return w instanceof k(w).ShadowRoot}function Q(w){return w!=null&&w.getRootNode!==void 0&&I(w.getRootNode())}function G(w){return w instanceof k(w).Element}function X(w,A){if(w.nodeType===S){let Z=B(w).getPropertyValue(A);if(Z.slice(-2)==="px")return Z=Z.slice(0,-2),parseFloat(Z)}return NaN}})(),u=(()=>{let y=/url\((["']?)((?:\\?.)*?)\1\)/gm;return{inlineAll:function(X,w,A){return k(X)?Promise.resolve(X).then(I).then(function(Z){let D=Promise.resolve(X);return Z.forEach(function(K){D=D.then(function(J){return G(J,K,w,A)})}),D}):Promise.resolve(X)},shouldProcess:k,impl:{readUrls:I,inline:G,urlAsRegex:Q}};function k(X){return X.search(y)!==-1}function I(X){for(var w,A=[];(w=y.exec(X))!==null;)A.push(w[2]);return A.filter(function(Z){return!c.isDataUrl(Z)})}function Q(X){return new RegExp(`url\\((["']?)(${c.escape(X)})\\1\\)`,"gm")}function G(X,w,A,Z){return Promise.resolve(w).then(function(D){return A?c.resolveUrl(D,A):D}).then(Z||c.getAndEncode).then(function(D){var K=Q(w);return X.replace(K,`url($1${D}$1)`)})}})(),f={resolveAll:function(){return d().then(function(y){return Promise.all(y.map(function(k){return k.resolve()}))}).then(function(y){return y.join(` 145`)})},impl:{readAll:d}};function d(){return Promise.resolve(c.asArray(document.styleSheets)).then(function(k){let I=[];return k.forEach(function(Q){var G=Object.getPrototypeOf(Q);if(Object.prototype.hasOwnProperty.call(G,"cssRules"))try{c.asArray(Q.cssRules||[]).forEach(I.push.bind(I))}catch(X){console.error("domtoimage: Error while reading CSS rules from "+Q.href,X.toString())}}),I}).then(function(k){return k.filter(function(I){return I.type===CSSRule.FONT_FACE_RULE}).filter(function(I){return u.shouldProcess(I.style.getPropertyValue("src"))})}).then(function(k){return k.map(y)});function y(k){return{resolve:function(){var I=(k.parentStyleSheet||{}).href;return u.inlineAll(k.cssText,I)},src:function(){return k.style.getPropertyValue("src")}}}}let _={inlineAll:function y(k){if(!c.isElement(k))return Promise.resolve(k);return I(k).then(function(){return c.isHTMLImageElement(k)?z(k).inline():Promise.all(c.asArray(k.childNodes).map(function(Q){return y(Q)}))});function I(Q){let G=["background","background-image"],X=G.map(function(w){let A=Q.style.getPropertyValue(w),Z=Q.style.getPropertyPriority(w);return A?u.inlineAll(A).then(function(D){Q.style.setProperty(w,D,Z)}):Promise.resolve()});return Promise.all(X).then(function(){return Q})}},impl:{newImage:z}};function z(y){return{inline:function(k){return c.isDataUrl(y.src)?Promise.resolve():Promise.resolve(y.src).then(k||c.getAndEncode).then(function(I){return new Promise(function(Q){y.onload=Q,y.onerror=Q,y.src=I})})}}}let O={copyDefaultStyles:!0,imagePlaceholder:void 0,cacheBust:!1,useCredentials:!1,useCredentialsFilters:[],httpTimeout:3e4,styleCaching:"strict",corsImg:void 0},x={toSvg:W,toPng:function(y,k){return C(y,k).then(function(I){return I.toDataURL()})},toJpeg:function(y,k){return C(y,k).then(function(I){return I.toDataURL("image/jpeg",(k?k.quality:void 0)||1)})},toBlob:function(y,k){return C(y,k).then(c.canvasToBlob)},toPixelData:function(y,k){return C(y,k).then(function(I){return I.getContext("2d").getImageData(0,0,c.width(y),c.height(y)).data})},toCanvas:C,impl:{fontFaces:f,images:_,util:c,inliner:u,urlCache:[],options:{}}},S=(r.exports=x,(typeof Node<"u"?Node.ELEMENT_NODE:void 0)||1),B=(a!==void 0?a.getComputedStyle:void 0)||(typeof window<"u"?window.getComputedStyle:void 0)||globalThis.getComputedStyle,v=(a!==void 0?a.atob:void 0)||(typeof window<"u"?window.atob:void 0)||globalThis.atob;function W(y,k){x.impl.util.getWindow(y);var I=k=k||{};I.copyDefaultStyles===void 0?x.impl.options.copyDefaultStyles=O.copyDefaultStyles:x.impl.options.copyDefaultStyles=I.copyDefaultStyles,x.impl.options.imagePlaceholder=(I.imagePlaceholder===void 0?O:I).imagePlaceholder,x.impl.options.cacheBust=(I.cacheBust===void 0?O:I).cacheBust,x.impl.options.corsImg=(I.corsImg===void 0?O:I).cors
145Img,x.impl.options.useCredentials=(I.useCredentials===void 0?O:I).useCredentials,x.impl.options.useCredentialsFilters=(I.useCredentialsFilters===void 0?O:I).useCredentialsFilters,x.impl.options.httpTimeout=(I.httpTimeout===void 0?O:I).httpTimeout,x.impl.options.styleCaching=(I.styleCaching===void 0?O:I).styleCaching;let Q=[];return Promise.resolve(y).then(function(G){if(G.nodeType===S)return G;var X=G,w=G.parentNode,A=document.createElement("span");return w.replaceChild(A,X),A.append(G),Q.push({parent:w,child:X,wrapper:A}),A}).then(function(G){return function X(w,A,Z,D){let K=A.filter;if(w===R||c.isHTMLScriptElement(w)||c.isHTMLStyleElement(w)||c.isHTMLLinkElement(w)||Z!==null&&K&&!K(w))return Promise.resolve();return Promise.resolve(w).then(J).then(he).then(function(H){return te(H,re(w))}).then(U).then(function(H){return me(H,w)});function J(H){return c.isHTMLCanvasElement(H)?c.makeImage(H.toDataURL()):H.cloneNode(!1)}function he(H){return A.adjustClonedNode&&A.adjustClonedNode(w,H,!1),Promise.resolve(H)}function U(H){return A.adjustClonedNode&&A.adjustClonedNode(w,H,!0),Promise.resolve(H)}function re(H){return c.isElementHostForOpenShadowRoot(H)?H.shadowRoot:H}function te(H,le){let fe=Ne(le),Pe=Promise.resolve();if(fe.length!==0){let Se=B(Te(le));c.asArray(fe).forEach(function(Be){Pe=Pe.then(function(){return X(Be,A,Se).then(function(pe){pe&&H.appendChild(pe)})})})}return Pe.then(function(){return H});function Te(Se){return c.isShadowRoot(Se)?Se.host:Se}function Ne(Se){if(c.isShadowSlotElement(Se)){let Be=Se.assignedNodes();if(Be&&0<Be.length)return Be}return Se.childNodes}}function me(H,le){return!c.isElement(H)||c.isShadowSlotElement(le)?Promise.resolve(H):Promise.resolve().then(fe).then(Pe).then(Te).then(Ne).then(function(){return H});function fe(){function Se(pe,we){we.font=pe.font,we.fontFamily=pe.fontFamily,we.fontFeatureSettings=pe.fontFeatureSettings,we.fontKerning=pe.fontKerning,we.fontSize=pe.fontSize,we.fontStretch=pe.fontStretch,we.fontStyle=pe.fontStyle,we.fontVariant=pe.fontVariant,we.fontVariantCaps=pe.fontVariantCaps,we.fontVariantEastAsian=pe.fontVariantEastAsian,we.fontVariantLigatures=pe.fontVariantLigatures,we.fontVariantNumeric=pe.fontVariantNumeric,we.fontVariationSettings=pe.fontVariationSettings,we.fontWeight=pe.fontWeight}function Be(pe,we){let Ie=B(pe);Ie.cssText?(we.style.cssText=Ie.cssText,Se(Ie,we.style)):($(A,pe,Ie,Z,we),Z===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(Re=>we.style.removeProperty(Re)),["left","right","top","bottom"].forEach(Re=>{we.style.getPropertyValue(Re)&&we.style.setProperty(Re,"0px")})))}Be(le,H)}function Pe(){let Se=c.uid();function Be(pe){let we=B(le,pe),Ie=we.getPropertyValue("content");if(Ie!==""&&Ie!=="none"){let ft=function(){let ot=`.${Se}:`+pe,mt=(we.cssText?at:q)();return document.createTextNode(ot+`{${mt}}`);function at(){return`${we.cssText} content: ${Ie};`}function q(){return c.asArray(we).map(m).join("; ")+";";function m(g){let M=we.getPropertyValue(g),j=we.getPropertyPriority(g)?" !important":"";return g+": "+M+j}}},Re=H.getAttribute("class")||"",Xe=(H.setAttribute("class",Re+" "+Se),document.createElement("style"));Xe.appendChild(ft()),H.appendChild(Xe)}}[":before",":after"].forEach(function(pe){Be(pe)})}function Te(){c.isHTMLTextAreaElement(le)&&(H.innerHTML=le.value),c.isHTMLInputElement(le)&&H.setAttribute("value",le.value)}function Ne(){c.isSVGElement(H)&&(H.setAttribute("xmlns","http://www.w3.org/2000/svg"),c.isSVGRectElement(H))&&["width","height"].forEach(function(Se){let Be=H.getAttribute(Se);Be&&H.style.setProperty(Se,Be)})}}}(G,k,null)}).then(k.disableEmbedFonts?Promise.resolve(y):ie).then(ne).then(function(G){k.bgcolor&&(G.style.backgroundColor=k.bgcolor),k.width&&(G.style.width=k.width+"px"),k.height&&(G.style.height=k.height+"px"),k.style&&Object.keys(k.style).forEach(function(w){G.style[w]=k.style[w]});let X=null;return typeof k.onclone=="function"&&(X=k.onclone(G)),Promise.resolve(X).then(function(){return G})}).then(function(G){let X=k.width||c.width(G),w=k.height||c.height(G);
145return Promise.resolve(G).then(function(A){return A.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(A)}).then(c.escapeXhtml).then(function(A){var Z=(c.isDimensionMissing(X)?' width="100%"':` width="${X}"`)+(c.isDimensionMissing(w)?' height="100%"':` height="${w}"`);return`<svg xmlns="http://www.w3.org/2000/svg"${(c.isDimensionMissing(X)?"":` width="${X}"`)+(c.isDimensionMissing(w)?"":` height="${w}"`)}><foreignObject${Z}>${A}</foreignObject></svg>`}).then(function(A){return"data:image/svg+xml;charset=utf-8,"+A})}).then(function(G){for(;0<Q.length;){var X=Q.pop();X.parent.replaceChild(X.child,X.wrapper)}return G}).then(function(G){return x.impl.urlCache=[],R&&(document.body.removeChild(R),R=null),ee&&clearTimeout(ee),ee=setTimeout(()=>{ee=null,ue={}},2e4),G})}function C(y,k){return W(y,k=k||{}).then(c.makeImage).then(function(I){var Q=typeof k.scale!="number"?1:k.scale,G=((w,A)=>{let Z=k.width||c.width(w),D=k.height||c.height(w);return c.isDimensionMissing(Z)&&(Z=c.isDimensionMissing(D)?300:2*D),c.isDimensionMissing(D)&&(D=Z/2),(w=document.createElement("canvas")).width=Z*A,w.height=D*A,k.bgcolor&&((A=w.getContext("2d")).fillStyle=k.bgcolor,A.fillRect(0,0,w.width,w.height)),w})(y,Q),X=G.getContext("2d");return X.msImageSmoothingEnabled=!1,X.imageSmoothingEnabled=!1,I&&(X.scale(Q,Q),X.drawImage(I,0,0)),G})}let R=null;function ie(y){return f.resolveAll().then(function(k){var I;return k!==""&&(I=document.createElement("style"),y.appendChild(I),I.appendChild(document.createTextNode(k))),y})}function ne(y){return _.inlineAll(y).then(function(){return y})}function $(y,k,I,Q,G){let X=x.impl.options.copyDefaultStyles?((A,Z)=>{var D,K=(U=>(A.styleCaching!=="relaxed"?U:U.filter((re,te,me)=>te===0||te===me.length-1)).join(">"))(Z=(U=>{var re=[];do if(U.nodeType===S){var te=U.tagName;if(re.push(te),Y.includes(te))break}while(U=U.parentNode);return re})(Z));{if(ue[K])return ue[K];Z=((U,re)=>{let te=U.body;do{var me=re.pop(),me=U.createElement(me);te.appendChild(me),te=me}while(0<re.length);return te.textContent="â",te})((D=(()=>{if(R)return R.contentWindow;re=document.characterSet||"UTF-8",U=(U=document.doctype)?(`<!DOCTYPE ${Pe(U.name)} ${Pe(U.publicId)} `+Pe(U.systemId)).trim()+">":"",(R=document.createElement("iframe")).id="domtoimage-sandbox-"+c.uid(),R.style.visibility="hidden",R.style.position="fixed",document.body.appendChild(R);var U,re,te=R,me="domtoimage-sandbox";try{return te.contentWindow.document.write(U+`<html><head><meta charset='${re}'><title>${me}</title></head><body></body></html>`),te.contentWindow}catch{}var H=document.createElement("meta");H.setAttribute("charset",re);try{var le=document.implementation.createHTMLDocument(me),fe=(le.head.appendChild(H),U+le.documentElement.outerHTML);return te.setAttribute("srcdoc",fe),te.contentWindow}catch{}return te.contentDocument.head.appendChild(H),te.contentDocument.title=me,te.contentWindow;function Pe(Te){var Ne;return Te?((Ne=document.createElement("div")).innerText=Te,Ne.innerHTML):""}})()).document,Z),D=((U,re)=>{let te={},me=U.getComputedStyle(re);return c.asArray(me).forEach(function(H){te[H]=H==="width"||H==="height"?"auto":me.getPropertyValue(H)}),te})(D,Z);var J=Z;do{var he=J.parentElement;he!==null&&he.removeChild(J),J=he}while(J&&J.tagName!=="BODY");return ue[K]=D}})(y,k):{},w=G.style;c.asArray(I).forEach(function(A){var Z,D,K,J;y.filterStyles&&!y.filterStyles(k,A)||(D=I.getPropertyValue(A),K=X[A],Z=Q?Q.getPropertyValue(A):void 0,w.getPropertyValue(A))||(D!==K||Q&&D!==Z)&&(K=I.getPropertyPriority(A),Z=w,D=D,K=K,J=0<=["background-clip"].indexOf(A=A),K?(Z.setProperty(A,D,K),J&&Z.setProperty("-webkit-"+A,D,K)):(Z.setProperty(A,D),J&&Z.setProperty("-webkit-"+A,D)))})}let ee=null,ue={},Y=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"]})(qc)}(Xi)),Xi.exports}var Yc=Jc();const Mr=_l(Yc),kt=[{primary:"#3B82F6",secondary:"#60A5FA",gradient:{from:"#3B82F6",to:"#1E40AF"},shadow:"rgba(59, 130, 246, 0.4)",light:"#DBEAFE"},{primary:"#10B981",secondary:"#34D399",gradient:{from:"#10B981",to:"#047857"},shadow:"rgba(16, 185, 129, 0.4)",light:"#D1FAE5"},{primary:"#8B5CF6",secondary:"#A78BFA",gradient:{from:"#8B5CF6",to:"#6D28D9"},shadow:"rgba(139, 92, 246, 0.4)",light:"#EDE9FE"},{primary:"#F59E0B",secondary:"#FCD34D",gradient:{from:"#F59E0B",to:"#D97706"},shadow:"rgba(245, 158, 11, 0.4)",light:"#FEF3C7"},{primary:"#EF4444",secondary:"#F87171",gradient:{from:"#EF4444",to:"#B91C1C"},shadow:"rgba(239, 68, 68, 0.4)",light:"#FEE2E2"},{primary:"#14B8A6",secondary:"#5EEAD4",gradient:{from:"#14B8A6",to:"#0F766E"},shadow:"rgba(20, 184, 166, 0.4)",light:"#CCFBF1"},{primary:"#EC4899",secondary:"#F9A8D4",gradient:{from:"#EC4899",to:"#BE185D"},shadow:"rgba(236, 72, 153, 0.4)",light:"#FCE7F3"},{primary:"#6366F1",secondary:"#818CF8",gradient:{from:"#6366F1",to:"#4338CA"},shadow:"rgba(99, 102, 241, 0.4)",light:"#E0E7FF"}],Jn=r=>{switch(r){case"cpu":return n.jsx(ms,{size:16});case"gpu":return n.jsx(sn,{size:16});case"ram":return n.jsx(Jr,{size:16});case"swap":return n.jsx(rn,{size:16});case"load":return n.jsx(Yr,{size:16});case"temp":return n.jsx(Xl,{size:16});case"disk":return n.jsx(rn,{size:16});case"net_in":return n.jsx(Fl,{size:16});case"net_out":return n.jsx(nc,{size:16});case"net_total":return n.jsx(Mt,{size:16});case"net_total_up":return n.jsx(gs,{size:16});case"net_total_down":return n.jsx(eo,{size:16});case"net_bandwidth":return n.jsx(on,{size:16});case"traffic_limit":return n.jsx(Ll,{size:16});case"process":return n.jsx(sn,{size:16});case"connections":return n.jsx(Cr,{size:16});case"tcp":return n.jsx(Cr,{size:16});case"udp":return n.jsx(on,{size:16});default:return n.jsx(Mt,{size:16})}},vt=(r,o)=>{const a=Ue[o];return a?o==="net_in"||o==="net_out"||o==="net_total"?nn(r)+"/s":o==="net_total_up"||o==="net_total_down"||o==="net_bandwidth"?nn(r):o==="traffic_limit"?r.toFixed(1)+"%":o==="load"?r.toFixed(2):o==="temp"?r.toFixed(1)+a.unit:a.unit==="%"?r.toFixed(1)+"%":r.toFixed(0)+(a.unit||""):(console.warn(`No config found for metric: ${o}`),r.toFixed(1))},Xc=({nodes:r,liveData:o})=>{var q,ye;const{t:a}=dt(),{publicInfo:c}=cn(),u=(c==null?void 0:c.record_preserve_time)||0,f=(c==null?void 0:c.ping_record_preserve_time)||0,d=ds(),_=E.useRef(null),[z,O]=E.useState(!1),x=E.useMemo(()=>{const m=navigator.userAgent.toLowerCase();return m.includes("safari")&&!m.includes("chrome")&&!m.includes("android")},[]),S=E.useCallback(m=>{const g=r.findIndex(M=>M.uuid===m);return kt[g%kt.length]},[r]),B=()=>
145{if(v==="ping")return M=>`${M}ms`;if(y.length===0)return;const m=y.every(M=>["cpu","gpu","ram","disk","swap"].includes(M)),g=y.every(M=>["net_in","net_out","net_total","net_total_up","net_total_down","net_bandwidth"].includes(M));return m?M=>`${M}%`:g?M=>nn(M,!0)+(y.some(j=>["net_in","net_out","net_total"].includes(j))?"/s":""):y.includes("temp")?M=>`${M}°C`:y.includes("load")?M=>M.toFixed(2):M=>M.toFixed(0)},[v,W]=E.useState("load"),[C,R]=E.useState(null),[ie,ne]=E.useState([]),[$,ee]=E.useState({}),[ue,Y]=E.useState({}),[y,k]=E.useState(["cpu"]),[I,Q]=E.useState({}),[G,X]=E.useState({}),[w,A]=E.useState(!1),[Z,D]=E.useState(null),[K,J]=E.useState(!1),[he,U]=E.useState({}),[re,te]=E.useState("line"),[me,H]=E.useState(!0),le=E.useMemo(()=>(r||[]).map(m=>m.uuid).sort().join(","),[r]),fe=E.useMemo(()=>((o==null?void 0:o.online)||[]).slice().sort().join(","),[o==null?void 0:o.online]),Pe=E.useMemo(()=>{const m={},g=new Set((o==null?void 0:o.online)||[]);return r==null||r.forEach(M=>{m[M.uuid]=g.has(M.uuid)}),m},[fe,r]),Te=v==="ping"?[{label:a("chart.hours",{count:1}),hours:1},{label:a("chart.hours",{count:6}),hours:6},{label:a("chart.hours",{count:12}),hours:12},{label:a("chart.days",{count:1}),hours:24},{label:a("chart.days",{count:7}),hours:168}]:[{label:a("chart.hours",{count:4}),hours:4},{label:a("chart.days",{count:1}),hours:24},{label:a("chart.days",{count:7}),hours:168},{label:a("chart.days",{count:30}),hours:720}],Ne=v==="ping"?f:u,Se=[];if(typeof Ne=="number"&&Ne>0){for(const g of Te)g.hours<=Ne&&Se.push({label:g.label,hours:g.hours});const m=Te[Te.length-1];if(Ne>m.hours){const g=Math.floor(Ne/24),M=Ne%24;let j;g>0&&M===0?j=a("chart.days",{count:g}):g>0&&M>0?j=`${g}d ${M}h`:j=a("chart.hours",{count:Ne}
145),Se.push({label:j,hours:Ne})}}else Se.push(...Te);const Be=Se.find(m=>m.hours===(v==="ping"?6:24))||Se[0],[pe,we]=E.useState((Be==null?void 0:Be.hours)||6);E.useEffect(()=>{v!=="ping"||!r||r.length===0||(A(!0),D(null),fetch("/api/task/ping").then(m=>{if(!m.ok)throw new Error(`Global API failed with status: ${m.status}`);return m.json()}).then(m=>{const g=(m==null?void 0:m.data)||[];if(Array.isArray(g)&&g.length>0){const M=r.map(V=>V.uuid),j=g.filter(V=>!V.clients||V.clients.length===0||V.clients.some(se=>M.includes(se)));if(j.length>0)ne(j),C||R(j[0].id),A(!1);else throw new Error("No relevant tasks for current nodes")}else throw new Error("Empty task list from global API")}).catch(m=>{console.log("Global task API failed, falling back to node-based fetch:",m.message);const g=r.map(M=>fetch(`/api/records/ping?uuid=${M.uuid}&hours=1`).then(j=>j.ok?j.json():null).then(j=>{var V;return((V=j==null?void 0:j.data)==null?void 0:V.tasks)||[]}).catch(()=>[]));Promise.all(g).then(M=>{const j=new Map;M.forEach(se=>{Array.isArray(se)&&se.forEach(ae=>{ae&&ae.id&&!j.has(ae.id)&&j.set(ae.id,ae)})});const V=Array.from(j.values()).sort((se,ae)=>se.id-ae.id);V.length>0?(ne(V),C||R(V[0].id),A(!1)):(D("No ping tasks configured"),A(!1))}).catch(()=>{D("Failed to fetch ping tasks"),A(!1)})}))},[v,le]),E.useEffect(()=>{v!=="ping"||!C||!r||r.length===0||(A(!0),fetch(`/api/records/ping?task_id=${C}&hours=${pe}`).then(m=>{if(!m.ok)throw new Error(`Task-based API failed with status: ${m.status}`);return m.json()}).then(m=>{var ae,ce;const g=((ae=m==null?void 0:m.data)==null?void 0:ae.records)||[],M=((ce=m==null?void 0:m.data)==null?void 0:ce.basic_info)||[],j={};g.length>0&&(j[C]=g);const V={},se={};M.forEach(ge=>{ge.client&&(typeof ge.loss=="number"&&(V[`${ge.client}_${C}`]=ge.loss),se[ge.client]={loss:ge.loss,min:ge.min,max:ge.max})}),ee(j),Y(V),X(se),A(!1)}).catch(m=>{console.log("Task-based API failed, falling back to UUID-based fetch:",m.message);const g=r.map(M=>fetch(`/api/records/ping?uuid=${M.uuid}&hours=${pe}`).then(j=>j.ok?j.json():null).then(j=>{var ae,ce,ge;const V=((ae=j==null?void 0:j.data)==null?void 0:ae.tasks)||[],se={};return V.forEach(ke=>{ke.id&&typeof ke.loss=="number"&&(se[`${M.uuid}_${ke.id}`]=ke.loss)}),{nodeId:M.uuid,records:((ge=(ce=j==null?void 0:j.data)==null?void 0:ce.records)==null?void 0:ge.filter(ke=>ke.task_id===C))||[],lossRates:se}}).catch(()=>({nodeId:M.uuid,records:[],lossRates:{}})));Promise.all(g).then(M=>{const j={},V={};M.forEach(se=>{Object.assign(V,se.lossRates),se.records.length>0&&se.records.forEach(ae=>{j[C]||(j[C]=[]),j[C].push({...ae,client:se.nodeId})})}),ee(j),Y(V),X({}),A(!1)}).catch(M=>{console.error("Error fetching ping data:",M),A(!1)})}))},[v,C,le,pe]),E.useEffect(()=>{if(v!=="load"||!r||r.length===0||y.length===0)return;A(!0);const m=r.map(g=>fetch(`/api/records/load?uuid=${g.uuid}&hours=${pe}`).then(M=>M.ok?M.json():null).then(M=>{var j;return{nodeId:g.uuid,records:((j=M==null?void 0:M.data)==null?void 0:j.records)||[]}}).catch(()=>({nodeId:g.uuid,records:[]})));Promise.all(m).then(g=>{const M={};g.forEach(j=>{j.records.length>0&&(M[j.nodeId]=j.records)}),Q(M),A(!1)}).catch(g=>{console.error("Error fetching load data:",g),A(!1)})},[v,le,pe,y]);const Ie=E.useMemo(()=>{if(v==="ping"){if(!C||!$[C])return[];const m=$[C];if(!m.length)return[];const g={},M=[],j=ie.find(ce=>ce.id===C),V=(j==null?void 0:j.interval)||60,se=Math.max(60,V)*1e3;m.forEach(ce=>{const ge=new Date(ce.time).getTime();let ke=null;for(const Oe of M)if(Math.abs(Oe-ge)<=se){ke=Oe;break}const Fe=ke!==null?ke:ge;g[Fe]||(g[Fe]={time:new Date(Fe).toISOString()},ke===null&&M.push(Fe));const We=ce.value===-1?null:ce.value;g[Fe][ce.client]=We});let ae=Object.values(g).sort((ce,ge)=>new Date(ce.time).getTime()-new Date(ge.time).getTime());if(ae=br(ae,V,pe*60*60,V),ae=jr(ae,pe,!1,V),K&&r){const ce=r.map(ge=>ge.uuid);ae=zr(ae,ce)}return ae}else{if(!Object.keys(I).length||y.length===0)return[];const m={},g=[];Object.entries(I).forEach(([se,ae])=>{ae.forEach(ce=>{const ge=new Date(ce.time).getTime();let ke=null;const Fe=(pe<=4?60:60*15)*1e3;for(const Oe of g)if(Math.abs(Oe-ge)<=Fe){ke=Oe;break}const We=ke!==null?ke:ge;m[We]||(m[We]={time:new Date(We).toISOString()}
145,ke===null&&g.push(We)),y.forEach(Oe=>{const xt=`${se}_${Oe}`;let Le=ce[Oe];if(Oe==="net_total")Le=(ce.net_in||0)+(ce.net_out||0);else if(Oe==="net_bandwidth")Le=(ce.net_total_up||0)+(ce.net_total_down||0);else if(Oe==="traffic_limit"){const lt=r==null?void 0:r.find(Ot=>Ot.uuid===se);lt&&Number(lt.traffic_limit)>0&<.traffic_limit_type?Le=qi(ce.net_total_up||0,ce.net_total_down||0,lt.traffic_limit,lt.traffic_limit_type):Le=0}else Oe==="tcp"?Le=ce.connections||0:Oe==="udp"?Le=ce.connections_udp||0:(Le==null&&(console.warn(`Missing value for metric ${Oe} in record`),Le=0),Oe==="ram"&&ce.ram_total>0?Le=Le/ce.ram_total*100:Oe==="disk"&&ce.disk_total>0?Le=Le/ce.disk_total*100:Oe==="swap"&&ce.swap_total>0&&(Le=Le/ce.swap_total*100));m[We][xt]=Le})})});let M=Object.values(m).sort((se,ae)=>new Date(se.time).getTime()-new Date(ae.time).getTime()),j,V;if(pe<=4?(j=60,V=60):(j=60*15,V=j),M=br(M,j,pe*60*60,V),M=jr(M,pe),K&&r){const se=[];r.forEach(ae=>{y.forEach(ce=>{se.push(`${ae.uuid}_${ce}`)})}),M=zr(M,se)}return M}},[v,$,I,C,y,K,r,pe,ie]),Re=E.useMemo(()=>{if(!Ie.length||!r)return{};const m={};return v==="ping"?r.forEach(g=>{const M=Ie.map(j=>j[g.uuid]).filter(j=>j!=null&&j>0);if(M.length>0){const j=G[g.uuid],V=C?ue[`${g.uuid}_${C}`]:void 0,se=(j==null?void 0:j.min)!==void 0?j.min:Math.min(...M),ae=(j==null?void 0:j.max)!==void 0?j.max:Math.max(...M),ce=(j==null?void 0:j.loss)!==void 0?Math.round(j.loss*10)/10:typeof V=="number"?Math.round(V*10)/10:Math.round((1-M.length/Ie.length)*1e3)/10;m[g.uuid]={min:se,max:ae,avg:M.reduce((ge,ke)=>ge+ke,0)/M.length,current:M[M.length-1]||null,lossRate:ce,totalSamples:Ie.length,validSamples:M.length,isBackendCalculated:(j==null?void 0:j.loss)!==void 0||typeof V=="number",hasServerStats:!!j}}else if(G[g.uuid]){const j=G[g.uuid];m[g.uuid]={min:j.min||0,max:j.max||0,avg:0,current:null,lossRate:Math.round((j.loss||0)*10)/10,totalSamples:0,validSamples:0,isBackendCalculated:!0,hasServerStats:!0}}}):r.forEach(g=>{const M={metrics:{}};y.forEach(j=>{const V=`${g.uuid}_${j}`,se=Ie.map(ae=>ae[V]).filter(ae=>ae!=null);if(se.length>0){const ae=Math.min(...se),ce=Math.max(...se),ge=se.reduce((ke,Fe)=>ke+Fe,0)/se.length;M.metrics[j]={min:ae,max:ce,avg:ge,range:ce-ae,current:se[se.length-1]||null}}}),Object.keys(M.metrics).length>0&&(m[g.uuid]=M)}),m},[Ie,r,v,C,ue,y,G]),Xe=E.useCallback(m=>{U(g=>({...g,[m]:!g[m]}))},[]),ft=E.useCallback(()=>{if(!r)return;const m=r.every(M=>he[M.uuid]),g={};r.forEach(M=>{g[M.uuid]=!m}),U(g)},[r,he]),ot=E.useCallback(async()=>{if(!_.current){console.error("Chart card ref not found");return}O(!0);try{const m=document.querySelector(".radix-themes")??document.documentElement,M={quality:1,bgcolor:getComputedStyle(m).getPropertyValue("--color-panel-solid").trim()||getComputedStyle(_.current).backgroundColor||"#ffffff",width:_.current.scrollWidth*2,height:_.current.scrollHeight*2,style:{transform:"scale(2)",transformOrigin:"top left"},filter:ae=>{var ce;return!((ce=ae.classList)!=null&&ce.contains("ignore-export"))}},j=await Mr.toPng(_.current,M),V=document.createElement("a"),se=new Date().toISOString().slice(0,19).replace(/[T:]/g,"-");V.download=`task-chart-${se}.png`,V.href=j,V.style.display="none",document.body.appendChild(V),V.click(),setTimeout(()=>{document.body.removeChild(V)},100)}catch(m){console.error("Failed to export chart:",m);try{const g=await Mr.toBlob(_.current,{bgcolor:getComputedStyle(document.documentElement).getPropertyValue("--color-panel-solid").trim()||"#ffffff",quality:.95}),M=URL.createObjectURL(g),j=document.createElement("a"),V=new Date().toISOString().slice(0,19).replace(/[T:]/g,"-");j.download=`task-chart-${V}.png`,j.href=M,document.body.appendChild(j),j.click(),setTimeout(()=>{document.body.removeChild(j),URL.revokeObjectURL(M)},100)}catch(g){console.error("Fallback also failed:",g),alert("Failed to export chart. Please try using a different browser or take a screenshot instead.")}}finally{setTimeout(()=>{O(!1)},1e3)}},[]),mt=m=>{if(!m)return"";const g=new Date(m);return pe<24?g.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):g.toLocaleDateString([],{month:"2-digit",day:"2-digit"})},at=E.useCallback(({active:m,payload:g,label:M})=>{if(!m||!g||!g.length||!r)return null;const j=g.filter(ge=>{if(v==="ping")return!he[ge.dataKey]&&ge.value!=null;{const[ke]=ge.dataKey.split("_");return!he[ke]&&ge.value!=null}});if(!j.length)return null;const V=j.slice(0,10),se=j.length>10,ae={minWidth:"180px",maxWidth:"300px",backgroundColor:"var(--color-panel-solid)",border:"1px solid var(--gray-a5)",color:"var(--gray-12)"};return n.jsxs("div",{className:"p-3 rounded-lg shadow-xl",style:ae,children:[n.jsx("p",{className:"font-medium text-xs mb-2",style:{color:"var(--gray-12)"}
145,children:new Date(M).toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}),n.jsxs("div",{className:"space-y-1",children:[V.map((ge,ke)=>{var Fe,We,Oe;if(v==="ping"){const xt=r.find(lt=>lt.uuid===ge.dataKey);if(!xt)return null;const Le=S(xt.uuid);return n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[n.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:Le.primary}}),n.jsx("span",{className:"text-xs truncate",style:{color:"var(--gray-11)"},children:xt.name})]}),n.jsxs("span",{className:"font-semibold text-xs tabular-nums flex-shrink-0",style:{color:"var(--gray-12)"},children:[ge.value.toFixed(1),"ms"]})]},ke)}else{const[xt,...Le]=ge.dataKey.split("_"),lt=Le.join("_"),Ot=r.find(oi=>oi.uuid===xt);if(!Ot)return null;const St=lt,ki=r.indexOf(Ot),Dt=kt[ki%kt.length];let Ht;return Object.keys(Ue).filter(oi=>j.some(pn=>pn.dataKey.endsWith(`_${oi}`))).length===1?Ht=Dt.primary:r.length===1?Ht=((Fe=Ue[St])==null?void 0:Fe.color)||Dt.primary:Ht=((We=Ue[St])==null?void 0:We.color)||Dt.primary,n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[n.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:Ht}}),n.jsxs("span",{className:"text-xs truncate",style:{color:"var(--gray-11)"},children:[Ot.name," - ",((Oe=Ue[St])==null?void 0:Oe.label)||St]})]}),n.jsx("span",{className:"font-semibold text-xs tabular-nums flex-shrink-0",style:{color:"var(--gray-12)"},children:vt(ge.value,St)})]},ke)}}),se&&n.jsxs("div",{className:"text-xs pt-1",style:{color:"var(--gray-10)",borderTop:"1px solid var(--gray-a4)"},children:["+",j.length-10," more..."]})]})]})},[he,r,v]);return Z&&v==="ping"?n.jsx(Ta,{className:"flex items-center justify-center h-96",children:n.jsxs(ut,{style:{padding:"2rem",textAlign:"center"},children:[n.jsx(b,{size:"3",color:"red",className:"mb-2",children:a("Error loading ping tasks")}),n.jsx(b,{size:"2",color:"gray",children:Z})]})}):n.jsxs(T,{direction:"column",gap:"4",className:"w-full px-4",children:[n.jsx(ut,{style:{borderRadius:"12px",padding:"1.25rem",background:"var(--color-panel-solid)"},children:n.jsxs(T,{direction:"column",gap:"4",children:[n.jsxs(T,{align:"center",justify:"between",children:[n.jsxs(T,{align:"center",gap:"3",children:[n.jsx(Vl,{className:"text-accent-9",size:d?20:24}),n.jsx(b,{size:d?"3":"4",weight:"bold",children:a("Task Monitor")})]}),n.jsxs(ii,{value:v,onValueChange:m=>{W(m),m==="ping"&&(ne([]),R(null),ee({}))},size:d?"1":"2",children:[n.jsx(st,{value:"ping",children:a("Ping Tasks")}),n.jsx(st,{value:"load",children:a("Load Metrics")})]})]}),v==="ping"?n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-3",children:ie.map(m=>n.jsx(Ft.button,{onClick:()=>R(m.id),className:`p-3 rounded-lg border-2 transition-all overflow-hidden ${C===m.id?"bg-accent-3 border-accent-7 shadow-lg":"bg-gray-a2 border-gray-a4 hover:bg-gray-a3 hover:border-gray-a5"}`,whileHover:{scale:1.02},whileTap:{scale:.98},children:n.jsxs(T,{direction:"column",align:"start",gap:"2",children:[n.jsx(b,{size:"2",weight:"bold",className:"truncate w-full",title:m.name,children:m.name}),n.jsxs(T,{align:"center",gap:"1",children:[n.jsx(Mt,{size:12,style:{color:"var(--gray-10)"}}),n.jsxs(b,{size:"1",color:"gray",className:"whitespace-nowrap",children:[m.interval,"s"]})]})]})},m.id))}):n.jsx(T,{direction:"column",gap:"3",children:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx(b,{size:"1",weight:"medium",color:"gray",className:"mb-2 block",children:"System"}),n.jsx("div",{className:d?"flex flex-col gap-2":"grid grid-cols-3 md:grid-cols-6 gap-2",children:["cpu","gpu","ram","swap","load","temp"].map(m=>{const g=m,M=Ue[g],j=y.includes(g);return n.jsxs(Ft.button,{onClick:()=>{k(j?V=>V.filter(se=>se!==g):[g])},className:`${d?"p-3 justify-start":"p-2 justify-center"} rounded-lg border transition-all flex items-center gap-2 ${j?"bg-accent-3 border-accent-7":"bg-gray-a2 border-gray-a4 hover:bg-gray-a3"}`,whileHover:{scale:d?1:1.02},whileTap:{scale:d?.99:.98},children:[Jn(g),n.jsx(b,{size:d?"2":"1",weight:"medium",children:M.label})]},g)})})]}),n.jsxs("div",{children:[n.jsx(b,{size:"1",weight:"medium",color:"gray",className:"mb-2 block",children:"Network"}),n.jsx("div",{className:d?"flex flex-col gap-2":"grid grid-cols-3 md:grid-cols-6 gap-2",children:["net_in","net_out","net_total","net_total_up","net_total_down","net_bandwidth","traffic_limit"].map(m=>{const g=m,M=Ue[g],j=y.includes(g);return n.jsxs(Ft.button,{onClick:()=>{j?k(V=>V.filter(se=>se!==g)):y.filter(se=>!Kc(se)).length>0?k([g]):k(se=>[...se,g])},className:`${d?"p-3 justify-start":"p-2 justify-center"} rounded-lg border transition-all flex items-center gap-2 ${j?"bg-accent-3 border-accent-7":"bg-gray-a2 border-gray-a4 hover:bg-gray-a3"}`,whileHover:{scale:d?1:1.02},whileTap:{scale:d?.99:.98},children:[Jn(g),n.jsx(b,{size:d?"2":"1",weight:"medium",children:M.label})]},g)})})]}),n.jsxs("div",{children:[n.jsx(b,{size:"1",weight:"medium",color:"gray",className:"mb-2 block",children:"Storage & Process"}),n.jsx("div",{className:d?"flex flex-col gap-2":"grid grid-cols-3 md:grid-cols-6 gap-2",children:["disk","process","tcp","udp"].map(m=>{const g=m,M=Ue[g],j=y.includes(g);return n.jsxs(Ft.button,{onClick:()=>{k(j?V=>V.filter(se=>se!==g):[g])},className:`${d?"p-3 justify-start":"p-2 justify-center"} rounded-lg border transition-all flex items-center gap-2 ${j?"bg-accent-3 border-accent-7":"bg-gray-a2 border-gray-a4 hover:bg-gray-a3"}`,whileHover:{scale:d?1:1.02},whileTap:{scale:d?.99:.98},children:[Jn(g),n.jsx(b,{size:d?"2":"1",weight:"medium",children:M.label})]},g)})})]})]})}),d?n.jsx(T,{direction:"column",gap:"3",children:n.jsxs("div",{children:[n.jsxs(T,{align:"center",justify:"between",className:"mb-2",children:[n.jsx(b,{size:"1",weight:"medium",children:a("Time Range")}),n.jsxs(T,{gap:"2",align:"center",children:[n.jsx(Ui,{id:"cut-peak",checked:K,onCheckedChange:J,size:"1"}),n.jsx("label",{htmlFor:"cut-peak",className:"text-xs whitespace-nowrap",children:a("chart.cutPeak")})]}),n.jsxs(T,{gap:"2",align:"center",children:[n.jsx(Ui,{id:"connect-nulls-mobile",checked:me,onCheckedChange:H,size:"1"}),n.jsx("label",{htmlFor:"connect-nulls-mobile",className:"text-xs whitespace-nowrap",children:a("chart.connectNulls")})]})]}),n.jsx("div",{className:"overflow-x-auto pb-2 -mx-2 px-2",style:{scrollbarWidth:"thin",scrollbarColor:"var(--gray-a6) var(--gray-a3)",WebkitOverflowScrolling:"touch"},children:n.jsx("div",{className:"inline-flex",children:n.jsx(ii,{value:String(pe),onValueChange:m=>we(Number(m)),size:"1",style:{minWidth:"max-content"},children:Se.map(m=>n.jsx(st,{value:String(m.hours),className:"whitespace-nowrap px-2",style:{fontSize:"12px"},children:m.label},m.hours))})})})]})}):n.jsxs(T,{justify:"between",align:"center",gap:"4",wrap:"wrap",children:[n.jsxs(T,{gap:"3",align:"center",children:[n.jsxs(b,{size:"2",weight:"medium",children:[a("Time Range"),":"]}),n.jsx(ii,{value:String(pe),onValueChange:m=>we(Number(m)),size:"2",children:Se.map(m=>n.jsx(st,{value:String(m.hours),children:m.label},m.hours))})]}),n.jsxs(T,{gap:"3",align:"center",children:[n.jsxs(b,{size:"2",weight:"medium",children:[a("Chart Type"),":"]}),n.jsxs(ii,{value:re,onValueChange:m=>te(m),size:"2",children:[n.jsx(st,{value:"line",children:"Line"}),n.jsx(st,{value:"area",children:"Area"}),n.jsx(st,{value:"composed",children:"Combined"})]})]}),n.jsxs(T,{gap:"3",align:"center",children:[n.jsx(Ui,{id:"cut-peak",checked:K,onCheckedChange:J,size:"2"}),n.jsx("label",{htmlFor:"cut-peak",className:"text-sm font-medium cursor-pointer",children:a("chart.cutPeak")})]}),n.jsxs(T,{gap:"3",align:"center",children:[n.jsx(Ui,{id:"connect-nulls",checked:me,onCheckedChange:H,size:"2"}),n.jsx("label",{htmlFor:"connect-nulls",className:"text-sm font-medium cursor-pointer",children:a("chart.connectNulls")})]})]})]})}),d&&n.jsx(ut,{style:{borderRadius:"12px",padding:"0.75rem",background:"var(--color-panel-solid)",border:"1px solid var(--gray-a3)"},children:n.jsxs("div",{children:[n.jsx(b,{size:"2",weight:"medium",className:"mb-2",children:a("Chart Type")}),n.jsx("div",{className:"overflow-x-auto pb-2 -mx-2 px-2",style:{scrollbarWidth:"thin",scrollbarColor:"var(--gray-a6) var(--gray-a3)",WebkitOverflowScrolling:"touch"},children:n.jsx("div",{className:"inline-flex w-full",children:n.jsxs(ii,{value:re,onValueChange:m=>te(m),size:"2",className:"w-full",children:[n.jsx(st,{value:"line",className:"flex-1",children:"Line"}),n.jsx(st,{value:"area",className:"flex-1",children:"Area"}),n.jsx(st,{value:"composed",className:"flex-1",children:"Combined"})]})})})]})}),r&&!w&&n.jsx(Ft.div,{initial:{opacity:0,y:20}
145,animate:{opacity:1,y:0},children:n.jsx(ut,{style:{borderRadius:"16px",padding:"1.5rem",background:"linear-gradient(135deg, var(--color-panel-solid) 0%, var(--gray-a2) 100%)",border:"1px solid var(--gray-a3)"},children:n.jsxs(T,{direction:"column",gap:"4",children:[n.jsxs(T,{align:"center",justify:"between",children:[n.jsxs(T,{align:"center",gap:"3",children:[n.jsx(Jl,{className:"text-accent-9",size:20}),n.jsx(b,{size:"3",weight:"bold",className:"truncate max-w-md",children:v==="ping"?`${((q=ie.find(m=>m.id===C))==null?void 0:q.name)||""} - ${a("Node Statistics")}`:`${a("Node Metrics Overview")}`})]}),n.jsx(ns,{variant:"soft",size:"2",onClick:ft,children:r.every(m=>he[m.uuid])?n.jsxs(n.Fragment,{children:[n.jsx(Ya,{size:16})," ",a("Show All")]}):n.jsxs(n.Fragment,{children:[n.jsx(Vn,{size:16})," ",a("Hide All")]})})]}),n.jsx("div",{className:d?"grid grid-cols-2 gap-2":"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-4 2xl:grid-cols-5 gap-3",children:r.filter(m=>{const g=Re[m.uuid];return g&&(v==="ping"?g.validSamples>0:Object.keys(g.metrics||{}).length>0)}).map(m=>{var se;const g=Re[m.uuid],M=he[m.uuid],j=S(m.uuid),V=Pe[m.uuid]||!1;return n.jsxs(Ft.div,{className:`relative overflow-hidden rounded-xl cursor-pointer transition-all ${d?"p-2.5":"p-3"}`,style:{background:M?"var(--gray-a2)":`linear-gradient(135deg, ${j.primary}15 0%, ${j.secondary}10 100%)`,border:`2px solid ${M?"var(--gray-a4)":j.primary}30`,opacity:M?.6:1},onClick:()=>Xe(m.uuid),whileHover:{scale:1.03},whileTap:{scale:.97},children:[n.jsx("div",{className:"absolute inset-0 opacity-10",style:{background:`radial-gradient(circle at top right, ${j.primary}40, transparent 70%)`}}),n.jsxs("div",{className:"relative",children:[n.jsxs(T,{align:"center",gap:d?"1":"2",className:d?"mb-2":"mb-3",children:[n.jsx("div",{className:`${d?"w-2.5 h-2.5":"w-3 h-3"} rounded-full animate-pulse`,style:{background:V?j.primary:"#6B7280",opacity:M?.3:1,boxShadow:M?"none":`0 0 12px ${V?j.shadow:"rgba(107, 114, 128, 0.3)"}`}}),!d&&n.jsx(zi,{flag:m.region}),n.jsx(b,{size:d?"1":"2",weight:"bold",className:"truncate flex-1",style:{maxWidth:d?"80px":"120px"},children:m.name}),!M&&(V?n.jsx(El,{size:d?12:16,className:"flex-shrink-0",style:{color:"var(--green-11)"}}):n.jsx(Al,{size:d?12:16,className:"flex-shrink-0",style:{color:"var(--red-11)"}}))]}),v==="ping"?n.jsxs("div",{className:d?"space-y-1.5":"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs(b,{size:"1",color:"gray",children:[d?"Now":a("Current"),":"]}),n.jsx(b,{size:d?"1":"2",weight:"bold",style:{color:j.primary},children:g.current?`${g.current.toFixed(1)}ms`:"-"})]}),n.jsx("div",{className:`w-full ${d?"h-1":"h-1.5"} rounded-full overflow-hidden`,style:{background:"var(--gray-a4)"},children:n.jsx("div",{className:"h-full transition-all duration-500",style:{width:g.current?`${Math.min(g.current/200*100,100)}%`:"0%",background:`linear-gradient(90deg, ${j.primary}, ${j.secondary})`}})}),d?n.jsxs("div",{className:"grid grid-cols-2 gap-x-1 text-xs",children:[n.jsxs("div",{children:[n.jsx(b,{color:"gray",size:"1",children:"Loss:"}),n.jsxs(b,{size:"1",weight:"medium",style:g.lossRate>10?{color:"var(--red-11)"}:void 0,children:[g.lossRate,"%"]})]}),n.jsxs("div",{children:[n.jsx(b,{color:"gray",size:"1",children:"Avg:"}),n.jsxs(b,{size:"1",weight:"medium",children:[g.avg.toFixed(1),"ms"]})]})]}):n.jsxs("div",{className:"grid grid-cols-2 gap-1 text-xs",children:[n.jsxs("div",{children:[n.jsx(b,{color:"gray",size:"1",children:"Loss:"}),n.jsxs(b,{size:"1",weight:"medium",style:g.lossRate>10?{color:"var(--red-11)"}:void 0,children:[g.lossRate,"%"]})]}),n.jsxs("div",{children:[n.jsx(b,{color:"gray",size:"1",children:"Avg:"}),n.jsxs(b,{size:"1",weight:"medium",children:[g.avg.toFixed(1),"ms"]})]}),n.jsxs("div",{children:[n.jsx(b,{color:"gray",size:"1",children:"Min:"}),n.jsxs(b,{size:"1",children:[g.min.toFixed(0),"ms"]})]}),n.jsxs("div",{children:[n.jsx(b,{color:"gray",size:"1",children:"Max:"}),n.jsxs(b,{size:"1",children:[g.max.toFixed(0),"ms"]})]})]})]}):n.jsxs("div",{className:d?"space-y-1":"space-y-1.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs(b,{size:"1",color:"gray",children:[d?"Now":a("Current"),":"]}),n.jsx(b,{size:d?"1":"2",weight:"bold",style:{color:j.primary},children:g.metrics&&y[0]&&g.metrics[y[0]]?vt(g.metrics[y[0]].current||0,y[0]):"-"})]}
145),y[0]&&["cpu","gpu","ram","disk","swap","traffic_limit"].includes(y[0])&&((se=g.metrics)==null?void 0:se[y[0]])&&n.jsx("div",{className:`w-full ${d?"h-1":"h-1.5"} rounded-full overflow-hidden`,style:{background:"var(--gray-a4)"},children:n.jsx("div",{className:"h-full transition-all duration-500",style:{width:`${Math.min(g.metrics[y[0]].current||0,100)}%`,background:`linear-gradient(90deg, ${j.primary}, ${j.secondary})`}})}),d?n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center justify-between text-xs",children:[n.jsx(b,{color:"gray",size:"1",children:"Avg:"}),n.jsx(b,{size:"1",weight:"medium",className:"tabular-nums",children:g.metrics&&y[0]&&g.metrics[y[0]]?vt(g.metrics[y[0]].avg,y[0]):"-"})]}),n.jsxs("div",{className:"pt-1",style:{borderTop:"1px solid var(--gray-a4)"},children:[n.jsx(b,{color:"gray",size:"1",className:"text-xs",children:"Range:"}),n.jsx(b,{size:"1",weight:"medium",className:"text-xs tabular-nums text-center block mt-0.5",children:g.metrics&&y[0]&&g.metrics[y[0]]?`${vt(g.metrics[y[0]].min,y[0])} - ${vt(g.metrics[y[0]].max,y[0])}`:"-"})]})]}):n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-1 text-xs",children:[n.jsxs("div",{children:[n.jsx(b,{color:"gray",size:"1",children:"Avg:"}),n.jsx(b,{size:"1",weight:"medium",className:"tabular-nums",children:g.metrics&&y[0]&&g.metrics[y[0]]?vt(g.metrics[y[0]].avg,y[0]):"-"})]}),n.jsxs("div",{children:[n.jsx(b,{color:"gray",size:"1",children:"Min:"}),n.jsx(b,{size:"1",className:"tabular-nums",children:g.metrics&&y[0]&&g.metrics[y[0]]?vt(g.metrics[y[0]].min,y[0]):"-"})]}),n.jsxs("div",{children:[n.jsx(b,{color:"gray",size:"1",children:"Max:"}),n.jsx(b,{size:"1",className:"tabular-nums",children:g.metrics&&y[0]&&g.metrics[y[0]]?vt(g.metrics[y[0]].max,y[0]):"-"})]})]}),n.jsxs("div",{className:"pt-1",style:{borderTop:"1px solid var(--gray-a4)"},children:[n.jsx(b,{color:"gray",size:"1",className:"text-xs",children:"Range:"}),n.jsx(b,{size:"1",weight:"medium",className:"text-xs tabular-nums block mt-0.5",children:g.metrics&&y[0]&&g.metrics[y[0]]?`${vt(g.metrics[y[0]].min,y[0])} - ${vt(g.metrics[y[0]].max,y[0])}`:"-"})]})]})]}),M&&n.jsx("div",{className:"absolute top-2 right-2",children:n.jsx(Vn,{size:16,className:"text-muted-foreground"})})]})]},m.uuid)})})]})})}),w&&n.jsx(ut,{style:{borderRadius:"16px",padding:"4rem"},children:n.jsx(T,{justify:"center",align:"center",children:n.jsx(tn,{})})}),Z&&n.jsx(ut,{style:{borderRadius:"16px",padding:"2rem"},children:n.jsx(T,{justify:"center",align:"center",children:n.jsx(b,{color:"red",children:Z})})}),!w&&!Z&&Ie.length>0&&r&&n.jsx(Ft.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:n.jsx(ut,{ref:_,style:{borderRadius:"16px",padding:"2rem",background:"linear-gradient(135deg, var(--color-panel-solid) 0%, var(--gray-a1) 100%)",border:"1px solid var(--gray-a3)",minHeight:"500px",margin:"8px"},children:n.jsxs(T,{direction:"column",gap:"3",children:[n.jsxs(T,{align:"center",justify:"between",children:[n.jsxs(T,{align:"center",gap:"3",children:[n.jsx(to,{className:"text-accent-9",size:20}),n.jsx(b,{size:"3",weight:"bold",className:"truncate max-w-md",children:v==="ping"?`${((ye=ie.find(m=>m.id===C))==null?void 0:ye.name)||""} - ${a("Latency Chart")}`:`${a("Metrics Chart")}`})]}),!d&&!x&&n.jsx(ns,{variant:"soft",size:"2",onClick:ot,disabled:z,className:"ignore-export",children:z?n.jsx(tn,{}):n.jsxs(n.Fragment,{children:[n.jsx(jl,{size:16}),a("Export")]})})]}),!d&&n.jsx("div",{className:"flex flex-wrap gap-2 mb-3 justify-center",children:v==="ping"?(()=>{const m=r.filter(j=>{const V=Re[j.uuid];return V&&V.validSamples>0&&!he[j.uuid]}),g=m.slice(0,10),M=m.length-10;return n.jsxs(n.Fragment,{children:[g.map(j=>{const V=S(j.uuid),se=Re[j.uuid],ae=se&&se.current!==null;return n.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 rounded-md",style:{background:`${V.primary}10`,border:`1px solid ${V.primary}30`},children:[n.jsx("div",{className:"w-3 h-3 rounded-full",style:{background:ae?V.primary:"var(--gray-a5)",boxShadow:ae?`0 0 6px ${V.shadow}`:"none"}}),n.jsx("span",{className:"text-sm font-medium",children:j.name})]},j.uuid)}),M>0&&n.jsx("div",{className:"flex items-center gap-2 px-3 py-1 rounded-md",style:{background:"var(--gray-a2)",border:"1px solid var(--gray-a5)"},children:n.jsxs("span",{className:"text-sm font-medium",style:{color:"var(--gray-11)"},children:["+",M," more"]})})]})})():(()=>{const m=r.filter(j=>!he[j.uuid]).flatMap(j=>y.map(V=>({node:j,metric:V,key:`${j.uuid}_${V}`}))),g=m.slice(0,10),M=m.length-10;return n.jsxs(n.Fragment,{children:[g.map(({node:j,metric:V,key:se})=>{var ke,Fe,We;const ae=S(j.uuid);let ce,ge;return y.length===1?ce=ae.primary:r.length===1?ce=((ke=Ue[V])==null?void 0:ke.color)||ae.primary:(ce=((Fe=Ue[V])==null?void 0:Fe.color)||ae.primary,ge=r.findIndex(Oe=>Oe.uuid===j.uuid)>0?"5 3":void 0),n.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 rounded-md cursor-pointer transition-opacity opacity-100",style:{background:`${ce}10`,border:`1px solid ${ce}30`},onClick:()=>Xe(j.uuid),children:[n.jsx("div",{className:"flex items-center gap-1",children:ge?n.jsx("svg",{width:"16",height:"3",className:"flex-shrink-0",children:n.jsx("line",{x1:"0",y1:"1.5",x2:"16",y2:"1.5",stroke:ce,strokeWidth:"2",strokeDasharray:ge})}):n.jsx("div",{className:"w-4 h-0.5 flex-shrink-0",style:{background:ce}})}),n.jsxs("span",{className:"text-xs font-medium",children:[j.name," - ",((We=Ue[V])==null?void 0:We.label)||V]})]},se)}),M>0&&n.jsx("div",{className:"flex items-center gap-2 px-3 py-1 rounded-md",style:{background:"var(--gray-a2)",border:"1px solid var(--gray-a5)"},children:n.jsxs("span",{className:"text-sm font-medium",style:{color:"var(--gray-11)"},children:["+",M," more"]})})]})})()}),n.jsx(Vr,{width:"100%",height:450,children:re==="line"?n.jsxs(Gr,{data:Ie,margin:{top:10,right:10,bottom:10,left:10},className:"chart-line",children:[n.jsxs("defs",{children:[n.jsx("clipPath",{id:"task-chart-clip",children:n.jsx("rect",{x:0,y:0,width:"100%",height:"100%"})}),kt.map((m,g)=>n.jsxs("linearGradient",{id:`gradient-${g}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0%",stopColor:m.primary,stopOpacity:.8}),n.jsx("stop",{offset:"100%",stopColor:m.secondary,stopOpacity:.1})]},g))]}),n.jsx(Gn,{strokeDasharray:"3 3",stroke:"var(--gray-a3)",strokeOpacity:.3}),n.jsx(Gi,{dataKey:"time",tickFormatter:mt,stroke:"var(--gray-a6)"}),n.jsx(Ki,{stroke:"var(--gray-a6)",tickFormatter:B()}),n.jsx(Ji,{content:at}
145),v==="ping"?r.filter(m=>{const g=Re[m.uuid];return g&&g.validSamples>0&&!he[m.uuid]}).map(m=>{const g=S(m.uuid);return n.jsx($t,{type:K?"monotone":"linear",dataKey:m.uuid,stroke:g.primary,strokeWidth:2,dot:!1,strokeOpacity:1,fill:"none",connectNulls:me,isAnimationActive:!1,clipPath:"url(#task-chart-clip)"},m.uuid)}):r.filter(m=>!he[m.uuid]).flatMap(m=>y.map(g=>{var ae,ce;const M=`${m.uuid}_${g}`,j=r.findIndex(ge=>ge.uuid===m.uuid),V=S(m.uuid);let se;return y.length===1?se=V.primary:r.length===1?se=((ae=Ue[g])==null?void 0:ae.color)||V.primary:se=((ce=Ue[g])==null?void 0:ce.color)||V.primary,n.jsx($t,{type:K?"monotone":"linear",dataKey:M,stroke:se,strokeWidth:2,dot:!1,strokeOpacity:r.length>1&&y.length>1?.7+j*.1:1,strokeDasharray:r.length>1&&y.length>1&&j>0?"5 3":void 0,fill:"none",connectNulls:me,isAnimationActive:!1,clipPath:"url(#task-chart-clip)"},M)}))]},`line-${Object.keys(he).filter(m=>he[m]).join("-")}`):re==="area"?n.jsxs(Xa,{data:Ie,margin:{top:10,right:10,bottom:10,left:10},className:"chart-area",children:[n.jsxs("defs",{children:[n.jsx("clipPath",{id:"task-chart-clip",children:n.jsx("rect",{x:0,y:0,width:"100%",height:"100%"})}),kt.map((m,g)=>n.jsxs("linearGradient",{id:`area-gradient-${g}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0%",stopColor:m.primary,stopOpacity:.6}),n.jsx("stop",{offset:"100%",stopColor:m.secondary,stopOpacity:.05})]},g)),Object.entries(Ue).map(([m,g])=>n.jsxs("linearGradient",{id:`metric-gradient-${m}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0%",stopColor:g.color,stopOpacity:.6}),n.jsx("stop",{offset:"100%",stopColor:g.color,stopOpacity:.05})]},m))]}),n.jsx(Gn,{strokeDasharray:"3 3",stroke:"var(--gray-a3)",strokeOpacity:.3}),n.jsx(Gi,{dataKey:"time",tickFormatter:mt,stroke:"var(--gray-a6)"}),n.jsx(Ki,{stroke:"var(--gray-a6)",tickFormatter:B()}),n.jsx(Ji,{content:at}),v==="ping"?r.filter(m=>{const g=Re[m.uuid];return g&&g.validSamples>0&&!he[m.uuid]}).map(m=>{const g=S(m.uuid),M=r.findIndex(j=>j.uuid===m.uuid);return n.jsx(xi,{type:K?"monotone":"linear",dataKey:m.uuid,stroke:g.primary,fill:`url(#area-gradient-${M%kt.length})`,strokeWidth:1.5,stackId:"1"},m.uuid)}):r.filter(m=>!he[m.uuid]).flatMap(m=>y.map(g=>{var se,ae;const M=`${m.uuid}_${g}`,j=S(m.uuid);let V;return y.length===1?V=j.primary:r.length===1?V=((se=Ue[g])==null?void 0:se.color)||j.primary:V=((ae=Ue[g])==null?void 0:ae.color)||j.primary,n.jsx(xi,{type:K?"monotone":"linear",dataKey:M,stroke:V,fill:`url(#metric-gradient-${g})`,strokeWidth:1.5,stackId:g,connectNulls:me},M)}))]},`area-${Object.keys(he).filter(m=>he[m]).join("-")}`):n.jsxs(Ec,{data:Ie,margin:{top:10,right:10,bottom:10,left:10},className:"chart-composed",children:[n.jsxs("defs",{children:[n.jsx("clipPath",{id:"task-chart-clip",children:n.jsx("rect",{x:0,y:0,width:"100%",height:"100%"})}),kt.map((m,g)=>n.jsxs("linearGradient",{id:`composed-gradient-${g}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0%",stopColor:m.primary,stopOpacity:.4}),n.jsx("stop",{offset:"100%",stopColor:m.secondary,stopOpacity:.1})]},g)),Object.entries(Ue).map(([m,g])=>n.jsxs("linearGradient",{id:`metric-composed-gradient-${m}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0%",stopColor:g.color,stopOpacity:.4}),n.jsx("stop",{offset:"100%",stopColor:g.color,stopOpacity:.1})]},m))]}),n.jsx(Gn,{strokeDasharray:"3 3",stroke:"var(--gray-a3)",strokeOpacity:.3}),n.jsx(Gi,{dataKey:"time",tickFormatter:mt,stroke:"var(--gray-a6)"}),n.jsx(Ki,{stroke:"var(--gray-a6)",tickFormatter:B()}),n.jsx(Ji,{content:at}),v==="ping"?r.filter(m=>{const g=Re[m.uuid];return g&&g.validSamples>0&&!he[m.uuid]}).map(m=>{const g=S(m.uuid),M=r.findIndex(ae=>ae.uuid===m.uuid),j=r.filter(ae=>{const ce=Re[ae.uuid];return ce&&ce.validSamples>0&&!he[ae.uuid]});return j.findIndex(ae=>ae.uuid===m.uuid)<Math.ceil(j.length/2)?n.jsx(xi,{type:K?"monotone":"linear",dataKey:m.uuid,stroke:g.primary,fill:`url(#composed-gradient-${M%kt.length})`,strokeWidth:1.5,isAnimationActive:!1,connectNulls:me},m.uuid):n.jsx($t,{type:K?"monotone":"linear",dataKey:m.uuid,stroke:g.primary,strokeWidth:2,dot:!1,strokeOpacity:1,fill:"none",connectNulls:me,isAnimationActive:!1,clipPath:"url(#task-chart-clip)"},m.uuid)}):r.filter(m=>!he[m.uuid]).flatMap(m=>y.map((g,M)=>{var ke,Fe;const j=`${m.uuid}_${g}`,V=r.findIndex(We=>We.uuid===m.uuid),se=r.length*y.length,ae=V*y.length+M,ce=S(m.uuid);let ge;return y.length===1?ge=ce.primary:r.length===1?ge=((ke=Ue[g])==null?void 0:ke.color)||
145ce.primary:ge=((Fe=Ue[g])==null?void 0:Fe.color)||ce.primary,ae<se/2?n.jsx(xi,{type:K?"monotone":"linear",dataKey:j,stroke:ge,fill:`url(#metric-composed-gradient-${g})`,strokeWidth:1.5,connectNulls:me,isAnimationActive:!1},j):n.jsx($t,{type:K?"monotone":"linear",dataKey:j,stroke:ge,strokeWidth:2,dot:!1,strokeOpacity:1,fill:"none",strokeDasharray:r.length>1&&y.length>1&&V>0?"5 3":void 0,connectNulls:me,isAnimationActive:!1,clipPath:"url(#task-chart-clip)"},j)}))]},`composed-${Object.keys(he).filter(m=>he[m]).join("-")}`)}),d&&n.jsx("div",{className:"grid grid-cols-2 gap-2 mt-3",children:r.filter(m=>{const g=Re[m.uuid];return g&&(v==="ping"?g.validSamples>0:Object.keys(g.metrics||{}).length>0)}).slice(0,20).map(m=>{const g=he[m.uuid],M=S(m.uuid),j=Re[m.uuid],V=j&&(v==="ping"?j.current!==null:Object.keys(j.metrics||{}).length>0);return n.jsxs("button",{onClick:()=>Xe(m.uuid),className:"px-3 py-2 rounded-md flex items-center gap-2 transition-all",style:{background:g?"var(--gray-a3)":`${M.primary}20`,border:`1px solid ${g?"var(--gray-a5)":M.primary}40`,opacity:g?.5:V?1:.7},children:[n.jsx("div",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{background:V?M.primary:"var(--gray-a5)",opacity:g?.3:1}}),n.jsx("span",{className:"text-xs font-medium truncate flex-1 text-left",children:m.name}),g&&n.jsx(Vn,{size:12,className:"flex-shrink-0"})]},m.uuid)})})]})})})]})};function lo(r,o){const a=E.useRef(o);E.useEffect(function(){o!==a.current&&r.attributionControl!=null&&(a.current!=null&&r.attributionControl.removeAttribution(a.current),o!=null&&r.attributionControl.addAttribution(o)),a.current=o},[r,o])}function Qc(r,o,a){o.center!==a.center&&r.setLatLng(o.center),o.radius!=null&&o.radius!==a.radius&&r.setRadius(o.radius)}const eh=1;function th(r){return Object.freeze({__version:eh,map:r})}function co(r,o){return Object.freeze({...r,...o})}const vs=E.createContext(null);function dn(){const r=E.use(vs);if(r==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return r}function ih(r){function o(a,c){const{instance:u,context:f}=r(a).current;E.useImperativeHandle(c,()=>u);const{children:d}=a;return d==null?null:Ae.createElement(vs,{value:f},d)}return E.forwardRef(o)}function nh(r){function o(a,c){const[u,f]=E.useState(!1),{instance:d}=r(a,f).current;E.useImperativeHandle(c,()=>d),E.useEffect(function(){u&&d.update()},[d,u,a.children]);const _=d._contentNode;return _?Dr.createPortal(a.children,_):null}return E.forwardRef(o)}function sh(r){function o(a,c){const{instance:u}=r(a).current;return E.useImperativeHandle(c,()=>u),null}return E.forwardRef(o)}function xs(r,o){const a=E.useRef(void 0);E.useEffect(function(){return o!=null&&r.instance.on(o),a.current=o,function(){a.current!=null&&r.instance.off(a.current),a.current=null}},[r,o])}function fn(r,o){const a=r.pane??o.pane;return a?{...r,pane:a}:r}function rh(r,o){return function(c,u){const f=dn(),d=r(fn(c,f),f);return lo(f.map,c.attribution),xs(d.current,c.eventHandlers),o(d.current,f,c,u),d}}var wi={exports:{}};/* @preserve 146 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com 147 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade 148 */var oh=wi.exports,Er;function ah(){return Er||(Er=1,function(r,o){(function(a,c){c(o)})(oh,function(a){var c="1.9.4";function u(e){var t,i,s,l;for(i=1,s=arguments.length;i<s;i++){l=arguments[i];for(t in l)e[t]=l[t]}return e}var f=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}();function d(e,t){var i=Array.prototype.slice;if(e.bind)return e.bind.apply(e,i.call(arguments,1));var s=i.call(arguments,2);return function(){return e.apply(t,s.length?s.concat(i.call(arguments)):arguments)}}var _=0;function z(e){return"_leaflet_id"in e||(e._leaflet_id=++_),e._leaflet_id}function O(e,t,i){var s,l,h,p;return p=function(){s=!1,l&&(h.apply(i,l),l=!1)},h=function(){s?l=arguments:(e.apply(i,arguments),setTimeout(p,t),s=!0)},h}function x(e,t,i){var s=t[1],l=t[0],h=s-l;return e===s&&i?e:((e-l)%h+h)%h+l}function S(){return!1}function B(e,t){if(t===!1)return e;var i=Math.pow(10,t===void 0?6:t);return Math.round(e*i)/i}function v(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function W(e){return v(e).split(/\s+/)}function C(e,t){Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?f(e.options):{});for(var i in t)e.options[i]=t[i];return e.options}function R(e,t,i){var s=[];for(var l in e)s.push(encodeURIComponent(i?l.toUpperCase():l)+"="+encodeURIComponent(e[l]));return(!t||t.indexOf("?")===-1?"?":"&")+s.join("&")}var ie=/\{ *([\w_ -]+) *\}/g;function ne(e,t){return e.replace(ie,function(i,s){var l=t[s];if(l===void 0)throw new Error("No value provided for variable "+i);return typeof l=="function"&&(l=l(t)),l})}var $=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function ee(e,t){for(var i=0;i<e.length;i++)if(e[i]===t)return i;return-1}var ue="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Y(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var y=0;function k(e){var t=+new Date,i=Math.max(0,16-(t-y));
148return y=t+i,window.setTimeout(e,i)}var I=window.requestAnimationFrame||Y("RequestAnimationFrame")||k,Q=window.cancelAnimationFrame||Y("CancelAnimationFrame")||Y("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function G(e,t,i){if(i&&I===k)e.call(t);else return I.call(window,d(e,t))}function X(e){e&&Q.call(window,e)}var w={__proto__:null,extend:u,create:f,bind:d,get lastId(){return _},stamp:z,throttle:O,wrapNum:x,falseFn:S,formatNum:B,trim:v,splitWords:W,setOptions:C,getParamString:R,template:ne,isArray:$,indexOf:ee,emptyImageUrl:ue,requestFn:I,cancelFn:Q,requestAnimFrame:G,cancelAnimFrame:X};function A(){}A.extend=function(e){var t=function(){C(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=t.__super__=this.prototype,s=f(i);s.constructor=t,t.prototype=s;for(var l in this)Object.prototype.hasOwnProperty.call(this,l)&&l!=="prototype"&&l!=="__super__"&&(t[l]=this[l]);return e.statics&&u(t,e.statics),e.includes&&(Z(e.includes),u.apply(null,[s].concat(e.includes))),u(s,e),delete s.statics,delete s.includes,s.options&&(s.options=i.options?f(i.options):{},u(s.options,e.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var h=0,p=s._initHooks.length;h<p;h++)s._initHooks[h].call(this)}},t},A.include=function(e){var t=this.prototype.options;return u(this.prototype,e),e.options&&(this.prototype.options=t,this.mergeOptions(e.options)),this},A.mergeOptions=function(e){return u(this.prototype.options,e),this},A.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),i=typeof e=="function"?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};function Z(e){if(!(typeof L>"u"||!L||!L.Mixin)){e=$(e)?e:[e];for(var t=0;t<e.length;
148t++)e[t]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var D={on:function(e,t,i){if(typeof e=="object")for(var s in e)this._on(s,e[s],t);else{e=W(e);for(var l=0,h=e.length;l<h;l++)this._on(e[l],t,i)}return this},off:function(e,t,i){if(!arguments.length)delete this._events;else if(typeof e=="object")for(var s in e)this._off(s,e[s],t);else{e=W(e);for(var l=arguments.length===1,h=0,p=e.length;h<p;h++)l?this._off(e[h]):this._off(e[h],t,i)}return this},_on:function(e,t,i,s){if(typeof t!="function"){console.warn("wrong listener type: "+typeof t);return}if(this._listens(e,t,i)===!1){i===this&&(i=void 0);var l={fn:t,ctx:i};s&&(l.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(l)}},_off:function(e,t,i){var s,l,h;if(this._events&&(s=this._events[e],!!s)){if(arguments.length===1){if(this._firingCount)for(l=0,h=s.length;l<h;l++)s[l].fn=S;delete this._events[e];return}if(typeof t!="function"){console.warn("wrong listener type: "+typeof t);return}var p=this._listens(e,t,i);if(p!==!1){var P=s[p];this._firingCount&&(P.fn=S,this._events[e]=s=s.slice()),s.splice(p,1)}}},fire:function(e,t,i){if(!this.listens(e,i))return this;var s=u({},t,{type:e,target:this,sourceTarget:t&&t.sourceTarget||this});if(this._events){var l=this._events[e];if(l){this._firingCount=this._firingCount+1||1;for(var h=0,p=l.length;h<p;h++){var P=l[h],N=P.fn;P.once&&this.off(e,N,P.ctx),N.call(P.ctx||this,s)}this._firingCount--}}return i&&this._propagateEvent(s),this},listens:function(e,t,i,s){typeof e!="string"&&console.warn('"string" type argument expected');var l=t;typeof t!="function"&&(s=!!t,l=void 0,i=void 0);var h=this._events&&this._events[e];if(h&&h.length&&this._listens(e,l,i)!==!1)return!0;if(s){for(var p in this._eventParents)if(this._eventParents[p].listens(e,t,i,s))return!0}return!1},_listens:function(e,t,i){if(!this._events)return!1;var s=this._events[e]||[];if(!t)return!!s.length;i===this&&(i=void 0);for(var l=0,h=s.length;l<h;l++)if(s[l].fn===t&&s[l].ctx===i)return l;return!1},once:function(e,t,i){if(typeof e=="object")for(var s in e)this._on(s,e[s],t,!0);else{e=W(e);for(var l=0,h=e.length;l<h;l++)this._on(e[l],t,i,!0)}return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[z(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[z(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,u({layer:e.target,propagatedFrom:e.target},e),!0)}};D.addEventListener=D.on,D.removeEventListener=D.clearAllEventListeners=D.off,D.addOneTimeEventListener=D.once,D.fireEvent=D.fire,D.hasEventListeners=D.listens;var K=A.extend(D);function J(e,t,i){this.x=i?Math.round(e):e,this.y=i?Math.round(t):t}var he=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};J.prototype={clone:function(){return new J(this.x,this.y)},add:function(e){return this.clone()._add(U(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(U(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new J(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new J(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=he(this.x),this.y=he(this.y),this},distanceTo:function(e){e=U(e);var t=e.x-this.x,i=e.y-this.y;return Math.sqrt(t*t+i*i)},equals:function(e){return e=U(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=U(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+B(this.x)+", "+B(this.y)+")"}};function U(e,t,i){return e instanceof J?e:$(e)?new J(e[0],e[1]):e==null?e:typeof e=="object"&&"x"in e&&"y"in e?new J(e.x,e.y):new J(e,t,i)}function re(e,t){if(e)for(var i=t?[e,t]:e,s=0,l=i.length;s<l;s++)this.extend(i[s])}re.prototype={extend:function(e){var t,i;if(!e)return this;if(e instanceof J||typeof e[0]=="number"||"x"in e)t=i=U(e);else if(e=te(e),t=e.min,i=e.max,!t||!i)return this;
148return!this.min&&!this.max?(this.min=t.clone(),this.max=i.clone()):(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)),this},getCenter:function(e){return U((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return U(this.min.x,this.max.y)},getTopRight:function(){return U(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,i;return typeof e[0]=="number"||e instanceof J?e=U(e):e=te(e),e instanceof re?(t=e.min,i=e.max):t=i=e,t.x>=this.min.x&&i.x<=this.max.x&&t.y>=this.min.y&&i.y<=this.max.y},intersects:function(e){e=te(e);var t=this.min,i=this.max,s=e.min,l=e.max,h=l.x>=t.x&&s.x<=i.x,p=l.y>=t.y&&s.y<=i.y;return h&&p},overlaps:function(e){e=te(e);var t=this.min,i=this.max,s=e.min,l=e.max,h=l.x>t.x&&s.x<i.x,p=l.y>t.y&&s.y<i.y;return h&&p},isValid:function(){return!!(this.min&&this.max)},pad:function(e){var t=this.min,i=this.max,s=Math.abs(t.x-i.x)*e,l=Math.abs(t.y-i.y)*e;return te(U(t.x-s,t.y-l),U(i.x+s,i.y+l))},equals:function(e){return e?(e=te(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight())):!1}};function te(e,t){return!e||e instanceof re?e:new re(e,t)}function me(e,t){if(e)for(var i=t?[e,t]:e,s=0,l=i.length;s<l;s++)this.extend(i[s])}me.prototype={extend:function(e){var t=this._southWest,i=this._northEast,s,l;if(e instanceof le)s=e,l=e;else if(e instanceof me){if(s=e._southWest,l=e._northEast,!s||!l)return this}else return e?this.extend(fe(e)||H(e)):this;return!t&&!i?(this._southWest=new le(s.lat,s.lng),this._northEast=new le(l.lat,l.lng)):(t.lat=Math.min(s.lat,t.lat),t.lng=Math.min(s.lng,t.lng),i.lat=Math.max(l.lat,i.lat),i.lng=Math.max(l.lng,i.lng)),this},pad:function(e){var t=this._southWest,i=this._northEast,s=Math.abs(t.lat-i.lat)*e,l=Math.abs(t.lng-i.lng)*e;return new me(new le(t.lat-s,t.lng-l),new le(i.lat+s,i.lng+l))},getCenter:function(){return new le((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new le(this.getNorth(),this.getWest())},getSouthEast:function(){return new le(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){typeof e[0]=="number"||e instanceof le||"lat"in e?e=fe(e):e=H(e);var t=this._southWest,i=this._northEast,s,l;
148return e instanceof me?(s=e.getSouthWest(),l=e.getNorthEast()):s=l=e,s.lat>=t.lat&&l.lat<=i.lat&&s.lng>=t.lng&&l.lng<=i.lng},intersects:function(e){e=H(e);var t=this._southWest,i=this._northEast,s=e.getSouthWest(),l=e.getNorthEast(),h=l.lat>=t.lat&&s.lat<=i.lat,p=l.lng>=t.lng&&s.lng<=i.lng;return h&&p},overlaps:function(e){e=H(e);var t=this._southWest,i=this._northEast,s=e.getSouthWest(),l=e.getNorthEast(),h=l.lat>t.lat&&s.lat<i.lat,p=l.lng>t.lng&&s.lng<i.lng;return h&&p},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,t){return e?(e=H(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function H(e,t){return e instanceof me?e:new me(e,t)}function le(e,t,i){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,i!==void 0&&(this.alt=+i)}le.prototype={equals:function(e,t){if(!e)return!1;e=fe(e);var i=Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng));return i<=(t===void 0?1e-9:t)},toString:function(e){return"LatLng("+B(this.lat,e)+", "+B(this.lng,e)+")"},distanceTo:function(e){return Te.distance(this,fe(e))},wrap:function(){return Te.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,i=t/Math.cos(Math.PI/180*this.lat);return H([this.lat-t,this.lng-i],[this.lat+t,this.lng+i])},clone:function(){return new le(this.lat,this.lng,this.alt)}};function fe(e,t,i){return e instanceof le?e:$(e)&&typeof e[0]!="object"?e.length===3?new le(e[0],e[1],e[2]):e.length===2?new le(e[0],e[1]):null:e==null?e:typeof e=="object"&&"lat"in e?new le(e.lat,"lng"in e?e.lng:e.lon,e.alt):t===void 0?null:new le(e,t,i)}var Pe={latLngToPoint:function(e,t){var i=this.projection.project(e),s=this.scale(t);return this.transformation._transform(i,s)},pointToLatLng:function(e,t){var i=this.scale(t),s=this.transformation.untransform(e,i);return this.projection.unproject(s)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,i=this.scale(e),s=this.transformation.transform(t.min,i),l=this.transformation.transform(t.max,i);return new re(s,l)},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?x(e.lng,this.wrapLng,!0):e.lng,i=this.wrapLat?x(e.lat,this.wrapLat,!0):e.lat,s=e.alt;return new le(i,t,s)},wrapLatLngBounds:function(e){var t=e.getCenter(),i=this.wrapLatLng(t),s=t.lat-i.lat,l=t.lng-i.lng;if(s===0&&l===0)return e;
148var h=e.getSouthWest(),p=e.getNorthEast(),P=new le(h.lat-s,h.lng-l),N=new le(p.lat-s,p.lng-l);return new me(P,N)}},Te=u({},Pe,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var i=Math.PI/180,s=e.lat*i,l=t.lat*i,h=Math.sin((t.lat-e.lat)*i/2),p=Math.sin((t.lng-e.lng)*i/2),P=h*h+Math.cos(s)*Math.cos(l)*p*p,N=2*Math.atan2(Math.sqrt(P),Math.sqrt(1-P));return this.R*N}}),Ne=6378137,Se={R:Ne,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,i=this.MAX_LATITUDE,s=Math.max(Math.min(i,e.lat),-i),l=Math.sin(s*t);return new J(this.R*e.lng*t,this.R*Math.log((1+l)/(1-l))/2)},unproject:function(e){var t=180/Math.PI;return new le((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:function(){var e=Ne*Math.PI;return new re([-e,-e],[e,e])}()};function Be(e,t,i,s){if($(e)){this._a=e[0],this._b=e[1],this._c=e[2],this._d=e[3];return}this._a=e,this._b=t,this._c=i,this._d=s}Be.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t=t||1,new J((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}};function pe(e,t,i,s){return new Be(e,t,i,s)}var we=u({},Te,{code:"EPSG:3857",projection:Se,transformation:function(){var e=.5/(Math.PI*Se.R);return pe(e,.5,-e,.5)}()}),Ie=u({},we,{code:"EPSG:900913"});function Re(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Xe(e,t){var i="",s,l,h,p,P,N;for(s=0,h=e.length;s<h;s++){for(P=e[s],l=0,p=P.length;l<p;l++)N=P[l],i+=(l?"L":"M")+N.x+" "+N.y;i+=t?de.svg?"z":"x":""}return i||"M0 0"}var ft=document.documentElement.style,ot="ActiveXObject"in window,mt=ot&&!document.addEventListener,at="msLaunchUri"in navigator&&!("documentMode"in document),q=pt("webkit"),ye=pt("android"),m=pt("android 2")||pt("android 3"),g=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),M=ye&&pt("Google")&&g<537&&!("AudioNode"in window),j=!!window.opera,V=!at&&pt("chrome"),se=pt("gecko")&&!q&&!j&&!ot,ae=!V&&pt("safari"),ce=pt("phantom"),ge="OTransition"in ft,ke=navigator.platform.indexOf("Win")===0,Fe=ot&&"transition"in ft,We="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!m,Oe="MozPerspective"in ft,xt=!window.L_DISABLE_3D&&(Fe||We||Oe)&&!ge&&!ce,Le=typeof orientation<"u"||pt("mobile"),lt=Le&&q,Ot=Le&&We,St=!window.PointerEvent&&window.MSPointerEvent,ki=!!(window.PointerEvent||St),Dt="ontouchstart"in window||!!window.TouchEvent,Ht=!window.L_NO_TOUCH&&(Dt||ki),bs=Le&&j,oi=Le&&se,pn=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,po=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",S,t),window.removeEventListener("testPassiveEventSupport",S,t)}catch{}return e}(),go=function(){return!!document.createElement("canvas").getContext}(),gn=!!(document.createElementNS&&Re("svg").createSVGRect),_o=!!gn&&function(){var e=document.createElement("div");return e.innerHTML="<svg/>",(e.firstChild&&e.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),yo=!gn&&function(){try{var e=document.createElement("div");e.innerHTML='<v:shape adj="1"/>';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&typeof t.adj=="object"}catch{return!1}}(),vo=navigator.platform.indexOf("Mac")===0,xo=navigator.platform.indexOf("Linux")===0;function pt(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var de={ie:ot,ielt9:mt,edge:at,webkit:q,android:ye,android23:m,androidStock:M,opera:j,chrome:V,gecko:se,safari:ae,phantom:ce,opera12:ge,win:ke,ie3d:Fe,webkit3d:We,gecko3d:Oe,any3d:xt,mobile:Le,mobileWebkit:lt,mobileWebkit3d:Ot,msPointer:St,pointer:ki,touch:Ht,touchNative:Dt,mobileOpera:bs,mobileGecko:oi,retina:pn,passiveEvents:po,canvas:go,svg:gn,vml:yo,inlineSvg:_o,mac:vo,linux:xo},js=de.msPointer?"MSPointerDown":"pointerdown",zs=de.msPointer?"MSPointerMove":"pointermove",ks=de.msPointer?"MSPointerUp":"pointerup",Ps=de.msPointer?"MSPointerCancel":"pointercancel",_n={touchstart:js,touchmove:zs,touchend:ks,touchcancel:Ps},Cs={touchstart:Po,touchmove:Pi,touchend:Pi,touchcancel:Pi},Wt={},Ss=!1;function wo(e,t,i){return t==="touchstart"&&ko(),Cs[t]?(i=Cs[t].bind(this,i),e.addEventListener(_n[t],i,!1),i):(console.warn("wrong event specified:",t),S)}function bo(e,t,i){if(!_n[t]){console.warn("wrong event specified:",t);return}e.removeEventListener(_n[t],i,!1)}function jo(e){Wt[e.pointerId]=e}function zo(e){Wt[e.pointerId]&&(Wt[e.pointerId]=e)}function Ts(e){delete Wt[e.pointerId]}
148function ko(){Ss||(document.addEventListener(js,jo,!0),document.addEventListener(zs,zo,!0),document.addEventListener(ks,Ts,!0),document.addEventListener(Ps,Ts,!0),Ss=!0)}function Pi(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){t.touches=[];for(var i in Wt)t.touches.push(Wt[i]);t.changedTouches=[t],e(t)}}function Po(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Ke(t),Pi(e,t)}function Co(e){var t={},i,s;for(s in e)i=e[s],t[s]=i&&i.bind?i.bind(e):i;return e=t,t.type="dblclick",t.detail=2,t.isTrusted=!1,t._simulated=!0,t}var So=200;function To(e,t){e.addEventListener("dblclick",t);var i=0,s;function l(h){if(h.detail!==1){s=h.detail;return}if(!(h.pointerType==="mouse"||h.sourceCapabilities&&!h.sourceCapabilities.firesTouchEvents)){var p=Os(h);if(!(p.some(function(N){return N instanceof HTMLLabelElement&&N.attributes.for})&&!p.some(function(N){return N instanceof HTMLInputElement||N instanceof HTMLSelectElement}))){var P=Date.now();P-i<=So?(s++,s===2&&t(Co(h))):s=1,i=P}}}return e.addEventListener("click",l),{dblclick:t,simDblclick:l}}function No(e,t){e.removeEventListener("dblclick",t.dblclick),e.removeEventListener("click",t.simDblclick)}var yn=Ti(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ai=Ti(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Ns=ai==="webkitTransition"||ai==="OTransition"?ai+"End":"transitionend";function Ls(e){return typeof e=="string"?document.getElementById(e):e}function li(e,t){var i=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!i||i==="auto")&&document.defaultView){var s=document.defaultView.getComputedStyle(e,null);i=s?s[t]:null}return i==="auto"?null:i}function Ce(e,t,i){var s=document.createElement(e);return s.className=t||"",i&&i.appendChild(s),s}function Ze(e){var t=e.parentNode;t&&t.removeChild(e)}function Ci(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Ut(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function Vt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function vn(e,t){if(e.classList!==void 0)return e.classList.contains(t);var i=Si(e);return i.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(i)}function xe(e,t){if(e.classList!==void 0)for(var i=W(t),s=0,l=i.length;s<l;s++)e.classList.add(i[s]);else if(!vn(e,t)){var h=Si(e);xn(e,(h?h+" ":"")+t)}}function $e(e,t){e.classList!==void 0?e.classList.remove(t):xn(e,v((" "+Si(e)+" ").replace(" "+t+" "," ")))}function xn(e,t){e.className.baseVal===void 0?e.className=t:e.className.baseVal=t}function Si(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}function Qe(e,t){"opacity"in e.style?e.style.opacity=t:"filter"in e.style&&Lo(e,t)}function Lo(e,t){var i=!1,s="DXImageTransform.Microsoft.Alpha";try{i=e.filters.item(s)}catch{if(t===1)return}t=Math.round(t*100),i?(i.Enabled=t!==100,i.Opacity=t):e.style.filter+=" progid:"+s+"(opacity="+t+")"}function Ti(e){for(var t=document.documentElement.style,i=0;i<e.length;i++)if(e[i]in t)return e[i];return!1}function At(e,t,i){var s=t||new J(0,0);e.style[yn]=(de.ie3d?"translate("+s.x+"px,"+s.y+"px)":"translate3d("+s.x+"px,"+s.y+"px,0)")+(i?" scale("+i+")":"")}function De(e,t){e._leaflet_pos=t,de.any3d?At(e,t):(e.style.left=t.x+"px",e.style.top=t.y+"px")}function It(e){return e._leaflet_pos||new J(0,0)}var ci,hi,wn;if("onselectstart"in document)ci=function(){ve(window,"selectstart",Ke)},hi=function(){Me(window,"selectstart",Ke)};else{var ui=Ti(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ci=function(){if(ui){var e=document.documentElement.style;wn=e[ui],e[ui]="none"}},hi=function(){ui&&(document.documentElement.style[ui]=wn,wn=void 0)}}function bn(){ve(window,"dragstart",Ke)}function jn(){Me(window,"dragstart",Ke)}var Ni,zn;function kn(e){for(;e.tabIndex===-1;)e=e.parentNode;e.style&&(Li(),Ni=e,zn=e.style.outlineStyle,e.style.outlineStyle="none",ve(window,"keydown",Li))}function Li(){Ni&&(Ni.style.outlineStyle=zn,Ni=void 0,zn=void 0,Me(window,"keydown",Li))}function Ms(e){do e=e.parentNode;while((!e.offsetWidth||!e.offsetHeight)&&e!==document.body);return e}function Pn(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}var Mo={__proto__:null,TRANSFORM:yn,TRANSITION:ai,TRANSITION_END:Ns,get:Ls,getStyle:li,create:Ce,remove:Ze,empty:Ci,toFront:Ut,toBack:Vt,hasClass:vn,addClass:xe,removeClass:$e,setClass:xn,getClass:Si,setOpacity:Qe,testProp:Ti,setTransform:At,setPosition:De,getPosition:It,get disableTextSelection(){return ci},get enableTextSelection(){return hi},disableImageDrag:bn,enableImageDrag:jn,preventOutline:kn,restoreOutline:Li,getSizedParentNode:Ms,getScale:Pn};function ve(e,t,i,s){if(t&&typeof t=="object")for(var l in t)Sn(e,l,t[l],i);else{t=W(t);for(var h=0,p=t.length;h<p;h++)Sn(e,t[h],i,s)}return this}var gt="_leaflet_events";function Me(e,t,i,s){if(arguments.length===1)Es(e),delete e[gt];else if(t&&typeof t=="object")for(var l in t)Tn(e,l,t[l],i);else if(t=W(t),arguments.length===2)Es(e,function(P){return ee(t,P)!==-1});else for(var h=0,p=t.length;h<p;h++)Tn(e,t[h],i,s);return this}function Es(e,t){for(var i in e[gt]){var s=i.split(/\d/)[0];(!t||t(s))&&Tn(e,s,null,null,i)}}
148var Cn={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Sn(e,t,i,s){var l=t+z(i)+(s?"_"+z(s):"");if(e[gt]&&e[gt][l])return this;var h=function(P){return i.call(s||e,P||window.event)},p=h;!de.touchNative&&de.pointer&&t.indexOf("touch")===0?h=wo(e,t,h):de.touch&&t==="dblclick"?h=To(e,h):"addEventListener"in e?t==="touchstart"||t==="touchmove"||t==="wheel"||t==="mousewheel"?e.addEventListener(Cn[t]||t,h,de.passiveEvents?{passive:!1}:!1):t==="mouseenter"||t==="mouseleave"?(h=function(P){P=P||window.event,Ln(e,P)&&p(P)},e.addEventListener(Cn[t],h,!1)):e.addEventListener(t,p,!1):e.attachEvent("on"+t,h),e[gt]=e[gt]||{},e[gt][l]=h}function Tn(e,t,i,s,l){l=l||t+z(i)+(s?"_"+z(s):"");var h=e[gt]&&e[gt][l];if(!h)return this;!de.touchNative&&de.pointer&&t.indexOf("touch")===0?bo(e,t,h):de.touch&&t==="dblclick"?No(e,h):"removeEventListener"in e?e.removeEventListener(Cn[t]||t,h,!1):e.detachEvent("on"+t,h),e[gt][l]=null}function Bt(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function Nn(e){return Sn(e,"wheel",Bt),this}function di(e){return ve(e,"mousedown touchstart dblclick contextmenu",Bt),e._leaflet_disable_click=!0,this}function Ke(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function Rt(e){return Ke(e),Bt(e),this}function Os(e){if(e.composedPath)return e.composedPath();for(var t=[],i=e.target;i;)t.push(i),i=i.parentNode;return t}function As(e,t){if(!t)return new J(e.clientX,e.clientY);var i=Pn(t),s=i.boundingClientRect;return new J((e.clientX-s.left)/i.x-t.clientLeft,(e.clientY-s.top)/i.y-t.clientTop)}var Eo=de.linux&&de.chrome?window.devicePixelRatio:de.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Is(e){return de.edge?e.wheelDeltaY/2:e.deltaY&&e.deltaMode===0?-e.deltaY/Eo:e.deltaY&&e.deltaMode===1?-e.deltaY*20:e.deltaY&&e.deltaMode===2?-e.deltaY*60:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?-e.detail*20:e.detail?e.detail/-32765*60:0}function Ln(e,t){var i=t.relatedTarget;if(!i)return!0;try{for(;i&&i!==e;)i=i.parentNode}catch{return!1}return i!==e}var Oo={__proto__:null,on:ve,off:Me,stopPropagation:Bt,disableScrollPropagation:Nn,disableClickPropagation:di,preventDefault:Ke,stop:Rt,getPropagationPath:Os,getMousePosition:As,getWheelDelta:Is,isExternalTarget:Ln,addListener:ve,removeListener:Me},Bs=K.extend({run:function(e,t,i,s){this.stop(),this._el=e,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(s||.5,.2),this._startPos=It(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=G(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,i=this._duration*1e3;t<i?this._runFrame(this._easeOut(t/i),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){var i=this._startPos.add(this._offset.multiplyBy(e));t&&i._round(),De(this._el,i),this.fire("step")},_complete:function(){X(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),ze=K.extend({options:{crs:we,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,t){t=C(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=d(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.zoom!==void 0&&(this._zoom=this._limitZoom(t.zoom)),t.center&&t.zoom!==void 0&&this.setView(fe(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ai&&de.any3d&&!de.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ve(this._proxy,Ns,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
vendor: 6,753 bytes, line 148
148,setView:function(e,t,i){if(t=t===void 0?this._zoom:this._limitZoom(t),e=this._limitCenter(fe(e),t,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&i!==!0){i.animate!==void 0&&(i.zoom=u({animate:i.animate},i.zoom),i.pan=u({animate:i.animate,duration:i.duration},i.pan));var s=this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,i.zoom):this._tryAnimatedPan(e,i.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(e,t,i.pan&&i.pan.noMoveStart),this},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e=e||(de.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e=e||(de.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,i){var s=this.getZoomScale(t),l=this.getSize().divideBy(2),h=e instanceof J?e:this.latLngToContainerPoint(e),p=h.subtract(l).multiplyBy(1-1/s),P=this.containerPointToLatLng(l.add(p));return this.setView(P,t,{zoom:i})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():H(e);var i=U(t.paddingTopLeft||t.padding||[0,0]),s=U(t.paddingBottomRight||t.padding||[0,0]),l=this.getBoundsZoom(e,!1,i.add(s));if(l=typeof t.maxZoom=="number"?Math.min(t.maxZoom,l):l,l===1/0)return{center:e.getCenter(),zoom:l};var h=s.subtract(i).divideBy(2),p=this.project(e.getSouthWest(),l),P=this.project(e.getNorthEast(),l),N=this.unproject(p.add(P).divideBy(2).add(h),l);return{center:N,zoom:l}},fitBounds:function(e,t){if(e=H(e),!e.isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(e,t);return this.setView(i.center,i.zoom,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){if(e=U(e).round(),t=t||{},!e.x&&!e.y)return this.fire("moveend");if(t.animate!==!0&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Bs,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),t.animate!==!1){xe(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,i,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},flyTo:function(e,t,i){if(i=i||{},i.animate===!1||!de.any3d)return this.setView(e,t,i);this._stop();var s=this.project(this.getCenter()),l=this.project(e),h=this.getSize(),p=this._zoom;e=fe(e),t=t===void 0?p:t;var P=Math.max(h.x,h.y),N=P*this.getZoomScale(p,t),F=l.distanceTo(s)||1,oe=1.42,_e=oe*oe;function be(He){var Hi=He?-1:1,ba=He?N:P,ja=N*N-P*P+Hi*_e*_e*F*F,za=2*ba*_e*F,Dn=ja/za,_r=Math.sqrt(Dn*Dn+1)-Dn,ka=_r<1e-9?-18:Math.log(_r);return ka}function qe(He){return(Math.exp(He)-Math.exp(-He))/2}function Ve(He){return(Math.exp(He)+Math.exp(-He))/2}function tt(He){return qe(He)/Ve(He)}var Je=be(0);function Xt(He){return P*(Ve(Je)/Ve(Je+oe*He))}function ya(He){return P*(Ve(Je)*tt(Je+oe*He)-qe(Je))/_e}function va(He){return 1-Math.pow(1-He,1.5)}var xa=Date.now(),pr=(be(1)-Je)/oe,wa=i.duration?1e3*i.duration:1e3*pr*.8;function gr(){var He=(Date.now()-xa)/wa,Hi=va(He)*pr;He<=1?(this._flyToFrame=G(gr,this),this._move(this.unproject(s.add(l.subtract(s).multiplyBy(ya(Hi)/F)),p),this.getScaleZoom(P/Xt(Hi),p),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),gr.call(this),this},flyToBounds:function(e,t){var i=this._getBoundsCenterZoom(e,t);return this.flyTo(i.center,i.zoom,t)},setMaxBounds:function(e){return e=H(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var i=this.getCenter(),s=this._limitCenter(i,this._zoom,H(e));return i.equals(s)||this.panTo(s,t),this._enforcingBounds=!1,this},panInside:function(e,t){t=t||{};var i=U(t.paddingTopLeft||t.padding||[0,0]),s=U(t.paddingBottomRight||t.padding||[0,0]),l=this.project(this.getCenter()),h=this.project(e),p=this.getPixelBounds(),P=te([p.min.add(i),p.max.subtract(s)]),N=P.getSize();if(!P.contains(h)){this._enforcingBounds=!0;var F=h.subtract(P.getCenter()),oe=P.extend(h).getSize().subtract(N);l.x+=F.x<0?-oe.x:oe.x,l.y+=F.y<0?-oe.y:oe.y,this.panTo(this.unproject(l),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=u({animate:!1,pan:!0},e===!0?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),s=t.divideBy(2).round(),l=i.divideBy(2).round(),h=s.subtract(l);return!h.x&&!h.y?this:(e.animate&&e.pan?this.panBy(h):(e.pan&&this._rawPanBy(h),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(d(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=u({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=d(this._handleGeolocationResponse,this),i=d(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,i,e):navigator.geolocation.getCurrentPosition(t,i,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,i=e.message||(t===1?"permission denied":t===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t=e.coords.latitude,i=e.coords.longitude,s=new le(t,i),l=s.toBounds(e.coords.accuracy*2),h=this._locateOptions;
148if(h.setView){var p=this.getBoundsZoom(l);this.setView(s,h.maxZoom?Math.min(p,h.maxZoom):p)}var P={latlng:s,bounds:l,timestamp:e.timestamp};for(var N in e.coords)typeof e.coords[N]=="number"&&(P[N]=e.coords[N]);this.fire("locationfound",P)}},addHandler:function(e,t){if(!t)return this;var i=this[e]=new t(this);return this._handlers.push(i),this.options[e]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Ze(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(X(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var e;for(e in this._layers)this._layers[e].remove();for(e in this._panes)Ze(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var i="leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),s=Ce("div",i,t||this._mapPane);return e&&(this._panes[e]=s),s},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),t=this.unproject(e.getBottomLeft()),i=this.unproject(e.getTopRight());return new me(t,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,i){e=H(e),i=U(i||[0,0]);var s=this.getZoom()||0,l=this.getMinZoom(),h=this.getMaxZoom(),p=e.getNorthWest(),P=e.getSouthEast(),N=this.getSize().subtract(i),F=te(this.project(P,s),this.project(p,s)).getSize(),oe=de.any3d?this.options.zoomSnap:1,_e=N.x/F.x,be=N.y/F.y,qe=t?Math.max(_e,be):Math.min(_e,be);return s=this.getScaleZoom(qe,s),oe&&(s=Math.round(s/(oe/100))*(oe/100),s=t?Math.ceil(s/oe)*oe:Math.floor(s/oe)*oe),Math.max(l,Math.min(h,s))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new J(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var i=this._getTopLeftPoint(e,t);return new re(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(e===void 0?this.getZoom():e)},getPane:function(e){return typeof e=="string"?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var i=this.options.crs;return t=t===void 0?this._zoom:t,i.scale(e)/i.scale(t)},getScaleZoom:function(e,t){var i=this.options.crs;t=t===void 0?this._zoom:t;var s=i.zoom(e*i.scale(t));return isNaN(s)?1/0:s},project:function(e,t){return t=t===void 0?this._zoom:t,this.options.crs.latLngToPoint(fe(e),t)},unproject:function(e,t){return t=t===void 0?this._zoom:t,this.options.crs.pointToLatLng(U(e),t)},layerPointToLatLng:function(e){var t=U(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){var t=this.project(fe(e))._round();return t._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(fe(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(H(e))},distance:function(e,t){return this.options.crs.distance(fe(e),fe(t))},containerPointToLayerPoint:function(e){return U(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return U(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(U(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(fe(e)))},mouseEventToContainerPoint:function(e){return As(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=Ls(e);if(t){if(t._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ve(t,"scroll",this._onScroll,this),this._containerId=z(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&de.any3d,xe(e,"leaflet-container"+(de.touch?" leaflet-touch":"")+(de.retina?" leaflet-retina":"")+(de.ielt9?" leaflet-oldie":"")+(de.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=li(e,"position");t!=="absolute"&&t!=="relative"&&t!=="fixed"&&t!=="sticky"&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),De(this._mapPane,new J
148(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(xe(e.markerPane,"leaflet-zoom-hide"),xe(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,i){De(this._mapPane,new J(0,0));var s=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var l=this._zoom!==t;this._moveStart(l,i)._move(e,t)._moveEnd(l),this.fire("viewreset"),s&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,i,s){t===void 0&&(t=this._zoom);var l=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),s?i&&i.pinch&&this.fire("zoom",i):((l||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return X(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){De(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[z(this._container)]=this;var t=e?Me:ve;t(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),de.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){X(this._resizeRequest),this._resizeRequest=G(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var i=[],s,l=t==="mouseout"||t==="mouseover",h=e.target||e.srcElement,p=!1;h;){if(s=this._targets[z(h)],s&&(t==="click"||t==="preclick")&&this._draggableMoved(s)){p=!0;break}if(s&&s.listens(t,!0)&&(l&&!Ln(h,e)||(i.push(s),l))||h===this._container)break;h=h.parentNode}return!i.length&&!p&&!l&&this.listens(t,!0)&&(i=[this]),i},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t=e.target||e.srcElement;if(!(!this._loaded||t._leaflet_disable_events||e.type==="click"&&this._isClickDisabled(t))){var i=e.type;i==="mousedown"&&kn(t),this._fireDOMEvent(e,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,t,i){if(e.type==="click"){var s=u({},e);s.type="preclick",this._fireDOMEvent(s,s.type,i)}var l=this._findEventTargets(e,t);if(i){for(var h=[],p=0;p<i.length;p++)i[p].listens(t,!0)&&h.push(i[p]);l=h.concat(l)}if(l.length){t==="contextmenu"&&Ke(e);var P=l[0],N={originalEvent:e};if(e.type!=="keypress"&&e.type!=="keydown"&&e.type!=="keyup"){var F=P.getLatLng&&(!P._radius||P._radius<=10);N.containerPoint=F?this.latLngToContainerPoint(P.getLatLng()):this.mouseEventToContainerPoint(e),N.layerPoint=this.containerPointToLayerPoint(N.containerPoint),N.latlng=F?P.getLatLng():this.layerPointToLatLng(N.layerPoint)}for(p=0;p<l.length;p++)if(l[p].fire(t,N,!0),N.originalEvent._stopped||l[p].options.bubblingMouseEvents===!1&&ee(this._mouseEvents,t)!==-1)return}},_draggableMoved:function(e){return e=e.dragging&&e.dragging.enabled()?e:this,e.dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on("load",e,t),this},_getMapPanePos:function(){return It(this._mapPane)||new J(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){var i=e&&t!==void 0?this._getNewPixelOrigin(e,t):this.getPixelOrigin();return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var i=this.getSize()._divideBy(2);return this.project(e,t)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,i){var s=this._getNewPixelOrigin(i,t);return this.project(e,t)._subtract(s)},_latLngBoundsToNewLayerBounds:function(e,t,i){var s=this._getNewPixelOrigin(i,t);
vendor: 12,044 bytes, line 148
148return te([this.project(e.getSouthWest(),t)._subtract(s),this.project(e.getNorthWest(),t)._subtract(s),this.project(e.getSouthEast(),t)._subtract(s),this.project(e.getNorthEast(),t)._subtract(s)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,i){if(!i)return e;var s=this.project(e,t),l=this.getSize().divideBy(2),h=new re(s.subtract(l),s.add(l)),p=this._getBoundsOffset(h,i,t);return Math.abs(p.x)<=1&&Math.abs(p.y)<=1?e:this.unproject(s.add(p),t)},_limitOffset:function(e,t){if(!t)return e;var i=this.getPixelBounds(),s=new re(i.min.add(e),i.max.add(e));return e.add(this._getBoundsOffset(s,t))},_getBoundsOffset:function(e,t,i){var s=te(this.project(t.getNorthEast(),i),this.project(t.getSouthWest(),i)),l=s.min.subtract(e.min),h=s.max.subtract(e.max),p=this._rebound(l.x,-h.x),P=this._rebound(l.y,-h.y);return new J(p,P)},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),i=this.getMaxZoom(),s=de.any3d?this.options.zoomSnap:1;return s&&(e=Math.round(e/s)*s),Math.max(t,Math.min(i,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){$e(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var i=this._getCenterOffset(e)._trunc();return(t&&t.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,t),!0)},_createAnimProxy:function(){var e=this._proxy=Ce("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(t){var i=yn,s=this._proxy.style[i];At(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),s===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Ze(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();At(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var s=this.getZoomScale(t),l=this._getCenterOffset(e)._divideBy(1-1/s);return i.animate!==!0&&!this.getSize().contains(l)?!1:(G(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(e,t,!0)},this),!0)},_animateZoom:function(e,t,i,s){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,xe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:s}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(d(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&$e(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Ao(e,t){return new ze(e,t)}var ct=A.extend({options:{position:"topright"},initialize:function(e){C(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),i=this.getPosition(),s=e._controlCorners[i];return xe(t,"leaflet-control"),i.indexOf("bottom")!==-1?s.insertBefore(t,s.firstChild):s.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Ze(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),fi=function(e){return new ct(e)};ze.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t="leaflet-",i=this._controlContainer=Ce("div",t+"control-container",this._container);function s(l,h){var p=t+l+" "+t+h;e[l+h]=Ce("div",p,i)}s("top","left"),s("top","right"),s("bottom","left"),s("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)Ze(this._controlCorners[e]);Ze(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Rs=ct.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,i,s){return i<s?-1:s<i?1:0}},initialize:function(e,t,i){C(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var s in e)this._addLayer(e[s],s);for(s in t)this._addLayer(t[s],s,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(e){return ct.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){e.off("add remove",this._onLayerChange,this);var t=this._getLayer(z(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){xe(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(xe(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):$e(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return $e(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=Ce("div",e),i=this.options.collapsed;t.setAttribute("aria-haspopup",!0),di(t),Nn(t);var s=this._section=Ce("section",e+"-list");i&&(this._map.on("click",this.collapse,this),ve(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var l=this._layersLink=Ce("a",e+"-toggle",t);l.href="#",l.title="Layers",l.setAttribute("role","button"),ve(l,{keydown:function(h){h.keyCode===13&&this._expandSafely()},click:function(h){Ke(h),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=Ce("div",e+"-base",s),this._separator=Ce("div",e+"-separator",s),this._overlaysList=Ce("div",e+"-overlays",s),t.appendChild(s)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&z(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,i){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:i}),this.options.sortLayers&&this._layers.sort(d(function(s,l){return this.options.sortFunction(s.layer,l.layer,s.name,l.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Ci(this._baseLayersList),Ci(this._overlaysList),this._layerControlInputs=[];var e,t,i,s,l=0;for(i=0;i<this._layers.length;i++)s=this._layers[i],this._addItem(s),t=t||s.overlay,e=e||!s.overlay,l+=s.overlay?0:1;return this.options.hideSingleBase&&(e=e&&l>1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=t&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(z(e.target)),i=t.overlay?e.type==="add"?"overlayadd":"overlayremove":e.type==="add"?"baselayerchange":null;i&&this._map.fire(i,t)},_createRadioElement:function(e,t){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(t?' checked="checked"':"")+"/>",s=document.createElement("div");return s.innerHTML=i,s.firstChild},_addItem:function(e){var t=document.createElement("label"),i=this._map.hasLayer(e.layer),s;e.overlay?(s=document.createElement("input"),s.type="checkbox",s.className="leaflet-control-layers-selector",s.defaultChecked=i):s=this._createRadioElement("leaflet-base-layers_"+z(this),i),this._layerControlInputs.push(s),s.layerId=z(e.layer),ve(s,"click",this._onInputClick,this);var l=document.createElement("span");l.innerHTML=" "+e.name;var h=document.createElement("span");t.appendChild(h),h.appendChild(s),h.appendChild(l);var p=e.overlay?this._overlaysList:this._baseLayersList;return p.appendChild(t),this._checkDisabledLayers(),t},_onInputClick:function(){if(!this._preventClick){var e=this._layerControlInputs,t,i,s=[],l=[];this._handlingClick=!0;for(var h=e.length-1;h>=0;h--)t=e[h],i=this._getLayer(t.layerId).layer,t.checked?s.push(i):t.checked||l.push(i);for(h=0;h<l.length;h++)this._map.hasLayer(l[h])&&this._map.removeLayer(l[h]);for(h=0;h<s.length;h++)this._map.hasLayer(s[h])||this._map.addLayer(s[h]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e=this._layerControlInputs,t,i,s=this._map.getZoom(),l=e.length-1;l>=0;l--)t=e[l],i=this._getLayer(t.layerId).layer,t.disabled=i.options.minZoom!==void 0&&s<i.options.minZoom||i.options.maxZoom!==void 0&&s>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,ve(e,"click",Ke),this.expand();var t=this;setTimeout(function(){Me(e,"click",Ke),t._preventClick=!1})}}),Io=function(e,t,i){return new Rs(e,t,i)},Mn=ct.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",i=Ce("div",t+" leaflet-bar"),s=this.options;return this._zoomInButton=this._createButton(s.zoomInText,s.zoomInTitle,t+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(s.zoomOutText,s.zoomOutTitle,t+"-out",i,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,i,s,l){var h=Ce("a",i,s);return h.innerHTML=e,h.href="#",h.title=t,h.setAttribute("role","button"),h.setAttribute("aria-label",t),di(h),ve(h,"click",Rt),ve(h,"click",l,this),ve(h,"click",this._refocusOnMap,this),h},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";$e(this._zoomInButton,t),$e(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMin
148Zoom())&&(xe(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(xe(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}});ze.mergeOptions({zoomControl:!0}),ze.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Mn,this.addControl(this.zoomControl))});var Bo=function(e){return new Mn(e)},Zs=ct.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",i=Ce("div",t),s=this.options;return this._addScales(s,t+"-line",i),e.on(s.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),i},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,i){e.metric&&(this._mScale=Ce("div",t,i)),e.imperial&&(this._iScale=Ce("div",t,i))},_update:function(){var e=this._map,t=e.getSize().y/2,i=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(i)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),i=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,i,t/e)},_updateImperial:function(e){var t=e*3.2808399,i,s,l;t>5280?(i=t/5280,s=this._getRoundNum(i),this._updateScale(this._iScale,s+" mi",s/i)):(l=this._getRoundNum(t),this._updateScale(this._iScale,l+" ft",l/t))},_updateScale:function(e,t,i){e.style.width=Math.round(this.options.maxWidth*i)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),i=e/t;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,t*i}}),Ro=function(e){return new Zs(e)},Zo='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',En=ct.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(de.inlineSvg?Zo+" ":"")+"Leaflet</a>"},initialize:function(e){C(this,e),this._attributions={}},onAdd:function(e){e.attributionControl=this,this._container=Ce("div","leaflet-control-attribution"),di(this._container);for(var t in e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}});ze.mergeOptions({attributionControl:!0}),ze.addInitHook(function(){this.options.attributionControl&&new En().addTo(this)});var Fo=function(e){return new En(e)};ct.Layers=Rs,ct.Zoom=Mn,ct.Scale=Zs,ct.Attribution=En,fi.layers=Io,fi.zoom=Bo,fi.scale=Ro,fi.attribution=Fo;var _t=A.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});_t.addTo=function(e,t){return e.addHandler(t,this),this};var $o={Events:D},Fs=de.touch?"touchstart mousedown":"mousedown",Tt=K.extend({options:{clickTolerance:3},initialize:function(e,t,i,s){C(this,s),this._element=e,this._dragStartTarget=t||e,this._preventOutline=i},enable:function(){this._enabled||(ve(this._dragStartTarget,Fs,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Tt._dragging===this&&this.finishDrag(!0),Me(this._dragStartTarget,Fs,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!vn(this._element,"leaflet-zoom-anim"))){if(e.touches&&e.touches.length!==1){Tt._dragging===this&&this.finishDrag();return}if(!(Tt._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches)&&(Tt._dragging=this,this._preventOutline&&kn(this._element),bn(),ci(),!this._moving)){this.fire("down");var t=e.touches?e.touches[0]:e,i=Ms(this._element);this._startPoint=new J(t.clientX,t.clientY),this._startPos=It(this._element),this._parentScale=Pn(i);var s=e.type==="mousedown";ve(document,s?"mousemove":"touchmove",this._onMove,this),ve(document,s?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(e){if(this._enabled){if(e.touches&&e.touches.length>1){this._moved=!0;return}var t=e.touches&&e.touches.length===1?e.touches[0]:e,i=new J(t.clientX,t.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,Ke(e),this._moved||(this.fire("dragstart"),this._moved=!0,xe(d
vendor: 1,571 bytes, line 148
148ocument.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),xe(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,this._lastEvent=e,this._updatePosition())}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),De(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){$e(document.body,"leaflet-dragging"),this._lastTarget&&($e(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Me(document,"mousemove touchmove",this._onMove,this),Me(document,"mouseup touchend touchcancel",this._onUp,this),jn(),hi();var t=this._moved&&this._moving;this._moving=!1,Tt._dragging=!1,t&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function $s(e,t,i){var s,l=[1,4,2,8],h,p,P,N,F,oe,_e,be;for(h=0,oe=e.length;h<oe;h++)e[h]._code=Zt(e[h],t);for(P=0;P<4;P++){for(_e=l[P],s=[],h=0,oe=e.length,p=oe-1;h<oe;p=h++)N=e[h],F=e[p],N._code&_e?F._code&_e||(be=Mi(F,N,_e,t,i),be._code=Zt(be,t),s.push(be)):(F._code&_e&&(be=Mi(F,N,_e,t,i),be._code=Zt(be,t),s.push(be)),s.push(N));e=s}return e}function Ds(e,t){var i,s,l,h,p,P,N,F,oe;if(!e||e.length===0)throw new Error("latlngs not passed");et(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var _e=fe([0,0]),be=H(e),qe=be.getNorthWest().distanceTo(be.getSouthWest
148())*be.getNorthEast().distanceTo(be.getNorthWest());qe<1700&&(_e=On(e));var Ve=e.length,tt=[];for(i=0;i<Ve;i++){var Je=fe(e[i]);tt.push(t.project(fe([Je.lat-_e.lat,Je.lng-_e.lng])))}for(P=N=F=0,i=0,s=Ve-1;i<Ve;s=i++)l=tt[i],h=tt[s],p=l.y*h.x-h.y*l.x,N+=(l.x+h.x)*p,F+=(l.y+h.y)*p,P+=p*3;P===0?oe=tt[0]:oe=[N/P,F/P];var Xt=t.unproject(U(oe));return fe([Xt.lat+_e.lat,Xt.lng+_e.lng])}function On(e){for(var t=0,i=0,s=0,l=0;l<e.length;l++){var h=fe(e[l]);t+=h.lat,i+=h.lng,s++}return fe([t/s,i/s])}var Do={__proto__:null,clipPolygon:$s,polygonCenter:Ds,centroid:On};function Hs(e,t){if(!t||!e.length)return e.slice();var i=t*t;return e=Uo(e,i),e=Wo(e,i),e}function Ws(e,t,i){return Math.sqrt(mi(e,t,i,!0))}function Ho(e,t,i){return mi(e,t,i)}function Wo(e,t){var i=e.length,s=typeof Uint8Array<"u"?Uint8Array:Array,l=new s(i);l[0]=l[i-1]=1,An(e,l,t,0,i-1);var h,p=[];for(h=0;h<i;h++)l[h]&&p.push(e[h]);return p}function An(e,t,i,s,l){var h=0,p,P,N;for(P=s+1;P<=l-1;P++)N=mi(e[P],e[s],e[l],!0),N>h&&(p=P,h=N);h>i&&(t[p]=1,An(e,t,i,s,p),An(e,t,i,p,l))}function Uo(e,t){for(var i=[e[0]],s=1,l=0,h=e.length;s<h;s++)Vo(e[s],e[l])>t&&(i.push(e[s]),l=s);return l<h-1&&i.push(e[h-1]),i}var Us;function Vs(e,t,i,s,l){var h=s?Us:Zt(e,i),p=Zt(t,i),P,N,F;for(Us=p;;){if(!(h|p))return[e,t];if(h&p)return!1;P=h||p,N=Mi(e,t,P,i,l),F=Zt(N,i),P===h?(e=N,h=F):(t=N,p=F)}}function Mi(e,t,i,s,l){var h=t.x-e.x,p=t.y-e.y,P=s.min,N=s.max,F,oe;return i&8?(F=e.x+h*(N.y-e.y)/p,oe=N.y):i&4?(F=e.x+h*(P.y-e.y)/p,oe=P.y):i&2?(F=N.x,oe=e.y+p*(N.x-e.x)/h):i&1&&(F=P.x,oe=e.y+p*(P.x-e.x)/h),new J(F,oe,l)}function Zt(e,t){var i=0;return e.x<t.min.x?i|=1:e.x>t.max.x&&(i|=2),e.y<t.min.y?i|=4:e.y>t.max.y&&(i|=8),i}function Vo(e,t){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function mi(e,t,i,s){var l=t.x,h=t.y,p=i.x-l,P=i.y-h,N=p*p+P*P,F;return N>0&&(F=((e.x-l)*p+(e.y-h)*P)/N,F>1?(l=i.x,h=i.y):F>0&&(l+=p*F,h+=P*F)),p=e.x-l,P=e.y-h,s?p*p+P*P:new J(l,h)}function et(e){return!$(e[0])||typeof e[0][0]!="object"&&typeof e[0][0]<"u"}function Gs(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),et(e)}function Ks(e,t){var i,s,l,h,p,P,N,F;if(!e||e.length===0)throw new Error("latlngs not passed");et(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var oe=fe([0,0]),_e=H(e),be=_e.getNorthWest().distanceTo(_e.getSouthWest
vendor: 3,726 bytes, line 148
148())*_e.getNorthEast().distanceTo(_e.getNorthWest());be<1700&&(oe=On(e));var qe=e.length,Ve=[];for(i=0;i<qe;i++){var tt=fe(e[i]);Ve.push(t.project(fe([tt.lat-oe.lat,tt.lng-oe.lng])))}for(i=0,s=0;i<qe-1;i++)s+=Ve[i].distanceTo(Ve[i+1])/2;if(s===0)F=Ve[0];else for(i=0,h=0;i<qe-1;i++)if(p=Ve[i],P=Ve[i+1],l=p.distanceTo(P),h+=l,h>s){N=(h-s)/l,F=[P.x-N*(P.x-p.x),P.y-N*(P.y-p.y)];break}var Je=t.unproject(U(F));return fe([Je.lat+oe.lat,Je.lng+oe.lng])}var Go={__proto__:null,simplify:Hs,pointToSegmentDistance:Ws,closestPointOnSegment:Ho,clipSegment:Vs,_getEdgeIntersection:Mi,_getBitCode:Zt,_sqClosestPointOnSegment:mi,isFlat:et,_flat:Gs,polylineCenter:Ks},In={project:function(e){return new J(e.lng,e.lat)},unproject:function(e){return new le(e.y,e.x)},bounds:new re([-180,-90],[180,90])},Bn={R:6378137,R_MINOR:6356752314245179e-9,bounds:new re([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(e){var t=Math.PI/180,i=this.R,s=e.lat*t,l=this.R_MINOR/i,h=Math.sqrt(1-l*l),p=h*Math.sin(s),P=Math.tan(Math.PI/4-s/2)/Math.pow((1-p)/(1+p),h/2);return s=-i*Math.log(Math.max(P,1e-10)),new J(e.lng*t*i,s)},unproject:function(e){for(var t=180/Math.PI,i=this.R,s=this.R_MINOR/i,l=Math.sqrt(1-s*s),h=Math.exp(-e.y/i),p=Math.PI/2-2*Math.atan(h),P=0,N=.1,F;P<15&&Math.abs(N)>1e-7;P++)F=l*Math.sin(p),F=Math.pow((1-F)/(1+F),l/2),N=Math.PI/2-2*Math.atan(h*F)-p,p+=N;return new le(p*t,e.x*t/i)}},Ko={__proto__:null,LonLat:In,Mercator:Bn,SphericalMercator:Se},qo=u({},Te,{code:"EPSG:3395",projection:Bn,transformation:function(){var e=.5/(Math.PI*Bn.R);return pe(e,.5,-e,.5)}()}),qs=u({},Te,{code:"EPSG:4326",projection:In,transformation:pe(1/180,1,-1/180,.5)}),Jo=u({},Pe,{projection:In,transformation:pe(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var i=t.lng-e.lng,s=t.lat-e.lat;return Math.sqrt(i*i+s*s)},infinite:!0});Pe.Earth=Te,Pe.EPSG3395=qo,Pe.EPSG3857=we,Pe.EPSG900913=Ie,Pe.EPSG4326=qs,Pe.Simple=Jo;var ht=K.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[z(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[z(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var i=this.getEvents();t.on(i,this),this.once("remove",function(){t.off(i,this)},this)}this.onAdd(t),this.fire("add"),t.fire("layeradd",{layer:this})}}});ze.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=z(e);return this._layers[t]?this:(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var t=z(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return z(e)in this._layers},eachLayer:function(e,t){for(var i in this._layers)e.call(t,this._layers[i]);return this},_addLayers:function(e){e=e?$(e)?e:[e]:[];for(var t=0,i=e.length;t<i;t++)this.addLayer(e[t])},_addZoomLimit:function(e){(!isNaN(e.options.maxZoom)||!isNaN(e.options.minZoom))&&(this._zoomBoundLayers[z(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=z(e);
vendor: 14,424 bytes, line 148
148this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,t=-1/0,i=this._getZoomSpan();for(var s in this._zoomBoundLayers){var l=this._zoomBoundLayers[s].options;e=l.minZoom===void 0?e:Math.min(e,l.minZoom),t=l.maxZoom===void 0?t:Math.max(t,l.maxZoom)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Gt=ht.extend({initialize:function(e,t){C(this,t),this._layers={};var i,s;if(e)for(i=0,s=e.length;i<s;i++)this.addLayer(e[i])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){var t=typeof e=="number"?e:this.getLayerId(e);return t in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t=Array.prototype.slice.call(arguments,1),i,s;for(i in this._layers)s=this._layers[i],s[e]&&s[e].apply(s,t);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var i in this._layers)e.call(t,this._layers[i]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return z(e)}}),Yo=function(e,t){return new Gt(e,t)},wt=Gt.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),Gt.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),Gt.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new me;for(var t in this._layers){var i=this._layers[t];e.extend(i.getBounds?i.getBounds():i.getLatLng())}return e}}),Xo=function(e,t){return new wt(e,t)},Kt=A.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){C(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var i=this._getIconUrl(e);if(!i){if(e==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var s=this._createImg(i,t&&t.tagName==="IMG"?t:null);return this._setIconStyles(s,e),(this.options.crossOrigin||this.options.crossOrigin==="")&&(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),s},_setIconStyles:function(e,t){var i=this.options,s=i[t+"Size"];typeof s=="number"&&(s=[s,s]);var l=U(s),h=U(t==="shadow"&&i.shadowAnchor||i.iconAnchor||l&&l.divideBy(2,!0));e.className="leaflet-marker-"+t+" "+(i.className||""),h&&(e.style.marginLeft=-h.x+"px",e.style.marginTop=-h.y+"px"),l&&(e.style.width=l.x+"px",e.style.height=l.y+"px")},_createImg:function(e,t){return t=t||document.createElement("img"),t.src=e,t},_getIconUrl:function(e){return de.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});function Qo(e){return new Kt(e)}var pi=Kt.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return typeof pi.imagePath!="string"&&(pi.imagePath=this._detectIconPath()),(this.options.imagePath||pi.imagePath)+Kt.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var t=function(i,s,l){var h=s.exec(i);return h&&h[l]};return e=t(e,/^url\((['"])?(.+)\1\)$/,2),e&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=Ce("div","leaflet-default-icon-path",document.body),t=li(e,"background-image")||li(e,"backgroundImage");if(document.body.removeChild(e),t=this._stripUrl(t),t)return t;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),Js=_t.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new Tt(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),xe(e,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&$e(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,i=t._map,s=this._marker.options.autoPanSpeed,l=this._marker.options.autoPanPadding,h=It(t._icon),p=i.getPixelBounds(),P=i.getPixelOrigin(),N=te(p.min._subtract(P).add(l),p.max._subtract(P).subtract(l));if(!N.contains(h)){var F=U((Math.max(N.max.x,h.x)-N.max.x)/(p.max.x-N.max.x)-(Math.min(N.min.x,h.x)-N.min.x)/(p.min.x-N.min.x),(Math.max(N.max.y,h.y)-N.max.y)/(p.max.y-N.max.y)-(Math.min(N.min.y,h.y)-N.min.y)/(p.min.y-N.min.y)).multiplyBy(s);i.panBy(F,{animate:!1}),this._draggable._newPos._add(F),this._draggable._startPos._add(F),De(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=G(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(X(this._panRequest),this._panRequest=G(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,i=t._shadow,s=It(t._icon),l=t._map.layerPointToLatLng(s);i&&De(i,s),t._latlng=l,e.latlng=l,e.oldLatLng=this._oldLatLng,t.fire("move",e).fire("drag",e)},_onDragEnd:function(e){X(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),Ei=ht.extend({options:{icon:new pi,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,t){C(this,t),this._latlng=fe(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var t=this._latlng;return this._latlng=fe(e),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,t="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=e.icon.createIcon(this._icon),s=!1;i!==this._icon&&(this._icon&&this._removeIcon(),s=!0,e.title&&(i.title=e.title),i.tagName==="IMG"&&(i.alt=e.alt||"")),xe(i,t),e.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ve(i,"focus",this._panOnFocus,this);var l=e.icon.createShadow(this._shadow),h=!1;l!==this._shadow&&(this._removeShadow(),h=!0),l&&(xe(l,t),l.alt=""),this._shadow=l,e.opacity<1&&this._updateOpacity(),s&&this.getPane().appendChild(this._icon),this._initInteraction(),l&&h&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Me(this._icon,"focus",this._panOnFocus,this),Ze(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Ze(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&De(this._icon,e),this._shadow&&De(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(xe(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Js)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Js(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&Qe(this._icon,e),this._shadow&&Qe(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e=this._map;if(e){var t=this.options.icon.options,i=t.iconSize?U(t.iconSize):U(0,0),s=t.iconAnchor?U(t.iconAnchor):U(0,0);e.panInside(this._latlng,{paddingTopLeft:s,paddingBottomRight:i.subtract(s)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function ea(e,t){return new Ei(e,t)}var Nt=ht.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return C(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Oi=Nt.extend({options:{fill:!0,radius:10},initialize:function(e,t){C(this,t),this._latlng=fe(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=fe(e),this.redraw(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return Nt.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,i=this._clickTolerance(),s=[e+i,t+i];this._pxBounds=new re(this._point.subtract(s),this._point.add(s))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ta(e,t){return new Oi(e,t)}var Rn=Oi.extend({initialize:function(e,t,i){if(typeof t=="number"&&(t=u({},i,{radius:t})),C(this,t),this._latlng=fe(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new me(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:Nt.prototype.setStyle,_project:function(){var e=this._latlng.lng,t=this._latlng.lat,i=this._map,s=i.options.crs;if(s.distance===Te.distance){var l=Math.PI/180,h=this._mRadius/Te.R/l,p=i.project([t+h,e]),P=i.project([t-h,e]),N=p.add(P).divideBy(2),F=i.unproject(N).lat,oe=Math.acos((Math.cos(h*l)-Math.sin(t*l)*Math.sin(F*l))/(Math.cos(t*l)*Math.cos(F*l)))/l;(isNaN(oe)||oe===0)&&(oe=h/Math.cos(Math.PI/180*t)),this._point=N.subtract(i.getPixelOrigin()),this._radius=isNaN(oe)?0:N.x-i.project([F,e-oe]).x,this._radiusY=N.y-p.y}else{var _e=s.unproject(s.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(_e).x}this._updateBounds()}});function ia(e,t,i){return new Rn(e,t,i)}var bt=Nt.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){C(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t=1/0,i=null,s=mi,l,h,p=0,P=this._parts.length;p<P;p++)for(var N=this._parts[p],F=1,oe=N.length;F<oe;F++){l=N[F-1],h=N[F];var _e=s(e,l,h,!0);_e<t&&(t=_e,i=s(e,l,h))}return i&&(i.distance=Math.sqrt(t)),i}
148,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Ks(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=fe(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new me,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return et(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],i=et(e),s=0,l=e.length;s<l;s++)i?(t[s]=fe(e[s]),this._bounds.extend(t[s])):t[s]=this._convertLatLngs(e[s]);return t},_project:function(){var e=new re;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),t=new J(e,e);this._rawPxBounds&&(this._pxBounds=new re([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(e,t,i){var s=e[0]instanceof le,l=e.length,h,p;if(s){for(p=[],h=0;h<l;h++)p[h]=this._map.latLngToLayerPoint(e[h]),i.extend(p[h]);t.push(p)}else for(h=0;h<l;h++)this._projectLatlngs(e[h],t,i)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}var t=this._parts,i,s,l,h,p,P,N;for(i=0,l=0,h=this._rings.length;i<h;i++)for(N=this._rings[i],s=0,p=N.length;s<p-1;s++)P=Vs(N[s],N[s+1],e,s,!0),P&&(t[l]=t[l]||[],t[l].push(P[0]),(P[1]!==N[s+1]||s===p-2)&&(t[l].push(P[1]),l++))}},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,i=0,s=e.length;i<s;i++)e[i]=Hs(e[i],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var i,s,l,h,p,P,N=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(i=0,h=this._parts.length;i<h;i++)for(P=this._parts[i],s=0,p=P.length,l=p-1;s<p;l=s++)if(!(!t&&s===0)&&Ws(e,P[l],P[s])<=N)return!0;return!1}});function na(e,t){return new bt(e,t)}bt._flat=Gs;var qt=bt.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
148,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Ds(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var t=bt.prototype._convertLatLngs.call(this,e),i=t.length;return i>=2&&t[0]instanceof le&&t[0].equals(t[i-1])&&t.pop(),t},_setLatLngs:function(e){bt.prototype._setLatLngs.call(this,e),et(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return et(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,i=new J(t,t);if(e=new re(e.min.subtract(i),e.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}for(var s=0,l=this._rings.length,h;s<l;s++)h=$s(this._rings[s],e,!0),h.length&&this._parts.push(h)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t=!1,i,s,l,h,p,P,N,F;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(h=0,N=this._parts.length;h<N;h++)for(i=this._parts[h],p=0,F=i.length,P=F-1;p<F;P=p++)s=i[p],l=i[P],s.y>e.y!=l.y>e.y&&e.x<(l.x-s.x)*(e.y-s.y)/(l.y-s.y)+s.x&&(t=!t);return t||bt.prototype._containsPoint.call(this,e,!0)}});function sa(e,t){return new qt(e,t)}var jt=wt.extend({initialize:function(e,t){C(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t=$(e)?e:e.features,i,s,l;if(t){for(i=0,s=t.length;i<s;i++)l=t[i],(l.geometries||l.geometry||l.features||l.coordinates)&&this.addData(l);return this}var h=this.options;if(h.filter&&!h.filter(e))return this;var p=Ai(e,h);return p?(p.feature=Ri(e),p.defaultOptions=p.options,this.resetStyle(p),h.onEachFeature&&h.onEachFeature(e,p),this.addLayer(p)):this},resetStyle:function(e){return e===void 0?this.eachLayer(this.resetStyle,this):(e.options=u({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(e,t){e.setStyle&&(typeof t=="function"&&(t=t(e.feature)),e.setStyle(t))}});function Ai(e,t){var i=e.type==="Feature"?e.geometry:e,s=i?i.coordinates:null,l=[],h=t&&t.pointToLayer,p=t&&t.coordsToLatLng||Zn,P,N,F,oe;if(!s&&!i)return null;switch(i.type){case"Point":return P=p(s),Ys(h,e,P,t);case"MultiPoint":for(F=0,oe=s.length;F<oe;F++)P=p(s[F]),l.push(Ys(h,e,P,t));return new wt(l);case"LineString":case"MultiLineString":return N=Ii(s,i.type==="LineString"?0:1,p),new bt(N,t);case"Polygon":case"MultiPolygon":return N=Ii(s,i.type==="Polygon"?1:2,p),new qt(N,t);case"GeometryCollection":for(F=0,oe=i.geometries.length;F<oe;F++){var _e=Ai({geometry:i.geometries[F],type:"Feature",properties:e.properties},t);_e&&l.push(_e)}return new wt(l);case"FeatureCollection":for(F=0,oe=i.features.length;F<oe;F++){var be=Ai(i.features[F],t);be&&l.push(be)}return new wt(l);default:throw new Error("Invalid GeoJSON object.")}}function Ys(e,t,i,s){return e?e(t,i):new Ei(i,s&&s.markersInheritOptions&&s)}function Zn(e){return new le(e[1],e[0],e[2])}function Ii(e,t,i){for(var s=[],l=0,h=e.length,p;l<h;l++)p=t?Ii(e[l],t-1,i):(i||Zn)(e[l]),s.push(p);return s}function Fn(e,t){return e=fe(e),e.alt!==void 0?[B(e.lng,t),B(e.lat,t),B(e.alt,t)]:[B(e.lng,t),B(e.lat,t)]}function Bi(e,t,i,s){for(var l=[],h=0,p=e.length;h<p;h++)l.push(t?Bi(e[h],et(e[h])?0:t-1,i,s):Fn(e[h],s));return!t&&i&&l.length>0&&l.push(l[0].slice()),l}function Jt(e,t){return e.feature?u({},e.feature,{geometry:t}):Ri(t)}function Ri(e){return e.type==="Feature"||e.type==="FeatureCollection"?e:{type:"Feature",properties:{},geometry:e}}var $n={toGeoJSON:function(e){return Jt(this,{type:"Point",coordinates:Fn(this.getLatLng(),e)})}};Ei.include($n),Rn.include($n),Oi.include($n),bt.include({toGeoJSON:function(e){var t=!et(this._latlngs),i=Bi(this._latlngs,t?1:0,!1,e);return Jt(this,{type:(t?"Multi":"")+"LineString",coordinates:i})}}),qt.include({toGeoJSON:function(e){var t=!et(this._latlngs),i=t&&!et(this._latlngs[0]),s=Bi(this._latlngs,i?2:t?1:0,!0,e);return t||(s=[s]),Jt(this,{type:(i?"Multi":"")+"Polygon",coordinates:s})}}),Gt.include({toMultiPoint:function(e){var t=[];return this.eachLayer(function(i){t.push(i.toGeoJSON(e).geometry.coordinates)}),Jt(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(t==="MultiPoint")return this.toMultiPoint(e);var i=t==="GeometryCollection",s=[];return this.eachLayer(function(l){if(l.toGeoJSON){var h=l.toGeoJSON(e);if(i)s.push(h.geometry);else{var p=Ri(h);p.type==="FeatureCollection"?s.push.apply(s,p.features):s.push(p)}}}),i?Jt(this,{geometries:s,type:"GeometryCollection"}):{type:"FeatureCollection",features:s}}});function Xs(e,t){return new jt(e,t)}var ra=Xs,Zi=ht.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,i){this._url=e,this._bounds=H(t),C(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(xe(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Ze(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&Ut(this._image),this},bringToBack:function(){return this._map&&Vt(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=H(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e=this._url.tagName==="IMG",t=this._image=e?this._url:Ce("img");if(xe(t,"leaflet-image-layer"),this._zoomAnimated&&xe(t,"leaflet-zoom-animated"),this.options.className&&xe(t,this.options.className),t.onselectstart=S,t.onmousemove=S,t.onload=d(this.fire,this,"load"),t.onerror=d(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(t.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e){this._url=t.src;return}t.src=this._url,t.alt=this.options.alt},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;At(this._image,i,t)},_reset:function(){var e=this._image,t=new re(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=t.getSize();De(e,t.min),e.style.width=i.x+"px",e.style.height=i.y+"px"},_updateOpacity:function(){Qe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),oa=function(e,t,i){return new Zi(e,t,i)},Qs=Zi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInl
vendor: 19,537 bytes, line 148
148ine:!0},_initImage:function(){var e=this._url.tagName==="VIDEO",t=this._image=e?this._url:Ce("video");if(xe(t,"leaflet-image-layer"),this._zoomAnimated&&xe(t,"leaflet-zoom-animated"),this.options.className&&xe(t,this.options.className),t.onselectstart=S,t.onmousemove=S,t.onloadeddata=d(this.fire,this,"load"),e){for(var i=t.getElementsByTagName("source"),s=[],l=0;l<i.length;l++)s.push(i[l].src);this._url=i.length>0?s:[t.src];return}$(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,"objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var h=0;h<this._url.length;h++){var p=Ce("source");p.src=this._url[h],t.appendChild(p)}}});function aa(e,t,i){return new Qs(e,t,i)}var er=Zi.extend({_initImage:function(){var e=this._image=this._url;xe(e,"leaflet-image-layer"),this._zoomAnimated&&xe(e,"leaflet-zoom-animated"),this.options.className&&xe(e,this.options.className),e.onselectstart=S,e.onmousemove=S}});function la(e,t,i){return new er(e,t,i)}var yt=ht.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,t){e&&(e instanceof le||$(e))?(this._latlng=fe(e),C(this,t)):(C(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return e=arguments.length?e:this._source._map,e.hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&Qe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&Qe(this._container,1),this.bringToFront(),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(Qe(this._container,0),this._removeTimeout=setTimeout(d(Ze,void 0,this._container),200)):Ze(this._container),this.options.interactive&&($e(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=fe(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Ut(this._container),this},bringToBack:function(){return this._map&&Vt(this._container),this},_prepareOpen:function(e){var t=this._source;if(!t._map)return!1;if(t instanceof wt){t=null;var i=this._source._layers;for(var s in i)if(i[s]._map){t=i[s];break}if(!t)return!1;this._source=t}if(!e)if(t.getCenter)e=t.getCenter();else if(t.getLatLng)e=t.getLatLng();else if(t.getBounds)e=t.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof t=="string")e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=U(this.options.offset),i=this._getAnchor();this._zoomAnimated?De(this._container,e.add(i)):t=t.add(e).add(i);var s=this._containerBottom=-t.y,l=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=s+"px",this._container.style.left=l+"px"}},_getAnchor:function(){return[0,0]}});ze.include({_initOverlay:function(e,t,i,s){var l=t;return l instanceof e||(l=new e(s).setContent(t)),i&&l.setLatLng(i),l}}),ht.include({_initOverlay:function(e,t,i,s){var l=i;return l instanceof e?(C(l,s),l._source=this):(l=t&&!s?t:new e(s,this),l.setContent(i)),l}});var Fi=yt.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(e){return e=arguments.length?e:this._source._map,!e.hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,yt.prototype.openOn.call(this,e)},onAdd:function(e){yt.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Nt||this._source.on("preclick",Bt))},onRemove:function(e){yt.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Nt||this._source.off("preclick",Bt))},getEvents:function(){var e=yt.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",t=this._container=Ce("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=Ce("div",e+"-content-wrapper",t);if(this._contentNode=Ce("div",e+"-content",i),di(t),Nn(this._contentNode),ve(t,"contextmenu",Bt),this._tipContainer=Ce("div",e+"-tip-container",t),this._tip=Ce("div",e+"-tip",this._tipContainer),this.options.closeButton){var s=this._closeButton=Ce("a",e+"-close-button",t);s.setAttribute("role","button"),s.setAttribute("aria-label","Close popup"),s.href="#close",s.innerHTML='<span aria-hidden="true">×</span>',ve(s,"click",function(l){Ke(l),this.close()},this)}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width="",t.whiteSpace="nowrap";var i=e.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),t.width=i+1+"px",t.whiteSpace="",t.height="";var s=e.offsetHeight,l=this.options.maxHeight,h="leaflet-popup-scrolled";l&&s>l?(t.height=l+"px",xe(e,h)):$e(e,h),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),i=this._getAnchor();De(this._container,t.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var e=this._map,t=parseInt(li(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+t,s=this._containerWidth,l=new J(this._containerLeft,-i-this._containerBottom);l._add(It(this._container));var h=e.layerPointToContainerPoint(l),p=U(this.options.autoPanPadding),P=U(this.options.autoPanPaddingTopLeft||p),N=U(this.options.autoPanPaddingBottomRight||p),F=e.getSize(),oe=0,_e=0;h.x+s+N.x>F.x&&(oe=h.x+s-F.x+N.x),h.x-oe-P.x<0&&(oe=h.x-P.x),h.y+i+N.y>F.y&&(_e=h.y+i-F.y+N.y),h.y-_e-P.y<0&&(_e=h.y-P.y),(oe||_e)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([oe,_e]))}},_getAnchor:function(){return U(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),ca=function(e,t){return new Fi(e,t)};ze.mergeOptions({closePopupOnClick:!0}),ze.include({openPopup:function(e,t,i){return this._initOverlay(Fi,e,t,i).openOn(this),this},closePopup:function(e){return e=arguments.length?e:this._popup,e&&e.close(),this}}),ht.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Fi,this._popup,e,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof wt||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(!(!this._popup||!this._map)){Rt(e);var t=e.layer||e.target;if(this._popup._source===t&&!(t instanceof Nt)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng);return}this._popup._source=t,this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){e.originalEvent.keyCode===13&&this._openPopup(e)}});var $i=yt.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){yt.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){yt.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=yt.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip",t=e+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Ce("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+z(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,i,s=this._map,l=this._container,h=s.latLngToContainerPoint(s.getCenter()),p=s.layerPointToContainerPoint(e),P=this.options.direction,N=l.offsetWidth,F=l.offsetHeight,oe=U(this.options.offset),_e=this._getAnchor();P==="top"?(t=N/2,i=F):P==="bottom"?(t=N/2,i=0):P==="center"?(t=N/2,i=F/2):P==="right"?(t=0,i=F/2):P==="left"?(t=N,i=F/2):p.x<h.x?(P="right",t=0,i=F/2):(P="left",t=N+(oe.x+_e.x)*2,i=F/2),e=e.subtract(U(t,i,!0)).add(oe).add(_e),$e(l,"leaflet-tooltip-right"),$e(l,"leaflet-tooltip-left"),$e(l,"leaflet-tooltip-top"),$e(l,"leaflet-tooltip-bottom"),xe(l,"leaflet-tooltip-"+P),De(l,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&Qe(this._container,e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)},_getAnchor:function(){return U(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),ha=function(e,t){return new $i(e,t)};ze.include({openTooltip:function(e,t,i){return this._initOverlay($i,e,t,i).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),ht.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay($i,this._tooltip,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(e){if(!(!e&&this._tooltipHandlersAdded)){var t=e?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners():i.add=this._addFocusListeners),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[t](i),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof wt||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t=typeof e.getElement=="function"&&e.getElement();t&&(ve(t,"focus",function(){this._tooltip._source=e,this.openTooltip()},this),ve(t,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var t=typeof e.getElement=="function"&&e.getElement();t&&t.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var t=this;this._map.once("moveend",function(){t._openOnceFlag=!1,t._openTooltip(e)});return}this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)}},_moveTooltip:function(e){var t=e.latlng,i,s;this._tooltip.options.sticky&&e.originalEvent&&(i=this._map.mouseEventToContainerPoint(e.originalEvent),s=this._map.containerPointToLayerPoint(i),t=this._map.layerPointToLatLng(s)),this._tooltip.setLatLng(t)}});var tr=Kt.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var t=e&&e.tagName==="DIV"?e:document.createElement("div"),i=this.options;if(i.html instanceof Element?(Ci(t),t.appendChild(i.html)):t.innerHTML=i.html!==!1?i.html:"",i.bgPos){var s=U(i.bgPos);t.style.backgroundPosition=-s.x+"px "+-s.y+"px"}return this._setIconStyles(t,"icon"),t},createShadow:function(){return null}});function ua(e){return new tr(e)}Kt.Default=pi;var gi=ht.extend({options:{tileSize:256,opacity:1,updateWhenIdle:de.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(e){C(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),Ze(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Ut(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Vt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=O(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof J?e:new J(e,e)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t=this.getPane().children,i=-e(-1/0,1/0),s=0,l=t.length,h;s<l;s++)h=t[s].style.zIndex,t[s]!==this._container&&h&&(i=e(i,+h));isFinite(i)&&(this.options.zIndex=i+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!de.ielt9){Qe(this._container,this.options.opacity);var e=+new Date,t=!1,i=!1;for(var s in this._tiles){var l=this._tiles[s];if(!(!l.current||!l.loaded)){var h=Math.min(1,(e-l.loaded)/200);Qe(l.el,h),h<1?t=!0:(l.active?i=!0:this._onOpaqueTile(l),l.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),t&&(X(this._fadeFrame),this._fadeFrame=G(this._updateOpacity,this))}},_onOpaqueTile:S,_initContainer:function(){this._container||(this._container=Ce("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(e!==void 0){for(var i in this._levels)i=Number(i),this._levels[i].el.children.length||i===e?(this._levels[i].el.style.zIndex=t-Math.abs(e-i),this._onUpdateLevel(i)):(Ze(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var s=this._levels[e],l=this._map;return s||(s=this._levels[e]={},s.el=Ce("div","leaflet-tile-container leaflet-zoom-animated",this._container),s.el.style.zIndex=t,s.origin=l.project(l.unproject(l.getPixelOrigin()),e).round(),s.zoom=e,this._setZoomTransform(s,l.getCenter(),l.getZoom()),S(s.el.offsetWidth),this._onCreateLevel(s)),this._level=s,s}},_onUpdateLevel:S,_onRemoveLevel:S,_onCreateLevel:S,_pruneTiles:function(){if(this._map){var e,t,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom){this._removeAllTiles();return}for(e in this._tiles)t=this._tiles[e],t.retain=t.current;for(e in this._tiles)if(t=this._tiles[e],t.current&&!t.active){var s=t.coords;this._retainParent(s.x,s.y,s.z,s.z-5)||this._retainChildren(s.x,s.y,s.z,s.z+2)}for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)Ze(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,i,s){var l=Math.floor(e/2),h=Math.floor(t/2),p=i-1,P=new J(+l,+h);P.z=+p;var N=this._tileCoordsToKey(P),F=this._tiles[N];return F&&F.active?(F.retain=!0,!0):(F&&F.loaded&&(F.retain=!0),p>s?this._retainParent(l,h,p,s):!1)},_retainChildren:function(e,t,i,s){for(var l=2*e;l<2*e+2;l++)for(var h=2*t;h<2*t+2;h++){var p=new J(l,h);p.z=i+1;var P=this._tileCoordsToKey(p),N=this._tiles[P];if(N&&N.active){N.retain=!0;continue}else N&&N.loaded&&(N.retain=!0);i+1<s&&this._retainChildren(l,h,i+1,s)}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);
vendor: 7,377 bytes, line 148
148this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return t.minNativeZoom!==void 0&&e<t.minNativeZoom?t.minNativeZoom:t.maxNativeZoom!==void 0&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,i,s){var l=Math.round(t);this.options.maxZoom!==void 0&&l>this.options.maxZoom||this.options.minZoom!==void 0&&l<this.options.minZoom?l=void 0:l=this._clampZoom(l);var h=this.options.updateWhenZooming&&l!==this._tileZoom;(!s||h)&&(this._tileZoom=l,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),l!==void 0&&this._update(e),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var i in this._levels)this._setZoomTransform(this._levels[i],e,t)},_setZoomTransform:function(e,t,i){var s=this._map.getZoomScale(i,e.zoom),l=e.origin.multiplyBy(s).subtract(this._map._getNewPixelOrigin(t,i)).round();de.any3d?At(e.el,l,s):De(e.el,l)},_resetGrid:function(){var e=this._map,t=e.options.crs,i=this._tileSize=this.getTileSize(),s=this._tileZoom,l=this._map.getPixelWorldBounds(this._tileZoom);l&&(this._globalTileRange=this._pxBoundsToTileRange(l)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],s).x/i.x),Math.ceil(e.project([0,t.wrapLng[1]],s).x/i.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],s).y/i.x),Math.ceil(e.project([t.wrapLat[1],0],s).y/i.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(e){var t=this._map,i=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),s=t.getZoomScale(i,this._tileZoom),l=t.project(e,this._tileZoom).floor(),h=t.getSize().divideBy(s*2);return new re(l.subtract(h),l.add(h))},_update:function(e){var t=this._map;if(t){var i=this._clampZoom(t.getZoom());if(e===void 0&&(e=t.getCenter()),this._tileZoom!==void 0){var s=this._getTiledPixelBounds(e),l=this._pxBoundsToTileRange(s),h=l.getCenter(),p=[],P=this.options.keepBuffer,N=new re(l.getBottomLeft().subtract([P,-P]),l.getTopRight().add([P,-P]));if(!(isFinite(l.min.x)&&isFinite(l.min.y)&&isFinite(l.max.x)&&isFinite(l.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var F in this._tiles){var oe=this._tiles[F].coords;(oe.z!==this._tileZoom||!N.contains(new J(oe.x,oe.y)))&&(this._tiles[F].current=!1)}if(Math.abs(i-this._tileZoom)>1){this._setView(e,i);return}for(var _e=l.min.y;_e<=l.max.y;_e++)for(var be=l.min.x;be<=l.max.x;be++){var qe=new J(be,_e);if(qe.z=this._tileZoom,!!this._isValidTile(qe)){var Ve=this._tiles[this._tileCoordsToKey(qe)];Ve?Ve.current=!0:p.push(qe)}}if(p.sort(function(Je,Xt){return Je.distanceTo(h)-Xt.distanceTo(h)}),p.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var tt=document.createDocumentFragment();for(be=0;be<p.length;be++)this._addTile(p[be],tt);this._level.el.appendChild(tt)}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var i=this._globalTileRange;if(!t.wrapLng&&(e.x<i.min.x||e.x>i.max.x)||!t.wrapLat&&(e.y<i.min.y||e.y>i.max.y))return!1}if(!this.options.bounds)return!0;var s=this._tileCoordsToBounds(e);return H(this.options.bounds).overlaps(s)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,i=this.getTileSize(),s=e.scaleBy(i),l=s.add(i),h=t.unproject(s,e.z),p=t.unproject(l,e.z);return[h,p]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),i=new me(t[0],t[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),i=new J(+t[0],+t[1]);return i.z=+t[2],i},_removeTile:function(e){var t=this._tiles[e];t&&(Ze(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){xe(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=S,e.onmousemove=S,de.ielt9&&this.options.opacity<1&&Qe(e,this.options.opacity)},_addTile:function(e,t){var i=this._getTilePos(e),s=this._tileCoordsToKey(e),l=this.createTile(this._wrapCoords(e),d(this._tileReady,this,e));this._initTile(l),this.createTile.length<2&&G(d(this._tileReady,this,e,null,l)),De(l,i),this._tiles[s]={el:l,coords:e,current:!0},t.appendChild(l),this.fire("tileloadstart",{tile:l,coords:e})},_tileReady:function(e,t,i){t&&this.fire("tileerror",{error:t,tile:i,coords:e});var s=this._tileCoordsToKey(e);i=this._tiles[s],i&&(i.loaded=+new Date,this._map._fadeAnimated?(Qe(i.el,0),X(this._fadeFrame),this._fadeFrame=G(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),t||(xe(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),de.ielt9||!this._map._fadeAnimated?G(this._pruneTiles,this):setTimeout(d(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new J(this._wrapX?x(e.x,this._wrapX):e.x,this._wrapY?x(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new re(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function da(e){return new gi(e)}var Yt=gi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,t=C(this,t),t.detectRetina&&de.retina&&t.maxZoom>0?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),typeof t.subdomains=="string"&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&t===void 0&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var i=document.createElement("img");return ve(i,"load",d(this._tileOnLoad,this,t,i)),ve(i,"error",d(this._tileOnError,this,t,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(e),i},getTileUrl:function(e){var t={r:de.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=i),t["-y"]=i}return ne(this._url,u(t,this.options))},_tileOnLoad:function(e,t){de.ielt9?setTimeout(d(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,i){var s=this.options.errorTileUrl;s&&t.getAttribute("src")!==s&&(t.src=s),e(i,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom,i=this.options.zoomReverse,s=this.options.zoomOffset;return i&&(e=t-e),e+s}
vendor: 3,205 bytes, line 148
148,_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&(t=this._tiles[e].el,t.onload=S,t.onerror=S,!t.complete)){t.src=ue;var i=this._tiles[e].coords;Ze(t),delete this._tiles[e],this.fire("tileabort",{tile:t,coords:i})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",ue),gi.prototype._removeTile.call(this,e)},_tileReady:function(e,t,i){if(!(!this._map||i&&i.getAttribute("src")===ue))return gi.prototype._tileReady.call(this,e,t,i)}});function ir(e,t){return new Yt(e,t)}var nr=Yt.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var i=u({},this.defaultWmsParams);for(var s in t)s in this.options||(i[s]=t[s]);t=C(this,t);var l=t.detectRetina&&de.retina?2:1,h=this.getTileSize();i.width=h.x*l,i.height=h.y*l,this.wmsParams=i},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,Yt.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),i=this._crs,s=te(i.project(t[0]),i.project(t[1])),l=s.min,h=s.max,p=(this._wmsVersion>=1.3&&this._crs===qs?[l.y,l.x,h.y,h.x]:[l.x,l.y,h.x,h.y]).join(","),P=Yt.prototype.getTileUrl.call(this,e);return P+R(this.wmsParams,P,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+p},setParams:function(e,t){return u(this.wmsParams,e),t||this.redraw(),this}});function fa(e,t){return new nr(e,t)}Yt.WMS=nr,ir.wms=fa;var zt=ht.extend({options:{padding:.1},initialize:function(e){C(this,e),z(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),xe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var i=this._map.getZoomScale(t,this._zoom),s=this._map.getSize().multiplyBy(.5+this.options.padding),l=this._map.project(this._center,t),h=s.multiplyBy(-i).add(l).subtract(this._map._getNewPixelOrigin(e,t));de.any3d?At(this._container,h,i):De(this._container,h)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var e in this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),i=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();
vendor: 10,839 bytes, line 148
148this._bounds=new re(i,i.add(t.multiplyBy(1+e*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sr=zt.extend({options:{tolerance:0},getEvents:function(){var e=zt.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){zt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");ve(e,"mousemove",this._onMouseMove,this),ve(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ve(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){X(this._redrawRequest),delete this._ctx,Ze(this._container),Me(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var e;this._redrawBounds=null;for(var t in this._layers)e=this._layers[t],e._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){zt.prototype._update.call(this);var e=this._bounds,t=this._container,i=e.getSize(),s=de.retina?2:1;De(t,e.min),t.width=s*i.x,t.height=s*i.y,t.style.width=i.x+"px",t.style.height=i.y+"px",de.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){zt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[z(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,i=t.next,s=t.prev;i?i.prev=s:this._drawLast=s,s?s.next=i:this._drawFirst=i,delete e._order,delete this._layers[z(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if(typeof e.options.dashArray=="string"){var t=e.options.dashArray.split(/[, ]+/),i=[],s,l;for(l=0;l<t.length;l++){if(s=Number(t[l]),isNaN(s))return;i.push(s)}e.options._dashArray=i}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||G(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new re,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var e=this._redrawBounds;if(e){var t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var e,t=this._redrawBounds;if(this._ctx.save(),t){var i=t.getSize();this._ctx.beginPath(),this._ctx.rect(t.min.x,t.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var s=this._drawFirst;s;s=s.next)e=s.layer,(!t||e._pxBounds&&e._pxBounds.intersects(t))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var i,s,l,h,p=e._parts,P=p.length,N=this._ctx;if(P){for(N.beginPath(),i=0;i<P;i++){for(s=0,l=p[i].length;s<l;s++)h=p[i][s],N[s?"lineTo":"moveTo"](h.x,h.y);t&&N.closePath()}this._fillStroke(N,e)}}},_updateCircle:function(e){if(!(!this._drawing||e._empty())){var t=e._point,i=this._ctx,s=Math.max(Math.round(e._radius),1),l=(Math.max(Math.round(e._radiusY),1)||s)/s;l!==1&&(i.save(),i.scale(1,l)),i.beginPath(),i.arc(t.x,t.y/l,s,0,Math.PI*2,!1),l!==1&&i.restore(),this._fillStroke(i,e)}},_fillStroke:function(e,t){var i=t.options;i.fill&&(e.globalAlpha=i.fillOpacity,e.fillStyle=i.fillColor||i.color,e.fill(i.fillRule||"evenodd")),i.stroke&&i.weight!==0&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=i.opacity,e.lineWidth=i.weight,e.strokeStyle=i.color,e.lineCap=i.lineCap,e.lineJoin=i.lineJoin,e.stroke())},_onClick:function(e){for(var t=this._map.mouseEventToLayerPoint(e),i,s,l=this._drawFirst;l;l=l.next)i=l.layer,i.options.interactive&&i._containsPoint(t)&&(!(e.type==="click"||e.type==="preclick")||!this._map._draggableMoved(i))&&(s=i);this._fireEvent(s?[s]:!1,e)},_onMouseMove:function(e){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var t=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,t)}},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&($e(this._container,"leaflet-interactive"),this._fireEvent([t],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var i,s,l=this._drawFirst;l;l=l.next)i=l.layer,i.options.interactive&&i._containsPoint(t)&&(s=i);s!==this._hoveredLayer&&(this._handleMouseOut(e),s&&(xe(this._container,"leaflet-interactive"),this._fireEvent([s],e,"mouseover"),this._hoveredLayer=s)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,e),this._mouseHoverThrottled=!0,setTimeout(d(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,t,i){this._map._fireDOMEvent(t,i||t.type,e)},_bringToFront:function(e){var t=e._order;if(t){var i=t.next,s=t.prev;if(i)i.prev=s;else return;s?s.next=i:i&&(this._drawFirst=i),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e)}},_bringToBack:function(e){var t=e._order;if(t){var i=t.next,s=t.prev;if(s)s.next=i;else return;i?i.prev=s:s&&(this._drawLast=s),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e)}}});function rr(e){return de.canvas?new sr(e):null}var _i=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch{}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),ma={_initContainer:function(){this._container=Ce("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(zt.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=_i("shape");xe(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=_i("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[z(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;Ze(t),e.removeInteractiveTarget(t),delete this._layers[z(e)]},_updateStyle:function(e){var t=e._stroke,i=e._fill,s=e.options,l=e._container;l.stroked=!!s.stroke,l.filled=!!s.fill,s.stroke?(t||(t=e._stroke=_i("stroke")),l.appendChild(t),t.weight=s.weight+"px",t.color=s.color,t.opacity=s.opacity,s.dashArray?t.dashStyle=$(s.dashArray)?s.dashArray.join(" "):s.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=s.lineCap.replace("butt","flat"),t.joinstyle=s.lineJoin):t&&(l.removeChild(t),e._stroke=null),s.fill?(i||(i=e._fill=_i("fill")),l.appendChild(i),i.color=s.fillColor||s.color,i.opacity=s.fillOpacity):i&&(l.removeChild(i),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),i=Math.round(e._radius),s=Math.round(e._radiusY||i);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+i+","+s+" 0,"+65535*360)},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){Ut(e._container)},_bringToBack:function(e){Vt(e._container)}},Di=de.vml?_i:Re,yi=zt.extend({_initContainer:function(){this._container=Di("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Di("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Ze(this._container),Me(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){zt.prototype._update.call(this);var e=this._bounds,t=e.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(t))&&(this._svgSize=t,i.setAttribute("width",t.x),i.setAttribute("height",t.y)),De(i,e.min),i.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=Di("path");e.options.className&&xe(t,e.options.className),e.options.interactive&&xe(t,"leaflet-interactive"),this._updateStyle(e),this._layers[z(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){Ze(e._path),e.removeInteractiveTarget(e._path),delete this._layers[z(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,i=e.options;t&&(i.stroke?(t.setAttribute("stroke",i.color),t.setAttribute("stroke-opacity",i.opacity),t.setAttribute("stroke-width",i.weight),t.setAttribute("stroke-linecap",i.lineCap),t.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?t.setAttribute("stroke-dasharray",i.dashArray):t.removeAttribute("stroke-dasharray"),i.dashOffset?t.setAttribute("stroke-dashoffset",i.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),i.fill?(t.setAttribute("fill",i.fillColor||i.color),t.setAttribute("fill-opacity",i.fillOpacity),t.setAttribute("fill-rule",i.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,Xe(e._parts,t))},_updateCircle:function(e){var t=e._point,i=Math.max(Math.round(e._radius),1),s=Math.max(Math.round(e._radiusY),1)||i,l="a"+i+","+s+" 0 1,0 ",h=e._empty()?"M0 0":"M"+(t.x-i)+","+t.y+l+i*2+",0 "+l+-i*2+",0 ";this._setPath(e,h)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){Ut(e._path)},_bringToBack:function(e){Vt(e._path)}});de.vml&&yi.include(ma);function or(e){return de.svg||de.vml?new yi(e):null}ze.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if(e==="overlayPane"||e===void 0)return!1;var t=this._paneRenderers[e];return t===void 0&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&rr(e)||or(e)}});var ar=qt.extend({initialize:function(e,t){qt.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))}
vendor: 14,591 bytes, line 148
148,_boundsToLatLngs:function(e){return e=H(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function pa(e,t){return new ar(e,t)}yi.create=Di,yi.pointsToPath=Xe,jt.geometryToLayer=Ai,jt.coordsToLatLng=Zn,jt.coordsToLatLngs=Ii,jt.latLngToCoords=Fn,jt.latLngsToCoords=Bi,jt.getFeature=Jt,jt.asFeature=Ri,ze.mergeOptions({boxZoom:!0});var lr=_t.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){ve(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Me(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ze(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||e.which!==1&&e.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ci(),bn(),this._startPoint=this._map.mouseEventToContainerPoint(e),ve(document,{contextmenu:Rt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=Ce("div","leaflet-zoom-box",this._container),xe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new re(this._point,this._startPoint),i=t.getSize();De(this._box,t.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(Ze(this._box),$e(this._container,"leaflet-crosshair")),hi(),jn(),Me(document,{contextmenu:Rt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if(!(e.which!==1&&e.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(d(this._resetState,this),0);var t=new me(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){e.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ze.addInitHook("addHandler","boxZoom",lr),ze.mergeOptions({doubleClickZoom:!0});var cr=_t.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,i=t.getZoom(),s=t.options.zoomDelta,l=e.originalEvent.shiftKey?i-s:i+s;t.options.doubleClickZoom==="center"?t.setZoom(l):t.setZoomAround(e.containerPoint,l)}});ze.addInitHook("addHandler","doubleClickZoom",cr),ze.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var hr=_t.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new Tt(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}xe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){$e(this._map._container,"leaflet-grab"),$e(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=H(this._map.options.maxBounds);this._offsetLimit=te(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(t),this._prunePositions(t)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),i=this._initialWorldOffset,s=this._draggable._newPos.x,l=(s-t+i)%e+t-i,h=(s+t+i)%e-t-i,p=Math.abs(l+i)<Math.abs(h+i)?l:h;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=p},_onDragEnd:function(e){var t=this._map,i=t.options,s=!i.inertia||e.noInertia||this._times.length<2;if(t.fire("dragend",e),s)t.fire("moveend");else{this._prunePositions(+new Date);var l=this._lastPos.subtract(this._positions[0]),h=(this._lastTime-this._times[0])/1e3,p=i.easeLinearity,P=l.multiplyBy(p/h),N=P.distanceTo([0,0]),F=Math.min(i.inertiaMaxSpeed,N),oe=P.multiplyBy(F/N),_e=F/(i.inertiaDeceleration*p),be=oe.multiplyBy(-_e/2).round();!be.x&&!be.y?t.fire("moveend"):(be=t._limitOffset(be,t.options.maxBounds),G(function(){t.panBy(be,{duration:_e,easeLinearity:p,noMoveStart:!0,animate:!0})}))}}});ze.addInitHook("addHandler","dragging",hr),ze.mergeOptions({keyboard:!0,keyboardPanDelta:80});var ur=_t.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),ve(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Me(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var e=document.body,t=document.documentElement,i=e.scrollTop||t.scrollTop,s=e.scrollLeft||t.scrollLeft;this._map._container.focus(),window.scrollTo(s,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var t=this._panKeys={},i=this.keyCodes,s,l;for(s=0,l=i.left.length;s<l;s++)t[i.left[s]]=[-1*e,0];for(s=0,l=i.right.length;s<l;s++)t[i.right[s]]=[e,0];for(s=0,l=i.down.length;s<l;s++)t[i.down[s]]=[0,e];for(s=0,l=i.up.length;s<l;s++)t[i.up[s]]=[0,-1*e]},_setZoomDelta:function(e){var t=this._zoomKeys={},i=this.keyCodes,s,l;for(s=0,l=i.zoomIn.length;s<l;s++)t[i.zoomIn[s]]=e;for(s=0,l=i.zoomOut.length;s<l;s++)t[i.zoomOut[s]]=-e},_addHooks:function(){ve(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Me(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t=e.keyCode,i=this._map,s;if(t in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(s=this._panKeys[t],e.shiftKey&&(s=U(s).multiplyBy(3)),i.options.maxBounds&&(s=i._limitOffset(U(s),i.options.maxBounds)),i.options.worldCopyJump){var l=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(s)));i.panTo(l)}else i.panBy(s)}else if(t in this._zoomKeys)i.setZoom(i.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[t]);else if(t===27&&i._popup&&i._popup.options.closeOnEscapeKey)i.closePopup();else return;Rt(e)}}});ze.addInitHook("addHandler","keyboard",ur),ze.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var dr=_t.extend({addHooks:function(){ve(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Me(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var t=Is(e),i=this._map.options.wheelDebounceTime;this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var s=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(d(this._performZoom,this),s),Rt(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),i=this._map.options.zoomSnap||0;e._stop();var s=this._delta/(this._map.options.wheelPxPerZoomLevel*4),l=4*Math.log(2/(1+Math.exp(-Math.abs(s))))/Math.LN2,h=i?Math.ceil(l/i)*i:l,p=e._limitZoom(t+(this._delta>0?h:-h))-t;this._delta=0,this._startTime=null,p&&(e.options.scrollWheelZoom==="center"?e.setZoom(t+p):e.setZoomAround(this._lastMousePos,t+p))}});ze.addInitHook("addHandler","scrollWheelZoom",dr);var ga=600;ze.mergeOptions({tapHold:de.touchNative&&de.safari&&de.mobile,tapTolerance:15});var fr=_t.extend({addHooks:function(){ve(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Me(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),e.touches.length===1){var t=e.touches[0];this._startPos=this._newPos=new J(t.clientX,t.clientY),this._holdTimeout=setTimeout(d(function(){this._cancel(),this._isTapValid()&&(ve(document,"touchend",Ke),ve(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},this),ga),ve(document,"touchend touchcancel contextmenu",this._cancel,this),ve(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){Me(document,"touchend",Ke),Me(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),Me(document,"touchend touchcancel contextmenu",this._cancel,this),Me(document,"touchmove",this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new J(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var i=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});i._simulated=!0,t.target.dispatchEvent(i)}});ze.addInitHook("addHandler","tapHold",fr),ze.mergeOptions({touchZoom:de.touch,bounceAtZoomLimits:!0});var mr=_t.extend({addHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),ve(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){$e(this._map._container,"leaflet-touch-zoom"),Me(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(!(!e.touches||e.touches.length!==2||t._animatingZoom||this._zooming)){var i=t.mouseEventToContainerPoint(e.touches[0]),s=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),t.options.touchZoom!=="center"&&(this._pinchStartLatLng=t.containerPointToLatLng(i.add(s)._divideBy(2))),this._startDist=i.distanceTo(s),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),ve(document,"touchmove",this._onTouchMove,this),ve(document,"touchend touchcancel",this._onTouchEnd,this),Ke(e)}},_onTouchMove:function(e){if(!(!e.touches||e.touches.length!==2||!this._zooming)){var t=this._map,i=t.mouseEventToContainerPoint(e.touches[0]),s=t.mouseEventToContainerPoint(e.touches[1]),l=i.distanceTo(s)/this._startDist;if(this._zoom=t.getScaleZoom(l,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&l<1||this._zoom>t.getMaxZoom()&&l>1)&&(this._zoom=t._limitZoom(this._zoom)),t.options.touchZoom==="center"){if(this._center=this._startLatLng,l===1)return}else{var h=i._add(s)._divideBy(2)._subtract(this._centerPoint);if(l===1&&h.x===0&&h.y===0)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(h),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),X(this._animRequest);var p=d(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=G(p,this,!0),Ke(e)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,X(this._animRequest),Me(document,"touchmove",this._onTouchMove,this),Me(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ze.addInitHook("addHandler","touchZoom",mr),ze.BoxZoom=lr,ze.DoubleClickZoom=cr,ze.Drag=hr,ze.Keyboard=ur,ze.ScrollWheelZoom=dr,ze.TapHold=fr,ze.TouchZoom=mr,a.Bounds=re,a.Browser=de,a.CRS=Pe,a.Canvas=sr,a.Circle=Rn,a.CircleMarker=Oi,a.Class=A,a.Control=ct,a.DivIcon=tr,a.DivOverlay=yt,a.DomEvent=Oo,a.DomUtil=Mo,a.Draggable=Tt,a.Evented=K,a.FeatureGroup=wt,a.GeoJSON=jt,a.GridLayer=gi,a.Handler=_t,a.Icon=Kt,a.ImageOverlay=Zi,a.LatLng=le,a.LatLngBounds=me,a.Layer=ht,a.LayerGroup=Gt,a.LineUtil=Go,a.Map=ze,a.Marker=Ei,a.Mixin=$o,a.Path=Nt,a.Point=J,a.PolyUtil=Do,a.Polygon=qt,a.Polyline=bt,a.Popup=Fi,a.PosAnimation=Bs,a.Projection=Ko,a.Rectangle=ar,a.Renderer=zt,a.SVG=yi,a.SVGOverlay=er,a.TileLayer=Yt,a.Tooltip=$i,a.Transformation=Be,a.Util=w,a.VideoOverlay=Qs,a.bind=d,a.bounds=te,a.canvas=rr,a.circle=ia,a.circleMarker=ta,a.control=fi,a.divIcon=ua,a.extend=u,a.featureGroup=Xo,a.geoJSON=Xs,a.geoJson=ra,a.gridLayer=da,a.icon=Qo,a.imageOverlay=oa,a.latLng=fe,a.latLngBounds=H,a.layerGroup=Yo,a.map=Ao,a.marker=ea,a.point=U,a.polygon=sa,a.polyline=na,a.popup=ca,a.rectangle=pa,a.setOptions=C,a.stamp=z,a.svg=or,a.svgOverlay=la,a.tileLayer=ir,a.tooltip=ha,a.transformation=pe,a.version=c,a.videoOverlay=aa;var _a=window.L;a.noConflict=function(){return window.L=_a,this},window.L=a})}
148(wi,wi.exports)),wi.exports}var Et=ah();function mn(r,o,a){return Object.freeze({instance:r,context:o,container:a})}function ws(r,o){return o==null?function(c,u){const f=E.useRef(void 0);return f.current||(f.current=r(c,u)),f}:function(c,u){const f=E.useRef(void 0);f.current||(f.current=r(c,u));const d=E.useRef(c),{instance:_}=f.current;return E.useEffect(function(){d.current!==c&&(o(_,c,d.current),d.current=c)},[_,c,o]),f}}function ho(r,o){E.useEffect(function(){return(o.layerContainer??o.map).addLayer(r.instance),function(){var f;(f=o.layerContainer)==null||f.removeLayer(r.instance),o.map.removeLayer(r.instance)}},[o,r])}function lh(r){return function(a){const c=dn(),u=r(fn(a,c),c);return lo(c.map,a.attribution),xs(u.current,a.eventHandlers),ho(u.current,c),u}}function ch(r,o){const a=E.useRef(void 0);E.useEffect(function(){if(o.pathOptions!==a.current){const u=o.pathOptions??{};r.instance.setStyle(u),a.current=u}},[r,o])}function hh(r){return function(a){const c=dn(),u=r(fn(a,c),c);return xs(u.current,a.eventHandlers),ho(u.current,c),ch(u.current,a),u}}function uh(r,o){const a=ws(r),c=rh(a,o);return nh(c)}function uo(r,o){const a=ws(r,o),c=hh(a);return ih(c)}function dh(r,o){const a=ws(r,o),c=lh(a);return sh(c)}function fh(r,o,a){const{opacity:c,zIndex:u}=o;c!=null&&c!==a.opacity&&r.setOpacity(c),u!=null&&u!==a.zIndex&&r.setZIndex(u)}function mh(){return dn().map}const ph=uo(function({center:o,children:a,...c},u){const f=new Et.CircleMarker(o,c);return mn(f,co(u,{overlayContainer:f}))},Qc),gh=uo(function({data:o,...a},c){const u=new Et.GeoJSON(o,a);return mn(u,co(c,{overlayContainer:u}))},function(o,a,c){a.style!==c.style&&(a.style==null?o.resetStyle():o.setStyle(a.style))});function _h({bounds:r,boundsOptions:o,center:a,children:c,className:u,id:f,placeholder:d,style:_,whenReady:z,zoom:O,...x},S){const[B]=E.useState({className:u,id:f,style:_}),[v,W]=E.useState(null),C=E.useRef(void 0);E.useImperativeHandle(S,()=>(v==null?void 0:v.map)??null,[v]);const R=E.useCallback(ne=>{if(ne!==null&&!C.current){const $=new Et.Map(ne,x);C.current=$,a!=null&&O!=null?$.setView(a,O):r!=null&&$.fitBounds(r,o),z!=null&&$.whenReady(z),W(th($))}},[]);E.useEffect(()=>()=>{v==null||v.map.remove()},[v]);const ie=v?Ae.createElement(vs,{value:v},c):d??null;return Ae.createElement("div",{...B,ref:R},ie)}const yh=E.forwardRef(_h),vh=dh(function({url:o,...a},c){const u=new Et.TileLayer(o,fn(a,c));return mn(u,c)},function(o,a,c){fh(o,a,c);const{url:u}=a;u!=null&&u!==c.url&&o.setUrl(u)}),xh=uh(function(o,a){const c=new Et.Tooltip(o,a.overlayContainer);return mn(c,a)},function(o,a,{position:c},u){E.useEffect(function(){const d=a.overlayContainer;if(d==null)return;const{instance:_}=o,z=x=>{x.tooltip===_&&(c!=null&&_.setLatLng(c),_.update(),u(!0))},O=x=>{x.tooltip===_&&u(!1)};return d.on({tooltipopen:z,tooltipclose:O}),d.bindTooltip(_),function(){d.off({tooltipopen:z,tooltipclose:O}),d._map!=null&&d.unbindTooltip()}},[o,a,u,c])});function wh(r){return r}function bh(r){if(r==null)return wh;var o,a,c=r.scale[0],u=r.scale[1],f=r.translate[0],d=r.translate[1];return function(_,z){z||(o=a=0);var O=2,x=_.length,S=new Array(x);for(S[0]=(o+=_[0])*c+f,S[1]=(a+=_[1])*u+d;O<x;)S[O]=_[O],++O;return S}}function jh(r,o){for(var a,c=r.length,u=c-o;u<--c;)a=r[u],r[u++]=r[c],r[c]=a}function zh(r,o){return typeof o=="string"&&(o=r.objects[o]),o.type==="GeometryCollection"?{type:"FeatureCollection",features:o.geometries.map(function(a){return Or(r,a)})}:Or(r,o)}function Or(r,o){var a=o.id,c=o.bbox,u=o.properties==null?{}:o.properties,f=kh(r,o);return a==null&&c==null?{type:"Feature",properties:u,geometry:f}:c==null?{type:"Feature",id:a,properties:u,geometry:f}:{type:"Feature",id:a,bbox:c,properties:u,geometry:f}}function kh(r,o){var a=bh(r.transform),c=r.arcs;function u(x,S){S.length&&S.pop();for(var B=c[x<0?~x:x],v=0,W=B.length;v<W;++v)S.push(a(B[v],v));x<0&&jh(S,W)}function f(x){return a(x)}function d(x){for(var S=[],B=0,v=x.length;B<v;++B)u(x[B],S);return S.length<2&&S.push(S[0]),S}function _(x){for(var S=d(x);S.length<4;)S.push(S[0]);return S}function z(x){return x.map(_)}function O(x){var S=x.type,B;switch(S){case"GeometryCollection":return{type:S,geometries:x.geometries.map(O)};case"Point":B=f(x.coordinates);break;case"MultiPoint":B=x.coordinates.map(f);break;case"LineString":B=d(x.arcs);break;case"MultiLineString":B=x.arcs.map(d);break;case"Polygon":B=z(x.arcs);break;case"MultiPolygon":B=x.arcs.map(z);break;default:return null}return{type:S,coordinates:B}}return O(o)}function Ph(){const r=mh();return Ae.useEffect(()=>{const o=new Et.LatLng(-90,-180),a=new Et.LatLng(90,180),c=new Et.LatLngBounds(o,a);r.setMaxBounds(c),r.setMinZoom(2),r.setMaxZoom(8)},[r]),null}let Yn=null,Xn=null;const fo=async()=>Yn||(Xn||(Xn=fetch("https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json").then(r=>r.json()).then(r=>{const a=zh(r,r.objects.countries);return Yn=a,a})),Xn);fo();const Ar=Object.entries(_s).reduce((r,[o,a])=>(o==="ð¨ð³"?r[o]="China Mainland":o==="ðð°"?r[o]="Hong Kong S.A.R., China":o==="ð²ð´"?r[o]="Macau S.A.R., China":o==="ð¹ð¼"?r[o]="Taiwan, Province of China":r[o]=a.en,r),{}),Ch=({nodes:r,liveData:o})=>{const[a]=dt(),[c,u]=E.useState(null),[,f]=E.useState(null),[d,_]=E.useState(!1),z=E.useMemo(()=>((o==null?void 0:o.online)||[]).sort().join(","),[o==null?void 0:o.online]),O=E.useMemo(()=>new Set(["ðð°","ð¨ð³","ð²ð´","ð¹ð¼"]),[]),x=E.useMemo(()=>new Set(["Hong Kong S.A.R., China","China Mainland","Macau S.A.R., China","Taiwan, Province of China"]),[]),S=E.useMemo(()=>({China:"China Mainland",Taiwan:"Taiwan, Province of China","Hong Kong":"Hong Kong S.A.R., China",Macao:"Macau S.A.R., China","United States of America":"United States","United Kingdom":"United Kingdom",Russia:"Russia","South Korea":"South Korea","Republic of Korea":"South Korea"}),[]),B=E.useMemo(()=>r.some(Y=>O.has(Y.region)),[r,O]),v=E.useCallback(Y=>(Y.type==="FeatureCollection"&&(Y.features=Y.features.map(y=>{var k,I;if(y.geometry.type==="Polygon"||y.geometry.type==="MultiPolygon"){const Q=A=>{for(let Z=1;Z<A.length;Z++)if(Math.abs(A[Z][0]-A[Z-1][0])>180)return!0;return!1},G=A=>y.geometry.type==="Polygon"?A.map(Z=>Q(Z)?Z.map(D=>
148[D[0]<0?D[0]+360:D[0],D[1]]):Z):y.geometry.type==="MultiPolygon"?A.map(Z=>Z.map(D=>Q(D)?D.map(K=>[K[0]<0?K[0]+360:K[0],K[1]]):D)):A,X=["Russia","Russian Federation","Fiji","United States","United States of America","Kiribati","New Zealand"],w=((k=y.properties)==null?void 0:k.name)||((I=y.properties)==null?void 0:I.NAME);X.some(A=>w==null?void 0:w.includes(A))&&(y.geometry.coordinates=G(y.geometry.coordinates))}return y})),Y),[]),W=E.useMemo(()=>r.length>0&&!!(o!=null&&o.online)&&!!(o!=null&&o.data)&&(r.some(Y=>o.data[Y.uuid])||o.online.length>0),[r,o]);E.useEffect(()=>{W&&fo().then(Y=>{u(v(Y)),_(!0)}).catch(console.error)},[W,v]);const C=E.useMemo(()=>{const Y=new Map;return r.forEach(y=>{const k=Ar[y.region];k&&(Y.has(k)||Y.set(k,[]),Y.get(k).push(y))}),Y},[r]),R=E.useMemo(()=>{const Y=new Set(C.keys());return B&&x.forEach(y=>Y.add(y)),Y},[C,B,x]),ie=E.useCallback(Y=>{const y=k=>{if(k.length===0)return"inactive";const I=new Set((o==null?void 0:o.online)||[]);let Q=0;for(const G of k)I.has(G.uuid)&&Q++;return Q===0?"offline":Q===k.length?"online":"partial"};if(B&&x.has(Y)){const k=[];return r.forEach(I=>{O.has(I.region)&&k.push(I)}),y(k)}return y(C.get(Y)||[])},[B,x,O,r,C,o==null?void 0:o.online]),ne=E.useCallback(Y=>{const y="var(--gray-8)",k="var(--green-9)",I="var(--red-9)",Q="var(--amber-9)";if(!Y||!Y.properties)return{fillColor:"transparent",weight:.5,opacity:.3,color:y,fillOpacity:0};const G=Y.properties.name,X=S[G]||G,w=R.has(X),A=w?ie(X):"inactive";let Z="transparent",D=0,K=.5,J=y;if(w)switch(K=2,D=.6,A){case"online":Z=k,J=k;break;case"offline":Z=I,J=I,D=.4;break;case"partial":Z=Q,J=Q,D=.5;break}return{fillColor:Z,weight:K,opacity:w?1:.3,color:J,fillOpacity:D,className:""}},[R,S,ie]),$=E.useCallback((Y,y)=>{const k=new Set((o==null?void 0:o.online)||[]),I=[],Q=[];y.forEach(K=>{k.has(K.uuid)?I.push(K):Q.push(K)});const G=[...Q,...I],X=G.slice(0,5),w=G.length-5,A=X.map(K=>{const J=k.has(K.uuid),he=J?"var(--green-9)":"var(--red-9)",U=a(J?"nodeCard.online":"nodeCard.offline");return`<div style="display: flex; align-items: center; gap: 8px; padding: 4px 0;"> 149 <span style="width: 8px; height: 8px; border-radius: 50%; background: ${he}; flex-shrink: 0;"></span> 150 <span style="flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">${K.name}</span> 151 <span style="color: ${he}; font-size: 12px;">${U}</span> 152 </div>`}).join(""),Z=w>0?`<div style="display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--gray-10); font-style: italic;"><span style="width: 8px; height: 8px; flex-shrink: 0;"></span><span>+${w} ${a("earthView.more")}</span></div>`:"",D=Q.length>0?a("earthView.totalServers",{total:y.length})+`, <span style="color: var(--green-9);">${I.length} ${a("earthView.online")}</span>, <span style="color: var(--red-9);">${Q.length} ${a("earthView.offline")}</span>`:a("earthView.totalServers",{total:y.length})+`, <span style="color: var(--green-9);">${I.length} ${a("earthView.online")}</span>`;return`<div class="map-tooltip" style="min-width: 250px; max-width: 350px;"> 153 <h3 class="tooltip-title">${Y}</h3> 154 <div class="tooltip-stats" style="margin-bottom: 12px;"> 155 ${D} 156 </div> 157 <div style="border-top: 1px solid rgba(148, 163, 184, 0.2); padding-top: 8px;">${A}${Z}</div> 158 </div>`},[o==null?void 0:o.online,a]),ee=E.useCallback((Y,y)=>{if(!Y.properties)return;const k=Y.properties.name,I=S[k]||k,Q=C.get(I);!Q||Q.length===0||(y.bindTooltip("",{permanent:!1,direction:"top",offset:[0,-10],opacity:1,className:"custom-tooltip"}),y.on({mouseover:G=>{G.target.setStyle({weight:3,fillOpacity:.8});const X=$(I,Q);y.setTooltipContent(X),y.openTooltip()},mouseout:G=>{G.target.setStyle(ne(Y)),y.closeTooltip()},click:()=>f(I)}))},[C,ne,$,S]),ue=E.useMemo(()=>{const Y=[];return["ðð°","ð²ð´","ð¸ð¬"].forEach(k=>{const I=Ar[k],Q=oc(k),G=C.get(I)||[];I&&Q&&R.has(I)&&Y.push({name:I,emoji:k,coords:Q,nodes:G})}),Y},[R,C]);return!W||!d||!c?n.jsx("div",{className:"earth-view-container flex items-center justify-center",children:n.jsx(tn,{})}):n.jsxs("div",{className:"earth-view-container",children:[n.jsxs(yh,{center:[20,0],zoom:2,className:"earth-map",scrollWheelZoom:!0,doubleClickZoom:!0,dragging:!0,attributionControl:!1,worldCopyJump:!1,maxBoundsViscosity:1,children:[n.jsx(Ph,{}),n.jsx(vh,{url:"https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png",attribution:""}),c&&n.jsx(gh,{data:c,style:ne,onEachFeature:ee},`geojson-${z}`),ue.map(Y=>{const y=ie(Y.name);let k="var(--gray-8)";y==="online"?k="var(--green-9)":y==="offline"?k="var(--red-9)":y==="partial"&&(k="var(--amber-9)");const I=$(Y.name,Y.nodes);return n.jsx(ph,{center:Y.coords,radius:5,pathOptions:{fillColor:k,color:k,weight:2,opacity:1,fillOpacity:.7},eventHandlers:{mouseover:Q=>Q.target.setStyle({weight:3,radius:6,fillOpacity:.9}),mouseout:Q=>Q.target.setStyle({weight:2,radius:5,fillOpacity:.7}),click:()=>f(Y.name)},children:n.jsx(xh,{permanent:!1,direction:"top",offset:[0,-10],opacity:1,className:"custom-tooltip",children:n.jsx("div",{dangerouslySetInnerHTML:{__html:I}})})},`${Y.emoji}-${z}`)})]}),n.jsx("div",{className:"map-legend",children:n.jsx(ut,{size:"1",children:n.jsxs(T,{direction:"column",gap:"2",children:[n.jsxs(T,{align:"center",gap:"2",children:[n.jsx(Xr,{size:16}),n.jsx(b,{size:"2",weight:"bold",children:a("common.status")})]}),n.jsxs(T,{direction:"column",gap:"1",children:[n.jsxs(T,{align:"center",gap:"2",children:[n.jsx("div",{className:"legend-box online"}),n.jsx(b,{size:"1",children:a("earthView.allOnline")})]}),n.jsxs(T,{align:"center",gap:"2",children:[n.jsx("div",{className:"legend-box partial"}),n.jsx(b,{size:"1",children:a("common.partial")})]}),n.jsxs(T,{align:"center",gap:"2",children:[n.jsx("div",{className:"legend-box offline"}),n.jsx(b,{size:"1",children:a("earthView.allOffline")})]})]})]})})})]})},Sh=({currentMode:r,onModeChange:o,isMobile:a=!1})=>{const c=[{value:"modern",label:"Modern",mobileSupported:!0}
vendor: 14,830 bytes, lines 158-161
158,{value:"compact",label:"Compact",mobileSupported:!0},{value:"classic",label:"Classic",mobileSupported:!0},{value:"detailed",label:"Detailed",mobileSupported:!0},{value:"task",label:"Task",mobileSupported:!0},{value:"earth",label:"Earth",mobileSupported:!0}],u=a?c.filter(d=>d.mobileSupported):c,f=c.find(d=>d.value===r)||c[0];return n.jsxs(hl,{children:[n.jsx(ul,{children:n.jsx(Ct,{variant:"soft",size:"2",className:`view-mode-trigger gap-2 px-3 ${a?"w-full":""}`,style:{minWidth:a?"100%":"140px"},children:n.jsxs(T,{align:"center",justify:"center",gap:"2",className:"w-full",children:[n.jsx(b,{size:"2",weight:"medium",children:f.label}),n.jsx(ps,{size:16,className:"view-mode-chevron"})]})})}),n.jsx(dl,{align:a?"center":"end",sideOffset:5,className:`view-mode-dropdown p-1 ${a?"w-[90vw]":"min-w-[140px]"}`,style:{zIndex:9999},children:u.map(d=>n.jsx(fl,{onSelect:()=>o(d.value),className:"view-mode-item cursor-pointer p-2 rounded-md transition-colors","data-selected":r===d.value,children:n.jsxs(T,{align:"center",justify:"between",className:"w-full",children:[n.jsx(b,{size:"2",weight:"medium",className:"view-mode-text",children:d.label}),r===d.value&&n.jsx("div",{className:"view-mode-check-wrapper",children:n.jsx(kl,{size:14,className:"view-mode-check",style:{color:"var(--accent-11)"}})})]})},d.value))})]})};function Qt(r,o,a){let c=a.initialDeps??[],u;function f(){var d,_,z,O;let x;a.key&&((d=a.debug)!=null&&d.call(a))&&(x=Date.now());const S=r();if(!(S.length!==c.length||S.some((W,C)=>c[C]!==W)))return u;c=S;let v;if(a.key&&((_=a.debug)!=null&&_.call(a))&&(v=Date.now()),u=o(...S),a.key&&((z=a.debug)!=null&&z.call(a))){const W=Math.round((Date.now()-x)*100)/100,C=Math.round((Date.now()-v)*100)/100,R=C/16,ie=(ne,$)=>{for(ne=String(ne);ne.length<$;)ne=" "+ne;return ne};console.info(`%câ± ${ie(C,5)} /${ie(W,5)} ms`,` 159 font-size: .6rem; 160 font-weight: bold; 161 color: hsl(${Math.max(0,Math.min(120-120*R,120))}deg 100% 31%);`,a==null?void 0:a.key)}return(O=a==null?void 0:a.onChange)==null||O.call(a,u),u}return f.updateDeps=d=>{c=d},f}function Ir(r,o){if(r===void 0)throw new Error("Unexpected undefined");return r}const Th=(r,o)=>Math.abs(r-o)<1.01,Nh=(r,o,a)=>{let c;return function(...u){r.clearTimeout(c),c=r.setTimeout(()=>o.apply(this,u),a)}},Br=r=>{const{offsetWidth:o,offsetHeight:a}=r;return{width:o,height:a}},Lh=r=>r,Mh=r=>{const o=Math.max(r.startIndex-r.overscan,0),a=Math.min(r.endIndex+r.overscan,r.count-1),c=[];for(let u=o;u<=a;u++)c.push(u);return c},Eh=(r,o)=>{const a=r.scrollElement;if(!a)return;const c=r.targetWindow;if(!c)return;const u=d=>{const{width:_,height:z}=d;o({width:Math.round(_),height:Math.round(z)})};if(u(Br(a)),!c.ResizeObserver)return()=>{};const f=new c.ResizeObserver(d=>{const _=()=>{const z=d[0];if(z!=null&&z.borderBoxSize){const O=z.borderBoxSize[0];if(O){u({width:O.inlineSize,height:O.blockSize});return}}u(Br(a))};r.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(_):_()});return f.observe(a,{box:"border-box"}),()=>{f.unobserve(a)}},Rr={passive:!0},Zr=typeof window>"u"?!0:"onscrollend"in window,Oh=(r,o)=>{const a=r.scrollElement;if(!a)return;const c=r.targetWindow;if(!c)return;let u=0;const f=r.options.useScrollendEvent&&Zr?()=>{}:Nh(c,()=>{o(u,!1)},r.options.isScrollingResetDelay),d=x=>()=>{const{horizontal:S,isRtl:B}=r.options;u=S?a.scrollLeft*(B&&-1||1):a.scrollTop,f(),o(u,x)},_=d(!0),z=d(!1);z(),a.addEventListener("scroll",_,Rr);const O=r.options.useScrollendEvent&&Zr;return O&&a.addEventListener("scrollend",z,Rr),()=>{a.removeEventListener("scroll",_),O&&a.removeEventListener("scrollend",z)}},Ah=(r,o,a)=>{if(o!=null&&o.borderBoxSize){const c=o.borderBoxSize[0];if(c)return Math.round(c[a.options.horizontal?"inlineSize":"blockSize"])}return r[a.options.horizontal?"offsetWidth":"offsetHeight"]},Ih=(r,{adjustments:o=0,behavior:a},c)=>{var u,f;const d=r+o;(f=(u=c.scrollElement)==null?void 0:u.scrollTo)==null||f.call(u,{[c.options.horizontal?"left":"top"]:d,behavior:a})};class Bh{constructor(o){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let a=null;const c=()=>a||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:a=new this.targetWindow.ResizeObserver(u=>{u.forEach(f=>{const d=()=>{this._measureElement(f.target,f)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(d):d()})}));return{disconnect:()=>{var u;(u=c())==null||u.disconnect(),a=null},observe:u=>{var f;return(f=c())==null?void 0:f.observe(u,{box:"border-box"})},unobserve:u=>{var f;return(f=c())==null?void 0:f.unobserve(u)}}})(),this.range=null,this.setOptions=a=>{Object.entries(a).forEach(([c,u])=>{typeof u>"u"&&delete a[c]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Lh,rangeExtractor:Mh,onChange:()=>{},measureElement:Ah,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...a}},this.notify=a=>{var c,u;(u=(c=this.options).onChange)==null||u.call(c,this,a)},this.maybeNotify=Qt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),a=>{this.notify(a)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(a=>a()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var a;const c=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==c){if(this.cleanup(),!c){this.maybeNotify();return}this.scrollElement=c,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((a=this.scrollElement)==null?void 0:a.window)??null,this.elementsCache.forEach(u=>{this.observer.observe(u)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,u=>{this.scrollRect=u,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(u,f)=>{this.scrollAdjustments=0,this.scrollDirection=f?this.getScrollOffset()<u?"forward":"backward":null,this.scrollOffset=u,this.isScrolling=f,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(a,c)=>{const u=new Map,f=new Map;for(let d=c-1;d>=0;d--){const _=a[d];if(u.has(_.lane))continue;const z=f.get(_.lane);if(z==null||_.end>z.end?f.set(_.lane,_):_.end<z.end&&u.set(_.lane,!0),u.size===this.options.lanes)break}return f.size===this.options.lanes?Array.from(f.values()).sort((d,_)=>d.end===_.end?d.index-_.index:d.end-_.end)[0]:void 0},this.getMeasurementOptions=Qt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(a,c,u,f,d)=>(this.pendingMeasuredCacheIndexes=[],{count:a,paddingStart:c,scrollMargin:u,getItemKey:f,enabled:d}),{key:!1}),this.getMeasurements=Qt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:a,paddingStart:c,scrollMargin:u,getItemKey:f,enabled:d},_)=>{if(!d)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(x=>{this.itemSizeCache.set(x.key,x.size)}));const z=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const O=this.measurementsCache.slice(0,z);for(let x=z;x<a;x++){const S=f(x),B=this.options.lanes===1?O[x-1]:this.getFurthestMeasurement(O,x),v=B?B.end+this.options.gap:c+u,W=_.get(S),C=typeof W=="number"?W:this.options.estimateSize(x),R=v+C,ie=B?B.lane:x%this.options.lanes;O[x]={index:x,start:v,size:C,end:R,key:S,lane:ie}}return this.measurementsCache=O,O},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Qt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(a,c,u,f)=>this.range=a.length>0&&c>0?Rh({measurements:a,outerSize:c,scrollOffset:u,lanes:f}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Qt(()=>{let a=null,c=null;const u=this.calculateRange();return u&&(a=u.startIndex,c=u.endIndex),this.maybeNotify.updateDeps([this.isScrolling,a,c]),[this.options.rangeExtractor,this.options.overscan,this.options.count,a,c]},(a,c,u,f,d)=>f===null||d===null?[]:a({startIndex:f,endIndex:d,overscan:c,count:u}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=a=>{const c=this.options.indexAttribute,u=a.getAttribute(c);return u?parseInt(u,10):(console.warn(`Missing attribute name '${c}={index}' on measured element.`),-1)},this._measureElement=(a,c)=>{const u=this.indexFromElement(a),f=this.measurementsCache[u];if(!f)return;const d=f.key,_=this.elementsCache.get(d);_!==a&&(_&&this.observer.unobserve(_),this.observer.observe(a),this.elementsCache.set(d,a)),a.isConnected&&this.resizeItem(u,this.options.measureElement(a,c,this))},this.resizeItem=(a,c)=>{const u=this.measurementsCache[a];if(!u)return;const f=this.itemSizeCache.get(u.key)??u.size,d=c-f;d!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(u,d,this):u.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=d,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(u.index),this.itemSizeCache=new Map(this.itemSizeCache.set(u.key,c)),this.notify(!1))},this.measureElement=a=>{if(!a){this.elementsCache.forEach((c,u)=>{c.isConnected||(this.observer.unobserve(c),this.elementsCache.delete(u))});return}this._measureElement(a,void 0)},this.getVirtualItems=Qt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(a,c)=>{const u=[];for(let f=0,d=a.length;f<d;f++){const _=a[f],z=c[_];u.push(z)}return u},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=a=>{const c=this.getMeasurements();if(c.length!==0)return Ir(c[mo(0,c.length-1,u=>Ir(c[u]).start,a)])},this.getOffsetForAlignment=(a,c,u=0)=>{const f=this.getSize(),d=this.getScrollOffset();c==="auto"&&(c=a>=d+f?"end":"start"),c==="center"?a+=(u-f)/2:c==="end"&&(a-=f);const _=this.getTotalSize()+this.options.scrollMargin-f;return Math.max(Math.min(_,a),0)},this.getOffsetForIndex=(a,c="auto")=>{a=Math.max(0,Math.min(a,this.options.count-1));const u=this.measurementsCache[a];if(!u)return;const f=this.getSize(),d=this.getScrollOffset();if(c==="auto")if(u.end>=d+f-this.options.scrollPaddingEnd)c="end";else if(u.start<=d+this.options.scrollPaddingStart)c="start";else return[d,c];const _=c==="end"?u.end+this.options.scrollPaddingEnd:u.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(_,c,u.size),c]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(a,{align:c="start",behavior:u}={})=>{u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(a,c),{adjustments:void 0,behavior:u})},this.scrollToIndex=(a,{align:c="auto",behavior:u}={})=>{u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),a=Math.max(0,Math.min(a,this.options.count-1));let f=0;const d=10,_=O=>{if(!this.targetWindow)return;const x=this.getOffsetForIndex(a,O);if(!x){console.warn("Failed to get offset for index:",a);return}const[S,B]=x;this._scrollToOffset(S,{adjustments:void 0,behavior:u}),this.targetWindow.requestAnimationFrame(()=>{const v=this.getScrollOffset(),W=this.getOffsetForIndex(a,B);if(!W){console.warn("Failed to get offset for index:",a);return}Th(W[0],v)||z(B)})},z=O=>{this.targetWindow&&(f++,f<d?this.targetWindow.requestAnimationFrame(()=>_(O)):console.warn(`Failed to scroll to index ${a} after ${d} attempts.`))};_(c)},this.scrollBy=(a,{behavior:c}={})=>{c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+a,{adjustments:void 0,behavior:c})},this.getTotalSize=()=>{var a;const c=this.getMeasurements();let u;if(c.length===0)u=this.options.paddingStart;else if(this.options.lanes===1)u=((a=c[c.length-1])==null?void 0:a.end)??0;else{const f=Array(this.options.lanes).fill(null);let d=c.length-1;for(;d>=0&&f.some(_=>_===null);){const _=c[d];f[_.lane]===null&&(f[_.lane]=_.end),d--}u=Math.max(...f.filter(_=>_!==null))}return Math.max(u-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(a,{adjustments:c,behavior:u})=>{this.options.scrollToFn(a,{behavior:u,adjustments:c},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(o)}}const mo=(r,o,a,c)=>{for(;r<=o;){const u=(r+o)/2|0,f=a(u);if(f<c)r=u+1;else if(f>c)o=u-1;else return u}return r>0?r-1:0};function Rh({measurements:r,outerSize:o,scrollOffset:a,lanes:c}){const u=r.length-1,f=z=>r[z].start;if(r.length<=c)return{startIndex:0,endIndex:u};let d=mo(0,u,f,a),_=d;if(c===1)for(;_<u&&r[_].end<a+o;)_++;else if(c>1){const z=Array(c).fill(0);for(;_<u&&z.some(x=>x<a+o);){const x=r[_];z[x.lane]=x.end,_++}const O=Array(c).fill(a+o);for(;d>=0&&O.some(x=>x>=a);){const x=r[d];O[x.lane]=x.start,d--}d=Math.max(0,d-d%c),_=Math.min(u,_+(c-1-_%c))}return{startIndex:d,endIndex:_}}const Fr=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Zh(r){const o=E.useReducer(()=>({}),{})[1],a={...r,onChange:(u,f)=>{var d;f?Dr.flushSync(o):o(),(d=r.onChange)==null||d.call(r,u,f)}},[c]=E.useState(()=>new Bh(a));return c.setOptions(a),Fr(()=>c._didMount(),[]),Fr(()=>c._willUpdate()),c}function Fh(r){return Zh({observeElementRect:Eh,observeElementOffset:Oh,scrollToFn:Ih,...r})}const $h=({nodes:r,liveData:o,forceShowTrafficText:a,staggered:c=!1})=>{const u=E.useRef(null),[f,d]=E.useState(0),[_,z]=E.useState(600),O=(o==null?void 0:o.online)||[],x=E.useMemo(()=>
161{if(f===0)return 1;const C=32,R=16,ie=f-C;return Math.max(1,Math.floor((ie+R)/(430+R)))},[f]),S=E.useMemo(()=>{const C=[];for(let R=0;R<r.length;R+=x)C.push(r.slice(R,R+x));return C},[r,x]),B=E.useCallback(C=>{const ie=window.innerWidth<640?360:400,ne=S[C];return ne&&ne.length>0&&ne.some(ee=>ee.tags&&ee.tags.split(";").length>4||ee.name.length>25)?ie+40:ie},[S]),v=Fh({count:S.length,getScrollElement:()=>u.current,estimateSize:B,overscan:3,gap:16,measureElement:typeof window<"u"&&window.ResizeObserver?C=>C.getBoundingClientRect().height:void 0});E.useEffect(()=>{const C=()=>{if(u.current){d(u.current.clientWidth);const $=window.innerHeight,ue=u.current.getBoundingClientRect().top,y=$-ue-50,k=Math.max(400,y);z(k)}},R=navigator.userAgent.toLowerCase().includes("firefox"),ie=R?200:100;requestAnimationFrame(()=>{C()});const ne=new ResizeObserver(C);return u.current&&ne.observe(u.current),window.addEventListener("resize",C),setTimeout(()=>{C(),R&&requestAnimationFrame(()=>{C()})},ie),()=>{ne.disconnect(),window.removeEventListener("resize",C)}},[r.length]),E.useEffect(()=>{const C=()=>{v.measure()};return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[v]);const W=v.getVirtualItems();return n.jsxs(n.Fragment,{children:[r.length>50&&n.jsxs("div",{className:"px-4 py-2 text-xs text-accent-11 bg-accent-2 rounded-md mx-4 mb-2",children:[n.jsx("span",{className:"font-medium",children:"èææ»å¨å·²å¯ç¨"})," - æ¾ç¤º ",W.length*x," / ",r.length," 个èç¹"]}),n.jsx("div",{ref:u,className:"virtual-scroll-container overflow-auto p-4 scrollbar-thin scrollbar-thumb-accent-6 scrollbar-track-accent-3 relative",style:{height:`${_}px`,minHeight:"400px",contain:"layout style",willChange:"scroll-position"},children:n.jsx("div",{style:{height:`${v.getTotalSize()}px`,width:"100%",position:"relative"},children:W.map(C=>{const R=S[C.index];return n.jsx("div",{"data-index":C.index,ref:v.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",minHeight:`${C.size}px`,transform:`translateY(${C.start}px)`,willChange:"transform"},children:n.jsx("div",{className:"gap-4 pb-4",style:{display:"grid",gridTemplateColumns:`repeat(${x}, 1fr)`,gridAutoRows:"max-content",contain:"layout style paint"},children:R.map((ie,ne)=>{var Y;const $=O.includes(ie.uuid),ee=(Y=o==null?void 0:o.data)==null?void 0:Y[ie.uuid],ue=C.index*x+ne;return n.jsx("div",{className:c?"node-card-enter":void 0,style:{contain:"layout style paint","--node-enter-delay":`${Math.min(ue,18)*28}ms`},children:n.jsx(ao,{basic:ie,live:ee,online:$,forceShowTrafficText:a})},ie.uuid)})})},C.key)})})})]})},Qi=["modern","compact","classic","detailed","task","earth"],Dh=r=>typeof r=="string"&&Qi.includes(r),en=(r,o,a)=>Number.isNaN(r)?o:Math.min(a,Math.max(o,r)),Hh=r=>{const o=Number(r);return!Number.isFinite(o)||o<=0?null:o},$r=(r,o)=>{if(r==null)return o;if(typeof r=="boolean")return r;if(typeof r=="number")return r!==0;if(typeof r=="string"){const a=r.trim().toLowerCase();if(["true","1","yes","on"].includes(a))return!0;if(["false","0","no","off"].includes(a))return!1}return o},Qn=(r,o)=>{if(typeof r!="string")return o;const a=r.trim().toLowerCase();return Dh(a)?a:o},Wh=r=>{const o=Number(r);return!Number.isFinite(o)||o<=0?null:en(o,960,2560)},Uh=({nodes:r,liveData:o,forceShowTrafficText:a})=>{var pe,we,Ie,Re,Xe,ft,ot,mt,at;const[c]=dt(),u=ds(),{publicInfo:f}=cn(),d=$r((pe=f==null?void 0:f.theme_settings)==null?void 0:pe.enablePagination,!0),_=200,z=E.useMemo(()=>{var g;const m=Hh((g=f==null?void 0:f.theme_settings)==null?void 0:g.paginationPageSize)??24;return en(m,1,_)},[f]),O=Qn((we=f==null?void 0:f.theme_settings)==null?void 0:we.defaultViewMode,"modern"),x=Qn((Ie=f==null?void 0:f.theme_settings)==null?void 0:Ie.desktopDefaultViewMode,O),S=Qn((Re=f==null?void 0:f.theme_settings)==null?void 0:Re.mobileDefaultViewMode,O),B=u?S:x,v=u?"nodeViewMode.mobile":"nodeViewMode.desktop",[W,C]=es(v,B),R=Qi.includes(W)?W:"modern",ie=((Xe=f==null?void 0:f.theme_settings)==null?void 0:Xe.enableVirtualScroll)??!0,ne=$r((ft=f==null?void 0:f.theme_settings)==null?void 0:ft.enableStaggeredCards,!0),$=Wh((ot=f==null?void 0:f.theme_settings)==null?void 0:ot.dashboardMaxWidth);E.useEffect(()=>{typeof window>"u"||window.localStorage.getItem(v)===null&&W!==B&&C(B)},[B,C,W,v]),E.useEffect(()=>{Qi.includes(W)||C("modern")},[W,C]);const[ee,ue]=E.useState(""),[Y,y]=es("nodeSelectedGroup","all"),k=E.useRef(null),[I,Q]=E.useState(()=>Qi.reduce((q,ye)=>(q[ye]=1,q),{}));E.useEffect(()=>{Q(q=>q[R]!==void 0?q:{...q,[R]:1})},[R]);const G=I[R]??1,[X,w]=E.useState(()=>typeof window<"u"?window.innerWidth>=860:!1);E.useEffect(()=>{const q=()=>{w(window.innerWidth>=860)};return window.addEventListener("resize",q),q(),()=>window.removeEventListener("resize",q)},[]);const A=E.useMemo(()=>{const q=new Set;return r.forEach(ye=>{ye.group&&ye.group.trim()&&q.add(ye.group)}),Array.from(q).sort()},[r]),Z=A.length>=1;E.useEffect(()=>{const q=ye=>{var m,g;
161ye.key==="/"&&!ye.ctrlKey&&!ye.metaKey&&!ye.altKey&&(ye.preventDefault(),(m=k.current)==null||m.focus()),ye.key==="Escape"&&ee&&(ue(""),(g=k.current)==null||g.blur())};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[ee]);const D=E.useMemo(()=>{let q=r;if(Y!=="all"&&(q=q.filter(m=>m.group===Y)),!ee.trim())return q;const ye=ee.toLowerCase().trim();return q.filter(m=>{var ae;const g=m.name.toLowerCase().includes(ye)||m.os.toLowerCase().includes(ye)||m.arch.toLowerCase().includes(ye),M=rc(m.region,ye),j=!isNaN(Number(ye))&&m.price.toString().includes(ye),V=((ae=o==null?void 0:o.online)==null?void 0:ae.includes(m.uuid))||!1;return g||M||j||((ye==="online"||ye==="å¨çº¿")&&V||(ye==="offline"||ye==="离线")&&!V)})},[r,ee,o,Y]),K=E.useMemo(()=>new Set((o==null?void 0:o.online)||[]),[o==null?void 0:o.online]),J=E.useMemo(()=>{var ye;const q=((ye=f==null?void 0:f.theme_settings)==null?void 0:ye.offlineNodePosition)??"åé¢";return[...D].sort((m,g)=>{const M=K.has(m.uuid),j=K.has(g.uuid);if(q==="åé¢"){if(M!==j)return M?1:-1}else if(q!=="åä½ç½®"){if(M!==j)return M?-1:1}return m.weight-g.weight})},[D,K,f]),he=J.length,U=d&&R!=="task"&&R!=="earth",re=U&&he>0?Math.max(1,Math.ceil(he/z)):1,te=U?en(G,1,re):1,[me,H]=E.useState(()=>String(te)),le=E.useCallback(q=>{if(!U)return;const ye=en(q,1,re);Q(m=>(m[R]??1)===ye?m:{...m,[R]:ye})},[U,R,re]);E.useEffect(()=>{U&&G!==te&&Q(q=>(q[R]??1)===te?q:{...q,[R]:te})},[te,U,G,R]),E.useEffect(()=>{H(String(te))},[te]),E.useEffect(()=>{U&&Q(q=>(q[R]??1)===1?q:{...q,[R]:1})},[ee,Y,U,R]);const fe=he>0,Pe=U&&fe?(te-1)*z+1:fe?1:0,Te=U&&fe?Math.min(he,Pe+z-1):fe?he:0,Ne=E.useMemo(()=>{if(!U)return J;if(!fe)return[];const q=(te-1)*z;return J.slice(q,q+z)},[J,U,fe,te,z]),Se=E.useCallback(q=>{/^\d*$/.test(q)&&H(q)},[]),Be=E.useCallback(()=>{if(!U){H(String(te));return}const q=Number(me);if(!Number.isFinite(q)||q<1){H(String(te));return}le(q)},[U,me,te,le]);return n.jsxs("div",{className:`node-dashboard-shell w-full ${ne?"staggered-cards":""}`,style:{maxWidth:$?`${$}px`:void 0},children:[n.jsxs(T,{direction:{initial:"column",sm:"row"},justify:"between",align:{initial:"stretch",sm:"center"},gap:"4",className:"control-bar mb-2 p-4 rounded-lg",children:[n.jsxs(T,{align:"center",gap:"2",className:"flex-1 max-w-md relative",wrap:"wrap",children:[n.jsx(kr,{ref:k,placeholder:c("search.placeholder",{defaultValue:"æç´¢èç¹åç§°ãå°åºãç³»ç»..."}),value:ee,onChange:q=>ue(q.target.value),className:"search-box flex-1 pr-8 min-w-32",children:n.jsx(ml,{children:n.jsx(Kl,{size:16})})}),ee&&n.jsx(Ct,{variant:"ghost",size:"1",className:"absolute right-2 h-6 w-6 search-clear-button",onClick:()=>{var q;ue(""),(q=k.current)==null||q.focus()},children:n.jsx(pl,{size:12})})]}),n.jsx("div",{className:u?"w-full":"",children:n.jsx(Sh,{currentMode:R,onModeChange:C,isMobile:u})})]}),Z&&n.jsxs(T,{align:"center",gap:"2",className:"mx-4 mb-2 -mt-2 overflow-x-auto scrollbar-thin",children:[n.jsx("label",{className:"whitespace-nowrap text-md text-muted-foreground flex-shrink-0",children:c("common.group",{defaultValue:"åç»"})}),n.jsxs(ii,{value:Y,onValueChange:y,size:"1",className:"flex-shrink-0",children:[n.jsx(st,{value:"all",children:c("common.all",{defaultValue:"ææ"})}),A.map(q=>n.jsx(st,{value:q,children:q},q))]})]}),n.jsx(T,{justify:"between",align:"center",className:"mx-4 mb-2",children:ee.trim()?n.jsx(b,{size:"2",color:"gray",children:c("search.results",{count:D.length,total:Y==="all"?r.length:r.filter(q=>q.group===Y).length,defaultValue:`æ¾å° ${D.length} 个æå¡å¨ï¼å
± ${Y==="all"?r.length:r.filter(q=>q.group===Y).length} 个`})}):n.jsx(b,{size:"2",color:"gray",children:Y==="all"?c("nodeCard.totalNodes",{total:r.length,online:((mt=o==null?void 0:o.online)==null?void 0:mt.length)||0,defaultValue:`å
± ${r.length} 个èç¹ï¼${((at=o==null?void 0:o.online)==null?void 0:at.length)||0} 个å¨çº¿`}):c("nodeCard.groupNodes",{group:Y,total:D.length,online:D.filter(q=>{var ye;return(ye=o==null?void 0:o.online)==null?void 0:ye.includes(q.uuid)}).length,defaultValue:`${Y} åç»ï¼å
± ${D.length}
161 个èç¹ï¼${D.filter(q=>{var ye;return(ye=o==null?void 0:o.online)==null?void 0:ye.includes(q.uuid)}).length} 个å¨çº¿`})})}),D.length===0?n.jsxs(T,{direction:"column",align:"center",justify:"center",className:"py-16 mx-4",children:[n.jsx(b,{size:"4",color:"gray",className:"mb-2",children:ee.trim()?c("search.no_results",{defaultValue:"æªæ¾å°å¹é çèç¹"}):c("nodes.empty",{defaultValue:"ææ èç¹æ°æ®"})}),ee.trim()&&n.jsx(b,{size:"2",color:"gray",children:c("search.try_different",{defaultValue:"å°è¯ä¸åçæç´¢å ³é®è¯"})})]}):n.jsxs(n.Fragment,{children:[R==="modern"&&(ie&&X?n.jsx($h,{nodes:Ne,liveData:o,forceShowTrafficText:a,staggered:ne}):n.jsx(Vh,{nodes:Ne,liveData:o,forceShowTrafficText:a,staggered:ne})),R==="compact"&&n.jsx(Gh,{nodes:Ne,liveData:o,staggered:ne}),R==="classic"&&n.jsx(Qa,{nodes:Ne,liveData:o,staggered:ne}),R==="detailed"&&n.jsx(Oc,{nodes:Ne,liveData:o}),R==="task"&&n.jsx(Xc,{nodes:J,liveData:o}),R==="earth"&&n.jsx(Ch,{nodes:J,liveData:o})]}),U&&n.jsx("div",{className:"pagination-container mx-4 mt-6 mb-4",children:n.jsxs(T,{direction:{initial:"column",sm:"row"},justify:"between",align:{initial:"center",sm:"center"},gap:"4",className:"pagination-wrapper",children:[n.jsxs(T,{direction:"column",gap:"1",align:{initial:"center",sm:"start"},className:"pagination-info",children:[n.jsx(b,{size:"2",weight:"medium",color:"gray",children:fe?c("pagination.showing",{start:Pe,end:Te,defaultValue:`æ¾ç¤ºç¬¬ ${Pe}-${Te} 项`}):c("pagination.empty",{defaultValue:"å½å没æå¯æ¾ç¤ºçèç¹"})}),n.jsx(b,{size:"1",color:"gray",children:fe&&c("pagination.totalInfo",{total:he,pageSize:z,defaultValue:`å ± ${he} 项 · æ¯é¡µ ${z} 项`})})]}),n.jsxs(T,{align:"center",gap:"2",className:"pagination-controls-wrapper",children:[te>2&&n.jsxs(Ct,{variant:"soft",size:"2",radius:"full",className:"pagination-quick-nav",onClick:()=>le(1),"aria-label":c("pagination.first",{defaultValue:"é¦é¡µ"}),children:[n.jsx(Kn,{size:14}),n.jsx(Kn,{size:14,style:{marginLeft:"-8px"}})]}),n.jsx(Ct,{variant:"soft",size:"2",radius:"full",className:"pagination-nav-button",disabled:te<=1,onClick:()=>le(te-1),"aria-label":c("pagination.prev",{defaultValue:"ä¸ä¸é¡µ"}),children:n.jsx(Kn,{size:16})}),n.jsx(T,{align:"center",gap:"1",className:"pagination-numbers",children:(()=>{const q=[];if(re>7)if(te<=4){for(let m=1;m<=5;m++)q.push(m);q.push("..."),q.push(re)}else if(te>=re-3){q.push(1),q.push("...");for(let m=re-4;m<=re;m++)q.push(m)}else q.push(1),q.push("..."),q.push(te-1),q.push(te),q.push(te+1),q.push("..."),q.push(re);else for(let m=1;m<=re;m++)q.push(m);return q.map((m,g)=>{if(m==="...")return n.jsx("span",{className:"pagination-ellipsis",children:"···"},`ellipsis-${g}`);const M=m;return n.jsx(ns,{variant:M===te?"solid":"ghost",size:"1",radius:"full",className:`pagination-number ${M===te?"active":""}`,onClick:()=>le(M),"data-page":M,children:M},`page-${M}`)})})()}),n.jsx(Ct,{variant:"soft",size:"2",radius:"full",className:"pagination-nav-button",disabled:te>=re,onClick:()=>le(te+1),"aria-label":c("pagination.next",{defaultValue:"ä¸ä¸é¡µ"}),children:n.jsx(Yi,{size:16})}),te<re-1&&n.jsxs(Ct,{variant:"soft",size:"2",radius:"full",className:"pagination-quick-nav",onClick:()=>le(re),"aria-label":c("pagination.last",{defaultValue:"æ«é¡µ"}),children:[n.jsx(Yi,{size:14}),n.jsx(Yi,{size:14,style:{marginLeft:"-8px"}})]}),n.jsxs("div",{className:"pagination-goto hidden sm:flex",children:[n.jsx(kr,{value:me,onChange:q=>Se(q.target.value),onBlur:Be,onKeyDown:q=>{q.key==="Enter"&&Be()},disabled:!fe,size:"1",placeholder:String(te),style:{width:"4rem"},className:"pagination-input"}),n.jsxs(b,{size:"1",color:"gray",className:"ml-2",children:["/ ",re]})]})]})]})})]})},Vh=({nodes:r,liveData:o,forceShowTrafficText:a,staggered:c=!1})=>{const u=(o==null?void 0:o.online)||[];return n.jsx("div",{className:"modern-grid-container",style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(430px, 1fr))",gap:"1rem",padding:"1rem",gridAutoRows:"min-content",alignItems:"start",contain:"layout style",willChange:"contents",overflowX:"hidden"},children:r.map((f,d)=>{var O;const _=u.includes(f.uuid),z=(O=o==null?void 0:o.data)==null?void 0:O[f.uuid];return n.jsx("div",{className:c?"node-card-enter":void 0,style:{contain:"layout style paint",willChange:"auto","--node-enter-delay":`${Math.min(d,18)*28}ms`},children:n.jsx(ao,{basic:f,live:z,online:_,forceShowTrafficText:a})},f.uuid)})})},Gh=({nodes:r,liveData:o,staggered:a=!1})=>{const c=(o==null?void 0:o.online)||[];return n.jsx(T,{direction:"column",gap:"2",className:"p-4",children:r.map((u,f)=>{var z;const d=c.includes(u.uuid),_=(z=o==null?void 0:o.data)==null?void 0:z[u.uuid];return n.jsx(Vc,{className:a?"node-card-enter":void 0,style:{"--node-enter-delay":`${Math.min(f,18)*28}ms`},basic:u,live:_,online:d},u.uuid)})})},Kh=({currentTime:r,onlineCount:o,totalCount:a,regionCount:c,uploadTotal:u,downloadTotal:f,uploadSpeed:d,downloadSpeed:_,cpuCoresTotal:z,memoryTotal:O,diskTotal:x,statusCardsVisibility:S,onVisibilityChange:B})=>{const[v]=dt(),[W,C]=E.useState([]),R=30;E.useEffect(()=>{const ee=window.requestAnimationFrame(()=>{const ue={time:Date.now(),upload:d,download:_};C(Y=>{const y=[...Y,ue];return y.length>R?y.slice(-30):y})});return()=>window.cancelAnimationFrame(ee)},[d,_]);const ie=ee=>{if(ee===0)return"0 B/s";const ue=["B/s","KB/s","MB/s","GB/s"],Y=Math.floor(Math.log(ee)/Math.log(1024)),y=ee/Math.pow(1024,Y);let k=0;return Y===2&&y<10&&(k=1),Y===3&&(k=2),`${y.toFixed(k)} ${ue[Y]}`},ne=a>0?o/a*100:0,$=ee=>ee>=80?"var(--green-9)":ee>=50?"var(--amber-9)":"var(--red-9)";return n.jsx(ut,{className:"status-bar-container mx-4 mb-2 relative py-2 px-3",children:n.jsxs(T,{direction:"column",gap:"0",children:[n.jsx("div",{className:"status-settings-button absolute top-2 right-2 z-10",children:n.jsxs(el,{children:[n.jsx(tl,{children:n.jsx(Ct,{variant:"ghost",size:"1",className:"transition-all",children:n.jsx(gl,{size:14})})}),n.jsx(il,{width:"300px",children:n.jsx(qh,{visibility:S,onVisibilityChange:B})})]})}),n.jsxs("div",{className:"status-cards-grid",children:[S.currentTime&&n.jsx("div",{className:"status-card-wrapper status-time-wrapper",children:n.jsx(ei,{icon:n.jsx(Mt,{size:16,style:{color:"var(--gray-11)"}}),title:v("current_time"),value:n.jsx("span",{className:"tabular-nums font-semibold text-base",children:r}),className:"status-time"})}),S.currentOnline&&n.jsx("div",{className:"status-card-wrapper status-online-wrapper",children:n.jsx(ei,{icon:n.jsx(sn,{size:16,style:{color:"var(--gray-11)"}}),title:v("current_online"),value:n.jsxs(T,{align:"center",justify:"between",className:"w-full",children:[n.jsxs("span",{className:"font-semibold tabular-nums text-base",children:[o,"/",a]}),n.jsxs("span",{className:"text-xs tabular-nums opacity-60",children:[ne.toFixed(0),"%"]})]}),subtitle:n.jsx("div",{className:"w-full rounded-full h-1.5 overflow-hidden",style:{background:"var(--gray-a4)"},children:n.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${ne}%`,backgroundColor:$(ne)}})}),className:"status-online"})}),S.regionOverview&&n.jsx("div",{className:"status-card-wrapper status-region-wrapper",children:n.jsx(ei,{icon:n.jsx(Xr,{size:16,style:{color:"var(--gray-11)"}}),title:v("region_overview"),value:n.jsx("span",{className:"font-semibold text-lg",children:c}),className:"status-region"})}),(S.assetOverview??!0)&&n.jsx("div",{className:"status-card-wrapper status-assets-wrapper",children:n.jsx(ei,{icon:n.jsx(Jr,{size:16,style:{color:"var(--gray-11)"}}),title:v("asset_overview"),value:n.jsxs(T,{direction:"column",gap:"0",children:[n.jsxs(b,{size:"2",className:"leading-snug font-medium",children:["CPU ",z]}),n.jsxs(b,{size:"2",className:"leading-snug font-medium",children:["RAM ",Ge(O)]}),n.jsxs(b,{size:"2",className:"leading-snug font-medium",children:["SSD ",Ge(x)]})]}),className:"status-assets"})}),S.trafficOverview&&n.jsx("div",{className:"status-card-wrapper status-traffic-wrapper",children:n.jsx(ei,{icon:n.jsx(on,{size:16,style:{color:"var(--gray-11)"}}),title:v("traffic_overview"),value:n.jsxs(T,{direction:"column",gap:"0",children:[n.jsxs(b,{size:"2",className:"leading-snug font-medium",children:["â ",Ge(u)]}),n.jsxs(b,{size:"2",className:"leading-snug font-medium",children:["â ",Ge(f)]})]}),className:"status-traffic"})}),S.networkSpeed&&n.jsx("div",{className:"status-card-wrapper status-speed-wrapper",children:n.jsx(ei,{icon:n.jsx(gs,{size:16,style:{color:"var(--gray-11)"}}),title:v("network_speed"),value:n.jsx("div",{className:"w-full h-12",children:n.jsx(Vr,{width:"100%",height:"100%",children:n.jsxs(Gr,{data:W,margin:{top:4,right:4,bottom:4,left:4},children:[n.jsx(Ji,{content:({active:ee,payload:ue})=>ee&&ue&&ue.length?n.jsxs("div",{className:"p-1.5 rounded shadow",style:{background:"var(--color-panel-solid)",border:"1px solid var(--gray-a5)"},children:[n.jsxs(b,{size:"1",style:{color:"var(--green-11)"},children:["â ",ie(ue[0].value)]}),n.jsx("br",{}),n.jsxs(b,{size:"1",style:{color:"var(--red-11)"},children:["â ",ie(ue[1].value)]})]}):null}),n.jsx($t,{type:"monotone",dataKey:"upload",stroke:"var(--green-9)",strokeWidth:1.5,dot:!1,animationDuration:0}),n.jsx($t,{type:"monotone",dataKey:"download",stroke:"var(--red-9)",strokeWidth:1.5,dot:!1,animationDuration:0})]})})}),subtitle:n.jsxs(T,{gap:"3",justify:"center",className:"text-xs",children:[n.jsxs(b,{size:"1",style:{color:"var(--green-11)"},children:["â ",ie(d)]}),n.jsxs(b,{size:"1",style:{color:"var(--red-11)"},children:["â ",ie(_)]})]}),className:"status-speed"})})]})]})})},ei=({icon:r,title:o,value:a,subtitle:c,className:u})=>n.jsx("div",{className:`status-card rounded-md min-h-[5.5rem] w-full ${u||""}`,children:n.jsxs(T,{direction:"column",gap:"1",className:"h-full justify-center",children:[n.jsxs(T,{align:"center",gap:"2",children:[n.jsx("div",{className:"status-icon flex-shrink-0",children:r}),n.jsx(b,{size:"1",color:"gray",className:"text-xs",children:o})]}),n.jsx("div",{className:"status-value w-full",children:a}),c&&n.jsx("div",{className:"status-subtitle",children:c})]})}),qh=({visibility:r,onVisibilityChange:o})=>{const[a]=dt(),c=f=>{o({...r,[f]:!r[f]})},u=[{key:"currentTime",label:a("current_time")},{key:"currentOnline",label:a("current_online")},{key:"regionOverview",label:a("region_overview")},{key:"assetOverview",label:a("asset_overview")},{key:"trafficOverview",label:a("traffic_overview")},{key:"networkSpeed",label:a("network_speed")},{key:"forceShowTrafficText",label:a("statusBar.forceShowTrafficText")}];return n.jsxs(T,{direction:"column",gap:"3",children:[n.jsx(b,{size:"2",weight:"bold",children:a("status_settings")}),n.jsx(T,{direction:"column",gap:"2",children:u.map(f=>n.jsxs("label",{className:"flex items-center justify-between cursor-pointer group",children:[n.jsx(b,{size:"2",children:f.label}),n.jsxs("button",{type:"button",role:"switch","aria-checked":!!(r[f.key]??!0),onClick:()=>c(f.key),className:` 162 relative inline-flex h-5 w-9 items-center rounded-full transition-all duration-200 163 focus:outline-none focus:ring-2 focus:ring-accent-8 focus:ring-offset-2 164 group-hover:shadow-sm 165 `,style:{background:r[f.key]??!0?"var(--accent-9)":"var(--gray-5)"},children:[n.jsxs("span",{className:"sr-only",children:["Toggle ",f.label]}),n.jsx("span",{className:` 166 inline-block h-4 w-4 transform rounded-full shadow-sm transition-all duration-200 167 ${r[f.key]??!0?"translate-x-[18px]":"translate-x-[2px]"} 168 `,style:{background:"var(--color-panel-solid)"}})]})]},f.key))})]})},Jh=r=>{const o=Number(r);
168if(!(!Number.isFinite(o)||o<=0))return`${Math.min(2560,Math.max(960,o))}px`},ru=()=>{const r=()=>{var $,ee,ue,Y,y;const{live_data:o}=us(),{publicInfo:a}=cn(),{nodeList:c,isLoading:u,error:f}=Hr(),[d,_]=E.useState(new Date().toLocaleTimeString());E.useEffect(()=>{const k=setInterval(()=>{_(new Date().toLocaleTimeString())},1e3);return()=>clearInterval(k)},[]);const[z,O]=es("statusCardsVisibility",{currentTime:!0,currentOnline:!0,regionOverview:!0,assetOverview:!0,trafficOverview:!0,networkSpeed:!0});let x=0,S=0;const B=(c==null?void 0:c.reduce((k,I)=>k+(I.cpu_cores||0),0))??0,v=(c==null?void 0:c.reduce((k,I)=>k+(I.mem_total||0),0))??0,W=(c==null?void 0:c.reduce((k,I)=>k+(I.disk_total||0),0))??0;if(($=o==null?void 0:o.data)!=null&&$.data){const k=Object.values(o.data.data);x=k.reduce((I,Q)=>{var G;return I+(((G=Q.network)==null?void 0:G.totalUp)||0)},0),S=k.reduce((I,Q)=>{var G;return I+(((G=Q.network)==null?void 0:G.totalDown)||0)},0)}if(u)return n.jsx(tn,{});if(f)return n.jsxs("div",{children:["Error: ",f]});const C=(ee=o==null?void 0:o.data)!=null&&ee.data?Object.values(o.data.data).reduce((k,I)=>k+(I.network.up||0),0):0,R=(ue=o==null?void 0:o.data)!=null&&ue.data?Object.values(o.data.data).reduce((k,I)=>k+(I.network.down||0),0):0,ie=c?Object.entries(c.reduce((k,I)=>(k[I.region]=(k[I.region]||0)+1,k),{})).length:0,ne=Jh((Y=a==null?void 0:a.theme_settings)==null?void 0:Y.dashboardMaxWidth);return n.jsxs(n.Fragment,{children:[n.jsx(Yh,{}),n.jsxs("div",{className:"home-dashboard-shell",style:{maxWidth:ne},children:[n.jsx(Kh,{currentTime:d,onlineCount:((y=o==null?void 0:o.data)==null?void 0:y.online.length)??0,totalCount:(c==null?void 0:c.length)??0,regionCount:ie,uploadTotal:x,downloadTotal:S,uploadSpeed:C,downloadSpeed:R,cpuCoresTotal:B,memoryTotal:v,diskTotal:W,statusCardsVisibility:z,onVisibilityChange:O}),n.jsx(Uh,{nodes:c??[],liveData:(o==null?void 0:o.data)??{online:[],data:{}},forceShowTrafficText:z.forceShowTrafficText})]})]})};return n.jsx(r,{})},Yh=()=>{const[r]=dt(),{showCallout:o}=us(),a=window.location.protocol==="https:";return n.jsxs(T,{direction:"column",gap:"2",className:"dashboard-callouts m-2",children:[n.jsxs(ss,{hidden:a,color:"red",children:[n.jsx(rs,{children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",viewBox:"0 0 24 24",children:n.jsx("path",{fill:"currentColor",d:"M10.03 3.659c.856-1.548 3.081-1.548 3.937 0l7.746 14.001c.83 1.5-.255 3.34-1.969 3.34H4.254c-1.715 0-2.8-1.84-1.97-3.34zM12.997 17A.999.999 0 1 0 11 17a.999.999 0 0 0 1.997 0m-.259-7.853a.75.75 0 0 0-1.493.103l.004 4.501l.007.102a.75.75 0 0 0 1.493-.103l-.004-4.502z"})})}),n.jsx(os,{children:n.jsx(b,{size:"2",weight:"medium",children:r("warn_https")})})]}),n.jsxs(ss,{hidden:o,id:"callout",color:"tomato",children:[n.jsx(rs,{children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:n.jsx("path",{fill:"currentColor",d:"M21.707 3.707a1 1 0 0 0-1.414-1.414L18.496 4.09a4.25 4.25 0 0 0-5.251.604l-1.068 1.069a1.75 1.75 0 0 0 0 2.474l3.585 3.586a1.75 1.75 0 0 0 2.475 0l1.068-1.068a4.25 4.25 0 0 0 .605-5.25zm-11 8a1 1 0 0 0-1.414-1.414l-1.47 1.47l-.293-.293a.75.75 0 0 0-1.06 0l-1.775 1.775a4.25 4.25 0 0 0-.605 5.25l-1.797 1.798a1 1 0 1 0 1.414 1.414l1.798-1.797a4.25 4.25 0 0 0 5.25-.605l1.775-1.775a.75.75 0 0 0 0-1.06l-.293-.293l1.47-1.47a1 1 0 0 0-1.414-1.414l-1.47 1.47l-1.586-1.586z"})})}),n.jsx(os,{children:n.jsx(b,{size:"2",weight:"medium",children:r("warn_websocket")})})]})]})};export{ru as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.