@undefineds.co/xpod 0.3.70 → 0.3.71-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/cloud.json +3 -0
- package/config/local.json +3 -0
- package/config/resolver.json +7 -0
- package/config/xpod.base.json +20 -0
- package/dist/agents/ClaudeExecutor.js +1 -1
- package/dist/agents/ClaudeExecutor.js.map +1 -1
- package/dist/agents/types.d.ts +5 -5
- package/dist/agents/types.js.map +1 -1
- package/dist/api/ai-gateway/AiGatewayService.d.ts +5 -16
- package/dist/api/ai-gateway/AiGatewayService.js +13 -35
- package/dist/api/ai-gateway/AiGatewayService.js.map +1 -1
- package/dist/api/ai-gateway/auth/AiConnectionInvocationKeyIssuer.d.ts +3 -2
- package/dist/api/ai-gateway/auth/AiConnectionInvocationKeyIssuer.js +37 -12
- package/dist/api/ai-gateway/auth/AiConnectionInvocationKeyIssuer.js.map +1 -1
- package/dist/api/ai-gateway/auth/GatewayPrincipal.d.ts +2 -16
- package/dist/api/ai-gateway/auth/GatewayPrincipal.js +3 -33
- package/dist/api/ai-gateway/auth/GatewayPrincipal.js.map +1 -1
- package/dist/api/ai-gateway/auth/InvocationTokenAuthenticator.d.ts +23 -0
- package/dist/api/ai-gateway/auth/InvocationTokenAuthenticator.js +81 -0
- package/dist/api/ai-gateway/auth/InvocationTokenAuthenticator.js.map +1 -0
- package/dist/api/ai-gateway/auth/InvocationTokenCodec.d.ts +7 -4
- package/dist/api/ai-gateway/auth/InvocationTokenCodec.js.map +1 -1
- package/dist/api/ai-gateway/connect/index.d.ts +7 -26
- package/dist/api/ai-gateway/connect/index.js +40 -67
- package/dist/api/ai-gateway/connect/index.js.map +1 -1
- package/dist/api/ai-gateway/credentials/PlaintextCredentialPayload.d.ts +17 -0
- package/dist/api/ai-gateway/credentials/PlaintextCredentialPayload.js +65 -0
- package/dist/api/ai-gateway/credentials/PlaintextCredentialPayload.js.map +1 -0
- package/dist/api/ai-gateway/pod/HostedPodDataAccess.d.ts +24 -0
- package/dist/api/ai-gateway/pod/HostedPodDataAccess.js +149 -0
- package/dist/api/ai-gateway/pod/HostedPodDataAccess.js.map +1 -0
- package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.d.ts +13 -5
- package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.js +16 -19
- package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.js.map +1 -1
- package/dist/api/ai-gateway/service-access/AiConnectionServiceAccess.d.ts +1 -1
- package/dist/api/ai-gateway/service-access/AiConnectionServiceAccess.js +0 -2
- package/dist/api/ai-gateway/service-access/AiConnectionServiceAccess.js.map +1 -1
- package/dist/api/auth/AuthContext.d.ts +1 -12
- package/dist/api/auth/AuthContext.js +0 -11
- package/dist/api/auth/AuthContext.js.map +1 -1
- package/dist/api/auth/ClientCredentialsAuthenticator.js +4 -11
- package/dist/api/auth/ClientCredentialsAuthenticator.js.map +1 -1
- package/dist/api/chatkit/default-agent.d.ts +2 -2
- package/dist/api/chatkit/default-agent.js +4 -4
- package/dist/api/chatkit/default-agent.js.map +1 -1
- package/dist/api/chatkit/runtime/AcpAgentRuntime.js +1 -1
- package/dist/api/chatkit/runtime/AcpAgentRuntime.js.map +1 -1
- package/dist/api/container/common.js +28 -69
- package/dist/api/container/common.js.map +1 -1
- package/dist/api/container/index.js +5 -6
- package/dist/api/container/index.js.map +1 -1
- package/dist/api/container/routes.js +2 -5
- package/dist/api/container/routes.js.map +1 -1
- package/dist/api/container/types.d.ts +8 -10
- package/dist/api/container/types.js.map +1 -1
- package/dist/api/handlers/AiClientConfigurationHandler.js +3 -3
- package/dist/api/handlers/AiClientConfigurationHandler.js.map +1 -1
- package/dist/api/handlers/AiGatewayHandler.js +2 -2
- package/dist/api/handlers/AiGatewayHandler.js.map +1 -1
- package/dist/api/handlers/AiGatewayManagementHandler.d.ts +2 -10
- package/dist/api/handlers/AiGatewayManagementHandler.js +4 -154
- package/dist/api/handlers/AiGatewayManagementHandler.js.map +1 -1
- package/dist/api/handlers/NetworkSettingsHandler.js +0 -3
- package/dist/api/handlers/NetworkSettingsHandler.js.map +1 -1
- package/dist/api/handlers/PodSettingsHandler.d.ts +5 -2
- package/dist/api/handlers/PodSettingsHandler.js +3 -3
- package/dist/api/handlers/PodSettingsHandler.js.map +1 -1
- package/dist/api/runs/AgentRuntimeTypes.d.ts +3 -3
- package/dist/api/runs/AgentRuntimeTypes.js +10 -10
- package/dist/api/runs/AgentRuntimeTypes.js.map +1 -1
- package/dist/api/runs/InngestRunExecutionBackend.d.ts +15 -9
- package/dist/api/runs/InngestRunExecutionBackend.js +25 -10
- package/dist/api/runs/InngestRunExecutionBackend.js.map +1 -1
- package/dist/api/runs/PiAgentRuntimeDriver.js +2 -2
- package/dist/api/runs/PiAgentRuntimeDriver.js.map +1 -1
- package/dist/api/runs/RunStateCenter.js +1 -1
- package/dist/api/runs/RunStateCenter.js.map +1 -1
- package/dist/api/service/AiClientConfigurationService.d.ts +2 -2
- package/dist/api/service/AiClientConfigurationService.js +11 -11
- package/dist/api/service/AiClientConfigurationService.js.map +1 -1
- package/dist/api/tasks/InngestTaskScheduler.d.ts +16 -10
- package/dist/api/tasks/InngestTaskScheduler.js +24 -12
- package/dist/api/tasks/InngestTaskScheduler.js.map +1 -1
- package/dist/cli/commands/start.js +7 -7
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/components/components.jsonld +1 -0
- package/dist/components/context.jsonld +36 -0
- package/dist/http/InternalPodDataHttpHandler.d.ts +32 -0
- package/dist/http/InternalPodDataHttpHandler.js +258 -0
- package/dist/http/InternalPodDataHttpHandler.js.map +1 -0
- package/dist/http/InternalPodDataHttpHandler.jsonld +201 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/main.js +13 -13
- package/dist/main.js.map +1 -1
- package/dist/runtime/GatewayAdminProxyAuth.d.ts +15 -1
- package/dist/runtime/GatewayAdminProxyAuth.js +57 -2
- package/dist/runtime/GatewayAdminProxyAuth.js.map +1 -1
- package/dist/runtime/bootstrap.js +3 -0
- package/dist/runtime/bootstrap.js.map +1 -1
- package/dist/runtime/css-process.d.ts +1 -1
- package/dist/runtime/css-process.js +4 -1
- package/dist/runtime/css-process.js.map +1 -1
- package/dist/runtime/runner/node/CommunitySolidServerCssRunner.d.ts +2 -0
- package/dist/runtime/runner/node/CommunitySolidServerCssRunner.js +50 -0
- package/dist/runtime/runner/node/CommunitySolidServerCssRunner.js.map +1 -1
- package/node_modules/@undefineds.co/ai-connection/dist/AiClientConfigurationSection.d.ts +5 -5
- package/node_modules/@undefineds.co/ai-connection/dist/AiClientConfigurationSection.js +7 -7
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionMain.js +1 -1
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionPanel.d.ts +3 -1
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionPanel.js +74 -60
- package/node_modules/@undefineds.co/ai-connection/dist/ai-connection-client.d.ts +0 -21
- package/node_modules/@undefineds.co/ai-connection/dist/ai-connection-client.js +0 -41
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/base-adapter.d.ts +1 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/base-adapter.js +7 -2
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/codex.js +3 -3
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/index.cjs +15 -9
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/json-env-adapter.js +4 -4
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/pi.js +3 -3
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/types.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connection/dist/controller.d.ts +2 -1
- package/node_modules/@undefineds.co/ai-connection/dist/controller.js +1 -0
- package/node_modules/@undefineds.co/ai-connection/dist/service-access.js +0 -1
- package/node_modules/@undefineds.co/extension-sdk/dist/web.d.ts +22 -1
- package/package.json +3 -3
- package/static/app/assets/main.js +7 -7
- package/static/dashboard/assets/NetworkPage-CXjiUMR1.js +2 -0
- package/static/dashboard/assets/{PaneListHeader-57nvMwH6.js → PaneListHeader-BSipfl0W.js} +1 -1
- package/static/dashboard/assets/PodPage-Bd3Xhmp-.js +2 -0
- package/static/dashboard/assets/ServicesPage-CI3jWZGe.js +1 -0
- package/static/dashboard/assets/{card-B9Zjf_2p.js → card-z5BV5hTo.js} +1 -1
- package/static/dashboard/assets/{dashboard-8C6o666W.js → dashboard-CSrqAv2L.js} +2 -2
- package/static/dashboard/assets/{database-DPh9wDY9.js → database-Ct5ZPe6L.js} +1 -1
- package/static/dashboard/assets/{external-link-VbMQvVMz.js → external-link-B7wD1hkm.js} +1 -1
- package/static/dashboard/assets/index-tOBaUnM1.js +44 -0
- package/static/dashboard/assets/{refresh-cw-BxVxNxNr.js → refresh-cw-CFDZPaE8.js} +1 -1
- package/static/dashboard/assets/{services-status-context-DKmJ7ISr.js → services-status-context-DN1Icg4A.js} +1 -1
- package/static/dashboard/dashboard.html +1 -1
- package/static/settings/assets/ModelsPage-03NPWzoX.js +1 -0
- package/static/settings/assets/{PaneListHeader-Bgaze006.js → PaneListHeader-DMD8OJef.js} +1 -1
- package/static/settings/assets/PodPage-DT4EMYhL.js +2 -0
- package/static/settings/assets/ServicesPage-CJ0ub6IH.js +1 -0
- package/static/settings/assets/SettingsPage-BkR7ZK18.js +41 -0
- package/static/settings/assets/{card-B_bXSIn-.js → card-Cjsia0_V.js} +1 -1
- package/static/settings/assets/{services-status-context-DiX-AbrP.js → services-status-context-CkuKmH5h.js} +1 -1
- package/static/settings/assets/{settings-B30oMfZq.js → settings-Cyyv6-SD.js} +2 -2
- package/static/settings/assets/{workspace-layout-Dv1Yn9Ci.js → workspace-layout-B47luv6r.js} +1 -1
- package/static/settings/settings.html +1 -1
- package/dist/api/ai-gateway/auth/ClientCredentialsInternalPodAccessTokenProvider.d.ts +0 -25
- package/dist/api/ai-gateway/auth/ClientCredentialsInternalPodAccessTokenProvider.js +0 -91
- package/dist/api/ai-gateway/auth/ClientCredentialsInternalPodAccessTokenProvider.js.map +0 -1
- package/dist/api/ai-gateway/auth/GatewayApiKey.d.ts +0 -28
- package/dist/api/ai-gateway/auth/GatewayApiKey.js +0 -162
- package/dist/api/ai-gateway/auth/GatewayApiKey.js.map +0 -1
- package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.d.ts +0 -56
- package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.js +0 -143
- package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.js.map +0 -1
- package/dist/api/ai-gateway/auth/GatewayKeyLocatorCodec.d.ts +0 -26
- package/dist/api/ai-gateway/auth/GatewayKeyLocatorCodec.js +0 -97
- package/dist/api/ai-gateway/auth/GatewayKeyLocatorCodec.js.map +0 -1
- package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.d.ts +0 -54
- package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js +0 -152
- package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js.map +0 -1
- package/static/dashboard/assets/NetworkPage-Brt79fuQ.js +0 -2
- package/static/dashboard/assets/PodPage-CM6do1vB.js +0 -2
- package/static/dashboard/assets/ServicesPage-BUNxGJRz.js +0 -1
- package/static/dashboard/assets/index-RfiFckzb.js +0 -51
- package/static/settings/assets/ModelsPage-D_IH7AH3.js +0 -1
- package/static/settings/assets/PodPage-Cy1VNObw.js +0 -2
- package/static/settings/assets/ServicesPage-BsFaxVWC.js +0 -1
- package/static/settings/assets/SettingsPage-UafNWE_p.js +0 -48
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var Jn=e=>{throw TypeError(e)};var es=(e,t,n)=>t.has(e)||Jn("Cannot "+n);var be=(e,t,n)=>(es(e,t,"read from private field"),n?n.call(e):t.get(e)),ts=(e,t,n)=>t.has(e)?Jn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),on=(e,t,n,o)=>(es(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);import{g as cr,c as Ee,j as s,e as ie,r as l,A as ar,G as ir,O as lr,L as ur,h as xe,i as pt,R as Kt,k as dr}from"./dashboard-CSrqAv2L.js";import{g as fr,u as zs,f as ns,r as pr,s as mr,b as hr,a as gr,c as xr,d as vr,e as br,h as yr,i as wr,t as Sr}from"./services-status-context-DN1Icg4A.js";import{R as Dn}from"./refresh-cw-CFDZPaE8.js";import{D as Nr}from"./database-Ct5ZPe6L.js";import{E as jr}from"./external-link-B7wD1hkm.js";var jt=cr();const Cr=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Er=Ee("chart-column",Cr);const Rr=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Pr=Ee("check",Rr);const Tr=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_r=Ee("chevron-down",Tr);const Or=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Lr=Ee("copy",Or);const Ar=[["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"}]],Dr=Ee("download",Ar);const kr=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],Ir=Ee("file-down",kr);const Mr=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],$r=Ee("key-round",Mr);const Fr=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],qr=Ee("pause",Fr);const Ur=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Hr=Ee("play",Ur);const Br=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ss=Ee("search",Br);const Vr=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],zr=Ee("trash-2",Vr);const Kr=[["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"}]],kn=Ee("triangle-alert",Kr);const Wr=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xr=Ee("x",Wr);function pe(e){const{className:t,variant:n="default",size:o="default",children:r,...c}=e,a="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-primary active:translate-y-px disabled:opacity-50 disabled:pointer-events-none",i={default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-muted text-foreground hover:bg-muted/80",ghost:"bg-transparent hover:bg-muted text-foreground"},u={default:"h-10 px-4 py-2",sm:"h-8 px-3"};return s.jsx("button",{className:ie(a,i[n],u[o],t),...c,children:r})}function Z(e){const{className:t,variant:n,children:o}=e;return s.jsx("div",{className:ie("rounded-xl bg-background",n==="bordered"&&"border border-border",t),children:o})}function ce(e){const{className:t,children:n}=e;return s.jsx("div",{className:ie("px-5 pt-5",t),children:n})}function ae(e){const{className:t,children:n}=e;return s.jsx("div",{className:ie("text-base font-semibold",t),children:n})}function J(e){const{className:t,children:n}=e;return s.jsx("div",{className:ie("px-5 pb-5 pt-4",t),children:n})}function Wt(e){const{className:t,...n}=e;return s.jsx("input",{className:ie("w-full h-10 rounded-md border border-input bg-background px-3 py-2 text-sm","placeholder:text-muted-foreground","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",t),...n})}function Ye(e){const{className:t,...n}=e;return s.jsx("label",{className:ie("text-sm font-medium text-foreground",t),...n})}const Gr={"not-cloud":"非 Cloud 模式","missing-sparql-endpoint":"缺少 PostgreSQL 端点","unsupported-sparql-endpoint":"非 PostgreSQL 端点"};function Yr(e){const t=e.trim();return t?{cacheScopeQuery:t,cacheScopeLimit:50}:{}}function Dz(){const[e,t]=l.useState(null),[n,o]=l.useState(!0),[r,c]=l.useState(!1),[a,i]=l.useState(""),[u,d]=l.useState(""),[h,f]=l.useState(""),g=l.useRef(!1),v=l.useCallback(async(w=!1,j=h)=>{w?o(!0):c(!0),i("");try{const N=await fr(Yr(j));N?t(N):i("RDF 统计不可用")}finally{o(!1),c(!1)}},[h]);l.useEffect(()=>{g.current||(g.current=!0,v(!0))},[v]),l.useEffect(()=>{const w=setInterval(()=>{v(!1)},1e4);return()=>clearInterval(w)},[v]);const y=w=>{w.preventDefault();const j=u.trim();f(j),v(!1,j)},b=()=>{d(""),f(""),v(!1,"")},m=e?Xt(e.generatedAt):"-";return n?s.jsx("div",{className:"p-8 text-foreground",children:"加载中..."}):s.jsxs("div",{className:"p-8",children:[s.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"type-h1",children:"RDF 索引"}),s.jsxs("div",{className:"mt-1 text-sm text-muted-foreground",children:["更新时间 ",m]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs("form",{className:"flex min-w-0 items-center gap-2",onSubmit:y,children:[s.jsxs("div",{className:"relative w-72 max-w-[70vw]",children:[s.jsx(ss,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),s.jsx(Wt,{value:u,onChange:w=>d(w.target.value),className:"pl-9",placeholder:"principal / base / version"})]}),s.jsxs(pe,{type:"submit",variant:"secondary",size:"sm",className:"gap-2",children:[s.jsx(ss,{className:"h-4 w-4"}),"搜索"]}),h&&s.jsx(pe,{type:"button",variant:"ghost",size:"sm",onClick:b,"aria-label":"清除 scope 搜索",children:s.jsx(Xr,{className:"h-4 w-4"})})]}),s.jsxs(pe,{type:"button",variant:"secondary",size:"sm",onClick:()=>{v(!1)},disabled:r,className:"gap-2",children:[s.jsx(Dn,{className:ie("h-4 w-4",r&&"animate-spin")}),"刷新"]})]})]}),a&&s.jsx("div",{className:"mb-5 rounded-md border border-destructive/30 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:a}),e?.available?s.jsx(Qr,{snapshot:e,scopeQuery:h}):s.jsxs(s.Fragment,{children:[s.jsx(Zr,{snapshot:e}),s.jsx("div",{className:"mt-8",children:s.jsx(Ks,{snapshot:e?.benchmarkReports})})]})]})}function Qr(e){const{snapshot:t,scopeQuery:n}=e,o=t.stats,r=o.rdf3x,c=o.slowQueries?.entries??[],a=o.derivedCache,i=a?.scopeEntries??[],u=o.pgAcceleration,d=o.lifecycle,h=d?.coldStart,f=h?.phases.reduce((g,v)=>v.durationMs>g.durationMs?v:g,{name:"-",durationMs:0});return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-8 grid grid-cols-1 gap-5 md:grid-cols-2 xl:grid-cols-5",children:[s.jsx(vt,{icon:Nr,label:"引擎",value:t.engine,detail:u?.profile??"baseline",tone:u?.enabled?"good":"neutral"}),s.jsx(vt,{icon:ar,label:"RDF-3X",value:r?.syncedWithFacts?"已同步":`${r?.refreshLag??0} 版本延迟`,detail:`facts ${r?.factsDataVersion??0} / rdf3x ${r?.rdf3xFactsDataVersion??0} / pending ${r?.pendingSources??0}`,tone:r?.syncedWithFacts?"good":"warn"}),s.jsx(vt,{icon:ir,label:"存储",value:fe(o.totalBytes),detail:`facts ${fe(o.factsBytes)} / derived ${fe(o.derivedBytes)}`,tone:"neutral"}),s.jsx(vt,{icon:Dn,label:"冷启动",value:Oe(h?.durationMs??d?.lastOpenDurationMs??0),detail:`${d?.status??"unknown"} / open ${d?.openCount??0}`,tone:d?.status==="failed"?"warn":"neutral"}),s.jsx(vt,{icon:kn,label:"慢查询",value:`${o.slowQueries?.entryCount??0}`,detail:`保留 ${o.slowQueries?.maxEntries??0} 条`,tone:(o.slowQueries?.entryCount??0)>0?"warn":"good"})]}),s.jsxs("div",{className:"mb-8 grid grid-cols-1 gap-5 xl:grid-cols-5",children:[s.jsxs(Z,{variant:"bordered",children:[s.jsx(ce,{children:s.jsx(ae,{children:"空间占用"})}),s.jsxs(J,{className:"space-y-3",children:[s.jsx(B,{label:"derived/facts",value:vn(o.derivedToFactsRatio)}),s.jsx(B,{label:"total/facts",value:vn(o.totalToFactsRatio)}),s.jsx(B,{label:"result cache",value:fe(o.queryResultCache?.totalBytes??0)}),s.jsx(B,{label:"materialized",value:fe(o.materializedResultCache?.totalBytes??0)}),s.jsx(B,{label:"template",value:fe(o.queryTemplateCache?.totalBytes??0)})]})]}),s.jsxs(Z,{variant:"bordered",children:[s.jsx(ce,{children:s.jsx(ae,{children:"Cache"})}),s.jsxs(J,{className:"space-y-3",children:[s.jsx(B,{label:"result entries",value:`${o.queryResultCache?.entryCount??0}`}),s.jsx(B,{label:"result scopes",value:`${o.queryResultCache?.scopeCount??0}`}),s.jsx(B,{label:"materialized entries",value:`${o.materializedResultCache?.entryCount??0}`}),s.jsx(B,{label:"materialized scopes",value:`${o.materializedResultCache?.scopeCount??0}`}),s.jsx(B,{label:"result hit rate",value:rs(o.queryResultCache)}),s.jsx(B,{label:"materialized hit rate",value:rs(o.materializedResultCache)}),s.jsx(B,{label:"template entries",value:`${o.queryTemplateCache?.entryCount??0}`}),s.jsx(B,{label:"cache pressure",value:bt(a?.cachePressure??0)})]})]}),s.jsxs(Z,{variant:"bordered",children:[s.jsx(ce,{children:s.jsx(ae,{children:"生命周期"})}),s.jsxs(J,{className:"space-y-3",children:[s.jsx(B,{label:"driver",value:d?.driver??"-"}),s.jsx(B,{label:"ready at",value:d?.lastReadyAt?Xt(d.lastReadyAt):"-"}),s.jsx(B,{label:"slowest phase",value:`${f?.name??"-"} ${Oe(f?.durationMs??0)}`}),s.jsx(B,{label:"dirty sources",value:`${r?.pendingSources??0}`}),s.jsx(B,{label:"custom index",value:h?h.customIndexDeferred?"deferred":"startup":"-"}),s.jsx(B,{label:"maintenance",value:h?h.maintenanceEnabled?"enabled":"disabled":"-"})]})]}),s.jsxs(Z,{variant:"bordered",children:[s.jsx(ce,{children:s.jsx(ae,{children:"权限 Scope"})}),s.jsxs(J,{className:"space-y-3",children:[s.jsx(B,{label:"scope versions",value:`${a?.scopeVersionCount??0}`}),s.jsx(B,{label:"max scope",value:fe(a?.maxScopeBytes??0)}),s.jsx(B,{label:"largest scope",value:fe(a?.largestScopeBytes??0)}),s.jsx(B,{label:"scope pressure",value:bt(a?.largestScopePressure??0)}),s.jsx(B,{label:"scope hash",value:yt(a?.largestScopeHash??"-")}),s.jsx(B,{label:"facts version",value:`${a?.largestScopeFactsDataVersion??"-"}`})]})]}),s.jsxs(Z,{variant:"bordered",children:[s.jsx(ce,{children:s.jsx(ae,{children:"PG 加速"})}),s.jsxs(J,{className:"space-y-3",children:[s.jsx(B,{label:"profile",value:u?.profile??"baseline"}),s.jsx(B,{label:"provider",value:u?.provider??"-"}),s.jsx(B,{label:"enabled",value:u?.enabled?"true":"false"}),s.jsx(B,{label:"capabilities",value:`${u?.capabilities?.length??0}`}),s.jsx(B,{label:"active operators",value:wt(u?.activeOperators)}),s.jsx(B,{label:"missing caps",value:wt(u?.missingCapabilities)}),s.jsx(B,{label:"fallback",value:u?.fallbackReason??"-"})]})]})]}),s.jsxs("div",{className:"mb-8 grid grid-cols-1 gap-5 xl:grid-cols-2",children:[s.jsxs(Z,{variant:"bordered",children:[s.jsx(ce,{children:s.jsx(ae,{children:"Cache 淘汰"})}),s.jsxs(J,{className:"space-y-3",children:[s.jsx(B,{label:"total",value:`${a?.evictionCount??0}`}),s.jsx(nc,{evictions:a?.evictions})]})]}),s.jsxs(Z,{variant:"bordered",children:[s.jsx(ce,{children:s.jsx(ae,{children:"Cache 载荷"})}),s.jsxs(J,{className:"space-y-3",children:[s.jsx(B,{label:"result payload",value:fe(a?.queryResultPayloadBytes??0)}),s.jsx(B,{label:"materialized payload",value:fe(a?.materializedResultPayloadBytes??0)}),s.jsx(B,{label:"template bytes",value:fe(a?.queryTemplateBytes??0)}),s.jsx(B,{label:"result table/index",value:`${fe(o.queryResultCache?.tableBytes??0)} / ${fe(o.queryResultCache?.indexBytes??0)}`}),s.jsx(B,{label:"materialized table/index",value:`${fe(o.materializedResultCache?.tableBytes??0)} / ${fe(o.materializedResultCache?.indexBytes??0)}`})]})]})]}),s.jsx("div",{className:"mb-8",children:s.jsx(tc,{entries:i,totalCount:a?.scopeVersionCount??0,query:n})}),s.jsx("div",{className:"mb-8",children:s.jsx(Ks,{snapshot:t.benchmarkReports})}),s.jsx(Jr,{entries:c})]})}function Zr(e){const{snapshot:t}=e,n=t?.available===!1?Gr[t.reason]:"无数据";return s.jsx(Z,{variant:"bordered",children:s.jsx(J,{children:s.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[s.jsx(kn,{className:"h-5 w-5 text-yellow-600"}),s.jsx("span",{children:n})]})})})}function vt(e){const t=e.icon;return s.jsx(Z,{variant:"bordered",children:s.jsxs(J,{children:[s.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[s.jsx("div",{className:"text-sm text-muted-foreground",children:e.label}),s.jsx(t,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsx("div",{className:ie("text-xl font-semibold",e.tone==="good"&&"text-green-600",e.tone==="warn"&&"text-yellow-700"),children:e.value}),s.jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:e.detail})]})})}function B(e){return s.jsxs("div",{className:"flex items-center justify-between gap-4 text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:e.label}),s.jsx("span",{className:"min-w-0 truncate font-mono",children:e.value})]})}function Jr(e){return s.jsxs(Z,{variant:"bordered",children:[s.jsx(ce,{children:s.jsx(ae,{children:"最近慢查询"})}),s.jsx(J,{className:"p-0",children:e.entries.length===0?s.jsx("div",{className:"px-5 pb-5 pt-4 text-sm text-muted-foreground",children:"暂无慢查询"}):s.jsx("div",{className:"overflow-auto",children:s.jsxs("table",{className:"w-full min-w-[920px] border-collapse text-left text-sm",children:[s.jsx("thead",{className:"border-b border-border text-muted-foreground",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-5 py-3 font-medium",children:"时间"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"路径"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"耗时"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"扫描"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"Cache"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"原因"})]})}),s.jsx("tbody",{children:e.entries.map(t=>s.jsxs("tr",{className:"border-b border-border/60 last:border-0",children:[s.jsx("td",{className:"whitespace-nowrap px-5 py-3 font-mono text-xs",children:Xt(t.generatedAt)}),s.jsxs("td",{className:"px-5 py-3",children:[s.jsx("div",{className:"font-medium",children:t.selectedPath}),s.jsx("div",{className:"mt-1 max-w-[240px] truncate font-mono text-xs text-muted-foreground",children:yt(t.queryKey)})]}),s.jsx("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:Oe(t.runtime.durationMs)}),s.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[le(t.runtime.scannedRows)," / ",le(t.runtime.returnedRows)]}),s.jsxs("td",{className:"px-5 py-3",children:[s.jsxs("div",{className:"font-mono text-xs",children:["tpl ",t.cache.templateStatus??"-"," / res ",t.cache.resultStatus??"-"," / mat ",t.cache.materializedStatus??"-"]}),s.jsx("div",{className:"mt-1 max-w-[220px] truncate font-mono text-xs text-muted-foreground",children:rc(t)}),s.jsx("div",{className:"mt-1 max-w-[220px] truncate text-xs text-muted-foreground",children:cc(t)}),s.jsx("div",{className:"mt-1 max-w-[220px] truncate text-xs text-muted-foreground",children:t.cache.scopeBasePath??t.cache.scopeHash}),t.cache.scopePrincipal&&s.jsx("div",{className:"mt-1 max-w-[220px] truncate text-xs text-muted-foreground",children:t.cache.scopePrincipal})]}),s.jsxs("td",{className:"px-5 py-3",children:[s.jsx(oc,{reasons:t.slowQuery.reasons}),s.jsx(ec,{entry:t})]})]},`${t.generatedAt}-${t.queryKey}`))})]})})})]})}function ec(e){const t=ac(e.entry),n=ic(e.entry);return!t&&!n?null:s.jsxs("div",{className:"mt-2 max-w-[320px] space-y-1 text-xs text-muted-foreground",children:[t&&s.jsx("div",{className:"truncate",children:t}),n&&s.jsx("div",{className:"truncate",children:n})]})}function tc(e){return s.jsxs(Z,{variant:"bordered",children:[s.jsxs(ce,{className:"flex flex-row items-start justify-between gap-3",children:[s.jsx(ae,{children:"权限 Scope 明细"}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:[le(e.entries.length)," / ",le(e.totalCount)]})]}),s.jsx(J,{className:"p-0",children:e.entries.length===0?s.jsx("div",{className:"px-5 pb-5 pt-4 text-sm text-muted-foreground",children:e.query?"没有匹配的缓存 scope":"暂无缓存 scope"}):s.jsx("div",{className:"overflow-auto",children:s.jsxs("table",{className:"w-full min-w-[1020px] border-collapse text-left text-sm",children:[s.jsx("thead",{className:"border-b border-border text-muted-foreground",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-5 py-3 font-medium",children:"Scope"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"Principal"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"Base"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"权限"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"版本"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"Payload"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"Entries"})]})}),s.jsx("tbody",{children:e.entries.map(t=>s.jsxs("tr",{className:"border-b border-border/60 last:border-0",children:[s.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono text-xs",children:[s.jsx("div",{children:yt(t.scopeHash)}),s.jsxs("div",{className:"mt-1 text-muted-foreground",children:["facts ",t.factsDataVersion]})]}),s.jsx("td",{className:"px-5 py-3",children:s.jsx("div",{className:"max-w-[220px] truncate",children:t.principal??"-"})}),s.jsx("td",{className:"px-5 py-3",children:s.jsx("div",{className:"max-w-[260px] truncate",children:t.basePath??"-"})}),s.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono text-xs",children:[t.authorizationModel??"-","/",t.mode??"-"]}),s.jsx("td",{className:"px-5 py-3",children:s.jsx("div",{className:"max-w-[180px] truncate font-mono text-xs",children:t.permissionVersion??"-"})}),s.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[s.jsx("div",{children:fe(t.payloadBytes)}),s.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["r ",fe(t.queryResultPayloadBytes)," / m ",fe(t.materializedResultPayloadBytes)]})]}),s.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[le(t.queryResultEntries)," / ",le(t.materializedResultEntries)]})]},`${t.scopeHash}-${t.factsDataVersion}`))})]})})})]})}function nc(e){const t=Object.entries(e.evictions??{}).filter(([,n])=>n>0);return t.length===0?s.jsx("div",{className:"text-sm text-muted-foreground",children:"暂无淘汰"}):s.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:t.map(([n,o])=>s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md bg-muted px-3 py-2 text-sm",children:[s.jsx("span",{className:"min-w-0 truncate text-muted-foreground",children:n}),s.jsx("span",{className:"font-mono",children:le(o)})]},n))})}function Ks(e){const t=e.snapshot?.reports??[],n=e.snapshot?.errors??[];return s.jsxs(Z,{variant:"bordered",children:[s.jsxs(ce,{className:"flex flex-row items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx(ae,{children:"Benchmark 报告"}),s.jsx("div",{className:"mt-1 max-w-[720px] truncate text-sm text-muted-foreground",children:(e.snapshot?.roots??[]).join(", ")||"未配置目录"})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Er,{className:"h-4 w-4"}),le(e.snapshot?.reportCount??t.length)]})]}),s.jsxs(J,{className:"p-0",children:[n.length>0&&s.jsxs("div",{className:"border-b border-border px-5 py-3 text-sm text-yellow-700",children:[le(n.length)," 个报告读取失败,最近一个:",n[0].path," - ",n[0].message]}),t.length===0?s.jsx("div",{className:"px-5 pb-5 pt-4 text-sm text-muted-foreground",children:"暂无 benchmark report"}):s.jsx("div",{className:"overflow-auto",children:s.jsxs("table",{className:"w-full min-w-[1180px] border-collapse text-left text-sm",children:[s.jsx("thead",{className:"border-b border-border text-muted-foreground",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-5 py-3 font-medium",children:"时间"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"Profile"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"规模"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"Gate"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"Ingest"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"Refresh"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"Cold / Warm"}),s.jsx("th",{className:"px-5 py-3 font-medium",children:"Storage"})]})}),s.jsx("tbody",{children:t.map(o=>s.jsx(sc,{report:o},`${o.path}-${o.generatedAt}`))})]})})]})]})}function sc(e){const t=e.report,n=t.failedPlanCases.length,o=t.failedConcurrencyCases.length;return s.jsxs("tr",{className:"border-b border-border/60 last:border-0",children:[s.jsxs("td",{className:"whitespace-nowrap px-5 py-3",children:[s.jsx("div",{className:"font-mono text-xs",children:Xt(t.generatedAt)}),s.jsx("div",{className:"mt-1 max-w-[220px] truncate font-mono text-xs text-muted-foreground",children:t.path})]}),s.jsxs("td",{className:"px-5 py-3",children:[s.jsx("div",{className:"font-medium",children:t.rdfAccelerationProfile??t.engine}),s.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:[t.driver??t.engine," / ",t.caseProfile??"-"]}),s.jsx("div",{className:"mt-1 max-w-[220px] truncate text-xs text-muted-foreground",children:t.pgAccelerationFallbackReason??wt(t.pgActiveOperators)})]}),s.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[s.jsxs("div",{children:[le(t.seedQuadCount??0)," / ",le(t.targetQuadCount??0)]}),s.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:[t.scale??"-"," / ",t.fullScale===!1?"partial":"full"]})]}),s.jsxs("td",{className:"px-5 py-3",children:[s.jsx(os,{ok:t.planMatched!==!1&&n===0,label:`plan ${t.planMatched===!1?"fail":"ok"}`}),s.jsx("div",{className:"mt-1",children:s.jsx(os,{ok:t.concurrencyMatched!==!1&&o===0,label:`conc ${t.concurrency??1}`})}),(n>0||o>0)&&s.jsxs("div",{className:"mt-1 text-xs text-yellow-700",children:["fail ",le(n+o)]})]}),s.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[s.jsx("div",{children:Oe(t.ingestDurationMs??0)}),s.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["COPY ",le(t.copyRows??0)," / fb ",le(t.copyFallbacks??0)]})]}),s.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[s.jsx("div",{children:Oe(t.refreshDurationMs??0)}),s.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["planner ",Oe(t.plannerStatsDurationMs??0)," / ",le(t.plannerStatsAnalyzedTables?.length??0)]})]}),s.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[s.jsxs("div",{children:[Oe(t.coldStartDurationMs??0)," / ",Oe(t.firstQueryDurationMs??0)]}),s.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["p50/p95 ",Oe(t.warmP50DurationMs??0)," / ",Oe(t.warmP95DurationMs??0)]})]}),s.jsxs("td",{className:"whitespace-nowrap px-5 py-3 font-mono",children:[s.jsx("div",{children:vn(t.storageTotalToFactsRatio??0)}),s.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:fe(t.storageTotalBytes??0)})]})]})}function os(e){return s.jsx("span",{className:ie("inline-flex rounded-md px-2 py-0.5 text-xs",e.ok?"bg-green-100 text-green-700":"bg-yellow-100 text-yellow-800"),children:e.label})}function oc(e){return s.jsx("div",{className:"flex max-w-[320px] flex-wrap gap-1.5",children:e.reasons.map(t=>s.jsx("span",{className:"rounded-md bg-yellow-100 px-2 py-0.5 text-xs text-yellow-800",children:t},t))})}function fe(e){if(!Number.isFinite(e)||e<=0)return"0 B";const t=["B","KiB","MiB","GiB","TiB"];let n=e,o=0;for(;n>=1024&&o<t.length-1;)n/=1024,o+=1;return`${n>=10||o===0?n.toFixed(0):n.toFixed(1)} ${t[o]}`}function vn(e){return Number.isFinite(e)?`${e.toFixed(2)}x`:"0.00x"}function bt(e){return Number.isFinite(e)?`${Math.round(e*100)}%`:"0%"}function rs(e){const t=e?.hitCount??0,n=e?.missCount??0,o=t+n;return o<=0?"-":`${bt(t/o)} (${le(t)}/${le(o)})`}function rc(e){const t=e.cache.materialized?.key;if(t)return`mat ${yt(t)}`;const n=e.cache.result?.key??e.queryKey;return`res ${yt(n)}`}function cc(e){const t=e.derivedCache,n=bt(t.cachePressure),o=bt(t.largestScopePressure),r=t.evictionCount;return`pressure ${n} / scope ${o} / evict ${le(r)}`}function ac(e){const t=e.histogramHints??[];if(t.length===0)return"";const n=t.map(o=>`${o.kind}:${le(o.quadCount)}`);return`hist ${le(t.length)} ${wt(n)}`}function ic(e){const t=e.rejectedNativeOperators??[];if(t.length===0)return"";const n=t.map(o=>`${o.capability}:${o.reason}`);return`native rejected ${le(t.length)} ${wt(n)}`}function Oe(e){return Number.isFinite(e)?`${Math.round(e)} ms`:"0 ms"}function le(e){return Number.isFinite(e)?new Intl.NumberFormat().format(e):"0"}function Xt(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function yt(e){return e.length<=16?e:`${e.slice(0,12)}...${e.slice(-4)}`}function wt(e){return e?.length?e.length<=2?e.join(", "):`${e.slice(0,2).join(", ")} +${e.length-2}`:"-"}function kz(){return s.jsx(lr,{})}const lc={healthy:"border-green-200 bg-green-50 text-green-700 dark:border-green-900 dark:bg-green-950/40 dark:text-green-300",degraded:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-300",failed:"border-destructive/30 bg-destructive/10 text-destructive",unknown:"border-border bg-muted text-muted-foreground"};function qt(e){const{state:t,children:n,className:o}=e;return s.jsx("span",{className:ie("inline-flex items-center rounded-md border px-2 py-1 text-xs font-medium",lc[t],o),children:n})}function uc(e,t,n){const o=dc(e.XPOD_TUNNEL_PROFILES,n);if(o)return o;switch(t){case"ngrok":return e.NGROK_URL||"未配置";case"cloudflare":return e.CLOUDFLARE_TUNNEL_URL||e.XPOD_TUNNEL_PUBLIC_URL||"未配置";case"sakura_frp":return e.SAKURA_TUNNEL_URL||e.XPOD_TUNNEL_PUBLIC_URL||"未配置";case"frp":return e.FRP_TUNNEL_URL||"未配置";default:return"未配置"}}function dc(e,t){if(!e||!t||t==="none")return"";try{const n=JSON.parse(e);if(!Array.isArray(n))return"";const o=n.find(c=>c&&typeof c=="object"&&!Array.isArray(c)&&c.id===t);return(typeof o?.publicUrl=="string"?o.publicUrl.trim():"")||""}catch{return""}}function Ut(e){switch(e){case"healthy":return"可用";case"degraded":return"降级";case"failed":return"失败";default:return"未知"}}function cs(e){return e?e.status==="running"?"healthy":e.status==="starting"?"degraded":"failed":"unknown"}function fc(e,t){return e?t?"healthy":"failed":"unknown"}function pc(e,t){return e?t?"本机访问应可用。":"CSS 或 API 未运行。":"等待服务状态上报。"}function as(e){if(!e)return"未知";const t=Math.floor(e/1e3),n=Math.floor(t/60),o=Math.floor(n/60);return o>0?`${o}h ${n%60}m`:n>0?`${n}m ${t%60}s`:`${t}s`}function mc(e){return["Public","User tunnel","LAN","Loopback"].map(n=>e.find(o=>o.name===n&&o.state==="healthy")).find(n=>!!n)??e.find(n=>n.state==="degraded")??e.find(n=>n.state==="unknown")??null}function hc(e){return s.jsxs(Z,{variant:"bordered",children:[s.jsx(ce,{children:s.jsx(ae,{children:"访问路径"})}),s.jsx(J,{children:s.jsx("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-5",children:e.routes.map(t=>s.jsxs("div",{className:"min-w-0 rounded-xl border border-border p-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:t.name}),s.jsx(qt,{state:t.state,children:Ut(t.state)})]}),s.jsx("div",{className:"mt-2 min-w-0 break-all font-mono text-xs text-muted-foreground",title:t.target,children:t.target}),s.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:t.detail})]},t.name))})})]})}function gc(e){return s.jsxs(Z,{variant:"bordered",children:[s.jsx(ce,{children:s.jsx(ae,{children:"完整路径详情"})}),s.jsx(J,{children:s.jsx("div",{className:"overflow-x-auto rounded-md border border-border",children:s.jsxs("table",{className:"w-full min-w-[720px] text-sm",children:[s.jsx("thead",{className:"bg-muted/60 text-muted-foreground",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"路径"}),s.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"目标"}),s.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"状态"}),s.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"证据"})]})}),s.jsx("tbody",{className:"divide-y divide-border",children:e.routes.map(t=>s.jsxs("tr",{children:[s.jsx("td",{className:"px-3 py-2 font-medium",children:t.name}),s.jsx("td",{className:"px-3 py-2 font-mono text-xs break-all",children:t.target}),s.jsx("td",{className:"px-3 py-2",children:s.jsx(qt,{state:t.state,children:Ut(t.state)})}),s.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:t.detail})]},t.name))})]})})})]})}function xc(e){if(e.state==="healthy"||e.state==="unknown")return null;const t=e.routes.find(o=>o.state==="failed"||o.state==="degraded"),n=t?`${t.name} 当前不可用。${t.detail}`:"运行时状态还没有完整上报,请刷新或查看日志。";return s.jsxs(Z,{variant:"bordered",className:"border-amber-200 bg-amber-50/60 dark:border-amber-900 dark:bg-amber-950/20",children:[s.jsx(ce,{children:s.jsx(ae,{children:"需要处理"})}),s.jsxs(J,{className:"space-y-3",children:[s.jsx("p",{className:"text-sm text-amber-800 dark:text-amber-200",children:n}),s.jsx(pe,{variant:"secondary",onClick:()=>window.location.assign("/dashboard/logs"),children:"打开日志"})]})]})}function Iz(){const e=zs(),[t,n]=l.useState(null),[o,r]=l.useState(null),[c,a]=l.useState(null),[i,u]=l.useState(null),[d,h]=l.useState(null),[f,g]=l.useState(!0),[v,y]=l.useState(""),[b,m]=l.useState(""),[w,j]=l.useState(null),N=l.useCallback(M=>{n(M.servicesData),r(M.adminData),a(M.configData),u(M.ddnsData),h(M.publicCheck),j(M.checkedAt),m(""),g(!1)},[]),S=l.useCallback(async()=>{try{N(await ns())}catch{m("状态加载失败,请查看日志或稍后刷新。"),g(!1)}},[N]),R=l.useCallback(async()=>{g(!0),await S()},[S]);l.useEffect(()=>{if(e)return;let M=!1;return ns().then(X=>{M||N(X)}).catch(()=>{M||(m("状态加载失败,请查看日志或稍后刷新。"),g(!1))}),()=>{M=!0}},[N,e]);const E=e?.snapshot,T=E?.servicesData??t,D=E?.adminData??o,k=E?.configData??c,I=E?.ddnsData??i,U=E?.publicCheck??d,p=E?.checkedAt??w,x=e?e.loading&&!E:f,C=e?.error??b,_=T?.find(M=>M.name==="css"),O=T?.find(M=>M.name==="api"),L=T?"healthy":"unknown",A=cs(_),q=cs(O),$=A==="healthy"&&q==="healthy",V=k?.env??{},z=V.XPOD_TUNNEL_PROVIDER||I?.tunnelProvider||"none",te=V.XPOD_TUNNEL_ACTIVE_PROFILE_ID||z,G=pr(V,I,window.location.origin),re=uc(V,z,te),Y=l.useMemo(()=>{const M=U?.status==="pass"?"healthy":U?.status==="fail"?"failed":"unknown",X=z==="none"?"unknown":I?.mode==="tunnel"||re!=="未配置"?"healthy":"degraded";return[{name:"Loopback",target:`http://127.0.0.1:${V.CSS_PORT||"3000"}`,state:fc(T,$),detail:pc(T,$)},{name:"LAN",target:I?.ipv4?`http://${I.ipv4}:${V.CSS_PORT||"3000"}`:"等待本机地址上报",state:I?.ipv4&&$?"healthy":"unknown",detail:I?.ipv4?"局域网设备可尝试该地址。":"运行时还没有上报局域网地址。"},{name:"Public",target:G,state:M,detail:U?.detail||"公网可达性尚未检测。"},{name:"User tunnel",target:re,state:X,detail:z==="none"?"未启用用户隧道。":`当前供应商: ${z}`},{name:"P2P backup",target:"信令协调的原生客户端",state:"unknown",detail:"P2P 只作为免配置备选路径,不作为浏览器默认入口。"}]},[$,G,I,V.CSS_PORT,U,T,z,re]),ve=T?$?Y.some(M=>M.state==="failed")?"degraded":"healthy":"failed":"unknown",F=mc(Y),K=async()=>{const M={lastCheckedAt:p?.toISOString()??null,services:T,adminStatus:D,ddnsStatus:I,publicIpCheck:U,routes:Y,stableDataUrl:G,recommendedRoute:F,sanitizedConfig:k?{env:k.env,secrets:k.secrets??{}}:null};await navigator.clipboard.writeText(JSON.stringify(M,null,2)),y("状态 JSON 已复制")},ne=async()=>{await navigator.clipboard.writeText(G),y("稳定资料入口已复制")};return s.jsxs("div",{className:"p-4 sm:p-8 max-w-6xl space-y-6",children:[s.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"type-h1",children:"状态"}),s.jsx("p",{className:"mt-2 max-w-[65ch] text-sm text-muted-foreground",children:"查看服务是否运行、资料路径是否稳定,以及外部访问失败时需要处理什么。"})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs(pe,{variant:"ghost",onClick:()=>e?e.refresh():void R(),disabled:x||e?.refreshing,className:"gap-2",children:[s.jsx(Dn,{className:`h-4 w-4 ${x?"animate-spin":""}`}),"刷新"]}),s.jsxs(pe,{variant:"secondary",onClick:()=>{K()},className:"gap-2",children:[s.jsx(Lr,{className:"h-4 w-4"}),"复制状态 JSON"]}),s.jsxs(pe,{onClick:()=>window.open(G,"_blank"),className:"gap-2",children:[s.jsx(jr,{className:"h-4 w-4"}),"打开入口"]})]})]}),v?s.jsx("p",{className:"text-sm text-green-700 dark:text-green-300",children:v}):null,C?s.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:C}):null,s.jsx(Z,{variant:"bordered",children:s.jsx(J,{className:"pt-5",children:s.jsxs("div",{className:"grid gap-5 lg:grid-cols-[1fr_1.5fr]",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(qt,{state:ve,children:Ut(ve)}),s.jsx("div",{className:"text-2xl font-semibold",children:"Xpod runtime"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:p?`最后检查: ${p.toLocaleString()}`:"等待第一次检查。"}),s.jsxs("div",{className:"pt-3",children:[s.jsx("div",{className:"text-sm font-medium",children:"稳定资料入口"}),s.jsx("div",{className:"mt-1 break-all rounded-md border border-border bg-muted/30 px-3 py-2 font-mono text-sm",children:G||"等待稳定入口"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium",children:"当前建议路径"}),s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:F?`${F.name}: ${F.detail}`:"等待访问路径检测。"})]}),s.jsxs("div",{className:"flex flex-wrap gap-2 pt-2",children:[s.jsx(pe,{variant:"secondary",size:"sm",onClick:()=>{ne()},disabled:!G,children:"复制 URL"}),s.jsx(pe,{size:"sm",onClick:()=>window.open(G,"_blank"),disabled:!G,children:"打开入口"})]})]}),s.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[["Gateway",L,"当前控制台可访问"],["CSS",A,as(_?.uptime)],["API",q,as(O?.uptime)],["Tunnel",z==="none"?"unknown":"healthy",z]].map(([M,X,W])=>s.jsxs("div",{className:"rounded-xl border border-border p-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:M}),s.jsx(qt,{state:X,children:Ut(X)})]}),s.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:W})]},M))})]})})}),s.jsx(xc,{state:ve,routes:Y}),s.jsx(hc,{routes:Y}),s.jsx(gc,{routes:Y}),s.jsxs(Z,{variant:"bordered",children:[s.jsx(ce,{children:s.jsx(ae,{children:"Cloud 协调"})}),s.jsxs(J,{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[s.jsx("span",{className:"text-muted-foreground",children:"nodeId"}),s.jsx("span",{className:"font-mono break-all",children:V.XPOD_NODE_ID||"未上报"})]}),s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[s.jsx("span",{className:"text-muted-foreground",children:"spDomain"}),s.jsx("span",{className:"font-mono break-all",children:V.XPOD_SP_DOMAIN||I?.fqdn||"未分配"})]}),s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[s.jsx("span",{className:"text-muted-foreground",children:"DDNS"}),s.jsx("span",{children:I?.detail||"未上报"})]}),s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[s.jsx("span",{className:"text-muted-foreground",children:"heartbeat"}),s.jsx("span",{children:I?.enabled?"已启用":"未启用或未上报"})]}),s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[s.jsx("span",{className:"text-muted-foreground",children:"模式"}),s.jsx("span",{children:I?.mode||"unknown"})]}),s.jsx("p",{className:"pt-2 text-muted-foreground",children:"Cloud 负责稳定域名和 IDP,本地 SP 负责数据存储与实际接入。"})]})]}),s.jsxs(Z,{variant:"bordered",className:"bg-muted/30",children:[s.jsx(ce,{children:s.jsx(ae,{children:"配置摘要"})}),s.jsxs(J,{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[s.jsx("span",{className:"text-muted-foreground",children:"edition"}),s.jsx("span",{children:D?.env.XPOD_EDITION||"local"})]}),s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[s.jsx("span",{className:"text-muted-foreground",children:"baseUrl"}),s.jsx("span",{className:"font-mono break-all",children:G})]}),s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[s.jsx("span",{className:"text-muted-foreground",children:"storage"}),s.jsx("span",{className:"font-mono break-all",children:V.CSS_ROOT_FILE_PATH||"./data"})]}),s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[s.jsx("span",{className:"text-muted-foreground",children:"provider"}),s.jsx("span",{children:z})]}),s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[s.jsx("span",{className:"text-muted-foreground",children:"tunnelProfile"}),s.jsx("span",{children:te})]}),s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-2",children:[s.jsx("span",{className:"text-muted-foreground",children:"secrets"}),s.jsxs("span",{children:[Object.entries(k?.secrets??{}).filter(([,M])=>M.configured).length," 个已配置"]})]})]})]}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:["需要修改运行时配置时进入 ",s.jsx(ur,{className:"text-primary underline-offset-4 hover:underline",to:"/services/configuration",children:"配置"}),"。"]})]})}var vc=Object.defineProperty,bc=(e,t)=>vc(e,"name",{value:t,configurable:!0});function bn(e,[t,n]){return Math.min(n,Math.max(t,e))}bc(bn,"clamp");var yc=Object.defineProperty,ht=(e,t)=>yc(e,"name",{value:t,configurable:!0}),Ws=!!(typeof window<"u"&&window.document&&window.document.createElement);function me(e,t,{checkForDefaultPrevented:n=!0}={}){return ht(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}ht(me,"composeEventHandlers");function wc(e){if(!Ws)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}ht(wc,"getOwnerWindow");function yn(e){if(!Ws)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}ht(yn,"getOwnerDocument");function Xs(e,t=!1){const{activeElement:n}=yn(e);if(!n?.nodeName)return null;if(Gs(n)&&n.contentDocument)return Xs(n.contentDocument.body,t);if(t){const o=n.getAttribute("aria-activedescendant");if(o){const r=yn(n).getElementById(o);if(r)return r}}return n}ht(Xs,"getActiveElement");function Gs(e){return e.tagName==="IFRAME"}ht(Gs,"isFrame");var Sc=Object.defineProperty,Re=(e,t)=>Sc(e,"name",{value:t,configurable:!0});function Nc(e,t){const n=l.createContext(t);n.displayName=e+"Context";const o=Re(c=>{const{children:a,...i}=c,u=l.useMemo(()=>i,Object.values(i));return s.jsx(n.Provider,{value:u,children:a})},"Provider");o.displayName=e+"Provider";function r(c,a={}){const{optional:i=!1}=a,u=l.useContext(n);if(u)return u;if(t!==void 0)return t;if(!i)throw new Error(`\`${c}\` must be used within \`${e}\``)}return Re(r,"useContext"),[o,r]}Re(Nc,"createContext");function Ct(e,t=[]){let n=[];function o(c,a){const i=l.createContext(a);i.displayName=c+"Context";const u=n.length;n=[...n,a];const d=Re(f=>{const{scope:g,children:v,...y}=f,b=g?.[e]?.[u]||i,m=l.useMemo(()=>y,Object.values(y));return s.jsx(b.Provider,{value:m,children:v})},"Provider");d.displayName=c+"Provider";function h(f,g,v={}){const{optional:y=!1}=v,b=g?.[e]?.[u]||i,m=l.useContext(b);if(m)return m;if(a!==void 0)return a;if(!y)throw new Error(`\`${f}\` must be used within \`${c}\``)}return Re(h,"useContext"),[d,h]}Re(o,"createContext");const r=Re(()=>{const c=n.map(a=>l.createContext(a));return Re(function(i){const u=i?.[e]||c;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])},"useScope")},"createScope");return r.scopeName=e,[o,Ys(r,...t)]}Re(Ct,"createContextScope");function Ys(...e){const t=e[0];if(e.length===1)return t;const n=Re(()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return Re(function(c){const a=o.reduce((i,{useScope:u,scopeName:d})=>{const f=u(c)[`__scope${d}`];return{...i,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Re(Ys,"composeContextScopes");var jc=Object.defineProperty,ge=(e,t)=>jc(e,"name",{value:t,configurable:!0});function Qs(e){const t=e+"CollectionProvider",[n,o]=Ct(t),[r,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=ge(b=>{const{scope:m,children:w}=b,j=l.useRef(null),N=l.useRef(new Map).current;return s.jsx(r,{scope:m,itemMap:N,collectionRef:j,children:w})},"CollectionProvider");a.displayName=t;const i=e+"CollectionSlot",u=pt(i),d=l.forwardRef((b,m)=>{const{scope:w,children:j}=b,N=c(i,w),S=xe(m,N.collectionRef);return s.jsx(u,{ref:S,children:j})});d.displayName=i;const h=e+"CollectionItemSlot",f="data-radix-collection-item",g=pt(h),v=l.forwardRef((b,m)=>{const{scope:w,children:j,...N}=b,S=l.useRef(null),R=xe(m,S),E=c(h,w);return l.useEffect(()=>(E.itemMap.set(S,{ref:S,...N}),()=>{E.itemMap.delete(S)})),s.jsx(g,{[f]:"",ref:R,children:j})});v.displayName=h;function y(b){const m=c(e+"CollectionConsumer",b);return l.useCallback(()=>{const j=m.collectionRef.current;if(!j)return[];const N=Array.from(j.querySelectorAll(`[${f}]`));return Array.from(m.itemMap.values()).sort((E,T)=>N.indexOf(E.ref.current)-N.indexOf(T.ref.current))},[m.collectionRef,m.itemMap])}return ge(y,"useCollection"),[{Provider:a,Slot:d,ItemSlot:v},y,o]}ge(Qs,"createCollection");var is=new WeakMap,ue,Ce,rn=(Ce=class extends Map{constructor(n){super(n);ts(this,ue);on(this,ue,[...super.keys()]),is.set(this,!0)}set(n,o){return is.get(this)&&(this.has(n)?be(this,ue)[be(this,ue).indexOf(n)]=n:be(this,ue).push(n)),super.set(n,o),this}insert(n,o,r){const c=this.has(o),a=be(this,ue).length,i=In(n);let u=i>=0?i:a+i;const d=u<0||u>=a?-1:u;if(d===this.size||c&&d===this.size-1||d===-1)return this.set(o,r),this;const h=this.size+(c?0:1);i<0&&u++;const f=[...be(this,ue)];let g,v=!1;for(let y=u;y<h;y++)if(u===y){let b=f[y];f[y]===o&&(b=f[y+1]),c&&this.delete(o),g=this.get(b),this.set(o,r)}else{!v&&f[y-1]===o&&(v=!0);const b=f[v?y:y-1],m=g;g=this.get(b),this.delete(b),this.set(b,m)}return this}with(n,o,r){const c=new Ce(this);return c.insert(n,o,r),c}before(n){const o=be(this,ue).indexOf(n)-1;if(!(o<0))return this.entryAt(o)}setBefore(n,o,r){const c=be(this,ue).indexOf(n);return c===-1?this:this.insert(c,o,r)}after(n){let o=be(this,ue).indexOf(n);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(n,o,r){const c=be(this,ue).indexOf(n);return c===-1?this:this.insert(c+1,o,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return on(this,ue,[]),super.clear()}delete(n){const o=super.delete(n);return o&&be(this,ue).splice(be(this,ue).indexOf(n),1),o}deleteAt(n){const o=this.keyAt(n);return o!==void 0?this.delete(o):!1}at(n){const o=It(be(this,ue),n);if(o!==void 0)return this.get(o)}entryAt(n){const o=It(be(this,ue),n);if(o!==void 0)return[o,this.get(o)]}indexOf(n){return be(this,ue).indexOf(n)}keyAt(n){return It(be(this,ue),n)}from(n,o){const r=this.indexOf(n);if(r===-1)return;let c=r+o;return c<0&&(c=0),c>=this.size&&(c=this.size-1),this.at(c)}keyFrom(n,o){const r=this.indexOf(n);if(r===-1)return;let c=r+o;return c<0&&(c=0),c>=this.size&&(c=this.size-1),this.keyAt(c)}find(n,o){let r=0;for(const c of this){if(Reflect.apply(n,o,[c,r,this]))return c;r++}}findIndex(n,o){let r=0;for(const c of this){if(Reflect.apply(n,o,[c,r,this]))return r;r++}return-1}filter(n,o){const r=[];let c=0;for(const a of this)Reflect.apply(n,o,[a,c,this])&&r.push(a),c++;return new Ce(r)}map(n,o){const r=[];let c=0;for(const a of this)r.push([a[0],Reflect.apply(n,o,[a,c,this])]),c++;return new Ce(r)}reduce(...n){const[o,r]=n;let c=0,a=r??this.at(0);for(const i of this)c===0&&n.length===1?a=i:a=Reflect.apply(o,this,[a,i,c,this]),c++;return a}reduceRight(...n){const[o,r]=n;let c=r??this.at(-1);for(let a=this.size-1;a>=0;a--){const i=this.at(a);a===this.size-1&&n.length===1?c=i:c=Reflect.apply(o,this,[c,i,a,this])}return c}toSorted(n){const o=[...this.entries()].sort(n);return new Ce(o)}toReversed(){const n=new Ce;for(let o=this.size-1;o>=0;o--){const r=this.keyAt(o),c=this.get(r);n.set(r,c)}return n}toSpliced(...n){const o=[...this.entries()];return o.splice(...n),new Ce(o)}slice(n,o){const r=new Ce;let c=this.size-1;if(n===void 0)return r;n<0&&(n=n+this.size),o!==void 0&&o>0&&(c=o-1);for(let a=n;a<=c;a++){const i=this.keyAt(a),u=this.get(i);r.set(i,u)}return r}every(n,o){let r=0;for(const c of this){if(!Reflect.apply(n,o,[c,r,this]))return!1;r++}return!0}some(n,o){let r=0;for(const c of this){if(Reflect.apply(n,o,[c,r,this]))return!0;r++}return!1}},ue=new WeakMap,ge(Ce,"OrderedDict"),Ce);function It(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=Zs(e,t);return n===-1?void 0:e[n]}ge(It,"at");function Zs(e,t){const n=e.length,o=In(t),r=o>=0?o:n+o;return r<0||r>=n?-1:r}ge(Zs,"toSafeIndex");function In(e){return e!==e||e===0?0:Math.trunc(e)}ge(In,"toSafeInteger");function Cc(e){const t=e+"CollectionProvider",[n,o]=Ct(t),[r,c]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new rn,setItemMap:ge(()=>{},"setItemMap")}),a=ge(({state:N,...S})=>N?s.jsx(u,{...S,state:N}):s.jsx(i,{...S}),"CollectionProvider");a.displayName=t;const i=ge(N=>{const S=m();return s.jsx(u,{...N,state:S})},"CollectionInit");i.displayName=t+"Init";const u=ge(N=>{const{scope:S,children:R,state:E}=N,T=l.useRef(null),[D,k]=l.useState(null),I=xe(T,k),[U,p]=E;return l.useEffect(()=>{if(!D)return;const x=to(()=>{});return x.observe(D,{childList:!0,subtree:!0}),()=>{x.disconnect()}},[D]),s.jsx(r,{scope:S,itemMap:U,setItemMap:p,collectionRef:I,collectionRefObject:T,collectionElement:D,children:R})},"CollectionProviderImpl");u.displayName=t+"Impl";const d=e+"CollectionSlot",h=pt(d),f=l.forwardRef((N,S)=>{const{scope:R,children:E}=N,T=c(d,R),D=xe(S,T.collectionRef);return s.jsx(h,{ref:D,children:E})});f.displayName=d;const g=e+"CollectionItemSlot",v="data-radix-collection-item",y=pt(g),b=l.forwardRef((N,S)=>{const{scope:R,children:E,...T}=N,D=l.useRef(null),[k,I]=l.useState(null),U=xe(S,D,I),p=c(g,R),{setItemMap:x}=p,C=l.useRef(T);Js(C.current,T)||(C.current=T);const _=C.current;return l.useEffect(()=>{const O=_;return x(L=>k?L.has(k)?L.set(k,{...O,element:k}).toSorted(wn):(L.set(k,{...O,element:k}),L.toSorted(wn)):L),()=>{x(L=>!k||!L.has(k)?L:(L.delete(k),new rn(L)))}},[k,_,x]),s.jsx(y,{[v]:"",ref:U,children:E})});b.displayName=g;function m(){return l.useState(new rn)}ge(m,"useInitCollection");function w(N){const{itemMap:S}=c(e+"CollectionConsumer",N);return S}return ge(w,"useCollection"),[{Provider:a,Slot:f,ItemSlot:b},{createCollectionScope:o,useCollection:w,useInitCollection:m}]}ge(Cc,"createCollection");function Js(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}ge(Js,"shallowEqual");function eo(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}ge(eo,"isElementPreceding");function wn(e,t){return!e[1].element||!t[1].element?0:eo(e[1].element,t[1].element)?-1:1}ge(wn,"sortByDocumentPosition");function to(e){return new MutationObserver(n=>{for(const o of n)if(o.type==="childList"){e();return}})}ge(to,"getChildListObserver");var Ec=Object.defineProperty,Rc=(e,t)=>Ec(e,"name",{value:t,configurable:!0}),Pc=l.createContext(void 0);function no(e){const t=l.useContext(Pc);return e||t||"ltr"}Rc(no,"useDirection");var Tc=Object.defineProperty,_c=(e,t)=>Tc(e,"name",{value:t,configurable:!0}),Oc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ne=Oc.reduce((e,t)=>{const n=pt(`Primitive.${t}`),o=l.forwardRef((r,c)=>{const{asChild:a,...i}=r,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(u,{...i,ref:c})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function so(e,t){e&&jt.flushSync(()=>e.dispatchEvent(t))}_c(so,"dispatchDiscreteCustomEvent");var Lc=Object.defineProperty,Ac=(e,t)=>Lc(e,"name",{value:t,configurable:!0});function De(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>((...n)=>t.current?.(...n)),[])}Ac(De,"useCallbackRef");var Dc=Object.defineProperty,he=(e,t)=>Dc(e,"name",{value:t,configurable:!0}),Sn="dismissableLayer.update",kc="dismissableLayer.pointerDownOutside",Ic="dismissableLayer.focusOutside",ls,oo=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Mc=l.forwardRef(he(function(t,n){const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:c,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:u,onDismiss:d,...h}=t,f=l.useContext(oo),[g,v]=l.useState(null),y=g?.ownerDocument??globalThis?.document,[,b]=l.useState({}),m=xe(n,v),w=Array.from(f.layers),[j]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),N=j?w.indexOf(j):-1,S=g?w.indexOf(g):-1,R=f.layersWithOutsidePointerEventsDisabled.size>0,E=S>=N,T=l.useRef(!1),D=ro(p=>{a?.(p),u?.(p),p.defaultPrevented||d?.()},{ownerDocument:y,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:l.useCallback(p=>{if(!(p instanceof Node))return!1;const x=[...f.branches].some(C=>C.contains(p));return E&&!x},[f.branches,E])}),k=co(p=>{if(r&&T.current)return;const x=p.target;[...f.branches].some(_=>_.contains(x))||(i?.(p),u?.(p),p.defaultPrevented||d?.())},y),I=g?S===w.length-1:!1,U=De(p=>{p.key==="Escape"&&(c?.(p),!p.defaultPrevented&&d&&(p.preventDefault(),d()))});return l.useEffect(()=>{if(I)return y.addEventListener("keydown",U,{capture:!0}),()=>y.removeEventListener("keydown",U,{capture:!0})},[y,I,U]),l.useEffect(()=>{if(g)return o&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(ls=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(g)),f.layers.add(g),Nn(),()=>{o&&(f.layersWithOutsidePointerEventsDisabled.delete(g),f.layersWithOutsidePointerEventsDisabled.size===0&&(y.body.style.pointerEvents=ls))}},[g,y,o,f]),l.useEffect(()=>()=>{g&&(f.layers.delete(g),f.layersWithOutsidePointerEventsDisabled.delete(g),Nn())},[g,f]),l.useEffect(()=>{const p=he(()=>b({}),"handleUpdate");return document.addEventListener(Sn,p),()=>document.removeEventListener(Sn,p)},[]),s.jsx(Ne.div,{...h,ref:m,style:{pointerEvents:R?E?"auto":"none":void 0,...t.style},onFocusCapture:me(t.onFocusCapture,k.onFocusCapture),onBlurCapture:me(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:me(t.onPointerDownCapture,D.onPointerDownCapture)})},"DismissableLayer"));function $c(){const e=l.useContext(oo),[t,n]=l.useState(null);return l.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}he($c,"useDismissableLayerSurface");var Fc=he(()=>!0,"IS_TRUE");function ro(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:c,shouldHandlePointerDownOutside:a=Fc}=t,i=De(e),u=l.useRef(!1),d=l.useRef(!1),h=l.useRef(new Map),f=l.useRef(()=>{});return l.useEffect(()=>{function g(){d.current=!1,r.current=!1,h.current.clear()}he(g,"resetOutsideInteraction");function v(){return Array.from(h.current.values()).some(Boolean)}he(v,"isOutsideInteractionIntercepted");function y(N){if(!d.current)return;const S=N.target;S instanceof Node&&[...c].some(E=>E.contains(S))||h.current.set(N.type,!0),N.type==="click"&&window.setTimeout(()=>{d.current&&f.current()},0)}he(y,"handleInteractionCapture");function b(N){d.current&&h.current.set(N.type,!1)}he(b,"handleInteractionBubble");const m=he(N=>{if(N.target&&!u.current){let S=function(){n.removeEventListener("click",f.current);const E=v();g(),E||Mn(kc,i,R,{discrete:!0})};if(he(S,"handleAndDispatchPointerDownOutsideEvent"),!a(N.target)){n.removeEventListener("click",f.current),g(),u.current=!1;return}const R={originalEvent:N};d.current=!0,r.current=o&&N.button===0,h.current.clear(),!o||N.button!==0?S():(n.removeEventListener("click",f.current),f.current=S,n.addEventListener("click",f.current,{once:!0}))}else n.removeEventListener("click",f.current),g();u.current=!1},"handlePointerDown"),w=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const N of w)n.addEventListener(N,y,!0),n.addEventListener(N,b);const j=window.setTimeout(()=>{n.addEventListener("pointerdown",m)},0);return()=>{window.clearTimeout(j),n.removeEventListener("pointerdown",m),n.removeEventListener("click",f.current);for(const N of w)n.removeEventListener(N,y,!0),n.removeEventListener(N,b)}},[n,i,o,r,c,a]),{onPointerDownCapture:he(()=>u.current=!0,"onPointerDownCapture")}}he(ro,"usePointerDownOutside");function co(e,t=globalThis?.document){const n=De(e),o=l.useRef(!1);return l.useEffect(()=>{const r=he(c=>{c.target&&!o.current&&Mn(Ic,n,{originalEvent:c},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:he(()=>o.current=!0,"onFocusCapture"),onBlurCapture:he(()=>o.current=!1,"onBlurCapture")}}he(co,"useFocusOutside");function Nn(){const e=new CustomEvent(Sn);document.dispatchEvent(e)}he(Nn,"dispatchUpdate");function Mn(e,t,n,{discrete:o}){const r=n.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?so(r,c):r.dispatchEvent(c)}he(Mn,"handleAndDispatchCustomEvent");var qc=Object.defineProperty,$n=(e,t)=>qc(e,"name",{value:t,configurable:!0}),Pt=0,st=null;function Uc(e){return Fn(),e.children}$n(Uc,"FocusGuards");function Fn(){l.useEffect(()=>{st||(st={start:jn(),end:jn()});const{start:e,end:t}=st;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Pt++,()=>{Pt===1&&(st?.start.remove(),st?.end.remove(),st=null),Pt=Math.max(0,Pt-1)}},[])}$n(Fn,"useFocusGuards");function jn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}$n(jn,"createFocusGuard");var Hc=Object.defineProperty,we=(e,t)=>Hc(e,"name",{value:t,configurable:!0}),cn="focusScope.autoFocusOnMount",an="focusScope.autoFocusOnUnmount",us={bubbles:!1,cancelable:!0},Bc=l.forwardRef(we(function(t,n){const{loop:o=!1,trapped:r=!1,onMountAutoFocus:c,onUnmountAutoFocus:a,...i}=t,[u,d]=l.useState(null),h=De(c),f=De(a),g=l.useRef(null),v=xe(n,d),y=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let m=function(S){if(y.paused||!u)return;const R=S.target;u.contains(R)?g.current=R:Me(g.current,{select:!0})},w=function(S){if(y.paused||!u)return;const R=S.relatedTarget;R!==null&&(u.contains(R)||Me(g.current,{select:!0}))},j=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Me(u)};we(m,"handleFocusIn"),we(w,"handleFocusOut"),we(j,"handleMutations"),document.addEventListener("focusin",m),document.addEventListener("focusout",w);const N=new MutationObserver(j);return u&&N.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",w),N.disconnect()}}},[r,u,y.paused]),l.useEffect(()=>{if(u){ds.add(y);const m=document.activeElement;if(!u.contains(m)){const j=new CustomEvent(cn,us);u.addEventListener(cn,h),u.dispatchEvent(j),j.defaultPrevented||(ao(po(qn(u)),{select:!0}),document.activeElement===m&&Me(u))}return()=>{u.removeEventListener(cn,h),setTimeout(()=>{const j=new CustomEvent(an,us);u.addEventListener(an,f),u.dispatchEvent(j),j.defaultPrevented||Me(m??document.body,{select:!0}),u.removeEventListener(an,f),ds.remove(y)},0)}}},[u,h,f,y]);const b=l.useCallback(m=>{if(!o&&!r||y.paused)return;const w=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,j=document.activeElement;if(w&&j){const N=m.currentTarget,[S,R]=io(N);S&&R?!m.shiftKey&&j===R?(m.preventDefault(),o&&Me(S,{select:!0})):m.shiftKey&&j===S&&(m.preventDefault(),o&&Me(R,{select:!0})):j===N&&m.preventDefault()}},[o,r,y.paused]);return s.jsx(Ne.div,{tabIndex:-1,...i,ref:v,onKeyDown:b})},"FocusScope"));function ao(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Me(o,{select:t}),document.activeElement!==n)return}we(ao,"focusFirst");function io(e){const t=qn(e),n=Cn(t,e),o=Cn(t.reverse(),e);return[n,o]}we(io,"getTabbableEdges");function qn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:we(o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}we(qn,"getTabbableCandidates");function Cn(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const o of e)if(!(n?!o.checkVisibility({checkVisibilityCSS:!0}):lo(o,{upTo:t})))return o}we(Cn,"findVisible");function lo(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}we(lo,"isHidden");function uo(e){return e instanceof HTMLInputElement&&"select"in e}we(uo,"isSelectableInput");function Me(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&uo(e)&&t&&e.select()}}we(Me,"focus");var ds=fo();function fo(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=En(e,t),e.unshift(t)},remove(t){e=En(e,t),e[0]?.resume()}}}we(fo,"createFocusScopesStack");function En(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}we(En,"arrayRemove");function po(e){return e.filter(t=>t.tagName!=="A")}we(po,"removeLinks");var Se=globalThis?.document?l.useLayoutEffect:()=>{},Vc=Object.defineProperty,zc=(e,t)=>Vc(e,"name",{value:t,configurable:!0}),Kc=Kt[" useId ".trim().toString()]||(()=>{}),Wc=0;function Un(e){const[t,n]=l.useState(Kc());return Se(()=>{e||n(o=>o??String(Wc++))},[e]),e||(t?`radix-${t}`:"")}zc(Un,"useId");const Xc=["top","right","bottom","left"],ze=Math.min,$e=Math.max,Ht=Math.round,Tt=Math.floor,Fe=e=>({x:e,y:e}),Gc={left:"right",right:"left",bottom:"top",top:"bottom"};function mo(e,t,n){return $e(e,ze(t,n))}function qe(e,t){return typeof e=="function"?e(t):e}function Ke(e){return e.split("-")[0]}function gt(e){return e.split("-")[1]}function Hn(e){return e==="x"?"y":"x"}function Bn(e){return e==="y"?"height":"width"}function Ae(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Vn(e){return Hn(Ae(e))}function Yc(e,t,n){n===void 0&&(n=!1);const o=gt(e),r=Vn(e),c=Bn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(a=Bt(a)),[a,Bt(a)]}function Qc(e){const t=Bt(e);return[Rn(e),t,Rn(t)]}function Rn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const fs=["left","right"],ps=["right","left"],Zc=["top","bottom"],Jc=["bottom","top"];function ea(e,t,n){switch(e){case"top":case"bottom":return n?t?ps:fs:t?fs:ps;case"left":case"right":return t?Zc:Jc;default:return[]}}function ta(e,t,n,o){const r=gt(e);let c=ea(Ke(e),n==="start",o);return r&&(c=c.map(a=>a+"-"+r),t&&(c=c.concat(c.map(Rn)))),c}function Bt(e){const t=Ke(e);return Gc[t]+e.slice(t.length)}function na(e){var t,n,o,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(r=e.left)!=null?r:0}}function ho(e){return typeof e!="number"?na(e):{top:e,right:e,bottom:e,left:e}}function Vt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function ms(e,t,n){let{reference:o,floating:r}=e;const c=Ae(t),a=Vn(t),i=Bn(a),u=Ke(t),d=c==="y",h=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,g=o[i]/2-r[i]/2;let v;switch(u){case"top":v={x:h,y:o.y-r.height};break;case"bottom":v={x:h,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:f};break;case"left":v={x:o.x-r.width,y:f};break;default:v={x:o.x,y:o.y}}const y=gt(t);return y&&(v[a]+=g*(y==="end"?1:-1)*(n&&d?-1:1)),v}async function sa(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:c,rects:a,elements:i,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:g=!1,padding:v=0}=qe(t,e),y=ho(v),m=i[g?f==="floating"?"reference":"floating":f],w=Vt(await c.getClippingRect({element:(n=await(c.isElement==null?void 0:c.isElement(m)))==null||n?m:m.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(i.floating)),boundary:d,rootBoundary:h,strategy:u})),j=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,N=await(c.getOffsetParent==null?void 0:c.getOffsetParent(i.floating)),S=await(c.isElement==null?void 0:c.isElement(N))&&await(c.getScale==null?void 0:c.getScale(N))||{x:1,y:1},R=Vt(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:j,offsetParent:N,strategy:u}):j);return{top:(w.top-R.top+y.top)/S.y,bottom:(R.bottom-w.bottom+y.bottom)/S.y,left:(w.left-R.left+y.left)/S.x,right:(R.right-w.right+y.right)/S.x}}const oa=50,ra=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:c=[],platform:a}=n,i=a.detectOverflow?a:{...a,detectOverflow:sa},u=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:f}=ms(d,o,u),g=o,v=0;const y={};for(let b=0;b<c.length;b++){const m=c[b];if(!m)continue;const{name:w,fn:j}=m,{x:N,y:S,data:R,reset:E}=await j({x:h,y:f,initialPlacement:o,placement:g,strategy:r,middlewareData:y,rects:d,platform:i,elements:{reference:e,floating:t}});h=N??h,f=S??f,y[w]={...y[w],...R},E&&v<oa&&(v++,typeof E=="object"&&(E.placement&&(g=E.placement),E.rects&&(d=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:h,y:f}=ms(d,g,u)),b=-1)}return{x:h,y:f,placement:g,strategy:r,middlewareData:y}},ca=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:c,platform:a,elements:i,middlewareData:u}=t,{element:d,padding:h=0}=qe(e,t)||{};if(d==null)return{};const f=ho(h),g={x:n,y:o},v=Vn(r),y=Bn(v),b=await a.getDimensions(d),m=v==="y",w=m?"top":"left",j=m?"bottom":"right",N=m?"clientHeight":"clientWidth",S=c.reference[y]+c.reference[v]-g[v]-c.floating[y],R=g[v]-c.reference[v],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let T=E?E[N]:0;(!T||!await(a.isElement==null?void 0:a.isElement(E)))&&(T=i.floating[N]||c.floating[y]);const D=S/2-R/2,k=T/2-b[y]/2-1,I=ze(f[w],k),U=ze(f[j],k),p=T-b[y]-U,x=T/2-b[y]/2+D,C=mo(I,x,p),_=!u.arrow&>(r)!=null&&x!==C&&c.reference[y]/2-(x<I?I:U)-b[y]/2<0,O=_?x<I?x-I:x-p:0;return{[v]:g[v]+O,data:{[v]:C,centerOffset:x-C-O,..._&&{alignmentOffset:O}},reset:_}}}),aa=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:c,rects:a,initialPlacement:i,platform:u,elements:d}=t,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,...m}=qe(e,t);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const w=Ke(r),j=Ae(i),N=Ke(i)===i,S=await(u.isRTL==null?void 0:u.isRTL(d.floating)),R=g||(N||!b?[Bt(i)]:Qc(i)),E=y!=="none";!g&&E&&R.push(...ta(i,b,y,S));const T=[i,...R],D=await u.detectOverflow(t,m),k=[];let I=((o=c.flip)==null?void 0:o.overflows)||[];if(h&&k.push(D[w]),f){const C=Yc(r,a,S);k.push(D[C[0]],D[C[1]])}if(I=[...I,{placement:r,overflows:k}],!k.every(C=>C<=0)){var U,p;const C=(((U=c.flip)==null?void 0:U.index)||0)+1,_=T[C];if(_&&(!(f==="alignment"?j!==Ae(_):!1)||I.every(A=>Ae(A.placement)===j?A.overflows[0]>0:!0)))return{data:{index:C,overflows:I},reset:{placement:_}};let O=(p=I.filter(L=>L.overflows[0]<=0).sort((L,A)=>L.overflows[1]-A.overflows[1])[0])==null?void 0:p.placement;if(!O)switch(v){case"bestFit":{var x;const L=(x=I.filter(A=>{if(E){const q=Ae(A.placement);return q===j||q==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(q=>q>0).reduce((q,$)=>q+$,0)]).sort((A,q)=>A[1]-q[1])[0])==null?void 0:x[0];L&&(O=L);break}case"initialPlacement":O=i;break}if(r!==O)return{reset:{placement:O}}}return{}}}};function hs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gs(e){return Xc.some(t=>e[t]>=0)}const ia=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...c}=qe(e,t);switch(r){case"referenceHidden":{const a=await o.detectOverflow(t,{...c,elementContext:"reference"}),i=hs(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:gs(i)}}}case"escaped":{const a=await o.detectOverflow(t,{...c,altBoundary:!0}),i=hs(a,n.floating);return{data:{escapedOffsets:i,escaped:gs(i)}}}default:return{}}}}},go=new Set(["left","top"]);async function la(e,t){const{placement:n,platform:o,elements:r}=e,c=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Ke(n),i=gt(n),u=Ae(n)==="y",d=go.has(a)?-1:1,h=c&&u?-1:1,f=qe(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return i&&typeof y=="number"&&(v=i==="end"?y*-1:y),u?{x:v*h,y:g*d}:{x:g*d,y:v*h}}const ua=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:c,placement:a,middlewareData:i}=t,u=await la(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(o=i.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:c+u.y,data:{...u,placement:a}}}}},da=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:c}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:u={fn:j=>{let{x:N,y:S}=j;return{x:N,y:S}}},...d}=qe(e,t),h={x:n,y:o},f=await c.detectOverflow(t,d),g=Ae(r),v=Hn(g);let y=h[v],b=h[g];const m=(j,N)=>mo(N+f[j==="y"?"top":"left"],N,N-f[j==="y"?"bottom":"right"]);a&&(y=m(v,y)),i&&(b=m(g,b));const w=u.fn({...t,[v]:y,[g]:b});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[v]:a,[g]:i}}}}}},fa=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:c,placement:a,rects:i,middlewareData:u}=t,{offset:d=0,mainAxis:h=!0,crossAxis:f=!0}=qe(e,t),g={x:r,y:c},v=Ae(a),y=Hn(v);let b=g[y],m=g[v];const w=qe(d,t),j=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(n=w.mainAxis)!=null?n:0,crossAxis:(o=w.crossAxis)!=null?o:0};if(h){const R=y==="y"?"height":"width",E=i.reference[y]-i.floating[R]+j.mainAxis,T=i.reference[y]+i.reference[R]-j.mainAxis;b<E?b=E:b>T&&(b=T)}if(f){var N,S;const R=y==="y"?"width":"height",E=go.has(Ke(a)),T=i.reference[v]-i.floating[R]+(E&&((N=u.offset)==null?void 0:N[v])||0)+(E?0:j.crossAxis),D=i.reference[v]+i.reference[R]+(E?0:((S=u.offset)==null?void 0:S[v])||0)-(E?j.crossAxis:0);m<T?m=T:m>D&&(m=D)}return{[y]:b,[v]:m}}}},pa=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:c}=t,{apply:a=()=>{},...i}=qe(e,t),u=await r.detectOverflow(t,i),d=Ke(n),h=gt(n),f=Ae(n)==="y",{width:g,height:v}=o.floating;let y,b;d==="top"||d==="bottom"?(y=d,b=h===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(b=d,y=h==="end"?"top":"bottom");const m=v-u.top-u.bottom,w=g-u.left-u.right,j=ze(v-u[y],m),N=ze(g-u[b],w),S=t.middlewareData.shift,R=!S;let E=j,T=N;S!=null&&S.enabled.x&&(T=w),S!=null&&S.enabled.y&&(E=m),R&&!h&&(f?T=g-2*$e(u.left,u.right):E=v-2*$e(u.top,u.bottom)),await a({...t,availableWidth:T,availableHeight:E});const D=await r.getDimensions(c.floating);return g!==D.width||v!==D.height?{reset:{rects:!0}}:{}}}};function Gt(){return typeof window<"u"}function xt(e){return xo(e)?(e.nodeName||"").toLowerCase():"#document"}function je(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function He(e){var t;return(t=(xo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xo(e){return Gt()?e instanceof Node||e instanceof je(e).Node:!1}function ke(e){return Gt()?e instanceof Element||e instanceof je(e).Element:!1}function We(e){return Gt()?e instanceof HTMLElement||e instanceof je(e).HTMLElement:!1}function xs(e){return!Gt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof je(e).ShadowRoot}function Yt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function ma(e){return/^(table|td|th)$/.test(xt(e))}function Qt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ha=/transform|translate|scale|rotate|perspective|filter/,ga=/paint|layout|strict|content/,Ge=e=>!!e&&e!=="none";let ln;function zn(e){const t=ke(e)?Ie(e):e;return Ge(t.transform)||Ge(t.translate)||Ge(t.scale)||Ge(t.rotate)||Ge(t.perspective)||!Kn()&&(Ge(t.backdropFilter)||Ge(t.filter))||ha.test(t.willChange||"")||ga.test(t.contain||"")}function xa(e){let t=Je(e);for(;We(t)&&!St(t);){if(zn(t))return t;if(Qt(t))return null;t=Je(t)}return null}function Kn(){return ln==null&&(ln=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ln}function St(e){return/^(html|body|#document)$/.test(xt(e))}function Ie(e){return je(e).getComputedStyle(e)}function Zt(e){return ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Je(e){if(xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xs(e)&&e.host||He(e);return xs(t)?t.host:t}function vo(e){const t=Je(e);return St(t)?(e.ownerDocument||e).body:We(t)&&Yt(t)?t:vo(t)}function Nt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=vo(e),c=r===((o=e.ownerDocument)==null?void 0:o.body),a=je(r);if(c){const i=Pn(a);return t.concat(a,a.visualViewport||[],Yt(r)?r:[],i&&n?Nt(i):[])}else return t.concat(r,Nt(r,[],n))}function Pn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bo(e){const t=Ie(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=We(e),c=r?e.offsetWidth:n,a=r?e.offsetHeight:o,i=Ht(n)!==c||Ht(o)!==a;return i&&(n=c,o=a),{width:n,height:o,$:i}}function Wn(e){return ke(e)?e:e.contextElement}function dt(e){const t=Wn(e);if(!We(t))return Fe(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:c}=bo(t);let a=(c?Ht(n.width):n.width)/o,i=(c?Ht(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const va=Fe(0);function yo(e){const t=je(e);return!Kn()||!t.visualViewport?va:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ba(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===je(e)}function et(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),c=Wn(e);let a=Fe(1);t&&(o?ke(o)&&(a=dt(o)):a=dt(e));const i=ba(c,n,o)?yo(c):Fe(0);let u=(r.left+i.x)/a.x,d=(r.top+i.y)/a.y,h=r.width/a.x,f=r.height/a.y;if(c&&o){const g=je(c),v=ke(o)?je(o):o;let y=g,b=Pn(y);for(;b&&v!==y;){const m=dt(b),w=b.getBoundingClientRect(),j=Ie(b),N=w.left+(b.clientLeft+parseFloat(j.paddingLeft))*m.x,S=w.top+(b.clientTop+parseFloat(j.paddingTop))*m.y;u*=m.x,d*=m.y,h*=m.x,f*=m.y,u+=N,d+=S,y=je(b),b=Pn(y)}}return Vt({width:h,height:f,x:u,y:d})}function Jt(e,t){const n=Zt(e).scrollLeft;return t?t.left+n:et(He(e)).left+n}function wo(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Jt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function ya(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const c=r==="fixed",a=He(o),i=t?Qt(t.floating):!1;if(o===a||i&&c)return n;let u={scrollLeft:0,scrollTop:0},d=Fe(1);const h=Fe(0),f=We(o);if((f||!c)&&((xt(o)!=="body"||Yt(a))&&(u=Zt(o)),f)){const v=et(o);d=dt(o),h.x=v.x+o.clientLeft,h.y=v.y+o.clientTop}const g=a&&!f&&!c?wo(a,u):Fe(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+h.x+g.x,y:n.y*d.y-u.scrollTop*d.y+h.y+g.y}}function wa(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Sa(e){const t=Zt(e),n=e.ownerDocument.body,o=$e(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=$e(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let c=-t.scrollLeft+Jt(e);const a=-t.scrollTop;return Ie(n).direction==="rtl"&&(c+=$e(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:c,y:a}}const Na=25;function ja(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=je(e),c=He(e),a=r.visualViewport;let i=c.clientWidth,u=c.clientHeight,d=0,h=0;if(a){const g=!Kn()||t==="fixed";o?g||(d=-a.offsetLeft,h=-a.offsetTop):(i=a.width,u=a.height,g&&(d=a.offsetLeft,h=a.offsetTop))}if(Jt(c)<=0){const g=c.ownerDocument,v=g.body,y=getComputedStyle(v),b=g.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,m=Math.abs(c.clientWidth-v.clientWidth-b),w=getComputedStyle(c).scrollbarGutter==="stable both-edges"?m/2:m;w<=Na&&(i-=w)}return{width:i,height:u,x:d,y:h}}function Ca(e,t){const n=et(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,c=dt(e),a=e.clientWidth*c.x,i=e.clientHeight*c.y,u=r*c.x,d=o*c.y;return{width:a,height:i,x:u,y:d}}function vs(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=ja(e,n,t);else if(t==="document")o=Sa(He(e));else if(ke(t))o=Ca(t,n);else{const r=yo(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Vt(o)}function Ea(e,t){const n=t.get(e);if(n)return n;let o=Nt(e,[],!1).filter(i=>ke(i)&&xt(i)!=="body"),r=null;const c=Ie(e).position==="fixed";let a=c?Je(e):e;for(;ke(a)&&!St(a);){const i=Ie(a),u=zn(a),d=r?r.position:c?"fixed":"";!u&&(d==="fixed"||d==="absolute"&&i.position==="static")?o=o.filter(f=>f!==a):r=i,a=Je(a)}return t.set(e,o),o}function Ra(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Qt(t)?[]:Ea(t,this._c):[].concat(n),o],i=vs(t,a[0],r);let u=i.top,d=i.right,h=i.bottom,f=i.left;for(let g=1;g<a.length;g++){const v=vs(t,a[g],r);u=$e(v.top,u),d=ze(v.right,d),h=ze(v.bottom,h),f=$e(v.left,f)}return{width:d-f,height:h-u,x:f,y:u}}function Pa(e){const{width:t,height:n}=bo(e);return{width:t,height:n}}function Ta(e,t,n){const o=We(t),r=He(t),c=n==="fixed",a=et(e,!0,c,t);let i={scrollLeft:0,scrollTop:0};const u=Fe(0);if((o||!c)&&((xt(t)!=="body"||Yt(r))&&(i=Zt(t)),o)){const g=et(t,!0,c,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}!o&&r&&(u.x=Jt(r));const d=r&&!o&&!c?wo(r,i):Fe(0),h=a.left+i.scrollLeft-u.x-d.x,f=a.top+i.scrollTop-u.y-d.y;return{x:h,y:f,width:a.width,height:a.height}}function un(e){return Ie(e).position==="static"}function bs(e,t){if(!We(e)||Ie(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return He(e)===n&&(n=n.ownerDocument.body),n}function So(e,t){const n=je(e);if(Qt(e))return n;if(!We(e)){let r=Je(e);for(;r&&!St(r);){if(ke(r)&&!un(r))return r;r=Je(r)}return n}let o=bs(e,t);for(;o&&ma(o)&&un(o);)o=bs(o,t);return o&&St(o)&&un(o)&&!zn(o)?n:o||xa(e)||n}const _a=async function(e){const t=this.getOffsetParent||So,n=this.getDimensions,o=await n(e.floating);return{reference:Ta(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Oa(e){return Ie(e).direction==="rtl"}const La={convertOffsetParentRelativeRectToViewportRelativeRect:ya,getDocumentElement:He,getClippingRect:Ra,getOffsetParent:So,getElementRects:_a,getClientRects:wa,getDimensions:Pa,getScale:dt,isElement:ke,isRTL:Oa};function No(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Aa(e,t,n){let o=null,r;const c=He(e);function a(){var h;clearTimeout(r),(h=o)==null||h.disconnect(),o=null}function i(h,f){h===void 0&&(h=!1),f===void 0&&(f=1),a();const g=e.getBoundingClientRect(),{left:v,top:y,width:b,height:m}=g;if(h||t(),!b||!m)return;const w=Tt(y),j=Tt(c.clientWidth-(v+b)),N=Tt(c.clientHeight-(y+m)),S=Tt(v),E={rootMargin:-w+"px "+-j+"px "+-N+"px "+-S+"px",threshold:$e(0,ze(1,f))||1};let T=!0;function D(k){const I=k[0].intersectionRatio;if(!No(g,e.getBoundingClientRect()))return i();if(I!==f){if(!T)return i();I?i(!1,I):r=setTimeout(()=>{i(!1,1e-7)},1e3)}T=!1}try{o=new IntersectionObserver(D,{...E,root:c.ownerDocument})}catch{o=new IntersectionObserver(D,E)}o.observe(e)}const u=je(e),d=()=>i(n);return u.addEventListener("resize",d),i(!0),()=>{u.removeEventListener("resize",d),a()}}function Da(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:c=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=Wn(e),h=r||c?[...d?Nt(d):[],...t?Nt(t):[]]:[];h.forEach(w=>{r&&w.addEventListener("scroll",n),c&&w.addEventListener("resize",n)});const f=d&&i?Aa(d,n,c):null;let g=-1,v=null;a&&(v=new ResizeObserver(w=>{let[j]=w;j&&j.target===d&&v&&t&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var N;(N=v)==null||N.observe(t)})),n()}),d&&!u&&v.observe(d),t&&v.observe(t));let y,b=u?et(e):null;u&&m();function m(){const w=et(e);b&&!No(b,w)&&n(),b=w,y=requestAnimationFrame(m)}return n(),()=>{var w;h.forEach(j=>{r&&j.removeEventListener("scroll",n),c&&j.removeEventListener("resize",n)}),f?.(),(w=v)==null||w.disconnect(),v=null,u&&cancelAnimationFrame(y)}}const ka=ua,Ia=da,Ma=aa,$a=pa,Fa=ia,ys=ca,qa=fa,Ua=(e,t,n)=>{const o=new Map,r=n??{},c={...La,...r.platform,_c:o};return ra(e,t,{...r,platform:c})};var Ha=typeof document<"u",Ba=function(){},Mt=Ha?l.useLayoutEffect:Ba;function zt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!zt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const c=r[o];if(!(c==="_owner"&&e.$$typeof)&&!zt(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function jo(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ws(e,t){const n=jo(e);return Math.round(t*n)/n}function dn(e){const t=l.useRef(e);return Mt(()=>{t.current=e}),t}function Va(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:c,floating:a}={},transform:i=!0,whileElementsMounted:u,open:d}=e,[h,f]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=l.useState(o);zt(g,o)||v(o);const[y,b]=l.useState(null),[m,w]=l.useState(null),j=l.useCallback(A=>{A!==E.current&&(E.current=A,b(A))},[]),N=l.useCallback(A=>{A!==T.current&&(T.current=A,w(A))},[]),S=c||y,R=a||m,E=l.useRef(null),T=l.useRef(null),D=l.useRef(h),k=u!=null,I=dn(u),U=dn(r),p=dn(d),x=l.useCallback(()=>{if(!E.current||!T.current)return;const A={placement:t,strategy:n,middleware:g};U.current&&(A.platform=U.current),Ua(E.current,T.current,A).then(q=>{const $={...q,isPositioned:p.current!==!1};C.current&&!zt(D.current,$)&&(D.current=$,jt.flushSync(()=>{f($)}))})},[g,t,n,U,p]);Mt(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[d]);const C=l.useRef(!1);Mt(()=>(C.current=!0,()=>{C.current=!1}),[]),Mt(()=>{if(S&&(E.current=S),R&&(T.current=R),S&&R){if(I.current)return I.current(S,R,x);x()}},[S,R,x,I,k]);const _=l.useMemo(()=>({reference:E,floating:T,setReference:j,setFloating:N}),[j,N]),O=l.useMemo(()=>({reference:S,floating:R}),[S,R]),L=l.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const q=ws(O.floating,h.x),$=ws(O.floating,h.y);return i?{...A,transform:"translate("+q+"px, "+$+"px)",...jo(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:$}},[n,i,O.floating,h.x,h.y]);return l.useMemo(()=>({...h,update:x,refs:_,elements:O,floatingStyles:L}),[h,x,_,O,L])}const za=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?ys({element:o.current,padding:r}).fn(n):{}:o?ys({element:o,padding:r}).fn(n):{}}}},Ka=(e,t)=>{const n=ka(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wa=(e,t)=>{const n=Ia(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xa=(e,t)=>({fn:qa(e).fn,options:[e,t]}),Ga=(e,t)=>{const n=Ma(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ya=(e,t)=>{const n=$a(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qa=(e,t)=>{const n=Fa(e);return{name:n.name,fn:n.fn,options:[e,t]}},Za=(e,t)=>{const n=za(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ja=Object.defineProperty,ei=(e,t)=>Ja(e,"name",{value:t,configurable:!0});function Co(e){const[t,n]=l.useState(void 0);return Se(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const c=r[0];let a,i;if("borderBoxSize"in c){const u=c.borderBoxSize,d=Array.isArray(u)?u[0]:u;a=d.inlineSize,i=d.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}ei(Co,"useSize");var ti=Object.defineProperty,Ve=(e,t)=>ti(e,"name",{value:t,configurable:!0}),Eo="Popper",[Ro,Po]=Ct(Eo),[ni,To]=Ro(Eo),si=Ve(e=>{const{__scopePopper:t,children:n}=e,[o,r]=l.useState(null),[c,a]=l.useState(void 0);return s.jsx(ni,{scope:t,anchor:o,onAnchorChange:r,placementState:c,setPlacementState:a,children:n})},"Popper"),oi="PopperAnchor",ri=l.forwardRef(Ve(function(t,n){const{__scopePopper:o,virtualRef:r,...c}=t,a=To(oi,o),i=l.useRef(null),u=a.onAnchorChange,d=l.useCallback(b=>{i.current=b,b&&u(b)},[u]),h=xe(n,d),f=l.useRef(null);l.useEffect(()=>{if(!r)return;const b=f.current;f.current=r.current,b!==f.current&&u(f.current)});const g=a.placementState&&en(a.placementState),v=g?.[0],y=g?.[1];return r?null:s.jsx(Ne.div,{"data-radix-popper-side":v,"data-radix-popper-align":y,...c,ref:h})},"PopperAnchor")),_o="PopperContent",[ci,Mz]=Ro(_o),ai=l.forwardRef(Ve(function(t,n){const{__scopePopper:o,side:r="bottom",sideOffset:c=0,align:a="center",alignOffset:i=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:f=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:b,...m}=t,w=To(_o,o),[j,N]=l.useState(null),S=xe(n,N),[R,E]=l.useState(null),T=Co(R),D=T?.width??0,k=T?.height??0,I=r+(a!=="center"?"-"+a:""),U=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},p=Array.isArray(h)?h:[h],x=p.length>0,C={padding:U,boundary:p.filter(Oo),altBoundary:x},{refs:_,floatingStyles:O,placement:L,isPositioned:A,middlewareData:q}=Va({strategy:"fixed",placement:I,whileElementsMounted:Ve((...K)=>Da(...K,{animationFrame:y==="always"}),"whileElementsMounted"),elements:{reference:w.anchor},middleware:[Ka({mainAxis:c+k,alignmentAxis:i}),d&&Wa({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?Xa():void 0,...C}),d&&Ga({...C}),Ya({...C,apply:Ve(({elements:K,rects:ne,availableWidth:M,availableHeight:X})=>{const{width:W,height:se}=ne.reference,de=K.floating.style;de.setProperty("--radix-popper-available-width",`${M}px`),de.setProperty("--radix-popper-available-height",`${X}px`),de.setProperty("--radix-popper-anchor-width",`${W}px`),de.setProperty("--radix-popper-anchor-height",`${se}px`)},"apply")}),R&&Za({element:R,padding:u}),ii({arrowWidth:D,arrowHeight:k}),v&&Qa({strategy:"referenceHidden",...C,boundary:x?C.boundary:void 0})]}),$=w.setPlacementState;Se(()=>($(L),()=>{$(void 0)}),[L,$]);const[V,z]=en(L),te=De(b);Se(()=>{A&&te?.()},[A,te]);const G=q.arrow?.x,re=q.arrow?.y,Y=q.arrow?.centerOffset!==0,[ve,F]=l.useState();return Se(()=>{j&&F(window.getComputedStyle(j).zIndex)},[j]),s.jsx("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:A?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[q.transformOrigin?.x,q.transformOrigin?.y].join(" "),...q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:s.jsx(ci,{scope:o,placedSide:V,placedAlign:z,onArrowChange:E,arrowX:G,arrowY:re,shouldHideArrow:Y,children:s.jsx(Ne.div,{"data-side":V,"data-align":z,...m,ref:S,style:{...m.style,animation:A?m.style?.animation:"none"}})})})},"PopperContent"));function Oo(e){return e!==null}Ve(Oo,"isNotNull");var ii=Ve(e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[d,h]=en(n),f={start:"0%",center:"50%",end:"100%"}[h],g=(r.arrow?.x??0)+i/2,v=(r.arrow?.y??0)+u/2;let y="",b="";return d==="bottom"?(y=a?f:`${g}px`,b=`${-u}px`):d==="top"?(y=a?f:`${g}px`,b=`${o.floating.height+u}px`):d==="right"?(y=`${-u}px`,b=a?f:`${v}px`):d==="left"&&(y=`${o.floating.width+u}px`,b=a?f:`${v}px`),{data:{x:y,y:b}}}}),"transformOrigin");function en(e){const[t,n="center"]=e.split("-");return[t,n]}Ve(en,"getSideAndAlignFromPlacement");var li=si,ui=ri,di=ai,fi=Object.defineProperty,pi=(e,t)=>fi(e,"name",{value:t,configurable:!0}),mi=l.forwardRef(pi(function(t,n){const{container:o,...r}=t,[c,a]=l.useState(!1);Se(()=>a(!0),[]);const i=o||c&&globalThis?.document?.body;return i?jt.createPortal(s.jsx(Ne.div,{...r,ref:n}),i):null},"Portal")),hi=Object.defineProperty,Ue=(e,t)=>hi(e,"name",{value:t,configurable:!0});function Lo(e,t){return l.useReducer((n,o)=>t[n][o]??n,e)}Ue(Lo,"useStateMachine");var gi=Ue(e=>{const{present:t,children:n}=e,o=Ao(t),r=typeof n=="function"?n({present:o.isPresent}):l.Children.only(n),c=Do(o.ref,ko(r));return typeof n=="function"||o.isPresent?l.cloneElement(r,{ref:c}):null},"Presence");function Ao(e){const[t,n]=l.useState(),o=l.useRef(null),r=l.useRef(e),c=l.useRef("none"),a=l.useRef(void 0),i=e?"mounted":"unmounted",[u,d]=Lo(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{u==="mounted"?(c.current=a.current??it(o.current),a.current=void 0):c.current="none"},[u]),Se(()=>{const h=o.current,f=r.current;if(f!==e){const v=c.current,y=it(h);e?(a.current=y,d("MOUNT")):y==="none"||h?.display==="none"?d("UNMOUNT"):d(f&&v!==y?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),Se(()=>{if(t){let h;const f=t.ownerDocument.defaultView??window,g=Ue(y=>{const m=it(o.current).includes(CSS.escape(y.animationName));if(y.target===t&&m&&(d("ANIMATION_END"),!r.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",h=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},"handleAnimationEnd"),v=Ue(y=>{y.target===t&&(c.current=it(o.current))},"handleAnimationStart");return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{f.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:l.useCallback(h=>{if(h){const f=getComputedStyle(h);o.current=f,a.current=it(f)}else o.current=null;n(h)},[])}}Ue(Ao,"usePresence");function Tn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Ue(Tn,"setRef");function Do(...e){const t=l.useRef(e);return t.current=e,l.useCallback(n=>{const o=t.current;let r=!1;const c=o.map(a=>{const i=Tn(a,n);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<c.length;a++){const i=c[a];typeof i=="function"?i():Tn(o[a],null)}}},[])}Ue(Do,"useStableComposedRefs");function it(e){return e?.animationName||"none"}Ue(it,"getAnimationName");function ko(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ue(ko,"getElementRef");var xi=Object.defineProperty,vi=(e,t)=>xi(e,"name",{value:t,configurable:!0}),Ss=Kt[" useEffectEvent ".trim().toString()],Ns=Kt[" useInsertionEffect ".trim().toString()];function Io(e){if(typeof Ss=="function")return Ss(e);const t=l.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Ns=="function"?Ns(()=>{t.current=e}):Se(()=>{t.current=e}),l.useMemo(()=>((...n)=>t.current?.(...n)),[])}vi(Io,"useEffectEvent");var bi=Object.defineProperty,Et=(e,t)=>bi(e,"name",{value:t,configurable:!0}),yi=Kt[" useInsertionEffect ".trim().toString()]||Se;function _n({prop:e,defaultProp:t,onChange:n=Et(()=>{},"onChange"),caller:o}){const[r,c,a]=Mo({defaultProp:t,onChange:n}),i=e!==void 0,u=i?e:r,d=l.useCallback(h=>{if(i){const f=$o(h)?h(e):h;f!==e&&a.current?.(f)}else c(h)},[i,e,c,a]);return[u,d]}Et(_n,"useControllableState");function Mo({defaultProp:e,onChange:t}){const[n,o]=l.useState(e),r=l.useRef(n),c=l.useRef(t);return yi(()=>{c.current=t},[t]),l.useEffect(()=>{r.current!==n&&(c.current?.(n),r.current=n)},[n,r]),[n,o,c]}Et(Mo,"useUncontrolledState");function $o(e){return typeof e=="function"}Et($o,"isFunction");var js=Symbol("RADIX:SYNC_STATE");function wi(e,t,n,o){const{prop:r,defaultProp:c,onChange:a,caller:i}=t,u=r!==void 0,d=Io(a),h=[{...n,state:c}];o&&h.push(o);const[f,g]=l.useReducer((m,w)=>{if(w.type===js)return{...m,state:w.state};const j=e(m,w);return u&&!Object.is(j.state,m.state)&&d(j.state),j},...h),v=f.state,y=l.useRef(v);l.useEffect(()=>{y.current!==v&&(y.current=v,u||d(v))},[v,y,u]);const b=l.useMemo(()=>r!==void 0?{...f,state:r}:f,[f,r]);return l.useEffect(()=>{u&&!Object.is(r,f.state)&&g({type:js,state:r})},[r,f.state,u]),[b,g]}Et(wi,"useControllableStateReducer");var Si=Object.defineProperty,Ni=(e,t)=>Si(e,"name",{value:t,configurable:!0});function Fo(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Ni(Fo,"usePrevious");var ji=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ci=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ot=new WeakMap,_t=new WeakMap,Ot={},fn=0,qo=function(e){return e&&(e.host||qo(e.parentNode))},Ei=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=qo(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ri=function(e,t,n,o){var r=Ei(t,Array.isArray(e)?e:[e]);Ot[n]||(Ot[n]=new WeakMap);var c=Ot[n],a=[],i=new Set,u=new Set(r),d=function(f){!f||i.has(f)||(i.add(f),d(f.parentNode))};r.forEach(d);var h=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(g){if(i.has(g))h(g);else try{var v=g.getAttribute(o),y=v!==null&&v!=="false",b=(ot.get(g)||0)+1,m=(c.get(g)||0)+1;ot.set(g,b),c.set(g,m),a.push(g),b===1&&y&&_t.set(g,!0),m===1&&g.setAttribute(n,"true"),y||g.setAttribute(o,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return h(t),i.clear(),fn++,function(){a.forEach(function(f){var g=ot.get(f)-1,v=c.get(f)-1;ot.set(f,g),c.set(f,v),g||(_t.has(f)||f.removeAttribute(o),_t.delete(f)),v||f.removeAttribute(n)}),fn--,fn||(ot=new WeakMap,ot=new WeakMap,_t=new WeakMap,Ot={})}},Pi=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Ci(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),Ri(o,r,n,"aria-hidden")):function(){return null}},Le=function(){return Le=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(t[c]=n[c])}return t},Le.apply(this,arguments)};function Uo(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Ti(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,c;o<r;o++)(c||!(o in t))&&(c||(c=Array.prototype.slice.call(t,0,o)),c[o]=t[o]);return e.concat(c||Array.prototype.slice.call(t))}var $t="right-scroll-bar-position",Ft="width-before-scroll-bar",_i="with-scroll-bars-hidden",Oi="--removed-body-scroll-bar-size";function pn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Li(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Ai=typeof window<"u"?l.useLayoutEffect:l.useEffect,Cs=new WeakMap;function Di(e,t){var n=Li(null,function(o){return e.forEach(function(r){return pn(r,o)})});return Ai(function(){var o=Cs.get(n);if(o){var r=new Set(o),c=new Set(e),a=n.current;r.forEach(function(i){c.has(i)||pn(i,null)}),c.forEach(function(i){r.has(i)||pn(i,a)})}Cs.set(n,e)},[e]),n}function ki(e){return e}function Ii(e,t){t===void 0&&(t=ki);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(c){var a=t(c,o);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(c){for(o=!0;n.length;){var a=n;n=[],a.forEach(c)}n={push:function(i){return c(i)},filter:function(){return n}}},assignMedium:function(c){o=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(c),a=n}var u=function(){var h=a;a=[],h.forEach(c)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(h){a.push(h),d()},filter:function(h){return a=a.filter(h),n}}}};return r}function Mi(e){e===void 0&&(e={});var t=Ii(null);return t.options=Le({async:!0,ssr:!1},e),t}var Ho=function(e){var t=e.sideCar,n=Uo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return l.createElement(o,Le({},n))};Ho.isSideCarExport=!0;function $i(e,t){return e.useMedium(t),Ho}var Bo=Mi(),mn=function(){},tn=l.forwardRef(function(e,t){var n=l.useRef(null),o=l.useState({onScrollCapture:mn,onWheelCapture:mn,onTouchMoveCapture:mn}),r=o[0],c=o[1],a=e.forwardProps,i=e.children,u=e.className,d=e.removeScrollBar,h=e.enabled,f=e.shards,g=e.sideCar,v=e.noRelative,y=e.noIsolation,b=e.inert,m=e.allowPinchZoom,w=e.as,j=w===void 0?"div":w,N=e.gapMode,S=Uo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=g,E=Di([n,t]),T=Le(Le({},S),r);return l.createElement(l.Fragment,null,h&&l.createElement(R,{sideCar:Bo,removeScrollBar:d,shards:f,noRelative:v,noIsolation:y,inert:b,setCallbacks:c,allowPinchZoom:!!m,lockRef:n,gapMode:N}),a?l.cloneElement(l.Children.only(i),Le(Le({},T),{ref:E})):l.createElement(j,Le({},T,{className:u,ref:E}),i))});tn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};tn.classNames={fullWidth:Ft,zeroRight:$t};var Fi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function qi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Fi();return t&&e.setAttribute("nonce",t),e}function Ui(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Bi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=qi())&&(Ui(t,n),Hi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Vi=function(){var e=Bi();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Vo=function(){var e=Vi(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},zi={left:0,top:0,right:0,gap:0},hn=function(e){return parseInt(e||"",10)||0},Ki=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[hn(n),hn(o),hn(r)]},Wi=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zi;var t=Ki(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Xi=Vo(),ft="data-scroll-locked",Gi=function(e,t,n,o){var r=e.left,c=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(_i,` {
|
|
3
|
+
overflow: hidden `).concat(o,`;
|
|
4
|
+
padding-right: `).concat(i,"px ").concat(o,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(ft,`] {
|
|
7
|
+
overflow: hidden `).concat(o,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(r,`px;
|
|
11
|
+
padding-top: `).concat(c,`px;
|
|
12
|
+
padding-right: `).concat(a,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(i,"px ").concat(o,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat($t,` {
|
|
20
|
+
right: `).concat(i,"px ").concat(o,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(Ft,` {
|
|
24
|
+
margin-right: `).concat(i,"px ").concat(o,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat($t," .").concat($t,` {
|
|
28
|
+
right: 0 `).concat(o,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(Ft," .").concat(Ft,` {
|
|
32
|
+
margin-right: 0 `).concat(o,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(ft,`] {
|
|
36
|
+
`).concat(Oi,": ").concat(i,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},Es=function(){var e=parseInt(document.body.getAttribute(ft)||"0",10);return isFinite(e)?e:0},Yi=function(){l.useEffect(function(){return document.body.setAttribute(ft,(Es()+1).toString()),function(){var e=Es()-1;e<=0?document.body.removeAttribute(ft):document.body.setAttribute(ft,e.toString())}},[])},Qi=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Yi();var c=l.useMemo(function(){return Wi(r)},[r]);return l.createElement(Xi,{styles:Gi(c,!t,r,n?"":"!important")})},On=!1;if(typeof window<"u")try{var Lt=Object.defineProperty({},"passive",{get:function(){return On=!0,!0}});window.addEventListener("test",Lt,Lt),window.removeEventListener("test",Lt,Lt)}catch{On=!1}var rt=On?{passive:!1}:!1,Zi=function(e){return e.tagName==="TEXTAREA"},zo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Zi(e)&&n[t]==="visible")},Ji=function(e){return zo(e,"overflowY")},el=function(e){return zo(e,"overflowX")},Rs=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=Ko(e,o);if(r){var c=Wo(e,o),a=c[1],i=c[2];if(a>i)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},tl=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},nl=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Ko=function(e,t){return e==="v"?Ji(t):el(t)},Wo=function(e,t){return e==="v"?tl(t):nl(t)},sl=function(e,t){return e==="h"&&t==="rtl"?-1:1},ol=function(e,t,n,o,r){var c=sl(e,window.getComputedStyle(t).direction),a=c*o,i=n.target,u=t.contains(i),d=!1,h=a>0,f=0,g=0;do{if(!i)break;var v=Wo(e,i),y=v[0],b=v[1],m=v[2],w=b-m-c*y;(y||w)&&Ko(e,i)&&(f+=w,g+=y);var j=i.parentNode;i=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(h&&Math.abs(f)<1||!h&&Math.abs(g)<1)&&(d=!0),d},At=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ps=function(e){return[e.deltaX,e.deltaY]},Ts=function(e){return e&&"current"in e?e.current:e},rl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cl=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},al=0,ct=[];function il(e){var t=l.useRef([]),n=l.useRef([0,0]),o=l.useRef(),r=l.useState(al++)[0],c=l.useState(Vo)[0],a=l.useRef(e);l.useEffect(function(){a.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var b=Ti([e.lockRef.current],(e.shards||[]).map(Ts),!0).filter(Boolean);return b.forEach(function(m){return m.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),b.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var i=l.useCallback(function(b,m){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!a.current.allowPinchZoom;var w=At(b),j=n.current,N="deltaX"in b?b.deltaX:j[0]-w[0],S="deltaY"in b?b.deltaY:j[1]-w[1],R,E=b.target,T=Math.abs(N)>Math.abs(S)?"h":"v";if("touches"in b&&T==="h"&&E.type==="range")return!1;var D=window.getSelection(),k=D&&D.anchorNode,I=k?k===E||k.contains(E):!1;if(I)return!1;var U=Rs(T,E);if(!U)return!0;if(U?R=T:(R=T==="v"?"h":"v",U=Rs(T,E)),!U)return!1;if(!o.current&&"changedTouches"in b&&(N||S)&&(o.current=R),!R)return!0;var p=o.current||R;return ol(p,m,b,p==="h"?N:S)},[]),u=l.useCallback(function(b){var m=b;if(!(!ct.length||ct[ct.length-1]!==c)){var w="deltaY"in m?Ps(m):At(m),j=t.current.filter(function(R){return R.name===m.type&&(R.target===m.target||m.target===R.shadowParent)&&rl(R.delta,w)})[0];if(j&&j.should){m.cancelable&&m.preventDefault();return}if(!j){var N=(a.current.shards||[]).map(Ts).filter(Boolean).filter(function(R){return R.contains(m.target)}),S=N.length>0?i(m,N[0]):!a.current.noIsolation;S&&m.cancelable&&m.preventDefault()}}},[]),d=l.useCallback(function(b,m,w,j){var N={name:b,delta:m,target:w,should:j,shadowParent:ll(w)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(S){return S!==N})},1)},[]),h=l.useCallback(function(b){n.current=At(b),o.current=void 0},[]),f=l.useCallback(function(b){d(b.type,Ps(b),b.target,i(b,e.lockRef.current))},[]),g=l.useCallback(function(b){d(b.type,At(b),b.target,i(b,e.lockRef.current))},[]);l.useEffect(function(){return ct.push(c),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:g}),document.addEventListener("wheel",u,rt),document.addEventListener("touchmove",u,rt),document.addEventListener("touchstart",h,rt),function(){ct=ct.filter(function(b){return b!==c}),document.removeEventListener("wheel",u,rt),document.removeEventListener("touchmove",u,rt),document.removeEventListener("touchstart",h,rt)}},[]);var v=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(c,{styles:cl(r)}):null,v?l.createElement(Qi,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ll(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ul=$i(Bo,il);var Xo=l.forwardRef(function(e,t){return l.createElement(tn,Le({},e,{ref:t,sideCar:ul}))});Xo.classNames=tn.classNames;var dl=Object.defineProperty,Q=(e,t)=>dl(e,"name",{value:t,configurable:!0}),fl=[" ","Enter","ArrowUp","ArrowDown"],pl=[" ","Enter"],mt="Select",[nn,Xn,ml]=Qs(mt),[nt,$z]=Ct(mt,[ml,Po]),Gn=Po(),[hl,Xe]=nt(mt),[gl,xl]=nt(mt);function Go(e){const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:c,value:a,defaultValue:i,onValueChange:u,dir:d,name:h,autoComplete:f,disabled:g,required:v,form:y,internal_do_not_use_render:b}=e,m=Gn(t),[w,j]=l.useState(null),[N,S]=l.useState(null),[R,E]=l.useState(!1),T=no(d),[D,k]=_n({prop:o,defaultProp:r??!1,onChange:c,caller:mt}),[I,U]=_n({prop:a,defaultProp:i,onChange:u,caller:mt}),p=l.useRef(null),x=l.useRef(I);l.useEffect(()=>{const z=y?w?.ownerDocument.getElementById(y):w?.form;if(z instanceof HTMLFormElement){const te=Q(()=>U(x.current),"reset");return z.addEventListener("reset",te),()=>z.removeEventListener("reset",te)}},[y,w,U]);const C=w?!!y||!!w.closest("form"):!0,[_,O]=l.useState(new Set),L=Un(),A=Array.from(_).map(z=>z.props.value).join(";"),q=l.useCallback(z=>{O(te=>new Set(te).add(z))},[]),$=l.useCallback(z=>{O(te=>{const G=new Set(te);return G.delete(z),G})},[]),V={required:v,trigger:w,onTriggerChange:j,valueNode:N,onValueNodeChange:S,valueNodeHasChildren:R,onValueNodeHasChildrenChange:E,contentId:L,value:I,onValueChange:U,open:D,onOpenChange:k,dir:T,triggerPointerDownPosRef:p,disabled:g,name:h,autoComplete:f,form:y,nativeOptions:_,nativeSelectKey:A,isFormControl:C};return s.jsx(li,{...m,children:s.jsx(hl,{scope:t,...V,children:s.jsx(nn.Provider,{scope:t,children:s.jsx(gl,{scope:t,onNativeOptionAdd:q,onNativeOptionRemove:$,children:nr(b)?b(V):n})})})})}Q(Go,"SelectProvider");var vl=Q(e=>{const{__scopeSelect:t,children:n,...o}=e;return s.jsx(Go,{__scopeSelect:t,...o,internal_do_not_use_render:({isFormControl:r})=>s.jsxs(s.Fragment,{children:[n,r?s.jsx(Hl,{__scopeSelect:t}):null]})})},"Select"),bl="SelectTrigger",Yo=l.forwardRef(Q(function(t,n){const{__scopeSelect:o,disabled:r=!1,...c}=t,a=Gn(o),i=Xe(bl,o),u=i.disabled||r,d=xe(n,i.onTriggerChange),h=Xn(o),f=l.useRef("touch"),[g,v,y]=Yn(m=>{const w=h().filter(S=>!S.disabled),j=w.find(S=>S.value===i.value),N=Qn(w,m,j);N!==void 0&&i.onValueChange(N.value)}),b=Q(m=>{u||(i.onOpenChange(!0),y()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})},"handleOpen");return s.jsx(ui,{asChild:!0,...a,children:s.jsx(Ne.button,{type:"button",role:"combobox","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":Rt(i.value)?"":void 0,...c,ref:d,onClick:me(c.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&b(m)}),onPointerDown:me(c.onPointerDown,m=>{f.current=m.pointerType;const w=m.target;w.hasPointerCapture(m.pointerId)&&w.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(b(m),m.preventDefault())}),onKeyDown:me(c.onKeyDown,m=>{const w=g.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&v(m.key),!(w&&m.key===" ")&&fl.includes(m.key)&&(b(),m.preventDefault())})})})},"SelectTrigger")),yl="SelectValue",wl=l.forwardRef(Q(function(t,n){const{__scopeSelect:o,className:r,style:c,children:a,placeholder:i="",...u}=t,d=Xe(yl,o),{onValueNodeHasChildrenChange:h}=d,f=a!==void 0,g=xe(n,d.onValueNodeChange);Se(()=>{h(f)},[h,f]);const v=Rt(d.value);return s.jsx(Ne.span,{...u,asChild:v?!1:u.asChild,ref:g,style:{pointerEvents:"none"},children:s.jsx(l.Fragment,{children:v?i:a},v?"placeholder":"value")})},"SelectValue")),Sl=l.forwardRef(Q(function(t,n){const{__scopeSelect:o,children:r,...c}=t;return s.jsx(Ne.span,{"aria-hidden":!0,...c,ref:n,children:r||"▼"})},"SelectIcon")),Nl="SelectPortal",[jl,Cl]=nt(Nl,{forceMount:void 0}),El=Q(e=>{const{__scopeSelect:t,forceMount:n,...o}=e;return s.jsx(jl,{scope:e.__scopeSelect,forceMount:n,children:s.jsx(mi,{asChild:!0,...o})})},"SelectPortal"),tt="SelectContent",Qo=l.forwardRef(Q(function(t,n){const o=Cl(tt,t.__scopeSelect),{forceMount:r=o.forceMount,...c}=t,a=Xe(tt,t.__scopeSelect),[i,u]=l.useState();return Se(()=>{u(new DocumentFragment)},[]),s.jsx(gi,{present:r||a.open,children:({present:d})=>d?s.jsx(Tl,{...c,ref:n}):s.jsx(Rl,{...c,fragment:i})})},"SelectContent")),Rl=l.forwardRef(Q(function(t,n){const{__scopeSelect:o,children:r,fragment:c}=t;return c?jt.createPortal(s.jsx(Zo,{scope:o,children:s.jsx(nn.Slot,{scope:o,children:s.jsx("div",{ref:n,children:r})})}),c):null},"SelectContentFragment")),Te=10,[Zo,sn]=nt(tt),Pl=pt("SelectContent.RemoveScroll"),Tl=l.forwardRef(Q(function(t,n){const{__scopeSelect:o}=t,{position:r="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:a,onPointerDownOutside:i,side:u,sideOffset:d,align:h,alignOffset:f,arrowPadding:g,collisionBoundary:v,collisionPadding:y,sticky:b,hideWhenDetached:m,avoidCollisions:w,...j}=t,N=Xe(tt,o),[S,R]=l.useState(null),[E,T]=l.useState(null),D=xe(n,R),[k,I]=l.useState(null),[U,p]=l.useState(null),x=Xn(o),[C,_]=l.useState(!1),O=l.useRef(!1);l.useEffect(()=>{if(S)return Pi(S)},[S]),Fn();const L=l.useCallback(F=>{const[K,...ne]=x().map(W=>W.ref.current),[M]=ne.slice(-1),X=document.activeElement;for(const W of F)if(W===X||(W?.scrollIntoView({block:"nearest"}),W===K&&E&&(E.scrollTop=0),W===M&&E&&(E.scrollTop=E.scrollHeight),W?.focus(),document.activeElement!==X))return},[x,E]),A=l.useCallback(()=>L([k,S]),[L,k,S]);l.useEffect(()=>{C&&A()},[C,A]);const{onOpenChange:q,triggerPointerDownPosRef:$}=N;l.useEffect(()=>{if(S){let F={x:0,y:0};const K=Q(M=>{F={x:Math.abs(Math.round(M.pageX)-($.current?.x??0)),y:Math.abs(Math.round(M.pageY)-($.current?.y??0))}},"handlePointerMove"),ne=Q(M=>{F.x<=10&&F.y<=10?M.preventDefault():M.composedPath().includes(S)||q(!1),document.removeEventListener("pointermove",K),$.current=null},"handlePointerUp");return $.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ne,{capture:!0})}}},[S,q,$]),l.useEffect(()=>{const F=Q(()=>q(!1),"close");return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[q]);const[V,z]=Yn(F=>{const K=x().filter(X=>!X.disabled),ne=K.find(X=>X.ref.current===document.activeElement),M=Qn(K,F,ne);M&&setTimeout(()=>M.ref.current?.focus())}),te=l.useCallback((F,K,ne)=>{const M=!O.current&&!ne;(N.value!==void 0&&N.value===K||M)&&(I(F),M&&(O.current=!0))},[N.value]),G=l.useCallback(()=>S?.focus(),[S]),re=l.useCallback((F,K,ne)=>{const M=!O.current&&!ne;(N.value!==void 0&&N.value===K||M)&&p(F)},[N.value]),Y=r==="popper"?_s:_l,ve=Y===_s?{side:u,sideOffset:d,align:h,alignOffset:f,arrowPadding:g,collisionBoundary:v,collisionPadding:y,sticky:b,hideWhenDetached:m,avoidCollisions:w}:{};return s.jsx(Zo,{scope:o,content:S,viewport:E,onViewportChange:T,itemRefCallback:te,selectedItem:k,onItemLeave:G,itemTextRefCallback:re,focusSelectedItem:A,selectedItemText:U,position:r,isPositioned:C,searchRef:V,children:s.jsx(Xo,{as:Pl,allowPinchZoom:!0,children:s.jsx(Bc,{asChild:!0,trapped:N.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:me(c,F=>{N.trigger?.focus({preventScroll:!0}),F.preventDefault()}),children:s.jsx(Mc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:s.jsx(Y,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:F=>F.preventDefault(),...j,...ve,onPlaced:()=>_(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:me(j.onKeyDown,F=>{const K=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!K&&F.key.length===1&&z(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let M=x().filter(X=>!X.disabled).map(X=>X.ref.current);if(["ArrowUp","End"].includes(F.key)&&(M=M.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const X=F.target,W=M.indexOf(X);M=M.slice(W+1)}setTimeout(()=>L(M)),F.preventDefault()}})})})})})})},"SelectContentImpl")),_l=l.forwardRef(Q(function(t,n){const{__scopeSelect:o,onPlaced:r,...c}=t,a=Xe(tt,o),i=sn(tt,o),[u,d]=l.useState(null),[h,f]=l.useState(null),g=xe(n,f),v=Xn(o),y=l.useRef(!1),b=l.useRef(!0),{viewport:m,selectedItem:w,selectedItemText:j,focusSelectedItem:N}=i,S=l.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&h&&m&&w&&j){const D=a.trigger.getBoundingClientRect(),k=h.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),U=j.getBoundingClientRect();if(a.dir!=="rtl"){const X=U.left-k.left,W=I.left-X,se=D.left-W,de=D.width+se,P=Math.max(de,k.width),H=window.innerWidth-Te,ee=bn(W,[Te,Math.max(Te,H-P)]);u.style.minWidth=de+"px",u.style.left=ee+"px"}else{const X=k.right-U.right,W=window.innerWidth-I.right-X,se=window.innerWidth-D.right-W,de=D.width+se,P=Math.max(de,k.width),H=window.innerWidth-Te,ee=bn(W,[Te,Math.max(Te,H-P)]);u.style.minWidth=de+"px",u.style.right=ee+"px"}const p=v(),x=window.innerHeight-Te*2,C=m.scrollHeight,_=window.getComputedStyle(h),O=parseInt(_.borderTopWidth,10),L=parseInt(_.paddingTop,10),A=parseInt(_.borderBottomWidth,10),q=parseInt(_.paddingBottom,10),$=O+L+C+q+A,V=Math.min(w.offsetHeight*5,$),z=window.getComputedStyle(m),te=parseInt(z.paddingTop,10),G=parseInt(z.paddingBottom,10),re=D.top+D.height/2-Te,Y=x-re,ve=w.offsetHeight/2,F=w.offsetTop+ve,K=O+L+F,ne=$-K;if(K<=re){const X=p.length>0&&w===p[p.length-1].ref.current;u.style.bottom="0px";const W=h.clientHeight-m.offsetTop-m.offsetHeight,se=Math.max(Y,ve+(X?G:0)+W+A),de=K+se;u.style.height=de+"px"}else{const X=p.length>0&&w===p[0].ref.current;u.style.top="0px";const se=Math.max(re,O+m.offsetTop+(X?te:0)+ve)+ne;u.style.height=se+"px",m.scrollTop=K-re+m.offsetTop}u.style.margin=`${Te}px 0`,u.style.minHeight=V+"px",u.style.maxHeight=x+"px",r?.(),requestAnimationFrame(()=>y.current=!0)}},[v,a.trigger,a.valueNode,u,h,m,w,j,a.dir,r]);Se(()=>S(),[S]);const[R,E]=l.useState();Se(()=>{h&&E(window.getComputedStyle(h).zIndex)},[h]);const T=l.useCallback(D=>{D&&b.current===!0&&(S(),N?.(),b.current=!1)},[S,N]);return s.jsx(Ol,{scope:o,contentWrapper:u,shouldExpandOnScrollRef:y,onScrollButtonChange:T,children:s.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:s.jsx(Ne.div,{...c,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})},"SelectItemAlignedPosition")),_s=l.forwardRef(Q(function(t,n){const{__scopeSelect:o,align:r="start",collisionPadding:c=Te,...a}=t,i=Gn(o);return s.jsx(di,{...i,...a,ref:n,align:r,collisionPadding:c,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[Ol,Ll]=nt(tt,{}),Os="SelectViewport",Al=l.forwardRef(Q(function(t,n){const{__scopeSelect:o,nonce:r,...c}=t,a=sn(Os,o),i=Ll(Os,o),u=xe(n,a.onViewportChange),d=l.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),s.jsx(nn.Slot,{scope:o,children:s.jsx(Ne.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:me(c.onScroll,h=>{const f=h.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:v}=i;if(v?.current&&g){const y=Math.abs(d.current-f.scrollTop);if(y>0){const b=window.innerHeight-Te*2,m=parseFloat(g.style.minHeight),w=parseFloat(g.style.height),j=Math.max(m,w);if(j<b){const N=j+y,S=Math.min(b,N),R=N-S;g.style.height=S+"px",g.style.bottom==="0px"&&(f.scrollTop=R>0?R:0,g.style.justifyContent="flex-end")}}}d.current=f.scrollTop})})})]})},"SelectViewport")),Dl="SelectGroup",[Fz,kl]=nt(Dl),Il="SelectLabel",Jo=l.forwardRef(Q(function(t,n){const{__scopeSelect:o,...r}=t,c=kl(Il,o);return s.jsx(Ne.div,{id:c.id,...r,ref:n})},"SelectLabel")),Ln="SelectItem",[Ml,er]=nt(Ln),tr=l.forwardRef(Q(function(t,n){const{__scopeSelect:o,value:r,disabled:c=!1,textValue:a,...i}=t,u=Xe(Ln,o),d=sn(Ln,o),h=u.value===r,[f,g]=l.useState(a??""),[v,y]=l.useState(!1),b=De(S=>d.itemRefCallback?.(S,r,c)),m=xe(n,b),w=Un(),j=l.useRef("touch"),N=Q(()=>{c||(u.onValueChange(r),u.onOpenChange(!1))},"handleSelect");return s.jsx(Ml,{scope:o,value:r,disabled:c,textId:w,isSelected:h,onItemTextChange:l.useCallback(S=>{g(R=>R||(S?.textContent??"").trim())},[]),children:s.jsx(nn.ItemSlot,{scope:o,value:r,disabled:c,textValue:f,children:s.jsx(Ne.div,{role:"option","aria-labelledby":w,"data-highlighted":v?"":void 0,"aria-selected":h&&v,"data-state":h?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...i,ref:m,onFocus:me(i.onFocus,()=>y(!0)),onBlur:me(i.onBlur,()=>y(!1)),onClick:me(i.onClick,()=>{j.current!=="mouse"&&N()}),onPointerUp:me(i.onPointerUp,()=>{j.current==="mouse"&&N()}),onPointerDown:me(i.onPointerDown,S=>{j.current=S.pointerType}),onPointerMove:me(i.onPointerMove,S=>{j.current=S.pointerType,c?d.onItemLeave?.():j.current==="mouse"&&S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:me(i.onPointerLeave,S=>{S.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:me(i.onKeyDown,S=>{c||S.target!==S.currentTarget||d.searchRef?.current!==""&&S.key===" "||(pl.includes(S.key)&&N(),S.key===" "&&S.preventDefault())})})})})},"SelectItem")),Dt="SelectItemText",$l=l.forwardRef(Q(function(t,n){const{__scopeSelect:o,className:r,style:c,...a}=t,i=Xe(Dt,o),u=sn(Dt,o),d=er(Dt,o),h=xl(Dt,o),[f,g]=l.useState(null),v=De(N=>u.itemTextRefCallback?.(N,d.value,d.disabled)),y=xe(n,g,d.onItemTextChange,v),b=f?.textContent,m=l.useMemo(()=>s.jsx("option",{value:d.value,disabled:d.disabled,children:b},d.value),[d.disabled,d.value,b]),{onNativeOptionAdd:w,onNativeOptionRemove:j}=h;return Se(()=>(w(m),()=>j(m)),[w,j,m]),s.jsxs(s.Fragment,{children:[s.jsx(Ne.span,{id:d.textId,...a,ref:y}),d.isSelected&&i.valueNode&&!i.valueNodeHasChildren&&!Rt(i.value)?jt.createPortal(a.children,i.valueNode):null]})},"SelectItemText")),Fl="SelectItemIndicator",ql=l.forwardRef(Q(function(t,n){const{__scopeSelect:o,...r}=t;return er(Fl,o).isSelected?s.jsx(Ne.span,{"aria-hidden":!0,...r,ref:n}):null},"SelectItemIndicator")),Ul="SelectBubbleInput",Hl=l.forwardRef(Q(function({__scopeSelect:t,...n},o){const r=Xe(Ul,t),{value:c,onValueChange:a,required:i,disabled:u,name:d,autoComplete:h,form:f}=r,{nativeOptions:g,nativeSelectKey:v}=r,y=l.useRef(null),b=xe(o,y),m=c??"",w=Fo(m),j=Array.from(g).some(N=>(N.props.value??"")==="");return l.useEffect(()=>{const N=y.current;if(!N)return;const S=window.HTMLSelectElement.prototype,E=Object.getOwnPropertyDescriptor(S,"value").set;if(w!==m&&E){const T=new Event("change",{bubbles:!0});E.call(N,m),N.dispatchEvent(T)}},[w,m]),s.jsxs(Ne.select,{"aria-hidden":!0,required:i,tabIndex:-1,name:d,autoComplete:h,disabled:u,form:f,onChange:N=>a(N.target.value),...n,style:{...ji,...n.style},ref:b,defaultValue:m,children:[Rt(c)&&!j?s.jsx("option",{value:""}):null,Array.from(g)]},v)},"SelectBubbleInput"));function nr(e){return typeof e=="function"}Q(nr,"isFunction");function Rt(e){return e===""||e===void 0}Q(Rt,"shouldShowPlaceholder");function Yn(e){const t=De(e),n=l.useRef(""),o=l.useRef(0),r=l.useCallback(a=>{const i=n.current+a;t(i),Q((function u(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>u(""),1e3))}),"updateSearch")(i)},[t]),c=l.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,c]}Q(Yn,"useTypeaheadSearch");function Qn(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let a=sr(e,Math.max(c,0));r.length===1&&(a=a.filter(d=>d!==n));const u=a.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}Q(Qn,"findNextItem");function sr(e,t){return e.map((n,o)=>e[(t+o)%e.length])}Q(sr,"wrapArray");const lt=vl,ut=wl,Qe=l.forwardRef(({className:e,children:t,...n},o)=>s.jsxs(Yo,{ref:o,className:ie("flex h-9 items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background","placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:[t,s.jsx(Sl,{asChild:!0,children:s.jsx(_r,{className:"h-4 w-4 opacity-50"})})]}));Qe.displayName=Yo.displayName;const Ze=l.forwardRef(({className:e,children:t,position:n="popper",...o},r)=>s.jsx(El,{children:s.jsx(Qo,{ref:r,className:ie("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o,children:s.jsx(Al,{className:ie("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Ze.displayName=Qo.displayName;const Bl=l.forwardRef(({className:e,...t},n)=>s.jsx(Jo,{ref:n,className:ie("px-2 py-1.5 text-sm font-semibold",e),...t}));Bl.displayName=Jo.displayName;const oe=l.forwardRef(({className:e,children:t,...n},o)=>s.jsxs(tr,{ref:o,className:ie("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(ql,{children:s.jsx(Pr,{className:"h-4 w-4"})})}),s.jsx($l,{children:t})]}));oe.displayName=tr.displayName;var gn={},Pe={};const Vl="Á",zl="á",Kl="Ă",Wl="ă",Xl="∾",Gl="∿",Yl="∾̳",Ql="Â",Zl="â",Jl="´",eu="А",tu="а",nu="Æ",su="æ",ou="",ru="𝔄",cu="𝔞",au="À",iu="à",lu="ℵ",uu="ℵ",du="Α",fu="α",pu="Ā",mu="ā",hu="⨿",gu="&",xu="&",vu="⩕",bu="⩓",yu="∧",wu="⩜",Su="⩘",Nu="⩚",ju="∠",Cu="⦤",Eu="∠",Ru="⦨",Pu="⦩",Tu="⦪",_u="⦫",Ou="⦬",Lu="⦭",Au="⦮",Du="⦯",ku="∡",Iu="∟",Mu="⊾",$u="⦝",Fu="∢",qu="Å",Uu="⍼",Hu="Ą",Bu="ą",Vu="𝔸",zu="𝕒",Ku="⩯",Wu="≈",Xu="⩰",Gu="≊",Yu="≋",Qu="'",Zu="",Ju="≈",ed="≊",td="Å",nd="å",sd="𝒜",od="𝒶",rd="≔",cd="*",ad="≈",id="≍",ld="Ã",ud="ã",dd="Ä",fd="ä",pd="∳",md="⨑",hd="≌",gd="϶",xd="‵",vd="∽",bd="⋍",yd="∖",wd="⫧",Sd="⊽",Nd="⌅",jd="⌆",Cd="⌅",Ed="⎵",Rd="⎶",Pd="≌",Td="Б",_d="б",Od="„",Ld="∵",Ad="∵",Dd="∵",kd="⦰",Id="϶",Md="ℬ",$d="ℬ",Fd="Β",qd="β",Ud="ℶ",Hd="≬",Bd="𝔅",Vd="𝔟",zd="⋂",Kd="◯",Wd="⋃",Xd="⨀",Gd="⨁",Yd="⨂",Qd="⨆",Zd="★",Jd="▽",ef="△",tf="⨄",nf="⋁",sf="⋀",of="⤍",rf="⧫",cf="▪",af="▴",lf="▾",uf="◂",df="▸",ff="␣",pf="▒",mf="░",hf="▓",gf="█",xf="=⃥",vf="≡⃥",bf="⫭",yf="⌐",wf="𝔹",Sf="𝕓",Nf="⊥",jf="⊥",Cf="⋈",Ef="⧉",Rf="┐",Pf="╕",Tf="╖",_f="╗",Of="┌",Lf="╒",Af="╓",Df="╔",kf="─",If="═",Mf="┬",$f="╤",Ff="╥",qf="╦",Uf="┴",Hf="╧",Bf="╨",Vf="╩",zf="⊟",Kf="⊞",Wf="⊠",Xf="┘",Gf="╛",Yf="╜",Qf="╝",Zf="└",Jf="╘",ep="╙",tp="╚",np="│",sp="║",op="┼",rp="╪",cp="╫",ap="╬",ip="┤",lp="╡",up="╢",dp="╣",fp="├",pp="╞",mp="╟",hp="╠",gp="‵",xp="˘",vp="˘",bp="¦",yp="𝒷",wp="ℬ",Sp="⁏",Np="∽",jp="⋍",Cp="⧅",Ep="\\",Rp="⟈",Pp="•",Tp="•",_p="≎",Op="⪮",Lp="≏",Ap="≎",Dp="≏",kp="Ć",Ip="ć",Mp="⩄",$p="⩉",Fp="⩋",qp="∩",Up="⋒",Hp="⩇",Bp="⩀",Vp="ⅅ",zp="∩︀",Kp="⁁",Wp="ˇ",Xp="ℭ",Gp="⩍",Yp="Č",Qp="č",Zp="Ç",Jp="ç",em="Ĉ",tm="ĉ",nm="∰",sm="⩌",om="⩐",rm="Ċ",cm="ċ",am="¸",im="¸",lm="⦲",um="¢",dm="·",fm="·",pm="𝔠",mm="ℭ",hm="Ч",gm="ч",xm="✓",vm="✓",bm="Χ",ym="χ",wm="ˆ",Sm="≗",Nm="↺",jm="↻",Cm="⊛",Em="⊚",Rm="⊝",Pm="⊙",Tm="®",_m="Ⓢ",Om="⊖",Lm="⊕",Am="⊗",Dm="○",km="⧃",Im="≗",Mm="⨐",$m="⫯",Fm="⧂",qm="∲",Um="”",Hm="’",Bm="♣",Vm="♣",zm=":",Km="∷",Wm="⩴",Xm="≔",Gm="≔",Ym=",",Qm="@",Zm="∁",Jm="∘",eh="∁",th="ℂ",nh="≅",sh="⩭",oh="≡",rh="∮",ch="∯",ah="∮",ih="𝕔",lh="ℂ",uh="∐",dh="∐",fh="©",ph="©",mh="℗",hh="∳",gh="↵",xh="✗",vh="⨯",bh="𝒞",yh="𝒸",wh="⫏",Sh="⫑",Nh="⫐",jh="⫒",Ch="⋯",Eh="⤸",Rh="⤵",Ph="⋞",Th="⋟",_h="↶",Oh="⤽",Lh="⩈",Ah="⩆",Dh="≍",kh="∪",Ih="⋓",Mh="⩊",$h="⊍",Fh="⩅",qh="∪︀",Uh="↷",Hh="⤼",Bh="⋞",Vh="⋟",zh="⋎",Kh="⋏",Wh="¤",Xh="↶",Gh="↷",Yh="⋎",Qh="⋏",Zh="∲",Jh="∱",eg="⌭",tg="†",ng="‡",sg="ℸ",og="↓",rg="↡",cg="⇓",ag="‐",ig="⫤",lg="⊣",ug="⤏",dg="˝",fg="Ď",pg="ď",mg="Д",hg="д",gg="‡",xg="⇊",vg="ⅅ",bg="ⅆ",yg="⤑",wg="⩷",Sg="°",Ng="∇",jg="Δ",Cg="δ",Eg="⦱",Rg="⥿",Pg="𝔇",Tg="𝔡",_g="⥥",Og="⇃",Lg="⇂",Ag="´",Dg="˙",kg="˝",Ig="`",Mg="˜",$g="⋄",Fg="⋄",qg="⋄",Ug="♦",Hg="♦",Bg="¨",Vg="ⅆ",zg="ϝ",Kg="⋲",Wg="÷",Xg="÷",Gg="⋇",Yg="⋇",Qg="Ђ",Zg="ђ",Jg="⌞",ex="⌍",tx="$",nx="𝔻",sx="𝕕",ox="¨",rx="˙",cx="⃜",ax="≐",ix="≑",lx="≐",ux="∸",dx="∔",fx="⊡",px="⌆",mx="∯",hx="¨",gx="⇓",xx="⇐",vx="⇔",bx="⫤",yx="⟸",wx="⟺",Sx="⟹",Nx="⇒",jx="⊨",Cx="⇑",Ex="⇕",Rx="∥",Px="⤓",Tx="↓",_x="↓",Ox="⇓",Lx="⇵",Ax="̑",Dx="⇊",kx="⇃",Ix="⇂",Mx="⥐",$x="⥞",Fx="⥖",qx="↽",Ux="⥟",Hx="⥗",Bx="⇁",Vx="↧",zx="⊤",Kx="⤐",Wx="⌟",Xx="⌌",Gx="𝒟",Yx="𝒹",Qx="Ѕ",Zx="ѕ",Jx="⧶",ev="Đ",tv="đ",nv="⋱",sv="▿",ov="▾",rv="⇵",cv="⥯",av="⦦",iv="Џ",lv="џ",uv="⟿",dv="É",fv="é",pv="⩮",mv="Ě",hv="ě",gv="Ê",xv="ê",vv="≖",bv="≕",yv="Э",wv="э",Sv="⩷",Nv="Ė",jv="ė",Cv="≑",Ev="ⅇ",Rv="≒",Pv="𝔈",Tv="𝔢",_v="⪚",Ov="È",Lv="è",Av="⪖",Dv="⪘",kv="⪙",Iv="∈",Mv="⏧",$v="ℓ",Fv="⪕",qv="⪗",Uv="Ē",Hv="ē",Bv="∅",Vv="∅",zv="◻",Kv="∅",Wv="▫",Xv=" ",Gv=" ",Yv=" ",Qv="Ŋ",Zv="ŋ",Jv=" ",eb="Ę",tb="ę",nb="𝔼",sb="𝕖",ob="⋕",rb="⧣",cb="⩱",ab="ε",ib="Ε",lb="ε",ub="ϵ",db="≖",fb="≕",pb="≂",mb="⪖",hb="⪕",gb="⩵",xb="=",vb="≂",bb="≟",yb="⇌",wb="≡",Sb="⩸",Nb="⧥",jb="⥱",Cb="≓",Eb="ℯ",Rb="ℰ",Pb="≐",Tb="⩳",_b="≂",Ob="Η",Lb="η",Ab="Ð",Db="ð",kb="Ë",Ib="ë",Mb="€",$b="!",Fb="∃",qb="∃",Ub="ℰ",Hb="ⅇ",Bb="ⅇ",Vb="≒",zb="Ф",Kb="ф",Wb="♀",Xb="ffi",Gb="ff",Yb="ffl",Qb="𝔉",Zb="𝔣",Jb="fi",ey="◼",ty="▪",ny="fj",sy="♭",oy="fl",ry="▱",cy="ƒ",ay="𝔽",iy="𝕗",ly="∀",uy="∀",dy="⋔",fy="⫙",py="ℱ",my="⨍",hy="½",gy="⅓",xy="¼",vy="⅕",by="⅙",yy="⅛",wy="⅔",Sy="⅖",Ny="¾",jy="⅗",Cy="⅜",Ey="⅘",Ry="⅚",Py="⅝",Ty="⅞",_y="⁄",Oy="⌢",Ly="𝒻",Ay="ℱ",Dy="ǵ",ky="Γ",Iy="γ",My="Ϝ",$y="ϝ",Fy="⪆",qy="Ğ",Uy="ğ",Hy="Ģ",By="Ĝ",Vy="ĝ",zy="Г",Ky="г",Wy="Ġ",Xy="ġ",Gy="≥",Yy="≧",Qy="⪌",Zy="⋛",Jy="≥",ew="≧",tw="⩾",nw="⪩",sw="⩾",ow="⪀",rw="⪂",cw="⪄",aw="⋛︀",iw="⪔",lw="𝔊",uw="𝔤",dw="≫",fw="⋙",pw="⋙",mw="ℷ",hw="Ѓ",gw="ѓ",xw="⪥",vw="≷",bw="⪒",yw="⪤",ww="⪊",Sw="⪊",Nw="⪈",jw="≩",Cw="⪈",Ew="≩",Rw="⋧",Pw="𝔾",Tw="𝕘",_w="`",Ow="≥",Lw="⋛",Aw="≧",Dw="⪢",kw="≷",Iw="⩾",Mw="≳",$w="𝒢",Fw="ℊ",qw="≳",Uw="⪎",Hw="⪐",Bw="⪧",Vw="⩺",zw=">",Kw=">",Ww="≫",Xw="⋗",Gw="⦕",Yw="⩼",Qw="⪆",Zw="⥸",Jw="⋗",eS="⋛",tS="⪌",nS="≷",sS="≳",oS="≩︀",rS="≩︀",cS="ˇ",aS=" ",iS="½",lS="ℋ",uS="Ъ",dS="ъ",fS="⥈",pS="↔",mS="⇔",hS="↭",gS="^",xS="ℏ",vS="Ĥ",bS="ĥ",yS="♥",wS="♥",SS="…",NS="⊹",jS="𝔥",CS="ℌ",ES="ℋ",RS="⤥",PS="⤦",TS="⇿",_S="∻",OS="↩",LS="↪",AS="𝕙",DS="ℍ",kS="―",IS="─",MS="𝒽",$S="ℋ",FS="ℏ",qS="Ħ",US="ħ",HS="≎",BS="≏",VS="⁃",zS="‐",KS="Í",WS="í",XS="",GS="Î",YS="î",QS="И",ZS="и",JS="İ",e0="Е",t0="е",n0="¡",s0="⇔",o0="𝔦",r0="ℑ",c0="Ì",a0="ì",i0="ⅈ",l0="⨌",u0="∭",d0="⧜",f0="℩",p0="IJ",m0="ij",h0="Ī",g0="ī",x0="ℑ",v0="ⅈ",b0="ℐ",y0="ℑ",w0="ı",S0="ℑ",N0="⊷",j0="Ƶ",C0="⇒",E0="℅",R0="∞",P0="⧝",T0="ı",_0="⊺",O0="∫",L0="∬",A0="ℤ",D0="∫",k0="⊺",I0="⋂",M0="⨗",$0="⨼",F0="",q0="",U0="Ё",H0="ё",B0="Į",V0="į",z0="𝕀",K0="𝕚",W0="Ι",X0="ι",G0="⨼",Y0="¿",Q0="𝒾",Z0="ℐ",J0="∈",eN="⋵",tN="⋹",nN="⋴",sN="⋳",oN="∈",rN="",cN="Ĩ",aN="ĩ",iN="І",lN="і",uN="Ï",dN="ï",fN="Ĵ",pN="ĵ",mN="Й",hN="й",gN="𝔍",xN="𝔧",vN="ȷ",bN="𝕁",yN="𝕛",wN="𝒥",SN="𝒿",NN="Ј",jN="ј",CN="Є",EN="є",RN="Κ",PN="κ",TN="ϰ",_N="Ķ",ON="ķ",LN="К",AN="к",DN="𝔎",kN="𝔨",IN="ĸ",MN="Х",$N="х",FN="Ќ",qN="ќ",UN="𝕂",HN="𝕜",BN="𝒦",VN="𝓀",zN="⇚",KN="Ĺ",WN="ĺ",XN="⦴",GN="ℒ",YN="Λ",QN="λ",ZN="⟨",JN="⟪",ej="⦑",tj="⟨",nj="⪅",sj="ℒ",oj="«",rj="⇤",cj="⤟",aj="←",ij="↞",lj="⇐",uj="⤝",dj="↩",fj="↫",pj="⤹",mj="⥳",hj="↢",gj="⤙",xj="⤛",vj="⪫",bj="⪭",yj="⪭︀",wj="⤌",Sj="⤎",Nj="❲",jj="{",Cj="[",Ej="⦋",Rj="⦏",Pj="⦍",Tj="Ľ",_j="ľ",Oj="Ļ",Lj="ļ",Aj="⌈",Dj="{",kj="Л",Ij="л",Mj="⤶",$j="“",Fj="„",qj="⥧",Uj="⥋",Hj="↲",Bj="≤",Vj="≦",zj="⟨",Kj="⇤",Wj="←",Xj="←",Gj="⇐",Yj="⇆",Qj="↢",Zj="⌈",Jj="⟦",eC="⥡",tC="⥙",nC="⇃",sC="⌊",oC="↽",rC="↼",cC="⇇",aC="↔",iC="↔",lC="⇔",uC="⇆",dC="⇋",fC="↭",pC="⥎",mC="↤",hC="⊣",gC="⥚",xC="⋋",vC="⧏",bC="⊲",yC="⊴",wC="⥑",SC="⥠",NC="⥘",jC="↿",CC="⥒",EC="↼",RC="⪋",PC="⋚",TC="≤",_C="≦",OC="⩽",LC="⪨",AC="⩽",DC="⩿",kC="⪁",IC="⪃",MC="⋚︀",$C="⪓",FC="⪅",qC="⋖",UC="⋚",HC="⪋",BC="⋚",VC="≦",zC="≶",KC="≶",WC="⪡",XC="≲",GC="⩽",YC="≲",QC="⥼",ZC="⌊",JC="𝔏",eE="𝔩",tE="≶",nE="⪑",sE="⥢",oE="↽",rE="↼",cE="⥪",aE="▄",iE="Љ",lE="љ",uE="⇇",dE="≪",fE="⋘",pE="⌞",mE="⇚",hE="⥫",gE="◺",xE="Ŀ",vE="ŀ",bE="⎰",yE="⎰",wE="⪉",SE="⪉",NE="⪇",jE="≨",CE="⪇",EE="≨",RE="⋦",PE="⟬",TE="⇽",_E="⟦",OE="⟵",LE="⟵",AE="⟸",DE="⟷",kE="⟷",IE="⟺",ME="⟼",$E="⟶",FE="⟶",qE="⟹",UE="↫",HE="↬",BE="⦅",VE="𝕃",zE="𝕝",KE="⨭",WE="⨴",XE="∗",GE="_",YE="↙",QE="↘",ZE="◊",JE="◊",eR="⧫",tR="(",nR="⦓",sR="⇆",oR="⌟",rR="⇋",cR="⥭",aR="",iR="⊿",lR="‹",uR="𝓁",dR="ℒ",fR="↰",pR="↰",mR="≲",hR="⪍",gR="⪏",xR="[",vR="‘",bR="‚",yR="Ł",wR="ł",SR="⪦",NR="⩹",jR="<",CR="<",ER="≪",RR="⋖",PR="⋋",TR="⋉",_R="⥶",OR="⩻",LR="◃",AR="⊴",DR="◂",kR="⦖",IR="⥊",MR="⥦",$R="≨︀",FR="≨︀",qR="¯",UR="♂",HR="✠",BR="✠",VR="↦",zR="↦",KR="↧",WR="↤",XR="↥",GR="▮",YR="⨩",QR="М",ZR="м",JR="—",e1="∺",t1="∡",n1=" ",s1="ℳ",o1="𝔐",r1="𝔪",c1="℧",a1="µ",i1="*",l1="⫰",u1="∣",d1="·",f1="⊟",p1="−",m1="∸",h1="⨪",g1="∓",x1="⫛",v1="…",b1="∓",y1="⊧",w1="𝕄",S1="𝕞",N1="∓",j1="𝓂",C1="ℳ",E1="∾",R1="Μ",P1="μ",T1="⊸",_1="⊸",O1="∇",L1="Ń",A1="ń",D1="∠⃒",k1="≉",I1="⩰̸",M1="≋̸",$1="ʼn",F1="≉",q1="♮",U1="ℕ",H1="♮",B1=" ",V1="≎̸",z1="≏̸",K1="⩃",W1="Ň",X1="ň",G1="Ņ",Y1="ņ",Q1="≇",Z1="⩭̸",J1="⩂",eP="Н",tP="н",nP="–",sP="⤤",oP="↗",rP="⇗",cP="↗",aP="≠",iP="≐̸",lP="",uP="",dP="",fP="",pP="≢",mP="⤨",hP="≂̸",gP="≫",xP="≪",vP=`
|
|
42
|
+
`,bP="∄",yP="∄",wP="𝔑",SP="𝔫",NP="≧̸",jP="≱",CP="≱",EP="≧̸",RP="⩾̸",PP="⩾̸",TP="⋙̸",_P="≵",OP="≫⃒",LP="≯",AP="≯",DP="≫̸",kP="↮",IP="⇎",MP="⫲",$P="∋",FP="⋼",qP="⋺",UP="∋",HP="Њ",BP="њ",VP="↚",zP="⇍",KP="‥",WP="≦̸",XP="≰",GP="↚",YP="⇍",QP="↮",ZP="⇎",JP="≰",eT="≦̸",tT="⩽̸",nT="⩽̸",sT="≮",oT="⋘̸",rT="≴",cT="≪⃒",aT="≮",iT="⋪",lT="⋬",uT="≪̸",dT="∤",fT="",pT=" ",mT="𝕟",hT="ℕ",gT="⫬",xT="¬",vT="≢",bT="≭",yT="∦",wT="∉",ST="≠",NT="≂̸",jT="∄",CT="≯",ET="≱",RT="≧̸",PT="≫̸",TT="≹",_T="⩾̸",OT="≵",LT="≎̸",AT="≏̸",DT="∉",kT="⋵̸",IT="⋹̸",MT="∉",$T="⋷",FT="⋶",qT="⧏̸",UT="⋪",HT="⋬",BT="≮",VT="≰",zT="≸",KT="≪̸",WT="⩽̸",XT="≴",GT="⪢̸",YT="⪡̸",QT="∌",ZT="∌",JT="⋾",e_="⋽",t_="⊀",n_="⪯̸",s_="⋠",o_="∌",r_="⧐̸",c_="⋫",a_="⋭",i_="⊏̸",l_="⋢",u_="⊐̸",d_="⋣",f_="⊂⃒",p_="⊈",m_="⊁",h_="⪰̸",g_="⋡",x_="≿̸",v_="⊃⃒",b_="⊉",y_="≁",w_="≄",S_="≇",N_="≉",j_="∤",C_="∦",E_="∦",R_="⫽⃥",P_="∂̸",T_="⨔",__="⊀",O_="⋠",L_="⊀",A_="⪯̸",D_="⪯̸",k_="⤳̸",I_="↛",M_="⇏",$_="↝̸",F_="↛",q_="⇏",U_="⋫",H_="⋭",B_="⊁",V_="⋡",z_="⪰̸",K_="𝒩",W_="𝓃",X_="∤",G_="∦",Y_="≁",Q_="≄",Z_="≄",J_="∤",eO="∦",tO="⋢",nO="⋣",sO="⊄",oO="⫅̸",rO="⊈",cO="⊂⃒",aO="⊈",iO="⫅̸",lO="⊁",uO="⪰̸",dO="⊅",fO="⫆̸",pO="⊉",mO="⊃⃒",hO="⊉",gO="⫆̸",xO="≹",vO="Ñ",bO="ñ",yO="≸",wO="⋪",SO="⋬",NO="⋫",jO="⋭",CO="Ν",EO="ν",RO="#",PO="№",TO=" ",_O="≍⃒",OO="⊬",LO="⊭",AO="⊮",DO="⊯",kO="≥⃒",IO=">⃒",MO="⤄",$O="⧞",FO="⤂",qO="≤⃒",UO="<⃒",HO="⊴⃒",BO="⤃",VO="⊵⃒",zO="∼⃒",KO="⤣",WO="↖",XO="⇖",GO="↖",YO="⤧",QO="Ó",ZO="ó",JO="⊛",eL="Ô",tL="ô",nL="⊚",sL="О",oL="о",rL="⊝",cL="Ő",aL="ő",iL="⨸",lL="⊙",uL="⦼",dL="Œ",fL="œ",pL="⦿",mL="𝔒",hL="𝔬",gL="˛",xL="Ò",vL="ò",bL="⧁",yL="⦵",wL="Ω",SL="∮",NL="↺",jL="⦾",CL="⦻",EL="‾",RL="⧀",PL="Ō",TL="ō",_L="Ω",OL="ω",LL="Ο",AL="ο",DL="⦶",kL="⊖",IL="𝕆",ML="𝕠",$L="⦷",FL="“",qL="‘",UL="⦹",HL="⊕",BL="↻",VL="⩔",zL="∨",KL="⩝",WL="ℴ",XL="ℴ",GL="ª",YL="º",QL="⊶",ZL="⩖",JL="⩗",eA="⩛",tA="Ⓢ",nA="𝒪",sA="ℴ",oA="Ø",rA="ø",cA="⊘",aA="Õ",iA="õ",lA="⨶",uA="⨷",dA="⊗",fA="Ö",pA="ö",mA="⌽",hA="‾",gA="⏞",xA="⎴",vA="⏜",bA="¶",yA="∥",wA="∥",SA="⫳",NA="⫽",jA="∂",CA="∂",EA="П",RA="п",PA="%",TA=".",_A="‰",OA="⊥",LA="‱",AA="𝔓",DA="𝔭",kA="Φ",IA="φ",MA="ϕ",$A="ℳ",FA="☎",qA="Π",UA="π",HA="⋔",BA="ϖ",VA="ℏ",zA="ℎ",KA="ℏ",WA="⨣",XA="⊞",GA="⨢",YA="+",QA="∔",ZA="⨥",JA="⩲",eD="±",tD="±",nD="⨦",sD="⨧",oD="±",rD="ℌ",cD="⨕",aD="𝕡",iD="ℙ",lD="£",uD="⪷",dD="⪻",fD="≺",pD="≼",mD="⪷",hD="≺",gD="≼",xD="≺",vD="⪯",bD="≼",yD="≾",wD="⪯",SD="⪹",ND="⪵",jD="⋨",CD="⪯",ED="⪳",RD="≾",PD="′",TD="″",_D="ℙ",OD="⪹",LD="⪵",AD="⋨",DD="∏",kD="∏",ID="⌮",MD="⌒",$D="⌓",FD="∝",qD="∝",UD="∷",HD="∝",BD="≾",VD="⊰",zD="𝒫",KD="𝓅",WD="Ψ",XD="ψ",GD=" ",YD="𝔔",QD="𝔮",ZD="⨌",JD="𝕢",ek="ℚ",tk="⁗",nk="𝒬",sk="𝓆",ok="ℍ",rk="⨖",ck="?",ak="≟",ik='"',lk='"',uk="⇛",dk="∽̱",fk="Ŕ",pk="ŕ",mk="√",hk="⦳",gk="⟩",xk="⟫",vk="⦒",bk="⦥",yk="⟩",wk="»",Sk="⥵",Nk="⇥",jk="⤠",Ck="⤳",Ek="→",Rk="↠",Pk="⇒",Tk="⤞",_k="↪",Ok="↬",Lk="⥅",Ak="⥴",Dk="⤖",kk="↣",Ik="↝",Mk="⤚",$k="⤜",Fk="∶",qk="ℚ",Uk="⤍",Hk="⤏",Bk="⤐",Vk="❳",zk="}",Kk="]",Wk="⦌",Xk="⦎",Gk="⦐",Yk="Ř",Qk="ř",Zk="Ŗ",Jk="ŗ",eI="⌉",tI="}",nI="Р",sI="р",oI="⤷",rI="⥩",cI="”",aI="”",iI="↳",lI="ℜ",uI="ℛ",dI="ℜ",fI="ℝ",pI="ℜ",mI="▭",hI="®",gI="®",xI="∋",vI="⇋",bI="⥯",yI="⥽",wI="⌋",SI="𝔯",NI="ℜ",jI="⥤",CI="⇁",EI="⇀",RI="⥬",PI="Ρ",TI="ρ",_I="ϱ",OI="⟩",LI="⇥",AI="→",DI="→",kI="⇒",II="⇄",MI="↣",$I="⌉",FI="⟧",qI="⥝",UI="⥕",HI="⇂",BI="⌋",VI="⇁",zI="⇀",KI="⇄",WI="⇌",XI="⇉",GI="↝",YI="↦",QI="⊢",ZI="⥛",JI="⋌",e2="⧐",t2="⊳",n2="⊵",s2="⥏",o2="⥜",r2="⥔",c2="↾",a2="⥓",i2="⇀",l2="˚",u2="≓",d2="⇄",f2="⇌",p2="",m2="⎱",h2="⎱",g2="⫮",x2="⟭",v2="⇾",b2="⟧",y2="⦆",w2="𝕣",S2="ℝ",N2="⨮",j2="⨵",C2="⥰",E2=")",R2="⦔",P2="⨒",T2="⇉",_2="⇛",O2="›",L2="𝓇",A2="ℛ",D2="↱",k2="↱",I2="]",M2="’",$2="’",F2="⋌",q2="⋊",U2="▹",H2="⊵",B2="▸",V2="⧎",z2="⧴",K2="⥨",W2="℞",X2="Ś",G2="ś",Y2="‚",Q2="⪸",Z2="Š",J2="š",eM="⪼",tM="≻",nM="≽",sM="⪰",oM="⪴",rM="Ş",cM="ş",aM="Ŝ",iM="ŝ",lM="⪺",uM="⪶",dM="⋩",fM="⨓",pM="≿",mM="С",hM="с",gM="⊡",xM="⋅",vM="⩦",bM="⤥",yM="↘",wM="⇘",SM="↘",NM="§",jM=";",CM="⤩",EM="∖",RM="∖",PM="✶",TM="𝔖",_M="𝔰",OM="⌢",LM="♯",AM="Щ",DM="щ",kM="Ш",IM="ш",MM="↓",$M="←",FM="∣",qM="∥",UM="→",HM="↑",BM="",VM="Σ",zM="σ",KM="ς",WM="ς",XM="∼",GM="⩪",YM="≃",QM="≃",ZM="⪞",JM="⪠",e$="⪝",t$="⪟",n$="≆",s$="⨤",o$="⥲",r$="←",c$="∘",a$="∖",i$="⨳",l$="⧤",u$="∣",d$="⌣",f$="⪪",p$="⪬",m$="⪬︀",h$="Ь",g$="ь",x$="⌿",v$="⧄",b$="/",y$="𝕊",w$="𝕤",S$="♠",N$="♠",j$="∥",C$="⊓",E$="⊓︀",R$="⊔",P$="⊔︀",T$="√",_$="⊏",O$="⊑",L$="⊏",A$="⊑",D$="⊐",k$="⊒",I$="⊐",M$="⊒",$$="□",F$="□",q$="⊓",U$="⊏",H$="⊑",B$="⊐",V$="⊒",z$="⊔",K$="▪",W$="□",X$="▪",G$="→",Y$="𝒮",Q$="𝓈",Z$="∖",J$="⌣",eF="⋆",tF="⋆",nF="☆",sF="★",oF="ϵ",rF="ϕ",cF="¯",aF="⊂",iF="⋐",lF="⪽",uF="⫅",dF="⊆",fF="⫃",pF="⫁",mF="⫋",hF="⊊",gF="⪿",xF="⥹",vF="⊂",bF="⋐",yF="⊆",wF="⫅",SF="⊆",NF="⊊",jF="⫋",CF="⫇",EF="⫕",RF="⫓",PF="⪸",TF="≻",_F="≽",OF="≻",LF="⪰",AF="≽",DF="≿",kF="⪰",IF="⪺",MF="⪶",$F="⋩",FF="≿",qF="∋",UF="∑",HF="∑",BF="♪",VF="¹",zF="²",KF="³",WF="⊃",XF="⋑",GF="⪾",YF="⫘",QF="⫆",ZF="⊇",JF="⫄",eq="⊃",tq="⊇",nq="⟉",sq="⫗",oq="⥻",rq="⫂",cq="⫌",aq="⊋",iq="⫀",lq="⊃",uq="⋑",dq="⊇",fq="⫆",pq="⊋",mq="⫌",hq="⫈",gq="⫔",xq="⫖",vq="⤦",bq="↙",yq="⇙",wq="↙",Sq="⤪",Nq="ß",jq=" ",Cq="⌖",Eq="Τ",Rq="τ",Pq="⎴",Tq="Ť",_q="ť",Oq="Ţ",Lq="ţ",Aq="Т",Dq="т",kq="⃛",Iq="⌕",Mq="𝔗",$q="𝔱",Fq="∴",qq="∴",Uq="∴",Hq="Θ",Bq="θ",Vq="ϑ",zq="ϑ",Kq="≈",Wq="∼",Xq=" ",Gq=" ",Yq=" ",Qq="≈",Zq="∼",Jq="Þ",eU="þ",tU="˜",nU="∼",sU="≃",oU="≅",rU="≈",cU="⨱",aU="⊠",iU="×",lU="⨰",uU="∭",dU="⤨",fU="⌶",pU="⫱",mU="⊤",hU="𝕋",gU="𝕥",xU="⫚",vU="⤩",bU="‴",yU="™",wU="™",SU="▵",NU="▿",jU="◃",CU="⊴",EU="≜",RU="▹",PU="⊵",TU="◬",_U="≜",OU="⨺",LU="⃛",AU="⨹",DU="⧍",kU="⨻",IU="⏢",MU="𝒯",$U="𝓉",FU="Ц",qU="ц",UU="Ћ",HU="ћ",BU="Ŧ",VU="ŧ",zU="≬",KU="↞",WU="↠",XU="Ú",GU="ú",YU="↑",QU="↟",ZU="⇑",JU="⥉",e3="Ў",t3="ў",n3="Ŭ",s3="ŭ",o3="Û",r3="û",c3="У",a3="у",i3="⇅",l3="Ű",u3="ű",d3="⥮",f3="⥾",p3="𝔘",m3="𝔲",h3="Ù",g3="ù",x3="⥣",v3="↿",b3="↾",y3="▀",w3="⌜",S3="⌜",N3="⌏",j3="◸",C3="Ū",E3="ū",R3="¨",P3="_",T3="⏟",_3="⎵",O3="⏝",L3="⋃",A3="⊎",D3="Ų",k3="ų",I3="𝕌",M3="𝕦",$3="⤒",F3="↑",q3="↑",U3="⇑",H3="⇅",B3="↕",V3="↕",z3="⇕",K3="⥮",W3="↿",X3="↾",G3="⊎",Y3="↖",Q3="↗",Z3="υ",J3="ϒ",eH="ϒ",tH="Υ",nH="υ",sH="↥",oH="⊥",rH="⇈",cH="⌝",aH="⌝",iH="⌎",lH="Ů",uH="ů",dH="◹",fH="𝒰",pH="𝓊",mH="⋰",hH="Ũ",gH="ũ",xH="▵",vH="▴",bH="⇈",yH="Ü",wH="ü",SH="⦧",NH="⦜",jH="ϵ",CH="ϰ",EH="∅",RH="ϕ",PH="ϖ",TH="∝",_H="↕",OH="⇕",LH="ϱ",AH="ς",DH="⊊︀",kH="⫋︀",IH="⊋︀",MH="⫌︀",$H="ϑ",FH="⊲",qH="⊳",UH="⫨",HH="⫫",BH="⫩",VH="В",zH="в",KH="⊢",WH="⊨",XH="⊩",GH="⊫",YH="⫦",QH="⊻",ZH="∨",JH="⋁",eB="≚",tB="⋮",nB="|",sB="‖",oB="|",rB="‖",cB="∣",aB="|",iB="❘",lB="≀",uB=" ",dB="𝔙",fB="𝔳",pB="⊲",mB="⊂⃒",hB="⊃⃒",gB="𝕍",xB="𝕧",vB="∝",bB="⊳",yB="𝒱",wB="𝓋",SB="⫋︀",NB="⊊︀",jB="⫌︀",CB="⊋︀",EB="⊪",RB="⦚",PB="Ŵ",TB="ŵ",_B="⩟",OB="∧",LB="⋀",AB="≙",DB="℘",kB="𝔚",IB="𝔴",MB="𝕎",$B="𝕨",FB="℘",qB="≀",UB="≀",HB="𝒲",BB="𝓌",VB="⋂",zB="◯",KB="⋃",WB="▽",XB="𝔛",GB="𝔵",YB="⟷",QB="⟺",ZB="Ξ",JB="ξ",e5="⟵",t5="⟸",n5="⟼",s5="⋻",o5="⨀",r5="𝕏",c5="𝕩",a5="⨁",i5="⨂",l5="⟶",u5="⟹",d5="𝒳",f5="𝓍",p5="⨆",m5="⨄",h5="△",g5="⋁",x5="⋀",v5="Ý",b5="ý",y5="Я",w5="я",S5="Ŷ",N5="ŷ",j5="Ы",C5="ы",E5="¥",R5="𝔜",P5="𝔶",T5="Ї",_5="ї",O5="𝕐",L5="𝕪",A5="𝒴",D5="𝓎",k5="Ю",I5="ю",M5="ÿ",$5="Ÿ",F5="Ź",q5="ź",U5="Ž",H5="ž",B5="З",V5="з",z5="Ż",K5="ż",W5="ℨ",X5="",G5="Ζ",Y5="ζ",Q5="𝔷",Z5="ℨ",J5="Ж",eV="ж",tV="⇝",nV="𝕫",sV="ℤ",oV="𝒵",rV="𝓏",cV="",aV="",or={Aacute:Vl,aacute:zl,Abreve:Kl,abreve:Wl,ac:Xl,acd:Gl,acE:Yl,Acirc:Ql,acirc:Zl,acute:Jl,Acy:eu,acy:tu,AElig:nu,aelig:su,af:ou,Afr:ru,afr:cu,Agrave:au,agrave:iu,alefsym:lu,aleph:uu,Alpha:du,alpha:fu,Amacr:pu,amacr:mu,amalg:hu,amp:gu,AMP:xu,andand:vu,And:bu,and:yu,andd:wu,andslope:Su,andv:Nu,ang:ju,ange:Cu,angle:Eu,angmsdaa:Ru,angmsdab:Pu,angmsdac:Tu,angmsdad:_u,angmsdae:Ou,angmsdaf:Lu,angmsdag:Au,angmsdah:Du,angmsd:ku,angrt:Iu,angrtvb:Mu,angrtvbd:$u,angsph:Fu,angst:qu,angzarr:Uu,Aogon:Hu,aogon:Bu,Aopf:Vu,aopf:zu,apacir:Ku,ap:Wu,apE:Xu,ape:Gu,apid:Yu,apos:Qu,ApplyFunction:Zu,approx:Ju,approxeq:ed,Aring:td,aring:nd,Ascr:sd,ascr:od,Assign:rd,ast:cd,asymp:ad,asympeq:id,Atilde:ld,atilde:ud,Auml:dd,auml:fd,awconint:pd,awint:md,backcong:hd,backepsilon:gd,backprime:xd,backsim:vd,backsimeq:bd,Backslash:yd,Barv:wd,barvee:Sd,barwed:Nd,Barwed:jd,barwedge:Cd,bbrk:Ed,bbrktbrk:Rd,bcong:Pd,Bcy:Td,bcy:_d,bdquo:Od,becaus:Ld,because:Ad,Because:Dd,bemptyv:kd,bepsi:Id,bernou:Md,Bernoullis:$d,Beta:Fd,beta:qd,beth:Ud,between:Hd,Bfr:Bd,bfr:Vd,bigcap:zd,bigcirc:Kd,bigcup:Wd,bigodot:Xd,bigoplus:Gd,bigotimes:Yd,bigsqcup:Qd,bigstar:Zd,bigtriangledown:Jd,bigtriangleup:ef,biguplus:tf,bigvee:nf,bigwedge:sf,bkarow:of,blacklozenge:rf,blacksquare:cf,blacktriangle:af,blacktriangledown:lf,blacktriangleleft:uf,blacktriangleright:df,blank:ff,blk12:pf,blk14:mf,blk34:hf,block:gf,bne:xf,bnequiv:vf,bNot:bf,bnot:yf,Bopf:wf,bopf:Sf,bot:Nf,bottom:jf,bowtie:Cf,boxbox:Ef,boxdl:Rf,boxdL:Pf,boxDl:Tf,boxDL:_f,boxdr:Of,boxdR:Lf,boxDr:Af,boxDR:Df,boxh:kf,boxH:If,boxhd:Mf,boxHd:$f,boxhD:Ff,boxHD:qf,boxhu:Uf,boxHu:Hf,boxhU:Bf,boxHU:Vf,boxminus:zf,boxplus:Kf,boxtimes:Wf,boxul:Xf,boxuL:Gf,boxUl:Yf,boxUL:Qf,boxur:Zf,boxuR:Jf,boxUr:ep,boxUR:tp,boxv:np,boxV:sp,boxvh:op,boxvH:rp,boxVh:cp,boxVH:ap,boxvl:ip,boxvL:lp,boxVl:up,boxVL:dp,boxvr:fp,boxvR:pp,boxVr:mp,boxVR:hp,bprime:gp,breve:xp,Breve:vp,brvbar:bp,bscr:yp,Bscr:wp,bsemi:Sp,bsim:Np,bsime:jp,bsolb:Cp,bsol:Ep,bsolhsub:Rp,bull:Pp,bullet:Tp,bump:_p,bumpE:Op,bumpe:Lp,Bumpeq:Ap,bumpeq:Dp,Cacute:kp,cacute:Ip,capand:Mp,capbrcup:$p,capcap:Fp,cap:qp,Cap:Up,capcup:Hp,capdot:Bp,CapitalDifferentialD:Vp,caps:zp,caret:Kp,caron:Wp,Cayleys:Xp,ccaps:Gp,Ccaron:Yp,ccaron:Qp,Ccedil:Zp,ccedil:Jp,Ccirc:em,ccirc:tm,Cconint:nm,ccups:sm,ccupssm:om,Cdot:rm,cdot:cm,cedil:am,Cedilla:im,cemptyv:lm,cent:um,centerdot:dm,CenterDot:fm,cfr:pm,Cfr:mm,CHcy:hm,chcy:gm,check:xm,checkmark:vm,Chi:bm,chi:ym,circ:wm,circeq:Sm,circlearrowleft:Nm,circlearrowright:jm,circledast:Cm,circledcirc:Em,circleddash:Rm,CircleDot:Pm,circledR:Tm,circledS:_m,CircleMinus:Om,CirclePlus:Lm,CircleTimes:Am,cir:Dm,cirE:km,cire:Im,cirfnint:Mm,cirmid:$m,cirscir:Fm,ClockwiseContourIntegral:qm,CloseCurlyDoubleQuote:Um,CloseCurlyQuote:Hm,clubs:Bm,clubsuit:Vm,colon:zm,Colon:Km,Colone:Wm,colone:Xm,coloneq:Gm,comma:Ym,commat:Qm,comp:Zm,compfn:Jm,complement:eh,complexes:th,cong:nh,congdot:sh,Congruent:oh,conint:rh,Conint:ch,ContourIntegral:ah,copf:ih,Copf:lh,coprod:uh,Coproduct:dh,copy:fh,COPY:ph,copysr:mh,CounterClockwiseContourIntegral:hh,crarr:gh,cross:xh,Cross:vh,Cscr:bh,cscr:yh,csub:wh,csube:Sh,csup:Nh,csupe:jh,ctdot:Ch,cudarrl:Eh,cudarrr:Rh,cuepr:Ph,cuesc:Th,cularr:_h,cularrp:Oh,cupbrcap:Lh,cupcap:Ah,CupCap:Dh,cup:kh,Cup:Ih,cupcup:Mh,cupdot:$h,cupor:Fh,cups:qh,curarr:Uh,curarrm:Hh,curlyeqprec:Bh,curlyeqsucc:Vh,curlyvee:zh,curlywedge:Kh,curren:Wh,curvearrowleft:Xh,curvearrowright:Gh,cuvee:Yh,cuwed:Qh,cwconint:Zh,cwint:Jh,cylcty:eg,dagger:tg,Dagger:ng,daleth:sg,darr:og,Darr:rg,dArr:cg,dash:ag,Dashv:ig,dashv:lg,dbkarow:ug,dblac:dg,Dcaron:fg,dcaron:pg,Dcy:mg,dcy:hg,ddagger:gg,ddarr:xg,DD:vg,dd:bg,DDotrahd:yg,ddotseq:wg,deg:Sg,Del:Ng,Delta:jg,delta:Cg,demptyv:Eg,dfisht:Rg,Dfr:Pg,dfr:Tg,dHar:_g,dharl:Og,dharr:Lg,DiacriticalAcute:Ag,DiacriticalDot:Dg,DiacriticalDoubleAcute:kg,DiacriticalGrave:Ig,DiacriticalTilde:Mg,diam:$g,diamond:Fg,Diamond:qg,diamondsuit:Ug,diams:Hg,die:Bg,DifferentialD:Vg,digamma:zg,disin:Kg,div:Wg,divide:Xg,divideontimes:Gg,divonx:Yg,DJcy:Qg,djcy:Zg,dlcorn:Jg,dlcrop:ex,dollar:tx,Dopf:nx,dopf:sx,Dot:ox,dot:rx,DotDot:cx,doteq:ax,doteqdot:ix,DotEqual:lx,dotminus:ux,dotplus:dx,dotsquare:fx,doublebarwedge:px,DoubleContourIntegral:mx,DoubleDot:hx,DoubleDownArrow:gx,DoubleLeftArrow:xx,DoubleLeftRightArrow:vx,DoubleLeftTee:bx,DoubleLongLeftArrow:yx,DoubleLongLeftRightArrow:wx,DoubleLongRightArrow:Sx,DoubleRightArrow:Nx,DoubleRightTee:jx,DoubleUpArrow:Cx,DoubleUpDownArrow:Ex,DoubleVerticalBar:Rx,DownArrowBar:Px,downarrow:Tx,DownArrow:_x,Downarrow:Ox,DownArrowUpArrow:Lx,DownBreve:Ax,downdownarrows:Dx,downharpoonleft:kx,downharpoonright:Ix,DownLeftRightVector:Mx,DownLeftTeeVector:$x,DownLeftVectorBar:Fx,DownLeftVector:qx,DownRightTeeVector:Ux,DownRightVectorBar:Hx,DownRightVector:Bx,DownTeeArrow:Vx,DownTee:zx,drbkarow:Kx,drcorn:Wx,drcrop:Xx,Dscr:Gx,dscr:Yx,DScy:Qx,dscy:Zx,dsol:Jx,Dstrok:ev,dstrok:tv,dtdot:nv,dtri:sv,dtrif:ov,duarr:rv,duhar:cv,dwangle:av,DZcy:iv,dzcy:lv,dzigrarr:uv,Eacute:dv,eacute:fv,easter:pv,Ecaron:mv,ecaron:hv,Ecirc:gv,ecirc:xv,ecir:vv,ecolon:bv,Ecy:yv,ecy:wv,eDDot:Sv,Edot:Nv,edot:jv,eDot:Cv,ee:Ev,efDot:Rv,Efr:Pv,efr:Tv,eg:_v,Egrave:Ov,egrave:Lv,egs:Av,egsdot:Dv,el:kv,Element:Iv,elinters:Mv,ell:$v,els:Fv,elsdot:qv,Emacr:Uv,emacr:Hv,empty:Bv,emptyset:Vv,EmptySmallSquare:zv,emptyv:Kv,EmptyVerySmallSquare:Wv,emsp13:Xv,emsp14:Gv,emsp:Yv,ENG:Qv,eng:Zv,ensp:Jv,Eogon:eb,eogon:tb,Eopf:nb,eopf:sb,epar:ob,eparsl:rb,eplus:cb,epsi:ab,Epsilon:ib,epsilon:lb,epsiv:ub,eqcirc:db,eqcolon:fb,eqsim:pb,eqslantgtr:mb,eqslantless:hb,Equal:gb,equals:xb,EqualTilde:vb,equest:bb,Equilibrium:yb,equiv:wb,equivDD:Sb,eqvparsl:Nb,erarr:jb,erDot:Cb,escr:Eb,Escr:Rb,esdot:Pb,Esim:Tb,esim:_b,Eta:Ob,eta:Lb,ETH:Ab,eth:Db,Euml:kb,euml:Ib,euro:Mb,excl:$b,exist:Fb,Exists:qb,expectation:Ub,exponentiale:Hb,ExponentialE:Bb,fallingdotseq:Vb,Fcy:zb,fcy:Kb,female:Wb,ffilig:Xb,fflig:Gb,ffllig:Yb,Ffr:Qb,ffr:Zb,filig:Jb,FilledSmallSquare:ey,FilledVerySmallSquare:ty,fjlig:ny,flat:sy,fllig:oy,fltns:ry,fnof:cy,Fopf:ay,fopf:iy,forall:ly,ForAll:uy,fork:dy,forkv:fy,Fouriertrf:py,fpartint:my,frac12:hy,frac13:gy,frac14:xy,frac15:vy,frac16:by,frac18:yy,frac23:wy,frac25:Sy,frac34:Ny,frac35:jy,frac38:Cy,frac45:Ey,frac56:Ry,frac58:Py,frac78:Ty,frasl:_y,frown:Oy,fscr:Ly,Fscr:Ay,gacute:Dy,Gamma:ky,gamma:Iy,Gammad:My,gammad:$y,gap:Fy,Gbreve:qy,gbreve:Uy,Gcedil:Hy,Gcirc:By,gcirc:Vy,Gcy:zy,gcy:Ky,Gdot:Wy,gdot:Xy,ge:Gy,gE:Yy,gEl:Qy,gel:Zy,geq:Jy,geqq:ew,geqslant:tw,gescc:nw,ges:sw,gesdot:ow,gesdoto:rw,gesdotol:cw,gesl:aw,gesles:iw,Gfr:lw,gfr:uw,gg:dw,Gg:fw,ggg:pw,gimel:mw,GJcy:hw,gjcy:gw,gla:xw,gl:vw,glE:bw,glj:yw,gnap:ww,gnapprox:Sw,gne:Nw,gnE:jw,gneq:Cw,gneqq:Ew,gnsim:Rw,Gopf:Pw,gopf:Tw,grave:_w,GreaterEqual:Ow,GreaterEqualLess:Lw,GreaterFullEqual:Aw,GreaterGreater:Dw,GreaterLess:kw,GreaterSlantEqual:Iw,GreaterTilde:Mw,Gscr:$w,gscr:Fw,gsim:qw,gsime:Uw,gsiml:Hw,gtcc:Bw,gtcir:Vw,gt:zw,GT:Kw,Gt:Ww,gtdot:Xw,gtlPar:Gw,gtquest:Yw,gtrapprox:Qw,gtrarr:Zw,gtrdot:Jw,gtreqless:eS,gtreqqless:tS,gtrless:nS,gtrsim:sS,gvertneqq:oS,gvnE:rS,Hacek:cS,hairsp:aS,half:iS,hamilt:lS,HARDcy:uS,hardcy:dS,harrcir:fS,harr:pS,hArr:mS,harrw:hS,Hat:gS,hbar:xS,Hcirc:vS,hcirc:bS,hearts:yS,heartsuit:wS,hellip:SS,hercon:NS,hfr:jS,Hfr:CS,HilbertSpace:ES,hksearow:RS,hkswarow:PS,hoarr:TS,homtht:_S,hookleftarrow:OS,hookrightarrow:LS,hopf:AS,Hopf:DS,horbar:kS,HorizontalLine:IS,hscr:MS,Hscr:$S,hslash:FS,Hstrok:qS,hstrok:US,HumpDownHump:HS,HumpEqual:BS,hybull:VS,hyphen:zS,Iacute:KS,iacute:WS,ic:XS,Icirc:GS,icirc:YS,Icy:QS,icy:ZS,Idot:JS,IEcy:e0,iecy:t0,iexcl:n0,iff:s0,ifr:o0,Ifr:r0,Igrave:c0,igrave:a0,ii:i0,iiiint:l0,iiint:u0,iinfin:d0,iiota:f0,IJlig:p0,ijlig:m0,Imacr:h0,imacr:g0,image:x0,ImaginaryI:v0,imagline:b0,imagpart:y0,imath:w0,Im:S0,imof:N0,imped:j0,Implies:C0,incare:E0,in:"∈",infin:R0,infintie:P0,inodot:T0,intcal:_0,int:O0,Int:L0,integers:A0,Integral:D0,intercal:k0,Intersection:I0,intlarhk:M0,intprod:$0,InvisibleComma:F0,InvisibleTimes:q0,IOcy:U0,iocy:H0,Iogon:B0,iogon:V0,Iopf:z0,iopf:K0,Iota:W0,iota:X0,iprod:G0,iquest:Y0,iscr:Q0,Iscr:Z0,isin:J0,isindot:eN,isinE:tN,isins:nN,isinsv:sN,isinv:oN,it:rN,Itilde:cN,itilde:aN,Iukcy:iN,iukcy:lN,Iuml:uN,iuml:dN,Jcirc:fN,jcirc:pN,Jcy:mN,jcy:hN,Jfr:gN,jfr:xN,jmath:vN,Jopf:bN,jopf:yN,Jscr:wN,jscr:SN,Jsercy:NN,jsercy:jN,Jukcy:CN,jukcy:EN,Kappa:RN,kappa:PN,kappav:TN,Kcedil:_N,kcedil:ON,Kcy:LN,kcy:AN,Kfr:DN,kfr:kN,kgreen:IN,KHcy:MN,khcy:$N,KJcy:FN,kjcy:qN,Kopf:UN,kopf:HN,Kscr:BN,kscr:VN,lAarr:zN,Lacute:KN,lacute:WN,laemptyv:XN,lagran:GN,Lambda:YN,lambda:QN,lang:ZN,Lang:JN,langd:ej,langle:tj,lap:nj,Laplacetrf:sj,laquo:oj,larrb:rj,larrbfs:cj,larr:aj,Larr:ij,lArr:lj,larrfs:uj,larrhk:dj,larrlp:fj,larrpl:pj,larrsim:mj,larrtl:hj,latail:gj,lAtail:xj,lat:vj,late:bj,lates:yj,lbarr:wj,lBarr:Sj,lbbrk:Nj,lbrace:jj,lbrack:Cj,lbrke:Ej,lbrksld:Rj,lbrkslu:Pj,Lcaron:Tj,lcaron:_j,Lcedil:Oj,lcedil:Lj,lceil:Aj,lcub:Dj,Lcy:kj,lcy:Ij,ldca:Mj,ldquo:$j,ldquor:Fj,ldrdhar:qj,ldrushar:Uj,ldsh:Hj,le:Bj,lE:Vj,LeftAngleBracket:zj,LeftArrowBar:Kj,leftarrow:Wj,LeftArrow:Xj,Leftarrow:Gj,LeftArrowRightArrow:Yj,leftarrowtail:Qj,LeftCeiling:Zj,LeftDoubleBracket:Jj,LeftDownTeeVector:eC,LeftDownVectorBar:tC,LeftDownVector:nC,LeftFloor:sC,leftharpoondown:oC,leftharpoonup:rC,leftleftarrows:cC,leftrightarrow:aC,LeftRightArrow:iC,Leftrightarrow:lC,leftrightarrows:uC,leftrightharpoons:dC,leftrightsquigarrow:fC,LeftRightVector:pC,LeftTeeArrow:mC,LeftTee:hC,LeftTeeVector:gC,leftthreetimes:xC,LeftTriangleBar:vC,LeftTriangle:bC,LeftTriangleEqual:yC,LeftUpDownVector:wC,LeftUpTeeVector:SC,LeftUpVectorBar:NC,LeftUpVector:jC,LeftVectorBar:CC,LeftVector:EC,lEg:RC,leg:PC,leq:TC,leqq:_C,leqslant:OC,lescc:LC,les:AC,lesdot:DC,lesdoto:kC,lesdotor:IC,lesg:MC,lesges:$C,lessapprox:FC,lessdot:qC,lesseqgtr:UC,lesseqqgtr:HC,LessEqualGreater:BC,LessFullEqual:VC,LessGreater:zC,lessgtr:KC,LessLess:WC,lesssim:XC,LessSlantEqual:GC,LessTilde:YC,lfisht:QC,lfloor:ZC,Lfr:JC,lfr:eE,lg:tE,lgE:nE,lHar:sE,lhard:oE,lharu:rE,lharul:cE,lhblk:aE,LJcy:iE,ljcy:lE,llarr:uE,ll:dE,Ll:fE,llcorner:pE,Lleftarrow:mE,llhard:hE,lltri:gE,Lmidot:xE,lmidot:vE,lmoustache:bE,lmoust:yE,lnap:wE,lnapprox:SE,lne:NE,lnE:jE,lneq:CE,lneqq:EE,lnsim:RE,loang:PE,loarr:TE,lobrk:_E,longleftarrow:OE,LongLeftArrow:LE,Longleftarrow:AE,longleftrightarrow:DE,LongLeftRightArrow:kE,Longleftrightarrow:IE,longmapsto:ME,longrightarrow:$E,LongRightArrow:FE,Longrightarrow:qE,looparrowleft:UE,looparrowright:HE,lopar:BE,Lopf:VE,lopf:zE,loplus:KE,lotimes:WE,lowast:XE,lowbar:GE,LowerLeftArrow:YE,LowerRightArrow:QE,loz:ZE,lozenge:JE,lozf:eR,lpar:tR,lparlt:nR,lrarr:sR,lrcorner:oR,lrhar:rR,lrhard:cR,lrm:aR,lrtri:iR,lsaquo:lR,lscr:uR,Lscr:dR,lsh:fR,Lsh:pR,lsim:mR,lsime:hR,lsimg:gR,lsqb:xR,lsquo:vR,lsquor:bR,Lstrok:yR,lstrok:wR,ltcc:SR,ltcir:NR,lt:jR,LT:CR,Lt:ER,ltdot:RR,lthree:PR,ltimes:TR,ltlarr:_R,ltquest:OR,ltri:LR,ltrie:AR,ltrif:DR,ltrPar:kR,lurdshar:IR,luruhar:MR,lvertneqq:$R,lvnE:FR,macr:qR,male:UR,malt:HR,maltese:BR,Map:"⤅",map:VR,mapsto:zR,mapstodown:KR,mapstoleft:WR,mapstoup:XR,marker:GR,mcomma:YR,Mcy:QR,mcy:ZR,mdash:JR,mDDot:e1,measuredangle:t1,MediumSpace:n1,Mellintrf:s1,Mfr:o1,mfr:r1,mho:c1,micro:a1,midast:i1,midcir:l1,mid:u1,middot:d1,minusb:f1,minus:p1,minusd:m1,minusdu:h1,MinusPlus:g1,mlcp:x1,mldr:v1,mnplus:b1,models:y1,Mopf:w1,mopf:S1,mp:N1,mscr:j1,Mscr:C1,mstpos:E1,Mu:R1,mu:P1,multimap:T1,mumap:_1,nabla:O1,Nacute:L1,nacute:A1,nang:D1,nap:k1,napE:I1,napid:M1,napos:$1,napprox:F1,natural:q1,naturals:U1,natur:H1,nbsp:B1,nbump:V1,nbumpe:z1,ncap:K1,Ncaron:W1,ncaron:X1,Ncedil:G1,ncedil:Y1,ncong:Q1,ncongdot:Z1,ncup:J1,Ncy:eP,ncy:tP,ndash:nP,nearhk:sP,nearr:oP,neArr:rP,nearrow:cP,ne:aP,nedot:iP,NegativeMediumSpace:lP,NegativeThickSpace:uP,NegativeThinSpace:dP,NegativeVeryThinSpace:fP,nequiv:pP,nesear:mP,nesim:hP,NestedGreaterGreater:gP,NestedLessLess:xP,NewLine:vP,nexist:bP,nexists:yP,Nfr:wP,nfr:SP,ngE:NP,nge:jP,ngeq:CP,ngeqq:EP,ngeqslant:RP,nges:PP,nGg:TP,ngsim:_P,nGt:OP,ngt:LP,ngtr:AP,nGtv:DP,nharr:kP,nhArr:IP,nhpar:MP,ni:$P,nis:FP,nisd:qP,niv:UP,NJcy:HP,njcy:BP,nlarr:VP,nlArr:zP,nldr:KP,nlE:WP,nle:XP,nleftarrow:GP,nLeftarrow:YP,nleftrightarrow:QP,nLeftrightarrow:ZP,nleq:JP,nleqq:eT,nleqslant:tT,nles:nT,nless:sT,nLl:oT,nlsim:rT,nLt:cT,nlt:aT,nltri:iT,nltrie:lT,nLtv:uT,nmid:dT,NoBreak:fT,NonBreakingSpace:pT,nopf:mT,Nopf:hT,Not:gT,not:xT,NotCongruent:vT,NotCupCap:bT,NotDoubleVerticalBar:yT,NotElement:wT,NotEqual:ST,NotEqualTilde:NT,NotExists:jT,NotGreater:CT,NotGreaterEqual:ET,NotGreaterFullEqual:RT,NotGreaterGreater:PT,NotGreaterLess:TT,NotGreaterSlantEqual:_T,NotGreaterTilde:OT,NotHumpDownHump:LT,NotHumpEqual:AT,notin:DT,notindot:kT,notinE:IT,notinva:MT,notinvb:$T,notinvc:FT,NotLeftTriangleBar:qT,NotLeftTriangle:UT,NotLeftTriangleEqual:HT,NotLess:BT,NotLessEqual:VT,NotLessGreater:zT,NotLessLess:KT,NotLessSlantEqual:WT,NotLessTilde:XT,NotNestedGreaterGreater:GT,NotNestedLessLess:YT,notni:QT,notniva:ZT,notnivb:JT,notnivc:e_,NotPrecedes:t_,NotPrecedesEqual:n_,NotPrecedesSlantEqual:s_,NotReverseElement:o_,NotRightTriangleBar:r_,NotRightTriangle:c_,NotRightTriangleEqual:a_,NotSquareSubset:i_,NotSquareSubsetEqual:l_,NotSquareSuperset:u_,NotSquareSupersetEqual:d_,NotSubset:f_,NotSubsetEqual:p_,NotSucceeds:m_,NotSucceedsEqual:h_,NotSucceedsSlantEqual:g_,NotSucceedsTilde:x_,NotSuperset:v_,NotSupersetEqual:b_,NotTilde:y_,NotTildeEqual:w_,NotTildeFullEqual:S_,NotTildeTilde:N_,NotVerticalBar:j_,nparallel:C_,npar:E_,nparsl:R_,npart:P_,npolint:T_,npr:__,nprcue:O_,nprec:L_,npreceq:A_,npre:D_,nrarrc:k_,nrarr:I_,nrArr:M_,nrarrw:$_,nrightarrow:F_,nRightarrow:q_,nrtri:U_,nrtrie:H_,nsc:B_,nsccue:V_,nsce:z_,Nscr:K_,nscr:W_,nshortmid:X_,nshortparallel:G_,nsim:Y_,nsime:Q_,nsimeq:Z_,nsmid:J_,nspar:eO,nsqsube:tO,nsqsupe:nO,nsub:sO,nsubE:oO,nsube:rO,nsubset:cO,nsubseteq:aO,nsubseteqq:iO,nsucc:lO,nsucceq:uO,nsup:dO,nsupE:fO,nsupe:pO,nsupset:mO,nsupseteq:hO,nsupseteqq:gO,ntgl:xO,Ntilde:vO,ntilde:bO,ntlg:yO,ntriangleleft:wO,ntrianglelefteq:SO,ntriangleright:NO,ntrianglerighteq:jO,Nu:CO,nu:EO,num:RO,numero:PO,numsp:TO,nvap:_O,nvdash:OO,nvDash:LO,nVdash:AO,nVDash:DO,nvge:kO,nvgt:IO,nvHarr:MO,nvinfin:$O,nvlArr:FO,nvle:qO,nvlt:UO,nvltrie:HO,nvrArr:BO,nvrtrie:VO,nvsim:zO,nwarhk:KO,nwarr:WO,nwArr:XO,nwarrow:GO,nwnear:YO,Oacute:QO,oacute:ZO,oast:JO,Ocirc:eL,ocirc:tL,ocir:nL,Ocy:sL,ocy:oL,odash:rL,Odblac:cL,odblac:aL,odiv:iL,odot:lL,odsold:uL,OElig:dL,oelig:fL,ofcir:pL,Ofr:mL,ofr:hL,ogon:gL,Ograve:xL,ograve:vL,ogt:bL,ohbar:yL,ohm:wL,oint:SL,olarr:NL,olcir:jL,olcross:CL,oline:EL,olt:RL,Omacr:PL,omacr:TL,Omega:_L,omega:OL,Omicron:LL,omicron:AL,omid:DL,ominus:kL,Oopf:IL,oopf:ML,opar:$L,OpenCurlyDoubleQuote:FL,OpenCurlyQuote:qL,operp:UL,oplus:HL,orarr:BL,Or:VL,or:zL,ord:KL,order:WL,orderof:XL,ordf:GL,ordm:YL,origof:QL,oror:ZL,orslope:JL,orv:eA,oS:tA,Oscr:nA,oscr:sA,Oslash:oA,oslash:rA,osol:cA,Otilde:aA,otilde:iA,otimesas:lA,Otimes:uA,otimes:dA,Ouml:fA,ouml:pA,ovbar:mA,OverBar:hA,OverBrace:gA,OverBracket:xA,OverParenthesis:vA,para:bA,parallel:yA,par:wA,parsim:SA,parsl:NA,part:jA,PartialD:CA,Pcy:EA,pcy:RA,percnt:PA,period:TA,permil:_A,perp:OA,pertenk:LA,Pfr:AA,pfr:DA,Phi:kA,phi:IA,phiv:MA,phmmat:$A,phone:FA,Pi:qA,pi:UA,pitchfork:HA,piv:BA,planck:VA,planckh:zA,plankv:KA,plusacir:WA,plusb:XA,pluscir:GA,plus:YA,plusdo:QA,plusdu:ZA,pluse:JA,PlusMinus:eD,plusmn:tD,plussim:nD,plustwo:sD,pm:oD,Poincareplane:rD,pointint:cD,popf:aD,Popf:iD,pound:lD,prap:uD,Pr:dD,pr:fD,prcue:pD,precapprox:mD,prec:hD,preccurlyeq:gD,Precedes:xD,PrecedesEqual:vD,PrecedesSlantEqual:bD,PrecedesTilde:yD,preceq:wD,precnapprox:SD,precneqq:ND,precnsim:jD,pre:CD,prE:ED,precsim:RD,prime:PD,Prime:TD,primes:_D,prnap:OD,prnE:LD,prnsim:AD,prod:DD,Product:kD,profalar:ID,profline:MD,profsurf:$D,prop:FD,Proportional:qD,Proportion:UD,propto:HD,prsim:BD,prurel:VD,Pscr:zD,pscr:KD,Psi:WD,psi:XD,puncsp:GD,Qfr:YD,qfr:QD,qint:ZD,qopf:JD,Qopf:ek,qprime:tk,Qscr:nk,qscr:sk,quaternions:ok,quatint:rk,quest:ck,questeq:ak,quot:ik,QUOT:lk,rAarr:uk,race:dk,Racute:fk,racute:pk,radic:mk,raemptyv:hk,rang:gk,Rang:xk,rangd:vk,range:bk,rangle:yk,raquo:wk,rarrap:Sk,rarrb:Nk,rarrbfs:jk,rarrc:Ck,rarr:Ek,Rarr:Rk,rArr:Pk,rarrfs:Tk,rarrhk:_k,rarrlp:Ok,rarrpl:Lk,rarrsim:Ak,Rarrtl:Dk,rarrtl:kk,rarrw:Ik,ratail:Mk,rAtail:$k,ratio:Fk,rationals:qk,rbarr:Uk,rBarr:Hk,RBarr:Bk,rbbrk:Vk,rbrace:zk,rbrack:Kk,rbrke:Wk,rbrksld:Xk,rbrkslu:Gk,Rcaron:Yk,rcaron:Qk,Rcedil:Zk,rcedil:Jk,rceil:eI,rcub:tI,Rcy:nI,rcy:sI,rdca:oI,rdldhar:rI,rdquo:cI,rdquor:aI,rdsh:iI,real:lI,realine:uI,realpart:dI,reals:fI,Re:pI,rect:mI,reg:hI,REG:gI,ReverseElement:xI,ReverseEquilibrium:vI,ReverseUpEquilibrium:bI,rfisht:yI,rfloor:wI,rfr:SI,Rfr:NI,rHar:jI,rhard:CI,rharu:EI,rharul:RI,Rho:PI,rho:TI,rhov:_I,RightAngleBracket:OI,RightArrowBar:LI,rightarrow:AI,RightArrow:DI,Rightarrow:kI,RightArrowLeftArrow:II,rightarrowtail:MI,RightCeiling:$I,RightDoubleBracket:FI,RightDownTeeVector:qI,RightDownVectorBar:UI,RightDownVector:HI,RightFloor:BI,rightharpoondown:VI,rightharpoonup:zI,rightleftarrows:KI,rightleftharpoons:WI,rightrightarrows:XI,rightsquigarrow:GI,RightTeeArrow:YI,RightTee:QI,RightTeeVector:ZI,rightthreetimes:JI,RightTriangleBar:e2,RightTriangle:t2,RightTriangleEqual:n2,RightUpDownVector:s2,RightUpTeeVector:o2,RightUpVectorBar:r2,RightUpVector:c2,RightVectorBar:a2,RightVector:i2,ring:l2,risingdotseq:u2,rlarr:d2,rlhar:f2,rlm:p2,rmoustache:m2,rmoust:h2,rnmid:g2,roang:x2,roarr:v2,robrk:b2,ropar:y2,ropf:w2,Ropf:S2,roplus:N2,rotimes:j2,RoundImplies:C2,rpar:E2,rpargt:R2,rppolint:P2,rrarr:T2,Rrightarrow:_2,rsaquo:O2,rscr:L2,Rscr:A2,rsh:D2,Rsh:k2,rsqb:I2,rsquo:M2,rsquor:$2,rthree:F2,rtimes:q2,rtri:U2,rtrie:H2,rtrif:B2,rtriltri:V2,RuleDelayed:z2,ruluhar:K2,rx:W2,Sacute:X2,sacute:G2,sbquo:Y2,scap:Q2,Scaron:Z2,scaron:J2,Sc:eM,sc:tM,sccue:nM,sce:sM,scE:oM,Scedil:rM,scedil:cM,Scirc:aM,scirc:iM,scnap:lM,scnE:uM,scnsim:dM,scpolint:fM,scsim:pM,Scy:mM,scy:hM,sdotb:gM,sdot:xM,sdote:vM,searhk:bM,searr:yM,seArr:wM,searrow:SM,sect:NM,semi:jM,seswar:CM,setminus:EM,setmn:RM,sext:PM,Sfr:TM,sfr:_M,sfrown:OM,sharp:LM,SHCHcy:AM,shchcy:DM,SHcy:kM,shcy:IM,ShortDownArrow:MM,ShortLeftArrow:$M,shortmid:FM,shortparallel:qM,ShortRightArrow:UM,ShortUpArrow:HM,shy:BM,Sigma:VM,sigma:zM,sigmaf:KM,sigmav:WM,sim:XM,simdot:GM,sime:YM,simeq:QM,simg:ZM,simgE:JM,siml:e$,simlE:t$,simne:n$,simplus:s$,simrarr:o$,slarr:r$,SmallCircle:c$,smallsetminus:a$,smashp:i$,smeparsl:l$,smid:u$,smile:d$,smt:f$,smte:p$,smtes:m$,SOFTcy:h$,softcy:g$,solbar:x$,solb:v$,sol:b$,Sopf:y$,sopf:w$,spades:S$,spadesuit:N$,spar:j$,sqcap:C$,sqcaps:E$,sqcup:R$,sqcups:P$,Sqrt:T$,sqsub:_$,sqsube:O$,sqsubset:L$,sqsubseteq:A$,sqsup:D$,sqsupe:k$,sqsupset:I$,sqsupseteq:M$,square:$$,Square:F$,SquareIntersection:q$,SquareSubset:U$,SquareSubsetEqual:H$,SquareSuperset:B$,SquareSupersetEqual:V$,SquareUnion:z$,squarf:K$,squ:W$,squf:X$,srarr:G$,Sscr:Y$,sscr:Q$,ssetmn:Z$,ssmile:J$,sstarf:eF,Star:tF,star:nF,starf:sF,straightepsilon:oF,straightphi:rF,strns:cF,sub:aF,Sub:iF,subdot:lF,subE:uF,sube:dF,subedot:fF,submult:pF,subnE:mF,subne:hF,subplus:gF,subrarr:xF,subset:vF,Subset:bF,subseteq:yF,subseteqq:wF,SubsetEqual:SF,subsetneq:NF,subsetneqq:jF,subsim:CF,subsub:EF,subsup:RF,succapprox:PF,succ:TF,succcurlyeq:_F,Succeeds:OF,SucceedsEqual:LF,SucceedsSlantEqual:AF,SucceedsTilde:DF,succeq:kF,succnapprox:IF,succneqq:MF,succnsim:$F,succsim:FF,SuchThat:qF,sum:UF,Sum:HF,sung:BF,sup1:VF,sup2:zF,sup3:KF,sup:WF,Sup:XF,supdot:GF,supdsub:YF,supE:QF,supe:ZF,supedot:JF,Superset:eq,SupersetEqual:tq,suphsol:nq,suphsub:sq,suplarr:oq,supmult:rq,supnE:cq,supne:aq,supplus:iq,supset:lq,Supset:uq,supseteq:dq,supseteqq:fq,supsetneq:pq,supsetneqq:mq,supsim:hq,supsub:gq,supsup:xq,swarhk:vq,swarr:bq,swArr:yq,swarrow:wq,swnwar:Sq,szlig:Nq,Tab:jq,target:Cq,Tau:Eq,tau:Rq,tbrk:Pq,Tcaron:Tq,tcaron:_q,Tcedil:Oq,tcedil:Lq,Tcy:Aq,tcy:Dq,tdot:kq,telrec:Iq,Tfr:Mq,tfr:$q,there4:Fq,therefore:qq,Therefore:Uq,Theta:Hq,theta:Bq,thetasym:Vq,thetav:zq,thickapprox:Kq,thicksim:Wq,ThickSpace:Xq,ThinSpace:Gq,thinsp:Yq,thkap:Qq,thksim:Zq,THORN:Jq,thorn:eU,tilde:tU,Tilde:nU,TildeEqual:sU,TildeFullEqual:oU,TildeTilde:rU,timesbar:cU,timesb:aU,times:iU,timesd:lU,tint:uU,toea:dU,topbot:fU,topcir:pU,top:mU,Topf:hU,topf:gU,topfork:xU,tosa:vU,tprime:bU,trade:yU,TRADE:wU,triangle:SU,triangledown:NU,triangleleft:jU,trianglelefteq:CU,triangleq:EU,triangleright:RU,trianglerighteq:PU,tridot:TU,trie:_U,triminus:OU,TripleDot:LU,triplus:AU,trisb:DU,tritime:kU,trpezium:IU,Tscr:MU,tscr:$U,TScy:FU,tscy:qU,TSHcy:UU,tshcy:HU,Tstrok:BU,tstrok:VU,twixt:zU,twoheadleftarrow:KU,twoheadrightarrow:WU,Uacute:XU,uacute:GU,uarr:YU,Uarr:QU,uArr:ZU,Uarrocir:JU,Ubrcy:e3,ubrcy:t3,Ubreve:n3,ubreve:s3,Ucirc:o3,ucirc:r3,Ucy:c3,ucy:a3,udarr:i3,Udblac:l3,udblac:u3,udhar:d3,ufisht:f3,Ufr:p3,ufr:m3,Ugrave:h3,ugrave:g3,uHar:x3,uharl:v3,uharr:b3,uhblk:y3,ulcorn:w3,ulcorner:S3,ulcrop:N3,ultri:j3,Umacr:C3,umacr:E3,uml:R3,UnderBar:P3,UnderBrace:T3,UnderBracket:_3,UnderParenthesis:O3,Union:L3,UnionPlus:A3,Uogon:D3,uogon:k3,Uopf:I3,uopf:M3,UpArrowBar:$3,uparrow:F3,UpArrow:q3,Uparrow:U3,UpArrowDownArrow:H3,updownarrow:B3,UpDownArrow:V3,Updownarrow:z3,UpEquilibrium:K3,upharpoonleft:W3,upharpoonright:X3,uplus:G3,UpperLeftArrow:Y3,UpperRightArrow:Q3,upsi:Z3,Upsi:J3,upsih:eH,Upsilon:tH,upsilon:nH,UpTeeArrow:sH,UpTee:oH,upuparrows:rH,urcorn:cH,urcorner:aH,urcrop:iH,Uring:lH,uring:uH,urtri:dH,Uscr:fH,uscr:pH,utdot:mH,Utilde:hH,utilde:gH,utri:xH,utrif:vH,uuarr:bH,Uuml:yH,uuml:wH,uwangle:SH,vangrt:NH,varepsilon:jH,varkappa:CH,varnothing:EH,varphi:RH,varpi:PH,varpropto:TH,varr:_H,vArr:OH,varrho:LH,varsigma:AH,varsubsetneq:DH,varsubsetneqq:kH,varsupsetneq:IH,varsupsetneqq:MH,vartheta:$H,vartriangleleft:FH,vartriangleright:qH,vBar:UH,Vbar:HH,vBarv:BH,Vcy:VH,vcy:zH,vdash:KH,vDash:WH,Vdash:XH,VDash:GH,Vdashl:YH,veebar:QH,vee:ZH,Vee:JH,veeeq:eB,vellip:tB,verbar:nB,Verbar:sB,vert:oB,Vert:rB,VerticalBar:cB,VerticalLine:aB,VerticalSeparator:iB,VerticalTilde:lB,VeryThinSpace:uB,Vfr:dB,vfr:fB,vltri:pB,vnsub:mB,vnsup:hB,Vopf:gB,vopf:xB,vprop:vB,vrtri:bB,Vscr:yB,vscr:wB,vsubnE:SB,vsubne:NB,vsupnE:jB,vsupne:CB,Vvdash:EB,vzigzag:RB,Wcirc:PB,wcirc:TB,wedbar:_B,wedge:OB,Wedge:LB,wedgeq:AB,weierp:DB,Wfr:kB,wfr:IB,Wopf:MB,wopf:$B,wp:FB,wr:qB,wreath:UB,Wscr:HB,wscr:BB,xcap:VB,xcirc:zB,xcup:KB,xdtri:WB,Xfr:XB,xfr:GB,xharr:YB,xhArr:QB,Xi:ZB,xi:JB,xlarr:e5,xlArr:t5,xmap:n5,xnis:s5,xodot:o5,Xopf:r5,xopf:c5,xoplus:a5,xotime:i5,xrarr:l5,xrArr:u5,Xscr:d5,xscr:f5,xsqcup:p5,xuplus:m5,xutri:h5,xvee:g5,xwedge:x5,Yacute:v5,yacute:b5,YAcy:y5,yacy:w5,Ycirc:S5,ycirc:N5,Ycy:j5,ycy:C5,yen:E5,Yfr:R5,yfr:P5,YIcy:T5,yicy:_5,Yopf:O5,yopf:L5,Yscr:A5,yscr:D5,YUcy:k5,yucy:I5,yuml:M5,Yuml:$5,Zacute:F5,zacute:q5,Zcaron:U5,zcaron:H5,Zcy:B5,zcy:V5,Zdot:z5,zdot:K5,zeetrf:W5,ZeroWidthSpace:X5,Zeta:G5,zeta:Y5,zfr:Q5,Zfr:Z5,ZHcy:J5,zhcy:eV,zigrarr:tV,zopf:nV,Zopf:sV,Zscr:oV,zscr:rV,zwj:cV,zwnj:aV},iV="Á",lV="á",uV="Â",dV="â",fV="´",pV="Æ",mV="æ",hV="À",gV="à",xV="&",vV="&",bV="Å",yV="å",wV="Ã",SV="ã",NV="Ä",jV="ä",CV="¦",EV="Ç",RV="ç",PV="¸",TV="¢",_V="©",OV="©",LV="¤",AV="°",DV="÷",kV="É",IV="é",MV="Ê",$V="ê",FV="È",qV="è",UV="Ð",HV="ð",BV="Ë",VV="ë",zV="½",KV="¼",WV="¾",XV=">",GV=">",YV="Í",QV="í",ZV="Î",JV="î",e4="¡",t4="Ì",n4="ì",s4="¿",o4="Ï",r4="ï",c4="«",a4="<",i4="<",l4="¯",u4="µ",d4="·",f4=" ",p4="¬",m4="Ñ",h4="ñ",g4="Ó",x4="ó",v4="Ô",b4="ô",y4="Ò",w4="ò",S4="ª",N4="º",j4="Ø",C4="ø",E4="Õ",R4="õ",P4="Ö",T4="ö",_4="¶",O4="±",L4="£",A4='"',D4='"',k4="»",I4="®",M4="®",$4="§",F4="",q4="¹",U4="²",H4="³",B4="ß",V4="Þ",z4="þ",K4="×",W4="Ú",X4="ú",G4="Û",Y4="û",Q4="Ù",Z4="ù",J4="¨",ez="Ü",tz="ü",nz="Ý",sz="ý",oz="¥",rz="ÿ",cz={Aacute:iV,aacute:lV,Acirc:uV,acirc:dV,acute:fV,AElig:pV,aelig:mV,Agrave:hV,agrave:gV,amp:xV,AMP:vV,Aring:bV,aring:yV,Atilde:wV,atilde:SV,Auml:NV,auml:jV,brvbar:CV,Ccedil:EV,ccedil:RV,cedil:PV,cent:TV,copy:_V,COPY:OV,curren:LV,deg:AV,divide:DV,Eacute:kV,eacute:IV,Ecirc:MV,ecirc:$V,Egrave:FV,egrave:qV,ETH:UV,eth:HV,Euml:BV,euml:VV,frac12:zV,frac14:KV,frac34:WV,gt:XV,GT:GV,Iacute:YV,iacute:QV,Icirc:ZV,icirc:JV,iexcl:e4,Igrave:t4,igrave:n4,iquest:s4,Iuml:o4,iuml:r4,laquo:c4,lt:a4,LT:i4,macr:l4,micro:u4,middot:d4,nbsp:f4,not:p4,Ntilde:m4,ntilde:h4,Oacute:g4,oacute:x4,Ocirc:v4,ocirc:b4,Ograve:y4,ograve:w4,ordf:S4,ordm:N4,Oslash:j4,oslash:C4,Otilde:E4,otilde:R4,Ouml:P4,ouml:T4,para:_4,plusmn:O4,pound:L4,quot:A4,QUOT:D4,raquo:k4,reg:I4,REG:M4,sect:$4,shy:F4,sup1:q4,sup2:U4,sup3:H4,szlig:B4,THORN:V4,thorn:z4,times:K4,Uacute:W4,uacute:X4,Ucirc:G4,ucirc:Y4,Ugrave:Q4,ugrave:Z4,uml:J4,Uuml:ez,uuml:tz,Yacute:nz,yacute:sz,yen:oz,yuml:rz},az="&",iz="'",lz=">",uz="<",dz='"',rr={amp:az,apos:iz,gt:lz,lt:uz,quot:dz};var at={};const fz={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};var Ls;function pz(){if(Ls)return at;Ls=1;var e=at&&at.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(at,"__esModule",{value:!0});var t=e(fz),n=String.fromCodePoint||function(r){var c="";return r>65535&&(r-=65536,c+=String.fromCharCode(r>>>10&1023|55296),r=56320|r&1023),c+=String.fromCharCode(r),c};function o(r){return r>=55296&&r<=57343||r>1114111?"�":(r in t.default&&(r=t.default[r]),n(r))}return at.default=o,at}var As;function Ds(){if(As)return Pe;As=1;var e=Pe&&Pe.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.decodeHTML=Pe.decodeHTMLStrict=Pe.decodeXML=void 0;var t=e(or),n=e(cz),o=e(rr),r=e(pz()),c=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;Pe.decodeXML=a(o.default),Pe.decodeHTMLStrict=a(t.default);function a(d){var h=u(d);return function(f){return String(f).replace(c,h)}}var i=function(d,h){return d<h?1:-1};Pe.decodeHTML=(function(){for(var d=Object.keys(n.default).sort(i),h=Object.keys(t.default).sort(i),f=0,g=0;f<h.length;f++)d[g]===h[f]?(h[f]+=";?",g++):h[f]+=";";var v=new RegExp("&(?:"+h.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),y=u(t.default);function b(m){return m.substr(-1)!==";"&&(m+=";"),y(m)}return function(m){return String(m).replace(v,b)}})();function u(d){return function(f){if(f.charAt(1)==="#"){var g=f.charAt(2);return g==="X"||g==="x"?r.default(parseInt(f.substr(3),16)):r.default(parseInt(f.substr(2),10))}return d[f.slice(1,-1)]||f}}return Pe}var ye={},ks;function Is(){if(ks)return ye;ks=1;var e=ye&&ye.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(ye,"__esModule",{value:!0}),ye.escapeUTF8=ye.escape=ye.encodeNonAsciiHTML=ye.encodeHTML=ye.encodeXML=void 0;var t=e(rr),n=i(t.default),o=u(n);ye.encodeXML=m(n);var r=e(or),c=i(r.default),a=u(c);ye.encodeHTML=g(c,a),ye.encodeNonAsciiHTML=m(c);function i(w){return Object.keys(w).sort().reduce(function(j,N){return j[w[N]]="&"+N+";",j},{})}function u(w){for(var j=[],N=[],S=0,R=Object.keys(w);S<R.length;S++){var E=R[S];E.length===1?j.push("\\"+E):N.push(E)}j.sort();for(var T=0;T<j.length-1;T++){for(var D=T;D<j.length-1&&j[D].charCodeAt(1)+1===j[D+1].charCodeAt(1);)D+=1;var k=1+D-T;k<3||j.splice(T,k,j[T]+"-"+j[D])}return N.unshift("["+j.join("")+"]"),new RegExp(N.join("|"),"g")}var d=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,h=String.prototype.codePointAt!=null?function(w){return w.codePointAt(0)}:function(w){return(w.charCodeAt(0)-55296)*1024+w.charCodeAt(1)-56320+65536};function f(w){return"&#x"+(w.length>1?h(w):w.charCodeAt(0)).toString(16).toUpperCase()+";"}function g(w,j){return function(N){return N.replace(j,function(S){return w[S]}).replace(d,f)}}var v=new RegExp(o.source+"|"+d.source,"g");function y(w){return w.replace(v,f)}ye.escape=y;function b(w){return w.replace(o,f)}ye.escapeUTF8=b;function m(w){return function(j){return j.replace(v,function(N){return w[N]||f(N)})}}return ye}var Ms;function mz(){return Ms||(Ms=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.encodeHTML5=e.encodeHTML4=e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=e.encode=e.decodeStrict=e.decode=void 0;var t=Ds(),n=Is();function o(u,d){return(!d||d<=0?t.decodeXML:t.decodeHTML)(u)}e.decode=o;function r(u,d){return(!d||d<=0?t.decodeXML:t.decodeHTMLStrict)(u)}e.decodeStrict=r;function c(u,d){return(!d||d<=0?n.encodeXML:n.encodeHTML)(u)}e.encode=c;var a=Is();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return a.encodeXML}}),Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return a.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return a.encodeNonAsciiHTML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return a.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return a.escapeUTF8}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return a.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return a.encodeHTML}});var i=Ds();Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return i.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return i.decodeXML}})})(gn)),gn}var xn,$s;function hz(){if($s)return xn;$s=1;function e(p,x){if(!(p instanceof x))throw new TypeError("Cannot call a class as a function")}function t(p,x){for(var C=0;C<x.length;C++){var _=x[C];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(p,_.key,_)}}function n(p,x,C){return x&&t(p.prototype,x),p}function o(p,x){var C=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!C){if(Array.isArray(p)||(C=r(p))||x){C&&(p=C);var _=0,O=function(){};return{s:O,n:function(){return _>=p.length?{done:!0}:{done:!1,value:p[_++]}},e:function(V){throw V},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
43
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var L=!0,A=!1,q;return{s:function(){C=C.call(p)},n:function(){var V=C.next();return L=V.done,V},e:function(V){A=!0,q=V},f:function(){try{!L&&C.return!=null&&C.return()}finally{if(A)throw q}}}}function r(p,x){if(p){if(typeof p=="string")return c(p,x);var C=Object.prototype.toString.call(p).slice(8,-1);if(C==="Object"&&p.constructor&&(C=p.constructor.name),C==="Map"||C==="Set")return Array.from(p);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return c(p,x)}}function c(p,x){(x==null||x>p.length)&&(x=p.length);for(var C=0,_=new Array(x);C<x;C++)_[C]=p[C];return _}var a=mz(),i={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:u()};function u(){var p={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return m(0,5).forEach(function(x){m(0,5).forEach(function(C){m(0,5).forEach(function(_){return d(x,C,_,p)})})}),m(0,23).forEach(function(x){var C=x+232,_=h(x*10+8);p[C]="#"+_+_+_}),p}function d(p,x,C,_){var O=16+p*36+x*6+C,L=p>0?p*40+55:0,A=x>0?x*40+55:0,q=C>0?C*40+55:0;_[O]=f([L,A,q])}function h(p){for(var x=p.toString(16);x.length<2;)x="0"+x;return x}function f(p){var x=[],C=o(p),_;try{for(C.s();!(_=C.n()).done;){var O=_.value;x.push(h(O))}}catch(L){C.e(L)}finally{C.f()}return"#"+x.join("")}function g(p,x,C,_){var O;return x==="text"?O=N(C,_):x==="display"?O=y(p,C,_):x==="xterm256Foreground"?O=E(p,_.colors[C]):x==="xterm256Background"?O=T(p,_.colors[C]):x==="rgb"&&(O=v(p,C)),O}function v(p,x){x=x.substring(2).slice(0,-1);var C=+x.substr(0,2),_=x.substring(5).split(";"),O=_.map(function(L){return("0"+Number(L).toString(16)).substr(-2)}).join("");return R(p,(C===38?"color:#":"background-color:#")+O)}function y(p,x,C){x=parseInt(x,10);var _={"-1":function(){return"<br/>"},0:function(){return p.length&&b(p)},1:function(){return S(p,"b")},3:function(){return S(p,"i")},4:function(){return S(p,"u")},8:function(){return R(p,"display:none")},9:function(){return S(p,"strike")},22:function(){return R(p,"font-weight:normal;text-decoration:none;font-style:normal")},23:function(){return D(p,"i")},24:function(){return D(p,"u")},39:function(){return E(p,C.fg)},49:function(){return T(p,C.bg)},53:function(){return R(p,"text-decoration:overline")}},O;return _[x]?O=_[x]():4<x&&x<7?O=S(p,"blink"):29<x&&x<38?O=E(p,C.colors[x-30]):39<x&&x<48?O=T(p,C.colors[x-40]):89<x&&x<98?O=E(p,C.colors[8+(x-90)]):99<x&&x<108&&(O=T(p,C.colors[8+(x-100)])),O}function b(p){var x=p.slice(0);return p.length=0,x.reverse().map(function(C){return"</"+C+">"}).join("")}function m(p,x){for(var C=[],_=p;_<=x;_++)C.push(_);return C}function w(p){return function(x){return(p===null||x.category!==p)&&p!=="all"}}function j(p){p=parseInt(p,10);var x=null;return p===0?x="all":p===1?x="bold":2<p&&p<5?x="underline":4<p&&p<7?x="blink":p===8?x="hide":p===9?x="strike":29<p&&p<38||p===39||89<p&&p<98?x="foreground-color":(39<p&&p<48||p===49||99<p&&p<108)&&(x="background-color"),x}function N(p,x){return x.escapeXML?a.encodeXML(p):p}function S(p,x,C){return C||(C=""),p.push(x),"<".concat(x).concat(C?' style="'.concat(C,'"'):"",">")}function R(p,x){return S(p,"span",x)}function E(p,x){return S(p,"span","color:"+x)}function T(p,x){return S(p,"span","background-color:"+x)}function D(p,x){var C;if(p.slice(-1)[0]===x&&(C=p.pop()),C)return"</"+x+">"}function k(p,x,C){var _=!1,O=3;function L(){return""}function A(W,se){return C("xterm256Foreground",se),""}function q(W,se){return C("xterm256Background",se),""}function $(W){return x.newline?C("display",-1):C("text",W),""}function V(W,se){_=!0,se.trim().length===0&&(se="0"),se=se.trimRight(";").split(";");var de=o(se),P;try{for(de.s();!(P=de.n()).done;){var H=P.value;C("display",H)}}catch(ee){de.e(ee)}finally{de.f()}return""}function z(W){return C("text",W),""}function te(W){return C("rgb",W),""}var G=[{pattern:/^\x08+/,sub:L},{pattern:/^\x1b\[[012]?K/,sub:L},{pattern:/^\x1b\[\(B/,sub:L},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:te},{pattern:/^\x1b\[38;5;(\d+)m/,sub:A},{pattern:/^\x1b\[48;5;(\d+)m/,sub:q},{pattern:/^\n/,sub:$},{pattern:/^\r+\n/,sub:$},{pattern:/^\r/,sub:$},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:V},{pattern:/^\x1b\[\d?J/,sub:L},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:L},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:L},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:z}];function re(W,se){se>O&&_||(_=!1,p=p.replace(W.pattern,W.sub))}var Y=[],ve=p,F=ve.length;e:for(;F>0;){for(var K=0,ne=0,M=G.length;ne<M;K=++ne){var X=G[K];if(re(X,K),p.length!==F){F=p.length;continue e}}if(p.length===F)break;Y.push(0),F=p.length}return Y}function I(p,x,C){return x!=="text"&&(p=p.filter(w(j(C))),p.push({token:x,data:C,category:j(C)})),p}var U=(function(){function p(x){e(this,p),x=x||{},x.colors&&(x.colors=Object.assign({},i.colors,x.colors)),this.options=Object.assign({},i,x),this.stack=[],this.stickyStack=[]}return n(p,[{key:"toHtml",value:function(C){var _=this;C=typeof C=="string"?[C]:C;var O=this.stack,L=this.options,A=[];return this.stickyStack.forEach(function(q){var $=g(O,q.token,q.data,L);$&&A.push($)}),k(C.join(""),L,function(q,$){var V=g(O,q,$,L);V&&A.push(V),L.stream&&(_.stickyStack=I(_.stickyStack,q,$))}),O.length&&A.push(b(O)),A.join("")}}]),p})();return xn=U,xn}var gz=hz();const xz=dr(gz),vz=new xz({fg:"hsl(var(--foreground))",bg:"hsl(var(--background))",newline:!0,escapeXML:!0});function bz(e){return e.includes("ERR_NGROK_8001")?"ERR_NGROK_8001: ngrok agent 无法连到 ngrok edge,通常是本机网络或代理限制。":e.includes("ERR_NGROK_9009")?"ERR_NGROK_9009: 当前 ngrok 计划或代理路径不允许该用法。":e.includes("DNS")||e.includes("DDNS")?"DNS/DDNS 相关错误:检查 Cloud 协调状态和当前公网地址。":null}function yz(e){return s.jsxs(Z,{variant:"bordered",className:"mb-4",children:[s.jsx(ce,{className:"pb-2",children:s.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{children:[s.jsx(ae,{children:"诊断导出"}),s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"导出可交给开发者的脱敏运行时证据,默认不包含用户 Pod 内容。"})]}),s.jsxs(pe,{onClick:e.onExport,disabled:e.exporting,className:"gap-2",children:[s.jsx(Ir,{className:"h-4 w-4"}),"导出诊断"]})]})}),s.jsxs(J,{className:"grid gap-3 text-sm lg:grid-cols-[1fr_auto] lg:items-end",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:"包含:"}),s.jsx("span",{className:"text-muted-foreground",children:"/service/status、隧道、DDNS、运行时配置摘要、最近错误和日志尾部。"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:"排除:"}),s.jsx("span",{className:"text-muted-foreground",children:"Token、API key、数据库密码、认证 cookie、client secret、用户 Pod 内容。"})]})]}),s.jsxs("div",{className:"text-xs text-muted-foreground lg:text-right",children:["日志文件: ",e.logFileInfo]})]})]})}function qz(){const[e,t]=l.useState([]),[n,o]=l.useState("all"),[r,c]=l.useState("all"),[a,i]=l.useState(""),[u,d]=l.useState(!1),[h,f]=l.useState(!0),[g,v]=l.useState(""),[y,b]=l.useState(!1),[m,w]=l.useState("未读取"),j=l.useRef(null),N=l.useRef(null);l.useEffect(()=>{(async()=>{const x=await gr({limit:500});t(x);const C=await xr({lines:20});w(C?.file??"未找到日志文件")})()},[]),l.useEffect(()=>{if(u){N.current?.(),N.current=null;return}const p=mr(x=>{v(""),t(C=>[...C,...x].slice(-500))},()=>{v("日志流连接异常,已保留当前视图。")});return N.current=p,()=>{p(),N.current=null}},[u]),l.useEffect(()=>{h&&!u&&j.current?.scrollIntoView({block:"end"})},[e,u,h]);const S=l.useMemo(()=>{const p=a.trim().toLowerCase();return e.filter(x=>{const C=n==="all"||x.source===n,_=r==="all"||x.level===r,O=!p||`${x.timestamp} ${x.level} ${x.source} ${x.message}`.toLowerCase().includes(p);return C&&_&&O})},[e,n,r,a]),R=l.useCallback(()=>{t([])},[]),E=l.useCallback(()=>{const p=S.map(O=>`[${O.timestamp}] [${O.level.toUpperCase()}] [${O.source}] ${O.message}`).join(`
|
|
44
|
+
`),x=new Blob([p],{type:"text/plain"}),C=URL.createObjectURL(x),_=document.createElement("a");_.href=C,_.download=`xpod-logs-${new Date().toISOString().slice(0,10)}.txt`,_.click(),URL.revokeObjectURL(C)},[S]),T=l.useCallback(async()=>{b(!0);try{const p=await hr(),x=new Blob([JSON.stringify(p,null,2)],{type:"application/json"}),C=URL.createObjectURL(x),_=document.createElement("a");_.href=C,_.download=`xpod-diagnostics-${new Date().toISOString().slice(0,10)}.json`,_.click(),URL.revokeObjectURL(C)}finally{b(!1)}},[]),D=p=>{try{return new Date(p).toLocaleTimeString()}catch{return p}},k=p=>{switch(p){case"error":return"text-destructive";case"warn":return"text-amber-600 dark:text-amber-300";case"debug":return"text-muted-foreground";default:return"text-foreground"}},I=p=>{switch(p){case"xpod":return"text-primary";case"css":return"text-green-700 dark:text-green-300";case"api":return"text-blue-700 dark:text-blue-300";case"gateway":return"text-amber-700 dark:text-amber-300";default:return"text-muted-foreground"}},U=S.map(p=>bz(p.message)).find(Boolean);return s.jsxs("div",{className:"p-4 sm:p-8 h-full flex flex-col max-w-6xl",children:[s.jsxs("div",{className:"flex flex-col gap-4 mb-6 lg:flex-row lg:items-start lg:justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"type-h1",children:"日志"}),s.jsx("p",{className:"mt-2 max-w-[65ch] text-sm text-muted-foreground",children:"实时检查运行时输出,并导出不包含 secret 的诊断证据。"})]}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0 flex-wrap",children:[s.jsxs(pe,{variant:"ghost",size:"sm",onClick:()=>d(!u),className:"gap-1.5 whitespace-nowrap",children:[u?s.jsx(Hr,{className:"w-4 h-4"}):s.jsx(qr,{className:"w-4 h-4"}),u?"继续":"暂停"]}),s.jsxs(pe,{variant:"ghost",size:"sm",onClick:E,className:"gap-1.5 whitespace-nowrap",children:[s.jsx(Dr,{className:"w-4 h-4"}),"导出日志"]}),s.jsxs(pe,{variant:"ghost",size:"sm",onClick:R,className:"gap-1.5 whitespace-nowrap",children:[s.jsx(zr,{className:"w-4 h-4"}),"清空视图"]})]})]}),s.jsx(yz,{onExport:T,exporting:y,logFileInfo:m}),s.jsxs("div",{className:"mb-4 grid gap-3 lg:grid-cols-[160px_160px_1fr_auto]",children:[s.jsxs(lt,{value:n,onValueChange:p=>o(p),children:[s.jsx(Qe,{className:"h-9 text-sm",children:s.jsx(ut,{})}),s.jsxs(Ze,{children:[s.jsx(oe,{value:"all",children:"全部模块"}),s.jsx(oe,{value:"xpod",children:"xpod"}),s.jsx(oe,{value:"gateway",children:"Gateway"}),s.jsx(oe,{value:"css",children:"CSS"}),s.jsx(oe,{value:"api",children:"API"}),s.jsx(oe,{value:"tunnel",children:"Tunnel"})]})]}),s.jsxs(lt,{value:r,onValueChange:p=>c(p),children:[s.jsx(Qe,{className:"h-9 text-sm",children:s.jsx(ut,{})}),s.jsxs(Ze,{children:[s.jsx(oe,{value:"all",children:"全部等级"}),s.jsx(oe,{value:"error",children:"错误"}),s.jsx(oe,{value:"warn",children:"警告"}),s.jsx(oe,{value:"info",children:"信息"}),s.jsx(oe,{value:"debug",children:"调试"})]})]}),s.jsxs("div",{children:[s.jsx(Ye,{htmlFor:"keywordFilter",className:"sr-only",children:"关键词"}),s.jsx(Wt,{id:"keywordFilter",value:a,onChange:p=>i(p.target.value),placeholder:"按关键词过滤",className:"h-9"})]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("input",{type:"checkbox",checked:h,onChange:p=>f(p.target.checked)}),"自动滚动"]})]}),g?s.jsx("div",{className:"mb-3 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:g}):null,U?s.jsx("div",{className:"mb-3 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:border-amber-900 dark:bg-amber-950/20 dark:text-amber-200",children:U}):null,s.jsx(Z,{variant:"bordered",className:"flex-1 min-h-[420px] overflow-hidden",children:s.jsx(J,{className:"h-full p-0",children:s.jsx("div",{className:"h-full overflow-auto font-mono text-sm bg-background",children:S.length===0?s.jsx("div",{className:"p-6 text-muted-foreground text-center",children:"暂无日志"}):s.jsxs("div",{className:"p-4 space-y-1 min-w-max",children:[S.map((p,x)=>s.jsxs("div",{className:"flex gap-2 hover:bg-muted px-2 py-0.5 rounded w-max min-w-full",children:[s.jsx("span",{className:"text-muted-foreground shrink-0 w-20",children:D(p.timestamp)}),s.jsxs("span",{className:ie("shrink-0 w-14 font-semibold",k(p.level)),children:["[",p.level.toUpperCase(),"]"]}),s.jsxs("span",{className:ie("shrink-0 w-20",I(p.source)),children:["[",p.source,"]"]}),s.jsx("span",{className:"text-foreground whitespace-pre",dangerouslySetInnerHTML:{__html:vz.toHtml(p.message)}})]},`${p.timestamp}-${x}`)),s.jsx("div",{ref:j})]})})})})]})}function wz(e){const{changes:t,onReset:n}=e;return s.jsxs(Z,{variant:"bordered",className:"mb-6",children:[s.jsx(ce,{className:"pb-2",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx(ae,{children:"待应用变更"}),s.jsx(pe,{type:"button",variant:"ghost",size:"sm",onClick:n,disabled:t.length===0,children:"重置未保存"})]})}),s.jsx(J,{children:t.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:"没有未保存的变更。"}):s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-sm text-amber-700 dark:text-amber-300",children:"保存后需要重启运行时才能完全生效。"}),s.jsx("div",{className:"divide-y divide-border rounded-md border border-border",children:t.map(o=>s.jsxs("div",{className:"grid gap-1 px-3 py-2 text-sm sm:grid-cols-[180px_1fr]",children:[s.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:o.key}),s.jsxs("span",{className:"font-mono text-xs text-foreground break-all",children:[o.from||"∅"," → ",o.to||"∅"]})]},o.key))})]})})]})}function kt(e){const{id:t,label:n,configured:o,value:r,onChange:c,placeholder:a,helper:i}=e;return s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(Ye,{htmlFor:t,children:n}),s.jsxs("span",{className:ie("inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-xs",o?"border-green-200 text-green-700 dark:border-green-900 dark:text-green-300":"border-border text-muted-foreground"),children:[s.jsx($r,{className:"h-3.5 w-3.5"}),o?"已配置":"未配置"]})]}),s.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[s.jsx(Wt,{id:t,type:"password",autoComplete:"new-password",value:r,onChange:u=>c(u.target.value),placeholder:a??"填写新 secret","aria-describedby":i?`${t}-helper`:void 0}),r?s.jsx(pe,{type:"button",variant:"ghost",onClick:()=>c(""),className:"shrink-0",children:"清除替换值"}):null]}),i?s.jsx("p",{id:`${t}-helper`,className:"text-xs text-muted-foreground",children:i}):null]})}const Fs=["XPOD_DEPLOY_MODE","CSS_ROOT_FILE_PATH","CSS_BASE_URL","XPOD_TUNNEL_PROVIDER","XPOD_TUNNEL_ACTIVE_PROFILE_ID","XPOD_TUNNEL_PROFILES","XPOD_TUNNEL_PUBLIC_URL","CLOUDFLARE_TUNNEL_URL","SAKURA_TUNNEL_URL","CLOUDFLARE_TUNNEL_TOKEN","SAKURA_TUNNEL_TOKEN","NGROK_AUTHTOKEN","NGROK_URL","FRP_TUNNEL_TOKEN","FRP_TUNNEL_URL","XPOD_HTTPS_MODE","XPOD_HTTPS_CERT_PATH","XPOD_HTTPS_KEY_PATH","XPOD_CLOUD_API_ENDPOINT","XPOD_NODE_ID","XPOD_SP_DOMAIN","XPOD_NODE_TOKEN","XPOD_SERVICE_TOKEN","CSS_PORT","CSS_SPARQL_ENDPOINT","CSS_IDENTITY_DB_URL","CSS_LOGGING_LEVEL","CSS_SHOW_STACK_TRACE"],Sz=new Set(["CLOUDFLARE_TUNNEL_TOKEN","SAKURA_TUNNEL_TOKEN","NGROK_AUTHTOKEN","FRP_TUNNEL_TOKEN","XPOD_NODE_TOKEN","XPOD_SERVICE_TOKEN","CSS_IDENTITY_DB_URL"]),An={ngrok:{publicEndpointKey:"NGROK_URL",publicEndpointLabel:"ngrok 固定入口 URL",publicEndpointPlaceholder:"https://example.ngrok-free.dev",credentialKey:"NGROK_AUTHTOKEN",credentialLabel:"ngrok authtoken"},cloudflare:{publicEndpointKey:"CLOUDFLARE_TUNNEL_URL",publicEndpointLabel:"Cloudflare Tunnel 公开入口",publicEndpointPlaceholder:"https://example.trycloudflare.com",credentialKey:"CLOUDFLARE_TUNNEL_TOKEN",credentialLabel:"Cloudflare Tunnel Token"},sakura_frp:{publicEndpointKey:"SAKURA_TUNNEL_URL",publicEndpointLabel:"Sakura FRP 公开入口 URL",publicEndpointPlaceholder:"https://example.example.com",credentialKey:"SAKURA_TUNNEL_TOKEN",credentialLabel:"Sakura FRP Token"},frp:{publicEndpointKey:"FRP_TUNNEL_URL",publicEndpointLabel:"FRP 公开入口 URL",publicEndpointPlaceholder:"https://example.example.com",credentialKey:"FRP_TUNNEL_TOKEN",credentialLabel:"FRP Token"}};function Nz(e){return e==="none"?null:An[e]}const jz=["ngrok","cloudflare","sakura_frp","frp"];function Zn(e){return e==="ngrok"||e==="cloudflare"||e==="sakura_frp"||e==="frp"?e:e==="sakura-frp"?"sakura_frp":"none"}function qs(e){switch(e){case"ngrok":return"ngrok";case"cloudflare":return"Cloudflare";case"sakura_frp":return"Sakura FRP";case"frp":return"FRP"}}function Cz(e,t){const n=[],o=new Set;for(const r of Ez(e.XPOD_TUNNEL_PROFILES)){const c=An[r.provider],a=r.credentialEnvKey||c.credentialKey,i=r.publicUrl||Us(e,r.provider,c),u=t(a);n.push({id:r.id,provider:r.provider,label:r.label||qs(r.provider),publicEndpointUrl:i,credentialConfigured:u,configured:!0,...c,credentialKey:a}),o.add(r.id)}for(const r of jz){if(o.has(r))continue;const c=An[r],a=Us(e,r,c),i=t(c.credentialKey);n.push({id:r,provider:r,label:qs(r),publicEndpointUrl:a,credentialConfigured:i,configured:!!(a||i||Zn(e.XPOD_TUNNEL_PROVIDER)===r),...c})}return n}function Ez(e){if(!e?.trim())return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.flatMap(n=>{if(!n||typeof n!="object"||Array.isArray(n))return[];const o=n,r=typeof o.id=="string"&&o.id.trim()?o.id.trim():"",c=Zn(typeof o.provider=="string"?o.provider:void 0);return!r||c==="none"?[]:[{id:r,provider:c,label:typeof o.label=="string"?o.label:void 0,publicUrl:typeof o.publicUrl=="string"?o.publicUrl:void 0,credentialEnvKey:typeof o.credentialEnvKey=="string"?o.credentialEnvKey:void 0}]}):[]}catch{return[]}}function Us(e,t,n){const o=(t==="cloudflare"||t==="sakura_frp")&&e.XPOD_TUNNEL_PUBLIC_URL||"";return e[n.publicEndpointKey]||o||""}function Hs(e){const t=e.filter(n=>n.configured).map(n=>({id:n.id,provider:n.provider,label:n.label,publicUrl:n.publicEndpointUrl,credentialEnvKey:n.credentialKey}));return t.length>0?JSON.stringify(t):""}function Rz(e,t,n){const o=e.XPOD_TUNNEL_ACTIVE_PROFILE_ID?.trim();return o||(t!=="none"?t:n.find(r=>r.configured)?.id??"none")}function Bs(e){return Sz.has(e)}function Vs(e,t,n){return{...e,[t]:n}}function _e(e){return s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ye,{htmlFor:e.id,children:e.label}),s.jsx(Wt,{id:e.id,value:e.value,onChange:t=>e.onChange(t.target.value),placeholder:e.placeholder,readOnly:e.readOnly,"aria-readonly":e.readOnly||void 0}),e.helper?s.jsx("p",{className:"text-xs text-muted-foreground",children:e.helper}):null]})}function Uz(){const e=zs(),[t,n]=l.useState({}),[o,r]=l.useState({}),[c,a]=l.useState({}),[i,u]=l.useState({}),[d,h]=l.useState(null),[f,g]=l.useState(null),[v,y]=l.useState(!0),[b,m]=l.useState(!1),[w,j]=l.useState(!1),[N,S]=l.useState(""),[R,E]=l.useState(!1),T=t.XPOD_DEPLOY_MODE==="standalone"?"standalone":"local",D=Zn(t.XPOD_TUNNEL_PROVIDER),k=["none","acme","manual"].includes(t.XPOD_HTTPS_MODE)?t.XPOD_HTTPS_MODE:"none",I=d?.status??"unknown",U=T==="local",p=!!t.XPOD_CLOUD_API_ENDPOINT,x=U&&p,C=f?.baseUrl||t.CSS_BASE_URL||(f?.fqdn?`https://${f.fqdn}/`:""),_=l.useCallback(async()=>{try{const P=await vr();g(P)}catch(P){console.error("Failed to load ddns status:",P),g(null)}},[]),O=l.useCallback(async()=>{try{const P=await br(),H={...P?.env??{}};n(H),r(H),a({}),u(P?.secrets??{})}catch(P){console.error("Failed to load config:",P)}finally{y(!1)}},[]),L=l.useCallback(async P=>{j(!0);try{const H=await yr(P);h(H)}catch(H){console.error("Failed to refresh public ip check:",H),h(null)}finally{j(!1)}},[]);l.useEffect(()=>{queueMicrotask(()=>{O()})},[O]),l.useEffect(()=>{v||queueMicrotask(()=>{L(x?C:t.CSS_BASE_URL)})},[t.CSS_BASE_URL,x,C,T,v,L]),l.useEffect(()=>{v||queueMicrotask(x?()=>{_()}:()=>{g(null)})},[x,v,_]);const A=(P,H)=>{n(ee=>Vs(ee,P,H))},q=(P,H)=>{a(ee=>Vs(ee,P,H))},$=l.useCallback(P=>!!i[P]?.configured,[i]),V=l.useCallback(P=>$(P)||!!c[P],[$,c]),z=l.useMemo(()=>Cz(t,V),[t,V]),te=Rz(t,D,z),G=z.find(P=>P.id===te),re=G?.provider??"none",Y=Nz(re),ve=P=>{const H=z.find(ee=>ee.id===P);n(ee=>({...ee,XPOD_TUNNEL_ACTIVE_PROFILE_ID:H?H.id:"",XPOD_TUNNEL_PROVIDER:H?.provider??"none"}))},F=(P,H)=>{const ee=z.map(Be=>Be.id===P.id?{...Be,publicEndpointUrl:H,configured:!0}:Be);n(Be=>({...Be,[P.publicEndpointKey]:H,XPOD_TUNNEL_PROFILES:Hs(ee)}))},K=l.useMemo(()=>{if(Y){if(!(G?.publicEndpointUrl||"").trim())return`请填写 ${Y.publicEndpointLabel}`;if(!V(Y.credentialKey))return`请填写 ${Y.credentialLabel}`}if(x&&f?.mode==="tunnel"&&re==="none")return"当前网络不可直连,必须启用一个隧道供应商。";const H=(t.CSS_BASE_URL||"").trim().startsWith("https://");return!x&&H&&re==="none"&&k==="none"?"独立部署使用 https:// Base URL 时,需要配置 HTTPS 或启用隧道。":""},[G?.publicEndpointUrl,re,f?.mode,t.CSS_BASE_URL,k,x,Y,V]),ne=l.useMemo(()=>{const P=[];for(const H of Fs){const ee=t[H],Be=o[H];if(Bs(H)){c[H]&&P.push({key:H,from:$(H)?"[configured]":"",to:"[replace]"});continue}(ee??"")!==(Be??"")&&P.push({key:H,from:Be??"",to:ee??""})}return P},[t,o,$,c]),M=async()=>{if(K)return S(K),!1;m(!0),S("");try{const P={};for(const ee of Fs)Bs(ee)?c[ee]&&(P[ee]=c[ee]):ee in t&&(P[ee]=t[ee]);P.XPOD_TUNNEL_ACTIVE_PROFILE_ID=re==="none"?"":te,P.XPOD_TUNNEL_PROVIDER=re,P.XPOD_TUNNEL_PROFILES=Hs(z);const H=await wr(P);return H?(S("配置已保存,需要重启服务生效"),await O()):S("保存失败"),!!H}catch{return S("保存失败"),!1}finally{m(!1)}},X=async()=>{if(e&&!e.restartCapability.supported){S("当前入口不支持重启操作。请在本机或携带管理 Token 操作。");return}S("正在重启服务..."),await Sr()?(S("重启信号已发送,请稍候..."),setTimeout(()=>window.location.reload(),3e3)):S("重启失败。远程访问时默认禁止重启,请在本机或携带管理 Token 操作。")},W=async()=>{if(e&&!e.configurationWriteCapability.supported){S("当前入口不支持保存运行时配置。请在本机或携带管理 Token 操作。");return}await M()&&await X()},se=()=>{n(o),a({}),S("未保存变更已重置")},de=l.useMemo(()=>w?"检测中...":I==="pass"?"可直连":I==="fail"?"不可直连":"未知",[w,I]);return v?s.jsxs("div",{className:"p-4 sm:p-8 max-w-4xl space-y-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"type-h1",children:"设置"}),s.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"正在读取运行时配置。"})]}),s.jsx(Z,{variant:"bordered",children:s.jsxs(J,{className:"space-y-3 pt-5",children:[s.jsx("div",{className:"h-4 w-40 rounded bg-muted"}),s.jsx("div",{className:"h-10 rounded bg-muted"}),s.jsx("div",{className:"h-10 rounded bg-muted"})]})})]}):s.jsxs("div",{className:"p-4 sm:p-8 max-w-4xl",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("h1",{className:"type-h1",children:"设置"}),s.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"高级运行时设置。大多数用户应在 LinX 中完成配置。"})]}),s.jsx("div",{className:"mb-6 rounded-xl border border-amber-200 bg-amber-50/70 p-4 text-sm text-amber-900 dark:border-amber-900 dark:bg-amber-950/20 dark:text-amber-200",children:s.jsxs("div",{className:"flex gap-3",children:[s.jsx(kn,{className:"mt-0.5 h-4 w-4 shrink-0"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:"高级运行时设置"}),s.jsx("p",{className:"mt-1",children:"这里修改的是本地 Xpod 运行时,不是用户 Pod 资料,也不是 Cloud IDP 账号设置。"})]})]})}),s.jsxs(Z,{variant:"bordered",className:"mb-6",children:[s.jsx(ce,{children:s.jsx(ae,{children:"运行时"})}),s.jsxs(J,{className:"space-y-4",children:[s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ye,{children:"部署模式"}),s.jsxs(lt,{value:T,onValueChange:P=>A("XPOD_DEPLOY_MODE",P),children:[s.jsx(Qe,{children:s.jsx(ut,{})}),s.jsxs(Ze,{children:[s.jsx(oe,{value:"local",children:"边缘部署"}),s.jsx(oe,{value:"standalone",children:"独立部署"})]})]})]}),s.jsx(_e,{id:"storageRoot",label:"存储目录",value:t.CSS_ROOT_FILE_PATH||"./data",onChange:P=>A("CSS_ROOT_FILE_PATH",P)})]}),s.jsx(_e,{id:"baseUrl",label:"资料入口 URL",value:x?C:t.CSS_BASE_URL||"http://127.0.0.1:3000",onChange:P=>A("CSS_BASE_URL",P),readOnly:x,helper:x?"托管模式下由 Cloud 分配稳定域名,本地只上报状态和隧道入口。":"独立部署需要保证该 URL 可被目标客户端访问。"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:T==="local"?"边缘部署:Cloud IDP 和稳定域名在云端,数据/SP 保留在本地。":"独立部署:域名、身份认证和证书都由本机或用户自管。"})]})]}),s.jsxs(Z,{variant:"bordered",className:"mb-6",children:[s.jsx(ce,{className:"pb-2",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx(ae,{children:"网络访问"}),s.jsxs("span",{className:"text-sm",children:["外网: ",s.jsx("span",{className:ie(I==="pass"?"text-green-700 dark:text-green-300":I==="fail"?"text-destructive":"text-muted-foreground"),children:de})]})]})}),s.jsxs(J,{className:"space-y-4",children:[x&&f?.mode==="tunnel"&&re==="none"?s.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:"当前网络不可直连,请启用一个隧道供应商。"}):null,s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ye,{children:"当前生效"}),s.jsxs(lt,{value:te,onValueChange:ve,children:[s.jsx(Qe,{children:s.jsx(ut,{})}),s.jsxs(Ze,{children:[s.jsx(oe,{value:"none",children:"不使用隧道"}),z.map(P=>s.jsx(oe,{value:P.id,children:P.label},P.id))]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"可以记录多个隧道配置,但同一时间只启用当前选择的一个。公网、局域网、本机和 P2P 由状态页判断最优接入。"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-sm font-medium",children:"已记录隧道"}),s.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:z.map(P=>{const H=P.id===te;return s.jsxs("div",{className:ie("rounded-xl border p-3",H?"border-primary bg-primary/5":"border-border"),children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:P.label}),s.jsx(pe,{type:"button",variant:H?"secondary":"ghost",size:"sm",onClick:()=>ve(P.id),disabled:H,children:H?"当前生效":"设为当前"})]}),s.jsx("div",{className:"mt-2 break-all font-mono text-xs text-muted-foreground",children:P.publicEndpointUrl||"未配置入口"}),s.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:P.credentialConfigured?"密钥已配置":"未配置密钥"})]},P.id)})})]}),G&&Y?s.jsxs("div",{className:"space-y-4 rounded-xl border border-border p-4",children:[s.jsx("div",{className:"text-sm font-medium",children:"编辑当前隧道"}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:"隧道入口 URL"}),s.jsx(_e,{id:"tunnelPublicEndpoint",label:Y.publicEndpointLabel,value:G.publicEndpointUrl,onChange:P=>F(G,P),placeholder:Y.publicEndpointPlaceholder,helper:"这是实际数据面入口,不替代上方的稳定资料 URL。"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:"访问密钥"}),s.jsx(kt,{id:"tunnelCredential",label:Y.credentialLabel,configured:$(Y.credentialKey),value:c[Y.credentialKey]||"",onChange:P=>q(Y.credentialKey,P)})]})]}):s.jsx("div",{className:"rounded-md border border-border bg-muted/30 px-3 py-2 text-sm text-muted-foreground",children:"不使用隧道时,不填写隧道入口 URL 或访问密钥。"})]})]}),s.jsxs(Z,{variant:"bordered",className:"mb-6",children:[s.jsx(ce,{children:s.jsx(ae,{children:"Cloud 协调"})}),s.jsxs(J,{className:"space-y-4",children:[s.jsx(_e,{id:"cloudEndpoint",label:"Cloud API endpoint",value:t.XPOD_CLOUD_API_ENDPOINT||"",onChange:P=>A("XPOD_CLOUD_API_ENDPOINT",P)}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsx(_e,{id:"nodeId",label:"nodeId",value:t.XPOD_NODE_ID||"",onChange:P=>A("XPOD_NODE_ID",P)}),s.jsx(_e,{id:"spDomain",label:"spDomain",value:t.XPOD_SP_DOMAIN||"",onChange:P=>A("XPOD_SP_DOMAIN",P)})]}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsx(kt,{id:"nodeToken",label:"Node token",configured:$("XPOD_NODE_TOKEN"),value:c.XPOD_NODE_TOKEN||"",onChange:P=>q("XPOD_NODE_TOKEN",P)}),s.jsx(kt,{id:"serviceToken",label:"Service token",configured:$("XPOD_SERVICE_TOKEN"),value:c.XPOD_SERVICE_TOKEN||"",onChange:P=>q("XPOD_SERVICE_TOKEN",P)})]})]})]}),T==="standalone"?s.jsxs(Z,{variant:"bordered",className:"mb-6",children:[s.jsx(ce,{children:s.jsx(ae,{children:"HTTPS"})}),s.jsxs(J,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ye,{children:"HTTPS 模式"}),s.jsxs(lt,{value:k,onValueChange:P=>A("XPOD_HTTPS_MODE",P),children:[s.jsx(Qe,{children:s.jsx(ut,{})}),s.jsxs(Ze,{children:[s.jsx(oe,{value:"none",children:"关闭"}),s.jsx(oe,{value:"acme",children:"自动申请 ACME"}),s.jsx(oe,{value:"manual",children:"手动证书"})]})]})]}),k==="manual"?s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsx(_e,{id:"certPath",label:"证书路径",value:t.XPOD_HTTPS_CERT_PATH||"",onChange:P=>A("XPOD_HTTPS_CERT_PATH",P)}),s.jsx(_e,{id:"keyPath",label:"私钥路径",value:t.XPOD_HTTPS_KEY_PATH||"",onChange:P=>A("XPOD_HTTPS_KEY_PATH",P)})]}):null]})]}):null,s.jsx("div",{className:"mb-6",children:s.jsx(pe,{variant:"ghost",size:"sm",onClick:()=>E(P=>!P),children:R?"收起高级设置":"展开高级设置"})}),R?s.jsxs(Z,{variant:"bordered",className:"mb-6",children:[s.jsx(ce,{children:s.jsx(ae,{children:"高级设置"})}),s.jsxs(J,{className:"space-y-4",children:[s.jsx(_e,{id:"cssPort",label:"端口",value:t.CSS_PORT||"3000",onChange:P=>A("CSS_PORT",P)}),s.jsx(_e,{id:"sparqlEndpoint",label:"SPARQL 存储",value:t.CSS_SPARQL_ENDPOINT||"",onChange:P=>A("CSS_SPARQL_ENDPOINT",P)}),s.jsx(kt,{id:"identityDb",label:"身份数据库 URL",configured:$("CSS_IDENTITY_DB_URL"),value:c.CSS_IDENTITY_DB_URL||"",onChange:P=>q("CSS_IDENTITY_DB_URL",P)}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ye,{children:"日志级别"}),s.jsxs(lt,{value:t.CSS_LOGGING_LEVEL||"info",onValueChange:P=>A("CSS_LOGGING_LEVEL",P),children:[s.jsx(Qe,{className:"w-40",children:s.jsx(ut,{})}),s.jsxs(Ze,{children:[s.jsx(oe,{value:"error",children:"error"}),s.jsx(oe,{value:"warn",children:"warn"}),s.jsx(oe,{value:"info",children:"info"}),s.jsx(oe,{value:"debug",children:"debug"})]})]})]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm text-foreground",children:[s.jsx("input",{type:"checkbox",id:"showStackTrace",checked:t.CSS_SHOW_STACK_TRACE==="true",onChange:P=>A("CSS_SHOW_STACK_TRACE",P.target.checked?"true":"false"),className:"rounded border-input"}),"显示错误堆栈"]})]})]}):null,s.jsx(wz,{changes:ne,onReset:se}),e&&!e.configurationWriteCapability.supported?s.jsxs("div",{className:"rounded-md border border-border bg-muted/40 px-3 py-2 text-sm text-muted-foreground",children:["Configuration changes are not supported from this host capability",e.configurationWriteCapability.reason?`: ${e.configurationWriteCapability.reason}`:"","."]}):s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsx(pe,{onClick:()=>{M()},disabled:b||!!K,children:b?"保存中...":"保存配置"}),e&&!e.restartCapability.supported?null:s.jsx(pe,{variant:"secondary",onClick:()=>{W()},disabled:b||!!K,children:"保存并重启"})]}),N||K?s.jsx("div",{className:ie("mt-4 rounded-md border px-3 py-2 text-sm",K||N&&N.includes("失败")?"border-destructive/30 bg-destructive/10 text-destructive":"border-green-200 bg-green-50 text-green-800 dark:border-green-900 dark:bg-green-950/20 dark:text-green-200"),children:N||K}):null]})}export{kz as AdminLayout,qz as LogsPage,Dz as RdfPage,Uz as SettingsPage,Iz as StatusPage};
|