@hanzo/ui 8.0.23 → 8.0.25

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 (60) hide show
  1. package/README.md +59 -0
  2. package/dist/chunk-3NG33DV2.cjs +607 -0
  3. package/dist/chunk-3NG33DV2.cjs.map +1 -0
  4. package/dist/chunk-5CZOYONP.js +343 -0
  5. package/dist/chunk-5CZOYONP.js.map +1 -0
  6. package/dist/{chunk-P2P6ST6J.js → chunk-7ZNK6JSS.js} +9 -394
  7. package/dist/chunk-7ZNK6JSS.js.map +1 -0
  8. package/dist/chunk-GVCOAJLO.js +397 -0
  9. package/dist/chunk-GVCOAJLO.js.map +1 -0
  10. package/dist/chunk-GWNNLYX4.cjs +353 -0
  11. package/dist/chunk-GWNNLYX4.cjs.map +1 -0
  12. package/dist/{chunk-NBZDIMP3.cjs → chunk-ONVERVFG.cjs} +33 -438
  13. package/dist/chunk-ONVERVFG.cjs.map +1 -0
  14. package/dist/chunk-P2QU5MN5.js +555 -0
  15. package/dist/chunk-P2QU5MN5.js.map +1 -0
  16. package/dist/chunk-WHJR5S4L.cjs +418 -0
  17. package/dist/chunk-WHJR5S4L.cjs.map +1 -0
  18. package/dist/framework/CollectionBuilder.d.ts +12 -0
  19. package/dist/framework/CollectionsBrowser.d.ts +26 -19
  20. package/dist/framework/DocTypeRecords.d.ts +31 -11
  21. package/dist/framework/MediaGrid.d.ts +42 -0
  22. package/dist/framework/RecordCards.d.ts +35 -0
  23. package/dist/framework/builder-logic.d.ts +76 -0
  24. package/dist/framework/client.d.ts +31 -44
  25. package/dist/framework/core.cjs +213 -0
  26. package/dist/framework/core.cjs.map +1 -0
  27. package/dist/framework/core.d.ts +6 -0
  28. package/dist/framework/core.js +4 -0
  29. package/dist/framework/core.js.map +1 -0
  30. package/dist/framework/data.d.ts +2 -2
  31. package/dist/framework/fields.d.ts +47 -4
  32. package/dist/framework/index.cjs +1340 -0
  33. package/dist/framework/index.cjs.map +1 -0
  34. package/dist/framework/index.d.ts +9 -23
  35. package/dist/framework/index.js +1119 -0
  36. package/dist/framework/index.js.map +1 -0
  37. package/dist/framework/media.d.ts +53 -0
  38. package/dist/framework/parts.d.ts +74 -0
  39. package/dist/framework/responsive.d.ts +41 -0
  40. package/dist/framework/types.d.ts +13 -7
  41. package/dist/product/SelectMenu.d.ts +13 -1
  42. package/dist/product/index.cjs +2061 -336
  43. package/dist/product/index.cjs.map +1 -1
  44. package/dist/product/index.js +1909 -3
  45. package/dist/product/index.js.map +1 -1
  46. package/dist/product/social/index.cjs +17 -16
  47. package/dist/product/social/index.js +3 -2
  48. package/package.json +11 -5
  49. package/dist/chunk-2BM42AZR.cjs +0 -2301
  50. package/dist/chunk-2BM42AZR.cjs.map +0 -1
  51. package/dist/chunk-7P7R7FC5.js +0 -2231
  52. package/dist/chunk-7P7R7FC5.js.map +0 -1
  53. package/dist/chunk-NBZDIMP3.cjs.map +0 -1
  54. package/dist/chunk-P2P6ST6J.js.map +0 -1
  55. package/dist/framework/Loader.d.ts +0 -4
  56. package/dist/framework.cjs +0 -757
  57. package/dist/framework.cjs.map +0 -1
  58. package/dist/framework.d.ts +0 -1
  59. package/dist/framework.js +0 -727
  60. package/dist/framework.js.map +0 -1
@@ -1,449 +1,2157 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunk2BM42AZR_cjs = require('../chunk-2BM42AZR.cjs');
5
4
  var chunkARV3P4CE_cjs = require('../chunk-ARV3P4CE.cjs');
6
- var chunkNBZDIMP3_cjs = require('../chunk-NBZDIMP3.cjs');
7
- var chunk7XDEUEWI_cjs = require('../chunk-7XDEUEWI.cjs');
5
+ var chunkONVERVFG_cjs = require('../chunk-ONVERVFG.cjs');
8
6
  var chunkMWBFAV3D_cjs = require('../chunk-MWBFAV3D.cjs');
7
+ var chunkGWNNLYX4_cjs = require('../chunk-GWNNLYX4.cjs');
8
+ var chunkWHJR5S4L_cjs = require('../chunk-WHJR5S4L.cjs');
9
+ var chunk7XDEUEWI_cjs = require('../chunk-7XDEUEWI.cjs');
10
+ var react = require('react');
11
+ var gui = require('@hanzo/gui');
12
+ var jsxRuntime = require('react/jsx-runtime');
13
+ var lucideIcons2 = require('@hanzogui/lucide-icons-2');
14
+ var products = require('@hanzo/products');
15
+ var react$1 = require('@hanzo/logo/react');
16
+ var reactDom = require('react-dom');
9
17
 
18
+ var CHART_PALETTE = [
19
+ "#7c5cff",
20
+ "#23c562",
21
+ "#ff9f45",
22
+ "#3aa0ff",
23
+ "#ff5d8f",
24
+ "#16c0c8",
25
+ "#c084fc",
26
+ "#f4c245"
27
+ ];
28
+ var CHART_OTHER = "#64748b";
29
+ var ACCENT = CHART_PALETTE[0];
30
+ var GRID = "rgba(148,163,184,0.16)";
31
+ var AXIS = "rgba(148,163,184,0.85)";
32
+ var tone = (theme, key, fallback) => {
33
+ const v = theme[key];
34
+ const got = v?.get?.();
35
+ return typeof got === "string" ? got : fallback;
36
+ };
37
+ var rampOpacity = (i, n) => n <= 1 ? 0.9 : 0.95 - i / (n - 1) * 0.62;
38
+ function useContainerWidth() {
39
+ const ref = react.useRef(null);
40
+ const [w, setW] = react.useState(0);
41
+ react.useEffect(() => {
42
+ const el = ref.current;
43
+ if (!el) return;
44
+ const measure = () => setW(el.clientWidth);
45
+ measure();
46
+ const ro = new ResizeObserver(measure);
47
+ ro.observe(el);
48
+ return () => ro.disconnect();
49
+ }, []);
50
+ return { ref, w };
51
+ }
52
+ function Sparkline({
53
+ values,
54
+ width = 120,
55
+ height = 36,
56
+ color
57
+ }) {
58
+ const theme = gui.useTheme();
59
+ const clean = (values ?? []).filter((v) => Number.isFinite(v));
60
+ if (clean.length < 2) return null;
61
+ const stroke = color ?? tone(theme, "color11", "currentColor");
62
+ const max = Math.max(...clean);
63
+ const min = Math.min(...clean);
64
+ const span = max - min || 1;
65
+ const n = clean.length;
66
+ const px = (i) => i / (n - 1) * (width - 2) + 1;
67
+ const py = (v) => height - 2 - (v - min) / span * (height - 4);
68
+ const line = clean.map((v, i) => `${i === 0 ? "M" : "L"}${px(i).toFixed(1)},${py(v).toFixed(1)}`).join(" ");
69
+ const area = `${line} L${(width - 1).toFixed(1)},${height} L1,${height} Z`;
70
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width, height, "aria-hidden": true, style: { display: "block" }, children: [
71
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: area, fill: stroke, fillOpacity: 0.12 }),
72
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: line, fill: "none", stroke, strokeWidth: 1.5, strokeLinejoin: "round", strokeLinecap: "round" })
73
+ ] });
74
+ }
75
+ function Tooltip({ x, height, label, value }) {
76
+ const left = Math.max(0, x - 60);
77
+ return /* @__PURE__ */ jsxRuntime.jsx(
78
+ "div",
79
+ {
80
+ style: {
81
+ position: "absolute",
82
+ left,
83
+ top: 0,
84
+ height,
85
+ pointerEvents: "none",
86
+ display: "flex",
87
+ alignItems: "flex-start"
88
+ },
89
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
90
+ "div",
91
+ {
92
+ style: {
93
+ background: "rgba(15,17,21,0.94)",
94
+ border: "1px solid rgba(148,163,184,0.25)",
95
+ borderRadius: 8,
96
+ padding: "6px 9px",
97
+ fontSize: 11,
98
+ lineHeight: 1.35,
99
+ color: "#e2e8f0",
100
+ whiteSpace: "nowrap",
101
+ boxShadow: "0 4px 16px rgba(0,0,0,0.4)"
102
+ },
103
+ children: [
104
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: AXIS }, children: label }),
105
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontWeight: 700 }, children: value })
106
+ ]
107
+ }
108
+ )
109
+ }
110
+ );
111
+ }
112
+ function nearestIndex(clientX, rect, padL, innerW, n) {
113
+ if (n <= 1) return 0;
114
+ const mx = clientX - rect.left - padL;
115
+ const i = Math.round(mx / (innerW || 1) * (n - 1));
116
+ return Math.max(0, Math.min(n - 1, i));
117
+ }
118
+ function axisTicks(data) {
119
+ const n = data.length;
120
+ if (n === 0) return [];
121
+ if (n === 1) return [{ i: 0, label: data[0].label, anchor: "middle" }];
122
+ const mid = Math.floor((n - 1) / 2);
123
+ const out = [
124
+ { i: 0, label: data[0].label, anchor: "start" },
125
+ { i: n - 1, label: data[n - 1].label, anchor: "end" }
126
+ ];
127
+ if (n >= 5) out.splice(1, 0, { i: mid, label: data[mid].label, anchor: "middle" });
128
+ return out;
129
+ }
130
+ function LineChart({
131
+ data,
132
+ height = 210,
133
+ color = ACCENT,
134
+ formatValue = (v) => String(v)
135
+ }) {
136
+ const { ref, w } = useContainerWidth();
137
+ const [hover, setHover] = react.useState(null);
138
+ const padL = 10;
139
+ const padR = 10;
140
+ const padT = 12;
141
+ const padB = 24;
142
+ const n = data.length;
143
+ const innerW = Math.max(1, w - padL - padR);
144
+ const innerH = Math.max(1, height - padT - padB);
145
+ const max = Math.max(...data.map((d) => d.value), 1);
146
+ const x = (i) => padL + (n <= 1 ? innerW / 2 : i / (n - 1) * innerW);
147
+ const y = (v) => padT + innerH - v / max * innerH;
148
+ const line = data.map((d, i) => `${i === 0 ? "M" : "L"}${x(i).toFixed(1)},${y(d.value).toFixed(1)}`).join(" ");
149
+ const area = n >= 2 ? `${line} L${x(n - 1).toFixed(1)},${(padT + innerH).toFixed(1)} L${x(0).toFixed(1)},${(padT + innerH).toFixed(1)} Z` : "";
150
+ const ticks = axisTicks(data);
151
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, style: { position: "relative", width: "100%" }, children: [
152
+ w > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
153
+ "svg",
154
+ {
155
+ width: w,
156
+ height,
157
+ style: { display: "block" },
158
+ onMouseMove: (e) => setHover(nearestIndex(e.clientX, e.currentTarget.getBoundingClientRect(), padL, innerW, n)),
159
+ onMouseLeave: () => setHover(null),
160
+ children: [
161
+ [0, 0.5, 1].map((g) => /* @__PURE__ */ jsxRuntime.jsx("line", { x1: padL, x2: w - padR, y1: padT + innerH * g, y2: padT + innerH * g, stroke: GRID, strokeWidth: 1 }, g)),
162
+ area ? /* @__PURE__ */ jsxRuntime.jsx("path", { d: area, fill: color, fillOpacity: 0.1 }) : null,
163
+ n >= 2 ? /* @__PURE__ */ jsxRuntime.jsx("path", { d: line, fill: "none", stroke: color, strokeWidth: 2, strokeLinejoin: "round", strokeLinecap: "round" }) : null,
164
+ hover != null && data[hover] ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
165
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: x(hover), x2: x(hover), y1: padT, y2: padT + innerH, stroke: AXIS, strokeWidth: 1, strokeDasharray: "3 3" }),
166
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: x(hover), cy: y(data[hover].value), r: 4, fill: color, stroke: "#0f1115", strokeWidth: 2 })
167
+ ] }) : null,
168
+ ticks.map((t) => /* @__PURE__ */ jsxRuntime.jsx("text", { x: x(t.i), y: height - 7, fontSize: 10, fill: AXIS, textAnchor: t.anchor, children: t.label }, t.i))
169
+ ]
170
+ }
171
+ ) : null,
172
+ hover != null && data[hover] ? /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { x: x(hover), height, label: data[hover].label, value: formatValue(data[hover].value) }) : null
173
+ ] });
174
+ }
175
+ function BarChart({
176
+ data,
177
+ height = 210,
178
+ color = ACCENT,
179
+ formatValue = (v) => String(v)
180
+ }) {
181
+ const { ref, w } = useContainerWidth();
182
+ const [hover, setHover] = react.useState(null);
183
+ const padL = 10;
184
+ const padR = 10;
185
+ const padT = 12;
186
+ const padB = 24;
187
+ const n = data.length;
188
+ const innerW = Math.max(1, w - padL - padR);
189
+ const innerH = Math.max(1, height - padT - padB);
190
+ const max = Math.max(...data.map((d) => d.value), 1);
191
+ const slot = innerW / Math.max(1, n);
192
+ const barW = Math.max(1, Math.min(slot * 0.62, 36));
193
+ const cx = (i) => padL + slot * i + slot / 2;
194
+ const ticks = axisTicks(data);
195
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, style: { position: "relative", width: "100%" }, children: [
196
+ w > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
197
+ "svg",
198
+ {
199
+ width: w,
200
+ height,
201
+ style: { display: "block" },
202
+ onMouseMove: (e) => {
203
+ const rect = e.currentTarget.getBoundingClientRect();
204
+ const i = Math.floor((e.clientX - rect.left - padL) / (slot || 1));
205
+ setHover(Math.max(0, Math.min(n - 1, i)));
206
+ },
207
+ onMouseLeave: () => setHover(null),
208
+ children: [
209
+ [0, 0.5, 1].map((g) => /* @__PURE__ */ jsxRuntime.jsx("line", { x1: padL, x2: w - padR, y1: padT + innerH * g, y2: padT + innerH * g, stroke: GRID, strokeWidth: 1 }, g)),
210
+ data.map((d, i) => {
211
+ const h = d.value / max * innerH;
212
+ return /* @__PURE__ */ jsxRuntime.jsx(
213
+ "rect",
214
+ {
215
+ x: cx(i) - barW / 2,
216
+ y: padT + innerH - h,
217
+ width: barW,
218
+ height: Math.max(0, h),
219
+ rx: Math.min(3, barW / 2),
220
+ fill: color,
221
+ fillOpacity: hover === i ? 1 : 0.78
222
+ },
223
+ i
224
+ );
225
+ }),
226
+ ticks.map((t) => /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx(t.i), y: height - 7, fontSize: 10, fill: AXIS, textAnchor: "middle", children: t.label }, t.i))
227
+ ]
228
+ }
229
+ ) : null,
230
+ hover != null && data[hover] ? /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { x: cx(hover), height, label: data[hover].label, value: formatValue(data[hover].value) }) : null
231
+ ] });
232
+ }
233
+ function Donut({
234
+ slices,
235
+ size = 160,
236
+ thickness = 22,
237
+ center,
238
+ legend = false
239
+ }) {
240
+ const theme = gui.useTheme();
241
+ const fg = tone(theme, "color12", "currentColor");
242
+ const positive = slices.filter((s) => s.value > 0);
243
+ const total = positive.reduce((sum, s) => sum + s.value, 0);
244
+ const r = size / 2;
245
+ const rInner = r - thickness;
246
+ const mid = (r + rInner) / 2;
247
+ if (total <= 0) {
248
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { items: "center", justify: "center", height: size, children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$6", color: "$color10", children: "\u2014" }) });
249
+ }
250
+ const ring = /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative", width: size, height: size }, children: [
251
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, style: { display: "block" }, children: positive.length === 1 ? /* @__PURE__ */ jsxRuntime.jsx(
252
+ "circle",
253
+ {
254
+ cx: r,
255
+ cy: r,
256
+ r: mid,
257
+ fill: "none",
258
+ stroke: positive[0].color ?? fg,
259
+ strokeOpacity: positive[0].color ? 1 : 0.9,
260
+ strokeWidth: thickness
261
+ }
262
+ ) : renderArcs(positive, total, r, rInner, fg) }),
263
+ center ? /* @__PURE__ */ jsxRuntime.jsx(
264
+ "div",
265
+ {
266
+ style: {
267
+ position: "absolute",
268
+ inset: 0,
269
+ display: "flex",
270
+ flexDirection: "column",
271
+ alignItems: "center",
272
+ justifyContent: "center",
273
+ textAlign: "center",
274
+ pointerEvents: "none"
275
+ },
276
+ children: center
277
+ }
278
+ ) : null
279
+ ] });
280
+ if (!legend) return ring;
281
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$4", items: "center", flexWrap: "wrap", children: [
282
+ ring,
283
+ /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { gap: "$1.5", flex: 1, minW: 150, children: positive.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$2", items: "center", children: [
284
+ /* @__PURE__ */ jsxRuntime.jsx(
285
+ "div",
286
+ {
287
+ style: {
288
+ width: 10,
289
+ height: 10,
290
+ borderRadius: 2,
291
+ backgroundColor: s.color ?? AXIS,
292
+ opacity: s.color ? 1 : rampOpacity(i, positive.length)
293
+ }
294
+ }
295
+ ),
296
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color11", flex: 1, numberOfLines: 1, children: s.label }),
297
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: "$2", color: "$color12", fontWeight: "600", children: [
298
+ Math.round(s.value / total * 100),
299
+ "%"
300
+ ] })
301
+ ] }, s.label)) })
302
+ ] });
303
+ }
304
+ function renderArcs(slices, total, rOuter, rInner, fg) {
305
+ let a0 = -Math.PI / 2;
306
+ const paths = [];
307
+ slices.forEach((s, idx) => {
308
+ const frac = Math.max(0, s.value) / total;
309
+ if (frac <= 0) return;
310
+ const a1 = a0 + frac * Math.PI * 2;
311
+ paths.push(
312
+ /* @__PURE__ */ jsxRuntime.jsx(
313
+ "path",
314
+ {
315
+ d: annularArc(rOuter, rOuter, rOuter, rInner, a0, Math.min(a1, a0 + Math.PI * 1.9999)),
316
+ fill: s.color ?? fg,
317
+ fillOpacity: s.color ? 1 : rampOpacity(idx, slices.length)
318
+ },
319
+ s.label || idx
320
+ )
321
+ );
322
+ a0 = a1;
323
+ });
324
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: paths });
325
+ }
326
+ function polar(cx, cy, rad, a) {
327
+ return [cx + rad * Math.cos(a), cy + rad * Math.sin(a)];
328
+ }
329
+ function annularArc(cx, cy, rOuter, rInner, a0, a1) {
330
+ const large = a1 - a0 > Math.PI ? 1 : 0;
331
+ const [x0, y0] = polar(cx, cy, rOuter, a0);
332
+ const [x1, y1] = polar(cx, cy, rOuter, a1);
333
+ const [x2, y2] = polar(cx, cy, rInner, a1);
334
+ const [x3, y3] = polar(cx, cy, rInner, a0);
335
+ return `M${x0},${y0} A${rOuter},${rOuter} 0 ${large} 1 ${x1},${y1} L${x2},${y2} A${rInner},${rInner} 0 ${large} 0 ${x3},${y3} Z`;
336
+ }
337
+ function BarRows({ bars }) {
338
+ const max = Math.max(0, ...bars.map((b) => b.value));
339
+ if (max <= 0) {
340
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", color: "$color10", children: "\u2014" });
341
+ }
342
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { gap: "$2.5", children: bars.map((b) => /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$3", items: "center", children: [
343
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { width: 64, fontSize: "$2", color: "$color11", text: "right", children: b.label }),
344
+ /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { flex: 1, height: 10, bg: "$color3", rounded: "$2", overflow: "hidden", children: /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { height: 10, width: `${Math.max(2, b.value / max * 100)}%`, bg: "$color9", rounded: "$2" }) }),
345
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { width: 56, fontSize: "$2", color: "$color12", fontWeight: "600", children: b.value.toLocaleString() })
346
+ ] }, b.label)) });
347
+ }
348
+ var SERIES = ["#6ea8fe", "#7ee787", "#f0a868", "#c792ea", "#56d4c4", "#e879a6", "#d6c15a", "#8b9bb4"];
349
+ var colorForIndex = (i) => SERIES[i % SERIES.length];
350
+ var TRACK = "rgba(128,128,128,0.18)";
351
+ function utilColor(pct) {
352
+ if (pct >= 90) return "#e5534b";
353
+ if (pct >= 70) return "#f0a868";
354
+ return "#7ee787";
355
+ }
356
+ function Sparkline2({
357
+ points,
358
+ width = 104,
359
+ height = 30,
360
+ color = SERIES[0]
361
+ }) {
362
+ if (!points || points.length < 2) return null;
363
+ const min = Math.min(...points);
364
+ const max = Math.max(...points);
365
+ const span = max - min || 1;
366
+ const stepX = width / (points.length - 1);
367
+ const y = (v) => height - 2 - (v - min) / span * (height - 4);
368
+ const d = points.map((p, i) => `${i === 0 ? "M" : "L"}${(i * stepX).toFixed(1)},${y(p).toFixed(1)}`).join(" ");
369
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { width, height, viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": "trend", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinejoin: "round", strokeLinecap: "round" }) });
370
+ }
371
+ function MiniBars({
372
+ bars,
373
+ width = 320,
374
+ height = 96,
375
+ color = SERIES[0]
376
+ }) {
377
+ if (!bars.length) return null;
378
+ const max = Math.max(...bars.map((b) => b.value), 1);
379
+ const gap = 4;
380
+ const bw = (width - gap * (bars.length - 1)) / bars.length;
381
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "100%", height, viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "none", role: "img", "aria-label": "bars", children: bars.map((b, i) => {
382
+ const h = Math.max(1, b.value / max * (height - 2));
383
+ return /* @__PURE__ */ jsxRuntime.jsx("rect", { x: i * (bw + gap), y: height - h, width: bw, height: h, rx: 2, fill: color, opacity: 0.85, children: /* @__PURE__ */ jsxRuntime.jsx("title", { children: `${b.label}: ${b.value}` }) }, b.label + i);
384
+ }) });
385
+ }
386
+ function UtilBar({ value, width = 120, color }) {
387
+ const v = Math.max(0, Math.min(100, value));
388
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width, height: 8, viewBox: `0 0 ${width} 8`, role: "img", "aria-label": `${Math.round(v)}%`, children: [
389
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 1, width, height: 6, rx: 3, fill: TRACK }),
390
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 1, width: v / 100 * width, height: 6, rx: 3, fill: color ?? utilColor(v) })
391
+ ] });
392
+ }
393
+ function LegendDot({ color, label, value }) {
394
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2", justify: "space-between", children: [
395
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2", children: [
396
+ /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { width: 10, height: 10, rounded: "$1", bg: color }),
397
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color11", children: label })
398
+ ] }),
399
+ value != null ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color12", fontWeight: "500", className: "hz-mono", children: value }) : null
400
+ ] });
401
+ }
402
+ function MetricCard({
403
+ icon,
404
+ label,
405
+ value,
406
+ caption,
407
+ spark,
408
+ sparkColor,
409
+ delta
410
+ }) {
411
+ const up = delta ? delta.pct >= 0 : false;
412
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.Card, { p: "$3.5", gap: "$2", borderWidth: 1, borderColor: "$borderColor", flex: 1, minW: 172, children: [
413
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2", justify: "space-between", children: [
414
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2", children: [
415
+ icon,
416
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color11", fontWeight: "500", children: label })
417
+ ] }),
418
+ delta ? /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: "$1", color: up ? "#7ee787" : "#e5534b", children: [
419
+ up ? "\u25B2" : "\u25BC",
420
+ " ",
421
+ Math.abs(delta.pct),
422
+ "%"
423
+ ] }) : null
424
+ ] }),
425
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "flex-end", justify: "space-between", gap: "$2", children: [
426
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$8", fontWeight: "500", color: "$color12", numberOfLines: 1, className: "hz-mono", children: value }),
427
+ spark && spark.length >= 2 ? /* @__PURE__ */ jsxRuntime.jsx(Sparkline2, { points: spark, color: sparkColor ?? SERIES[0] }) : null
428
+ ] }),
429
+ caption ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$1", color: "$color10", numberOfLines: 1, children: caption }) : null
430
+ ] });
431
+ }
432
+ function HintButton({
433
+ icon,
434
+ iconAfter,
435
+ children,
436
+ onPress,
437
+ disabled,
438
+ hint,
439
+ theme
440
+ }) {
441
+ const btn = /* @__PURE__ */ jsxRuntime.jsx(
442
+ gui.Button,
443
+ {
444
+ size: "$2",
445
+ theme,
446
+ icon,
447
+ iconAfter,
448
+ disabled,
449
+ onPress: disabled ? void 0 : onPress,
450
+ children
451
+ }
452
+ );
453
+ if (!hint) return btn;
454
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { title: hint, style: { display: "inline-flex" }, children: btn });
455
+ }
456
+ function Panel({
457
+ title,
458
+ right,
459
+ children,
460
+ minW = 280,
461
+ grow = true
462
+ }) {
463
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.Card, { p: "$4", gap: "$3", borderWidth: 1, borderColor: "$borderColor", flex: grow ? 1 : void 0, minW, width: grow ? void 0 : "100%", children: [
464
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", justify: "space-between", gap: "$2", children: [
465
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$4", fontWeight: "500", color: "$color12", children: title }),
466
+ right
467
+ ] }),
468
+ children
469
+ ] });
470
+ }
471
+ function Donut2({
472
+ segments,
473
+ size = 160,
474
+ thickness = 18,
475
+ centerValue,
476
+ centerLabel,
477
+ trackColor = "#2a2d2e",
478
+ valueColor = "#ecedee",
479
+ labelColor = "#9ba1a6"
480
+ }) {
481
+ const total = segments.reduce((n, s) => n + Math.max(0, s.value), 0);
482
+ if (total <= 0) return null;
483
+ const r = (size - thickness) / 2;
484
+ const cx = size / 2;
485
+ const cy = size / 2;
486
+ const circ = 2 * Math.PI * r;
487
+ let offset = 0;
488
+ const arcs = segments.filter((s) => s.value > 0).map((s) => {
489
+ const frac = s.value / total;
490
+ const dash = frac * circ;
491
+ const node = /* @__PURE__ */ jsxRuntime.jsx(
492
+ "circle",
493
+ {
494
+ cx,
495
+ cy,
496
+ r,
497
+ fill: "none",
498
+ stroke: s.color,
499
+ strokeWidth: thickness,
500
+ strokeDasharray: `${dash} ${circ - dash}`,
501
+ strokeDashoffset: -offset
502
+ },
503
+ s.label
504
+ );
505
+ offset += dash;
506
+ return node;
507
+ });
508
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, role: "img", "aria-label": "Donut chart", children: [
509
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx, cy, r, fill: "none", stroke: trackColor, strokeWidth: thickness }),
510
+ /* @__PURE__ */ jsxRuntime.jsx("g", { transform: `rotate(-90 ${cx} ${cy})`, children: arcs }),
511
+ centerValue ? /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: cy - 2, textAnchor: "middle", fontSize: size * 0.2, fontWeight: "800", fill: valueColor, children: centerValue }) : null,
512
+ centerLabel ? /* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: cy + size * 0.13, textAnchor: "middle", fontSize: size * 0.08, fill: labelColor, children: centerLabel }) : null
513
+ ] });
514
+ }
10
515
 
516
+ // src/product/combobox/filter.ts
517
+ var hay = (o) => `${o.value} ${o.label ?? ""} ${o.hint ?? ""}`.toLowerCase();
518
+ function filterOptions(options, query) {
519
+ const q = query.trim().toLowerCase();
520
+ if (!q) return options;
521
+ return options.filter((o) => hay(o).includes(q));
522
+ }
523
+ function isKnownOption(options, value) {
524
+ return options.some((o) => o.value === value);
525
+ }
526
+ function ComboBox({
527
+ value,
528
+ onChange,
529
+ options,
530
+ loading = false,
531
+ error = null,
532
+ onRetry,
533
+ placeholder,
534
+ disabled,
535
+ emptyText = "No matches \u2014 press to use what you typed.",
536
+ minWidth = 240
537
+ }) {
538
+ const [open, setOpen] = react.useState(false);
539
+ const rowRef = react.useRef(null);
540
+ const anchorRect = react.useCallback(() => rowRef.current?.getBoundingClientRect() ?? null, []);
541
+ const anchorEl = react.useCallback(() => rowRef.current, []);
542
+ const filtered = react.useMemo(() => filterOptions(options, value), [options, value]);
543
+ const track = chunk7XDEUEWI_cjs.useEmit();
544
+ const pick = (v) => {
545
+ track({ component: "ComboBox", action: "select", id: v, value: filtered.length });
546
+ onChange(v);
547
+ setOpen(false);
548
+ };
549
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
550
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { ref: rowRef, items: "center", gap: "$2", minW: minWidth, children: [
551
+ /* @__PURE__ */ jsxRuntime.jsx(
552
+ gui.Input,
553
+ {
554
+ flex: 1,
555
+ value,
556
+ onChangeText: (v) => {
557
+ onChange(v);
558
+ if (!open) setOpen(true);
559
+ },
560
+ onFocus: () => setOpen(true),
561
+ disabled,
562
+ placeholder,
563
+ autoCapitalize: "none"
564
+ }
565
+ ),
566
+ /* @__PURE__ */ jsxRuntime.jsx(
567
+ gui.Button,
568
+ {
569
+ size: "$2",
570
+ chromeless: true,
571
+ disabled,
572
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.ChevronDown, { size: 16, opacity: 0.7 }),
573
+ onPress: () => {
574
+ track({ component: "ComboBox", action: open ? "close" : "open" });
575
+ setOpen((o) => !o);
576
+ },
577
+ "aria-label": "Show options"
578
+ }
579
+ )
580
+ ] }),
581
+ /* @__PURE__ */ jsxRuntime.jsx(
582
+ chunkGWNNLYX4_cjs.FloatingMenu,
583
+ {
584
+ open,
585
+ onClose: () => setOpen(false),
586
+ anchorRect,
587
+ anchorEl,
588
+ autoFocus: false,
589
+ minWidth,
590
+ maxHeight: 300,
591
+ children: loading ? /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2", px: "$2", py: "$2", children: [
592
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Spinner, { size: "small", color: "$color11" }),
593
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color10", children: "Loading options\u2026" })
594
+ ] }) : error ? /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2", px: "$2", py: "$2", children: [
595
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color10", flex: 1, numberOfLines: 2, children: error }),
596
+ onRetry ? /* @__PURE__ */ jsxRuntime.jsx(gui.Button, { size: "$1", chromeless: true, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.RefreshCw, { size: 12 }), onPress: onRetry, "aria-label": "Retry" }) : null
597
+ ] }) : filtered.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color10", px: "$2", py: "$2", children: emptyText }) : filtered.map((o) => /* @__PURE__ */ jsxRuntime.jsx(
598
+ chunkGWNNLYX4_cjs.MenuItemView,
599
+ {
600
+ label: o.label ?? o.value,
601
+ description: o.hint,
602
+ selected: o.value === value,
603
+ onSelect: () => pick(o.value)
604
+ },
605
+ o.value
606
+ ))
607
+ }
608
+ )
609
+ ] });
610
+ }
611
+ var ORDER = ["ai", "console", "app", "chat", "bot", "team", "billing"];
612
+ var SURFACES = ORDER.map((id) => {
613
+ const s = products.surfaceById(id);
614
+ return { id, label: s.label, href: s.href, hint: s.domain };
615
+ });
616
+ function otherSurfaces(current) {
617
+ return current ? SURFACES.filter((s) => s.id !== current) : SURFACES;
618
+ }
619
+ function HanzoMark({ size = 22, color = "currentColor" }) {
620
+ return /* @__PURE__ */ jsxRuntime.jsxs(
621
+ "svg",
622
+ {
623
+ width: size,
624
+ height: size,
625
+ viewBox: "0 0 67 67",
626
+ role: "img",
627
+ "aria-label": "Hanzo",
628
+ fill: color,
629
+ style: { display: "block", flexShrink: 0 },
630
+ children: [
631
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M22.21 67V44.6369H0V67H22.21Z" }),
632
+ /* @__PURE__ */ jsxRuntime.jsx("path", { opacity: 0.55, d: "M0 44.6369L22.21 46.8285V44.6369H0Z" }),
633
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" }),
634
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M22.21 0H0V22.3184H22.21V0Z" }),
635
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M66.7198 0H44.5098V22.3184H66.7198V0Z" }),
636
+ /* @__PURE__ */ jsxRuntime.jsx("path", { opacity: 0.55, d: "M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" }),
637
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M66.7198 67V44.6369H44.5098V67H66.7198Z" })
638
+ ]
639
+ }
640
+ );
641
+ }
642
+ function BrandMark({
643
+ size = 20,
644
+ wordmark = "Hanzo",
645
+ animated = true
646
+ }) {
647
+ if (!animated) return /* @__PURE__ */ jsxRuntime.jsx(HanzoMark, { size });
648
+ return /* @__PURE__ */ jsxRuntime.jsx(react$1.HanzoLogo, { animated: true, size, wordmark });
649
+ }
650
+ var SURFACE_ICON = {
651
+ ai: lucideIcons2.Sparkles,
652
+ console: lucideIcons2.LayoutGrid,
653
+ app: lucideIcons2.AppWindow,
654
+ chat: lucideIcons2.MessageCircle,
655
+ bot: lucideIcons2.Bot,
656
+ team: lucideIcons2.Users,
657
+ billing: lucideIcons2.CreditCard
658
+ };
659
+ var openHref = (href) => {
660
+ if (typeof window !== "undefined") window.open(href, "_blank", "noopener");
661
+ };
662
+ function MenuRow({ icon, label, onPress }) {
663
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { onPress, cursor: "pointer", items: "center", gap: "$2.5", px: "$2", py: "$2", rounded: "$3", hoverStyle: { bg: "$color5" }, children: [
664
+ icon,
665
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color12", children: label })
666
+ ] });
667
+ }
668
+ function AppHeader({
669
+ brand,
670
+ wordmark = "Hanzo",
671
+ onBrand,
672
+ org,
673
+ children,
674
+ current,
675
+ surfaces,
676
+ open,
677
+ user,
678
+ menu,
679
+ theme,
680
+ onProfile,
681
+ onTeam,
682
+ onBilling,
683
+ onSignOut
684
+ }) {
685
+ const [appsOpen, setAppsOpen] = react.useState(false);
686
+ const [menuOpen, setMenuOpen] = react.useState(false);
687
+ const items = surfaces ?? otherSurfaces(current);
688
+ const launch = (s) => {
689
+ setAppsOpen(false);
690
+ if (open) open(s);
691
+ else openHref(s.href);
692
+ };
693
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2", px: "$3", height: 52, borderBottomWidth: 1, borderColor: "$borderColor", bg: "$background", children: [
694
+ /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { items: "center", cursor: onBrand ? "pointer" : void 0, onPress: onBrand, children: brand ?? /* @__PURE__ */ jsxRuntime.jsx(BrandMark, { wordmark }) }),
695
+ org ? /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { items: "center", minW: 0, children: org }) : null,
696
+ /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { flex: 1, items: "center", minW: 0, children }),
697
+ items.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(gui.Popover, { open: appsOpen, onOpenChange: setAppsOpen, placement: "bottom-end", children: [
698
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(gui.Button, { size: "$2", chromeless: true, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Grip, { size: 16 }), "aria-label": "Apps" }) }),
699
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Popover.Content, { bordered: true, elevate: true, p: "$2", width: 230, bg: "$color2", borderColor: "$borderColor", children: /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { gap: "$1", children: items.map((s) => {
700
+ const Icon = SURFACE_ICON[s.id];
701
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { onPress: () => launch(s), cursor: "pointer", items: "center", gap: "$2.5", px: "$2", py: "$2", rounded: "$3", hoverStyle: { bg: "$color5" }, children: [
702
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 16 }),
703
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { flex: 1, fontSize: "$2", fontWeight: "600", color: "$color12", children: s.label }),
704
+ s.hint ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$1", color: "$color10", children: s.hint }) : null
705
+ ] }, s.id);
706
+ }) }) })
707
+ ] }) : null,
708
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Popover, { open: menuOpen, onOpenChange: setMenuOpen, placement: "bottom-end", children: [
709
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(gui.Button, { size: "$2", chromeless: true, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.UserRound, { size: 16 }), "aria-label": "Account", children: user ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color12", numberOfLines: 1, maxW: 140, children: user }) : null }) }),
710
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Popover.Content, { bordered: true, elevate: true, p: "$2", width: 220, bg: "$color2", borderColor: "$borderColor", children: menu ?? /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$1", children: [
711
+ onProfile ? /* @__PURE__ */ jsxRuntime.jsx(MenuRow, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.UserRound, { size: 15 }), label: "Profile", onPress: () => (setMenuOpen(false), onProfile()) }) : null,
712
+ theme !== null ? /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2.5", px: "$2", py: "$1", rounded: "$3", children: [
713
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { flex: 1, fontSize: "$2", color: "$color12", children: "Theme" }),
714
+ theme ?? /* @__PURE__ */ jsxRuntime.jsx(chunkARV3P4CE_cjs.ThemeToggle, {})
715
+ ] }) : null,
716
+ onTeam ? /* @__PURE__ */ jsxRuntime.jsx(MenuRow, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Settings2, { size: 15 }), label: "Team settings", onPress: () => (setMenuOpen(false), onTeam()) }) : null,
717
+ onBilling ? /* @__PURE__ */ jsxRuntime.jsx(MenuRow, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.CreditCard, { size: 15 }), label: "Billing", onPress: () => (setMenuOpen(false), onBilling()) }) : null,
718
+ onSignOut ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
719
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Separator, { borderColor: "$borderColor", my: "$1" }),
720
+ /* @__PURE__ */ jsxRuntime.jsx(MenuRow, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.LogOut, { size: 15 }), label: "Sign out", onPress: () => (setMenuOpen(false), onSignOut()) })
721
+ ] }) : null
722
+ ] }) })
723
+ ] })
724
+ ] });
725
+ }
726
+ function monogram(name) {
727
+ const words = name.trim().split(/[\s._/-]+/).filter(Boolean);
728
+ const letters = words.slice(0, 2).map((w) => w[0] ?? "").join("");
729
+ return (letters || name.trim().slice(0, 2)).toUpperCase();
730
+ }
731
+ function OrgMark({ org, size = 22, maxW }) {
732
+ if (org.logo) {
733
+ return /* @__PURE__ */ jsxRuntime.jsx(
734
+ "img",
735
+ {
736
+ src: org.logo,
737
+ alt: "",
738
+ style: {
739
+ height: size,
740
+ width: maxW ? "auto" : size,
741
+ maxWidth: maxW ?? size,
742
+ objectFit: "contain",
743
+ display: "block",
744
+ borderRadius: 6,
745
+ flexShrink: 0
746
+ }
747
+ }
748
+ );
749
+ }
750
+ return /* @__PURE__ */ jsxRuntime.jsx(
751
+ gui.YStack,
752
+ {
753
+ width: size,
754
+ height: size,
755
+ rounded: "$3",
756
+ bg: "$color4",
757
+ items: "center",
758
+ justify: "center",
759
+ style: { flexShrink: 0 },
760
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: Math.round(size * 0.4), fontWeight: "800", color: "$color12", children: monogram(org.displayName || org.name) })
761
+ }
762
+ );
763
+ }
11
764
 
12
- Object.defineProperty(exports, "AnimatedLogo", {
13
- enumerable: true,
14
- get: function () { return chunk2BM42AZR_cjs.AnimatedLogo; }
15
- });
16
- Object.defineProperty(exports, "AppHeader", {
17
- enumerable: true,
18
- get: function () { return chunk2BM42AZR_cjs.AppHeader; }
19
- });
20
- Object.defineProperty(exports, "BRANDS", {
21
- enumerable: true,
22
- get: function () { return chunk2BM42AZR_cjs.BRANDS; }
23
- });
24
- Object.defineProperty(exports, "BarChart", {
25
- enumerable: true,
26
- get: function () { return chunk2BM42AZR_cjs.BarChart; }
27
- });
28
- Object.defineProperty(exports, "BarRows", {
29
- enumerable: true,
30
- get: function () { return chunk2BM42AZR_cjs.BarRows; }
31
- });
32
- Object.defineProperty(exports, "BrandMark", {
765
+ // src/product/scope.ts
766
+ function browserStorage() {
767
+ if (typeof window === "undefined") return null;
768
+ try {
769
+ return window.localStorage;
770
+ } catch {
771
+ return null;
772
+ }
773
+ }
774
+ function orgScope(config) {
775
+ const key = config.key ?? "hanzo.org";
776
+ const selectedKey = `${key}.selected`;
777
+ const store = () => config.storage ?? browserStorage();
778
+ const read = (k) => {
779
+ try {
780
+ return store()?.getItem(k) ?? null;
781
+ } catch {
782
+ return null;
783
+ }
784
+ };
785
+ const write = (k, v) => {
786
+ try {
787
+ if (v === null) store()?.removeItem(k);
788
+ else store()?.setItem(k, v);
789
+ } catch {
790
+ }
791
+ };
792
+ const goHome = () => {
793
+ if (config.navigate) return config.navigate("/");
794
+ if (typeof window !== "undefined") window.location.assign("/");
795
+ };
796
+ const doReload = () => {
797
+ if (config.reload) return config.reload();
798
+ if (typeof window !== "undefined") window.location.reload();
799
+ };
800
+ const scope = {
801
+ currentOrg: () => read(key) || config.brandOrg,
802
+ setCurrentOrg: (org) => write(key, !org || org === config.brandOrg ? null : org),
803
+ isScopedAway: () => scope.currentOrg() !== config.brandOrg,
804
+ hasSelectedOrg: () => read(selectedKey) === "1",
805
+ enterOrg: (org) => {
806
+ if (!org) return;
807
+ scope.setCurrentOrg(org);
808
+ write(selectedKey, "1");
809
+ goHome();
810
+ },
811
+ leaveOrg: () => {
812
+ write(selectedKey, null);
813
+ scope.setCurrentOrg(config.brandOrg);
814
+ goHome();
815
+ },
816
+ switchOrg: (org) => {
817
+ if (!org || org === scope.currentOrg()) return;
818
+ scope.setCurrentOrg(org);
819
+ write(selectedKey, "1");
820
+ doReload();
821
+ }
822
+ };
823
+ return scope;
824
+ }
825
+ function filterOrgs(orgs, query) {
826
+ const q = query.trim().toLowerCase();
827
+ if (!q) return orgs;
828
+ return orgs.filter(
829
+ (o) => o.name.toLowerCase().includes(q) || (o.displayName ?? "").toLowerCase().includes(q)
830
+ );
831
+ }
832
+ var titleCase = (s) => s ? s[0].toUpperCase() + s.slice(1) : s;
833
+ function OrgSwitcher({ scope, orgs, pageSize = 20, current: given, create, picker = false }) {
834
+ const currentId = scope.currentOrg();
835
+ const [open, setOpen] = react.useState(false);
836
+ const [query, setQuery] = react.useState("");
837
+ const [debounced, setDebounced] = react.useState("");
838
+ const [rows, setRows] = react.useState([]);
839
+ const [loading, setLoading] = react.useState(false);
840
+ const [loadingMore, setLoadingMore] = react.useState(false);
841
+ const [hasMore, setHasMore] = react.useState(false);
842
+ const [creating, setCreating] = react.useState(false);
843
+ const [newName, setNewName] = react.useState("");
844
+ const [busy, setBusy] = react.useState(false);
845
+ const [err, setErr] = react.useState(null);
846
+ const pageRef = react.useRef(0);
847
+ const reqRef = react.useRef(0);
848
+ react.useEffect(() => {
849
+ const id = setTimeout(() => setDebounced(query.trim()), 250);
850
+ return () => clearTimeout(id);
851
+ }, [query]);
852
+ const fetchPage = react.useCallback(
853
+ async (page, q, append) => {
854
+ if (!orgs) return;
855
+ const token = ++reqRef.current;
856
+ append ? setLoadingMore(true) : setLoading(true);
857
+ try {
858
+ const incoming = await orgs(page, q);
859
+ if (token !== reqRef.current) return;
860
+ pageRef.current = page;
861
+ setRows((prev) => {
862
+ const merged = append ? [...prev] : [];
863
+ const seen = new Set(merged.map((o) => o.name));
864
+ for (const o of incoming) if (!seen.has(o.name)) merged.push(o);
865
+ return merged;
866
+ });
867
+ setHasMore(incoming.length >= pageSize);
868
+ } catch {
869
+ if (token !== reqRef.current) return;
870
+ if (!append) setRows([]);
871
+ setHasMore(false);
872
+ } finally {
873
+ if (token === reqRef.current) {
874
+ setLoading(false);
875
+ setLoadingMore(false);
876
+ }
877
+ }
878
+ },
879
+ [orgs, pageSize]
880
+ );
881
+ react.useEffect(() => {
882
+ if (!open || !orgs) return;
883
+ void fetchPage(0, debounced, false);
884
+ }, [open, debounced, fetchPage, orgs]);
885
+ const loadMore = react.useCallback(() => {
886
+ if (loading || loadingMore || !hasMore) return;
887
+ void fetchPage(pageRef.current + 1, debounced, true);
888
+ }, [loading, loadingMore, hasMore, debounced, fetchPage]);
889
+ const visible = react.useMemo(() => {
890
+ if (orgs) return filterOrgs(rows, query);
891
+ return [{ name: currentId, displayName: titleCase(currentId) }];
892
+ }, [orgs, rows, query, currentId]);
893
+ const current = react.useMemo(() => {
894
+ if (given && given.name === currentId) return given;
895
+ return rows.find((o) => o.name === currentId) ?? { name: currentId, displayName: titleCase(currentId) };
896
+ }, [given, rows, currentId]);
897
+ const currentLabel = current.displayName || titleCase(current.name);
898
+ const track = chunk7XDEUEWI_cjs.useEmit();
899
+ const select = react.useCallback(
900
+ (org) => {
901
+ track({ component: "OrgSwitcher", action: "select", id: org });
902
+ setOpen(false);
903
+ scope.switchOrg(org);
904
+ },
905
+ [scope, track]
906
+ );
907
+ const submitCreate = async () => {
908
+ const name = newName.trim();
909
+ if (!name || !create) return;
910
+ setBusy(true);
911
+ setErr(null);
912
+ try {
913
+ const org = await create(name);
914
+ scope.switchOrg(org);
915
+ } catch (e) {
916
+ setErr(e instanceof Error ? e.message : "Could not create the organization.");
917
+ setBusy(false);
918
+ }
919
+ };
920
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.Popover, { open, onOpenChange: setOpen, placement: "bottom-start", children: [
921
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(gui.Button, { chromeless: true, height: 44, px: "$2", justify: "flex-start", "aria-label": `${currentLabel} \xB7 switch organization`, children: /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2.5", flex: 1, minW: 0, children: [
922
+ /* @__PURE__ */ jsxRuntime.jsx(OrgMark, { org: current, size: 30 }),
923
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { flex: 1, minW: 0, fontSize: "$4", fontWeight: "800", color: "$color12", numberOfLines: 1, children: currentLabel }),
924
+ /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.ChevronsUpDown, { size: 15, color: "$color9" })
925
+ ] }) }) }),
926
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Popover.Content, { bordered: true, elevate: true, p: "$2", width: 300, bg: "$color2", borderColor: "$borderColor", children: creating ? /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$2", children: [
927
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color12", fontWeight: "700", children: "Create organization" }),
928
+ /* @__PURE__ */ jsxRuntime.jsx(
929
+ gui.Input,
930
+ {
931
+ size: "$3",
932
+ placeholder: "Organization name",
933
+ value: newName,
934
+ onChangeText: setNewName,
935
+ autoCapitalize: "words",
936
+ onSubmitEditing: () => void submitCreate()
937
+ }
938
+ ),
939
+ err ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$1", color: "$red10", children: err }) : null,
940
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$2", justify: "flex-end", children: [
941
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Button, { size: "$2", chromeless: true, onPress: () => setCreating(false), disabled: busy, children: "Cancel" }),
942
+ /* @__PURE__ */ jsxRuntime.jsx(
943
+ gui.Button,
944
+ {
945
+ size: "$2",
946
+ onPress: () => void submitCreate(),
947
+ disabled: busy || !newName.trim(),
948
+ icon: busy ? /* @__PURE__ */ jsxRuntime.jsx(gui.Spinner, { size: "small" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Plus, { size: 14 }),
949
+ children: "Create"
950
+ }
951
+ )
952
+ ] })
953
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$1", children: [
954
+ orgs ? /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2", px: "$2", py: "$1", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", children: [
955
+ /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Search, { size: 13, opacity: 0.6 }),
956
+ /* @__PURE__ */ jsxRuntime.jsx(
957
+ gui.Input,
958
+ {
959
+ flex: 1,
960
+ size: "$2",
961
+ borderWidth: 0,
962
+ bg: "transparent",
963
+ placeholder: "Find organization\u2026",
964
+ value: query,
965
+ onChangeText: setQuery,
966
+ autoCapitalize: "none",
967
+ autoCorrect: false
968
+ }
969
+ )
970
+ ] }) : null,
971
+ /* @__PURE__ */ jsxRuntime.jsxs(
972
+ "div",
973
+ {
974
+ style: { maxHeight: 300, overflowY: "auto", display: "flex", flexDirection: "column" },
975
+ onScroll: (e) => {
976
+ const el = e.currentTarget;
977
+ if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) loadMore();
978
+ },
979
+ children: [
980
+ loading ? /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2", px: "$2", py: "$3", children: [
981
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Spinner, { size: "small", color: "$color11" }),
982
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color10", children: "Loading organizations\u2026" })
983
+ ] }) : visible.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { px: "$2", py: "$2", fontSize: "$2", color: "$color10", children: query.trim() ? `No organizations match \u201C${query.trim()}\u201D.` : "No organizations yet." }) : visible.map((org) => /* @__PURE__ */ jsxRuntime.jsxs(
984
+ gui.XStack,
985
+ {
986
+ onPress: () => select(org.name),
987
+ cursor: "pointer",
988
+ items: "center",
989
+ gap: "$2.5",
990
+ px: "$2",
991
+ py: "$2",
992
+ rounded: "$3",
993
+ bg: org.name === currentId ? "$color4" : "transparent",
994
+ hoverStyle: { bg: "$color5" },
995
+ children: [
996
+ /* @__PURE__ */ jsxRuntime.jsx(OrgMark, { org }),
997
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { flex: 1, fontSize: "$2", color: "$color12", numberOfLines: 1, children: org.displayName || org.name }),
998
+ org.name === currentId ? /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Check, { size: 15 }) : null
999
+ ]
1000
+ },
1001
+ org.name
1002
+ )),
1003
+ loadingMore ? /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2", px: "$2", py: "$2", children: [
1004
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Spinner, { size: "small", color: "$color11" }),
1005
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$1", color: "$color10", children: "Loading more\u2026" })
1006
+ ] }) : hasMore ? /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { onPress: loadMore, cursor: "pointer", items: "center", justify: "center", px: "$2", py: "$1.5", rounded: "$3", hoverStyle: { bg: "$color4" }, children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$1", color: "$color11", fontWeight: "600", children: "Load more" }) }) : null
1007
+ ]
1008
+ }
1009
+ ),
1010
+ create ? /* @__PURE__ */ jsxRuntime.jsxs(
1011
+ gui.XStack,
1012
+ {
1013
+ onPress: () => {
1014
+ setCreating(true);
1015
+ setErr(null);
1016
+ },
1017
+ cursor: "pointer",
1018
+ items: "center",
1019
+ gap: "$2.5",
1020
+ px: "$2",
1021
+ py: "$2",
1022
+ mt: "$1",
1023
+ rounded: "$3",
1024
+ borderTopWidth: 1,
1025
+ borderColor: "$borderColor",
1026
+ hoverStyle: { bg: "$color5" },
1027
+ children: [
1028
+ /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { width: 22, height: 22, rounded: "$3", bg: "$color3", items: "center", justify: "center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Plus, { size: 14 }) }),
1029
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color12", children: "Create organization" })
1030
+ ]
1031
+ }
1032
+ ) : null,
1033
+ picker ? /* @__PURE__ */ jsxRuntime.jsxs(
1034
+ gui.XStack,
1035
+ {
1036
+ onPress: () => {
1037
+ setOpen(false);
1038
+ scope.leaveOrg();
1039
+ },
1040
+ cursor: "pointer",
1041
+ items: "center",
1042
+ gap: "$2.5",
1043
+ px: "$2",
1044
+ py: "$2",
1045
+ rounded: "$3",
1046
+ hoverStyle: { bg: "$color5" },
1047
+ children: [
1048
+ /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { width: 22, height: 22, rounded: "$3", bg: "$color3", items: "center", justify: "center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.LayoutGrid, { size: 14 }) }),
1049
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color12", children: "All organizations" })
1050
+ ]
1051
+ }
1052
+ ) : null
1053
+ ] }) })
1054
+ ] });
1055
+ }
1056
+ function ContextMenu({ children, items, disabled, minWidth = 200, maxHeight }) {
1057
+ const [state, setState] = react.useState({ open: false, x: 0, y: 0 });
1058
+ const close = react.useCallback(() => setState((s) => s.open ? { ...s, open: false } : s), []);
1059
+ const anchorRect = react.useCallback(
1060
+ () => ({ left: state.x, top: state.y, right: state.x, bottom: state.y, width: 0, height: 0 }),
1061
+ [state.x, state.y]
1062
+ );
1063
+ const childOnContextMenu = children.props.onContextMenu;
1064
+ const target = react.cloneElement(children, {
1065
+ onContextMenu: (e) => {
1066
+ childOnContextMenu?.(e);
1067
+ if (disabled) return;
1068
+ e.preventDefault();
1069
+ e.stopPropagation();
1070
+ setState({ open: true, x: e.clientX, y: e.clientY });
1071
+ }
1072
+ });
1073
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1074
+ target,
1075
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGWNNLYX4_cjs.FloatingMenu, { open: state.open, onClose: close, anchorRect, gap: 0, minWidth, maxHeight, children: chunkGWNNLYX4_cjs.renderMenuItems(items, close) })
1076
+ ] });
1077
+ }
1078
+ var isExternal = (href) => /^https?:\/\//.test(href);
1079
+ var defaultLink = ({ href, children, onNavigate }) => /* @__PURE__ */ jsxRuntime.jsx(
1080
+ "a",
1081
+ {
1082
+ href,
1083
+ onClick: onNavigate,
1084
+ ...isExternal(href) ? { target: "_blank", rel: "noopener noreferrer" } : null,
1085
+ style: { textDecoration: "none", color: "inherit", display: "block" },
1086
+ children
1087
+ }
1088
+ );
1089
+ function ProductCell({ product, link, icon, close }) {
1090
+ const glyph = icon?.(product.id);
1091
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { minW: 200, flex: 1, flexBasis: 200, children: link({
1092
+ href: product.url,
1093
+ onNavigate: close,
1094
+ children: /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$2.5", items: "flex-start", p: "$2.5", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: "$color4" }, children: [
1095
+ glyph ? /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { pt: "$0.5", children: glyph }) : null,
1096
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { minW: 0, gap: "$0.5", children: [
1097
+ product.verb ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 11, color: "$color10", textTransform: "uppercase", letterSpacing: 0.4, children: product.verb }) : null,
1098
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", color: "$color12", children: product.name }),
1099
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, color: "$color10", lineHeight: 16, children: product.job })
1100
+ ] })
1101
+ ] })
1102
+ }) });
1103
+ }
1104
+ function Column({ title, links, link, icon, close }) {
1105
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { minW: 160, flex: 1, gap: "$1", children: [
1106
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 11, color: "$color10", textTransform: "uppercase", letterSpacing: 0.5, px: "$2", pb: "$1", children: title }),
1107
+ links.map((l) => /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { px: "$2", py: "$1", rounded: "$3", hoverStyle: { bg: "$color4" }, gap: "$2", items: "center", children: [
1108
+ icon?.(l.id) ?? null,
1109
+ link({
1110
+ href: l.href,
1111
+ onNavigate: close,
1112
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color11", children: l.label })
1113
+ })
1114
+ ] }, l.id))
1115
+ ] });
1116
+ }
1117
+ function Launcher({ menu, link, icon, close }) {
1118
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1119
+ gui.YStack,
1120
+ {
1121
+ position: "absolute",
1122
+ t: 52,
1123
+ l: 0,
1124
+ r: 0,
1125
+ z: 50,
1126
+ bg: "$background",
1127
+ borderBottomWidth: 1,
1128
+ borderColor: "$borderColor",
1129
+ px: "$4",
1130
+ py: "$4",
1131
+ gap: "$3",
1132
+ maxH: "80vh",
1133
+ overflow: "scroll",
1134
+ children: [
1135
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$3", flexWrap: "wrap", children: [
1136
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color11", children: menu.eyebrow }),
1137
+ /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { ml: "auto", children: link({
1138
+ href: menu.allProducts.href,
1139
+ onNavigate: close,
1140
+ children: /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: "$2", color: "$color12", children: [
1141
+ menu.allProducts.label,
1142
+ " \u2192"
1143
+ ] })
1144
+ }) })
1145
+ ] }),
1146
+ /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { gap: "$2.5", flexWrap: "wrap", children: menu.products.map((p) => /* @__PURE__ */ jsxRuntime.jsx(ProductCell, { product: p, link, icon, close }, p.id)) }),
1147
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Separator, {}),
1148
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$4", flexWrap: "wrap", items: "flex-start", children: [
1149
+ /* @__PURE__ */ jsxRuntime.jsx(Column, { title: "Platform", links: menu.utilities, link, icon, close }),
1150
+ /* @__PURE__ */ jsxRuntime.jsx(Column, { title: "Install", links: menu.installs, link, icon, close })
1151
+ ] })
1152
+ ]
1153
+ }
1154
+ );
1155
+ }
1156
+ function Cta({ action, link }) {
1157
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { bg: "$color12", px: "$3", py: "$1.5", rounded: "$3", hoverStyle: { opacity: 0.9 }, children: link({
1158
+ href: action.href,
1159
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$background", children: action.label })
1160
+ }) });
1161
+ }
1162
+ function MobilePanel({ header, menu, link, icon, close }) {
1163
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1164
+ gui.YStack,
1165
+ {
1166
+ position: "absolute",
1167
+ t: 52,
1168
+ l: 0,
1169
+ r: 0,
1170
+ z: 50,
1171
+ bg: "$background",
1172
+ borderBottomWidth: 1,
1173
+ borderColor: "$borderColor",
1174
+ px: "$3",
1175
+ py: "$3",
1176
+ gap: "$3",
1177
+ maxH: "80vh",
1178
+ overflow: "scroll",
1179
+ children: [
1180
+ /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { gap: "$1", children: header.localNav.map((l) => /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { px: "$2", py: "$1.5", rounded: "$3", hoverStyle: { bg: "$color4" }, children: link({
1181
+ href: l.href,
1182
+ onNavigate: close,
1183
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", color: "$color12", children: l.label })
1184
+ }) }, l.id)) }),
1185
+ menu ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1186
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Separator, {}),
1187
+ /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { gap: "$1", children: menu.products.map((p) => /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { px: "$2", py: "$1.5", rounded: "$3", hoverStyle: { bg: "$color4" }, gap: "$2", items: "center", children: [
1188
+ icon?.(p.id) ?? null,
1189
+ link({
1190
+ href: p.url,
1191
+ onNavigate: close,
1192
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", color: "$color12", children: p.name })
1193
+ })
1194
+ ] }, p.id)) }),
1195
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Separator, {}),
1196
+ /* @__PURE__ */ jsxRuntime.jsx(Column, { title: "Platform", links: menu.utilities, link, icon, close }),
1197
+ /* @__PURE__ */ jsxRuntime.jsx(Column, { title: "Install", links: menu.installs, link, icon, close })
1198
+ ] }) : null
1199
+ ]
1200
+ }
1201
+ );
1202
+ }
1203
+ function SiteNav({ header, menu, brand, actions, link = defaultLink, icon, active, meetLabel = "Meet Hanzo" }) {
1204
+ const [launcher, setLauncher] = react.useState(false);
1205
+ const [mobile, setMobile] = react.useState(false);
1206
+ const root = react.useRef(null);
1207
+ react.useEffect(() => {
1208
+ if (!launcher && !mobile) return;
1209
+ const dismiss = () => {
1210
+ setLauncher(false);
1211
+ setMobile(false);
1212
+ };
1213
+ const onKey = (e) => {
1214
+ if (e.key === "Escape") dismiss();
1215
+ };
1216
+ const onDown = (e) => {
1217
+ if (root.current && !root.current.contains(e.target)) dismiss();
1218
+ };
1219
+ document.addEventListener("keydown", onKey);
1220
+ document.addEventListener("mousedown", onDown);
1221
+ return () => {
1222
+ document.removeEventListener("keydown", onKey);
1223
+ document.removeEventListener("mousedown", onDown);
1224
+ };
1225
+ }, [launcher, mobile]);
1226
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { ref: root, position: "relative", bg: "$background", children: [
1227
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$1", px: "$3", height: 52, borderBottomWidth: 1, borderColor: "$borderColor", children: [
1228
+ brand ? /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { items: "center", pr: "$2", children: brand }) : null,
1229
+ menu ? /* @__PURE__ */ jsxRuntime.jsx(
1230
+ gui.XStack,
1231
+ {
1232
+ cursor: "pointer",
1233
+ px: "$2.5",
1234
+ py: "$1.5",
1235
+ rounded: "$3",
1236
+ bg: launcher ? "$color4" : "transparent",
1237
+ hoverStyle: { bg: "$color4" },
1238
+ onPress: () => setLauncher(!launcher),
1239
+ accessibilityRole: "button",
1240
+ "aria-expanded": launcher,
1241
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color12", children: meetLabel })
1242
+ }
1243
+ ) : null,
1244
+ /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { items: "center", gap: "$0.5", flex: 1, minW: 0, $sm: { display: "none" }, children: header.localNav.map((l) => /* @__PURE__ */ jsxRuntime.jsx(
1245
+ gui.XStack,
1246
+ {
1247
+ px: "$2.5",
1248
+ py: "$1.5",
1249
+ rounded: "$3",
1250
+ hoverStyle: { bg: "$color4" },
1251
+ onMouseEnter: () => launcher && setLauncher(false),
1252
+ children: link({
1253
+ href: l.href,
1254
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: active === l.id ? "$color12" : "$color11", children: l.label })
1255
+ })
1256
+ },
1257
+ l.id
1258
+ )) }),
1259
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$2", ml: "auto", children: [
1260
+ actions,
1261
+ /* @__PURE__ */ jsxRuntime.jsx(Cta, { action: header.action, link }),
1262
+ /* @__PURE__ */ jsxRuntime.jsx(
1263
+ gui.XStack,
1264
+ {
1265
+ display: "none",
1266
+ $sm: { display: "flex" },
1267
+ cursor: "pointer",
1268
+ px: "$2",
1269
+ py: "$1.5",
1270
+ rounded: "$3",
1271
+ hoverStyle: { bg: "$color4" },
1272
+ onPress: () => setMobile(!mobile),
1273
+ accessibilityRole: "button",
1274
+ "aria-label": mobile ? "Close menu" : "Open menu",
1275
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color12", children: mobile ? "Close" : "Menu" })
1276
+ }
1277
+ )
1278
+ ] })
1279
+ ] }),
1280
+ launcher && menu ? /* @__PURE__ */ jsxRuntime.jsx(Launcher, { menu, link, icon, close: () => setLauncher(false) }) : null,
1281
+ mobile ? /* @__PURE__ */ jsxRuntime.jsx(MobilePanel, { header, menu, link, icon, close: () => setMobile(false) }) : null
1282
+ ] });
1283
+ }
1284
+ var isExternal2 = (href) => /^https?:\/\//.test(href);
1285
+ var defaultLink2 = ({ href, children }) => /* @__PURE__ */ jsxRuntime.jsx(
1286
+ "a",
1287
+ {
1288
+ href,
1289
+ ...isExternal2(href) ? { target: "_blank", rel: "noopener noreferrer" } : null,
1290
+ style: { textDecoration: "none", color: "inherit" },
1291
+ children
1292
+ }
1293
+ );
1294
+ function SiteFooter({ footer, brand, tagline, meta, link = defaultLink2 }) {
1295
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { borderTopWidth: 1, borderColor: "$borderColor", bg: "$background", px: "$4", py: "$5", gap: "$4", children: [
1296
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$5", flexWrap: "wrap", items: "flex-start", children: [
1297
+ brand || tagline ? /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$2", minW: 200, flex: 1, children: [
1298
+ brand,
1299
+ tagline ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, color: "$color10", lineHeight: 18, maxW: 280, children: tagline }) : null
1300
+ ] }) : null,
1301
+ footer.columns.map((column) => /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$1.5", minW: 140, children: [
1302
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 11, color: "$color10", textTransform: "uppercase", letterSpacing: 0.5, pb: "$1", children: column.title }),
1303
+ column.links.map((l) => /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { hoverStyle: { opacity: 0.7 }, children: link({
1304
+ href: l.href,
1305
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color11", children: l.label })
1306
+ }) }, l.id))
1307
+ ] }, column.id))
1308
+ ] }),
1309
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Separator, {}),
1310
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { items: "center", gap: "$3", flexWrap: "wrap", children: [
1311
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, color: "$color10", children: footer.legal.copyright }),
1312
+ /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { items: "center", gap: "$3", flexWrap: "wrap", children: footer.legal.links.map((l) => /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { hoverStyle: { opacity: 0.7 }, children: link({
1313
+ href: l.href,
1314
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, color: "$color10", children: l.label })
1315
+ }) }, l.id)) }),
1316
+ meta ? /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { ml: "auto", items: "center", gap: "$3", children: meta }) : null
1317
+ ] })
1318
+ ] });
1319
+ }
1320
+ function CommerceResource({
1321
+ title,
1322
+ subtitle,
1323
+ load,
1324
+ columns,
1325
+ rowKey,
1326
+ empty,
1327
+ hint,
1328
+ actions
1329
+ }) {
1330
+ const [state, setState] = react.useState({ phase: "loading" });
1331
+ const loadRef = react.useRef(load);
1332
+ loadRef.current = load;
1333
+ const reload = react.useCallback(() => {
1334
+ setState({ phase: "loading" });
1335
+ loadRef.current().then((r) => setState({ phase: "ready", data: r.rows })).catch((e) => setState({ phase: "error", error: chunkWHJR5S4L_cjs.classifyBackend(e) }));
1336
+ }, []);
1337
+ react.useEffect(() => {
1338
+ reload();
1339
+ }, [reload]);
1340
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1341
+ /* @__PURE__ */ jsxRuntime.jsx(
1342
+ chunkWHJR5S4L_cjs.PageHeader,
1343
+ {
1344
+ title,
1345
+ subtitle,
1346
+ actions: /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$2", children: [
1347
+ actions?.(reload),
1348
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Button, { size: "$2", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.RefreshCw, { size: 15 }), onPress: reload, children: "Refresh" })
1349
+ ] })
1350
+ }
1351
+ ),
1352
+ state.phase === "error" ? /* @__PURE__ */ jsxRuntime.jsx(chunkWHJR5S4L_cjs.BackendStateCard, { state: state.error, onRetry: reload, hint }) : /* @__PURE__ */ jsxRuntime.jsx(
1353
+ chunkONVERVFG_cjs.DataTable,
1354
+ {
1355
+ columns,
1356
+ rows: state.phase === "ready" ? state.data : [],
1357
+ loading: state.phase === "loading",
1358
+ rowKey,
1359
+ empty
1360
+ }
1361
+ )
1362
+ ] });
1363
+ }
1364
+ function ConfirmDelete({
1365
+ message,
1366
+ confirmLabel,
1367
+ run,
1368
+ onDone
1369
+ }) {
1370
+ const [busy, setBusy] = react.useState(false);
1371
+ const [err, setErr] = react.useState(null);
1372
+ const track = chunk7XDEUEWI_cjs.useEmit();
1373
+ const go = async () => {
1374
+ setBusy(true);
1375
+ setErr(null);
1376
+ track({ component: "ConfirmDelete", action: "confirm", id: confirmLabel });
1377
+ try {
1378
+ await run();
1379
+ onDone();
1380
+ } catch (e) {
1381
+ const message2 = chunkWHJR5S4L_cjs.classifyBackend(e).message || "Failed to delete.";
1382
+ track({ component: "ConfirmDelete", action: "error", id: confirmLabel, value: message2 });
1383
+ setErr(message2);
1384
+ setBusy(false);
1385
+ }
1386
+ };
1387
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: "$3", children: [
1388
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", color: "$color11", children: message }),
1389
+ err ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$red10", children: err }) : null,
1390
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$2", flexWrap: "wrap", children: [
1391
+ /* @__PURE__ */ jsxRuntime.jsx(
1392
+ gui.Button,
1393
+ {
1394
+ onPress: go,
1395
+ disabled: busy,
1396
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Trash2, { size: 15 }),
1397
+ style: { backgroundColor: "#dc2626", borderColor: "#dc2626", color: "#fff" },
1398
+ children: busy ? "Deleting\u2026" : confirmLabel
1399
+ }
1400
+ ),
1401
+ /* @__PURE__ */ jsxRuntime.jsx(
1402
+ gui.Button,
1403
+ {
1404
+ chromeless: true,
1405
+ onPress: () => {
1406
+ track({ component: "ConfirmDelete", action: "cancel", id: confirmLabel });
1407
+ onDone();
1408
+ },
1409
+ disabled: busy,
1410
+ children: "Cancel"
1411
+ }
1412
+ )
1413
+ ] })
1414
+ ] });
1415
+ }
1416
+ function Segmented({
1417
+ options,
1418
+ value,
1419
+ onChange,
1420
+ size = "$2",
1421
+ name
1422
+ }) {
1423
+ const track = chunk7XDEUEWI_cjs.useEmit();
1424
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { gap: "$1", flexWrap: "wrap", items: "center", children: options.map((o) => {
1425
+ const active = o.value === value;
1426
+ return /* @__PURE__ */ jsxRuntime.jsx(
1427
+ gui.Button,
1428
+ {
1429
+ size,
1430
+ bg: active ? "$color5" : "transparent",
1431
+ borderWidth: 1,
1432
+ borderColor: active ? "$color7" : "$borderColor",
1433
+ "aria-pressed": active,
1434
+ onPress: () => {
1435
+ track({ component: "Segmented", action: "filter", id: name, value: o.value });
1436
+ onChange(o.value);
1437
+ },
1438
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", fontWeight: active ? "700" : "500", color: active ? "$color12" : "$color11", children: o.label })
1439
+ },
1440
+ o.value
1441
+ );
1442
+ }) });
1443
+ }
1444
+ function SearchInput({
1445
+ value,
1446
+ onChange,
1447
+ placeholder,
1448
+ name
1449
+ }) {
1450
+ const track = chunk7XDEUEWI_cjs.useEmit();
1451
+ const onChangeTracked = (v) => {
1452
+ track({ component: "SearchInput", action: "search", id: name, value: chunk7XDEUEWI_cjs.textSize(v) });
1453
+ onChange(v);
1454
+ };
1455
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { flex: 1, minW: 180, items: "center", gap: "$2", px: "$3", borderWidth: 1, borderColor: "$borderColor", rounded: "$4", bg: "$color1", children: [
1456
+ /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Search, { size: 15, color: "$color10" }),
1457
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Input, { flex: 1, value, onChangeText: onChangeTracked, placeholder, borderWidth: 0, bg: "transparent", px: "$0", fontSize: "$3" })
1458
+ ] });
1459
+ }
1460
+
1461
+ // src/product/brand.ts
1462
+ var HANZO_MARK_CONTENT = '<path d="M22.21 67V44.6369H0V67H22.21Z"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z"/><path d="M22.21 0H0V22.3184H22.21V0Z"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z"/>';
1463
+ var HANZO = {
1464
+ id: "hanzo",
1465
+ name: "Hanzo",
1466
+ viewBox: "0 0 67 67",
1467
+ content: HANZO_MARK_CONTENT,
1468
+ href: "https://hanzo.ai"
1469
+ };
1470
+ var LUX = {
1471
+ id: "lux",
1472
+ name: "Lux",
1473
+ viewBox: "0 0 100 100",
1474
+ content: '<path d="M50 85 L15 25 L85 25 Z"/>',
1475
+ href: "https://lux.network"
1476
+ };
1477
+ var ZOO = {
1478
+ id: "zoo",
1479
+ name: "Zoo",
1480
+ viewBox: "0 0 1024 1024",
1481
+ fullColor: true,
1482
+ content: '<defs><clipPath id="zooClip"><circle cx="512" cy="511" r="270"/></clipPath><clipPath id="zooGClip"><circle cx="513" cy="369" r="234"/></clipPath><clipPath id="zooRClip"><circle cx="365" cy="595" r="234"/></clipPath></defs><g clip-path="url(#zooClip)"><circle cx="513" cy="369" r="234" fill="#00A652"/><circle cx="365" cy="595" r="234" fill="#ED1C24"/><circle cx="643" cy="595" r="234" fill="#2E3192"/><g clip-path="url(#zooGClip)"><circle cx="365" cy="595" r="234" fill="#FCF006"/><circle cx="643" cy="595" r="234" fill="#01ACF1"/></g><g clip-path="url(#zooRClip)"><circle cx="643" cy="595" r="234" fill="#EA018E"/></g><g clip-path="url(#zooGClip)"><g clip-path="url(#zooRClip)"><circle cx="643" cy="595" r="234" fill="#FFFFFF"/></g></g></g>',
1483
+ href: "https://zoo.ngo"
1484
+ };
1485
+ var PARS = {
1486
+ id: "pars",
1487
+ name: "Pars",
1488
+ viewBox: "-120 -120 240 240",
1489
+ content: '<path d="M0,-100 L30,-60 L100,-40 L60,0 L100,40 L30,60 L0,100 L-30,60 L-100,40 L-60,0 L-100,-40 L-30,-60 Z" fill="none" stroke="currentColor" stroke-width="4" stroke-linejoin="round"/><path d="M0,-70 L22,-42 L70,-28 L42,0 L70,28 L22,42 L0,70 L-22,42 L-70,28 L-42,0 L-70,-28 L-22,-42 Z" fill="currentColor" fill-opacity="0.15" stroke="currentColor" stroke-width="3" stroke-linejoin="round"/><circle r="55" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.4"/><circle r="35" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.4"/><circle r="8" fill="currentColor"/>',
1490
+ href: "https://pars.network"
1491
+ };
1492
+ var BRANDS = { hanzo: HANZO, lux: LUX, zoo: ZOO, pars: PARS };
1493
+ function resolveBrand(id) {
1494
+ return id && BRANDS[id] || HANZO;
1495
+ }
1496
+
1497
+ // src/product/animatedLogo.logic.ts
1498
+ var HOUSE_EASE = "cubic-bezier(0.16, 1, 0.3, 1)";
1499
+ var DEFAULT_DURATION_MS = 360;
1500
+ var DEFAULT_INTRO_MS = 1500;
1501
+ var DEFAULT_GAP = 8;
1502
+ function wordmarkText(name, surface) {
1503
+ const s = surface?.trim();
1504
+ return s ? `${name} ${s}` : name;
1505
+ }
1506
+ function isExpanded(s) {
1507
+ return s.hovered || s.focused || s.introShowing;
1508
+ }
1509
+ function wordmarkStyle(i) {
1510
+ return {
1511
+ width: i.expanded ? i.naturalWidth ?? "auto" : 0,
1512
+ opacity: i.expanded ? 1 : 0,
1513
+ marginLeft: i.expanded ? i.gap : 0,
1514
+ transition: i.reduce ? "none" : `width ${i.durationMs}ms ${i.easing}, opacity ${i.durationMs}ms ${i.easing}, margin-left ${i.durationMs}ms ${i.easing}`
1515
+ };
1516
+ }
1517
+ function usePrefersReducedMotion() {
1518
+ const [reduce, setReduce] = react.useState(false);
1519
+ react.useEffect(() => {
1520
+ if (typeof window === "undefined" || !window.matchMedia) return;
1521
+ const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
1522
+ const sync = () => setReduce(mq.matches);
1523
+ sync();
1524
+ mq.addEventListener("change", sync);
1525
+ return () => mq.removeEventListener("change", sync);
1526
+ }, []);
1527
+ return reduce;
1528
+ }
1529
+ function AnimatedLogo({
1530
+ surface,
1531
+ brand = HANZO,
1532
+ size = 22,
1533
+ gap = DEFAULT_GAP,
1534
+ introMs = DEFAULT_INTRO_MS,
1535
+ durationMs = DEFAULT_DURATION_MS,
1536
+ easing = HOUSE_EASE,
1537
+ href,
1538
+ onClick,
1539
+ component,
1540
+ className,
1541
+ style,
1542
+ "aria-label": ariaLabel
1543
+ }) {
1544
+ const reduce = usePrefersReducedMotion();
1545
+ const label = ariaLabel ?? wordmarkText(brand.name, surface);
1546
+ const [hovered, setHovered] = react.useState(false);
1547
+ const [focused, setFocused] = react.useState(false);
1548
+ const [introShowing, setIntroShowing] = react.useState(introMs > 0);
1549
+ const [naturalWidth, setNaturalWidth] = react.useState(void 0);
1550
+ const wordRef = react.useRef(null);
1551
+ react.useEffect(() => {
1552
+ if (introMs <= 0) return;
1553
+ if (reduce) {
1554
+ setIntroShowing(false);
1555
+ return;
1556
+ }
1557
+ const t = setTimeout(() => setIntroShowing(false), introMs);
1558
+ return () => clearTimeout(t);
1559
+ }, [introMs, reduce]);
1560
+ react.useLayoutEffect(() => {
1561
+ const el = wordRef.current;
1562
+ if (!el) return;
1563
+ const measure = () => setNaturalWidth(el.scrollWidth);
1564
+ measure();
1565
+ const fonts = typeof document !== "undefined" && document.fonts || null;
1566
+ if (fonts?.ready) fonts.ready.then(measure).catch(() => {
1567
+ });
1568
+ }, [brand.name, surface]);
1569
+ const expanded = isExpanded({ hovered, focused, introShowing });
1570
+ const ws = wordmarkStyle({ expanded, naturalWidth, gap, durationMs, easing, reduce });
1571
+ const Root = component ?? "a";
1572
+ const isAnchor = Root === "a";
1573
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1574
+ Root,
1575
+ {
1576
+ ...isAnchor ? { href: href ?? brand.href ?? "/" } : { href: href ?? brand.href },
1577
+ onClick,
1578
+ "aria-label": label,
1579
+ title: label,
1580
+ className,
1581
+ onMouseEnter: () => setHovered(true),
1582
+ onMouseLeave: () => setHovered(false),
1583
+ onFocus: () => setFocused(true),
1584
+ onBlur: () => setFocused(false),
1585
+ style: {
1586
+ display: "inline-flex",
1587
+ alignItems: "center",
1588
+ textDecoration: "none",
1589
+ color: "inherit",
1590
+ cursor: "pointer",
1591
+ ...style
1592
+ },
1593
+ children: [
1594
+ /* @__PURE__ */ jsxRuntime.jsx(
1595
+ "svg",
1596
+ {
1597
+ width: size,
1598
+ height: size,
1599
+ viewBox: brand.viewBox,
1600
+ "aria-hidden": "true",
1601
+ focusable: "false",
1602
+ fill: brand.fullColor ? void 0 : "currentColor",
1603
+ style: { display: "block", flexShrink: 0 },
1604
+ dangerouslySetInnerHTML: { __html: brand.content }
1605
+ }
1606
+ ),
1607
+ /* @__PURE__ */ jsxRuntime.jsx(
1608
+ "span",
1609
+ {
1610
+ ref: wordRef,
1611
+ "aria-hidden": "true",
1612
+ style: {
1613
+ display: "inline-block",
1614
+ overflow: "hidden",
1615
+ whiteSpace: "nowrap",
1616
+ fontWeight: 600,
1617
+ fontSize: 15,
1618
+ letterSpacing: "-0.01em",
1619
+ lineHeight: 1,
1620
+ width: ws.width,
1621
+ opacity: ws.opacity,
1622
+ marginLeft: ws.marginLeft,
1623
+ transition: ws.transition
1624
+ },
1625
+ children: label
1626
+ }
1627
+ )
1628
+ ]
1629
+ }
1630
+ );
1631
+ }
1632
+ function FadeIn({
1633
+ children,
1634
+ index = 0,
1635
+ step = 50,
1636
+ delayMs,
1637
+ style
1638
+ }) {
1639
+ const delay = delayMs ?? index * step;
1640
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hz-fade-up", style: { animationDelay: `${delay}ms`, ...style }, children });
1641
+ }
1642
+ function ProductIcon({
1643
+ icon: Icon,
1644
+ color,
1645
+ size = 24
1646
+ }) {
1647
+ const radius = Math.round(size * 0.28);
1648
+ const glyph = Math.round(size * 0.58);
1649
+ const tinted = typeof color === "string" && color.trim() !== "";
1650
+ if (tinted) {
1651
+ return /* @__PURE__ */ jsxRuntime.jsx(
1652
+ gui.XStack,
1653
+ {
1654
+ width: size,
1655
+ height: size,
1656
+ items: "center",
1657
+ justify: "center",
1658
+ rounded: radius,
1659
+ style: { backgroundColor: color },
1660
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: glyph, color: chunkONVERVFG_cjs.asColor("#ffffff") })
1661
+ }
1662
+ );
1663
+ }
1664
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { width: size, height: size, items: "center", justify: "center", rounded: radius, bg: "$color12", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: glyph, color: "$color1" }) });
1665
+ }
1666
+ var KNOWN = {
1667
+ openrouter: lucideIcons2.Globe,
1668
+ nvidia: lucideIcons2.Cpu
1669
+ };
1670
+ var isFirstParty = (provider) => {
1671
+ const p = provider.trim().toLowerCase();
1672
+ return p === "hanzo" || p === "zen";
1673
+ };
1674
+ function EnsoMark({ size, color }) {
1675
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 100 100", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M66.22 83.26 A37 37 0 1 1 85.57 60.20", fill: "none", stroke: color, strokeWidth: 11, strokeLinecap: "round" }) });
1676
+ }
1677
+ var HANZO_PATHS = [
1678
+ "M22.21 67V44.6369H0V67H22.21Z",
1679
+ "M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z",
1680
+ "M22.21 0H0V22.3184H22.21V0Z",
1681
+ "M66.7198 0H44.5098V22.3184H66.7198V0Z",
1682
+ "M66.7198 67V44.6369H44.5098V67H66.7198Z"
1683
+ ];
1684
+ function HanzoHMark({ size, color }) {
1685
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 67 67", "aria-hidden": "true", children: HANZO_PATHS.map((d) => /* @__PURE__ */ jsxRuntime.jsx("path", { d, fill: color }, d)) });
1686
+ }
1687
+ function providerInitials(provider) {
1688
+ const name = provider.trim();
1689
+ if (!name) return "\u2022";
1690
+ const words = name.split(/[\s/_-]+/).filter(Boolean);
1691
+ if (words.length >= 2) return (words[0][0] + words[1][0]).toUpperCase();
1692
+ return name.slice(0, 2).toUpperCase();
1693
+ }
1694
+ function ProviderLogo({ provider, size = 24 }) {
1695
+ const theme = gui.useTheme();
1696
+ const radius = Math.round(size * 0.28);
1697
+ const iconSize = Math.round(size * 0.56);
1698
+ if (isFirstParty(provider)) {
1699
+ const fg = theme.color1?.get() ?? "#000000";
1700
+ const markSize = Math.round(size * 0.66);
1701
+ const isZen = provider.trim().toLowerCase() === "zen";
1702
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { width: size, height: size, items: "center", justify: "center", rounded: radius, bg: "$color12", children: isZen ? /* @__PURE__ */ jsxRuntime.jsx(EnsoMark, { size: markSize, color: fg }) : /* @__PURE__ */ jsxRuntime.jsx(HanzoHMark, { size: Math.round(size * 0.56), color: fg }) });
1703
+ }
1704
+ const Known = KNOWN[provider.trim().toLowerCase()];
1705
+ if (Known) {
1706
+ return /* @__PURE__ */ jsxRuntime.jsx(
1707
+ gui.XStack,
1708
+ {
1709
+ width: size,
1710
+ height: size,
1711
+ items: "center",
1712
+ justify: "center",
1713
+ rounded: radius,
1714
+ bg: "$color3",
1715
+ borderWidth: 1,
1716
+ borderColor: "$borderColor",
1717
+ children: /* @__PURE__ */ jsxRuntime.jsx(Known, { size: iconSize, color: "$color11" })
1718
+ }
1719
+ );
1720
+ }
1721
+ return /* @__PURE__ */ jsxRuntime.jsx(
1722
+ gui.XStack,
1723
+ {
1724
+ width: size,
1725
+ height: size,
1726
+ items: "center",
1727
+ justify: "center",
1728
+ rounded: radius,
1729
+ bg: "$color3",
1730
+ borderWidth: 1,
1731
+ borderColor: "$borderColor",
1732
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: Math.round(size * 0.4), fontWeight: "800", color: "$color11", children: providerInitials(provider) })
1733
+ }
1734
+ );
1735
+ }
1736
+ function GenericLogo({ size = 24 }) {
1737
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { width: size, height: size, items: "center", justify: "center", rounded: Math.round(size * 0.28), bg: "$color3", borderWidth: 1, borderColor: "$borderColor", children: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.Server, { size: Math.round(size * 0.56), color: "$color11" }) });
1738
+ }
1739
+ function targetIndex(from, dy, rowH, count) {
1740
+ if (rowH <= 0 || count <= 0) return from;
1741
+ const raw = from + Math.round(dy / rowH);
1742
+ return Math.max(0, Math.min(raw, count - 1));
1743
+ }
1744
+ function rowShift(i, from, to, dy, rowH) {
1745
+ if (i === from) return dy;
1746
+ if (from < to && i > from && i <= to) return -rowH;
1747
+ if (from > to && i < from && i >= to) return rowH;
1748
+ return 0;
1749
+ }
1750
+ function Reorder({
1751
+ items,
1752
+ keyOf,
1753
+ rowHeight = 44,
1754
+ onReorder,
1755
+ renderItem
1756
+ }) {
1757
+ const [drag, setDrag] = react.useState(null);
1758
+ const startRef = react.useRef(null);
1759
+ const to = drag ? targetIndex(drag.from, drag.dy, rowHeight, items.length) : -1;
1760
+ const begin = react.useCallback(
1761
+ (index) => (e) => {
1762
+ const startY = e.clientY ?? e.nativeEvent?.clientY ?? 0;
1763
+ startRef.current = { from: index, startY };
1764
+ setDrag({ from: index, dy: 0 });
1765
+ const move = (ev) => {
1766
+ if (!startRef.current) return;
1767
+ setDrag({ from: startRef.current.from, dy: ev.clientY - startRef.current.startY });
1768
+ };
1769
+ const end = () => {
1770
+ const s = startRef.current;
1771
+ window.removeEventListener("pointermove", move);
1772
+ window.removeEventListener("pointerup", end);
1773
+ window.removeEventListener("pointercancel", end);
1774
+ startRef.current = null;
1775
+ setDrag((d) => {
1776
+ if (s && d) {
1777
+ const t = targetIndex(s.from, d.dy, rowHeight, items.length);
1778
+ if (t !== s.from) onReorder(s.from, t);
1779
+ }
1780
+ return null;
1781
+ });
1782
+ };
1783
+ window.addEventListener("pointermove", move);
1784
+ window.addEventListener("pointerup", end);
1785
+ window.addEventListener("pointercancel", end);
1786
+ },
1787
+ [items.length, rowHeight, onReorder]
1788
+ );
1789
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { children: items.map((item, i) => {
1790
+ const dragging = drag?.from === i;
1791
+ const shift = drag && to >= 0 ? rowShift(i, drag.from, to, drag.dy, rowHeight) : 0;
1792
+ return /* @__PURE__ */ jsxRuntime.jsx(
1793
+ gui.YStack,
1794
+ {
1795
+ height: rowHeight,
1796
+ justify: "center",
1797
+ className: "hz-drag-item",
1798
+ style: {
1799
+ transform: `translateY(${shift}px)`,
1800
+ zIndex: dragging ? 2 : 1,
1801
+ ...dragging ? { transition: "none", boxShadow: "0 8px 24px rgba(0,0,0,0.28)" } : null
1802
+ },
1803
+ children: renderItem(item, { onPointerDown: begin(i) }, dragging)
1804
+ },
1805
+ keyOf(item)
1806
+ );
1807
+ }) });
1808
+ }
1809
+ var ToastContext = react.createContext(null);
1810
+ var ACCENT2 = {
1811
+ success: "$green10",
1812
+ error: "$red10",
1813
+ info: "$color11"
1814
+ };
1815
+ var ICON = {
1816
+ success: lucideIcons2.CircleCheck,
1817
+ error: lucideIcons2.CircleX,
1818
+ info: lucideIcons2.Info
1819
+ };
1820
+ function ToastCard({ t, onClose }) {
1821
+ const Icon = ICON[t.kind];
1822
+ const accent = ACCENT2[t.kind];
1823
+ return /* @__PURE__ */ jsxRuntime.jsx(
1824
+ gui.Card,
1825
+ {
1826
+ width: 360,
1827
+ maxWidth: "90%",
1828
+ p: "$3",
1829
+ gap: "$2",
1830
+ bg: "$color2",
1831
+ borderWidth: 1,
1832
+ borderColor: "$borderColor",
1833
+ borderLeftWidth: 3,
1834
+ borderLeftColor: accent,
1835
+ rounded: "$4",
1836
+ elevation: "$2",
1837
+ children: /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: "$2.5", items: "flex-start", children: [
1838
+ /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { pt: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 18, color: accent }) }),
1839
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { flex: 1, gap: "$1", children: [
1840
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$3", fontWeight: "700", color: "$color12", children: t.title }),
1841
+ t.description ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: "$2", color: "$color11", children: t.description }) : null
1842
+ ] }),
1843
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Button, { size: "$1", chromeless: true, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideIcons2.X, { size: 14 }), onPress: onClose, "aria-label": "Dismiss" })
1844
+ ] })
1845
+ }
1846
+ );
1847
+ }
1848
+ function ToastViewport({ toasts, dismiss }) {
1849
+ const [mounted, setMounted] = react.useState(false);
1850
+ react.useEffect(() => setMounted(true), []);
1851
+ if (!mounted || typeof document === "undefined") return null;
1852
+ return reactDom.createPortal(
1853
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "fixed", top: 16, right: 16, zIndex: 1e5, pointerEvents: "none" }, children: /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { gap: "$2", items: "flex-end", children: toasts.map((t) => /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { pointerEvents: "auto", children: /* @__PURE__ */ jsxRuntime.jsx(ToastCard, { t, onClose: () => dismiss(t.id) }) }, t.id)) }) }),
1854
+ document.body
1855
+ );
1856
+ }
1857
+ function ToastProvider({ children }) {
1858
+ const track = chunk7XDEUEWI_cjs.useEmit();
1859
+ const [toasts, setToasts] = react.useState([]);
1860
+ const timers = react.useRef(/* @__PURE__ */ new Map());
1861
+ const seq = react.useRef(0);
1862
+ const dismiss = react.useCallback((id) => {
1863
+ setToasts((ts) => ts.filter((t) => t.id !== id));
1864
+ const timer = timers.current.get(id);
1865
+ if (timer) {
1866
+ clearTimeout(timer);
1867
+ timers.current.delete(id);
1868
+ }
1869
+ }, []);
1870
+ const toast = react.useCallback(
1871
+ (input) => {
1872
+ const id = ++seq.current;
1873
+ const kind = input.kind ?? "info";
1874
+ const durationMs = input.durationMs ?? (kind === "error" ? 6e3 : 3500);
1875
+ track({ component: "Toast", action: kind === "error" ? "error" : "view", id: input.title, value: kind });
1876
+ setToasts((ts) => [...ts, { id, kind, title: input.title, description: input.description, durationMs }]);
1877
+ if (durationMs > 0) {
1878
+ timers.current.set(
1879
+ id,
1880
+ setTimeout(() => dismiss(id), durationMs)
1881
+ );
1882
+ }
1883
+ },
1884
+ [dismiss, track]
1885
+ );
1886
+ react.useEffect(() => {
1887
+ const map = timers.current;
1888
+ return () => map.forEach((t) => clearTimeout(t));
1889
+ }, []);
1890
+ const api = {
1891
+ toast,
1892
+ success: (title, description) => toast({ title, description, kind: "success" }),
1893
+ error: (title, description) => toast({ title, description, kind: "error" }),
1894
+ info: (title, description) => toast({ title, description, kind: "info" }),
1895
+ dismiss
1896
+ };
1897
+ return /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value: api, children: [
1898
+ children,
1899
+ /* @__PURE__ */ jsxRuntime.jsx(ToastViewport, { toasts, dismiss })
1900
+ ] });
1901
+ }
1902
+ function useToast() {
1903
+ const ctx = react.useContext(ToastContext);
1904
+ if (!ctx) throw new Error("useToast must be used within <ToastProvider>");
1905
+ return ctx;
1906
+ }
1907
+
1908
+ Object.defineProperty(exports, "AgnosticThemeToggle", {
33
1909
  enumerable: true,
34
- get: function () { return chunk2BM42AZR_cjs.BrandMark; }
1910
+ get: function () { return chunkARV3P4CE_cjs.AgnosticThemeToggle; }
35
1911
  });
36
- Object.defineProperty(exports, "CHART_OTHER", {
1912
+ Object.defineProperty(exports, "ThemeToggle", {
37
1913
  enumerable: true,
38
- get: function () { return chunk2BM42AZR_cjs.CHART_OTHER; }
1914
+ get: function () { return chunkARV3P4CE_cjs.ThemeToggle; }
39
1915
  });
40
- Object.defineProperty(exports, "CHART_PALETTE", {
1916
+ Object.defineProperty(exports, "ThemeToggleNext", {
41
1917
  enumerable: true,
42
- get: function () { return chunk2BM42AZR_cjs.CHART_PALETTE; }
1918
+ get: function () { return chunkARV3P4CE_cjs.ThemeToggleNext; }
43
1919
  });
44
- Object.defineProperty(exports, "ComboBox", {
1920
+ Object.defineProperty(exports, "COMPOSE_MODES", {
45
1921
  enumerable: true,
46
- get: function () { return chunk2BM42AZR_cjs.ComboBox; }
1922
+ get: function () { return chunkONVERVFG_cjs.COMPOSE_MODES; }
47
1923
  });
48
- Object.defineProperty(exports, "CommerceResource", {
1924
+ Object.defineProperty(exports, "CampaignCard", {
49
1925
  enumerable: true,
50
- get: function () { return chunk2BM42AZR_cjs.CommerceResource; }
1926
+ get: function () { return chunkONVERVFG_cjs.CampaignCard; }
51
1927
  });
52
- Object.defineProperty(exports, "ConfirmDelete", {
1928
+ Object.defineProperty(exports, "ChannelBadge", {
53
1929
  enumerable: true,
54
- get: function () { return chunk2BM42AZR_cjs.ConfirmDelete; }
1930
+ get: function () { return chunkONVERVFG_cjs.ChannelBadge; }
55
1931
  });
56
- Object.defineProperty(exports, "ContextMenu", {
1932
+ Object.defineProperty(exports, "DataTable", {
57
1933
  enumerable: true,
58
- get: function () { return chunk2BM42AZR_cjs.ContextMenu; }
1934
+ get: function () { return chunkONVERVFG_cjs.DataTable; }
59
1935
  });
60
- Object.defineProperty(exports, "CustomModelMark", {
1936
+ Object.defineProperty(exports, "PostAgenda", {
61
1937
  enumerable: true,
62
- get: function () { return chunk2BM42AZR_cjs.Boxes; }
1938
+ get: function () { return chunkONVERVFG_cjs.PostAgenda; }
63
1939
  });
64
- Object.defineProperty(exports, "Donut", {
1940
+ Object.defineProperty(exports, "PostCard", {
65
1941
  enumerable: true,
66
- get: function () { return chunk2BM42AZR_cjs.Donut; }
1942
+ get: function () { return chunkONVERVFG_cjs.PostCard; }
67
1943
  });
68
- Object.defineProperty(exports, "DonutRing", {
1944
+ Object.defineProperty(exports, "PostComposer", {
69
1945
  enumerable: true,
70
- get: function () { return chunk2BM42AZR_cjs.Donut2; }
1946
+ get: function () { return chunkONVERVFG_cjs.PostComposer; }
71
1947
  });
72
- Object.defineProperty(exports, "DropdownMenu", {
1948
+ Object.defineProperty(exports, "ProviderReadinessList", {
73
1949
  enumerable: true,
74
- get: function () { return chunk2BM42AZR_cjs.DropdownMenu; }
1950
+ get: function () { return chunkONVERVFG_cjs.ProviderReadinessList; }
75
1951
  });
76
- Object.defineProperty(exports, "FadeIn", {
1952
+ Object.defineProperty(exports, "SLIDEOVER_LG", {
77
1953
  enumerable: true,
78
- get: function () { return chunk2BM42AZR_cjs.FadeIn; }
1954
+ get: function () { return chunkONVERVFG_cjs.LG; }
79
1955
  });
80
- Object.defineProperty(exports, "FloatingMenu", {
1956
+ Object.defineProperty(exports, "SlideOver", {
81
1957
  enumerable: true,
82
- get: function () { return chunk2BM42AZR_cjs.FloatingMenu; }
1958
+ get: function () { return chunkONVERVFG_cjs.SlideOver; }
83
1959
  });
84
- Object.defineProperty(exports, "GenericLogo", {
1960
+ Object.defineProperty(exports, "SocialResource", {
85
1961
  enumerable: true,
86
- get: function () { return chunk2BM42AZR_cjs.GenericLogo; }
1962
+ get: function () { return chunkONVERVFG_cjs.SocialResource; }
87
1963
  });
88
- Object.defineProperty(exports, "HANZO", {
1964
+ Object.defineProperty(exports, "SocialSummaryBar", {
89
1965
  enumerable: true,
90
- get: function () { return chunk2BM42AZR_cjs.HANZO; }
1966
+ get: function () { return chunkONVERVFG_cjs.SocialSummaryBar; }
91
1967
  });
92
- Object.defineProperty(exports, "HANZO_MARK_CONTENT", {
1968
+ Object.defineProperty(exports, "StatusTag", {
93
1969
  enumerable: true,
94
- get: function () { return chunk2BM42AZR_cjs.HANZO_MARK_CONTENT; }
1970
+ get: function () { return chunkONVERVFG_cjs.StatusTag; }
95
1971
  });
96
- Object.defineProperty(exports, "HanzoMark", {
1972
+ Object.defineProperty(exports, "ViewToggle", {
97
1973
  enumerable: true,
98
- get: function () { return chunk2BM42AZR_cjs.HanzoMark; }
1974
+ get: function () { return chunkONVERVFG_cjs.ViewToggle; }
99
1975
  });
100
- Object.defineProperty(exports, "HintButton", {
1976
+ Object.defineProperty(exports, "asColor", {
101
1977
  enumerable: true,
102
- get: function () { return chunk2BM42AZR_cjs.HintButton; }
1978
+ get: function () { return chunkONVERVFG_cjs.asColor; }
103
1979
  });
104
- Object.defineProperty(exports, "LUX", {
1980
+ Object.defineProperty(exports, "formatPostTime", {
105
1981
  enumerable: true,
106
- get: function () { return chunk2BM42AZR_cjs.LUX; }
1982
+ get: function () { return chunkONVERVFG_cjs.formatPostTime; }
107
1983
  });
108
- Object.defineProperty(exports, "LegendDot", {
1984
+ Object.defineProperty(exports, "parsePostTime", {
109
1985
  enumerable: true,
110
- get: function () { return chunk2BM42AZR_cjs.LegendDot; }
1986
+ get: function () { return chunkONVERVFG_cjs.parsePostTime; }
111
1987
  });
112
- Object.defineProperty(exports, "LineChart", {
1988
+ Object.defineProperty(exports, "postDayBucket", {
113
1989
  enumerable: true,
114
- get: function () { return chunk2BM42AZR_cjs.LineChart; }
1990
+ get: function () { return chunkONVERVFG_cjs.postDayBucket; }
115
1991
  });
116
- Object.defineProperty(exports, "MenuItemView", {
1992
+ Object.defineProperty(exports, "postPreview", {
117
1993
  enumerable: true,
118
- get: function () { return chunk2BM42AZR_cjs.MenuItemView; }
1994
+ get: function () { return chunkONVERVFG_cjs.postPreview; }
119
1995
  });
120
- Object.defineProperty(exports, "MenuLabelView", {
1996
+ Object.defineProperty(exports, "ACCOUNT_STATUSES", {
121
1997
  enumerable: true,
122
- get: function () { return chunk2BM42AZR_cjs.MenuLabelView; }
1998
+ get: function () { return chunkMWBFAV3D_cjs.ACCOUNT_STATUSES; }
123
1999
  });
124
- Object.defineProperty(exports, "MenuPanel", {
2000
+ Object.defineProperty(exports, "POST_STATUSES", {
125
2001
  enumerable: true,
126
- get: function () { return chunk2BM42AZR_cjs.MenuPanel; }
2002
+ get: function () { return chunkMWBFAV3D_cjs.POST_STATUSES; }
127
2003
  });
128
- Object.defineProperty(exports, "MenuSeparatorView", {
2004
+ Object.defineProperty(exports, "PROVIDERS", {
129
2005
  enumerable: true,
130
- get: function () { return chunk2BM42AZR_cjs.MenuSeparatorView; }
2006
+ get: function () { return chunkMWBFAV3D_cjs.PROVIDERS; }
131
2007
  });
132
- Object.defineProperty(exports, "MetricCard", {
2008
+ Object.defineProperty(exports, "createSocialApi", {
133
2009
  enumerable: true,
134
- get: function () { return chunk2BM42AZR_cjs.MetricCard; }
2010
+ get: function () { return chunkMWBFAV3D_cjs.createSocialApi; }
135
2011
  });
136
- Object.defineProperty(exports, "MetricSparkline", {
2012
+ Object.defineProperty(exports, "normalizeAccount", {
137
2013
  enumerable: true,
138
- get: function () { return chunk2BM42AZR_cjs.Sparkline2; }
2014
+ get: function () { return chunkMWBFAV3D_cjs.normalizeAccount; }
139
2015
  });
140
- Object.defineProperty(exports, "MiniBars", {
2016
+ Object.defineProperty(exports, "normalizeAccounts", {
141
2017
  enumerable: true,
142
- get: function () { return chunk2BM42AZR_cjs.MiniBars; }
2018
+ get: function () { return chunkMWBFAV3D_cjs.normalizeAccounts; }
143
2019
  });
144
- Object.defineProperty(exports, "OrgMark", {
2020
+ Object.defineProperty(exports, "normalizePost", {
145
2021
  enumerable: true,
146
- get: function () { return chunk2BM42AZR_cjs.OrgMark; }
2022
+ get: function () { return chunkMWBFAV3D_cjs.normalizePost; }
147
2023
  });
148
- Object.defineProperty(exports, "OrgSwitcher", {
2024
+ Object.defineProperty(exports, "normalizePosts", {
149
2025
  enumerable: true,
150
- get: function () { return chunk2BM42AZR_cjs.OrgSwitcher; }
2026
+ get: function () { return chunkMWBFAV3D_cjs.normalizePosts; }
151
2027
  });
152
- Object.defineProperty(exports, "PARS", {
2028
+ Object.defineProperty(exports, "normalizeProviderCapability", {
153
2029
  enumerable: true,
154
- get: function () { return chunk2BM42AZR_cjs.PARS; }
2030
+ get: function () { return chunkMWBFAV3D_cjs.normalizeProviderCapability; }
155
2031
  });
156
- Object.defineProperty(exports, "Panel", {
2032
+ Object.defineProperty(exports, "normalizeProviders", {
157
2033
  enumerable: true,
158
- get: function () { return chunk2BM42AZR_cjs.Panel; }
2034
+ get: function () { return chunkMWBFAV3D_cjs.normalizeProviders; }
159
2035
  });
160
- Object.defineProperty(exports, "PortalTheme", {
2036
+ Object.defineProperty(exports, "normalizeSummary", {
161
2037
  enumerable: true,
162
- get: function () { return chunk2BM42AZR_cjs.PortalTheme; }
2038
+ get: function () { return chunkMWBFAV3D_cjs.normalizeSummary; }
163
2039
  });
164
- Object.defineProperty(exports, "ProductIcon", {
2040
+ Object.defineProperty(exports, "DropdownMenu", {
165
2041
  enumerable: true,
166
- get: function () { return chunk2BM42AZR_cjs.ProductIcon; }
2042
+ get: function () { return chunkGWNNLYX4_cjs.DropdownMenu; }
167
2043
  });
168
- Object.defineProperty(exports, "ProviderLogo", {
2044
+ Object.defineProperty(exports, "FloatingMenu", {
169
2045
  enumerable: true,
170
- get: function () { return chunk2BM42AZR_cjs.ProviderLogo; }
2046
+ get: function () { return chunkGWNNLYX4_cjs.FloatingMenu; }
171
2047
  });
172
- Object.defineProperty(exports, "Reorder", {
2048
+ Object.defineProperty(exports, "MenuItemView", {
173
2049
  enumerable: true,
174
- get: function () { return chunk2BM42AZR_cjs.Reorder; }
2050
+ get: function () { return chunkGWNNLYX4_cjs.MenuItemView; }
175
2051
  });
176
- Object.defineProperty(exports, "SERIES", {
2052
+ Object.defineProperty(exports, "MenuLabelView", {
177
2053
  enumerable: true,
178
- get: function () { return chunk2BM42AZR_cjs.SERIES; }
2054
+ get: function () { return chunkGWNNLYX4_cjs.MenuLabelView; }
179
2055
  });
180
- Object.defineProperty(exports, "SURFACES", {
2056
+ Object.defineProperty(exports, "MenuPanel", {
181
2057
  enumerable: true,
182
- get: function () { return chunk2BM42AZR_cjs.SURFACES; }
2058
+ get: function () { return chunkGWNNLYX4_cjs.MenuPanel; }
183
2059
  });
184
- Object.defineProperty(exports, "SearchInput", {
2060
+ Object.defineProperty(exports, "MenuSeparatorView", {
185
2061
  enumerable: true,
186
- get: function () { return chunk2BM42AZR_cjs.SearchInput; }
2062
+ get: function () { return chunkGWNNLYX4_cjs.MenuSeparatorView; }
187
2063
  });
188
- Object.defineProperty(exports, "Segmented", {
2064
+ Object.defineProperty(exports, "PortalTheme", {
189
2065
  enumerable: true,
190
- get: function () { return chunk2BM42AZR_cjs.Segmented; }
2066
+ get: function () { return chunkGWNNLYX4_cjs.PortalTheme; }
191
2067
  });
192
2068
  Object.defineProperty(exports, "SelectMenu", {
193
2069
  enumerable: true,
194
- get: function () { return chunk2BM42AZR_cjs.SelectMenu; }
195
- });
196
- Object.defineProperty(exports, "SiteFooter", {
197
- enumerable: true,
198
- get: function () { return chunk2BM42AZR_cjs.SiteFooter; }
199
- });
200
- Object.defineProperty(exports, "SiteNav", {
201
- enumerable: true,
202
- get: function () { return chunk2BM42AZR_cjs.SiteNav; }
203
- });
204
- Object.defineProperty(exports, "Sparkline", {
205
- enumerable: true,
206
- get: function () { return chunk2BM42AZR_cjs.Sparkline; }
207
- });
208
- Object.defineProperty(exports, "ToastProvider", {
209
- enumerable: true,
210
- get: function () { return chunk2BM42AZR_cjs.ToastProvider; }
211
- });
212
- Object.defineProperty(exports, "UtilBar", {
213
- enumerable: true,
214
- get: function () { return chunk2BM42AZR_cjs.UtilBar; }
215
- });
216
- Object.defineProperty(exports, "ZOO", {
217
- enumerable: true,
218
- get: function () { return chunk2BM42AZR_cjs.ZOO; }
219
- });
220
- Object.defineProperty(exports, "colorForIndex", {
221
- enumerable: true,
222
- get: function () { return chunk2BM42AZR_cjs.colorForIndex; }
223
- });
224
- Object.defineProperty(exports, "filterOptions", {
225
- enumerable: true,
226
- get: function () { return chunk2BM42AZR_cjs.filterOptions; }
227
- });
228
- Object.defineProperty(exports, "filterOrgs", {
229
- enumerable: true,
230
- get: function () { return chunk2BM42AZR_cjs.filterOrgs; }
231
- });
232
- Object.defineProperty(exports, "isKnownOption", {
233
- enumerable: true,
234
- get: function () { return chunk2BM42AZR_cjs.isKnownOption; }
235
- });
236
- Object.defineProperty(exports, "monogram", {
237
- enumerable: true,
238
- get: function () { return chunk2BM42AZR_cjs.monogram; }
239
- });
240
- Object.defineProperty(exports, "orgScope", {
241
- enumerable: true,
242
- get: function () { return chunk2BM42AZR_cjs.orgScope; }
243
- });
244
- Object.defineProperty(exports, "otherSurfaces", {
245
- enumerable: true,
246
- get: function () { return chunk2BM42AZR_cjs.otherSurfaces; }
247
- });
248
- Object.defineProperty(exports, "providerInitials", {
249
- enumerable: true,
250
- get: function () { return chunk2BM42AZR_cjs.providerInitials; }
2070
+ get: function () { return chunkGWNNLYX4_cjs.SelectMenu; }
251
2071
  });
252
2072
  Object.defineProperty(exports, "renderMenuItems", {
253
2073
  enumerable: true,
254
- get: function () { return chunk2BM42AZR_cjs.renderMenuItems; }
255
- });
256
- Object.defineProperty(exports, "resolveBrand", {
257
- enumerable: true,
258
- get: function () { return chunk2BM42AZR_cjs.resolveBrand; }
259
- });
260
- Object.defineProperty(exports, "rowShift", {
261
- enumerable: true,
262
- get: function () { return chunk2BM42AZR_cjs.rowShift; }
263
- });
264
- Object.defineProperty(exports, "targetIndex", {
265
- enumerable: true,
266
- get: function () { return chunk2BM42AZR_cjs.targetIndex; }
267
- });
268
- Object.defineProperty(exports, "useContainerWidth", {
269
- enumerable: true,
270
- get: function () { return chunk2BM42AZR_cjs.useContainerWidth; }
271
- });
272
- Object.defineProperty(exports, "useToast", {
273
- enumerable: true,
274
- get: function () { return chunk2BM42AZR_cjs.useToast; }
275
- });
276
- Object.defineProperty(exports, "utilColor", {
277
- enumerable: true,
278
- get: function () { return chunk2BM42AZR_cjs.utilColor; }
279
- });
280
- Object.defineProperty(exports, "AgnosticThemeToggle", {
281
- enumerable: true,
282
- get: function () { return chunkARV3P4CE_cjs.AgnosticThemeToggle; }
283
- });
284
- Object.defineProperty(exports, "ThemeToggle", {
285
- enumerable: true,
286
- get: function () { return chunkARV3P4CE_cjs.ThemeToggle; }
287
- });
288
- Object.defineProperty(exports, "ThemeToggleNext", {
289
- enumerable: true,
290
- get: function () { return chunkARV3P4CE_cjs.ThemeToggleNext; }
2074
+ get: function () { return chunkGWNNLYX4_cjs.renderMenuItems; }
291
2075
  });
292
2076
  Object.defineProperty(exports, "BackendStateCard", {
293
2077
  enumerable: true,
294
- get: function () { return chunkNBZDIMP3_cjs.BackendStateCard; }
295
- });
296
- Object.defineProperty(exports, "COMPOSE_MODES", {
297
- enumerable: true,
298
- get: function () { return chunkNBZDIMP3_cjs.COMPOSE_MODES; }
299
- });
300
- Object.defineProperty(exports, "CampaignCard", {
301
- enumerable: true,
302
- get: function () { return chunkNBZDIMP3_cjs.CampaignCard; }
303
- });
304
- Object.defineProperty(exports, "ChannelBadge", {
305
- enumerable: true,
306
- get: function () { return chunkNBZDIMP3_cjs.ChannelBadge; }
307
- });
308
- Object.defineProperty(exports, "DataTable", {
309
- enumerable: true,
310
- get: function () { return chunkNBZDIMP3_cjs.DataTable; }
2078
+ get: function () { return chunkWHJR5S4L_cjs.BackendStateCard; }
311
2079
  });
312
2080
  Object.defineProperty(exports, "EmptyState", {
313
2081
  enumerable: true,
314
- get: function () { return chunkNBZDIMP3_cjs.EmptyState; }
2082
+ get: function () { return chunkWHJR5S4L_cjs.EmptyState; }
315
2083
  });
316
2084
  Object.defineProperty(exports, "FieldRow", {
317
2085
  enumerable: true,
318
- get: function () { return chunkNBZDIMP3_cjs.FieldRow; }
2086
+ get: function () { return chunkWHJR5S4L_cjs.FieldRow; }
319
2087
  });
320
2088
  Object.defineProperty(exports, "FieldSelect", {
321
2089
  enumerable: true,
322
- get: function () { return chunkNBZDIMP3_cjs.FieldSelect; }
2090
+ get: function () { return chunkWHJR5S4L_cjs.FieldSelect; }
323
2091
  });
324
2092
  Object.defineProperty(exports, "FieldSlider", {
325
2093
  enumerable: true,
326
- get: function () { return chunkNBZDIMP3_cjs.FieldSlider; }
2094
+ get: function () { return chunkWHJR5S4L_cjs.FieldSlider; }
327
2095
  });
328
2096
  Object.defineProperty(exports, "FieldSwitch", {
329
2097
  enumerable: true,
330
- get: function () { return chunkNBZDIMP3_cjs.FieldSwitch; }
2098
+ get: function () { return chunkWHJR5S4L_cjs.FieldSwitch; }
331
2099
  });
332
2100
  Object.defineProperty(exports, "FieldText", {
333
2101
  enumerable: true,
334
- get: function () { return chunkNBZDIMP3_cjs.FieldText; }
2102
+ get: function () { return chunkWHJR5S4L_cjs.FieldText; }
335
2103
  });
336
2104
  Object.defineProperty(exports, "FieldTextArea", {
337
2105
  enumerable: true,
338
- get: function () { return chunkNBZDIMP3_cjs.FieldTextArea; }
2106
+ get: function () { return chunkWHJR5S4L_cjs.FieldTextArea; }
339
2107
  });
340
2108
  Object.defineProperty(exports, "HostProvider", {
341
2109
  enumerable: true,
342
- get: function () { return chunkNBZDIMP3_cjs.HostProvider; }
2110
+ get: function () { return chunkWHJR5S4L_cjs.HostProvider; }
343
2111
  });
344
2112
  Object.defineProperty(exports, "PageHeader", {
345
2113
  enumerable: true,
346
- get: function () { return chunkNBZDIMP3_cjs.PageHeader; }
347
- });
348
- Object.defineProperty(exports, "PostAgenda", {
349
- enumerable: true,
350
- get: function () { return chunkNBZDIMP3_cjs.PostAgenda; }
351
- });
352
- Object.defineProperty(exports, "PostCard", {
353
- enumerable: true,
354
- get: function () { return chunkNBZDIMP3_cjs.PostCard; }
355
- });
356
- Object.defineProperty(exports, "PostComposer", {
357
- enumerable: true,
358
- get: function () { return chunkNBZDIMP3_cjs.PostComposer; }
2114
+ get: function () { return chunkWHJR5S4L_cjs.PageHeader; }
359
2115
  });
360
2116
  Object.defineProperty(exports, "PrimaryButton", {
361
2117
  enumerable: true,
362
- get: function () { return chunkNBZDIMP3_cjs.PrimaryButton; }
363
- });
364
- Object.defineProperty(exports, "ProviderReadinessList", {
365
- enumerable: true,
366
- get: function () { return chunkNBZDIMP3_cjs.ProviderReadinessList; }
367
- });
368
- Object.defineProperty(exports, "SLIDEOVER_LG", {
369
- enumerable: true,
370
- get: function () { return chunkNBZDIMP3_cjs.LG; }
371
- });
372
- Object.defineProperty(exports, "SlideOver", {
373
- enumerable: true,
374
- get: function () { return chunkNBZDIMP3_cjs.SlideOver; }
375
- });
376
- Object.defineProperty(exports, "SocialResource", {
377
- enumerable: true,
378
- get: function () { return chunkNBZDIMP3_cjs.SocialResource; }
379
- });
380
- Object.defineProperty(exports, "SocialSummaryBar", {
381
- enumerable: true,
382
- get: function () { return chunkNBZDIMP3_cjs.SocialSummaryBar; }
383
- });
384
- Object.defineProperty(exports, "StatusTag", {
385
- enumerable: true,
386
- get: function () { return chunkNBZDIMP3_cjs.StatusTag; }
387
- });
388
- Object.defineProperty(exports, "ViewToggle", {
389
- enumerable: true,
390
- get: function () { return chunkNBZDIMP3_cjs.ViewToggle; }
2118
+ get: function () { return chunkWHJR5S4L_cjs.PrimaryButton; }
391
2119
  });
392
2120
  Object.defineProperty(exports, "accentFor", {
393
2121
  enumerable: true,
394
- get: function () { return chunkNBZDIMP3_cjs.accentFor; }
395
- });
396
- Object.defineProperty(exports, "asColor", {
397
- enumerable: true,
398
- get: function () { return chunkNBZDIMP3_cjs.asColor; }
2122
+ get: function () { return chunkWHJR5S4L_cjs.accentFor; }
399
2123
  });
400
2124
  Object.defineProperty(exports, "classifyBackend", {
401
2125
  enumerable: true,
402
- get: function () { return chunkNBZDIMP3_cjs.classifyBackend; }
2126
+ get: function () { return chunkWHJR5S4L_cjs.classifyBackend; }
403
2127
  });
404
2128
  Object.defineProperty(exports, "classifyRead", {
405
2129
  enumerable: true,
406
- get: function () { return chunkNBZDIMP3_cjs.classifyRead; }
2130
+ get: function () { return chunkWHJR5S4L_cjs.classifyRead; }
407
2131
  });
408
2132
  Object.defineProperty(exports, "contrastText", {
409
2133
  enumerable: true,
410
- get: function () { return chunkNBZDIMP3_cjs.contrastText; }
411
- });
412
- Object.defineProperty(exports, "formatPostTime", {
413
- enumerable: true,
414
- get: function () { return chunkNBZDIMP3_cjs.formatPostTime; }
2134
+ get: function () { return chunkWHJR5S4L_cjs.contrastText; }
415
2135
  });
416
2136
  Object.defineProperty(exports, "isHexColor", {
417
2137
  enumerable: true,
418
- get: function () { return chunkNBZDIMP3_cjs.isHexColor; }
419
- });
420
- Object.defineProperty(exports, "parsePostTime", {
421
- enumerable: true,
422
- get: function () { return chunkNBZDIMP3_cjs.parsePostTime; }
423
- });
424
- Object.defineProperty(exports, "postDayBucket", {
425
- enumerable: true,
426
- get: function () { return chunkNBZDIMP3_cjs.postDayBucket; }
427
- });
428
- Object.defineProperty(exports, "postPreview", {
429
- enumerable: true,
430
- get: function () { return chunkNBZDIMP3_cjs.postPreview; }
2138
+ get: function () { return chunkWHJR5S4L_cjs.isHexColor; }
431
2139
  });
432
2140
  Object.defineProperty(exports, "resolveAccent", {
433
2141
  enumerable: true,
434
- get: function () { return chunkNBZDIMP3_cjs.resolveAccent; }
2142
+ get: function () { return chunkWHJR5S4L_cjs.resolveAccent; }
435
2143
  });
436
2144
  Object.defineProperty(exports, "setOrgAccent", {
437
2145
  enumerable: true,
438
- get: function () { return chunkNBZDIMP3_cjs.setOrgAccent; }
2146
+ get: function () { return chunkWHJR5S4L_cjs.setOrgAccent; }
439
2147
  });
440
2148
  Object.defineProperty(exports, "useAccent", {
441
2149
  enumerable: true,
442
- get: function () { return chunkNBZDIMP3_cjs.useAccent; }
2150
+ get: function () { return chunkWHJR5S4L_cjs.useAccent; }
443
2151
  });
444
2152
  Object.defineProperty(exports, "useHost", {
445
2153
  enumerable: true,
446
- get: function () { return chunkNBZDIMP3_cjs.useHost; }
2154
+ get: function () { return chunkWHJR5S4L_cjs.useHost; }
447
2155
  });
448
2156
  Object.defineProperty(exports, "InstrumentSurface", {
449
2157
  enumerable: true,
@@ -469,49 +2177,66 @@ Object.defineProperty(exports, "useSurface", {
469
2177
  enumerable: true,
470
2178
  get: function () { return chunk7XDEUEWI_cjs.useSurface; }
471
2179
  });
472
- Object.defineProperty(exports, "ACCOUNT_STATUSES", {
473
- enumerable: true,
474
- get: function () { return chunkMWBFAV3D_cjs.ACCOUNT_STATUSES; }
475
- });
476
- Object.defineProperty(exports, "POST_STATUSES", {
477
- enumerable: true,
478
- get: function () { return chunkMWBFAV3D_cjs.POST_STATUSES; }
479
- });
480
- Object.defineProperty(exports, "PROVIDERS", {
481
- enumerable: true,
482
- get: function () { return chunkMWBFAV3D_cjs.PROVIDERS; }
483
- });
484
- Object.defineProperty(exports, "createSocialApi", {
485
- enumerable: true,
486
- get: function () { return chunkMWBFAV3D_cjs.createSocialApi; }
487
- });
488
- Object.defineProperty(exports, "normalizeAccount", {
489
- enumerable: true,
490
- get: function () { return chunkMWBFAV3D_cjs.normalizeAccount; }
491
- });
492
- Object.defineProperty(exports, "normalizeAccounts", {
493
- enumerable: true,
494
- get: function () { return chunkMWBFAV3D_cjs.normalizeAccounts; }
495
- });
496
- Object.defineProperty(exports, "normalizePost", {
497
- enumerable: true,
498
- get: function () { return chunkMWBFAV3D_cjs.normalizePost; }
499
- });
500
- Object.defineProperty(exports, "normalizePosts", {
501
- enumerable: true,
502
- get: function () { return chunkMWBFAV3D_cjs.normalizePosts; }
503
- });
504
- Object.defineProperty(exports, "normalizeProviderCapability", {
505
- enumerable: true,
506
- get: function () { return chunkMWBFAV3D_cjs.normalizeProviderCapability; }
507
- });
508
- Object.defineProperty(exports, "normalizeProviders", {
509
- enumerable: true,
510
- get: function () { return chunkMWBFAV3D_cjs.normalizeProviders; }
511
- });
512
- Object.defineProperty(exports, "normalizeSummary", {
2180
+ Object.defineProperty(exports, "CustomModelMark", {
513
2181
  enumerable: true,
514
- get: function () { return chunkMWBFAV3D_cjs.normalizeSummary; }
515
- });
2182
+ get: function () { return lucideIcons2.Boxes; }
2183
+ });
2184
+ exports.AnimatedLogo = AnimatedLogo;
2185
+ exports.AppHeader = AppHeader;
2186
+ exports.BRANDS = BRANDS;
2187
+ exports.BarChart = BarChart;
2188
+ exports.BarRows = BarRows;
2189
+ exports.BrandMark = BrandMark;
2190
+ exports.CHART_OTHER = CHART_OTHER;
2191
+ exports.CHART_PALETTE = CHART_PALETTE;
2192
+ exports.ComboBox = ComboBox;
2193
+ exports.CommerceResource = CommerceResource;
2194
+ exports.ConfirmDelete = ConfirmDelete;
2195
+ exports.ContextMenu = ContextMenu;
2196
+ exports.Donut = Donut;
2197
+ exports.DonutRing = Donut2;
2198
+ exports.FadeIn = FadeIn;
2199
+ exports.GenericLogo = GenericLogo;
2200
+ exports.HANZO = HANZO;
2201
+ exports.HANZO_MARK_CONTENT = HANZO_MARK_CONTENT;
2202
+ exports.HanzoMark = HanzoMark;
2203
+ exports.HintButton = HintButton;
2204
+ exports.LUX = LUX;
2205
+ exports.LegendDot = LegendDot;
2206
+ exports.LineChart = LineChart;
2207
+ exports.MetricCard = MetricCard;
2208
+ exports.MetricSparkline = Sparkline2;
2209
+ exports.MiniBars = MiniBars;
2210
+ exports.OrgMark = OrgMark;
2211
+ exports.OrgSwitcher = OrgSwitcher;
2212
+ exports.PARS = PARS;
2213
+ exports.Panel = Panel;
2214
+ exports.ProductIcon = ProductIcon;
2215
+ exports.ProviderLogo = ProviderLogo;
2216
+ exports.Reorder = Reorder;
2217
+ exports.SERIES = SERIES;
2218
+ exports.SURFACES = SURFACES;
2219
+ exports.SearchInput = SearchInput;
2220
+ exports.Segmented = Segmented;
2221
+ exports.SiteFooter = SiteFooter;
2222
+ exports.SiteNav = SiteNav;
2223
+ exports.Sparkline = Sparkline;
2224
+ exports.ToastProvider = ToastProvider;
2225
+ exports.UtilBar = UtilBar;
2226
+ exports.ZOO = ZOO;
2227
+ exports.colorForIndex = colorForIndex;
2228
+ exports.filterOptions = filterOptions;
2229
+ exports.filterOrgs = filterOrgs;
2230
+ exports.isKnownOption = isKnownOption;
2231
+ exports.monogram = monogram;
2232
+ exports.orgScope = orgScope;
2233
+ exports.otherSurfaces = otherSurfaces;
2234
+ exports.providerInitials = providerInitials;
2235
+ exports.resolveBrand = resolveBrand;
2236
+ exports.rowShift = rowShift;
2237
+ exports.targetIndex = targetIndex;
2238
+ exports.useContainerWidth = useContainerWidth;
2239
+ exports.useToast = useToast;
2240
+ exports.utilColor = utilColor;
516
2241
  //# sourceMappingURL=index.cjs.map
517
2242
  //# sourceMappingURL=index.cjs.map