@epam/ai-dial-catalog 1.3.0-dev.170 → 1.3.0-dev.173
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/components/Catalog/Catalog.d.ts.map +1 -1
- package/components/Catalog/CreateButton.d.ts +3 -1
- package/components/Catalog/CreateButton.d.ts.map +1 -1
- package/components/Favorites/Favorites.d.ts +2 -2
- package/components/Favorites/Favorites.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.js +796 -723
- package/models/catalog-props.d.ts +2 -0
- package/models/catalog-props.d.ts.map +1 -1
- package/models/favorites.d.ts +2 -0
- package/models/favorites.d.ts.map +1 -1
- package/package.json +3 -3
- package/utils/favorites-row.d.ts +8 -0
- package/utils/favorites-row.d.ts.map +1 -0
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as e, E as t, S as n, T as r, _ as i, a, b as o, c as s, d as c, f as l, g as u, h as d, i as f, l as p, m, n as h, o as g, p as _, r as v, s as y, t as b, u as x, v as S, w as C, x as w, y as T } from "./mapping-Cxm9x6S-.js";
|
|
2
2
|
import { CatalogEntityType as E, ConfirmationFooter as D, ConfirmationView as O, DESKTOP_BREAKPOINT_PX as k, DeploymentIcon as A, EntityHeader as j, EntityTypeLabel as M, FeaturedChip as ee, ItemHeader as te, MarkdownCodeBlock as N, MarkdownRenderer as ne, MarkdownWithPlaceholders as re, PanelEmptyState as ie, SELECT_LIST_MAX_HEIGHT_CLASS_NAME as ae, buildCssVars as oe, mergeClasses as P, useIsMobile as se } from "@epam/ai-dial-chat-shared";
|
|
3
3
|
import { Fragment as ce, createContext as le, memo as ue, startTransition as de, useCallback as F, useContext as fe, useEffect as I, useId as pe, useLayoutEffect as L, useMemo as R, useRef as z, useState as B } from "react";
|
|
4
|
-
import { Badge as me, BottomSheet as he, Button as ge, ButtonAppearance as _e, ButtonDropdown as ve, ButtonVariant as ye, CaptionText as be, CardShell as xe, Checkbox as Se, ConfirmationPopupVariant as Ce, DIAL_ICON_SIZE as V, DIAL_KIT_ICON_STROKE as H, DangerButton as we, Dropdown as U, DropdownItemType as Te, ElementSize as Ee, EllipsisTooltip as De, ErrorText as Oe, FolderPath as ke, GhostButton as Ae, GhostIconButton as je, Highlight as Me, InlineSelect as W, InlineSelectTrigger as Ne, Input as Pe, InteractiveTooltip as Fe, LinkButton as G, MenuItem as
|
|
5
|
-
import { Fragment as
|
|
4
|
+
import { Badge as me, BottomSheet as he, Button as ge, ButtonAppearance as _e, ButtonDropdown as ve, ButtonVariant as ye, CaptionText as be, CardShell as xe, Checkbox as Se, ConfirmationPopupVariant as Ce, DIAL_ICON_SIZE as V, DIAL_KIT_ICON_STROKE as H, DangerButton as we, Dropdown as U, DropdownItemType as Te, ElementSize as Ee, EllipsisTooltip as De, ErrorText as Oe, FolderPath as ke, GhostButton as Ae, GhostIconButton as je, Highlight as Me, InlineSelect as W, InlineSelectTrigger as Ne, Input as Pe, InteractiveTooltip as Fe, LinkButton as G, MenuItem as K, MenuItemMark as q, NeutralButton as Ie, NeutralIconButton as Le, NoDataContent as Re, PrimaryButton as ze, ProgressBar as Be, RadioGroup as Ve, Search as He, SegmentedControl as Ue, SideDrawer as We, Skeleton as Ge, SkeletonAvatarShape as Ke, Spinner as qe, Tabs as Je, ToggleIconButton as Ye, Tooltip as Xe, mergeClasses as Ze } from "@epam/ai-dial-ui-kit";
|
|
5
|
+
import { Fragment as Qe, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
6
6
|
import { IconAdjustmentsHorizontal as $e, IconAlertTriangleFilled as et, IconArrowRight as tt, IconBuildingCommunity as nt, IconCheck as rt, IconChevronDown as it, IconChevronLeft as at, IconChevronRight as ot, IconCircleCheckFilled as st, IconDots as ct, IconDownload as lt, IconFilter as ut, IconFolder as dt, IconKey as ft, IconLayoutGrid as X, IconLayoutList as pt, IconLogin as mt, IconLogout as ht, IconPencil as gt, IconPlayerPlayFilled as _t, IconPlus as vt, IconShare as yt, IconStar as bt, IconStarFilled as xt, IconTrashX as St, IconUser as Ct, IconUserOff as wt, IconWorldOff as Tt, IconWorldShare as Et } from "@tabler/icons-react";
|
|
7
7
|
import { PublishFooter as Dt, PublishPanel as Ot, derivePublishState as kt, usePublishFlow as At } from "@epam/ai-dial-publish-panel";
|
|
8
8
|
import { Grid as jt } from "@epam/ai-dial-ui-kit/grid";
|
|
@@ -23,31 +23,31 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
23
23
|
return e.Single = "single", e.Multiple = "multiple", e;
|
|
24
24
|
}({}), Rt = /* @__PURE__ */ function(e) {
|
|
25
25
|
return e.Inline = "inline", e.Stacked = "stacked", e;
|
|
26
|
-
}({}),
|
|
26
|
+
}({}), Q = /* @__PURE__ */ function(e) {
|
|
27
27
|
return e.File = "file", e.Folder = "folder", e;
|
|
28
|
-
}({}),
|
|
28
|
+
}({}), zt = /* @__PURE__ */ function(e) {
|
|
29
29
|
return e.Markdown = "markdown", e.Text = "text", e.Image = "image", e.Unsupported = "unsupported", e;
|
|
30
|
-
}({}),
|
|
30
|
+
}({}), Bt = () => {
|
|
31
31
|
let [e, t] = B(() => window.innerWidth);
|
|
32
32
|
return I(() => {
|
|
33
33
|
let e = () => t(window.innerWidth);
|
|
34
34
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
35
35
|
}, []), e >= 1024 ? 4 : e >= 640 ? 2 : 1;
|
|
36
|
-
},
|
|
36
|
+
}, Vt = {
|
|
37
37
|
root: "dial-catalog-root",
|
|
38
38
|
toolbar: "dial-catalog-toolbar",
|
|
39
39
|
card: "dial-catalog-card",
|
|
40
40
|
favoriteCard: "dial-catalog-favorite-card",
|
|
41
41
|
listView: "dial-catalog-list-view"
|
|
42
|
-
},
|
|
42
|
+
}, Ht = (e) => e.type === Te.Divider || e.type === Te.PlainText, Ut = (e, t) => e.map((e) => Ht(e) ? e : {
|
|
43
43
|
...e,
|
|
44
44
|
label: typeof e.label == "string" ? /* @__PURE__ */ J(Me, {
|
|
45
45
|
text: e.label,
|
|
46
46
|
query: t,
|
|
47
47
|
maxLines: 1
|
|
48
48
|
}) : e.label,
|
|
49
|
-
children: e.children ?
|
|
50
|
-
}),
|
|
49
|
+
children: e.children ? Ut(e.children, t) : void 0
|
|
50
|
+
}), Wt = (e) => {
|
|
51
51
|
if (e == null || e.options.length === 0) return;
|
|
52
52
|
let [t] = e.options;
|
|
53
53
|
return e.options.length === 1 && e.search == null && !t.children?.length ? {
|
|
@@ -61,34 +61,34 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
61
61
|
options: e.options,
|
|
62
62
|
search: e.search
|
|
63
63
|
};
|
|
64
|
-
},
|
|
64
|
+
}, Gt = (e) => ({
|
|
65
65
|
codeBlockCopyLabel: e?.copyCodeAriaLabel,
|
|
66
66
|
codeBlockCopiedLabel: e?.copiedCodeStatusLabel,
|
|
67
67
|
codeBlockDownloadLabel: e?.downloadCodeAriaLabel,
|
|
68
68
|
tableScrollRegionAriaLabel: e?.tableScrollRegionAriaLabel,
|
|
69
69
|
mathScrollRegionAriaLabel: e?.mathScrollRegionAriaLabel
|
|
70
|
-
}),
|
|
70
|
+
}), Kt = (e) => {
|
|
71
71
|
let { colors: t } = e ?? {};
|
|
72
72
|
return oe({
|
|
73
73
|
"--cat-bg": t?.background,
|
|
74
74
|
"--cat-heading-title-text": t?.headingTitleText
|
|
75
75
|
});
|
|
76
|
-
},
|
|
76
|
+
}, qt = 1180, Jt = (e) => e >= 1280 ? 4 : e >= 966 ? 3 : e >= 620 ? 2 : 1, Yt = (e) => {
|
|
77
77
|
if (!e || e === document.body) return document.documentElement;
|
|
78
78
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
79
|
-
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e :
|
|
80
|
-
},
|
|
79
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : Yt(e.parentElement);
|
|
80
|
+
}, Xt = 10, Zt = 10, Qt = 30, $t = (e, t, n = Xt) => {
|
|
81
81
|
let r = z(null), [i, a] = B({
|
|
82
82
|
start: 0,
|
|
83
|
-
end:
|
|
83
|
+
end: Qt
|
|
84
84
|
});
|
|
85
85
|
I(() => {
|
|
86
86
|
let i = r.current;
|
|
87
87
|
if (!i) return;
|
|
88
|
-
let o =
|
|
88
|
+
let o = Yt(i.parentElement), s = () => {
|
|
89
89
|
let r = o.clientHeight;
|
|
90
90
|
if (r === 0 || i.clientWidth === 0 || getComputedStyle(i).visibility === "hidden") return;
|
|
91
|
-
let s = i.getBoundingClientRect().top, c = o.getBoundingClientRect().top, l = Math.max(0, c - s), u = Math.floor(l / t), d = Math.ceil(r / t), f = Math.max(0, Math.floor((u - n) /
|
|
91
|
+
let s = i.getBoundingClientRect().top, c = o.getBoundingClientRect().top, l = Math.max(0, c - s), u = Math.floor(l / t), d = Math.ceil(r / t), f = Math.max(0, Math.floor((u - n) / Zt) * Zt), p = Math.min(e, Math.ceil((u + d + n) / Zt) * Zt);
|
|
92
92
|
a((e) => e.start === f && e.end === p ? e : {
|
|
93
93
|
start: f,
|
|
94
94
|
end: p
|
|
@@ -104,15 +104,15 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
104
104
|
t,
|
|
105
105
|
n
|
|
106
106
|
]);
|
|
107
|
-
let o = Math.max(0, Math.floor((e - 1) /
|
|
107
|
+
let o = Math.max(0, Math.floor((e - 1) / Zt) * Zt), s = Math.min(i.start, o);
|
|
108
108
|
return {
|
|
109
109
|
containerRef: r,
|
|
110
110
|
startRow: s,
|
|
111
|
-
endRow: Math.min(e, Math.max(i.end, s +
|
|
111
|
+
endRow: Math.min(e, Math.max(i.end, s + Zt))
|
|
112
112
|
};
|
|
113
|
-
},
|
|
113
|
+
}, en = (e, { overscan: t = 3, isFullWidth: n = !1 } = {}) => {
|
|
114
114
|
let r = z(null), [i, a] = B(() => {
|
|
115
|
-
let t = typeof window < "u" ? window.innerWidth : 1440, r = Math.max(0, t - (t >= k ? 60 : 0)), i =
|
|
115
|
+
let t = typeof window < "u" ? window.innerWidth : 1440, r = Math.max(0, t - (t >= k ? 60 : 0)), i = Jt((n ? r : Math.min(qt, r)) - 64), a = Math.ceil(e / i);
|
|
116
116
|
return {
|
|
117
117
|
startRow: 0,
|
|
118
118
|
endRow: Math.min(a, 12),
|
|
@@ -122,10 +122,10 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
122
122
|
I(() => {
|
|
123
123
|
let n = r.current;
|
|
124
124
|
if (!n) return;
|
|
125
|
-
let i =
|
|
125
|
+
let i = Yt(n.parentElement), o = () => {
|
|
126
126
|
let r = n.clientWidth, o = i.clientHeight;
|
|
127
127
|
if (r === 0 || o === 0) return;
|
|
128
|
-
let s = n.getBoundingClientRect(), c = i.getBoundingClientRect(), l =
|
|
128
|
+
let s = n.getBoundingClientRect(), c = i.getBoundingClientRect(), l = Jt(r), u = Math.ceil(e / l), d = Math.max(0, c.top - s.top), f = Math.max(0, Math.floor(d / 268) - t), p = Math.min(u, f + Math.ceil(o / 268) + 2 * t);
|
|
129
129
|
a((e) => e.startRow === f && e.endRow === p && e.columnCount === l ? e : {
|
|
130
130
|
startRow: f,
|
|
131
131
|
endRow: p,
|
|
@@ -147,7 +147,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
147
147
|
rowCount: o,
|
|
148
148
|
totalHeight: o * 268
|
|
149
149
|
};
|
|
150
|
-
},
|
|
150
|
+
}, tn = {
|
|
151
151
|
skeletonColor: "var(--cg-skeleton-color, var(--bg-control-disable-primary, #dce0e8))",
|
|
152
152
|
card: "_card_3j04p_2",
|
|
153
153
|
emptyStarHidden: "_emptyStarHidden_3j04p_2",
|
|
@@ -156,10 +156,10 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
156
156
|
selectedCard: "_selectedCard_3j04p_25",
|
|
157
157
|
checkIcon: "_checkIcon_3j04p_30",
|
|
158
158
|
footer: "_footer_3j04p_34"
|
|
159
|
-
},
|
|
159
|
+
}, nn = 1, rn = (e) => e.scrollHeight - e.clientHeight > nn, an = (e) => {
|
|
160
160
|
let t = z(null), [n, r] = B(!1), i = F(() => {
|
|
161
161
|
let e = t.current;
|
|
162
|
-
e && r(
|
|
162
|
+
e && r(rn(e) || Array.from(e.children).some(rn));
|
|
163
163
|
}, []);
|
|
164
164
|
return L(() => {
|
|
165
165
|
i();
|
|
@@ -171,9 +171,9 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
171
171
|
ref: t,
|
|
172
172
|
isClamped: n
|
|
173
173
|
};
|
|
174
|
-
},
|
|
175
|
-
let { ref: r, isClamped: i } =
|
|
176
|
-
return /* @__PURE__ */ J(
|
|
174
|
+
}, on = ({ name: e, query: t = "", className: n }) => {
|
|
175
|
+
let { ref: r, isClamped: i } = an(e);
|
|
176
|
+
return /* @__PURE__ */ J(Xe, {
|
|
177
177
|
asChild: !0,
|
|
178
178
|
tooltip: e,
|
|
179
179
|
hideTooltip: !i,
|
|
@@ -186,12 +186,12 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
186
186
|
})
|
|
187
187
|
})
|
|
188
188
|
});
|
|
189
|
-
},
|
|
189
|
+
}, sn = {
|
|
190
190
|
name: "_name_188yo_1",
|
|
191
191
|
lastUsed: "_lastUsed_188yo_5",
|
|
192
192
|
version: "_version_188yo_9"
|
|
193
|
-
},
|
|
194
|
-
let f = c?.colors, p = c?.typography ?? {}, m = a === Ft.LG, h = m ? "size-[52px] rounded-[14px]" : "size-[44px] rounded-lg", g = m ? 54 : 44, _ = !m && !!r, v = m && (!!r || i != null || l != null), y = P(p?.versionClassName ?? "dial-tiny-text",
|
|
193
|
+
}, cn = ({ icon: e, type: t, name: n, version: r, lastUsed: i, size: a, query: o, className: s, styles: c, lastUsedTrailing: l, iconClassName: u, iconOverlay: d }) => {
|
|
194
|
+
let f = c?.colors, p = c?.typography ?? {}, m = a === Ft.LG, h = m ? "size-[52px] rounded-[14px]" : "size-[44px] rounded-lg", g = m ? 54 : 44, _ = !m && !!r, v = m && (!!r || i != null || l != null), y = P(p?.versionClassName ?? "dial-tiny-text", sn.version), b = oe({
|
|
195
195
|
"--ai-name-text": f?.nameColor,
|
|
196
196
|
"--ai-last-used-text": f?.lastUsedColor,
|
|
197
197
|
"--ai-version-text": f?.versionColor
|
|
@@ -219,10 +219,10 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
219
219
|
className: "flex min-w-0 flex-col",
|
|
220
220
|
children: [/* @__PURE__ */ Y("div", {
|
|
221
221
|
className: "flex min-w-0 items-start gap-1 overflow-hidden",
|
|
222
|
-
children: [/* @__PURE__ */ J(
|
|
222
|
+
children: [/* @__PURE__ */ J(on, {
|
|
223
223
|
name: n,
|
|
224
224
|
query: o,
|
|
225
|
-
className: P(_ ? "max-w-max flex-[66_1_0%]" : "flex-1", p?.nameClassName ?? "dial-body-semi-text",
|
|
225
|
+
className: P(_ ? "max-w-max flex-[66_1_0%]" : "flex-1", p?.nameClassName ?? "dial-body-semi-text", sn.name)
|
|
226
226
|
}), _ && /* @__PURE__ */ J(De, {
|
|
227
227
|
text: r,
|
|
228
228
|
className: P("max-w-max min-w-0 flex-[34_1_0%] tabular-nums", y)
|
|
@@ -235,7 +235,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
235
235
|
className: P("min-w-0 tabular-nums", y)
|
|
236
236
|
}),
|
|
237
237
|
i != null && /* @__PURE__ */ J("span", {
|
|
238
|
-
className: P("shrink-0 tabular-nums", p?.lastUsedClassName ?? "dial-tiny-text",
|
|
238
|
+
className: P("shrink-0 tabular-nums", p?.lastUsedClassName ?? "dial-tiny-text", sn.lastUsed),
|
|
239
239
|
children: i
|
|
240
240
|
}),
|
|
241
241
|
l != null && /* @__PURE__ */ J("div", {
|
|
@@ -247,13 +247,13 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
247
247
|
})]
|
|
248
248
|
})]
|
|
249
249
|
});
|
|
250
|
-
},
|
|
250
|
+
}, ln = { icon: "_icon_a0p4u_1" }, un = ({ credentials: e, loggedOutLabel: t = "Authorize to use this toolset.", className: n, colors: r }) => {
|
|
251
251
|
if (e == null || h(e) == null) return null;
|
|
252
252
|
let i = oe({
|
|
253
253
|
"--cat-cred-badge-halo": r?.halo,
|
|
254
254
|
"--cat-cred-badge-icon": r?.icon
|
|
255
255
|
});
|
|
256
|
-
return /* @__PURE__ */ J(
|
|
256
|
+
return /* @__PURE__ */ J(Xe, {
|
|
257
257
|
tooltip: t,
|
|
258
258
|
asChild: !0,
|
|
259
259
|
children: /* @__PURE__ */ J("span", {
|
|
@@ -263,15 +263,15 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
263
263
|
className: P("absolute -end-1 -bottom-1 shrink-0", n),
|
|
264
264
|
children: /* @__PURE__ */ J(et, {
|
|
265
265
|
size: V.SM,
|
|
266
|
-
className:
|
|
266
|
+
className: ln.icon,
|
|
267
267
|
"aria-hidden": !0
|
|
268
268
|
})
|
|
269
269
|
})
|
|
270
270
|
});
|
|
271
|
-
},
|
|
271
|
+
}, dn = {
|
|
272
272
|
starFilledIcon: "_starFilledIcon_po6zj_1",
|
|
273
273
|
starPop: "_starPop_po6zj_1"
|
|
274
|
-
},
|
|
274
|
+
}, fn = ({ isStarred: e, onClick: t, size: n, ariaLabel: r = "Toggle favorite", className: i, starFilledColor: a }) => /* @__PURE__ */ J(Ye, {
|
|
275
275
|
size: n,
|
|
276
276
|
style: oe({ "--cat-star-filled": a }),
|
|
277
277
|
className: i,
|
|
@@ -283,12 +283,12 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
283
283
|
}),
|
|
284
284
|
selectedIcon: /* @__PURE__ */ J(xt, {
|
|
285
285
|
size: V.SM,
|
|
286
|
-
className:
|
|
286
|
+
className: dn.starFilledIcon,
|
|
287
287
|
"aria-hidden": !0
|
|
288
288
|
}),
|
|
289
289
|
"aria-label": r,
|
|
290
290
|
onClick: t
|
|
291
|
-
}),
|
|
291
|
+
}), pn = { tag: "_tag_iqin5_3" }, mn = ({ label: e, className: t, badgeClassName: n = "dial-tiny-text", colors: r }) => /* @__PURE__ */ J(me, {
|
|
292
292
|
label: e,
|
|
293
293
|
textClassName: n,
|
|
294
294
|
style: oe({
|
|
@@ -296,8 +296,8 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
296
296
|
"--cat-card-tag-text": r?.text,
|
|
297
297
|
"--cat-card-tag-border": r?.border
|
|
298
298
|
}),
|
|
299
|
-
className: P(
|
|
300
|
-
}),
|
|
299
|
+
className: P(pn.tag, t)
|
|
300
|
+
}), hn = ({ label: e, className: t = "dial-tiny-text", colors: n }) => /* @__PURE__ */ J(mn, {
|
|
301
301
|
label: e,
|
|
302
302
|
badgeClassName: t,
|
|
303
303
|
colors: n
|
|
@@ -345,20 +345,20 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
345
345
|
ref: (e) => {
|
|
346
346
|
i.current[t] = e;
|
|
347
347
|
},
|
|
348
|
-
children: /* @__PURE__ */ J(
|
|
348
|
+
children: /* @__PURE__ */ J(hn, { label: e })
|
|
349
349
|
}, e)),
|
|
350
|
-
f > 0 && /* @__PURE__ */ J(
|
|
350
|
+
f > 0 && /* @__PURE__ */ J(Xe, {
|
|
351
351
|
tooltip: e.slice(c).join(", "),
|
|
352
352
|
children: /* @__PURE__ */ J("span", {
|
|
353
353
|
"aria-label": t?.(f) ?? `and ${f} more topics`,
|
|
354
|
-
children: /* @__PURE__ */ J(
|
|
354
|
+
children: /* @__PURE__ */ J(hn, { label: `+${f}` })
|
|
355
355
|
})
|
|
356
356
|
}),
|
|
357
357
|
/* @__PURE__ */ J("div", {
|
|
358
358
|
ref: o,
|
|
359
359
|
"aria-hidden": !0,
|
|
360
360
|
className: "invisible absolute inset-s-0 top-0",
|
|
361
|
-
children: /* @__PURE__ */ J(
|
|
361
|
+
children: /* @__PURE__ */ J(hn, { label: `+${e.length}` })
|
|
362
362
|
})
|
|
363
363
|
]
|
|
364
364
|
});
|
|
@@ -378,7 +378,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
378
378
|
I(() => {
|
|
379
379
|
_(r);
|
|
380
380
|
}, [e.id, r]);
|
|
381
|
-
let { ref: v, isClamped: y } =
|
|
381
|
+
let { ref: v, isClamped: y } = an(e.description), b = d?.typography?.descriptionClassName ?? "dial-small-paragraph-text", x = d?.typography?.featuredChipClassName, S = d?.typography?.folderLabelClassName ?? "dial-tiny-text", C = d?.typography?.folderLeafClassName ?? "dial-tiny-semi-text", w = oe({
|
|
382
382
|
"--cg-description-text": d?.colors?.textSecondary,
|
|
383
383
|
"--cg-selected-border": d?.colors?.selectedBorder,
|
|
384
384
|
"--cg-selected-bg": d?.colors?.selectedBackground,
|
|
@@ -406,7 +406,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
406
406
|
} : {},
|
|
407
407
|
"aria-label": e.name,
|
|
408
408
|
style: w,
|
|
409
|
-
className: P("box-border cursor-pointer gap-3 p-3",
|
|
409
|
+
className: P("box-border cursor-pointer gap-3 p-3", tn.card, T ? tn.featuredCard : void 0, l ? tn.selectedCard : void 0, u, Vt.card),
|
|
410
410
|
children: [
|
|
411
411
|
T && /* @__PURE__ */ J("div", {
|
|
412
412
|
className: "absolute inset-e-[22px] top-0 -translate-y-1/2",
|
|
@@ -419,19 +419,19 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
419
419
|
}),
|
|
420
420
|
l && /* @__PURE__ */ J(rt, {
|
|
421
421
|
size: V.SM,
|
|
422
|
-
className: P("absolute end-3 top-3 shrink-0",
|
|
422
|
+
className: P("absolute end-3 top-3 shrink-0", tn.checkIcon),
|
|
423
423
|
"aria-hidden": !0,
|
|
424
424
|
stroke: H
|
|
425
425
|
}),
|
|
426
|
-
/* @__PURE__ */ J(
|
|
426
|
+
/* @__PURE__ */ J(cn, {
|
|
427
427
|
icon: e.iconUrl,
|
|
428
428
|
type: e.type,
|
|
429
429
|
name: e.name,
|
|
430
430
|
version: e.version,
|
|
431
431
|
size: Ft.SM,
|
|
432
432
|
query: t,
|
|
433
|
-
iconClassName:
|
|
434
|
-
iconOverlay: /* @__PURE__ */ J(
|
|
433
|
+
iconClassName: tn.cardIcon,
|
|
434
|
+
iconOverlay: /* @__PURE__ */ J(un, {
|
|
435
435
|
credentials: e.credentials,
|
|
436
436
|
loggedOutLabel: f
|
|
437
437
|
})
|
|
@@ -448,7 +448,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
448
448
|
}),
|
|
449
449
|
children: /* @__PURE__ */ J("div", {
|
|
450
450
|
ref: v,
|
|
451
|
-
className: P(e.topics.length > 0 ? "line-clamp-2 min-h-[2lh]" : "line-clamp-3 min-h-[3lh]", "break-words",
|
|
451
|
+
className: P(e.topics.length > 0 ? "line-clamp-2 min-h-[2lh]" : "line-clamp-3 min-h-[3lh]", "break-words", tn.description),
|
|
452
452
|
children: e.description && /* @__PURE__ */ J(ne, {
|
|
453
453
|
content: e.description,
|
|
454
454
|
classNames: {
|
|
@@ -472,7 +472,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
472
472
|
children: /* @__PURE__ */ J(_n, { topics: e.topics })
|
|
473
473
|
}),
|
|
474
474
|
D && /* @__PURE__ */ J("div", {
|
|
475
|
-
className: P("pt-3", !m && P("border-t",
|
|
475
|
+
className: P("pt-3", !m && P("border-t", tn.footer)),
|
|
476
476
|
children: /* @__PURE__ */ Y("div", {
|
|
477
477
|
className: "flex items-center gap-2",
|
|
478
478
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -482,15 +482,15 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
482
482
|
labelClassName: S,
|
|
483
483
|
leafClassName: C
|
|
484
484
|
}) : /* @__PURE__ */ J("span", {
|
|
485
|
-
className: P(S,
|
|
485
|
+
className: P(S, tn.description),
|
|
486
486
|
children: p
|
|
487
487
|
})
|
|
488
|
-
}), E && /* @__PURE__ */ J(
|
|
488
|
+
}), E && /* @__PURE__ */ J(fn, {
|
|
489
489
|
isStarred: g,
|
|
490
490
|
size: Ee.Small,
|
|
491
491
|
onClick: A,
|
|
492
492
|
ariaLabel: g ? c : s,
|
|
493
|
-
className: P(!g &&
|
|
493
|
+
className: P(!g && tn.emptyStarHidden)
|
|
494
494
|
})]
|
|
495
495
|
})
|
|
496
496
|
})
|
|
@@ -529,8 +529,8 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
529
529
|
}, n?.id ?? `spacer-${t}`);
|
|
530
530
|
})
|
|
531
531
|
});
|
|
532
|
-
}), Tn = ue(({ items: e, query: t = "", onToggleFavorite: n, isFavoriteVisible: r, onItemClick: i, titles: a, isLoading: o, selectedItemId: s, skeletonColor: c =
|
|
533
|
-
let m = a?.noResultsTitle ?? "No results", h = a?.featuredLabel ?? "Featured", g = a?.addToFavoritesAriaLabel ?? "Add to favorites", _ = a?.removeFromFavoritesAriaLabel ?? "Remove from favorites", v = a?.credentialsBadgeLoggedOutLabel ?? "Authorize to use this toolset.", y = a?.noFolderLabel ?? "No folder", { containerRef: b, startRow: x, endRow: S, columnCount: C, totalHeight: w } =
|
|
532
|
+
}), Tn = ue(({ items: e, query: t = "", onToggleFavorite: n, isFavoriteVisible: r, onItemClick: i, titles: a, isLoading: o, selectedItemId: s, skeletonColor: c = tn.skeletonColor, skeletonCardBackground: l, isReadonly: u = !1, isFullWidth: d = !1, featuredChipStyle: f, markdownLabels: p }) => {
|
|
533
|
+
let m = a?.noResultsTitle ?? "No results", h = a?.featuredLabel ?? "Featured", g = a?.addToFavoritesAriaLabel ?? "Add to favorites", _ = a?.removeFromFavoritesAriaLabel ?? "Remove from favorites", v = a?.credentialsBadgeLoggedOutLabel ?? "Authorize to use this toolset.", y = a?.noFolderLabel ?? "No folder", { containerRef: b, startRow: x, endRow: S, columnCount: C, totalHeight: w } = en(e.length, { isFullWidth: d }), T = R(() => ({
|
|
534
534
|
items: e,
|
|
535
535
|
columnCount: C,
|
|
536
536
|
query: t,
|
|
@@ -570,12 +570,12 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
570
570
|
...oe({ "--cg-skeleton-card-bg": l })
|
|
571
571
|
},
|
|
572
572
|
children: Array.from({ length: C * 3 }, (e, t) => /* @__PURE__ */ J("div", {
|
|
573
|
-
className: P("rounded-md border p-3",
|
|
573
|
+
className: P("rounded-md border p-3", tn.skeletonCard),
|
|
574
574
|
style: { height: 248 },
|
|
575
|
-
children: /* @__PURE__ */ J(
|
|
575
|
+
children: /* @__PURE__ */ J(Ge, {
|
|
576
576
|
avatar: {
|
|
577
577
|
size: 48,
|
|
578
|
-
shape:
|
|
578
|
+
shape: Ke.Square
|
|
579
579
|
},
|
|
580
580
|
showTitle: { width: `${60 + t * 17 % 30}%` },
|
|
581
581
|
paragraph: { rows: 3 },
|
|
@@ -601,15 +601,15 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
601
601
|
}, n);
|
|
602
602
|
})
|
|
603
603
|
});
|
|
604
|
-
}), En = (e) => e.reduce((e, t) => t.type ===
|
|
604
|
+
}), En = (e) => e.reduce((e, t) => t.type === Q.File ? e + 1 : e + En(t.items), 0), Dn = (e) => {
|
|
605
605
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
606
|
-
for (let r of e) r.type ===
|
|
606
|
+
for (let r of e) r.type === Q.Folder && (t.add(r.id), n(r.items));
|
|
607
607
|
};
|
|
608
608
|
return n(e), t;
|
|
609
609
|
}, On = (e, t) => {
|
|
610
610
|
if (t != null) for (let n of e) {
|
|
611
611
|
if (n.id === t) return n.name;
|
|
612
|
-
if (n.type ===
|
|
612
|
+
if (n.type === Q.Folder) {
|
|
613
613
|
let e = On(n.items, t);
|
|
614
614
|
if (e != null) return e;
|
|
615
615
|
}
|
|
@@ -622,7 +622,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
622
622
|
valueTrue: "_valueTrue_jnq93_17",
|
|
623
623
|
valueFalse: "_valueFalse_jnq93_21",
|
|
624
624
|
valueText: "_valueText_jnq93_25"
|
|
625
|
-
}, An = ({ value: e, valueClassName: t, valueTrueClassName: n, checkIconClassName: r, yesLabel: i, noLabel: a }) => e === !0 ? /* @__PURE__ */ Y(
|
|
625
|
+
}, An = ({ value: e, valueClassName: t, valueTrueClassName: n, checkIconClassName: r, yesLabel: i, noLabel: a }) => e === !0 ? /* @__PURE__ */ Y(Qe, { children: [/* @__PURE__ */ J(st, {
|
|
626
626
|
size: V.MD,
|
|
627
627
|
className: P(r, kn.checkIcon)
|
|
628
628
|
}), /* @__PURE__ */ J("span", {
|
|
@@ -959,10 +959,10 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
959
959
|
className: "min-h-11 min-w-28 shrink-0 justify-center whitespace-nowrap",
|
|
960
960
|
onClick: u,
|
|
961
961
|
disabled: j || y
|
|
962
|
-
}) : /* @__PURE__ */ J(
|
|
962
|
+
}) : /* @__PURE__ */ J(Ie, {
|
|
963
963
|
label: j ? void 0 : ne,
|
|
964
964
|
"aria-label": ne,
|
|
965
|
-
iconBefore: j ? /* @__PURE__ */ J(
|
|
965
|
+
iconBefore: j ? /* @__PURE__ */ J(qe, {
|
|
966
966
|
size: V.SM,
|
|
967
967
|
ariaLabel: ne
|
|
968
968
|
}) : void 0,
|
|
@@ -987,10 +987,10 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
987
987
|
invalid: k,
|
|
988
988
|
disabled: j || y,
|
|
989
989
|
containerClassName: "min-w-0 flex-1"
|
|
990
|
-
}), /* @__PURE__ */ J(
|
|
990
|
+
}), /* @__PURE__ */ J(Ie, {
|
|
991
991
|
label: j ? void 0 : ie,
|
|
992
992
|
"aria-label": j ? ce : void 0,
|
|
993
|
-
iconBefore: j ? /* @__PURE__ */ J(
|
|
993
|
+
iconBefore: j ? /* @__PURE__ */ J(qe, {
|
|
994
994
|
size: V.SM,
|
|
995
995
|
ariaLabel: ce
|
|
996
996
|
}) : void 0,
|
|
@@ -1202,10 +1202,10 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1202
1202
|
invalid: p,
|
|
1203
1203
|
disabled: h,
|
|
1204
1204
|
containerClassName: "min-w-0 flex-1"
|
|
1205
|
-
}), /* @__PURE__ */ J(
|
|
1205
|
+
}), /* @__PURE__ */ J(Ie, {
|
|
1206
1206
|
label: h ? void 0 : T,
|
|
1207
1207
|
"aria-label": h ? D : void 0,
|
|
1208
|
-
iconBefore: h ? /* @__PURE__ */ J(
|
|
1208
|
+
iconBefore: h ? /* @__PURE__ */ J(qe, {
|
|
1209
1209
|
size: nr,
|
|
1210
1210
|
ariaLabel: D
|
|
1211
1211
|
}) : void 0,
|
|
@@ -1237,7 +1237,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1237
1237
|
action: /* @__PURE__ */ J(G, {
|
|
1238
1238
|
label: _ ? void 0 : E,
|
|
1239
1239
|
"aria-label": _ ? O : void 0,
|
|
1240
|
-
iconBefore: _ ? /* @__PURE__ */ J(
|
|
1240
|
+
iconBefore: _ ? /* @__PURE__ */ J(qe, {
|
|
1241
1241
|
size: nr,
|
|
1242
1242
|
ariaLabel: O
|
|
1243
1243
|
}) : void 0,
|
|
@@ -1258,7 +1258,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1258
1258
|
n
|
|
1259
1259
|
]);
|
|
1260
1260
|
if (!ar(e) || r && !r(e)) return null;
|
|
1261
|
-
let c = /* @__PURE__ */ J(
|
|
1261
|
+
let c = /* @__PURE__ */ J(Ie, {
|
|
1262
1262
|
label: i,
|
|
1263
1263
|
iconBefore: /* @__PURE__ */ J(yt, {
|
|
1264
1264
|
size: V.MD,
|
|
@@ -1368,33 +1368,33 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1368
1368
|
Ae(), N?.();
|
|
1369
1369
|
}, [Ae, N]), Pe = F(() => {
|
|
1370
1370
|
N?.();
|
|
1371
|
-
}, [N]), Fe = T?.hasPrimaryAction !== !1 && (i?.(e) ?? (e.type === E.Model || e.type === E.Agent || e.type === E.Prompt)), G = !re && !!ne && ee && (M?.(e) ?? !0),
|
|
1371
|
+
}, [N]), Fe = T?.hasPrimaryAction !== !1 && (i?.(e) ?? (e.type === E.Model || e.type === E.Agent || e.type === E.Prompt)), G = !re && !!ne && ee && (M?.(e) ?? !0), K = !re && !!ne && !te && M?.(e) === !0, q = !re && !G && (O?.(e) ?? (e.type === E.Model || e.type === E.Toolset || e.type === E.Agent)), Re = !re && !!l && !!e.isEditable, Be = !re && e.isMyApp === !0 && (s?.(e) ?? !0), Ve = c?.(e) ?? !0, He = k?.(e) ?? !1, Ue = e.credentials?.authenticationType ?? t.None, We = e.credentials != null && Ue !== t.None ? f(e.credentials) : void 0, Ge = !re && We != null && (!!b || !!x), Ke = e.type === E.Toolset && Ge, Je = !!u && (d?.(e) ?? !0), Ye = Je && !Ke && (p?.(e) ?? (e.type === E.Skill && !Fe)), Xe = Je && !Ye, Ze = !re && e.isMyApp, $e = !re && !!h && e.isMyApp !== !0 && e.sharedWithMe === !0 && (g?.(e) ?? !0), et = !re && !!_ && e.isMyApp === !0 && (!v || Ce === er.Unknown || Ce === er.Resolved && (Ee ?? 0) > 0) && (y?.(e) ?? !0), nt = R(() => {
|
|
1372
1372
|
let e = [];
|
|
1373
|
-
if (!
|
|
1373
|
+
if (!Ve && Be && e.push({
|
|
1374
1374
|
key: "share",
|
|
1375
1375
|
label: T?.shareLabel ?? "Share",
|
|
1376
1376
|
Icon: yt,
|
|
1377
1377
|
iconClassName: "text-secondary",
|
|
1378
1378
|
onClick: ve
|
|
1379
|
-
}),
|
|
1379
|
+
}), Re && e.push({
|
|
1380
1380
|
key: "edit",
|
|
1381
1381
|
label: T?.editActionLabel ?? "Edit",
|
|
1382
1382
|
Icon: gt,
|
|
1383
1383
|
iconClassName: "text-secondary",
|
|
1384
1384
|
onClick: ue
|
|
1385
|
-
}),
|
|
1385
|
+
}), Xe && e.push({
|
|
1386
1386
|
key: "download",
|
|
1387
1387
|
label: T?.downloadActionLabel ?? "Download",
|
|
1388
1388
|
Icon: lt,
|
|
1389
1389
|
iconClassName: "text-secondary",
|
|
1390
1390
|
onClick: pe
|
|
1391
|
-
}), !
|
|
1391
|
+
}), !He && q && e.push({
|
|
1392
1392
|
key: "publish",
|
|
1393
1393
|
label: T?.publishLabel ?? "Publish",
|
|
1394
1394
|
Icon: Et,
|
|
1395
1395
|
iconClassName: "text-secondary",
|
|
1396
1396
|
onClick: de
|
|
1397
|
-
}), !
|
|
1397
|
+
}), !He && G && e.push({
|
|
1398
1398
|
key: "unpublish",
|
|
1399
1399
|
label: T?.unpublishLabel ?? "Unpublish",
|
|
1400
1400
|
Icon: Tt,
|
|
@@ -1415,7 +1415,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1415
1415
|
label: T?.unshareLabel ?? "Remove from My List",
|
|
1416
1416
|
Icon: St,
|
|
1417
1417
|
onClick: be
|
|
1418
|
-
}),
|
|
1418
|
+
}), Ze && e.push({
|
|
1419
1419
|
key: "delete",
|
|
1420
1420
|
label: T?.deleteActionLabel ?? "Delete",
|
|
1421
1421
|
Icon: St,
|
|
@@ -1423,14 +1423,14 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1423
1423
|
onClick: xe
|
|
1424
1424
|
}), e;
|
|
1425
1425
|
}, [
|
|
1426
|
-
He,
|
|
1427
1426
|
Ve,
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1427
|
+
Be,
|
|
1428
|
+
Re,
|
|
1429
|
+
Xe,
|
|
1430
|
+
He,
|
|
1431
|
+
q,
|
|
1432
1432
|
G,
|
|
1433
|
-
|
|
1433
|
+
Ze,
|
|
1434
1434
|
et,
|
|
1435
1435
|
Ee,
|
|
1436
1436
|
$e,
|
|
@@ -1454,25 +1454,25 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1454
1454
|
}),
|
|
1455
1455
|
danger: i,
|
|
1456
1456
|
onClick: a
|
|
1457
|
-
})), [nt]), at = M?.(e), ot = !re && !!ne && (at == null || at && !te), st = !re && !!_ && !!v && e.isMyApp === !0 && (y?.(e) ?? !0), ut = nt.length === 1 && !je && !ot && !st ? nt[0] : void 0, [dt, X] = B(!1), pt =
|
|
1458
|
-
|
|
1457
|
+
})), [nt]), at = M?.(e), ot = !re && !!ne && (at == null || at && !te), st = !re && !!_ && !!v && e.isMyApp === !0 && (y?.(e) ?? !0), ut = nt.length === 1 && !je && !ot && !st ? nt[0] : void 0, [dt, X] = B(!1), pt = Ue === t.ApiKey && We !== r.ManageCredentials, vt = Ue === t.ApiKey && We === r.LogOut, bt = Ue !== t.ApiKey && We !== r.ManageCredentials && We === r.LogOut, xt = F(() => {
|
|
1458
|
+
We === r.ManageCredentials ? S?.() : pt ? X((e) => !e) : We === r.LogOut ? w?.() : b?.(e, { level: C.User });
|
|
1459
1459
|
}, [
|
|
1460
|
-
|
|
1460
|
+
We,
|
|
1461
1461
|
pt,
|
|
1462
1462
|
e,
|
|
1463
1463
|
b,
|
|
1464
1464
|
S,
|
|
1465
1465
|
w
|
|
1466
|
-
]), Ct =
|
|
1466
|
+
]), Ct = We === r.ManageCredentials ? (T?.manageCredentialsActionLabel ?? sr)(Ue) : Ue === t.ApiKey ? We === r.LogOut ? T?.changeApiKeyActionLabel ?? "Change API key" : T?.apiKeyActionLabel ?? "API key" : We === r.LogOut ? T?.logoutActionLabel ?? "Log out" : T?.loginActionLabel ?? "Log in", Dt = We === r.ManageCredentials || Ue === t.ApiKey ? /* @__PURE__ */ J(ft, {
|
|
1467
1467
|
size: V.MD,
|
|
1468
1468
|
stroke: H
|
|
1469
|
-
}) :
|
|
1469
|
+
}) : We === r.LogOut ? /* @__PURE__ */ J(ht, {
|
|
1470
1470
|
size: V.MD,
|
|
1471
1471
|
stroke: H
|
|
1472
1472
|
}) : /* @__PURE__ */ J(mt, {
|
|
1473
1473
|
size: V.MD,
|
|
1474
1474
|
stroke: H
|
|
1475
|
-
}), Ot =
|
|
1475
|
+
}), Ot = We === r.ManageCredentials ? /* @__PURE__ */ J(tt, {
|
|
1476
1476
|
size: V.MD,
|
|
1477
1477
|
className: "rtl:scale-x-[-1]",
|
|
1478
1478
|
stroke: H
|
|
@@ -1515,7 +1515,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1515
1515
|
shareOverlay: o,
|
|
1516
1516
|
isShareVisible: s,
|
|
1517
1517
|
label: T?.shareLabel
|
|
1518
|
-
}) : /* @__PURE__ */ J(i ? we :
|
|
1518
|
+
}) : /* @__PURE__ */ J(i ? we : Ie, {
|
|
1519
1519
|
label: n,
|
|
1520
1520
|
iconBefore: /* @__PURE__ */ J(r, {
|
|
1521
1521
|
size: V.MD,
|
|
@@ -1529,7 +1529,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1529
1529
|
placement: "bottom-end",
|
|
1530
1530
|
matchReferenceWidth: !1,
|
|
1531
1531
|
onOpenChange: W,
|
|
1532
|
-
children: /* @__PURE__ */ J(
|
|
1532
|
+
children: /* @__PURE__ */ J(Le, {
|
|
1533
1533
|
icon: /* @__PURE__ */ J(ct, {
|
|
1534
1534
|
size: V.LG,
|
|
1535
1535
|
"aria-hidden": !0,
|
|
@@ -1541,7 +1541,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1541
1541
|
onFocus: Ne
|
|
1542
1542
|
})
|
|
1543
1543
|
});
|
|
1544
|
-
return
|
|
1544
|
+
return Ve || !o || !Be ? t : /* @__PURE__ */ J(U, {
|
|
1545
1545
|
placement: "bottom-end",
|
|
1546
1546
|
matchReferenceWidth: !1,
|
|
1547
1547
|
open: ge,
|
|
@@ -1551,7 +1551,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1551
1551
|
renderOverlay: () => o(e, ye),
|
|
1552
1552
|
children: t
|
|
1553
1553
|
});
|
|
1554
|
-
}, Mt =
|
|
1554
|
+
}, Mt = Ke || Fe || Ye || Ve && Be || He && G || He && q || Ge && !Ke || rt.length > 0 && !K;
|
|
1555
1555
|
return /* @__PURE__ */ Y("div", {
|
|
1556
1556
|
className: "flex flex-col gap-3 px-6 py-4",
|
|
1557
1557
|
children: [/* @__PURE__ */ J(j, {
|
|
@@ -1570,16 +1570,16 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1570
1570
|
}), Mt && /* @__PURE__ */ Y("div", {
|
|
1571
1571
|
className: "flex flex-wrap items-center gap-2 ps-[60px]",
|
|
1572
1572
|
children: [
|
|
1573
|
-
|
|
1574
|
-
Fe && /* @__PURE__ */ J(
|
|
1573
|
+
Ke && kt(vt || bt ? Ie : ze),
|
|
1574
|
+
Fe && /* @__PURE__ */ J(ze, {
|
|
1575
1575
|
label: T?.primaryActionLabel ?? "Use in chat",
|
|
1576
1576
|
iconBefore: /* @__PURE__ */ J(_t, { size: V.MD }),
|
|
1577
1577
|
onClick: le,
|
|
1578
1578
|
disabled: se === Nt.LimitReached
|
|
1579
1579
|
}),
|
|
1580
|
-
|
|
1580
|
+
Ye && /* @__PURE__ */ Y(Qe, { children: [/* @__PURE__ */ J(ze, {
|
|
1581
1581
|
label: T?.downloadActionLabel ?? "Download",
|
|
1582
|
-
iconBefore: L ? /* @__PURE__ */ J(
|
|
1582
|
+
iconBefore: L ? /* @__PURE__ */ J(qe, {
|
|
1583
1583
|
size: V.MD,
|
|
1584
1584
|
"aria-hidden": !0
|
|
1585
1585
|
}) : /* @__PURE__ */ J(lt, {
|
|
@@ -1596,14 +1596,14 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1596
1596
|
className: "sr-only",
|
|
1597
1597
|
children: T?.downloadingStatusLabel ?? "Downloading"
|
|
1598
1598
|
})] }),
|
|
1599
|
-
|
|
1599
|
+
Ve && Be && /* @__PURE__ */ J(or, {
|
|
1600
1600
|
item: e,
|
|
1601
1601
|
onShare: a,
|
|
1602
1602
|
shareOverlay: o,
|
|
1603
1603
|
isShareVisible: s,
|
|
1604
1604
|
label: T?.shareLabel
|
|
1605
1605
|
}),
|
|
1606
|
-
|
|
1606
|
+
He && G && /* @__PURE__ */ J(Ie, {
|
|
1607
1607
|
label: T?.unpublishLabel ?? "Unpublish",
|
|
1608
1608
|
iconBefore: /* @__PURE__ */ J(Tt, {
|
|
1609
1609
|
size: V.MD,
|
|
@@ -1614,7 +1614,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1614
1614
|
onMouseEnter: Pe,
|
|
1615
1615
|
onFocus: Pe
|
|
1616
1616
|
}),
|
|
1617
|
-
|
|
1617
|
+
He && q && /* @__PURE__ */ J(Ie, {
|
|
1618
1618
|
label: T?.publishLabel ?? "Publish",
|
|
1619
1619
|
iconBefore: /* @__PURE__ */ J(Et, {
|
|
1620
1620
|
size: V.MD,
|
|
@@ -1625,8 +1625,8 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1625
1625
|
onMouseEnter: Pe,
|
|
1626
1626
|
onFocus: Pe
|
|
1627
1627
|
}),
|
|
1628
|
-
|
|
1629
|
-
!
|
|
1628
|
+
Ge && !Ke && kt(Ie),
|
|
1629
|
+
!K && (ut ? At(ut) : rt.length > 0 && jt())
|
|
1630
1630
|
]
|
|
1631
1631
|
})]
|
|
1632
1632
|
});
|
|
@@ -1650,7 +1650,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1650
1650
|
...r
|
|
1651
1651
|
}), e && e.length > 0 && /* @__PURE__ */ J("div", {
|
|
1652
1652
|
className: "flex flex-wrap gap-2",
|
|
1653
|
-
children: e.map((e) => /* @__PURE__ */ J(
|
|
1653
|
+
children: e.map((e) => /* @__PURE__ */ J(hn, { label: e }, e))
|
|
1654
1654
|
})]
|
|
1655
1655
|
});
|
|
1656
1656
|
}, fr = {
|
|
@@ -1662,7 +1662,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1662
1662
|
node: e,
|
|
1663
1663
|
parentId: n
|
|
1664
1664
|
};
|
|
1665
|
-
return e.type ===
|
|
1665
|
+
return e.type === Q.File || !t.has(e.id) ? [r] : [r, ...pr(e.items, t, e.id)];
|
|
1666
1666
|
}), mr = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o = "Select file", rowNameClassName: s = "dial-small-text" }) => {
|
|
1667
1667
|
let c = R(() => pr(e, n), [e, n]), l = z({}), [u, d] = B(() => t ?? c[0]?.node.id);
|
|
1668
1668
|
I(() => {
|
|
@@ -1688,20 +1688,20 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1688
1688
|
break;
|
|
1689
1689
|
}
|
|
1690
1690
|
case "ArrowRight":
|
|
1691
|
-
e.preventDefault(), o.node.type ===
|
|
1691
|
+
e.preventDefault(), o.node.type === Q.Folder && !n.has(o.node.id) && r(o.node.id);
|
|
1692
1692
|
break;
|
|
1693
1693
|
case "ArrowLeft":
|
|
1694
|
-
e.preventDefault(), o.node.type ===
|
|
1694
|
+
e.preventDefault(), o.node.type === Q.Folder && n.has(o.node.id) ? r(o.node.id) : o.parentId != null && f(o.parentId);
|
|
1695
1695
|
break;
|
|
1696
1696
|
case "Enter":
|
|
1697
1697
|
case " ":
|
|
1698
|
-
e.preventDefault(), o.node.type ===
|
|
1698
|
+
e.preventDefault(), o.node.type === Q.Folder ? r(o.node.id) : i(o.node.id);
|
|
1699
1699
|
break;
|
|
1700
1700
|
case "Escape": e.preventDefault(), a();
|
|
1701
1701
|
}
|
|
1702
1702
|
}, m = (e) => P("flex h-10 shrink-0 cursor-pointer items-center gap-2 rounded-2 px-3 outline-hidden", "hover:bg-control-accent-alpha-hover focus-visible:bg-control-accent-alpha-hover", e && "bg-control-accent-alpha-hover"), h = (e) => {
|
|
1703
1703
|
let a = e.id === u;
|
|
1704
|
-
if (e.type ===
|
|
1704
|
+
if (e.type === Q.File) {
|
|
1705
1705
|
let n = e.id === t;
|
|
1706
1706
|
return /* @__PURE__ */ J("div", {
|
|
1707
1707
|
ref: (t) => {
|
|
@@ -1773,10 +1773,10 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1773
1773
|
ariaLabel: u,
|
|
1774
1774
|
rowNameClassName: y
|
|
1775
1775
|
}, O = a ? {
|
|
1776
|
-
type:
|
|
1776
|
+
type: zt.Text,
|
|
1777
1777
|
text: ""
|
|
1778
1778
|
} : m ?? {
|
|
1779
|
-
type:
|
|
1779
|
+
type: zt.Markdown,
|
|
1780
1780
|
text: e
|
|
1781
1781
|
};
|
|
1782
1782
|
return /* @__PURE__ */ Y("div", {
|
|
@@ -1804,7 +1804,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1804
1804
|
children: d(En(w))
|
|
1805
1805
|
})]
|
|
1806
1806
|
}),
|
|
1807
|
-
C && /* @__PURE__ */ Y(
|
|
1807
|
+
C && /* @__PURE__ */ Y(Qe, { children: [/* @__PURE__ */ J("p", {
|
|
1808
1808
|
className: P("m-0", y),
|
|
1809
1809
|
children: t
|
|
1810
1810
|
}), /* @__PURE__ */ J("div", { className: P("shrink-0", fr.divider) })] }),
|
|
@@ -1819,24 +1819,24 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1819
1819
|
}), (() => {
|
|
1820
1820
|
if (h != null) return h;
|
|
1821
1821
|
switch (O.type) {
|
|
1822
|
-
case
|
|
1822
|
+
case zt.Markdown: return /* @__PURE__ */ J(re, {
|
|
1823
1823
|
content: O.text,
|
|
1824
1824
|
headingClassName: b,
|
|
1825
1825
|
...v
|
|
1826
1826
|
});
|
|
1827
|
-
case
|
|
1827
|
+
case zt.Text: return /* @__PURE__ */ J(N, {
|
|
1828
1828
|
language: O.language ?? "",
|
|
1829
1829
|
value: O.text,
|
|
1830
1830
|
copyLabel: v?.codeBlockCopyLabel,
|
|
1831
1831
|
copiedLabel: v?.codeBlockCopiedLabel,
|
|
1832
1832
|
hideDownload: !0
|
|
1833
1833
|
});
|
|
1834
|
-
case
|
|
1834
|
+
case zt.Image: return /* @__PURE__ */ J("img", {
|
|
1835
1835
|
src: O.url,
|
|
1836
1836
|
alt: E,
|
|
1837
1837
|
className: "max-w-full"
|
|
1838
1838
|
});
|
|
1839
|
-
case
|
|
1839
|
+
case zt.Unsupported: return /* @__PURE__ */ J("p", {
|
|
1840
1840
|
className: "m-0",
|
|
1841
1841
|
children: p
|
|
1842
1842
|
});
|
|
@@ -1862,7 +1862,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1862
1862
|
resetLabel: "_resetLabel_1v3yh_38",
|
|
1863
1863
|
valueDanger: "_valueDanger_1v3yh_43"
|
|
1864
1864
|
}, Er = ({ row: e, layout: t, labelClassName: n, captionClassName: r, valueClassName: i, noteValueClassName: a, noteClassName: o }) => {
|
|
1865
|
-
let s = xr(e), c = Tr(e), l = /* @__PURE__ */ J(
|
|
1865
|
+
let s = xr(e), c = Tr(e), l = /* @__PURE__ */ J(Be, {
|
|
1866
1866
|
value: yr(e),
|
|
1867
1867
|
max: br(e.total),
|
|
1868
1868
|
size: Ee.Small,
|
|
@@ -1872,7 +1872,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1872
1872
|
}), u = e.captionLabel != null && /* @__PURE__ */ J("span", {
|
|
1873
1873
|
className: P("break-words", r, $.label),
|
|
1874
1874
|
children: e.captionLabel
|
|
1875
|
-
}), d = e.resetLabel != null && /* @__PURE__ */ Y(
|
|
1875
|
+
}), d = e.resetLabel != null && /* @__PURE__ */ Y(Qe, { children: [/* @__PURE__ */ J("time", {
|
|
1876
1876
|
dateTime: e.resetIsoValue,
|
|
1877
1877
|
"aria-hidden": e.resetAriaLabel != null || void 0,
|
|
1878
1878
|
className: P("break-words", r, $.resetLabel),
|
|
@@ -1917,7 +1917,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
1917
1917
|
className: "flex w-32 shrink-0 flex-col items-end gap-2",
|
|
1918
1918
|
children: [/* @__PURE__ */ J("div", {
|
|
1919
1919
|
className: P("flex gap-1", i),
|
|
1920
|
-
children: e.usedLabel != null && e.totalLabel != null ? /* @__PURE__ */ Y(
|
|
1920
|
+
children: e.usedLabel != null && e.totalLabel != null ? /* @__PURE__ */ Y(Qe, { children: [/* @__PURE__ */ J("span", {
|
|
1921
1921
|
className: $.valuePrimary,
|
|
1922
1922
|
children: e.usedLabel
|
|
1923
1923
|
}), /* @__PURE__ */ J("span", {
|
|
@@ -2073,7 +2073,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2073
2073
|
children: [
|
|
2074
2074
|
/* @__PURE__ */ Y("div", {
|
|
2075
2075
|
className: "flex flex-col gap-3 pt-4 pb-2",
|
|
2076
|
-
children: [/* @__PURE__ */ J(
|
|
2076
|
+
children: [/* @__PURE__ */ J(He, {
|
|
2077
2077
|
value: c,
|
|
2078
2078
|
placeholder: s.searchPlaceholder,
|
|
2079
2079
|
"aria-label": s.searchPlaceholder,
|
|
@@ -2190,13 +2190,13 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2190
2190
|
"--cat-cred-card-icon": W?.credentialsCardIcon,
|
|
2191
2191
|
"--cat-cred-card-title-text": W?.credentialsCardTitleText,
|
|
2192
2192
|
"--cat-cred-card-description-text": W?.credentialsCardDescriptionText
|
|
2193
|
-
}), [Pe, Fe] = B(n), [G,
|
|
2194
|
-
let t = rt.current, n = e?.preview?.type ===
|
|
2195
|
-
t != null && t !== n && t.startsWith("blob:") && URL.revokeObjectURL(t), rt.current = n,
|
|
2193
|
+
}), [Pe, Fe] = B(n), [G, K] = B(""), [q, Ie] = B(!1), [Le, Re] = B([]), [ze, Be] = B(!1), He = z(null), Ue = e.details?.promptContent, Ke = Ue?.selectedFileId, [qe, Ye] = B(null), [Xe, Ze] = B(!1), [$e, et] = B(/* @__PURE__ */ new Set()), [tt, nt] = B(!1), rt = z(null), it = z(0), at = F((e) => {
|
|
2194
|
+
let t = rt.current, n = e?.preview?.type === zt.Image ? e.preview.url : null;
|
|
2195
|
+
t != null && t !== n && t.startsWith("blob:") && URL.revokeObjectURL(t), rt.current = n, Ye(e);
|
|
2196
2196
|
}, []);
|
|
2197
2197
|
I(() => {
|
|
2198
|
-
it.current += 1, at(null),
|
|
2199
|
-
}, [e.id,
|
|
2198
|
+
it.current += 1, at(null), Ze(!1), et(Dn(Ue?.files ?? [])), nt(!1);
|
|
2199
|
+
}, [e.id, Ke]), I(() => () => {
|
|
2200
2200
|
let e = rt.current;
|
|
2201
2201
|
e != null && e.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
2202
2202
|
}, []);
|
|
@@ -2206,8 +2206,8 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2206
2206
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
2207
2207
|
});
|
|
2208
2208
|
}, []), st = F(async (e) => {
|
|
2209
|
-
if (e ===
|
|
2210
|
-
it.current += 1, at(null),
|
|
2209
|
+
if (e === Ke) {
|
|
2210
|
+
it.current += 1, at(null), Ze(!1);
|
|
2211
2211
|
return;
|
|
2212
2212
|
}
|
|
2213
2213
|
if (L == null && fe == null && pe == null) return;
|
|
@@ -2215,21 +2215,21 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2215
2215
|
it.current += 1, at({
|
|
2216
2216
|
id: e,
|
|
2217
2217
|
preview: null
|
|
2218
|
-
}),
|
|
2218
|
+
}), Ze(!1);
|
|
2219
2219
|
return;
|
|
2220
2220
|
}
|
|
2221
2221
|
let t = ++it.current;
|
|
2222
2222
|
at({
|
|
2223
2223
|
id: e,
|
|
2224
2224
|
preview: null
|
|
2225
|
-
}),
|
|
2225
|
+
}), Ze(!0);
|
|
2226
2226
|
try {
|
|
2227
2227
|
let n = pe == null ? await fe?.(e).then((e) => e == null ? void 0 : {
|
|
2228
|
-
type:
|
|
2228
|
+
type: zt.Markdown,
|
|
2229
2229
|
text: e
|
|
2230
2230
|
}) : await pe(e);
|
|
2231
2231
|
if (it.current !== t) {
|
|
2232
|
-
n?.type ===
|
|
2232
|
+
n?.type === zt.Image && n.url.startsWith("blob:") && URL.revokeObjectURL(n.url);
|
|
2233
2233
|
return;
|
|
2234
2234
|
}
|
|
2235
2235
|
at({
|
|
@@ -2243,39 +2243,39 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2243
2243
|
preview: null
|
|
2244
2244
|
});
|
|
2245
2245
|
} finally {
|
|
2246
|
-
it.current === t &&
|
|
2246
|
+
it.current === t && Ze(!1);
|
|
2247
2247
|
}
|
|
2248
2248
|
}, [
|
|
2249
|
-
|
|
2249
|
+
Ke,
|
|
2250
2250
|
fe,
|
|
2251
2251
|
pe,
|
|
2252
2252
|
L,
|
|
2253
2253
|
at
|
|
2254
|
-
]), ct =
|
|
2255
|
-
type:
|
|
2254
|
+
]), ct = qe?.id ?? Ke, lt = () => qe == null ? null : qe.preview == null ? {
|
|
2255
|
+
type: zt.Text,
|
|
2256
2256
|
text: U?.contentFileErrorLabel ?? "Failed to load this file."
|
|
2257
|
-
} :
|
|
2258
|
-
if (!g ||
|
|
2257
|
+
} : qe.preview, ut = qe != null && L != null ? L(qe.id, On(Ue?.files ?? [], qe.id) ?? "") : void 0, dt = F(() => {
|
|
2258
|
+
if (!g || He.current === e.id) return;
|
|
2259
2259
|
let t = e.id;
|
|
2260
|
-
|
|
2260
|
+
He.current = t, (async () => {
|
|
2261
2261
|
try {
|
|
2262
2262
|
let n = await g(e);
|
|
2263
|
-
if (
|
|
2264
|
-
|
|
2263
|
+
if (He.current !== t) return;
|
|
2264
|
+
Re(n), Be(!0);
|
|
2265
2265
|
} catch {
|
|
2266
|
-
if (
|
|
2267
|
-
|
|
2266
|
+
if (He.current !== t) return;
|
|
2267
|
+
He.current = null, Be(!0);
|
|
2268
2268
|
}
|
|
2269
2269
|
})();
|
|
2270
2270
|
}, [g, e]);
|
|
2271
2271
|
I(() => {
|
|
2272
|
-
|
|
2273
|
-
}, [
|
|
2272
|
+
q && dt();
|
|
2273
|
+
}, [q, dt]);
|
|
2274
2274
|
let ft = F((e, t) => {
|
|
2275
|
-
|
|
2275
|
+
He.current = null, Be(!1), dt(), j?.(e, t);
|
|
2276
2276
|
}, [dt, j]), X = At({
|
|
2277
2277
|
item: e,
|
|
2278
|
-
history:
|
|
2278
|
+
history: Le,
|
|
2279
2279
|
folderItems: _,
|
|
2280
2280
|
hasWriteAccess: w,
|
|
2281
2281
|
defaultAuthor: k,
|
|
@@ -2301,7 +2301,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2301
2301
|
I(() => {
|
|
2302
2302
|
Fe(n);
|
|
2303
2303
|
}, [e.id, n]), I(() => {
|
|
2304
|
-
|
|
2304
|
+
K(""), Ie(!1), X.reset(), Re([]), Be(!1), He.current = null, Et(null), gt(!1), vt(null), bt(!1), St(null), wt(null);
|
|
2305
2305
|
}, [e.id]);
|
|
2306
2306
|
let jt = !i && !!Se && V?.(e) === !0;
|
|
2307
2307
|
I(() => {
|
|
@@ -2317,7 +2317,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2317
2317
|
vt(Z.RevokeAccess);
|
|
2318
2318
|
}, []), Rt = R(() => {
|
|
2319
2319
|
let e = /* @__PURE__ */ new Set(), t = [];
|
|
2320
|
-
for (let n of
|
|
2320
|
+
for (let n of Le) {
|
|
2321
2321
|
let r = n.folderPath.join("/");
|
|
2322
2322
|
e.has(r) || (e.add(r), t.push({
|
|
2323
2323
|
key: r,
|
|
@@ -2325,13 +2325,13 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2325
2325
|
}));
|
|
2326
2326
|
}
|
|
2327
2327
|
return t;
|
|
2328
|
-
}, [
|
|
2328
|
+
}, [Le]), Q = ze && Rt.length > 0, Bt = F((e) => e || (te?.rootFolderLabel ?? "Organization"), [te]), Vt = F(() => {
|
|
2329
2329
|
vt(Z.Unpublish);
|
|
2330
|
-
}, []),
|
|
2330
|
+
}, []), Ht = F((e) => {
|
|
2331
2331
|
St(e), vt(Z.DeleteApiKey);
|
|
2332
|
-
}, []),
|
|
2332
|
+
}, []), Ut = F(() => {
|
|
2333
2333
|
yt || (vt(null), St(null), wt(null), Et(null));
|
|
2334
|
-
}, [yt]),
|
|
2334
|
+
}, [yt]), Wt = F(async () => {
|
|
2335
2335
|
if (!(yt || _t == null)) {
|
|
2336
2336
|
bt(!0);
|
|
2337
2337
|
try {
|
|
@@ -2382,26 +2382,26 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2382
2382
|
I(() => {
|
|
2383
2383
|
if (!t || _t == null) return;
|
|
2384
2384
|
let e = (e) => {
|
|
2385
|
-
e.key === "Escape" && (e.stopPropagation(),
|
|
2385
|
+
e.key === "Escape" && (e.stopPropagation(), Ut());
|
|
2386
2386
|
};
|
|
2387
2387
|
return document.addEventListener("keydown", e, !0), () => document.removeEventListener("keydown", e, !0);
|
|
2388
2388
|
}, [
|
|
2389
2389
|
t,
|
|
2390
2390
|
_t,
|
|
2391
|
-
|
|
2391
|
+
Ut
|
|
2392
2392
|
]);
|
|
2393
|
-
let
|
|
2394
|
-
|
|
2395
|
-
}, [X]),
|
|
2396
|
-
await X.handleSubmit() &&
|
|
2397
|
-
}, [X,
|
|
2393
|
+
let Kt = F(() => Ie(!0), []), qt = F(() => {
|
|
2394
|
+
Ie(!1), X.reset();
|
|
2395
|
+
}, [X]), Jt = F(async () => {
|
|
2396
|
+
await X.handleSubmit() && qt();
|
|
2397
|
+
}, [X, qt]), Yt = F(() => {
|
|
2398
2398
|
let t = !Pe;
|
|
2399
2399
|
Fe(t), c?.(e.id, t);
|
|
2400
2400
|
}, [
|
|
2401
2401
|
Pe,
|
|
2402
2402
|
e.id,
|
|
2403
2403
|
c
|
|
2404
|
-
]),
|
|
2404
|
+
]), Xt = R(() => {
|
|
2405
2405
|
let t = {
|
|
2406
2406
|
[T.About]: U?.tabAboutLabel ?? "About",
|
|
2407
2407
|
[T.Content]: U?.tabContentLabel ?? "Details",
|
|
@@ -2415,28 +2415,28 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2415
2415
|
id: e,
|
|
2416
2416
|
label: t[e]
|
|
2417
2417
|
}));
|
|
2418
|
-
}, [e, U]),
|
|
2418
|
+
}, [e, U]), Zt = z(null);
|
|
2419
2419
|
I(() => {
|
|
2420
|
-
let t =
|
|
2421
|
-
|
|
2420
|
+
let t = Zt.current !== e.id;
|
|
2421
|
+
Zt.current = e.id, (t || !Xt.some((e) => e.id === G)) && K(Xt[0]?.id ?? "");
|
|
2422
2422
|
}, [
|
|
2423
2423
|
e.id,
|
|
2424
|
-
|
|
2424
|
+
Xt,
|
|
2425
2425
|
G
|
|
2426
2426
|
]);
|
|
2427
|
-
let
|
|
2427
|
+
let Qt = R(() => Gt(U), [U]), $t = R(() => {
|
|
2428
2428
|
let e = {};
|
|
2429
2429
|
return U?.toolsSearchPlaceholder != null && (e.searchPlaceholder = U.toolsSearchPlaceholder), U?.toolsSearchClearLabel != null && (e.searchClearLabel = U.toolsSearchClearLabel), U?.toolsCountLabel != null && (e.toolCount = U.toolsCountLabel), U?.toolsNoResultsLabel != null && (e.noResults = U.toolsNoResultsLabel), e;
|
|
2430
|
-
}, [U]),
|
|
2430
|
+
}, [U]), en = U?.emptyTabLabel ?? "No data", tn = !e.description?.trim() && (e.topics?.length ?? 0) === 0, nn = !e.details?.overview?.sections?.length, rn = /* @__PURE__ */ J("div", {
|
|
2431
2431
|
className: "flex size-full items-center justify-center py-6",
|
|
2432
|
-
children: /* @__PURE__ */ J(ie, { label:
|
|
2433
|
-
}),
|
|
2432
|
+
children: /* @__PURE__ */ J(ie, { label: en })
|
|
2433
|
+
}), an = U?.overviewYesLabel ?? "Yes", on = U?.overviewNoLabel ?? "No", sn = U?.ariaLabel ?? "Item details", cn = U?.closeAriaLabel ?? "Close", ln = Pe ? U?.removeFromFavoritesAriaLabel ?? "Remove from favorites" : U?.addToFavoritesAriaLabel ?? "Add to favorites", un = U?.publishTitle ?? "Publish", dn = U?.backToDetailsAriaLabel ?? "Back", pn = U?.cancelLabel ?? "Cancel", mn = R(() => {
|
|
2434
2434
|
switch (_t) {
|
|
2435
2435
|
case Z.Delete: {
|
|
2436
2436
|
let t = U?.deleteActionLabel ?? "Delete";
|
|
2437
2437
|
return {
|
|
2438
2438
|
title: U?.deleteConfirmTitle ?? t,
|
|
2439
|
-
message: U?.deleteConfirmMessage?.(e.name) ?? /* @__PURE__ */ Y(
|
|
2439
|
+
message: U?.deleteConfirmMessage?.(e.name) ?? /* @__PURE__ */ Y(Qe, { children: [
|
|
2440
2440
|
"Are you sure you want to delete ",
|
|
2441
2441
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2442
2442
|
"? This action is permanent and cannot be undone."
|
|
@@ -2451,7 +2451,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2451
2451
|
let t = U?.unshareLabel ?? "Remove from My List";
|
|
2452
2452
|
return {
|
|
2453
2453
|
title: U?.unshareConfirmTitle ?? t,
|
|
2454
|
-
message: U?.unshareConfirmMessage?.(e.name) ?? /* @__PURE__ */ Y(
|
|
2454
|
+
message: U?.unshareConfirmMessage?.(e.name) ?? /* @__PURE__ */ Y(Qe, { children: [
|
|
2455
2455
|
"Remove ",
|
|
2456
2456
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2457
2457
|
" from your list? You'll need a new invitation to access it again."
|
|
@@ -2466,7 +2466,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2466
2466
|
let t = U?.revokeShareLabel ?? "Revoke access";
|
|
2467
2467
|
return {
|
|
2468
2468
|
title: U?.revokeShareConfirmTitle ?? t,
|
|
2469
|
-
message: U?.revokeShareConfirmMessage?.(e.name) ?? /* @__PURE__ */ Y(
|
|
2469
|
+
message: U?.revokeShareConfirmMessage?.(e.name) ?? /* @__PURE__ */ Y(Qe, { children: [
|
|
2470
2470
|
"Revoke shared access to ",
|
|
2471
2471
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2472
2472
|
"? Anyone you shared it with will lose access."
|
|
@@ -2478,13 +2478,13 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2478
2478
|
};
|
|
2479
2479
|
}
|
|
2480
2480
|
case Z.Unpublish: {
|
|
2481
|
-
let t = U?.unpublishLabel ?? "Unpublish", n = Rt.length === 1, r = n ?
|
|
2481
|
+
let t = U?.unpublishLabel ?? "Unpublish", n = Rt.length === 1, r = n ? Bt(Rt[0].key) : "", i = U?.unpublishConfirmMessage?.(e.name, r) ?? /* @__PURE__ */ Y(Qe, { children: [
|
|
2482
2482
|
"Unpublish ",
|
|
2483
2483
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2484
2484
|
" from \"",
|
|
2485
2485
|
r,
|
|
2486
2486
|
"\"? The request is submitted for admin approval."
|
|
2487
|
-
] }), a = U?.unpublishSelectFolderMessage?.(e.name) ?? /* @__PURE__ */ Y(
|
|
2487
|
+
] }), a = U?.unpublishSelectFolderMessage?.(e.name) ?? /* @__PURE__ */ Y(Qe, { children: [
|
|
2488
2488
|
"Choose which folder to unpublish ",
|
|
2489
2489
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2490
2490
|
" from. The request is submitted for admin approval."
|
|
@@ -2529,34 +2529,34 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2529
2529
|
xt,
|
|
2530
2530
|
U,
|
|
2531
2531
|
Rt,
|
|
2532
|
-
|
|
2533
|
-
]),
|
|
2534
|
-
title:
|
|
2532
|
+
Bt
|
|
2533
|
+
]), hn = mn != null, gn = _t === Z.Unpublish && Rr(Rt, Tt) == null, _n = hn || q || ht, vn = e.credentials == null ? "" : (U?.credentialsManagementTitle ?? qr)(e.credentials.authenticationType), yn = hn ? {
|
|
2534
|
+
title: mn.title,
|
|
2535
2535
|
isBackDisabled: yt,
|
|
2536
|
-
onBack:
|
|
2537
|
-
} :
|
|
2538
|
-
title:
|
|
2536
|
+
onBack: Ut
|
|
2537
|
+
} : q ? {
|
|
2538
|
+
title: un,
|
|
2539
2539
|
isBackDisabled: X.isSubmitting,
|
|
2540
|
-
onBack:
|
|
2540
|
+
onBack: qt
|
|
2541
2541
|
} : ht ? {
|
|
2542
2542
|
title: vn,
|
|
2543
2543
|
isBackDisabled: !1,
|
|
2544
2544
|
onBack: Nt
|
|
2545
|
-
} : null, bn = yn?.title ??
|
|
2546
|
-
return /* @__PURE__ */ Y(
|
|
2545
|
+
} : null, bn = yn?.title ?? sn;
|
|
2546
|
+
return /* @__PURE__ */ Y(We, {
|
|
2547
2547
|
open: t,
|
|
2548
2548
|
onClose: o,
|
|
2549
2549
|
header: yn?.title,
|
|
2550
2550
|
ariaLabel: bn,
|
|
2551
2551
|
onBack: yn?.onBack,
|
|
2552
|
-
backAriaLabel:
|
|
2552
|
+
backAriaLabel: dn,
|
|
2553
2553
|
backDisabled: yn?.isBackDisabled,
|
|
2554
2554
|
hideClose: yn != null,
|
|
2555
|
-
closeAriaLabel:
|
|
2556
|
-
headerActions: yn == null && !i && l?.(e) !== !1 ? /* @__PURE__ */ J(
|
|
2555
|
+
closeAriaLabel: cn,
|
|
2556
|
+
headerActions: yn == null && !i && l?.(e) !== !1 ? /* @__PURE__ */ J(fn, {
|
|
2557
2557
|
isStarred: Pe,
|
|
2558
|
-
ariaLabel:
|
|
2559
|
-
onClick:
|
|
2558
|
+
ariaLabel: ln,
|
|
2559
|
+
onClick: Yt
|
|
2560
2560
|
}) : void 0,
|
|
2561
2561
|
style: Ne,
|
|
2562
2562
|
overlayStyle: Ne,
|
|
@@ -2569,11 +2569,11 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2569
2569
|
/* @__PURE__ */ Y("div", {
|
|
2570
2570
|
className: P("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto", $n.content),
|
|
2571
2571
|
children: [
|
|
2572
|
-
|
|
2572
|
+
hn && /* @__PURE__ */ J(O, {
|
|
2573
2573
|
item: e,
|
|
2574
|
-
message:
|
|
2575
|
-
consequences:
|
|
2576
|
-
variant:
|
|
2574
|
+
message: mn.message,
|
|
2575
|
+
consequences: mn.consequences,
|
|
2576
|
+
variant: mn.cardVariant ?? mn.variant,
|
|
2577
2577
|
messageClassName: Me,
|
|
2578
2578
|
styles: { colors: {
|
|
2579
2579
|
messageText: W?.confirmMessageText,
|
|
@@ -2581,27 +2581,27 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2581
2581
|
cardBackground: W?.infoCardBackground,
|
|
2582
2582
|
cardDangerBackground: W?.infoCardDangerBackground
|
|
2583
2583
|
} },
|
|
2584
|
-
children: _t === Z.Unpublish && Rt.length > 1 && /* @__PURE__ */ J(
|
|
2584
|
+
children: _t === Z.Unpublish && Rt.length > 1 && /* @__PURE__ */ J(Ve, {
|
|
2585
2585
|
ariaLabel: U?.unpublishFolderGroupAriaLabel ?? "Published folders",
|
|
2586
2586
|
value: Tt ?? void 0,
|
|
2587
2587
|
onChange: Et,
|
|
2588
2588
|
disabled: yt,
|
|
2589
2589
|
items: Rt.map((e) => ({
|
|
2590
2590
|
value: e.key,
|
|
2591
|
-
label:
|
|
2591
|
+
label: Bt(e.key)
|
|
2592
2592
|
})),
|
|
2593
2593
|
radioClassName: Me
|
|
2594
2594
|
})
|
|
2595
2595
|
}),
|
|
2596
|
-
!
|
|
2596
|
+
!hn && !q && ht && /* @__PURE__ */ J(Qn, {
|
|
2597
2597
|
item: e,
|
|
2598
2598
|
onLogin: H,
|
|
2599
2599
|
onRequestLogout: Ft,
|
|
2600
|
-
onRequestDeleteApiKey:
|
|
2600
|
+
onRequestDeleteApiKey: Ht,
|
|
2601
2601
|
texts: U,
|
|
2602
2602
|
detailsStyles: Te
|
|
2603
2603
|
}),
|
|
2604
|
-
!
|
|
2604
|
+
!hn && q && /* @__PURE__ */ J("div", {
|
|
2605
2605
|
className: "p-4 desktop:p-[22px]",
|
|
2606
2606
|
children: /* @__PURE__ */ J(Ot, {
|
|
2607
2607
|
resource: {
|
|
@@ -2639,7 +2639,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2639
2639
|
} }
|
|
2640
2640
|
})
|
|
2641
2641
|
}),
|
|
2642
|
-
!_n && /* @__PURE__ */ Y(
|
|
2642
|
+
!_n && /* @__PURE__ */ Y(Qe, { children: [
|
|
2643
2643
|
/* @__PURE__ */ J(ur, {
|
|
2644
2644
|
item: e,
|
|
2645
2645
|
onUseInChat: u,
|
|
@@ -2650,12 +2650,12 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2650
2650
|
isSharePrimary: se,
|
|
2651
2651
|
isPublishVisible: m,
|
|
2652
2652
|
isPublishPrimary: h,
|
|
2653
|
-
onOpenPublish:
|
|
2653
|
+
onOpenPublish: Kt,
|
|
2654
2654
|
isUnpublishVisible: V,
|
|
2655
|
-
hasPublishedFolders:
|
|
2656
|
-
isPublishHistoryResolved: g == null ||
|
|
2655
|
+
hasPublishedFolders: Q,
|
|
2656
|
+
isPublishHistoryResolved: g == null || ze,
|
|
2657
2657
|
onRequestPublishHistory: dt,
|
|
2658
|
-
onOpenUnpublish: Se ?
|
|
2658
|
+
onOpenUnpublish: Se ? Vt : void 0,
|
|
2659
2659
|
onEdit: ce,
|
|
2660
2660
|
onDownload: le,
|
|
2661
2661
|
isDownloadVisible: ue,
|
|
@@ -2688,17 +2688,17 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2688
2688
|
!i && t && he?.(e),
|
|
2689
2689
|
/* @__PURE__ */ Y("div", {
|
|
2690
2690
|
className: "flex items-center px-6",
|
|
2691
|
-
children: [/* @__PURE__ */ J(
|
|
2692
|
-
tabs:
|
|
2691
|
+
children: [/* @__PURE__ */ J(Je, {
|
|
2692
|
+
tabs: Xt,
|
|
2693
2693
|
activeTabId: G,
|
|
2694
|
-
onTabChange:
|
|
2694
|
+
onTabChange: K,
|
|
2695
2695
|
className: P("min-w-0 flex-1 overflow-x-auto", $n.tabsScroll),
|
|
2696
2696
|
tabClassName: "shrink-0"
|
|
2697
2697
|
}), r && /* @__PURE__ */ J("div", {
|
|
2698
2698
|
role: "status",
|
|
2699
2699
|
"aria-label": U?.detailsLoadingAriaLabel ?? "Loading details",
|
|
2700
2700
|
className: "shrink-0",
|
|
2701
|
-
children: /* @__PURE__ */ J(
|
|
2701
|
+
children: /* @__PURE__ */ J(Ge, {
|
|
2702
2702
|
showTitle: !1,
|
|
2703
2703
|
paragraph: {
|
|
2704
2704
|
rows: 1,
|
|
@@ -2712,23 +2712,23 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2712
2712
|
/* @__PURE__ */ Y("div", {
|
|
2713
2713
|
className: P("min-h-0 flex-1 overflow-y-auto", G !== T.Overview && "px-6"),
|
|
2714
2714
|
children: [
|
|
2715
|
-
G === T.About &&
|
|
2716
|
-
G === T.About && !
|
|
2715
|
+
G === T.About && tn ? rn : null,
|
|
2716
|
+
G === T.About && !tn && /* @__PURE__ */ J(dr, {
|
|
2717
2717
|
content: e.description,
|
|
2718
2718
|
topics: e.topics,
|
|
2719
2719
|
detailsStyles: Te,
|
|
2720
|
-
markdownLabels:
|
|
2720
|
+
markdownLabels: Qt
|
|
2721
2721
|
}),
|
|
2722
2722
|
G === T.Content && /* @__PURE__ */ J(gr, {
|
|
2723
|
-
content:
|
|
2723
|
+
content: Ue?.content ?? "",
|
|
2724
2724
|
filePreview: lt(),
|
|
2725
2725
|
filePreviewContent: ut,
|
|
2726
2726
|
renderFileTree: me,
|
|
2727
|
-
description:
|
|
2728
|
-
files:
|
|
2727
|
+
description: Ue?.description ?? e.description,
|
|
2728
|
+
files: Ue?.files,
|
|
2729
2729
|
selectedFileId: ct,
|
|
2730
2730
|
onSelectFile: (e) => void st(e),
|
|
2731
|
-
isFileLoading:
|
|
2731
|
+
isFileLoading: Xe,
|
|
2732
2732
|
expandedFolderIds: $e,
|
|
2733
2733
|
onToggleFolder: ot,
|
|
2734
2734
|
isFileSelectorOpen: tt,
|
|
@@ -2738,17 +2738,17 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2738
2738
|
fileLoadingLabel: U?.contentFileLoadingLabel,
|
|
2739
2739
|
fileUnsupportedLabel: U?.contentFileUnsupportedLabel,
|
|
2740
2740
|
detailsStyles: Te,
|
|
2741
|
-
markdownLabels:
|
|
2741
|
+
markdownLabels: Qt
|
|
2742
2742
|
}),
|
|
2743
|
-
G === T.Overview &&
|
|
2744
|
-
G === T.Overview && !
|
|
2743
|
+
G === T.Overview && nn ? rn : null,
|
|
2744
|
+
G === T.Overview && !nn && /* @__PURE__ */ J(kr, {
|
|
2745
2745
|
sections: e.details?.overview?.sections,
|
|
2746
2746
|
sectionClassName: Oe,
|
|
2747
2747
|
labelClassName: ke,
|
|
2748
2748
|
valueClassName: Ae,
|
|
2749
2749
|
valueTrueClassName: je,
|
|
2750
|
-
yesLabel:
|
|
2751
|
-
noLabel:
|
|
2750
|
+
yesLabel: an,
|
|
2751
|
+
noLabel: on
|
|
2752
2752
|
}),
|
|
2753
2753
|
G === T.Pricing && /* @__PURE__ */ J(Ar, {
|
|
2754
2754
|
pricing: e.details?.pricing,
|
|
@@ -2774,37 +2774,48 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2774
2774
|
}),
|
|
2775
2775
|
G === T.Tools && /* @__PURE__ */ J(Lr, {
|
|
2776
2776
|
tools: e.details?.tools,
|
|
2777
|
-
labels:
|
|
2777
|
+
labels: $t
|
|
2778
2778
|
})
|
|
2779
2779
|
]
|
|
2780
2780
|
})
|
|
2781
2781
|
] })
|
|
2782
2782
|
]
|
|
2783
2783
|
}),
|
|
2784
|
-
|
|
2785
|
-
confirmLabel:
|
|
2786
|
-
cancelLabel:
|
|
2787
|
-
variant:
|
|
2784
|
+
hn && /* @__PURE__ */ J(D, {
|
|
2785
|
+
confirmLabel: mn.confirmLabel,
|
|
2786
|
+
cancelLabel: pn,
|
|
2787
|
+
variant: mn.variant,
|
|
2788
2788
|
isLoading: yt,
|
|
2789
2789
|
isConfirmDisabled: gn,
|
|
2790
|
-
loadingStatusLabel:
|
|
2790
|
+
loadingStatusLabel: mn.loadingStatusLabel,
|
|
2791
2791
|
styles: { colors: { border: W?.confirmFooterBorder } },
|
|
2792
|
-
onConfirm:
|
|
2793
|
-
onCancel:
|
|
2792
|
+
onConfirm: Wt,
|
|
2793
|
+
onCancel: Ut
|
|
2794
2794
|
}),
|
|
2795
|
-
!
|
|
2795
|
+
!hn && q && /* @__PURE__ */ J(Dt, {
|
|
2796
2796
|
version: e.version,
|
|
2797
2797
|
hasExistingPublicationInFolder: X.hasExistingPublicationInFolder,
|
|
2798
2798
|
allowReplace: zr,
|
|
2799
2799
|
isSubmitDisabled: mt.isSubmitDisabled,
|
|
2800
2800
|
isSubmitLoading: mt.isSubmitLoading,
|
|
2801
|
-
onCancel:
|
|
2802
|
-
onSubmit:
|
|
2801
|
+
onCancel: qt,
|
|
2802
|
+
onSubmit: Jt,
|
|
2803
2803
|
labels: te
|
|
2804
2804
|
})
|
|
2805
2805
|
]
|
|
2806
2806
|
});
|
|
2807
|
-
}, Zr = {
|
|
2807
|
+
}, Zr = (e) => window.getComputedStyle(e).direction === "rtl", Qr = (e, t) => {
|
|
2808
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.getComputedStyle(e);
|
|
2809
|
+
return Zr(e) ? r.right - (n.right - parseFloat(i.paddingRight || "0")) : r.left - (n.left + parseFloat(i.paddingLeft || "0"));
|
|
2810
|
+
}, $r = (e, t) => {
|
|
2811
|
+
if (t.length === 0) return 0;
|
|
2812
|
+
if (Math.abs(e.scrollLeft) + e.clientWidth >= e.scrollWidth - 1 && Math.abs(e.scrollLeft) > 0) return t.length - 1;
|
|
2813
|
+
let n = 0, r = Infinity;
|
|
2814
|
+
return t.forEach((t, i) => {
|
|
2815
|
+
let a = Math.abs(Qr(e, t));
|
|
2816
|
+
a < r && (r = a, n = i);
|
|
2817
|
+
}), n;
|
|
2818
|
+
}, ei = {
|
|
2808
2819
|
pageNav: "_pageNav_14qfn_1",
|
|
2809
2820
|
navBtn: "_navBtn_14qfn_6",
|
|
2810
2821
|
titleText: "_titleText_14qfn_23",
|
|
@@ -2819,7 +2830,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2819
2830
|
favFadeIn: "_favFadeIn_14qfn_1",
|
|
2820
2831
|
cardLeaving: "_cardLeaving_14qfn_54",
|
|
2821
2832
|
cardFadeOut: "_cardFadeOut_14qfn_1"
|
|
2822
|
-
},
|
|
2833
|
+
}, ti = ({ item: e, initialIsStarred: t = !0, onToggle: n, isFavoriteVisible: r, onClick: i, nameClassName: a, colors: o, versionClassName: s, lastUsedClassName: c, query: l, addToFavoritesAriaLabel: u = "Add to favorites", removeFromFavoritesAriaLabel: d = "Remove from favorites", isSelected: f = !1, credentialsBadgeLoggedOutLabel: p }) => {
|
|
2823
2834
|
let [m, h] = B(t), [g, _] = B(!1), v = (t) => {
|
|
2824
2835
|
t.stopPropagation();
|
|
2825
2836
|
let r = !m;
|
|
@@ -2836,7 +2847,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2836
2847
|
role: y == null ? void 0 : "button",
|
|
2837
2848
|
tabIndex: y == null ? void 0 : 0,
|
|
2838
2849
|
"aria-label": e.name,
|
|
2839
|
-
className: P("box-border min-w-0 cursor-pointer flex-row items-start gap-1 p-3 text-start", g &&
|
|
2850
|
+
className: P("box-border min-w-0 cursor-pointer flex-row items-start gap-1 p-3 text-start", g && ei.cardLeaving, f && ei.selectedCard, Vt.favoriteCard),
|
|
2840
2851
|
onClick: y,
|
|
2841
2852
|
onKeyDown: b,
|
|
2842
2853
|
onAnimationEnd: g ? (t) => {
|
|
@@ -2844,10 +2855,10 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2844
2855
|
} : void 0,
|
|
2845
2856
|
children: [f && /* @__PURE__ */ J(rt, {
|
|
2846
2857
|
size: V.SM,
|
|
2847
|
-
className: P("absolute end-3 top-3 shrink-0",
|
|
2858
|
+
className: P("absolute end-3 top-3 shrink-0", ei.selectedCheck),
|
|
2848
2859
|
"aria-hidden": !0,
|
|
2849
2860
|
stroke: H
|
|
2850
|
-
}), /* @__PURE__ */ J(
|
|
2861
|
+
}), /* @__PURE__ */ J(cn, {
|
|
2851
2862
|
icon: e.iconUrl,
|
|
2852
2863
|
type: e.type,
|
|
2853
2864
|
name: e.name,
|
|
@@ -2864,11 +2875,11 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2864
2875
|
lastUsedClassName: c
|
|
2865
2876
|
}
|
|
2866
2877
|
},
|
|
2867
|
-
iconOverlay: /* @__PURE__ */ J(
|
|
2878
|
+
iconOverlay: /* @__PURE__ */ J(un, {
|
|
2868
2879
|
credentials: e.credentials,
|
|
2869
2880
|
loggedOutLabel: p
|
|
2870
2881
|
}),
|
|
2871
|
-
lastUsedTrailing: r?.(e) === !1 ? void 0 : /* @__PURE__ */ J(
|
|
2882
|
+
lastUsedTrailing: r?.(e) === !1 ? void 0 : /* @__PURE__ */ J(fn, {
|
|
2872
2883
|
isStarred: m,
|
|
2873
2884
|
size: Ee.Small,
|
|
2874
2885
|
onClick: v,
|
|
@@ -2876,7 +2887,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2876
2887
|
})
|
|
2877
2888
|
})]
|
|
2878
2889
|
});
|
|
2879
|
-
},
|
|
2890
|
+
}, ni = 2, ri = (e) => {
|
|
2880
2891
|
let t = e.getBoundingClientRect(), n = window.scrollX, r = window.scrollY, i = window.getComputedStyle(e).transform;
|
|
2881
2892
|
if (!i || i === "none") return new DOMRect(t.x + n, t.y + r, t.width, t.height);
|
|
2882
2893
|
try {
|
|
@@ -2885,8 +2896,8 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2885
2896
|
} catch {
|
|
2886
2897
|
return new DOMRect(t.x + n, t.y + r, t.width, t.height);
|
|
2887
2898
|
}
|
|
2888
|
-
},
|
|
2889
|
-
let
|
|
2899
|
+
}, ii = ({ items: e, totalCount: t, title: n = "Your Favorites", onToggleFavorite: r, isFavoriteVisible: i, onItemClick: a, styles: o, isLeaving: s, onExitComplete: c, prevPageAriaLabel: l = "Previous page", nextPageAriaLabel: u = "Next page", addToFavoritesAriaLabel: d, removeFromFavoritesAriaLabel: f, selectedItemId: p, credentialsBadgeLoggedOutLabel: m, isPaginationHidden: h = !1 }) => {
|
|
2900
|
+
let g = o?.typography?.titleClassName ?? "dial-body-semi-text", _ = o?.typography?.countClassName ?? "dial-tiny-semi-text", v = oe({
|
|
2890
2901
|
"--cat-fav-title-text": o?.colors?.titleText,
|
|
2891
2902
|
"--cat-fav-count-text": o?.colors?.countText,
|
|
2892
2903
|
"--cat-fav-selected-check": o?.colors?.selectedCheckIcon,
|
|
@@ -2898,43 +2909,47 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2898
2909
|
"--cat-fav-nav-btn-active-bg": o?.colors?.navButtonActiveBackground,
|
|
2899
2910
|
"--cat-fav-page-nav-border": o?.colors?.pageNavBorder,
|
|
2900
2911
|
"--cat-fav-page-nav-bg": o?.colors?.pageNavBackground
|
|
2901
|
-
}),
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2912
|
+
}), y = R(() => [...e].sort((e, t) => (new Date(t.updatedAt || "").getTime() ?? 0) - (new Date(e.updatedAt || "").getTime() ?? 0)), [e]), [b, x] = B(1), S = Bt(), C = se(), w = !h && !C, T = S * ni, E = (b - 1) * T, D = R(() => w ? y.slice(E, E + T) : y, [
|
|
2913
|
+
w,
|
|
2914
|
+
y,
|
|
2915
|
+
E,
|
|
2916
|
+
T
|
|
2917
|
+
]), O = 1;
|
|
2918
|
+
w ? O = Math.ceil(y.length / T) : C && !h && (O = y.length);
|
|
2919
|
+
let k = t ?? e.length, A = z(null), j = z(null), M = z(null), [ee, N] = B(), [ne, re] = B(), ie = z(S), ae = z(C);
|
|
2906
2920
|
I(() => {
|
|
2907
|
-
|
|
2908
|
-
}, [
|
|
2909
|
-
|
|
2910
|
-
}, [
|
|
2911
|
-
|
|
2921
|
+
(ie.current !== S || ae.current !== C) && (ie.current = S, ae.current = C, x(1), N(void 0), re(void 0));
|
|
2922
|
+
}, [S, C]), I(() => {
|
|
2923
|
+
b > O && O > 0 && x(O);
|
|
2924
|
+
}, [b, O]), I(() => {
|
|
2925
|
+
O <= 1 && (ee !== void 0 || ne !== void 0) && (N(void 0), re(void 0));
|
|
2912
2926
|
}, [
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2927
|
+
O,
|
|
2928
|
+
ee,
|
|
2929
|
+
ne
|
|
2916
2930
|
]), L(() => {
|
|
2917
|
-
!
|
|
2931
|
+
!M.current || !j.current || C || O <= 1 || b !== 1 || ee !== void 0 || (N(M.current.offsetHeight), re(j.current.offsetHeight));
|
|
2918
2932
|
}, [
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2933
|
+
C,
|
|
2934
|
+
O,
|
|
2935
|
+
b,
|
|
2936
|
+
ee
|
|
2922
2937
|
]);
|
|
2923
|
-
let
|
|
2924
|
-
|
|
2925
|
-
if (!
|
|
2926
|
-
if (
|
|
2927
|
-
let e =
|
|
2938
|
+
let ce = z(/* @__PURE__ */ new Map()), le = z(b), ue = z(S), de = z(0), fe = z(!1);
|
|
2939
|
+
L(() => {
|
|
2940
|
+
if (!M.current || s) return;
|
|
2941
|
+
if (A.current && !fe.current) {
|
|
2942
|
+
let e = A.current;
|
|
2928
2943
|
e.style.height = "", e.style.transition = "";
|
|
2929
2944
|
}
|
|
2930
|
-
let e =
|
|
2931
|
-
|
|
2932
|
-
let n =
|
|
2945
|
+
let e = C || le.current !== b, t = ue.current !== S;
|
|
2946
|
+
le.current = b, ue.current = S;
|
|
2947
|
+
let n = M.current.querySelectorAll("[data-card-id]"), r = /* @__PURE__ */ new Map();
|
|
2933
2948
|
if (n.forEach((e) => {
|
|
2934
2949
|
let { cardId: t } = e.dataset;
|
|
2935
|
-
t && r.set(t,
|
|
2950
|
+
t && r.set(t, ri(e));
|
|
2936
2951
|
}), !e && !t) {
|
|
2937
|
-
let e =
|
|
2952
|
+
let e = j.current, t = de.current, i = 0;
|
|
2938
2953
|
if (e) {
|
|
2939
2954
|
let t = e.style.height;
|
|
2940
2955
|
t && (e.style.height = ""), i = e.offsetHeight, t && (e.style.height = t);
|
|
@@ -2943,11 +2958,11 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2943
2958
|
if (n.forEach((e) => {
|
|
2944
2959
|
let t = e.dataset.cardId;
|
|
2945
2960
|
if (!t) return;
|
|
2946
|
-
let n =
|
|
2961
|
+
let n = ce.current.get(t), i = r.get(t);
|
|
2947
2962
|
if (!n || !i) return;
|
|
2948
2963
|
let o = n.left - i.left, c = n.top - i.top;
|
|
2949
2964
|
!a && Math.abs(c) > .5 || Math.abs(o) < .5 && Math.abs(c) < .5 || (e.style.transition = "none", e.style.transform = `translate(${o}px, ${c}px)`, s.push(e));
|
|
2950
|
-
}), a && e && (e.style.height = `${t}px`, e.style.overflow = "clip"), (s.length > 0 || a) &&
|
|
2965
|
+
}), a && e && (e.style.height = `${t}px`, e.style.overflow = "clip"), (s.length > 0 || a) && M.current.offsetHeight, s.forEach((e) => {
|
|
2951
2966
|
e.style.transition = `transform ${o}ms cubic-bezier(0, 0, 0.2, 1)`, e.style.transform = "", e.addEventListener("transitionend", () => {
|
|
2952
2967
|
e.style.transition = "";
|
|
2953
2968
|
}, { once: !0 });
|
|
@@ -2959,59 +2974,87 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
2959
2974
|
e.addEventListener("transitionend", t);
|
|
2960
2975
|
}
|
|
2961
2976
|
}
|
|
2962
|
-
if (
|
|
2963
|
-
let e =
|
|
2964
|
-
|
|
2977
|
+
if (ce.current = r, j.current) {
|
|
2978
|
+
let e = j.current, t = e.style.height ? parseFloat(e.style.height) : NaN;
|
|
2979
|
+
de.current = Number.isNaN(t) ? e.offsetHeight : t;
|
|
2965
2980
|
}
|
|
2966
2981
|
}, [
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2982
|
+
D,
|
|
2983
|
+
b,
|
|
2984
|
+
S,
|
|
2985
|
+
C,
|
|
2970
2986
|
s
|
|
2971
2987
|
]), L(() => {
|
|
2972
|
-
let e =
|
|
2988
|
+
let e = A.current;
|
|
2973
2989
|
if (!e) return;
|
|
2974
2990
|
let t = e.offsetHeight;
|
|
2975
2991
|
if (t === 0) return;
|
|
2976
|
-
|
|
2992
|
+
fe.current = !0, e.style.height = "0px", e.offsetHeight, e.style.transition = "height 300ms cubic-bezier(0, 0, 0.2, 1)", e.style.height = `${t}px`;
|
|
2977
2993
|
let n = (t) => {
|
|
2978
2994
|
t.target === e && t.propertyName === "height" && r();
|
|
2979
2995
|
}, r = () => {
|
|
2980
|
-
|
|
2996
|
+
fe.current = !1, parseFloat(e.style.height || "0") > 0 && (e.style.height = "", e.style.transition = ""), clearTimeout(i), e.removeEventListener("transitionend", n);
|
|
2981
2997
|
}, i = setTimeout(r, 400);
|
|
2982
|
-
return e.addEventListener("transitionend", n),
|
|
2983
|
-
clearTimeout(i), e.removeEventListener("transitionend", n);
|
|
2984
|
-
};
|
|
2998
|
+
return e.addEventListener("transitionend", n), r;
|
|
2985
2999
|
}, []), L(() => {
|
|
2986
|
-
if (!s || !
|
|
2987
|
-
let e =
|
|
3000
|
+
if (!s || !A.current) return;
|
|
3001
|
+
let e = A.current, t = e.offsetHeight;
|
|
2988
3002
|
t !== 0 && (e.style.height = `${t}px`, e.offsetHeight, e.style.transition = "height 260ms ease-in", e.style.height = "0px");
|
|
2989
|
-
}, [s])
|
|
2990
|
-
|
|
3003
|
+
}, [s]);
|
|
3004
|
+
let pe = F(() => M.current ? Array.from(M.current.querySelectorAll("[data-card-id]")) : [], []), me = z(null), he = z(null), ge = F(() => {
|
|
3005
|
+
he.current ??= requestAnimationFrame(() => {
|
|
3006
|
+
he.current = null;
|
|
3007
|
+
let e = M.current;
|
|
3008
|
+
if (!e) return;
|
|
3009
|
+
let t = $r(e, pe()) + 1;
|
|
3010
|
+
if (me.current != null) {
|
|
3011
|
+
if (t !== me.current) return;
|
|
3012
|
+
me.current = null;
|
|
3013
|
+
}
|
|
3014
|
+
x(t);
|
|
3015
|
+
});
|
|
3016
|
+
}, [pe]), _e = F(() => {
|
|
3017
|
+
me.current = null;
|
|
3018
|
+
}, []);
|
|
3019
|
+
I(() => () => {
|
|
3020
|
+
he.current != null && cancelAnimationFrame(he.current);
|
|
3021
|
+
}, []);
|
|
3022
|
+
let ve = (e) => {
|
|
3023
|
+
if (x(e), !C || !M.current) return;
|
|
3024
|
+
let t = pe()[e - 1];
|
|
3025
|
+
if (!t) return;
|
|
3026
|
+
let n = Qr(M.current, t);
|
|
3027
|
+
Math.abs(n) < 1 || (me.current = e, M.current.scrollBy({
|
|
3028
|
+
left: n,
|
|
3029
|
+
behavior: "smooth"
|
|
3030
|
+
}));
|
|
3031
|
+
};
|
|
3032
|
+
return /* @__PURE__ */ J("div", {
|
|
3033
|
+
ref: A,
|
|
2991
3034
|
children: /* @__PURE__ */ Y("section", {
|
|
2992
|
-
ref:
|
|
2993
|
-
className: P("flex flex-shrink-0 flex-col gap-4 pt-2 pb-2",
|
|
3035
|
+
ref: j,
|
|
3036
|
+
className: P("flex flex-shrink-0 flex-col gap-4 pt-2 pb-2", ei.section, s && ei.sectionLeaving),
|
|
2994
3037
|
style: {
|
|
2995
|
-
...
|
|
2996
|
-
minHeight:
|
|
3038
|
+
...v,
|
|
3039
|
+
minHeight: ne
|
|
2997
3040
|
},
|
|
2998
3041
|
onAnimationEnd: (e) => {
|
|
2999
|
-
e.target ===
|
|
3042
|
+
e.target === j.current && s && c?.();
|
|
3000
3043
|
},
|
|
3001
3044
|
children: [/* @__PURE__ */ J(te, {
|
|
3002
3045
|
title: n,
|
|
3003
|
-
postfix:
|
|
3004
|
-
titleClassName: P(
|
|
3005
|
-
postfixClassName: P(
|
|
3006
|
-
trailing:
|
|
3007
|
-
className: P("inline-flex items-center gap-[2px] rounded-full px-[6px] py-[3px]",
|
|
3046
|
+
postfix: k,
|
|
3047
|
+
titleClassName: P(g, ei.titleText),
|
|
3048
|
+
postfixClassName: P(_, ei.countText),
|
|
3049
|
+
trailing: O > 1 ? /* @__PURE__ */ Y("div", {
|
|
3050
|
+
className: P("inline-flex items-center gap-[2px] rounded-full px-[6px] py-[3px]", ei.pageNav),
|
|
3008
3051
|
children: [
|
|
3009
3052
|
/* @__PURE__ */ J(je, {
|
|
3010
3053
|
size: Ee.Small,
|
|
3011
3054
|
"aria-label": l,
|
|
3012
|
-
disabled:
|
|
3013
|
-
onClick: () => b
|
|
3014
|
-
className: P("rounded-full",
|
|
3055
|
+
disabled: b === 1,
|
|
3056
|
+
onClick: () => ve(b - 1),
|
|
3057
|
+
className: P("rounded-full", ei.navBtn),
|
|
3015
3058
|
icon: /* @__PURE__ */ J(at, {
|
|
3016
3059
|
size: 14,
|
|
3017
3060
|
"aria-hidden": !0,
|
|
@@ -3020,19 +3063,19 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3020
3063
|
})
|
|
3021
3064
|
}),
|
|
3022
3065
|
/* @__PURE__ */ Y("span", {
|
|
3023
|
-
className: P("min-w-[32px] px-1 text-center select-none",
|
|
3066
|
+
className: P("min-w-[32px] px-1 text-center select-none", _, ei.countText),
|
|
3024
3067
|
children: [
|
|
3025
|
-
|
|
3068
|
+
b,
|
|
3026
3069
|
" / ",
|
|
3027
|
-
|
|
3070
|
+
O
|
|
3028
3071
|
]
|
|
3029
3072
|
}),
|
|
3030
3073
|
/* @__PURE__ */ J(je, {
|
|
3031
3074
|
size: Ee.Small,
|
|
3032
3075
|
"aria-label": u,
|
|
3033
|
-
disabled:
|
|
3034
|
-
onClick: () => b
|
|
3035
|
-
className: P("rounded-full",
|
|
3076
|
+
disabled: b === O,
|
|
3077
|
+
onClick: () => ve(b + 1),
|
|
3078
|
+
className: P("rounded-full", ei.navBtn),
|
|
3036
3079
|
icon: /* @__PURE__ */ J(ot, {
|
|
3037
3080
|
size: 14,
|
|
3038
3081
|
"aria-hidden": !0,
|
|
@@ -3043,13 +3086,16 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3043
3086
|
]
|
|
3044
3087
|
}) : void 0
|
|
3045
3088
|
}), /* @__PURE__ */ J("div", {
|
|
3046
|
-
ref:
|
|
3047
|
-
className: P("grid content-start gap-5",
|
|
3089
|
+
ref: M,
|
|
3090
|
+
className: P("grid content-start", C ? "-m-1 snap-x snap-mandatory scroll-p-1 scrollbar-none auto-cols-[min(85%,320px)] grid-flow-col gap-3 overflow-x-auto p-1 [&>*]:snap-start" : "gap-5", ei.gridPage),
|
|
3048
3091
|
style: {
|
|
3049
|
-
gridTemplateColumns: `repeat(${
|
|
3050
|
-
minHeight:
|
|
3092
|
+
gridTemplateColumns: C ? void 0 : `repeat(${S}, minmax(0, 1fr))`,
|
|
3093
|
+
minHeight: ee
|
|
3051
3094
|
},
|
|
3052
|
-
|
|
3095
|
+
onScroll: C ? ge : void 0,
|
|
3096
|
+
onScrollEnd: C ? _e : void 0,
|
|
3097
|
+
onPointerDown: C ? _e : void 0,
|
|
3098
|
+
children: D.map((e) => /* @__PURE__ */ J(ti, {
|
|
3053
3099
|
item: e,
|
|
3054
3100
|
onToggle: r,
|
|
3055
3101
|
isFavoriteVisible: i,
|
|
@@ -3058,19 +3104,19 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3058
3104
|
removeFromFavoritesAriaLabel: f,
|
|
3059
3105
|
isSelected: e.id === p,
|
|
3060
3106
|
credentialsBadgeLoggedOutLabel: m
|
|
3061
|
-
}, `${
|
|
3107
|
+
}, w ? `${b}-${e.id}` : e.id))
|
|
3062
3108
|
})]
|
|
3063
3109
|
})
|
|
3064
3110
|
});
|
|
3065
|
-
},
|
|
3111
|
+
}, ai = (e, t) => {
|
|
3066
3112
|
let n = new Set(e);
|
|
3067
3113
|
return n.has(t) ? n.delete(t) : n.add(t), n;
|
|
3068
|
-
},
|
|
3114
|
+
}, oi = (e, t) => {
|
|
3069
3115
|
let n = new Set(e), r = t.length > 0 && t.every((t) => e.has(t));
|
|
3070
3116
|
return t.forEach((e) => {
|
|
3071
3117
|
r ? n.delete(e) : n.add(e);
|
|
3072
3118
|
}), n;
|
|
3073
|
-
},
|
|
3119
|
+
}, si = {
|
|
3074
3120
|
listContainer: "_listContainer_1cc13_1",
|
|
3075
3121
|
gridClip: "_gridClip_1cc13_6",
|
|
3076
3122
|
favHeader: "_favHeader_1cc13_35",
|
|
@@ -3081,22 +3127,22 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3081
3127
|
selectedRow: "_selectedRow_1cc13_64",
|
|
3082
3128
|
name: "_name_1cc13_72",
|
|
3083
3129
|
version: "_version_1cc13_76"
|
|
3084
|
-
},
|
|
3130
|
+
}, ci = ({ data: e }) => e ? /* @__PURE__ */ J("div", {
|
|
3085
3131
|
className: "flex h-full items-center",
|
|
3086
3132
|
children: /* @__PURE__ */ J(M, { type: e.type })
|
|
3087
|
-
}) : null,
|
|
3133
|
+
}) : null, li = " / ", ui = ({ data: e, context: t }) => {
|
|
3088
3134
|
if (!e || e.folder.length === 0) return null;
|
|
3089
|
-
let n = e.folder.join(
|
|
3135
|
+
let n = e.folder.join(li), r = e.folder[e.folder.length - 1], i = e.folder.length > 1, a = t?.typography?.folderClassName ?? "dial-small-text", o = t?.typography?.folderLastSegmentClassName ?? "dial-small-semi-text";
|
|
3090
3136
|
return /* @__PURE__ */ Y("div", {
|
|
3091
3137
|
className: "flex h-full w-full min-w-0 items-center gap-1.5",
|
|
3092
3138
|
children: [
|
|
3093
3139
|
/* @__PURE__ */ J(dt, {
|
|
3094
3140
|
size: V.SM,
|
|
3095
3141
|
stroke: H,
|
|
3096
|
-
className: P("shrink-0",
|
|
3142
|
+
className: P("shrink-0", si.folderIcon),
|
|
3097
3143
|
"aria-hidden": !0
|
|
3098
3144
|
}),
|
|
3099
|
-
/* @__PURE__ */ J(
|
|
3145
|
+
/* @__PURE__ */ J(Xe, {
|
|
3100
3146
|
tooltip: /* @__PURE__ */ J("span", {
|
|
3101
3147
|
className: a,
|
|
3102
3148
|
children: n
|
|
@@ -3115,7 +3161,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3115
3161
|
})
|
|
3116
3162
|
]
|
|
3117
3163
|
});
|
|
3118
|
-
},
|
|
3164
|
+
}, di = ({ data: e, context: t }) => {
|
|
3119
3165
|
let n = t?.searchQuery ?? "", r = t?.typography, i = r?.nameClassName ?? "dial-small-semi-text", a = r?.versionClassName ?? "dial-tiny-text", o = e != null && e.id === t?.selectedItemId;
|
|
3120
3166
|
return e ? /* @__PURE__ */ Y("div", {
|
|
3121
3167
|
className: "flex h-full w-full min-w-0 items-center gap-2.5",
|
|
@@ -3126,7 +3172,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3126
3172
|
size: 36,
|
|
3127
3173
|
initialsName: e.name,
|
|
3128
3174
|
styles: { badgeClassName: "rounded-[10px]" }
|
|
3129
|
-
}), /* @__PURE__ */ J(
|
|
3175
|
+
}), /* @__PURE__ */ J(un, {
|
|
3130
3176
|
credentials: e.credentials,
|
|
3131
3177
|
loggedOutLabel: t?.credentialsBadgeLoggedOutLabel
|
|
3132
3178
|
})]
|
|
@@ -3134,8 +3180,8 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3134
3180
|
className: "flex min-w-0 flex-1 items-baseline gap-1.5",
|
|
3135
3181
|
children: [
|
|
3136
3182
|
/* @__PURE__ */ J("h3", {
|
|
3137
|
-
className: P("min-w-0 shrink", i,
|
|
3138
|
-
children: /* @__PURE__ */ J(
|
|
3183
|
+
className: P("min-w-0 shrink", i, si.name),
|
|
3184
|
+
children: /* @__PURE__ */ J(on, {
|
|
3139
3185
|
name: e.name,
|
|
3140
3186
|
query: n,
|
|
3141
3187
|
className: "whitespace-normal"
|
|
@@ -3143,23 +3189,23 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3143
3189
|
}),
|
|
3144
3190
|
e.version && /* @__PURE__ */ J(De, {
|
|
3145
3191
|
text: e.version,
|
|
3146
|
-
className: P("max-w-[30%] shrink-0", a,
|
|
3192
|
+
className: P("max-w-[30%] shrink-0", a, si.version)
|
|
3147
3193
|
}),
|
|
3148
3194
|
o && /* @__PURE__ */ J(rt, {
|
|
3149
3195
|
size: V.SM,
|
|
3150
|
-
className: P("ms-auto shrink-0",
|
|
3196
|
+
className: P("ms-auto shrink-0", si.selectedCheck),
|
|
3151
3197
|
"aria-hidden": !0,
|
|
3152
3198
|
stroke: H
|
|
3153
3199
|
})
|
|
3154
3200
|
]
|
|
3155
3201
|
})]
|
|
3156
3202
|
}) : null;
|
|
3157
|
-
},
|
|
3158
|
-
let e = fe(
|
|
3203
|
+
}, fi = le(null), pi = () => {
|
|
3204
|
+
let e = fe(fi);
|
|
3159
3205
|
if (e == null) throw Error("useListSelection must be used inside a ListView in multiple selection mode.");
|
|
3160
3206
|
return e;
|
|
3161
|
-
},
|
|
3162
|
-
let { selectedIds: t, toggle: n, getRowAriaLabel: r } =
|
|
3207
|
+
}, mi = ({ data: e }) => {
|
|
3208
|
+
let { selectedIds: t, toggle: n, getRowAriaLabel: r } = pi();
|
|
3163
3209
|
return e ? /* @__PURE__ */ J("div", {
|
|
3164
3210
|
className: "flex size-full items-center",
|
|
3165
3211
|
children: /* @__PURE__ */ J(Se, {
|
|
@@ -3168,8 +3214,8 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3168
3214
|
onChange: () => n(e.id)
|
|
3169
3215
|
})
|
|
3170
3216
|
}) : null;
|
|
3171
|
-
},
|
|
3172
|
-
let { isAllSelected: e, isSomeSelected: t, hasItems: n, toggleAll: r, selectAllAriaLabel: i } =
|
|
3217
|
+
}, hi = () => {
|
|
3218
|
+
let { isAllSelected: e, isSomeSelected: t, hasItems: n, toggleAll: r, selectAllAriaLabel: i } = pi();
|
|
3173
3219
|
return /* @__PURE__ */ J("div", {
|
|
3174
3220
|
className: "flex size-full items-center",
|
|
3175
3221
|
children: /* @__PURE__ */ J(Se, {
|
|
@@ -3180,48 +3226,48 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3180
3226
|
onChange: r
|
|
3181
3227
|
})
|
|
3182
3228
|
});
|
|
3183
|
-
},
|
|
3229
|
+
}, gi = ({ data: e, context: t }) => {
|
|
3184
3230
|
let [n, r] = B(e?.isStarred ?? !1);
|
|
3185
3231
|
return I(() => {
|
|
3186
3232
|
r(e?.isStarred ?? !1);
|
|
3187
3233
|
}, [e?.id, e?.isStarred]), !e || t?.isFavoriteVisible?.(e) === !1 ? null : /* @__PURE__ */ J("div", {
|
|
3188
3234
|
className: "flex size-full items-center justify-end",
|
|
3189
|
-
children: /* @__PURE__ */ J(
|
|
3235
|
+
children: /* @__PURE__ */ J(fn, {
|
|
3190
3236
|
isStarred: n,
|
|
3191
3237
|
onClick: (i) => {
|
|
3192
3238
|
i.stopPropagation();
|
|
3193
3239
|
let a = !n;
|
|
3194
3240
|
r(a), t?.onToggleFavorite?.(e.id, a);
|
|
3195
3241
|
},
|
|
3196
|
-
className: n ? void 0 :
|
|
3242
|
+
className: n ? void 0 : si.starToggleOff
|
|
3197
3243
|
})
|
|
3198
3244
|
});
|
|
3199
|
-
},
|
|
3245
|
+
}, _i = ({ data: e }) => !e || e.topics.length === 0 ? null : /* @__PURE__ */ J("div", {
|
|
3200
3246
|
className: "flex h-full w-full min-w-0 items-center",
|
|
3201
3247
|
children: /* @__PURE__ */ J(_n, { topics: e.topics })
|
|
3202
|
-
}),
|
|
3248
|
+
}), vi = "selection", yi = 52, bi = {
|
|
3203
3249
|
folder: (e) => e !== E.Model,
|
|
3204
3250
|
tags: () => !0,
|
|
3205
3251
|
favorite: () => !0
|
|
3206
|
-
},
|
|
3252
|
+
}, xi = (e, t) => Object.fromEntries([
|
|
3207
3253
|
"folder",
|
|
3208
3254
|
"tags",
|
|
3209
3255
|
"favorite"
|
|
3210
|
-
].map((n) => [n, (t?.[n] ??
|
|
3211
|
-
let i =
|
|
3256
|
+
].map((n) => [n, (t?.[n] ?? bi[n])(e)])), Si = (e, t = !1, n, r = !1) => {
|
|
3257
|
+
let i = xi(e, n);
|
|
3212
3258
|
return [
|
|
3213
3259
|
...r ? [{
|
|
3214
|
-
colId:
|
|
3260
|
+
colId: vi,
|
|
3215
3261
|
headerName: "",
|
|
3216
|
-
width:
|
|
3217
|
-
minWidth:
|
|
3218
|
-
maxWidth:
|
|
3262
|
+
width: yi,
|
|
3263
|
+
minWidth: yi,
|
|
3264
|
+
maxWidth: yi,
|
|
3219
3265
|
filter: !1,
|
|
3220
3266
|
sortable: !1,
|
|
3221
3267
|
resizable: !1,
|
|
3222
3268
|
suppressMovable: !0,
|
|
3223
|
-
headerComponent:
|
|
3224
|
-
cellRenderer:
|
|
3269
|
+
headerComponent: hi,
|
|
3270
|
+
cellRenderer: mi
|
|
3225
3271
|
}] : [],
|
|
3226
3272
|
{
|
|
3227
3273
|
headerName: "Name",
|
|
@@ -3229,7 +3275,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3229
3275
|
minWidth: 220,
|
|
3230
3276
|
field: "name",
|
|
3231
3277
|
filter: !1,
|
|
3232
|
-
cellRenderer:
|
|
3278
|
+
cellRenderer: di,
|
|
3233
3279
|
valueGetter: (e) => e.data?.name
|
|
3234
3280
|
},
|
|
3235
3281
|
{
|
|
@@ -3239,7 +3285,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3239
3285
|
field: "type",
|
|
3240
3286
|
filter: !1,
|
|
3241
3287
|
sortable: !1,
|
|
3242
|
-
cellRenderer:
|
|
3288
|
+
cellRenderer: ci,
|
|
3243
3289
|
valueGetter: (e) => e.data?.type
|
|
3244
3290
|
},
|
|
3245
3291
|
{
|
|
@@ -3249,7 +3295,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3249
3295
|
minWidth: 170,
|
|
3250
3296
|
filter: !1,
|
|
3251
3297
|
hide: !i.folder,
|
|
3252
|
-
cellRenderer:
|
|
3298
|
+
cellRenderer: ui,
|
|
3253
3299
|
valueGetter: (e) => e.data?.folder
|
|
3254
3300
|
},
|
|
3255
3301
|
{
|
|
@@ -3260,7 +3306,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3260
3306
|
filter: !1,
|
|
3261
3307
|
sortable: !1,
|
|
3262
3308
|
hide: !i.tags,
|
|
3263
|
-
cellRenderer:
|
|
3309
|
+
cellRenderer: _i,
|
|
3264
3310
|
valueGetter: (e) => e.data?.topics
|
|
3265
3311
|
},
|
|
3266
3312
|
{
|
|
@@ -3272,18 +3318,18 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3272
3318
|
sortable: !1,
|
|
3273
3319
|
resizable: !1,
|
|
3274
3320
|
hide: t || !i.favorite,
|
|
3275
|
-
headerClass:
|
|
3276
|
-
cellRenderer:
|
|
3321
|
+
headerClass: si.favHeader,
|
|
3322
|
+
cellRenderer: gi
|
|
3277
3323
|
}
|
|
3278
3324
|
];
|
|
3279
|
-
},
|
|
3280
|
-
className:
|
|
3325
|
+
}, Ci = 60, wi = {}, Ti = /* @__PURE__ */ new Set(), Ei = "Select all", Di = (e) => e.id, Oi = (e) => `Select ${e.name}`, ki = (e) => e.items.length === 0 ? /* @__PURE__ */ J("div", {
|
|
3326
|
+
className: Ze("flex size-full flex-col items-center justify-center", Vt.listView),
|
|
3281
3327
|
children: /* @__PURE__ */ J(ie, {
|
|
3282
3328
|
label: e.emptyStateTitle ?? "No results",
|
|
3283
3329
|
description: e.emptyStateDescription
|
|
3284
3330
|
})
|
|
3285
|
-
}) : /* @__PURE__ */ J(
|
|
3286
|
-
let y = m === Lt.Multiple, b = y ? void 0 : u, x = a?.typography ??
|
|
3331
|
+
}) : /* @__PURE__ */ J(Ai, { ...e }), Ai = ({ items: e, type: t, query: n = "", ariaLabel: r = "Catalog", emptyStateTitle: i, styles: a, onToggleFavorite: o, isFavoriteVisible: s, onItemClick: c, stickyHeaderTop: l, selectedItemId: u, credentialsBadgeLoggedOutLabel: d, isReadonly: f = !1, columnVisibility: p, selectionMode: m = Lt.Single, selectedItemIds: h = Ti, onSelectionChange: g, selectRowAriaLabel: _ = Oi, selectAllAriaLabel: v = Ei }) => {
|
|
3332
|
+
let y = m === Lt.Multiple, b = y ? void 0 : u, x = a?.typography ?? wi, S = a?.colors, C = {
|
|
3287
3333
|
"--cat-list-bg": S?.background,
|
|
3288
3334
|
"--cat-list-border": S?.border,
|
|
3289
3335
|
"--cat-list-header-bg": S?.headerBackground,
|
|
@@ -3297,12 +3343,12 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3297
3343
|
...l == null ? {} : { "--list-header-sticky-top": `${l}px` }
|
|
3298
3344
|
}, w = z(null), T = F((e) => {
|
|
3299
3345
|
w.current = e;
|
|
3300
|
-
}, []), E = R(() =>
|
|
3346
|
+
}, []), E = R(() => Si(t, f, p, y), [
|
|
3301
3347
|
t,
|
|
3302
3348
|
f,
|
|
3303
3349
|
p,
|
|
3304
3350
|
y
|
|
3305
|
-
]), D = R(() => e.map(
|
|
3351
|
+
]), D = R(() => e.map(Di), [e]), O = R(() => D.filter((e) => h.has(e)).length, [D, h]), k = F((e) => g?.(ai(h, e)), [g, h]), A = F(() => g?.(oi(h, D)), [
|
|
3306
3352
|
g,
|
|
3307
3353
|
h,
|
|
3308
3354
|
D
|
|
@@ -3334,7 +3380,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3334
3380
|
t != null && (e.preventDefault(), k(t));
|
|
3335
3381
|
}, [k]), ne = R(() => ({
|
|
3336
3382
|
domLayout: "autoHeight",
|
|
3337
|
-
rowHeight:
|
|
3383
|
+
rowHeight: Ci,
|
|
3338
3384
|
animateRows: !1,
|
|
3339
3385
|
suppressAnimationFrame: !0,
|
|
3340
3386
|
suppressScrollOnNewData: !0,
|
|
@@ -3357,7 +3403,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3357
3403
|
t.field !== "isStarred" && t.colId !== "selection" && e.data && (y && M.current(e.data.id), c?.(e.data));
|
|
3358
3404
|
} : void 0,
|
|
3359
3405
|
rowClass: c || y ? "cursor-pointer" : void 0,
|
|
3360
|
-
getRowClass: (e) => e.data?.id === b ?
|
|
3406
|
+
getRowClass: (e) => e.data?.id === b ? si.selectedRow : void 0
|
|
3361
3407
|
}), [
|
|
3362
3408
|
n,
|
|
3363
3409
|
x,
|
|
@@ -3369,7 +3415,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3369
3415
|
c,
|
|
3370
3416
|
y,
|
|
3371
3417
|
te
|
|
3372
|
-
]), { containerRef: re, startRow: ie, endRow: ae } =
|
|
3418
|
+
]), { containerRef: re, startRow: ie, endRow: ae } = $t(e.length, Ci), oe = R(() => e.slice(ie, ae), [
|
|
3373
3419
|
e,
|
|
3374
3420
|
ie,
|
|
3375
3421
|
ae
|
|
@@ -3380,22 +3426,22 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3380
3426
|
w.current?.redrawRows();
|
|
3381
3427
|
}, [b]), /* @__PURE__ */ J("div", {
|
|
3382
3428
|
style: C,
|
|
3383
|
-
className:
|
|
3429
|
+
className: Ze("w-full rounded-xl border", si.listContainer, Vt.listView),
|
|
3384
3430
|
children: /* @__PURE__ */ Y("div", {
|
|
3385
3431
|
ref: re,
|
|
3386
3432
|
onKeyDown: y ? N : void 0,
|
|
3387
|
-
className:
|
|
3433
|
+
className: Ze("rounded-xl [&_.ag-cell.ag-column-first]:ps-4 [&_.ag-cell.ag-column-last]:pe-4 [&_.ag-header-cell.ag-column-first]:ps-4 [&_.ag-header-cell.ag-column-last]:pe-4", si.gridClip),
|
|
3388
3434
|
children: [
|
|
3389
3435
|
ie > 0 && /* @__PURE__ */ J("div", {
|
|
3390
|
-
style: { height: ie *
|
|
3436
|
+
style: { height: ie * Ci },
|
|
3391
3437
|
"aria-hidden": !0
|
|
3392
3438
|
}),
|
|
3393
|
-
/* @__PURE__ */ J(
|
|
3439
|
+
/* @__PURE__ */ J(fi.Provider, {
|
|
3394
3440
|
value: j,
|
|
3395
3441
|
children: /* @__PURE__ */ J(jt, {
|
|
3396
3442
|
columnDefs: E,
|
|
3397
3443
|
rowData: oe,
|
|
3398
|
-
getRowId:
|
|
3444
|
+
getRowId: Di,
|
|
3399
3445
|
withoutHeaderBorders: !0,
|
|
3400
3446
|
wrapCustomCellRenderers: !1,
|
|
3401
3447
|
onGridApiChange: T,
|
|
@@ -3405,17 +3451,17 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3405
3451
|
})
|
|
3406
3452
|
}),
|
|
3407
3453
|
ae < e.length && /* @__PURE__ */ J("div", {
|
|
3408
|
-
style: { height: (e.length - ae) *
|
|
3454
|
+
style: { height: (e.length - ae) * Ci },
|
|
3409
3455
|
"aria-hidden": !0
|
|
3410
3456
|
})
|
|
3411
3457
|
]
|
|
3412
3458
|
})
|
|
3413
3459
|
});
|
|
3414
|
-
},
|
|
3460
|
+
}, ji = "w-[320px]", Mi = {
|
|
3415
3461
|
divider: "_divider_k154m_1",
|
|
3416
3462
|
sectionHeader: "_sectionHeader_k154m_5"
|
|
3417
|
-
},
|
|
3418
|
-
let [f, p] = B(null), m = f ? r.find((e) => e.key === f) : void 0, h = m?.children ?? r, g = i ?
|
|
3463
|
+
}, Ni = ({ open: e, onClose: t, title: n, options: r, search: i, searchPlaceholder: a, searchClearLabel: o, noResultsLabel: s, backLabel: c, closeLabel: l, colors: u, sectionHeaderClassName: d = "dial-caption-text" }) => {
|
|
3464
|
+
let [f, p] = B(null), m = f ? r.find((e) => e.key === f) : void 0, h = m?.children ?? r, g = i ? Ut(h, i.value) : h, _ = oe({
|
|
3419
3465
|
"--cat-create-menu-divider": u?.divider,
|
|
3420
3466
|
"--cat-create-menu-section-header-text": u?.sectionHeaderText
|
|
3421
3467
|
}), v = () => {
|
|
@@ -3435,7 +3481,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3435
3481
|
onClose: v,
|
|
3436
3482
|
children: [i && !m && /* @__PURE__ */ J("div", {
|
|
3437
3483
|
className: "px-2 pt-2 pb-1",
|
|
3438
|
-
children: /* @__PURE__ */ J(
|
|
3484
|
+
children: /* @__PURE__ */ J(He, {
|
|
3439
3485
|
value: i.value,
|
|
3440
3486
|
placeholder: a,
|
|
3441
3487
|
"aria-label": a,
|
|
@@ -3449,12 +3495,12 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3449
3495
|
style: _,
|
|
3450
3496
|
children: g.map((e) => e.type === Te.Divider ? /* @__PURE__ */ J("div", {
|
|
3451
3497
|
role: "separator",
|
|
3452
|
-
className: P("my-1",
|
|
3498
|
+
className: P("my-1", Mi.divider, e.className)
|
|
3453
3499
|
}, e.key) : e.type === Te.PlainText ? /* @__PURE__ */ J("div", {
|
|
3454
3500
|
role: "presentation",
|
|
3455
|
-
className: P("px-3 py-2",
|
|
3501
|
+
className: P("px-3 py-2", Mi.sectionHeader, d, e.className),
|
|
3456
3502
|
children: e.label
|
|
3457
|
-
}, e.key) : /* @__PURE__ */ J(
|
|
3503
|
+
}, e.key) : /* @__PURE__ */ J(K, {
|
|
3458
3504
|
role: "menuitem",
|
|
3459
3505
|
label: e.label,
|
|
3460
3506
|
icon: e.icon,
|
|
@@ -3475,39 +3521,58 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3475
3521
|
children: s
|
|
3476
3522
|
})]
|
|
3477
3523
|
});
|
|
3478
|
-
},
|
|
3479
|
-
let
|
|
3524
|
+
}, Pi = ({ label: e, options: t, onClick: n, search: r, searchPlaceholder: i = "Search", searchClearLabel: a = "Clear search", noResultsLabel: o = "No results found", backLabel: s = "Back", closeLabel: c = "Close", variant: l = ye.Primary, colors: u, sectionHeaderClassName: d, isFloating: f = !1 }) => {
|
|
3525
|
+
let p = z(null), [m, h] = B(!1), g = se(), _ = /* @__PURE__ */ J(it, {
|
|
3480
3526
|
size: V.SM,
|
|
3481
3527
|
stroke: H,
|
|
3482
3528
|
"aria-hidden": !0,
|
|
3483
|
-
className: P("transition-transform",
|
|
3484
|
-
})
|
|
3485
|
-
|
|
3486
|
-
|
|
3529
|
+
className: P("transition-transform", m && "rotate-180")
|
|
3530
|
+
}), v = {
|
|
3531
|
+
iconBefore: /* @__PURE__ */ J(vt, {
|
|
3532
|
+
size: V.LG,
|
|
3533
|
+
stroke: H,
|
|
3534
|
+
"aria-hidden": !0
|
|
3535
|
+
}),
|
|
3536
|
+
"aria-label": e,
|
|
3537
|
+
className: "size-12 rounded-full px-0"
|
|
3538
|
+
};
|
|
3539
|
+
if ((g || f) && (r || t?.length)) {
|
|
3540
|
+
let n = () => {
|
|
3541
|
+
h(!1), r?.onChange("");
|
|
3542
|
+
};
|
|
3543
|
+
return /* @__PURE__ */ Y(Qe, { children: [/* @__PURE__ */ J(ge, {
|
|
3544
|
+
...f ? v : {
|
|
3545
|
+
label: e,
|
|
3546
|
+
iconAfter: _
|
|
3547
|
+
},
|
|
3548
|
+
variant: l,
|
|
3549
|
+
appearance: _e.Solid,
|
|
3550
|
+
"aria-haspopup": "dialog",
|
|
3551
|
+
"aria-expanded": m,
|
|
3552
|
+
onClick: () => h(!0)
|
|
3553
|
+
}), /* @__PURE__ */ J(Ni, {
|
|
3554
|
+
open: m,
|
|
3555
|
+
onClose: n,
|
|
3556
|
+
title: e,
|
|
3557
|
+
options: t ?? [],
|
|
3558
|
+
search: r,
|
|
3559
|
+
searchPlaceholder: i,
|
|
3560
|
+
searchClearLabel: a,
|
|
3561
|
+
noResultsLabel: o,
|
|
3562
|
+
backLabel: s,
|
|
3563
|
+
closeLabel: c,
|
|
3564
|
+
colors: u,
|
|
3565
|
+
sectionHeaderClassName: d
|
|
3566
|
+
})] });
|
|
3567
|
+
}
|
|
3568
|
+
if (f) return /* @__PURE__ */ J(ge, {
|
|
3569
|
+
...v,
|
|
3487
3570
|
variant: l,
|
|
3488
3571
|
appearance: _e.Solid,
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
"aria-expanded": p,
|
|
3492
|
-
onClick: () => m(!0)
|
|
3493
|
-
}), /* @__PURE__ */ J(Ai, {
|
|
3494
|
-
open: p,
|
|
3495
|
-
onClose: () => {
|
|
3496
|
-
m(!1), r?.onChange("");
|
|
3497
|
-
},
|
|
3498
|
-
title: e,
|
|
3499
|
-
options: t ?? [],
|
|
3500
|
-
search: r,
|
|
3501
|
-
searchPlaceholder: i,
|
|
3502
|
-
searchClearLabel: a,
|
|
3503
|
-
noResultsLabel: o,
|
|
3504
|
-
backLabel: s,
|
|
3505
|
-
closeLabel: c,
|
|
3506
|
-
colors: u,
|
|
3507
|
-
sectionHeaderClassName: d
|
|
3508
|
-
})] });
|
|
3572
|
+
onClick: n
|
|
3573
|
+
});
|
|
3509
3574
|
if (r) return /* @__PURE__ */ J("div", {
|
|
3510
|
-
ref:
|
|
3575
|
+
ref: p,
|
|
3511
3576
|
children: /* @__PURE__ */ J(U, {
|
|
3512
3577
|
items: t ?? [],
|
|
3513
3578
|
searchable: !0,
|
|
@@ -3519,15 +3584,15 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3519
3584
|
maxVisibleItems: 7,
|
|
3520
3585
|
placement: "bottom-end",
|
|
3521
3586
|
matchReferenceWidth: !1,
|
|
3522
|
-
listClassName:
|
|
3523
|
-
onOpenChange:
|
|
3587
|
+
listClassName: ji,
|
|
3588
|
+
onOpenChange: h,
|
|
3524
3589
|
children: /* @__PURE__ */ J(ge, {
|
|
3525
3590
|
label: e,
|
|
3526
3591
|
variant: l,
|
|
3527
3592
|
appearance: _e.Solid,
|
|
3528
|
-
iconAfter:
|
|
3593
|
+
iconAfter: _,
|
|
3529
3594
|
"aria-haspopup": "menu",
|
|
3530
|
-
"aria-expanded":
|
|
3595
|
+
"aria-expanded": m
|
|
3531
3596
|
})
|
|
3532
3597
|
})
|
|
3533
3598
|
});
|
|
@@ -3536,7 +3601,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3536
3601
|
size: V.SM,
|
|
3537
3602
|
stroke: H
|
|
3538
3603
|
});
|
|
3539
|
-
return l === ye.Primary ? /* @__PURE__ */ J(
|
|
3604
|
+
return l === ye.Primary ? /* @__PURE__ */ J(ze, {
|
|
3540
3605
|
label: e,
|
|
3541
3606
|
iconBefore: t,
|
|
3542
3607
|
onClick: n
|
|
@@ -3549,7 +3614,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3549
3614
|
});
|
|
3550
3615
|
}
|
|
3551
3616
|
return /* @__PURE__ */ J("div", {
|
|
3552
|
-
ref:
|
|
3617
|
+
ref: p,
|
|
3553
3618
|
children: /* @__PURE__ */ J(ve, {
|
|
3554
3619
|
appearance: _e.Solid,
|
|
3555
3620
|
label: e,
|
|
@@ -3557,16 +3622,16 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3557
3622
|
items: t
|
|
3558
3623
|
})
|
|
3559
3624
|
});
|
|
3560
|
-
},
|
|
3625
|
+
}, Fi = ({ title: e, description: t, createButton: n, titleClassName: r, descriptionClassName: i }) => /* @__PURE__ */ J(Re, {
|
|
3561
3626
|
title: e,
|
|
3562
3627
|
description: t,
|
|
3563
3628
|
titleClassName: r,
|
|
3564
3629
|
descriptionClassName: i,
|
|
3565
|
-
action: n == null ? void 0 : /* @__PURE__ */ J(
|
|
3630
|
+
action: n == null ? void 0 : /* @__PURE__ */ J(Pi, {
|
|
3566
3631
|
variant: ye.Secondary,
|
|
3567
3632
|
...n
|
|
3568
3633
|
})
|
|
3569
|
-
}),
|
|
3634
|
+
}), Ii = {
|
|
3570
3635
|
title: "Browse settings",
|
|
3571
3636
|
view: "View",
|
|
3572
3637
|
sorting: "Sorting",
|
|
@@ -3580,7 +3645,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3580
3645
|
back: "Back",
|
|
3581
3646
|
close: "Close",
|
|
3582
3647
|
formatFilterCount: (e, t) => `${e} of ${t}`
|
|
3583
|
-
},
|
|
3648
|
+
}, Li = {
|
|
3584
3649
|
filterBtn: "_filterBtn_1xxr2_7",
|
|
3585
3650
|
filterBtnActive: "_filterBtnActive_1xxr2_24",
|
|
3586
3651
|
filterBtnOpen: "_filterBtnOpen_1xxr2_28",
|
|
@@ -3592,10 +3657,10 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3592
3657
|
divider: "_divider_1xxr2_63",
|
|
3593
3658
|
sectionLabel: "_sectionLabel_1xxr2_67",
|
|
3594
3659
|
footer: "_footer_1xxr2_71"
|
|
3595
|
-
},
|
|
3660
|
+
}, Ri = (e, t, n, r, i) => {
|
|
3596
3661
|
let a = e.size > 0;
|
|
3597
3662
|
return n && a ? `${r} · ${e.size}` : n ? r : a ? u(e, t, i) : i;
|
|
3598
|
-
},
|
|
3663
|
+
}, zi = ({ checked: e, onChange: t, values: n, isMyAppsActive: r, onMyAppsChange: i, myAppsLabel: a = "My", topicsLabel: o = "Topics", defaultLabel: s = "From", clearLabel: c = "Clear", applyLabel: l = "Apply", typography: u, colors: d }) => {
|
|
3599
3664
|
let f = (r ?? !1) || e.size > 0, [p, m] = B(!1), h = oe({
|
|
3600
3665
|
"--cat-filter-btn-bg": d?.buttonBackground,
|
|
3601
3666
|
"--cat-filter-btn-border": d?.buttonBorder,
|
|
@@ -3612,7 +3677,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3612
3677
|
"--cat-filter-section-label": d?.sectionLabel,
|
|
3613
3678
|
"--cat-filter-divider": d?.divider,
|
|
3614
3679
|
"--cat-filter-footer-border": d?.footerBorder
|
|
3615
|
-
}), g = R(() => n == null ? [] : [...n].sort(), [n]), _ =
|
|
3680
|
+
}), g = R(() => n == null ? [] : [...n].sort(), [n]), _ = Ri(e, n, r, a, s), [v, y] = B(() => new Set(e)), [b, x] = B(r ?? !1);
|
|
3616
3681
|
I(() => {
|
|
3617
3682
|
p && (y(new Set(e)), x(r ?? !1));
|
|
3618
3683
|
}, [
|
|
@@ -3658,16 +3723,16 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3658
3723
|
...h,
|
|
3659
3724
|
maxHeight: "calc(var(--fui-available-height, 9999px) - 8px)"
|
|
3660
3725
|
},
|
|
3661
|
-
className: P("flex min-w-[360px] flex-col rounded-xl p-[6px]",
|
|
3726
|
+
className: P("flex min-w-[360px] flex-col rounded-xl p-[6px]", Li.overlay),
|
|
3662
3727
|
onKeyDown: M,
|
|
3663
3728
|
children: [
|
|
3664
|
-
/* @__PURE__ */ J(
|
|
3729
|
+
/* @__PURE__ */ J(K, {
|
|
3665
3730
|
role: "menuitemcheckbox",
|
|
3666
3731
|
"aria-checked": b,
|
|
3667
|
-
mark:
|
|
3732
|
+
mark: q.Checkbox,
|
|
3668
3733
|
selected: b,
|
|
3669
3734
|
label: a,
|
|
3670
|
-
labelClassName: P(
|
|
3735
|
+
labelClassName: P(Li.rowLabel, u?.filterButtonClassName ?? "dial-small-semi-text"),
|
|
3671
3736
|
className: "shrink-0",
|
|
3672
3737
|
tabIndex: w === 0 ? 0 : -1,
|
|
3673
3738
|
ref: (e) => {
|
|
@@ -3675,14 +3740,14 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3675
3740
|
},
|
|
3676
3741
|
onClick: () => x(!b)
|
|
3677
3742
|
}),
|
|
3678
|
-
g.length > 0 && /* @__PURE__ */ Y(
|
|
3743
|
+
g.length > 0 && /* @__PURE__ */ Y(Qe, { children: [
|
|
3679
3744
|
/* @__PURE__ */ J("div", {
|
|
3680
3745
|
role: "separator",
|
|
3681
|
-
className: P("my-1 h-px",
|
|
3746
|
+
className: P("my-1 h-px", Li.divider),
|
|
3682
3747
|
"aria-hidden": !0
|
|
3683
3748
|
}),
|
|
3684
3749
|
/* @__PURE__ */ J("div", {
|
|
3685
|
-
className: P("px-[10px] pt-[10px] pb-1", u?.filterSectionLabelClassName ?? "dial-tiny-lead-semi-text",
|
|
3750
|
+
className: P("px-[10px] pt-[10px] pb-1", u?.filterSectionLabelClassName ?? "dial-tiny-lead-semi-text", Li.sectionLabel),
|
|
3686
3751
|
"aria-hidden": !0,
|
|
3687
3752
|
children: o
|
|
3688
3753
|
}),
|
|
@@ -3690,13 +3755,13 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3690
3755
|
className: P(ae, "flex min-h-0 flex-col gap-1 overflow-y-auto"),
|
|
3691
3756
|
children: g.map((e, t) => {
|
|
3692
3757
|
let n = v.has(e), r = t + 1;
|
|
3693
|
-
return /* @__PURE__ */ J(
|
|
3758
|
+
return /* @__PURE__ */ J(K, {
|
|
3694
3759
|
role: "menuitemcheckbox",
|
|
3695
3760
|
"aria-checked": n,
|
|
3696
|
-
mark:
|
|
3761
|
+
mark: q.Checkbox,
|
|
3697
3762
|
selected: n,
|
|
3698
3763
|
label: e,
|
|
3699
|
-
labelClassName:
|
|
3764
|
+
labelClassName: Li.rowLabel,
|
|
3700
3765
|
className: "shrink-0",
|
|
3701
3766
|
tabIndex: w === r ? 0 : -1,
|
|
3702
3767
|
ref: (e) => {
|
|
@@ -3708,12 +3773,12 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3708
3773
|
})
|
|
3709
3774
|
] }),
|
|
3710
3775
|
/* @__PURE__ */ Y("div", {
|
|
3711
|
-
className: P("mt-1 flex shrink-0 items-center px-1 py-3",
|
|
3776
|
+
className: P("mt-1 flex shrink-0 items-center px-1 py-3", Li.footer),
|
|
3712
3777
|
ref: O,
|
|
3713
3778
|
children: [/* @__PURE__ */ J(Ae, {
|
|
3714
3779
|
label: c,
|
|
3715
3780
|
onClick: te
|
|
3716
|
-
}), /* @__PURE__ */ J(
|
|
3781
|
+
}), /* @__PURE__ */ J(ze, {
|
|
3717
3782
|
label: l,
|
|
3718
3783
|
className: "ms-auto",
|
|
3719
3784
|
onClick: ee
|
|
@@ -3730,32 +3795,32 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3730
3795
|
iconBefore: /* @__PURE__ */ J(ut, {
|
|
3731
3796
|
size: V.SM,
|
|
3732
3797
|
stroke: H,
|
|
3733
|
-
className: P("shrink-0",
|
|
3798
|
+
className: P("shrink-0", Li.filterBtnFunnel),
|
|
3734
3799
|
"aria-hidden": !0
|
|
3735
3800
|
}),
|
|
3736
3801
|
label: _,
|
|
3737
|
-
textClassName: P(
|
|
3802
|
+
textClassName: P(Li.filterBtnLabel, u?.filterButtonClassName ?? "dial-small-semi-text"),
|
|
3738
3803
|
iconAfter: /* @__PURE__ */ J(it, {
|
|
3739
3804
|
size: 14,
|
|
3740
3805
|
stroke: H,
|
|
3741
|
-
className: P("shrink-0 transition-transform duration-150",
|
|
3806
|
+
className: P("shrink-0 transition-transform duration-150", Li.filterBtnChevron, p && "rotate-180"),
|
|
3742
3807
|
"aria-hidden": !0
|
|
3743
3808
|
}),
|
|
3744
|
-
className: P("h-12 shrink-0 gap-[7px] !rounded-lg px-[18px] whitespace-nowrap",
|
|
3809
|
+
className: P("h-12 shrink-0 gap-[7px] !rounded-lg px-[18px] whitespace-nowrap", Li.filterBtn, f && Li.filterBtnActive, p && Li.filterBtnOpen)
|
|
3745
3810
|
})
|
|
3746
3811
|
});
|
|
3747
|
-
},
|
|
3812
|
+
}, Bi = /* @__PURE__ */ function(e) {
|
|
3748
3813
|
return e.Root = "root", e.View = "view", e.Sorting = "sorting", e.Filtering = "filtering", e;
|
|
3749
|
-
}({}),
|
|
3814
|
+
}({}), Vi = /* @__PURE__ */ J(ot, {
|
|
3750
3815
|
size: V.SM,
|
|
3751
3816
|
stroke: H,
|
|
3752
3817
|
className: "rtl:scale-x-[-1]",
|
|
3753
3818
|
"aria-hidden": !0
|
|
3754
|
-
}),
|
|
3755
|
-
let [m, h] = B(
|
|
3756
|
-
h(
|
|
3819
|
+
}), Hi = ({ open: e, onClose: t, viewMode: n, onViewModeChange: r, sortOptions: i, sortKey: a, onSortChange: o, filters: s, onFiltersChange: c, filterValues: l, isMyAppsActive: u, onMyAppsChange: d, labels: f, typography: p }) => {
|
|
3820
|
+
let [m, h] = B(Bi.Root), [g, _] = B(() => /* @__PURE__ */ new Set()), [v, y] = B(!1), b = R(() => l == null ? [] : [...l].sort(), [l]), x = i != null && i.length > 0, C = s.size + +!!u, w = () => {
|
|
3821
|
+
h(Bi.Root), t();
|
|
3757
3822
|
}, T = () => {
|
|
3758
|
-
_(new Set(s)), y(u ?? !1), h(
|
|
3823
|
+
_(new Set(s)), y(u ?? !1), h(Bi.Filtering);
|
|
3759
3824
|
}, E = () => {
|
|
3760
3825
|
c(g), d?.(v), w();
|
|
3761
3826
|
}, D = () => {
|
|
@@ -3769,57 +3834,57 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3769
3834
|
label: f.listView,
|
|
3770
3835
|
Icon: pt
|
|
3771
3836
|
}], k = {
|
|
3772
|
-
[
|
|
3773
|
-
[
|
|
3774
|
-
[
|
|
3775
|
-
[
|
|
3776
|
-
}, A = m ===
|
|
3837
|
+
[Bi.Root]: f.title,
|
|
3838
|
+
[Bi.View]: f.view,
|
|
3839
|
+
[Bi.Sorting]: f.sorting,
|
|
3840
|
+
[Bi.Filtering]: f.filtering
|
|
3841
|
+
}, A = m === Bi.Filtering;
|
|
3777
3842
|
return /* @__PURE__ */ Y(he, {
|
|
3778
3843
|
open: e,
|
|
3779
3844
|
title: k[m],
|
|
3780
|
-
onBack: m ===
|
|
3845
|
+
onBack: m === Bi.Root ? void 0 : () => h(Bi.Root),
|
|
3781
3846
|
backAriaLabel: f.back,
|
|
3782
3847
|
closeAriaLabel: f.close,
|
|
3783
3848
|
onClose: w,
|
|
3784
3849
|
bodyClassName: P(A && "flex flex-col"),
|
|
3785
3850
|
children: [
|
|
3786
|
-
m ===
|
|
3851
|
+
m === Bi.Root && /* @__PURE__ */ Y("div", {
|
|
3787
3852
|
role: "menu",
|
|
3788
3853
|
"aria-label": f.title,
|
|
3789
3854
|
className: "p-2",
|
|
3790
3855
|
children: [
|
|
3791
|
-
/* @__PURE__ */ J(
|
|
3856
|
+
/* @__PURE__ */ J(K, {
|
|
3792
3857
|
role: "menuitem",
|
|
3793
3858
|
"aria-haspopup": "menu",
|
|
3794
3859
|
label: f.view,
|
|
3795
|
-
trailing:
|
|
3796
|
-
onClick: () => h(
|
|
3860
|
+
trailing: Vi,
|
|
3861
|
+
onClick: () => h(Bi.View)
|
|
3797
3862
|
}),
|
|
3798
|
-
x && /* @__PURE__ */ J(
|
|
3863
|
+
x && /* @__PURE__ */ J(K, {
|
|
3799
3864
|
role: "menuitem",
|
|
3800
3865
|
"aria-haspopup": "menu",
|
|
3801
3866
|
label: f.sorting,
|
|
3802
|
-
trailing:
|
|
3803
|
-
onClick: () => h(
|
|
3867
|
+
trailing: Vi,
|
|
3868
|
+
onClick: () => h(Bi.Sorting)
|
|
3804
3869
|
}),
|
|
3805
|
-
/* @__PURE__ */ J(
|
|
3870
|
+
/* @__PURE__ */ J(K, {
|
|
3806
3871
|
role: "menuitem",
|
|
3807
3872
|
"aria-haspopup": "menu",
|
|
3808
3873
|
label: f.filtering,
|
|
3809
3874
|
description: C > 0 ? f.formatFilterCount(C, b.length + 1) : void 0,
|
|
3810
|
-
trailing:
|
|
3875
|
+
trailing: Vi,
|
|
3811
3876
|
onClick: T
|
|
3812
3877
|
})
|
|
3813
3878
|
]
|
|
3814
3879
|
}),
|
|
3815
|
-
m ===
|
|
3880
|
+
m === Bi.View && /* @__PURE__ */ J("div", {
|
|
3816
3881
|
role: "menu",
|
|
3817
3882
|
"aria-label": f.view,
|
|
3818
3883
|
className: "p-2",
|
|
3819
|
-
children: O.map(({ value: e, label: t, Icon: i }) => /* @__PURE__ */ J(
|
|
3884
|
+
children: O.map(({ value: e, label: t, Icon: i }) => /* @__PURE__ */ J(K, {
|
|
3820
3885
|
role: "menuitemradio",
|
|
3821
3886
|
"aria-checked": n === e,
|
|
3822
|
-
mark:
|
|
3887
|
+
mark: q.Check,
|
|
3823
3888
|
selected: n === e,
|
|
3824
3889
|
label: t,
|
|
3825
3890
|
icon: /* @__PURE__ */ J(i, {
|
|
@@ -3832,14 +3897,14 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3832
3897
|
}
|
|
3833
3898
|
}, e))
|
|
3834
3899
|
}),
|
|
3835
|
-
m ===
|
|
3900
|
+
m === Bi.Sorting && x && /* @__PURE__ */ J("div", {
|
|
3836
3901
|
role: "menu",
|
|
3837
3902
|
"aria-label": f.sorting,
|
|
3838
3903
|
className: "p-2",
|
|
3839
|
-
children: i.map((e) => /* @__PURE__ */ J(
|
|
3904
|
+
children: i.map((e) => /* @__PURE__ */ J(K, {
|
|
3840
3905
|
role: "menuitemradio",
|
|
3841
3906
|
"aria-checked": e.value === a,
|
|
3842
|
-
mark:
|
|
3907
|
+
mark: q.Check,
|
|
3843
3908
|
selected: e.value === a,
|
|
3844
3909
|
label: e.label,
|
|
3845
3910
|
onClick: () => {
|
|
@@ -3847,51 +3912,51 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3847
3912
|
}
|
|
3848
3913
|
}, e.value))
|
|
3849
3914
|
}),
|
|
3850
|
-
A && /* @__PURE__ */ Y(
|
|
3915
|
+
A && /* @__PURE__ */ Y(Qe, { children: [/* @__PURE__ */ Y("div", {
|
|
3851
3916
|
role: "menu",
|
|
3852
3917
|
"aria-label": f.filtering,
|
|
3853
3918
|
className: "flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto p-2",
|
|
3854
|
-
children: [/* @__PURE__ */ J(
|
|
3919
|
+
children: [/* @__PURE__ */ J(K, {
|
|
3855
3920
|
role: "menuitemcheckbox",
|
|
3856
3921
|
"aria-checked": v,
|
|
3857
|
-
mark:
|
|
3922
|
+
mark: q.Checkbox,
|
|
3858
3923
|
selected: v,
|
|
3859
3924
|
label: f.myApps,
|
|
3860
|
-
labelClassName:
|
|
3925
|
+
labelClassName: Li.rowLabel,
|
|
3861
3926
|
className: "shrink-0",
|
|
3862
3927
|
onClick: () => y(!v)
|
|
3863
|
-
}), b.length > 0 && /* @__PURE__ */ Y(
|
|
3928
|
+
}), b.length > 0 && /* @__PURE__ */ Y(Qe, { children: [
|
|
3864
3929
|
/* @__PURE__ */ J("div", {
|
|
3865
3930
|
role: "separator",
|
|
3866
|
-
className: P("my-1 h-px",
|
|
3931
|
+
className: P("my-1 h-px", Li.divider),
|
|
3867
3932
|
"aria-hidden": !0
|
|
3868
3933
|
}),
|
|
3869
3934
|
/* @__PURE__ */ J("div", {
|
|
3870
|
-
className: P("px-[10px] pt-[10px] pb-1", p?.filterSectionLabelClassName ?? "dial-tiny-lead-semi-text",
|
|
3935
|
+
className: P("px-[10px] pt-[10px] pb-1", p?.filterSectionLabelClassName ?? "dial-tiny-lead-semi-text", Li.sectionLabel),
|
|
3871
3936
|
"aria-hidden": !0,
|
|
3872
3937
|
children: f.topics
|
|
3873
3938
|
}),
|
|
3874
3939
|
b.map((e) => {
|
|
3875
3940
|
let t = g.has(e);
|
|
3876
|
-
return /* @__PURE__ */ J(
|
|
3941
|
+
return /* @__PURE__ */ J(K, {
|
|
3877
3942
|
role: "menuitemcheckbox",
|
|
3878
3943
|
"aria-checked": t,
|
|
3879
|
-
mark:
|
|
3944
|
+
mark: q.Checkbox,
|
|
3880
3945
|
selected: t,
|
|
3881
3946
|
label: e,
|
|
3882
|
-
labelClassName:
|
|
3947
|
+
labelClassName: Li.rowLabel,
|
|
3883
3948
|
className: "shrink-0",
|
|
3884
3949
|
onClick: () => _(S(e, g))
|
|
3885
3950
|
}, e);
|
|
3886
3951
|
})
|
|
3887
3952
|
] })]
|
|
3888
3953
|
}), /* @__PURE__ */ Y("div", {
|
|
3889
|
-
className: P("flex shrink-0 items-center gap-3 px-4 py-3",
|
|
3954
|
+
className: P("flex shrink-0 items-center gap-3 px-4 py-3", Li.footer),
|
|
3890
3955
|
children: [/* @__PURE__ */ J(Ae, {
|
|
3891
3956
|
label: f.clear,
|
|
3892
3957
|
className: "flex-1",
|
|
3893
3958
|
onClick: D
|
|
3894
|
-
}), /* @__PURE__ */ J(
|
|
3959
|
+
}), /* @__PURE__ */ J(ze, {
|
|
3895
3960
|
label: f.apply,
|
|
3896
3961
|
className: "flex-1",
|
|
3897
3962
|
onClick: E
|
|
@@ -3899,16 +3964,16 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3899
3964
|
})] })
|
|
3900
3965
|
]
|
|
3901
3966
|
});
|
|
3902
|
-
},
|
|
3967
|
+
}, Ui = {
|
|
3903
3968
|
section: "_section_mk15x_1",
|
|
3904
3969
|
divider: "_divider_mk15x_5",
|
|
3905
3970
|
settingsDot: "_settingsDot_mk15x_9",
|
|
3906
3971
|
searchField: "_searchField_mk15x_17"
|
|
3907
|
-
},
|
|
3972
|
+
}, Wi = /* @__PURE__ */ new Set(), Gi = ({ totalCount: e, viewMode: t, onViewModeChange: n, title: r = "Browse", browseHeaderRenderer: i, styles: a, query: o, onQueryChange: s, searchPlaceholder: c, gridViewLabel: l = "Grid view", listViewLabel: u = "List view", viewToggleLabel: d = "View mode", sortKey: f, sortOptions: p, onSortChange: m, sortLabel: h = "Sort", filters: g, onFiltersChange: _, filterValues: v, isMyAppsActive: y, onMyAppsChange: b, filterFromLabel: x, filterMyAppsLabel: S, filterTopicsLabel: C, browseSettingsLabels: w }) => {
|
|
3908
3973
|
let T = se(), [E, D] = B(!1), O = (y ?? !1) || (g?.size ?? 0) > 0, k = {
|
|
3909
|
-
...
|
|
3910
|
-
myApps: S ??
|
|
3911
|
-
topics: C ??
|
|
3974
|
+
...Ii,
|
|
3975
|
+
myApps: S ?? Ii.myApps,
|
|
3976
|
+
topics: C ?? Ii.topics,
|
|
3912
3977
|
...w
|
|
3913
3978
|
}, A = a?.typography?.titleClassName ?? "dial-body-semi-text", j = a?.typography?.countClassName ?? "dial-tiny-semi-text", M = R(() => [{
|
|
3914
3979
|
value: It.Grid,
|
|
@@ -3931,7 +3996,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3931
3996
|
}, N = p?.find((e) => e.value === f)?.label ?? h, ne = R(() => (p ?? []).map((e) => ({
|
|
3932
3997
|
key: e.value,
|
|
3933
3998
|
label: e.label,
|
|
3934
|
-
mark:
|
|
3999
|
+
mark: q.Check,
|
|
3935
4000
|
checked: e.value === f,
|
|
3936
4001
|
onClick: () => m?.(e.value)
|
|
3937
4002
|
})), [
|
|
@@ -3956,12 +4021,12 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3956
4021
|
}
|
|
3957
4022
|
}), !T && /* @__PURE__ */ Y("div", {
|
|
3958
4023
|
className: "ms-auto flex shrink-0 items-center gap-2",
|
|
3959
|
-
children: [/* @__PURE__ */ J(
|
|
4024
|
+
children: [/* @__PURE__ */ J(Ue, {
|
|
3960
4025
|
"aria-label": d,
|
|
3961
4026
|
value: t,
|
|
3962
4027
|
onChange: n,
|
|
3963
4028
|
items: M
|
|
3964
|
-
}), p != null && p.length > 0 && /* @__PURE__ */ Y(
|
|
4029
|
+
}), p != null && p.length > 0 && /* @__PURE__ */ Y(Qe, { children: [/* @__PURE__ */ J("div", { className: P("h-4 w-px shrink-0", Ui.divider) }), /* @__PURE__ */ J(ve, {
|
|
3965
4030
|
items: ne,
|
|
3966
4031
|
label: N,
|
|
3967
4032
|
variant: ye.Primary,
|
|
@@ -3973,15 +4038,15 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3973
4038
|
children: [/* @__PURE__ */ J("div", {
|
|
3974
4039
|
role: "search",
|
|
3975
4040
|
className: "flex-1",
|
|
3976
|
-
children: /* @__PURE__ */ J(
|
|
4041
|
+
children: /* @__PURE__ */ J(He, {
|
|
3977
4042
|
value: o,
|
|
3978
4043
|
onChange: ee,
|
|
3979
4044
|
size: Ee.Large,
|
|
3980
|
-
wrapperClassName:
|
|
4045
|
+
wrapperClassName: Ui.searchField,
|
|
3981
4046
|
placeholder: c,
|
|
3982
4047
|
"aria-label": c
|
|
3983
4048
|
})
|
|
3984
|
-
}), T ? /* @__PURE__ */ Y(
|
|
4049
|
+
}), T ? /* @__PURE__ */ Y(Qe, { children: [/* @__PURE__ */ Y("span", {
|
|
3985
4050
|
className: "relative shrink-0",
|
|
3986
4051
|
children: [/* @__PURE__ */ J(je, {
|
|
3987
4052
|
size: Ee.Large,
|
|
@@ -3995,10 +4060,10 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
3995
4060
|
"aria-hidden": !0
|
|
3996
4061
|
})
|
|
3997
4062
|
}), O && /* @__PURE__ */ J("span", {
|
|
3998
|
-
className: P("pointer-events-none absolute end-2.5 top-2.5 size-2 rounded-full",
|
|
4063
|
+
className: P("pointer-events-none absolute end-2.5 top-2.5 size-2 rounded-full", Ui.settingsDot),
|
|
3999
4064
|
"aria-hidden": !0
|
|
4000
4065
|
})]
|
|
4001
|
-
}), /* @__PURE__ */ J(
|
|
4066
|
+
}), /* @__PURE__ */ J(Hi, {
|
|
4002
4067
|
open: E,
|
|
4003
4068
|
onClose: () => D(!1),
|
|
4004
4069
|
viewMode: t,
|
|
@@ -4006,15 +4071,15 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4006
4071
|
sortOptions: p,
|
|
4007
4072
|
sortKey: f,
|
|
4008
4073
|
onSortChange: m,
|
|
4009
|
-
filters: g ??
|
|
4074
|
+
filters: g ?? Wi,
|
|
4010
4075
|
onFiltersChange: _ ?? (() => void 0),
|
|
4011
4076
|
filterValues: v,
|
|
4012
4077
|
isMyAppsActive: y,
|
|
4013
4078
|
onMyAppsChange: b,
|
|
4014
4079
|
labels: k,
|
|
4015
4080
|
typography: a?.typography
|
|
4016
|
-
})] }) : /* @__PURE__ */ J(
|
|
4017
|
-
checked: g ??
|
|
4081
|
+
})] }) : /* @__PURE__ */ J(zi, {
|
|
4082
|
+
checked: g ?? Wi,
|
|
4018
4083
|
onChange: _ ?? (() => void 0),
|
|
4019
4084
|
values: v,
|
|
4020
4085
|
isMyAppsActive: y,
|
|
@@ -4028,15 +4093,15 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4028
4093
|
})]
|
|
4029
4094
|
})]
|
|
4030
4095
|
});
|
|
4031
|
-
},
|
|
4096
|
+
}, Ki = ({ query: e, onQueryChange: t, searchPlaceholder: n = "Search models, tools, agents…", styles: r, filters: i, onFiltersChange: a, filterValues: o, isMyAppsActive: s, onMyAppsChange: c, filterFromLabel: l, filterMyAppsLabel: u, filterTopicsLabel: d, gridViewLabel: f, listViewLabel: p, viewToggleLabel: m, sortKey: h, sortOptions: g, onSortChange: _, sortLabel: v, ...y }) => {
|
|
4032
4097
|
let b = {
|
|
4033
4098
|
"--cat-browse-divider": r?.colors?.divider,
|
|
4034
4099
|
"--cat-browse-settings-dot": r?.colors?.settingsActiveDot
|
|
4035
4100
|
};
|
|
4036
4101
|
return /* @__PURE__ */ J("section", {
|
|
4037
|
-
className: P("flex-shrink-0 px-4",
|
|
4102
|
+
className: P("flex-shrink-0 px-4", Ui.section, Vt.toolbar),
|
|
4038
4103
|
style: b,
|
|
4039
|
-
children: /* @__PURE__ */ J(
|
|
4104
|
+
children: /* @__PURE__ */ J(Gi, {
|
|
4040
4105
|
styles: r,
|
|
4041
4106
|
query: e,
|
|
4042
4107
|
onQueryChange: t,
|
|
@@ -4059,12 +4124,12 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4059
4124
|
...y
|
|
4060
4125
|
})
|
|
4061
4126
|
});
|
|
4062
|
-
},
|
|
4127
|
+
}, qi = {
|
|
4063
4128
|
root: "_root_1h83l_1",
|
|
4064
4129
|
heading: "_heading_1h83l_5",
|
|
4065
4130
|
headingTitle: "_headingTitle_1h83l_9"
|
|
4066
|
-
},
|
|
4067
|
-
let { typography:
|
|
4131
|
+
}, Ji = 3, Yi = 300, Xi = ({ items: e, tabs: t, topicOptions: n, favorites: r, titles: a, browseHeaderRenderer: s, onToggleFavorite: u, isFavoriteVisible: f, columnVisibility: p, onUseInChat: h, isPrimaryActionVisible: v, onShare: b, isPublishVisible: S, isPublishPrimary: C, getPublishHistory: w, publishFolderItems: T, publishExpandedPaths: E, onPublishExpandedPathsChange: D, publishLoadingPaths: O, hasPublishWriteAccess: k, publishDefaultAuthor: A, onPublish: j, onPublishSuccess: M, onPublishError: ee, onCreatePublishFolder: te, publishLabels: N, ruleSourceOptions: ne, onFetchExistingRules: re, shareOverlay: ie, isShareVisible: ae, isSharePrimary: oe, onFetchDetails: ce, renderCredentials: le, onEdit: ue, onDownload: fe, isDownloadVisible: pe, isDownloadPrimary: L, onLoadContentFile: me, onLoadContentFilePreview: he, renderContentFilePreview: ge, renderContentFileTree: _e, onDelete: ve, onUnshare: ye, isUnshareVisible: be, onRevokeShare: xe, onFetchRecipientsCount: Se, isRevokeShareVisible: Ce, onUnpublish: V, isUnpublishVisible: H, onLogin: we, onLogout: U, onCreateClick: Te, createOptions: Ee, createSearch: De, createMenuByTab: Oe, hideCreateButton: ke = !1, hidePageTitle: Ae = !1, isReadonly: je = !1, initialViewMode: Me = It.Grid, isFullWidth: W = !1, isFavoritesPaginationHidden: Ne = !1, selectedItemId: Pe, onCardClick: Fe, isLoading: G, styles: K, detailsTexts: q, detailsLimitsFooterNote: Ie, initialDetailsItemId: Le, sortKey: Re, onSortChange: ze, filterTopics: Be, onFilterTopicsChange: Ve, isMyAppsActive: He, onMyAppsActiveChange: Ue, activeTab: We, onActiveTabChange: Ge, renderEmptyState: Ke }) => {
|
|
4132
|
+
let { typography: Ye, headingRowClassName: Xe = "h-[64px]" } = K ?? {}, Ze = Kt(K), $e = se(), et = a?.pageTitle ?? "Catalog", tt = a?.createLabel ?? "Create", nt = a?.favoritesTitle ?? "Your favorites", rt = a?.browseTitle ?? "Browse", it = a?.searchPlaceholder ?? "Search models, tools, agents…", at = a?.noResultsTitle ?? (() => "No items found"), ot = a?.myAppsEmptyTitle ?? (() => "No personal items yet"), st = a?.myAppsEmptyDescription ?? "Create your first one, it'll show up right here.", ct = a?.featuredLabel ?? "Featured", lt = a?.gridViewLabel ?? "Grid view", ut = a?.listViewLabel ?? "List view", dt = a?.viewToggleLabel ?? "View mode", ft = a?.ariaLabel ?? "Catalog", X = a?.sortLabel ?? "Sort", pt = [
|
|
4068
4133
|
{
|
|
4069
4134
|
value: o.RecentlyUpdated,
|
|
4070
4135
|
label: a?.sortRecentlyUpdatedLabel ?? "Recently Updated"
|
|
@@ -4077,99 +4142,99 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4077
4142
|
value: o.NameAZ,
|
|
4078
4143
|
label: a?.sortNameAZLabel ?? "Name A-Z"
|
|
4079
4144
|
}
|
|
4080
|
-
], [
|
|
4145
|
+
], [mt, ht] = B(""), [gt, _t] = B(Me), [vt, yt] = B(Me === It.Cards ? "shown" : "unmounted"), [bt, xt] = B(o.RecentlyUpdated), [St, Ct] = B(/* @__PURE__ */ new Set()), [wt, Tt] = B(!1), Et = Re ?? bt, Dt = Be ?? St, Ot = He ?? wt, kt = F((e) => {
|
|
4081
4146
|
let t = e;
|
|
4082
|
-
|
|
4083
|
-
}, [
|
|
4084
|
-
|
|
4085
|
-
}, [
|
|
4086
|
-
|
|
4087
|
-
}, [
|
|
4147
|
+
xt(t), ze?.(t);
|
|
4148
|
+
}, [ze]), At = F((e) => {
|
|
4149
|
+
Ct(e), Ve?.(e);
|
|
4150
|
+
}, [Ve]), jt = F((e) => {
|
|
4151
|
+
Tt(e), Ue?.(e);
|
|
4152
|
+
}, [Ue]), Mt = R(() => e.filter((e) => !e.isHidden), [e]), Nt = R(() => r.filter((e) => !e.isHidden), [r]), Pt = R(() => n ?? i(Mt), [n, Mt]), Z = R(() => t ?? x(Mt, a?.tabLabels), [
|
|
4088
4153
|
t,
|
|
4089
|
-
|
|
4154
|
+
Mt,
|
|
4090
4155
|
a?.tabLabels
|
|
4091
|
-
]),
|
|
4156
|
+
]), Ft = Z[0]?.id ?? "", [Lt, Rt] = B(Ft);
|
|
4092
4157
|
I(() => {
|
|
4093
|
-
|
|
4094
|
-
}, [
|
|
4095
|
-
let
|
|
4158
|
+
Rt((e) => e || Ft);
|
|
4159
|
+
}, [Ft]);
|
|
4160
|
+
let Q = We ?? Lt, zt = z(null);
|
|
4096
4161
|
I(() => {
|
|
4097
|
-
|
|
4098
|
-
}, [
|
|
4099
|
-
let
|
|
4100
|
-
|
|
4101
|
-
}, [
|
|
4162
|
+
zt.current != null && c(zt.current);
|
|
4163
|
+
}, [Q, Z.length]);
|
|
4164
|
+
let Bt = F((e) => {
|
|
4165
|
+
Rt(e), Ge?.(e);
|
|
4166
|
+
}, [Ge]), [Ht, Ut] = B(Nt.length > 0);
|
|
4102
4167
|
I(() => {
|
|
4103
|
-
|
|
4104
|
-
}, [
|
|
4105
|
-
let
|
|
4106
|
-
|
|
4107
|
-
}, []),
|
|
4108
|
-
|
|
4109
|
-
let t = ++
|
|
4110
|
-
if (
|
|
4111
|
-
|
|
4168
|
+
Nt.length > 0 && !Ht && Ut(!0);
|
|
4169
|
+
}, [Nt.length, Ht]);
|
|
4170
|
+
let qt = F(() => {
|
|
4171
|
+
Ut(!1);
|
|
4172
|
+
}, []), Jt = Ht && Nt.length === 0, [Yt, Xt] = B(null), [Zt, Qt] = B(!1), [$t, en] = B(void 0), [tn, nn] = B(!1), rn = z(null), an = z(0), on = F(async (e) => {
|
|
4173
|
+
rn.current = e.id;
|
|
4174
|
+
let t = ++an.current;
|
|
4175
|
+
if (ce) {
|
|
4176
|
+
nn(!0);
|
|
4112
4177
|
try {
|
|
4113
|
-
let n = await
|
|
4114
|
-
return
|
|
4178
|
+
let n = await ce(e);
|
|
4179
|
+
return an.current === t && en(n), n;
|
|
4115
4180
|
} finally {
|
|
4116
|
-
|
|
4181
|
+
an.current === t && nn(!1);
|
|
4117
4182
|
}
|
|
4118
4183
|
}
|
|
4119
|
-
}, [
|
|
4120
|
-
for (let n = 0; n <
|
|
4121
|
-
if (
|
|
4122
|
-
n < 2 && await y(
|
|
4184
|
+
}, [ce]), sn = F(async (e) => (Xt(e), en(void 0), on(e)), [on]), cn = F(async (e, t) => {
|
|
4185
|
+
for (let n = 0; n < Ji; n++) {
|
|
4186
|
+
if (rn.current !== e.id || t(await on(e))) return;
|
|
4187
|
+
n < 2 && await y(Yi);
|
|
4123
4188
|
}
|
|
4124
|
-
}, [
|
|
4189
|
+
}, [on]), ln = z(null);
|
|
4125
4190
|
I(() => {
|
|
4126
|
-
if (!
|
|
4127
|
-
|
|
4191
|
+
if (!Le) {
|
|
4192
|
+
ln.current = null;
|
|
4128
4193
|
return;
|
|
4129
4194
|
}
|
|
4130
|
-
if (
|
|
4131
|
-
let t = e.find((e) => e.id ===
|
|
4132
|
-
t && (
|
|
4195
|
+
if (ln.current === Le) return;
|
|
4196
|
+
let t = e.find((e) => e.id === Le);
|
|
4197
|
+
t && (ln.current = Le, sn(t));
|
|
4133
4198
|
}, [
|
|
4134
|
-
|
|
4199
|
+
Le,
|
|
4135
4200
|
e,
|
|
4136
|
-
|
|
4201
|
+
sn
|
|
4137
4202
|
]), I(() => {
|
|
4138
|
-
if (
|
|
4139
|
-
let t = e.find((e) => e.id ===
|
|
4140
|
-
t && t !==
|
|
4141
|
-
}, [e,
|
|
4142
|
-
let
|
|
4143
|
-
await
|
|
4144
|
-
}, [
|
|
4145
|
-
H,
|
|
4146
|
-
se,
|
|
4147
|
-
on
|
|
4148
|
-
]), ln = F(async (e, t) => {
|
|
4149
|
-
await we?.(e, t), se && await on(e, (e) => !g(e?.credentials, t.level));
|
|
4203
|
+
if (Yt == null) return;
|
|
4204
|
+
let t = e.find((e) => e.id === Yt.id);
|
|
4205
|
+
t && t !== Yt && Xt(t);
|
|
4206
|
+
}, [e, Yt]);
|
|
4207
|
+
let un = F(async (e, t) => {
|
|
4208
|
+
await we?.(e, t), ce && await cn(e, (e) => g(e?.credentials, t.level));
|
|
4150
4209
|
}, [
|
|
4151
4210
|
we,
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
]),
|
|
4155
|
-
|
|
4156
|
-
|
|
4211
|
+
ce,
|
|
4212
|
+
cn
|
|
4213
|
+
]), dn = F(async (e, t) => {
|
|
4214
|
+
await U?.(e, t), ce && await cn(e, (e) => !g(e?.credentials, t.level));
|
|
4215
|
+
}, [
|
|
4216
|
+
U,
|
|
4217
|
+
ce,
|
|
4218
|
+
cn
|
|
4219
|
+
]), fn = F(() => {
|
|
4220
|
+
Qt(!1), rn.current = null, an.current += 1, setTimeout(() => {
|
|
4221
|
+
Xt(null), en(void 0), nn(!1);
|
|
4157
4222
|
}, 300);
|
|
4158
|
-
}, []),
|
|
4159
|
-
if (
|
|
4160
|
-
if (
|
|
4161
|
-
let { credentials: e, ...t } =
|
|
4223
|
+
}, []), pn = R(() => {
|
|
4224
|
+
if (Yt == null) return null;
|
|
4225
|
+
if ($t == null) return Yt;
|
|
4226
|
+
let { credentials: e, ...t } = $t;
|
|
4162
4227
|
return {
|
|
4163
|
-
...
|
|
4228
|
+
...Yt,
|
|
4164
4229
|
details: t,
|
|
4165
|
-
credentials: e ??
|
|
4230
|
+
credentials: e ?? Yt.credentials
|
|
4166
4231
|
};
|
|
4167
|
-
}, [
|
|
4232
|
+
}, [Yt, $t]), mn = R(() => l(Mt, Et), [Mt, Et]), hn = R(() => d(mn, mt), [mn, mt]), gn = R(() => Dt.size > 0 ? m(hn, Dt) : hn, [hn, Dt]), _n = R(() => Ot ? _(gn) : gn, [gn, Ot]), vn = R(() => Q ? _n.filter((e) => e.type === Q) : _n, [_n, Q]);
|
|
4168
4233
|
I(() => {
|
|
4169
|
-
if (
|
|
4234
|
+
if (vt !== "unmounted" || G || vn.length === 0) return;
|
|
4170
4235
|
let e = () => {
|
|
4171
4236
|
de(() => {
|
|
4172
|
-
|
|
4237
|
+
yt((e) => e === "unmounted" ? "prepared" : e);
|
|
4173
4238
|
});
|
|
4174
4239
|
};
|
|
4175
4240
|
if (typeof window.requestIdleCallback == "function") {
|
|
@@ -4179,200 +4244,208 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4179
4244
|
let t = window.setTimeout(e, 200);
|
|
4180
4245
|
return () => window.clearTimeout(t);
|
|
4181
4246
|
}, [
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4247
|
+
vt,
|
|
4248
|
+
G,
|
|
4249
|
+
vn.length
|
|
4185
4250
|
]);
|
|
4186
|
-
let
|
|
4251
|
+
let yn = Yt != null && Nt.some((e) => e.id === Yt.id);
|
|
4187
4252
|
I(() => {
|
|
4188
|
-
if (
|
|
4189
|
-
let e = requestAnimationFrame(() =>
|
|
4253
|
+
if (Yt == null) return;
|
|
4254
|
+
let e = requestAnimationFrame(() => Qt(!0));
|
|
4190
4255
|
return () => cancelAnimationFrame(e);
|
|
4191
|
-
}, [
|
|
4192
|
-
let
|
|
4193
|
-
e === It.Cards &&
|
|
4194
|
-
}, []),
|
|
4195
|
-
copyCodeAriaLabel:
|
|
4196
|
-
copiedCodeStatusLabel:
|
|
4197
|
-
downloadCodeAriaLabel:
|
|
4198
|
-
tableScrollRegionAriaLabel:
|
|
4199
|
-
mathScrollRegionAriaLabel:
|
|
4256
|
+
}, [Yt]);
|
|
4257
|
+
let bn = F((e) => {
|
|
4258
|
+
e === It.Cards && yt("shown"), _t(e);
|
|
4259
|
+
}, []), xn = !ke && !je, Sn = xn && $e, Cn = xn && !$e, wn = Ht && !je, En = mt !== "" || Dt.size > 0, Dn = En ? at(mt) : a?.emptyTitle ?? "No items yet", On = En ? a?.noResultsDescription ?? "Try a different search term or check your filters." : a?.emptyDescription, { copyCodeAriaLabel: kn, copiedCodeStatusLabel: An, downloadCodeAriaLabel: jn, tableScrollRegionAriaLabel: Mn, mathScrollRegionAriaLabel: Nn } = q ?? {}, Pn = R(() => Gt({
|
|
4260
|
+
copyCodeAriaLabel: kn,
|
|
4261
|
+
copiedCodeStatusLabel: An,
|
|
4262
|
+
downloadCodeAriaLabel: jn,
|
|
4263
|
+
tableScrollRegionAriaLabel: Mn,
|
|
4264
|
+
mathScrollRegionAriaLabel: Nn
|
|
4200
4265
|
}), [
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
]),
|
|
4207
|
-
noResultsTitle:
|
|
4208
|
-
noResultsDescription:
|
|
4209
|
-
featuredLabel:
|
|
4266
|
+
kn,
|
|
4267
|
+
An,
|
|
4268
|
+
jn,
|
|
4269
|
+
Mn,
|
|
4270
|
+
Nn
|
|
4271
|
+
]), Fn = R(() => ({
|
|
4272
|
+
noResultsTitle: Dn,
|
|
4273
|
+
noResultsDescription: On,
|
|
4274
|
+
featuredLabel: ct,
|
|
4210
4275
|
noFolderLabel: a?.noFolderLabel,
|
|
4211
|
-
credentialsBadgeLoggedOutLabel:
|
|
4276
|
+
credentialsBadgeLoggedOutLabel: q?.credentialsBadgeLoggedOutLabel
|
|
4212
4277
|
}), [
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4278
|
+
Dn,
|
|
4279
|
+
On,
|
|
4280
|
+
ct,
|
|
4216
4281
|
a?.noFolderLabel,
|
|
4217
|
-
|
|
4218
|
-
]),
|
|
4219
|
-
query:
|
|
4220
|
-
activeTab:
|
|
4221
|
-
hasTopicFilters:
|
|
4222
|
-
isMyAppsActive:
|
|
4223
|
-
}) : void 0,
|
|
4224
|
-
label:
|
|
4225
|
-
options:
|
|
4226
|
-
onClick:
|
|
4227
|
-
search:
|
|
4282
|
+
q?.credentialsBadgeLoggedOutLabel
|
|
4283
|
+
]), In = !G && vn.length === 0, Ln = In ? Ke?.({
|
|
4284
|
+
query: mt,
|
|
4285
|
+
activeTab: Q,
|
|
4286
|
+
hasTopicFilters: Dt.size > 0,
|
|
4287
|
+
isMyAppsActive: Ot
|
|
4288
|
+
}) : void 0, Rn = In && Ot && !mt && Dt.size === 0 && (Oe == null || Oe[Q] != null), zn = {
|
|
4289
|
+
label: tt,
|
|
4290
|
+
options: Ee,
|
|
4291
|
+
onClick: Te,
|
|
4292
|
+
search: De,
|
|
4228
4293
|
searchPlaceholder: a?.createSearchPlaceholder,
|
|
4229
4294
|
searchClearLabel: a?.createSearchClearLabel,
|
|
4230
4295
|
noResultsLabel: a?.createNoResultsLabel,
|
|
4231
4296
|
backLabel: a?.createMenuBackLabel,
|
|
4232
4297
|
closeLabel: a?.createMenuCloseLabel,
|
|
4233
|
-
colors:
|
|
4234
|
-
sectionHeaderClassName:
|
|
4235
|
-
},
|
|
4236
|
-
...
|
|
4237
|
-
...
|
|
4298
|
+
colors: K?.colors?.createMenu,
|
|
4299
|
+
sectionHeaderClassName: Ye?.createMenuSectionHeaderClassName
|
|
4300
|
+
}, Bn = Oe ? Wt(Oe[Q]) : zn, Vn = xn && Bn != null ? {
|
|
4301
|
+
...zn,
|
|
4302
|
+
...Bn
|
|
4238
4303
|
} : void 0;
|
|
4239
|
-
return
|
|
4304
|
+
return G ? /* @__PURE__ */ J("div", {
|
|
4240
4305
|
className: "flex size-full min-h-0 flex-1 items-center justify-center",
|
|
4241
|
-
children: /* @__PURE__ */ J(
|
|
4306
|
+
children: /* @__PURE__ */ J(qe, {})
|
|
4242
4307
|
}) : /* @__PURE__ */ Y("section", {
|
|
4243
|
-
"aria-label":
|
|
4244
|
-
className: P("flex size-full min-h-0 flex-1 flex-col",
|
|
4245
|
-
style:
|
|
4308
|
+
"aria-label": ft,
|
|
4309
|
+
className: P("relative flex size-full min-h-0 flex-1 flex-col", qi.root, Vt.root),
|
|
4310
|
+
style: Ze,
|
|
4246
4311
|
children: [
|
|
4247
|
-
(!
|
|
4248
|
-
className: P("shrink-0",
|
|
4312
|
+
(!Ae || Cn) && /* @__PURE__ */ J("div", {
|
|
4313
|
+
className: P("shrink-0", qi.heading),
|
|
4249
4314
|
children: /* @__PURE__ */ Y("div", {
|
|
4250
|
-
className: P("flex w-full items-center justify-between px-4 desktop:px-8",
|
|
4251
|
-
children: [!
|
|
4252
|
-
className: P(
|
|
4253
|
-
children:
|
|
4254
|
-
}),
|
|
4315
|
+
className: P("flex w-full items-center justify-between px-4 desktop:px-8", Xe),
|
|
4316
|
+
children: [!Ae && /* @__PURE__ */ J("h1", {
|
|
4317
|
+
className: P(Ye?.pageHeadingFontClassName ?? "dial-display2-text", qi.headingTitle),
|
|
4318
|
+
children: et
|
|
4319
|
+
}), Cn && /* @__PURE__ */ J(Pi, { ...zn })]
|
|
4320
|
+
})
|
|
4321
|
+
}),
|
|
4322
|
+
Sn && /* @__PURE__ */ J("div", {
|
|
4323
|
+
className: "absolute inset-e-4 bottom-4 z-10",
|
|
4324
|
+
children: /* @__PURE__ */ J(Pi, {
|
|
4325
|
+
...zn,
|
|
4326
|
+
isFloating: !0
|
|
4255
4327
|
})
|
|
4256
4328
|
}),
|
|
4257
4329
|
/* @__PURE__ */ Y("div", {
|
|
4258
|
-
className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden overflow-y-auto",
|
|
4330
|
+
className: P("flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden overflow-y-auto", Sn && "pb-16"),
|
|
4259
4331
|
children: [
|
|
4260
|
-
|
|
4332
|
+
wn && /* @__PURE__ */ J("div", {
|
|
4261
4333
|
className: "w-full px-4 desktop:px-8",
|
|
4262
|
-
children: /* @__PURE__ */ J(
|
|
4263
|
-
items:
|
|
4264
|
-
totalCount:
|
|
4265
|
-
title:
|
|
4334
|
+
children: /* @__PURE__ */ J(ii, {
|
|
4335
|
+
items: Nt,
|
|
4336
|
+
totalCount: Nt.length,
|
|
4337
|
+
title: nt,
|
|
4266
4338
|
onToggleFavorite: u,
|
|
4267
4339
|
isFavoriteVisible: f,
|
|
4268
|
-
onItemClick:
|
|
4269
|
-
isLeaving:
|
|
4270
|
-
onExitComplete:
|
|
4271
|
-
selectedItemId:
|
|
4272
|
-
credentialsBadgeLoggedOutLabel:
|
|
4340
|
+
onItemClick: Fe ?? sn,
|
|
4341
|
+
isLeaving: Jt,
|
|
4342
|
+
onExitComplete: qt,
|
|
4343
|
+
selectedItemId: Pe,
|
|
4344
|
+
credentialsBadgeLoggedOutLabel: q?.credentialsBadgeLoggedOutLabel,
|
|
4345
|
+
isPaginationHidden: Ne
|
|
4273
4346
|
})
|
|
4274
4347
|
}),
|
|
4275
4348
|
/* @__PURE__ */ J("div", {
|
|
4276
4349
|
className: "w-full pt-6 desktop:px-4",
|
|
4277
|
-
children: /* @__PURE__ */ J(
|
|
4278
|
-
totalCount:
|
|
4279
|
-
viewMode:
|
|
4280
|
-
onViewModeChange:
|
|
4281
|
-
sortKey:
|
|
4282
|
-
query:
|
|
4283
|
-
onQueryChange:
|
|
4284
|
-
title:
|
|
4350
|
+
children: /* @__PURE__ */ J(Ki, {
|
|
4351
|
+
totalCount: _n.length,
|
|
4352
|
+
viewMode: gt,
|
|
4353
|
+
onViewModeChange: bn,
|
|
4354
|
+
sortKey: Et,
|
|
4355
|
+
query: mt,
|
|
4356
|
+
onQueryChange: ht,
|
|
4357
|
+
title: rt,
|
|
4285
4358
|
browseHeaderRenderer: s,
|
|
4286
|
-
searchPlaceholder:
|
|
4287
|
-
gridViewLabel:
|
|
4288
|
-
listViewLabel:
|
|
4289
|
-
viewToggleLabel:
|
|
4290
|
-
sortOptions:
|
|
4291
|
-
onSortChange:
|
|
4292
|
-
sortLabel:
|
|
4293
|
-
filters:
|
|
4294
|
-
onFiltersChange:
|
|
4295
|
-
filterValues:
|
|
4296
|
-
isMyAppsActive:
|
|
4297
|
-
onMyAppsChange:
|
|
4359
|
+
searchPlaceholder: it,
|
|
4360
|
+
gridViewLabel: lt,
|
|
4361
|
+
listViewLabel: ut,
|
|
4362
|
+
viewToggleLabel: dt,
|
|
4363
|
+
sortOptions: pt,
|
|
4364
|
+
onSortChange: kt,
|
|
4365
|
+
sortLabel: X,
|
|
4366
|
+
filters: Dt,
|
|
4367
|
+
onFiltersChange: At,
|
|
4368
|
+
filterValues: Pt,
|
|
4369
|
+
isMyAppsActive: Ot,
|
|
4370
|
+
onMyAppsChange: jt,
|
|
4298
4371
|
filterFromLabel: a?.filterFromLabel,
|
|
4299
4372
|
filterMyAppsLabel: a?.filterMyAppsLabel,
|
|
4300
4373
|
filterTopicsLabel: a?.filterTopicsLabel,
|
|
4301
4374
|
browseSettingsLabels: a?.browseSettings
|
|
4302
4375
|
})
|
|
4303
4376
|
}),
|
|
4304
|
-
|
|
4305
|
-
ref:
|
|
4377
|
+
Z.length > 1 && /* @__PURE__ */ J("div", {
|
|
4378
|
+
ref: zt,
|
|
4306
4379
|
className: "mx-4 min-w-0 shrink-0 scrollbar-none overflow-x-auto desktop:mx-8",
|
|
4307
|
-
children: /* @__PURE__ */ J(
|
|
4380
|
+
children: /* @__PURE__ */ J(Je, {
|
|
4308
4381
|
tabListClassName: "w-max min-w-full",
|
|
4309
4382
|
tabClassName: "shrink-0 whitespace-nowrap",
|
|
4310
|
-
tabs:
|
|
4383
|
+
tabs: Z.map((e) => ({
|
|
4311
4384
|
id: e.id,
|
|
4312
4385
|
label: typeof e.label == "string" ? e.label : String(e.label),
|
|
4313
|
-
count:
|
|
4386
|
+
count: _n.filter((t) => t.type === e.id).length
|
|
4314
4387
|
})),
|
|
4315
|
-
activeTabId:
|
|
4316
|
-
onTabChange:
|
|
4388
|
+
activeTabId: Q,
|
|
4389
|
+
onTabChange: Bt
|
|
4317
4390
|
})
|
|
4318
4391
|
}),
|
|
4319
4392
|
/* @__PURE__ */ Y("div", {
|
|
4320
|
-
className: P(
|
|
4393
|
+
className: P(vn.length > 0 ? ["w-full flex-1 px-4 py-6 desktop:px-8", !W && "mx-auto max-w-[1180px]"] : "min-h-[180px] flex-1", vn.length === 0 && "px-4 py-6 desktop:px-8"),
|
|
4321
4394
|
children: [
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
title:
|
|
4325
|
-
description:
|
|
4326
|
-
createButton:
|
|
4395
|
+
Ln != null && Ln,
|
|
4396
|
+
Ln == null && Rn && /* @__PURE__ */ J(Fi, {
|
|
4397
|
+
title: ot(Q),
|
|
4398
|
+
description: st,
|
|
4399
|
+
createButton: Vn
|
|
4327
4400
|
}),
|
|
4328
|
-
|
|
4329
|
-
inert:
|
|
4330
|
-
className: P(
|
|
4401
|
+
Ln == null && !Rn && /* @__PURE__ */ Y(Qe, { children: [/* @__PURE__ */ J("div", {
|
|
4402
|
+
inert: gt !== It.Grid,
|
|
4403
|
+
className: P(vn.length > 0 ? "pb-8" : "size-full flex-1", gt !== It.Grid && "hidden"),
|
|
4331
4404
|
children: /* @__PURE__ */ J(Tn, {
|
|
4332
|
-
items:
|
|
4333
|
-
query:
|
|
4405
|
+
items: vn,
|
|
4406
|
+
query: mt,
|
|
4334
4407
|
onToggleFavorite: u,
|
|
4335
4408
|
isFavoriteVisible: f,
|
|
4336
|
-
onItemClick:
|
|
4337
|
-
titles:
|
|
4338
|
-
selectedItemId:
|
|
4339
|
-
isReadonly:
|
|
4340
|
-
isFullWidth:
|
|
4341
|
-
featuredChipStyle:
|
|
4342
|
-
markdownLabels:
|
|
4409
|
+
onItemClick: Fe ?? sn,
|
|
4410
|
+
titles: Fn,
|
|
4411
|
+
selectedItemId: Pe,
|
|
4412
|
+
isReadonly: je,
|
|
4413
|
+
isFullWidth: W,
|
|
4414
|
+
featuredChipStyle: K?.colors?.featuredChipStyle,
|
|
4415
|
+
markdownLabels: Pn
|
|
4343
4416
|
})
|
|
4344
|
-
}),
|
|
4345
|
-
inert:
|
|
4346
|
-
className: P("pb-8",
|
|
4347
|
-
children: /* @__PURE__ */ J(
|
|
4348
|
-
type:
|
|
4349
|
-
items:
|
|
4350
|
-
query:
|
|
4351
|
-
ariaLabel:
|
|
4352
|
-
emptyStateTitle:
|
|
4353
|
-
emptyStateDescription:
|
|
4417
|
+
}), vt !== "unmounted" && /* @__PURE__ */ J("div", {
|
|
4418
|
+
inert: gt !== It.Cards,
|
|
4419
|
+
className: P("pb-8", gt !== It.Cards && (vt === "prepared" ? "invisible h-0 overflow-hidden p-0" : "hidden"), vn.length === 0 && gt === It.Cards && "h-full"),
|
|
4420
|
+
children: /* @__PURE__ */ J(ki, {
|
|
4421
|
+
type: Q,
|
|
4422
|
+
items: vn,
|
|
4423
|
+
query: mt,
|
|
4424
|
+
ariaLabel: ft,
|
|
4425
|
+
emptyStateTitle: Dn,
|
|
4426
|
+
emptyStateDescription: On,
|
|
4354
4427
|
onToggleFavorite: u,
|
|
4355
4428
|
isFavoriteVisible: f,
|
|
4356
4429
|
columnVisibility: p,
|
|
4357
|
-
onItemClick:
|
|
4430
|
+
onItemClick: Fe ?? sn,
|
|
4358
4431
|
stickyHeaderTop: 0,
|
|
4359
|
-
selectedItemId:
|
|
4360
|
-
credentialsBadgeLoggedOutLabel:
|
|
4361
|
-
isReadonly:
|
|
4432
|
+
selectedItemId: Pe,
|
|
4433
|
+
credentialsBadgeLoggedOutLabel: q?.credentialsBadgeLoggedOutLabel,
|
|
4434
|
+
isReadonly: je
|
|
4362
4435
|
})
|
|
4363
4436
|
})] })
|
|
4364
4437
|
]
|
|
4365
4438
|
})
|
|
4366
4439
|
]
|
|
4367
4440
|
}),
|
|
4368
|
-
|
|
4369
|
-
renderCredentials:
|
|
4370
|
-
item:
|
|
4371
|
-
isOpen:
|
|
4372
|
-
isStarred:
|
|
4373
|
-
isDetailsLoading:
|
|
4374
|
-
isReadonly:
|
|
4375
|
-
onClose:
|
|
4441
|
+
pn != null && /* @__PURE__ */ J(Xr, {
|
|
4442
|
+
renderCredentials: le,
|
|
4443
|
+
item: pn,
|
|
4444
|
+
isOpen: Zt,
|
|
4445
|
+
isStarred: yn,
|
|
4446
|
+
isDetailsLoading: tn,
|
|
4447
|
+
isReadonly: je,
|
|
4448
|
+
onClose: fn,
|
|
4376
4449
|
onToggleFavorite: u,
|
|
4377
4450
|
isFavoriteVisible: f,
|
|
4378
4451
|
onUseInChat: h,
|
|
@@ -4397,31 +4470,31 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4397
4470
|
shareOverlay: ie,
|
|
4398
4471
|
isShareVisible: ae,
|
|
4399
4472
|
isSharePrimary: oe,
|
|
4400
|
-
onEdit:
|
|
4401
|
-
onDownload:
|
|
4402
|
-
isDownloadVisible:
|
|
4403
|
-
isDownloadPrimary:
|
|
4404
|
-
onLoadContentFile:
|
|
4405
|
-
onLoadContentFilePreview:
|
|
4406
|
-
renderContentFilePreview:
|
|
4407
|
-
renderContentFileTree:
|
|
4408
|
-
onDelete:
|
|
4409
|
-
onUnshare:
|
|
4410
|
-
isUnshareVisible:
|
|
4411
|
-
onRevokeShare:
|
|
4412
|
-
onFetchRecipientsCount:
|
|
4413
|
-
isRevokeShareVisible:
|
|
4414
|
-
onUnpublish:
|
|
4415
|
-
isUnpublishVisible:
|
|
4416
|
-
onLogin:
|
|
4417
|
-
onLogout:
|
|
4418
|
-
texts:
|
|
4473
|
+
onEdit: ue,
|
|
4474
|
+
onDownload: fe,
|
|
4475
|
+
isDownloadVisible: pe,
|
|
4476
|
+
isDownloadPrimary: L,
|
|
4477
|
+
onLoadContentFile: me,
|
|
4478
|
+
onLoadContentFilePreview: he,
|
|
4479
|
+
renderContentFilePreview: ge,
|
|
4480
|
+
renderContentFileTree: _e,
|
|
4481
|
+
onDelete: ve,
|
|
4482
|
+
onUnshare: ye,
|
|
4483
|
+
isUnshareVisible: be,
|
|
4484
|
+
onRevokeShare: xe,
|
|
4485
|
+
onFetchRecipientsCount: Se,
|
|
4486
|
+
isRevokeShareVisible: Ce,
|
|
4487
|
+
onUnpublish: V,
|
|
4488
|
+
isUnpublishVisible: H,
|
|
4489
|
+
onLogin: un,
|
|
4490
|
+
onLogout: dn,
|
|
4491
|
+
texts: q,
|
|
4419
4492
|
limitsFooterNote: Ie,
|
|
4420
|
-
styles: { colors: { featuredChipStyle:
|
|
4493
|
+
styles: { colors: { featuredChipStyle: K?.colors?.featuredChipStyle } }
|
|
4421
4494
|
})
|
|
4422
4495
|
]
|
|
4423
4496
|
});
|
|
4424
|
-
},
|
|
4497
|
+
}, Zi = ({ selectedId: e, records: t, selectedLabel: n, placeholder: r, labels: i, onSelect: a, onBrowse: o, extraOptions: s = [], isLoading: c = !1, error: l, isDisabled: u = !1, isInvalid: d = !1, labelledById: f, ariaHasPopup: p = "listbox", className: m, panelClassName: h, iconAfter: g, renderPanel: _, open: v, onOpenChange: y, renderOverlay: b }) => {
|
|
4425
4498
|
let [x, S] = B(!1), C = v ?? x, w = (e) => {
|
|
4426
4499
|
e && u || (v === void 0 && S(e), y?.(e));
|
|
4427
4500
|
}, [T, E] = B(""), D = z(null), O = R(() => [...s, ...t].filter((e) => e.label.toLocaleLowerCase().includes(T.toLocaleLowerCase())), [
|
|
@@ -4435,7 +4508,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4435
4508
|
}, j = _ ? _(k) : /* @__PURE__ */ Y("div", {
|
|
4436
4509
|
className: P("w-full max-w-full min-w-0 p-3", h),
|
|
4437
4510
|
children: [
|
|
4438
|
-
/* @__PURE__ */ J(
|
|
4511
|
+
/* @__PURE__ */ J(He, {
|
|
4439
4512
|
value: T,
|
|
4440
4513
|
onChange: (e) => E(e ?? ""),
|
|
4441
4514
|
placeholder: i.searchPlaceholder,
|
|
@@ -4453,7 +4526,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4453
4526
|
}) : O.length === 0 ? /* @__PURE__ */ J("span", {
|
|
4454
4527
|
role: "status",
|
|
4455
4528
|
children: i.emptyLabel
|
|
4456
|
-
}) : O.map((t) => /* @__PURE__ */ J(
|
|
4529
|
+
}) : O.map((t) => /* @__PURE__ */ J(K, {
|
|
4457
4530
|
role: "option",
|
|
4458
4531
|
"aria-selected": t.id === e,
|
|
4459
4532
|
selected: t.id === e,
|
|
@@ -4504,7 +4577,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4504
4577
|
className: "cursor-pointer",
|
|
4505
4578
|
iconAfter: g
|
|
4506
4579
|
});
|
|
4507
|
-
return b ? /* @__PURE__ */ Y(
|
|
4580
|
+
return b ? /* @__PURE__ */ Y(Qe, { children: [/* @__PURE__ */ J("div", {
|
|
4508
4581
|
className: "w-full min-w-0",
|
|
4509
4582
|
onClick: () => w(!C),
|
|
4510
4583
|
children: M
|
|
@@ -4517,7 +4590,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4517
4590
|
renderOverlay: () => j,
|
|
4518
4591
|
children: M
|
|
4519
4592
|
});
|
|
4520
|
-
},
|
|
4593
|
+
}, Qi = ({ service: e, texts: n, onLogin: r, onLogout: i }) => {
|
|
4521
4594
|
let [a, o] = B(!1), [s, c] = B(!1), [l, u] = B(!1), [d, f] = B(), p = e.authenticationType === t.ApiKey, m = p ? n?.deleteActionLabel ?? "Delete" : n?.logoutActionLabel ?? "Log out", h = p ? n?.deleteApiKeyConfirmMessage?.(C.User) ?? "Are you sure you want to delete your personal API key?" : n?.logoutConfirmMessage ?? "Are you sure you want to log out?";
|
|
4522
4595
|
return /* @__PURE__ */ Y(Xn, {
|
|
4523
4596
|
label: e.name,
|
|
@@ -4576,7 +4649,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4576
4649
|
}),
|
|
4577
4650
|
/* @__PURE__ */ Y("div", {
|
|
4578
4651
|
className: "flex flex-wrap justify-end gap-2",
|
|
4579
|
-
children: [/* @__PURE__ */ J(
|
|
4652
|
+
children: [/* @__PURE__ */ J(Ie, {
|
|
4580
4653
|
className: "min-h-11",
|
|
4581
4654
|
label: n?.cancelLabel ?? "Cancel",
|
|
4582
4655
|
disabled: l,
|
|
@@ -4605,7 +4678,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4605
4678
|
})
|
|
4606
4679
|
]
|
|
4607
4680
|
});
|
|
4608
|
-
},
|
|
4681
|
+
}, $i = ({ services: e, isLoading: t = !1, hasError: n = !1, showEmptyState: r = !1, onRetry: i, onLogin: a, onLogout: o, texts: s }) => t && !e.length ? /* @__PURE__ */ J("p", {
|
|
4609
4682
|
role: "status",
|
|
4610
4683
|
className: "px-6 py-3",
|
|
4611
4684
|
children: s?.loading ?? "Loading…"
|
|
@@ -4614,7 +4687,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4614
4687
|
children: [/* @__PURE__ */ J("p", {
|
|
4615
4688
|
role: "alert",
|
|
4616
4689
|
children: s?.loadError ?? "Unable to load credentials"
|
|
4617
|
-
}), /* @__PURE__ */ J(
|
|
4690
|
+
}), /* @__PURE__ */ J(Ie, {
|
|
4618
4691
|
className: "min-h-11 self-start",
|
|
4619
4692
|
label: s?.retry ?? "Retry",
|
|
4620
4693
|
onClick: i
|
|
@@ -4627,7 +4700,7 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4627
4700
|
children: s?.title ?? "Credentials"
|
|
4628
4701
|
}), /* @__PURE__ */ J("div", {
|
|
4629
4702
|
className: "flex min-w-0 flex-col",
|
|
4630
|
-
children: e.map((e) => /* @__PURE__ */ J(
|
|
4703
|
+
children: e.map((e) => /* @__PURE__ */ J(Qi, {
|
|
4631
4704
|
service: e,
|
|
4632
4705
|
texts: s,
|
|
4633
4706
|
onLogin: a,
|
|
@@ -4640,4 +4713,4 @@ var Mt = /* @__PURE__ */ function(e) {
|
|
|
4640
4713
|
children: s?.empty ?? "No credentials required"
|
|
4641
4714
|
}) : null;
|
|
4642
4715
|
//#endregion
|
|
4643
|
-
export { dr as AboutTab, In as ApiTab,
|
|
4716
|
+
export { dr as AboutTab, In as ApiTab, cn as AppIdentity, $i as ApplicationCredentials, Vt as CATALOG_CLASS, Cn as Card, Tn as CardGrid, wn as CardRowRenderer, Xi as Catalog, Q as CatalogContentNodeType, zt as CatalogContentPreviewType, T as CatalogDetailsTab, Nt as CatalogLimitStatus, Pt as CatalogPricingUnit, Lt as CatalogSelectionMode, o as CatalogSortKey, It as CatalogViewMode, Mt as CodeLanguage, gr as ContentTab, w as CredentialStatus, rr as CredentialsApiKeyOverlay, un as CredentialsBadge, n as CredentialsBadgeState, Jn as CredentialsBanner, e as CredentialsBannerState, C as CredentialsLevel, Qn as CredentialsManagementPanel, r as CredentialsUiState, Zi as DeploymentSelectorField, Ft as DeploymentSize, Z as DetailsConfirmationKind, ur as DetailsHeader, Xr as DetailsPanel, ti as FavoriteCard, ii as Favorites, zi as Filter, Rt as LimitRowLayout, Or as LimitsTab, ki as ListView, kr as OverviewTab, Ar as PricingTab, Ki as Toolbar, Lr as ToolsTab, t as ToolsetAuthenticationType, hn as TopicTag, x as buildCatalogTabs, d as filterCatalogItems, s as getCatalogDetailsTabs, h as getCredentialsBadgeState, v as getCredentialsBannerState, f as getCredentialsUiState, a as getSignedInLevel, i as getTopicOptions, l as sortCatalogItems, Bt as useFavColumns, en as useScrollVirtualizer };
|