@chenyqthu/tp-mobile-ui-kit 0.0.0-stage → 0.1.0

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.
Files changed (93) hide show
  1. package/README.md +214 -2
  2. package/dist/assets.js +5 -0
  3. package/dist/catalog.json +11125 -0
  4. package/dist/chunks/OmadaAppDemo-BP4a4ch_.js +4111 -0
  5. package/dist/chunks/TPPrompt-Csg5YasJ.js +2460 -0
  6. package/dist/chunks/asset-icons-BIenKvAh.js +7613 -0
  7. package/dist/chunks/asset-illustrations-YHXzEd7z.js +3086 -0
  8. package/dist/chunks/asset-logos-DAyGwOLj.js +59 -0
  9. package/dist/chunks/asset-motion-D7fWh_JS.js +376 -0
  10. package/dist/core.js +3 -0
  11. package/dist/index.js +7 -0
  12. package/dist/libpag.wasm +0 -0
  13. package/dist/omada.js +7 -0
  14. package/dist/standalone.js +3438 -0
  15. package/dist/style.css +2 -0
  16. package/dist/types/assets-lib/TPBrandLogo.d.ts +15 -0
  17. package/dist/types/assets-lib/TPIcon.d.ts +19 -0
  18. package/dist/types/assets-lib/TPIllustration.d.ts +17 -0
  19. package/dist/types/assets-lib/TPMotion.d.ts +25 -0
  20. package/dist/types/assets-lib/assetsManifest.d.ts +22 -0
  21. package/dist/types/assets-lib/iconsManifest.d.ts +14 -0
  22. package/dist/types/assets-lib/index.d.ts +8 -0
  23. package/dist/types/assets-lib/motionsManifest.d.ts +12 -0
  24. package/dist/types/assets-lib/runtimeUrl.d.ts +4 -0
  25. package/dist/types/core/components/TPActionSheet.d.ts +4 -0
  26. package/dist/types/core/components/TPAlert.d.ts +4 -0
  27. package/dist/types/core/components/TPBadge.d.ts +7 -0
  28. package/dist/types/core/components/TPBottomSheet.d.ts +4 -0
  29. package/dist/types/core/components/TPButton.d.ts +4 -0
  30. package/dist/types/core/components/TPDatePicker.d.ts +7 -0
  31. package/dist/types/core/components/TPDaySwitcher.d.ts +7 -0
  32. package/dist/types/core/components/TPEmptyState.d.ts +7 -0
  33. package/dist/types/core/components/TPFixedButtonBar.d.ts +4 -0
  34. package/dist/types/core/components/TPHeader.d.ts +4 -0
  35. package/dist/types/core/components/TPInput.d.ts +8 -0
  36. package/dist/types/core/components/TPKeyboard.d.ts +7 -0
  37. package/dist/types/core/components/TPListButton.d.ts +7 -0
  38. package/dist/types/core/components/TPListCard.d.ts +7 -0
  39. package/dist/types/core/components/TPListItem.d.ts +7 -0
  40. package/dist/types/core/components/TPMenu.d.ts +4 -0
  41. package/dist/types/core/components/TPPageControl.d.ts +4 -0
  42. package/dist/types/core/components/TPPhoneFrame.d.ts +4 -0
  43. package/dist/types/core/components/TPPopup.d.ts +4 -0
  44. package/dist/types/core/components/TPPrompt.d.ts +4 -0
  45. package/dist/types/core/components/TPSearchBar.d.ts +7 -0
  46. package/dist/types/core/components/TPSectionHeader.d.ts +7 -0
  47. package/dist/types/core/components/TPSectionNote.d.ts +7 -0
  48. package/dist/types/core/components/TPSegment.d.ts +4 -0
  49. package/dist/types/core/components/TPSlider.d.ts +4 -0
  50. package/dist/types/core/components/TPStatusBar.d.ts +4 -0
  51. package/dist/types/core/components/TPSwitch.d.ts +4 -0
  52. package/dist/types/core/components/TPTabBar.d.ts +4 -0
  53. package/dist/types/core/components/TPTag.d.ts +7 -0
  54. package/dist/types/core/components/TPText.d.ts +7 -0
  55. package/dist/types/core/components/TPTimePicker.d.ts +7 -0
  56. package/dist/types/core/components/TPToast.d.ts +13 -0
  57. package/dist/types/core/components/TPWheelPicker.d.ts +7 -0
  58. package/dist/types/core/index.d.ts +34 -0
  59. package/dist/types/core/types.d.ts +414 -0
  60. package/dist/types/lib/assets.d.ts +1 -0
  61. package/dist/types/lib/core.d.ts +2 -0
  62. package/dist/types/lib/index.d.ts +4 -0
  63. package/dist/types/lib/omada.d.ts +4 -0
  64. package/dist/types/lib/standalone.d.ts +8 -0
  65. package/dist/types/omada/blocks/OmadaDeviceListBlock.d.ts +42 -0
  66. package/dist/types/omada/blocks/OmadaIncidentsBlock.d.ts +26 -0
  67. package/dist/types/omada/blocks/OmadaWirelessNetworkBlock.d.ts +25 -0
  68. package/dist/types/omada/components/OmadaStandardInput.d.ts +23 -0
  69. package/dist/types/omada/index.d.ts +14 -0
  70. package/dist/types/omada/pages/OmadaAppDemo.d.ts +18 -0
  71. package/dist/types/omada/pages/OmadaControllerListPage.d.ts +26 -0
  72. package/dist/types/omada/pages/OmadaDeviceDetailPage.d.ts +15 -0
  73. package/dist/types/omada/pages/OmadaHealthDetailPage.d.ts +17 -0
  74. package/dist/types/omada/pages/OmadaLaunchLoadingPage.d.ts +24 -0
  75. package/dist/types/omada/pages/OmadaSiteClientsPage.d.ts +34 -0
  76. package/dist/types/omada/pages/OmadaSiteDashboardPage.d.ts +28 -0
  77. package/dist/types/omada/pages/OmadaSiteDevicesPage.d.ts +18 -0
  78. package/dist/types/omada/pages/OmadaSiteInsightsPage.d.ts +17 -0
  79. package/dist/types/omada/pages/OmadaSiteSettingsPage.d.ts +20 -0
  80. package/dist/types/theme/TPThemeProvider.d.ts +33 -0
  81. package/dist/types/theme/index.d.ts +2 -0
  82. package/dist/types/theme/tokens.d.ts +80 -0
  83. package/package.json +88 -4
  84. package/skills/tp-mobile-ui-kit/SKILL.md +225 -0
  85. package/skills/tp-mobile-ui-kit/references/catalog.json +11125 -0
  86. package/skills/tp-mobile-ui-kit/scripts/query-catalog.mjs +289 -0
  87. package/skills/tp-mobile-ui-kit/scripts/verify-demo.mjs +193 -0
  88. package/skills/tp-mobile-ui-kit/templates/multi-brand.html +319 -0
  89. package/skills/tp-mobile-ui-kit/templates/multi-brand.tsx +337 -0
  90. package/skills/tp-mobile-ui-kit/templates/omada-dashboard.html +138 -0
  91. package/skills/tp-mobile-ui-kit/templates/omada-dashboard.tsx +119 -0
  92. package/skills/tp-mobile-ui-kit/templates/omada-device-detail.html +158 -0
  93. package/skills/tp-mobile-ui-kit/templates/omada-device-detail.tsx +135 -0
@@ -0,0 +1,4111 @@
1
+ import { D as e, F as t, M as n, N as r, P as i, S as a, T as o, _ as s, a as c, h as l, j as u, k as d, s as f, t as p, w as m, y as h } from "./TPPrompt-Csg5YasJ.js";
2
+ import { t as g } from "./asset-icons-BIenKvAh.js";
3
+ import { t as _ } from "./asset-motion-D7fWh_JS.js";
4
+ import v, { useEffect as y, useId as b, useMemo as x, useRef as S, useState as C } from "react";
5
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
6
+ // src/omada/components/OmadaStandardInput.tsx
7
+ var D = 4, O = 6;
8
+ function k(e) {
9
+ let t = e.split(".").slice(0, D);
10
+ for (; t.length < D;) t.push("");
11
+ return t.map((e) => e.replace(/[^0-9]/g, "").slice(0, 3));
12
+ }
13
+ function A(e) {
14
+ let t = e.replace(/[^0-9a-fA-F-:\s]/g, ""), n = (t.includes("-") || t.includes(":") ? t.split(/[-:]/) : t.replace(/[^0-9a-fA-F]/g, "").match(/.{1,2}/g) ?? []).slice(0, O);
15
+ for (; n.length < O;) n.push("");
16
+ return n.map((e) => e.replace(/[^0-9a-fA-F]/g, "").toUpperCase().slice(0, 2));
17
+ }
18
+ function j(e) {
19
+ for (let t of e) {
20
+ if (t === "") continue;
21
+ let e = Number(t);
22
+ if (!Number.isInteger(e) || e < 0 || e > 255) return "Each IPv4 octet must be between 0 and 255";
23
+ }
24
+ }
25
+ function M(e) {
26
+ if (!e.trim()) return;
27
+ let t = Number(e);
28
+ if (!Number.isInteger(t) || t < 1 || t > 65535) return "Port must be between 1 and 65535";
29
+ }
30
+ var N = ({ type: e = "text", label: t, value: n, defaultValue: r = "", onChange: i, placeholder: a, error: o, helperText: s, disabled: c = !1, readOnly: l = !1, id: u, name: d, className: f = "", style: p }) => {
31
+ let m = b(), h = u ?? `tp-omada-std-${m}`, [g, _] = C(r);
32
+ y(() => {
33
+ n !== void 0 && _(n);
34
+ }, [n]);
35
+ let w = n === void 0 ? g : n, D = S([]), O = S([]), N = x(() => e === "ip" ? k(w) : [], [e, w]), P = x(() => e === "mac" ? A(w) : [], [e, w]), F = x(() => {
36
+ if (e === "ip") return j(N);
37
+ if (e === "port") return M(w);
38
+ }, [
39
+ e,
40
+ N,
41
+ w
42
+ ]), I = o ?? F, L = typeof t == "string" ? t : e.toUpperCase(), R = (e) => {
43
+ n === void 0 && _(e), i?.(e);
44
+ }, z = (e, t) => {
45
+ if (c || l) return;
46
+ if (t.includes(".")) {
47
+ let n = k(t);
48
+ if (t.split(".").length >= 2 && e === 0) {
49
+ R(n.join("."));
50
+ let e = Math.min(3, t.split(".").length - 1);
51
+ D.current[e]?.focus();
52
+ return;
53
+ }
54
+ let r = t.replace(/[^0-9]/g, "").slice(0, 3), i = [...N];
55
+ i[e] = r, R(i.join(".")), e < 3 && D.current[e + 1]?.focus();
56
+ return;
57
+ }
58
+ let n = t.replace(/[^0-9]/g, "").slice(0, 3), r = [...N];
59
+ r[e] = n, R(r.join(".")), n.length === 3 && Number(n) <= 255 && e < 3 && D.current[e + 1]?.focus();
60
+ }, B = (e, t) => {
61
+ if (c || l) return;
62
+ let n = t.replace(/[^0-9a-fA-F]/g, "").toUpperCase();
63
+ if (n.length > 2) {
64
+ let e = A(t);
65
+ R(e.join("-"));
66
+ let r = Math.min(5, Math.floor((n.length - 1) / 2));
67
+ O.current[r]?.focus();
68
+ return;
69
+ }
70
+ let r = [...P];
71
+ r[e] = n.slice(0, 2), R(r.join("-")), n.length === 2 && e < 5 && O.current[e + 1]?.focus();
72
+ }, V = (e, t, n, r) => {
73
+ e.key === "Backspace" && n[t] === "" && t > 0 || e.key === "ArrowLeft" && e.currentTarget.selectionStart === 0 && t > 0 ? r.current[t - 1]?.focus() : e.key === "ArrowRight" && e.currentTarget.selectionStart === e.currentTarget.value.length && t < n.length - 1 && r.current[t + 1]?.focus();
74
+ }, H = [
75
+ "tp-omada-std-input-shell",
76
+ I ? "tp-omada-std-input-shell--error" : "",
77
+ c ? "tp-omada-std-input-shell--disabled" : ""
78
+ ].filter(Boolean).join(" ");
79
+ return /* @__PURE__ */ E("div", {
80
+ className: `tp-omada-std-input ${f}`.trim(),
81
+ "data-omada-input-type": e,
82
+ style: p,
83
+ children: [
84
+ t !== void 0 && /* @__PURE__ */ T("label", {
85
+ htmlFor: e === "text" || e === "port" ? h : `${h}-0`,
86
+ className: "tp-omada-std-input-label",
87
+ children: t
88
+ }),
89
+ e === "ip" && /* @__PURE__ */ T("div", {
90
+ className: H,
91
+ role: "group",
92
+ "aria-label": L,
93
+ children: N.map((e, t) => /* @__PURE__ */ E(v.Fragment, { children: [/* @__PURE__ */ T("input", {
94
+ ref: (e) => {
95
+ D.current[t] = e;
96
+ },
97
+ id: `${h}-${t}`,
98
+ name: d ? `${d}-${t}` : void 0,
99
+ type: "text",
100
+ inputMode: "numeric",
101
+ maxLength: 3,
102
+ value: e,
103
+ placeholder: "0",
104
+ disabled: c,
105
+ readOnly: l,
106
+ "aria-label": `${L} octet ${t + 1}`,
107
+ "aria-invalid": !!I,
108
+ className: "tp-omada-std-seg-input",
109
+ onChange: (e) => z(t, e.target.value),
110
+ onKeyDown: (e) => V(e, t, N, D)
111
+ }), t < 3 && /* @__PURE__ */ T("span", {
112
+ className: "tp-omada-std-sep",
113
+ "aria-hidden": "true",
114
+ children: "."
115
+ })] }, t))
116
+ }),
117
+ e === "mac" && /* @__PURE__ */ T("div", {
118
+ className: H,
119
+ role: "group",
120
+ "aria-label": L,
121
+ children: P.map((e, t) => /* @__PURE__ */ E(v.Fragment, { children: [/* @__PURE__ */ T("input", {
122
+ ref: (e) => {
123
+ O.current[t] = e;
124
+ },
125
+ id: `${h}-${t}`,
126
+ name: d ? `${d}-${t}` : void 0,
127
+ type: "text",
128
+ maxLength: 2,
129
+ value: e,
130
+ placeholder: "00",
131
+ disabled: c,
132
+ readOnly: l,
133
+ "aria-label": `${L} byte ${t + 1}`,
134
+ "aria-invalid": !!I,
135
+ className: "tp-omada-std-seg-input",
136
+ onChange: (e) => B(t, e.target.value),
137
+ onKeyDown: (e) => V(e, t, P, O)
138
+ }), t < 5 && /* @__PURE__ */ T("span", {
139
+ className: "tp-omada-std-sep",
140
+ "aria-hidden": "true",
141
+ children: "-"
142
+ })] }, t))
143
+ }),
144
+ (e === "text" || e === "port") && /* @__PURE__ */ T("div", {
145
+ className: H,
146
+ children: /* @__PURE__ */ T("input", {
147
+ id: h,
148
+ name: d,
149
+ type: "text",
150
+ inputMode: e === "port" ? "numeric" : "text",
151
+ value: w,
152
+ placeholder: a ?? (e === "port" ? "1–65535" : ""),
153
+ disabled: c,
154
+ readOnly: l,
155
+ "aria-invalid": !!I,
156
+ className: "tp-omada-std-seg-input tp-omada-std-seg-input--text",
157
+ onChange: (t) => {
158
+ if (c || l) return;
159
+ let n = e === "port" ? t.target.value.replace(/[^0-9]/g, "").slice(0, 5) : t.target.value;
160
+ R(n);
161
+ }
162
+ })
163
+ }),
164
+ I ? /* @__PURE__ */ T("div", {
165
+ className: "tp-omada-std-error",
166
+ role: "alert",
167
+ children: I
168
+ }) : s ? /* @__PURE__ */ T("div", {
169
+ className: "tp-omada-std-helper",
170
+ children: s
171
+ }) : null
172
+ ]
173
+ });
174
+ }, P = [
175
+ {
176
+ key: "dashboard",
177
+ label: "Dashboard",
178
+ icon: "tabbar-dashboard-off",
179
+ activeIcon: "tabbar-dashboard-on"
180
+ },
181
+ {
182
+ key: "insights",
183
+ label: "Insights",
184
+ icon: "tabbar-statistics-off",
185
+ activeIcon: "tabbar-statistics-on"
186
+ },
187
+ {
188
+ key: "devices",
189
+ label: "Devices",
190
+ icon: "tabbar-device-off",
191
+ activeIcon: "tabbar-device-on"
192
+ },
193
+ {
194
+ key: "clients",
195
+ label: "Clients",
196
+ icon: "tabbar-client-off",
197
+ activeIcon: "tabbar-client-on"
198
+ },
199
+ {
200
+ key: "settings",
201
+ label: "Settings",
202
+ icon: "tabbar-settings-off",
203
+ activeIcon: "tabbar-settings-on"
204
+ }
205
+ ], F = [
206
+ {
207
+ id: "dev-gw-1",
208
+ mac: "8C-86-DD-A6-A7-5F",
209
+ name: "8C-86-DD-A6-A7-5F",
210
+ model: "ER7212PC",
211
+ type: "gateway",
212
+ status: "connected",
213
+ ip: "192.168.0.1",
214
+ healthLabel: "Good-10",
215
+ healthTone: "good",
216
+ upgradeAvailable: !1,
217
+ firmwareVersion: "v6.3.0.63",
218
+ uptime: "18d 04h 22m",
219
+ cpuPct: 3,
220
+ memoryPct: 31
221
+ },
222
+ {
223
+ id: "dev-ap-1",
224
+ mac: "3C-78-95-F0-45-F1",
225
+ name: "3C-78-95-F0-45-F1",
226
+ model: "EAP723",
227
+ type: "ap",
228
+ status: "connected",
229
+ ip: "192.168.0.2",
230
+ healthLabel: "Good-10",
231
+ healthTone: "good",
232
+ upgradeAvailable: !0,
233
+ firmwareVersion: "v1.2.0",
234
+ targetVersion: "v1.3.2",
235
+ uptime: "14d 11h 09m",
236
+ cpuPct: 6,
237
+ memoryPct: 42
238
+ },
239
+ {
240
+ id: "dev-ap-2",
241
+ mac: "3C-78-95-F0-46-0C",
242
+ name: "3C-78-95-F0-46-0C",
243
+ model: "EAP723",
244
+ type: "ap",
245
+ status: "connected",
246
+ ip: "192.168.0.3",
247
+ healthLabel: "Good-10",
248
+ healthTone: "good",
249
+ upgradeAvailable: !0,
250
+ firmwareVersion: "v1.2.0",
251
+ targetVersion: "v1.3.2",
252
+ uptime: "14d 11h 04m",
253
+ cpuPct: 5,
254
+ memoryPct: 39
255
+ }
256
+ ], I = ({ type: e, size: t = 38 }) => e === "ap" ? /* @__PURE__ */ T("span", {
257
+ style: {
258
+ display: "inline-flex",
259
+ alignItems: "center",
260
+ justifyContent: "center",
261
+ width: t,
262
+ height: t,
263
+ color: "#EBEBF0"
264
+ },
265
+ children: /* @__PURE__ */ T(g, {
266
+ name: "client-ap",
267
+ size: t,
268
+ color: "#EBEBF0"
269
+ })
270
+ }) : /* @__PURE__ */ T(g, {
271
+ name: "client-switch",
272
+ size: t
273
+ }), L = {
274
+ connected: "Connected",
275
+ disconnected: "Disconnected",
276
+ pending: "Pending"
277
+ }, R = {
278
+ gateway: "Gateway",
279
+ switch: "Switches",
280
+ ap: "Access Points"
281
+ }, z = ({ devices: e = F, grouped: t = !1, onSelectDevice: n, emptyTitle: r = "No Devices Found", emptyDescription: i = "Try adjusting your search query or status filter.", className: c = "", style: l }) => {
282
+ if (e.length === 0) return /* @__PURE__ */ T(s, {
283
+ illustration: "no-devices",
284
+ title: r,
285
+ description: i,
286
+ compact: !0,
287
+ className: c,
288
+ style: l
289
+ });
290
+ let u = (e) => {
291
+ let t = e.status === "connected" ? "tp-omada-status-line--good" : e.status === "pending" ? "tp-omada-status-line--warn" : "tp-omada-status-line--alert", r = e.healthTone === "alert" ? "tp-omada-dot--alert" : e.healthTone === "warn" ? "tp-omada-dot--warn" : "";
292
+ return /* @__PURE__ */ T(m, {
293
+ leading: /* @__PURE__ */ T(I, {
294
+ type: e.type,
295
+ size: 38
296
+ }),
297
+ title: /* @__PURE__ */ E("span", {
298
+ style: {
299
+ display: "inline-flex",
300
+ alignItems: "center",
301
+ gap: 6
302
+ },
303
+ children: [/* @__PURE__ */ T("span", { children: e.mac }), e.upgradeAvailable && /* @__PURE__ */ T("span", {
304
+ className: "tp-omada-upgrade-badge",
305
+ title: "Firmware upgrade available",
306
+ "aria-label": "Firmware upgrade available",
307
+ children: /* @__PURE__ */ T("svg", {
308
+ width: "10",
309
+ height: "10",
310
+ viewBox: "0 0 12 12",
311
+ fill: "none",
312
+ "aria-hidden": "true",
313
+ children: /* @__PURE__ */ T("path", {
314
+ d: "M6 9.5V2.5M6 2.5L2.75 5.75M6 2.5L9.25 5.75",
315
+ stroke: "currentColor",
316
+ strokeWidth: "1.6",
317
+ strokeLinecap: "round",
318
+ strokeLinejoin: "round"
319
+ })
320
+ })
321
+ })]
322
+ }),
323
+ subtitle: e.model,
324
+ trailing: /* @__PURE__ */ E("div", {
325
+ className: "tp-omada-row-metrics",
326
+ children: [
327
+ /* @__PURE__ */ T("span", {
328
+ className: `tp-omada-status-line ${t}`,
329
+ children: L[e.status]
330
+ }),
331
+ /* @__PURE__ */ T("span", { children: e.ip }),
332
+ /* @__PURE__ */ E("span", {
333
+ className: "tp-omada-health-dot-row",
334
+ children: [/* @__PURE__ */ T("span", {
335
+ className: `tp-omada-dot ${r}`.trim(),
336
+ "aria-hidden": "true"
337
+ }), /* @__PURE__ */ T("span", { children: e.healthLabel })]
338
+ })
339
+ ]
340
+ }),
341
+ onClick: n ? () => n(e) : void 0
342
+ }, e.id);
343
+ };
344
+ if (!t) return /* @__PURE__ */ T(o, {
345
+ divided: !0,
346
+ className: c,
347
+ style: l,
348
+ children: e.map(u)
349
+ });
350
+ let d = [
351
+ "gateway",
352
+ "switch",
353
+ "ap"
354
+ ];
355
+ return /* @__PURE__ */ T("div", {
356
+ className: c,
357
+ style: {
358
+ display: "flex",
359
+ flexDirection: "column",
360
+ gap: 12,
361
+ ...l
362
+ },
363
+ children: d.map((t) => {
364
+ let n = e.filter((e) => e.type === t);
365
+ return n.length === 0 ? null : /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(a, {
366
+ title: R[t],
367
+ count: n.length
368
+ }), /* @__PURE__ */ T(o, {
369
+ divided: !0,
370
+ children: n.map(u)
371
+ })] }, t);
372
+ })
373
+ });
374
+ }, B = [
375
+ {
376
+ key: "2.4G",
377
+ label: "2.4 GHz"
378
+ },
379
+ {
380
+ key: "5G",
381
+ label: "5 GHz"
382
+ },
383
+ {
384
+ key: "6G",
385
+ label: "6 GHz"
386
+ }
387
+ ], V = [
388
+ "WPA3-Personal",
389
+ "WPA2/WPA3",
390
+ "WPA2-Personal",
391
+ "Open"
392
+ ], H = ({ initialConfig: t, showHeader: n = !0, onBack: i, onSave: s, className: c = "", style: l }) => {
393
+ let [u, p] = C(t?.ssid ?? "Sara Banday"), [v, y] = C(t?.enabled ?? !0), [b, x] = C(t?.bands ?? [
394
+ "2.4G",
395
+ "5G",
396
+ "6G"
397
+ ]), [S, w] = C(t?.security ?? "WPA3-Personal"), [D, O] = C(t?.vlanId ?? "10"), [k, A] = C(t?.aclGatewayIp ?? "192.168.0.1"), [j, M] = C(t?.aclMacAddress ?? "8C-86-DD-A6-A7-5F"), [P, F] = C(!1), [I, L] = C(!1), R = (e) => {
398
+ x((t) => t.includes(e) ? t.length > 1 ? t.filter((t) => t !== e) : t : [...t, e]);
399
+ };
400
+ return /* @__PURE__ */ E("div", {
401
+ className: `tp-omada-screen ${c}`.trim(),
402
+ style: l,
403
+ children: [
404
+ n && /* @__PURE__ */ T(r, {
405
+ variant: "floating",
406
+ title: "Wireless Networks",
407
+ subtitle: "SSID & Access Control",
408
+ left: i ? /* @__PURE__ */ T("button", {
409
+ type: "button",
410
+ className: "tp-omada-glass-btn",
411
+ onClick: i,
412
+ "aria-label": "Back",
413
+ children: /* @__PURE__ */ T(g, {
414
+ name: "nav-back",
415
+ size: 20
416
+ })
417
+ }) : void 0
418
+ }),
419
+ /* @__PURE__ */ T("div", {
420
+ className: "tp-omada-scroll",
421
+ children: /* @__PURE__ */ E("div", {
422
+ className: "tp-omada-body",
423
+ children: [
424
+ /* @__PURE__ */ T(a, { title: "Basic Wireless Settings" }),
425
+ /* @__PURE__ */ E(o, {
426
+ divided: !0,
427
+ children: [
428
+ /* @__PURE__ */ T("div", {
429
+ style: { padding: "12px 16px" },
430
+ children: /* @__PURE__ */ T(N, {
431
+ type: "text",
432
+ label: "Network Name (SSID)",
433
+ value: u,
434
+ onChange: p,
435
+ placeholder: "Enter SSID"
436
+ })
437
+ }),
438
+ /* @__PURE__ */ T(m, {
439
+ leading: /* @__PURE__ */ T(g, {
440
+ name: "qa-ssid",
441
+ size: 22
442
+ }),
443
+ title: "Enable WLAN",
444
+ subtitle: v ? "Broadcasting on selected bands" : "Disabled",
445
+ trailing: /* @__PURE__ */ T(e, {
446
+ checked: v,
447
+ onChange: y,
448
+ ariaLabel: "Enable Wireless Network"
449
+ })
450
+ }),
451
+ /* @__PURE__ */ E("div", {
452
+ style: {
453
+ padding: "12px 16px",
454
+ display: "flex",
455
+ flexDirection: "column",
456
+ gap: 10
457
+ },
458
+ children: [/* @__PURE__ */ T("span", {
459
+ className: "tp-omada-std-input-label",
460
+ children: "Frequency Band"
461
+ }), /* @__PURE__ */ T("div", {
462
+ className: "tp-omada-chip-group",
463
+ children: B.map((e) => /* @__PURE__ */ T(h, {
464
+ selected: b.includes(e.key),
465
+ onClick: () => R(e.key),
466
+ children: e.label
467
+ }, e.key))
468
+ })]
469
+ }),
470
+ /* @__PURE__ */ E("div", {
471
+ style: {
472
+ padding: "12px 16px",
473
+ display: "flex",
474
+ flexDirection: "column",
475
+ gap: 10
476
+ },
477
+ children: [/* @__PURE__ */ T("span", {
478
+ className: "tp-omada-std-input-label",
479
+ children: "Security"
480
+ }), /* @__PURE__ */ T("div", {
481
+ className: "tp-omada-chip-group",
482
+ children: V.map((e) => /* @__PURE__ */ T(h, {
483
+ selected: S === e,
484
+ onClick: () => w(e),
485
+ children: e
486
+ }, e))
487
+ })]
488
+ }),
489
+ /* @__PURE__ */ T("div", {
490
+ style: { padding: "12px 16px" },
491
+ children: /* @__PURE__ */ T(N, {
492
+ type: "port",
493
+ label: "VLAN ID",
494
+ value: D,
495
+ onChange: O,
496
+ helperText: "Valid IEEE 802.1Q VLAN ID (1–4094)"
497
+ })
498
+ })
499
+ ]
500
+ }),
501
+ /* @__PURE__ */ T(a, { title: "IP / MAC Access Control (ACL)" }),
502
+ /* @__PURE__ */ T(o, {
503
+ divided: !0,
504
+ children: /* @__PURE__ */ E("div", {
505
+ style: {
506
+ padding: "12px 16px",
507
+ display: "flex",
508
+ flexDirection: "column",
509
+ gap: 14
510
+ },
511
+ children: [/* @__PURE__ */ T(N, {
512
+ type: "ip",
513
+ label: "Allowed Gateway IP",
514
+ value: k,
515
+ onChange: A
516
+ }), /* @__PURE__ */ T(N, {
517
+ type: "mac",
518
+ label: "MAC Filter Allowlist",
519
+ value: j,
520
+ onChange: M
521
+ })]
522
+ })
523
+ }),
524
+ /* @__PURE__ */ T("div", {
525
+ style: { marginTop: 4 },
526
+ children: /* @__PURE__ */ T(d, {
527
+ variant: "primary",
528
+ block: !0,
529
+ onClick: () => {
530
+ let e = {
531
+ ssid: u,
532
+ enabled: v,
533
+ bands: b,
534
+ security: S,
535
+ vlanId: D,
536
+ aclGatewayIp: k,
537
+ aclMacAddress: j
538
+ };
539
+ L(!1), F(!0), s?.(e);
540
+ },
541
+ children: "Save & Deploy Configuration"
542
+ })
543
+ })
544
+ ]
545
+ })
546
+ }),
547
+ /* @__PURE__ */ T(f, {
548
+ open: P,
549
+ title: I ? "Configuration Applied" : "Deploying Configuration",
550
+ subtitle: `SSID: ${u || "Unnamed"} • ${b.join(" / ")}`,
551
+ onClose: () => F(!1),
552
+ children: /* @__PURE__ */ E("div", {
553
+ style: {
554
+ display: "flex",
555
+ flexDirection: "column",
556
+ alignItems: "center",
557
+ gap: 14,
558
+ padding: "8px 0 12px"
559
+ },
560
+ children: [
561
+ /* @__PURE__ */ T(_, {
562
+ name: "deploy-config",
563
+ width: 112,
564
+ height: 112,
565
+ playing: !I
566
+ }),
567
+ /* @__PURE__ */ T("div", {
568
+ style: {
569
+ textAlign: "center",
570
+ fontSize: 14,
571
+ color: "var(--tp-text-secondary-alt)"
572
+ },
573
+ children: I ? `Synced ${S} profile (VLAN ${D || "1"}) to 2 EAP723 access points.` : `Pushing ${S} policy and ACL rules (${k}) to site APs…`
574
+ }),
575
+ /* @__PURE__ */ T("div", {
576
+ style: {
577
+ display: "flex",
578
+ gap: 10,
579
+ width: "100%"
580
+ },
581
+ children: I ? /* @__PURE__ */ T(d, {
582
+ variant: "secondary",
583
+ block: !0,
584
+ onClick: () => F(!1),
585
+ children: "Done"
586
+ }) : /* @__PURE__ */ T(d, {
587
+ variant: "primary",
588
+ block: !0,
589
+ onClick: () => L(!0),
590
+ children: "Confirm Provisioning"
591
+ })
592
+ })
593
+ ]
594
+ })
595
+ })
596
+ ]
597
+ });
598
+ }, U = [
599
+ {
600
+ id: "log-1",
601
+ category: "alert",
602
+ severity: "warning",
603
+ title: "Firmware Update Available (v1.3.2)",
604
+ description: "EAP723 (3C-78-95-F0-45-F1, 3C-78-95-F0-46-0C) pending upgrade.",
605
+ timestamp: "10:42 AM",
606
+ unread: !0
607
+ },
608
+ {
609
+ id: "log-2",
610
+ category: "device",
611
+ severity: "info",
612
+ title: "ER7212PC WAN3 Link Up",
613
+ description: "192.168.0.1 negotiated 1000 Mbps Full Duplex on WAN3.",
614
+ timestamp: "09:18 AM",
615
+ unread: !1
616
+ },
617
+ {
618
+ id: "log-3",
619
+ category: "client",
620
+ severity: "info",
621
+ title: "Client Roamed to 3C-78-95-F0-45-F1",
622
+ description: "92-Sarabande (192.168.0.12) connected to Sara Banday (-28 dBm).",
623
+ timestamp: "08:51 AM",
624
+ unread: !1
625
+ },
626
+ {
627
+ id: "log-4",
628
+ category: "operation",
629
+ severity: "info",
630
+ title: "Site Health Score Evaluated",
631
+ description: "Site 92 scored 100 across Device, Wi-Fi, and WAN checks.",
632
+ timestamp: "Yesterday",
633
+ unread: !1
634
+ }
635
+ ], W = {
636
+ alert: "status-warning-solid",
637
+ device: "log-device",
638
+ client: "log-clients",
639
+ operation: "log-operation"
640
+ }, ee = [
641
+ {
642
+ key: "all",
643
+ label: "All"
644
+ },
645
+ {
646
+ key: "alert",
647
+ label: "Alerts"
648
+ },
649
+ {
650
+ key: "device",
651
+ label: "Device"
652
+ },
653
+ {
654
+ key: "client",
655
+ label: "Client"
656
+ },
657
+ {
658
+ key: "operation",
659
+ label: "Operation"
660
+ }
661
+ ], G = ({ incidents: e = U, showHeader: t = !0, onBack: n, onUnreadCountChange: i, className: c = "", style: l }) => {
662
+ let [u, f] = C([...e]), [p, _] = C("all"), v = x(() => u.filter((e) => e.unread).length, [u]), y = x(() => p === "all" ? u : u.filter((e) => e.category === p), [u, p]), b = () => {
663
+ f((e) => e.map((e) => ({
664
+ ...e,
665
+ unread: !1
666
+ }))), i?.(0);
667
+ };
668
+ return /* @__PURE__ */ E("div", {
669
+ className: `tp-omada-screen ${c}`.trim(),
670
+ style: l,
671
+ children: [t && /* @__PURE__ */ T(r, {
672
+ variant: "floating",
673
+ title: "Logs",
674
+ subtitle: "Alerts & Site Events",
675
+ left: n ? /* @__PURE__ */ T("button", {
676
+ type: "button",
677
+ className: "tp-omada-glass-btn",
678
+ onClick: n,
679
+ "aria-label": "Back",
680
+ children: /* @__PURE__ */ T(g, {
681
+ name: "nav-back",
682
+ size: 20
683
+ })
684
+ }) : void 0,
685
+ right: v > 0 ? /* @__PURE__ */ T(d, {
686
+ variant: "text",
687
+ size: "sm",
688
+ onClick: b,
689
+ children: "Mark All Read"
690
+ }) : void 0
691
+ }), /* @__PURE__ */ T("div", {
692
+ className: "tp-omada-scroll",
693
+ children: /* @__PURE__ */ E("div", {
694
+ className: "tp-omada-body",
695
+ children: [
696
+ /* @__PURE__ */ T("div", {
697
+ className: "tp-omada-chip-group",
698
+ children: ee.map((e) => /* @__PURE__ */ T(h, {
699
+ selected: p === e.key,
700
+ onClick: () => _(e.key),
701
+ children: e.label
702
+ }, e.key))
703
+ }),
704
+ /* @__PURE__ */ T(a, {
705
+ title: "Event Timeline",
706
+ count: y.length,
707
+ action: v > 0 ? /* @__PURE__ */ E("button", {
708
+ type: "button",
709
+ onClick: b,
710
+ style: {
711
+ border: "none",
712
+ background: "transparent",
713
+ color: "var(--tp-focus)",
714
+ fontSize: 13,
715
+ cursor: "pointer",
716
+ padding: 0
717
+ },
718
+ children: [
719
+ "Mark All Read (",
720
+ v,
721
+ ")"
722
+ ]
723
+ }) : void 0
724
+ }),
725
+ y.length === 0 ? /* @__PURE__ */ T(s, {
726
+ illustration: "no-data",
727
+ title: "No Events",
728
+ description: "No logs match the selected category.",
729
+ compact: !0
730
+ }) : /* @__PURE__ */ T(o, {
731
+ divided: !0,
732
+ children: y.map((e) => /* @__PURE__ */ T(m, {
733
+ leading: /* @__PURE__ */ T(g, {
734
+ name: e.severity === "error" ? "status-error-solid" : W[e.category],
735
+ size: 22
736
+ }),
737
+ title: /* @__PURE__ */ E("span", {
738
+ style: {
739
+ display: "inline-flex",
740
+ alignItems: "center",
741
+ gap: 6
742
+ },
743
+ children: [/* @__PURE__ */ T("span", { children: e.title }), e.unread && /* @__PURE__ */ T("span", { className: "tp-omada-dot tp-omada-dot--alert" })]
744
+ }),
745
+ subtitle: e.description,
746
+ value: e.timestamp,
747
+ onClick: () => {
748
+ e.unread && f((t) => {
749
+ let n = t.map((t) => t.id === e.id ? {
750
+ ...t,
751
+ unread: !1
752
+ } : t);
753
+ return i?.(n.filter((e) => e.unread).length), n;
754
+ });
755
+ }
756
+ }, e.id))
757
+ })
758
+ ]
759
+ })
760
+ })]
761
+ });
762
+ }, K = ({ siteName: e = "92", controllerName: t = "62", upgradeVersion: i = "V2.5.2", activeTab: a = "dashboard", onTabChange: o, onBackToGlobal: s, onOpenLogs: c, onUpgrade: l, onToolkitClick: u, showUpgradeBanner: d = !0, showTabBar: f = !0, showFloatingAction: m = !0, className: h = "", style: _ }) => {
763
+ let [v, y] = C(d);
764
+ return /* @__PURE__ */ E("div", {
765
+ className: `tp-omada-screen ${f ? "tp-omada-screen--standalone" : ""} ${h}`.trim(),
766
+ "data-testid": "omada-launch-loading-page",
767
+ style: _,
768
+ children: [
769
+ /* @__PURE__ */ T("div", {
770
+ className: "tp-omada-header-wrap",
771
+ children: /* @__PURE__ */ T(r, {
772
+ variant: "floating",
773
+ title: e,
774
+ subtitle: t,
775
+ titleDropdown: !0,
776
+ left: /* @__PURE__ */ T("button", {
777
+ type: "button",
778
+ className: "tp-header-icon-btn",
779
+ "aria-label": "Back to controllers",
780
+ onClick: s,
781
+ children: /* @__PURE__ */ T(g, {
782
+ name: "nav-back-to-global",
783
+ size: 20
784
+ })
785
+ }),
786
+ right: /* @__PURE__ */ T("button", {
787
+ type: "button",
788
+ className: "tp-header-icon-btn",
789
+ "aria-label": "Logs",
790
+ onClick: c,
791
+ children: /* @__PURE__ */ T(g, {
792
+ name: "nav-log",
793
+ size: 20
794
+ })
795
+ })
796
+ })
797
+ }),
798
+ /* @__PURE__ */ T("div", {
799
+ className: "tp-omada-scroll",
800
+ children: /* @__PURE__ */ E("div", {
801
+ className: `tp-omada-body ${f ? "tp-omada-body--with-tabbar" : ""}`.trim(),
802
+ children: [
803
+ v && /* @__PURE__ */ T(p, {
804
+ tone: "info",
805
+ className: "tp-omada-upgrade-prompt",
806
+ title: `New version found: ${i}`,
807
+ actionLabel: "Upgrade Now",
808
+ onAction: l,
809
+ closable: !0,
810
+ onClose: () => y(!1)
811
+ }),
812
+ /* @__PURE__ */ E("div", {
813
+ className: "tp-omada-skeleton-card",
814
+ "aria-label": "Loading site summary",
815
+ children: [
816
+ /* @__PURE__ */ T("div", {
817
+ className: "tp-omada-skeleton-block",
818
+ style: {
819
+ height: 22,
820
+ width: "100%"
821
+ }
822
+ }),
823
+ /* @__PURE__ */ T("div", {
824
+ className: "tp-omada-skeleton-block",
825
+ style: {
826
+ height: 18,
827
+ width: "100%"
828
+ }
829
+ }),
830
+ /* @__PURE__ */ E("div", {
831
+ className: "tp-omada-skeleton-tiles",
832
+ children: [
833
+ /* @__PURE__ */ T("div", {
834
+ className: "tp-omada-skeleton-block",
835
+ style: {
836
+ height: 62,
837
+ borderRadius: 10
838
+ }
839
+ }),
840
+ /* @__PURE__ */ T("div", {
841
+ className: "tp-omada-skeleton-block",
842
+ style: {
843
+ height: 62,
844
+ borderRadius: 10
845
+ }
846
+ }),
847
+ /* @__PURE__ */ T("div", {
848
+ className: "tp-omada-skeleton-block",
849
+ style: {
850
+ height: 62,
851
+ borderRadius: 10
852
+ }
853
+ }),
854
+ /* @__PURE__ */ T("div", {
855
+ className: "tp-omada-skeleton-block",
856
+ style: {
857
+ height: 62,
858
+ borderRadius: 10
859
+ }
860
+ })
861
+ ]
862
+ }),
863
+ /* @__PURE__ */ E("div", {
864
+ style: {
865
+ display: "flex",
866
+ flexDirection: "column",
867
+ gap: 10,
868
+ marginTop: 8
869
+ },
870
+ children: [
871
+ /* @__PURE__ */ T("div", {
872
+ className: "tp-omada-skeleton-block",
873
+ style: {
874
+ height: 6,
875
+ width: "100%"
876
+ }
877
+ }),
878
+ /* @__PURE__ */ T("div", {
879
+ className: "tp-omada-skeleton-block",
880
+ style: {
881
+ height: 6,
882
+ width: "100%"
883
+ }
884
+ }),
885
+ /* @__PURE__ */ T("div", {
886
+ className: "tp-omada-skeleton-block",
887
+ style: {
888
+ height: 6,
889
+ width: "100%"
890
+ }
891
+ }),
892
+ /* @__PURE__ */ T("div", {
893
+ className: "tp-omada-skeleton-block",
894
+ style: {
895
+ height: 6,
896
+ width: "100%"
897
+ }
898
+ })
899
+ ]
900
+ })
901
+ ]
902
+ }),
903
+ /* @__PURE__ */ E("div", {
904
+ className: "tp-omada-skeleton-card",
905
+ "aria-label": "Loading site health",
906
+ children: [
907
+ /* @__PURE__ */ T("div", {
908
+ className: "tp-omada-skeleton-block",
909
+ style: {
910
+ height: 22,
911
+ width: "100%"
912
+ }
913
+ }),
914
+ /* @__PURE__ */ E("div", {
915
+ style: {
916
+ display: "flex",
917
+ justifyContent: "space-between",
918
+ gap: 12
919
+ },
920
+ children: [/* @__PURE__ */ T("div", {
921
+ className: "tp-omada-skeleton-block",
922
+ style: {
923
+ height: 16,
924
+ width: "38%"
925
+ }
926
+ }), /* @__PURE__ */ T("div", {
927
+ className: "tp-omada-skeleton-block",
928
+ style: {
929
+ height: 16,
930
+ width: "38%"
931
+ }
932
+ })]
933
+ }),
934
+ /* @__PURE__ */ T("div", {
935
+ className: "tp-omada-skeleton-block",
936
+ style: {
937
+ height: 112,
938
+ width: "100%",
939
+ borderRadius: 8
940
+ }
941
+ })
942
+ ]
943
+ }),
944
+ /* @__PURE__ */ E("div", {
945
+ className: "tp-omada-skeleton-card",
946
+ "aria-label": "Loading ISP activity",
947
+ children: [/* @__PURE__ */ T("div", {
948
+ className: "tp-omada-skeleton-block",
949
+ style: {
950
+ height: 16,
951
+ width: "36%"
952
+ }
953
+ }), /* @__PURE__ */ T("div", {
954
+ className: "tp-omada-skeleton-block",
955
+ style: {
956
+ height: 104,
957
+ width: "100%",
958
+ borderRadius: 8
959
+ }
960
+ })]
961
+ })
962
+ ]
963
+ })
964
+ }),
965
+ m && /* @__PURE__ */ T("button", {
966
+ type: "button",
967
+ className: "tp-omada-fab tp-omada-standalone-fab",
968
+ "aria-label": "Network Toolkit",
969
+ onClick: u,
970
+ children: /* @__PURE__ */ T(g, {
971
+ name: "settings-network-tools",
972
+ size: 22,
973
+ color: "#FFFFFF"
974
+ })
975
+ }),
976
+ f && /* @__PURE__ */ T("div", {
977
+ className: "tp-omada-standalone-tabbar",
978
+ children: /* @__PURE__ */ T(n, {
979
+ variant: "floating-pill",
980
+ items: P,
981
+ activeKey: a,
982
+ onChange: (e) => o?.(e)
983
+ })
984
+ })
985
+ ]
986
+ });
987
+ }, q = [
988
+ {
989
+ id: "ctrl-1",
990
+ name: "26-PD自测-CBC-MSP",
991
+ edition: "Omada Standard",
992
+ version: "v6.3.0.200",
993
+ kind: "cloud",
994
+ systemGroup: "Cloud Management"
995
+ },
996
+ {
997
+ id: "ctrl-2",
998
+ name: "26楼-PD自测-MSP",
999
+ edition: "Omada Standard",
1000
+ version: "v6.2.10.17",
1001
+ kind: "software",
1002
+ ips: "192.168.22.11, 192.168.40.1, 192.168.174.1",
1003
+ systemGroup: "Cloud Management"
1004
+ },
1005
+ {
1006
+ id: "ctrl-3",
1007
+ name: "62",
1008
+ edition: "ER7212PC",
1009
+ version: "v6.3.0.63",
1010
+ kind: "hardware",
1011
+ ips: "192.168.0.1, 192.168.1.203",
1012
+ systemGroup: "Cloud Management"
1013
+ },
1014
+ {
1015
+ id: "ctrl-4",
1016
+ name: "Omada Controller_F84012",
1017
+ edition: "Omada Essentials",
1018
+ version: "v6.3.0.200",
1019
+ kind: "cloud",
1020
+ systemGroup: "Cloud Management"
1021
+ },
1022
+ {
1023
+ id: "ctrl-5",
1024
+ name: "Omada Controller_office",
1025
+ edition: "Omada Standard",
1026
+ version: "v6.3.0.200",
1027
+ kind: "cloud",
1028
+ systemGroup: "Cloud Management"
1029
+ }
1030
+ ], te = () => /* @__PURE__ */ E("svg", {
1031
+ width: "38",
1032
+ height: "38",
1033
+ viewBox: "0 0 40 40",
1034
+ fill: "none",
1035
+ "aria-hidden": "true",
1036
+ children: [
1037
+ /* @__PURE__ */ T("defs", { children: /* @__PURE__ */ E("linearGradient", {
1038
+ id: "tpOmadaCloudBody",
1039
+ x1: "20",
1040
+ y1: "10",
1041
+ x2: "20",
1042
+ y2: "30",
1043
+ gradientUnits: "userSpaceOnUse",
1044
+ children: [/* @__PURE__ */ T("stop", { stopColor: "#E4E4E7" }), /* @__PURE__ */ T("stop", {
1045
+ offset: "1",
1046
+ stopColor: "#8E8E93"
1047
+ })]
1048
+ }) }),
1049
+ /* @__PURE__ */ T("path", {
1050
+ d: "M12.5 28.5H28.5C32.09 28.5 35 25.68 35 22.2C35 18.96 32.47 16.31 29.22 15.96C28.14 11.98 24.48 9.05 20.12 9.05C14.88 9.05 10.64 13.18 10.64 18.28C10.64 18.42 10.64 18.56 10.65 18.7C7.46 19.27 5 22.02 5 25.35C5 27.1 5.95 28.5 12.5 28.5Z",
1051
+ fill: "url(#tpOmadaCloudBody)"
1052
+ }),
1053
+ /* @__PURE__ */ T("rect", {
1054
+ x: "17",
1055
+ y: "22",
1056
+ width: "6",
1057
+ height: "2",
1058
+ rx: "1",
1059
+ fill: "#00A870"
1060
+ })
1061
+ ]
1062
+ }), ne = ({ kind: e }) => e === "software" ? /* @__PURE__ */ T("span", {
1063
+ style: {
1064
+ color: "#8E8E93",
1065
+ display: "inline-flex"
1066
+ },
1067
+ children: /* @__PURE__ */ T(g, {
1068
+ name: "client-controller",
1069
+ size: 38,
1070
+ color: "#8E8E93"
1071
+ })
1072
+ }) : e === "hardware" ? /* @__PURE__ */ E("span", {
1073
+ className: "tp-omada-ctrl-thumb-wrap",
1074
+ children: [/* @__PURE__ */ T(g, {
1075
+ name: "client-switch",
1076
+ size: 38
1077
+ }), /* @__PURE__ */ T("span", {
1078
+ className: "tp-omada-ctrl-mini-badge",
1079
+ "aria-hidden": "true",
1080
+ children: /* @__PURE__ */ E("svg", {
1081
+ width: "8",
1082
+ height: "8",
1083
+ viewBox: "0 0 10 10",
1084
+ fill: "none",
1085
+ children: [
1086
+ /* @__PURE__ */ T("rect", {
1087
+ x: "1",
1088
+ y: "1",
1089
+ width: "3",
1090
+ height: "3",
1091
+ rx: "0.6",
1092
+ fill: "currentColor"
1093
+ }),
1094
+ /* @__PURE__ */ T("rect", {
1095
+ x: "6",
1096
+ y: "1",
1097
+ width: "3",
1098
+ height: "3",
1099
+ rx: "0.6",
1100
+ fill: "currentColor"
1101
+ }),
1102
+ /* @__PURE__ */ T("rect", {
1103
+ x: "1",
1104
+ y: "6",
1105
+ width: "3",
1106
+ height: "3",
1107
+ rx: "0.6",
1108
+ fill: "currentColor"
1109
+ }),
1110
+ /* @__PURE__ */ T("rect", {
1111
+ x: "6",
1112
+ y: "6",
1113
+ width: "3",
1114
+ height: "3",
1115
+ rx: "0.6",
1116
+ fill: "currentColor"
1117
+ })
1118
+ ]
1119
+ })
1120
+ })]
1121
+ }) : /* @__PURE__ */ T(te, {}), J = [
1122
+ {
1123
+ key: "all",
1124
+ label: "All Systems"
1125
+ },
1126
+ {
1127
+ key: "standard",
1128
+ label: "Omada Standard"
1129
+ },
1130
+ {
1131
+ key: "essentials",
1132
+ label: "Omada Essentials"
1133
+ },
1134
+ {
1135
+ key: "hardware",
1136
+ label: "Hardware Controllers"
1137
+ }
1138
+ ], Y = ({ controllers: e = q, onSelectController: t, onAddController: n, onAvatarClick: i, className: u = "", style: p }) => {
1139
+ let [h, _] = C(""), [v, y] = C("all"), [b, S] = C(!1), [w, D] = C(!1), [O, k] = C("192.168.0.10"), A = J.find((e) => e.key === v)?.label ?? "All Systems", j = x(() => J.map((e) => ({
1140
+ key: e.key,
1141
+ label: e.label,
1142
+ selected: v === e.key
1143
+ })), [v]), M = x(() => {
1144
+ let t = h.trim().toLowerCase();
1145
+ return e.filter((e) => v === "standard" && e.edition !== "Omada Standard" || v === "essentials" && e.edition !== "Omada Essentials" || v === "hardware" && e.kind !== "hardware" ? !1 : !t || e.name.toLowerCase().includes(t) || e.edition.toLowerCase().includes(t) || e.version.toLowerCase().includes(t) || (e.ips ? e.ips.toLowerCase().includes(t) : !1));
1146
+ }, [
1147
+ e,
1148
+ h,
1149
+ v
1150
+ ]);
1151
+ return /* @__PURE__ */ E("div", {
1152
+ className: `tp-omada-screen ${u}`.trim(),
1153
+ "data-testid": "omada-controller-list-page",
1154
+ style: p,
1155
+ children: [
1156
+ /* @__PURE__ */ E("div", {
1157
+ className: "tp-omada-header-wrap",
1158
+ children: [/* @__PURE__ */ T(r, {
1159
+ variant: "floating",
1160
+ title: A,
1161
+ titleDropdown: !0,
1162
+ onTitleClick: () => S((e) => !e),
1163
+ left: /* @__PURE__ */ T("button", {
1164
+ type: "button",
1165
+ className: "tp-header-icon-btn",
1166
+ "aria-label": "Account profile",
1167
+ onClick: i,
1168
+ children: /* @__PURE__ */ T("span", {
1169
+ className: "tp-omada-avatar-c",
1170
+ children: "C"
1171
+ })
1172
+ }),
1173
+ right: /* @__PURE__ */ T("button", {
1174
+ type: "button",
1175
+ className: "tp-header-icon-btn",
1176
+ "aria-label": "Add controller",
1177
+ onClick: () => {
1178
+ n ? n() : D(!0);
1179
+ },
1180
+ children: /* @__PURE__ */ T(g, {
1181
+ name: "nav-add",
1182
+ size: 20
1183
+ })
1184
+ })
1185
+ }), /* @__PURE__ */ T(c, {
1186
+ open: b,
1187
+ align: "center",
1188
+ items: j,
1189
+ onSelect: (e) => y(e.key),
1190
+ onClose: () => S(!1)
1191
+ })]
1192
+ }),
1193
+ /* @__PURE__ */ T("div", {
1194
+ className: "tp-omada-scroll",
1195
+ children: /* @__PURE__ */ E("div", {
1196
+ className: "tp-omada-body",
1197
+ children: [
1198
+ /* @__PURE__ */ T(l, {
1199
+ value: h,
1200
+ placeholder: "Search",
1201
+ onChange: _,
1202
+ onSearch: _
1203
+ }),
1204
+ /* @__PURE__ */ T(a, {
1205
+ title: "Cloud Management",
1206
+ count: M.length
1207
+ }),
1208
+ M.length === 0 ? /* @__PURE__ */ T(s, {
1209
+ illustration: "no-controllers",
1210
+ title: "No Controllers Found",
1211
+ description: "No matching Omada controllers found.",
1212
+ compact: !0
1213
+ }) : /* @__PURE__ */ T(o, {
1214
+ divided: !0,
1215
+ children: M.map((e) => /* @__PURE__ */ T(m, {
1216
+ leading: /* @__PURE__ */ T(ne, { kind: e.kind }),
1217
+ title: e.name,
1218
+ subtitle: `${e.edition} | ${e.version}`,
1219
+ description: e.ips,
1220
+ onClick: () => t?.(e)
1221
+ }, e.id))
1222
+ })
1223
+ ]
1224
+ })
1225
+ }),
1226
+ /* @__PURE__ */ T(f, {
1227
+ open: w,
1228
+ title: "Add Controller",
1229
+ subtitle: "Connect via Cloud Access or Local IP",
1230
+ onClose: () => D(!1),
1231
+ children: /* @__PURE__ */ E("div", {
1232
+ style: {
1233
+ display: "flex",
1234
+ flexDirection: "column",
1235
+ gap: 14
1236
+ },
1237
+ children: [/* @__PURE__ */ T(N, {
1238
+ type: "ip",
1239
+ label: "Controller IP Address",
1240
+ value: O,
1241
+ onChange: k
1242
+ }), /* @__PURE__ */ T(d, {
1243
+ variant: "primary",
1244
+ block: !0,
1245
+ onClick: () => D(!1),
1246
+ children: "Connect Controller"
1247
+ })]
1248
+ })
1249
+ })
1250
+ ]
1251
+ });
1252
+ }, re = [
1253
+ "92",
1254
+ "92-Lab",
1255
+ "Branch-West",
1256
+ "HQ-Core"
1257
+ ], ie = [
1258
+ {
1259
+ key: "speed",
1260
+ label: "Speed Test",
1261
+ icon: "tool-speed-test",
1262
+ summary: "WAN3: 942 Mbps ↓ / 418 Mbps ↑"
1263
+ },
1264
+ {
1265
+ key: "ping",
1266
+ label: "Ping Test",
1267
+ icon: "tool-ping-test",
1268
+ summary: "1.1.1.1 avg 3.2 ms • 0% loss"
1269
+ },
1270
+ {
1271
+ key: "tracert",
1272
+ label: "Traceroute",
1273
+ icon: "tool-tracert",
1274
+ summary: "4 hops to edge POP (3.4 ms)"
1275
+ },
1276
+ {
1277
+ key: "wifi-scan",
1278
+ label: "Wi-Fi Scan",
1279
+ icon: "tool-wi-fi-scan",
1280
+ summary: "5 GHz Ch 36 optimal (12% util)"
1281
+ },
1282
+ {
1283
+ key: "roaming",
1284
+ label: "Roaming Test",
1285
+ icon: "tool-roaming-test",
1286
+ summary: "802.11k/v/r fast transition < 18 ms"
1287
+ },
1288
+ {
1289
+ key: "iface",
1290
+ label: "Port Detect",
1291
+ icon: "tool-interface-detection",
1292
+ summary: "ER7212PC WAN3 1000M Full"
1293
+ }
1294
+ ], X = ({ siteName: e = "92", controllerName: t = "62", unreadLogsCount: i = 1, activeTab: a = "dashboard", onTabChange: o, onSiteChange: s, onBackToGlobal: l, onOpenLogs: u, onOpenHealthDetail: p, onOpenInsights: m, onOpenDevices: h, onOpenClients: _, onToolkitClick: v, showTabBar: y = !0, showFloatingAction: b = !0, className: S = "", style: w }) => {
1295
+ let [D, O] = C(e), [k, A] = C(!1), [j, M] = C(!1), [N, I] = C(!1), [L, R] = C(null), z = x(() => re.map((e) => ({
1296
+ key: e,
1297
+ label: e,
1298
+ selected: D === e
1299
+ })), [D]);
1300
+ return /* @__PURE__ */ E("div", {
1301
+ className: `tp-omada-screen ${y ? "tp-omada-screen--standalone" : ""} ${S}`.trim(),
1302
+ "data-testid": "omada-site-dashboard-page",
1303
+ style: w,
1304
+ children: [
1305
+ /* @__PURE__ */ E("div", {
1306
+ className: "tp-omada-header-wrap",
1307
+ children: [/* @__PURE__ */ T(r, {
1308
+ variant: "floating",
1309
+ title: D,
1310
+ subtitle: t,
1311
+ titleDropdown: !0,
1312
+ onTitleClick: () => A((e) => !e),
1313
+ rightBadge: i > 0 ? i : void 0,
1314
+ left: /* @__PURE__ */ T("button", {
1315
+ type: "button",
1316
+ className: "tp-header-icon-btn",
1317
+ "aria-label": "Back to controllers",
1318
+ onClick: l,
1319
+ children: /* @__PURE__ */ T(g, {
1320
+ name: "nav-back-to-global",
1321
+ size: 20
1322
+ })
1323
+ }),
1324
+ right: /* @__PURE__ */ T("button", {
1325
+ type: "button",
1326
+ className: "tp-header-icon-btn",
1327
+ "aria-label": "Site logs",
1328
+ onClick: u,
1329
+ children: /* @__PURE__ */ T(g, {
1330
+ name: "nav-log",
1331
+ size: 20
1332
+ })
1333
+ })
1334
+ }), /* @__PURE__ */ T(c, {
1335
+ open: k,
1336
+ align: "center",
1337
+ items: z,
1338
+ onSelect: (e) => {
1339
+ O(e.key), s?.(e.key);
1340
+ },
1341
+ onClose: () => A(!1)
1342
+ })]
1343
+ }),
1344
+ /* @__PURE__ */ T("div", {
1345
+ className: "tp-omada-scroll",
1346
+ children: /* @__PURE__ */ E("div", {
1347
+ className: `tp-omada-body ${y ? "tp-omada-body--with-tabbar" : ""}`.trim(),
1348
+ children: [
1349
+ /* @__PURE__ */ E("section", {
1350
+ className: "tp-omada-card",
1351
+ "aria-label": "Site inventory summary",
1352
+ children: [/* @__PURE__ */ E("div", {
1353
+ className: "tp-omada-kpi-grid",
1354
+ children: [
1355
+ /* @__PURE__ */ E("button", {
1356
+ type: "button",
1357
+ className: "tp-omada-kpi-tile",
1358
+ onClick: h,
1359
+ children: [/* @__PURE__ */ T("span", {
1360
+ className: "tp-omada-adapt-svg",
1361
+ children: /* @__PURE__ */ T(g, {
1362
+ name: "dashboard-gateway",
1363
+ size: 38
1364
+ })
1365
+ }), /* @__PURE__ */ T("span", {
1366
+ className: "tp-omada-kpi-count",
1367
+ children: "1"
1368
+ })]
1369
+ }),
1370
+ /* @__PURE__ */ E("button", {
1371
+ type: "button",
1372
+ className: "tp-omada-kpi-tile",
1373
+ onClick: h,
1374
+ children: [/* @__PURE__ */ T("span", {
1375
+ className: "tp-omada-adapt-svg",
1376
+ children: /* @__PURE__ */ T(g, {
1377
+ name: "dashboard-switch",
1378
+ size: 38
1379
+ })
1380
+ }), /* @__PURE__ */ T("span", {
1381
+ className: "tp-omada-kpi-count",
1382
+ children: "0"
1383
+ })]
1384
+ }),
1385
+ /* @__PURE__ */ E("button", {
1386
+ type: "button",
1387
+ className: "tp-omada-kpi-tile",
1388
+ onClick: h,
1389
+ children: [/* @__PURE__ */ T("span", {
1390
+ className: "tp-omada-adapt-svg",
1391
+ children: /* @__PURE__ */ T(g, {
1392
+ name: "dashboard-ap",
1393
+ size: 38
1394
+ })
1395
+ }), /* @__PURE__ */ T("span", {
1396
+ className: "tp-omada-kpi-count",
1397
+ children: "2"
1398
+ })]
1399
+ }),
1400
+ /* @__PURE__ */ E("button", {
1401
+ type: "button",
1402
+ className: "tp-omada-kpi-tile",
1403
+ onClick: _,
1404
+ children: [/* @__PURE__ */ T("span", {
1405
+ className: "tp-omada-adapt-svg",
1406
+ children: /* @__PURE__ */ T(g, {
1407
+ name: "dashboard-client",
1408
+ size: 38
1409
+ })
1410
+ }), /* @__PURE__ */ T("span", {
1411
+ className: "tp-omada-kpi-count",
1412
+ children: "4"
1413
+ })]
1414
+ })
1415
+ ]
1416
+ }), /* @__PURE__ */ E("button", {
1417
+ type: "button",
1418
+ className: "tp-omada-topo-btn",
1419
+ onClick: () => M(!0),
1420
+ children: [/* @__PURE__ */ T(g, {
1421
+ name: "btn-omada-topo",
1422
+ size: 18
1423
+ }), /* @__PURE__ */ T("span", { children: "Topology" })]
1424
+ })]
1425
+ }),
1426
+ /* @__PURE__ */ E("section", {
1427
+ className: "tp-omada-card tp-omada-card--interactive",
1428
+ "aria-label": "Site Health Score",
1429
+ role: p ? "button" : void 0,
1430
+ tabIndex: p ? 0 : void 0,
1431
+ onClick: p,
1432
+ onKeyDown: (e) => {
1433
+ p && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), p());
1434
+ },
1435
+ children: [
1436
+ /* @__PURE__ */ E("div", {
1437
+ className: "tp-omada-card-header",
1438
+ children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
1439
+ className: "tp-omada-card-title",
1440
+ children: "Site Health Score"
1441
+ }), /* @__PURE__ */ T("div", {
1442
+ className: "tp-omada-card-subtitle",
1443
+ children: "Nov 23, 06:30 PM-Nov 23, 06:40 PM"
1444
+ })] }), /* @__PURE__ */ T("span", {
1445
+ className: "tp-omada-health-score-value",
1446
+ children: "100"
1447
+ })]
1448
+ }),
1449
+ /* @__PURE__ */ E("div", {
1450
+ className: "tp-omada-health-subgrid",
1451
+ children: [
1452
+ /* @__PURE__ */ E("div", {
1453
+ className: "tp-omada-health-subcard",
1454
+ children: [/* @__PURE__ */ E("div", {
1455
+ className: "tp-omada-health-subcard-label",
1456
+ children: [/* @__PURE__ */ E("svg", {
1457
+ width: "13",
1458
+ height: "13",
1459
+ viewBox: "0 0 16 16",
1460
+ fill: "none",
1461
+ "aria-hidden": "true",
1462
+ children: [/* @__PURE__ */ T("rect", {
1463
+ x: "2",
1464
+ y: "5",
1465
+ width: "12",
1466
+ height: "7",
1467
+ rx: "1.2",
1468
+ stroke: "currentColor",
1469
+ strokeWidth: "1.2"
1470
+ }), /* @__PURE__ */ T("path", {
1471
+ d: "M5 5V3M11 5V3",
1472
+ stroke: "currentColor",
1473
+ strokeWidth: "1.2",
1474
+ strokeLinecap: "round"
1475
+ })]
1476
+ }), /* @__PURE__ */ T("span", { children: "Device" })]
1477
+ }), /* @__PURE__ */ T("span", {
1478
+ className: "tp-omada-health-subcard-num",
1479
+ children: "100"
1480
+ })]
1481
+ }),
1482
+ /* @__PURE__ */ E("div", {
1483
+ className: "tp-omada-health-subcard",
1484
+ children: [/* @__PURE__ */ E("div", {
1485
+ className: "tp-omada-health-subcard-label",
1486
+ children: [/* @__PURE__ */ T("svg", {
1487
+ width: "13",
1488
+ height: "13",
1489
+ viewBox: "0 0 16 16",
1490
+ fill: "none",
1491
+ "aria-hidden": "true",
1492
+ children: /* @__PURE__ */ T("path", {
1493
+ d: "M2.5 6.2C5.6 3.5 10.4 3.5 13.5 6.2M4.8 8.8C6.6 7.2 9.4 7.2 11.2 8.8M7.2 11.4C7.7 11 8.3 11 8.8 11.4",
1494
+ stroke: "currentColor",
1495
+ strokeWidth: "1.2",
1496
+ strokeLinecap: "round"
1497
+ })
1498
+ }), /* @__PURE__ */ T("span", { children: "Wi-Fi" })]
1499
+ }), /* @__PURE__ */ T("span", {
1500
+ className: "tp-omada-health-subcard-num",
1501
+ children: "100"
1502
+ })]
1503
+ }),
1504
+ /* @__PURE__ */ E("div", {
1505
+ className: "tp-omada-health-subcard",
1506
+ children: [/* @__PURE__ */ E("div", {
1507
+ className: "tp-omada-health-subcard-label",
1508
+ children: [/* @__PURE__ */ E("svg", {
1509
+ width: "13",
1510
+ height: "13",
1511
+ viewBox: "0 0 16 16",
1512
+ fill: "none",
1513
+ "aria-hidden": "true",
1514
+ children: [
1515
+ /* @__PURE__ */ T("circle", {
1516
+ cx: "8",
1517
+ cy: "8",
1518
+ r: "5.5",
1519
+ stroke: "currentColor",
1520
+ strokeWidth: "1.2"
1521
+ }),
1522
+ /* @__PURE__ */ T("ellipse", {
1523
+ cx: "8",
1524
+ cy: "8",
1525
+ rx: "2.4",
1526
+ ry: "5.5",
1527
+ stroke: "currentColor",
1528
+ strokeWidth: "1.1"
1529
+ }),
1530
+ /* @__PURE__ */ T("path", {
1531
+ d: "M2.6 8H13.4",
1532
+ stroke: "currentColor",
1533
+ strokeWidth: "1.1"
1534
+ })
1535
+ ]
1536
+ }), /* @__PURE__ */ T("span", { children: "WAN" })]
1537
+ }), /* @__PURE__ */ T("span", {
1538
+ className: "tp-omada-health-subcard-num",
1539
+ children: "100"
1540
+ })]
1541
+ })
1542
+ ]
1543
+ }),
1544
+ /* @__PURE__ */ E("div", {
1545
+ className: "tp-omada-health-timeline",
1546
+ "aria-hidden": "true",
1547
+ children: [[
1548
+ "Device",
1549
+ "Wi-Fi",
1550
+ "WAN"
1551
+ ].map((e) => /* @__PURE__ */ E("div", {
1552
+ className: "tp-omada-health-bar-row",
1553
+ children: [/* @__PURE__ */ T("span", {
1554
+ className: "tp-omada-health-bar-icon",
1555
+ children: /* @__PURE__ */ T("span", { className: "tp-omada-dot" })
1556
+ }), /* @__PURE__ */ T("div", {
1557
+ className: "tp-omada-health-bar-track",
1558
+ children: /* @__PURE__ */ T("div", {
1559
+ className: "tp-omada-health-bar-fill",
1560
+ style: { width: "94%" }
1561
+ })
1562
+ })]
1563
+ }, e)), /* @__PURE__ */ T("div", {
1564
+ className: "tp-omada-health-scrubber-line",
1565
+ style: { left: "94%" },
1566
+ children: /* @__PURE__ */ T("span", { className: "tp-omada-health-scrubber-thumb" })
1567
+ })]
1568
+ })
1569
+ ]
1570
+ }),
1571
+ /* @__PURE__ */ E("section", {
1572
+ className: "tp-omada-card tp-omada-card--interactive",
1573
+ "aria-label": "ISP Activity",
1574
+ onClick: m,
1575
+ children: [/* @__PURE__ */ E("div", {
1576
+ className: "tp-omada-card-header",
1577
+ children: [/* @__PURE__ */ T("h3", {
1578
+ className: "tp-omada-card-title",
1579
+ children: "ISP Activity"
1580
+ }), /* @__PURE__ */ T(g, {
1581
+ name: "arrow-list",
1582
+ size: 14,
1583
+ color: "var(--tp-text-secondary)"
1584
+ })]
1585
+ }), /* @__PURE__ */ E("div", {
1586
+ className: "tp-omada-isp-list",
1587
+ children: [/* @__PURE__ */ E("div", {
1588
+ className: "tp-omada-isp-row",
1589
+ children: [/* @__PURE__ */ T("span", {
1590
+ className: "tp-omada-isp-name",
1591
+ children: "SFP WAN/LAN1"
1592
+ }), /* @__PURE__ */ E("span", {
1593
+ className: "tp-omada-isp-rates",
1594
+ children: [/* @__PURE__ */ E("span", {
1595
+ className: "tp-omada-rate-item",
1596
+ children: [/* @__PURE__ */ T(g, {
1597
+ name: "upload",
1598
+ size: 13
1599
+ }), /* @__PURE__ */ T("span", { children: "0 bps" })]
1600
+ }), /* @__PURE__ */ E("span", {
1601
+ className: "tp-omada-rate-item",
1602
+ children: [/* @__PURE__ */ T(g, {
1603
+ name: "download",
1604
+ size: 13
1605
+ }), /* @__PURE__ */ T("span", { children: "0 bps" })]
1606
+ })]
1607
+ })]
1608
+ }), /* @__PURE__ */ E("div", {
1609
+ className: "tp-omada-isp-row",
1610
+ children: [/* @__PURE__ */ T("span", {
1611
+ className: "tp-omada-isp-name",
1612
+ children: "WAN3"
1613
+ }), /* @__PURE__ */ E("span", {
1614
+ className: "tp-omada-isp-rates",
1615
+ children: [/* @__PURE__ */ E("span", {
1616
+ className: "tp-omada-rate-item",
1617
+ children: [/* @__PURE__ */ T(g, {
1618
+ name: "upload",
1619
+ size: 13
1620
+ }), /* @__PURE__ */ T("span", { children: "0 bps" })]
1621
+ }), /* @__PURE__ */ E("span", {
1622
+ className: "tp-omada-rate-item",
1623
+ children: [/* @__PURE__ */ T(g, {
1624
+ name: "download",
1625
+ size: 13
1626
+ }), /* @__PURE__ */ T("span", { children: "8 Kbps" })]
1627
+ })]
1628
+ })]
1629
+ })]
1630
+ })]
1631
+ }),
1632
+ /* @__PURE__ */ E("section", {
1633
+ className: "tp-omada-card tp-omada-card--interactive",
1634
+ "aria-label": "Internet Activity",
1635
+ onClick: m,
1636
+ children: [
1637
+ /* @__PURE__ */ E("div", {
1638
+ className: "tp-omada-card-header",
1639
+ children: [/* @__PURE__ */ T("h3", {
1640
+ className: "tp-omada-card-title",
1641
+ children: "Internet Activity"
1642
+ }), /* @__PURE__ */ T(g, {
1643
+ name: "arrow-list",
1644
+ size: 14,
1645
+ color: "var(--tp-text-secondary)"
1646
+ })]
1647
+ }),
1648
+ /* @__PURE__ */ E("div", {
1649
+ className: "tp-omada-legend-col",
1650
+ children: [/* @__PURE__ */ E("div", {
1651
+ className: "tp-omada-legend-row",
1652
+ children: [/* @__PURE__ */ E("span", {
1653
+ className: "tp-omada-legend-item",
1654
+ children: [/* @__PURE__ */ T("svg", {
1655
+ width: "14",
1656
+ height: "10",
1657
+ viewBox: "0 0 14 10",
1658
+ fill: "none",
1659
+ "aria-hidden": "true",
1660
+ children: /* @__PURE__ */ T("path", {
1661
+ d: "M1 8L4.5 3.5L7.5 7L10 2L13 8",
1662
+ stroke: "var(--tp-omada-upload)",
1663
+ strokeWidth: "1.4",
1664
+ strokeLinecap: "round",
1665
+ strokeLinejoin: "round"
1666
+ })
1667
+ }), /* @__PURE__ */ T("span", { children: "Upload" })]
1668
+ }), /* @__PURE__ */ E("span", {
1669
+ className: "tp-omada-legend-item",
1670
+ children: [/* @__PURE__ */ T("svg", {
1671
+ width: "14",
1672
+ height: "10",
1673
+ viewBox: "0 0 14 10",
1674
+ fill: "none",
1675
+ "aria-hidden": "true",
1676
+ children: /* @__PURE__ */ T("path", {
1677
+ d: "M1 8L4.5 3.5L7.5 7L10 2L13 8",
1678
+ stroke: "var(--tp-omada-download)",
1679
+ strokeWidth: "1.4",
1680
+ strokeLinecap: "round",
1681
+ strokeLinejoin: "round"
1682
+ })
1683
+ }), /* @__PURE__ */ T("span", { children: "Download" })]
1684
+ })]
1685
+ }), /* @__PURE__ */ E("div", {
1686
+ className: "tp-omada-legend-row",
1687
+ children: [/* @__PURE__ */ E("span", {
1688
+ className: "tp-omada-legend-item",
1689
+ children: [/* @__PURE__ */ T("span", {
1690
+ className: "tp-omada-legend-dot",
1691
+ style: { background: "var(--tp-omada-upload)" }
1692
+ }), /* @__PURE__ */ T("span", { children: "Wired Clients" })]
1693
+ }), /* @__PURE__ */ E("span", {
1694
+ className: "tp-omada-legend-item",
1695
+ children: [/* @__PURE__ */ T("span", {
1696
+ className: "tp-omada-legend-dot",
1697
+ style: { background: "var(--tp-color-green)" }
1698
+ }), /* @__PURE__ */ T("span", { children: "Wireless Clients" })]
1699
+ })]
1700
+ })]
1701
+ }),
1702
+ /* @__PURE__ */ E("div", {
1703
+ style: { marginTop: 10 },
1704
+ children: [/* @__PURE__ */ E("div", {
1705
+ className: "tp-omada-chart-axis-row",
1706
+ children: [/* @__PURE__ */ T("span", { children: "24 Mbps" }), /* @__PURE__ */ T("span", { children: "12 Clients" })]
1707
+ }), /* @__PURE__ */ E("svg", {
1708
+ viewBox: "0 0 320 96",
1709
+ width: "100%",
1710
+ height: "96",
1711
+ preserveAspectRatio: "none",
1712
+ "aria-label": "Internet traffic and client waveform chart",
1713
+ style: {
1714
+ display: "block",
1715
+ marginTop: 4
1716
+ },
1717
+ children: [
1718
+ /* @__PURE__ */ E("defs", { children: [/* @__PURE__ */ E("linearGradient", {
1719
+ id: "tpOmadaDlArea",
1720
+ x1: "0",
1721
+ y1: "0",
1722
+ x2: "0",
1723
+ y2: "1",
1724
+ children: [/* @__PURE__ */ T("stop", {
1725
+ offset: "0%",
1726
+ stopColor: "#E57DFA",
1727
+ stopOpacity: "0.28"
1728
+ }), /* @__PURE__ */ T("stop", {
1729
+ offset: "100%",
1730
+ stopColor: "#E57DFA",
1731
+ stopOpacity: "0.02"
1732
+ })]
1733
+ }), /* @__PURE__ */ E("linearGradient", {
1734
+ id: "tpOmadaUlArea",
1735
+ x1: "0",
1736
+ y1: "0",
1737
+ x2: "0",
1738
+ y2: "1",
1739
+ children: [/* @__PURE__ */ T("stop", {
1740
+ offset: "0%",
1741
+ stopColor: "#33A0E9",
1742
+ stopOpacity: "0.22"
1743
+ }), /* @__PURE__ */ T("stop", {
1744
+ offset: "100%",
1745
+ stopColor: "#33A0E9",
1746
+ stopOpacity: "0.02"
1747
+ })]
1748
+ })] }),
1749
+ /* @__PURE__ */ T("line", {
1750
+ x1: "0",
1751
+ y1: "10",
1752
+ x2: "320",
1753
+ y2: "10",
1754
+ stroke: "var(--tp-omada-chart-grid)",
1755
+ strokeDasharray: "3 3"
1756
+ }),
1757
+ /* @__PURE__ */ T("line", {
1758
+ x1: "0",
1759
+ y1: "48",
1760
+ x2: "320",
1761
+ y2: "48",
1762
+ stroke: "var(--tp-omada-chart-grid)",
1763
+ strokeDasharray: "3 3"
1764
+ }),
1765
+ /* @__PURE__ */ T("line", {
1766
+ x1: "0",
1767
+ y1: "86",
1768
+ x2: "320",
1769
+ y2: "86",
1770
+ stroke: "var(--tp-omada-chart-grid)"
1771
+ }),
1772
+ /* @__PURE__ */ T("path", {
1773
+ d: "M0,84 L120,84 L132,76 L142,84 L158,40 L166,78 L176,82 L188,18 L196,68 L208,34 L216,74 L228,82 L240,30 L248,68 L262,80 L278,42 L286,74 L300,82 L320,82 L320,86 L0,86 Z",
1774
+ fill: "url(#tpOmadaDlArea)"
1775
+ }),
1776
+ /* @__PURE__ */ T("path", {
1777
+ d: "M0,84 L120,84 L132,76 L142,84 L158,40 L166,78 L176,82 L188,18 L196,68 L208,34 L216,74 L228,82 L240,30 L248,68 L262,80 L278,42 L286,74 L300,82 L320,82",
1778
+ fill: "none",
1779
+ stroke: "var(--tp-omada-download)",
1780
+ strokeWidth: "1.5"
1781
+ }),
1782
+ /* @__PURE__ */ T("path", {
1783
+ d: "M0,85 L140,85 L154,66 L166,82 L188,52 L198,80 L214,60 L226,82 L242,58 L254,82 L280,68 L294,84 L320,84 L320,86 L0,86 Z",
1784
+ fill: "url(#tpOmadaUlArea)"
1785
+ }),
1786
+ /* @__PURE__ */ T("path", {
1787
+ d: "M0,85 L140,85 L154,66 L166,82 L188,52 L198,80 L214,60 L226,82 L242,58 L254,82 L280,68 L294,84 L320,84",
1788
+ fill: "none",
1789
+ stroke: "var(--tp-omada-upload)",
1790
+ strokeWidth: "1.4"
1791
+ })
1792
+ ]
1793
+ })]
1794
+ })
1795
+ ]
1796
+ })
1797
+ ]
1798
+ })
1799
+ }),
1800
+ b && /* @__PURE__ */ T("button", {
1801
+ type: "button",
1802
+ className: "tp-omada-fab tp-omada-standalone-fab",
1803
+ "aria-label": "Network Toolkit",
1804
+ onClick: () => {
1805
+ v ? v() : I(!0);
1806
+ },
1807
+ children: /* @__PURE__ */ T(g, {
1808
+ name: "settings-network-tools",
1809
+ size: 22,
1810
+ color: "#FFFFFF"
1811
+ })
1812
+ }),
1813
+ y && /* @__PURE__ */ T("div", {
1814
+ className: "tp-omada-standalone-tabbar",
1815
+ children: /* @__PURE__ */ T(n, {
1816
+ variant: "floating-pill",
1817
+ items: P,
1818
+ activeKey: a,
1819
+ onChange: (e) => o?.(e)
1820
+ })
1821
+ }),
1822
+ /* @__PURE__ */ T(f, {
1823
+ open: j,
1824
+ title: `Site ${D} Topology`,
1825
+ subtitle: "1 Gateway • 2 Access Points • 4 Clients",
1826
+ onClose: () => M(!1),
1827
+ children: /* @__PURE__ */ E("div", {
1828
+ className: "tp-omada-topo-tree",
1829
+ children: [
1830
+ /* @__PURE__ */ E("div", {
1831
+ className: "tp-omada-topo-node",
1832
+ children: [
1833
+ /* @__PURE__ */ T(g, {
1834
+ name: "client-switch",
1835
+ size: 32
1836
+ }),
1837
+ /* @__PURE__ */ E("div", {
1838
+ style: { flex: 1 },
1839
+ children: [/* @__PURE__ */ T("div", {
1840
+ style: {
1841
+ fontSize: 14,
1842
+ fontWeight: 600
1843
+ },
1844
+ children: "ER7212PC (Gateway)"
1845
+ }), /* @__PURE__ */ T("div", {
1846
+ style: {
1847
+ fontSize: 12,
1848
+ color: "var(--tp-text-secondary)"
1849
+ },
1850
+ children: "192.168.0.1 • WAN3 Connected"
1851
+ })]
1852
+ }),
1853
+ /* @__PURE__ */ T("span", {
1854
+ className: "tp-omada-status-line tp-omada-status-line--good",
1855
+ children: "1000M"
1856
+ })
1857
+ ]
1858
+ }),
1859
+ /* @__PURE__ */ T("div", {
1860
+ className: "tp-omada-topo-connector",
1861
+ "aria-hidden": "true"
1862
+ }),
1863
+ F.filter((e) => e.type === "ap").map((e) => /* @__PURE__ */ E("div", {
1864
+ className: "tp-omada-topo-node",
1865
+ children: [
1866
+ /* @__PURE__ */ T(g, {
1867
+ name: "client-ap",
1868
+ size: 30,
1869
+ color: "#EBEBF0"
1870
+ }),
1871
+ /* @__PURE__ */ E("div", {
1872
+ style: { flex: 1 },
1873
+ children: [/* @__PURE__ */ E("div", {
1874
+ style: {
1875
+ fontSize: 14,
1876
+ fontWeight: 500
1877
+ },
1878
+ children: [
1879
+ e.model,
1880
+ " (",
1881
+ e.mac,
1882
+ ")"
1883
+ ]
1884
+ }), /* @__PURE__ */ E("div", {
1885
+ style: {
1886
+ fontSize: 12,
1887
+ color: "var(--tp-text-secondary)"
1888
+ },
1889
+ children: [e.ip, " • 2.4G / 5G / 6G"]
1890
+ })]
1891
+ }),
1892
+ /* @__PURE__ */ T("span", {
1893
+ className: "tp-omada-status-line tp-omada-status-line--good",
1894
+ children: "2 Clients"
1895
+ })
1896
+ ]
1897
+ }, e.id)),
1898
+ /* @__PURE__ */ T(d, {
1899
+ variant: "secondary",
1900
+ block: !0,
1901
+ onClick: () => {
1902
+ M(!1), h?.();
1903
+ },
1904
+ children: "Inspect Devices"
1905
+ })
1906
+ ]
1907
+ })
1908
+ }),
1909
+ /* @__PURE__ */ T(f, {
1910
+ open: N,
1911
+ title: "Network Toolkit",
1912
+ subtitle: `Diagnostics for Site ${D}`,
1913
+ onClose: () => I(!1),
1914
+ children: /* @__PURE__ */ E("div", {
1915
+ style: {
1916
+ display: "flex",
1917
+ flexDirection: "column",
1918
+ gap: 12
1919
+ },
1920
+ children: [/* @__PURE__ */ T("div", {
1921
+ className: "tp-omada-tool-grid",
1922
+ children: ie.map((e) => /* @__PURE__ */ E("button", {
1923
+ type: "button",
1924
+ className: "tp-omada-tool-tile",
1925
+ onClick: () => R(`${e.label}: ${e.summary}`),
1926
+ children: [/* @__PURE__ */ T(g, {
1927
+ name: e.icon,
1928
+ size: 30
1929
+ }), /* @__PURE__ */ T("span", { children: e.label })]
1930
+ }, e.key))
1931
+ }), L && /* @__PURE__ */ T("div", {
1932
+ style: {
1933
+ padding: "10px 12px",
1934
+ borderRadius: 8,
1935
+ background: "var(--tp-focus-10)",
1936
+ color: "var(--tp-focus)",
1937
+ fontSize: 13
1938
+ },
1939
+ children: L
1940
+ })]
1941
+ })
1942
+ })
1943
+ ]
1944
+ });
1945
+ }, ae = [
1946
+ {
1947
+ key: "wired",
1948
+ label: "Wired"
1949
+ },
1950
+ {
1951
+ key: "wireless",
1952
+ label: "Wireless"
1953
+ },
1954
+ {
1955
+ key: "client",
1956
+ label: "Client"
1957
+ },
1958
+ {
1959
+ key: "apps",
1960
+ label: "Apps"
1961
+ }
1962
+ ], Z = [
1963
+ {
1964
+ key: "24h",
1965
+ label: "Last 24 Hours",
1966
+ start: "Nov 22, 06:55 PM",
1967
+ end: "Nov 23, 06:45 PM"
1968
+ },
1969
+ {
1970
+ key: "7d",
1971
+ label: "Last 7 Days",
1972
+ start: "Nov 16, 06:55 PM",
1973
+ end: "Nov 23, 06:45 PM"
1974
+ },
1975
+ {
1976
+ key: "30d",
1977
+ label: "Last 30 Days",
1978
+ start: "Oct 24, 06:55 PM",
1979
+ end: "Nov 23, 06:45 PM"
1980
+ }
1981
+ ], oe = [
1982
+ "WAN3",
1983
+ "SFP WAN/LAN1",
1984
+ "All WANs"
1985
+ ], se = [
1986
+ 3,
1987
+ 4,
1988
+ 3,
1989
+ 5,
1990
+ 3,
1991
+ 4,
1992
+ 6,
1993
+ 4,
1994
+ 3,
1995
+ 4,
1996
+ 3,
1997
+ 4,
1998
+ 3,
1999
+ 5,
2000
+ 4,
2001
+ 3,
2002
+ 4,
2003
+ 3,
2004
+ 4,
2005
+ 6,
2006
+ 8,
2007
+ 5,
2008
+ 11,
2009
+ 14,
2010
+ 18,
2011
+ 12,
2012
+ 22,
2013
+ 26,
2014
+ 34,
2015
+ 48,
2016
+ 28,
2017
+ 18,
2018
+ 22,
2019
+ 16,
2020
+ 20,
2021
+ 14,
2022
+ 18,
2023
+ 24,
2024
+ 15,
2025
+ 20,
2026
+ 16,
2027
+ 26,
2028
+ 30,
2029
+ 19,
2030
+ 14,
2031
+ 12,
2032
+ 16,
2033
+ 11,
2034
+ 8,
2035
+ 6
2036
+ ], Q = ({ activeTab: e = "insights", onTabChange: t, showTabBar: i = !0, className: a = "", style: o }) => {
2037
+ let [s, l] = C("wired"), [d, f] = C("WAN3"), [p, m] = C(!1), [h, _] = C("24h"), [v, y] = C(!1), b = Z.find((e) => e.key === h) ?? Z[0], S = x(() => Z.map((e) => ({
2038
+ key: e.key,
2039
+ label: e.label,
2040
+ selected: e.key === h
2041
+ })), [h]), D = x(() => oe.map((e) => ({
2042
+ key: e,
2043
+ label: e,
2044
+ selected: e === d
2045
+ })), [d]);
2046
+ return /* @__PURE__ */ E("div", {
2047
+ className: `tp-omada-screen ${i ? "tp-omada-screen--standalone" : ""} ${a}`.trim(),
2048
+ "data-testid": "omada-site-insights-page",
2049
+ style: o,
2050
+ children: [
2051
+ /* @__PURE__ */ E("div", {
2052
+ className: "tp-omada-header-wrap",
2053
+ children: [/* @__PURE__ */ T(r, {
2054
+ variant: "floating",
2055
+ title: "Insights",
2056
+ right: /* @__PURE__ */ T("button", {
2057
+ type: "button",
2058
+ className: "tp-header-icon-btn",
2059
+ "aria-label": "Select date range",
2060
+ onClick: () => y((e) => !e),
2061
+ children: /* @__PURE__ */ T(g, {
2062
+ name: "nav-calendar",
2063
+ size: 19
2064
+ })
2065
+ })
2066
+ }), /* @__PURE__ */ T(c, {
2067
+ open: v,
2068
+ align: "right",
2069
+ items: S,
2070
+ onSelect: (e) => _(e.key),
2071
+ onClose: () => y(!1)
2072
+ })]
2073
+ }),
2074
+ /* @__PURE__ */ T(u, {
2075
+ variant: "underline",
2076
+ fullWidth: !0,
2077
+ options: ae,
2078
+ value: s,
2079
+ onChange: (e) => l(e)
2080
+ }),
2081
+ /* @__PURE__ */ T("div", {
2082
+ className: "tp-omada-scroll",
2083
+ children: /* @__PURE__ */ E("div", {
2084
+ className: `tp-omada-body ${i ? "tp-omada-body--with-tabbar" : ""}`.trim(),
2085
+ children: [
2086
+ s === "wired" && /* @__PURE__ */ E(w, { children: [
2087
+ /* @__PURE__ */ E("section", {
2088
+ className: "tp-omada-card",
2089
+ "aria-label": "ISP Load",
2090
+ children: [
2091
+ /* @__PURE__ */ E("div", {
2092
+ className: "tp-omada-card-header",
2093
+ style: { position: "relative" },
2094
+ children: [
2095
+ /* @__PURE__ */ T("h3", {
2096
+ className: "tp-omada-card-title",
2097
+ children: "ISP Load"
2098
+ }),
2099
+ /* @__PURE__ */ E("button", {
2100
+ type: "button",
2101
+ onClick: () => m((e) => !e),
2102
+ style: {
2103
+ display: "inline-flex",
2104
+ alignItems: "center",
2105
+ gap: 4,
2106
+ border: "none",
2107
+ background: "transparent",
2108
+ color: "var(--tp-color-green)",
2109
+ fontSize: 13,
2110
+ fontWeight: 500,
2111
+ cursor: "pointer",
2112
+ padding: 0
2113
+ },
2114
+ children: [/* @__PURE__ */ T("span", { children: d }), /* @__PURE__ */ T("svg", {
2115
+ width: "12",
2116
+ height: "12",
2117
+ viewBox: "0 0 12 12",
2118
+ fill: "none",
2119
+ "aria-hidden": "true",
2120
+ children: /* @__PURE__ */ T("path", {
2121
+ d: "M3 4.5L6 7.5L9 4.5",
2122
+ stroke: "currentColor",
2123
+ strokeWidth: "1.4",
2124
+ strokeLinecap: "round",
2125
+ strokeLinejoin: "round"
2126
+ })
2127
+ })]
2128
+ }),
2129
+ /* @__PURE__ */ T(c, {
2130
+ open: p,
2131
+ align: "right",
2132
+ items: D,
2133
+ onSelect: (e) => f(e.key),
2134
+ onClose: () => m(!1)
2135
+ })
2136
+ ]
2137
+ }),
2138
+ /* @__PURE__ */ T("div", {
2139
+ className: "tp-omada-legend-col",
2140
+ style: { marginTop: 8 },
2141
+ children: /* @__PURE__ */ E("div", {
2142
+ className: "tp-omada-legend-row",
2143
+ children: [/* @__PURE__ */ E("span", {
2144
+ className: "tp-omada-legend-item",
2145
+ children: [/* @__PURE__ */ T("span", {
2146
+ className: "tp-omada-legend-dot",
2147
+ style: { background: "var(--tp-color-green)" }
2148
+ }), /* @__PURE__ */ T("span", { children: "Throughput" })]
2149
+ }), /* @__PURE__ */ E("span", {
2150
+ className: "tp-omada-legend-item",
2151
+ children: [/* @__PURE__ */ T("svg", {
2152
+ width: "14",
2153
+ height: "10",
2154
+ viewBox: "0 0 14 10",
2155
+ fill: "none",
2156
+ "aria-hidden": "true",
2157
+ children: /* @__PURE__ */ T("path", {
2158
+ d: "M1 8L4.5 3.5L7.5 7L10 2L13 8",
2159
+ stroke: "#4D94FF",
2160
+ strokeWidth: "1.4",
2161
+ strokeLinecap: "round",
2162
+ strokeLinejoin: "round"
2163
+ })
2164
+ }), /* @__PURE__ */ T("span", { children: "Latency" })]
2165
+ })]
2166
+ })
2167
+ }),
2168
+ /* @__PURE__ */ E("div", {
2169
+ style: { marginTop: 8 },
2170
+ children: [
2171
+ /* @__PURE__ */ E("div", {
2172
+ className: "tp-omada-chart-axis-row",
2173
+ children: [/* @__PURE__ */ T("span", { children: "20 Mbps" }), /* @__PURE__ */ T("span", { children: "4 msec" })]
2174
+ }),
2175
+ /* @__PURE__ */ E("div", {
2176
+ style: {
2177
+ position: "relative",
2178
+ marginTop: 4
2179
+ },
2180
+ children: [/* @__PURE__ */ E("svg", {
2181
+ viewBox: "0 0 320 110",
2182
+ width: "100%",
2183
+ height: "110",
2184
+ preserveAspectRatio: "none",
2185
+ "aria-label": "ISP Load Throughput and Latency chart",
2186
+ style: { display: "block" },
2187
+ children: [
2188
+ /* @__PURE__ */ T("line", {
2189
+ x1: "0",
2190
+ y1: "12",
2191
+ x2: "320",
2192
+ y2: "12",
2193
+ stroke: "var(--tp-omada-chart-grid)",
2194
+ strokeDasharray: "3 3"
2195
+ }),
2196
+ /* @__PURE__ */ T("line", {
2197
+ x1: "0",
2198
+ y1: "58",
2199
+ x2: "320",
2200
+ y2: "58",
2201
+ stroke: "var(--tp-omada-chart-grid)",
2202
+ strokeDasharray: "3 3"
2203
+ }),
2204
+ /* @__PURE__ */ T("line", {
2205
+ x1: "0",
2206
+ y1: "104",
2207
+ x2: "320",
2208
+ y2: "104",
2209
+ stroke: "var(--tp-omada-chart-grid)"
2210
+ }),
2211
+ se.map((e, t) => {
2212
+ let n = 14 + t * 5.8, r = d === "SFP WAN/LAN1" ? Math.max(2, e * .25) : e * 1.45;
2213
+ return /* @__PURE__ */ T("rect", {
2214
+ x: n,
2215
+ y: 104 - r,
2216
+ width: "2.4",
2217
+ height: r,
2218
+ fill: "#00A870",
2219
+ fillOpacity: "0.45"
2220
+ }, t);
2221
+ }),
2222
+ /* @__PURE__ */ T("polyline", {
2223
+ fill: "none",
2224
+ stroke: "#4D94FF",
2225
+ strokeWidth: "1.35",
2226
+ points: "0,34 10,34 12,56 16,34 28,34 31,12 34,34 42,34 45,56 48,34 54,10 58,34 72,34 75,56 79,34 86,56 90,34 104,34 107,56 111,34 114,56 118,34 134,34 137,56 141,34 148,56 152,34 174,34 177,56 181,34 196,34 200,56 204,34 208,56 212,34 224,34 227,56 231,34 246,34 249,56 253,34 266,34 269,56 273,34 286,34 289,56 293,34 320,34"
2227
+ })
2228
+ ]
2229
+ }), /* @__PURE__ */ E("div", {
2230
+ style: {
2231
+ position: "absolute",
2232
+ left: 0,
2233
+ right: 0,
2234
+ top: 40,
2235
+ display: "flex",
2236
+ justifyContent: "space-between",
2237
+ fontSize: 11,
2238
+ color: "var(--tp-text-secondary)",
2239
+ pointerEvents: "none"
2240
+ },
2241
+ children: [/* @__PURE__ */ T("span", { children: "10" }), /* @__PURE__ */ T("span", { children: "2" })]
2242
+ })]
2243
+ }),
2244
+ /* @__PURE__ */ E("div", {
2245
+ className: "tp-omada-chart-axis-row",
2246
+ style: { marginTop: 2 },
2247
+ children: [/* @__PURE__ */ T("span", { children: "0" }), /* @__PURE__ */ T("span", { children: "0" })]
2248
+ }),
2249
+ /* @__PURE__ */ E("div", {
2250
+ className: "tp-omada-chart-axis-row",
2251
+ style: { marginTop: 4 },
2252
+ children: [/* @__PURE__ */ T("span", { children: b.start }), /* @__PURE__ */ T("span", { children: b.end })]
2253
+ })
2254
+ ]
2255
+ })
2256
+ ]
2257
+ }),
2258
+ /* @__PURE__ */ E("section", {
2259
+ className: "tp-omada-card",
2260
+ "aria-label": "WAN Health Trend",
2261
+ children: [
2262
+ /* @__PURE__ */ E("div", {
2263
+ className: "tp-omada-card-header",
2264
+ children: [/* @__PURE__ */ T("h3", {
2265
+ className: "tp-omada-card-title",
2266
+ children: "WAN Health Trend"
2267
+ }), /* @__PURE__ */ E("div", {
2268
+ style: {
2269
+ display: "inline-flex",
2270
+ alignItems: "center",
2271
+ gap: 5,
2272
+ fontSize: 11,
2273
+ color: "var(--tp-text-secondary)"
2274
+ },
2275
+ children: [
2276
+ /* @__PURE__ */ T("span", { children: "1" }),
2277
+ /* @__PURE__ */ T("span", { style: {
2278
+ display: "inline-block",
2279
+ width: 44,
2280
+ height: 5,
2281
+ borderRadius: 999,
2282
+ background: "linear-gradient(90deg, #00A870 0%, #FF8C27 62%, #EE385C 100%)"
2283
+ } }),
2284
+ /* @__PURE__ */ T("span", { children: "10" })
2285
+ ]
2286
+ })]
2287
+ }),
2288
+ /* @__PURE__ */ E("div", {
2289
+ style: {
2290
+ display: "flex",
2291
+ alignItems: "center",
2292
+ gap: 10,
2293
+ marginTop: 14
2294
+ },
2295
+ children: [/* @__PURE__ */ T("span", {
2296
+ style: {
2297
+ fontSize: 12,
2298
+ color: "var(--tp-text-secondary)",
2299
+ width: 38
2300
+ },
2301
+ children: "WAN3"
2302
+ }), /* @__PURE__ */ T("div", { style: {
2303
+ flex: 1,
2304
+ height: 6,
2305
+ borderRadius: 999,
2306
+ background: "var(--tp-color-green)"
2307
+ } })]
2308
+ }),
2309
+ /* @__PURE__ */ E("div", {
2310
+ className: "tp-omada-chart-axis-row",
2311
+ style: {
2312
+ marginTop: 6,
2313
+ paddingLeft: 48
2314
+ },
2315
+ children: [/* @__PURE__ */ T("span", { children: "Nov 22, 07:00 PM" }), /* @__PURE__ */ T("span", { children: "Nov 23, 06:40 PM" })]
2316
+ })
2317
+ ]
2318
+ }),
2319
+ /* @__PURE__ */ E("section", {
2320
+ className: "tp-omada-card",
2321
+ "aria-label": "Gateway Utilization",
2322
+ children: [
2323
+ /* @__PURE__ */ T("div", {
2324
+ className: "tp-omada-card-header",
2325
+ children: /* @__PURE__ */ T("h3", {
2326
+ className: "tp-omada-card-title",
2327
+ children: "Gateway Utilization"
2328
+ })
2329
+ }),
2330
+ /* @__PURE__ */ E("div", {
2331
+ className: "tp-omada-legend-row",
2332
+ style: { marginTop: 6 },
2333
+ children: [/* @__PURE__ */ E("span", {
2334
+ className: "tp-omada-legend-item",
2335
+ children: [/* @__PURE__ */ T("svg", {
2336
+ width: "14",
2337
+ height: "10",
2338
+ viewBox: "0 0 14 10",
2339
+ fill: "none",
2340
+ "aria-hidden": "true",
2341
+ children: /* @__PURE__ */ T("path", {
2342
+ d: "M1 8L4.5 3.5L7.5 7L10 2L13 8",
2343
+ stroke: "var(--tp-color-green)",
2344
+ strokeWidth: "1.4",
2345
+ strokeLinecap: "round",
2346
+ strokeLinejoin: "round"
2347
+ })
2348
+ }), /* @__PURE__ */ T("span", { children: "CPU" })]
2349
+ }), /* @__PURE__ */ E("span", {
2350
+ className: "tp-omada-legend-item",
2351
+ children: [/* @__PURE__ */ T("svg", {
2352
+ width: "14",
2353
+ height: "10",
2354
+ viewBox: "0 0 14 10",
2355
+ fill: "none",
2356
+ "aria-hidden": "true",
2357
+ children: /* @__PURE__ */ T("path", {
2358
+ d: "M1 8L4.5 3.5L7.5 7L10 2L13 8",
2359
+ stroke: "#4D94FF",
2360
+ strokeWidth: "1.4",
2361
+ strokeLinecap: "round",
2362
+ strokeLinejoin: "round"
2363
+ })
2364
+ }), /* @__PURE__ */ T("span", { children: "Memory" })]
2365
+ })]
2366
+ }),
2367
+ /* @__PURE__ */ E("div", {
2368
+ style: { marginTop: 6 },
2369
+ children: [
2370
+ /* @__PURE__ */ E("div", {
2371
+ className: "tp-omada-chart-axis-row",
2372
+ children: [/* @__PURE__ */ T("span", { children: "100%" }), /* @__PURE__ */ T("span", {})]
2373
+ }),
2374
+ /* @__PURE__ */ E("div", {
2375
+ style: { position: "relative" },
2376
+ children: [/* @__PURE__ */ E("svg", {
2377
+ viewBox: "0 0 320 90",
2378
+ width: "100%",
2379
+ height: "90",
2380
+ preserveAspectRatio: "none",
2381
+ "aria-label": "Gateway CPU and Memory utilization chart",
2382
+ style: { display: "block" },
2383
+ children: [
2384
+ /* @__PURE__ */ T("line", {
2385
+ x1: "0",
2386
+ y1: "8",
2387
+ x2: "320",
2388
+ y2: "8",
2389
+ stroke: "var(--tp-omada-chart-grid)",
2390
+ strokeDasharray: "3 3"
2391
+ }),
2392
+ /* @__PURE__ */ T("line", {
2393
+ x1: "0",
2394
+ y1: "44",
2395
+ x2: "320",
2396
+ y2: "44",
2397
+ stroke: "var(--tp-omada-chart-grid)",
2398
+ strokeDasharray: "3 3"
2399
+ }),
2400
+ /* @__PURE__ */ T("line", {
2401
+ x1: "0",
2402
+ y1: "82",
2403
+ x2: "320",
2404
+ y2: "82",
2405
+ stroke: "var(--tp-omada-chart-grid)"
2406
+ }),
2407
+ /* @__PURE__ */ T("polyline", {
2408
+ fill: "none",
2409
+ stroke: "#4D94FF",
2410
+ strokeWidth: "1.5",
2411
+ points: "0,58 84,58 88,54 92,58 100,55 104,58 112,55 116,58 124,55 128,58 320,58"
2412
+ }),
2413
+ /* @__PURE__ */ T("polyline", {
2414
+ fill: "none",
2415
+ stroke: "#00A870",
2416
+ strokeWidth: "1.4",
2417
+ points: "0,81 56,81 60,76 63,81 68,74 71,81 200,81 204,76 208,81 264,81 268,75 272,81 320,81"
2418
+ })
2419
+ ]
2420
+ }), /* @__PURE__ */ T("span", {
2421
+ style: {
2422
+ position: "absolute",
2423
+ left: 0,
2424
+ top: 32,
2425
+ fontSize: 11,
2426
+ color: "var(--tp-text-secondary)"
2427
+ },
2428
+ children: "50%"
2429
+ })]
2430
+ }),
2431
+ /* @__PURE__ */ E("div", {
2432
+ className: "tp-omada-chart-axis-row",
2433
+ children: [/* @__PURE__ */ T("span", { children: "0%" }), /* @__PURE__ */ T("span", {})]
2434
+ }),
2435
+ /* @__PURE__ */ E("div", {
2436
+ className: "tp-omada-chart-axis-row",
2437
+ style: { marginTop: 4 },
2438
+ children: [/* @__PURE__ */ T("span", { children: b.start }), /* @__PURE__ */ T("span", { children: b.end })]
2439
+ })
2440
+ ]
2441
+ })
2442
+ ]
2443
+ }),
2444
+ /* @__PURE__ */ E("section", {
2445
+ className: "tp-omada-card",
2446
+ "aria-label": "Switch Health Trend",
2447
+ children: [/* @__PURE__ */ T("div", {
2448
+ className: "tp-omada-card-header",
2449
+ children: /* @__PURE__ */ T("h3", {
2450
+ className: "tp-omada-card-title",
2451
+ children: "Switch Health Trend"
2452
+ })
2453
+ }), /* @__PURE__ */ E("div", {
2454
+ className: "tp-omada-legend-row",
2455
+ style: { marginTop: 8 },
2456
+ children: [
2457
+ /* @__PURE__ */ E("span", {
2458
+ className: "tp-omada-legend-item",
2459
+ children: [/* @__PURE__ */ T("span", {
2460
+ className: "tp-omada-legend-dot",
2461
+ style: { background: "var(--tp-color-green)" }
2462
+ }), /* @__PURE__ */ T("span", { children: "Good" })]
2463
+ }),
2464
+ /* @__PURE__ */ E("span", {
2465
+ className: "tp-omada-legend-item",
2466
+ children: [/* @__PURE__ */ T("span", {
2467
+ className: "tp-omada-legend-dot",
2468
+ style: { background: "var(--tp-color-yellow)" }
2469
+ }), /* @__PURE__ */ T("span", { children: "Fair" })]
2470
+ }),
2471
+ /* @__PURE__ */ E("span", {
2472
+ className: "tp-omada-legend-item",
2473
+ children: [/* @__PURE__ */ T("span", {
2474
+ className: "tp-omada-legend-dot",
2475
+ style: { background: "var(--tp-color-alert)" }
2476
+ }), /* @__PURE__ */ T("span", { children: "Poor" })]
2477
+ }),
2478
+ /* @__PURE__ */ E("span", {
2479
+ className: "tp-omada-legend-item",
2480
+ children: [/* @__PURE__ */ T("span", {
2481
+ className: "tp-omada-legend-dot",
2482
+ style: { background: "var(--tp-text-disabled)" }
2483
+ }), /* @__PURE__ */ T("span", { children: "No Data" })]
2484
+ })
2485
+ ]
2486
+ })]
2487
+ })
2488
+ ] }),
2489
+ s === "wireless" && /* @__PURE__ */ E("section", {
2490
+ className: "tp-omada-card",
2491
+ children: [
2492
+ /* @__PURE__ */ T("h3", {
2493
+ className: "tp-omada-card-title",
2494
+ children: "Wi-Fi Channel Utilization"
2495
+ }),
2496
+ /* @__PURE__ */ T("div", {
2497
+ className: "tp-omada-card-subtitle",
2498
+ children: "EAP723 (2 APs active across 2.4 / 5 / 6 GHz)"
2499
+ }),
2500
+ /* @__PURE__ */ T("div", {
2501
+ style: {
2502
+ display: "flex",
2503
+ flexDirection: "column",
2504
+ gap: 12,
2505
+ marginTop: 14
2506
+ },
2507
+ children: [
2508
+ {
2509
+ band: "2.4 GHz (Ch 6)",
2510
+ util: 28,
2511
+ color: "var(--tp-color-yellow)"
2512
+ },
2513
+ {
2514
+ band: "5 GHz (Ch 36)",
2515
+ util: 14,
2516
+ color: "var(--tp-color-green)"
2517
+ },
2518
+ {
2519
+ band: "6 GHz (Ch 37)",
2520
+ util: 6,
2521
+ color: "var(--tp-color-green)"
2522
+ }
2523
+ ].map((e) => /* @__PURE__ */ E("div", {
2524
+ style: {
2525
+ display: "flex",
2526
+ flexDirection: "column",
2527
+ gap: 5
2528
+ },
2529
+ children: [/* @__PURE__ */ E("div", {
2530
+ className: "tp-omada-chart-axis-row",
2531
+ children: [/* @__PURE__ */ T("span", { children: e.band }), /* @__PURE__ */ E("span", { children: [e.util, "%"] })]
2532
+ }), /* @__PURE__ */ T("div", {
2533
+ className: "tp-omada-health-bar-track",
2534
+ style: { height: 7 },
2535
+ children: /* @__PURE__ */ T("div", { style: {
2536
+ width: `${e.util}%`,
2537
+ height: "100%",
2538
+ background: e.color,
2539
+ borderRadius: 999
2540
+ } })
2541
+ })]
2542
+ }, e.band))
2543
+ })
2544
+ ]
2545
+ }),
2546
+ s === "client" && /* @__PURE__ */ E("section", {
2547
+ className: "tp-omada-card",
2548
+ children: [
2549
+ /* @__PURE__ */ T("h3", {
2550
+ className: "tp-omada-card-title",
2551
+ children: "Top Clients by Traffic"
2552
+ }),
2553
+ /* @__PURE__ */ E("div", {
2554
+ className: "tp-omada-card-subtitle",
2555
+ children: ["Active clients during ", b.label]
2556
+ }),
2557
+ /* @__PURE__ */ T("div", {
2558
+ className: "tp-omada-isp-list",
2559
+ children: [
2560
+ {
2561
+ name: "Mac (192.168.0.13)",
2562
+ traffic: "1.84 GB"
2563
+ },
2564
+ {
2565
+ name: "appleiPad (192.168.0.8)",
2566
+ traffic: "642 MB"
2567
+ },
2568
+ {
2569
+ name: "92-Sarabande (192.168.0.12)",
2570
+ traffic: "118 MB"
2571
+ },
2572
+ {
2573
+ name: "ChimePro-19 (192.168.0.11)",
2574
+ traffic: "24 MB"
2575
+ }
2576
+ ].map((e) => /* @__PURE__ */ E("div", {
2577
+ className: "tp-omada-isp-row",
2578
+ children: [/* @__PURE__ */ T("span", { children: e.name }), /* @__PURE__ */ T("span", {
2579
+ style: {
2580
+ color: "var(--tp-color-green)",
2581
+ fontWeight: 500
2582
+ },
2583
+ children: e.traffic
2584
+ })]
2585
+ }, e.name))
2586
+ })
2587
+ ]
2588
+ }),
2589
+ s === "apps" && /* @__PURE__ */ E("section", {
2590
+ className: "tp-omada-card",
2591
+ children: [
2592
+ /* @__PURE__ */ T("h3", {
2593
+ className: "tp-omada-card-title",
2594
+ children: "Application Traffic"
2595
+ }),
2596
+ /* @__PURE__ */ T("div", {
2597
+ className: "tp-omada-card-subtitle",
2598
+ children: "DPI protocol classification"
2599
+ }),
2600
+ /* @__PURE__ */ T("div", {
2601
+ className: "tp-omada-isp-list",
2602
+ children: [
2603
+ {
2604
+ app: "HTTPS / TLS",
2605
+ share: "54%"
2606
+ },
2607
+ {
2608
+ app: "Video Streaming",
2609
+ share: "24%"
2610
+ },
2611
+ {
2612
+ app: "Cloud Backup",
2613
+ share: "14%"
2614
+ },
2615
+ {
2616
+ app: "DNS / NTP",
2617
+ share: "8%"
2618
+ }
2619
+ ].map((e) => /* @__PURE__ */ E("div", {
2620
+ className: "tp-omada-isp-row",
2621
+ children: [/* @__PURE__ */ T("span", { children: e.app }), /* @__PURE__ */ T("span", {
2622
+ style: { color: "var(--tp-text-secondary)" },
2623
+ children: e.share
2624
+ })]
2625
+ }, e.app))
2626
+ })
2627
+ ]
2628
+ })
2629
+ ]
2630
+ })
2631
+ }),
2632
+ i && /* @__PURE__ */ T("div", {
2633
+ className: "tp-omada-standalone-tabbar",
2634
+ children: /* @__PURE__ */ T(n, {
2635
+ variant: "floating-pill",
2636
+ items: P,
2637
+ activeKey: e,
2638
+ onChange: (e) => t?.(e)
2639
+ })
2640
+ })
2641
+ ]
2642
+ });
2643
+ }, ce = [{
2644
+ key: "list",
2645
+ label: "Device List"
2646
+ }, {
2647
+ key: "group",
2648
+ label: "Device Group"
2649
+ }], $ = ({ devices: e = F, activeTab: t = "devices", onTabChange: i, onSelectDevice: a, showTabBar: o = !0, className: s = "", style: p }) => {
2650
+ let [m, _] = C(""), [v, y] = C("list"), [b, S] = C("all"), [D, O] = C("all"), [k, A] = C(!1), [j, M] = C(!1), [I, L] = C(!1), [R, B] = C("8C-86-DD-A6-A7-99"), V = [
2651
+ {
2652
+ key: "adopt",
2653
+ label: "Batch Adopt"
2654
+ },
2655
+ {
2656
+ key: "upgrade",
2657
+ label: "Batch Upgrade"
2658
+ },
2659
+ {
2660
+ key: "refresh",
2661
+ label: "Refresh Device List"
2662
+ }
2663
+ ], H = x(() => {
2664
+ let t = m.trim().toLowerCase();
2665
+ return e.filter((e) => b !== "all" && e.type !== b || D === "connected" && e.status !== "connected" || D === "disconnected" && e.status !== "disconnected" || D === "upgrade" && !e.upgradeAvailable ? !1 : !t || e.mac.toLowerCase().includes(t) || e.model.toLowerCase().includes(t) || e.ip.toLowerCase().includes(t) || e.status.toLowerCase().includes(t));
2666
+ }, [
2667
+ e,
2668
+ m,
2669
+ b,
2670
+ D
2671
+ ]), U = D === "all" ? "All Status" : D === "connected" ? "Connected" : D === "upgrade" ? "Upgrade Ready" : "Disconnected";
2672
+ return /* @__PURE__ */ E("div", {
2673
+ className: `tp-omada-screen ${o ? "tp-omada-screen--standalone" : ""} ${s}`.trim(),
2674
+ "data-testid": "omada-site-devices-page",
2675
+ style: p,
2676
+ children: [
2677
+ /* @__PURE__ */ E("div", {
2678
+ className: "tp-omada-header-wrap",
2679
+ children: [/* @__PURE__ */ T(r, {
2680
+ variant: "floating",
2681
+ title: "Devices",
2682
+ right: /* @__PURE__ */ E("div", {
2683
+ className: "tp-omada-capsule-inner",
2684
+ children: [/* @__PURE__ */ T("button", {
2685
+ type: "button",
2686
+ className: "tp-omada-glass-capsule-item",
2687
+ "aria-label": "Add device",
2688
+ onClick: () => L(!0),
2689
+ children: /* @__PURE__ */ T(g, {
2690
+ name: "nav-add",
2691
+ size: 18
2692
+ })
2693
+ }), /* @__PURE__ */ T("button", {
2694
+ type: "button",
2695
+ className: "tp-omada-glass-capsule-item",
2696
+ "aria-label": "More device actions",
2697
+ onClick: () => M((e) => !e),
2698
+ children: /* @__PURE__ */ T(g, {
2699
+ name: "nav-more",
2700
+ size: 18
2701
+ })
2702
+ })]
2703
+ })
2704
+ }), /* @__PURE__ */ T(c, {
2705
+ open: j,
2706
+ align: "right",
2707
+ items: V,
2708
+ onSelect: (e) => {
2709
+ e.key === "upgrade" ? O("upgrade") : e.key === "refresh" && (S("all"), O("all"));
2710
+ },
2711
+ onClose: () => M(!1)
2712
+ })]
2713
+ }),
2714
+ /* @__PURE__ */ T("div", {
2715
+ className: "tp-omada-scroll",
2716
+ children: /* @__PURE__ */ E("div", {
2717
+ className: `tp-omada-body ${o ? "tp-omada-body--with-tabbar" : ""}`.trim(),
2718
+ children: [
2719
+ /* @__PURE__ */ T(l, {
2720
+ value: m,
2721
+ placeholder: "Search",
2722
+ onChange: _,
2723
+ onSearch: _
2724
+ }),
2725
+ /* @__PURE__ */ T(u, {
2726
+ variant: "underline",
2727
+ fullWidth: !0,
2728
+ options: ce,
2729
+ value: v,
2730
+ onChange: (e) => y(e)
2731
+ }),
2732
+ /* @__PURE__ */ E("div", {
2733
+ className: "tp-omada-chip-row",
2734
+ children: [/* @__PURE__ */ E("div", {
2735
+ className: "tp-omada-chip-group",
2736
+ children: [
2737
+ /* @__PURE__ */ T(h, {
2738
+ selected: b === "all",
2739
+ onClick: () => S("all"),
2740
+ children: "All"
2741
+ }),
2742
+ /* @__PURE__ */ T(h, {
2743
+ selected: !0,
2744
+ onClick: () => O((e) => e === "all" ? "upgrade" : e === "upgrade" ? "connected" : "all"),
2745
+ children: U
2746
+ }),
2747
+ k && /* @__PURE__ */ E(w, { children: [
2748
+ /* @__PURE__ */ T(h, {
2749
+ selected: b === "gateway",
2750
+ onClick: () => S("gateway"),
2751
+ children: "Gateway"
2752
+ }),
2753
+ /* @__PURE__ */ T(h, {
2754
+ selected: b === "switch",
2755
+ onClick: () => S("switch"),
2756
+ children: "Switch"
2757
+ }),
2758
+ /* @__PURE__ */ T(h, {
2759
+ selected: b === "ap",
2760
+ onClick: () => S("ap"),
2761
+ children: "AP"
2762
+ })
2763
+ ] })
2764
+ ]
2765
+ }), /* @__PURE__ */ T("button", {
2766
+ type: "button",
2767
+ className: "tp-omada-chip-expand-btn",
2768
+ "aria-label": k ? "Collapse filters" : "Expand filters",
2769
+ onClick: () => A((e) => !e),
2770
+ children: /* @__PURE__ */ T(g, {
2771
+ name: k ? "arrow-arrow-sm-up" : "arrow-arrow-sm-down",
2772
+ size: 18
2773
+ })
2774
+ })]
2775
+ }),
2776
+ /* @__PURE__ */ T(z, {
2777
+ devices: H,
2778
+ grouped: v === "group",
2779
+ onSelectDevice: a
2780
+ })
2781
+ ]
2782
+ })
2783
+ }),
2784
+ o && /* @__PURE__ */ T("div", {
2785
+ className: "tp-omada-standalone-tabbar",
2786
+ children: /* @__PURE__ */ T(n, {
2787
+ variant: "floating-pill",
2788
+ items: P,
2789
+ activeKey: t,
2790
+ onChange: (e) => i?.(e)
2791
+ })
2792
+ }),
2793
+ /* @__PURE__ */ T(f, {
2794
+ open: I,
2795
+ title: "Adopt Standalone Device",
2796
+ subtitle: "Enter MAC address or scan QR code on hardware label",
2797
+ onClose: () => L(!1),
2798
+ children: /* @__PURE__ */ E("div", {
2799
+ style: {
2800
+ display: "flex",
2801
+ flexDirection: "column",
2802
+ gap: 14
2803
+ },
2804
+ children: [/* @__PURE__ */ T(N, {
2805
+ type: "mac",
2806
+ label: "Device MAC Address",
2807
+ value: R,
2808
+ onChange: B
2809
+ }), /* @__PURE__ */ T(d, {
2810
+ variant: "primary",
2811
+ block: !0,
2812
+ onClick: () => L(!1),
2813
+ children: "Discover & Adopt"
2814
+ })]
2815
+ })
2816
+ })
2817
+ ]
2818
+ });
2819
+ }, le = [
2820
+ {
2821
+ id: "cli-1",
2822
+ name: "92-Sarabande",
2823
+ ip: "192.168.0.12",
2824
+ mac: "A4-83-E7-92-10-44",
2825
+ rssiDbm: -28,
2826
+ networkName: "Sara Banday",
2827
+ status: "online",
2828
+ linkType: "wireless",
2829
+ customThumb: "thermostat"
2830
+ },
2831
+ {
2832
+ id: "cli-2",
2833
+ name: "ChimePro-19",
2834
+ ip: "192.168.0.11",
2835
+ mac: "5C-AA-FD-19-82-0B",
2836
+ rssiDbm: -46,
2837
+ networkName: "Sara Banday",
2838
+ status: "online",
2839
+ linkType: "wireless",
2840
+ iconName: "client-other"
2841
+ },
2842
+ {
2843
+ id: "cli-3",
2844
+ name: "Mac",
2845
+ ip: "192.168.0.13",
2846
+ mac: "38-F9-D3-41-2C-8E",
2847
+ rssiDbm: -73,
2848
+ networkName: "Omada",
2849
+ status: "online",
2850
+ linkType: "wireless",
2851
+ iconName: "client-macbook"
2852
+ },
2853
+ {
2854
+ id: "cli-4",
2855
+ name: "appleiPad",
2856
+ ip: "192.168.0.8",
2857
+ mac: "F0-98-9D-77-1B-C4",
2858
+ rssiDbm: -74,
2859
+ networkName: "Omada",
2860
+ status: "online",
2861
+ linkType: "wireless",
2862
+ iconName: "client-pad"
2863
+ }
2864
+ ], ue = () => /* @__PURE__ */ E("svg", {
2865
+ width: "38",
2866
+ height: "38",
2867
+ viewBox: "0 0 40 40",
2868
+ fill: "none",
2869
+ "aria-hidden": "true",
2870
+ children: [
2871
+ /* @__PURE__ */ T("rect", {
2872
+ x: "6",
2873
+ y: "6",
2874
+ width: "28",
2875
+ height: "28",
2876
+ rx: "6",
2877
+ fill: "#E5E5EA"
2878
+ }),
2879
+ /* @__PURE__ */ T("rect", {
2880
+ x: "12",
2881
+ y: "11",
2882
+ width: "16",
2883
+ height: "12",
2884
+ rx: "2",
2885
+ fill: "#D1D1D6",
2886
+ stroke: "#AEAEB2",
2887
+ strokeWidth: "1"
2888
+ }),
2889
+ /* @__PURE__ */ T("text", {
2890
+ x: "20",
2891
+ y: "19",
2892
+ textAnchor: "middle",
2893
+ fill: "#3A3A3C",
2894
+ fontSize: "6",
2895
+ fontWeight: "600",
2896
+ fontFamily: "sans-serif",
2897
+ children: "24.0"
2898
+ })
2899
+ ]
2900
+ }), de = [
2901
+ {
2902
+ key: "online",
2903
+ label: "Online"
2904
+ },
2905
+ {
2906
+ key: "offline",
2907
+ label: "Offline"
2908
+ },
2909
+ {
2910
+ key: "blocked",
2911
+ label: "Blocked"
2912
+ },
2913
+ {
2914
+ key: "all",
2915
+ label: "All"
2916
+ }
2917
+ ], fe = ({ clients: e = le, activeTab: t = "clients", onTabChange: i, onSelectClient: a, showTabBar: p = !0, className: _ = "", style: v }) => {
2918
+ let [y, b] = C([...e]), [S, w] = C(""), [D, O] = C("online"), [k, A] = C("all"), [j, M] = C(!1), [N, F] = C(null), I = [{
2919
+ key: "sort-signal",
2920
+ label: "Sort by Signal Strength"
2921
+ }, {
2922
+ key: "reset-filters",
2923
+ label: "Reset Filters"
2924
+ }], L = x(() => {
2925
+ let e = S.trim().toLowerCase();
2926
+ return y.filter((t) => D !== "all" && t.status !== D || k !== "all" && t.linkType !== k ? !1 : !e || t.name.toLowerCase().includes(e) || t.ip.toLowerCase().includes(e) || t.networkName.toLowerCase().includes(e) || t.mac.toLowerCase().includes(e));
2927
+ }, [
2928
+ y,
2929
+ S,
2930
+ D,
2931
+ k
2932
+ ]), R = (e) => {
2933
+ let t = e.status === "blocked" ? "online" : "blocked";
2934
+ b((n) => n.map((n) => n.id === e.id ? {
2935
+ ...n,
2936
+ status: t
2937
+ } : n)), F(null);
2938
+ };
2939
+ return /* @__PURE__ */ E("div", {
2940
+ className: `tp-omada-screen ${p ? "tp-omada-screen--standalone" : ""} ${_}`.trim(),
2941
+ "data-testid": "omada-site-clients-page",
2942
+ style: v,
2943
+ children: [
2944
+ /* @__PURE__ */ E("div", {
2945
+ className: "tp-omada-header-wrap",
2946
+ children: [/* @__PURE__ */ T(r, {
2947
+ variant: "floating",
2948
+ title: "Clients",
2949
+ right: /* @__PURE__ */ E("div", {
2950
+ className: "tp-omada-capsule-inner",
2951
+ children: [/* @__PURE__ */ T("button", {
2952
+ type: "button",
2953
+ className: "tp-omada-glass-capsule-item",
2954
+ "aria-label": "Filter clients",
2955
+ onClick: () => A((e) => e === "all" ? "wireless" : e === "wireless" ? "wired" : "all"),
2956
+ children: /* @__PURE__ */ T(g, {
2957
+ name: "filter",
2958
+ size: 18
2959
+ })
2960
+ }), /* @__PURE__ */ T("button", {
2961
+ type: "button",
2962
+ className: "tp-omada-glass-capsule-item",
2963
+ "aria-label": "More client options",
2964
+ onClick: () => M((e) => !e),
2965
+ children: /* @__PURE__ */ T(g, {
2966
+ name: "nav-more",
2967
+ size: 18
2968
+ })
2969
+ })]
2970
+ })
2971
+ }), /* @__PURE__ */ T(c, {
2972
+ open: j,
2973
+ align: "right",
2974
+ items: I,
2975
+ onSelect: (e) => {
2976
+ e.key === "sort-signal" ? b((e) => [...e].sort((e, t) => (t.rssiDbm ?? -99) - (e.rssiDbm ?? -99))) : (A("all"), O("online"), w(""));
2977
+ },
2978
+ onClose: () => M(!1)
2979
+ })]
2980
+ }),
2981
+ /* @__PURE__ */ T("div", {
2982
+ className: "tp-omada-scroll",
2983
+ children: /* @__PURE__ */ E("div", {
2984
+ className: `tp-omada-body ${p ? "tp-omada-body--with-tabbar" : ""}`.trim(),
2985
+ children: [
2986
+ /* @__PURE__ */ T(l, {
2987
+ value: S,
2988
+ placeholder: "Search",
2989
+ onChange: w,
2990
+ onSearch: w
2991
+ }),
2992
+ /* @__PURE__ */ T(u, {
2993
+ variant: "underline",
2994
+ fullWidth: !0,
2995
+ options: de,
2996
+ value: D,
2997
+ onChange: (e) => O(e)
2998
+ }),
2999
+ /* @__PURE__ */ E("div", {
3000
+ className: "tp-omada-chip-group",
3001
+ children: [
3002
+ /* @__PURE__ */ T(h, {
3003
+ selected: k === "all",
3004
+ onClick: () => A("all"),
3005
+ children: "All"
3006
+ }),
3007
+ /* @__PURE__ */ T(h, {
3008
+ selected: k === "wired",
3009
+ onClick: () => A("wired"),
3010
+ children: "Wired"
3011
+ }),
3012
+ /* @__PURE__ */ T(h, {
3013
+ selected: k === "wireless",
3014
+ onClick: () => A("wireless"),
3015
+ children: "Wireless"
3016
+ })
3017
+ ]
3018
+ }),
3019
+ L.length === 0 ? /* @__PURE__ */ T(s, {
3020
+ illustration: "no-clients",
3021
+ title: D === "blocked" ? "No Blocked Clients" : D === "offline" ? "No Offline Clients" : "No Matching Clients",
3022
+ description: "Connected wired and wireless clients will appear here.",
3023
+ compact: !0
3024
+ }) : /* @__PURE__ */ T(o, {
3025
+ divided: !0,
3026
+ children: L.map((e) => {
3027
+ let t = (e.rssiDbm ?? -40) <= -68 ? "var(--tp-color-yellow)" : "var(--tp-color-green)";
3028
+ return /* @__PURE__ */ T(m, {
3029
+ leading: e.customThumb === "thermostat" ? /* @__PURE__ */ T(ue, {}) : e.iconName ? /* @__PURE__ */ T(g, {
3030
+ name: e.iconName,
3031
+ size: 38
3032
+ }) : /* @__PURE__ */ T(g, {
3033
+ name: "client-other",
3034
+ size: 38
3035
+ }),
3036
+ title: e.name,
3037
+ subtitle: e.ip,
3038
+ trailing: /* @__PURE__ */ E("div", {
3039
+ className: "tp-omada-row-metrics",
3040
+ children: [/* @__PURE__ */ T("span", {
3041
+ className: "tp-omada-status-line",
3042
+ style: { color: t },
3043
+ children: e.rssiDbm === void 0 ? e.status : `${e.rssiDbm} dBm`
3044
+ }), /* @__PURE__ */ T("span", { children: e.networkName })]
3045
+ }),
3046
+ onClick: () => {
3047
+ a?.(e), F(e);
3048
+ }
3049
+ }, e.id);
3050
+ })
3051
+ })
3052
+ ]
3053
+ })
3054
+ }),
3055
+ p && /* @__PURE__ */ T("div", {
3056
+ className: "tp-omada-standalone-tabbar",
3057
+ children: /* @__PURE__ */ T(n, {
3058
+ variant: "floating-pill",
3059
+ items: P,
3060
+ activeKey: t,
3061
+ onChange: (e) => i?.(e)
3062
+ })
3063
+ }),
3064
+ /* @__PURE__ */ T(f, {
3065
+ open: !!N,
3066
+ title: N?.name,
3067
+ subtitle: N ? `${N.ip} • ${N.mac}` : void 0,
3068
+ onClose: () => F(null),
3069
+ children: N && /* @__PURE__ */ E("div", {
3070
+ style: {
3071
+ display: "flex",
3072
+ flexDirection: "column",
3073
+ gap: 12
3074
+ },
3075
+ children: [/* @__PURE__ */ E(o, {
3076
+ divided: !0,
3077
+ children: [
3078
+ /* @__PURE__ */ T(m, {
3079
+ title: "Network / SSID",
3080
+ value: N.networkName
3081
+ }),
3082
+ /* @__PURE__ */ T(m, {
3083
+ title: "Signal Strength",
3084
+ value: N.rssiDbm === void 0 ? "Wired" : `${N.rssiDbm} dBm`
3085
+ }),
3086
+ /* @__PURE__ */ T(m, {
3087
+ title: "Status",
3088
+ value: N.status
3089
+ })
3090
+ ]
3091
+ }), /* @__PURE__ */ T(d, {
3092
+ variant: N.status === "blocked" ? "primary" : "alert",
3093
+ block: !0,
3094
+ onClick: () => R(N),
3095
+ children: N.status === "blocked" ? "Unblock Client" : "Block Client"
3096
+ })]
3097
+ })
3098
+ })
3099
+ ]
3100
+ });
3101
+ }, pe = [
3102
+ [
3103
+ {
3104
+ key: "internet",
3105
+ label: "Internet Settings",
3106
+ icon: "settings-internet-settings"
3107
+ },
3108
+ {
3109
+ key: "lan",
3110
+ label: "LAN Settings",
3111
+ icon: "settings-lan-settings"
3112
+ },
3113
+ {
3114
+ key: "wireless",
3115
+ label: "Wireless Networks",
3116
+ icon: "settings-wireless-settings"
3117
+ }
3118
+ ],
3119
+ [
3120
+ {
3121
+ key: "vpn",
3122
+ label: "VPN",
3123
+ icon: "settings-vpn"
3124
+ },
3125
+ {
3126
+ key: "security",
3127
+ label: "Network Security",
3128
+ icon: "settings-network-security"
3129
+ },
3130
+ {
3131
+ key: "transmission",
3132
+ label: "Transmission",
3133
+ icon: "settings-transmission"
3134
+ },
3135
+ {
3136
+ key: "authentication",
3137
+ label: "Authentication",
3138
+ icon: "settings-authentication"
3139
+ },
3140
+ {
3141
+ key: "ddns",
3142
+ label: "Dynamic DNS",
3143
+ icon: "settings-ddns"
3144
+ }
3145
+ ],
3146
+ [{
3147
+ key: "profiles",
3148
+ label: "Profiles",
3149
+ icon: "settings-groups"
3150
+ }, {
3151
+ key: "site",
3152
+ label: "Site Settings",
3153
+ icon: "settings-site-settings"
3154
+ }],
3155
+ [{
3156
+ key: "logs",
3157
+ label: "Logs",
3158
+ icon: "settings-log",
3159
+ hasCount: !0
3160
+ }]
3161
+ ], me = ({ logsCount: e = 1, activeTab: t = "settings", onTabChange: i, onOpenWirelessNetworks: a, onOpenLogs: c, onSelectSetting: u, showTabBar: d = !0, className: p = "", style: h }) => {
3162
+ let [_, v] = C(""), [y, b] = C(!1), [S, w] = C(null), D = x(() => {
3163
+ let e = _.trim().toLowerCase();
3164
+ return e ? pe.map((t) => t.filter((t) => t.label.toLowerCase().includes(e))).filter((e) => e.length > 0) : pe;
3165
+ }, [_]), O = (e) => {
3166
+ u?.(e.key), e.key === "wireless" ? a ? a() : b(!0) : e.key === "logs" && c ? c() : w(e);
3167
+ };
3168
+ return /* @__PURE__ */ E("div", {
3169
+ className: `tp-omada-screen ${d ? "tp-omada-screen--standalone" : ""} ${p}`.trim(),
3170
+ "data-testid": "omada-site-settings-page",
3171
+ style: h,
3172
+ children: [
3173
+ /* @__PURE__ */ T("div", {
3174
+ className: "tp-omada-header-wrap",
3175
+ children: /* @__PURE__ */ T(r, {
3176
+ variant: "floating",
3177
+ title: "Settings"
3178
+ })
3179
+ }),
3180
+ /* @__PURE__ */ T("div", {
3181
+ className: "tp-omada-scroll",
3182
+ children: /* @__PURE__ */ E("div", {
3183
+ className: `tp-omada-body ${d ? "tp-omada-body--with-tabbar" : ""}`.trim(),
3184
+ children: [/* @__PURE__ */ T(l, {
3185
+ value: _,
3186
+ placeholder: "Search",
3187
+ onChange: v,
3188
+ onSearch: v
3189
+ }), D.length === 0 ? /* @__PURE__ */ T(s, {
3190
+ illustration: "no-search",
3191
+ title: "No Matching Settings",
3192
+ description: `No setting rows matched "${_}".`,
3193
+ compact: !0
3194
+ }) : D.map((t, n) => /* @__PURE__ */ T(o, {
3195
+ divided: !0,
3196
+ children: t.map((t) => /* @__PURE__ */ T(m, {
3197
+ leading: /* @__PURE__ */ T("span", {
3198
+ style: {
3199
+ color: "var(--tp-text-primary)",
3200
+ display: "inline-flex"
3201
+ },
3202
+ children: /* @__PURE__ */ T(g, {
3203
+ name: t.icon,
3204
+ size: 22
3205
+ })
3206
+ }),
3207
+ title: t.label,
3208
+ value: t.hasCount && e > 0 ? e : void 0,
3209
+ arrow: !0,
3210
+ onClick: () => O(t)
3211
+ }, t.key))
3212
+ }, n))]
3213
+ })
3214
+ }),
3215
+ d && /* @__PURE__ */ T("div", {
3216
+ className: "tp-omada-standalone-tabbar",
3217
+ children: /* @__PURE__ */ T(n, {
3218
+ variant: "floating-pill",
3219
+ items: P,
3220
+ activeKey: t,
3221
+ onChange: (e) => i?.(e)
3222
+ })
3223
+ }),
3224
+ /* @__PURE__ */ T(f, {
3225
+ open: y,
3226
+ title: "Wireless Networks",
3227
+ subtitle: "Configure SSID & ACL",
3228
+ onClose: () => b(!1),
3229
+ children: /* @__PURE__ */ T(H, { showHeader: !1 })
3230
+ }),
3231
+ /* @__PURE__ */ T(f, {
3232
+ open: !!S,
3233
+ title: S?.label,
3234
+ subtitle: "Site 92 • Controller 62",
3235
+ onClose: () => w(null),
3236
+ children: S && /* @__PURE__ */ E(o, {
3237
+ divided: !0,
3238
+ children: [
3239
+ /* @__PURE__ */ T(m, {
3240
+ title: "Profile Status",
3241
+ value: "Synced"
3242
+ }),
3243
+ /* @__PURE__ */ T(m, {
3244
+ title: "Target Gateway",
3245
+ value: "ER7212PC (192.168.0.1)"
3246
+ }),
3247
+ /* @__PURE__ */ T(m, {
3248
+ title: "Managed APs",
3249
+ value: "2 × EAP723"
3250
+ })
3251
+ ]
3252
+ })
3253
+ })
3254
+ ]
3255
+ });
3256
+ }, he = ({ siteName: e = "92", score: t = 100, deviceScore: n = 100, wifiScore: i = 100, wanScore: s = 100, onBack: c, className: l = "", style: u }) => {
3257
+ let d = 2 * Math.PI * 46, f = Math.max(0, Math.min(100, t)), p = d * (1 - f / 100);
3258
+ return /* @__PURE__ */ E("div", {
3259
+ className: `tp-omada-screen ${l}`.trim(),
3260
+ "data-testid": "omada-health-detail-page",
3261
+ style: u,
3262
+ children: [/* @__PURE__ */ T("div", {
3263
+ className: "tp-omada-header-wrap",
3264
+ children: /* @__PURE__ */ T(r, {
3265
+ variant: "floating",
3266
+ title: "Site Health Score",
3267
+ subtitle: `Site ${e}`,
3268
+ left: c ? /* @__PURE__ */ T("button", {
3269
+ type: "button",
3270
+ className: "tp-header-icon-btn",
3271
+ "aria-label": "Back",
3272
+ onClick: c,
3273
+ children: /* @__PURE__ */ T(g, {
3274
+ name: "nav-back",
3275
+ size: 20
3276
+ })
3277
+ }) : void 0
3278
+ })
3279
+ }), /* @__PURE__ */ T("div", {
3280
+ className: "tp-omada-scroll",
3281
+ children: /* @__PURE__ */ E("div", {
3282
+ className: "tp-omada-body",
3283
+ children: [
3284
+ /* @__PURE__ */ E("section", {
3285
+ className: "tp-omada-card",
3286
+ children: [/* @__PURE__ */ E("div", {
3287
+ className: "tp-omada-gauge-wrap",
3288
+ children: [/* @__PURE__ */ E("svg", {
3289
+ width: "124",
3290
+ height: "124",
3291
+ viewBox: "0 0 120 120",
3292
+ "aria-label": `Health score ${f}`,
3293
+ children: [
3294
+ /* @__PURE__ */ T("circle", {
3295
+ cx: "60",
3296
+ cy: "60",
3297
+ r: 46,
3298
+ fill: "none",
3299
+ stroke: "var(--tp-divider)",
3300
+ strokeWidth: "9"
3301
+ }),
3302
+ /* @__PURE__ */ T("circle", {
3303
+ cx: "60",
3304
+ cy: "60",
3305
+ r: 46,
3306
+ fill: "none",
3307
+ stroke: "var(--tp-color-green)",
3308
+ strokeWidth: "9",
3309
+ strokeLinecap: "round",
3310
+ strokeDasharray: d,
3311
+ strokeDashoffset: p,
3312
+ transform: "rotate(-90 60 60)"
3313
+ }),
3314
+ /* @__PURE__ */ T("text", {
3315
+ x: "60",
3316
+ y: "58",
3317
+ textAnchor: "middle",
3318
+ fill: "var(--tp-color-green)",
3319
+ fontSize: "28",
3320
+ fontWeight: "600",
3321
+ children: f
3322
+ }),
3323
+ /* @__PURE__ */ T("text", {
3324
+ x: "60",
3325
+ y: "78",
3326
+ textAnchor: "middle",
3327
+ fill: "var(--tp-text-secondary)",
3328
+ fontSize: "12",
3329
+ children: "Good"
3330
+ })
3331
+ ]
3332
+ }), /* @__PURE__ */ T("div", {
3333
+ style: {
3334
+ fontSize: 12,
3335
+ color: "var(--tp-text-secondary)"
3336
+ },
3337
+ children: "Nov 23, 06:30 PM - Nov 23, 06:40 PM"
3338
+ })]
3339
+ }), /* @__PURE__ */ E("div", {
3340
+ className: "tp-omada-health-subgrid",
3341
+ children: [
3342
+ /* @__PURE__ */ E("div", {
3343
+ className: "tp-omada-health-subcard",
3344
+ children: [/* @__PURE__ */ T("div", {
3345
+ className: "tp-omada-health-subcard-label",
3346
+ children: "Device"
3347
+ }), /* @__PURE__ */ T("span", {
3348
+ className: "tp-omada-health-subcard-num",
3349
+ children: n
3350
+ })]
3351
+ }),
3352
+ /* @__PURE__ */ E("div", {
3353
+ className: "tp-omada-health-subcard",
3354
+ children: [/* @__PURE__ */ T("div", {
3355
+ className: "tp-omada-health-subcard-label",
3356
+ children: "Wi-Fi"
3357
+ }), /* @__PURE__ */ T("span", {
3358
+ className: "tp-omada-health-subcard-num",
3359
+ children: i
3360
+ })]
3361
+ }),
3362
+ /* @__PURE__ */ E("div", {
3363
+ className: "tp-omada-health-subcard",
3364
+ children: [/* @__PURE__ */ T("div", {
3365
+ className: "tp-omada-health-subcard-label",
3366
+ children: "WAN"
3367
+ }), /* @__PURE__ */ T("span", {
3368
+ className: "tp-omada-health-subcard-num",
3369
+ children: s
3370
+ })]
3371
+ })
3372
+ ]
3373
+ })]
3374
+ }),
3375
+ /* @__PURE__ */ E("section", {
3376
+ className: "tp-omada-card",
3377
+ children: [
3378
+ /* @__PURE__ */ E("div", {
3379
+ className: "tp-omada-card-header",
3380
+ children: [/* @__PURE__ */ T("h3", {
3381
+ className: "tp-omada-card-title",
3382
+ children: "24-Hour Health Trend"
3383
+ }), /* @__PURE__ */ T("span", {
3384
+ style: {
3385
+ fontSize: 12,
3386
+ color: "var(--tp-color-green)"
3387
+ },
3388
+ children: "100 Avg"
3389
+ })]
3390
+ }),
3391
+ /* @__PURE__ */ E("svg", {
3392
+ viewBox: "0 0 320 80",
3393
+ width: "100%",
3394
+ height: "80",
3395
+ preserveAspectRatio: "none",
3396
+ style: {
3397
+ display: "block",
3398
+ marginTop: 10
3399
+ },
3400
+ "aria-label": "24-hour site health score chart",
3401
+ children: [
3402
+ /* @__PURE__ */ T("line", {
3403
+ x1: "0",
3404
+ y1: "10",
3405
+ x2: "320",
3406
+ y2: "10",
3407
+ stroke: "var(--tp-omada-chart-grid)",
3408
+ strokeDasharray: "3 3"
3409
+ }),
3410
+ /* @__PURE__ */ T("line", {
3411
+ x1: "0",
3412
+ y1: "42",
3413
+ x2: "320",
3414
+ y2: "42",
3415
+ stroke: "var(--tp-omada-chart-grid)",
3416
+ strokeDasharray: "3 3"
3417
+ }),
3418
+ /* @__PURE__ */ T("line", {
3419
+ x1: "0",
3420
+ y1: "74",
3421
+ x2: "320",
3422
+ y2: "74",
3423
+ stroke: "var(--tp-omada-chart-grid)"
3424
+ }),
3425
+ /* @__PURE__ */ T("path", {
3426
+ d: "M0,12 L110,12 L120,15 L132,12 L240,12 L252,14 L264,12 L320,12",
3427
+ fill: "none",
3428
+ stroke: "var(--tp-color-green)",
3429
+ strokeWidth: "2.2"
3430
+ })
3431
+ ]
3432
+ }),
3433
+ /* @__PURE__ */ E("div", {
3434
+ className: "tp-omada-chart-axis-row",
3435
+ style: { marginTop: 4 },
3436
+ children: [/* @__PURE__ */ T("span", { children: "Nov 22, 06:40 PM" }), /* @__PURE__ */ T("span", { children: "Nov 23, 06:40 PM" })]
3437
+ })
3438
+ ]
3439
+ }),
3440
+ /* @__PURE__ */ T(a, { title: "Diagnostic Checks" }),
3441
+ /* @__PURE__ */ E(o, {
3442
+ divided: !0,
3443
+ children: [
3444
+ /* @__PURE__ */ T(m, {
3445
+ leading: /* @__PURE__ */ T(g, {
3446
+ name: "status-success-solid",
3447
+ size: 20
3448
+ }),
3449
+ title: "Gateway & AP Availability",
3450
+ subtitle: "1 ER7212PC and 2 EAP723 online",
3451
+ value: "100%"
3452
+ }),
3453
+ /* @__PURE__ */ T(m, {
3454
+ leading: /* @__PURE__ */ T(g, {
3455
+ name: "status-success-solid",
3456
+ size: 20
3457
+ }),
3458
+ title: "Wi-Fi Interference & Retry Rate",
3459
+ subtitle: "5 GHz / 6 GHz channels clear",
3460
+ value: "98%"
3461
+ }),
3462
+ /* @__PURE__ */ T(m, {
3463
+ leading: /* @__PURE__ */ T(g, {
3464
+ name: "status-success-solid",
3465
+ size: 20
3466
+ }),
3467
+ title: "WAN3 Latency & Packet Loss",
3468
+ subtitle: "Ping 3 ms • 0.0% packet loss",
3469
+ value: "100%"
3470
+ })
3471
+ ]
3472
+ })
3473
+ ]
3474
+ })
3475
+ })]
3476
+ });
3477
+ }, ge = [
3478
+ {
3479
+ key: "overview",
3480
+ label: "Overview"
3481
+ },
3482
+ {
3483
+ key: "ports",
3484
+ label: "Ports"
3485
+ },
3486
+ {
3487
+ key: "config",
3488
+ label: "Config"
3489
+ }
3490
+ ];
3491
+ function _e(e) {
3492
+ return e.type === "ap" ? [{
3493
+ id: "eth1",
3494
+ label: "ETH1 (2.5G)",
3495
+ icon: "port-poe",
3496
+ link: "2500M Full",
3497
+ poe: "12.4 W (802.3at)",
3498
+ vlan: "VLAN 1, 10",
3499
+ rx: "4.12 GB",
3500
+ tx: "1.88 GB"
3501
+ }, {
3502
+ id: "eth2",
3503
+ label: "ETH2",
3504
+ icon: "port-lan",
3505
+ link: "Link Down",
3506
+ poe: "Disabled",
3507
+ vlan: "VLAN 1",
3508
+ rx: "0 B",
3509
+ tx: "0 B"
3510
+ }] : [
3511
+ {
3512
+ id: "sfp1",
3513
+ label: "SFP1",
3514
+ icon: "port-sfp2",
3515
+ link: "Link Down",
3516
+ poe: "N/A",
3517
+ vlan: "WAN1",
3518
+ rx: "0 B",
3519
+ tx: "0 B"
3520
+ },
3521
+ {
3522
+ id: "sfp2",
3523
+ label: "SFP2",
3524
+ icon: "port-sfp2",
3525
+ link: "Link Down",
3526
+ poe: "N/A",
3527
+ vlan: "WAN2",
3528
+ rx: "0 B",
3529
+ tx: "0 B"
3530
+ },
3531
+ {
3532
+ id: "wan3",
3533
+ label: "WAN3",
3534
+ icon: "port-wan",
3535
+ link: "1000M Full",
3536
+ poe: "N/A",
3537
+ vlan: "ISP WAN3",
3538
+ rx: "18.6 GB",
3539
+ tx: "6.4 GB"
3540
+ },
3541
+ {
3542
+ id: "lan4",
3543
+ label: "WAN/LAN4",
3544
+ icon: "port-lan",
3545
+ link: "1000M Full",
3546
+ poe: "N/A",
3547
+ vlan: "LAN",
3548
+ rx: "2.1 GB",
3549
+ tx: "1.9 GB"
3550
+ },
3551
+ {
3552
+ id: "lan5",
3553
+ label: "LAN5",
3554
+ icon: "port-poe",
3555
+ link: "1000M Full",
3556
+ poe: "12.4 W",
3557
+ vlan: "Trunk (1,10)",
3558
+ rx: "1.8 GB",
3559
+ tx: "4.1 GB"
3560
+ },
3561
+ {
3562
+ id: "lan6",
3563
+ label: "LAN6",
3564
+ icon: "port-poe",
3565
+ link: "1000M Full",
3566
+ poe: "11.8 W",
3567
+ vlan: "Trunk (1,10)",
3568
+ rx: "1.2 GB",
3569
+ tx: "2.7 GB"
3570
+ },
3571
+ {
3572
+ id: "lan7",
3573
+ label: "LAN7",
3574
+ icon: "port-lan",
3575
+ link: "Link Down",
3576
+ poe: "0 W",
3577
+ vlan: "VLAN 1",
3578
+ rx: "0 B",
3579
+ tx: "0 B"
3580
+ },
3581
+ {
3582
+ id: "lan8",
3583
+ label: "LAN8",
3584
+ icon: "port-lan",
3585
+ link: "Link Down",
3586
+ poe: "0 W",
3587
+ vlan: "VLAN 1",
3588
+ rx: "0 B",
3589
+ tx: "0 B"
3590
+ }
3591
+ ];
3592
+ }
3593
+ var ve = ({ device: t = F[1], onBack: n, onSaveConfig: i, className: s = "", style: c }) => {
3594
+ let [l, p] = C("overview"), h = x(() => _e(t), [t]), [v, y] = C(h[0]?.id ?? "eth1"), [b, S] = C(t.name ?? t.mac), [D, O] = C(t.ip), [k, A] = C(t.mac), [j, M] = C("443"), [P, L] = C(!0), [R, z] = C(!1), [B, V] = C(!1), [H, U] = C(!1), W = h.find((e) => e.id === v) ?? h[0];
3595
+ return /* @__PURE__ */ E("div", {
3596
+ className: `tp-omada-screen ${s}`.trim(),
3597
+ "data-testid": "omada-device-detail-page",
3598
+ style: c,
3599
+ children: [
3600
+ /* @__PURE__ */ T("div", {
3601
+ className: "tp-omada-header-wrap",
3602
+ children: /* @__PURE__ */ T(r, {
3603
+ variant: "floating",
3604
+ title: b,
3605
+ subtitle: `${t.model} • ${t.ip}`,
3606
+ left: n ? /* @__PURE__ */ T("button", {
3607
+ type: "button",
3608
+ className: "tp-header-icon-btn",
3609
+ "aria-label": "Back",
3610
+ onClick: n,
3611
+ children: /* @__PURE__ */ T(g, {
3612
+ name: "nav-back",
3613
+ size: 20
3614
+ })
3615
+ }) : void 0,
3616
+ right: /* @__PURE__ */ T("button", {
3617
+ type: "button",
3618
+ className: "tp-header-icon-btn",
3619
+ "aria-label": "Upgrade firmware",
3620
+ onClick: () => {
3621
+ U(!1), V(!0);
3622
+ },
3623
+ children: /* @__PURE__ */ T(g, {
3624
+ name: "nav-refresh",
3625
+ size: 19
3626
+ })
3627
+ })
3628
+ })
3629
+ }),
3630
+ /* @__PURE__ */ T(u, {
3631
+ variant: "underline",
3632
+ fullWidth: !0,
3633
+ options: ge,
3634
+ value: l,
3635
+ onChange: (e) => p(e)
3636
+ }),
3637
+ /* @__PURE__ */ T("div", {
3638
+ className: "tp-omada-scroll",
3639
+ children: /* @__PURE__ */ E("div", {
3640
+ className: "tp-omada-body",
3641
+ children: [
3642
+ l === "overview" && /* @__PURE__ */ E(w, { children: [
3643
+ /* @__PURE__ */ E("section", {
3644
+ className: "tp-omada-card",
3645
+ children: [/* @__PURE__ */ E("div", {
3646
+ style: {
3647
+ display: "flex",
3648
+ alignItems: "center",
3649
+ gap: 14
3650
+ },
3651
+ children: [
3652
+ /* @__PURE__ */ T(I, {
3653
+ type: t.type,
3654
+ size: 48
3655
+ }),
3656
+ /* @__PURE__ */ E("div", {
3657
+ style: {
3658
+ flex: 1,
3659
+ minWidth: 0
3660
+ },
3661
+ children: [/* @__PURE__ */ T("div", {
3662
+ style: {
3663
+ fontSize: 16,
3664
+ fontWeight: 600
3665
+ },
3666
+ children: t.model
3667
+ }), /* @__PURE__ */ E("div", {
3668
+ style: {
3669
+ fontSize: 13,
3670
+ color: "var(--tp-text-secondary)",
3671
+ marginTop: 2
3672
+ },
3673
+ children: ["MAC: ", t.mac]
3674
+ })]
3675
+ }),
3676
+ /* @__PURE__ */ T("span", {
3677
+ className: "tp-omada-status-line tp-omada-status-line--good",
3678
+ children: "Connected"
3679
+ })
3680
+ ]
3681
+ }), t.upgradeAvailable && /* @__PURE__ */ T("div", {
3682
+ style: { marginTop: 14 },
3683
+ children: /* @__PURE__ */ T(d, {
3684
+ variant: "primary",
3685
+ size: "md",
3686
+ block: !0,
3687
+ onClick: () => {
3688
+ U(!1), V(!0);
3689
+ },
3690
+ children: `Upgrade Firmware (${t.firmwareVersion ?? "v1.2.0"} → ${t.targetVersion ?? "v1.3.2"})`
3691
+ })
3692
+ })]
3693
+ }),
3694
+ /* @__PURE__ */ T(a, { title: "Device Telemetry" }),
3695
+ /* @__PURE__ */ E(o, {
3696
+ divided: !0,
3697
+ children: [
3698
+ /* @__PURE__ */ T(m, {
3699
+ title: "IP Address",
3700
+ value: D
3701
+ }),
3702
+ /* @__PURE__ */ T(m, {
3703
+ title: "Health",
3704
+ value: t.healthLabel
3705
+ }),
3706
+ /* @__PURE__ */ T(m, {
3707
+ title: "Firmware Version",
3708
+ value: H ? t.targetVersion ?? "v1.3.2" : t.firmwareVersion ?? "v6.3.0.63"
3709
+ }),
3710
+ /* @__PURE__ */ T(m, {
3711
+ title: "Uptime",
3712
+ value: t.uptime ?? "14d 11h 09m"
3713
+ }),
3714
+ /* @__PURE__ */ T(m, {
3715
+ title: "CPU Utilization",
3716
+ value: `${t.cpuPct ?? 5}%`
3717
+ }),
3718
+ /* @__PURE__ */ T(m, {
3719
+ title: "Memory Utilization",
3720
+ value: `${t.memoryPct ?? 39}%`
3721
+ })
3722
+ ]
3723
+ })
3724
+ ] }),
3725
+ l === "ports" && /* @__PURE__ */ E(w, { children: [
3726
+ /* @__PURE__ */ T(a, { title: "Select a Port to Inspect" }),
3727
+ /* @__PURE__ */ T("section", {
3728
+ className: "tp-omada-card",
3729
+ children: /* @__PURE__ */ T("div", {
3730
+ className: "tp-omada-port-grid",
3731
+ children: h.map((e) => {
3732
+ let t = e.id === W.id;
3733
+ return /* @__PURE__ */ E("button", {
3734
+ type: "button",
3735
+ className: `tp-omada-port-tile ${t ? "tp-omada-port-tile--active" : ""}`.trim(),
3736
+ onClick: () => y(e.id),
3737
+ children: [
3738
+ /* @__PURE__ */ T(g, {
3739
+ name: e.icon,
3740
+ size: 20
3741
+ }),
3742
+ /* @__PURE__ */ T("span", {
3743
+ style: { fontWeight: 500 },
3744
+ children: e.label
3745
+ }),
3746
+ /* @__PURE__ */ T("span", {
3747
+ style: {
3748
+ fontSize: 10,
3749
+ color: "var(--tp-text-secondary)"
3750
+ },
3751
+ children: e.link === "Link Down" ? "Down" : "Up"
3752
+ })
3753
+ ]
3754
+ }, e.id);
3755
+ })
3756
+ })
3757
+ }),
3758
+ W && /* @__PURE__ */ E("section", {
3759
+ className: "tp-omada-card",
3760
+ "aria-label": "Selected Port Details",
3761
+ children: [/* @__PURE__ */ E("div", {
3762
+ style: {
3763
+ display: "flex",
3764
+ alignItems: "center",
3765
+ gap: 12,
3766
+ marginBottom: 10
3767
+ },
3768
+ children: [/* @__PURE__ */ T(_, {
3769
+ name: "port-card-expand",
3770
+ width: 76,
3771
+ height: 76,
3772
+ playing: !0
3773
+ }, W.id), /* @__PURE__ */ E("div", {
3774
+ style: { flex: 1 },
3775
+ children: [
3776
+ /* @__PURE__ */ T("div", {
3777
+ style: {
3778
+ fontSize: 16,
3779
+ fontWeight: 600
3780
+ },
3781
+ children: W.label
3782
+ }),
3783
+ /* @__PURE__ */ T("div", {
3784
+ style: {
3785
+ fontSize: 13,
3786
+ color: "var(--tp-color-green)",
3787
+ marginTop: 2
3788
+ },
3789
+ children: W.link
3790
+ }),
3791
+ /* @__PURE__ */ E("div", {
3792
+ style: {
3793
+ fontSize: 12,
3794
+ color: "var(--tp-text-secondary)",
3795
+ marginTop: 2
3796
+ },
3797
+ children: [
3798
+ W.vlan,
3799
+ " • PoE: ",
3800
+ W.poe
3801
+ ]
3802
+ })
3803
+ ]
3804
+ })]
3805
+ }), /* @__PURE__ */ E(o, {
3806
+ divided: !0,
3807
+ children: [/* @__PURE__ */ T(m, {
3808
+ title: "Rx Bytes",
3809
+ value: W.rx
3810
+ }), /* @__PURE__ */ T(m, {
3811
+ title: "Tx Bytes",
3812
+ value: W.tx
3813
+ })]
3814
+ })]
3815
+ })
3816
+ ] }),
3817
+ l === "config" && /* @__PURE__ */ E(w, { children: [
3818
+ /* @__PURE__ */ T(a, { title: "Static IP & Management" }),
3819
+ /* @__PURE__ */ E(o, {
3820
+ divided: !0,
3821
+ children: [/* @__PURE__ */ E("div", {
3822
+ style: {
3823
+ padding: "12px 16px",
3824
+ display: "flex",
3825
+ flexDirection: "column",
3826
+ gap: 14
3827
+ },
3828
+ children: [
3829
+ /* @__PURE__ */ T(N, {
3830
+ type: "text",
3831
+ label: "Device Name",
3832
+ value: b,
3833
+ onChange: S
3834
+ }),
3835
+ /* @__PURE__ */ T(N, {
3836
+ type: "ip",
3837
+ label: "Static IP Address",
3838
+ value: D,
3839
+ onChange: O
3840
+ }),
3841
+ /* @__PURE__ */ T(N, {
3842
+ type: "mac",
3843
+ label: "Management MAC",
3844
+ value: k,
3845
+ onChange: A
3846
+ }),
3847
+ /* @__PURE__ */ T(N, {
3848
+ type: "port",
3849
+ label: "Management Port",
3850
+ value: j,
3851
+ onChange: M
3852
+ })
3853
+ ]
3854
+ }), /* @__PURE__ */ T(m, {
3855
+ title: "Device LED",
3856
+ subtitle: P ? "Status LED On" : "Status LED Off",
3857
+ trailing: /* @__PURE__ */ T(e, {
3858
+ checked: P,
3859
+ onChange: L,
3860
+ ariaLabel: "Device LED"
3861
+ })
3862
+ })]
3863
+ }),
3864
+ /* @__PURE__ */ T(d, {
3865
+ variant: "primary",
3866
+ block: !0,
3867
+ onClick: () => {
3868
+ z(!0), i?.({
3869
+ ...t,
3870
+ name: b,
3871
+ ip: D,
3872
+ mac: k
3873
+ });
3874
+ },
3875
+ children: "Save Configuration"
3876
+ }),
3877
+ R && /* @__PURE__ */ E("div", {
3878
+ style: {
3879
+ padding: "10px 12px",
3880
+ borderRadius: 8,
3881
+ background: "var(--tp-focus-10)",
3882
+ color: "var(--tp-focus)",
3883
+ fontSize: 13,
3884
+ textAlign: "center"
3885
+ },
3886
+ children: [
3887
+ "Saved configuration for ",
3888
+ b,
3889
+ " (",
3890
+ D,
3891
+ ")"
3892
+ ]
3893
+ })
3894
+ ] })
3895
+ ]
3896
+ })
3897
+ }),
3898
+ /* @__PURE__ */ T(f, {
3899
+ open: B,
3900
+ title: H ? "Firmware Up to Date" : `Upgrade ${t.model}`,
3901
+ subtitle: `${t.firmwareVersion ?? "v1.2.0"} → ${t.targetVersion ?? "v1.3.2"}`,
3902
+ onClose: () => V(!1),
3903
+ children: /* @__PURE__ */ E("div", {
3904
+ style: {
3905
+ display: "flex",
3906
+ flexDirection: "column",
3907
+ alignItems: "center",
3908
+ gap: 14,
3909
+ padding: "8px 0 12px"
3910
+ },
3911
+ children: [
3912
+ /* @__PURE__ */ T(_, {
3913
+ name: "update-network",
3914
+ width: 112,
3915
+ height: 112,
3916
+ playing: !H
3917
+ }),
3918
+ /* @__PURE__ */ T("div", {
3919
+ style: {
3920
+ fontSize: 14,
3921
+ textAlign: "center",
3922
+ color: "var(--tp-text-secondary-alt)"
3923
+ },
3924
+ children: H ? `${t.model} (${t.mac}) is now running ${t.targetVersion ?? "v1.3.2"}.` : `Downloading and verifying signed firmware image for ${t.mac}…`
3925
+ }),
3926
+ H ? /* @__PURE__ */ T(d, {
3927
+ variant: "secondary",
3928
+ block: !0,
3929
+ onClick: () => V(!1),
3930
+ children: "Done"
3931
+ }) : /* @__PURE__ */ T(d, {
3932
+ variant: "primary",
3933
+ block: !0,
3934
+ onClick: () => U(!0),
3935
+ children: "Apply Firmware Update"
3936
+ })
3937
+ ]
3938
+ })
3939
+ })
3940
+ ]
3941
+ });
3942
+ }, ye = [
3943
+ "launch",
3944
+ "dashboard",
3945
+ "insights",
3946
+ "devices",
3947
+ "clients",
3948
+ "settings"
3949
+ ], be = [
3950
+ {
3951
+ key: "speed",
3952
+ label: "Speed Test",
3953
+ icon: "tool-speed-test",
3954
+ summary: "WAN3: 942 Mbps ↓ / 418 Mbps ↑"
3955
+ },
3956
+ {
3957
+ key: "ping",
3958
+ label: "Ping Test",
3959
+ icon: "tool-ping-test",
3960
+ summary: "1.1.1.1 avg 3.2 ms • 0% loss"
3961
+ },
3962
+ {
3963
+ key: "tracert",
3964
+ label: "Traceroute",
3965
+ icon: "tool-tracert",
3966
+ summary: "4 hops to edge POP (3.4 ms)"
3967
+ },
3968
+ {
3969
+ key: "wifi-scan",
3970
+ label: "Wi-Fi Scan",
3971
+ icon: "tool-wi-fi-scan",
3972
+ summary: "5 GHz Ch 36 optimal (12% util)"
3973
+ },
3974
+ {
3975
+ key: "roaming",
3976
+ label: "Roaming Test",
3977
+ icon: "tool-roaming-test",
3978
+ summary: "802.11k/v/r fast transition < 18 ms"
3979
+ },
3980
+ {
3981
+ key: "iface",
3982
+ label: "Port Detect",
3983
+ icon: "tool-interface-detection",
3984
+ summary: "ER7212PC WAN3 1000M Full"
3985
+ }
3986
+ ], xe = ({ initialScreen: e = "dashboard", screen: r, onScreenChange: a, device: o = "iphone16pro", showFrame: s = !0, className: c = "", style: l }) => {
3987
+ let [u, d] = C(e), p = r ?? u, [m, h] = C("92"), [_, v] = C("62"), [y, b] = C(F[0]), [x, S] = C(1), [D, O] = C("dashboard"), [k, A] = C(!1), [j, M] = C(null), N = (e) => {
3988
+ O(p), r === void 0 && d(e), a?.(e);
3989
+ }, I = ye.includes(p);
3990
+ return /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(t, {
3991
+ device: o,
3992
+ showFrame: s,
3993
+ className: c,
3994
+ style: l,
3995
+ statusBar: /* @__PURE__ */ T(i, {
3996
+ time: "10:51",
3997
+ muted: p !== "controllers",
3998
+ locationActive: p === "controllers"
3999
+ }),
4000
+ floatingAction: p === "launch" || p === "dashboard" ? /* @__PURE__ */ T("button", {
4001
+ type: "button",
4002
+ className: "tp-omada-fab",
4003
+ "aria-label": "Network Toolkit",
4004
+ onClick: () => A(!0),
4005
+ children: /* @__PURE__ */ T(g, {
4006
+ name: "settings-network-tools",
4007
+ size: 22,
4008
+ color: "#FFFFFF"
4009
+ })
4010
+ }) : void 0,
4011
+ bottomBar: I ? /* @__PURE__ */ T(n, {
4012
+ variant: "floating-pill",
4013
+ items: P,
4014
+ activeKey: p === "launch" ? "dashboard" : p,
4015
+ onChange: (e) => N(e)
4016
+ }) : void 0,
4017
+ children: (() => {
4018
+ switch (p) {
4019
+ case "launch": return /* @__PURE__ */ T(K, {
4020
+ siteName: m,
4021
+ controllerName: _,
4022
+ showTabBar: !1,
4023
+ showFloatingAction: !1,
4024
+ onBackToGlobal: () => N("controllers"),
4025
+ onOpenLogs: () => N("incidents"),
4026
+ onUpgrade: () => N("dashboard"),
4027
+ onTabChange: (e) => N(e)
4028
+ });
4029
+ case "controllers": return /* @__PURE__ */ T(Y, { onSelectController: (e) => {
4030
+ v(e.name), N("dashboard");
4031
+ } });
4032
+ case "dashboard": return /* @__PURE__ */ T(X, {
4033
+ siteName: m,
4034
+ controllerName: _,
4035
+ unreadLogsCount: x,
4036
+ showTabBar: !1,
4037
+ showFloatingAction: !1,
4038
+ onSiteChange: h,
4039
+ onBackToGlobal: () => N("controllers"),
4040
+ onOpenLogs: () => N("incidents"),
4041
+ onOpenHealthDetail: () => N("health-detail"),
4042
+ onOpenInsights: () => N("insights"),
4043
+ onOpenDevices: () => N("devices"),
4044
+ onOpenClients: () => N("clients")
4045
+ });
4046
+ case "insights": return /* @__PURE__ */ T(Q, { showTabBar: !1 });
4047
+ case "devices": return /* @__PURE__ */ T($, {
4048
+ showTabBar: !1,
4049
+ onSelectDevice: (e) => {
4050
+ b(e), N("device-detail");
4051
+ }
4052
+ });
4053
+ case "clients": return /* @__PURE__ */ T(fe, { showTabBar: !1 });
4054
+ case "settings": return /* @__PURE__ */ T(me, {
4055
+ logsCount: x,
4056
+ showTabBar: !1,
4057
+ onOpenWirelessNetworks: () => N("wireless-settings"),
4058
+ onOpenLogs: () => N("incidents")
4059
+ });
4060
+ case "health-detail": return /* @__PURE__ */ T(he, {
4061
+ siteName: m,
4062
+ onBack: () => N("dashboard")
4063
+ });
4064
+ case "device-detail": return /* @__PURE__ */ T(ve, {
4065
+ device: y,
4066
+ onBack: () => N("devices")
4067
+ });
4068
+ case "wireless-settings": return /* @__PURE__ */ T(H, { onBack: () => N("settings") });
4069
+ case "incidents": return /* @__PURE__ */ T(G, {
4070
+ onUnreadCountChange: S,
4071
+ onBack: () => N(D === "settings" ? "settings" : "dashboard")
4072
+ });
4073
+ default: return null;
4074
+ }
4075
+ })()
4076
+ }), /* @__PURE__ */ T(f, {
4077
+ open: k,
4078
+ title: "Network Toolkit",
4079
+ subtitle: `Diagnostics for Site ${m}`,
4080
+ onClose: () => A(!1),
4081
+ children: /* @__PURE__ */ E("div", {
4082
+ style: {
4083
+ display: "flex",
4084
+ flexDirection: "column",
4085
+ gap: 12
4086
+ },
4087
+ children: [/* @__PURE__ */ T("div", {
4088
+ className: "tp-omada-tool-grid",
4089
+ children: be.map((e) => /* @__PURE__ */ E("button", {
4090
+ type: "button",
4091
+ className: "tp-omada-tool-tile",
4092
+ onClick: () => M(`${e.label}: ${e.summary}`),
4093
+ children: [/* @__PURE__ */ T(g, {
4094
+ name: e.icon,
4095
+ size: 30
4096
+ }), /* @__PURE__ */ T("span", { children: e.label })]
4097
+ }, e.key))
4098
+ }), j && /* @__PURE__ */ T("div", {
4099
+ style: {
4100
+ padding: "10px 12px",
4101
+ borderRadius: 8,
4102
+ background: "var(--tp-focus-10)",
4103
+ color: "var(--tp-focus)",
4104
+ fontSize: 13
4105
+ },
4106
+ children: j
4107
+ })]
4108
+ })
4109
+ })] });
4110
+ };
4111
+ export { P as _, le as a, N as b, Q as c, Y as d, K as f, F as g, H as h, me as i, X as l, G as m, ve as n, fe as o, U as p, he as r, $ as s, xe as t, q as u, z as v, I as y };