orcal-ui 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-components-main.js +1922 -0
- package/dist/orcal-ui-aa9b729a.js +38 -0
- package/dist/orcal-ui-d01fded2.js +38 -0
- package/dist/orcal-ui.js +6 -6
- package/package.json +3 -2
|
@@ -0,0 +1,1922 @@
|
|
|
1
|
+
|
|
2
|
+
(function(l, r) { if (!l || l.getElementById('hot-reloader')) return; r = l.createElement('script'); r.async = 1; r.src = 'http://localhost:35729/livereload.js?snipver=1'; r.id = 'hot-reloader'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
|
3
|
+
function _arrayLikeToArray(r, a) {
|
|
4
|
+
(null == a || a > r.length) && (a = r.length);
|
|
5
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
6
|
+
return n;
|
|
7
|
+
}
|
|
8
|
+
function _arrayWithHoles(r) {
|
|
9
|
+
if (Array.isArray(r)) return r;
|
|
10
|
+
}
|
|
11
|
+
function _arrayWithoutHoles(r) {
|
|
12
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
13
|
+
}
|
|
14
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
15
|
+
try {
|
|
16
|
+
var i = n[a](c),
|
|
17
|
+
u = i.value;
|
|
18
|
+
} catch (n) {
|
|
19
|
+
return void e(n);
|
|
20
|
+
}
|
|
21
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
22
|
+
}
|
|
23
|
+
function _asyncToGenerator(n) {
|
|
24
|
+
return function () {
|
|
25
|
+
var t = this,
|
|
26
|
+
e = arguments;
|
|
27
|
+
return new Promise(function (r, o) {
|
|
28
|
+
var a = n.apply(t, e);
|
|
29
|
+
function _next(n) {
|
|
30
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
31
|
+
}
|
|
32
|
+
function _throw(n) {
|
|
33
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
34
|
+
}
|
|
35
|
+
_next(void 0);
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function _defineProperty(e, r, t) {
|
|
40
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
41
|
+
value: t,
|
|
42
|
+
enumerable: !0,
|
|
43
|
+
configurable: !0,
|
|
44
|
+
writable: !0
|
|
45
|
+
}) : e[r] = t, e;
|
|
46
|
+
}
|
|
47
|
+
function _iterableToArray(r) {
|
|
48
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
49
|
+
}
|
|
50
|
+
function _iterableToArrayLimit(r, l) {
|
|
51
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
52
|
+
if (null != t) {
|
|
53
|
+
var e,
|
|
54
|
+
n,
|
|
55
|
+
i,
|
|
56
|
+
u,
|
|
57
|
+
a = [],
|
|
58
|
+
f = !0,
|
|
59
|
+
o = !1;
|
|
60
|
+
try {
|
|
61
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
62
|
+
if (Object(t) !== t) return;
|
|
63
|
+
f = !1;
|
|
64
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
65
|
+
} catch (r) {
|
|
66
|
+
o = !0, n = r;
|
|
67
|
+
} finally {
|
|
68
|
+
try {
|
|
69
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
70
|
+
} finally {
|
|
71
|
+
if (o) throw n;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return a;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function _nonIterableRest() {
|
|
78
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
79
|
+
}
|
|
80
|
+
function _nonIterableSpread() {
|
|
81
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
82
|
+
}
|
|
83
|
+
function ownKeys(e, r) {
|
|
84
|
+
var t = Object.keys(e);
|
|
85
|
+
if (Object.getOwnPropertySymbols) {
|
|
86
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
87
|
+
r && (o = o.filter(function (r) {
|
|
88
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
89
|
+
})), t.push.apply(t, o);
|
|
90
|
+
}
|
|
91
|
+
return t;
|
|
92
|
+
}
|
|
93
|
+
function _objectSpread2(e) {
|
|
94
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
95
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
96
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
97
|
+
_defineProperty(e, r, t[r]);
|
|
98
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
99
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return e;
|
|
103
|
+
}
|
|
104
|
+
function _regenerator() {
|
|
105
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
106
|
+
var e,
|
|
107
|
+
t,
|
|
108
|
+
r = "function" == typeof Symbol ? Symbol : {},
|
|
109
|
+
n = r.iterator || "@@iterator",
|
|
110
|
+
o = r.toStringTag || "@@toStringTag";
|
|
111
|
+
function i(r, n, o, i) {
|
|
112
|
+
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
113
|
+
u = Object.create(c.prototype);
|
|
114
|
+
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
115
|
+
var i,
|
|
116
|
+
c,
|
|
117
|
+
u,
|
|
118
|
+
f = 0,
|
|
119
|
+
p = o || [],
|
|
120
|
+
y = !1,
|
|
121
|
+
G = {
|
|
122
|
+
p: 0,
|
|
123
|
+
n: 0,
|
|
124
|
+
v: e,
|
|
125
|
+
a: d,
|
|
126
|
+
f: d.bind(e, 4),
|
|
127
|
+
d: function (t, r) {
|
|
128
|
+
return i = t, c = 0, u = e, G.n = r, a;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
function d(r, n) {
|
|
132
|
+
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
133
|
+
var o,
|
|
134
|
+
i = p[t],
|
|
135
|
+
d = G.p,
|
|
136
|
+
l = i[2];
|
|
137
|
+
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
|
|
138
|
+
}
|
|
139
|
+
if (o || r > 1) return a;
|
|
140
|
+
throw y = !0, n;
|
|
141
|
+
}
|
|
142
|
+
return function (o, p, l) {
|
|
143
|
+
if (f > 1) throw TypeError("Generator is already running");
|
|
144
|
+
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
|
|
145
|
+
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
|
|
146
|
+
try {
|
|
147
|
+
if (f = 2, i) {
|
|
148
|
+
if (c || (o = "next"), t = i[o]) {
|
|
149
|
+
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
|
|
150
|
+
if (!t.done) return t;
|
|
151
|
+
u = t.value, c < 2 && (c = 0);
|
|
152
|
+
} else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
|
|
153
|
+
i = e;
|
|
154
|
+
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
|
|
155
|
+
} catch (t) {
|
|
156
|
+
i = e, c = 1, u = t;
|
|
157
|
+
} finally {
|
|
158
|
+
f = 1;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
value: t,
|
|
163
|
+
done: y
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
}(r, o, i), !0), u;
|
|
167
|
+
}
|
|
168
|
+
var a = {};
|
|
169
|
+
function Generator() {}
|
|
170
|
+
function GeneratorFunction() {}
|
|
171
|
+
function GeneratorFunctionPrototype() {}
|
|
172
|
+
t = Object.getPrototypeOf;
|
|
173
|
+
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
174
|
+
return this;
|
|
175
|
+
}), t),
|
|
176
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
177
|
+
function f(e) {
|
|
178
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
179
|
+
}
|
|
180
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
|
|
181
|
+
return this;
|
|
182
|
+
}), _regeneratorDefine(u, "toString", function () {
|
|
183
|
+
return "[object Generator]";
|
|
184
|
+
}), (_regenerator = function () {
|
|
185
|
+
return {
|
|
186
|
+
w: i,
|
|
187
|
+
m: f
|
|
188
|
+
};
|
|
189
|
+
})();
|
|
190
|
+
}
|
|
191
|
+
function _regeneratorDefine(e, r, n, t) {
|
|
192
|
+
var i = Object.defineProperty;
|
|
193
|
+
try {
|
|
194
|
+
i({}, "", {});
|
|
195
|
+
} catch (e) {
|
|
196
|
+
i = 0;
|
|
197
|
+
}
|
|
198
|
+
_regeneratorDefine = function (e, r, n, t) {
|
|
199
|
+
function o(r, n) {
|
|
200
|
+
_regeneratorDefine(e, r, function (e) {
|
|
201
|
+
return this._invoke(r, n, e);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
r ? i ? i(e, r, {
|
|
205
|
+
value: n,
|
|
206
|
+
enumerable: !t,
|
|
207
|
+
configurable: !t,
|
|
208
|
+
writable: !t
|
|
209
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
210
|
+
}, _regeneratorDefine(e, r, n, t);
|
|
211
|
+
}
|
|
212
|
+
function _slicedToArray(r, e) {
|
|
213
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
214
|
+
}
|
|
215
|
+
function _toConsumableArray(r) {
|
|
216
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
217
|
+
}
|
|
218
|
+
function _toPrimitive(t, r) {
|
|
219
|
+
if ("object" != typeof t || !t) return t;
|
|
220
|
+
var e = t[Symbol.toPrimitive];
|
|
221
|
+
if (void 0 !== e) {
|
|
222
|
+
var i = e.call(t, r || "default");
|
|
223
|
+
if ("object" != typeof i) return i;
|
|
224
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
225
|
+
}
|
|
226
|
+
return ("string" === r ? String : Number)(t);
|
|
227
|
+
}
|
|
228
|
+
function _toPropertyKey(t) {
|
|
229
|
+
var i = _toPrimitive(t, "string");
|
|
230
|
+
return "symbol" == typeof i ? i : i + "";
|
|
231
|
+
}
|
|
232
|
+
function _unsupportedIterableToArray(r, a) {
|
|
233
|
+
if (r) {
|
|
234
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
235
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
236
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function styleInject(css, ref) {
|
|
241
|
+
if ( ref === void 0 ) ref = {};
|
|
242
|
+
var insertAt = ref.insertAt;
|
|
243
|
+
|
|
244
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
245
|
+
|
|
246
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
247
|
+
var style = document.createElement('style');
|
|
248
|
+
style.type = 'text/css';
|
|
249
|
+
|
|
250
|
+
if (insertAt === 'top') {
|
|
251
|
+
if (head.firstChild) {
|
|
252
|
+
head.insertBefore(style, head.firstChild);
|
|
253
|
+
} else {
|
|
254
|
+
head.appendChild(style);
|
|
255
|
+
}
|
|
256
|
+
} else {
|
|
257
|
+
head.appendChild(style);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (style.styleSheet) {
|
|
261
|
+
style.styleSheet.cssText = css;
|
|
262
|
+
} else {
|
|
263
|
+
style.appendChild(document.createTextNode(css));
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
var css_248z = "/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\",\n \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;\n --color-red-50: oklch(97.1% 0.013 17.38);\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-red-600: oklch(57.7% 0.245 27.325);\n --color-red-700: oklch(50.5% 0.213 27.518);\n --color-amber-50: oklch(98.7% 0.022 95.277);\n --color-amber-600: oklch(66.6% 0.179 58.318);\n --color-green-50: oklch(98.2% 0.018 155.826);\n --color-green-500: oklch(72.3% 0.219 149.579);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-50: oklch(97% 0.014 254.604);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-blue-600: oklch(54.6% 0.245 262.881);\n --color-indigo-50: oklch(96.2% 0.018 272.314);\n --color-indigo-500: oklch(58.5% 0.233 277.117);\n --color-indigo-600: oklch(51.1% 0.262 276.966);\n --color-indigo-700: oklch(45.7% 0.24 277.023);\n --color-slate-50: oklch(98.4% 0.003 247.858);\n --color-slate-100: oklch(96.8% 0.007 247.896);\n --color-slate-200: oklch(92.9% 0.013 255.508);\n --color-slate-300: oklch(86.9% 0.022 252.894);\n --color-slate-400: oklch(70.4% 0.04 256.788);\n --color-slate-500: oklch(55.4% 0.046 257.417);\n --color-slate-600: oklch(44.6% 0.043 257.281);\n --color-slate-700: oklch(37.2% 0.044 257.287);\n --color-slate-800: oklch(27.9% 0.041 260.031);\n --color-slate-900: oklch(20.8% 0.042 265.755);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-base: 1rem;\n --text-base--line-height: calc(1.5 / 1);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --tracking-wider: 0.05em;\n --leading-relaxed: 1.625;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --ease-in: cubic-bezier(0.4, 0, 1, 1);\n --ease-out: cubic-bezier(0, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --blur-sm: 8px;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::-moz-placeholder {\n opacity: 1;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::-moz-placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n ::-webkit-calendar-picker-indicator {\n line-height: 1;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n -webkit-appearance: button;\n -moz-appearance: button;\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-auto {\n pointer-events: auto;\n }\n .pointer-events-none {\n pointer-events: none;\n }\n .visible {\n visibility: visible;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-full {\n top: 100%;\n }\n .bottom-6 {\n bottom: calc(var(--spacing) * 6);\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .z-0 {\n z-index: 0;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .z-30 {\n z-index: 30;\n }\n .z-50 {\n z-index: 50;\n }\n .container {\n width: 100%;\n @media (width >= 40rem) {\n max-width: 40rem;\n }\n @media (width >= 48rem) {\n max-width: 48rem;\n }\n @media (width >= 64rem) {\n max-width: 64rem;\n }\n @media (width >= 80rem) {\n max-width: 80rem;\n }\n @media (width >= 96rem) {\n max-width: 96rem;\n }\n }\n .my-2 {\n margin-block: calc(var(--spacing) * 2);\n }\n .mt-2 {\n margin-top: calc(var(--spacing) * 2);\n }\n .mt-3 {\n margin-top: calc(var(--spacing) * 3);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mt-\\[6px\\] {\n margin-top: 6px;\n }\n .mt-\\[8px\\] {\n margin-top: 8px;\n }\n .mt-\\[18px\\] {\n margin-top: 18px;\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .ml-2 {\n margin-left: calc(var(--spacing) * 2);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .hidden {\n display: none;\n }\n .inline {\n display: inline;\n }\n .table {\n display: table;\n }\n .h-8 {\n height: calc(var(--spacing) * 8);\n }\n .h-\\[8px\\] {\n height: 8px;\n }\n .h-\\[12px\\] {\n height: 12px;\n }\n .h-\\[36px\\] {\n height: 36px;\n }\n .h-full {\n height: 100%;\n }\n .max-h-32 {\n max-height: calc(var(--spacing) * 32);\n }\n .max-h-\\[240px\\] {\n max-height: 240px;\n }\n .min-h-\\[44px\\] {\n min-height: 44px;\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-\\[8px\\] {\n width: 8px;\n }\n .w-\\[12px\\] {\n width: 12px;\n }\n .w-\\[36px\\] {\n width: 36px;\n }\n .w-\\[92\\%\\] {\n width: 92%;\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .max-w-\\[150px\\] {\n max-width: 150px;\n }\n .max-w-\\[420px\\] {\n max-width: 420px;\n }\n .flex-1 {\n flex: 1;\n }\n .flex-shrink {\n flex-shrink: 1;\n }\n .shrink {\n flex-shrink: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-crosshair {\n cursor: crosshair;\n }\n .cursor-pointer {\n cursor: pointer;\n }\n .resize {\n resize: both;\n }\n .resize-none {\n resize: none;\n }\n .list-inside {\n list-style-position: inside;\n }\n .list-decimal {\n list-style-type: decimal;\n }\n .list-disc {\n list-style-type: disc;\n }\n .flex-col {\n flex-direction: column;\n }\n .items-center {\n align-items: center;\n }\n .items-end {\n align-items: flex-end;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-\\[4px\\] {\n gap: 4px;\n }\n .gap-\\[8px\\] {\n gap: 8px;\n }\n .gap-\\[12px\\] {\n gap: 12px;\n }\n .space-y-1 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .overflow-hidden {\n overflow: hidden;\n }\n .overflow-visible {\n overflow: visible;\n }\n .overflow-x-auto {\n overflow-x: auto;\n }\n .overflow-y-auto {\n overflow-y: auto;\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-2xl {\n border-radius: var(--radius-2xl);\n }\n .rounded-\\[6px\\] {\n border-radius: 6px;\n }\n .rounded-\\[8px\\] {\n border-radius: 8px;\n }\n .rounded-\\[12px\\] {\n border-radius: 12px;\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-xl {\n border-radius: var(--radius-xl);\n }\n .rounded-t-\\[12px\\] {\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-0 {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n .border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .border-blue-500 {\n border-color: var(--color-blue-500);\n }\n .border-green-500 {\n border-color: var(--color-green-500);\n }\n .border-slate-200 {\n border-color: var(--color-slate-200);\n }\n .border-slate-300 {\n border-color: var(--color-slate-300);\n }\n .border-slate-400 {\n border-color: var(--color-slate-400);\n }\n .bg-blue-500 {\n background-color: var(--color-blue-500);\n }\n .bg-green-50 {\n background-color: var(--color-green-50);\n }\n .bg-green-500 {\n background-color: var(--color-green-500);\n }\n .bg-indigo-50 {\n background-color: var(--color-indigo-50);\n }\n .bg-indigo-600 {\n background-color: var(--color-indigo-600);\n }\n .bg-red-50 {\n background-color: var(--color-red-50);\n }\n .bg-red-600 {\n background-color: var(--color-red-600);\n }\n .bg-slate-50 {\n background-color: var(--color-slate-50);\n }\n .bg-slate-100 {\n background-color: var(--color-slate-100);\n }\n .bg-slate-200 {\n background-color: var(--color-slate-200);\n }\n .bg-slate-800 {\n background-color: var(--color-slate-800);\n }\n .bg-slate-900 {\n background-color: var(--color-slate-900);\n }\n .bg-slate-900\\/40 {\n background-color: color-mix(in srgb, oklch(20.8% 0.042 265.755) 40%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-slate-900) 40%, transparent);\n }\n }\n .bg-transparent {\n background-color: transparent;\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-\\[4px\\] {\n padding: 4px;\n }\n .p-\\[6px\\] {\n padding: 6px;\n }\n .p-\\[8px\\] {\n padding: 8px;\n }\n .p-\\[20px\\] {\n padding: 20px;\n }\n .px-1 {\n padding-inline: calc(var(--spacing) * 1);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-\\[12px\\] {\n padding-inline: 12px;\n }\n .px-\\[14px\\] {\n padding-inline: 14px;\n }\n .px-\\[16px\\] {\n padding-inline: 16px;\n }\n .py-0 {\n padding-block: calc(var(--spacing) * 0);\n }\n .py-0\\.5 {\n padding-block: calc(var(--spacing) * 0.5);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .py-\\[8px\\] {\n padding-block: 8px;\n }\n .text-center {\n text-align: center;\n }\n .text-left {\n text-align: left;\n }\n .font-mono {\n font-family: var(--font-mono);\n }\n .font-sans {\n font-family: var(--font-sans);\n }\n .text-base {\n font-size: var(--text-base);\n line-height: var(--tw-leading, var(--text-base--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .text-\\[12px\\] {\n font-size: 12px;\n }\n .text-\\[13px\\] {\n font-size: 13px;\n }\n .text-\\[14px\\] {\n font-size: 14px;\n }\n .text-\\[16px\\] {\n font-size: 16px;\n }\n .text-\\[18px\\] {\n font-size: 18px;\n }\n .leading-relaxed {\n --tw-leading: var(--leading-relaxed);\n line-height: var(--leading-relaxed);\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .tracking-wider {\n --tw-tracking: var(--tracking-wider);\n letter-spacing: var(--tracking-wider);\n }\n .text-amber-600 {\n color: var(--color-amber-600);\n }\n .text-blue-500 {\n color: var(--color-blue-500);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-indigo-600 {\n color: var(--color-indigo-600);\n }\n .text-red-600 {\n color: var(--color-red-600);\n }\n .text-slate-100 {\n color: var(--color-slate-100);\n }\n .text-slate-300 {\n color: var(--color-slate-300);\n }\n .text-slate-400 {\n color: var(--color-slate-400);\n }\n .text-slate-500 {\n color: var(--color-slate-500);\n }\n .text-slate-600 {\n color: var(--color-slate-600);\n }\n .text-slate-700 {\n color: var(--color-slate-700);\n }\n .text-slate-800 {\n color: var(--color-slate-800);\n }\n .text-slate-900 {\n color: var(--color-slate-900);\n }\n .text-white {\n color: var(--color-white);\n }\n .uppercase {\n text-transform: uppercase;\n }\n .italic {\n font-style: italic;\n }\n .underline {\n text-decoration-line: underline;\n }\n .shadow-2xl {\n --tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-sm {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-xl {\n --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .ring-1 {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-green-500 {\n --tw-shadow-color: oklch(72.3% 0.219 149.579);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-shadow-color: color-mix(in oklab, var(--color-green-500) var(--tw-shadow-alpha), transparent);\n }\n }\n .shadow-green-500\\/30 {\n --tw-shadow-color: color-mix(in srgb, oklch(72.3% 0.219 149.579) 30%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-green-500) 30%, transparent) var(--tw-shadow-alpha), transparent);\n }\n }\n .ring-green-500 {\n --tw-ring-color: var(--color-green-500);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .filter {\n filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);\n }\n .backdrop-blur-sm {\n --tw-backdrop-blur: blur(var(--blur-sm));\n backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);\n }\n .backdrop-filter {\n backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);\n }\n .transition {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter, display, content-visibility, overlay, pointer-events;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-shadow {\n transition-property: box-shadow;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-transform {\n transition-property: transform, translate, scale, rotate;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-100 {\n --tw-duration: 100ms;\n transition-duration: 100ms;\n }\n .duration-150 {\n --tw-duration: 150ms;\n transition-duration: 150ms;\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .ease-in {\n --tw-ease: var(--ease-in);\n transition-timing-function: var(--ease-in);\n }\n .ease-out {\n --tw-ease: var(--ease-out);\n transition-timing-function: var(--ease-out);\n }\n .group-hover\\:scale-110 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n --tw-scale-x: 110%;\n --tw-scale-y: 110%;\n --tw-scale-z: 110%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n }\n }\n .group-hover\\:stroke-red-500 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n stroke: var(--color-red-500);\n }\n }\n }\n .group-hover\\:text-slate-600 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n color: var(--color-slate-600);\n }\n }\n }\n .placeholder\\:text-slate-400 {\n &::-moz-placeholder {\n color: var(--color-slate-400);\n }\n &::placeholder {\n color: var(--color-slate-400);\n }\n }\n .first\\:mt-0 {\n &:first-child {\n margin-top: calc(var(--spacing) * 0);\n }\n }\n .last\\:mb-0 {\n &:last-child {\n margin-bottom: calc(var(--spacing) * 0);\n }\n }\n .hover\\:border-blue-600 {\n &:hover {\n @media (hover: hover) {\n border-color: var(--color-blue-600);\n }\n }\n }\n .hover\\:border-indigo-500 {\n &:hover {\n @media (hover: hover) {\n border-color: var(--color-indigo-500);\n }\n }\n }\n .hover\\:bg-amber-50 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-amber-50);\n }\n }\n }\n .hover\\:bg-blue-50 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-blue-50);\n }\n }\n }\n .hover\\:bg-blue-600 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-blue-600);\n }\n }\n }\n .hover\\:bg-green-600 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-green-600);\n }\n }\n }\n .hover\\:bg-indigo-50 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-indigo-50);\n }\n }\n }\n .hover\\:bg-indigo-700 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-indigo-700);\n }\n }\n }\n .hover\\:bg-red-50 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-red-50);\n }\n }\n }\n .hover\\:bg-red-700 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-red-700);\n }\n }\n }\n .hover\\:bg-slate-50 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-slate-50);\n }\n }\n }\n .hover\\:bg-slate-100 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-slate-100);\n }\n }\n }\n .hover\\:bg-slate-700 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-slate-700);\n }\n }\n }\n .hover\\:text-amber-600 {\n &:hover {\n @media (hover: hover) {\n color: var(--color-amber-600);\n }\n }\n }\n .hover\\:text-blue-600 {\n &:hover {\n @media (hover: hover) {\n color: var(--color-blue-600);\n }\n }\n }\n .hover\\:text-red-500 {\n &:hover {\n @media (hover: hover) {\n color: var(--color-red-500);\n }\n }\n }\n .hover\\:text-red-600 {\n &:hover {\n @media (hover: hover) {\n color: var(--color-red-600);\n }\n }\n }\n .hover\\:text-slate-900 {\n &:hover {\n @media (hover: hover) {\n color: var(--color-slate-900);\n }\n }\n }\n .focus\\:ring-0 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .sm\\:block {\n @media (width >= 40rem) {\n display: block;\n }\n }\n .md\\:block {\n @media (width >= 48rem) {\n display: block;\n }\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-leading {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-tracking {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-blur {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-brightness {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-contrast {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-grayscale {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-hue-rotate {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-invert {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-opacity {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-saturate {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-sepia {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-drop-shadow {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-drop-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-drop-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-drop-shadow-size {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-blur {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-brightness {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-contrast {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-grayscale {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-hue-rotate {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-invert {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-opacity {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-saturate {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-sepia {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ease {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-scale-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-tracking: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-blur: initial;\n --tw-brightness: initial;\n --tw-contrast: initial;\n --tw-grayscale: initial;\n --tw-hue-rotate: initial;\n --tw-invert: initial;\n --tw-opacity: initial;\n --tw-saturate: initial;\n --tw-sepia: initial;\n --tw-drop-shadow: initial;\n --tw-drop-shadow-color: initial;\n --tw-drop-shadow-alpha: 100%;\n --tw-drop-shadow-size: initial;\n --tw-backdrop-blur: initial;\n --tw-backdrop-brightness: initial;\n --tw-backdrop-contrast: initial;\n --tw-backdrop-grayscale: initial;\n --tw-backdrop-hue-rotate: initial;\n --tw-backdrop-invert: initial;\n --tw-backdrop-opacity: initial;\n --tw-backdrop-saturate: initial;\n --tw-backdrop-sepia: initial;\n --tw-duration: initial;\n --tw-ease: initial;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\n }\n }\n}\n";
|
|
268
|
+
styleInject(css_248z);
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* @license lucide-react v0.562.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
278
|
+
const toCamelCase = (string) => string.replace(
|
|
279
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
280
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
281
|
+
);
|
|
282
|
+
const toPascalCase = (string) => {
|
|
283
|
+
const camelCase = toCamelCase(string);
|
|
284
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
285
|
+
};
|
|
286
|
+
const mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
287
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
288
|
+
}).join(" ").trim();
|
|
289
|
+
const hasA11yProp = (props) => {
|
|
290
|
+
for (const prop in props) {
|
|
291
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
292
|
+
return true;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* @license lucide-react v0.562.0 - ISC
|
|
299
|
+
*
|
|
300
|
+
* This source code is licensed under the ISC license.
|
|
301
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
302
|
+
*/
|
|
303
|
+
|
|
304
|
+
var defaultAttributes = {
|
|
305
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
306
|
+
width: 24,
|
|
307
|
+
height: 24,
|
|
308
|
+
viewBox: "0 0 24 24",
|
|
309
|
+
fill: "none",
|
|
310
|
+
stroke: "currentColor",
|
|
311
|
+
strokeWidth: 2,
|
|
312
|
+
strokeLinecap: "round",
|
|
313
|
+
strokeLinejoin: "round"
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @license lucide-react v0.562.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/
|
|
322
|
+
|
|
323
|
+
const Icon = React.forwardRef(
|
|
324
|
+
({
|
|
325
|
+
color = "currentColor",
|
|
326
|
+
size = 24,
|
|
327
|
+
strokeWidth = 2,
|
|
328
|
+
absoluteStrokeWidth,
|
|
329
|
+
className = "",
|
|
330
|
+
children,
|
|
331
|
+
iconNode,
|
|
332
|
+
...rest
|
|
333
|
+
}, ref) => React.createElement(
|
|
334
|
+
"svg",
|
|
335
|
+
{
|
|
336
|
+
ref,
|
|
337
|
+
...defaultAttributes,
|
|
338
|
+
width: size,
|
|
339
|
+
height: size,
|
|
340
|
+
stroke: color,
|
|
341
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
342
|
+
className: mergeClasses("lucide", className),
|
|
343
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
344
|
+
...rest
|
|
345
|
+
},
|
|
346
|
+
[
|
|
347
|
+
...iconNode.map(([tag, attrs]) => React.createElement(tag, attrs)),
|
|
348
|
+
...Array.isArray(children) ? children : [children]
|
|
349
|
+
]
|
|
350
|
+
)
|
|
351
|
+
);
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* @license lucide-react v0.562.0 - ISC
|
|
355
|
+
*
|
|
356
|
+
* This source code is licensed under the ISC license.
|
|
357
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
358
|
+
*/
|
|
359
|
+
|
|
360
|
+
const createLucideIcon = (iconName, iconNode) => {
|
|
361
|
+
const Component = React.forwardRef(
|
|
362
|
+
({ className, ...props }, ref) => React.createElement(Icon, {
|
|
363
|
+
ref,
|
|
364
|
+
iconNode,
|
|
365
|
+
className: mergeClasses(
|
|
366
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
367
|
+
`lucide-${iconName}`,
|
|
368
|
+
className
|
|
369
|
+
),
|
|
370
|
+
...props
|
|
371
|
+
})
|
|
372
|
+
);
|
|
373
|
+
Component.displayName = toPascalCase(iconName);
|
|
374
|
+
return Component;
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* @license lucide-react v0.562.0 - ISC
|
|
379
|
+
*
|
|
380
|
+
* This source code is licensed under the ISC license.
|
|
381
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
382
|
+
*/
|
|
383
|
+
|
|
384
|
+
const __iconNode$f = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
385
|
+
const Check = createLucideIcon("check", __iconNode$f);
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* @license lucide-react v0.562.0 - ISC
|
|
389
|
+
*
|
|
390
|
+
* This source code is licensed under the ISC license.
|
|
391
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
392
|
+
*/
|
|
393
|
+
|
|
394
|
+
const __iconNode$e = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
395
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$e);
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* @license lucide-react v0.562.0 - ISC
|
|
399
|
+
*
|
|
400
|
+
* This source code is licensed under the ISC license.
|
|
401
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
402
|
+
*/
|
|
403
|
+
|
|
404
|
+
const __iconNode$d = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
405
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$d);
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* @license lucide-react v0.562.0 - ISC
|
|
409
|
+
*
|
|
410
|
+
* This source code is licensed under the ISC license.
|
|
411
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
412
|
+
*/
|
|
413
|
+
|
|
414
|
+
const __iconNode$c = [
|
|
415
|
+
[
|
|
416
|
+
"path",
|
|
417
|
+
{
|
|
418
|
+
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
419
|
+
key: "1nclc0"
|
|
420
|
+
}
|
|
421
|
+
],
|
|
422
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
423
|
+
];
|
|
424
|
+
const Eye = createLucideIcon("eye", __iconNode$c);
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* @license lucide-react v0.562.0 - ISC
|
|
428
|
+
*
|
|
429
|
+
* This source code is licensed under the ISC license.
|
|
430
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
431
|
+
*/
|
|
432
|
+
|
|
433
|
+
const __iconNode$b = [
|
|
434
|
+
["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
|
|
435
|
+
[
|
|
436
|
+
"path",
|
|
437
|
+
{
|
|
438
|
+
d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",
|
|
439
|
+
key: "r6nss1"
|
|
440
|
+
}
|
|
441
|
+
]
|
|
442
|
+
];
|
|
443
|
+
const House = createLucideIcon("house", __iconNode$b);
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* @license lucide-react v0.562.0 - ISC
|
|
447
|
+
*
|
|
448
|
+
* This source code is licensed under the ISC license.
|
|
449
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
450
|
+
*/
|
|
451
|
+
|
|
452
|
+
const __iconNode$a = [
|
|
453
|
+
[
|
|
454
|
+
"path",
|
|
455
|
+
{
|
|
456
|
+
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
457
|
+
key: "1a8usu"
|
|
458
|
+
}
|
|
459
|
+
],
|
|
460
|
+
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
461
|
+
];
|
|
462
|
+
const Pencil = createLucideIcon("pencil", __iconNode$a);
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* @license lucide-react v0.562.0 - ISC
|
|
466
|
+
*
|
|
467
|
+
* This source code is licensed under the ISC license.
|
|
468
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
469
|
+
*/
|
|
470
|
+
|
|
471
|
+
const __iconNode$9 = [
|
|
472
|
+
[
|
|
473
|
+
"path",
|
|
474
|
+
{
|
|
475
|
+
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
476
|
+
key: "10ikf1"
|
|
477
|
+
}
|
|
478
|
+
]
|
|
479
|
+
];
|
|
480
|
+
const Play = createLucideIcon("play", __iconNode$9);
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* @license lucide-react v0.562.0 - ISC
|
|
484
|
+
*
|
|
485
|
+
* This source code is licensed under the ISC license.
|
|
486
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
487
|
+
*/
|
|
488
|
+
|
|
489
|
+
const __iconNode$8 = [
|
|
490
|
+
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
491
|
+
["path", { d: "M12 5v14", key: "s699le" }]
|
|
492
|
+
];
|
|
493
|
+
const Plus = createLucideIcon("plus", __iconNode$8);
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* @license lucide-react v0.562.0 - ISC
|
|
497
|
+
*
|
|
498
|
+
* This source code is licensed under the ISC license.
|
|
499
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
500
|
+
*/
|
|
501
|
+
|
|
502
|
+
const __iconNode$7 = [
|
|
503
|
+
[
|
|
504
|
+
"path",
|
|
505
|
+
{
|
|
506
|
+
d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
|
|
507
|
+
key: "1c8476"
|
|
508
|
+
}
|
|
509
|
+
],
|
|
510
|
+
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
511
|
+
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
512
|
+
];
|
|
513
|
+
const Save = createLucideIcon("save", __iconNode$7);
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* @license lucide-react v0.562.0 - ISC
|
|
517
|
+
*
|
|
518
|
+
* This source code is licensed under the ISC license.
|
|
519
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
520
|
+
*/
|
|
521
|
+
|
|
522
|
+
const __iconNode$6 = [
|
|
523
|
+
[
|
|
524
|
+
"path",
|
|
525
|
+
{
|
|
526
|
+
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
|
|
527
|
+
key: "1ffxy3"
|
|
528
|
+
}
|
|
529
|
+
],
|
|
530
|
+
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
531
|
+
];
|
|
532
|
+
const Send = createLucideIcon("send", __iconNode$6);
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* @license lucide-react v0.562.0 - ISC
|
|
536
|
+
*
|
|
537
|
+
* This source code is licensed under the ISC license.
|
|
538
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
539
|
+
*/
|
|
540
|
+
|
|
541
|
+
const __iconNode$5 = [
|
|
542
|
+
[
|
|
543
|
+
"path",
|
|
544
|
+
{
|
|
545
|
+
d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
|
|
546
|
+
key: "1i5ecw"
|
|
547
|
+
}
|
|
548
|
+
],
|
|
549
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
550
|
+
];
|
|
551
|
+
const Settings = createLucideIcon("settings", __iconNode$5);
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* @license lucide-react v0.562.0 - ISC
|
|
555
|
+
*
|
|
556
|
+
* This source code is licensed under the ISC license.
|
|
557
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
558
|
+
*/
|
|
559
|
+
|
|
560
|
+
const __iconNode$4 = [
|
|
561
|
+
["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
|
|
562
|
+
[
|
|
563
|
+
"path",
|
|
564
|
+
{
|
|
565
|
+
d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",
|
|
566
|
+
key: "ohrbg2"
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
];
|
|
570
|
+
const SquarePen = createLucideIcon("square-pen", __iconNode$4);
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* @license lucide-react v0.562.0 - ISC
|
|
574
|
+
*
|
|
575
|
+
* This source code is licensed under the ISC license.
|
|
576
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
577
|
+
*/
|
|
578
|
+
|
|
579
|
+
const __iconNode$3 = [
|
|
580
|
+
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
581
|
+
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
582
|
+
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
583
|
+
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
584
|
+
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
585
|
+
];
|
|
586
|
+
const Trash2 = createLucideIcon("trash-2", __iconNode$3);
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* @license lucide-react v0.562.0 - ISC
|
|
590
|
+
*
|
|
591
|
+
* This source code is licensed under the ISC license.
|
|
592
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
593
|
+
*/
|
|
594
|
+
|
|
595
|
+
const __iconNode$2 = [
|
|
596
|
+
[
|
|
597
|
+
"path",
|
|
598
|
+
{
|
|
599
|
+
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
600
|
+
key: "wmoenq"
|
|
601
|
+
}
|
|
602
|
+
],
|
|
603
|
+
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
604
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
605
|
+
];
|
|
606
|
+
const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$2);
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* @license lucide-react v0.562.0 - ISC
|
|
610
|
+
*
|
|
611
|
+
* This source code is licensed under the ISC license.
|
|
612
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
613
|
+
*/
|
|
614
|
+
|
|
615
|
+
const __iconNode$1 = [
|
|
616
|
+
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
617
|
+
["path", { d: "M16 3.128a4 4 0 0 1 0 7.744", key: "16gr8j" }],
|
|
618
|
+
["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
|
|
619
|
+
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
|
|
620
|
+
];
|
|
621
|
+
const Users = createLucideIcon("users", __iconNode$1);
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* @license lucide-react v0.562.0 - ISC
|
|
625
|
+
*
|
|
626
|
+
* This source code is licensed under the ISC license.
|
|
627
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
628
|
+
*/
|
|
629
|
+
|
|
630
|
+
const __iconNode = [
|
|
631
|
+
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
632
|
+
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
633
|
+
];
|
|
634
|
+
const X = createLucideIcon("x", __iconNode);
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* MOCK DATA
|
|
638
|
+
* The hierarchical structure for Agents.
|
|
639
|
+
*/
|
|
640
|
+
var AGENT_TREE = {
|
|
641
|
+
Shared: {
|
|
642
|
+
"Content Creation": ["Blog Writer", "Tweet Generator", "SEO Optimizer"],
|
|
643
|
+
"Data Analysis": ["Market Trends", "Sentiment Analyzer", "Chart Builder"],
|
|
644
|
+
"Utility": ["Translator", "Summarizer"]
|
|
645
|
+
},
|
|
646
|
+
Users: {
|
|
647
|
+
"user_jdoe": ["My Calendar", "Email Sorter"],
|
|
648
|
+
"user_alice": ["Code Reviewer", "Bug Hunter"],
|
|
649
|
+
"team_alpha": ["Sprint Planner", "Jira Sync"]
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* UTILS
|
|
655
|
+
*/
|
|
656
|
+
var generateId = function generateId() {
|
|
657
|
+
return Math.random().toString(36).substr(2, 9);
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
// Simple markdown renderer
|
|
661
|
+
var renderMarkdown = function renderMarkdown(text) {
|
|
662
|
+
if (!text) return null;
|
|
663
|
+
var elements = [];
|
|
664
|
+
|
|
665
|
+
// First, extract code blocks
|
|
666
|
+
var codeBlockRegex = /```(\w+)?\n([\s\S]*?)```/g;
|
|
667
|
+
var codeBlocks = [];
|
|
668
|
+
var codeBlockIdx = 0;
|
|
669
|
+
var processedText = text.replace(codeBlockRegex, function (match, lang, code) {
|
|
670
|
+
var id = "__CODEBLOCK_".concat(codeBlockIdx++, "__");
|
|
671
|
+
codeBlocks.push({
|
|
672
|
+
id: id,
|
|
673
|
+
lang: lang || '',
|
|
674
|
+
code: code.trim()
|
|
675
|
+
});
|
|
676
|
+
return id;
|
|
677
|
+
});
|
|
678
|
+
|
|
679
|
+
// Split by double newlines for paragraphs
|
|
680
|
+
var paragraphs = processedText.split(/\n\n+/);
|
|
681
|
+
paragraphs.forEach(function (para, idx) {
|
|
682
|
+
para = para.trim();
|
|
683
|
+
if (!para) return;
|
|
684
|
+
|
|
685
|
+
// Check if this is a code block placeholder
|
|
686
|
+
if (para.startsWith('__CODEBLOCK_')) {
|
|
687
|
+
var codeId = para.replace(/__CODEBLOCK_|__/g, '');
|
|
688
|
+
var codeBlock = codeBlocks.find(function (cb) {
|
|
689
|
+
return cb.id === "__CODEBLOCK_".concat(codeId, "__");
|
|
690
|
+
});
|
|
691
|
+
if (codeBlock) {
|
|
692
|
+
elements.push(/*#__PURE__*/React.createElement('pre', {
|
|
693
|
+
key: "code-".concat(idx),
|
|
694
|
+
className: 'bg-slate-800 text-slate-100 p-3 rounded text-xs overflow-x-auto my-2'
|
|
695
|
+
}, /*#__PURE__*/React.createElement('code', null, codeBlock.code)));
|
|
696
|
+
}
|
|
697
|
+
return;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
// Headers
|
|
701
|
+
if (para.startsWith('# ')) {
|
|
702
|
+
elements.push(/*#__PURE__*/React.createElement('h1', {
|
|
703
|
+
key: idx,
|
|
704
|
+
className: 'text-xl font-bold mb-2 mt-4 first:mt-0'
|
|
705
|
+
}, para.substring(2)));
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
if (para.startsWith('## ')) {
|
|
709
|
+
elements.push(/*#__PURE__*/React.createElement('h2', {
|
|
710
|
+
key: idx,
|
|
711
|
+
className: 'text-lg font-semibold mb-2 mt-3 first:mt-0'
|
|
712
|
+
}, para.substring(3)));
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
if (para.startsWith('### ')) {
|
|
716
|
+
elements.push(/*#__PURE__*/React.createElement('h3', {
|
|
717
|
+
key: idx,
|
|
718
|
+
className: 'text-base font-semibold mb-1 mt-2 first:mt-0'
|
|
719
|
+
}, para.substring(4)));
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
// Lists
|
|
724
|
+
if (para.match(/^[\*\-\+]\s/)) {
|
|
725
|
+
var items = para.split('\n').filter(function (line) {
|
|
726
|
+
return line.match(/^[\*\-\+]\s/);
|
|
727
|
+
});
|
|
728
|
+
elements.push(/*#__PURE__*/React.createElement('ul', {
|
|
729
|
+
key: idx,
|
|
730
|
+
className: 'list-disc list-inside my-2 space-y-1'
|
|
731
|
+
}, items.map(function (item, itemIdx) {
|
|
732
|
+
return /*#__PURE__*/React.createElement('li', {
|
|
733
|
+
key: itemIdx,
|
|
734
|
+
className: 'ml-2'
|
|
735
|
+
}, renderInlineMarkdown(item.substring(2)));
|
|
736
|
+
})));
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
739
|
+
if (para.match(/^\d+\.\s/)) {
|
|
740
|
+
var _items = para.split('\n').filter(function (line) {
|
|
741
|
+
return line.match(/^\d+\.\s/);
|
|
742
|
+
});
|
|
743
|
+
elements.push(/*#__PURE__*/React.createElement('ol', {
|
|
744
|
+
key: idx,
|
|
745
|
+
className: 'list-decimal list-inside my-2 space-y-1'
|
|
746
|
+
}, _items.map(function (item, itemIdx) {
|
|
747
|
+
return /*#__PURE__*/React.createElement('li', {
|
|
748
|
+
key: itemIdx,
|
|
749
|
+
className: 'ml-2'
|
|
750
|
+
}, renderInlineMarkdown(item.replace(/^\d+\.\s/, '')));
|
|
751
|
+
})));
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
// Regular paragraph with inline formatting
|
|
756
|
+
var codeParts = [];
|
|
757
|
+
var codeIdx = 0;
|
|
758
|
+
var processedPara = para.replace(/`([^`]+)`/g, function (match, code) {
|
|
759
|
+
var id = "code-".concat(idx, "-").concat(codeIdx++);
|
|
760
|
+
codeParts.push(/*#__PURE__*/React.createElement('code', {
|
|
761
|
+
key: id,
|
|
762
|
+
className: 'bg-slate-200 text-slate-800 px-1 py-0.5 rounded text-xs font-mono'
|
|
763
|
+
}, code));
|
|
764
|
+
return "__CODE_".concat(id, "__");
|
|
765
|
+
});
|
|
766
|
+
|
|
767
|
+
// Bold and italic
|
|
768
|
+
processedPara = processedPara.replace(/\*\*\*(.+?)\*\*\*/g, '<strong><em>$1</em></strong>');
|
|
769
|
+
processedPara = processedPara.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>');
|
|
770
|
+
processedPara = processedPara.replace(/\*(.+?)\*/g, '<em>$1</em>');
|
|
771
|
+
var parts = processedPara.split(/(__CODE_\w+__)/);
|
|
772
|
+
var paraElements = parts.map(function (part, partIdx) {
|
|
773
|
+
if (part.startsWith('__CODE_')) {
|
|
774
|
+
var _codeId = part.replace(/__CODE_|__/g, '');
|
|
775
|
+
return codeParts.find(function (c) {
|
|
776
|
+
return c.key === _codeId;
|
|
777
|
+
}) || part;
|
|
778
|
+
}
|
|
779
|
+
return /*#__PURE__*/React.createElement('span', {
|
|
780
|
+
key: partIdx,
|
|
781
|
+
dangerouslySetInnerHTML: {
|
|
782
|
+
__html: part
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
});
|
|
786
|
+
elements.push(/*#__PURE__*/React.createElement('p', {
|
|
787
|
+
key: idx,
|
|
788
|
+
className: 'mb-2 last:mb-0'
|
|
789
|
+
}, paraElements));
|
|
790
|
+
});
|
|
791
|
+
return elements;
|
|
792
|
+
};
|
|
793
|
+
var renderInlineMarkdown = function renderInlineMarkdown(text) {
|
|
794
|
+
if (!text) return null;
|
|
795
|
+
|
|
796
|
+
// Inline code
|
|
797
|
+
var parts = [];
|
|
798
|
+
var codeIdx = 0;
|
|
799
|
+
var processedText = text.replace(/`([^`]+)`/g, function (match, code) {
|
|
800
|
+
var id = "inline-code-".concat(codeIdx++);
|
|
801
|
+
parts.push({
|
|
802
|
+
type: 'code',
|
|
803
|
+
id: id,
|
|
804
|
+
content: code
|
|
805
|
+
});
|
|
806
|
+
return "__CODE_".concat(id, "__");
|
|
807
|
+
});
|
|
808
|
+
|
|
809
|
+
// Bold and italic
|
|
810
|
+
processedText = processedText.replace(/\*\*\*(.+?)\*\*\*/g, '<strong><em>$1</em></strong>');
|
|
811
|
+
processedText = processedText.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>');
|
|
812
|
+
processedText = processedText.replace(/\*(.+?)\*/g, '<em>$1</em>');
|
|
813
|
+
var elements = processedText.split(/(__CODE_\w+__)/).map(function (part, idx) {
|
|
814
|
+
if (part.startsWith('__CODE_')) {
|
|
815
|
+
var codeId = part.replace(/__CODE_|__/g, '');
|
|
816
|
+
var codePart = parts.find(function (p) {
|
|
817
|
+
return p.id === codeId;
|
|
818
|
+
});
|
|
819
|
+
if (codePart) {
|
|
820
|
+
return /*#__PURE__*/React.createElement('code', {
|
|
821
|
+
key: codeId,
|
|
822
|
+
className: 'bg-slate-200 text-slate-800 px-1 py-0.5 rounded text-xs font-mono'
|
|
823
|
+
}, codePart.content);
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
return /*#__PURE__*/React.createElement('span', {
|
|
827
|
+
key: idx,
|
|
828
|
+
dangerouslySetInnerHTML: {
|
|
829
|
+
__html: part
|
|
830
|
+
}
|
|
831
|
+
});
|
|
832
|
+
});
|
|
833
|
+
return elements;
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
// Calculate Bezier curve path
|
|
837
|
+
var getEdgePath = function getEdgePath(sourceX, sourceY, targetX, targetY) {
|
|
838
|
+
var deltaX = Math.abs(targetX - sourceX);
|
|
839
|
+
var controlPointOffset = Math.max(deltaX * 0.5, 50);
|
|
840
|
+
return "M ".concat(sourceX, " ").concat(sourceY, " C ").concat(sourceX + controlPointOffset, " ").concat(sourceY, ", ").concat(targetX - controlPointOffset, " ").concat(targetY, ", ").concat(targetX, " ").concat(targetY);
|
|
841
|
+
};
|
|
842
|
+
|
|
843
|
+
// Check if all nodes are connected (reachable from each other)
|
|
844
|
+
var isGraphConnected = function isGraphConnected(nodes, edges) {
|
|
845
|
+
if (nodes.length === 0) return true;
|
|
846
|
+
if (nodes.length === 1) return true;
|
|
847
|
+
|
|
848
|
+
// Build adjacency list (undirected for connectivity check)
|
|
849
|
+
var adjList = {};
|
|
850
|
+
nodes.forEach(function (node) {
|
|
851
|
+
adjList[node.id] = [];
|
|
852
|
+
});
|
|
853
|
+
edges.forEach(function (edge) {
|
|
854
|
+
adjList[edge.source].push(edge.target);
|
|
855
|
+
adjList[edge.target].push(edge.source); // Make it undirected for connectivity
|
|
856
|
+
});
|
|
857
|
+
|
|
858
|
+
// BFS to check connectivity
|
|
859
|
+
var visited = new Set();
|
|
860
|
+
var queue = [nodes[0].id];
|
|
861
|
+
visited.add(nodes[0].id);
|
|
862
|
+
while (queue.length > 0) {
|
|
863
|
+
var current = queue.shift();
|
|
864
|
+
adjList[current].forEach(function (neighbor) {
|
|
865
|
+
if (!visited.has(neighbor)) {
|
|
866
|
+
visited.add(neighbor);
|
|
867
|
+
queue.push(neighbor);
|
|
868
|
+
}
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
return visited.size === nodes.length;
|
|
872
|
+
};
|
|
873
|
+
|
|
874
|
+
// Find root nodes (nodes with no incoming edges)
|
|
875
|
+
var findRootNodes = function findRootNodes(nodes, edges) {
|
|
876
|
+
var hasIncomingEdge = new Set();
|
|
877
|
+
edges.forEach(function (edge) {
|
|
878
|
+
hasIncomingEdge.add(edge.target);
|
|
879
|
+
});
|
|
880
|
+
return nodes.filter(function (node) {
|
|
881
|
+
return !hasIncomingEdge.has(node.id);
|
|
882
|
+
});
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
// Validate graph: connected and has exactly one root node
|
|
886
|
+
var isGraphValid = function isGraphValid(nodes, edges) {
|
|
887
|
+
if (nodes.length === 0) return true;
|
|
888
|
+
var connected = isGraphConnected(nodes, edges);
|
|
889
|
+
var rootNodes = findRootNodes(nodes, edges);
|
|
890
|
+
return connected && rootNodes.length === 1;
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* COMPONENT: Agent Selector (Dropdown/Modal)
|
|
895
|
+
* Handles the tree navigation logic.
|
|
896
|
+
*/
|
|
897
|
+
var AgentSelector = function AgentSelector(_ref) {
|
|
898
|
+
_ref.value;
|
|
899
|
+
var onChange = _ref.onChange,
|
|
900
|
+
onClose = _ref.onClose,
|
|
901
|
+
agentTree = _ref.agentTree;
|
|
902
|
+
var _useState = React.useState([]),
|
|
903
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
904
|
+
path = _useState2[0],
|
|
905
|
+
setPath = _useState2[1]; // Array of keys selected so far
|
|
906
|
+
|
|
907
|
+
// Current level of the tree based on path
|
|
908
|
+
var currentOptions = agentTree;
|
|
909
|
+
path.forEach(function (key) {
|
|
910
|
+
if (currentOptions[key]) currentOptions = currentOptions[key];
|
|
911
|
+
});
|
|
912
|
+
var isLeaf = Array.isArray(currentOptions);
|
|
913
|
+
var handleSelect = function handleSelect(key) {
|
|
914
|
+
if (isLeaf) {
|
|
915
|
+
// It's an agent selection
|
|
916
|
+
onChange([].concat(_toConsumableArray(path), [key]));
|
|
917
|
+
onClose();
|
|
918
|
+
} else {
|
|
919
|
+
// Go deeper
|
|
920
|
+
setPath([].concat(_toConsumableArray(path), [key]));
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
var goBack = function goBack() {
|
|
924
|
+
setPath(path.slice(0, -1));
|
|
925
|
+
};
|
|
926
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
927
|
+
className: "absolute top-full left-0 mt-[8px] bg-white rounded-[8px] shadow-xl border border-slate-200 z-50 animate-in fade-in zoom-in-95 duration-100",
|
|
928
|
+
style: {
|
|
929
|
+
width: '256px'
|
|
930
|
+
}
|
|
931
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
932
|
+
className: "p-[8px] bg-slate-50 border-b border-slate-200 flex items-center justify-between"
|
|
933
|
+
}, path.length > 0 ? /*#__PURE__*/React.createElement("button", {
|
|
934
|
+
onClick: goBack,
|
|
935
|
+
className: "text-[12px] font-medium text-blue-500 hover:text-blue-600 flex items-center"
|
|
936
|
+
}, "\u2190 Back") : /*#__PURE__*/React.createElement("span", {
|
|
937
|
+
className: "text-[12px] font-semibold text-slate-500 uppercase tracking-wider"
|
|
938
|
+
}, "Select Source"), /*#__PURE__*/React.createElement("button", {
|
|
939
|
+
onClick: onClose,
|
|
940
|
+
className: "text-slate-400 hover:text-red-500"
|
|
941
|
+
}, /*#__PURE__*/React.createElement(X, {
|
|
942
|
+
size: 14
|
|
943
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
944
|
+
className: "max-h-[240px] overflow-y-auto p-[4px] bg-white text-slate-900"
|
|
945
|
+
}, isLeaf ? currentOptions.map(function (agent) {
|
|
946
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
947
|
+
key: agent,
|
|
948
|
+
onClick: function onClick() {
|
|
949
|
+
return handleSelect(agent);
|
|
950
|
+
},
|
|
951
|
+
className: "w-full text-left px-[12px] py-[8px] text-[14px] text-slate-700 hover:bg-blue-50 rounded flex items-center gap-[8px]"
|
|
952
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
953
|
+
className: "w-[8px] h-[8px] rounded-full bg-green-500"
|
|
954
|
+
}), agent);
|
|
955
|
+
}) : Object.keys(currentOptions).map(function (key) {
|
|
956
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
957
|
+
key: key,
|
|
958
|
+
onClick: function onClick() {
|
|
959
|
+
return handleSelect(key);
|
|
960
|
+
},
|
|
961
|
+
className: "w-full text-left px-[12px] py-[8px] text-[14px] text-slate-700 hover:bg-slate-100 rounded flex items-center justify-between group"
|
|
962
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
963
|
+
className: "flex items-center gap-[8px]"
|
|
964
|
+
}, path.length === 0 ? key === 'Shared' ? '🌍' : '🔒' : '📁', /*#__PURE__*/React.createElement("span", null, key)), /*#__PURE__*/React.createElement(ChevronRight, {
|
|
965
|
+
size: 14,
|
|
966
|
+
className: "text-slate-400 group-hover:text-slate-600"
|
|
967
|
+
}));
|
|
968
|
+
}), !isLeaf && Object.keys(currentOptions).length === 0 && /*#__PURE__*/React.createElement("div", {
|
|
969
|
+
className: "p-2 text-slate-400 text-xs text-center italic"
|
|
970
|
+
}, "No items found")));
|
|
971
|
+
};
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* COMPONENT: Speech Bubble
|
|
975
|
+
* Displays markdown content in a speech bubble positioned near the active node
|
|
976
|
+
*/
|
|
977
|
+
var SpeechBubble = function SpeechBubble(_ref2) {
|
|
978
|
+
var activeNode = _ref2.activeNode,
|
|
979
|
+
nodes = _ref2.nodes,
|
|
980
|
+
nodeHeights = _ref2.nodeHeights,
|
|
981
|
+
currentMessage = _ref2.currentMessage;
|
|
982
|
+
_ref2.pan;
|
|
983
|
+
_ref2.containerRef;
|
|
984
|
+
var _useState3 = React.useState('hidden'),
|
|
985
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
986
|
+
animationState = _useState4[0],
|
|
987
|
+
setAnimationState = _useState4[1]; // 'hidden', 'appearing', 'visible', 'disappearing'
|
|
988
|
+
var _useState5 = React.useState(null),
|
|
989
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
990
|
+
displayMessage = _useState6[0],
|
|
991
|
+
setDisplayMessage = _useState6[1];
|
|
992
|
+
var prevMessageRef = React.useRef(null);
|
|
993
|
+
var bubbleRef = React.useRef(null);
|
|
994
|
+
|
|
995
|
+
// Find the active node
|
|
996
|
+
var activeNodeData = nodes.find(function (node) {
|
|
997
|
+
return activeNode === node.data.agentPath.join('/');
|
|
998
|
+
});
|
|
999
|
+
React.useEffect(function () {
|
|
1000
|
+
var prevMessage = prevMessageRef.current;
|
|
1001
|
+
var hasMessage = !!currentMessage;
|
|
1002
|
+
var hadMessage = !!prevMessage;
|
|
1003
|
+
if (!hasMessage && !hadMessage) {
|
|
1004
|
+
// No message before or after
|
|
1005
|
+
setAnimationState('hidden');
|
|
1006
|
+
setDisplayMessage(null);
|
|
1007
|
+
} else if (!hasMessage && hadMessage) {
|
|
1008
|
+
// Message disappeared - animate out
|
|
1009
|
+
setAnimationState('disappearing');
|
|
1010
|
+
// Force animation to start by triggering reflow
|
|
1011
|
+
requestAnimationFrame(function () {
|
|
1012
|
+
if (bubbleRef.current) {
|
|
1013
|
+
bubbleRef.current.offsetHeight; // Force reflow
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
1016
|
+
// After animation completes, hide
|
|
1017
|
+
setTimeout(function () {
|
|
1018
|
+
setAnimationState('hidden');
|
|
1019
|
+
setDisplayMessage(null);
|
|
1020
|
+
}, 300); // Match animation duration
|
|
1021
|
+
} else if (hasMessage && !hadMessage) {
|
|
1022
|
+
// Message appeared - animate in
|
|
1023
|
+
setDisplayMessage(currentMessage);
|
|
1024
|
+
setAnimationState('appearing');
|
|
1025
|
+
// After animation completes, set to visible
|
|
1026
|
+
setTimeout(function () {
|
|
1027
|
+
setAnimationState('visible');
|
|
1028
|
+
}, 400); // Match animation duration
|
|
1029
|
+
} else if (hasMessage && hadMessage && prevMessage !== currentMessage) {
|
|
1030
|
+
// Message replaced - no animation, just update
|
|
1031
|
+
setDisplayMessage(currentMessage);
|
|
1032
|
+
setAnimationState('visible');
|
|
1033
|
+
} else if (hasMessage && hadMessage && prevMessage === currentMessage) {
|
|
1034
|
+
// Same message - keep visible
|
|
1035
|
+
setDisplayMessage(currentMessage);
|
|
1036
|
+
if (animationState === 'hidden') {
|
|
1037
|
+
setAnimationState('visible');
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
prevMessageRef.current = currentMessage;
|
|
1041
|
+
}, [currentMessage, activeNode]);
|
|
1042
|
+
if (!activeNode || !displayMessage || animationState === 'hidden') return null;
|
|
1043
|
+
if (!activeNodeData) return null;
|
|
1044
|
+
var nodeHeight = nodeHeights[activeNodeData.id] || 88;
|
|
1045
|
+
var bubbleWidth = 640; // Doubled from 320
|
|
1046
|
+
var bubbleHeight = 280;
|
|
1047
|
+
var nodeWidth = 256; // Node width is 256px
|
|
1048
|
+
|
|
1049
|
+
// Position bubble below the active node, aligned with left edge
|
|
1050
|
+
var bubbleX = activeNodeData.x; // Align left edges
|
|
1051
|
+
var bubbleY = activeNodeData.y + nodeHeight + 20; // Below node with gap
|
|
1052
|
+
|
|
1053
|
+
// Triangle position: middle of node (128px from node's left edge, which is bubble's left edge)
|
|
1054
|
+
var triangleLeft = nodeWidth / 2; // 128px - middle of node
|
|
1055
|
+
|
|
1056
|
+
// Calculate scale origin from node center (for shrink animation)
|
|
1057
|
+
var nodeCenterX = activeNodeData.x + nodeWidth / 2;
|
|
1058
|
+
var nodeCenterY = activeNodeData.y + nodeHeight / 2;
|
|
1059
|
+
// Transform origin relative to the bubble element (0-100%)
|
|
1060
|
+
var originX = (nodeCenterX - bubbleX) / bubbleWidth * 100;
|
|
1061
|
+
var originY = (nodeCenterY - bubbleY) / bubbleHeight * 100;
|
|
1062
|
+
|
|
1063
|
+
// Get animation style based on state
|
|
1064
|
+
var animationStyle = {};
|
|
1065
|
+
var baseTransform = "translate(".concat(bubbleX, "px, ").concat(bubbleY, "px)");
|
|
1066
|
+
if (animationState === 'appearing') {
|
|
1067
|
+
animationStyle = {
|
|
1068
|
+
animation: "popOut-".concat(bubbleX, "-").concat(bubbleY, " 0.4s ease-out forwards")
|
|
1069
|
+
};
|
|
1070
|
+
} else if (animationState === 'disappearing') {
|
|
1071
|
+
animationStyle = {
|
|
1072
|
+
animation: "shrinkIn-".concat(bubbleX, "-").concat(bubbleY, "-").concat(nodeCenterX, "-").concat(nodeCenterY, " 0.3s ease-in forwards")
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("style", null, "\n @keyframes popOut-".concat(bubbleX, "-").concat(bubbleY, " {\n 0% {\n transform: translate(").concat(bubbleX, "px, ").concat(bubbleY, "px) scale(0.3);\n opacity: 0;\n }\n 80% {\n transform: translate(").concat(bubbleX, "px, ").concat(bubbleY, "px) scale(1.05);\n opacity: 1;\n }\n 100% {\n transform: translate(").concat(bubbleX, "px, ").concat(bubbleY, "px) scale(1);\n opacity: 1;\n }\n }\n @keyframes shrinkIn-").concat(bubbleX, "-").concat(bubbleY, "-").concat(nodeCenterX, "-").concat(nodeCenterY, " {\n from {\n transform: translate(").concat(bubbleX, "px, ").concat(bubbleY, "px) scale(1);\n opacity: 1;\n }\n to {\n transform: translate(").concat(nodeCenterX, "px, ").concat(nodeCenterY, "px) scale(0);\n opacity: 0;\n }\n }\n ")), /*#__PURE__*/React.createElement("div", {
|
|
1076
|
+
ref: bubbleRef,
|
|
1077
|
+
className: "absolute pointer-events-auto z-20",
|
|
1078
|
+
style: _objectSpread2(_objectSpread2({}, animationState === 'visible' && !animationStyle.animation ? {
|
|
1079
|
+
transform: baseTransform
|
|
1080
|
+
} : {}), {}, {
|
|
1081
|
+
transformOrigin: "".concat(originX, "% ").concat(originY, "%"),
|
|
1082
|
+
width: "".concat(bubbleWidth, "px"),
|
|
1083
|
+
maxHeight: "".concat(bubbleHeight, "px")
|
|
1084
|
+
}, animationStyle)
|
|
1085
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1086
|
+
className: "absolute z-10",
|
|
1087
|
+
style: {
|
|
1088
|
+
left: "".concat(triangleLeft, "px"),
|
|
1089
|
+
transform: 'translateX(-50%)',
|
|
1090
|
+
top: '-12px',
|
|
1091
|
+
width: 0,
|
|
1092
|
+
height: 0,
|
|
1093
|
+
borderLeft: '12px solid transparent',
|
|
1094
|
+
borderRight: '12px solid transparent',
|
|
1095
|
+
borderBottom: '12px solid rgba(255, 255, 255, 0.95)',
|
|
1096
|
+
filter: 'drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1))'
|
|
1097
|
+
}
|
|
1098
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1099
|
+
className: "bg-white rounded-2xl shadow-xl border-slate-300 overflow-hidden",
|
|
1100
|
+
style: {
|
|
1101
|
+
backgroundColor: 'rgba(255, 255, 255, 0.95)',
|
|
1102
|
+
borderWidth: '3px',
|
|
1103
|
+
maskImage: 'linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3))',
|
|
1104
|
+
WebkitMaskImage: 'linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3))'
|
|
1105
|
+
}
|
|
1106
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1107
|
+
className: "p-4 overflow-y-auto text-slate-800 text-sm leading-relaxed",
|
|
1108
|
+
style: {
|
|
1109
|
+
maxHeight: "".concat(bubbleHeight, "px")
|
|
1110
|
+
}
|
|
1111
|
+
}, renderMarkdown(displayMessage)))));
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* MAIN APP COMPONENT
|
|
1116
|
+
*/
|
|
1117
|
+
function TeamBuilder(_ref3) {
|
|
1118
|
+
var _ref3$agentTree = _ref3.agentTree,
|
|
1119
|
+
agentTree = _ref3$agentTree === void 0 ? AGENT_TREE : _ref3$agentTree,
|
|
1120
|
+
activeNode = _ref3.activeNode,
|
|
1121
|
+
_ref3$initialNodes = _ref3.initialNodes,
|
|
1122
|
+
initialNodes = _ref3$initialNodes === void 0 ? [] : _ref3$initialNodes,
|
|
1123
|
+
_ref3$initialEdges = _ref3.initialEdges,
|
|
1124
|
+
initialEdges = _ref3$initialEdges === void 0 ? [] : _ref3$initialEdges,
|
|
1125
|
+
handleSave = _ref3.handleSave,
|
|
1126
|
+
handleView = _ref3.handleView,
|
|
1127
|
+
handleEdit = _ref3.handleEdit,
|
|
1128
|
+
_ref3$initialEditable = _ref3.initialEditable,
|
|
1129
|
+
initialEditable = _ref3$initialEditable === void 0 ? false : _ref3$initialEditable,
|
|
1130
|
+
currentMessage = _ref3.currentMessage,
|
|
1131
|
+
handlePrompt = _ref3.handlePrompt,
|
|
1132
|
+
shouldFollow = _ref3.isFollowingActive;
|
|
1133
|
+
var _useState7 = React.useState(initialNodes),
|
|
1134
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
1135
|
+
nodes = _useState8[0],
|
|
1136
|
+
setNodes = _useState8[1];
|
|
1137
|
+
var _useState9 = React.useState(initialEdges),
|
|
1138
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
1139
|
+
edges = _useState0[0],
|
|
1140
|
+
setEdges = _useState0[1];
|
|
1141
|
+
|
|
1142
|
+
// Prompt State
|
|
1143
|
+
var _useState1 = React.useState(''),
|
|
1144
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
1145
|
+
promptInput = _useState10[0],
|
|
1146
|
+
setPromptInput = _useState10[1];
|
|
1147
|
+
var handleSendPrompt = function handleSendPrompt() {
|
|
1148
|
+
if (!promptInput.trim()) return;
|
|
1149
|
+
if (handlePrompt) {
|
|
1150
|
+
handlePrompt(promptInput);
|
|
1151
|
+
}
|
|
1152
|
+
setPromptInput('');
|
|
1153
|
+
};
|
|
1154
|
+
|
|
1155
|
+
// Mode State
|
|
1156
|
+
var _useState11 = React.useState(initialEditable),
|
|
1157
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
1158
|
+
isEditing = _useState12[0],
|
|
1159
|
+
setIsEditing = _useState12[1];
|
|
1160
|
+
var _useState13 = React.useState({
|
|
1161
|
+
nodes: initialNodes,
|
|
1162
|
+
edges: initialEdges
|
|
1163
|
+
}),
|
|
1164
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
1165
|
+
restorePoint = _useState14[0],
|
|
1166
|
+
setRestorePoint = _useState14[1];
|
|
1167
|
+
var _useState15 = React.useState(false),
|
|
1168
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
1169
|
+
confirmResetOpen = _useState16[0],
|
|
1170
|
+
setConfirmResetOpen = _useState16[1];
|
|
1171
|
+
var _useState17 = React.useState(true),
|
|
1172
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
1173
|
+
isFollowingActive = _useState18[0],
|
|
1174
|
+
setIsFollowingActive = _useState18[1];
|
|
1175
|
+
|
|
1176
|
+
// Sync external following state trigger
|
|
1177
|
+
React.useEffect(function () {
|
|
1178
|
+
if (shouldFollow) {
|
|
1179
|
+
setIsFollowingActive(true);
|
|
1180
|
+
}
|
|
1181
|
+
}, [shouldFollow]);
|
|
1182
|
+
|
|
1183
|
+
// Interaction State
|
|
1184
|
+
var _useState19 = React.useState(null),
|
|
1185
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
1186
|
+
draggingNode = _useState20[0],
|
|
1187
|
+
setDraggingNode = _useState20[1];
|
|
1188
|
+
var _useState21 = React.useState(null),
|
|
1189
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
1190
|
+
connectingSource = _useState22[0],
|
|
1191
|
+
setConnectingSource = _useState22[1];
|
|
1192
|
+
var _useState23 = React.useState({
|
|
1193
|
+
x: 0,
|
|
1194
|
+
y: 0
|
|
1195
|
+
}),
|
|
1196
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
1197
|
+
mousePos = _useState24[0],
|
|
1198
|
+
setMousePos = _useState24[1];
|
|
1199
|
+
// Initialize pan from sessionStorage to persist across re-renders
|
|
1200
|
+
var _useState25 = React.useState(function () {
|
|
1201
|
+
try {
|
|
1202
|
+
var saved = sessionStorage.getItem('teambuilder-pan');
|
|
1203
|
+
return saved ? JSON.parse(saved) : {
|
|
1204
|
+
x: 0,
|
|
1205
|
+
y: 0
|
|
1206
|
+
};
|
|
1207
|
+
} catch (_unused) {
|
|
1208
|
+
return {
|
|
1209
|
+
x: 0,
|
|
1210
|
+
y: 0
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
}),
|
|
1214
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
1215
|
+
pan = _useState26[0],
|
|
1216
|
+
setPan = _useState26[1];
|
|
1217
|
+
var _useState27 = React.useState(false),
|
|
1218
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
1219
|
+
isPanning = _useState28[0],
|
|
1220
|
+
setIsPanning = _useState28[1];
|
|
1221
|
+
var _useState29 = React.useState({
|
|
1222
|
+
x: 0,
|
|
1223
|
+
y: 0
|
|
1224
|
+
}),
|
|
1225
|
+
_useState30 = _slicedToArray(_useState29, 2),
|
|
1226
|
+
panStart = _useState30[0],
|
|
1227
|
+
setPanStart = _useState30[1];
|
|
1228
|
+
|
|
1229
|
+
// UI State
|
|
1230
|
+
var _useState31 = React.useState(null),
|
|
1231
|
+
_useState32 = _slicedToArray(_useState31, 2),
|
|
1232
|
+
openSelectorId = _useState32[0],
|
|
1233
|
+
setOpenSelectorId = _useState32[1];
|
|
1234
|
+
var _useState33 = React.useState({}),
|
|
1235
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
1236
|
+
nodeHeights = _useState34[0],
|
|
1237
|
+
setNodeHeights = _useState34[1];
|
|
1238
|
+
var containerRef = React.useRef(null);
|
|
1239
|
+
var nodeRefs = React.useRef({});
|
|
1240
|
+
var animationFrameRef = React.useRef(null);
|
|
1241
|
+
var panRef = React.useRef(pan);
|
|
1242
|
+
var isAutoPanningRef = React.useRef(false);
|
|
1243
|
+
|
|
1244
|
+
// Keep panRef in sync with pan state
|
|
1245
|
+
React.useEffect(function () {
|
|
1246
|
+
panRef.current = pan;
|
|
1247
|
+
}, [pan]);
|
|
1248
|
+
|
|
1249
|
+
// --- Pan to Active Node ---
|
|
1250
|
+
var panToActiveNode = React.useCallback(function () {
|
|
1251
|
+
if (!activeNode || !containerRef.current) return;
|
|
1252
|
+
var activeNodeData = nodes.find(function (node) {
|
|
1253
|
+
return activeNode === node.data.agentPath.join('/');
|
|
1254
|
+
});
|
|
1255
|
+
if (!activeNodeData) return;
|
|
1256
|
+
var nodeHeight = nodeHeights[activeNodeData.id] || 88;
|
|
1257
|
+
var nodeWidth = 256;
|
|
1258
|
+
var containerWidth = containerRef.current.clientWidth;
|
|
1259
|
+
var containerHeight = containerRef.current.clientHeight;
|
|
1260
|
+
|
|
1261
|
+
// Calculate target position: node should be in upper-middle area
|
|
1262
|
+
// Leave space below for the speech bubble
|
|
1263
|
+
var targetNodeCenterX = containerWidth / 2;
|
|
1264
|
+
var targetNodeCenterY = containerHeight * 0.3; // Position at 30% from top instead of 50%
|
|
1265
|
+
|
|
1266
|
+
// Calculate required pan to move node center to target position
|
|
1267
|
+
var targetPanX = targetNodeCenterX - (activeNodeData.x + nodeWidth / 2);
|
|
1268
|
+
var targetPanY = targetNodeCenterY - (activeNodeData.y + nodeHeight / 2);
|
|
1269
|
+
|
|
1270
|
+
// Smooth animation - use ref to get current pan value
|
|
1271
|
+
var startPan = _objectSpread2({}, panRef.current);
|
|
1272
|
+
var startTime = performance.now();
|
|
1273
|
+
var duration = 600; // 600ms animation
|
|
1274
|
+
|
|
1275
|
+
// Mark that we're doing an automatic pan
|
|
1276
|
+
isAutoPanningRef.current = true;
|
|
1277
|
+
var _animate = function animate(currentTime) {
|
|
1278
|
+
var elapsed = currentTime - startTime;
|
|
1279
|
+
var progress = Math.min(elapsed / duration, 1);
|
|
1280
|
+
|
|
1281
|
+
// Easing function (ease-out cubic)
|
|
1282
|
+
var eased = 1 - Math.pow(1 - progress, 3);
|
|
1283
|
+
var newPan = {
|
|
1284
|
+
x: startPan.x + (targetPanX - startPan.x) * eased,
|
|
1285
|
+
y: startPan.y + (targetPanY - startPan.y) * eased
|
|
1286
|
+
};
|
|
1287
|
+
setPan(newPan);
|
|
1288
|
+
if (progress < 1) {
|
|
1289
|
+
animationFrameRef.current = requestAnimationFrame(_animate);
|
|
1290
|
+
} else {
|
|
1291
|
+
// Animation complete, clear auto-panning flag
|
|
1292
|
+
isAutoPanningRef.current = false;
|
|
1293
|
+
}
|
|
1294
|
+
};
|
|
1295
|
+
if (animationFrameRef.current) {
|
|
1296
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
1297
|
+
}
|
|
1298
|
+
animationFrameRef.current = requestAnimationFrame(_animate);
|
|
1299
|
+
}, [activeNode, nodes, nodeHeights]);
|
|
1300
|
+
|
|
1301
|
+
// Cleanup animation frame on unmount
|
|
1302
|
+
React.useEffect(function () {
|
|
1303
|
+
return function () {
|
|
1304
|
+
if (animationFrameRef.current) {
|
|
1305
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
1306
|
+
}
|
|
1307
|
+
};
|
|
1308
|
+
}, []);
|
|
1309
|
+
|
|
1310
|
+
// Auto-follow active node when follow mode is enabled
|
|
1311
|
+
React.useEffect(function () {
|
|
1312
|
+
if (isFollowingActive && activeNode) {
|
|
1313
|
+
panToActiveNode();
|
|
1314
|
+
}
|
|
1315
|
+
}, [activeNode, isFollowingActive, panToActiveNode]);
|
|
1316
|
+
|
|
1317
|
+
// Disable follow mode when entering edit mode
|
|
1318
|
+
React.useEffect(function () {
|
|
1319
|
+
if (isEditing) {
|
|
1320
|
+
setIsFollowingActive(false);
|
|
1321
|
+
}
|
|
1322
|
+
}, [isEditing]);
|
|
1323
|
+
|
|
1324
|
+
// --- Mode Handlers ---
|
|
1325
|
+
var handleEditClick = function handleEditClick() {
|
|
1326
|
+
// Save restore point when entering edit mode
|
|
1327
|
+
setRestorePoint({
|
|
1328
|
+
nodes: _toConsumableArray(nodes),
|
|
1329
|
+
edges: _toConsumableArray(edges)
|
|
1330
|
+
});
|
|
1331
|
+
setIsEditing(true);
|
|
1332
|
+
};
|
|
1333
|
+
var handleCancelClick = function handleCancelClick() {
|
|
1334
|
+
var hasChanges = JSON.stringify(nodes) !== JSON.stringify(restorePoint.nodes) || JSON.stringify(edges) !== JSON.stringify(restorePoint.edges);
|
|
1335
|
+
if (hasChanges) {
|
|
1336
|
+
setConfirmResetOpen(true);
|
|
1337
|
+
} else {
|
|
1338
|
+
setIsEditing(false);
|
|
1339
|
+
}
|
|
1340
|
+
};
|
|
1341
|
+
var handleConfirmReset = function handleConfirmReset() {
|
|
1342
|
+
setNodes(restorePoint.nodes);
|
|
1343
|
+
setEdges(restorePoint.edges);
|
|
1344
|
+
setIsEditing(false);
|
|
1345
|
+
setConfirmResetOpen(false);
|
|
1346
|
+
};
|
|
1347
|
+
var handleSaveClick = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
1348
|
+
var rootNodes, rootNodeId;
|
|
1349
|
+
return _regenerator().w(function (_context) {
|
|
1350
|
+
while (1) switch (_context.n) {
|
|
1351
|
+
case 0:
|
|
1352
|
+
if (!handleSave) {
|
|
1353
|
+
_context.n = 1;
|
|
1354
|
+
break;
|
|
1355
|
+
}
|
|
1356
|
+
rootNodes = findRootNodes(nodes, edges);
|
|
1357
|
+
rootNodeId = rootNodes.length === 1 ? rootNodes[0].id : null;
|
|
1358
|
+
_context.n = 1;
|
|
1359
|
+
return handleSave({
|
|
1360
|
+
nodes: nodes,
|
|
1361
|
+
edges: edges,
|
|
1362
|
+
rootNodeId: rootNodeId
|
|
1363
|
+
});
|
|
1364
|
+
case 1:
|
|
1365
|
+
setRestorePoint({
|
|
1366
|
+
nodes: _toConsumableArray(nodes),
|
|
1367
|
+
edges: _toConsumableArray(edges)
|
|
1368
|
+
});
|
|
1369
|
+
setIsEditing(false);
|
|
1370
|
+
case 2:
|
|
1371
|
+
return _context.a(2);
|
|
1372
|
+
}
|
|
1373
|
+
}, _callee);
|
|
1374
|
+
})), [edges, handleSave, nodes]);
|
|
1375
|
+
React.useEffect(function () {
|
|
1376
|
+
if (!confirmResetOpen) return;
|
|
1377
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
1378
|
+
if (event.key === 'Escape') setConfirmResetOpen(false);
|
|
1379
|
+
};
|
|
1380
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
1381
|
+
return function () {
|
|
1382
|
+
return window.removeEventListener('keydown', handleKeyDown);
|
|
1383
|
+
};
|
|
1384
|
+
}, [confirmResetOpen]);
|
|
1385
|
+
|
|
1386
|
+
// Persist pan position to sessionStorage
|
|
1387
|
+
React.useEffect(function () {
|
|
1388
|
+
try {
|
|
1389
|
+
sessionStorage.setItem('teambuilder-pan', JSON.stringify(pan));
|
|
1390
|
+
} catch (_unused2) {
|
|
1391
|
+
// Ignore storage errors
|
|
1392
|
+
}
|
|
1393
|
+
}, [pan]);
|
|
1394
|
+
|
|
1395
|
+
// Measure node heights
|
|
1396
|
+
React.useEffect(function () {
|
|
1397
|
+
var heights = {};
|
|
1398
|
+
nodes.forEach(function (node) {
|
|
1399
|
+
var nodeElement = nodeRefs.current[node.id];
|
|
1400
|
+
if (nodeElement) {
|
|
1401
|
+
heights[node.id] = nodeElement.offsetHeight;
|
|
1402
|
+
}
|
|
1403
|
+
});
|
|
1404
|
+
setNodeHeights(heights);
|
|
1405
|
+
}, [nodes]);
|
|
1406
|
+
|
|
1407
|
+
// --- Handlers ---
|
|
1408
|
+
|
|
1409
|
+
var handleMouseDown = function handleMouseDown(e) {
|
|
1410
|
+
if (e.button !== 0) return;
|
|
1411
|
+
if (e.target.closest('[data-node]')) return;
|
|
1412
|
+
setIsPanning(true);
|
|
1413
|
+
setPanStart({
|
|
1414
|
+
x: e.clientX - pan.x,
|
|
1415
|
+
y: e.clientY - pan.y
|
|
1416
|
+
});
|
|
1417
|
+
};
|
|
1418
|
+
var handleMouseMove = function handleMouseMove(e) {
|
|
1419
|
+
var containerRect = containerRef.current.getBoundingClientRect();
|
|
1420
|
+
var x = e.clientX - containerRect.left;
|
|
1421
|
+
var y = e.clientY - containerRect.top;
|
|
1422
|
+
|
|
1423
|
+
// Adjust mouse pos for logic (subtracting pan not needed for absolute tracking, but needed for relative calc)
|
|
1424
|
+
var worldX = x - pan.x;
|
|
1425
|
+
var worldY = y - pan.y;
|
|
1426
|
+
setMousePos({
|
|
1427
|
+
x: worldX,
|
|
1428
|
+
y: worldY
|
|
1429
|
+
});
|
|
1430
|
+
if (isPanning) {
|
|
1431
|
+
setPan({
|
|
1432
|
+
x: e.clientX - panStart.x,
|
|
1433
|
+
y: e.clientY - panStart.y
|
|
1434
|
+
});
|
|
1435
|
+
// Disable follow mode when user manually pans (but not during automatic panning)
|
|
1436
|
+
if (isFollowingActive && !isAutoPanningRef.current) {
|
|
1437
|
+
setIsFollowingActive(false);
|
|
1438
|
+
}
|
|
1439
|
+
return;
|
|
1440
|
+
}
|
|
1441
|
+
if (draggingNode) {
|
|
1442
|
+
setNodes(function (nds) {
|
|
1443
|
+
return nds.map(function (n) {
|
|
1444
|
+
if (n.id === draggingNode.id) {
|
|
1445
|
+
return _objectSpread2(_objectSpread2({}, n), {}, {
|
|
1446
|
+
x: worldX - draggingNode.offsetX,
|
|
1447
|
+
y: worldY - draggingNode.offsetY
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
return n;
|
|
1451
|
+
});
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1454
|
+
};
|
|
1455
|
+
var handleMouseUp = function handleMouseUp() {
|
|
1456
|
+
setDraggingNode(null);
|
|
1457
|
+
setConnectingSource(null);
|
|
1458
|
+
setIsPanning(false);
|
|
1459
|
+
};
|
|
1460
|
+
var onNodeDragStart = function onNodeDragStart(e, node) {
|
|
1461
|
+
if (!isEditing) return;
|
|
1462
|
+
e.stopPropagation();
|
|
1463
|
+
// Only drag if not clicking a control
|
|
1464
|
+
if (e.target.closest('button') || e.target.closest('.nodrag')) return;
|
|
1465
|
+
setDraggingNode({
|
|
1466
|
+
id: node.id,
|
|
1467
|
+
offsetX: mousePos.x - node.x,
|
|
1468
|
+
offsetY: mousePos.y - node.y
|
|
1469
|
+
});
|
|
1470
|
+
};
|
|
1471
|
+
var onHandleMouseDown = function onHandleMouseDown(e, nodeId, type) {
|
|
1472
|
+
if (!isEditing) return;
|
|
1473
|
+
e.stopPropagation();
|
|
1474
|
+
if (type === 'source') {
|
|
1475
|
+
var node = nodes.find(function (n) {
|
|
1476
|
+
return n.id === nodeId;
|
|
1477
|
+
});
|
|
1478
|
+
var nodeHeight = nodeHeights[nodeId] || 88; // fallback to approximate height
|
|
1479
|
+
setConnectingSource({
|
|
1480
|
+
nodeId: nodeId,
|
|
1481
|
+
x: node.x + 256,
|
|
1482
|
+
// Right edge of node
|
|
1483
|
+
y: node.y + nodeHeight / 2 // Actual center Y
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
};
|
|
1487
|
+
var onHandleMouseUp = function onHandleMouseUp(e, nodeId, type) {
|
|
1488
|
+
e.stopPropagation();
|
|
1489
|
+
if (connectingSource && type === 'target' && connectingSource.nodeId !== nodeId) {
|
|
1490
|
+
// Create Edge
|
|
1491
|
+
var newEdge = {
|
|
1492
|
+
id: "e".concat(connectingSource.nodeId, "-").concat(nodeId, "-").concat(Date.now()),
|
|
1493
|
+
source: connectingSource.nodeId,
|
|
1494
|
+
target: nodeId
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1497
|
+
// Check duplicate
|
|
1498
|
+
var exists = edges.find(function (e) {
|
|
1499
|
+
return e.source === newEdge.source && e.target === newEdge.target;
|
|
1500
|
+
});
|
|
1501
|
+
if (!exists) {
|
|
1502
|
+
setEdges([].concat(_toConsumableArray(edges), [newEdge]));
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
setConnectingSource(null);
|
|
1506
|
+
};
|
|
1507
|
+
var deleteNode = function deleteNode(id) {
|
|
1508
|
+
setNodes(nodes.filter(function (n) {
|
|
1509
|
+
return n.id !== id;
|
|
1510
|
+
}));
|
|
1511
|
+
setEdges(edges.filter(function (e) {
|
|
1512
|
+
return e.source !== id && e.target !== id;
|
|
1513
|
+
}));
|
|
1514
|
+
delete nodeRefs.current[id];
|
|
1515
|
+
};
|
|
1516
|
+
var deleteEdge = function deleteEdge(id) {
|
|
1517
|
+
if (!isEditing) return;
|
|
1518
|
+
setEdges(edges.filter(function (e) {
|
|
1519
|
+
return e.id !== id;
|
|
1520
|
+
}));
|
|
1521
|
+
};
|
|
1522
|
+
var updateAgent = function updateAgent(nodeId, newPath) {
|
|
1523
|
+
setNodes(nodes.map(function (n) {
|
|
1524
|
+
return n.id === nodeId ? _objectSpread2(_objectSpread2({}, n), {}, {
|
|
1525
|
+
data: _objectSpread2(_objectSpread2({}, n.data), {}, {
|
|
1526
|
+
agentPath: newPath
|
|
1527
|
+
})
|
|
1528
|
+
}) : n;
|
|
1529
|
+
}));
|
|
1530
|
+
};
|
|
1531
|
+
var addNode = function addNode() {
|
|
1532
|
+
var _containerRef$current, _containerRef$current2;
|
|
1533
|
+
var id = generateId();
|
|
1534
|
+
// Calculate center of screen adjusted for pan
|
|
1535
|
+
var centerX = -pan.x + (((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.clientWidth) || 800) / 2 - 100;
|
|
1536
|
+
var centerY = -pan.y + (((_containerRef$current2 = containerRef.current) === null || _containerRef$current2 === void 0 ? void 0 : _containerRef$current2.clientHeight) || 600) / 2 - 50;
|
|
1537
|
+
setNodes([].concat(_toConsumableArray(nodes), [{
|
|
1538
|
+
id: id,
|
|
1539
|
+
x: centerX,
|
|
1540
|
+
y: centerY,
|
|
1541
|
+
data: {
|
|
1542
|
+
label: 'New Node',
|
|
1543
|
+
agentPath: []
|
|
1544
|
+
}
|
|
1545
|
+
}]));
|
|
1546
|
+
};
|
|
1547
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1548
|
+
className: "flex flex-col h-full w-full bg-slate-100 text-slate-900 font-sans overflow-hidden"
|
|
1549
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1550
|
+
className: "border-b border-slate-200 bg-white flex items-center px-[16px] justify-between z-10 shadow-sm",
|
|
1551
|
+
style: {
|
|
1552
|
+
height: '56px'
|
|
1553
|
+
}
|
|
1554
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1555
|
+
className: "flex items-center gap-[8px]"
|
|
1556
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1557
|
+
className: "p-[8px] bg-indigo-600 rounded text-white"
|
|
1558
|
+
}, /*#__PURE__*/React.createElement(Users, {
|
|
1559
|
+
size: 18
|
|
1560
|
+
})), /*#__PURE__*/React.createElement("h1", {
|
|
1561
|
+
className: "font-bold text-[18px] hidden sm:block"
|
|
1562
|
+
}, "Team Builder")), /*#__PURE__*/React.createElement("div", {
|
|
1563
|
+
className: "flex items-center gap-[12px]"
|
|
1564
|
+
}, !isEditing && (activeNode ? /*#__PURE__*/React.createElement("button", {
|
|
1565
|
+
onClick: function onClick() {
|
|
1566
|
+
return setIsFollowingActive(!isFollowingActive);
|
|
1567
|
+
},
|
|
1568
|
+
className: "flex items-center gap-[8px] px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm ".concat(isFollowingActive ? 'bg-green-500 hover:bg-green-600 text-white' : 'bg-blue-500 hover:bg-blue-600 text-white')
|
|
1569
|
+
}, isFollowingActive ? /*#__PURE__*/React.createElement(Check, {
|
|
1570
|
+
size: 16
|
|
1571
|
+
}) : /*#__PURE__*/React.createElement(Play, {
|
|
1572
|
+
size: 16
|
|
1573
|
+
}), "Follow Active Agent") : /*#__PURE__*/React.createElement("div", {
|
|
1574
|
+
className: "text-[12px] text-slate-500 hidden md:block"
|
|
1575
|
+
}, "View Only Mode")), !isEditing ? /*#__PURE__*/React.createElement("button", {
|
|
1576
|
+
onClick: handleEditClick,
|
|
1577
|
+
className: "flex items-center gap-[8px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-700 px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm"
|
|
1578
|
+
}, /*#__PURE__*/React.createElement(Pencil, {
|
|
1579
|
+
size: 16
|
|
1580
|
+
}), " Edit") : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
|
|
1581
|
+
onClick: handleCancelClick,
|
|
1582
|
+
className: "flex items-center gap-[8px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-700 px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm"
|
|
1583
|
+
}, /*#__PURE__*/React.createElement(X, {
|
|
1584
|
+
size: 16
|
|
1585
|
+
}), " Cancel"), /*#__PURE__*/React.createElement("button", {
|
|
1586
|
+
onClick: handleSaveClick,
|
|
1587
|
+
className: "flex items-center gap-[8px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-700 px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm"
|
|
1588
|
+
}, /*#__PURE__*/React.createElement(Save, {
|
|
1589
|
+
size: 16
|
|
1590
|
+
}), " Save"), /*#__PURE__*/React.createElement("button", {
|
|
1591
|
+
onClick: addNode,
|
|
1592
|
+
className: "flex items-center gap-[8px] bg-indigo-600 hover:bg-indigo-700 text-white px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm",
|
|
1593
|
+
style: {
|
|
1594
|
+
color: '#fff'
|
|
1595
|
+
}
|
|
1596
|
+
}, /*#__PURE__*/React.createElement(Plus, {
|
|
1597
|
+
size: 16
|
|
1598
|
+
}), " Add Node")))), /*#__PURE__*/React.createElement("div", {
|
|
1599
|
+
ref: containerRef,
|
|
1600
|
+
className: "flex-1 relative overflow-hidden bg-grid-slate-200/[0.5]",
|
|
1601
|
+
style: {
|
|
1602
|
+
cursor: isPanning ? 'grabbing' : 'grab',
|
|
1603
|
+
backgroundSize: '40px 40px'
|
|
1604
|
+
},
|
|
1605
|
+
onMouseDown: handleMouseDown,
|
|
1606
|
+
onMouseMove: handleMouseMove,
|
|
1607
|
+
onMouseUp: handleMouseUp,
|
|
1608
|
+
onMouseLeave: handleMouseUp
|
|
1609
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1610
|
+
style: {
|
|
1611
|
+
transform: "translate(".concat(pan.x, "px, ").concat(pan.y, "px)"),
|
|
1612
|
+
width: '100%',
|
|
1613
|
+
height: '100%',
|
|
1614
|
+
position: 'absolute',
|
|
1615
|
+
top: 0,
|
|
1616
|
+
left: 0,
|
|
1617
|
+
pointerEvents: 'none' // Let events pass through wrapper
|
|
1618
|
+
}
|
|
1619
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
1620
|
+
className: "absolute top-0 left-0 overflow-visible w-full h-full pointer-events-none z-0"
|
|
1621
|
+
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("marker", {
|
|
1622
|
+
id: "arrowhead",
|
|
1623
|
+
markerWidth: "10",
|
|
1624
|
+
markerHeight: "7",
|
|
1625
|
+
refX: "9",
|
|
1626
|
+
refY: "3.5",
|
|
1627
|
+
orient: "auto"
|
|
1628
|
+
}, /*#__PURE__*/React.createElement("polygon", {
|
|
1629
|
+
points: "0 0, 10 3.5, 0 7",
|
|
1630
|
+
fill: "#64748b"
|
|
1631
|
+
})), /*#__PURE__*/React.createElement("marker", {
|
|
1632
|
+
id: "arrowhead-active",
|
|
1633
|
+
markerWidth: "10",
|
|
1634
|
+
markerHeight: "7",
|
|
1635
|
+
refX: "9",
|
|
1636
|
+
refY: "3.5",
|
|
1637
|
+
orient: "auto"
|
|
1638
|
+
}, /*#__PURE__*/React.createElement("polygon", {
|
|
1639
|
+
points: "0 0, 10 3.5, 0 7",
|
|
1640
|
+
fill: "#6366f1"
|
|
1641
|
+
}))), edges.map(function (edge) {
|
|
1642
|
+
var src = nodes.find(function (n) {
|
|
1643
|
+
return n.id === edge.source;
|
|
1644
|
+
});
|
|
1645
|
+
var trg = nodes.find(function (n) {
|
|
1646
|
+
return n.id === edge.target;
|
|
1647
|
+
});
|
|
1648
|
+
if (!src || !trg) return null;
|
|
1649
|
+
|
|
1650
|
+
// Calculate handle positions based on actual node heights
|
|
1651
|
+
var srcHeight = nodeHeights[edge.source] || 88; // fallback to approximate height
|
|
1652
|
+
var trgHeight = nodeHeights[edge.target] || 88;
|
|
1653
|
+
var sx = src.x + 256; // Width of node is w-64 (256px)
|
|
1654
|
+
var sy = src.y + srcHeight / 2; // Actual center Y
|
|
1655
|
+
var tx = trg.x;
|
|
1656
|
+
var ty = trg.y + trgHeight / 2; // Actual center Y
|
|
1657
|
+
|
|
1658
|
+
var path = getEdgePath(sx, sy, tx, ty);
|
|
1659
|
+
return /*#__PURE__*/React.createElement("g", {
|
|
1660
|
+
key: edge.id,
|
|
1661
|
+
className: "pointer-events-auto group"
|
|
1662
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1663
|
+
d: path,
|
|
1664
|
+
strokeWidth: "15",
|
|
1665
|
+
stroke: "transparent",
|
|
1666
|
+
fill: "none",
|
|
1667
|
+
className: isEditing ? "cursor-pointer" : "",
|
|
1668
|
+
onClick: function onClick() {
|
|
1669
|
+
return deleteEdge(edge.id);
|
|
1670
|
+
} // Click fat hidden path to delete
|
|
1671
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1672
|
+
d: path,
|
|
1673
|
+
stroke: "#64748b",
|
|
1674
|
+
strokeWidth: "2",
|
|
1675
|
+
fill: "none",
|
|
1676
|
+
markerEnd: "url(#arrowhead)",
|
|
1677
|
+
className: "group-hover:stroke-red-500 transition-colors"
|
|
1678
|
+
}));
|
|
1679
|
+
}), connectingSource && /*#__PURE__*/React.createElement("path", {
|
|
1680
|
+
d: getEdgePath(connectingSource.x, connectingSource.y, mousePos.x, mousePos.y),
|
|
1681
|
+
stroke: "#6366f1",
|
|
1682
|
+
strokeWidth: "2",
|
|
1683
|
+
fill: "none",
|
|
1684
|
+
strokeDasharray: "5,5"
|
|
1685
|
+
})), /*#__PURE__*/React.createElement(SpeechBubble, {
|
|
1686
|
+
activeNode: activeNode,
|
|
1687
|
+
nodes: nodes,
|
|
1688
|
+
nodeHeights: nodeHeights,
|
|
1689
|
+
currentMessage: currentMessage,
|
|
1690
|
+
pan: pan,
|
|
1691
|
+
containerRef: containerRef
|
|
1692
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1693
|
+
className: "pointer-events-auto w-full h-full"
|
|
1694
|
+
}, nodes.map(function (node) {
|
|
1695
|
+
var isActive = activeNode === node.data.agentPath.join('/');
|
|
1696
|
+
var agentName = node.data.agentPath.length > 0 ? node.data.agentPath[node.data.agentPath.length - 1] : 'Select Agent...';
|
|
1697
|
+
var breadcrumbs = node.data.agentPath.slice(0, -1).join(' > ');
|
|
1698
|
+
|
|
1699
|
+
// Check if this is a root node (only show icon if graph is valid)
|
|
1700
|
+
var rootNodes = findRootNodes(nodes, edges);
|
|
1701
|
+
var graphValid = isGraphValid(nodes, edges);
|
|
1702
|
+
var isRootNode = graphValid && rootNodes.length === 1 && rootNodes[0].id === node.id;
|
|
1703
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1704
|
+
ref: function ref(el) {
|
|
1705
|
+
return nodeRefs.current[node.id] = el;
|
|
1706
|
+
},
|
|
1707
|
+
"data-node": "true",
|
|
1708
|
+
key: node.id,
|
|
1709
|
+
onMouseDown: function onMouseDown(e) {
|
|
1710
|
+
return onNodeDragStart(e, node);
|
|
1711
|
+
},
|
|
1712
|
+
style: {
|
|
1713
|
+
transform: "translate(".concat(node.x, "px, ").concat(node.y, "px)"),
|
|
1714
|
+
width: '256px',
|
|
1715
|
+
height: 'fit-content',
|
|
1716
|
+
boxSizing: 'border-box',
|
|
1717
|
+
fontSize: '14px',
|
|
1718
|
+
lineHeight: '1.5',
|
|
1719
|
+
fontFamily: 'sans-serif'
|
|
1720
|
+
},
|
|
1721
|
+
className: "absolute bg-white rounded-[12px] shadow-lg border-2 transition-shadow duration-200 group flex flex-col z-10\n ".concat(isActive ? 'border-green-500 shadow-green-500/30 ring-1 ring-green-500' : 'border-blue-500 hover:border-blue-600', "\n ")
|
|
1722
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1723
|
+
className: "rounded-t-[12px] w-full ".concat(isActive ? 'bg-green-500' : 'bg-slate-100'),
|
|
1724
|
+
style: {
|
|
1725
|
+
height: '8px'
|
|
1726
|
+
}
|
|
1727
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1728
|
+
className: "flex flex-col",
|
|
1729
|
+
style: {
|
|
1730
|
+
padding: '16px',
|
|
1731
|
+
gap: '12px'
|
|
1732
|
+
}
|
|
1733
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1734
|
+
className: "flex items-start justify-between"
|
|
1735
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1736
|
+
className: "flex flex-col"
|
|
1737
|
+
}, breadcrumbs && /*#__PURE__*/React.createElement("span", {
|
|
1738
|
+
className: "text-slate-400 truncate max-w-[150px]",
|
|
1739
|
+
title: breadcrumbs,
|
|
1740
|
+
style: {
|
|
1741
|
+
fontSize: '10px'
|
|
1742
|
+
}
|
|
1743
|
+
}, breadcrumbs)), /*#__PURE__*/React.createElement("div", {
|
|
1744
|
+
className: "flex gap-[4px]"
|
|
1745
|
+
}, !isEditing ? handleView && node.data.agentPath.length > 0 && /*#__PURE__*/React.createElement("button", {
|
|
1746
|
+
onClick: function onClick() {
|
|
1747
|
+
return handleView(node.data.agentPath.join('/'));
|
|
1748
|
+
},
|
|
1749
|
+
className: "p-[6px] rounded-[6px] text-slate-400 hover:text-blue-600 hover:bg-blue-50 transition-colors",
|
|
1750
|
+
title: "View Agent"
|
|
1751
|
+
}, /*#__PURE__*/React.createElement(Eye, {
|
|
1752
|
+
size: 16
|
|
1753
|
+
})) : handleEdit && node.data.agentPath.length > 0 && /*#__PURE__*/React.createElement("button", {
|
|
1754
|
+
onClick: function onClick() {
|
|
1755
|
+
return handleEdit(node.data.agentPath.join('/'));
|
|
1756
|
+
},
|
|
1757
|
+
className: "p-[6px] rounded-[6px] text-slate-400 hover:text-amber-600 hover:bg-amber-50 transition-colors",
|
|
1758
|
+
title: "Edit Agent"
|
|
1759
|
+
}, /*#__PURE__*/React.createElement(SquarePen, {
|
|
1760
|
+
size: 16
|
|
1761
|
+
})), isRootNode && /*#__PURE__*/React.createElement("div", {
|
|
1762
|
+
className: "p-[6px] rounded-[6px] transition-all text-indigo-600 bg-indigo-50",
|
|
1763
|
+
title: "Root Node"
|
|
1764
|
+
}, /*#__PURE__*/React.createElement(House, {
|
|
1765
|
+
size: 18
|
|
1766
|
+
})), isActive && /*#__PURE__*/React.createElement("div", {
|
|
1767
|
+
className: "p-[6px] rounded-[6px] transition-all text-green-600 bg-green-50",
|
|
1768
|
+
title: "Active Node"
|
|
1769
|
+
}, /*#__PURE__*/React.createElement(Settings, {
|
|
1770
|
+
size: 18,
|
|
1771
|
+
className: "animate-spin"
|
|
1772
|
+
})), isEditing && /*#__PURE__*/React.createElement("button", {
|
|
1773
|
+
onClick: function onClick() {
|
|
1774
|
+
return deleteNode(node.id);
|
|
1775
|
+
},
|
|
1776
|
+
className: "p-[6px] rounded-[6px] text-slate-300 hover:text-red-600 hover:bg-red-50 transition-colors"
|
|
1777
|
+
}, /*#__PURE__*/React.createElement(Trash2, {
|
|
1778
|
+
size: 16
|
|
1779
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
1780
|
+
className: "relative nodrag"
|
|
1781
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
1782
|
+
onClick: function onClick() {
|
|
1783
|
+
return setOpenSelectorId(openSelectorId === node.id ? null : node.id);
|
|
1784
|
+
},
|
|
1785
|
+
className: "w-full flex items-center justify-between px-[12px] py-[8px] bg-slate-50 border border-slate-200 rounded-[6px] text-[14px] text-slate-600 hover:bg-slate-100 transition-colors"
|
|
1786
|
+
}, /*#__PURE__*/React.createElement("span", null, agentName), /*#__PURE__*/React.createElement(ChevronDown, {
|
|
1787
|
+
size: 14
|
|
1788
|
+
})), openSelectorId === node.id && isEditing && /*#__PURE__*/React.createElement(AgentSelector, {
|
|
1789
|
+
value: node.data.agentPath,
|
|
1790
|
+
onChange: function onChange(newPath) {
|
|
1791
|
+
return updateAgent(node.id, newPath);
|
|
1792
|
+
},
|
|
1793
|
+
onClose: function onClose() {
|
|
1794
|
+
return setOpenSelectorId(null);
|
|
1795
|
+
},
|
|
1796
|
+
agentTree: agentTree
|
|
1797
|
+
}))), isEditing && /*#__PURE__*/React.createElement("div", {
|
|
1798
|
+
className: "absolute group-hover:scale-110 transition-transform pointer-events-none",
|
|
1799
|
+
style: {
|
|
1800
|
+
position: 'absolute',
|
|
1801
|
+
left: '-12px',
|
|
1802
|
+
right: 'auto',
|
|
1803
|
+
top: '50%',
|
|
1804
|
+
transform: 'translateY(-50%)',
|
|
1805
|
+
width: '24px',
|
|
1806
|
+
height: '24px',
|
|
1807
|
+
display: 'flex',
|
|
1808
|
+
alignItems: 'center',
|
|
1809
|
+
justifyContent: 'center',
|
|
1810
|
+
pointerEvents: 'none'
|
|
1811
|
+
}
|
|
1812
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1813
|
+
className: "w-[12px] h-[12px] bg-white border-2 border-slate-400 rounded-full hover:border-indigo-500 hover:bg-indigo-50 cursor-crosshair pointer-events-auto",
|
|
1814
|
+
onMouseUp: function onMouseUp(e) {
|
|
1815
|
+
return onHandleMouseUp(e, node.id, 'target');
|
|
1816
|
+
}
|
|
1817
|
+
})), isEditing && /*#__PURE__*/React.createElement("div", {
|
|
1818
|
+
className: "absolute group-hover:scale-110 transition-transform pointer-events-none",
|
|
1819
|
+
style: {
|
|
1820
|
+
position: 'absolute',
|
|
1821
|
+
left: 'auto',
|
|
1822
|
+
right: '-12px',
|
|
1823
|
+
top: '50%',
|
|
1824
|
+
transform: 'translateY(-50%)',
|
|
1825
|
+
width: '24px',
|
|
1826
|
+
height: '24px',
|
|
1827
|
+
display: 'flex',
|
|
1828
|
+
alignItems: 'center',
|
|
1829
|
+
justifyContent: 'center',
|
|
1830
|
+
pointerEvents: 'none'
|
|
1831
|
+
}
|
|
1832
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1833
|
+
className: "w-[12px] h-[12px] bg-white border-2 border-slate-400 rounded-full hover:border-indigo-500 hover:bg-indigo-50 cursor-crosshair pointer-events-auto",
|
|
1834
|
+
onMouseDown: function onMouseDown(e) {
|
|
1835
|
+
return onHandleMouseDown(e, node.id, 'source');
|
|
1836
|
+
}
|
|
1837
|
+
})));
|
|
1838
|
+
}))), !isEditing && handlePrompt && !activeNode && /*#__PURE__*/React.createElement("div", {
|
|
1839
|
+
className: "absolute bottom-6 left-1/2 transform -translate-x-1/2 w-full max-w-2xl px-4 z-30 pointer-events-auto"
|
|
1840
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1841
|
+
className: "bg-white rounded-2xl shadow-xl border border-slate-200 p-2 flex items-end gap-2"
|
|
1842
|
+
}, /*#__PURE__*/React.createElement("textarea", {
|
|
1843
|
+
value: promptInput,
|
|
1844
|
+
onChange: function onChange(e) {
|
|
1845
|
+
return setPromptInput(e.target.value);
|
|
1846
|
+
},
|
|
1847
|
+
onKeyDown: function onKeyDown(e) {
|
|
1848
|
+
if (e.key === 'Enter' && !e.shiftKey) {
|
|
1849
|
+
e.preventDefault();
|
|
1850
|
+
handleSendPrompt();
|
|
1851
|
+
}
|
|
1852
|
+
},
|
|
1853
|
+
placeholder: "Message Team Builder...",
|
|
1854
|
+
className: "w-full max-h-32 min-h-[44px] py-3 px-4 bg-transparent border-0 focus:ring-0 resize-none text-slate-800 placeholder:text-slate-400 text-sm focus:outline-none",
|
|
1855
|
+
rows: 1
|
|
1856
|
+
}), /*#__PURE__*/React.createElement("button", {
|
|
1857
|
+
onClick: handleSendPrompt,
|
|
1858
|
+
disabled: !promptInput.trim(),
|
|
1859
|
+
className: "p-2 rounded-xl mb-1 transition-colors ".concat(promptInput.trim() ? 'bg-slate-900 text-white hover:bg-slate-700' : 'bg-slate-100 text-slate-300')
|
|
1860
|
+
}, /*#__PURE__*/React.createElement(Send, {
|
|
1861
|
+
size: 18
|
|
1862
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
1863
|
+
className: "h-8 bg-white border-t border-slate-200 flex items-center px-4 text-xs text-slate-400 justify-between"
|
|
1864
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1865
|
+
className: "flex items-center gap-2"
|
|
1866
|
+
}, /*#__PURE__*/React.createElement("span", null, "Team: ", nodes.length, " Agents, ", edges.length, " Connections"), nodes.length > 0 && !isGraphValid(nodes, edges) && /*#__PURE__*/React.createElement("div", {
|
|
1867
|
+
className: "flex items-center gap-1 text-amber-600"
|
|
1868
|
+
}, /*#__PURE__*/React.createElement(TriangleAlert, {
|
|
1869
|
+
size: 14
|
|
1870
|
+
}), /*#__PURE__*/React.createElement("span", null, !isGraphConnected(nodes, edges) ? 'Warning: Not all nodes are connected' : findRootNodes(nodes, edges).length !== 1 ? "Warning: Graph must have exactly 1 root node (found ".concat(findRootNodes(nodes, edges).length, ")") : 'Warning: Invalid graph structure'))), /*#__PURE__*/React.createElement("div", null, "Active: ", activeNode || 'None')), confirmResetOpen && /*#__PURE__*/React.createElement("div", {
|
|
1871
|
+
className: "fixed inset-0 z-50 flex items-center justify-center"
|
|
1872
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1873
|
+
className: "absolute inset-0 bg-slate-900/40 backdrop-blur-sm",
|
|
1874
|
+
onClick: function onClick() {
|
|
1875
|
+
return setConfirmResetOpen(false);
|
|
1876
|
+
}
|
|
1877
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1878
|
+
role: "dialog",
|
|
1879
|
+
"aria-modal": "true",
|
|
1880
|
+
"aria-labelledby": "reset-dialog-title",
|
|
1881
|
+
className: "relative w-[92%] max-w-[420px] rounded-[12px] bg-white shadow-2xl border border-slate-200 p-[20px] animate-in fade-in zoom-in-95 duration-150"
|
|
1882
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1883
|
+
className: "flex items-start gap-[12px]"
|
|
1884
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1885
|
+
className: "flex h-[36px] w-[36px] items-center justify-center rounded-full bg-red-50 text-red-600"
|
|
1886
|
+
}, /*#__PURE__*/React.createElement(Trash2, {
|
|
1887
|
+
size: 18
|
|
1888
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1889
|
+
className: "flex-1"
|
|
1890
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
1891
|
+
id: "reset-dialog-title",
|
|
1892
|
+
className: "text-[16px] font-semibold text-slate-900"
|
|
1893
|
+
}, "Discard unsaved changes?"), /*#__PURE__*/React.createElement("p", {
|
|
1894
|
+
className: "mt-[6px] text-[13px] text-slate-600"
|
|
1895
|
+
}, "This will reset the canvas back to your last saved state."))), /*#__PURE__*/React.createElement("div", {
|
|
1896
|
+
className: "mt-[18px] flex items-center justify-end gap-[8px]"
|
|
1897
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
1898
|
+
onClick: function onClick() {
|
|
1899
|
+
return setConfirmResetOpen(false);
|
|
1900
|
+
},
|
|
1901
|
+
className: "px-[12px] py-[8px] text-[13px] font-medium text-slate-700 hover:text-slate-900"
|
|
1902
|
+
}, "Keep Editing"), /*#__PURE__*/React.createElement("button", {
|
|
1903
|
+
onClick: handleConfirmReset,
|
|
1904
|
+
className: "px-[14px] py-[8px] rounded-[6px] bg-red-600 text-white text-[13px] font-medium hover:bg-red-700 transition-colors"
|
|
1905
|
+
}, "Reset Changes")))));
|
|
1906
|
+
}
|
|
1907
|
+
var TeamBuilder$1 = (function (_ref5) {
|
|
1908
|
+
var withBindings = _ref5.withBindings;
|
|
1909
|
+
return withBindings(TeamBuilder);
|
|
1910
|
+
});
|
|
1911
|
+
|
|
1912
|
+
/**
|
|
1913
|
+
* See the docs for more info on API versions:
|
|
1914
|
+
* https://docs.wsq.io/topics/custom-javascript-components/#api
|
|
1915
|
+
*/
|
|
1916
|
+
var index = {
|
|
1917
|
+
v1: {
|
|
1918
|
+
TeamBuilder: TeamBuilder$1
|
|
1919
|
+
}
|
|
1920
|
+
};
|
|
1921
|
+
|
|
1922
|
+
export { index as default };
|