@camstack/addon-model-studio 1.1.327 → 1.1.328
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/CHANGELOG.md +6 -0
- package/dist/_stub.js +339 -339
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BP5KTsDn.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DBwBRZfG.mjs} +3 -3
- package/dist/{hostInit-DZPtjh_2.mjs → hostInit-B4ki_WkK.mjs} +2 -2
- package/dist/model-studio.addon.js +8 -0
- package/dist/model-studio.addon.mjs +8 -0
- package/dist/remoteEntry.js +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DXGb6Oaj.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-Ct9GIyeI.mjs} +1 -1
- package/package.json +1 -1
package/dist/_stub.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./virtualExposes-CWSi4E_g.mjs";
|
|
2
|
-
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-
|
|
2
|
+
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-Ct9GIyeI.mjs";
|
|
3
3
|
import { S as e, _ as t, a as n, b as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, p as f, r as p, t as m, u as h, v as g, y as _ } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DMBKVIH7.mjs";
|
|
4
4
|
import { n as v, r as y, t as b } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
|
|
5
5
|
import { n as x, r as S, t as C } from "./ui-text-BqZa5BNK.mjs";
|
|
@@ -30770,13 +30770,23 @@ var $y = r.forwardRef(function(e, t) {
|
|
|
30770
30770
|
}), x);
|
|
30771
30771
|
});
|
|
30772
30772
|
//#endregion
|
|
30773
|
+
//#region ../ui-library/src/hooks/use-debounced-string.ts
|
|
30774
|
+
$y.displayName = "QRCodeSVG", e(), nt("camstack:broker-picker-slot", null), e();
|
|
30775
|
+
function eb(e, t) {
|
|
30776
|
+
let [n, r] = g(e);
|
|
30777
|
+
return i(() => {
|
|
30778
|
+
let n = setTimeout(() => r(e), t);
|
|
30779
|
+
return () => clearTimeout(n);
|
|
30780
|
+
}, [e, t]), n;
|
|
30781
|
+
}
|
|
30782
|
+
//#endregion
|
|
30773
30783
|
//#region ../ui-library/src/composites/addon-global-settings-form.tsx
|
|
30774
|
-
|
|
30784
|
+
e(), e(), e(), e();
|
|
30775
30785
|
//#endregion
|
|
30776
30786
|
//#region ../ui-library/src/composites/accelerator-label.ts
|
|
30777
|
-
var
|
|
30778
|
-
function
|
|
30779
|
-
let t =
|
|
30787
|
+
var tb = /^(usb|pci)(?::(\d+))?$/;
|
|
30788
|
+
function nb(e) {
|
|
30789
|
+
let t = tb.exec(e);
|
|
30780
30790
|
if (t === null || t[1] === "usb" && t[2] === void 0) return {
|
|
30781
30791
|
label: "Coral Edge TPU",
|
|
30782
30792
|
short: "Coral"
|
|
@@ -30787,7 +30797,7 @@ function tb(e) {
|
|
|
30787
30797
|
short: `Coral ${r}`
|
|
30788
30798
|
};
|
|
30789
30799
|
}
|
|
30790
|
-
function
|
|
30800
|
+
function rb(e) {
|
|
30791
30801
|
let t = e.backend.toLowerCase(), n = e.device.toLowerCase();
|
|
30792
30802
|
if (e.key === "cpu" || n === "cpu" || t === "cpu") return {
|
|
30793
30803
|
label: "CPU",
|
|
@@ -30801,7 +30811,7 @@ function nb(e) {
|
|
|
30801
30811
|
label: "Intel iGPU",
|
|
30802
30812
|
short: "iGPU"
|
|
30803
30813
|
};
|
|
30804
|
-
if (t === "edgetpu") return
|
|
30814
|
+
if (t === "edgetpu") return nb(n);
|
|
30805
30815
|
if (t === "coreml") return {
|
|
30806
30816
|
label: "Apple Neural Engine",
|
|
30807
30817
|
short: "ANE"
|
|
@@ -30812,15 +30822,15 @@ function nb(e) {
|
|
|
30812
30822
|
short: e.backend || e.key
|
|
30813
30823
|
};
|
|
30814
30824
|
}
|
|
30815
|
-
function rb(e) {
|
|
30816
|
-
return nb(e).label;
|
|
30817
|
-
}
|
|
30818
30825
|
function ib(e) {
|
|
30819
|
-
return
|
|
30826
|
+
return rb(e).label;
|
|
30827
|
+
}
|
|
30828
|
+
function ab(e) {
|
|
30829
|
+
return rb(e).short;
|
|
30820
30830
|
}
|
|
30821
30831
|
//#endregion
|
|
30822
30832
|
//#region ../ui-library/src/composites/grouped-model-selector.tsx
|
|
30823
|
-
function
|
|
30833
|
+
function ob({ active: e, onClick: t, disabled: n, children: r, title: i }) {
|
|
30824
30834
|
return /* @__PURE__ */ v("button", {
|
|
30825
30835
|
type: "button",
|
|
30826
30836
|
onClick: t,
|
|
@@ -30830,7 +30840,7 @@ function ab({ active: e, onClick: t, disabled: n, children: r, title: i }) {
|
|
|
30830
30840
|
children: r
|
|
30831
30841
|
});
|
|
30832
30842
|
}
|
|
30833
|
-
function
|
|
30843
|
+
function sb({ catalog: e, value: t, onChange: n, disabled: r }) {
|
|
30834
30844
|
let i = S(), a = Pe(e), o = te(e, t), s = a.find((e) => e.family === o?.family)?.family ?? a[0]?.family ?? "", c = a.find((e) => e.family === s) ?? a[0];
|
|
30835
30845
|
if (!c) return null;
|
|
30836
30846
|
let l = c.tiers.find((e) => e.tier === o?.tier)?.tier ?? c.tiers[0]?.tier ?? "", u = c.tiers.find((e) => e.tier === l) ?? c.tiers[0];
|
|
@@ -30861,7 +30871,7 @@ function ob({ catalog: e, value: t, onChange: n, disabled: r }) {
|
|
|
30861
30871
|
}),
|
|
30862
30872
|
/* @__PURE__ */ v("div", {
|
|
30863
30873
|
className: "flex flex-wrap gap-1.5",
|
|
30864
|
-
children: a.map((e) => /* @__PURE__ */ v(
|
|
30874
|
+
children: a.map((e) => /* @__PURE__ */ v(ob, {
|
|
30865
30875
|
active: e.family === c.family,
|
|
30866
30876
|
disabled: r,
|
|
30867
30877
|
...e.hint === void 0 ? {} : { title: e.hint },
|
|
@@ -30909,7 +30919,7 @@ function ob({ catalog: e, value: t, onChange: n, disabled: r }) {
|
|
|
30909
30919
|
children: i("uiLibrary.groupedModelSelector.resolution", "Resolution")
|
|
30910
30920
|
}), /* @__PURE__ */ v("div", {
|
|
30911
30921
|
className: "flex flex-wrap gap-1.5",
|
|
30912
|
-
children: d.map((e) => /* @__PURE__ */ v(
|
|
30922
|
+
children: d.map((e) => /* @__PURE__ */ v(ob, {
|
|
30913
30923
|
active: e === f,
|
|
30914
30924
|
disabled: r,
|
|
30915
30925
|
title: e === void 0 ? i("uiLibrary.groupedModelSelector.nativeTitle", "native (best accuracy)") : i("uiLibrary.groupedModelSelector.fasterTitle", "{{size}}×{{size}} (faster)", { size: e }),
|
|
@@ -30922,7 +30932,7 @@ function ob({ catalog: e, value: t, onChange: n, disabled: r }) {
|
|
|
30922
30932
|
children: i("uiLibrary.groupedModelSelector.variant", "Variant")
|
|
30923
30933
|
}), /* @__PURE__ */ v("div", {
|
|
30924
30934
|
className: "flex flex-wrap gap-1.5",
|
|
30925
|
-
children: p.map((e) => /* @__PURE__ */ v(
|
|
30935
|
+
children: p.map((e) => /* @__PURE__ */ v(ob, {
|
|
30926
30936
|
active: e.modelId === t,
|
|
30927
30937
|
disabled: r,
|
|
30928
30938
|
title: e.sizeMB > 0 ? i("uiLibrary.groupedModelSelector.formatsSize", "{{formats}} · ~{{size}} MB", {
|
|
@@ -30957,26 +30967,26 @@ function ob({ catalog: e, value: t, onChange: n, disabled: r }) {
|
|
|
30957
30967
|
//#endregion
|
|
30958
30968
|
//#region ../ui-library/src/composites/model-picker.tsx
|
|
30959
30969
|
e();
|
|
30960
|
-
var
|
|
30970
|
+
var cb = {
|
|
30961
30971
|
camstack: "CamStack",
|
|
30962
30972
|
frigate: "plus catalog",
|
|
30963
30973
|
scrypted: "plugin catalog",
|
|
30964
30974
|
custom: "Custom"
|
|
30965
30975
|
};
|
|
30966
|
-
function
|
|
30976
|
+
function lb(e) {
|
|
30967
30977
|
return e.provider ?? "camstack";
|
|
30968
30978
|
}
|
|
30969
|
-
function
|
|
30979
|
+
function ub({ models: e, value: t, onChange: n, disabled: r, defaultModelId: a }) {
|
|
30970
30980
|
let s = S(), c = o(() => {
|
|
30971
30981
|
let t = /* @__PURE__ */ new Map();
|
|
30972
30982
|
for (let n of e) {
|
|
30973
|
-
let e =
|
|
30983
|
+
let e = lb(n), r = t.get(e);
|
|
30974
30984
|
r ? r.push(n) : t.set(e, [n]);
|
|
30975
30985
|
}
|
|
30976
30986
|
return t;
|
|
30977
30987
|
}, [e]), l = o(() => Fe.filter((e) => (c.get(e)?.length ?? 0) > 0), [c]), u = o(() => {
|
|
30978
30988
|
let n = e.find((e) => e.id === t);
|
|
30979
|
-
return n ?
|
|
30989
|
+
return n ? lb(n) : void 0;
|
|
30980
30990
|
}, [e, t]) ?? (l.includes("camstack") ? "camstack" : l[0] ?? "camstack"), [d, f] = g(u);
|
|
30981
30991
|
i(() => {
|
|
30982
30992
|
f(u);
|
|
@@ -31015,10 +31025,10 @@ function lb({ models: e, value: t, onChange: n, disabled: r, defaultModelId: a }
|
|
|
31015
31025
|
disabled: r,
|
|
31016
31026
|
onClick: () => f(e),
|
|
31017
31027
|
className: B("rounded-full px-3 py-1 text-[11px] font-medium border transition-colors", e === d ? "border-primary bg-primary/10 text-primary" : "border-border bg-background text-foreground-subtle hover:text-foreground hover:border-foreground-subtle/40", r ? "opacity-50 cursor-not-allowed" : "cursor-pointer"),
|
|
31018
|
-
children:
|
|
31028
|
+
children: cb[e]
|
|
31019
31029
|
}, e))
|
|
31020
31030
|
})] }),
|
|
31021
|
-
b.length > 0 && /* @__PURE__ */ v(
|
|
31031
|
+
b.length > 0 && /* @__PURE__ */ v(sb, {
|
|
31022
31032
|
catalog: b,
|
|
31023
31033
|
value: t,
|
|
31024
31034
|
onChange: n,
|
|
@@ -31047,62 +31057,62 @@ function lb({ models: e, value: t, onChange: n, disabled: r, defaultModelId: a }
|
|
|
31047
31057
|
}
|
|
31048
31058
|
//#endregion
|
|
31049
31059
|
//#region ../ui-library/src/composites/resolve-step-default-model.ts
|
|
31050
|
-
function
|
|
31060
|
+
function db(e, t) {
|
|
31051
31061
|
let n = (n) => e.models.find((e) => e.id === n)?.formats[t] !== void 0, r = e.defaultModelIdByFormat?.[t];
|
|
31052
31062
|
if (r !== void 0 && n(r)) return r;
|
|
31053
31063
|
if (n(e.defaultModelId)) return e.defaultModelId;
|
|
31054
31064
|
let i = e.models.filter((e) => e.formats[t] !== void 0 && e.legacy !== !0);
|
|
31055
31065
|
return i.length === 0 ? e.defaultModelId : [...i].toSorted((e, n) => (e.formats[t]?.sizeMB ?? Infinity) - (n.formats[t]?.sizeMB ?? Infinity))[0].id;
|
|
31056
31066
|
}
|
|
31057
|
-
function
|
|
31067
|
+
function fb(e, t) {
|
|
31058
31068
|
let n = t?.format;
|
|
31059
31069
|
if (n === void 0) return;
|
|
31060
31070
|
let r = t?.defaultModelId;
|
|
31061
|
-
return e.slot === "detector" && r !== void 0 && e.models.some((e) => e.id === r) ? r :
|
|
31071
|
+
return e.slot === "detector" && r !== void 0 && e.models.some((e) => e.id === r) ? r : db(e, n);
|
|
31062
31072
|
}
|
|
31063
|
-
function
|
|
31073
|
+
function pb(e, t) {
|
|
31064
31074
|
return t === void 0 ? [] : e.filter((e) => e.formats[t] !== void 0);
|
|
31065
31075
|
}
|
|
31066
|
-
function
|
|
31067
|
-
return
|
|
31076
|
+
function mb(e, t) {
|
|
31077
|
+
return pb(e, t).length > 0;
|
|
31068
31078
|
}
|
|
31069
|
-
function
|
|
31070
|
-
return e.base ??
|
|
31079
|
+
function hb(e) {
|
|
31080
|
+
return e.base ?? fb(e.catalog, e.device);
|
|
31071
31081
|
}
|
|
31072
31082
|
//#endregion
|
|
31073
31083
|
//#region ../ui-library/src/composites/root-model-source.tsx
|
|
31074
|
-
function
|
|
31084
|
+
function gb(e, t, n) {
|
|
31075
31085
|
return ue(e) ? ie(e, t, n?.supplies) : null;
|
|
31076
31086
|
}
|
|
31077
|
-
function
|
|
31087
|
+
function _b(e, t) {
|
|
31078
31088
|
return {
|
|
31079
31089
|
...e,
|
|
31080
31090
|
[we]: t
|
|
31081
31091
|
};
|
|
31082
31092
|
}
|
|
31083
|
-
function
|
|
31093
|
+
function vb(e, t = x) {
|
|
31084
31094
|
if (e.kind === "label") {
|
|
31085
31095
|
let n = e.uncovered.length > 0 ? [t("uiLibrary.rootModelSource.notProduced", "Not produced by this model: {{classes}}.", { classes: e.uncovered.join(", ") })] : [];
|
|
31086
31096
|
return e.stepId === "package-detection" ? [...n, t("uiLibrary.rootModelSource.packageNote", "The root model's own package boxes become the package result at this step's threshold; this step's zone-crop view is not used, so small parcels the full-frame model misses stay missed.")] : [...n, t("uiLibrary.rootModelSource.labelNote", "This step's class list decides which of the root's labels become the fine class; a switched-off class stays at its macro.")];
|
|
31087
31097
|
}
|
|
31088
31098
|
return e.kind === "mask" ? [t("uiLibrary.rootModelSource.maskNote", "Masks come from the root model: each detection carries the root's own instance mask, so this step's model does not run. A root mask follows the model's mask grid (a quarter of its input), coarser than this step's own per-crop mask.")] : e.stepId === "face-detection" ? [t("uiLibrary.rootModelSource.faceNote", "Face boxes come from the root model. Each is re-found by this step's face detector in a square around it before recognition, so only a face it finds is recognised; a box with no face in it is dropped.")] : [t("uiLibrary.rootModelSource.plateNote", "Plate boxes come from the root model and the plate reader reads them. The crop margin around a root plate box has not been measured for this model yet.")];
|
|
31089
31099
|
}
|
|
31090
|
-
function
|
|
31100
|
+
function yb(e, t, n) {
|
|
31091
31101
|
switch (e.inactiveReason) {
|
|
31092
31102
|
case "root-input-too-small": return n("uiLibrary.rootModelSource.inactiveTooSmall", "the current root model ({{name}}) sees the frame too small to find faces reliably (it needs an input of 640 px or more).", { name: t.name });
|
|
31093
31103
|
case "root-does-not-declare":
|
|
31094
31104
|
case void 0: return n("uiLibrary.rootModelSource.inactiveCannot", "the current root model ({{name}}) cannot supply this.", { name: t.name });
|
|
31095
31105
|
}
|
|
31096
31106
|
}
|
|
31097
|
-
function
|
|
31107
|
+
function bb({ stepId: e, settings: t, rootModel: n, disabled: r, onChange: i }) {
|
|
31098
31108
|
let a = S();
|
|
31099
31109
|
if (n === void 0) return null;
|
|
31100
|
-
let o =
|
|
31110
|
+
let o = gb(e, t, n);
|
|
31101
31111
|
if (o === null) return null;
|
|
31102
31112
|
let s = o.inactive ? /* @__PURE__ */ v("div", {
|
|
31103
31113
|
className: "rounded bg-muted/40 px-3 py-2 text-[11px] text-foreground-subtle",
|
|
31104
31114
|
"data-testid": "root-model-inactive",
|
|
31105
|
-
children: a("uiLibrary.rootModelSource.inactive", "Use the root model: inactive — {{reason}} The step runs its own model.", { reason:
|
|
31115
|
+
children: a("uiLibrary.rootModelSource.inactive", "Use the root model: inactive — {{reason}} The step runs its own model.", { reason: yb(o, n, a) })
|
|
31106
31116
|
}) : null;
|
|
31107
31117
|
if (o.supply === void 0) return s;
|
|
31108
31118
|
let c = o.intent;
|
|
@@ -31120,7 +31130,7 @@ function yb({ stepId: e, settings: t, rootModel: n, disabled: r, onChange: i })
|
|
|
31120
31130
|
}), a("uiLibrary.rootModelSource.use", "Use the root model ({{name}})", { name: n.name })]
|
|
31121
31131
|
}),
|
|
31122
31132
|
s,
|
|
31123
|
-
o.effective &&
|
|
31133
|
+
o.effective && vb(o.supply, a).map((e) => /* @__PURE__ */ v("p", {
|
|
31124
31134
|
className: "text-[10px] leading-snug text-foreground-subtle",
|
|
31125
31135
|
children: e
|
|
31126
31136
|
}, e))
|
|
@@ -31129,17 +31139,17 @@ function yb({ stepId: e, settings: t, rootModel: n, disabled: r, onChange: i })
|
|
|
31129
31139
|
}
|
|
31130
31140
|
//#endregion
|
|
31131
31141
|
//#region ../ui-library/src/composites/model-bound-slider.tsx
|
|
31132
|
-
function
|
|
31142
|
+
function xb(e, t) {
|
|
31133
31143
|
switch (e) {
|
|
31134
31144
|
case "override": return t("uiLibrary.modelBoundSlider.sourceOverride", "Override for this model");
|
|
31135
31145
|
case "model-default": return t("uiLibrary.modelBoundSlider.sourceModelDefault", "Model default");
|
|
31136
31146
|
case "global-default": return t("uiLibrary.modelBoundSlider.sourceGlobalDefault", "Default — not tuned for this model");
|
|
31137
31147
|
}
|
|
31138
31148
|
}
|
|
31139
|
-
function
|
|
31149
|
+
function Sb(e, t) {
|
|
31140
31150
|
return (t === void 0 ? e : e / t).toFixed(2).replace(/\.?0+$/, "");
|
|
31141
31151
|
}
|
|
31142
|
-
function
|
|
31152
|
+
function Cb({ field: e, modelId: t, settings: n, disabled: r, onChangeSettings: i, hideSourceRow: a = !1 }) {
|
|
31143
31153
|
let o = S(), s = e.modelApplicability?.defaultByModel?.[t], c = Be(n, e.key, t.length > 0 ? t : void 0, s, e.default), l = typeof e.default == "number" ? e.default : e.min ?? 0, u = typeof c.value == "number" ? c.value : l, d = e.type === "slider" ? e.displayScale : void 0, f = "unit" in e ? e.unit : void 0, p = c.inapplicableOverride, m = n?.[e.key] !== void 0, h = (r) => {
|
|
31144
31154
|
i(t.length > 0 ? Ke(n, e.key, r, t) : {
|
|
31145
31155
|
...n,
|
|
@@ -31154,7 +31164,7 @@ function Sb({ field: e, modelId: t, settings: n, disabled: r, onChangeSettings:
|
|
|
31154
31164
|
children: e.label
|
|
31155
31165
|
}), /* @__PURE__ */ y("span", {
|
|
31156
31166
|
className: "text-xs font-medium text-foreground tabular-nums",
|
|
31157
|
-
children: [
|
|
31167
|
+
children: [Sb(u, d), f ? ` ${f}` : ""]
|
|
31158
31168
|
})]
|
|
31159
31169
|
}),
|
|
31160
31170
|
e.description && /* @__PURE__ */ v("p", {
|
|
@@ -31176,7 +31186,7 @@ function Sb({ field: e, modelId: t, settings: n, disabled: r, onChangeSettings:
|
|
|
31176
31186
|
children: [/* @__PURE__ */ v("span", {
|
|
31177
31187
|
"data-testid": "model-bound-source",
|
|
31178
31188
|
className: c.source === "override" ? "text-primary font-medium" : "text-foreground-subtle",
|
|
31179
|
-
children:
|
|
31189
|
+
children: xb(c.source, o)
|
|
31180
31190
|
}), m && /* @__PURE__ */ v("button", {
|
|
31181
31191
|
type: "button",
|
|
31182
31192
|
disabled: r,
|
|
@@ -31188,17 +31198,17 @@ function Sb({ field: e, modelId: t, settings: n, disabled: r, onChangeSettings:
|
|
|
31188
31198
|
p !== void 0 && typeof p.value == "number" && /* @__PURE__ */ v("p", {
|
|
31189
31199
|
className: "mt-1 text-[10px] text-amber-400/90",
|
|
31190
31200
|
children: o("uiLibrary.modelBoundSlider.staleOverride", "The override {{value}} was set for {{modelId}} and does not apply to this model.", {
|
|
31191
|
-
value:
|
|
31201
|
+
value: Sb(p.value, d),
|
|
31192
31202
|
modelId: p.modelId
|
|
31193
31203
|
})
|
|
31194
31204
|
})
|
|
31195
31205
|
] });
|
|
31196
31206
|
}
|
|
31197
|
-
function
|
|
31198
|
-
return e.flatMap((e) => e.type === "group" ?
|
|
31207
|
+
function wb(e) {
|
|
31208
|
+
return e.flatMap((e) => e.type === "group" ? wb(e.fields) : "key" in e && "bindsToModel" in e && e.bindsToModel === !0 ? [e.key] : []);
|
|
31199
31209
|
}
|
|
31200
|
-
function
|
|
31201
|
-
let a = S(), o =
|
|
31210
|
+
function Tb({ fields: e, modelId: t, settings: n, disabled: r, onReset: i }) {
|
|
31211
|
+
let a = S(), o = wb(e), s = t.length > 0 ? t : void 0;
|
|
31202
31212
|
return o.length === 0 || !se(n, o, s) ? null : /* @__PURE__ */ v("button", {
|
|
31203
31213
|
type: "button",
|
|
31204
31214
|
disabled: r,
|
|
@@ -31210,7 +31220,7 @@ function wb({ fields: e, modelId: t, settings: n, disabled: r, onReset: i }) {
|
|
|
31210
31220
|
//#endregion
|
|
31211
31221
|
//#region ../ui-library/src/composites/pipeline-step.tsx
|
|
31212
31222
|
e();
|
|
31213
|
-
function
|
|
31223
|
+
function Eb({ label: e, value: t, options: n, disabled: r, onChange: i }) {
|
|
31214
31224
|
let a = S();
|
|
31215
31225
|
return /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
31216
31226
|
className: "block text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-1.5",
|
|
@@ -31230,7 +31240,7 @@ function Tb({ label: e, value: t, options: n, disabled: r, onChange: i }) {
|
|
|
31230
31240
|
}, e.value))]
|
|
31231
31241
|
})] });
|
|
31232
31242
|
}
|
|
31233
|
-
function
|
|
31243
|
+
function Db({ label: e, description: t, value: n, options: r, disabled: i, onChange: a }) {
|
|
31234
31244
|
function o(e) {
|
|
31235
31245
|
i || a(n.includes(e) ? n.filter((t) => t !== e) : [...n, e]);
|
|
31236
31246
|
}
|
|
@@ -31258,14 +31268,14 @@ function Eb({ label: e, description: t, value: n, options: r, disabled: i, onCha
|
|
|
31258
31268
|
})
|
|
31259
31269
|
] });
|
|
31260
31270
|
}
|
|
31261
|
-
function
|
|
31271
|
+
function Ob(e, t, n) {
|
|
31262
31272
|
let r = t.settings?.[e];
|
|
31263
31273
|
if (r !== void 0) return r;
|
|
31264
31274
|
let i = n.find((t) => "key" in t && t.key === e);
|
|
31265
31275
|
return i && "default" in i ? i.default : void 0;
|
|
31266
31276
|
}
|
|
31267
|
-
function
|
|
31268
|
-
let o = S(), s = "modelApplicability" in e ? e.modelApplicability : void 0, c = s?.inapplicable?.[n.modelId], l = /* @__PURE__ */ v(
|
|
31277
|
+
function kb({ field: e, allFields: t, step: n, disabled: r, onChange: i, hideModelBoundSourceRow: a }) {
|
|
31278
|
+
let o = S(), s = "modelApplicability" in e ? e.modelApplicability : void 0, c = s?.inapplicable?.[n.modelId], l = /* @__PURE__ */ v(Ab, {
|
|
31269
31279
|
field: e,
|
|
31270
31280
|
allFields: t,
|
|
31271
31281
|
step: n,
|
|
@@ -31282,10 +31292,10 @@ function Ob({ field: e, allFields: t, step: n, disabled: r, onChange: i, hideMod
|
|
|
31282
31292
|
})]
|
|
31283
31293
|
});
|
|
31284
31294
|
}
|
|
31285
|
-
function
|
|
31295
|
+
function Ab({ field: e, allFields: t, step: n, disabled: r, modelScopedOptions: i, onChange: a, hideModelBoundSourceRow: o }) {
|
|
31286
31296
|
let s = e.type !== "separator" && e.type !== "info" ? e.showWhen : void 0;
|
|
31287
31297
|
if (s) {
|
|
31288
|
-
let { field: e, equals: r, notEquals: i, in: a, notIn: o } = s, c =
|
|
31298
|
+
let { field: e, equals: r, notEquals: i, in: a, notIn: o } = s, c = Ob(e, n, t);
|
|
31289
31299
|
if (r !== void 0 && c !== r || i !== void 0 && c === i || a !== void 0 && !a.includes(c) || o !== void 0 && o.includes(c)) return null;
|
|
31290
31300
|
}
|
|
31291
31301
|
function c(t) {
|
|
@@ -31299,7 +31309,7 @@ function kb({ field: e, allFields: t, step: n, disabled: r, modelScopedOptions:
|
|
|
31299
31309
|
}
|
|
31300
31310
|
if (e.type === "select") {
|
|
31301
31311
|
let t = n.settings?.[e.key], a = typeof t == "string" ? t : e.default ?? "";
|
|
31302
|
-
return /* @__PURE__ */ v(
|
|
31312
|
+
return /* @__PURE__ */ v(Eb, {
|
|
31303
31313
|
label: e.label,
|
|
31304
31314
|
value: a,
|
|
31305
31315
|
disabled: r || e.disabled,
|
|
@@ -31309,7 +31319,7 @@ function kb({ field: e, allFields: t, step: n, disabled: r, modelScopedOptions:
|
|
|
31309
31319
|
}
|
|
31310
31320
|
if (e.type === "multiselect") {
|
|
31311
31321
|
let t = n.settings?.[e.key], a = Array.isArray(t) ? t : Array.isArray(e.default) ? e.default : [];
|
|
31312
|
-
return /* @__PURE__ */ v(
|
|
31322
|
+
return /* @__PURE__ */ v(Db, {
|
|
31313
31323
|
label: e.label,
|
|
31314
31324
|
description: e.description,
|
|
31315
31325
|
value: a,
|
|
@@ -31318,7 +31328,7 @@ function kb({ field: e, allFields: t, step: n, disabled: r, modelScopedOptions:
|
|
|
31318
31328
|
onChange: c
|
|
31319
31329
|
});
|
|
31320
31330
|
}
|
|
31321
|
-
if ((e.type === "slider" || e.type === "number") && e.bindsToModel === !0) return /* @__PURE__ */ v(
|
|
31331
|
+
if ((e.type === "slider" || e.type === "number") && e.bindsToModel === !0) return /* @__PURE__ */ v(Cb, {
|
|
31322
31332
|
field: e,
|
|
31323
31333
|
modelId: n.modelId,
|
|
31324
31334
|
settings: n.settings,
|
|
@@ -31402,28 +31412,28 @@ function kb({ field: e, allFields: t, step: n, disabled: r, modelScopedOptions:
|
|
|
31402
31412
|
}
|
|
31403
31413
|
//#endregion
|
|
31404
31414
|
//#region ../ui-library/src/composites/step-inspector/setting-values.ts
|
|
31405
|
-
function
|
|
31415
|
+
function jb(e) {
|
|
31406
31416
|
return e.type !== "separator" && e.type !== "info" && e.type !== "group";
|
|
31407
31417
|
}
|
|
31408
|
-
function
|
|
31418
|
+
function Mb(e) {
|
|
31409
31419
|
return "bindsToModel" in e && e.bindsToModel === !0 ? !0 : "key" in e && re(e.key);
|
|
31410
31420
|
}
|
|
31411
|
-
function
|
|
31421
|
+
function Nb(e) {
|
|
31412
31422
|
return e.flatMap((e) => {
|
|
31413
31423
|
if (e.type === "group") {
|
|
31414
|
-
let t =
|
|
31424
|
+
let t = Nb(e.fields);
|
|
31415
31425
|
return t.length > 0 ? [{
|
|
31416
31426
|
...e,
|
|
31417
31427
|
fields: [...t]
|
|
31418
31428
|
}] : [];
|
|
31419
31429
|
}
|
|
31420
|
-
return
|
|
31430
|
+
return Mb(e) ? [] : [e];
|
|
31421
31431
|
});
|
|
31422
31432
|
}
|
|
31423
|
-
function
|
|
31433
|
+
function Pb(e) {
|
|
31424
31434
|
return (e.type === "slider" || e.type === "number") && e.bindsToModel === !0;
|
|
31425
31435
|
}
|
|
31426
|
-
function
|
|
31436
|
+
function Fb(e, t) {
|
|
31427
31437
|
let n = "modelApplicability" in e ? e.modelApplicability?.defaultByModel?.[t] : void 0;
|
|
31428
31438
|
return n === void 0 ? {
|
|
31429
31439
|
value: "default" in e ? e.default : void 0,
|
|
@@ -31433,15 +31443,15 @@ function Pb(e, t) {
|
|
|
31433
31443
|
fromModel: !0
|
|
31434
31444
|
};
|
|
31435
31445
|
}
|
|
31436
|
-
function
|
|
31446
|
+
function Ib(e) {
|
|
31437
31447
|
return e.toFixed(2).replace(/\.?0+$/, "");
|
|
31438
31448
|
}
|
|
31439
|
-
function
|
|
31449
|
+
function Lb(e, t) {
|
|
31440
31450
|
if (t == null) return "—";
|
|
31441
31451
|
if (typeof t == "boolean") return t ? "on" : "off";
|
|
31442
31452
|
if (typeof t == "number") {
|
|
31443
31453
|
let n = e.type === "slider" ? e.displayScale : void 0, r = "unit" in e && typeof e.unit == "string" ? ` ${e.unit}` : "";
|
|
31444
|
-
return `${
|
|
31454
|
+
return `${Ib(n === void 0 ? t : t / n)}${r}`;
|
|
31445
31455
|
}
|
|
31446
31456
|
let n = "options" in e && Array.isArray(e.options) ? e.options : [], r = (e) => {
|
|
31447
31457
|
let t = n.find((t) => t.value === e);
|
|
@@ -31451,15 +31461,15 @@ function Ib(e, t) {
|
|
|
31451
31461
|
}
|
|
31452
31462
|
//#endregion
|
|
31453
31463
|
//#region ../ui-library/src/composites/step-inspector/layered-settings-form.tsx
|
|
31454
|
-
var
|
|
31464
|
+
var Rb = {
|
|
31455
31465
|
camera: "border-primary/40 bg-primary/10 text-primary",
|
|
31456
31466
|
node: "border-border bg-muted/40 text-foreground",
|
|
31457
31467
|
default: "border-border/60 text-foreground-subtle"
|
|
31458
31468
|
};
|
|
31459
|
-
function
|
|
31469
|
+
function zb(e) {
|
|
31460
31470
|
return `step-field-${e}`;
|
|
31461
31471
|
}
|
|
31462
|
-
function
|
|
31472
|
+
function Bb(e, t, n) {
|
|
31463
31473
|
return {
|
|
31464
31474
|
addonId: e.id,
|
|
31465
31475
|
addonName: e.name,
|
|
@@ -31472,12 +31482,12 @@ function zb(e, t, n) {
|
|
|
31472
31482
|
settings: { ...n }
|
|
31473
31483
|
};
|
|
31474
31484
|
}
|
|
31475
|
-
var
|
|
31476
|
-
function
|
|
31477
|
-
let u = S(), d = T(t), f =
|
|
31485
|
+
var Vb = ["camera", "node"];
|
|
31486
|
+
function Hb({ field: e, layers: t, target: n, labels: r, boundKeys: i, modelId: a, pinned: o, disabled: s, onReset: c, action: l }) {
|
|
31487
|
+
let u = S(), d = T(t), f = Fb(e, a), p = f.fromModel ? u("uiLibrary.layeredSettings.modelDefault", "model default") : u("uiLibrary.layeredSettings.default", "default"), m = _e(t, e.key, i), h = Pb(e), g = h ? Be(d, e.key, a, f.value, f.value) : null, _ = g === null || g.source === "override" ? m : "default", b = _ === "default" ? p : r[_] ?? _, x = Vb.filter((e) => e !== _ && r[e] !== void 0).filter((n) => t[n]?.[e.key] !== void 0).map((n) => {
|
|
31478
31488
|
let i = h ? t[n]?.[Qe(e.key)] : void 0, o = typeof i == "string" && i !== a ? u("uiLibrary.layeredSettings.forModel", " (for {{model}})", { model: i }) : "";
|
|
31479
|
-
return `${r[n]} ${
|
|
31480
|
-
}), C = _ === "default" ? x : [...x, `${p} ${
|
|
31489
|
+
return `${r[n]} ${Lb(e, t[n]?.[e.key])}${o}`;
|
|
31490
|
+
}), C = _ === "default" ? x : [...x, `${p} ${Lb(e, f.value)}`], w = _e({ [n]: t[n] }, e.key, i) !== "default", E = Vb.slice(Vb.indexOf(n) + 1).find((n) => r[n] !== void 0 && t[n]?.[e.key] !== void 0), D = E === void 0 ? p : r[E] ?? E, ee = m === "default" ? "default" : _e({
|
|
31481
31491
|
...t,
|
|
31482
31492
|
[m]: void 0
|
|
31483
31493
|
}, e.key, i), te = ee === "default" ? p : r[ee] ?? ee;
|
|
@@ -31486,7 +31496,7 @@ function Vb({ field: e, layers: t, target: n, labels: r, boundKeys: i, modelId:
|
|
|
31486
31496
|
children: [
|
|
31487
31497
|
/* @__PURE__ */ v("span", {
|
|
31488
31498
|
"data-testid": "setting-source",
|
|
31489
|
-
className: B("rounded border px-1.5 py-px font-medium",
|
|
31499
|
+
className: B("rounded border px-1.5 py-px font-medium", Rb[_]),
|
|
31490
31500
|
children: b
|
|
31491
31501
|
}),
|
|
31492
31502
|
C.length > 0 && /* @__PURE__ */ v("span", {
|
|
@@ -31512,8 +31522,8 @@ function Vb({ field: e, layers: t, target: n, labels: r, boundKeys: i, modelId:
|
|
|
31512
31522
|
]
|
|
31513
31523
|
});
|
|
31514
31524
|
}
|
|
31515
|
-
function
|
|
31516
|
-
let p = S(), m = r === "camera" ?
|
|
31525
|
+
function Ub({ addon: e, fields: t, layers: n, target: r, labels: i, modelId: a, onChangeLayer: o, rootModel: s, pinnedKeys: c = [], fieldActions: l, headerActions: u, highlightKey: d = null, disabled: f = !1 }) {
|
|
31526
|
+
let p = S(), m = r === "camera" ? Nb(t) : t, h = Xe(m), g = T(n), _ = n[r], b = Bb(e, a, g), x = gb(e.id, g, s);
|
|
31517
31527
|
return /* @__PURE__ */ y("div", {
|
|
31518
31528
|
className: "space-y-2 text-xs",
|
|
31519
31529
|
children: [
|
|
@@ -31530,7 +31540,7 @@ function Hb({ addon: e, fields: t, layers: n, target: r, labels: i, modelId: a,
|
|
|
31530
31540
|
}),
|
|
31531
31541
|
/* @__PURE__ */ y("span", {
|
|
31532
31542
|
className: "ml-auto flex flex-wrap items-center gap-3",
|
|
31533
|
-
children: [u, /* @__PURE__ */ v(
|
|
31543
|
+
children: [u, /* @__PURE__ */ v(Tb, {
|
|
31534
31544
|
fields: m,
|
|
31535
31545
|
modelId: a,
|
|
31536
31546
|
settings: _,
|
|
@@ -31540,15 +31550,15 @@ function Hb({ addon: e, fields: t, layers: n, target: r, labels: i, modelId: a,
|
|
|
31540
31550
|
})
|
|
31541
31551
|
]
|
|
31542
31552
|
}),
|
|
31543
|
-
x !== null && /* @__PURE__ */ v(
|
|
31553
|
+
x !== null && /* @__PURE__ */ v(bb, {
|
|
31544
31554
|
stepId: e.id,
|
|
31545
31555
|
settings: g,
|
|
31546
31556
|
rootModel: s,
|
|
31547
31557
|
disabled: f,
|
|
31548
|
-
onChange: (e) => o(w(_, we,
|
|
31558
|
+
onChange: (e) => o(w(_, we, _b(g, e), []))
|
|
31549
31559
|
}),
|
|
31550
31560
|
m.map((e) => {
|
|
31551
|
-
if (!
|
|
31561
|
+
if (!jb(e)) return /* @__PURE__ */ v(kb, {
|
|
31552
31562
|
field: e,
|
|
31553
31563
|
allFields: m,
|
|
31554
31564
|
step: b,
|
|
@@ -31557,17 +31567,17 @@ function Hb({ addon: e, fields: t, layers: n, target: r, labels: i, modelId: a,
|
|
|
31557
31567
|
}, e.key);
|
|
31558
31568
|
let t = d === e.key;
|
|
31559
31569
|
return /* @__PURE__ */ y("div", {
|
|
31560
|
-
id:
|
|
31570
|
+
id: zb(e.key),
|
|
31561
31571
|
"data-field-key": e.key,
|
|
31562
31572
|
className: B("rounded-md border border-transparent px-2 py-1 -mx-2", t && "border-primary/50 bg-primary/5"),
|
|
31563
|
-
children: [/* @__PURE__ */ v(
|
|
31573
|
+
children: [/* @__PURE__ */ v(kb, {
|
|
31564
31574
|
field: e,
|
|
31565
31575
|
allFields: m,
|
|
31566
31576
|
step: b,
|
|
31567
31577
|
disabled: f,
|
|
31568
31578
|
hideModelBoundSourceRow: !0,
|
|
31569
31579
|
onChange: (t) => o(w(_, e.key, t.settings ?? {}, h))
|
|
31570
|
-
}), /* @__PURE__ */ v(
|
|
31580
|
+
}), /* @__PURE__ */ v(Hb, {
|
|
31571
31581
|
field: e,
|
|
31572
31582
|
layers: n,
|
|
31573
31583
|
target: r,
|
|
@@ -31587,21 +31597,21 @@ function Hb({ addon: e, fields: t, layers: n, target: r, labels: i, modelId: a,
|
|
|
31587
31597
|
//#endregion
|
|
31588
31598
|
//#region ../ui-library/src/composites/agent-step-editor.tsx
|
|
31589
31599
|
e();
|
|
31590
|
-
function
|
|
31600
|
+
function Wb(e) {
|
|
31591
31601
|
let t = new Set(xe(e.id).map((e) => e.key));
|
|
31592
31602
|
return (e.configSchema ?? []).filter((e) => !t.has(e.key));
|
|
31593
31603
|
}
|
|
31594
|
-
function
|
|
31595
|
-
return r !== void 0 &&
|
|
31604
|
+
function Gb(e, t, n, r) {
|
|
31605
|
+
return r !== void 0 && gb(e.id, n, r)?.effective ? r.modelId : t ?? e.defaultModelId;
|
|
31596
31606
|
}
|
|
31597
|
-
function
|
|
31607
|
+
function Kb({ addonId: e }) {
|
|
31598
31608
|
let t = S();
|
|
31599
31609
|
return xe(e).length === 0 ? null : /* @__PURE__ */ v("p", {
|
|
31600
31610
|
className: "text-[10px] leading-snug text-foreground-subtle",
|
|
31601
31611
|
children: t("uiLibrary.agentStepEditor.clusterHint", "Admission knobs for this step live in Pipeline → Cluster → Settings → Enrichment models. They apply to every camera — a per-device copy would fill the shared index from two policies.")
|
|
31602
31612
|
});
|
|
31603
31613
|
}
|
|
31604
|
-
function
|
|
31614
|
+
function qb({ rootModel: e, stepModelId: t }) {
|
|
31605
31615
|
return /* @__PURE__ */ v("div", {
|
|
31606
31616
|
className: "rounded bg-primary/10 px-3 py-2 text-[11px] text-foreground-subtle",
|
|
31607
31617
|
"data-testid": "root-supplied-model",
|
|
@@ -31616,73 +31626,73 @@ function Kb({ rootModel: e, stepModelId: t }) {
|
|
|
31616
31626
|
})
|
|
31617
31627
|
});
|
|
31618
31628
|
}
|
|
31619
|
-
function
|
|
31620
|
-
let s = S(), c = o(() =>
|
|
31629
|
+
function Jb({ addon: e, agentDefault: t, onChangeAgentConfig: n, engineFormat: r, effectiveModelId: i, rootModel: a }) {
|
|
31630
|
+
let s = S(), c = o(() => pb(e.models, r), [e.models, r]), l = (e) => {
|
|
31621
31631
|
n?.({
|
|
31622
31632
|
...t,
|
|
31623
31633
|
...e
|
|
31624
31634
|
});
|
|
31625
|
-
}, u =
|
|
31635
|
+
}, u = Wb(e), d = e.defaultModelIdByFormat?.[r] ?? e.defaultModelId, f = t.settings ?? {}, p = gb(e.id, f, a)?.effective === !0, m = t.modelId ?? i;
|
|
31626
31636
|
return /* @__PURE__ */ y("div", {
|
|
31627
31637
|
className: "space-y-4 text-xs",
|
|
31628
31638
|
children: [
|
|
31629
|
-
p && a !== void 0 ? /* @__PURE__ */ v(
|
|
31639
|
+
p && a !== void 0 ? /* @__PURE__ */ v(qb, {
|
|
31630
31640
|
rootModel: a,
|
|
31631
31641
|
stepModelId: m
|
|
31632
31642
|
}) : /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
|
|
31633
31643
|
className: "text-[10px] uppercase tracking-widest text-foreground-subtle mb-1",
|
|
31634
31644
|
children: s("uiLibrary.agentStepEditor.model", "Model")
|
|
31635
|
-
}), /* @__PURE__ */ v(
|
|
31645
|
+
}), /* @__PURE__ */ v(ub, {
|
|
31636
31646
|
models: c,
|
|
31637
31647
|
value: m ?? "",
|
|
31638
31648
|
defaultModelId: d,
|
|
31639
31649
|
onChange: (e) => l({ modelId: e })
|
|
31640
31650
|
})] }),
|
|
31641
|
-
(u.length > 0 ||
|
|
31651
|
+
(u.length > 0 || gb(e.id, f, a)) && /* @__PURE__ */ v("div", {
|
|
31642
31652
|
className: "pt-2 border-t border-border/50",
|
|
31643
|
-
children: /* @__PURE__ */ v(
|
|
31653
|
+
children: /* @__PURE__ */ v(Ub, {
|
|
31644
31654
|
addon: e,
|
|
31645
31655
|
fields: u,
|
|
31646
31656
|
layers: { node: f },
|
|
31647
31657
|
target: "node",
|
|
31648
31658
|
labels: { node: "This node" },
|
|
31649
|
-
modelId:
|
|
31659
|
+
modelId: Gb(e, m, f, a),
|
|
31650
31660
|
...a === void 0 ? {} : { rootModel: a },
|
|
31651
31661
|
onChangeLayer: (e) => l({ settings: e })
|
|
31652
31662
|
})
|
|
31653
31663
|
}),
|
|
31654
|
-
/* @__PURE__ */ v(
|
|
31664
|
+
/* @__PURE__ */ v(Kb, { addonId: e.id })
|
|
31655
31665
|
]
|
|
31656
31666
|
});
|
|
31657
31667
|
}
|
|
31658
31668
|
//#endregion
|
|
31659
31669
|
//#region ../ui-library/src/primitives/label.tsx
|
|
31660
31670
|
e();
|
|
31661
|
-
var
|
|
31671
|
+
var Yb = c(({ className: e, ...t }, n) => /* @__PURE__ */ v("label", {
|
|
31662
31672
|
ref: n,
|
|
31663
31673
|
className: B("text-[10px] uppercase tracking-wider text-foreground-muted font-medium", e),
|
|
31664
31674
|
...t
|
|
31665
31675
|
}));
|
|
31666
31676
|
//#endregion
|
|
31667
31677
|
//#region ../ui-library/src/primitives/separator.tsx
|
|
31668
|
-
|
|
31669
|
-
var
|
|
31678
|
+
Yb.displayName = "Label", e();
|
|
31679
|
+
var Xb = to("", {
|
|
31670
31680
|
variants: { orientation: {
|
|
31671
31681
|
horizontal: "h-px w-full bg-border-subtle",
|
|
31672
31682
|
vertical: "w-px h-full bg-border-subtle"
|
|
31673
31683
|
} },
|
|
31674
31684
|
defaultVariants: { orientation: "horizontal" }
|
|
31675
|
-
}),
|
|
31685
|
+
}), Zb = c(({ className: e, orientation: t, ...n }, r) => /* @__PURE__ */ v("div", {
|
|
31676
31686
|
ref: r,
|
|
31677
31687
|
role: "separator",
|
|
31678
31688
|
"aria-orientation": t ?? "horizontal",
|
|
31679
|
-
className: B(
|
|
31689
|
+
className: B(Xb({ orientation: t }), e),
|
|
31680
31690
|
...n
|
|
31681
31691
|
}));
|
|
31682
31692
|
//#endregion
|
|
31683
31693
|
//#region ../ui-library/src/primitives/checkbox.tsx
|
|
31684
|
-
|
|
31685
|
-
var
|
|
31694
|
+
Zb.displayName = "Separator", e();
|
|
31695
|
+
var Qb = c(({ className: e, ...t }, n) => /* @__PURE__ */ v("input", {
|
|
31686
31696
|
ref: n,
|
|
31687
31697
|
type: "checkbox",
|
|
31688
31698
|
className: B("w-3.5 h-3.5 rounded-sm border border-border accent-primary", e),
|
|
@@ -31690,8 +31700,8 @@ var Zb = c(({ className: e, ...t }, n) => /* @__PURE__ */ v("input", {
|
|
|
31690
31700
|
}));
|
|
31691
31701
|
//#endregion
|
|
31692
31702
|
//#region ../ui-library/src/primitives/switch.tsx
|
|
31693
|
-
|
|
31694
|
-
var
|
|
31703
|
+
Qb.displayName = "Checkbox", e();
|
|
31704
|
+
var $b = c(({ className: e, checked: t, onCheckedChange: n, label: r, ...i }, a) => /* @__PURE__ */ y("button", {
|
|
31695
31705
|
ref: a,
|
|
31696
31706
|
role: "switch",
|
|
31697
31707
|
"aria-checked": t,
|
|
@@ -31709,27 +31719,27 @@ var Qb = c(({ className: e, checked: t, onCheckedChange: n, label: r, ...i }, a)
|
|
|
31709
31719
|
}));
|
|
31710
31720
|
//#endregion
|
|
31711
31721
|
//#region ../ui-library/src/primitives/tabs-list-scroll.tsx
|
|
31712
|
-
|
|
31713
|
-
function
|
|
31722
|
+
$b.displayName = "Switch", e();
|
|
31723
|
+
function ex(e) {
|
|
31714
31724
|
let { scrollLeft: t, scrollWidth: n, clientWidth: r } = e, i = n > r + 1;
|
|
31715
31725
|
return {
|
|
31716
31726
|
overflowLeft: i && t > 1,
|
|
31717
31727
|
overflowRight: i && t + r < n - 1
|
|
31718
31728
|
};
|
|
31719
31729
|
}
|
|
31720
|
-
function
|
|
31730
|
+
function tx(e) {
|
|
31721
31731
|
typeof e.scrollIntoView == "function" && e.scrollIntoView({
|
|
31722
31732
|
inline: "nearest",
|
|
31723
31733
|
block: "nearest"
|
|
31724
31734
|
});
|
|
31725
31735
|
}
|
|
31726
|
-
function
|
|
31736
|
+
function nx(e, t) {
|
|
31727
31737
|
let n = e.querySelectorAll("[role=\"tab\"]");
|
|
31728
31738
|
if (n.length === 0) return;
|
|
31729
31739
|
let r = e.scrollLeft;
|
|
31730
31740
|
if (t === "right") {
|
|
31731
31741
|
for (let e of n) if (e.offsetLeft + e.offsetWidth > r + 1) {
|
|
31732
|
-
|
|
31742
|
+
tx(e);
|
|
31733
31743
|
return;
|
|
31734
31744
|
}
|
|
31735
31745
|
return;
|
|
@@ -31737,25 +31747,25 @@ function tx(e, t) {
|
|
|
31737
31747
|
for (let e = n.length - 1; e >= 0; e--) {
|
|
31738
31748
|
let t = n[e];
|
|
31739
31749
|
if (t !== void 0 && t.offsetLeft < r - 1) {
|
|
31740
|
-
|
|
31750
|
+
tx(t);
|
|
31741
31751
|
return;
|
|
31742
31752
|
}
|
|
31743
31753
|
}
|
|
31744
31754
|
}
|
|
31745
|
-
function
|
|
31755
|
+
function rx(e) {
|
|
31746
31756
|
let t = e.querySelector("[role=\"tab\"][aria-selected=\"true\"]");
|
|
31747
31757
|
t !== null && typeof t.scrollIntoView == "function" && t.scrollIntoView({
|
|
31748
31758
|
inline: "nearest",
|
|
31749
31759
|
block: "nearest"
|
|
31750
31760
|
});
|
|
31751
31761
|
}
|
|
31752
|
-
function
|
|
31762
|
+
function ix({ activeTabKey: e, listClassName: n, className: r, children: a, ...o }) {
|
|
31753
31763
|
let s = t(null), [c, u] = g({
|
|
31754
31764
|
overflowLeft: !1,
|
|
31755
31765
|
overflowRight: !1
|
|
31756
31766
|
}), [d, f] = g(!1), p = l(() => {
|
|
31757
31767
|
let e = s.current;
|
|
31758
|
-
e !== null && u(
|
|
31768
|
+
e !== null && u(ex(e));
|
|
31759
31769
|
}, []);
|
|
31760
31770
|
i(() => {
|
|
31761
31771
|
p();
|
|
@@ -31776,11 +31786,11 @@ function rx({ activeTabKey: e, listClassName: n, className: r, children: a, ...o
|
|
|
31776
31786
|
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
31777
31787
|
}, []), i(() => {
|
|
31778
31788
|
let t = s.current;
|
|
31779
|
-
t === null || e === void 0 || (
|
|
31789
|
+
t === null || e === void 0 || (rx(t), p());
|
|
31780
31790
|
}, [e, p]);
|
|
31781
31791
|
let m = (e) => {
|
|
31782
31792
|
let t = s.current;
|
|
31783
|
-
t !== null &&
|
|
31793
|
+
t !== null && nx(t, e);
|
|
31784
31794
|
};
|
|
31785
31795
|
return /* @__PURE__ */ y("div", {
|
|
31786
31796
|
className: B("relative min-w-0", r),
|
|
@@ -31826,17 +31836,17 @@ function rx({ activeTabKey: e, listClassName: n, className: r, children: a, ...o
|
|
|
31826
31836
|
//#endregion
|
|
31827
31837
|
//#region ../ui-library/src/primitives/tabs.tsx
|
|
31828
31838
|
e();
|
|
31829
|
-
var
|
|
31830
|
-
function
|
|
31831
|
-
let e = h(
|
|
31839
|
+
var ax = d(null);
|
|
31840
|
+
function ox() {
|
|
31841
|
+
let e = h(ax);
|
|
31832
31842
|
if (!e) throw Error("Tabs compound components must be used within <Tabs>");
|
|
31833
31843
|
return e;
|
|
31834
31844
|
}
|
|
31835
|
-
function
|
|
31845
|
+
function sx({ value: e, onValueChange: t, defaultValue: n = "", appearance: r = "underline", className: i, ...a }) {
|
|
31836
31846
|
let [o, s] = g(n), c = e ?? o, u = l((n) => {
|
|
31837
31847
|
t?.(n), e === void 0 && s(n);
|
|
31838
31848
|
}, [e, t]);
|
|
31839
|
-
return /* @__PURE__ */ v(
|
|
31849
|
+
return /* @__PURE__ */ v(ax.Provider, {
|
|
31840
31850
|
value: {
|
|
31841
31851
|
value: c,
|
|
31842
31852
|
setValue: u,
|
|
@@ -31848,16 +31858,16 @@ function ox({ value: e, onValueChange: t, defaultValue: n = "", appearance: r =
|
|
|
31848
31858
|
})
|
|
31849
31859
|
});
|
|
31850
31860
|
}
|
|
31851
|
-
function
|
|
31852
|
-
let { appearance: n, value: r } =
|
|
31853
|
-
return /* @__PURE__ */ v(
|
|
31861
|
+
function cx({ className: e, ...t }) {
|
|
31862
|
+
let { appearance: n, value: r } = ox();
|
|
31863
|
+
return /* @__PURE__ */ v(ix, {
|
|
31854
31864
|
activeTabKey: r,
|
|
31855
31865
|
listClassName: B("flex flex-row overflow-x-auto overflow-y-hidden", n === "pills" ? "gap-1 border-b border-border-subtle py-1" : "border-b border-border-subtle", e),
|
|
31856
31866
|
...t
|
|
31857
31867
|
});
|
|
31858
31868
|
}
|
|
31859
|
-
var
|
|
31860
|
-
let { value: i, setValue: a, appearance: o } =
|
|
31869
|
+
var lx = c(function({ value: e, className: t, ...n }, r) {
|
|
31870
|
+
let { value: i, setValue: a, appearance: o } = ox(), s = e === i;
|
|
31861
31871
|
return /* @__PURE__ */ v("button", {
|
|
31862
31872
|
ref: r,
|
|
31863
31873
|
type: "button",
|
|
@@ -31873,17 +31883,17 @@ var cx = c(function({ value: e, className: t, ...n }, r) {
|
|
|
31873
31883
|
//#endregion
|
|
31874
31884
|
//#region ../ui-library/src/primitives/scroll-area.tsx
|
|
31875
31885
|
e();
|
|
31876
|
-
var
|
|
31886
|
+
var ux = c(({ className: e, ...t }, n) => /* @__PURE__ */ v("div", {
|
|
31877
31887
|
ref: n,
|
|
31878
31888
|
className: B("overflow-auto [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-surface-hover [&::-webkit-scrollbar-thumb]:rounded-full", e),
|
|
31879
31889
|
...t
|
|
31880
31890
|
}));
|
|
31881
31891
|
//#endregion
|
|
31882
31892
|
//#region ../ui-library/src/composites/audio-waveform.tsx
|
|
31883
|
-
|
|
31893
|
+
ux.displayName = "ScrollArea", e(), e(), e(), e(), e();
|
|
31884
31894
|
//#endregion
|
|
31885
31895
|
//#region ../ui-library/src/composites/node-color.ts
|
|
31886
|
-
var
|
|
31896
|
+
var dx = {
|
|
31887
31897
|
"node-a": "text-node-a",
|
|
31888
31898
|
"node-b": "text-node-b",
|
|
31889
31899
|
"node-c": "text-node-c",
|
|
@@ -31892,7 +31902,7 @@ var ux = {
|
|
|
31892
31902
|
"node-f": "text-node-f",
|
|
31893
31903
|
"node-g": "text-node-g",
|
|
31894
31904
|
"node-h": "text-node-h"
|
|
31895
|
-
},
|
|
31905
|
+
}, fx = {
|
|
31896
31906
|
"node-a": "bg-node-a/15",
|
|
31897
31907
|
"node-b": "bg-node-b/15",
|
|
31898
31908
|
"node-c": "bg-node-c/15",
|
|
@@ -31902,26 +31912,26 @@ var ux = {
|
|
|
31902
31912
|
"node-g": "bg-node-g/15",
|
|
31903
31913
|
"node-h": "bg-node-h/15"
|
|
31904
31914
|
};
|
|
31905
|
-
function fx(e) {
|
|
31906
|
-
return ux[e];
|
|
31907
|
-
}
|
|
31908
31915
|
function px(e) {
|
|
31909
31916
|
return dx[e];
|
|
31910
31917
|
}
|
|
31918
|
+
function mx(e) {
|
|
31919
|
+
return fx[e];
|
|
31920
|
+
}
|
|
31911
31921
|
//#endregion
|
|
31912
31922
|
//#region ../ui-library/src/composites/node-color-map.ts
|
|
31913
|
-
function
|
|
31923
|
+
function hx(e) {
|
|
31914
31924
|
for (let [t, n] of Object.entries(e)) if (t === "color") return n;
|
|
31915
31925
|
}
|
|
31916
|
-
function
|
|
31926
|
+
function gx(e) {
|
|
31917
31927
|
let t = /* @__PURE__ */ new Map();
|
|
31918
31928
|
for (let n of e ?? []) {
|
|
31919
|
-
let e = Le.safeParse(
|
|
31929
|
+
let e = Le.safeParse(hx(n.settings));
|
|
31920
31930
|
t.set(n.nodeId, e.success ? e.data : Ee(n.nodeId));
|
|
31921
31931
|
}
|
|
31922
31932
|
return t;
|
|
31923
31933
|
}
|
|
31924
|
-
function
|
|
31934
|
+
function _x(e, t) {
|
|
31925
31935
|
return e.get(t) ?? Ee(t);
|
|
31926
31936
|
}
|
|
31927
31937
|
//#endregion
|
|
@@ -31929,7 +31939,7 @@ function gx(e, t) {
|
|
|
31929
31939
|
e(), e(), e();
|
|
31930
31940
|
//#endregion
|
|
31931
31941
|
//#region ../ui-library/src/composites/data-table-pager.tsx
|
|
31932
|
-
function
|
|
31942
|
+
function vx({ page: e, labels: t, onPageChange: n }) {
|
|
31933
31943
|
let r = e.page === 0, i = e.page >= e.pageCount - 1;
|
|
31934
31944
|
return /* @__PURE__ */ y("nav", {
|
|
31935
31945
|
"aria-label": t.navLabel,
|
|
@@ -31965,7 +31975,7 @@ function _x({ page: e, labels: t, onPageChange: n }) {
|
|
|
31965
31975
|
}
|
|
31966
31976
|
//#endregion
|
|
31967
31977
|
//#region ../ui-library/src/composites/data-table-pagination.ts
|
|
31968
|
-
function
|
|
31978
|
+
function yx(e, t, n) {
|
|
31969
31979
|
let r = Math.max(1, Math.floor(n)), i = e.length, a = Math.max(1, Math.ceil(i / r)), o = Math.min(Math.max(0, Math.floor(t)), a - 1), s = o * r, c = e.slice(s, s + r);
|
|
31970
31980
|
return {
|
|
31971
31981
|
pageRows: c,
|
|
@@ -31976,7 +31986,7 @@ function vx(e, t, n) {
|
|
|
31976
31986
|
total: i
|
|
31977
31987
|
};
|
|
31978
31988
|
}
|
|
31979
|
-
var
|
|
31989
|
+
var bx = {
|
|
31980
31990
|
navLabel: "Table pages",
|
|
31981
31991
|
previous: "Previous page",
|
|
31982
31992
|
next: "Next page",
|
|
@@ -31985,21 +31995,21 @@ var yx = {
|
|
|
31985
31995
|
//#endregion
|
|
31986
31996
|
//#region ../ui-library/src/composites/data-table-selection.tsx
|
|
31987
31997
|
e();
|
|
31988
|
-
var
|
|
31989
|
-
function
|
|
31998
|
+
var xx = "__select", Sx = "cursor-pointer align-middle";
|
|
31999
|
+
function Cx({ checked: e, indeterminate: n, disabled: r, label: a, onToggle: o }) {
|
|
31990
32000
|
let s = t(null);
|
|
31991
32001
|
return i(() => {
|
|
31992
32002
|
s.current !== null && (s.current.indeterminate = n);
|
|
31993
|
-
}, [n]), /* @__PURE__ */ v(
|
|
32003
|
+
}, [n]), /* @__PURE__ */ v(Qb, {
|
|
31994
32004
|
ref: s,
|
|
31995
32005
|
"aria-label": a,
|
|
31996
32006
|
checked: e,
|
|
31997
32007
|
disabled: r,
|
|
31998
32008
|
onChange: o,
|
|
31999
|
-
className:
|
|
32009
|
+
className: Sx
|
|
32000
32010
|
});
|
|
32001
32011
|
}
|
|
32002
|
-
function
|
|
32012
|
+
function wx(e, t, n) {
|
|
32003
32013
|
let r = e.isSelectable ?? (() => !0), i = t.filter(r).map(n), a = i.filter((t) => e.selected.has(t)).length, o = i.length > 0 && a === i.length, s = () => {
|
|
32004
32014
|
let t = new Set(e.selected);
|
|
32005
32015
|
for (let e of i) o ? t.delete(e) : t.add(e);
|
|
@@ -32009,9 +32019,9 @@ function Cx(e, t, n) {
|
|
|
32009
32019
|
n.has(t) ? n.delete(t) : n.add(t), e.onChange(n);
|
|
32010
32020
|
};
|
|
32011
32021
|
return {
|
|
32012
|
-
key:
|
|
32022
|
+
key: xx,
|
|
32013
32023
|
width: "w-8",
|
|
32014
|
-
headerRender: () => /* @__PURE__ */ v(
|
|
32024
|
+
headerRender: () => /* @__PURE__ */ v(Cx, {
|
|
32015
32025
|
checked: o,
|
|
32016
32026
|
indeterminate: a > 0 && !o,
|
|
32017
32027
|
disabled: i.length === 0,
|
|
@@ -32021,19 +32031,19 @@ function Cx(e, t, n) {
|
|
|
32021
32031
|
render: (t) => {
|
|
32022
32032
|
if (!r(t)) return null;
|
|
32023
32033
|
let i = n(t);
|
|
32024
|
-
return /* @__PURE__ */ v(
|
|
32034
|
+
return /* @__PURE__ */ v(Qb, {
|
|
32025
32035
|
"aria-label": e.rowLabel(t),
|
|
32026
32036
|
checked: e.selected.has(i),
|
|
32027
32037
|
onChange: () => c(i),
|
|
32028
32038
|
onClick: (e) => e.stopPropagation(),
|
|
32029
|
-
className:
|
|
32039
|
+
className: Sx
|
|
32030
32040
|
});
|
|
32031
32041
|
}
|
|
32032
32042
|
};
|
|
32033
32043
|
}
|
|
32034
32044
|
//#endregion
|
|
32035
32045
|
//#region ../ui-library/src/composites/sort-header-button.tsx
|
|
32036
|
-
function
|
|
32046
|
+
function Tx({ label: e, active: t, dir: n, onSort: r }) {
|
|
32037
32047
|
return /* @__PURE__ */ y("button", {
|
|
32038
32048
|
type: "button",
|
|
32039
32049
|
onClick: r,
|
|
@@ -32043,52 +32053,52 @@ function wx({ label: e, active: t, dir: n, onSort: r }) {
|
|
|
32043
32053
|
}
|
|
32044
32054
|
//#endregion
|
|
32045
32055
|
//#region ../ui-library/src/composites/table-sort.ts
|
|
32046
|
-
function
|
|
32056
|
+
function Ex(e, t) {
|
|
32047
32057
|
return !e || t === null ? "asc" : t === "asc" ? "desc" : null;
|
|
32048
32058
|
}
|
|
32049
|
-
function
|
|
32050
|
-
let n =
|
|
32059
|
+
function Dx(e, t) {
|
|
32060
|
+
let n = Ex(e !== null && e.columnKey === t, e === null ? null : e.dir);
|
|
32051
32061
|
return n === null ? null : {
|
|
32052
32062
|
columnKey: t,
|
|
32053
32063
|
dir: n
|
|
32054
32064
|
};
|
|
32055
32065
|
}
|
|
32056
|
-
function
|
|
32066
|
+
function Ox(e, t) {
|
|
32057
32067
|
return typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t));
|
|
32058
32068
|
}
|
|
32059
|
-
function
|
|
32069
|
+
function kx(e, t, n) {
|
|
32060
32070
|
if (t === null) return [...e];
|
|
32061
32071
|
let r = t.dir === "asc" ? 1 : -1;
|
|
32062
32072
|
return e.toSorted((e, t) => {
|
|
32063
32073
|
let i = n(e), a = n(t);
|
|
32064
|
-
return i === null || a === null ? i === a ? 0 : i === null ? 1 : -1 : r *
|
|
32074
|
+
return i === null || a === null ? i === a ? 0 : i === null ? 1 : -1 : r * Ox(i, a);
|
|
32065
32075
|
});
|
|
32066
32076
|
}
|
|
32067
|
-
function
|
|
32077
|
+
function Ax(e, t) {
|
|
32068
32078
|
return e === null || e.columnKey !== t ? "none" : e.dir === "asc" ? "ascending" : "descending";
|
|
32069
32079
|
}
|
|
32070
32080
|
//#endregion
|
|
32071
32081
|
//#region ../ui-library/src/composites/data-table.tsx
|
|
32072
32082
|
e();
|
|
32073
|
-
var
|
|
32083
|
+
var jx = {
|
|
32074
32084
|
left: "text-left",
|
|
32075
32085
|
right: "text-right",
|
|
32076
32086
|
center: "text-center"
|
|
32077
32087
|
};
|
|
32078
|
-
function
|
|
32088
|
+
function Mx({ columns: e, rows: t, rowKey: n, onRowClick: r, minWidthPx: i = 480, emptyMessage: s, className: c, bordered: l = !0, rowClassName: u, maxBodyHeight: d, fill: f = !1, defaultSort: p, sort: m, onSortChange: h, pageSize: _, page: b, onPageChange: x, paginationLabels: S = bx, selection: C, renderExpanded: w, isExpanded: T }) {
|
|
32079
32089
|
let [E, D] = g(p ?? null), [ee, te] = g(0), O = m === void 0 ? E : m, ne = (e) => {
|
|
32080
32090
|
m === void 0 && D(e), h?.(e);
|
|
32081
32091
|
}, k = (e) => {
|
|
32082
32092
|
b === void 0 && te(e), x?.(e);
|
|
32083
|
-
}, re = f || d !== void 0, ie = f ? "h-full min-h-0" : d ?? "", ae = o(() => O === null ? void 0 : e.find((e) => e.key === O.columnKey && e.sortValue !== void 0), [e, O]), A = ae?.sortValue, oe = o(() => A === void 0 ? t :
|
|
32093
|
+
}, re = f || d !== void 0, ie = f ? "h-full min-h-0" : d ?? "", ae = o(() => O === null ? void 0 : e.find((e) => e.key === O.columnKey && e.sortValue !== void 0), [e, O]), A = ae?.sortValue, oe = o(() => A === void 0 ? t : kx(t, O, A), [
|
|
32084
32094
|
t,
|
|
32085
32095
|
O,
|
|
32086
32096
|
A
|
|
32087
|
-
]), se = ae === void 0 ? null : O, ce = _ === void 0 ? null :
|
|
32097
|
+
]), se = ae === void 0 ? null : O, ce = _ === void 0 ? null : yx(oe, b ?? ee, _), le = ce === null ? oe : ce.pageRows, j = ce !== null && ce.pageCount > 1 ? /* @__PURE__ */ v(vx, {
|
|
32088
32098
|
page: ce,
|
|
32089
32099
|
labels: S,
|
|
32090
32100
|
onPageChange: k
|
|
32091
|
-
}) : null, ue = C === void 0 ? e : [
|
|
32101
|
+
}) : null, ue = C === void 0 ? e : [wx(C, le, (e) => String(n ? n(e, t.indexOf(e)) : t.indexOf(e))), ...e];
|
|
32092
32102
|
if (t.length === 0 && s) return /* @__PURE__ */ v("div", {
|
|
32093
32103
|
className: `rounded-lg ${l ? "border border-border" : ""} bg-surface px-3 py-4 text-xs text-foreground-subtle text-center ${c ?? ""}`,
|
|
32094
32104
|
children: s
|
|
@@ -32111,20 +32121,20 @@ function jx({ columns: e, rows: t, rowKey: n, onRowClick: r, minWidthPx: i = 480
|
|
|
32111
32121
|
children: /* @__PURE__ */ v("tr", { children: ue.map((e) => {
|
|
32112
32122
|
let t = e.align ?? "left", n = e.nowrap ?? !0, r = e.sortValue !== void 0, i = se !== null && se.columnKey === e.key;
|
|
32113
32123
|
return /* @__PURE__ */ v("th", {
|
|
32114
|
-
"aria-sort": r ?
|
|
32124
|
+
"aria-sort": r ? Ax(se, e.key) : void 0,
|
|
32115
32125
|
title: r ? void 0 : e.notSortableReason,
|
|
32116
32126
|
className: [
|
|
32117
32127
|
"px-3 py-2 text-foreground-subtle font-medium bg-surface border-b border-border",
|
|
32118
32128
|
re ? "sticky top-0 z-10" : "",
|
|
32119
|
-
|
|
32129
|
+
jx[t],
|
|
32120
32130
|
n ? "whitespace-nowrap" : "",
|
|
32121
32131
|
e.width ?? ""
|
|
32122
32132
|
].filter(Boolean).join(" "),
|
|
32123
|
-
children: r ? /* @__PURE__ */ v(
|
|
32133
|
+
children: r ? /* @__PURE__ */ v(Tx, {
|
|
32124
32134
|
label: e.headerRender ? e.headerRender() : e.header,
|
|
32125
32135
|
active: i,
|
|
32126
32136
|
dir: i && se !== null ? se.dir : "asc",
|
|
32127
|
-
onSort: () => ne(
|
|
32137
|
+
onSort: () => ne(Dx(O, e.key))
|
|
32128
32138
|
}) : e.headerRender ? e.headerRender() : e.header
|
|
32129
32139
|
}, e.key);
|
|
32130
32140
|
}) })
|
|
@@ -32139,7 +32149,7 @@ function jx({ columns: e, rows: t, rowKey: n, onRowClick: r, minWidthPx: i = 480
|
|
|
32139
32149
|
"data-cell": n.key,
|
|
32140
32150
|
className: [
|
|
32141
32151
|
"px-3 py-2 text-foreground border-b border-border",
|
|
32142
|
-
|
|
32152
|
+
jx[r],
|
|
32143
32153
|
i ? "whitespace-nowrap" : ""
|
|
32144
32154
|
].filter(Boolean).join(" "),
|
|
32145
32155
|
children: n.render(e, t)
|
|
@@ -32170,8 +32180,8 @@ function jx({ columns: e, rows: t, rowKey: n, onRowClick: r, minWidthPx: i = 480
|
|
|
32170
32180
|
e();
|
|
32171
32181
|
//#endregion
|
|
32172
32182
|
//#region ../ui-library/src/hooks/turn-server-cache.ts
|
|
32173
|
-
var
|
|
32174
|
-
function
|
|
32183
|
+
var Nx = 5 * 6e4, Px = 720 * 6e4, Fx = "camstack:turn-servers:v1";
|
|
32184
|
+
function Ix() {
|
|
32175
32185
|
let e = globalThis;
|
|
32176
32186
|
try {
|
|
32177
32187
|
return e.localStorage ?? null;
|
|
@@ -32179,7 +32189,7 @@ function Fx() {
|
|
|
32179
32189
|
return null;
|
|
32180
32190
|
}
|
|
32181
32191
|
}
|
|
32182
|
-
function
|
|
32192
|
+
function Lx(e) {
|
|
32183
32193
|
if (typeof e != "object" || !e) return !1;
|
|
32184
32194
|
let t = e;
|
|
32185
32195
|
return typeof t.fetchedAt != "number" || !Array.isArray(t.servers) ? !1 : t.servers.every((e) => {
|
|
@@ -32188,7 +32198,7 @@ function Ix(e) {
|
|
|
32188
32198
|
return !(!(typeof t.urls == "string" || Array.isArray(t.urls) && t.urls.every((e) => typeof e == "string")) || t.username !== void 0 && typeof t.username != "string" || t.credential !== void 0 && typeof t.credential != "string");
|
|
32189
32199
|
});
|
|
32190
32200
|
}
|
|
32191
|
-
var
|
|
32201
|
+
var Rx = class {
|
|
32192
32202
|
freshTtlMs;
|
|
32193
32203
|
staleCapMs;
|
|
32194
32204
|
storage;
|
|
@@ -32197,7 +32207,7 @@ var Lx = class {
|
|
|
32197
32207
|
memory = /* @__PURE__ */ new WeakMap();
|
|
32198
32208
|
inflight = /* @__PURE__ */ new WeakMap();
|
|
32199
32209
|
constructor(e = {}) {
|
|
32200
|
-
this.freshTtlMs = e.freshTtlMs ??
|
|
32210
|
+
this.freshTtlMs = e.freshTtlMs ?? Nx, this.staleCapMs = e.staleCapMs ?? Px, this.storage = "storage" in e ? e.storage ?? null : Ix(), this.now = e.now ?? (() => Date.now()), this.storageKey = e.storageKey ?? Fx;
|
|
32201
32211
|
}
|
|
32202
32212
|
async getOrFetch(e, t) {
|
|
32203
32213
|
let n = this.now(), r = this.memory.get(e) ?? this.readStorage();
|
|
@@ -32235,7 +32245,7 @@ var Lx = class {
|
|
|
32235
32245
|
let e = this.storage.getItem(this.storageKey);
|
|
32236
32246
|
if (e === null) return;
|
|
32237
32247
|
let t = JSON.parse(e);
|
|
32238
|
-
return
|
|
32248
|
+
return Lx(t) ? t : void 0;
|
|
32239
32249
|
} catch {
|
|
32240
32250
|
return;
|
|
32241
32251
|
}
|
|
@@ -32248,26 +32258,26 @@ var Lx = class {
|
|
|
32248
32258
|
};
|
|
32249
32259
|
//#endregion
|
|
32250
32260
|
//#region ../ui-library/src/composites/use-data-table-filter.ts
|
|
32251
|
-
e(), new
|
|
32261
|
+
e(), new Rx(), e(), e(), e(), e(), e(), e(), e();
|
|
32252
32262
|
//#endregion
|
|
32253
32263
|
//#region ../ui-library/src/composites/detection-colors.ts
|
|
32254
|
-
var
|
|
32264
|
+
var zx = Oe(), Bx = new Set([
|
|
32255
32265
|
"live",
|
|
32256
32266
|
"recording",
|
|
32257
32267
|
"heatmapScrub"
|
|
32258
32268
|
]);
|
|
32259
|
-
Object.freeze(Object.fromEntries(Ue.filter((e) => !
|
|
32260
|
-
function
|
|
32269
|
+
Object.freeze(Object.fromEntries(Ue.filter((e) => !Bx.has(e)).map((e) => [e, pe(zx.swatches, zx.fallbacks, e)])));
|
|
32270
|
+
function Vx(e) {
|
|
32261
32271
|
let t = e[0];
|
|
32262
32272
|
if (t === void 0) throw Error("display palette has no fallback colour");
|
|
32263
32273
|
return t;
|
|
32264
32274
|
}
|
|
32265
32275
|
//#endregion
|
|
32266
32276
|
//#region ../ui-library/src/composites/detection-result-tree.tsx
|
|
32267
|
-
|
|
32277
|
+
Vx(zx.fallbacks), e(), Oe(), d({ status: "absent" }), e(), e();
|
|
32268
32278
|
//#endregion
|
|
32269
32279
|
//#region ../../node_modules/superjson/dist/double-indexed-kv.js
|
|
32270
|
-
var
|
|
32280
|
+
var Hx = class {
|
|
32271
32281
|
constructor() {
|
|
32272
32282
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
32273
32283
|
}
|
|
@@ -32283,9 +32293,9 @@ var Vx = class {
|
|
|
32283
32293
|
clear() {
|
|
32284
32294
|
this.keyToValue.clear(), this.valueToKey.clear();
|
|
32285
32295
|
}
|
|
32286
|
-
},
|
|
32296
|
+
}, Ux = class {
|
|
32287
32297
|
constructor(e) {
|
|
32288
|
-
this.generateIdentifier = e, this.kv = new
|
|
32298
|
+
this.generateIdentifier = e, this.kv = new Hx();
|
|
32289
32299
|
}
|
|
32290
32300
|
register(e, t) {
|
|
32291
32301
|
this.kv.getByValue(e) || (t ||= this.generateIdentifier(e), this.kv.set(t, e));
|
|
@@ -32299,7 +32309,7 @@ var Vx = class {
|
|
|
32299
32309
|
getValue(e) {
|
|
32300
32310
|
return this.kv.getByKey(e);
|
|
32301
32311
|
}
|
|
32302
|
-
},
|
|
32312
|
+
}, Wx = class extends Ux {
|
|
32303
32313
|
constructor() {
|
|
32304
32314
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
32305
32315
|
}
|
|
@@ -32312,14 +32322,14 @@ var Vx = class {
|
|
|
32312
32322
|
};
|
|
32313
32323
|
//#endregion
|
|
32314
32324
|
//#region ../../node_modules/superjson/dist/util.js
|
|
32315
|
-
function
|
|
32325
|
+
function Gx(e) {
|
|
32316
32326
|
if ("values" in Object) return Object.values(e);
|
|
32317
32327
|
let t = [];
|
|
32318
32328
|
for (let n in e) e.hasOwnProperty(n) && t.push(e[n]);
|
|
32319
32329
|
return t;
|
|
32320
32330
|
}
|
|
32321
|
-
function
|
|
32322
|
-
let n =
|
|
32331
|
+
function Kx(e, t) {
|
|
32332
|
+
let n = Gx(e);
|
|
32323
32333
|
if ("find" in n) return n.find(t);
|
|
32324
32334
|
let r = n;
|
|
32325
32335
|
for (let e = 0; e < r.length; e++) {
|
|
@@ -32327,13 +32337,13 @@ function Gx(e, t) {
|
|
|
32327
32337
|
if (t(n)) return n;
|
|
32328
32338
|
}
|
|
32329
32339
|
}
|
|
32330
|
-
function
|
|
32340
|
+
function qx(e, t) {
|
|
32331
32341
|
Object.entries(e).forEach(([e, n]) => t(n, e));
|
|
32332
32342
|
}
|
|
32333
|
-
function
|
|
32343
|
+
function Jx(e, t) {
|
|
32334
32344
|
return e.indexOf(t) !== -1;
|
|
32335
32345
|
}
|
|
32336
|
-
function
|
|
32346
|
+
function Yx(e, t) {
|
|
32337
32347
|
for (let n = 0; n < e.length; n++) {
|
|
32338
32348
|
let r = e[n];
|
|
32339
32349
|
if (t(r)) return r;
|
|
@@ -32341,7 +32351,7 @@ function Jx(e, t) {
|
|
|
32341
32351
|
}
|
|
32342
32352
|
//#endregion
|
|
32343
32353
|
//#region ../../node_modules/superjson/dist/custom-transformer-registry.js
|
|
32344
|
-
var
|
|
32354
|
+
var Xx = class {
|
|
32345
32355
|
constructor() {
|
|
32346
32356
|
this.transfomers = {};
|
|
32347
32357
|
}
|
|
@@ -32349,12 +32359,12 @@ var Yx = class {
|
|
|
32349
32359
|
this.transfomers[e.name] = e;
|
|
32350
32360
|
}
|
|
32351
32361
|
findApplicable(e) {
|
|
32352
|
-
return
|
|
32362
|
+
return Kx(this.transfomers, (t) => t.isApplicable(e));
|
|
32353
32363
|
}
|
|
32354
32364
|
findByName(e) {
|
|
32355
32365
|
return this.transfomers[e];
|
|
32356
32366
|
}
|
|
32357
|
-
},
|
|
32367
|
+
}, Zx = (e) => Object.prototype.toString.call(e).slice(8, -1), Qx = (e) => e === void 0, $x = (e) => e === null, eS = (e) => typeof e != "object" || !e || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, tS = (e) => eS(e) && Object.keys(e).length === 0, nS = (e) => Array.isArray(e), rS = (e) => typeof e == "string", iS = (e) => typeof e == "number" && !isNaN(e), aS = (e) => typeof e == "boolean", oS = (e) => e instanceof RegExp, sS = (e) => e instanceof Map, cS = (e) => e instanceof Set, lS = (e) => Zx(e) === "Symbol", uS = (e) => e instanceof Date && !isNaN(e.valueOf()), dS = (e) => e instanceof Error, fS = (e) => typeof e == "number" && isNaN(e), pS = (e) => aS(e) || $x(e) || Qx(e) || iS(e) || rS(e) || lS(e), mS = (e) => typeof e == "bigint", hS = (e) => e === Infinity || e === -Infinity, gS = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), _S = (e) => e instanceof URL, vS = (e) => e.replace(/\\/g, "\\\\").replace(/\./g, "\\."), yS = (e) => e.map(String).map(vS).join("."), bS = (e, t) => {
|
|
32358
32368
|
let n = [], r = "";
|
|
32359
32369
|
for (let i = 0; i < e.length; i++) {
|
|
32360
32370
|
let a = e.charAt(i);
|
|
@@ -32380,7 +32390,7 @@ var Yx = class {
|
|
|
32380
32390
|
};
|
|
32381
32391
|
//#endregion
|
|
32382
32392
|
//#region ../../node_modules/superjson/dist/transformer.js
|
|
32383
|
-
function
|
|
32393
|
+
function xS(e, t, n, r) {
|
|
32384
32394
|
return {
|
|
32385
32395
|
isApplicable: e,
|
|
32386
32396
|
annotation: t,
|
|
@@ -32388,11 +32398,11 @@ function bS(e, t, n, r) {
|
|
|
32388
32398
|
untransform: r
|
|
32389
32399
|
};
|
|
32390
32400
|
}
|
|
32391
|
-
var
|
|
32392
|
-
|
|
32393
|
-
|
|
32394
|
-
|
|
32395
|
-
|
|
32401
|
+
var SS = [
|
|
32402
|
+
xS(Qx, "undefined", () => null, () => void 0),
|
|
32403
|
+
xS(mS, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
|
|
32404
|
+
xS(uS, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
32405
|
+
xS(dS, "Error", (e, t) => {
|
|
32396
32406
|
let n = {
|
|
32397
32407
|
name: e.name,
|
|
32398
32408
|
message: e.message
|
|
@@ -32406,17 +32416,17 @@ var xS = [
|
|
|
32406
32416
|
n[t] = e[t];
|
|
32407
32417
|
}), n;
|
|
32408
32418
|
}),
|
|
32409
|
-
|
|
32419
|
+
xS(oS, "regexp", (e) => "" + e, (e) => {
|
|
32410
32420
|
let t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
32411
32421
|
return new RegExp(t, n);
|
|
32412
32422
|
}),
|
|
32413
|
-
|
|
32414
|
-
|
|
32415
|
-
|
|
32416
|
-
|
|
32417
|
-
|
|
32423
|
+
xS(cS, "set", (e) => [...e.values()], (e) => new Set(e)),
|
|
32424
|
+
xS(sS, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
32425
|
+
xS((e) => fS(e) || hS(e), "number", (e) => fS(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
32426
|
+
xS((e) => e === 0 && 1 / e == -Infinity, "number", () => "-0", Number),
|
|
32427
|
+
xS(_S, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
32418
32428
|
];
|
|
32419
|
-
function
|
|
32429
|
+
function CS(e, t, n, r) {
|
|
32420
32430
|
return {
|
|
32421
32431
|
isApplicable: e,
|
|
32422
32432
|
annotation: t,
|
|
@@ -32424,11 +32434,11 @@ function SS(e, t, n, r) {
|
|
|
32424
32434
|
untransform: r
|
|
32425
32435
|
};
|
|
32426
32436
|
}
|
|
32427
|
-
var
|
|
32437
|
+
var wS = CS((e, t) => lS(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
|
|
32428
32438
|
let r = n.symbolRegistry.getValue(t[1]);
|
|
32429
32439
|
if (!r) throw Error("Trying to deserialize unknown symbol");
|
|
32430
32440
|
return r;
|
|
32431
|
-
}),
|
|
32441
|
+
}), TS = [
|
|
32432
32442
|
Int8Array,
|
|
32433
32443
|
Uint8Array,
|
|
32434
32444
|
Int16Array,
|
|
@@ -32438,15 +32448,15 @@ var CS = SS((e, t) => cS(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
32438
32448
|
Float32Array,
|
|
32439
32449
|
Float64Array,
|
|
32440
32450
|
Uint8ClampedArray
|
|
32441
|
-
].reduce((e, t) => (e[t.name] = t, e), {}),
|
|
32442
|
-
let n =
|
|
32451
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), ES = CS(gS, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
32452
|
+
let n = TS[t[1]];
|
|
32443
32453
|
if (!n) throw Error("Trying to deserialize unknown typed array");
|
|
32444
32454
|
return new n(e);
|
|
32445
32455
|
});
|
|
32446
|
-
function
|
|
32456
|
+
function DS(e, t) {
|
|
32447
32457
|
return e?.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
|
|
32448
32458
|
}
|
|
32449
|
-
var
|
|
32459
|
+
var OS = CS(DS, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
|
|
32450
32460
|
let n = t.classRegistry.getAllowedProps(e.constructor);
|
|
32451
32461
|
if (!n) return { ...e };
|
|
32452
32462
|
let r = {};
|
|
@@ -32457,61 +32467,61 @@ var DS = SS(ES, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
32457
32467
|
let r = n.classRegistry.getValue(t[1]);
|
|
32458
32468
|
if (!r) throw Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
|
|
32459
32469
|
return Object.assign(Object.create(r.prototype), e);
|
|
32460
|
-
}),
|
|
32470
|
+
}), kS = CS((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
|
|
32461
32471
|
let r = n.customTransformerRegistry.findByName(t[1]);
|
|
32462
32472
|
if (!r) throw Error("Trying to deserialize unknown custom value");
|
|
32463
32473
|
return r.deserialize(e);
|
|
32464
|
-
}),
|
|
32465
|
-
DS,
|
|
32466
|
-
CS,
|
|
32474
|
+
}), AS = [
|
|
32467
32475
|
OS,
|
|
32468
|
-
|
|
32469
|
-
|
|
32470
|
-
|
|
32476
|
+
wS,
|
|
32477
|
+
kS,
|
|
32478
|
+
ES
|
|
32479
|
+
], jS = (e, t) => {
|
|
32480
|
+
let n = Yx(AS, (n) => n.isApplicable(e, t));
|
|
32471
32481
|
if (n) return {
|
|
32472
32482
|
value: n.transform(e, t),
|
|
32473
32483
|
type: n.annotation(e, t)
|
|
32474
32484
|
};
|
|
32475
|
-
let r =
|
|
32485
|
+
let r = Yx(SS, (n) => n.isApplicable(e, t));
|
|
32476
32486
|
if (r) return {
|
|
32477
32487
|
value: r.transform(e, t),
|
|
32478
32488
|
type: r.annotation
|
|
32479
32489
|
};
|
|
32480
|
-
},
|
|
32481
|
-
|
|
32482
|
-
|
|
32490
|
+
}, MS = {};
|
|
32491
|
+
SS.forEach((e) => {
|
|
32492
|
+
MS[e.annotation] = e;
|
|
32483
32493
|
});
|
|
32484
|
-
var
|
|
32485
|
-
if (
|
|
32486
|
-
case "symbol": return
|
|
32487
|
-
case "class": return
|
|
32488
|
-
case "custom": return
|
|
32489
|
-
case "typed-array": return
|
|
32494
|
+
var NS = (e, t, n) => {
|
|
32495
|
+
if (nS(t)) switch (t[0]) {
|
|
32496
|
+
case "symbol": return wS.untransform(e, t, n);
|
|
32497
|
+
case "class": return OS.untransform(e, t, n);
|
|
32498
|
+
case "custom": return kS.untransform(e, t, n);
|
|
32499
|
+
case "typed-array": return ES.untransform(e, t, n);
|
|
32490
32500
|
default: throw Error("Unknown transformation: " + t);
|
|
32491
32501
|
}
|
|
32492
32502
|
else {
|
|
32493
|
-
let r =
|
|
32503
|
+
let r = MS[t];
|
|
32494
32504
|
if (!r) throw Error("Unknown transformation: " + t);
|
|
32495
32505
|
return r.untransform(e, n);
|
|
32496
32506
|
}
|
|
32497
|
-
},
|
|
32507
|
+
}, PS = (e, t) => {
|
|
32498
32508
|
if (t > e.size) throw Error("index out of bounds");
|
|
32499
32509
|
let n = e.keys();
|
|
32500
32510
|
for (; t > 0;) n.next(), t--;
|
|
32501
32511
|
return n.next().value;
|
|
32502
32512
|
};
|
|
32503
|
-
function
|
|
32504
|
-
if (
|
|
32505
|
-
if (
|
|
32506
|
-
if (
|
|
32513
|
+
function FS(e) {
|
|
32514
|
+
if (Jx(e, "__proto__")) throw Error("__proto__ is not allowed as a property");
|
|
32515
|
+
if (Jx(e, "prototype")) throw Error("prototype is not allowed as a property");
|
|
32516
|
+
if (Jx(e, "constructor")) throw Error("constructor is not allowed as a property");
|
|
32507
32517
|
}
|
|
32508
|
-
var
|
|
32509
|
-
|
|
32518
|
+
var IS = (e, t) => {
|
|
32519
|
+
FS(t);
|
|
32510
32520
|
for (let n = 0; n < t.length; n++) {
|
|
32511
32521
|
let r = t[n];
|
|
32512
|
-
if (
|
|
32513
|
-
else if (
|
|
32514
|
-
let i = +r, a = +t[++n] == 0 ? "key" : "value", o =
|
|
32522
|
+
if (cS(e)) e = PS(e, +r);
|
|
32523
|
+
else if (sS(e)) {
|
|
32524
|
+
let i = +r, a = +t[++n] == 0 ? "key" : "value", o = PS(e, i);
|
|
32515
32525
|
switch (a) {
|
|
32516
32526
|
case "key":
|
|
32517
32527
|
e = o;
|
|
@@ -32523,21 +32533,21 @@ var FS = (e, t) => {
|
|
|
32523
32533
|
} else e = e[r];
|
|
32524
32534
|
}
|
|
32525
32535
|
return e;
|
|
32526
|
-
},
|
|
32527
|
-
if (
|
|
32536
|
+
}, LS = (e, t, n) => {
|
|
32537
|
+
if (FS(t), t.length === 0) return n(e);
|
|
32528
32538
|
let r = e;
|
|
32529
32539
|
for (let e = 0; e < t.length - 1; e++) {
|
|
32530
32540
|
let n = t[e];
|
|
32531
|
-
if (
|
|
32541
|
+
if (nS(r)) {
|
|
32532
32542
|
let e = +n;
|
|
32533
32543
|
r = r[e];
|
|
32534
|
-
} else if (
|
|
32535
|
-
else if (
|
|
32544
|
+
} else if (eS(r)) r = r[n];
|
|
32545
|
+
else if (cS(r)) {
|
|
32536
32546
|
let e = +n;
|
|
32537
|
-
r =
|
|
32538
|
-
} else if (
|
|
32547
|
+
r = PS(r, e);
|
|
32548
|
+
} else if (sS(r)) {
|
|
32539
32549
|
if (e === t.length - 2) break;
|
|
32540
|
-
let i = +n, a = +t[++e] == 0 ? "key" : "value", o =
|
|
32550
|
+
let i = +n, a = +t[++e] == 0 ? "key" : "value", o = PS(r, i);
|
|
32541
32551
|
switch (a) {
|
|
32542
32552
|
case "key":
|
|
32543
32553
|
r = o;
|
|
@@ -32549,12 +32559,12 @@ var FS = (e, t) => {
|
|
|
32549
32559
|
}
|
|
32550
32560
|
}
|
|
32551
32561
|
let i = t[t.length - 1];
|
|
32552
|
-
if (
|
|
32553
|
-
let e =
|
|
32562
|
+
if (nS(r) ? r[+i] = n(r[+i]) : eS(r) && (r[i] = n(r[i])), cS(r)) {
|
|
32563
|
+
let e = PS(r, +i), t = n(e);
|
|
32554
32564
|
e !== t && (r.delete(e), r.add(t));
|
|
32555
32565
|
}
|
|
32556
|
-
if (
|
|
32557
|
-
let e = +t[t.length - 2], a =
|
|
32566
|
+
if (sS(r)) {
|
|
32567
|
+
let e = +t[t.length - 2], a = PS(r, e);
|
|
32558
32568
|
switch (+i == 0 ? "key" : "value") {
|
|
32559
32569
|
case "key": {
|
|
32560
32570
|
let e = n(a);
|
|
@@ -32567,78 +32577,78 @@ var FS = (e, t) => {
|
|
|
32567
32577
|
}
|
|
32568
32578
|
}
|
|
32569
32579
|
return e;
|
|
32570
|
-
},
|
|
32571
|
-
function
|
|
32580
|
+
}, RS = (e) => e < 1;
|
|
32581
|
+
function zS(e, t, n, r = []) {
|
|
32572
32582
|
if (!e) return;
|
|
32573
|
-
let i =
|
|
32574
|
-
if (!
|
|
32575
|
-
|
|
32583
|
+
let i = RS(n);
|
|
32584
|
+
if (!nS(e)) {
|
|
32585
|
+
qx(e, (e, a) => zS(e, t, n, [...r, ...bS(a, i)]));
|
|
32576
32586
|
return;
|
|
32577
32587
|
}
|
|
32578
32588
|
let [a, o] = e;
|
|
32579
|
-
o &&
|
|
32580
|
-
|
|
32589
|
+
o && qx(o, (e, a) => {
|
|
32590
|
+
zS(e, t, n, [...r, ...bS(a, i)]);
|
|
32581
32591
|
}), t(a, r);
|
|
32582
32592
|
}
|
|
32583
|
-
function
|
|
32584
|
-
return
|
|
32585
|
-
e =
|
|
32593
|
+
function BS(e, t, n, r) {
|
|
32594
|
+
return zS(t, (t, n) => {
|
|
32595
|
+
e = LS(e, n, (e) => NS(e, t, r));
|
|
32586
32596
|
}, n), e;
|
|
32587
32597
|
}
|
|
32588
|
-
function
|
|
32589
|
-
let r =
|
|
32598
|
+
function VS(e, t, n) {
|
|
32599
|
+
let r = RS(n);
|
|
32590
32600
|
function i(t, n) {
|
|
32591
|
-
let i =
|
|
32592
|
-
t.map((e) =>
|
|
32593
|
-
e =
|
|
32601
|
+
let i = IS(e, bS(n, r));
|
|
32602
|
+
t.map((e) => bS(e, r)).forEach((t) => {
|
|
32603
|
+
e = LS(e, t, () => i);
|
|
32594
32604
|
});
|
|
32595
32605
|
}
|
|
32596
|
-
if (
|
|
32606
|
+
if (nS(t)) {
|
|
32597
32607
|
let [n, a] = t;
|
|
32598
32608
|
n.forEach((t) => {
|
|
32599
|
-
e =
|
|
32600
|
-
}), a &&
|
|
32601
|
-
} else
|
|
32609
|
+
e = LS(e, bS(t, r), () => e);
|
|
32610
|
+
}), a && qx(a, i);
|
|
32611
|
+
} else qx(t, i);
|
|
32602
32612
|
return e;
|
|
32603
32613
|
}
|
|
32604
|
-
var
|
|
32605
|
-
function
|
|
32614
|
+
var HS = (e, t) => eS(e) || nS(e) || sS(e) || cS(e) || dS(e) || DS(e, t);
|
|
32615
|
+
function US(e, t, n) {
|
|
32606
32616
|
let r = n.get(e);
|
|
32607
32617
|
r ? r.push(t) : n.set(e, [t]);
|
|
32608
32618
|
}
|
|
32609
|
-
function
|
|
32619
|
+
function WS(e, t) {
|
|
32610
32620
|
let n = {}, r;
|
|
32611
32621
|
return e.forEach((e) => {
|
|
32612
32622
|
if (e.length <= 1) return;
|
|
32613
32623
|
t || (e = e.map((e) => e.map(String)).sort((e, t) => e.length - t.length));
|
|
32614
32624
|
let [i, ...a] = e;
|
|
32615
|
-
i.length === 0 ? r = a.map(
|
|
32616
|
-
}), r ?
|
|
32625
|
+
i.length === 0 ? r = a.map(yS) : n[yS(i)] = a.map(yS);
|
|
32626
|
+
}), r ? tS(n) ? [r] : [r, n] : tS(n) ? void 0 : n;
|
|
32617
32627
|
}
|
|
32618
|
-
var
|
|
32619
|
-
let s =
|
|
32628
|
+
var GS = (e, t, n, r, i = [], a = [], o = /* @__PURE__ */ new Map()) => {
|
|
32629
|
+
let s = pS(e);
|
|
32620
32630
|
if (!s) {
|
|
32621
|
-
|
|
32631
|
+
US(e, i, t);
|
|
32622
32632
|
let n = o.get(e);
|
|
32623
32633
|
if (n) return r ? { transformedValue: null } : n;
|
|
32624
32634
|
}
|
|
32625
|
-
if (!
|
|
32626
|
-
let t =
|
|
32635
|
+
if (!HS(e, n)) {
|
|
32636
|
+
let t = jS(e, n), r = t ? {
|
|
32627
32637
|
transformedValue: t.value,
|
|
32628
32638
|
annotations: [t.type]
|
|
32629
32639
|
} : { transformedValue: e };
|
|
32630
32640
|
return s || o.set(e, r), r;
|
|
32631
32641
|
}
|
|
32632
|
-
if (
|
|
32633
|
-
let c =
|
|
32634
|
-
|
|
32642
|
+
if (Jx(a, e)) return { transformedValue: null };
|
|
32643
|
+
let c = jS(e, n), l = c?.value ?? e, u = nS(l) ? [] : {}, d = {};
|
|
32644
|
+
qx(l, (s, c) => {
|
|
32635
32645
|
if (c === "__proto__" || c === "constructor" || c === "prototype") throw Error(`Detected property ${c}. This is a prototype pollution risk, please remove it from your object.`);
|
|
32636
|
-
let l =
|
|
32637
|
-
u[c] = l.transformedValue,
|
|
32638
|
-
d[
|
|
32646
|
+
let l = GS(s, t, n, r, [...i, c], [...a, e], o);
|
|
32647
|
+
u[c] = l.transformedValue, nS(l.annotations) ? d[vS(c)] = l.annotations : eS(l.annotations) && qx(l.annotations, (e, t) => {
|
|
32648
|
+
d[vS(c) + "." + t] = e;
|
|
32639
32649
|
});
|
|
32640
32650
|
});
|
|
32641
|
-
let f =
|
|
32651
|
+
let f = tS(d) ? {
|
|
32642
32652
|
transformedValue: u,
|
|
32643
32653
|
annotations: c ? [c.type] : void 0
|
|
32644
32654
|
} : {
|
|
@@ -32649,24 +32659,24 @@ var WS = (e, t, n, r, i = [], a = [], o = /* @__PURE__ */ new Map()) => {
|
|
|
32649
32659
|
};
|
|
32650
32660
|
//#endregion
|
|
32651
32661
|
//#region ../../node_modules/is-what/dist/getType.js
|
|
32652
|
-
function
|
|
32662
|
+
function KS(e) {
|
|
32653
32663
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
32654
32664
|
}
|
|
32655
32665
|
//#endregion
|
|
32656
32666
|
//#region ../../node_modules/is-what/dist/isArray.js
|
|
32657
|
-
function
|
|
32658
|
-
return
|
|
32667
|
+
function qS(e) {
|
|
32668
|
+
return KS(e) === "Array";
|
|
32659
32669
|
}
|
|
32660
32670
|
//#endregion
|
|
32661
32671
|
//#region ../../node_modules/is-what/dist/isPlainObject.js
|
|
32662
|
-
function
|
|
32663
|
-
if (
|
|
32672
|
+
function JS(e) {
|
|
32673
|
+
if (KS(e) !== "Object") return !1;
|
|
32664
32674
|
let t = Object.getPrototypeOf(e);
|
|
32665
32675
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
32666
32676
|
}
|
|
32667
32677
|
//#endregion
|
|
32668
32678
|
//#region ../../node_modules/copy-anything/dist/index.js
|
|
32669
|
-
function
|
|
32679
|
+
function YS(e, t, n, r, i) {
|
|
32670
32680
|
let a = {}.propertyIsEnumerable.call(r, t) ? "enumerable" : "nonenumerable";
|
|
32671
32681
|
a === "enumerable" && (e[t] = n), i && a === "nonenumerable" && Object.defineProperty(e, t, {
|
|
32672
32682
|
value: n,
|
|
@@ -32675,37 +32685,37 @@ function JS(e, t, n, r, i) {
|
|
|
32675
32685
|
configurable: !0
|
|
32676
32686
|
});
|
|
32677
32687
|
}
|
|
32678
|
-
function
|
|
32679
|
-
if (
|
|
32680
|
-
if (!
|
|
32688
|
+
function XS(e, t = {}) {
|
|
32689
|
+
if (qS(e)) return e.map((e) => XS(e, t));
|
|
32690
|
+
if (!JS(e)) return e;
|
|
32681
32691
|
let n = Object.getOwnPropertyNames(e), r = Object.getOwnPropertySymbols(e);
|
|
32682
32692
|
return [...n, ...r].reduce((n, r) => {
|
|
32683
|
-
if (r === "__proto__" ||
|
|
32693
|
+
if (r === "__proto__" || qS(t.props) && !t.props.includes(r)) return n;
|
|
32684
32694
|
let i = e[r];
|
|
32685
|
-
return
|
|
32695
|
+
return YS(n, r, XS(i, t), e, t.nonenumerable), n;
|
|
32686
32696
|
}, {});
|
|
32687
32697
|
}
|
|
32688
32698
|
//#endregion
|
|
32689
32699
|
//#region ../../node_modules/superjson/dist/index.js
|
|
32690
|
-
var
|
|
32700
|
+
var ZS = class {
|
|
32691
32701
|
constructor({ dedupe: e = !1 } = {}) {
|
|
32692
|
-
this.classRegistry = new
|
|
32702
|
+
this.classRegistry = new Wx(), this.symbolRegistry = new Ux((e) => e.description ?? ""), this.customTransformerRegistry = new Xx(), this.allowedErrorProps = [], this.dedupe = e;
|
|
32693
32703
|
}
|
|
32694
32704
|
serialize(e) {
|
|
32695
|
-
let t = /* @__PURE__ */ new Map(), n =
|
|
32705
|
+
let t = /* @__PURE__ */ new Map(), n = GS(e, t, this, this.dedupe), r = { json: n.transformedValue };
|
|
32696
32706
|
n.annotations && (r.meta = {
|
|
32697
32707
|
...r.meta,
|
|
32698
32708
|
values: n.annotations
|
|
32699
32709
|
});
|
|
32700
|
-
let i =
|
|
32710
|
+
let i = WS(t, this.dedupe);
|
|
32701
32711
|
return i && (r.meta = {
|
|
32702
32712
|
...r.meta,
|
|
32703
32713
|
referentialEqualities: i
|
|
32704
32714
|
}), r.meta && (r.meta.v = 1), r;
|
|
32705
32715
|
}
|
|
32706
32716
|
deserialize(e, t) {
|
|
32707
|
-
let { json: n, meta: r } = e, i = t?.inPlace ? n :
|
|
32708
|
-
return r?.values && (i =
|
|
32717
|
+
let { json: n, meta: r } = e, i = t?.inPlace ? n : XS(n);
|
|
32718
|
+
return r?.values && (i = BS(i, r.values, r.v ?? 0, this)), r?.referentialEqualities && (i = VS(i, r.referentialEqualities, r.v ?? 0)), i;
|
|
32709
32719
|
}
|
|
32710
32720
|
stringify(e) {
|
|
32711
32721
|
return JSON.stringify(this.serialize(e));
|
|
@@ -32731,8 +32741,8 @@ var XS = class {
|
|
|
32731
32741
|
};
|
|
32732
32742
|
//#endregion
|
|
32733
32743
|
//#region ../ui-library/src/hooks/use-live-buffer.ts
|
|
32734
|
-
|
|
32735
|
-
function
|
|
32744
|
+
ZS.defaultInstance = new ZS(), ZS.serialize = ZS.defaultInstance.serialize.bind(ZS.defaultInstance), ZS.deserialize = ZS.defaultInstance.deserialize.bind(ZS.defaultInstance), ZS.stringify = ZS.defaultInstance.stringify.bind(ZS.defaultInstance), ZS.parse = ZS.defaultInstance.parse.bind(ZS.defaultInstance), ZS.registerClass = ZS.defaultInstance.registerClass.bind(ZS.defaultInstance), ZS.registerSymbol = ZS.defaultInstance.registerSymbol.bind(ZS.defaultInstance), ZS.registerCustom = ZS.defaultInstance.registerCustom.bind(ZS.defaultInstance), ZS.allowErrorProps = ZS.defaultInstance.allowErrorProps.bind(ZS.defaultInstance), ZS.serialize, ZS.deserialize, ZS.stringify, ZS.parse, ZS.registerClass, ZS.registerCustom, ZS.registerSymbol, ZS.allowErrorProps, e(), d(null), e(), e(), e(), d(null), e();
|
|
32745
|
+
function QS(e) {
|
|
32736
32746
|
let [t, n] = g([]), r = l((t) => {
|
|
32737
32747
|
n((n) => {
|
|
32738
32748
|
let r = [...n, t];
|
|
@@ -32752,16 +32762,6 @@ function ZS(e) {
|
|
|
32752
32762
|
]);
|
|
32753
32763
|
}
|
|
32754
32764
|
//#endregion
|
|
32755
|
-
//#region ../ui-library/src/hooks/use-debounced-string.ts
|
|
32756
|
-
e();
|
|
32757
|
-
function QS(e, t) {
|
|
32758
|
-
let [n, r] = g(e);
|
|
32759
|
-
return i(() => {
|
|
32760
|
-
let n = setTimeout(() => r(e), t);
|
|
32761
|
-
return () => clearTimeout(n);
|
|
32762
|
-
}, [e, t]), n;
|
|
32763
|
-
}
|
|
32764
|
-
//#endregion
|
|
32765
32765
|
//#region ../ui-library/src/composites/log-history-paging.ts
|
|
32766
32766
|
async function $S(e) {
|
|
32767
32767
|
let { fetchSlice: t, limit: n, signal: r, onProgress: i } = e, a = [], o = e.before, s = 0, c;
|
|
@@ -32954,11 +32954,11 @@ function fC({ agentId: e, addonId: n, deviceId: r, containerDeviceId: a, integra
|
|
|
32954
32954
|
a,
|
|
32955
32955
|
ce,
|
|
32956
32956
|
le
|
|
32957
|
-
]), ue =
|
|
32957
|
+
]), ue = QS(cC), de = x ?? ue, fe = de.entries, [pe, me] = g(0), [he, ge] = g(!0), _e = t(!1), [ve, ye] = g(!1), [be, xe] = g(!1), [Se, Ce] = g(/* @__PURE__ */ new Set()), [we, M] = g(""), Te = t(null), Ee = `${A ?? ""}:${oe ?? ""}:${String(se ?? "")}:${String(a ?? "")}:${ce ?? ""}:${le ?? ""}`, De = t(Ee);
|
|
32958
32958
|
i(() => {
|
|
32959
32959
|
De.current !== Ee && (De.current = Ee, de.reset(), me(0), Ce(/* @__PURE__ */ new Set()), ye(!1));
|
|
32960
32960
|
}, [Ee, de]);
|
|
32961
|
-
let Oe =
|
|
32961
|
+
let Oe = eb(we, lC).trim(), ke = I.logs.sources.useQuery(void 0, { staleTime: 6e4 }), Ae = o(() => (ke.data ?? []).filter((e) => e.readable), [ke.data]), je = rC(o(() => ({
|
|
32962
32962
|
...ie ? { source: ie } : {},
|
|
32963
32963
|
level: k,
|
|
32964
32964
|
...Oe ? { text: Oe } : {},
|
|
@@ -38639,7 +38639,7 @@ function sD({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
38639
38639
|
}),
|
|
38640
38640
|
/* @__PURE__ */ v("span", {
|
|
38641
38641
|
onClick: (e) => e.stopPropagation(),
|
|
38642
|
-
children: /* @__PURE__ */ v(
|
|
38642
|
+
children: /* @__PURE__ */ v($b, {
|
|
38643
38643
|
checked: f,
|
|
38644
38644
|
disabled: u,
|
|
38645
38645
|
"aria-label": i("uiLibrary.petFountain.pump", "Pump"),
|
|
@@ -38867,7 +38867,7 @@ function fD({ icon: e, label: t, checked: n, disabled: r, onChange: i }) {
|
|
|
38867
38867
|
className: "text-foreground-subtle",
|
|
38868
38868
|
children: e
|
|
38869
38869
|
}), t]
|
|
38870
|
-
}), /* @__PURE__ */ v(
|
|
38870
|
+
}), /* @__PURE__ */ v($b, {
|
|
38871
38871
|
checked: n,
|
|
38872
38872
|
disabled: r,
|
|
38873
38873
|
"aria-label": t,
|
|
@@ -41963,7 +41963,7 @@ c(function({ tree: e, agents: n, getCellState: r, onCellClick: a, selectedCell:
|
|
|
41963
41963
|
});
|
|
41964
41964
|
}), e(), e(), e(), e(), e(), e(), e();
|
|
41965
41965
|
function Gk({ selectedNodeId: e, onSelect: t, label: n = "Node", hideIcon: r = !1, alwaysShow: i = !1, allowOffline: a = !1 }) {
|
|
41966
|
-
let s = S(), { nodes: c } = ci(), l = vo(void 0), u = o(() =>
|
|
41966
|
+
let s = S(), { nodes: c } = ci(), l = vo(void 0), u = o(() => gx(l.data), [l.data]);
|
|
41967
41967
|
return !i && c.length <= 1 ? null : /* @__PURE__ */ y("div", {
|
|
41968
41968
|
className: "flex h-7 items-center gap-1.5",
|
|
41969
41969
|
children: [
|
|
@@ -41975,13 +41975,13 @@ function Gk({ selectedNodeId: e, onSelect: t, label: n = "Node", hideIcon: r = !
|
|
|
41975
41975
|
/* @__PURE__ */ v("div", {
|
|
41976
41976
|
className: "flex h-7 overflow-hidden rounded-md border border-border text-xs font-medium",
|
|
41977
41977
|
children: c.map((n, r) => {
|
|
41978
|
-
let i = e === n.id, o =
|
|
41978
|
+
let i = e === n.id, o = _x(u, n.id), c = !a && !n.isOnline;
|
|
41979
41979
|
return /* @__PURE__ */ v("button", {
|
|
41980
41980
|
type: "button",
|
|
41981
41981
|
onClick: () => t(n.id),
|
|
41982
41982
|
disabled: c,
|
|
41983
41983
|
title: n.isOnline ? n.name : s("uiLibrary.nodePicker.offline", "{{name}} (offline)", { name: n.name }),
|
|
41984
|
-
className: B("inline-flex h-7 items-center px-2.5 transition-colors", i ? B(
|
|
41984
|
+
className: B("inline-flex h-7 items-center px-2.5 transition-colors", i ? B(mx(o), px(o)) : B("bg-transparent hover:bg-surface-hover", px(o), !c && "opacity-70 hover:opacity-100"), r > 0 && "border-l border-border", c && "cursor-not-allowed opacity-50"),
|
|
41985
41985
|
children: n.shortName
|
|
41986
41986
|
}, n.id);
|
|
41987
41987
|
})
|
|
@@ -44557,7 +44557,7 @@ function dN({ preSelectors: e = [], catalog: t, value: n, onChange: r, title: i,
|
|
|
44557
44557
|
})]
|
|
44558
44558
|
}),
|
|
44559
44559
|
h ? a : null,
|
|
44560
|
-
/* @__PURE__ */ v(
|
|
44560
|
+
/* @__PURE__ */ v(sb, {
|
|
44561
44561
|
catalog: l,
|
|
44562
44562
|
value: f,
|
|
44563
44563
|
onChange: (t) => {
|
|
@@ -46106,7 +46106,7 @@ function pP({ seeds: e, nodeId: t, busyKey: n, selectedByFamily: r, onSelectFami
|
|
|
46106
46106
|
children: s
|
|
46107
46107
|
})]
|
|
46108
46108
|
}),
|
|
46109
|
-
/* @__PURE__ */ v(
|
|
46109
|
+
/* @__PURE__ */ v(sb, {
|
|
46110
46110
|
catalog: o,
|
|
46111
46111
|
value: s,
|
|
46112
46112
|
onChange: (t) => i(e.family, t)
|
|
@@ -46876,13 +46876,13 @@ function NP({ trpc: e, onRegistered: t, initialPrefill: n = null, onPrefillConsu
|
|
|
46876
46876
|
function PP(e, t, n, r, i) {
|
|
46877
46877
|
if (r == null || O(t)) return [];
|
|
46878
46878
|
let a = [];
|
|
46879
|
-
for (let o of e) o.enabled && i.has(o.format) &&
|
|
46879
|
+
for (let o of e) o.enabled && i.has(o.format) && mb(r.models, o.format) && hb({
|
|
46880
46880
|
catalog: r,
|
|
46881
46881
|
device: o,
|
|
46882
46882
|
base: o.steps?.[t]?.modelId
|
|
46883
46883
|
}) === n && a.push({
|
|
46884
46884
|
deviceKey: o.key,
|
|
46885
|
-
label:
|
|
46885
|
+
label: ab(o),
|
|
46886
46886
|
format: o.format
|
|
46887
46887
|
});
|
|
46888
46888
|
return a;
|
|
@@ -46933,7 +46933,7 @@ function RP(e, t, n, r, i) {
|
|
|
46933
46933
|
//#endregion
|
|
46934
46934
|
//#region src/ui/installed-inventory.ts
|
|
46935
46935
|
function zP(e) {
|
|
46936
|
-
return
|
|
46936
|
+
return ab(e);
|
|
46937
46937
|
}
|
|
46938
46938
|
function BP(e) {
|
|
46939
46939
|
return e.map((e) => ({
|
|
@@ -47172,13 +47172,13 @@ function aF({ trpc: e, nodeId: t, stepId: n, modelId: r, modelName: a, devices:
|
|
|
47172
47172
|
" ",
|
|
47173
47173
|
/* @__PURE__ */ v("span", {
|
|
47174
47174
|
className: "font-medium text-foreground",
|
|
47175
|
-
children:
|
|
47175
|
+
children: ib(C)
|
|
47176
47176
|
})
|
|
47177
47177
|
]
|
|
47178
47178
|
}), _ === null ? /* @__PURE__ */ v("p", {
|
|
47179
47179
|
className: "text-xs text-foreground-subtle animate-pulse",
|
|
47180
47180
|
children: d("settingsModal.loadingSchema")
|
|
47181
|
-
}) : /* @__PURE__ */ v(
|
|
47181
|
+
}) : /* @__PURE__ */ v(Jb, {
|
|
47182
47182
|
addon: _,
|
|
47183
47183
|
agentDefault: x,
|
|
47184
47184
|
engineFormat: C?.format ?? "onnx",
|
|
@@ -47389,7 +47389,7 @@ function pF({ step: e, current: t, inputs: n, onChange: r }) {
|
|
|
47389
47389
|
}),
|
|
47390
47390
|
/* @__PURE__ */ v("div", {
|
|
47391
47391
|
className: "p-2 sm:p-3",
|
|
47392
|
-
children: /* @__PURE__ */ v(
|
|
47392
|
+
children: /* @__PURE__ */ v(Mx, {
|
|
47393
47393
|
columns: s,
|
|
47394
47394
|
rows: u,
|
|
47395
47395
|
rowKey: (e) => e.key,
|
|
@@ -47796,7 +47796,7 @@ function PF({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onE
|
|
|
47796
47796
|
}
|
|
47797
47797
|
});
|
|
47798
47798
|
};
|
|
47799
|
-
return /* @__PURE__ */ v(
|
|
47799
|
+
return /* @__PURE__ */ v(Mx, {
|
|
47800
47800
|
columns: [
|
|
47801
47801
|
{
|
|
47802
47802
|
key: "model",
|
|
@@ -48264,15 +48264,15 @@ function QF({ trpc: e }) {
|
|
|
48264
48264
|
return /* @__PURE__ */ v(BM, { children: /* @__PURE__ */ y(Kk, {
|
|
48265
48265
|
icon: zt,
|
|
48266
48266
|
title: n("page.title"),
|
|
48267
|
-
children: [/* @__PURE__ */ v(
|
|
48267
|
+
children: [/* @__PURE__ */ v(sx, {
|
|
48268
48268
|
value: c,
|
|
48269
48269
|
onValueChange: (e) => {
|
|
48270
48270
|
(e === "catalog" || e === "installed" || e === "import" || e === "logs") && b(e);
|
|
48271
48271
|
},
|
|
48272
|
-
children: /* @__PURE__ */ v(
|
|
48272
|
+
children: /* @__PURE__ */ v(cx, {
|
|
48273
48273
|
"aria-label": n("page.sections"),
|
|
48274
48274
|
onKeyDown: S,
|
|
48275
|
-
children: JF.map((e) => /* @__PURE__ */ v(
|
|
48275
|
+
children: JF.map((e) => /* @__PURE__ */ v(lx, {
|
|
48276
48276
|
id: XF(e.id),
|
|
48277
48277
|
value: e.id,
|
|
48278
48278
|
"aria-controls": ZF(e.id),
|