@kosdev-code/kos-ui-plugin 0.1.0-dev.5053

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/documentation-generator-DFaIDo0E.cjs +266 -0
  2. package/documentation-generator-DFaIDo0E.cjs.map +1 -0
  3. package/documentation-generator-auruIa_o.js +1560 -0
  4. package/documentation-generator-auruIa_o.js.map +1 -0
  5. package/index.cjs +437 -0
  6. package/index.cjs.map +1 -0
  7. package/index.d.ts +5 -0
  8. package/index.d.ts.map +1 -0
  9. package/index.js +2276 -0
  10. package/index.js.map +1 -0
  11. package/lib/components/dynamic-component/dynamic-component.d.ts +11 -0
  12. package/lib/components/dynamic-component/dynamic-component.d.ts.map +1 -0
  13. package/lib/components/dynamic-component/error-boundary.d.ts +17 -0
  14. package/lib/components/dynamic-component/error-boundary.d.ts.map +1 -0
  15. package/lib/components/dynamic-component/index.d.ts +2 -0
  16. package/lib/components/dynamic-component/index.d.ts.map +1 -0
  17. package/lib/components/dynamic-container/dynamic-container.d.ts +12 -0
  18. package/lib/components/dynamic-container/dynamic-container.d.ts.map +1 -0
  19. package/lib/components/dynamic-container/index.d.ts +2 -0
  20. package/lib/components/dynamic-container/index.d.ts.map +1 -0
  21. package/lib/components/index.d.ts +3 -0
  22. package/lib/components/index.d.ts.map +1 -0
  23. package/lib/components/plugin-explorer/extension-point-list.d.ts +13 -0
  24. package/lib/components/plugin-explorer/extension-point-list.d.ts.map +1 -0
  25. package/lib/components/plugin-explorer/floating-plugin-explorer.d.ts +13 -0
  26. package/lib/components/plugin-explorer/floating-plugin-explorer.d.ts.map +1 -0
  27. package/lib/components/plugin-explorer/index.d.ts +10 -0
  28. package/lib/components/plugin-explorer/index.d.ts.map +1 -0
  29. package/lib/components/plugin-explorer/plugin-card.d.ts +10 -0
  30. package/lib/components/plugin-explorer/plugin-card.d.ts.map +1 -0
  31. package/lib/components/plugin-explorer/plugin-explorer.d.ts +12 -0
  32. package/lib/components/plugin-explorer/plugin-explorer.d.ts.map +1 -0
  33. package/lib/components/plugin-explorer/plugin-health-dashboard.d.ts +9 -0
  34. package/lib/components/plugin-explorer/plugin-health-dashboard.d.ts.map +1 -0
  35. package/lib/contexts/index.d.ts +2 -0
  36. package/lib/contexts/index.d.ts.map +1 -0
  37. package/lib/contexts/plugins-provider/index.d.ts +2 -0
  38. package/lib/contexts/plugins-provider/index.d.ts.map +1 -0
  39. package/lib/contexts/plugins-provider/plugins-provider.d.ts +50 -0
  40. package/lib/contexts/plugins-provider/plugins-provider.d.ts.map +1 -0
  41. package/lib/hooks/index.d.ts +6 -0
  42. package/lib/hooks/index.d.ts.map +1 -0
  43. package/lib/hooks/use-dynamic-component.d.ts +34 -0
  44. package/lib/hooks/use-dynamic-component.d.ts.map +1 -0
  45. package/lib/hooks/use-extension-component.d.ts +26 -0
  46. package/lib/hooks/use-extension-component.d.ts.map +1 -0
  47. package/lib/hooks/use-extension-i18n.d.ts +69 -0
  48. package/lib/hooks/use-extension-i18n.d.ts.map +1 -0
  49. package/lib/hooks/use-plugin-discovery.d.ts +23 -0
  50. package/lib/hooks/use-plugin-discovery.d.ts.map +1 -0
  51. package/lib/hooks/use-typed-extensions.d.ts +152 -0
  52. package/lib/hooks/use-typed-extensions.d.ts.map +1 -0
  53. package/lib/utils/discovery/documentation-generator.d.ts +85 -0
  54. package/lib/utils/discovery/documentation-generator.d.ts.map +1 -0
  55. package/lib/utils/discovery/plugin-discovery-service.d.ts +109 -0
  56. package/lib/utils/discovery/plugin-discovery-service.d.ts.map +1 -0
  57. package/lib/utils/extension-points/define-extension-point.d.ts +58 -0
  58. package/lib/utils/extension-points/define-extension-point.d.ts.map +1 -0
  59. package/lib/utils/extension-points/example-extension-point.d.ts +67 -0
  60. package/lib/utils/extension-points/example-extension-point.d.ts.map +1 -0
  61. package/lib/utils/extension-points/extension-point-registry.d.ts +59 -0
  62. package/lib/utils/extension-points/extension-point-registry.d.ts.map +1 -0
  63. package/lib/utils/extension-points/extension-point-schema.d.ts +9 -0
  64. package/lib/utils/extension-points/extension-point-schema.d.ts.map +1 -0
  65. package/lib/utils/extension-points/extension-point-schemas.d.ts +92 -0
  66. package/lib/utils/extension-points/extension-point-schemas.d.ts.map +1 -0
  67. package/lib/utils/extension-points/extension-point-transforms.d.ts +21 -0
  68. package/lib/utils/extension-points/extension-point-transforms.d.ts.map +1 -0
  69. package/lib/utils/extension-points/extension-point-types.d.ts +162 -0
  70. package/lib/utils/extension-points/extension-point-types.d.ts.map +1 -0
  71. package/lib/utils/extension-points/extension-point-validation.d.ts +43 -0
  72. package/lib/utils/extension-points/extension-point-validation.d.ts.map +1 -0
  73. package/lib/utils/extension-points/json-extension-parser.d.ts +68 -0
  74. package/lib/utils/extension-points/json-extension-parser.d.ts.map +1 -0
  75. package/lib/utils/extension-points/type-generator.d.ts +43 -0
  76. package/lib/utils/extension-points/type-generator.d.ts.map +1 -0
  77. package/lib/utils/index.d.ts +10 -0
  78. package/lib/utils/index.d.ts.map +1 -0
  79. package/lib/utils/plugin-system/plugin-extension-manager.d.ts +15 -0
  80. package/lib/utils/plugin-system/plugin-extension-manager.d.ts.map +1 -0
  81. package/lib/utils/plugin-system/plugin-extension-registry-init.d.ts +2 -0
  82. package/lib/utils/plugin-system/plugin-extension-registry-init.d.ts.map +1 -0
  83. package/lib/utils/plugin-system/plugin-extension-registry.d.ts +6 -0
  84. package/lib/utils/plugin-system/plugin-extension-registry.d.ts.map +1 -0
  85. package/lib/utils/plugin-system/plugin-reducer.d.ts +17 -0
  86. package/lib/utils/plugin-system/plugin-reducer.d.ts.map +1 -0
  87. package/lib/utils/plugin-system/resolve-best-extension.d.ts +12 -0
  88. package/lib/utils/plugin-system/resolve-best-extension.d.ts.map +1 -0
  89. package/lib/utils/processors/contribution-reducer.d.ts +5 -0
  90. package/lib/utils/processors/contribution-reducer.d.ts.map +1 -0
  91. package/lib/utils/processors/initialize-plugins.d.ts +82 -0
  92. package/lib/utils/processors/initialize-plugins.d.ts.map +1 -0
  93. package/lib/utils/processors/initialize-simplified-extensions.d.ts +13 -0
  94. package/lib/utils/processors/initialize-simplified-extensions.d.ts.map +1 -0
  95. package/lib/utils/processors/process-kos-config.d.ts +34 -0
  96. package/lib/utils/processors/process-kos-config.d.ts.map +1 -0
  97. package/lib/utils/processors/simplified-contribution-processor.d.ts +14 -0
  98. package/lib/utils/processors/simplified-contribution-processor.d.ts.map +1 -0
  99. package/lib/webpack/index.d.ts +2 -0
  100. package/lib/webpack/index.d.ts.map +1 -0
  101. package/lib/webpack/with-kos-config.d.ts +2 -0
  102. package/lib/webpack/with-kos-config.d.ts.map +1 -0
  103. package/package.json +30 -0
  104. package/types/global.d.ts +53 -0
  105. package/types/plugins.d.ts +41 -0
  106. package/utils.cjs +2 -0
  107. package/utils.cjs.map +1 -0
  108. package/utils.js +296 -0
  109. package/utils.js.map +1 -0
  110. package/webpack.cjs +13 -0
  111. package/webpack.cjs.map +1 -0
  112. package/webpack.js +795 -0
  113. package/webpack.js.map +1 -0
package/index.js ADDED
@@ -0,0 +1,2276 @@
1
+ import * as ee from "react/jsx-runtime";
2
+ import * as V from "react";
3
+ import Y, { forwardRef as Ot, useContext as Xe, createContext as It, useState as B, useEffect as te, Suspense as Dt, useMemo as j } from "react";
4
+ import h from "@emotion/styled";
5
+ import { a as Vt, b as jt, r as Se, m as Bt, P as ne, g as Kt, c as Te, D as Yt } from "./documentation-generator-auruIa_o.js";
6
+ import { useKosTranslation as Wt } from "@kosdev-code/kos-ui-sdk";
7
+ import "zod";
8
+ function Ht(e) {
9
+ if (e.sheet)
10
+ return e.sheet;
11
+ for (var t = 0; t < document.styleSheets.length; t++)
12
+ if (document.styleSheets[t].ownerNode === e)
13
+ return document.styleSheets[t];
14
+ }
15
+ function Ut(e) {
16
+ var t = document.createElement("style");
17
+ return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
18
+ }
19
+ var Gt = /* @__PURE__ */ function() {
20
+ function e(n) {
21
+ var r = this;
22
+ this._insertTag = function(o) {
23
+ var i;
24
+ r.tags.length === 0 ? r.insertionPoint ? i = r.insertionPoint.nextSibling : r.prepend ? i = r.container.firstChild : i = r.before : i = r.tags[r.tags.length - 1].nextSibling, r.container.insertBefore(o, i), r.tags.push(o);
25
+ }, this.isSpeedy = n.speedy === void 0 ? !0 : n.speedy, this.tags = [], this.ctr = 0, this.nonce = n.nonce, this.key = n.key, this.container = n.container, this.prepend = n.prepend, this.insertionPoint = n.insertionPoint, this.before = null;
26
+ }
27
+ var t = e.prototype;
28
+ return t.hydrate = function(r) {
29
+ r.forEach(this._insertTag);
30
+ }, t.insert = function(r) {
31
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Ut(this));
32
+ var o = this.tags[this.tags.length - 1];
33
+ if (this.isSpeedy) {
34
+ var i = Ht(o);
35
+ try {
36
+ i.insertRule(r, i.cssRules.length);
37
+ } catch {
38
+ }
39
+ } else
40
+ o.appendChild(document.createTextNode(r));
41
+ this.ctr++;
42
+ }, t.flush = function() {
43
+ this.tags.forEach(function(r) {
44
+ var o;
45
+ return (o = r.parentNode) == null ? void 0 : o.removeChild(r);
46
+ }), this.tags = [], this.ctr = 0;
47
+ }, e;
48
+ }(), z = "-ms-", he = "-moz-", v = "-webkit-", Je = "comm", Re = "rule", Me = "decl", qt = "@import", Qe = "@keyframes", Zt = "@layer", Xt = Math.abs, me = String.fromCharCode, Jt = Object.assign;
49
+ function Qt(e, t) {
50
+ return A(e, 0) ^ 45 ? (((t << 2 ^ A(e, 0)) << 2 ^ A(e, 1)) << 2 ^ A(e, 2)) << 2 ^ A(e, 3) : 0;
51
+ }
52
+ function et(e) {
53
+ return e.trim();
54
+ }
55
+ function en(e, t) {
56
+ return (e = t.exec(e)) ? e[0] : e;
57
+ }
58
+ function w(e, t, n) {
59
+ return e.replace(t, n);
60
+ }
61
+ function Ce(e, t) {
62
+ return e.indexOf(t);
63
+ }
64
+ function A(e, t) {
65
+ return e.charCodeAt(t) | 0;
66
+ }
67
+ function re(e, t, n) {
68
+ return e.slice(t, n);
69
+ }
70
+ function O(e) {
71
+ return e.length;
72
+ }
73
+ function Ae(e) {
74
+ return e.length;
75
+ }
76
+ function le(e, t) {
77
+ return t.push(e), e;
78
+ }
79
+ function tn(e, t) {
80
+ return e.map(t).join("");
81
+ }
82
+ var ge = 1, G = 1, tt = 0, F = 0, R = 0, q = "";
83
+ function xe(e, t, n, r, o, i, a) {
84
+ return { value: e, root: t, parent: n, type: r, props: o, children: i, line: ge, column: G, length: a, return: "" };
85
+ }
86
+ function X(e, t) {
87
+ return Jt(xe("", null, null, "", null, null, 0), e, { length: -e.length }, t);
88
+ }
89
+ function nn() {
90
+ return R;
91
+ }
92
+ function rn() {
93
+ return R = F > 0 ? A(q, --F) : 0, G--, R === 10 && (G = 1, ge--), R;
94
+ }
95
+ function L() {
96
+ return R = F < tt ? A(q, F++) : 0, G++, R === 10 && (G = 1, ge++), R;
97
+ }
98
+ function D() {
99
+ return A(q, F);
100
+ }
101
+ function fe() {
102
+ return F;
103
+ }
104
+ function ae(e, t) {
105
+ return re(q, e, t);
106
+ }
107
+ function oe(e) {
108
+ switch (e) {
109
+ case 0:
110
+ case 9:
111
+ case 10:
112
+ case 13:
113
+ case 32:
114
+ return 5;
115
+ case 33:
116
+ case 43:
117
+ case 44:
118
+ case 47:
119
+ case 62:
120
+ case 64:
121
+ case 126:
122
+ case 59:
123
+ case 123:
124
+ case 125:
125
+ return 4;
126
+ case 58:
127
+ return 3;
128
+ case 34:
129
+ case 39:
130
+ case 40:
131
+ case 91:
132
+ return 2;
133
+ case 41:
134
+ case 93:
135
+ return 1;
136
+ }
137
+ return 0;
138
+ }
139
+ function nt(e) {
140
+ return ge = G = 1, tt = O(q = e), F = 0, [];
141
+ }
142
+ function rt(e) {
143
+ return q = "", e;
144
+ }
145
+ function ue(e) {
146
+ return et(ae(F - 1, Pe(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
147
+ }
148
+ function on(e) {
149
+ for (; (R = D()) && R < 33; )
150
+ L();
151
+ return oe(e) > 2 || oe(R) > 3 ? "" : " ";
152
+ }
153
+ function an(e, t) {
154
+ for (; --t && L() && !(R < 48 || R > 102 || R > 57 && R < 65 || R > 70 && R < 97); )
155
+ ;
156
+ return ae(e, fe() + (t < 6 && D() == 32 && L() == 32));
157
+ }
158
+ function Pe(e) {
159
+ for (; L(); )
160
+ switch (R) {
161
+ case e:
162
+ return F;
163
+ case 34:
164
+ case 39:
165
+ e !== 34 && e !== 39 && Pe(R);
166
+ break;
167
+ case 40:
168
+ e === 41 && Pe(e);
169
+ break;
170
+ case 92:
171
+ L();
172
+ break;
173
+ }
174
+ return F;
175
+ }
176
+ function sn(e, t) {
177
+ for (; L() && e + R !== 57; )
178
+ if (e + R === 84 && D() === 47)
179
+ break;
180
+ return "/*" + ae(t, F - 1) + "*" + me(e === 47 ? e : L());
181
+ }
182
+ function cn(e) {
183
+ for (; !oe(D()); )
184
+ L();
185
+ return ae(e, F);
186
+ }
187
+ function ln(e) {
188
+ return rt(pe("", null, null, null, [""], e = nt(e), 0, [0], e));
189
+ }
190
+ function pe(e, t, n, r, o, i, a, d, f) {
191
+ for (var u = 0, l = 0, s = a, x = 0, b = 0, y = 0, E = 1, M = 1, $ = 1, T = 0, k = "", _ = o, p = i, N = r, P = k; M; )
192
+ switch (y = T, T = L()) {
193
+ case 40:
194
+ if (y != 108 && A(P, s - 1) == 58) {
195
+ Ce(P += w(ue(T), "&", "&\f"), "&\f") != -1 && ($ = -1);
196
+ break;
197
+ }
198
+ case 34:
199
+ case 39:
200
+ case 91:
201
+ P += ue(T);
202
+ break;
203
+ case 9:
204
+ case 10:
205
+ case 13:
206
+ case 32:
207
+ P += on(y);
208
+ break;
209
+ case 92:
210
+ P += an(fe() - 1, 7);
211
+ continue;
212
+ case 47:
213
+ switch (D()) {
214
+ case 42:
215
+ case 47:
216
+ le(dn(sn(L(), fe()), t, n), f);
217
+ break;
218
+ default:
219
+ P += "/";
220
+ }
221
+ break;
222
+ case 123 * E:
223
+ d[u++] = O(P) * $;
224
+ case 125 * E:
225
+ case 59:
226
+ case 0:
227
+ switch (T) {
228
+ case 0:
229
+ case 125:
230
+ M = 0;
231
+ case 59 + l:
232
+ $ == -1 && (P = w(P, /\f/g, "")), b > 0 && O(P) - s && le(b > 32 ? De(P + ";", r, n, s - 1) : De(w(P, " ", "") + ";", r, n, s - 2), f);
233
+ break;
234
+ case 59:
235
+ P += ";";
236
+ default:
237
+ if (le(N = Ie(P, t, n, u, l, o, d, k, _ = [], p = [], s), i), T === 123)
238
+ if (l === 0)
239
+ pe(P, t, N, N, _, i, s, d, p);
240
+ else
241
+ switch (x === 99 && A(P, 3) === 110 ? 100 : x) {
242
+ case 100:
243
+ case 108:
244
+ case 109:
245
+ case 115:
246
+ pe(e, N, N, r && le(Ie(e, N, N, 0, 0, o, d, k, o, _ = [], s), p), o, p, s, d, r ? _ : p);
247
+ break;
248
+ default:
249
+ pe(P, N, N, N, [""], p, 0, d, p);
250
+ }
251
+ }
252
+ u = l = b = 0, E = $ = 1, k = P = "", s = a;
253
+ break;
254
+ case 58:
255
+ s = 1 + O(P), b = y;
256
+ default:
257
+ if (E < 1) {
258
+ if (T == 123)
259
+ --E;
260
+ else if (T == 125 && E++ == 0 && rn() == 125)
261
+ continue;
262
+ }
263
+ switch (P += me(T), T * E) {
264
+ case 38:
265
+ $ = l > 0 ? 1 : (P += "\f", -1);
266
+ break;
267
+ case 44:
268
+ d[u++] = (O(P) - 1) * $, $ = 1;
269
+ break;
270
+ case 64:
271
+ D() === 45 && (P += ue(L())), x = D(), l = s = O(k = P += cn(fe())), T++;
272
+ break;
273
+ case 45:
274
+ y === 45 && O(P) == 2 && (E = 0);
275
+ }
276
+ }
277
+ return i;
278
+ }
279
+ function Ie(e, t, n, r, o, i, a, d, f, u, l) {
280
+ for (var s = o - 1, x = o === 0 ? i : [""], b = Ae(x), y = 0, E = 0, M = 0; y < r; ++y)
281
+ for (var $ = 0, T = re(e, s + 1, s = Xt(E = a[y])), k = e; $ < b; ++$)
282
+ (k = et(E > 0 ? x[$] + " " + T : w(T, /&\f/g, x[$]))) && (f[M++] = k);
283
+ return xe(e, t, n, o === 0 ? Re : d, f, u, l);
284
+ }
285
+ function dn(e, t, n) {
286
+ return xe(e, t, n, Je, me(nn()), re(e, 2, -2), 0);
287
+ }
288
+ function De(e, t, n, r) {
289
+ return xe(e, t, n, Me, re(e, 0, r), re(e, r + 1, -1), r);
290
+ }
291
+ function U(e, t) {
292
+ for (var n = "", r = Ae(e), o = 0; o < r; o++)
293
+ n += t(e[o], o, e, t) || "";
294
+ return n;
295
+ }
296
+ function fn(e, t, n, r) {
297
+ switch (e.type) {
298
+ case Zt:
299
+ if (e.children.length)
300
+ break;
301
+ case qt:
302
+ case Me:
303
+ return e.return = e.return || e.value;
304
+ case Je:
305
+ return "";
306
+ case Qe:
307
+ return e.return = e.value + "{" + U(e.children, r) + "}";
308
+ case Re:
309
+ e.value = e.props.join(",");
310
+ }
311
+ return O(n = U(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
312
+ }
313
+ function un(e) {
314
+ var t = Ae(e);
315
+ return function(n, r, o, i) {
316
+ for (var a = "", d = 0; d < t; d++)
317
+ a += e[d](n, r, o, i) || "";
318
+ return a;
319
+ };
320
+ }
321
+ function pn(e) {
322
+ return function(t) {
323
+ t.root || (t = t.return) && e(t);
324
+ };
325
+ }
326
+ var hn = function(t, n, r) {
327
+ for (var o = 0, i = 0; o = i, i = D(), o === 38 && i === 12 && (n[r] = 1), !oe(i); )
328
+ L();
329
+ return ae(t, F);
330
+ }, mn = function(t, n) {
331
+ var r = -1, o = 44;
332
+ do
333
+ switch (oe(o)) {
334
+ case 0:
335
+ o === 38 && D() === 12 && (n[r] = 1), t[r] += hn(F - 1, n, r);
336
+ break;
337
+ case 2:
338
+ t[r] += ue(o);
339
+ break;
340
+ case 4:
341
+ if (o === 44) {
342
+ t[++r] = D() === 58 ? "&\f" : "", n[r] = t[r].length;
343
+ break;
344
+ }
345
+ default:
346
+ t[r] += me(o);
347
+ }
348
+ while (o = L());
349
+ return t;
350
+ }, gn = function(t, n) {
351
+ return rt(mn(nt(t), n));
352
+ }, Ve = /* @__PURE__ */ new WeakMap(), xn = function(t) {
353
+ if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
354
+ // negative .length indicates that this rule has been already prefixed
355
+ t.length < 1)) {
356
+ for (var n = t.value, r = t.parent, o = t.column === r.column && t.line === r.line; r.type !== "rule"; )
357
+ if (r = r.parent, !r)
358
+ return;
359
+ if (!(t.props.length === 1 && n.charCodeAt(0) !== 58 && !Ve.get(r)) && !o) {
360
+ Ve.set(t, !0);
361
+ for (var i = [], a = gn(n, i), d = r.props, f = 0, u = 0; f < a.length; f++)
362
+ for (var l = 0; l < d.length; l++, u++)
363
+ t.props[u] = i[f] ? a[f].replace(/&\f/g, d[l]) : d[l] + " " + a[f];
364
+ }
365
+ }
366
+ }, yn = function(t) {
367
+ if (t.type === "decl") {
368
+ var n = t.value;
369
+ // charcode for l
370
+ n.charCodeAt(0) === 108 && // charcode for b
371
+ n.charCodeAt(2) === 98 && (t.return = "", t.value = "");
372
+ }
373
+ };
374
+ function ot(e, t) {
375
+ switch (Qt(e, t)) {
376
+ case 5103:
377
+ return v + "print-" + e + e;
378
+ case 5737:
379
+ case 4201:
380
+ case 3177:
381
+ case 3433:
382
+ case 1641:
383
+ case 4457:
384
+ case 2921:
385
+ case 5572:
386
+ case 6356:
387
+ case 5844:
388
+ case 3191:
389
+ case 6645:
390
+ case 3005:
391
+ case 6391:
392
+ case 5879:
393
+ case 5623:
394
+ case 6135:
395
+ case 4599:
396
+ case 4855:
397
+ case 4215:
398
+ case 6389:
399
+ case 5109:
400
+ case 5365:
401
+ case 5621:
402
+ case 3829:
403
+ return v + e + e;
404
+ case 5349:
405
+ case 4246:
406
+ case 4810:
407
+ case 6968:
408
+ case 2756:
409
+ return v + e + he + e + z + e + e;
410
+ case 6828:
411
+ case 4268:
412
+ return v + e + z + e + e;
413
+ case 6165:
414
+ return v + e + z + "flex-" + e + e;
415
+ case 5187:
416
+ return v + e + w(e, /(\w+).+(:[^]+)/, v + "box-$1$2" + z + "flex-$1$2") + e;
417
+ case 5443:
418
+ return v + e + z + "flex-item-" + w(e, /flex-|-self/, "") + e;
419
+ case 4675:
420
+ return v + e + z + "flex-line-pack" + w(e, /align-content|flex-|-self/, "") + e;
421
+ case 5548:
422
+ return v + e + z + w(e, "shrink", "negative") + e;
423
+ case 5292:
424
+ return v + e + z + w(e, "basis", "preferred-size") + e;
425
+ case 6060:
426
+ return v + "box-" + w(e, "-grow", "") + v + e + z + w(e, "grow", "positive") + e;
427
+ case 4554:
428
+ return v + w(e, /([^-])(transform)/g, "$1" + v + "$2") + e;
429
+ case 6187:
430
+ return w(w(w(e, /(zoom-|grab)/, v + "$1"), /(image-set)/, v + "$1"), e, "") + e;
431
+ case 5495:
432
+ case 3959:
433
+ return w(e, /(image-set\([^]*)/, v + "$1$`$1");
434
+ case 4968:
435
+ return w(w(e, /(.+:)(flex-)?(.*)/, v + "box-pack:$3" + z + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + v + e + e;
436
+ case 4095:
437
+ case 3583:
438
+ case 4068:
439
+ case 2532:
440
+ return w(e, /(.+)-inline(.+)/, v + "$1$2") + e;
441
+ case 8116:
442
+ case 7059:
443
+ case 5753:
444
+ case 5535:
445
+ case 5445:
446
+ case 5701:
447
+ case 4933:
448
+ case 4677:
449
+ case 5533:
450
+ case 5789:
451
+ case 5021:
452
+ case 4765:
453
+ if (O(e) - 1 - t > 6)
454
+ switch (A(e, t + 1)) {
455
+ case 109:
456
+ if (A(e, t + 4) !== 45)
457
+ break;
458
+ case 102:
459
+ return w(e, /(.+:)(.+)-([^]+)/, "$1" + v + "$2-$3$1" + he + (A(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
460
+ case 115:
461
+ return ~Ce(e, "stretch") ? ot(w(e, "stretch", "fill-available"), t) + e : e;
462
+ }
463
+ break;
464
+ case 4949:
465
+ if (A(e, t + 1) !== 115)
466
+ break;
467
+ case 6444:
468
+ switch (A(e, O(e) - 3 - (~Ce(e, "!important") && 10))) {
469
+ case 107:
470
+ return w(e, ":", ":" + v) + e;
471
+ case 101:
472
+ return w(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + v + (A(e, 14) === 45 ? "inline-" : "") + "box$3$1" + v + "$2$3$1" + z + "$2box$3") + e;
473
+ }
474
+ break;
475
+ case 5936:
476
+ switch (A(e, t + 11)) {
477
+ case 114:
478
+ return v + e + z + w(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
479
+ case 108:
480
+ return v + e + z + w(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
481
+ case 45:
482
+ return v + e + z + w(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
483
+ }
484
+ return v + e + z + e + e;
485
+ }
486
+ return e;
487
+ }
488
+ var bn = function(t, n, r, o) {
489
+ if (t.length > -1 && !t.return)
490
+ switch (t.type) {
491
+ case Me:
492
+ t.return = ot(t.value, t.length);
493
+ break;
494
+ case Qe:
495
+ return U([X(t, {
496
+ value: w(t.value, "@", "@" + v)
497
+ })], o);
498
+ case Re:
499
+ if (t.length)
500
+ return tn(t.props, function(i) {
501
+ switch (en(i, /(::plac\w+|:read-\w+)/)) {
502
+ case ":read-only":
503
+ case ":read-write":
504
+ return U([X(t, {
505
+ props: [w(i, /:(read-\w+)/, ":" + he + "$1")]
506
+ })], o);
507
+ case "::placeholder":
508
+ return U([X(t, {
509
+ props: [w(i, /:(plac\w+)/, ":" + v + "input-$1")]
510
+ }), X(t, {
511
+ props: [w(i, /:(plac\w+)/, ":" + he + "$1")]
512
+ }), X(t, {
513
+ props: [w(i, /:(plac\w+)/, z + "input-$1")]
514
+ })], o);
515
+ }
516
+ return "";
517
+ });
518
+ }
519
+ }, vn = [bn], wn = function(t) {
520
+ var n = t.key;
521
+ if (n === "css") {
522
+ var r = document.querySelectorAll("style[data-emotion]:not([data-s])");
523
+ Array.prototype.forEach.call(r, function(E) {
524
+ var M = E.getAttribute("data-emotion");
525
+ M.indexOf(" ") !== -1 && (document.head.appendChild(E), E.setAttribute("data-s", ""));
526
+ });
527
+ }
528
+ var o = t.stylisPlugins || vn, i = {}, a, d = [];
529
+ a = t.container || document.head, Array.prototype.forEach.call(
530
+ // this means we will ignore elements which don't have a space in them which
531
+ // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
532
+ document.querySelectorAll('style[data-emotion^="' + n + ' "]'),
533
+ function(E) {
534
+ for (var M = E.getAttribute("data-emotion").split(" "), $ = 1; $ < M.length; $++)
535
+ i[M[$]] = !0;
536
+ d.push(E);
537
+ }
538
+ );
539
+ var f, u = [xn, yn];
540
+ {
541
+ var l, s = [fn, pn(function(E) {
542
+ l.insert(E);
543
+ })], x = un(u.concat(o, s)), b = function(M) {
544
+ return U(ln(M), x);
545
+ };
546
+ f = function(M, $, T, k) {
547
+ l = T, b(M ? M + "{" + $.styles + "}" : $.styles), k && (y.inserted[$.name] = !0);
548
+ };
549
+ }
550
+ var y = {
551
+ key: n,
552
+ sheet: new Gt({
553
+ key: n,
554
+ container: a,
555
+ nonce: t.nonce,
556
+ speedy: t.speedy,
557
+ prepend: t.prepend,
558
+ insertionPoint: t.insertionPoint
559
+ }),
560
+ nonce: t.nonce,
561
+ inserted: i,
562
+ registered: {},
563
+ insert: f
564
+ };
565
+ return y.sheet.hydrate(d), y;
566
+ }, ke = { exports: {} }, S = {};
567
+ /** @license React v16.13.1
568
+ * react-is.production.min.js
569
+ *
570
+ * Copyright (c) Facebook, Inc. and its affiliates.
571
+ *
572
+ * This source code is licensed under the MIT license found in the
573
+ * LICENSE file in the root directory of this source tree.
574
+ */
575
+ var je;
576
+ function En() {
577
+ if (je)
578
+ return S;
579
+ je = 1;
580
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, d = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, l = e ? Symbol.for("react.forward_ref") : 60112, s = e ? Symbol.for("react.suspense") : 60113, x = e ? Symbol.for("react.suspense_list") : 60120, b = e ? Symbol.for("react.memo") : 60115, y = e ? Symbol.for("react.lazy") : 60116, E = e ? Symbol.for("react.block") : 60121, M = e ? Symbol.for("react.fundamental") : 60117, $ = e ? Symbol.for("react.responder") : 60118, T = e ? Symbol.for("react.scope") : 60119;
581
+ function k(p) {
582
+ if (typeof p == "object" && p !== null) {
583
+ var N = p.$$typeof;
584
+ switch (N) {
585
+ case t:
586
+ switch (p = p.type, p) {
587
+ case f:
588
+ case u:
589
+ case r:
590
+ case i:
591
+ case o:
592
+ case s:
593
+ return p;
594
+ default:
595
+ switch (p = p && p.$$typeof, p) {
596
+ case d:
597
+ case l:
598
+ case y:
599
+ case b:
600
+ case a:
601
+ return p;
602
+ default:
603
+ return N;
604
+ }
605
+ }
606
+ case n:
607
+ return N;
608
+ }
609
+ }
610
+ }
611
+ function _(p) {
612
+ return k(p) === u;
613
+ }
614
+ return S.AsyncMode = f, S.ConcurrentMode = u, S.ContextConsumer = d, S.ContextProvider = a, S.Element = t, S.ForwardRef = l, S.Fragment = r, S.Lazy = y, S.Memo = b, S.Portal = n, S.Profiler = i, S.StrictMode = o, S.Suspense = s, S.isAsyncMode = function(p) {
615
+ return _(p) || k(p) === f;
616
+ }, S.isConcurrentMode = _, S.isContextConsumer = function(p) {
617
+ return k(p) === d;
618
+ }, S.isContextProvider = function(p) {
619
+ return k(p) === a;
620
+ }, S.isElement = function(p) {
621
+ return typeof p == "object" && p !== null && p.$$typeof === t;
622
+ }, S.isForwardRef = function(p) {
623
+ return k(p) === l;
624
+ }, S.isFragment = function(p) {
625
+ return k(p) === r;
626
+ }, S.isLazy = function(p) {
627
+ return k(p) === y;
628
+ }, S.isMemo = function(p) {
629
+ return k(p) === b;
630
+ }, S.isPortal = function(p) {
631
+ return k(p) === n;
632
+ }, S.isProfiler = function(p) {
633
+ return k(p) === i;
634
+ }, S.isStrictMode = function(p) {
635
+ return k(p) === o;
636
+ }, S.isSuspense = function(p) {
637
+ return k(p) === s;
638
+ }, S.isValidElementType = function(p) {
639
+ return typeof p == "string" || typeof p == "function" || p === r || p === u || p === i || p === o || p === s || p === x || typeof p == "object" && p !== null && (p.$$typeof === y || p.$$typeof === b || p.$$typeof === a || p.$$typeof === d || p.$$typeof === l || p.$$typeof === M || p.$$typeof === $ || p.$$typeof === T || p.$$typeof === E);
640
+ }, S.typeOf = k, S;
641
+ }
642
+ var C = {};
643
+ /** @license React v16.13.1
644
+ * react-is.development.js
645
+ *
646
+ * Copyright (c) Facebook, Inc. and its affiliates.
647
+ *
648
+ * This source code is licensed under the MIT license found in the
649
+ * LICENSE file in the root directory of this source tree.
650
+ */
651
+ var Be;
652
+ function Sn() {
653
+ return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
654
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, d = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, l = e ? Symbol.for("react.forward_ref") : 60112, s = e ? Symbol.for("react.suspense") : 60113, x = e ? Symbol.for("react.suspense_list") : 60120, b = e ? Symbol.for("react.memo") : 60115, y = e ? Symbol.for("react.lazy") : 60116, E = e ? Symbol.for("react.block") : 60121, M = e ? Symbol.for("react.fundamental") : 60117, $ = e ? Symbol.for("react.responder") : 60118, T = e ? Symbol.for("react.scope") : 60119;
655
+ function k(m) {
656
+ return typeof m == "string" || typeof m == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
657
+ m === r || m === u || m === i || m === o || m === s || m === x || typeof m == "object" && m !== null && (m.$$typeof === y || m.$$typeof === b || m.$$typeof === a || m.$$typeof === d || m.$$typeof === l || m.$$typeof === M || m.$$typeof === $ || m.$$typeof === T || m.$$typeof === E);
658
+ }
659
+ function _(m) {
660
+ if (typeof m == "object" && m !== null) {
661
+ var be = m.$$typeof;
662
+ switch (be) {
663
+ case t:
664
+ var ce = m.type;
665
+ switch (ce) {
666
+ case f:
667
+ case u:
668
+ case r:
669
+ case i:
670
+ case o:
671
+ case s:
672
+ return ce;
673
+ default:
674
+ var Oe = ce && ce.$$typeof;
675
+ switch (Oe) {
676
+ case d:
677
+ case l:
678
+ case y:
679
+ case b:
680
+ case a:
681
+ return Oe;
682
+ default:
683
+ return be;
684
+ }
685
+ }
686
+ case n:
687
+ return be;
688
+ }
689
+ }
690
+ }
691
+ var p = f, N = u, P = d, mt = a, gt = t, xt = l, yt = r, bt = y, vt = b, wt = n, Et = i, St = o, Ct = s, Fe = !1;
692
+ function Pt(m) {
693
+ return Fe || (Fe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Le(m) || _(m) === f;
694
+ }
695
+ function Le(m) {
696
+ return _(m) === u;
697
+ }
698
+ function kt(m) {
699
+ return _(m) === d;
700
+ }
701
+ function $t(m) {
702
+ return _(m) === a;
703
+ }
704
+ function _t(m) {
705
+ return typeof m == "object" && m !== null && m.$$typeof === t;
706
+ }
707
+ function Tt(m) {
708
+ return _(m) === l;
709
+ }
710
+ function Rt(m) {
711
+ return _(m) === r;
712
+ }
713
+ function Mt(m) {
714
+ return _(m) === y;
715
+ }
716
+ function At(m) {
717
+ return _(m) === b;
718
+ }
719
+ function Nt(m) {
720
+ return _(m) === n;
721
+ }
722
+ function zt(m) {
723
+ return _(m) === i;
724
+ }
725
+ function Ft(m) {
726
+ return _(m) === o;
727
+ }
728
+ function Lt(m) {
729
+ return _(m) === s;
730
+ }
731
+ C.AsyncMode = p, C.ConcurrentMode = N, C.ContextConsumer = P, C.ContextProvider = mt, C.Element = gt, C.ForwardRef = xt, C.Fragment = yt, C.Lazy = bt, C.Memo = vt, C.Portal = wt, C.Profiler = Et, C.StrictMode = St, C.Suspense = Ct, C.isAsyncMode = Pt, C.isConcurrentMode = Le, C.isContextConsumer = kt, C.isContextProvider = $t, C.isElement = _t, C.isForwardRef = Tt, C.isFragment = Rt, C.isLazy = Mt, C.isMemo = At, C.isPortal = Nt, C.isProfiler = zt, C.isStrictMode = Ft, C.isSuspense = Lt, C.isValidElementType = k, C.typeOf = _;
732
+ }()), C;
733
+ }
734
+ process.env.NODE_ENV === "production" ? ke.exports = En() : ke.exports = Sn();
735
+ var Cn = ke.exports, it = Cn, Pn = {
736
+ $$typeof: !0,
737
+ render: !0,
738
+ defaultProps: !0,
739
+ displayName: !0,
740
+ propTypes: !0
741
+ }, kn = {
742
+ $$typeof: !0,
743
+ compare: !0,
744
+ defaultProps: !0,
745
+ displayName: !0,
746
+ propTypes: !0,
747
+ type: !0
748
+ }, at = {};
749
+ at[it.ForwardRef] = Pn;
750
+ at[it.Memo] = kn;
751
+ var $n = !0;
752
+ function _n(e, t, n) {
753
+ var r = "";
754
+ return n.split(" ").forEach(function(o) {
755
+ e[o] !== void 0 ? t.push(e[o] + ";") : o && (r += o + " ");
756
+ }), r;
757
+ }
758
+ var st = function(t, n, r) {
759
+ var o = t.key + "-" + n.name;
760
+ // we only need to add the styles to the registered cache if the
761
+ // class name could be used further down
762
+ // the tree but if it's a string tag, we know it won't
763
+ // so we don't have to add it to registered cache.
764
+ // this improves memory usage since we can avoid storing the whole style string
765
+ (r === !1 || // we need to always store it if we're in compat mode and
766
+ // in node since emotion-server relies on whether a style is in
767
+ // the registered cache to know whether a style is global or not
768
+ // also, note that this check will be dead code eliminated in the browser
769
+ $n === !1) && t.registered[o] === void 0 && (t.registered[o] = n.styles);
770
+ }, Tn = function(t, n, r) {
771
+ st(t, n, r);
772
+ var o = t.key + "-" + n.name;
773
+ if (t.inserted[n.name] === void 0) {
774
+ var i = n;
775
+ do
776
+ t.insert(n === i ? "." + o : "", i, t.sheet, !0), i = i.next;
777
+ while (i !== void 0);
778
+ }
779
+ };
780
+ function Rn(e) {
781
+ for (var t = 0, n, r = 0, o = e.length; o >= 4; ++r, o -= 4)
782
+ n = e.charCodeAt(r) & 255 | (e.charCodeAt(++r) & 255) << 8 | (e.charCodeAt(++r) & 255) << 16 | (e.charCodeAt(++r) & 255) << 24, n = /* Math.imul(k, m): */
783
+ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
784
+ n >>> 24, t = /* Math.imul(k, m): */
785
+ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
786
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
787
+ switch (o) {
788
+ case 3:
789
+ t ^= (e.charCodeAt(r + 2) & 255) << 16;
790
+ case 2:
791
+ t ^= (e.charCodeAt(r + 1) & 255) << 8;
792
+ case 1:
793
+ t ^= e.charCodeAt(r) & 255, t = /* Math.imul(h, m): */
794
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
795
+ }
796
+ return t ^= t >>> 13, t = /* Math.imul(h, m): */
797
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
798
+ }
799
+ var Mn = {
800
+ animationIterationCount: 1,
801
+ aspectRatio: 1,
802
+ borderImageOutset: 1,
803
+ borderImageSlice: 1,
804
+ borderImageWidth: 1,
805
+ boxFlex: 1,
806
+ boxFlexGroup: 1,
807
+ boxOrdinalGroup: 1,
808
+ columnCount: 1,
809
+ columns: 1,
810
+ flex: 1,
811
+ flexGrow: 1,
812
+ flexPositive: 1,
813
+ flexShrink: 1,
814
+ flexNegative: 1,
815
+ flexOrder: 1,
816
+ gridRow: 1,
817
+ gridRowEnd: 1,
818
+ gridRowSpan: 1,
819
+ gridRowStart: 1,
820
+ gridColumn: 1,
821
+ gridColumnEnd: 1,
822
+ gridColumnSpan: 1,
823
+ gridColumnStart: 1,
824
+ msGridRow: 1,
825
+ msGridRowSpan: 1,
826
+ msGridColumn: 1,
827
+ msGridColumnSpan: 1,
828
+ fontWeight: 1,
829
+ lineHeight: 1,
830
+ opacity: 1,
831
+ order: 1,
832
+ orphans: 1,
833
+ scale: 1,
834
+ tabSize: 1,
835
+ widows: 1,
836
+ zIndex: 1,
837
+ zoom: 1,
838
+ WebkitLineClamp: 1,
839
+ // SVG-related properties
840
+ fillOpacity: 1,
841
+ floodOpacity: 1,
842
+ stopOpacity: 1,
843
+ strokeDasharray: 1,
844
+ strokeDashoffset: 1,
845
+ strokeMiterlimit: 1,
846
+ strokeOpacity: 1,
847
+ strokeWidth: 1
848
+ };
849
+ function An(e) {
850
+ var t = /* @__PURE__ */ Object.create(null);
851
+ return function(n) {
852
+ return t[n] === void 0 && (t[n] = e(n)), t[n];
853
+ };
854
+ }
855
+ var Nn = /[A-Z]|^ms/g, zn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, ct = function(t) {
856
+ return t.charCodeAt(1) === 45;
857
+ }, Ke = function(t) {
858
+ return t != null && typeof t != "boolean";
859
+ }, ve = /* @__PURE__ */ An(function(e) {
860
+ return ct(e) ? e : e.replace(Nn, "-$&").toLowerCase();
861
+ }), Ye = function(t, n) {
862
+ switch (t) {
863
+ case "animation":
864
+ case "animationName":
865
+ if (typeof n == "string")
866
+ return n.replace(zn, function(r, o, i) {
867
+ return I = {
868
+ name: o,
869
+ styles: i,
870
+ next: I
871
+ }, o;
872
+ });
873
+ }
874
+ return Mn[t] !== 1 && !ct(t) && typeof n == "number" && n !== 0 ? n + "px" : n;
875
+ };
876
+ function ie(e, t, n) {
877
+ if (n == null)
878
+ return "";
879
+ var r = n;
880
+ if (r.__emotion_styles !== void 0)
881
+ return r;
882
+ switch (typeof n) {
883
+ case "boolean":
884
+ return "";
885
+ case "object": {
886
+ var o = n;
887
+ if (o.anim === 1)
888
+ return I = {
889
+ name: o.name,
890
+ styles: o.styles,
891
+ next: I
892
+ }, o.name;
893
+ var i = n;
894
+ if (i.styles !== void 0) {
895
+ var a = i.next;
896
+ if (a !== void 0)
897
+ for (; a !== void 0; )
898
+ I = {
899
+ name: a.name,
900
+ styles: a.styles,
901
+ next: I
902
+ }, a = a.next;
903
+ var d = i.styles + ";";
904
+ return d;
905
+ }
906
+ return Fn(e, t, n);
907
+ }
908
+ case "function": {
909
+ if (e !== void 0) {
910
+ var f = I, u = n(e);
911
+ return I = f, ie(e, t, u);
912
+ }
913
+ break;
914
+ }
915
+ }
916
+ var l = n;
917
+ return l;
918
+ }
919
+ function Fn(e, t, n) {
920
+ var r = "";
921
+ if (Array.isArray(n))
922
+ for (var o = 0; o < n.length; o++)
923
+ r += ie(e, t, n[o]) + ";";
924
+ else
925
+ for (var i in n) {
926
+ var a = n[i];
927
+ if (typeof a != "object") {
928
+ var d = a;
929
+ Ke(d) && (r += ve(i) + ":" + Ye(i, d) + ";");
930
+ } else if (Array.isArray(a) && typeof a[0] == "string" && t == null)
931
+ for (var f = 0; f < a.length; f++)
932
+ Ke(a[f]) && (r += ve(i) + ":" + Ye(i, a[f]) + ";");
933
+ else {
934
+ var u = ie(e, t, a);
935
+ switch (i) {
936
+ case "animation":
937
+ case "animationName": {
938
+ r += ve(i) + ":" + u + ";";
939
+ break;
940
+ }
941
+ default:
942
+ r += i + "{" + u + "}";
943
+ }
944
+ }
945
+ }
946
+ return r;
947
+ }
948
+ var We = /label:\s*([^\s;{]+)\s*(;|$)/g, I;
949
+ function He(e, t, n) {
950
+ if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
951
+ return e[0];
952
+ var r = !0, o = "";
953
+ I = void 0;
954
+ var i = e[0];
955
+ if (i == null || i.raw === void 0)
956
+ r = !1, o += ie(n, t, i);
957
+ else {
958
+ var a = i;
959
+ o += a[0];
960
+ }
961
+ for (var d = 1; d < e.length; d++)
962
+ if (o += ie(n, t, e[d]), r) {
963
+ var f = i;
964
+ o += f[d];
965
+ }
966
+ We.lastIndex = 0;
967
+ for (var u = "", l; (l = We.exec(o)) !== null; )
968
+ u += "-" + l[1];
969
+ var s = Rn(o) + u;
970
+ return {
971
+ name: s,
972
+ styles: o,
973
+ next: I
974
+ };
975
+ }
976
+ var Ln = function(t) {
977
+ return t();
978
+ }, On = V.useInsertionEffect ? V.useInsertionEffect : !1, In = On || Ln, ye = {}.hasOwnProperty, Ne = /* @__PURE__ */ V.createContext(
979
+ // we're doing this to avoid preconstruct's dead code elimination in this one case
980
+ // because this module is primarily intended for the browser and node
981
+ // but it's also required in react native and similar environments sometimes
982
+ // and we could have a special build just for that
983
+ // but this is much easier and the native packages
984
+ // might use a different theme context in the future anyway
985
+ typeof HTMLElement < "u" ? /* @__PURE__ */ wn({
986
+ key: "css"
987
+ }) : null
988
+ );
989
+ process.env.NODE_ENV !== "production" && (Ne.displayName = "EmotionCacheContext");
990
+ Ne.Provider;
991
+ var Dn = function(t) {
992
+ return /* @__PURE__ */ Ot(function(n, r) {
993
+ var o = Xe(Ne);
994
+ return t(n, o, r);
995
+ });
996
+ }, lt = /* @__PURE__ */ V.createContext({});
997
+ process.env.NODE_ENV !== "production" && (lt.displayName = "EmotionThemeContext");
998
+ var Ue = function(t) {
999
+ var n = t.split(".");
1000
+ return n[n.length - 1];
1001
+ }, Vn = function(t) {
1002
+ var n = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(t);
1003
+ if (n || (n = /^([A-Za-z0-9$.]+)@/.exec(t), n))
1004
+ return Ue(n[1]);
1005
+ }, jn = /* @__PURE__ */ new Set(["renderWithHooks", "processChild", "finishClassComponent", "renderToString"]), Bn = function(t) {
1006
+ return t.replace(/\$/g, "-");
1007
+ }, Kn = function(t) {
1008
+ if (t)
1009
+ for (var n = t.split(`
1010
+ `), r = 0; r < n.length; r++) {
1011
+ var o = Vn(n[r]);
1012
+ if (o) {
1013
+ if (jn.has(o))
1014
+ break;
1015
+ if (/^[A-Z]/.test(o))
1016
+ return Bn(o);
1017
+ }
1018
+ }
1019
+ }, $e = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", _e = "__EMOTION_LABEL_PLEASE_DO_NOT_USE__", dt = function(t, n) {
1020
+ if (process.env.NODE_ENV !== "production" && typeof n.css == "string" && // check if there is a css declaration
1021
+ n.css.indexOf(":") !== -1)
1022
+ throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`" + n.css + "`");
1023
+ var r = {};
1024
+ for (var o in n)
1025
+ ye.call(n, o) && (r[o] = n[o]);
1026
+ if (r[$e] = t, process.env.NODE_ENV !== "production" && n.css && (typeof n.css != "object" || typeof n.css.name != "string" || n.css.name.indexOf("-") === -1)) {
1027
+ var i = Kn(new Error().stack);
1028
+ i && (r[_e] = i);
1029
+ }
1030
+ return r;
1031
+ }, Yn = function(t) {
1032
+ var n = t.cache, r = t.serialized, o = t.isStringTag;
1033
+ return st(n, r, o), In(function() {
1034
+ return Tn(n, r, o);
1035
+ }), null;
1036
+ }, ft = /* @__PURE__ */ Dn(function(e, t, n) {
1037
+ var r = e.css;
1038
+ typeof r == "string" && t.registered[r] !== void 0 && (r = t.registered[r]);
1039
+ var o = e[$e], i = [r], a = "";
1040
+ typeof e.className == "string" ? a = _n(t.registered, i, e.className) : e.className != null && (a = e.className + " ");
1041
+ var d = He(i, void 0, V.useContext(lt));
1042
+ if (process.env.NODE_ENV !== "production" && d.name.indexOf("-") === -1) {
1043
+ var f = e[_e];
1044
+ f && (d = He([d, "label:" + f + ";"]));
1045
+ }
1046
+ a += t.key + "-" + d.name;
1047
+ var u = {};
1048
+ for (var l in e)
1049
+ ye.call(e, l) && l !== "css" && l !== $e && (process.env.NODE_ENV === "production" || l !== _e) && (u[l] = e[l]);
1050
+ return u.ref = n, u.className = a, /* @__PURE__ */ V.createElement(V.Fragment, null, /* @__PURE__ */ V.createElement(Yn, {
1051
+ cache: t,
1052
+ serialized: d,
1053
+ isStringTag: typeof o == "string"
1054
+ }), /* @__PURE__ */ V.createElement(o, u));
1055
+ });
1056
+ process.env.NODE_ENV !== "production" && (ft.displayName = "EmotionCssPropInternal");
1057
+ var ut = ft, K = ee.Fragment;
1058
+ function c(e, t, n) {
1059
+ return ye.call(t, "css") ? ee.jsx(ut, dt(e, t), n) : ee.jsx(e, t, n);
1060
+ }
1061
+ function g(e, t, n) {
1062
+ return ye.call(t, "css") ? ee.jsxs(ut, dt(e, t), n) : ee.jsxs(e, t, n);
1063
+ }
1064
+ const pt = It(void 0), Ge = h.div`
1065
+ padding-inline: 20px;
1066
+ width: 100%;
1067
+ height: 100vh;
1068
+ display: flex;
1069
+ flex-direction: column;
1070
+ align-items: center;
1071
+ justify-content: center;
1072
+ position: fixed;
1073
+ font-size: 14px;
1074
+ top: 0;
1075
+ left: 0;
1076
+ z-index: 10000;
1077
+ `, Jr = ({ remotesOverride: e, onBeforeInitialize: t, pluginConfig: n, children: r }) => {
1078
+ const [o, i] = B(), [a, d] = B(null);
1079
+ return te(() => {
1080
+ (async () => {
1081
+ var u, l;
1082
+ try {
1083
+ t && (console.log(
1084
+ "KosPluginProvider: Waiting for pre-initialization conditions..."
1085
+ ), await t(), console.log("KosPluginProvider: Pre-initialization complete"));
1086
+ let s = e;
1087
+ const x = (u = window.KosPlugins) == null ? void 0 : u.__dynamicRemotes;
1088
+ s || (x && Object.keys(x).length > 0 ? (console.log(
1089
+ "KosPluginProvider: Using existing plugin initialization"
1090
+ ), s = x) : (console.log("KosPluginProvider: Initializing plugins..."), await Vt(n), s = (l = window.KosPlugins) == null ? void 0 : l.__dynamicRemotes));
1091
+ const b = await jt(s);
1092
+ i(b);
1093
+ } catch (s) {
1094
+ console.error("KosPluginProvider: Failed to initialize plugins", s), d(s);
1095
+ }
1096
+ })();
1097
+ }, [e, t, n]), a ? /* @__PURE__ */ g(Ge, { children: [
1098
+ /* @__PURE__ */ c("div", { children: "Failed to load plugins" }),
1099
+ /* @__PURE__ */ c("div", { style: { fontSize: "12px", marginTop: "10px", opacity: 0.8 }, children: a.message })
1100
+ ] }) : /* @__PURE__ */ c(pt.Provider, { value: o, children: o ? r : /* @__PURE__ */ c(Ge, { children: "Loading remote plugins..." }) });
1101
+ }, se = () => {
1102
+ const e = Xe(pt);
1103
+ if (!e)
1104
+ throw new Error(
1105
+ "useKosPluginsContext must be used within a KosPluginProvider"
1106
+ );
1107
+ return e;
1108
+ }, Wn = (e) => {
1109
+ var t;
1110
+ return ((t = e == null ? void 0 : e.view) == null ? void 0 : t.component) !== void 0;
1111
+ }, Hn = ({
1112
+ extension: e,
1113
+ module: t
1114
+ }) => {
1115
+ const { extensions: n } = se(), [r, o] = B(
1116
+ null
1117
+ ), [i, a] = B(null);
1118
+ return te(() => {
1119
+ async function d() {
1120
+ const f = Se(n == null ? void 0 : n[e], t);
1121
+ a(f ?? null);
1122
+ const u = (f == null ? void 0 : f.remote) || "", l = Wn(f) ? f.view.component : f == null ? void 0 : f.component, s = l ? `./${l}` : "";
1123
+ if (!u)
1124
+ return;
1125
+ const x = Y.lazy(() => Bt.loadRemoteModule(u, s));
1126
+ o(x);
1127
+ }
1128
+ d();
1129
+ }, [n, t, e]), [r, i];
1130
+ };
1131
+ class Un extends Y.Component {
1132
+ constructor(t) {
1133
+ super(t), this.state = { hasError: !1 };
1134
+ }
1135
+ static getDerivedStateFromError() {
1136
+ return { hasError: !0 };
1137
+ }
1138
+ componentDidCatch(t, n) {
1139
+ console.error("ErrorBoundary caught an error:", t, n);
1140
+ }
1141
+ render() {
1142
+ return this.state.hasError ? this.props.fallback : this.props.children;
1143
+ }
1144
+ }
1145
+ const Gn = h.div`
1146
+ align-items: center;
1147
+ display: flex;
1148
+ height: 100%;
1149
+ justify-content: center;
1150
+ width: 100%;
1151
+ `, qn = h.div`
1152
+ align-items: center;
1153
+ background-color: transparent;
1154
+ display: flex;
1155
+ flex-direction: column;
1156
+ height: ${(e) => e.height};
1157
+ justify-content: center;
1158
+ width: ${(e) => e.width};
1159
+ `, ze = ({
1160
+ extension: e,
1161
+ fallback: t,
1162
+ module: n,
1163
+ props: r
1164
+ }) => {
1165
+ const [o, i] = Hn({
1166
+ extension: e,
1167
+ module: n
1168
+ });
1169
+ if (!o)
1170
+ return null;
1171
+ const a = t || /* @__PURE__ */ c(Gn, { children: `Dynamic component, ${e}, not found...` });
1172
+ return /* @__PURE__ */ c(Un, { fallback: a, children: /* @__PURE__ */ c(
1173
+ Dt,
1174
+ {
1175
+ fallback: i != null && i.size ? /* @__PURE__ */ c(
1176
+ qn,
1177
+ {
1178
+ width: i.size.width,
1179
+ height: i.size.height
1180
+ }
1181
+ ) : null,
1182
+ children: /* @__PURE__ */ c(o, { ...r })
1183
+ }
1184
+ ) });
1185
+ }, Zn = h.div`
1186
+ display: flex;
1187
+ flex-direction: column;
1188
+ height: 100%;
1189
+ min-height: 0; /* Important for flexbox children to shrink */
1190
+ `, Xn = h.div`
1191
+ padding: 16px;
1192
+ border-bottom: 1px solid #e1e5e9;
1193
+ background: #f6f8fa;
1194
+ flex-shrink: 0; /* Prevent header from shrinking */
1195
+ `, Jn = h.h3`
1196
+ margin: 0 0 8px 0;
1197
+ font-size: 16px;
1198
+ font-weight: 600;
1199
+ color: #24292f;
1200
+ `, Qn = h.input`
1201
+ width: 100%;
1202
+ padding: 8px 12px;
1203
+ border: 1px solid #d0d7de;
1204
+ border-radius: 6px;
1205
+ font-size: 14px;
1206
+ box-sizing: border-box;
1207
+
1208
+ &:focus {
1209
+ outline: none;
1210
+ border-color: #0969da;
1211
+ box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
1212
+ }
1213
+ `, er = h.div`
1214
+ flex: 1;
1215
+ overflow-y: auto;
1216
+ min-height: 0; /* Critical for making overflow work in flexbox */
1217
+ `, tr = h.div`
1218
+ padding: 12px 16px;
1219
+ border-bottom: 1px solid #f0f0f0;
1220
+ cursor: pointer;
1221
+ background: ${(e) => e.selected ? "#f6f8fa" : "white"};
1222
+ border-left: 3px solid
1223
+ ${(e) => e.selected ? "#0969da" : "transparent"};
1224
+
1225
+ &:hover {
1226
+ background: #f6f8fa;
1227
+ }
1228
+ `, nr = h.div`
1229
+ font-weight: 500;
1230
+ font-size: 14px;
1231
+ color: #24292f;
1232
+ margin-bottom: 4px;
1233
+ `, rr = h.div`
1234
+ font-size: 12px;
1235
+ color: #656d76;
1236
+ display: flex;
1237
+ justify-content: space-between;
1238
+ `, qe = h.span`
1239
+ display: inline-block;
1240
+ padding: 2px 6px;
1241
+ border-radius: 12px;
1242
+ font-size: 11px;
1243
+ font-weight: 500;
1244
+
1245
+ ${(e) => {
1246
+ switch (e.variant) {
1247
+ case "simplified":
1248
+ return "background: #ddf4ff; color: #0969da;";
1249
+ case "legacy":
1250
+ return "background: #fff8dc; color: #9a6700;";
1251
+ case "deprecated":
1252
+ return "background: #ffebe9; color: #cf222e;";
1253
+ default:
1254
+ return "background: #f6f8fa; color: #656d76;";
1255
+ }
1256
+ }}
1257
+ `, or = h.div`
1258
+ padding: 40px 16px;
1259
+ text-align: center;
1260
+ color: #656d76;
1261
+ font-size: 14px;
1262
+ `, ir = ({
1263
+ extensionPoints: e,
1264
+ selectedExtensionId: t,
1265
+ onExtensionSelect: n,
1266
+ searchTerm: r,
1267
+ onSearchChange: o,
1268
+ className: i
1269
+ }) => /* @__PURE__ */ g(Zn, { className: i, children: [
1270
+ /* @__PURE__ */ g(Xn, { children: [
1271
+ /* @__PURE__ */ c(Jn, { children: "Extension Points" }),
1272
+ /* @__PURE__ */ c(
1273
+ Qn,
1274
+ {
1275
+ placeholder: "Search extension points...",
1276
+ value: r,
1277
+ onChange: (a) => o(a.target.value)
1278
+ }
1279
+ )
1280
+ ] }),
1281
+ /* @__PURE__ */ c(er, { children: e.length > 0 ? e.map((a) => {
1282
+ var d;
1283
+ return /* @__PURE__ */ g(
1284
+ tr,
1285
+ {
1286
+ selected: a.id === t,
1287
+ onClick: () => n(a.id),
1288
+ children: [
1289
+ /* @__PURE__ */ c(nr, { children: a.displayName || a.id }),
1290
+ /* @__PURE__ */ g(rr, { children: [
1291
+ /* @__PURE__ */ g("div", { children: [
1292
+ /* @__PURE__ */ c(qe, { variant: a.source, children: a.source }),
1293
+ ((d = a.metadata) == null ? void 0 : d.deprecated) && /* @__PURE__ */ c(qe, { variant: "deprecated", style: { marginLeft: 4 }, children: "deprecated" })
1294
+ ] }),
1295
+ /* @__PURE__ */ g("div", { children: [
1296
+ a.pluginCount,
1297
+ " plugin",
1298
+ a.pluginCount !== 1 ? "s" : ""
1299
+ ] })
1300
+ ] })
1301
+ ]
1302
+ },
1303
+ a.id
1304
+ );
1305
+ }) : /* @__PURE__ */ c(or, { children: r ? `No extension points match "${r}"` : "No extension points available" }) })
1306
+ ] });
1307
+ function ht(e) {
1308
+ const { extensions: t } = se();
1309
+ return j(() => {
1310
+ try {
1311
+ const r = ne.getExtensionPoints(
1312
+ t,
1313
+ e
1314
+ ), o = ne.calculateHealthStats(r);
1315
+ return {
1316
+ extensionPoints: r,
1317
+ healthStats: o,
1318
+ isLoading: !1,
1319
+ error: void 0
1320
+ };
1321
+ } catch (r) {
1322
+ return {
1323
+ extensionPoints: [],
1324
+ healthStats: {
1325
+ totalExtensionPoints: 0,
1326
+ extensionPointsWithPlugins: 0,
1327
+ totalPlugins: 0,
1328
+ simplifiedExtensionPoints: 0,
1329
+ legacyExtensionPoints: 0,
1330
+ deprecatedExtensionPoints: 0
1331
+ },
1332
+ isLoading: !1,
1333
+ error: r
1334
+ };
1335
+ }
1336
+ }, [t, e]);
1337
+ }
1338
+ function ar(e, t) {
1339
+ const n = ht(t), r = j(
1340
+ () => ne.filterExtensionPoints(
1341
+ n.extensionPoints,
1342
+ e
1343
+ ),
1344
+ [n.extensionPoints, e]
1345
+ );
1346
+ return {
1347
+ ...n,
1348
+ filteredExtensionPoints: r
1349
+ };
1350
+ }
1351
+ function Qr(e) {
1352
+ const { extensionPoints: t } = ht();
1353
+ return j(
1354
+ () => ne.getExtensionPointById(
1355
+ t,
1356
+ e
1357
+ ),
1358
+ [t, e]
1359
+ );
1360
+ }
1361
+ const sr = h.div`
1362
+ border: 1px solid #e1e5e9;
1363
+ border-radius: 6px;
1364
+ padding: 12px;
1365
+ background: white;
1366
+ transition: all 0.2s ease;
1367
+ `, cr = h.div`
1368
+ display: flex;
1369
+ align-items: center;
1370
+ justify-content: space-between;
1371
+ margin-bottom: 8px;
1372
+ `, lr = h.div`
1373
+ display: flex;
1374
+ align-items: center;
1375
+ `, dr = h.div`
1376
+ display: inline-block;
1377
+ width: 8px;
1378
+ height: 8px;
1379
+ border-radius: 50%;
1380
+ margin-right: 6px;
1381
+
1382
+ ${(e) => {
1383
+ switch (e.status) {
1384
+ case "healthy":
1385
+ return "background: #1a7f37;";
1386
+ case "warning":
1387
+ return "background: #bf8700;";
1388
+ case "error":
1389
+ return "background: #cf222e;";
1390
+ default:
1391
+ return "background: #656d76;";
1392
+ }
1393
+ }}
1394
+ `, fr = h.h5`
1395
+ margin: 0;
1396
+ font-size: 14px;
1397
+ font-weight: 600;
1398
+ color: #24292f;
1399
+ `, ur = h.div`
1400
+ font-size: 12px;
1401
+ color: #656d76;
1402
+ line-height: 1.4;
1403
+ display: grid;
1404
+ gap: 2px;
1405
+ `, J = h.div`
1406
+ display: grid;
1407
+ grid-template-columns: 80px 1fr; /* Fixed label width, flexible value */
1408
+ gap: 8px;
1409
+ overflow: hidden;
1410
+
1411
+ strong {
1412
+ font-weight: 600;
1413
+ color: #24292f;
1414
+ }
1415
+
1416
+ span {
1417
+ overflow: hidden;
1418
+ text-overflow: ellipsis;
1419
+ white-space: nowrap;
1420
+ }
1421
+ `, pr = h.div`
1422
+ color: #656d76;
1423
+ font-style: italic;
1424
+ margin-top: 4px;
1425
+ font-size: 12px;
1426
+ `, hr = h.div`
1427
+ margin-top: 6px;
1428
+ display: flex;
1429
+ flex-wrap: wrap;
1430
+ gap: 4px;
1431
+ `, mr = h.span`
1432
+ background: #f6f8fa;
1433
+ border: 1px solid #d0d7de;
1434
+ border-radius: 12px;
1435
+ padding: 2px 6px;
1436
+ font-size: 10px;
1437
+ color: #24292f;
1438
+ `, gr = h.div`
1439
+ margin-top: 8px;
1440
+ padding-top: 8px;
1441
+ border-top: 1px solid #f0f0f0;
1442
+ `, xr = h.div`
1443
+ display: flex;
1444
+ align-items: flex-start;
1445
+ gap: 6px;
1446
+ padding: 6px 8px;
1447
+ border-radius: 4px;
1448
+ font-size: 11px;
1449
+ line-height: 1.3;
1450
+ margin-bottom: 4px;
1451
+
1452
+ ${(e) => {
1453
+ switch (e.type) {
1454
+ case "error":
1455
+ return "background: #ffebe9; color: #cf222e; border-left: 3px solid #cf222e;";
1456
+ case "warning":
1457
+ return "background: #fff8dc; color: #9a6700; border-left: 3px solid #bf8700;";
1458
+ case "info":
1459
+ return "background: #ddf4ff; color: #0969da; border-left: 3px solid #0969da;";
1460
+ default:
1461
+ return "background: #f6f8fa; color: #656d76;";
1462
+ }
1463
+ }}
1464
+ `, yr = h.span`
1465
+ font-size: 12px;
1466
+ font-weight: bold;
1467
+ flex-shrink: 0;
1468
+ margin-top: 1px;
1469
+
1470
+ &::before {
1471
+ content: "${(e) => {
1472
+ switch (e.type) {
1473
+ case "error":
1474
+ return "❌";
1475
+ case "warning":
1476
+ return "⚠️";
1477
+ case "info":
1478
+ return "ℹ️";
1479
+ default:
1480
+ return "•";
1481
+ }
1482
+ }}";
1483
+ }
1484
+ `, br = h.div`
1485
+ flex: 1;
1486
+ `;
1487
+ function vr(e, t) {
1488
+ if (Te().getExtensionPoint(t) && e.data)
1489
+ return e.data;
1490
+ }
1491
+ function wr(e) {
1492
+ const n = Te().getExtensionPoint(e);
1493
+ return n != null && n.getSchemaFieldInfo ? n.getSchemaFieldInfo().map((r) => r.name) : [];
1494
+ }
1495
+ const Er = ({
1496
+ plugin: e,
1497
+ extensionPointId: t,
1498
+ className: n
1499
+ }) => {
1500
+ const r = ne.analyzePlugin(e), { hasComponent: o, healthStatus: i, capabilities: a } = r, d = Kt(e.id), f = vr(e, t), u = wr(t);
1501
+ return /* @__PURE__ */ g(sr, { className: n, children: [
1502
+ /* @__PURE__ */ c(cr, { children: /* @__PURE__ */ g(lr, { children: [
1503
+ /* @__PURE__ */ c(dr, { status: i }),
1504
+ /* @__PURE__ */ c(fr, { children: e.id })
1505
+ ] }) }),
1506
+ /* @__PURE__ */ g(ur, { children: [
1507
+ /* @__PURE__ */ g(J, { children: [
1508
+ /* @__PURE__ */ c("strong", { children: "Source:" }),
1509
+ /* @__PURE__ */ c("span", { children: e.remote ? `${e.remote} plugin` : "Local" })
1510
+ ] }),
1511
+ /* @__PURE__ */ g(J, { children: [
1512
+ /* @__PURE__ */ c("strong", { children: "Type:" }),
1513
+ /* @__PURE__ */ c("span", { children: e.type })
1514
+ ] }),
1515
+ typeof e.rank == "number" && /* @__PURE__ */ g(J, { children: [
1516
+ /* @__PURE__ */ c("strong", { children: "Priority:" }),
1517
+ /* @__PURE__ */ g("span", { children: [
1518
+ e.rank,
1519
+ " (higher = preferred)"
1520
+ ] })
1521
+ ] }),
1522
+ e.component && /* @__PURE__ */ g(J, { children: [
1523
+ /* @__PURE__ */ c("strong", { children: "Component:" }),
1524
+ /* @__PURE__ */ c("span", { children: e.component })
1525
+ ] }),
1526
+ f && u.map((l) => {
1527
+ const s = f[l];
1528
+ if (s == null)
1529
+ return null;
1530
+ const x = l.replace(/([A-Z])/g, " $1").replace(/^./, (b) => b.toUpperCase()).trim();
1531
+ return /* @__PURE__ */ g(J, { children: [
1532
+ /* @__PURE__ */ g("strong", { children: [
1533
+ x,
1534
+ ":"
1535
+ ] }),
1536
+ /* @__PURE__ */ c("span", { children: String(s) })
1537
+ ] }, l);
1538
+ }),
1539
+ !o && /* @__PURE__ */ c(pr, { children: "No UI component (data/utility plugin)" }),
1540
+ a.length > 0 && /* @__PURE__ */ c(hr, { children: a.map((l) => /* @__PURE__ */ c(mr, { children: l }, l)) }),
1541
+ d.length > 0 && /* @__PURE__ */ c(gr, { children: d.map((l, s) => /* @__PURE__ */ g(xr, { type: l.type, children: [
1542
+ /* @__PURE__ */ c(yr, { type: l.type }),
1543
+ /* @__PURE__ */ c(br, { children: l.message })
1544
+ ] }, s)) })
1545
+ ] })
1546
+ ] });
1547
+ }, Sr = h.div`
1548
+ padding: 12px 16px;
1549
+ border-bottom: 1px solid #e1e5e9;
1550
+ background: #f9f9f9;
1551
+ font-size: 12px;
1552
+ flex-shrink: 0; /* Prevent from shrinking */
1553
+ `, Cr = h.div`
1554
+ font-weight: 600;
1555
+ margin-bottom: 8px;
1556
+ color: #24292f;
1557
+ `, Ze = h.div`
1558
+ display: flex;
1559
+ gap: 12px;
1560
+ align-items: center;
1561
+
1562
+ &:not(:last-child) {
1563
+ margin-bottom: 4px;
1564
+ }
1565
+ `, Q = h.div`
1566
+ display: flex;
1567
+ align-items: center;
1568
+ gap: 4px;
1569
+ `, Pr = h.div`
1570
+ display: inline-block;
1571
+ width: 8px;
1572
+ height: 8px;
1573
+ border-radius: 50%;
1574
+ margin-right: 6px;
1575
+
1576
+ ${(e) => {
1577
+ switch (e.status) {
1578
+ case "healthy":
1579
+ return "background: #1a7f37;";
1580
+ case "warning":
1581
+ return "background: #bf8700;";
1582
+ case "error":
1583
+ return "background: #cf222e;";
1584
+ default:
1585
+ return "background: #656d76;";
1586
+ }
1587
+ }}
1588
+ `, we = h.span`
1589
+ display: inline-block;
1590
+ padding: 2px 6px;
1591
+ border-radius: 12px;
1592
+ font-size: 11px;
1593
+ font-weight: 500;
1594
+
1595
+ ${(e) => {
1596
+ switch (e.variant) {
1597
+ case "simplified":
1598
+ return "background: #ddf4ff; color: #0969da;";
1599
+ case "legacy":
1600
+ return "background: #fff8dc; color: #9a6700;";
1601
+ case "deprecated":
1602
+ return "background: #ffebe9; color: #cf222e;";
1603
+ default:
1604
+ return "background: #f6f8fa; color: #656d76;";
1605
+ }
1606
+ }}
1607
+ `, kr = h.button`
1608
+ background: #0969da;
1609
+ border: 1px solid #0969da;
1610
+ border-radius: 4px;
1611
+ color: white;
1612
+ cursor: pointer;
1613
+ font-size: 11px;
1614
+ padding: 4px 8px;
1615
+ margin-top: 8px;
1616
+ width: 100%;
1617
+
1618
+ &:hover {
1619
+ background: #0860ca;
1620
+ border-color: #0860ca;
1621
+ }
1622
+
1623
+ &:active {
1624
+ background: #0757ba;
1625
+ }
1626
+ `, $r = ({
1627
+ healthStats: e,
1628
+ className: t
1629
+ }) => {
1630
+ const { extensions: n } = se(), {
1631
+ totalPlugins: r,
1632
+ extensionPointsWithPlugins: o,
1633
+ totalExtensionPoints: i,
1634
+ simplifiedExtensionPoints: a,
1635
+ legacyExtensionPoints: d,
1636
+ deprecatedExtensionPoints: f
1637
+ } = e, u = () => {
1638
+ try {
1639
+ const l = Yt.generateFullDocumentation(
1640
+ n,
1641
+ {
1642
+ includeUsageExamples: !0,
1643
+ includeTypeDefinitions: !0,
1644
+ includeLegacyExtensions: !0,
1645
+ includePluginHealth: !0
1646
+ }
1647
+ ), s = new Blob([l.content], { type: "text/markdown" }), x = URL.createObjectURL(s), b = document.createElement("a");
1648
+ b.href = x, b.download = `kos-extension-points-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.md`, document.body.appendChild(b), b.click(), document.body.removeChild(b), URL.revokeObjectURL(x);
1649
+ } catch (l) {
1650
+ console.error("Failed to generate documentation:", l);
1651
+ }
1652
+ };
1653
+ return /* @__PURE__ */ g(Sr, { className: t, children: [
1654
+ /* @__PURE__ */ c(Cr, { children: "System Health" }),
1655
+ /* @__PURE__ */ g(Ze, { children: [
1656
+ /* @__PURE__ */ g(Q, { children: [
1657
+ /* @__PURE__ */ c(Pr, { status: "healthy" }),
1658
+ /* @__PURE__ */ g("span", { children: [
1659
+ r,
1660
+ " plugins"
1661
+ ] })
1662
+ ] }),
1663
+ /* @__PURE__ */ c(Q, { children: /* @__PURE__ */ g("span", { children: [
1664
+ o,
1665
+ "/",
1666
+ i,
1667
+ " active"
1668
+ ] }) })
1669
+ ] }),
1670
+ /* @__PURE__ */ g(Ze, { children: [
1671
+ /* @__PURE__ */ g(Q, { children: [
1672
+ /* @__PURE__ */ c(we, { variant: "simplified", children: a }),
1673
+ /* @__PURE__ */ c("span", { children: "simplified" })
1674
+ ] }),
1675
+ /* @__PURE__ */ g(Q, { children: [
1676
+ /* @__PURE__ */ c(we, { variant: "legacy", children: d }),
1677
+ /* @__PURE__ */ c("span", { children: "legacy" })
1678
+ ] }),
1679
+ f > 0 && /* @__PURE__ */ g(Q, { children: [
1680
+ /* @__PURE__ */ c(we, { variant: "deprecated", children: f }),
1681
+ /* @__PURE__ */ c("span", { children: "deprecated" })
1682
+ ] })
1683
+ ] }),
1684
+ /* @__PURE__ */ c(kr, { onClick: u, children: "Export Documentation" })
1685
+ ] });
1686
+ }, Ee = h.div`
1687
+ display: flex;
1688
+ width: 100%;
1689
+ height: 100%;
1690
+ min-height: 400px; /* Minimum usable height */
1691
+ border: 1px solid #e1e5e9;
1692
+ border-radius: 8px;
1693
+ overflow: hidden;
1694
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
1695
+ sans-serif;
1696
+ background: white;
1697
+ container-type: inline-size; /* Enable container queries */
1698
+ `, _r = h.div`
1699
+ flex: 0 0 35%; /* Take 35% of container width */
1700
+ min-width: 280px; /* Minimum usable width */
1701
+ max-width: 400px; /* Maximum width to prevent too wide */
1702
+ border-right: 1px solid #e1e5e9;
1703
+ display: flex;
1704
+ flex-direction: column;
1705
+ overflow: hidden;
1706
+
1707
+ /* Hide on very small screens */
1708
+ @media (max-width: 768px) {
1709
+ flex: 0 0 100%;
1710
+ max-width: 100%;
1711
+ border-right: none;
1712
+ }
1713
+ `, Tr = h.div`
1714
+ flex: 1;
1715
+ min-width: 0; /* Allows flex child to shrink below content size */
1716
+ display: flex;
1717
+ flex-direction: column;
1718
+ overflow: hidden;
1719
+
1720
+ /* Hide on mobile when sidebar is showing */
1721
+ @media (max-width: 768px) {
1722
+ display: none; /* We'll add mobile navigation later if needed */
1723
+ }
1724
+ `, Rr = h.div`
1725
+ padding: 16px;
1726
+ border-bottom: 1px solid #e1e5e9;
1727
+ background: #f6f8fa;
1728
+ `, Mr = h.h4`
1729
+ margin: 0 0 8px 0;
1730
+ font-size: 16px;
1731
+ font-weight: 600;
1732
+ color: #24292f;
1733
+ `, Ar = h.p`
1734
+ margin: 0;
1735
+ font-size: 14px;
1736
+ color: #656d76;
1737
+ `, Nr = h.div`
1738
+ flex: 1;
1739
+ padding: 16px;
1740
+ overflow-y: auto;
1741
+ `, zr = h.div`
1742
+ display: flex;
1743
+ flex-direction: column;
1744
+ gap: 12px;
1745
+ margin-bottom: 24px;
1746
+ `, de = h.div`
1747
+ display: flex;
1748
+ flex-direction: column;
1749
+ align-items: center;
1750
+ justify-content: center;
1751
+ height: 100%;
1752
+ color: #656d76;
1753
+ text-align: center;
1754
+ `, Fr = h.div`
1755
+ margin-top: 16px;
1756
+ padding-top: 16px;
1757
+ border-top: 1px solid #e1e5e9;
1758
+ `, Lr = h.h5`
1759
+ margin: 0 0 8px 0;
1760
+ font-size: 14px;
1761
+ font-weight: 600;
1762
+ color: #24292f;
1763
+ `, Or = h.div`
1764
+ display: grid;
1765
+ grid-template-columns: auto 1fr;
1766
+ gap: 8px 16px;
1767
+ font-size: 12px;
1768
+ `, W = h.div`
1769
+ color: #656d76;
1770
+ font-weight: 500;
1771
+ `, H = h.div`
1772
+ color: #24292f;
1773
+ `, Ir = ({
1774
+ className: e,
1775
+ showLegacyExtensions: t = !0,
1776
+ extensionFilter: n = ""
1777
+ }) => {
1778
+ const [r, o] = B(
1779
+ null
1780
+ ), [i, a] = B(n), { filteredExtensionPoints: d, healthStats: f, isLoading: u, error: l } = ar(i, {
1781
+ includeLegacyExtensions: t
1782
+ }), s = d.find(
1783
+ (y) => y.id === r
1784
+ ), x = (y) => {
1785
+ o(y);
1786
+ }, b = (y) => {
1787
+ a(y);
1788
+ };
1789
+ return l ? /* @__PURE__ */ c(Ee, { className: e, children: /* @__PURE__ */ c(de, { children: /* @__PURE__ */ g("div", { children: [
1790
+ "Error loading plugins: ",
1791
+ l.message
1792
+ ] }) }) }) : u ? /* @__PURE__ */ c(Ee, { className: e, children: /* @__PURE__ */ c(de, { children: /* @__PURE__ */ c("div", { children: "Loading plugins..." }) }) }) : /* @__PURE__ */ g(Ee, { className: e, children: [
1793
+ /* @__PURE__ */ g(_r, { children: [
1794
+ /* @__PURE__ */ c($r, { healthStats: f }),
1795
+ /* @__PURE__ */ c(
1796
+ ir,
1797
+ {
1798
+ extensionPoints: d,
1799
+ selectedExtensionId: r,
1800
+ onExtensionSelect: x,
1801
+ searchTerm: i,
1802
+ onSearchChange: b
1803
+ }
1804
+ )
1805
+ ] }),
1806
+ /* @__PURE__ */ c(Tr, { children: s ? /* @__PURE__ */ g(K, { children: [
1807
+ /* @__PURE__ */ g(Rr, { children: [
1808
+ /* @__PURE__ */ c(Mr, { children: s.displayName || s.id }),
1809
+ s.description && /* @__PURE__ */ c(Ar, { children: s.description })
1810
+ ] }),
1811
+ /* @__PURE__ */ g(Nr, { children: [
1812
+ s.plugins.length > 0 ? /* @__PURE__ */ g(K, { children: [
1813
+ /* @__PURE__ */ g(
1814
+ "h5",
1815
+ {
1816
+ style: {
1817
+ margin: "0 0 12px 0",
1818
+ fontSize: "14px",
1819
+ fontWeight: 600
1820
+ },
1821
+ children: [
1822
+ "Active Plugins (",
1823
+ s.pluginCount,
1824
+ ")"
1825
+ ]
1826
+ }
1827
+ ),
1828
+ /* @__PURE__ */ c(zr, { children: s.plugins.map((y) => /* @__PURE__ */ c(
1829
+ Er,
1830
+ {
1831
+ plugin: y,
1832
+ extensionPointId: s.id
1833
+ },
1834
+ y.id
1835
+ )) })
1836
+ ] }) : /* @__PURE__ */ g(de, { children: [
1837
+ /* @__PURE__ */ c("div", { style: { fontSize: "48px", marginBottom: "12px" }, children: "🔌" }),
1838
+ /* @__PURE__ */ c(
1839
+ "div",
1840
+ {
1841
+ style: {
1842
+ fontSize: "16px",
1843
+ fontWeight: 500,
1844
+ marginBottom: "8px"
1845
+ },
1846
+ children: "No plugins registered"
1847
+ }
1848
+ ),
1849
+ /* @__PURE__ */ c("div", { style: { fontSize: "14px" }, children: "This extension point is available but no plugins are currently contributing to it." })
1850
+ ] }),
1851
+ s.metadata && /* @__PURE__ */ g(Fr, { children: [
1852
+ /* @__PURE__ */ c(Lr, { children: "Extension Point Details" }),
1853
+ /* @__PURE__ */ g(Or, { children: [
1854
+ /* @__PURE__ */ c(W, { children: "ID:" }),
1855
+ /* @__PURE__ */ c(H, { children: s.id }),
1856
+ /* @__PURE__ */ c(W, { children: "Source:" }),
1857
+ /* @__PURE__ */ c(H, { children: s.source }),
1858
+ s.metadata.category && /* @__PURE__ */ g(K, { children: [
1859
+ /* @__PURE__ */ c(W, { children: "Category:" }),
1860
+ /* @__PURE__ */ c(H, { children: s.metadata.category })
1861
+ ] }),
1862
+ s.metadata.owner && /* @__PURE__ */ g(K, { children: [
1863
+ /* @__PURE__ */ c(W, { children: "Owner:" }),
1864
+ /* @__PURE__ */ c(H, { children: s.metadata.owner })
1865
+ ] }),
1866
+ s.metadata.since && /* @__PURE__ */ g(K, { children: [
1867
+ /* @__PURE__ */ c(W, { children: "Since:" }),
1868
+ /* @__PURE__ */ c(H, { children: s.metadata.since })
1869
+ ] }),
1870
+ s.metadata.tags && s.metadata.tags.length > 0 && /* @__PURE__ */ g(K, { children: [
1871
+ /* @__PURE__ */ c(W, { children: "Tags:" }),
1872
+ /* @__PURE__ */ c(H, { children: s.metadata.tags.join(", ") })
1873
+ ] })
1874
+ ] })
1875
+ ] })
1876
+ ] })
1877
+ ] }) : /* @__PURE__ */ g(de, { children: [
1878
+ /* @__PURE__ */ c("div", { style: { fontSize: "48px", marginBottom: "12px" }, children: "🔍" }),
1879
+ /* @__PURE__ */ c(
1880
+ "div",
1881
+ {
1882
+ style: { fontSize: "16px", fontWeight: 500, marginBottom: "8px" },
1883
+ children: "Select an extension point"
1884
+ }
1885
+ ),
1886
+ /* @__PURE__ */ c("div", { style: { fontSize: "14px" }, children: "Choose an extension point from the sidebar to view its plugins and details." })
1887
+ ] }) })
1888
+ ] });
1889
+ }, Dr = h.div`
1890
+ position: fixed;
1891
+ top: 0;
1892
+ left: 0;
1893
+ right: 0;
1894
+ bottom: 0;
1895
+ background: rgba(0, 0, 0, 0.5);
1896
+ z-index: 10000;
1897
+ display: ${(e) => e.visible ? "flex" : "none"};
1898
+ align-items: center;
1899
+ justify-content: center;
1900
+ padding: 20px;
1901
+ box-sizing: border-box;
1902
+ `, Vr = h.div`
1903
+ background: white;
1904
+ border-radius: 12px;
1905
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
1906
+ width: min(1200px, 90vw); /* Responsive with max limit */
1907
+ height: min(700px, 85vh); /* Responsive with max limit */
1908
+ overflow: hidden;
1909
+ position: relative;
1910
+ display: flex;
1911
+ flex-direction: column;
1912
+ `, jr = h.div`
1913
+ display: flex;
1914
+ align-items: center;
1915
+ justify-content: space-between;
1916
+ padding: 16px 20px;
1917
+ border-bottom: 1px solid #e1e5e9;
1918
+ background: #f6f8fa;
1919
+ `, Br = h.h3`
1920
+ margin: 0;
1921
+ font-size: 18px;
1922
+ font-weight: 600;
1923
+ color: #24292f;
1924
+ `, Kr = h.button`
1925
+ background: none;
1926
+ border: none;
1927
+ font-size: 20px;
1928
+ cursor: pointer;
1929
+ padding: 4px;
1930
+ color: #656d76;
1931
+ border-radius: 4px;
1932
+
1933
+ &:hover {
1934
+ background: #f0f0f0;
1935
+ color: #24292f;
1936
+ }
1937
+ `, Yr = h.button`
1938
+ position: fixed;
1939
+ ${(e) => {
1940
+ switch (e.position) {
1941
+ case "top-left":
1942
+ return "top: 20px; left: 20px;";
1943
+ case "top-right":
1944
+ return "top: 20px; right: 20px;";
1945
+ case "bottom-left":
1946
+ return "bottom: 20px; left: 20px;";
1947
+ case "bottom-right":
1948
+ default:
1949
+ return "bottom: 20px; right: 20px;";
1950
+ }
1951
+ }}
1952
+
1953
+ background: #0969da;
1954
+ color: white;
1955
+ border: none;
1956
+ border-radius: 50%;
1957
+ width: 56px;
1958
+ height: 56px;
1959
+ font-size: 24px;
1960
+ cursor: pointer;
1961
+ z-index: 9999;
1962
+ box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
1963
+ transition: all 0.2s ease;
1964
+
1965
+ /* Center the SVG content */
1966
+ display: flex;
1967
+ align-items: center;
1968
+ justify-content: center;
1969
+
1970
+ &:hover {
1971
+ background: #0860ca;
1972
+ transform: scale(1.05);
1973
+ }
1974
+
1975
+ &:active {
1976
+ transform: scale(0.95);
1977
+ }
1978
+ `, Wr = h.div`
1979
+ font-size: 12px;
1980
+ color: #656d76;
1981
+ margin-left: 8px;
1982
+ `, eo = ({
1983
+ keyboardShortcut: e = "ctrl+shift+p",
1984
+ showToggleButton: t = !0,
1985
+ toggleButtonPosition: n = "bottom-right",
1986
+ ...r
1987
+ }) => {
1988
+ const [o, i] = B(!1);
1989
+ te(() => {
1990
+ const f = (u) => {
1991
+ const s = e.toLowerCase().split("+").map((y) => y.trim());
1992
+ let x = !0;
1993
+ s.includes("ctrl") && !u.ctrlKey && (x = !1), s.includes("shift") && !u.shiftKey && (x = !1), s.includes("alt") && !u.altKey && (x = !1), s.includes("meta") && !u.metaKey && (x = !1);
1994
+ const b = s.find(
1995
+ (y) => !["ctrl", "shift", "alt", "meta"].includes(y)
1996
+ );
1997
+ b && u.key.toLowerCase() !== b.toLowerCase() && (x = !1), x && (u.preventDefault(), i((y) => !y));
1998
+ };
1999
+ return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
2000
+ }, [e]), te(() => {
2001
+ const f = (u) => {
2002
+ u.key === "Escape" && o && i(!1);
2003
+ };
2004
+ return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
2005
+ }, [o]);
2006
+ const a = () => {
2007
+ i((f) => !f);
2008
+ }, d = (f) => {
2009
+ f.target === f.currentTarget && i(!1);
2010
+ };
2011
+ return process.env.NODE_ENV !== "development" ? null : /* @__PURE__ */ g(K, { children: [
2012
+ t && /* @__PURE__ */ c(
2013
+ Yr,
2014
+ {
2015
+ position: n,
2016
+ onClick: a,
2017
+ title: `Plugin Explorer (${e})`,
2018
+ children: /* @__PURE__ */ c(
2019
+ "svg",
2020
+ {
2021
+ fill: "#ffffff",
2022
+ width: "28",
2023
+ height: "28",
2024
+ version: "1.1",
2025
+ id: "Artwork",
2026
+ xmlns: "http://www.w3.org/2000/svg",
2027
+ viewBox: "0 0 512 512",
2028
+ style: { display: "block" },
2029
+ children: /* @__PURE__ */ c("g", { children: /* @__PURE__ */ c(
2030
+ "path",
2031
+ {
2032
+ fill: "#ffffff",
2033
+ stroke: "#FFFFFF",
2034
+ d: `M202.7,259.7l-31.5,31.5c-5.6,5.6-8.6,13-8.6,20.9c0,7.9,3.1,15.3,8.6,20.9l6.1,6.1l-3.7,3.7c-11.1,11.1-29.2,11.1-40.4,0
2035
+ l-31.4-31.4c-20.7-20.7-54.3-20.7-75,0c-20.7,20.7-20.7,54.3,0,75l31.4,31.5c5.4,5.4,8.4,12.6,8.4,20.2s-3,14.8-8.4,20.2
2036
+ c-4.8,4.8-4.8,12.5,0,17.3c2.4,2.4,5.5,3.6,8.7,3.6c3.1,0,6.3-1.2,8.7-3.6c10-10,15.5-23.3,15.5-37.5s-5.5-27.5-15.5-37.5
2037
+ l-31.4-31.5c-11.1-11.1-11.1-29.2,0-40.4s29.2-11.1,40.4,0L116,360c20.7,20.7,54.3,20.7,75,0l3.7-3.7l6.1,6.1
2038
+ c5.8,5.8,13.3,8.6,20.9,8.6c7.6,0,15.1-2.9,20.9-8.6l31.5-31.5c11.4,3.7,23.2,5.7,35,5.7c28.7,0,57.4-10.9,79.2-32.7l55.1-55.1
2039
+ l9.9,9.9c2.4,2.4,5.5,3.6,8.7,3.6s6.3-1.2,8.7-3.6c4.8-4.8,4.8-12.5,0-17.3l-40.5-40.5l67-67c4.8-4.8,4.8-12.5,0-17.3
2040
+ c-4.8-4.8-12.5-4.8-17.3,0l-67,67L350.2,121l67-67c4.8-4.8,4.8-12.5,0-17.3c-4.8-4.8-12.5-4.8-17.3,0l-67,67l-40.5-40.5
2041
+ c-4.8-4.8-12.5-4.8-17.3,0c-4.8,4.8-4.8,12.5,0,17.3l9.9,9.9l-55.1,55.1C199,176.4,190,220.8,202.7,259.7z M247.1,286.6
2042
+ c-34.1-34.1-34.1-89.6,0-123.7l55.1-55.1L426,231.4l-55.1,55.1C336.7,320.7,281.2,320.7,247.1,286.6z M213.7,283.4
2043
+ c4.5,7.3,9.8,14.2,16.1,20.5s13.2,11.6,20.5,16.1l-25.2,25.2c-1.9,2-5.1,2-7.1,0l-29.5-29.5c-1.3-1.3-1.5-2.8-1.5-3.5
2044
+ c0-0.8,0.2-2.3,1.5-3.5L213.7,283.4z`
2045
+ }
2046
+ ) })
2047
+ }
2048
+ )
2049
+ }
2050
+ ),
2051
+ /* @__PURE__ */ c(Dr, { visible: o, onClick: d, children: /* @__PURE__ */ g(Vr, { children: [
2052
+ /* @__PURE__ */ g(jr, { children: [
2053
+ /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center" }, children: [
2054
+ /* @__PURE__ */ c(Br, { children: "KOS Plugin Explorer" }),
2055
+ /* @__PURE__ */ g(Wr, { children: [
2056
+ e,
2057
+ " to toggle"
2058
+ ] })
2059
+ ] }),
2060
+ /* @__PURE__ */ c(Kr, { onClick: () => i(!1), "aria-label": "Close", children: "×" })
2061
+ ] }),
2062
+ /* @__PURE__ */ c(Ir, { ...r })
2063
+ ] }) })
2064
+ ] });
2065
+ };
2066
+ function Z(e) {
2067
+ const { extensions: t, getExtensions: n } = se();
2068
+ return j(() => {
2069
+ if (typeof e == "object" && e.id) {
2070
+ const o = e;
2071
+ if (o.getExtensions && t) {
2072
+ const a = o.getExtensions(t);
2073
+ return Object.values(a);
2074
+ }
2075
+ const i = (t == null ? void 0 : t[o.id]) || {};
2076
+ return Object.values(
2077
+ i
2078
+ );
2079
+ }
2080
+ return n(e);
2081
+ }, [e, t, n]);
2082
+ }
2083
+ function to(e, t) {
2084
+ const { extensions: n } = se(), r = Z(e);
2085
+ return j(() => {
2086
+ if (!r || r.length === 0)
2087
+ return null;
2088
+ if (t != null && t.customRanker)
2089
+ return t.customRanker(r);
2090
+ if (typeof e == "object" && t) {
2091
+ let d = r;
2092
+ if (t.propertyMatches && (d = d.filter(
2093
+ (u) => Object.entries(t.propertyMatches).every(
2094
+ ([l, s]) => {
2095
+ var x;
2096
+ return ((x = u.data) == null ? void 0 : x[l]) === s;
2097
+ }
2098
+ )
2099
+ )), t.preferredModule) {
2100
+ const u = d.find(
2101
+ (l) => l.sectionId === t.preferredModule
2102
+ );
2103
+ if (u)
2104
+ return u;
2105
+ }
2106
+ const f = d.reduce((u, l) => (u[l.id] = l, u), {});
2107
+ return Se(f);
2108
+ }
2109
+ const o = typeof e == "string" ? e : e.id, i = (n == null ? void 0 : n[o]) || {};
2110
+ return Se(i, t == null ? void 0 : t.preferredModule);
2111
+ }, [e, r, n, t]);
2112
+ }
2113
+ function no(e) {
2114
+ return Z(e).length > 0;
2115
+ }
2116
+ function ro(e) {
2117
+ return Z(e).length;
2118
+ }
2119
+ function oo(e, t) {
2120
+ const n = Z(e);
2121
+ return j(() => {
2122
+ let r = n.filter(t.filter);
2123
+ return t.sort && (r = r.sort(t.sort)), r;
2124
+ }, [n, t.filter, t.sort]);
2125
+ }
2126
+ function io(e, t) {
2127
+ const n = Z(e), [r, o] = B(/* @__PURE__ */ new Map()), i = j(
2128
+ () => t != null && t.filter ? n.filter(t.filter) : n,
2129
+ [n, t == null ? void 0 : t.filter]
2130
+ ), a = (t == null ? void 0 : t.moduleProperty) || "module";
2131
+ return te(() => {
2132
+ (async () => {
2133
+ var f;
2134
+ for (const u of i) {
2135
+ const l = u.id;
2136
+ if (!r.has(l)) {
2137
+ o(
2138
+ (s) => new Map(s).set(l, {
2139
+ module: null,
2140
+ loading: !0,
2141
+ error: null
2142
+ })
2143
+ );
2144
+ try {
2145
+ const s = ((f = u.data) == null ? void 0 : f[a]) || u[a] || `./${u.id}`, x = u.remote;
2146
+ if (!x)
2147
+ throw new Error(`No remote specified for extension ${l}`);
2148
+ const { loadRemoteModule: b } = await import("./documentation-generator-auruIa_o.js").then((E) => E.i), y = await b(x, s);
2149
+ o(
2150
+ (E) => new Map(E).set(l, {
2151
+ module: y,
2152
+ loading: !1,
2153
+ error: null
2154
+ })
2155
+ );
2156
+ } catch (s) {
2157
+ const x = s instanceof Error ? s.message : "Unknown error";
2158
+ o(
2159
+ (b) => new Map(b).set(l, {
2160
+ module: null,
2161
+ loading: !1,
2162
+ error: x
2163
+ })
2164
+ );
2165
+ }
2166
+ }
2167
+ }
2168
+ })();
2169
+ }, [i, a, r]), j(
2170
+ () => i.map((d) => {
2171
+ const f = r.get(d.id) || {
2172
+ module: null,
2173
+ loading: !0,
2174
+ error: null
2175
+ };
2176
+ return {
2177
+ extension: d,
2178
+ module: f.module,
2179
+ loading: f.loading,
2180
+ error: f.error
2181
+ };
2182
+ }),
2183
+ [i, r]
2184
+ );
2185
+ }
2186
+ function ao(e) {
2187
+ return Y.useMemo(() => {
2188
+ if (!e.config.hasView)
2189
+ return null;
2190
+ const t = (n) => {
2191
+ const { module: r, fallback: o, ...i } = n;
2192
+ return Y.createElement(ze, {
2193
+ extension: e.id,
2194
+ module: r,
2195
+ fallback: o,
2196
+ props: i
2197
+ });
2198
+ };
2199
+ return t.displayName = `${e.config.displayName || e.id}.Component`, t;
2200
+ }, [e]);
2201
+ }
2202
+ function so(e) {
2203
+ if (!e.config.hasView)
2204
+ return null;
2205
+ const t = (n) => {
2206
+ const { module: r, fallback: o, ...i } = n;
2207
+ return Y.createElement(ze, {
2208
+ extension: e.id,
2209
+ module: r,
2210
+ fallback: o,
2211
+ props: i
2212
+ });
2213
+ };
2214
+ return t.displayName = `${e.config.displayName || e.id}.Component`, t;
2215
+ }
2216
+ function Hr(e) {
2217
+ return Y.useMemo(() => {
2218
+ const n = Te().getExtensionPoint(e);
2219
+ if (!n)
2220
+ return console.warn(`Extension point not found: ${e}`), null;
2221
+ if (!n.config.hasView)
2222
+ return null;
2223
+ const r = (o) => {
2224
+ const { module: i, fallback: a, ...d } = o;
2225
+ return Y.createElement(ze, {
2226
+ extension: e,
2227
+ module: i,
2228
+ fallback: a,
2229
+ props: d
2230
+ });
2231
+ };
2232
+ return r.displayName = `${n.config.displayName || e}.Component`, r;
2233
+ }, [e]);
2234
+ }
2235
+ function co(e, t) {
2236
+ const n = Z(e), r = Hr(e), o = (t == null ? void 0 : t.namespaceProperty) || "namespace", i = j(() => {
2237
+ const f = n.map((u) => {
2238
+ var l;
2239
+ return (l = u.data) == null ? void 0 : l[o];
2240
+ }).filter(Boolean);
2241
+ return Array.from(new Set(f));
2242
+ }, [n, o]), { t: a, i18n: d } = Wt(i);
2243
+ return {
2244
+ extensions: n,
2245
+ t: a,
2246
+ i18n: d,
2247
+ Component: r,
2248
+ namespaces: i
2249
+ };
2250
+ }
2251
+ export {
2252
+ ze as DynamicComponent,
2253
+ ir as ExtensionPointList,
2254
+ eo as FloatingPluginExplorer,
2255
+ Jr as KosPluginProvider,
2256
+ Er as PluginCard,
2257
+ Ir as PluginExplorer,
2258
+ $r as PluginHealthDashboard,
2259
+ pt as RemotesContext,
2260
+ so as createExtensionComponent,
2261
+ to as useBest,
2262
+ Hn as useDynamicComponent,
2263
+ ao as useExtensionComponent,
2264
+ Hr as useExtensionComponentById,
2265
+ ro as useExtensionCount,
2266
+ co as useExtensionI18n,
2267
+ Qr as useExtensionPoint,
2268
+ Z as useExtensions,
2269
+ ar as useFilteredExtensionPoints,
2270
+ oo as useFilteredExtensions,
2271
+ no as useHasExtensions,
2272
+ se as useKosPluginsContext,
2273
+ io as useModules,
2274
+ ht as usePluginDiscovery
2275
+ };
2276
+ //# sourceMappingURL=index.js.map