+ Per-adapter tunables (thresholds, freshness windows, toggles, curation lists). + Changes take effect on the next handler call -- no container restart needed. + Sentence templates, emoji, and translation maps live in code by design. +
+ + {allAdapters.map((adapter) => { + const m = meta[adapter] || { + display_name: adapter, + include_in_llm_context: true, + description: '', + } + const rows = config[adapter] || [] + const isExpanded = expanded[adapter] ?? false + const metaId = `meta:${adapter}` + const metaStatus = saveStatus[metaId] || 'idle' + return ( +{adapter}
+ {rows.length > 0 && (
+ ({rows.length} settings)
+ )}
+ {rows.length === 0 && (
+ (meta only)
+ )}
+ {m.description}
+ )} +{row.key}
+ [{row.type}]
+ {!isDefault && (
+ edited
+ )}
+ {row.description}
+ )} +s>=80?"#22c55e":s>=60?"#f59e0b":"#ef4444")(t),a=2*Math.PI*45,o=t/100*a;return x.jsx("div",{className:"flex flex-col items-center",children:x.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[x.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),x.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:i,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:a-o,transform:"rotate(-90 50 50)",className:"transition-all duration-500"}),x.jsx("text",{x:"50",y:"46",textAnchor:"middle",className:"fill-slate-100 font-mono text-2xl font-bold",style:{fontSize:"24px"},children:t.toFixed(1)}),x.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function Tx({label:e,value:t}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:e}),x.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:x.jsx("div",{className:`h-full ${r(t)} transition-all duration-300`,style:{width:`${t}%`}})}),x.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:t.toFixed(1)})]})}function rNe({alert:e}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":case"immediate":return{bg:"bg-red-500/10",border:"border-red-500",icon:au,iconColor:"text-red-500"};case"warning":case"priority":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:su,iconColor:"text-amber-500"};case"routine":default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:MS,iconColor:"text-blue-500"}}})(e.severity),n=r.icon;return x.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[x.jsx(n,{size:16,className:r.iconColor}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsx("div",{className:"text-sm text-slate-200",children:e.message}),x.jsx("div",{className:"text-xs text-slate-500 mt-1",children:e.timestamp||"Just now"})]})]})}function nNe({source:e}){const t=()=>e.is_loaded?e.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return x.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[x.jsx("div",{className:`w-2 h-2 rounded-full ${t()}`}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsx("div",{className:"text-sm text-slate-200 truncate",children:e.name}),x.jsxs("div",{className:"text-xs text-slate-500",children:[e.node_count," nodes · ",e.type]})]})]})}function Cx({icon:e,label:t,value:r,subvalue:n}){return x.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[x.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[x.jsx(e,{size:14}),x.jsx("span",{className:"text-xs",children:t})]}),x.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&x.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function GA({label:e,value:t}){const r=()=>t===0?"bg-green-500/20 text-green-400 border-green-500/50":t<=2?"bg-amber-500/20 text-amber-400 border-amber-500/50":"bg-red-500/20 text-red-400 border-red-500/50";return x.jsxs("span",{className:`px-2 py-1 rounded text-xs font-mono font-medium border ${r()}`,children:[e,t]})}function sF({label:e,value:t,unit:r,getColor:n}){const i=t!==void 0?n(t):"text-slate-400";return x.jsxs("div",{className:"text-center",children:[x.jsx("div",{className:"text-xs text-slate-500 mb-1",children:e}),x.jsx("div",{className:`font-mono text-3xl font-bold ${i}`,children:(t==null?void 0:t.toFixed(0))??"—"}),r&&x.jsx("div",{className:"text-xs text-slate-500",children:r})]})}function iNe({history:e}){var a;const t=W.useMemo(()=>!e||e.length===0?[]:e.slice(-16).map((o,s)=>({idx:s,value:o.value,time:o.time})),[e]);if(t.length===0)return null;const r=Math.max(...t.map(o=>o.value),5),n=((a=t[t.length-1])==null?void 0:a.value)??0,i=()=>r>5?"kpGradientRed":r>3?"kpGradientAmber":"kpGradientGreen";return x.jsxs("div",{className:"h-20 w-full",children:[x.jsx(oX,{width:"100%",height:"100%",children:x.jsxs(eNe,{data:t,margin:{top:5,right:5,bottom:5,left:5},children:[x.jsxs("defs",{children:[x.jsxs("linearGradient",{id:"kpGradientGreen",x1:"0",y1:"0",x2:"0",y2:"1",children:[x.jsx("stop",{offset:"0%",stopColor:"#22c55e",stopOpacity:.4}),x.jsx("stop",{offset:"100%",stopColor:"#22c55e",stopOpacity:.05})]}),x.jsxs("linearGradient",{id:"kpGradientAmber",x1:"0",y1:"0",x2:"0",y2:"1",children:[x.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:.4}),x.jsx("stop",{offset:"100%",stopColor:"#f59e0b",stopOpacity:.05})]}),x.jsxs("linearGradient",{id:"kpGradientRed",x1:"0",y1:"0",x2:"0",y2:"1",children:[x.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:.4}),x.jsx("stop",{offset:"100%",stopColor:"#ef4444",stopOpacity:.05})]})]}),x.jsx(Dv,{domain:[0,Math.ceil(r)],hide:!0}),x.jsx(Ev,{dataKey:"idx",hide:!0}),x.jsx(sy,{y:3,stroke:"#f59e0b",strokeDasharray:"3 3",strokeOpacity:.5}),x.jsx(sy,{y:5,stroke:"#ef4444",strokeDasharray:"3 3",strokeOpacity:.5}),x.jsx(Su,{type:"monotone",dataKey:"value",stroke:n>5?"#ef4444":n>3?"#f59e0b":"#22c55e",fill:`url(#${i()})`,strokeWidth:2})]})}),x.jsxs("div",{className:"flex justify-between text-xs text-slate-600 px-1",children:[x.jsx("span",{children:"48h ago"}),x.jsx("span",{children:"now"})]})]})}function aNe({profile:e}){const t=W.useMemo(()=>!e||e.length===0?[]:[...e].sort((r,n)=>r.height_m-n.height_m).map(r=>({height:r.height_m,M:r.M})),[e]);return t.length===0?null:x.jsxs("div",{className:"h-24 w-full",children:[x.jsx(oX,{width:"100%",height:"100%",children:x.jsxs(QDe,{data:t,margin:{top:5,right:10,bottom:5,left:5},children:[x.jsx(Ev,{dataKey:"M",type:"number",domain:["dataMin - 20","dataMax + 20"],tick:{fontSize:10,fill:"#64748b"},tickLine:!1,axisLine:{stroke:"#334155"}}),x.jsx(Dv,{dataKey:"height",type:"number",domain:[0,"dataMax"],tick:{fontSize:10,fill:"#64748b"},tickLine:!1,axisLine:{stroke:"#334155"},tickFormatter:r=>`${(r/1e3).toFixed(1)}k`}),x.jsx(n0,{type:"monotone",dataKey:"M",stroke:"#3b82f6",strokeWidth:2,dot:{r:3,fill:"#3b82f6"}})]})}),x.jsx("div",{className:"text-center text-xs text-slate-600",children:"M-units vs Height (km)"})]})}function oNe({swpc:e,ducting:t}){const r=a=>a>=120?"text-green-400":a>=80?"text-amber-400":"text-red-400",n=a=>a<=3?"text-green-400":a<=5?"text-amber-400":"text-red-400",i=a=>{if(!a)return null;const o={normal:"bg-green-500/20 text-green-400 border-green-500/50",super_refraction:"bg-amber-500/20 text-amber-400 border-amber-500/50",surface_duct:"bg-blue-500/20 text-blue-400 border-blue-500/50",elevated_duct:"bg-blue-500/20 text-blue-400 border-blue-500/50"},s={normal:"Normal",super_refraction:"Super Refraction",surface_duct:"Surface Duct",elevated_duct:"Elevated Duct"};return x.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium border ${o[a]||o.normal}`,children:s[a]||a})};return x.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4 flex flex-col h-full",children:[x.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[x.jsx(Pm,{size:14}),"RF Propagation"]}),x.jsxs("div",{className:"flex justify-around mb-4",children:[x.jsx(sF,{label:"SFI",value:e==null?void 0:e.sfi,getColor:r}),x.jsx("div",{className:"w-px bg-border"}),x.jsx(sF,{label:"Kp",value:e==null?void 0:e.kp_current,getColor:n})]}),x.jsxs("div",{className:"flex justify-center gap-2 mb-4",children:[x.jsx(GA,{label:"R",value:(e==null?void 0:e.r_scale)??0}),x.jsx(GA,{label:"S",value:(e==null?void 0:e.s_scale)??0}),x.jsx(GA,{label:"G",value:(e==null?void 0:e.g_scale)??0})]}),(e==null?void 0:e.kp_history)&&e.kp_history.length>0&&x.jsxs("div",{className:"mb-4",children:[x.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Kp Trend (48h)"}),x.jsx(iNe,{history:e.kp_history})]}),x.jsx("div",{className:"border-t border-border my-3"}),x.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[x.jsx(ou,{size:14,className:"text-slate-400"}),x.jsx("span",{className:"text-xs text-slate-500",children:"Tropospheric"}),i(t==null?void 0:t.condition)]}),(t==null?void 0:t.min_gradient)!==void 0&&x.jsxs("div",{className:"text-xs text-slate-400 font-mono mb-2",children:["dM/dz: ",t.min_gradient.toFixed(1)," M-units/km"]}),(t==null?void 0:t.profile)&&t.profile.length>0&&x.jsx(aNe,{profile:t.profile}),(e==null?void 0:e.active_warnings)&&e.active_warnings.length>0&&x.jsxs("div",{className:"mt-auto pt-3 border-t border-border",children:[x.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"SWPC Alerts"}),x.jsx("div",{className:"flex flex-wrap gap-1",children:e.active_warnings.slice(0,3).map((a,o)=>x.jsx("span",{className:"px-2 py-0.5 rounded text-xs bg-amber-500/20 text-amber-400 border border-amber-500/30 truncate max-w-full",children:a.replace("Space Weather Message Code: ","")},o))})]})]})}const sNe={nws:{icon:ou,color:"text-blue-400",label:"NWS"},swpc:{icon:jZ,color:"text-yellow-400",label:"SWPC"},ducting:{icon:Za,color:"text-cyan-400",label:"Tropo"},nifc:{icon:AS,color:"text-orange-400",label:"NIFC"},firms:{icon:OS,color:"text-red-400",label:"FIRMS"},avalanche:{icon:kS,color:"text-slate-300",label:"Avy"},usgs:{icon:PZ,color:"text-blue-300",label:"USGS"},traffic:{icon:CS,color:"text-purple-400",label:"Traffic"},roads:{icon:AZ,color:"text-amber-400",label:"511"}},lF={routine:"bg-blue-500/20 text-blue-400 border-blue-500/30",priority:"bg-amber-500/20 text-amber-400 border-amber-500/30",immediate:"bg-red-600/20 text-red-300 border-red-600/30",info:"bg-blue-500/20 text-blue-400 border-blue-500/30",advisory:"bg-blue-500/20 text-blue-400 border-blue-500/30",moderate:"bg-amber-500/20 text-amber-400 border-amber-500/30",watch:"bg-amber-500/20 text-amber-400 border-amber-500/30",warning:"bg-amber-500/20 text-amber-400 border-amber-500/30",severe:"bg-red-500/20 text-red-400 border-red-500/30",extreme:"bg-red-600/20 text-red-300 border-red-600/30",critical:"bg-red-600/20 text-red-300 border-red-600/30",emergency:"bg-red-700/20 text-red-200 border-red-700/30"};function lNe({event:e,isLocal:t}){var f;const r=sNe[e.source]||{icon:MS,color:"text-slate-400",label:e.source},n=r.icon,i=lF[(f=e.severity)==null?void 0:f.toLowerCase()]||lF.info,a=h=>{const d=new Date(h*1e3),g=new Date().getTime()-d.getTime(),m=Math.floor(g/6e4);return m<1?"just now":m<60?`${m}m ago`:m<1440?`${Math.floor(m/60)}h ago`:d.toLocaleDateString(void 0,{month:"short",day:"numeric"})},o=e.event_type,s=e.area_desc,l=e.description;let u=e.headline;if(o&&s){const h=s.replace(/ County/g,"").split(";")[0];u=`${o} — ${h}`}else o&&(u=o);const c=l?l.split(". ")[0]:null;return x.jsxs("div",{className:`flex items-start gap-2 py-2 border-b border-border/50 last:border-0 ${t?"border-l-2 border-l-blue-500 pl-2 -ml-2":""}`,children:[x.jsx(n,{size:14,className:`mt-0.5 flex-shrink-0 ${r.color}`}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[x.jsx("span",{className:`px-1.5 py-0.5 rounded text-xs border ${i}`,children:e.severity||"info"}),t&&x.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs bg-blue-500/20 text-blue-400 border border-blue-500/30",children:"LOCAL"}),x.jsx("span",{className:"text-xs text-slate-500",children:r.label}),x.jsx("span",{className:"text-xs text-slate-600 ml-auto",children:a(e.fetched_at)})]}),x.jsx("div",{className:`text-sm truncate ${t?"text-slate-100":"text-slate-300"}`,children:u}),c&&x.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:c})]})]})}function uNe({events:e,envStatus:t}){const r={immediate:0,priority:1,routine:2},n=W.useMemo(()=>{const a=new Set;return e.filter(s=>s.event_id?a.has(s.event_id)?!1:(a.add(s.event_id),!0):!0).sort((s,l)=>{var d,v;const u=s.is_local?1:0,c=l.is_local?1:0;if(u!==c)return c-u;const f=r[((d=s.severity)==null?void 0:d.toLowerCase())||"routine"]??2,h=r[((v=l.severity)==null?void 0:v.toLowerCase())||"routine"]??2;return f!==h?f-h:(l.fetched_at||0)-(s.fetched_at||0)})},[e]),i=W.useMemo(()=>{if(!(t!=null&&t.feeds))return null;const a=t.feeds.length,o=t.feeds.filter(c=>c.is_loaded&&!c.last_error).length,s=t.feeds.filter(c=>c.last_error).map(c=>c.source),l=Math.max(...t.feeds.map(c=>c.last_fetch||0)),u=l?Math.floor(Date.now()/1e3-l):null;return{total:a,active:o,errors:s,secAgo:u}},[t]);return x.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4 flex flex-col h-full",children:[x.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[x.jsx(yv,{size:14}),"Live Event Feed"]}),n.length>0?x.jsx("div",{className:"flex-1 overflow-y-auto max-h-80 pr-1 -mr-1",children:n.map((a,o)=>x.jsx(lNe,{event:a,isLocal:a.is_local},a.event_id||o))}):x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsxs("div",{className:"text-center py-8",children:[x.jsx(JE,{size:24,className:"text-green-500 mx-auto mb-2"}),x.jsx("div",{className:"text-slate-400",children:"No active events"}),x.jsx("div",{className:"text-xs text-slate-500",children:"All clear"})]})}),i&&x.jsxs("div",{className:`text-xs mt-3 pt-3 border-t border-border ${i.errors.length>0?"text-amber-400":"text-slate-500"}`,children:[i.active," of ",i.total," feeds active",i.secAgo!==null&&` · Last update ${i.secAgo}s ago`,i.errors.length>0&&x.jsxs("span",{className:"text-amber-400",children:[" · ",i.errors.join(", "),": error"]})]})]})}function cNe(){var S,T,C,A,P;const[e,t]=W.useState(null),[r,n]=W.useState([]),[i,a]=W.useState([]),[o,s]=W.useState(null),[l,u]=W.useState([]),[c,f]=W.useState(null),[h,d]=W.useState(null),[v,g]=W.useState(!0),[m,y]=W.useState(null),{lastHealth:_,lastMessage:b}=iD();return W.useEffect(()=>{Promise.all([mce(),_ce(),zZ(),$Z(),FZ().catch(()=>[]),wce().catch(()=>null),Sce().catch(()=>null)]).then(([I,k,E,D,N,z,F])=>{t(I),n(k),a(E),s(D),u(N),f(z),d(F),g(!1),document.title="Dashboard — MeshAI"}).catch(I=>{y(I.message),g(!1),document.title="Dashboard — MeshAI"})},[]),W.useEffect(()=>{_&&t(_)},[_]),W.useEffect(()=>{(b==null?void 0:b.type)==="env_update"&&b.event&&u(I=>{const k=b.event,E=I.filter(D=>D.event_id!==k.event_id);return[k,...E].slice(0,100)})},[b]),v?x.jsx("div",{className:"flex items-center justify-center h-64",children:x.jsx("div",{className:"text-slate-400",children:"Loading..."})}):m?x.jsx("div",{className:"flex items-center justify-center h-64",children:x.jsxs("div",{className:"text-red-400",children:["Error: ",m]})}):x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[x.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[x.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),e&&x.jsxs(x.Fragment,{children:[x.jsx(tNe,{health:e}),x.jsxs("div",{className:"mt-6 space-y-3",children:[x.jsx(Tx,{label:"Infrastructure",value:((S=e.pillars)==null?void 0:S.infrastructure)??0}),x.jsx(Tx,{label:"Utilization",value:((T=e.pillars)==null?void 0:T.utilization)??0}),x.jsx(Tx,{label:"Behavior",value:((C=e.pillars)==null?void 0:C.behavior)??0}),x.jsx(Tx,{label:"Power",value:((A=e.pillars)==null?void 0:A.power)??0})]})]})]}),x.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[x.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[x.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?x.jsx("div",{className:"space-y-3 max-h-48 overflow-y-auto",children:i.map((I,k)=>x.jsx(rNe,{alert:I},k))}):x.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[x.jsx(JE,{size:16,className:"text-green-500"}),x.jsx("span",{children:"No active alerts"})]})]}),x.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[x.jsx(Cx,{icon:Za,label:"Nodes Online",value:(e==null?void 0:e.total_nodes)||0,subvalue:`${(e==null?void 0:e.unlocated_count)||0} unlocated`}),x.jsx(Cx,{icon:MZ,label:"Infrastructure",value:`${(e==null?void 0:e.infra_online)||0}/${(e==null?void 0:e.infra_total)||0}`,subvalue:(e==null?void 0:e.infra_online)===(e==null?void 0:e.infra_total)?"All online":"Some offline"}),x.jsx(Cx,{icon:yv,label:"Utilization",value:`${((P=e==null?void 0:e.util_percent)==null?void 0:P.toFixed(1))||0}%`,subvalue:`${(e==null?void 0:e.flagged_nodes)||0} flagged`}),x.jsx(Cx,{icon:PS,label:"Regions",value:(e==null?void 0:e.total_regions)||0,subvalue:`${(e==null?void 0:e.battery_warnings)||0} battery warnings`})]})]})]}),x.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[x.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[x.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?x.jsx("div",{className:"space-y-2",children:r.map((I,k)=>x.jsx(nNe,{source:I},k))}):x.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),x.jsx(oNe,{swpc:c,ducting:h}),x.jsx(uNe,{events:l,envStatus:o})]})]})}/*! *****************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */var $L=function(e,t){return $L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},$L(e,t)};function q(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");$L(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Wg=function(){return Wg=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]"u"&&typeof self<"u"?nt.worker=!0:!nt.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(nt.node=!0,nt.svgSupported=!0):vNe(navigator.userAgent,nt);function vNe(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}}var oN=12,wK="sans-serif",zs=oN+"px "+wK,pNe=20,gNe=100,mNe="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function yNe(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r1&&n&&n.length>1){var a=pF(n)/pF(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=qNe(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function Wr(){return[1,0,0,1,0,0]}function s0(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function l0(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Va(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],l=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e}function Ya(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function Ks(e,t,r,n){n===void 0&&(n=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(r),f=Math.cos(r);return e[0]=i*f+s*c,e[1]=-i*c+s*f,e[2]=a*f+l*c,e[3]=-a*c+f*l,e[4]=f*(o-n[0])+c*(u-n[1])+n[0],e[5]=f*(u-n[1])-c*(o-n[0])+n[1],e}function AT(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e}function va(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=r*o-a*n;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-n*l,e[3]=r*l,e[4]=(n*s-o*i)*l,e[5]=(a*i-r*s)*l,e):null}function EK(e){var t=Wr();return l0(t,e),t}const KNe=Object.freeze(Object.defineProperty({__proto__:null,clone:EK,copy:l0,create:Wr,identity:s0,invert:va,mul:Va,rotate:Ks,scale:AT,translate:Ya},Symbol.toStringTag,{value:"Module"}));var Ie=function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,n=this.y-t.y;return Math.sqrt(r*r+n*n)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,n=this.y-t.y;return r*r+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var r=this.x,n=this.y;return this.x=t[0]*r+t[2]*n+t[4],this.y=t[1]*r+t[3]*n+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,n){t.x=r,t.y=n},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,n){t.x=r.x+n.x,t.y=r.y+n.y},e.sub=function(t,r,n){t.x=r.x-n.x,t.y=r.y-n.y},e.scale=function(t,r,n){t.x=r.x*n,t.y=r.y*n},e.scaleAndAdd=function(t,r,n,i){t.x=r.x+n.x*i,t.y=r.y+n.y*i},e.lerp=function(t,r,n,i){var a=1-i;t.x=a*r.x+i*n.x,t.y=a*r.y+i*n.y},e}(),Oc=Math.min,Uh=Math.max,ZL=Math.abs,gF=["x","y"],JNe=["width","height"],ju=new Ie,Ru=new Ie,Bu=new Ie,zu=new Ie,_i=DK(),mg=_i.minTv,YL=_i.maxTv,Yg=[0,0],Oe=function(){function e(t,r,n,i){e.set(this,t,r,n,i)}return e.set=function(t,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),t.x=r,t.y=n,t.width=i,t.height=a,t},e.prototype.union=function(t){var r=Oc(t.x,this.x),n=Oc(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Uh(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Uh(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=r,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var r=this,n=t.width/r.width,i=t.height/r.height,a=Wr();return Ya(a,a,[-r.x,-r.y]),AT(a,a,[n,i]),Ya(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,r,n){return e.intersect(this,t,r,n)},e.intersect=function(t,r,n,i){n&&Ie.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!r)return!1;t instanceof e||(t=e.set(QNe,t.x,t.y,t.width,t.height)),r instanceof e||(r=e.set(eje,r.x,r.y,r.width,r.height));var s=!!n;_i.reset(i,s);var l=_i.touchThreshold,u=t.x+l,c=t.x+t.width-l,f=t.y+l,h=t.y+t.height-l,d=r.x+l,v=r.x+r.width-l,g=r.y+l,m=r.y+r.height-l;if(u>c||f>h||d>v||g>m)return!1;var y=!(c0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;os&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;or);c++);c=h(c-1,s-2)}v=o[c+1],d=o[c]}if(d&&v){this._lastFr=c,this._lastFrP=r;var m=v.percent-d.percent,y=m===0?1:h((r-d.percent)/m,1);v.easingFunc&&(y=v.easingFunc(y));var _=n?this._additiveValue:u?Np:t[l];if((Ex(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)t[l]=y<1?d.rawValue:v.rawValue;else if(Ex(a))a===nb?JA(_,d[i],v[i],y):Lje(_,d[i],v[i],y);else if(LF(a)){var b=d[i],S=v[i],T=a===eI;t[l]={type:T?"linear":"radial",x:us(b.x,S.x,y),y:us(b.y,S.y,y),colorStops:se(b.colorStops,function(A,P){var I=S.colorStops[P];return{offset:us(A.offset,I.offset,y),color:rb(JA([],A.color,I.color,y))}}),global:S.global},T?(t[l].x2=us(b.x2,S.x2,y),t[l].y2=us(b.y2,S.y2,y)):t[l].r=us(b.r,S.r,y)}else if(u)JA(_,d[i],v[i],y),n||(t[l]=rb(_));else{var C=us(d[i],v[i],y);n?this._additiveValue=C:t[l]=C}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,i=this._additiveValue;r===Ox?t[n]=t[n]+i:r===xg?(On(t[n],Np),Ix(Np,Np,i,1),t[n]=rb(Np)):r===nb?Ix(t[n],t[n],i,1):r===QK&&PF(t[n],t[n],i,1)},e}(),mN=function(){function e(t,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&i){wT("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,n){return this.whenWithKeys(t,r,it(r),n)},e.prototype.whenWithKeys=function(t,r,n,i){for(var a=this._tracks,o=0;o