@llmnative/react 1.12.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +760 -746
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/Theme.d.ts +15 -0
- package/dist/types/src/components/ui/fields/CodeEditor.d.ts +12 -0
- package/package.json +1 -1
- package/themes/cyber.ts +5 -0
- package/themes/default.ts +5 -0
- package/themes/flat.ts +5 -0
package/dist/index.mjs
CHANGED
|
@@ -1047,6 +1047,11 @@ var Kt = {
|
|
|
1047
1047
|
Prompt: {
|
|
1048
1048
|
wrapperClassName: "",
|
|
1049
1049
|
className: ""
|
|
1050
|
+
},
|
|
1051
|
+
Repeat: {
|
|
1052
|
+
itemClassName: "",
|
|
1053
|
+
inlineItemClassName: "",
|
|
1054
|
+
addButtonClassName: ""
|
|
1050
1055
|
}
|
|
1051
1056
|
}, Yt = {
|
|
1052
1057
|
preset: Kt,
|
|
@@ -1589,6 +1594,11 @@ var Kt = {
|
|
|
1589
1594
|
Prompt: {
|
|
1590
1595
|
wrapperClassName: "",
|
|
1591
1596
|
className: ""
|
|
1597
|
+
},
|
|
1598
|
+
Repeat: {
|
|
1599
|
+
itemClassName: "",
|
|
1600
|
+
inlineItemClassName: "",
|
|
1601
|
+
addButtonClassName: ""
|
|
1592
1602
|
}
|
|
1593
1603
|
}
|
|
1594
1604
|
}, Zt = {
|
|
@@ -2128,6 +2138,11 @@ var Kt = {
|
|
|
2128
2138
|
Prompt: {
|
|
2129
2139
|
wrapperClassName: "",
|
|
2130
2140
|
className: ""
|
|
2141
|
+
},
|
|
2142
|
+
Repeat: {
|
|
2143
|
+
itemClassName: "",
|
|
2144
|
+
inlineItemClassName: "",
|
|
2145
|
+
addButtonClassName: ""
|
|
2131
2146
|
}
|
|
2132
2147
|
}
|
|
2133
2148
|
}, Qt = {
|
|
@@ -3744,7 +3759,7 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3744
3759
|
}))
|
|
3745
3760
|
}, e);
|
|
3746
3761
|
}, Ii = ({ menuKey: e, as: n = "ul", badges: r = {}, before: i = void 0, after: a = void 0, wrapperClassName: o = void 0, className: s = void 0, headerClassName: c = void 0, itemClassName: u = void 0, linkClassName: d = void 0, iconClassName: f = void 0, textClassName: p = void 0, badgeClassName: m = void 0, arrowClassName: g = void 0, submenuClassName: _ = void 0 }) => {
|
|
3747
|
-
let y =
|
|
3762
|
+
let y = Hh(e), b = Y("menu"), x = ({ item: e, index: i }) => {
|
|
3748
3763
|
let [a, o] = h(e.active);
|
|
3749
3764
|
l(() => {
|
|
3750
3765
|
o(e.active);
|
|
@@ -9588,46 +9603,44 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9588
9603
|
}), e.focus();
|
|
9589
9604
|
}
|
|
9590
9605
|
} : null;
|
|
9591
|
-
}, Mu = ({ name: e, onChange: n = void 0, defaultValue: r = void 0, className: i = void 0, label: a, language: o = "html", placeholder: c, minHeight: d, maxHeight: f, required: p, disabled: g, feedback: _, labelClassName: v, validateSyntax: y = !0,
|
|
9592
|
-
let
|
|
9606
|
+
}, Mu = ({ name: e, onChange: n = void 0, defaultValue: r = void 0, className: i = void 0, label: a, language: o = "html", placeholder: c, minHeight: d, maxHeight: f, required: p, disabled: g, feedback: _, labelClassName: v, validateSyntax: y = !0, validate: b, validator: x, extensions: S, commands: C, commandsTrigger: w, wrapperClassName: T, inheritWrapperClassName: E = !0, before: D, after: O }) => {
|
|
9607
|
+
let k = u(), A = Y("CodeEditor"), j = ts({
|
|
9593
9608
|
minHeight: d,
|
|
9594
9609
|
maxHeight: f
|
|
9595
|
-
}), { value:
|
|
9610
|
+
}), { value: M, handleChange: N, formWrapClass: P } = Dd({
|
|
9596
9611
|
name: e,
|
|
9597
9612
|
onChange: n,
|
|
9598
9613
|
defaultValue: r,
|
|
9599
|
-
wrapperClassName:
|
|
9600
|
-
inheritWrapperClassName:
|
|
9601
|
-
}),
|
|
9614
|
+
wrapperClassName: T,
|
|
9615
|
+
inheritWrapperClassName: E
|
|
9616
|
+
}), F = Ed(e, {
|
|
9602
9617
|
required: p,
|
|
9603
9618
|
label: a,
|
|
9604
9619
|
validator: async (e) => {
|
|
9605
9620
|
let t = typeof e == "string" ? e : `${e ?? ""}`;
|
|
9606
|
-
if (y)
|
|
9607
|
-
await
|
|
9608
|
-
|
|
9609
|
-
if (e instanceof pu) return e.message;
|
|
9610
|
-
throw e;
|
|
9621
|
+
if (y) {
|
|
9622
|
+
let e = b ? await b(t) : await Cu(t, o);
|
|
9623
|
+
if (!e.valid) return e.error?.message ?? `Invalid ${o} code.`;
|
|
9611
9624
|
}
|
|
9612
|
-
return await
|
|
9625
|
+
return await x?.(e);
|
|
9613
9626
|
}
|
|
9614
|
-
}),
|
|
9627
|
+
}), I = m(null), L = m(null), R = m(null), [z, B] = h(!0), [V, H] = h({
|
|
9615
9628
|
open: !1,
|
|
9616
9629
|
query: "",
|
|
9617
9630
|
anchorPosition: null,
|
|
9618
9631
|
editorContext: null
|
|
9619
|
-
}),
|
|
9620
|
-
|
|
9621
|
-
let
|
|
9632
|
+
}), U = m(M ?? ""), W = m(V);
|
|
9633
|
+
W.current = V;
|
|
9634
|
+
let ee = C?.length ? w ?? "/" : void 0, G = (C?.length ?? 0) >= 10, te = t.useMemo(() => new Map((C ?? []).map((e) => [e.name, e])), [C]), ne = t.useMemo(() => (C ?? []).map((e) => ({
|
|
9622
9635
|
key: e.name,
|
|
9623
|
-
label: `${
|
|
9636
|
+
label: `${ee ?? "/"}${e.name}`,
|
|
9624
9637
|
value: e.name,
|
|
9625
9638
|
icon: e.icon,
|
|
9626
9639
|
description: e.description,
|
|
9627
9640
|
group: e.group
|
|
9628
|
-
})), [
|
|
9641
|
+
})), [C, ee]), re = t.useMemo(() => {
|
|
9629
9642
|
let e = [], n;
|
|
9630
|
-
return
|
|
9643
|
+
return ne.forEach((r) => {
|
|
9631
9644
|
r.group !== n && (n = r.group, r.group && e.push(/* @__PURE__ */ t.createElement(Bl.Heading, { key: `group:${r.group}` }, r.group))), e.push(/* @__PURE__ */ t.createElement(Bl.Item, {
|
|
9632
9645
|
key: r.key,
|
|
9633
9646
|
label: r.label,
|
|
@@ -9636,26 +9649,26 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9636
9649
|
description: r.description
|
|
9637
9650
|
}));
|
|
9638
9651
|
}), e;
|
|
9639
|
-
}, [
|
|
9652
|
+
}, [ne]);
|
|
9640
9653
|
l(() => {
|
|
9641
|
-
|
|
9642
|
-
}, [
|
|
9643
|
-
let
|
|
9644
|
-
|
|
9654
|
+
L.current || (U.current = M ?? "");
|
|
9655
|
+
}, [M]);
|
|
9656
|
+
let K = s((t) => {
|
|
9657
|
+
U.current = t, N({ target: {
|
|
9645
9658
|
name: e,
|
|
9646
9659
|
value: t
|
|
9647
9660
|
} });
|
|
9648
|
-
}, [
|
|
9649
|
-
|
|
9650
|
-
let
|
|
9651
|
-
|
|
9661
|
+
}, [N, e]), ie = m(K);
|
|
9662
|
+
ie.current = K;
|
|
9663
|
+
let ae = s(() => {
|
|
9664
|
+
H({
|
|
9652
9665
|
open: !1,
|
|
9653
9666
|
query: "",
|
|
9654
9667
|
anchorPosition: null,
|
|
9655
9668
|
editorContext: null
|
|
9656
9669
|
});
|
|
9657
|
-
}, []),
|
|
9658
|
-
let n =
|
|
9670
|
+
}, []), oe = s(async (e, t) => {
|
|
9671
|
+
let n = te.get(e.value);
|
|
9659
9672
|
if (n) {
|
|
9660
9673
|
if (n.handler) {
|
|
9661
9674
|
let e = await n.handler(Ll(t)), r = n.consumeSuffix ? Pl(t.textAfterCaret, n.consumeSuffix) : 0;
|
|
@@ -9664,11 +9677,11 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9664
9677
|
}
|
|
9665
9678
|
t.replace(t.triggerRange.start, t.triggerRange.end, `${t.trigger}${n.name} `);
|
|
9666
9679
|
}
|
|
9667
|
-
}, [
|
|
9680
|
+
}, [te]);
|
|
9668
9681
|
l(() => {
|
|
9669
9682
|
let e = !1, t = null;
|
|
9670
9683
|
return Ou(o).then((n) => {
|
|
9671
|
-
if (e || !
|
|
9684
|
+
if (e || !I.current) return;
|
|
9672
9685
|
let r = n.EditorView.theme({
|
|
9673
9686
|
"&": {
|
|
9674
9687
|
backgroundColor: "hsl(var(--rf-background))",
|
|
@@ -9714,23 +9727,23 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9714
9727
|
n.language,
|
|
9715
9728
|
r,
|
|
9716
9729
|
n.EditorView.updateListener.of((e) => {
|
|
9717
|
-
e.docChanged &&
|
|
9730
|
+
e.docChanged && ie.current(e.state.doc.toString());
|
|
9718
9731
|
}),
|
|
9719
|
-
...
|
|
9732
|
+
...S ?? []
|
|
9720
9733
|
];
|
|
9721
|
-
|
|
9734
|
+
ee && i.push(n.EditorView.updateListener.of((e) => {
|
|
9722
9735
|
let t = e.state.selection.main;
|
|
9723
9736
|
if (t.from !== t.to) {
|
|
9724
|
-
|
|
9737
|
+
W.current.open && ae();
|
|
9725
9738
|
return;
|
|
9726
9739
|
}
|
|
9727
|
-
let n = Au(e.state.doc.toString(), t.from,
|
|
9740
|
+
let n = Au(e.state.doc.toString(), t.from, ee);
|
|
9728
9741
|
if (!n) {
|
|
9729
|
-
|
|
9742
|
+
W.current.open && ae();
|
|
9730
9743
|
return;
|
|
9731
9744
|
}
|
|
9732
|
-
let r = e.view.coordsAtPos(t.from), i = ju(e.view,
|
|
9733
|
-
!r || !i ||
|
|
9745
|
+
let r = e.view.coordsAtPos(t.from), i = ju(e.view, ee);
|
|
9746
|
+
!r || !i || H({
|
|
9734
9747
|
open: !0,
|
|
9735
9748
|
query: n.query,
|
|
9736
9749
|
anchorPosition: {
|
|
@@ -9742,102 +9755,102 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9742
9755
|
}), n.Prec.highest(n.keymap.of([
|
|
9743
9756
|
{
|
|
9744
9757
|
key: "ArrowDown",
|
|
9745
|
-
run: () =>
|
|
9758
|
+
run: () => W.current.open ? (R.current?.moveNext(), !0) : !1
|
|
9746
9759
|
},
|
|
9747
9760
|
{
|
|
9748
9761
|
key: "ArrowUp",
|
|
9749
|
-
run: () =>
|
|
9762
|
+
run: () => W.current.open ? (R.current?.movePrev(), !0) : !1
|
|
9750
9763
|
},
|
|
9751
9764
|
{
|
|
9752
9765
|
key: "Enter",
|
|
9753
|
-
run: () =>
|
|
9766
|
+
run: () => W.current.open ? (R.current?.selectActive(), !0) : !1
|
|
9754
9767
|
},
|
|
9755
9768
|
{
|
|
9756
9769
|
key: "Tab",
|
|
9757
|
-
run: () =>
|
|
9770
|
+
run: () => W.current.open ? (R.current?.selectActive(), !0) : !1
|
|
9758
9771
|
},
|
|
9759
9772
|
{
|
|
9760
9773
|
key: "Escape",
|
|
9761
|
-
run: () =>
|
|
9774
|
+
run: () => W.current.open ? (R.current?.close(), !0) : !1
|
|
9762
9775
|
}
|
|
9763
9776
|
])), n.EditorView.domEventHandlers({ keydown: (e) => {
|
|
9764
|
-
if (!
|
|
9777
|
+
if (!W.current.open) return !1;
|
|
9765
9778
|
switch (e.key) {
|
|
9766
|
-
case "ArrowDown": return e.preventDefault(),
|
|
9767
|
-
case "ArrowUp": return e.preventDefault(),
|
|
9779
|
+
case "ArrowDown": return e.preventDefault(), R.current?.moveNext(), !0;
|
|
9780
|
+
case "ArrowUp": return e.preventDefault(), R.current?.movePrev(), !0;
|
|
9768
9781
|
case "Enter":
|
|
9769
|
-
case "Tab": return e.preventDefault(),
|
|
9770
|
-
case "Escape": return e.preventDefault(),
|
|
9782
|
+
case "Tab": return e.preventDefault(), R.current?.selectActive(), !0;
|
|
9783
|
+
case "Escape": return e.preventDefault(), R.current?.close(), !0;
|
|
9771
9784
|
default: return !1;
|
|
9772
9785
|
}
|
|
9773
9786
|
} })), g && i.push(n.EditorView.editable.of(!1));
|
|
9774
9787
|
let a = n.EditorState.create({
|
|
9775
|
-
doc:
|
|
9788
|
+
doc: U.current,
|
|
9776
9789
|
extensions: i
|
|
9777
9790
|
});
|
|
9778
9791
|
t = new n.EditorView({
|
|
9779
9792
|
state: a,
|
|
9780
|
-
parent:
|
|
9781
|
-
}), ku(t.scrollDOM,
|
|
9793
|
+
parent: I.current
|
|
9794
|
+
}), ku(t.scrollDOM, j), L.current = t, B(!1);
|
|
9782
9795
|
}).catch((t) => {
|
|
9783
|
-
e || (console.error("[CodeEditor] Failed to load CodeMirror:", t),
|
|
9796
|
+
e || (console.error("[CodeEditor] Failed to load CodeMirror:", t), B(!1));
|
|
9784
9797
|
}), () => {
|
|
9785
|
-
e = !0, t && (t.destroy(),
|
|
9798
|
+
e = !0, t && (t.destroy(), L.current = null);
|
|
9786
9799
|
};
|
|
9787
9800
|
}, [
|
|
9788
|
-
|
|
9789
|
-
|
|
9801
|
+
ae,
|
|
9802
|
+
S,
|
|
9790
9803
|
g,
|
|
9791
9804
|
o,
|
|
9792
9805
|
c,
|
|
9793
|
-
|
|
9806
|
+
ee
|
|
9794
9807
|
]), l(() => {
|
|
9795
|
-
let e =
|
|
9796
|
-
t && e !==
|
|
9808
|
+
let e = M ?? "", t = L.current;
|
|
9809
|
+
t && e !== U.current && (U.current = e, t.dispatch({ changes: {
|
|
9797
9810
|
from: 0,
|
|
9798
9811
|
to: t.state.doc.length,
|
|
9799
9812
|
insert: e
|
|
9800
9813
|
} }));
|
|
9801
|
-
}, [
|
|
9802
|
-
let e =
|
|
9803
|
-
e && ku(e.scrollDOM,
|
|
9814
|
+
}, [M]), l(() => {
|
|
9815
|
+
let e = L.current;
|
|
9816
|
+
e && ku(e.scrollDOM, j);
|
|
9804
9817
|
}, [
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9818
|
+
j.fill,
|
|
9819
|
+
j.resolvedMinHeight,
|
|
9820
|
+
j.resolvedMaxHeight
|
|
9808
9821
|
]);
|
|
9809
|
-
let
|
|
9810
|
-
style: { minHeight:
|
|
9822
|
+
let se = X("w-full overflow-hidden border border-input", A.CodeEditor?.className, i, z && "flex items-center justify-center bg-muted text-muted-foreground text-sm", F && "border-destructive", D ? "rounded-l-none" : "rounded-l-md", O ? "rounded-r-none" : "rounded-r-md"), ce = /* @__PURE__ */ t.createElement("div", { className: X("min-w-0 flex-1", j.fill && "h-full flex flex-col", se) }, z && /* @__PURE__ */ t.createElement("div", {
|
|
9823
|
+
style: { minHeight: j.fill ? void 0 : j.resolvedMinHeight },
|
|
9811
9824
|
className: "flex items-center justify-center"
|
|
9812
9825
|
}, /* @__PURE__ */ t.createElement(Q, {
|
|
9813
9826
|
name: "loader-circle",
|
|
9814
9827
|
size: 16,
|
|
9815
9828
|
className: "animate-spin text-muted-foreground"
|
|
9816
9829
|
})), /* @__PURE__ */ t.createElement("div", {
|
|
9817
|
-
ref:
|
|
9818
|
-
className: X(
|
|
9830
|
+
ref: I,
|
|
9831
|
+
className: X(z && "hidden", j.fill && "h-full min-h-0 flex-1")
|
|
9819
9832
|
}));
|
|
9820
|
-
return /* @__PURE__ */ t.createElement(Z, { className: X(
|
|
9833
|
+
return /* @__PURE__ */ t.createElement(Z, { className: X(P, j.fill && "h-full flex flex-col min-h-0", A.CodeEditor?.wrapperClassName) }, a && /* @__PURE__ */ t.createElement(Ns, {
|
|
9821
9834
|
label: a,
|
|
9822
9835
|
required: p,
|
|
9823
|
-
htmlFor:
|
|
9836
|
+
htmlFor: k,
|
|
9824
9837
|
className: v
|
|
9825
|
-
}), /* @__PURE__ */ t.createElement("div", { className: X(
|
|
9826
|
-
ref:
|
|
9827
|
-
className: X(
|
|
9828
|
-
trigger:
|
|
9829
|
-
searchable:
|
|
9830
|
-
controlled:
|
|
9831
|
-
open:
|
|
9832
|
-
anchorPosition:
|
|
9833
|
-
query:
|
|
9834
|
-
editorContext:
|
|
9835
|
-
onClose:
|
|
9838
|
+
}), /* @__PURE__ */ t.createElement("div", { className: X(D || O ? os : "", j.fill && "flex-1 min-h-0 flex flex-col") }, D && /* @__PURE__ */ t.createElement("span", { className: X("inline-flex shrink-0 items-center border border-input bg-muted px-3 py-1 text-sm text-muted-foreground", "rounded-l-md rounded-r-none border-r-0") }, D), ee && ne.length > 0 ? /* @__PURE__ */ t.createElement(Bl, {
|
|
9839
|
+
ref: R,
|
|
9840
|
+
className: X(j.fill && "flex-1 min-h-0 flex flex-col"),
|
|
9841
|
+
trigger: ee,
|
|
9842
|
+
searchable: G,
|
|
9843
|
+
controlled: V.editorContext ? {
|
|
9844
|
+
open: V.open,
|
|
9845
|
+
anchorPosition: V.anchorPosition,
|
|
9846
|
+
query: V.query,
|
|
9847
|
+
editorContext: V.editorContext,
|
|
9848
|
+
onClose: ae
|
|
9836
9849
|
} : void 0,
|
|
9837
9850
|
onSelect: (e, t) => {
|
|
9838
|
-
|
|
9851
|
+
oe(e, t);
|
|
9839
9852
|
}
|
|
9840
|
-
},
|
|
9853
|
+
}, re, ce) : ce, O && /* @__PURE__ */ t.createElement("span", { className: X("inline-flex shrink-0 items-center border border-input bg-muted px-3 py-1 text-sm text-muted-foreground", "rounded-l-none rounded-r-md border-l-0") }, O)), F && /* @__PURE__ */ t.createElement(hs, { message: F }), _ && /* @__PURE__ */ t.createElement("p", { className: "mt-1 text-xs text-muted-foreground" }, _));
|
|
9841
9854
|
}, Nu = () => Promise.all([
|
|
9842
9855
|
import("@tiptap/react"),
|
|
9843
9856
|
import("@tiptap/react/menus"),
|
|
@@ -12434,68 +12447,69 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12434
12447
|
onKeyDownCapture: Ue,
|
|
12435
12448
|
onKeyDown: Ue
|
|
12436
12449
|
}, Ye));
|
|
12437
|
-
}, Rd = "
|
|
12450
|
+
}, Rd = "flex items-center justify-between gap-3 border-b border-border/50 px-3 py-2", zd = "text-xs font-medium uppercase tracking-[0.14em] text-muted-foreground", Bd = "px-3 py-3", Vd = "h-7 w-7 rounded-md bg-transparent p-0 text-muted-foreground hover:bg-destructive/10 hover:text-destructive", Hd = ({ name: e, children: n, onChange: r, onAdd: i, onRemove: a, className: o, layout: s = "horizontal", minItems: c = void 0, maxItems: l = void 0, label: u = void 0, labelPosition: d = "top", hideRemoveButton: f = !1, readOnly: m = !1 }) => {
|
|
12438
12451
|
let { value: h, handleChange: g } = Dd({
|
|
12439
12452
|
name: e,
|
|
12440
12453
|
onChange: r
|
|
12441
|
-
}), _ = Array.isArray(h) ? h : [], v = (t, r) => Ad({
|
|
12454
|
+
}), _ = Array.isArray(h) ? h : [], v = Y("repeat"), y = X("rounded-xl border border-border/60 bg-card/80 shadow-sm", v.Repeat.itemClassName), b = (t, r) => Ad({
|
|
12442
12455
|
children: typeof n == "function" ? n({
|
|
12443
12456
|
record: _[t],
|
|
12444
12457
|
records: _,
|
|
12445
12458
|
index: t,
|
|
12446
|
-
remove: () =>
|
|
12459
|
+
remove: () => w(t)
|
|
12447
12460
|
}) : n,
|
|
12448
12461
|
parentName: `${e}.${t}`,
|
|
12449
12462
|
wrapperClassName: r
|
|
12450
|
-
}),
|
|
12463
|
+
}), x = (e, n) => {
|
|
12451
12464
|
switch (s) {
|
|
12452
|
-
case "horizontal": return /* @__PURE__ */ t.createElement("div", { className:
|
|
12453
|
-
className:
|
|
12465
|
+
case "horizontal": return /* @__PURE__ */ t.createElement("div", { className: y }, /* @__PURE__ */ t.createElement("div", { className: Rd }, /* @__PURE__ */ t.createElement("span", { className: zd }, "#", e + 1), n && !f ? /* @__PURE__ */ t.createElement(Hr, {
|
|
12466
|
+
className: Vd,
|
|
12454
12467
|
icon: "x",
|
|
12455
|
-
onClick: () =>
|
|
12468
|
+
onClick: () => w(e)
|
|
12456
12469
|
}) : /* @__PURE__ */ t.createElement("span", {
|
|
12457
12470
|
className: "h-7 w-7",
|
|
12458
12471
|
"aria-hidden": "true"
|
|
12459
|
-
})), /* @__PURE__ */ t.createElement("div", { className:
|
|
12472
|
+
})), /* @__PURE__ */ t.createElement("div", { className: Bd }, b(e)));
|
|
12460
12473
|
case "vertical": return /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
12461
|
-
case "inline": return /* @__PURE__ */ t.createElement("div", { className: X(
|
|
12462
|
-
className: X(
|
|
12474
|
+
case "inline": return /* @__PURE__ */ t.createElement("div", { className: X(y, "px-3 py-2", v.Repeat.inlineItemClassName) }, /* @__PURE__ */ t.createElement("div", { className: "flex items-start gap-2" }, /* @__PURE__ */ t.createElement("div", { className: "flex-1 min-w-0" }, b(e, "!mb-0")), n && !f && /* @__PURE__ */ t.createElement(Hr, {
|
|
12475
|
+
className: X(Vd, "mt-1 shrink-0"),
|
|
12463
12476
|
icon: "x",
|
|
12464
|
-
onClick: () =>
|
|
12477
|
+
onClick: () => w(e)
|
|
12465
12478
|
})));
|
|
12466
12479
|
}
|
|
12467
|
-
},
|
|
12480
|
+
}, S = (_.length > 0 ? _ : Array.from({ length: c || 0 }, () => ({})))?.map((n, r) => {
|
|
12468
12481
|
let i = !m && r >= (c || 0);
|
|
12469
|
-
return /* @__PURE__ */ t.createElement(t.Fragment, { key: `${e}-${r}` },
|
|
12470
|
-
}),
|
|
12471
|
-
let t = _.length > 0 ? [..._, {}] : Array.from({ length:
|
|
12482
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, { key: `${e}-${r}` }, x(r, i));
|
|
12483
|
+
}), C = () => {
|
|
12484
|
+
let t = _.length > 0 ? [..._, {}] : Array.from({ length: S.length + 1 }, () => ({}));
|
|
12472
12485
|
i?.(t), g({ target: {
|
|
12473
12486
|
name: `${e}.${t.length - 1}`,
|
|
12474
12487
|
value: {}
|
|
12475
12488
|
} });
|
|
12476
|
-
},
|
|
12489
|
+
}, w = (t) => {
|
|
12477
12490
|
a?.(t), g({ target: { name: `${e}.${t}` } });
|
|
12478
|
-
},
|
|
12491
|
+
}, T = p(() => m ? null : !l || S.length < l ? u && d === "bottom" ? /* @__PURE__ */ t.createElement(Hr, {
|
|
12479
12492
|
icon: "plus",
|
|
12480
12493
|
label: u,
|
|
12481
12494
|
variant: "link",
|
|
12482
|
-
className: "w-full justify-start gap-1 rounded-lg border border-dashed border-border/60 px-3 py-2 text-sm text-muted-foreground hover:border-border hover:bg-muted/40 hover:text-foreground",
|
|
12483
|
-
onClick:
|
|
12495
|
+
className: X("w-full justify-start gap-1 rounded-lg border border-dashed border-border/60 px-3 py-2 text-sm text-muted-foreground hover:border-border hover:bg-muted/40 hover:text-foreground", v.Repeat.addButtonClassName),
|
|
12496
|
+
onClick: C
|
|
12484
12497
|
}) : /* @__PURE__ */ t.createElement(Hr, {
|
|
12485
12498
|
icon: "plus",
|
|
12486
12499
|
label: u ? void 0 : "Add",
|
|
12487
12500
|
variant: u ? "link" : "secondary",
|
|
12488
|
-
className: u ? "h-8 w-8 rounded-lg p-0 text-muted-foreground hover:bg-muted/50 hover:text-foreground" : void 0,
|
|
12489
|
-
onClick:
|
|
12501
|
+
className: u ? X("h-8 w-8 rounded-lg p-0 text-muted-foreground hover:bg-muted/50 hover:text-foreground", v.Repeat.addButtonClassName) : void 0,
|
|
12502
|
+
onClick: C
|
|
12490
12503
|
}) : null, [
|
|
12491
12504
|
m,
|
|
12492
12505
|
l,
|
|
12493
|
-
|
|
12506
|
+
S.length,
|
|
12494
12507
|
u,
|
|
12495
|
-
d
|
|
12508
|
+
d,
|
|
12509
|
+
v.Repeat.addButtonClassName
|
|
12496
12510
|
]);
|
|
12497
|
-
return /* @__PURE__ */ t.createElement("div", { className: X("space-y-3", o) }, u && d === "top" && /* @__PURE__ */ t.createElement("div", { className: "flex items-center justify-between gap-3" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, u),
|
|
12498
|
-
},
|
|
12511
|
+
return /* @__PURE__ */ t.createElement("div", { className: X("space-y-3", o) }, u && d === "top" && /* @__PURE__ */ t.createElement("div", { className: "flex items-center justify-between gap-3" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, u), T), S, !u && T, u && d === "bottom" && T);
|
|
12512
|
+
}, Ud = {
|
|
12499
12513
|
default: {
|
|
12500
12514
|
shellClassName: "space-y-4",
|
|
12501
12515
|
menuClassName: "flex flex-wrap items-end gap-2 border-b border-border/70",
|
|
@@ -12542,19 +12556,19 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12542
12556
|
inactiveTriggerClassName: "text-muted-foreground hover:bg-background/80 hover:text-foreground"
|
|
12543
12557
|
}
|
|
12544
12558
|
};
|
|
12545
|
-
function
|
|
12546
|
-
return
|
|
12559
|
+
function Wd(e) {
|
|
12560
|
+
return Ud[e];
|
|
12547
12561
|
}
|
|
12548
|
-
function
|
|
12549
|
-
let r =
|
|
12562
|
+
function Gd(e, t, n) {
|
|
12563
|
+
let r = Wd(e), i = Y("tab");
|
|
12550
12564
|
return X("cursor-pointer", r.triggerClassName, i.Tab.triggerClassName, t ? r.activeTriggerClassName : r.inactiveTriggerClassName, t ? i.Tab.activeTriggerClassName : i.Tab.inactiveTriggerClassName, n);
|
|
12551
12565
|
}
|
|
12552
|
-
function
|
|
12566
|
+
function Kd(e) {
|
|
12553
12567
|
return X("min-h-0 min-w-0 h-full overflow-x-hidden overflow-y-auto", Y("tab").Tab.contentClassName, e);
|
|
12554
12568
|
}
|
|
12555
|
-
var
|
|
12569
|
+
var qd = {
|
|
12556
12570
|
default: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
|
|
12557
|
-
let a =
|
|
12571
|
+
let a = Wd("default"), o = Y("tab");
|
|
12558
12572
|
return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", {
|
|
12559
12573
|
role: "tablist",
|
|
12560
12574
|
"aria-orientation": "horizontal",
|
|
@@ -12562,7 +12576,7 @@ var Jd = {
|
|
|
12562
12576
|
}, e), /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n));
|
|
12563
12577
|
},
|
|
12564
12578
|
top: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
|
|
12565
|
-
let a =
|
|
12579
|
+
let a = Wd("top"), o = Y("tab");
|
|
12566
12580
|
return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", {
|
|
12567
12581
|
role: "tablist",
|
|
12568
12582
|
"aria-orientation": "horizontal",
|
|
@@ -12570,7 +12584,7 @@ var Jd = {
|
|
|
12570
12584
|
}, e), /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n));
|
|
12571
12585
|
},
|
|
12572
12586
|
left: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
|
|
12573
|
-
let a =
|
|
12587
|
+
let a = Wd("left"), o = Y("tab");
|
|
12574
12588
|
return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", {
|
|
12575
12589
|
role: "tablist",
|
|
12576
12590
|
"aria-orientation": "vertical",
|
|
@@ -12578,7 +12592,7 @@ var Jd = {
|
|
|
12578
12592
|
}, e), /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n));
|
|
12579
12593
|
},
|
|
12580
12594
|
right: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
|
|
12581
|
-
let a =
|
|
12595
|
+
let a = Wd("right"), o = Y("tab");
|
|
12582
12596
|
return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", {
|
|
12583
12597
|
role: "tablist",
|
|
12584
12598
|
"aria-orientation": "vertical",
|
|
@@ -12586,23 +12600,23 @@ var Jd = {
|
|
|
12586
12600
|
}, e), /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n));
|
|
12587
12601
|
},
|
|
12588
12602
|
bottom: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
|
|
12589
|
-
let a =
|
|
12603
|
+
let a = Wd("bottom"), o = Y("tab");
|
|
12590
12604
|
return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n), /* @__PURE__ */ t.createElement("div", {
|
|
12591
12605
|
role: "tablist",
|
|
12592
12606
|
"aria-orientation": "horizontal",
|
|
12593
12607
|
className: X(a.menuClassName, o.Tab.menuClassName, r)
|
|
12594
12608
|
}, e));
|
|
12595
12609
|
}
|
|
12596
|
-
},
|
|
12610
|
+
}, Jd = () => null, Yd = ({ children: e, motion: n }) => {
|
|
12597
12611
|
let r = Y("tab"), i = cr(void 0, n ?? r.Tab.motion?.enter ?? "fadeUp", r.Tab.motion?.enter ?? "fadeUp");
|
|
12598
12612
|
return /* @__PURE__ */ t.createElement("div", {
|
|
12599
12613
|
style: i,
|
|
12600
|
-
className:
|
|
12614
|
+
className: Kd()
|
|
12601
12615
|
}, e);
|
|
12602
|
-
},
|
|
12616
|
+
}, Xd = ({ children: e, defaultIndex: r = 0, onChange: i, layout: a = "default", menuClassName: o = void 0, contentClassName: s = void 0, before: c = void 0, after: l = void 0, wrapperClassName: u = void 0, className: d = void 0, motion: f = void 0 }) => {
|
|
12603
12617
|
let [m, g] = h(r), _ = (e) => {
|
|
12604
12618
|
g(e), i?.(e);
|
|
12605
|
-
}, v = n.toArray(e).filter((e) => t.isValidElement(e) && e.type ===
|
|
12619
|
+
}, v = n.toArray(e).filter((e) => t.isValidElement(e) && e.type === Jd), y = p(() => Wd(a), [a]), b = qd[a], x = Y("tab");
|
|
12606
12620
|
return /* @__PURE__ */ t.createElement(Z, { className: X(x.Tab.wrapperClassName, u) }, c, /* @__PURE__ */ t.createElement("div", { className: X("min-w-0", x.Tab.className, d) }, /* @__PURE__ */ t.createElement(b, {
|
|
12607
12621
|
menuClassName: o,
|
|
12608
12622
|
contentClassName: s,
|
|
@@ -12614,9 +12628,9 @@ var Jd = {
|
|
|
12614
12628
|
role: "tab",
|
|
12615
12629
|
"aria-selected": n === m,
|
|
12616
12630
|
onClick: () => _(n),
|
|
12617
|
-
className:
|
|
12631
|
+
className: Gd(a, n === m)
|
|
12618
12632
|
}, e.props.label))),
|
|
12619
|
-
content: /* @__PURE__ */ t.createElement(
|
|
12633
|
+
content: /* @__PURE__ */ t.createElement(Yd, {
|
|
12620
12634
|
key: m,
|
|
12621
12635
|
motion: f
|
|
12622
12636
|
}, v[m]?.props?.children)
|
|
@@ -12624,7 +12638,7 @@ var Jd = {
|
|
|
12624
12638
|
};
|
|
12625
12639
|
//#endregion
|
|
12626
12640
|
//#region src/components/ui/useRecordSelection.ts
|
|
12627
|
-
function
|
|
12641
|
+
function Zd({ records: e, selectedKeys: t, onSelectionChange: n, getRecordKey: r }) {
|
|
12628
12642
|
let i = t, a = i !== void 0 && !!n, [o, c] = h(i ?? []);
|
|
12629
12643
|
l(() => {
|
|
12630
12644
|
i !== void 0 && !a && c(i);
|
|
@@ -12666,7 +12680,7 @@ function Qd({ records: e, selectedKeys: t, onSelectionChange: n, getRecordKey: r
|
|
|
12666
12680
|
}
|
|
12667
12681
|
//#endregion
|
|
12668
12682
|
//#region src/components/ui/useStableRecordKey.ts
|
|
12669
|
-
function
|
|
12683
|
+
function Qd(e, t) {
|
|
12670
12684
|
let n = m(/* @__PURE__ */ new WeakMap()), r = m(0);
|
|
12671
12685
|
return s((i, a) => {
|
|
12672
12686
|
if (t != null) {
|
|
@@ -12682,7 +12696,7 @@ function $d(e, t) {
|
|
|
12682
12696
|
}
|
|
12683
12697
|
//#endregion
|
|
12684
12698
|
//#region src/components/ui/Table.tsx
|
|
12685
|
-
function
|
|
12699
|
+
function $d({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRowClick: i = void 0, onReorder: a = void 0, onSelectionChange: o = void 0, selection: c = "multiple", sortable: d = !1, pagination: f = void 0, activeKey: g = void 0, selectedKeys: _ = void 0, groupBy: v = void 0, recordId: y = void 0, before: b = void 0, after: x = void 0, wrapperClassName: S = void 0, className: C = void 0, headerClassName: w = void 0, bodyClassName: T = void 0, footerClassName: A = void 0, heightClassName: j = void 0, scrollClassName: M = void 0, selectedClassName: N = void 0, renderCell: P = void 0 }) {
|
|
12686
12700
|
let F = Y("table"), I = Fn("table"), L = N || F.Table.selectedClassName, [R, z] = h(n || []), B = p(() => {
|
|
12687
12701
|
if (!(!d || typeof d == "boolean")) return d;
|
|
12688
12702
|
}, [typeof d == "object" ? d?.dir : void 0, typeof d == "object" ? d?.field : void 0]), V = d !== !1, [H, U] = h(B), [W, ee] = h(null), [G, te] = h(null), [ne, re] = h(null), [K, ie] = h(null), [ae, oe] = h(null), se = m(!1), ce = s((e) => {
|
|
@@ -12695,7 +12709,7 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12695
12709
|
}, [pe?.field, pe?.dir]), l(() => {
|
|
12696
12710
|
!fe || se.current || (console.warn("Table: `onReorder` cannot be combined with sortable sorting on the same view. Manual reorder takes precedence and sorting is ignored."), se.current = !0);
|
|
12697
12711
|
}, [fe]);
|
|
12698
|
-
let me =
|
|
12712
|
+
let me = Qd("row", y), he = s((e, t) => me(e, t), [me]), { activeSelectedKeys: ge, selectionState: _e, showSelection: ve, updateSelection: ye } = Zd({
|
|
12699
12713
|
records: R,
|
|
12700
12714
|
selectedKeys: _,
|
|
12701
12715
|
onSelectionChange: o,
|
|
@@ -12847,7 +12861,7 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12847
12861
|
width: "1%",
|
|
12848
12862
|
whiteSpace: "nowrap"
|
|
12849
12863
|
}
|
|
12850
|
-
}))), Ne = /* @__PURE__ */ t.createElement(
|
|
12864
|
+
}))), Ne = /* @__PURE__ */ t.createElement(Gp, {
|
|
12851
12865
|
records: be,
|
|
12852
12866
|
appendTo: W,
|
|
12853
12867
|
wrapperClassName: "px-3 pt-4 pb-2",
|
|
@@ -12948,36 +12962,36 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12948
12962
|
}
|
|
12949
12963
|
//#endregion
|
|
12950
12964
|
//#region src/components/ui/LayoutBuilder.tsx
|
|
12951
|
-
var
|
|
12965
|
+
var ef = 12, tf = 12, nf = (e, t, n) => Math.max(t, Math.min(n, e)), rf = (e) => {
|
|
12952
12966
|
if (!e) return "";
|
|
12953
12967
|
let t = e.trim().replace(/^\{/, "").replace(/\}$/, "").trim(), n = t.split(".");
|
|
12954
12968
|
return (n[n.length - 1] || t).trim();
|
|
12955
|
-
},
|
|
12956
|
-
let n = e - t.left, r = t.width /
|
|
12957
|
-
return
|
|
12958
|
-
},
|
|
12969
|
+
}, af = (e, t) => {
|
|
12970
|
+
let n = e - t.left, r = t.width / ef;
|
|
12971
|
+
return nf(Math.floor(n / r), 0, ef - 1);
|
|
12972
|
+
}, of = () => `${Date.now()}_${Math.random().toString(16).slice(2)}`, sf = (e, t, n) => {
|
|
12959
12973
|
let r = (e) => {
|
|
12960
12974
|
let r = e + t;
|
|
12961
|
-
return r >
|
|
12975
|
+
return r > ef ? !1 : !n.some((t) => {
|
|
12962
12976
|
let n = e, i = r, a = t.colStart;
|
|
12963
12977
|
return n < t.colStart + t.colSpan && a < i;
|
|
12964
12978
|
});
|
|
12965
12979
|
};
|
|
12966
|
-
for (let n = e; n <=
|
|
12967
|
-
for (let e = 0; e <=
|
|
12980
|
+
for (let n = e; n <= ef - t; n++) if (r(n)) return n;
|
|
12981
|
+
for (let e = 0; e <= ef - t; e++) if (r(e)) return e;
|
|
12968
12982
|
return null;
|
|
12969
|
-
},
|
|
12983
|
+
}, cf = (e, t, n) => {
|
|
12970
12984
|
let r = e.find((e) => e.id === t);
|
|
12971
12985
|
if (!r) return e;
|
|
12972
|
-
let i = e.filter((e) => e.id !== t), a =
|
|
12986
|
+
let i = e.filter((e) => e.id !== t), a = sf(nf(n, 0, ef - r.colSpan), r.colSpan, i);
|
|
12973
12987
|
return a === null ? e : e.map((e) => e.id === t ? {
|
|
12974
12988
|
...e,
|
|
12975
12989
|
colStart: a
|
|
12976
12990
|
} : e);
|
|
12977
|
-
},
|
|
12991
|
+
}, lf = (e, t, n) => {
|
|
12978
12992
|
let r = e.find((e) => e.id === t);
|
|
12979
12993
|
if (!r) return e;
|
|
12980
|
-
let i = e.filter((e) => e.id !== t), a =
|
|
12994
|
+
let i = e.filter((e) => e.id !== t), a = nf(n, 1, ef - r.colStart), o = (e) => {
|
|
12981
12995
|
let t = r.colStart, n = r.colStart + e;
|
|
12982
12996
|
return i.some((e) => {
|
|
12983
12997
|
let r = e.colStart, i = e.colStart + e.colSpan;
|
|
@@ -12989,7 +13003,7 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
12989
13003
|
...e,
|
|
12990
13004
|
colSpan: a
|
|
12991
13005
|
} : e);
|
|
12992
|
-
},
|
|
13006
|
+
}, uf = (e, t, n) => {
|
|
12993
13007
|
if (n <= 0) return null;
|
|
12994
13008
|
let r = e.map((e) => {
|
|
12995
13009
|
let n = e.colStart + e.colSpan / 2;
|
|
@@ -13001,7 +13015,7 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13001
13015
|
for (let t of r) {
|
|
13002
13016
|
if (t.colSpan - 1 < n) continue;
|
|
13003
13017
|
let r = t.colSpan - n, i = t.colStart + r;
|
|
13004
|
-
if (!(i < 0 || i + n >
|
|
13018
|
+
if (!(i < 0 || i + n > ef)) return {
|
|
13005
13019
|
nextItems: e.map((e) => e.id === t.id ? {
|
|
13006
13020
|
...e,
|
|
13007
13021
|
colSpan: r
|
|
@@ -13010,7 +13024,7 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13010
13024
|
};
|
|
13011
13025
|
}
|
|
13012
13026
|
return null;
|
|
13013
|
-
},
|
|
13027
|
+
}, df = o(({ name: e, defaultSpan: n = 1, heightPx: r = 100 }, i) => {
|
|
13014
13028
|
let a = m(null), o = Fn("layout"), { value: s, handleChange: c } = Dd({
|
|
13015
13029
|
name: e,
|
|
13016
13030
|
defaultValue: []
|
|
@@ -13030,39 +13044,39 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13030
13044
|
setValue: (e) => f(e),
|
|
13031
13045
|
clear: () => f([])
|
|
13032
13046
|
}));
|
|
13033
|
-
let w = p(() => Array.from({ length:
|
|
13047
|
+
let w = p(() => Array.from({ length: ef }, (e, t) => t), []), T = (e) => {
|
|
13034
13048
|
e.preventDefault();
|
|
13035
13049
|
}, E = (e) => {
|
|
13036
13050
|
if (e.preventDefault(), e.dataTransfer.getData("application/x-layoutbuilder-internal")) {
|
|
13037
13051
|
_(null);
|
|
13038
13052
|
return;
|
|
13039
13053
|
}
|
|
13040
|
-
if (u.length >=
|
|
13054
|
+
if (u.length >= tf) {
|
|
13041
13055
|
C(o.maxElements);
|
|
13042
13056
|
return;
|
|
13043
13057
|
}
|
|
13044
13058
|
let t = a.current;
|
|
13045
13059
|
if (!t) return;
|
|
13046
|
-
let r = t.getBoundingClientRect(), i =
|
|
13060
|
+
let r = t.getBoundingClientRect(), i = af(e.clientX, r), s = rf(e.dataTransfer.getData("text/plain") || e.dataTransfer.getData("label") || "") || "unknown", c = nf(n, 1, ef), l = sf(nf(i, 0, ef - c), c, u);
|
|
13047
13061
|
if (l !== null) {
|
|
13048
13062
|
f((e) => [...e, {
|
|
13049
|
-
id:
|
|
13063
|
+
id: of(),
|
|
13050
13064
|
fieldName: s,
|
|
13051
13065
|
colStart: l,
|
|
13052
13066
|
colSpan: c
|
|
13053
13067
|
}]);
|
|
13054
13068
|
return;
|
|
13055
13069
|
}
|
|
13056
|
-
if (!
|
|
13070
|
+
if (!uf(u, i, c)) {
|
|
13057
13071
|
C(o.noSpace);
|
|
13058
13072
|
return;
|
|
13059
13073
|
}
|
|
13060
13074
|
f((e) => {
|
|
13061
|
-
if (e.length >=
|
|
13062
|
-
let t =
|
|
13075
|
+
if (e.length >= tf) return C(o.maxElements), e;
|
|
13076
|
+
let t = uf(e, i, c);
|
|
13063
13077
|
if (!t) return C(o.noSpace), e;
|
|
13064
13078
|
let n = {
|
|
13065
|
-
id:
|
|
13079
|
+
id: of(),
|
|
13066
13080
|
fieldName: s,
|
|
13067
13081
|
colStart: t.insertCol,
|
|
13068
13082
|
colSpan: c
|
|
@@ -13075,8 +13089,8 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13075
13089
|
if (e.preventDefault(), !g) return;
|
|
13076
13090
|
let t = a.current;
|
|
13077
13091
|
if (!t) return;
|
|
13078
|
-
let n = t.getBoundingClientRect(), r =
|
|
13079
|
-
f((e) =>
|
|
13092
|
+
let n = t.getBoundingClientRect(), r = af(e.clientX, n);
|
|
13093
|
+
f((e) => cf(e, g, r));
|
|
13080
13094
|
}, k = () => _(null), A = (e) => (t) => {
|
|
13081
13095
|
t.stopPropagation(), t.preventDefault();
|
|
13082
13096
|
let n = u.find((t) => t.id === e);
|
|
@@ -13089,8 +13103,8 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13089
13103
|
if (!v) return;
|
|
13090
13104
|
let t = a.current;
|
|
13091
13105
|
if (!t) return;
|
|
13092
|
-
let n = t.getBoundingClientRect().width /
|
|
13093
|
-
f((e) =>
|
|
13106
|
+
let n = t.getBoundingClientRect().width / ef, r = e.clientX - v.startClientX, i = Math.round(r / n), o = v.startSpan + i;
|
|
13107
|
+
f((e) => lf(e, v.id, o));
|
|
13094
13108
|
}, M = () => {
|
|
13095
13109
|
v && y(null);
|
|
13096
13110
|
}, N = (e) => f((t) => t.filter((t) => t.id !== e));
|
|
@@ -13127,7 +13141,7 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13127
13141
|
position: "absolute",
|
|
13128
13142
|
top: 0,
|
|
13129
13143
|
bottom: 0,
|
|
13130
|
-
left: `${e /
|
|
13144
|
+
left: `${e / ef * 100}%`,
|
|
13131
13145
|
width: 1,
|
|
13132
13146
|
background: "rgba(255, 255, 255, 0.06)",
|
|
13133
13147
|
pointerEvents: "none"
|
|
@@ -13140,8 +13154,8 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13140
13154
|
position: "absolute",
|
|
13141
13155
|
top: 12,
|
|
13142
13156
|
bottom: 12,
|
|
13143
|
-
left: `${e.colStart /
|
|
13144
|
-
width: `${e.colSpan /
|
|
13157
|
+
left: `${e.colStart / ef * 100}%`,
|
|
13158
|
+
width: `${e.colSpan / ef * 100}%`,
|
|
13145
13159
|
padding: 10,
|
|
13146
13160
|
borderRadius: 12,
|
|
13147
13161
|
border: "1px solid rgba(255, 255, 255, 0.18)",
|
|
@@ -13193,25 +13207,25 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13193
13207
|
justifyContent: "center",
|
|
13194
13208
|
pointerEvents: "none"
|
|
13195
13209
|
} }, o.dragHere)));
|
|
13196
|
-
}),
|
|
13197
|
-
function
|
|
13198
|
-
return /* @__PURE__ */ t.createElement(
|
|
13210
|
+
}), ff = a(void 0);
|
|
13211
|
+
function pf({ config: e, children: n }) {
|
|
13212
|
+
return /* @__PURE__ */ t.createElement(ff.Provider, { value: e }, n);
|
|
13199
13213
|
}
|
|
13200
|
-
function
|
|
13201
|
-
return c(
|
|
13214
|
+
function mf() {
|
|
13215
|
+
return c(ff);
|
|
13202
13216
|
}
|
|
13203
13217
|
//#endregion
|
|
13204
13218
|
//#region src/providers/googleMaps/loadGoogleMaps.ts
|
|
13205
|
-
var
|
|
13206
|
-
function
|
|
13219
|
+
var hf, gf;
|
|
13220
|
+
function _f(e) {
|
|
13207
13221
|
if (typeof window > "u") return Promise.reject(/* @__PURE__ */ Error("loadGoogleMaps can only run in the browser"));
|
|
13208
13222
|
if (!e.apiKey) return Promise.reject(/* @__PURE__ */ Error("GoogleMapsConfig.apiKey is required"));
|
|
13209
|
-
if (
|
|
13223
|
+
if (gf !== void 0 && gf !== e.apiKey) return Promise.reject(/* @__PURE__ */ Error("loadGoogleMaps was already initialized with a different apiKey"));
|
|
13210
13224
|
if (window.google?.maps?.places) return Promise.resolve(window.google);
|
|
13211
|
-
if (
|
|
13212
|
-
|
|
13225
|
+
if (hf) return hf;
|
|
13226
|
+
gf = e.apiKey;
|
|
13213
13227
|
let t = `__googleMapsLoader_${Math.random().toString(36).slice(2)}`;
|
|
13214
|
-
return
|
|
13228
|
+
return hf = new Promise((n, r) => {
|
|
13215
13229
|
window[t] = () => {
|
|
13216
13230
|
delete window[t], window.google?.maps?.places ? n(window.google) : r(/* @__PURE__ */ Error("Google Maps script loaded but the places library is unavailable"));
|
|
13217
13231
|
};
|
|
@@ -13224,54 +13238,54 @@ function vf(e) {
|
|
|
13224
13238
|
...e.language ? { language: e.language } : {},
|
|
13225
13239
|
...e.region ? { region: e.region } : {}
|
|
13226
13240
|
}).toString()}`, i.async = !0, i.onerror = () => r(/* @__PURE__ */ Error("Failed to load the Google Maps script")), document.head.appendChild(i);
|
|
13227
|
-
}),
|
|
13241
|
+
}), hf;
|
|
13228
13242
|
}
|
|
13229
13243
|
//#endregion
|
|
13230
13244
|
//#region src/components/ui/fields/AddressAutocomplete.tsx
|
|
13231
|
-
var
|
|
13245
|
+
var vf = {
|
|
13232
13246
|
lat: 41.8719,
|
|
13233
13247
|
lng: 12.5674
|
|
13234
|
-
},
|
|
13235
|
-
function
|
|
13248
|
+
}, yf = 5;
|
|
13249
|
+
function bf(e) {
|
|
13236
13250
|
return (e ?? []).map((e) => ({
|
|
13237
13251
|
longText: e.longText ?? "",
|
|
13238
13252
|
shortText: e.shortText ?? e.longText ?? "",
|
|
13239
13253
|
types: e.types
|
|
13240
13254
|
}));
|
|
13241
13255
|
}
|
|
13242
|
-
function
|
|
13256
|
+
function xf(e) {
|
|
13243
13257
|
return e.map((e) => ({
|
|
13244
13258
|
longText: e.long_name,
|
|
13245
13259
|
shortText: e.short_name,
|
|
13246
13260
|
types: e.types
|
|
13247
13261
|
}));
|
|
13248
13262
|
}
|
|
13249
|
-
function
|
|
13263
|
+
function Sf(e, t, n = !0) {
|
|
13250
13264
|
let r = e.find((e) => e.types.includes(t));
|
|
13251
13265
|
if (r) return (n ? r.longText : r.shortText) || void 0;
|
|
13252
13266
|
}
|
|
13253
|
-
function
|
|
13254
|
-
let i =
|
|
13267
|
+
function Cf(e, t, n, r) {
|
|
13268
|
+
let i = Sf(e, "street_number"), a = Sf(e, "route");
|
|
13255
13269
|
return {
|
|
13256
13270
|
street: [a, i].filter(Boolean).join(", ") || a || void 0,
|
|
13257
|
-
city:
|
|
13258
|
-
state:
|
|
13259
|
-
zip:
|
|
13260
|
-
country:
|
|
13261
|
-
countryCode:
|
|
13271
|
+
city: Sf(e, "locality") ?? Sf(e, "postal_town") ?? Sf(e, "sublocality"),
|
|
13272
|
+
state: Sf(e, "administrative_area_level_2", !1) ?? Sf(e, "administrative_area_level_1", !1),
|
|
13273
|
+
zip: Sf(e, "postal_code"),
|
|
13274
|
+
country: Sf(e, "country"),
|
|
13275
|
+
countryCode: Sf(e, "country", !1),
|
|
13262
13276
|
lat: t,
|
|
13263
13277
|
lng: n,
|
|
13264
13278
|
formatted: r
|
|
13265
13279
|
};
|
|
13266
13280
|
}
|
|
13267
|
-
function
|
|
13268
|
-
return
|
|
13281
|
+
function wf(e) {
|
|
13282
|
+
return Cf(bf(e.addressComponents), e.location?.lat(), e.location?.lng(), e.formattedAddress ?? void 0);
|
|
13269
13283
|
}
|
|
13270
|
-
function
|
|
13271
|
-
return
|
|
13284
|
+
function Tf(e) {
|
|
13285
|
+
return Cf(xf(e.address_components), e.geometry.location.lat(), e.geometry.location.lng(), e.formatted_address);
|
|
13272
13286
|
}
|
|
13273
|
-
var
|
|
13274
|
-
let E = Fn("addressAutocomplete"), D = Y("addressAutocomplete"), O =
|
|
13287
|
+
var Ef = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void 0, disabled: a = !1, feedback: o = void 0, countries: s = void 0, language: c = void 0, region: d = void 0, validator: f = void 0, onSelect: p = void 0, fieldNames: g = void 0, map: _ = !1, id: v = void 0, labelClassName: y = void 0, inheritWrapperClassName: b = !0, wrapperClassName: x = void 0, className: S = void 0, menuClassName: C = void 0, itemClassName: w = void 0, mapClassName: T = void 0 }) => {
|
|
13288
|
+
let E = Fn("addressAutocomplete"), D = Y("addressAutocomplete"), O = mf(), k = {
|
|
13275
13289
|
street: g?.street ?? `${e}.street`,
|
|
13276
13290
|
city: g?.city ?? `${e}.city`,
|
|
13277
13291
|
state: g?.state ?? `${e}.state`,
|
|
@@ -13310,7 +13324,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13310
13324
|
let n = window.setTimeout(() => {
|
|
13311
13325
|
(async () => {
|
|
13312
13326
|
try {
|
|
13313
|
-
let n = await
|
|
13327
|
+
let n = await _f({
|
|
13314
13328
|
apiKey: O.apiKey,
|
|
13315
13329
|
language: c ?? O.language,
|
|
13316
13330
|
region: d ?? O.region
|
|
@@ -13390,7 +13404,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13390
13404
|
if (!_e.current) return;
|
|
13391
13405
|
let t = (await _e.current.geocode({ location: e })).results[0];
|
|
13392
13406
|
if (!t) return;
|
|
13393
|
-
ye(
|
|
13407
|
+
ye(Tf(t)), ue(null);
|
|
13394
13408
|
} catch (e) {
|
|
13395
13409
|
ue(e instanceof Error ? e.message : E.loadError);
|
|
13396
13410
|
}
|
|
@@ -13412,7 +13426,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13412
13426
|
let t = e.join(", "), n = window.setTimeout(() => {
|
|
13413
13427
|
(async () => {
|
|
13414
13428
|
try {
|
|
13415
|
-
let e = await
|
|
13429
|
+
let e = await _f({
|
|
13416
13430
|
apiKey: O.apiKey,
|
|
13417
13431
|
language: c ?? O.language,
|
|
13418
13432
|
region: d ?? O.region
|
|
@@ -13423,7 +13437,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13423
13437
|
region: d ?? O.region
|
|
13424
13438
|
})).results[0];
|
|
13425
13439
|
if (!n) return;
|
|
13426
|
-
let r =
|
|
13440
|
+
let r = Tf(n), i = r.formatted ?? t;
|
|
13427
13441
|
if (re(i), A.handleChange({ target: {
|
|
13428
13442
|
name: k.formatted,
|
|
13429
13443
|
value: i
|
|
@@ -13454,7 +13468,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13454
13468
|
]), l(() => {
|
|
13455
13469
|
if (!W || !O || !pe.current || he.current) return;
|
|
13456
13470
|
let e = !1;
|
|
13457
|
-
return
|
|
13471
|
+
return _f({
|
|
13458
13472
|
apiKey: O.apiKey,
|
|
13459
13473
|
language: c ?? O.language,
|
|
13460
13474
|
region: d ?? O.region
|
|
@@ -13464,7 +13478,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13464
13478
|
let n = typeof L.value == "number" && typeof R.value == "number", r = n ? {
|
|
13465
13479
|
lat: L.value,
|
|
13466
13480
|
lng: R.value
|
|
13467
|
-
} :
|
|
13481
|
+
} : vf, i = typeof z.value == "number" ? z.value : n ? G : yf, a = new t.maps.Map(pe.current, {
|
|
13468
13482
|
center: r,
|
|
13469
13483
|
zoom: i,
|
|
13470
13484
|
streetViewControl: !1,
|
|
@@ -13499,7 +13513,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13499
13513
|
"location",
|
|
13500
13514
|
"formattedAddress"
|
|
13501
13515
|
] });
|
|
13502
|
-
let n =
|
|
13516
|
+
let n = wf(t);
|
|
13503
13517
|
ye(n, W ? G : void 0);
|
|
13504
13518
|
let r = me.current;
|
|
13505
13519
|
if (W && r && he.current && n.lat !== void 0 && n.lng !== void 0) {
|
|
@@ -13568,7 +13582,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13568
13582
|
size: 14,
|
|
13569
13583
|
className: "mt-0.5 shrink-0 text-muted-foreground"
|
|
13570
13584
|
}), /* @__PURE__ */ t.createElement("span", { className: "min-w-0 truncate" }, e.text))))), ee === "below" && we, B ? /* @__PURE__ */ t.createElement(hs, { message: B }) : o && /* @__PURE__ */ t.createElement("div", { className: "mt-1 text-xs text-muted-foreground" }, o));
|
|
13571
|
-
},
|
|
13585
|
+
}, Df = ({ name: e, onDataLoaded: n, onClear: r = void 0, onParseField: i = void 0, label: a = void 0, icon: o = "upload", delimiter: s = void 0, normalizeKeys: c = !1, removeEmptyFields: l = !1, required: u = !1, before: d = void 0, after: f = void 0, wrapperClassName: p = void 0, className: g = void 0 }) => {
|
|
13572
13586
|
let _ = Fn("upload"), [v, y] = h(null), [b, x] = h(!1), [S, C] = h(null), w = m(null), T = ([e, t]) => {
|
|
13573
13587
|
if (![
|
|
13574
13588
|
"",
|
|
@@ -13653,14 +13667,14 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13653
13667
|
};
|
|
13654
13668
|
//#endregion
|
|
13655
13669
|
//#region src/components/blocks/ListCard.tsx
|
|
13656
|
-
function
|
|
13670
|
+
function Of(e) {
|
|
13657
13671
|
return e ? typeof e == "string" ? /* @__PURE__ */ t.createElement(Q, {
|
|
13658
13672
|
name: e,
|
|
13659
13673
|
size: 16
|
|
13660
13674
|
}) : e : null;
|
|
13661
13675
|
}
|
|
13662
|
-
function
|
|
13663
|
-
let N = Y("listCard"), P = !!l || !!g, F = sr(f || !P, j, M ?? N.ListCard.motion?.press ?? "press"), I =
|
|
13676
|
+
function kf({ title: e = void 0, description: n = void 0, meta: r = void 0, badge: i = void 0, icon: a = void 0, trailing: o = void 0, footer: s = void 0, children: c = void 0, href: l = void 0, external: u = !1, active: d = !1, disabled: f = !1, dashed: p = !1, compact: m = !1, align: h = "start", onClick: g = void 0, before: _ = void 0, after: y = void 0, wrapperClassName: b = void 0, className: x = void 0, titleClassName: S = void 0, descriptionClassName: C = void 0, metaClassName: w = void 0, badgeClassName: T = void 0, leadingClassName: E = void 0, bodyClassName: D = void 0, headerClassName: O = void 0, trailingClassName: k = void 0, footerClassName: A = void 0, style: j = void 0, motion: M = void 0 }) {
|
|
13677
|
+
let N = Y("listCard"), P = !!l || !!g, F = sr(f || !P, j, M ?? N.ListCard.motion?.press ?? "press"), I = Of(a), L = s ?? c, R = X("flex w-full gap-3 rounded-xl border border-border/60 bg-background p-4 text-left transition-[background-color,border-color,box-shadow,color] duration-150", h === "center" ? "items-center" : "items-start", P && !f && "cursor-pointer", N.ListCard.className, d ? N.ListCard.activeClassName : N.ListCard.inactiveClassName, f && N.ListCard.disabledClassName, p && N.ListCard.dashedClassName, m && N.ListCard.compactClassName, x), z = /* @__PURE__ */ t.createElement(t.Fragment, null, I ? /* @__PURE__ */ t.createElement("div", { className: X("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", h === "center" && "mt-0", N.ListCard.leadingClassName, E) }, I) : null, /* @__PURE__ */ t.createElement("div", { className: X("min-w-0 flex-1", N.ListCard.bodyClassName, D) }, e || i ? /* @__PURE__ */ t.createElement("div", { className: X("flex items-center gap-2", N.ListCard.headerClassName, O) }, e ? /* @__PURE__ */ t.createElement("div", { className: X("min-w-0 flex-1 truncate text-sm font-semibold text-foreground", N.ListCard.titleClassName, S) }, e) : /* @__PURE__ */ t.createElement("div", { className: "flex-1" }), i ? /* @__PURE__ */ t.createElement("div", { className: X("shrink-0", N.ListCard.badgeClassName, T) }, i) : null) : null, n ? /* @__PURE__ */ t.createElement("div", { className: X("mt-1 text-sm text-muted-foreground", N.ListCard.descriptionClassName, C) }, n) : null, r ? /* @__PURE__ */ t.createElement("div", { className: X("mt-1 text-xs text-muted-foreground", N.ListCard.metaClassName, w) }, r) : null, L ? /* @__PURE__ */ t.createElement("div", { className: X("mt-3", N.ListCard.footerClassName, A) }, L) : null), o ? /* @__PURE__ */ t.createElement("div", { className: X("shrink-0 self-center", N.ListCard.trailingClassName, k) }, o) : null), B = (e) => {
|
|
13664
13678
|
if (f) {
|
|
13665
13679
|
e.preventDefault(), e.stopPropagation();
|
|
13666
13680
|
return;
|
|
@@ -13696,8 +13710,8 @@ function Af({ title: e = void 0, description: n = void 0, meta: r = void 0, badg
|
|
|
13696
13710
|
}
|
|
13697
13711
|
//#endregion
|
|
13698
13712
|
//#region src/components/blocks/SideNav.tsx
|
|
13699
|
-
var
|
|
13700
|
-
function
|
|
13713
|
+
var Af = 208, jf = 52;
|
|
13714
|
+
function Mf(e) {
|
|
13701
13715
|
return e.map((e) => ({
|
|
13702
13716
|
path: e.path,
|
|
13703
13717
|
title: e.title,
|
|
@@ -13705,13 +13719,13 @@ function Nf(e) {
|
|
|
13705
13719
|
group: e.group,
|
|
13706
13720
|
end: e.end,
|
|
13707
13721
|
badge: e.badge,
|
|
13708
|
-
children: e.children ?
|
|
13722
|
+
children: e.children ? Mf(e.children) : void 0
|
|
13709
13723
|
}));
|
|
13710
13724
|
}
|
|
13711
|
-
function
|
|
13725
|
+
function Nf(e, t, n) {
|
|
13712
13726
|
return n ? e === t : e === t || t !== "/" && e.startsWith(t + "/");
|
|
13713
13727
|
}
|
|
13714
|
-
function
|
|
13728
|
+
function Pf(e) {
|
|
13715
13729
|
let t = /* @__PURE__ */ new Map();
|
|
13716
13730
|
for (let n of e) {
|
|
13717
13731
|
let e = n.group ?? "General";
|
|
@@ -13722,27 +13736,27 @@ function Ff(e) {
|
|
|
13722
13736
|
items: t
|
|
13723
13737
|
}));
|
|
13724
13738
|
}
|
|
13725
|
-
function
|
|
13739
|
+
function Ff({ value: e }) {
|
|
13726
13740
|
let n = Y("sideNav");
|
|
13727
13741
|
return /* @__PURE__ */ t.createElement("span", { className: X("ml-auto shrink-0 text-[10px] font-semibold leading-none px-1.5 py-[3px] rounded-full bg-primary/15 text-primary", n.SideNav.itemBadgeClassName) }, e);
|
|
13728
13742
|
}
|
|
13729
|
-
function
|
|
13743
|
+
function If({ children: e, open: n }) {
|
|
13730
13744
|
let { pathname: r } = x(), i = Y("sideNav");
|
|
13731
13745
|
return /* @__PURE__ */ t.createElement("div", { style: {
|
|
13732
13746
|
maxHeight: n ? `${e.length * 34 + 8}px` : "0px",
|
|
13733
13747
|
overflow: "hidden",
|
|
13734
13748
|
transition: "max-height 200ms ease"
|
|
13735
13749
|
} }, /* @__PURE__ */ t.createElement("div", { className: "py-0.5 space-y-0.5" }, e.map((e) => {
|
|
13736
|
-
let n =
|
|
13750
|
+
let n = Nf(r, e.path, e.end);
|
|
13737
13751
|
return /* @__PURE__ */ t.createElement(v, {
|
|
13738
13752
|
key: e.path,
|
|
13739
13753
|
to: e.path,
|
|
13740
13754
|
className: X("flex items-center rounded-md pl-9 pr-3 py-[6px] text-sm transition-colors", i.SideNav.subItemClassName, n ? i.SideNav.subItemActiveClassName : i.SideNav.subItemInactiveClassName)
|
|
13741
|
-
}, /* @__PURE__ */ t.createElement("span", { className: "flex-1 truncate" }, e.title), e.badge !== void 0 && /* @__PURE__ */ t.createElement(
|
|
13755
|
+
}, /* @__PURE__ */ t.createElement("span", { className: "flex-1 truncate" }, e.title), e.badge !== void 0 && /* @__PURE__ */ t.createElement(Ff, { value: e.badge }));
|
|
13742
13756
|
})));
|
|
13743
13757
|
}
|
|
13744
|
-
function
|
|
13745
|
-
let { pathname: o } = x(), s = Y("sideNav"), c = (e.children?.length ?? 0) > 0, l =
|
|
13758
|
+
function Lf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
|
|
13759
|
+
let { pathname: o } = x(), s = Y("sideNav"), c = (e.children?.length ?? 0) > 0, l = Nf(o, e.path, e.end), u = c && e.children.some((e) => Nf(o, e.path, e.end)), d = l ? s.SideNav.itemActiveClassName : u ? s.SideNav.itemChildActiveClassName : s.SideNav.itemInactiveClassName, f = i ? /* @__PURE__ */ t.createElement("span", { className: X("relative shrink-0 flex items-center justify-center w-[18px] h-[18px]", s.SideNav.itemIconClassName) }, e.icon ? /* @__PURE__ */ t.createElement(Q, {
|
|
13746
13760
|
name: e.icon,
|
|
13747
13761
|
size: 17
|
|
13748
13762
|
}) : /* @__PURE__ */ t.createElement("span", { className: "w-1.5 h-1.5 rounded-full bg-current opacity-30" }), !n && e.badge !== void 0 && /* @__PURE__ */ t.createElement("span", { className: X("absolute -top-0.5 -right-1 w-[7px] h-[7px] rounded-full bg-primary ring-1 ring-background", s.SideNav.itemCollapsedBadgeClassName) })) : null, p = {
|
|
@@ -13759,7 +13773,7 @@ function Rf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
|
|
|
13759
13773
|
}, f, /* @__PURE__ */ t.createElement("span", {
|
|
13760
13774
|
style: p,
|
|
13761
13775
|
className: s.SideNav.itemTextClassName
|
|
13762
|
-
}, e.title), n && e.badge !== void 0 && /* @__PURE__ */ t.createElement(
|
|
13776
|
+
}, e.title), n && e.badge !== void 0 && /* @__PURE__ */ t.createElement(Ff, { value: e.badge })), n && /* @__PURE__ */ t.createElement("button", {
|
|
13763
13777
|
onClick: () => a(e.path),
|
|
13764
13778
|
className: X("shrink-0 flex items-center justify-center w-6 h-6 rounded transition-colors text-muted-foreground/50 hover:text-foreground hover:bg-accent", s.SideNav.itemToggleClassName),
|
|
13765
13779
|
title: r ? "Collapse" : "Expand"
|
|
@@ -13769,7 +13783,7 @@ function Rf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
|
|
|
13769
13783
|
} }, /* @__PURE__ */ t.createElement(Q, {
|
|
13770
13784
|
name: "chevron-down",
|
|
13771
13785
|
size: 13
|
|
13772
|
-
})))), n && /* @__PURE__ */ t.createElement(
|
|
13786
|
+
})))), n && /* @__PURE__ */ t.createElement(If, {
|
|
13773
13787
|
children: e.children,
|
|
13774
13788
|
open: r
|
|
13775
13789
|
})) : /* @__PURE__ */ t.createElement(v, {
|
|
@@ -13779,14 +13793,14 @@ function Rf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
|
|
|
13779
13793
|
}, f, /* @__PURE__ */ t.createElement("span", {
|
|
13780
13794
|
style: p,
|
|
13781
13795
|
className: s.SideNav.itemTextClassName
|
|
13782
|
-
}, e.title), n && e.badge !== void 0 && /* @__PURE__ */ t.createElement(
|
|
13796
|
+
}, e.title), n && e.badge !== void 0 && /* @__PURE__ */ t.createElement(Ff, { value: e.badge }));
|
|
13783
13797
|
}
|
|
13784
|
-
function
|
|
13798
|
+
function Rf({ group: e, expanded: n, openItems: r, showIcons: i, onToggle: a }) {
|
|
13785
13799
|
let o = e.key === "General", s = Y("sideNav");
|
|
13786
13800
|
return /* @__PURE__ */ t.createElement("div", { className: "mb-1" }, !o && /* @__PURE__ */ t.createElement("div", {
|
|
13787
13801
|
style: { height: n ? void 0 : "1px" },
|
|
13788
13802
|
className: n ? "px-2 pb-0.5 pt-3 first:pt-1" : X("mx-2 my-2 bg-border/40", s.SideNav.groupDividerClassName)
|
|
13789
|
-
}, n && /* @__PURE__ */ t.createElement("span", { className: X("text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/50 select-none", s.SideNav.groupLabelClassName) }, e.key)), /* @__PURE__ */ t.createElement("div", { className: "space-y-0.5" }, e.items.map((e) => /* @__PURE__ */ t.createElement(
|
|
13803
|
+
}, n && /* @__PURE__ */ t.createElement("span", { className: X("text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/50 select-none", s.SideNav.groupLabelClassName) }, e.key)), /* @__PURE__ */ t.createElement("div", { className: "space-y-0.5" }, e.items.map((e) => /* @__PURE__ */ t.createElement(Lf, {
|
|
13790
13804
|
key: e.path,
|
|
13791
13805
|
item: e,
|
|
13792
13806
|
expanded: n,
|
|
@@ -13795,8 +13809,8 @@ function zf({ group: e, expanded: n, openItems: r, showIcons: i, onToggle: a })
|
|
|
13795
13809
|
onToggle: a
|
|
13796
13810
|
}))));
|
|
13797
13811
|
}
|
|
13798
|
-
function
|
|
13799
|
-
let { pathname: p } = x(), g = Y("sideNav"), _ =
|
|
13812
|
+
function zf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCollapsedChange: a, showIcons: o = !0, showCollapseButton: c = !0, footer: u, header: d, embedded: f = !1 }) {
|
|
13813
|
+
let { pathname: p } = x(), g = Y("sideNav"), _ = Hh(e ?? ""), v = n ?? (e ? Mf(_) : []), y = i !== void 0, [b, S] = h(r), C = i === void 0 ? b : i, w = s((e) => {
|
|
13800
13814
|
let t = typeof e == "function" ? e(C) : e;
|
|
13801
13815
|
y ? a?.(t) : S(t);
|
|
13802
13816
|
}, [
|
|
@@ -13808,7 +13822,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
13808
13822
|
O((e) => {
|
|
13809
13823
|
let t = new Set(e);
|
|
13810
13824
|
return v.forEach((e) => {
|
|
13811
|
-
e.children?.some((e) =>
|
|
13825
|
+
e.children?.some((e) => Nf(p, e.path, e.end)) && t.add(e.path);
|
|
13812
13826
|
}), t;
|
|
13813
13827
|
});
|
|
13814
13828
|
}, [p]);
|
|
@@ -13823,8 +13837,8 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
13823
13837
|
C && (k.current = setTimeout(() => E(!1), 80));
|
|
13824
13838
|
};
|
|
13825
13839
|
if (v.length === 0) return null;
|
|
13826
|
-
let P =
|
|
13827
|
-
return f ? /* @__PURE__ */ t.createElement("nav", { className: X("px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(
|
|
13840
|
+
let P = Pf(v);
|
|
13841
|
+
return f ? /* @__PURE__ */ t.createElement("nav", { className: X("px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(Rf, {
|
|
13828
13842
|
key: e.key,
|
|
13829
13843
|
group: e,
|
|
13830
13844
|
expanded: !0,
|
|
@@ -13834,7 +13848,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
13834
13848
|
}))) : /* @__PURE__ */ t.createElement("div", {
|
|
13835
13849
|
className: X("min-h-0", g.SideNav.wrapperClassName),
|
|
13836
13850
|
style: {
|
|
13837
|
-
width: C ?
|
|
13851
|
+
width: C ? jf : Af,
|
|
13838
13852
|
height: "100%",
|
|
13839
13853
|
transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
|
|
13840
13854
|
flexShrink: 0,
|
|
@@ -13842,7 +13856,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
13842
13856
|
}
|
|
13843
13857
|
}, /* @__PURE__ */ t.createElement("aside", {
|
|
13844
13858
|
style: {
|
|
13845
|
-
width: A ?
|
|
13859
|
+
width: A ? Af : jf,
|
|
13846
13860
|
transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
|
|
13847
13861
|
position: C ? "absolute" : "sticky",
|
|
13848
13862
|
top: 0,
|
|
@@ -13863,7 +13877,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
13863
13877
|
overflow: "hidden",
|
|
13864
13878
|
transition: "opacity 150ms ease, max-width 200ms ease"
|
|
13865
13879
|
}
|
|
13866
|
-
}, /* @__PURE__ */ t.createElement("div", { className: "min-w-0 flex-1" }, d)), /* @__PURE__ */ t.createElement("nav", { className: X("min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(
|
|
13880
|
+
}, /* @__PURE__ */ t.createElement("div", { className: "min-w-0 flex-1" }, d)), /* @__PURE__ */ t.createElement("nav", { className: X("min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(Rf, {
|
|
13867
13881
|
key: e.key,
|
|
13868
13882
|
group: e,
|
|
13869
13883
|
expanded: A,
|
|
@@ -13890,7 +13904,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
13890
13904
|
}
|
|
13891
13905
|
//#endregion
|
|
13892
13906
|
//#region src/components/widgets/grid-core/useGridDBRecords.ts
|
|
13893
|
-
function
|
|
13907
|
+
function Bf({ path: e, where: t, order: n, fieldMap: r }) {
|
|
13894
13908
|
let i = Ti(), [a, o] = h([]), s = p(() => {
|
|
13895
13909
|
if (!(!t && !n && !r)) return {
|
|
13896
13910
|
where: t,
|
|
@@ -13910,13 +13924,13 @@ function Vf({ path: e, where: t, order: n, fieldMap: r }) {
|
|
|
13910
13924
|
}
|
|
13911
13925
|
//#endregion
|
|
13912
13926
|
//#region src/components/widgets/grid-core/resolveGridPathFromUrl.ts
|
|
13913
|
-
function
|
|
13927
|
+
function Vf(e) {
|
|
13914
13928
|
if (e) return e;
|
|
13915
13929
|
}
|
|
13916
13930
|
//#endregion
|
|
13917
13931
|
//#region src/components/widgets/grid-core/GridDB.tsx
|
|
13918
|
-
function
|
|
13919
|
-
let c = x(), l = n ?
|
|
13932
|
+
function Hf({ path: e, fromUrl: n, where: r, order: i, fieldMap: a, recordId: o = za, ...s }) {
|
|
13933
|
+
let c = x(), l = n ? Vf(c.pathname) : e, u = Bf({
|
|
13920
13934
|
path: l,
|
|
13921
13935
|
where: r,
|
|
13922
13936
|
order: i,
|
|
@@ -13931,7 +13945,7 @@ function Uf({ path: e, fromUrl: n, where: r, order: i, fieldMap: a, recordId: o
|
|
|
13931
13945
|
dir: n
|
|
13932
13946
|
};
|
|
13933
13947
|
}, [i]), f = s.sortable === void 0 || s.sortable === !0 ? d ?? s.sortable : s.sortable;
|
|
13934
|
-
return /* @__PURE__ */ t.createElement(
|
|
13948
|
+
return /* @__PURE__ */ t.createElement(am, {
|
|
13935
13949
|
...s,
|
|
13936
13950
|
records: u,
|
|
13937
13951
|
recordId: o,
|
|
@@ -13941,22 +13955,22 @@ function Uf({ path: e, fromUrl: n, where: r, order: i, fieldMap: a, recordId: o
|
|
|
13941
13955
|
}
|
|
13942
13956
|
//#endregion
|
|
13943
13957
|
//#region src/components/widgets/grid-core/utils.ts
|
|
13944
|
-
var
|
|
13958
|
+
var Uf = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, ""), Wf = (e) => (t) => {
|
|
13945
13959
|
if (typeof e == "function") return String(e(t));
|
|
13946
13960
|
let n = t[e];
|
|
13947
13961
|
return n == null || n === "" ? "" : String(n);
|
|
13948
|
-
},
|
|
13962
|
+
}, Gf = (e, t) => {
|
|
13949
13963
|
if (e == null || e === "text") return t;
|
|
13950
13964
|
if (e === "boolean") return t ? "Yes" : "No";
|
|
13951
13965
|
if (e === "json") return t == null ? "" : JSON.stringify(t, null, 2);
|
|
13952
13966
|
if (e === "badge" || e === "image" || e === "email") return t;
|
|
13953
13967
|
let n = et[e === "datetime" ? "dateTime" : e];
|
|
13954
13968
|
return n ? n(t) : t;
|
|
13955
|
-
},
|
|
13969
|
+
}, Kf = (e, t) => typeof e.render == "function" ? e.render(t) : Gf(e.render, t.value), qf = (e) => ({
|
|
13956
13970
|
key: e,
|
|
13957
13971
|
label: et.toCamel(e, " "),
|
|
13958
13972
|
sortable: !0
|
|
13959
|
-
}),
|
|
13973
|
+
}), Jf = (e, n) => {
|
|
13960
13974
|
let r = [], i = (e) => {
|
|
13961
13975
|
t.Children.forEach(e, (e) => {
|
|
13962
13976
|
if (!t.isValidElement(e)) return;
|
|
@@ -13965,25 +13979,25 @@ var Wf = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "-").replace(/-+/g, "-").replace(/^
|
|
|
13965
13979
|
});
|
|
13966
13980
|
};
|
|
13967
13981
|
return i(Array.isArray(e) ? e : [e]), r;
|
|
13968
|
-
},
|
|
13982
|
+
}, Yf = (e, n, r) => {
|
|
13969
13983
|
if (e?.length) return e;
|
|
13970
13984
|
if (t.isValidElement(r)) {
|
|
13971
|
-
let e =
|
|
13985
|
+
let e = Jf(r, (e) => qf(e.name));
|
|
13972
13986
|
if (e.length > 0) return e;
|
|
13973
13987
|
}
|
|
13974
13988
|
let i = n[0];
|
|
13975
|
-
return i ? Object.entries(i).reduce((e, [n, r]) => (n.startsWith("_") || (t.isValidElement(r) || typeof r != "object" || Array.isArray(r)) && e.push(
|
|
13976
|
-
},
|
|
13989
|
+
return i ? Object.entries(i).reduce((e, [n, r]) => (n.startsWith("_") || (t.isValidElement(r) || typeof r != "object" || Array.isArray(r)) && e.push(qf(n)), e), []) : [];
|
|
13990
|
+
}, Xf = (e, t) => Array.isArray(e) ? e.reduce((e, t) => (t === "delete" ? e[t] = { kind: "delete" } : e[t] = { kind: "modal" }, e), {}) : e ? Object.entries(e).reduce((e, [t, n]) => (n && (e[t] = n), e), {}) : t ? {
|
|
13977
13991
|
add: { kind: "modal" },
|
|
13978
13992
|
edit: { kind: "modal" },
|
|
13979
13993
|
delete: { kind: "delete" }
|
|
13980
|
-
} : {},
|
|
13994
|
+
} : {}, Zf = (e, t) => e?.visible ? typeof e.visible == "function" ? e.visible(t) : e.visible : !0, Qf = (e, t) => e?.disabled ? typeof e.disabled == "function" ? e.disabled(t) : e.disabled : !1, $f = (e, t, n) => t?.label ? t.label : e === "add" ? n?.add ?? "Add" : e === "edit" ? n?.edit ?? "Edit" : e === "delete" ? n?.delete ?? "Delete" : et.toCamel(e, " "), ep = (e) => {
|
|
13981
13995
|
if (!(!e || typeof e == "boolean")) return e;
|
|
13982
13996
|
};
|
|
13983
13997
|
//#endregion
|
|
13984
13998
|
//#region src/components/widgets/grid-core/GridTableView.tsx
|
|
13985
|
-
function
|
|
13986
|
-
let E = p(() =>
|
|
13999
|
+
function tp({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pagination: o, selection: c = !1, selectedKeys: u, onSelectionChange: d, onRowClick: f, reorderable: h = !1, onReorder: g, activeKey: _, groupBy: v, wrapperClassName: y, className: b, heightClassName: x, scrollClassName: S, headerClassName: C, before: w, after: T }) {
|
|
14000
|
+
let E = p(() => Wf(n), [n]), D = m(/* @__PURE__ */ new Map()), O = p(() => e.reduce((e, t) => (e.set(E(t), t), e), /* @__PURE__ */ new Map()), [E, e]), k = p(() => r.reduce((e, t) => (e.set(String(t.key), t), e), /* @__PURE__ */ new Map()), [r]);
|
|
13987
14001
|
l(() => {
|
|
13988
14002
|
let t = new Set(e.map((e) => E(e)));
|
|
13989
14003
|
for (let e of D.current.keys()) t.has(e) || D.current.delete(e);
|
|
@@ -13993,7 +14007,7 @@ function np({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pa
|
|
|
13993
14007
|
if (!o) return Mt(r, t);
|
|
13994
14008
|
let s = Mt(r, t), c = D.current.get(a) ?? /* @__PURE__ */ new Map(), l = c.get(t), u = typeof o.render == "function";
|
|
13995
14009
|
if (l && l.recordRef === r && l.valueRef === s && l.renderRef === o.render && (!u || l.rowIndex === n)) return l.output;
|
|
13996
|
-
let d =
|
|
14010
|
+
let d = Kf(o, {
|
|
13997
14011
|
record: r,
|
|
13998
14012
|
value: s,
|
|
13999
14013
|
key: t,
|
|
@@ -14012,7 +14026,7 @@ function np({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pa
|
|
|
14012
14026
|
E,
|
|
14013
14027
|
i
|
|
14014
14028
|
]);
|
|
14015
|
-
return /* @__PURE__ */ t.createElement(
|
|
14029
|
+
return /* @__PURE__ */ t.createElement($d, {
|
|
14016
14030
|
columns: r.map((e) => ({
|
|
14017
14031
|
key: String(e.key),
|
|
14018
14032
|
label: e.label,
|
|
@@ -14070,20 +14084,20 @@ function np({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pa
|
|
|
14070
14084
|
}
|
|
14071
14085
|
//#endregion
|
|
14072
14086
|
//#region src/Head.tsx
|
|
14073
|
-
var
|
|
14087
|
+
var np = a(null), rp = 0, ip = "LLM Native", ap = {
|
|
14074
14088
|
charset: "UTF-8",
|
|
14075
14089
|
viewport: "width=device-width, initial-scale=1.0"
|
|
14076
|
-
},
|
|
14077
|
-
function
|
|
14090
|
+
}, op = { lang: "en" };
|
|
14091
|
+
function sp(e, t) {
|
|
14078
14092
|
return t.includes(":") ? t : `${e}:${t}`;
|
|
14079
14093
|
}
|
|
14080
|
-
function
|
|
14094
|
+
function cp(e) {
|
|
14081
14095
|
return Array.isArray(e) ? e.join(", ") : e;
|
|
14082
14096
|
}
|
|
14083
|
-
function
|
|
14084
|
-
return e === "siteName" ? "og:site_name" :
|
|
14097
|
+
function lp(e) {
|
|
14098
|
+
return e === "siteName" ? "og:site_name" : sp("og", e);
|
|
14085
14099
|
}
|
|
14086
|
-
function
|
|
14100
|
+
function up(e) {
|
|
14087
14101
|
return [
|
|
14088
14102
|
...e.canonical ? [{
|
|
14089
14103
|
rel: "canonical",
|
|
@@ -14101,7 +14115,7 @@ function dp(e) {
|
|
|
14101
14115
|
...e.links ?? []
|
|
14102
14116
|
];
|
|
14103
14117
|
}
|
|
14104
|
-
function
|
|
14118
|
+
function dp(e) {
|
|
14105
14119
|
return [...e.prev ? [{
|
|
14106
14120
|
rel: "prev",
|
|
14107
14121
|
href: e.prev
|
|
@@ -14110,7 +14124,7 @@ function fp(e) {
|
|
|
14110
14124
|
href: e.next
|
|
14111
14125
|
}] : []];
|
|
14112
14126
|
}
|
|
14113
|
-
function
|
|
14127
|
+
function fp(e) {
|
|
14114
14128
|
return (e.alternates ?? []).map((e) => ({
|
|
14115
14129
|
rel: "alternate",
|
|
14116
14130
|
href: e.href,
|
|
@@ -14120,28 +14134,28 @@ function pp(e) {
|
|
|
14120
14134
|
title: e.title
|
|
14121
14135
|
}));
|
|
14122
14136
|
}
|
|
14123
|
-
function
|
|
14137
|
+
function pp(e, t, n) {
|
|
14124
14138
|
return {
|
|
14125
14139
|
name: {
|
|
14126
14140
|
description: e.description,
|
|
14127
14141
|
...e.meta ?? {},
|
|
14128
14142
|
robots: n.robots ?? e.meta?.robots,
|
|
14129
14143
|
googlebot: n.googlebot,
|
|
14130
|
-
keywords:
|
|
14144
|
+
keywords: cp(n.keywords),
|
|
14131
14145
|
author: n.author,
|
|
14132
14146
|
publisher: n.publisher,
|
|
14133
14147
|
referrer: n.referrer,
|
|
14134
14148
|
...n.meta ?? {},
|
|
14135
|
-
...Object.fromEntries(Object.entries(t.twitter ?? {}).map(([e, t]) => [
|
|
14149
|
+
...Object.fromEntries(Object.entries(t.twitter ?? {}).map(([e, t]) => [sp("twitter", e), t]))
|
|
14136
14150
|
},
|
|
14137
|
-
property: Object.fromEntries(Object.entries(t.openGraph ?? {}).map(([e, t]) => [
|
|
14151
|
+
property: Object.fromEntries(Object.entries(t.openGraph ?? {}).map(([e, t]) => [lp(e), t]))
|
|
14138
14152
|
};
|
|
14139
14153
|
}
|
|
14140
|
-
function
|
|
14154
|
+
function mp(e, t, n, r) {
|
|
14141
14155
|
return [
|
|
14142
|
-
...
|
|
14143
|
-
...
|
|
14144
|
-
...
|
|
14156
|
+
...up(t),
|
|
14157
|
+
...dp(r),
|
|
14158
|
+
...fp(n),
|
|
14145
14159
|
...e.canonical && !t.canonical ? [{
|
|
14146
14160
|
rel: "canonical",
|
|
14147
14161
|
href: e.canonical
|
|
@@ -14149,7 +14163,7 @@ function hp(e, t, n, r) {
|
|
|
14149
14163
|
...e.links ?? []
|
|
14150
14164
|
];
|
|
14151
14165
|
}
|
|
14152
|
-
function
|
|
14166
|
+
function hp(e) {
|
|
14153
14167
|
return [...(e.fonts ?? []).flatMap((e) => [
|
|
14154
14168
|
...(e.dnsPrefetch ?? []).map((e) => ({
|
|
14155
14169
|
rel: "dns-prefetch",
|
|
@@ -14176,7 +14190,7 @@ function gp(e) {
|
|
|
14176
14190
|
}
|
|
14177
14191
|
])];
|
|
14178
14192
|
}
|
|
14179
|
-
function
|
|
14193
|
+
function gp(e) {
|
|
14180
14194
|
return [
|
|
14181
14195
|
...e.manifest ? [{
|
|
14182
14196
|
rel: "manifest",
|
|
@@ -14193,7 +14207,7 @@ function _p(e) {
|
|
|
14193
14207
|
...e.icons ?? []
|
|
14194
14208
|
];
|
|
14195
14209
|
}
|
|
14196
|
-
function
|
|
14210
|
+
function _p(e) {
|
|
14197
14211
|
return {
|
|
14198
14212
|
"theme-color": e.themeColor,
|
|
14199
14213
|
"msapplication-TileColor": e.backgroundColor,
|
|
@@ -14205,27 +14219,27 @@ function vp(e) {
|
|
|
14205
14219
|
"apple-mobile-web-app-status-bar-style": e.appleMobileWebAppStatusBarStyle
|
|
14206
14220
|
};
|
|
14207
14221
|
}
|
|
14208
|
-
function
|
|
14222
|
+
function vp(e) {
|
|
14209
14223
|
return Array.isArray(e.jsonLd) ? e.jsonLd : e.jsonLd ? [e.jsonLd] : [];
|
|
14210
14224
|
}
|
|
14211
|
-
function
|
|
14225
|
+
function yp(e) {
|
|
14212
14226
|
return Object.fromEntries(Object.entries(e).filter(([, e]) => !!e));
|
|
14213
14227
|
}
|
|
14214
|
-
function
|
|
14228
|
+
function bp(e) {
|
|
14215
14229
|
let { inline: t, ...n } = e;
|
|
14216
14230
|
return Object.fromEntries(Object.entries(n).filter(([, e]) => e !== void 0 && e !== !1));
|
|
14217
14231
|
}
|
|
14218
|
-
function
|
|
14232
|
+
function xp(e) {
|
|
14219
14233
|
let { inline: t, ...n } = e;
|
|
14220
14234
|
return Object.fromEntries(Object.entries(n).filter(([, e]) => e !== void 0 && e !== !1));
|
|
14221
14235
|
}
|
|
14222
|
-
function
|
|
14236
|
+
function Sp({ appName: e, metadata: n, social: r, links: i, pagination: a, language: o, document: s, assets: c, pwa: l, schemaOrg: u }) {
|
|
14223
14237
|
if (globalThis.document === void 0) return null;
|
|
14224
|
-
let d =
|
|
14225
|
-
...
|
|
14226
|
-
...
|
|
14227
|
-
...
|
|
14228
|
-
], m =
|
|
14238
|
+
let d = pp(n, r, s), f = _p(l), p = [
|
|
14239
|
+
...mp(i, s, o, a),
|
|
14240
|
+
...hp(c),
|
|
14241
|
+
...gp(l)
|
|
14242
|
+
], m = vp(u);
|
|
14229
14243
|
return j(/* @__PURE__ */ t.createElement(t.Fragment, null, s.charset ? /* @__PURE__ */ t.createElement("meta", {
|
|
14230
14244
|
charSet: s.charset,
|
|
14231
14245
|
"data-rfs-head": "document"
|
|
@@ -14259,12 +14273,12 @@ function Cp({ appName: e, metadata: n, social: r, links: i, pagination: a, langu
|
|
|
14259
14273
|
"data-rfs-head": "pwa"
|
|
14260
14274
|
}) : null), p.map((e, n) => /* @__PURE__ */ t.createElement("link", {
|
|
14261
14275
|
key: `${e.rel}:${e.href ?? n}`,
|
|
14262
|
-
...
|
|
14276
|
+
...yp(e),
|
|
14263
14277
|
"data-rfs-head": "link"
|
|
14264
14278
|
})), (c.styles ?? []).map((e, n) => /* @__PURE__ */ t.createElement(t.Fragment, { key: `style:${e.href ?? n}` }, e.href ? /* @__PURE__ */ t.createElement("link", {
|
|
14265
14279
|
rel: "stylesheet",
|
|
14266
14280
|
href: e.href,
|
|
14267
|
-
...
|
|
14281
|
+
...xp(e),
|
|
14268
14282
|
"data-rfs-head": "asset-style"
|
|
14269
14283
|
}) : null, e.inline ? /* @__PURE__ */ t.createElement("style", {
|
|
14270
14284
|
id: e.id,
|
|
@@ -14273,7 +14287,7 @@ function Cp({ appName: e, metadata: n, social: r, links: i, pagination: a, langu
|
|
|
14273
14287
|
title: e.title,
|
|
14274
14288
|
"data-rfs-head": "asset-style"
|
|
14275
14289
|
}, e.inline) : null)), (c.scripts ?? []).map((e, n) => /* @__PURE__ */ t.createElement(t.Fragment, { key: `script:${e.src ?? n}` }, e.src ? /* @__PURE__ */ t.createElement("script", {
|
|
14276
|
-
...
|
|
14290
|
+
...bp(e),
|
|
14277
14291
|
"data-rfs-head": "asset-script"
|
|
14278
14292
|
}) : null, e.inline ? /* @__PURE__ */ t.createElement("script", {
|
|
14279
14293
|
type: e.type,
|
|
@@ -14286,15 +14300,15 @@ function Cp({ appName: e, metadata: n, social: r, links: i, pagination: a, langu
|
|
|
14286
14300
|
"data-rfs-head": "schema-org"
|
|
14287
14301
|
}, JSON.stringify(e)))), globalThis.document.head);
|
|
14288
14302
|
}
|
|
14289
|
-
function
|
|
14290
|
-
let r = e || "LLM Native", i = t.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.lang), a = t.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.dir), [o, c] = h({}), [u, d] = h([]), [f, m] = h({}), [g, _] = h({}), [v, y] = h({}), [b, x] = h(
|
|
14303
|
+
function Cp({ appName: e = ip, children: n }) {
|
|
14304
|
+
let r = e || "LLM Native", i = t.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.lang), a = t.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.dir), [o, c] = h({}), [u, d] = h([]), [f, m] = h({}), [g, _] = h({}), [v, y] = h({}), [b, x] = h(op), [S, C] = h(ap), [w, T] = h({}), [E, D] = h({}), [O, k] = h({}), A = s(() => c({}), []), j = s((e, t) => {
|
|
14291
14305
|
d((n) => [...n.filter((t) => t.id !== e), {
|
|
14292
14306
|
id: e,
|
|
14293
14307
|
metadata: t
|
|
14294
14308
|
}]);
|
|
14295
14309
|
}, []), M = s((e) => {
|
|
14296
14310
|
d((t) => t.filter((t) => t.id !== e));
|
|
14297
|
-
}, []), N = s(() => m({}), []), P = s(() => _({}), []), F = s(() => y({}), []), I = s(() => x(
|
|
14311
|
+
}, []), N = s(() => m({}), []), P = s(() => _({}), []), F = s(() => y({}), []), I = s(() => x(op), []), L = s(() => C(ap), []), R = s(() => T({}), []), z = s(() => D({}), []), B = s(() => k({}), []);
|
|
14298
14312
|
l(() => {
|
|
14299
14313
|
globalThis.document !== void 0 && (globalThis.document.documentElement.lang = b.lang ?? i.current, globalThis.document.documentElement.dir = b.dir ?? a.current);
|
|
14300
14314
|
}, [b.lang, b.dir]);
|
|
@@ -14354,7 +14368,7 @@ function wp({ appName: e = ap, children: n }) {
|
|
|
14354
14368
|
z,
|
|
14355
14369
|
B
|
|
14356
14370
|
]);
|
|
14357
|
-
return /* @__PURE__ */ t.createElement(
|
|
14371
|
+
return /* @__PURE__ */ t.createElement(np.Provider, { value: H }, n, /* @__PURE__ */ t.createElement(Sp, {
|
|
14358
14372
|
appName: r,
|
|
14359
14373
|
metadata: V,
|
|
14360
14374
|
social: f,
|
|
@@ -14367,16 +14381,16 @@ function wp({ appName: e = ap, children: n }) {
|
|
|
14367
14381
|
schemaOrg: O
|
|
14368
14382
|
}));
|
|
14369
14383
|
}
|
|
14370
|
-
function
|
|
14371
|
-
return c(
|
|
14384
|
+
function wp() {
|
|
14385
|
+
return c(np);
|
|
14372
14386
|
}
|
|
14373
|
-
function
|
|
14387
|
+
function Tp(e) {
|
|
14374
14388
|
return JSON.stringify(e ?? {});
|
|
14375
14389
|
}
|
|
14376
|
-
function
|
|
14377
|
-
let n =
|
|
14378
|
-
r.current ||= (
|
|
14379
|
-
let i =
|
|
14390
|
+
function Ep(e) {
|
|
14391
|
+
let n = wp(), r = t.useRef(null);
|
|
14392
|
+
r.current ||= (rp += 1, `metadata-${rp}`);
|
|
14393
|
+
let i = Tp(e);
|
|
14380
14394
|
return l(() => {
|
|
14381
14395
|
if (!n || !e) return;
|
|
14382
14396
|
let t = r.current;
|
|
@@ -14387,40 +14401,40 @@ function Dp(e) {
|
|
|
14387
14401
|
i
|
|
14388
14402
|
]), n;
|
|
14389
14403
|
}
|
|
14390
|
-
function
|
|
14391
|
-
let t =
|
|
14404
|
+
function Dp(e) {
|
|
14405
|
+
let t = wp(), n = Tp(e);
|
|
14392
14406
|
return l(() => {
|
|
14393
14407
|
if (!t || !e) return;
|
|
14394
14408
|
let n = t.social;
|
|
14395
14409
|
return t.setSocialHead(e), () => t.setSocialHead(n);
|
|
14396
14410
|
}, [t?.setSocialHead, n]), t;
|
|
14397
14411
|
}
|
|
14398
|
-
function
|
|
14399
|
-
let t =
|
|
14412
|
+
function Op(e) {
|
|
14413
|
+
let t = wp(), n = Tp(e);
|
|
14400
14414
|
return l(() => {
|
|
14401
14415
|
if (!t || !e) return;
|
|
14402
14416
|
let n = t.links;
|
|
14403
14417
|
return t.setHeadLinks(e), () => t.setHeadLinks(n);
|
|
14404
14418
|
}, [t?.setHeadLinks, n]), t;
|
|
14405
14419
|
}
|
|
14406
|
-
function
|
|
14407
|
-
let t =
|
|
14420
|
+
function kp(e) {
|
|
14421
|
+
let t = wp(), n = Tp(e);
|
|
14408
14422
|
return l(() => {
|
|
14409
14423
|
if (!t || !e) return;
|
|
14410
14424
|
let n = t.pagination;
|
|
14411
14425
|
return t.setPaginationHead(e), () => t.setPaginationHead(n);
|
|
14412
14426
|
}, [t?.setPaginationHead, n]), t;
|
|
14413
14427
|
}
|
|
14414
|
-
function
|
|
14415
|
-
let t =
|
|
14428
|
+
function Ap(e) {
|
|
14429
|
+
let t = wp(), n = Tp(e);
|
|
14416
14430
|
return l(() => {
|
|
14417
14431
|
if (!t || !e) return;
|
|
14418
14432
|
let n = t.language;
|
|
14419
14433
|
return t.setLanguageHead(e), () => t.setLanguageHead(n);
|
|
14420
14434
|
}, [t?.setLanguageHead, n]), t;
|
|
14421
14435
|
}
|
|
14422
|
-
function
|
|
14423
|
-
let t =
|
|
14436
|
+
function jp(e) {
|
|
14437
|
+
let t = wp(), n = Tp(e);
|
|
14424
14438
|
return l(() => {
|
|
14425
14439
|
if (!t || !e) return;
|
|
14426
14440
|
let n = t.document;
|
|
@@ -14430,39 +14444,39 @@ function Mp(e) {
|
|
|
14430
14444
|
}), () => t.setDocumentHead(n);
|
|
14431
14445
|
}, [t?.setDocumentHead, n]), t;
|
|
14432
14446
|
}
|
|
14433
|
-
function
|
|
14434
|
-
let t =
|
|
14447
|
+
function Mp(e) {
|
|
14448
|
+
let t = wp(), n = Tp(e);
|
|
14435
14449
|
return l(() => {
|
|
14436
14450
|
if (!t || !e) return;
|
|
14437
14451
|
let n = t.assets;
|
|
14438
14452
|
return t.setAssetsHead(e), () => t.setAssetsHead(n);
|
|
14439
14453
|
}, [t?.setAssetsHead, n]), t;
|
|
14440
14454
|
}
|
|
14441
|
-
function
|
|
14442
|
-
let t =
|
|
14455
|
+
function Np(e) {
|
|
14456
|
+
let t = wp(), n = Tp(e);
|
|
14443
14457
|
return l(() => {
|
|
14444
14458
|
if (!t || !e) return;
|
|
14445
14459
|
let n = t.pwa;
|
|
14446
14460
|
return t.setPwaHead(e), () => t.setPwaHead(n);
|
|
14447
14461
|
}, [t?.setPwaHead, n]), t;
|
|
14448
14462
|
}
|
|
14449
|
-
function
|
|
14450
|
-
let t =
|
|
14463
|
+
function Pp(e) {
|
|
14464
|
+
let t = wp(), n = Tp(e);
|
|
14451
14465
|
return l(() => {
|
|
14452
14466
|
if (!t || !e) return;
|
|
14453
14467
|
let n = t.schemaOrg;
|
|
14454
14468
|
return t.setSchemaOrg(e), () => t.setSchemaOrg(n);
|
|
14455
14469
|
}, [t?.setSchemaOrg, n]), t;
|
|
14456
14470
|
}
|
|
14457
|
-
function
|
|
14458
|
-
return
|
|
14471
|
+
function Fp(e) {
|
|
14472
|
+
return Ep(e), null;
|
|
14459
14473
|
}
|
|
14460
14474
|
//#endregion
|
|
14461
14475
|
//#region src/components/widgets/MarkdownReader.tsx
|
|
14462
|
-
var
|
|
14476
|
+
var Ip = (e) => /^(https?:)?\/\//.test(e) || e.startsWith("mailto:") || e.startsWith("tel:"), Lp = (e) => !!e && !Ip(e) && !e.startsWith("#"), Rp = (e) => e.startsWith("#"), zp = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(zp).join("") : t.isValidElement(e) ? zp(e.props.children) : "", Bp = (e) => {
|
|
14463
14477
|
if (t.isValidElement(e)) return /language-([\w-]+)/.exec(e.props.className || "")?.[1];
|
|
14464
14478
|
};
|
|
14465
|
-
function
|
|
14479
|
+
function Vp({ code: e, language: n }) {
|
|
14466
14480
|
let [r, i] = t.useState(!1), a = Fn("code");
|
|
14467
14481
|
return /* @__PURE__ */ t.createElement("div", { className: "relative my-4 overflow-hidden rounded-md border bg-muted/50" }, /* @__PURE__ */ t.createElement("div", { className: "flex h-9 items-center justify-between border-b px-3" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs font-medium text-muted-foreground" }, n || a.codeLanguageDefault), /* @__PURE__ */ t.createElement("button", {
|
|
14468
14482
|
type: "button",
|
|
@@ -14472,7 +14486,7 @@ function Hp({ code: e, language: n }) {
|
|
|
14472
14486
|
}
|
|
14473
14487
|
}, r ? a.copied : a.copy)), /* @__PURE__ */ t.createElement("pre", { className: "m-0 overflow-x-auto p-4 text-xs leading-relaxed" }, /* @__PURE__ */ t.createElement("code", { className: n ? `language-${n}` : void 0 }, e)));
|
|
14474
14488
|
}
|
|
14475
|
-
var
|
|
14489
|
+
var Hp = (e) => ({
|
|
14476
14490
|
h1: ({ className: e, ...n }) => /* @__PURE__ */ t.createElement("h1", {
|
|
14477
14491
|
className: X("mt-8 scroll-m-20 text-3xl font-bold tracking-normal first:mt-0 [&>a]:no-underline [&>a:hover]:opacity-80", e),
|
|
14478
14492
|
...n
|
|
@@ -14526,18 +14540,18 @@ var Up = (e) => ({
|
|
|
14526
14540
|
...n
|
|
14527
14541
|
}),
|
|
14528
14542
|
a: ({ className: n, href: r = "", onClick: i, ...a }) => /* @__PURE__ */ t.createElement("a", {
|
|
14529
|
-
className: X(
|
|
14543
|
+
className: X(Rp(r) ? "text-primary no-underline transition-opacity hover:opacity-80" : "font-medium text-primary no-underline transition-opacity hover:opacity-80", n),
|
|
14530
14544
|
href: r,
|
|
14531
|
-
target:
|
|
14532
|
-
rel:
|
|
14545
|
+
target: Ip(r) ? "_blank" : void 0,
|
|
14546
|
+
rel: Ip(r) ? "noreferrer" : void 0,
|
|
14533
14547
|
onClick: (t) => {
|
|
14534
|
-
i?.(t), !t.defaultPrevented && e &&
|
|
14548
|
+
i?.(t), !t.defaultPrevented && e && Lp(r) && (t.preventDefault(), e(r, t));
|
|
14535
14549
|
},
|
|
14536
14550
|
...a
|
|
14537
14551
|
}),
|
|
14538
|
-
pre: ({ children: e }) => /* @__PURE__ */ t.createElement(
|
|
14539
|
-
code:
|
|
14540
|
-
language:
|
|
14552
|
+
pre: ({ children: e }) => /* @__PURE__ */ t.createElement(Vp, {
|
|
14553
|
+
code: zp(e).replace(/\n$/, ""),
|
|
14554
|
+
language: Bp(e)
|
|
14541
14555
|
}),
|
|
14542
14556
|
code: ({ className: e, children: n, ...r }) => typeof e == "string" && e.startsWith("language-") ? /* @__PURE__ */ t.createElement("code", {
|
|
14543
14557
|
className: e,
|
|
@@ -14552,13 +14566,13 @@ var Up = (e) => ({
|
|
|
14552
14566
|
...n
|
|
14553
14567
|
})
|
|
14554
14568
|
});
|
|
14555
|
-
function
|
|
14569
|
+
function Up({ content: e, components: n, className: r, wrapperClassName: i, metadata: a, onInternalLinkClick: o }) {
|
|
14556
14570
|
let s = t.useMemo(() => e.match(/^#[ \t]+(.+)/m)?.[1]?.trim(), [e]);
|
|
14557
|
-
|
|
14571
|
+
Ep(a || s ? {
|
|
14558
14572
|
...a ?? {},
|
|
14559
14573
|
title: a?.title ?? s
|
|
14560
14574
|
} : void 0);
|
|
14561
|
-
let c = t.useMemo(() =>
|
|
14575
|
+
let c = t.useMemo(() => Hp(o), [o]);
|
|
14562
14576
|
return /* @__PURE__ */ t.createElement("div", { className: X("rf-markdown-reader max-w-none text-sm text-foreground", i, r) }, /* @__PURE__ */ t.createElement(ke, {
|
|
14563
14577
|
remarkPlugins: [Ae],
|
|
14564
14578
|
rehypePlugins: [
|
|
@@ -14574,7 +14588,7 @@ function Wp({ content: e, components: n, className: r, wrapperClassName: i, meta
|
|
|
14574
14588
|
}
|
|
14575
14589
|
//#endregion
|
|
14576
14590
|
//#region src/components/widgets/TabDynamic.tsx
|
|
14577
|
-
var
|
|
14591
|
+
var Wp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRemove: a = void 0, label: o = "Tab", min: s = 1, max: c = void 0, activeIndex: l = 0, title: u = void 0, readOnly: d = !1, tabPosition: f = "default" }) => {
|
|
14578
14592
|
let { value: m, handleChange: g } = Dd({
|
|
14579
14593
|
name: n,
|
|
14580
14594
|
onChange: r
|
|
@@ -14605,7 +14619,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14605
14619
|
}, E = (e) => {
|
|
14606
14620
|
let t = S.length - 1;
|
|
14607
14621
|
a?.(e), g({ target: { name: `${n}.${e}` } }), v >= t && y((e) => e - 1), x((e) => e + 1);
|
|
14608
|
-
}, D =
|
|
14622
|
+
}, D = qd[f], O = Wd(f);
|
|
14609
14623
|
return /* @__PURE__ */ t.createElement("div", null, u && /* @__PURE__ */ t.createElement("h3", null, u), /* @__PURE__ */ t.createElement(D, {
|
|
14610
14624
|
menu: /* @__PURE__ */ t.createElement(t.Fragment, null, S?.map((e, r) => /* @__PURE__ */ t.createElement("div", {
|
|
14611
14625
|
key: `${n}-${r}`,
|
|
@@ -14615,7 +14629,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14615
14629
|
role: "tab",
|
|
14616
14630
|
"aria-selected": r === v,
|
|
14617
14631
|
onClick: () => y(r),
|
|
14618
|
-
className:
|
|
14632
|
+
className: Gd(f, r === v, !d && S.length - 1 >= s && r === v ? "pr-9" : void 0)
|
|
14619
14633
|
}, e), !d && S.length - 1 >= s && r === v && /* @__PURE__ */ t.createElement(Hr, {
|
|
14620
14634
|
className: "absolute right-2 top-1/2 -translate-y-1/2 p-1 text-current opacity-70 hover:opacity-100",
|
|
14621
14635
|
icon: "x",
|
|
@@ -14624,14 +14638,14 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14624
14638
|
key: S.length + 1,
|
|
14625
14639
|
className: O.itemClassName
|
|
14626
14640
|
}, /* @__PURE__ */ t.createElement(Hr, {
|
|
14627
|
-
className:
|
|
14641
|
+
className: Gd(f, !1, "border border-dashed border-border/70 justify-center"),
|
|
14628
14642
|
icon: "plus",
|
|
14629
14643
|
title: "Add tab",
|
|
14630
14644
|
onClick: T
|
|
14631
14645
|
}))),
|
|
14632
|
-
content: /* @__PURE__ */ t.createElement("div", { className:
|
|
14646
|
+
content: /* @__PURE__ */ t.createElement("div", { className: Kd() }, w)
|
|
14633
14647
|
}));
|
|
14634
|
-
},
|
|
14648
|
+
}, Gp = ({ records: e, children: n, limit: r = void 0, page: i = void 0, maxPageButtons: a = void 0, appendTo: o = void 0, before: s = void 0, after: c = void 0, className: u = void 0, wrapperClassName: d = void 0, scrollToTopOnChange: f = void 0, scrollBehavior: m = void 0, align: g = void 0, sticky: _ = void 0 }) => {
|
|
14635
14649
|
let v = Y("pagination"), y = Fn("common"), [b, x] = h(i || 1), S = r || e.length, C = Math.ceil(e.length / S), w = (b - 1) * S, T = w + S, E = p(() => e.slice(w, T), [
|
|
14636
14650
|
e,
|
|
14637
14651
|
w,
|
|
@@ -14695,7 +14709,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14695
14709
|
className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", A === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground")
|
|
14696
14710
|
}, /* @__PURE__ */ t.createElement("span", null, "»"))))), c);
|
|
14697
14711
|
return /* @__PURE__ */ t.createElement(t.Fragment, null, n(E, w), o ? j(P, o) : o === void 0 && P);
|
|
14698
|
-
},
|
|
14712
|
+
}, Kp = ({ records: e = void 0, header: n = void 0, footer: r = void 0, overlays: i = void 0, renderItem: a = void 0, onRowClick: o = void 0, onSelectionChange: c = void 0, sortable: u = !1, pagination: d = void 0, gap: f = void 0, columns: g = void 0, groupBy: _ = void 0, selectedKeys: v = void 0, before: y = void 0, after: b = void 0, wrapperClassName: x = void 0, className: S = void 0, headerClassName: C = void 0, scrollClassName: w = void 0, bodyClassName: T = void 0, footerClassName: E = void 0, selectedClassName: D = void 0 }) => {
|
|
14699
14713
|
let O = Y("gallery"), k = Fn("gallery"), A = Fn("common"), j = D || O.Gallery.selectedClassName, [M, N] = h(null), P = s((e) => {
|
|
14700
14714
|
e && N(e);
|
|
14701
14715
|
}, []), F = f ?? O.Gallery.gap, I = g ?? O.Gallery.rowCols, L = {
|
|
@@ -14720,7 +14734,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14720
14734
|
typeof u == "object" ? u?.dir : void 0,
|
|
14721
14735
|
typeof u == "object" ? u?.field : void 0,
|
|
14722
14736
|
u
|
|
14723
|
-
]), W =
|
|
14737
|
+
]), W = Qd("item"), ee = s((e, t) => W(e, t), [W]), { activeSelectedKeys: G, showSelection: te, updateSelection: ne } = Zd({
|
|
14724
14738
|
records: H,
|
|
14725
14739
|
selectedKeys: v,
|
|
14726
14740
|
onSelectionChange: c,
|
|
@@ -14904,7 +14918,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14904
14918
|
_,
|
|
14905
14919
|
U
|
|
14906
14920
|
]);
|
|
14907
|
-
return me === void 0 ? /* @__PURE__ */ t.createElement("p", { className: "p-4" }, /* @__PURE__ */ t.createElement("span", { className: "mr-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), A.loading) : me.length === 0 ? /* @__PURE__ */ t.createElement("p", { className: "p-4" }, A.noDataFound) : /* @__PURE__ */ t.createElement("div", { className: X("flex items-stretch gap-3", x || O.Gallery.wrapperClassName) }, y && /* @__PURE__ */ t.createElement("div", { className: "gallery-before flex shrink-0 items-center self-stretch" }, y), /* @__PURE__ */ t.createElement(Z, { className: X("min-w-0 flex-1 flex flex-col", S || O.Gallery.className) }, n && /* @__PURE__ */ t.createElement("div", { className: C || O.Gallery.headerClassName }, n), /* @__PURE__ */ t.createElement(Z, { className: X("min-w-0 flex-1", w || O.Gallery.scrollClassName) }, /* @__PURE__ */ t.createElement(
|
|
14921
|
+
return me === void 0 ? /* @__PURE__ */ t.createElement("p", { className: "p-4" }, /* @__PURE__ */ t.createElement("span", { className: "mr-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), A.loading) : me.length === 0 ? /* @__PURE__ */ t.createElement("p", { className: "p-4" }, A.noDataFound) : /* @__PURE__ */ t.createElement("div", { className: X("flex items-stretch gap-3", x || O.Gallery.wrapperClassName) }, y && /* @__PURE__ */ t.createElement("div", { className: "gallery-before flex shrink-0 items-center self-stretch" }, y), /* @__PURE__ */ t.createElement(Z, { className: X("min-w-0 flex-1 flex flex-col", S || O.Gallery.className) }, n && /* @__PURE__ */ t.createElement("div", { className: C || O.Gallery.headerClassName }, n), /* @__PURE__ */ t.createElement(Z, { className: X("min-w-0 flex-1", w || O.Gallery.scrollClassName) }, /* @__PURE__ */ t.createElement(Gp, {
|
|
14908
14922
|
records: me,
|
|
14909
14923
|
appendTo: M,
|
|
14910
14924
|
wrapperClassName: "px-3 pt-4 pb-2",
|
|
@@ -14925,12 +14939,12 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14925
14939
|
};
|
|
14926
14940
|
//#endregion
|
|
14927
14941
|
//#region src/components/widgets/grid-core/GridGalleryView.tsx
|
|
14928
|
-
function
|
|
14929
|
-
let _ = p(() =>
|
|
14942
|
+
function qp({ records: e, recordId: n, sortable: r, pagination: i, selection: a = !1, selectedKeys: o, onSelectionChange: s, onRowClick: c, groupBy: l, wrapperClassName: u, before: d, after: f, columns: m, overlays: h, renderItem: g }) {
|
|
14943
|
+
let _ = p(() => Wf(n), [n]), v = p(() => e.reduce((e, t) => (e.set(_(t), t), e), /* @__PURE__ */ new Map()), [_, e]), y = p(() => e.map((e) => ({
|
|
14930
14944
|
...e,
|
|
14931
14945
|
[za]: _(e)
|
|
14932
14946
|
})), [e, _]);
|
|
14933
|
-
return /* @__PURE__ */ t.createElement(
|
|
14947
|
+
return /* @__PURE__ */ t.createElement(Kp, {
|
|
14934
14948
|
records: y,
|
|
14935
14949
|
overlays: h,
|
|
14936
14950
|
renderItem: g ? (e, t, n) => g(e, t, n) : void 0,
|
|
@@ -14966,8 +14980,8 @@ function Jp({ records: e, recordId: n, sortable: r, pagination: i, selection: a
|
|
|
14966
14980
|
}
|
|
14967
14981
|
//#endregion
|
|
14968
14982
|
//#region src/components/widgets/grid-core/useGridActions.tsx
|
|
14969
|
-
function
|
|
14970
|
-
let _ = x(), v = S(), y = u(), b = _d(), C = p(() =>
|
|
14983
|
+
function Jp({ actions: e, form: n, editDeepLink: r, preparedRecords: i, recordId: a, sourcePath: o, db: c, onSave: d, onDelete: f, onComplete: m, audit: g = !1 }) {
|
|
14984
|
+
let _ = x(), v = S(), y = u(), b = _d(), C = p(() => Wf(a), [a]), w = p(() => Xf(e, !!n), [e, n]), [T, E] = h(null), D = p(() => `${Uf(o || "grid-records")}-${Uf(y)}`, [y, o]), O = s(() => {
|
|
14971
14985
|
E(null), r && _.hash.startsWith(`#${D}:`) && v({
|
|
14972
14986
|
pathname: _.pathname,
|
|
14973
14987
|
search: _.search,
|
|
@@ -14998,7 +15012,7 @@ function Yp({ actions: e, form: n, editDeepLink: r, preparedRecords: i, recordId
|
|
|
14998
15012
|
o
|
|
14999
15013
|
]), A = s(async () => b.save(), [b]), j = s(async (e, t) => {
|
|
15000
15014
|
let n = w[e];
|
|
15001
|
-
if (!n || !
|
|
15015
|
+
if (!n || !Zf(n, t) || Qf(n, t)) return;
|
|
15002
15016
|
let i = {
|
|
15003
15017
|
actionKey: e,
|
|
15004
15018
|
record: t,
|
|
@@ -15160,8 +15174,8 @@ function Yp({ actions: e, form: n, editDeepLink: r, preparedRecords: i, recordId
|
|
|
15160
15174
|
}
|
|
15161
15175
|
//#endregion
|
|
15162
15176
|
//#region src/components/widgets/grid-core/useGridColumns.ts
|
|
15163
|
-
function
|
|
15164
|
-
return p(() =>
|
|
15177
|
+
function Yp({ columns: e, records: t, form: n }) {
|
|
15178
|
+
return p(() => Yf(e, t, n), [
|
|
15165
15179
|
e,
|
|
15166
15180
|
n,
|
|
15167
15181
|
t
|
|
@@ -15169,7 +15183,7 @@ function Xp({ columns: e, records: t, form: n }) {
|
|
|
15169
15183
|
}
|
|
15170
15184
|
//#endregion
|
|
15171
15185
|
//#region src/components/widgets/grid-core/useGridPreparedRecords.ts
|
|
15172
|
-
function
|
|
15186
|
+
function Xp({ records: e, onLoad: t }) {
|
|
15173
15187
|
let [n, r] = h(e), [i, a] = h(!1);
|
|
15174
15188
|
return l(() => {
|
|
15175
15189
|
if (!t) {
|
|
@@ -15192,7 +15206,7 @@ function Zp({ records: e, onLoad: t }) {
|
|
|
15192
15206
|
}
|
|
15193
15207
|
//#endregion
|
|
15194
15208
|
//#region src/components/widgets/grid-core/useGridSelection.ts
|
|
15195
|
-
function
|
|
15209
|
+
function Zp({ selection: e }) {
|
|
15196
15210
|
let t = e !== null && e !== !1 && typeof e == "object", n = e ? typeof e == "string" ? e : e.mode : !1, r = t ? e.defaultKeys : void 0, i = t ? e.onChange : void 0, [a, o] = h(r ?? []), [c, u] = h([]);
|
|
15197
15211
|
l(() => {
|
|
15198
15212
|
o(r ?? []), u([]);
|
|
@@ -15225,7 +15239,7 @@ function Qp({ selection: e }) {
|
|
|
15225
15239
|
}
|
|
15226
15240
|
//#endregion
|
|
15227
15241
|
//#region src/components/widgets/grid-core/GridCore.tsx
|
|
15228
|
-
var
|
|
15242
|
+
var Qp = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function" ? t.title(n) : t.title || r : t?.kind === "modal" ? typeof t.title == "function" ? t.title(n) : t.title || $f(e, t, i) : $f(e, t, i), $p = (e) => {
|
|
15229
15243
|
switch (e.kind) {
|
|
15230
15244
|
case "select": return "";
|
|
15231
15245
|
case "multiselect": return [];
|
|
@@ -15239,7 +15253,7 @@ var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
|
|
|
15239
15253
|
};
|
|
15240
15254
|
default: return e.defaultValue ?? !1;
|
|
15241
15255
|
}
|
|
15242
|
-
},
|
|
15256
|
+
}, em = (e, t) => {
|
|
15243
15257
|
switch (e.kind) {
|
|
15244
15258
|
case "select": return typeof t == "string" && t !== "";
|
|
15245
15259
|
case "multiselect": return Array.isArray(t) && t.length > 0;
|
|
@@ -15253,7 +15267,7 @@ var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
|
|
|
15253
15267
|
}
|
|
15254
15268
|
default: return !!t != !!(e.defaultValue ?? !1);
|
|
15255
15269
|
}
|
|
15256
|
-
},
|
|
15270
|
+
}, tm = (e, t, n) => {
|
|
15257
15271
|
switch (e.kind) {
|
|
15258
15272
|
case "select": return e.predicate(t, n);
|
|
15259
15273
|
case "multiselect": return e.predicate(t, n);
|
|
@@ -15261,7 +15275,7 @@ var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
|
|
|
15261
15275
|
case "numberRange": return e.predicate(t, n);
|
|
15262
15276
|
default: return e.predicate(t, n);
|
|
15263
15277
|
}
|
|
15264
|
-
},
|
|
15278
|
+
}, nm = (e, t, n) => {
|
|
15265
15279
|
switch (e.kind) {
|
|
15266
15280
|
case "select": {
|
|
15267
15281
|
let n = e.options.find((e) => e.value === t);
|
|
@@ -15285,10 +15299,10 @@ var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
|
|
|
15285
15299
|
}
|
|
15286
15300
|
default: return e.label;
|
|
15287
15301
|
}
|
|
15288
|
-
},
|
|
15289
|
-
function
|
|
15302
|
+
}, rm = "w-full rounded-md border border-input bg-background px-2 py-1.5 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring";
|
|
15303
|
+
function im({ filter: e, value: n, onChange: r, dict: i }) {
|
|
15290
15304
|
if (e.kind === "select") return /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("select", {
|
|
15291
|
-
className:
|
|
15305
|
+
className: rm,
|
|
15292
15306
|
value: n,
|
|
15293
15307
|
onChange: (e) => r(e.target.value)
|
|
15294
15308
|
}, /* @__PURE__ */ t.createElement("option", { value: "" }, i.filtersSelectPlaceholder), e.options.map((e) => /* @__PURE__ */ t.createElement("option", {
|
|
@@ -15310,7 +15324,7 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
|
|
|
15310
15324
|
let a = n;
|
|
15311
15325
|
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeFrom), /* @__PURE__ */ t.createElement("input", {
|
|
15312
15326
|
type: "date",
|
|
15313
|
-
className:
|
|
15327
|
+
className: rm,
|
|
15314
15328
|
value: a.from,
|
|
15315
15329
|
onChange: (e) => r({
|
|
15316
15330
|
...a,
|
|
@@ -15318,7 +15332,7 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
|
|
|
15318
15332
|
})
|
|
15319
15333
|
})), /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeTo), /* @__PURE__ */ t.createElement("input", {
|
|
15320
15334
|
type: "date",
|
|
15321
|
-
className:
|
|
15335
|
+
className: rm,
|
|
15322
15336
|
value: a.to,
|
|
15323
15337
|
onChange: (e) => r({
|
|
15324
15338
|
...a,
|
|
@@ -15330,7 +15344,7 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
|
|
|
15330
15344
|
let a = n;
|
|
15331
15345
|
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeMin), /* @__PURE__ */ t.createElement("input", {
|
|
15332
15346
|
type: "number",
|
|
15333
|
-
className:
|
|
15347
|
+
className: rm,
|
|
15334
15348
|
value: a.min ?? "",
|
|
15335
15349
|
onChange: (e) => r({
|
|
15336
15350
|
...a,
|
|
@@ -15338,7 +15352,7 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
|
|
|
15338
15352
|
})
|
|
15339
15353
|
})), /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeMax), /* @__PURE__ */ t.createElement("input", {
|
|
15340
15354
|
type: "number",
|
|
15341
|
-
className:
|
|
15355
|
+
className: rm,
|
|
15342
15356
|
value: a.max ?? "",
|
|
15343
15357
|
onChange: (e) => r({
|
|
15344
15358
|
...a,
|
|
@@ -15357,15 +15371,15 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
|
|
|
15357
15371
|
className: X("pointer-events-none absolute inset-0 rounded-full transition-colors duration-200 ease-out peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2", a ? "bg-primary" : "bg-muted-foreground/35")
|
|
15358
15372
|
}, /* @__PURE__ */ t.createElement("span", { className: X("pointer-events-none absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-background shadow-sm transition-transform duration-200 ease-out", a && "translate-x-4") }))), /* @__PURE__ */ t.createElement("span", { className: "text-sm text-foreground" }, e.label));
|
|
15359
15373
|
}
|
|
15360
|
-
function
|
|
15361
|
-
let R = Y("grid"), z = Fn("grid"), B = Fn("common"), V = p(() => ({ add: z.buttonAdd }), [z.buttonAdd]), H = Ti(), { preparedRecords: U, loading: W } =
|
|
15374
|
+
function am({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, form: o, editDeepLink: c, header: u, footer: d, view: f = "table", views: m, sticky: g, wrapperClassName: _, cardClassName: v, bodyClassName: y, loading: b = !1, title: x, before: S, after: C, sortable: w = !0, pagination: T, selection: E, onRowClick: D, reorderable: O = !1, onReorder: k, groupBy: A, searchable: j, filters: M, onSave: N, onDelete: P, onComplete: F, audit: I = !1, onLoad: L }) {
|
|
15375
|
+
let R = Y("grid"), z = Fn("grid"), B = Fn("common"), V = p(() => ({ add: z.buttonAdd }), [z.buttonAdd]), H = Ti(), { preparedRecords: U, loading: W } = Xp({
|
|
15362
15376
|
records: e,
|
|
15363
15377
|
onLoad: L
|
|
15364
|
-
}), ee =
|
|
15378
|
+
}), ee = Yp({
|
|
15365
15379
|
columns: i,
|
|
15366
15380
|
records: U,
|
|
15367
15381
|
form: o
|
|
15368
|
-
}), [G, te] = h(() => Object.fromEntries((M ?? []).map((e) => [e.key,
|
|
15382
|
+
}), [G, te] = h(() => Object.fromEntries((M ?? []).map((e) => [e.key, $p(e)]))), [ne, re] = h(!1), K = s((e, t) => {
|
|
15369
15383
|
te((n) => ({
|
|
15370
15384
|
...n,
|
|
15371
15385
|
[e]: t
|
|
@@ -15373,9 +15387,9 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15373
15387
|
}, []), ie = s((e) => {
|
|
15374
15388
|
te((t) => ({
|
|
15375
15389
|
...t,
|
|
15376
|
-
[e.key]:
|
|
15390
|
+
[e.key]: $p(e)
|
|
15377
15391
|
}));
|
|
15378
|
-
}, []), ae = (M ?? []).filter((e) =>
|
|
15392
|
+
}, []), ae = (M ?? []).filter((e) => em(e, G[e.key] ?? $p(e))), oe = p(() => !M || M.length === 0 ? U : U.filter((e) => M.every((t) => tm(t, e, G[t.key] ?? $p(t)))), [
|
|
15379
15393
|
U,
|
|
15380
15394
|
M,
|
|
15381
15395
|
G
|
|
@@ -15390,7 +15404,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15390
15404
|
key: e.key,
|
|
15391
15405
|
variant: "info",
|
|
15392
15406
|
className: "inline-flex items-center gap-1"
|
|
15393
|
-
},
|
|
15407
|
+
}, nm(e, G[e.key] ?? $p(e), z), /* @__PURE__ */ t.createElement(Hr, {
|
|
15394
15408
|
icon: "x",
|
|
15395
15409
|
variant: "link",
|
|
15396
15410
|
ariaLabel: `${z.filtersClearAll} ${e.label}`,
|
|
@@ -15405,12 +15419,12 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15405
15419
|
label: z.filtersClearAll,
|
|
15406
15420
|
variant: "link",
|
|
15407
15421
|
disabled: ae.length === 0,
|
|
15408
|
-
onClick: () => te(Object.fromEntries(M.map((e) => [e.key,
|
|
15422
|
+
onClick: () => te(Object.fromEntries(M.map((e) => [e.key, $p(e)])))
|
|
15409
15423
|
})
|
|
15410
|
-
}, /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ t.createElement(
|
|
15424
|
+
}, /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ t.createElement(im, {
|
|
15411
15425
|
key: e.key,
|
|
15412
15426
|
filter: e,
|
|
15413
|
-
value: G[e.key] ??
|
|
15427
|
+
value: G[e.key] ?? $p(e),
|
|
15414
15428
|
onChange: (t) => K(e.key, t),
|
|
15415
15429
|
dict: z
|
|
15416
15430
|
})))) : null, de = j === !0 ? {} : j || void 0, [fe, q] = h(""), pe = p(() => {
|
|
@@ -15469,7 +15483,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15469
15483
|
_e.overlays,
|
|
15470
15484
|
_e.renderItem,
|
|
15471
15485
|
Oe
|
|
15472
|
-
]), { mode: Ae, activeSelectionKeys: je, selectionState: Me, handleSelectionChange: Ne } =
|
|
15486
|
+
]), { mode: Ae, activeSelectionKeys: je, selectionState: Me, handleSelectionChange: Ne } = Zp({ selection: E }), { normalizedActions: Pe, activeAction: Fe, activeActionConfig: J, activeActionBody: Ie, activeKey: Le, runAction: Re, close: ze, getActionContext: Be, getModalActionContext: Ve, getRecordKey: He, formController: Ue } = Jp({
|
|
15473
15487
|
actions: a,
|
|
15474
15488
|
form: o,
|
|
15475
15489
|
editDeepLink: c,
|
|
@@ -15499,18 +15513,18 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15499
15513
|
Re
|
|
15500
15514
|
]), qe = D || Ge ? Ke : void 0, Je = s((e, n, r) => {
|
|
15501
15515
|
let i = Pe[e];
|
|
15502
|
-
return !i || !
|
|
15516
|
+
return !i || !Zf(i, n) ? null : /* @__PURE__ */ t.createElement(Hr, {
|
|
15503
15517
|
className: r || (e === "add" ? "btn-primary" : void 0),
|
|
15504
15518
|
icon: i.icon,
|
|
15505
|
-
label:
|
|
15506
|
-
disabled:
|
|
15519
|
+
label: $f(e, i, V),
|
|
15520
|
+
disabled: Qf(i, n),
|
|
15507
15521
|
onClick: () => Re(e, n)
|
|
15508
15522
|
});
|
|
15509
15523
|
}, [
|
|
15510
15524
|
Pe,
|
|
15511
15525
|
Re,
|
|
15512
15526
|
V
|
|
15513
|
-
]), Ye = p(() => Object.entries(Pe).filter(([e, t]) => e !== "edit" && e !== "delete" &&
|
|
15527
|
+
]), Ye = p(() => Object.entries(Pe).filter(([e, t]) => e !== "edit" && e !== "delete" && Zf(t, void 0)).map(([e]) => e), [Pe]), Xe = p(() => ({
|
|
15514
15528
|
title: x,
|
|
15515
15529
|
records: U,
|
|
15516
15530
|
selection: Me,
|
|
@@ -15603,7 +15617,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15603
15617
|
if (J.footer === !1) return !1;
|
|
15604
15618
|
if (!(J.footer === void 0 || !rt)) return typeof J.footer == "function" ? J.footer(rt) : J.footer;
|
|
15605
15619
|
}
|
|
15606
|
-
}, [J, rt]), ot =
|
|
15620
|
+
}, [J, rt]), ot = ep(w);
|
|
15607
15621
|
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(ji, {
|
|
15608
15622
|
wrapperClassName: _,
|
|
15609
15623
|
header: tt,
|
|
@@ -15613,7 +15627,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15613
15627
|
bodyClassName: X(R.Grid.Card.bodyClassName, y),
|
|
15614
15628
|
footerClassName: R.Grid.Card.footerClassName,
|
|
15615
15629
|
loading: b || W
|
|
15616
|
-
}, ve === "gallery" ? /* @__PURE__ */ t.createElement(
|
|
15630
|
+
}, ve === "gallery" ? /* @__PURE__ */ t.createElement(qp, {
|
|
15617
15631
|
records: pe,
|
|
15618
15632
|
recordId: n,
|
|
15619
15633
|
sortable: ot || w,
|
|
@@ -15629,7 +15643,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15629
15643
|
columns: _e.columns,
|
|
15630
15644
|
overlays: ke,
|
|
15631
15645
|
renderItem: _e.renderItem
|
|
15632
|
-
}) : /* @__PURE__ */ t.createElement(
|
|
15646
|
+
}) : /* @__PURE__ */ t.createElement(tp, {
|
|
15633
15647
|
records: pe,
|
|
15634
15648
|
recordId: n,
|
|
15635
15649
|
columns: Ce,
|
|
@@ -15655,7 +15669,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15655
15669
|
size: (J.kind === "modal" || J.kind === "delete") && J.size || R.Grid.Modal.size,
|
|
15656
15670
|
position: (J.kind === "modal" || J.kind === "delete") && J.position || R.Grid.Modal.position,
|
|
15657
15671
|
header: it,
|
|
15658
|
-
title:
|
|
15672
|
+
title: Qp(Fe.actionKey, J, J.kind === "modal" || J.kind === "delete" ? Ve(Fe.actionKey, Fe.record) : Be(Fe.actionKey, Fe.record), z.deleteConfirm, V),
|
|
15659
15673
|
onClose: ze,
|
|
15660
15674
|
onSave: J.kind === "modal" && J.footer === void 0 && (Fe.actionKey === "add" || Fe.actionKey === "edit") ? (e) => Ue.save(e) : void 0,
|
|
15661
15675
|
onDelete: J.kind === "delete" ? async () => {
|
|
@@ -15683,18 +15697,18 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15683
15697
|
}
|
|
15684
15698
|
//#endregion
|
|
15685
15699
|
//#region src/components/widgets/grid-core/GridArray.tsx
|
|
15686
|
-
function
|
|
15687
|
-
return /* @__PURE__ */ t.createElement(
|
|
15700
|
+
function om(e) {
|
|
15701
|
+
return /* @__PURE__ */ t.createElement(am, e);
|
|
15688
15702
|
}
|
|
15689
15703
|
//#endregion
|
|
15690
15704
|
//#region src/components/widgets/Grid.tsx
|
|
15691
|
-
function
|
|
15692
|
-
return "records" in e ? /* @__PURE__ */ t.createElement(
|
|
15705
|
+
function sm(e) {
|
|
15706
|
+
return "records" in e ? /* @__PURE__ */ t.createElement(om, e) : /* @__PURE__ */ t.createElement(Hf, e);
|
|
15693
15707
|
}
|
|
15694
15708
|
//#endregion
|
|
15695
15709
|
//#region src/pages/Users.tsx
|
|
15696
|
-
function
|
|
15697
|
-
return /* @__PURE__ */ t.createElement(
|
|
15710
|
+
function cm() {
|
|
15711
|
+
return /* @__PURE__ */ t.createElement(sm, {
|
|
15698
15712
|
path: "/users",
|
|
15699
15713
|
recordId: (e) => `${e.email ?? ""}`.replace("@", "-"),
|
|
15700
15714
|
form: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(vs, {
|
|
@@ -15721,10 +15735,10 @@ function lm() {
|
|
|
15721
15735
|
}
|
|
15722
15736
|
//#endregion
|
|
15723
15737
|
//#region src/pages/NotFound.tsx
|
|
15724
|
-
var
|
|
15738
|
+
var lm = () => {
|
|
15725
15739
|
let e = Fn("common");
|
|
15726
15740
|
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col justify-center items-center vh-100" }, /* @__PURE__ */ t.createElement("h1", null, "404"), /* @__PURE__ */ t.createElement("p", null, e.notFoundMessage), /* @__PURE__ */ t.createElement(v, { to: "/" }, /* @__PURE__ */ t.createElement(Q, { name: "house-door" }), " ", e.goHome));
|
|
15727
|
-
},
|
|
15741
|
+
}, um = ({ size: e = 28 }) => /* @__PURE__ */ t.createElement("svg", {
|
|
15728
15742
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15729
15743
|
width: e,
|
|
15730
15744
|
height: e,
|
|
@@ -15744,7 +15758,7 @@ var um = () => {
|
|
|
15744
15758
|
x2: "12.01",
|
|
15745
15759
|
y1: "17",
|
|
15746
15760
|
y2: "17"
|
|
15747
|
-
})),
|
|
15761
|
+
})), dm = ({ open: e }) => /* @__PURE__ */ t.createElement("svg", {
|
|
15748
15762
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15749
15763
|
width: "13",
|
|
15750
15764
|
height: "13",
|
|
@@ -15759,7 +15773,7 @@ var um = () => {
|
|
|
15759
15773
|
transform: e ? "rotate(180deg)" : "none",
|
|
15760
15774
|
flexShrink: 0
|
|
15761
15775
|
}
|
|
15762
|
-
}, /* @__PURE__ */ t.createElement("polyline", { points: "6 9 12 15 18 9" })),
|
|
15776
|
+
}, /* @__PURE__ */ t.createElement("polyline", { points: "6 9 12 15 18 9" })), fm = () => /* @__PURE__ */ t.createElement("svg", {
|
|
15763
15777
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15764
15778
|
width: "13",
|
|
15765
15779
|
height: "13",
|
|
@@ -15776,7 +15790,7 @@ var um = () => {
|
|
|
15776
15790
|
y: "8",
|
|
15777
15791
|
rx: "2",
|
|
15778
15792
|
ry: "2"
|
|
15779
|
-
}), /* @__PURE__ */ t.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })),
|
|
15793
|
+
}), /* @__PURE__ */ t.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })), pm = () => /* @__PURE__ */ t.createElement("svg", {
|
|
15780
15794
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15781
15795
|
width: "13",
|
|
15782
15796
|
height: "13",
|
|
@@ -15786,7 +15800,7 @@ var um = () => {
|
|
|
15786
15800
|
strokeWidth: "2",
|
|
15787
15801
|
strokeLinecap: "round",
|
|
15788
15802
|
strokeLinejoin: "round"
|
|
15789
|
-
}, /* @__PURE__ */ t.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t.createElement("path", { d: "M22 2 11 13" })),
|
|
15803
|
+
}, /* @__PURE__ */ t.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t.createElement("path", { d: "M22 2 11 13" })), mm = () => /* @__PURE__ */ t.createElement("svg", {
|
|
15790
15804
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15791
15805
|
width: "14",
|
|
15792
15806
|
height: "14",
|
|
@@ -15796,7 +15810,7 @@ var um = () => {
|
|
|
15796
15810
|
strokeWidth: "2",
|
|
15797
15811
|
strokeLinecap: "round",
|
|
15798
15812
|
strokeLinejoin: "round"
|
|
15799
|
-
}, /* @__PURE__ */ t.createElement("path", { d: "m8 2 1.88 1.88M14.12 3.88 16 2" }), /* @__PURE__ */ t.createElement("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6z" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20v-9" }), /* @__PURE__ */ t.createElement("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), /* @__PURE__ */ t.createElement("path", { d: "M6 13H2" }), /* @__PURE__ */ t.createElement("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), /* @__PURE__ */ t.createElement("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), /* @__PURE__ */ t.createElement("path", { d: "M22 13h-4" }), /* @__PURE__ */ t.createElement("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })),
|
|
15813
|
+
}, /* @__PURE__ */ t.createElement("path", { d: "m8 2 1.88 1.88M14.12 3.88 16 2" }), /* @__PURE__ */ t.createElement("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6z" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20v-9" }), /* @__PURE__ */ t.createElement("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), /* @__PURE__ */ t.createElement("path", { d: "M6 13H2" }), /* @__PURE__ */ t.createElement("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), /* @__PURE__ */ t.createElement("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), /* @__PURE__ */ t.createElement("path", { d: "M22 13h-4" }), /* @__PURE__ */ t.createElement("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })), hm = (e, t) => ({
|
|
15800
15814
|
error: {
|
|
15801
15815
|
message: e.message,
|
|
15802
15816
|
stack: e.stack ?? ""
|
|
@@ -15807,8 +15821,8 @@ var um = () => {
|
|
|
15807
15821
|
userAgent: typeof navigator < "u" ? navigator.userAgent : "",
|
|
15808
15822
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
15809
15823
|
}
|
|
15810
|
-
}),
|
|
15811
|
-
let n =
|
|
15824
|
+
}), gm = (e, t) => {
|
|
15825
|
+
let n = hm(e, t);
|
|
15812
15826
|
return [
|
|
15813
15827
|
`Error: ${n.error.message}`,
|
|
15814
15828
|
"",
|
|
@@ -15823,7 +15837,7 @@ var um = () => {
|
|
|
15823
15837
|
`Timestamp: ${n.context.timestamp}`,
|
|
15824
15838
|
`Agent: ${n.context.userAgent}`
|
|
15825
15839
|
].join("\n");
|
|
15826
|
-
},
|
|
15840
|
+
}, _m = class extends t.Component {
|
|
15827
15841
|
constructor(e) {
|
|
15828
15842
|
super(e), this.state = {
|
|
15829
15843
|
error: null,
|
|
@@ -15845,7 +15859,7 @@ var um = () => {
|
|
|
15845
15859
|
};
|
|
15846
15860
|
copy = () => {
|
|
15847
15861
|
let { error: e, errorInfo: t } = this.state;
|
|
15848
|
-
e && navigator.clipboard?.writeText(
|
|
15862
|
+
e && navigator.clipboard?.writeText(gm(e, t)).then(() => {
|
|
15849
15863
|
this.setState({ copied: !0 }), setTimeout(() => this.setState({ copied: !1 }), 2e3);
|
|
15850
15864
|
});
|
|
15851
15865
|
};
|
|
@@ -15854,7 +15868,7 @@ var um = () => {
|
|
|
15854
15868
|
!e || !n || (this.setState({ reportState: "sending" }), fetch(n, {
|
|
15855
15869
|
method: "POST",
|
|
15856
15870
|
headers: { "Content-Type": "application/json" },
|
|
15857
|
-
body: JSON.stringify(
|
|
15871
|
+
body: JSON.stringify(hm(e, t))
|
|
15858
15872
|
}).then((e) => this.setState({ reportState: e.ok ? "sent" : "failed" })).catch(() => this.setState({ reportState: "failed" })));
|
|
15859
15873
|
};
|
|
15860
15874
|
render() {
|
|
@@ -15864,16 +15878,16 @@ var um = () => {
|
|
|
15864
15878
|
if (typeof s == "function") return s(e, this.reset);
|
|
15865
15879
|
if (s != null) return s;
|
|
15866
15880
|
let d = (e.stack ?? e.message).split("\n").map((e) => e.trim()).filter(Boolean), f = (n?.componentStack ?? "").split("\n").map((e) => e.trim()).filter(Boolean), p = l ? "flex min-h-screen flex-col items-center justify-center bg-background p-8" : "flex min-h-[calc(100vh-4rem)] flex-col items-center justify-center p-8";
|
|
15867
|
-
return /* @__PURE__ */ t.createElement("div", { className: p }, /* @__PURE__ */ t.createElement("div", { className: "flex w-full max-w-xl flex-col gap-4 rounded-xl border border-destructive/25 bg-destructive/5 p-6" }, /* @__PURE__ */ t.createElement("div", { className: "flex items-start gap-4" }, /* @__PURE__ */ t.createElement("div", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-destructive" }, /* @__PURE__ */ t.createElement(
|
|
15881
|
+
return /* @__PURE__ */ t.createElement("div", { className: p }, /* @__PURE__ */ t.createElement("div", { className: "flex w-full max-w-xl flex-col gap-4 rounded-xl border border-destructive/25 bg-destructive/5 p-6" }, /* @__PURE__ */ t.createElement("div", { className: "flex items-start gap-4" }, /* @__PURE__ */ t.createElement("div", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-destructive" }, /* @__PURE__ */ t.createElement(um, { size: 22 })), /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("p", { className: "text-sm font-semibold text-foreground" }, "This page ran into a problem"), /* @__PURE__ */ t.createElement("p", { className: "mt-0.5 text-xs text-muted-foreground" }, "An unexpected error occurred while rendering this content."))), /* @__PURE__ */ t.createElement("div", { className: "rounded-lg border bg-background/60" }, /* @__PURE__ */ t.createElement("button", {
|
|
15868
15882
|
onClick: () => this.setState((e) => ({ detailsOpen: !e.detailsOpen })),
|
|
15869
15883
|
className: "flex w-full items-center gap-2 px-3 py-2.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground"
|
|
15870
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15884
|
+
}, /* @__PURE__ */ t.createElement(dm, { open: r }), "Technical details", /* @__PURE__ */ t.createElement("span", { className: "ml-auto truncate max-w-[280px] font-mono text-[11px] text-muted-foreground/70" }, e.message)), r && /* @__PURE__ */ t.createElement("div", { className: "border-t" }, /* @__PURE__ */ t.createElement("pre", { className: "max-h-48 overflow-y-auto px-3 py-3 text-[11px] leading-relaxed text-muted-foreground font-mono whitespace-before-wrap break-all" }, d.join("\n")))), u && /* @__PURE__ */ t.createElement("div", { className: "rounded-lg border border-amber-200/60 bg-amber-50/40 dark:border-amber-900/40 dark:bg-amber-950/20" }, /* @__PURE__ */ t.createElement("button", {
|
|
15871
15885
|
onClick: () => this.setState((e) => ({ debugOpen: !e.debugOpen })),
|
|
15872
15886
|
className: "flex w-full items-center gap-2 px-3 py-2.5 text-left text-xs font-medium text-amber-700 dark:text-amber-400 transition-colors hover:opacity-80"
|
|
15873
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15887
|
+
}, /* @__PURE__ */ t.createElement(mm, null), /* @__PURE__ */ t.createElement(dm, { open: i }), "Debug information", /* @__PURE__ */ t.createElement("span", { className: "ml-auto text-[10px] font-normal opacity-60" }, "DEV")), i && /* @__PURE__ */ t.createElement("div", { className: "border-t border-amber-200/60 dark:border-amber-900/40 px-3 py-3 space-y-3" }, /* @__PURE__ */ t.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ t.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, "Context"), /* @__PURE__ */ t.createElement("dl", { className: "grid grid-cols-[5rem_1fr] gap-x-2 gap-y-0.5 text-[11px] font-mono" }, /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "URL"), /* @__PURE__ */ t.createElement("dd", { className: "truncate text-foreground" }, typeof window < "u" ? window.location.href : "-"), /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "Time"), /* @__PURE__ */ t.createElement("dd", { className: "text-foreground" }, (/* @__PURE__ */ new Date()).toISOString()), /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "Agent"), /* @__PURE__ */ t.createElement("dd", { className: "truncate text-foreground opacity-70" }, typeof navigator < "u" ? navigator.userAgent : "-"))), f.length > 0 && /* @__PURE__ */ t.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ t.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, "Component tree"), /* @__PURE__ */ t.createElement("pre", { className: "max-h-36 overflow-y-auto text-[11px] font-mono leading-relaxed text-foreground/80 whitespace-before-wrap" }, f.join("\n"))), /* @__PURE__ */ t.createElement("button", {
|
|
15874
15888
|
onClick: this.copy,
|
|
15875
15889
|
className: "flex items-center gap-1.5 rounded border px-2.5 py-1 text-[11px] font-medium transition-colors hover:bg-accent"
|
|
15876
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15890
|
+
}, /* @__PURE__ */ t.createElement(fm, null), a ? "Copied!" : "Copy debug info"))), /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, /* @__PURE__ */ t.createElement("button", {
|
|
15877
15891
|
onClick: this.reset,
|
|
15878
15892
|
className: "rounded-md border bg-background px-4 py-1.5 text-sm font-medium shadow-sm transition-colors hover:bg-accent"
|
|
15879
15893
|
}, "Try again"), /* @__PURE__ */ t.createElement("a", {
|
|
@@ -15883,15 +15897,15 @@ var um = () => {
|
|
|
15883
15897
|
onClick: this.sendReport,
|
|
15884
15898
|
disabled: o === "sending" || o === "sent",
|
|
15885
15899
|
className: "ml-auto flex items-center gap-1.5 rounded-md border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-accent disabled:opacity-50"
|
|
15886
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15900
|
+
}, /* @__PURE__ */ t.createElement(pm, null), o === "idle" && "Send report", o === "sending" && "Sending...", o === "sent" && "Report sent ✓", o === "failed" && "Failed - retry"))));
|
|
15887
15901
|
}
|
|
15888
|
-
},
|
|
15902
|
+
}, vm = async () => {
|
|
15889
15903
|
window.google?.accounts?.id || (vt([{
|
|
15890
15904
|
src: "https://accounts.google.com/gsi/client",
|
|
15891
15905
|
async: !0,
|
|
15892
15906
|
clean: !0
|
|
15893
15907
|
}]), await new Promise((e) => setTimeout(e, 0)));
|
|
15894
|
-
},
|
|
15908
|
+
}, ym = class {
|
|
15895
15909
|
getConfigurationState() {
|
|
15896
15910
|
return oi("GoogleAuthProvider", ai(Oa("oAuth2"), ["clientId"], "google.oAuth2."));
|
|
15897
15911
|
}
|
|
@@ -15914,7 +15928,7 @@ var um = () => {
|
|
|
15914
15928
|
async signIn(e = {}) {
|
|
15915
15929
|
let t = Oa("oAuth2");
|
|
15916
15930
|
if (!this.isConfigured() || !t?.clientId) throw Error("GoogleAuthProvider: missing google.oAuth2.clientId configuration.");
|
|
15917
|
-
return await
|
|
15931
|
+
return await vm(), new Promise((n, r) => {
|
|
15918
15932
|
if (!window.google?.accounts?.id) {
|
|
15919
15933
|
r(/* @__PURE__ */ Error("GoogleAuthProvider: Google Identity Services script is not available."));
|
|
15920
15934
|
return;
|
|
@@ -15995,41 +16009,41 @@ var um = () => {
|
|
|
15995
16009
|
isAuthenticated() {
|
|
15996
16010
|
return !!this.getUser();
|
|
15997
16011
|
}
|
|
15998
|
-
},
|
|
16012
|
+
}, bm = a(null), xm = ({ registry: e, defaultKey: n, children: r }) => {
|
|
15999
16013
|
let i = p(() => ({
|
|
16000
16014
|
registry: e,
|
|
16001
16015
|
defaultKey: n
|
|
16002
16016
|
}), [e, n]);
|
|
16003
|
-
return /* @__PURE__ */ t.createElement(
|
|
16004
|
-
},
|
|
16005
|
-
let t = c(
|
|
16017
|
+
return /* @__PURE__ */ t.createElement(bm.Provider, { value: i }, r);
|
|
16018
|
+
}, Sm = (e) => {
|
|
16019
|
+
let t = c(bm);
|
|
16006
16020
|
if (!t) return null;
|
|
16007
16021
|
let n = e ?? t.defaultKey;
|
|
16008
16022
|
return t.registry[n] ?? null;
|
|
16009
|
-
},
|
|
16023
|
+
}, Cm = a(null), wm = ({ registry: e, defaultKey: n, children: r }) => {
|
|
16010
16024
|
let i = p(() => ({
|
|
16011
16025
|
registry: e,
|
|
16012
16026
|
defaultKey: n
|
|
16013
16027
|
}), [e, n]);
|
|
16014
|
-
return /* @__PURE__ */ t.createElement(
|
|
16015
|
-
},
|
|
16016
|
-
let t = c(
|
|
16028
|
+
return /* @__PURE__ */ t.createElement(Cm.Provider, { value: i }, r);
|
|
16029
|
+
}, Tm = (e) => {
|
|
16030
|
+
let t = c(Cm);
|
|
16017
16031
|
if (!t) throw Error("useCredentialsProvider must be used inside <App providers={...} />.");
|
|
16018
16032
|
let n = e ?? t.defaultKey, r = t.registry[n];
|
|
16019
16033
|
if (!r) throw Error(`CredentialsProvider '${n}' is not registered. Available: ${Object.keys(t.registry).join(", ")}`);
|
|
16020
16034
|
return r;
|
|
16021
|
-
},
|
|
16035
|
+
}, Em = {
|
|
16022
16036
|
key: "@key",
|
|
16023
16037
|
value: "@value"
|
|
16024
|
-
},
|
|
16038
|
+
}, Dm = () => Ie(), Om = (e, t, n) => {
|
|
16025
16039
|
let r = `Error during ${e}: ${String(t)}`;
|
|
16026
16040
|
if (n) throw Error(r);
|
|
16027
16041
|
console.error(r);
|
|
16028
|
-
},
|
|
16042
|
+
}, km = (e, t) => {
|
|
16029
16043
|
if (!e || !(t in e)) return e;
|
|
16030
16044
|
let { [t]: n, ...r } = e;
|
|
16031
16045
|
return Object.keys(r).length ? r : void 0;
|
|
16032
|
-
},
|
|
16046
|
+
}, Am = (e) => {
|
|
16033
16047
|
let t = typeof e == "object" && e && !Array.isArray(e) ? e : Array.isArray(e) ? { in: e } : { eq: e }, n;
|
|
16034
16048
|
return t.gt !== void 0 && (n = {
|
|
16035
16049
|
...n,
|
|
@@ -16047,28 +16061,28 @@ var um = () => {
|
|
|
16047
16061
|
condition: t,
|
|
16048
16062
|
clientCondition: n
|
|
16049
16063
|
};
|
|
16050
|
-
},
|
|
16064
|
+
}, jm = (e, t) => {
|
|
16051
16065
|
switch (t) {
|
|
16052
|
-
case
|
|
16053
|
-
case
|
|
16066
|
+
case Em.key: return Ve(e, ze());
|
|
16067
|
+
case Em.value: return Ve(e, Be());
|
|
16054
16068
|
default: return Ve(e, Re(t));
|
|
16055
16069
|
}
|
|
16056
|
-
},
|
|
16070
|
+
}, Mm = (e, t, n) => {
|
|
16057
16071
|
let [r] = Object.entries(t || {});
|
|
16058
16072
|
if (!r) return {
|
|
16059
16073
|
dbRef: e,
|
|
16060
16074
|
clientWhere: n
|
|
16061
16075
|
};
|
|
16062
|
-
let [i] = r, a =
|
|
16076
|
+
let [i] = r, a = jm(e, i), o = n?.[i];
|
|
16063
16077
|
if (o == null) return {
|
|
16064
16078
|
dbRef: a,
|
|
16065
16079
|
clientWhere: n
|
|
16066
16080
|
};
|
|
16067
|
-
let { condition: s, clientCondition: c } =
|
|
16081
|
+
let { condition: s, clientCondition: c } = Am(o);
|
|
16068
16082
|
switch (!0) {
|
|
16069
16083
|
case s.eq !== void 0: return {
|
|
16070
16084
|
dbRef: Ve(a, Fe(s.eq)),
|
|
16071
|
-
clientWhere:
|
|
16085
|
+
clientWhere: km(n, i)
|
|
16072
16086
|
};
|
|
16073
16087
|
case s.gte !== void 0 && s.lte !== void 0:
|
|
16074
16088
|
a = Ve(a, Ge(s.gte), Pe(s.lte));
|
|
@@ -16098,11 +16112,11 @@ var um = () => {
|
|
|
16098
16112
|
return {
|
|
16099
16113
|
dbRef: a,
|
|
16100
16114
|
clientWhere: c ? {
|
|
16101
|
-
...
|
|
16115
|
+
...km(n, i) || {},
|
|
16102
16116
|
[i]: c
|
|
16103
|
-
} :
|
|
16117
|
+
} : km(n, i)
|
|
16104
16118
|
};
|
|
16105
|
-
},
|
|
16119
|
+
}, Nm = (e, t) => {
|
|
16106
16120
|
if (!t) return e;
|
|
16107
16121
|
let n = t.split("."), r = e;
|
|
16108
16122
|
for (let e of n) {
|
|
@@ -16110,10 +16124,10 @@ var um = () => {
|
|
|
16110
16124
|
r = r[e];
|
|
16111
16125
|
}
|
|
16112
16126
|
return r;
|
|
16113
|
-
},
|
|
16127
|
+
}, Pm = (e, t) => e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : typeof e == "boolean" && typeof t == "boolean" ? Number(e) - Number(t) : globalThis.String(e).localeCompare(globalThis.String(t), void 0, {
|
|
16114
16128
|
numeric: !0,
|
|
16115
16129
|
sensitivity: "base"
|
|
16116
|
-
}),
|
|
16130
|
+
}), Fm = (e, t) => {
|
|
16117
16131
|
let n = typeof t == "object" && t && !Array.isArray(t) ? t : { eq: t };
|
|
16118
16132
|
for (let [t, r] of Object.entries(n)) switch (t) {
|
|
16119
16133
|
case "eq":
|
|
@@ -16140,23 +16154,23 @@ var um = () => {
|
|
|
16140
16154
|
default: return !1;
|
|
16141
16155
|
}
|
|
16142
16156
|
return !0;
|
|
16143
|
-
},
|
|
16157
|
+
}, Im = (e, t, n) => {
|
|
16144
16158
|
let [r, ...i] = Object.entries(n || {}), a = Object.entries(t || {}), o = Object.entries(e);
|
|
16145
|
-
if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) =>
|
|
16159
|
+
if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) => Fm(Nm(e, t), n)))), r) {
|
|
16146
16160
|
let e = [r, ...i];
|
|
16147
16161
|
o.sort((t, n) => {
|
|
16148
16162
|
for (let [r, i] of e) {
|
|
16149
|
-
let e =
|
|
16163
|
+
let e = Pm(Nm(t[1], r), Nm(n[1], r));
|
|
16150
16164
|
if (e) return i === "desc" ? -e : e;
|
|
16151
16165
|
}
|
|
16152
16166
|
return 0;
|
|
16153
16167
|
});
|
|
16154
16168
|
}
|
|
16155
16169
|
return Object.fromEntries(o);
|
|
16156
|
-
},
|
|
16157
|
-
let t = await Fa()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, He(
|
|
16170
|
+
}, Lm = async (e) => {
|
|
16171
|
+
let t = await Fa()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, He(Dm()).toString());
|
|
16158
16172
|
return n.searchParams.set("shallow", "true"), t && n.searchParams.set("auth", t), n.toString();
|
|
16159
|
-
},
|
|
16173
|
+
}, Rm = class e {
|
|
16160
16174
|
static listenerRegistered = !1;
|
|
16161
16175
|
constructor() {
|
|
16162
16176
|
!e.listenerRegistered && typeof wa == "function" && (e.listenerRegistered = !0, wa((e) => {
|
|
@@ -16171,43 +16185,43 @@ var um = () => {
|
|
|
16171
16185
|
}
|
|
16172
16186
|
readShallow = async (e, t = !1) => {
|
|
16173
16187
|
try {
|
|
16174
|
-
let t = await
|
|
16188
|
+
let t = await Lm(e), n = await fetch(t);
|
|
16175
16189
|
if (!n.ok) throw Error(`${n.status} ${n.statusText}`);
|
|
16176
16190
|
let r = await n.json();
|
|
16177
16191
|
return r ? Object.keys(r) : [];
|
|
16178
16192
|
} catch (n) {
|
|
16179
|
-
return
|
|
16193
|
+
return Om(`reading SHALLOW data in Firebase for ${e}`, n, t), [];
|
|
16180
16194
|
}
|
|
16181
16195
|
};
|
|
16182
16196
|
read = async (e, { where: t, order: n, toArray: r = !1, exception: i = !1 } = {}) => {
|
|
16183
|
-
let { dbRef: a, clientWhere: o } =
|
|
16197
|
+
let { dbRef: a, clientWhere: o } = Mm(He(Dm(), e), n, t);
|
|
16184
16198
|
try {
|
|
16185
16199
|
let t = await J(a);
|
|
16186
16200
|
if (t.exists()) {
|
|
16187
16201
|
`${e}`;
|
|
16188
|
-
let i =
|
|
16202
|
+
let i = Im(t.val(), o, n);
|
|
16189
16203
|
return r ? Object.values(i) : i;
|
|
16190
|
-
} else i &&
|
|
16204
|
+
} else i && Om(`Data not found in Firebase for path ${e}`, null, i);
|
|
16191
16205
|
} catch (t) {
|
|
16192
|
-
|
|
16206
|
+
Om(`reading data in Firebase for ${e}`, t, i);
|
|
16193
16207
|
}
|
|
16194
16208
|
};
|
|
16195
16209
|
update = async (e, t, n = !1) => {
|
|
16196
16210
|
try {
|
|
16197
|
-
await Ke(He(
|
|
16211
|
+
await Ke(He(Dm(), e), t), `${e}`;
|
|
16198
16212
|
} catch (t) {
|
|
16199
|
-
|
|
16213
|
+
Om(`updating data in Firebase for ${e}`, t, n);
|
|
16200
16214
|
}
|
|
16201
16215
|
};
|
|
16202
16216
|
set = async (e, t, n = !1) => {
|
|
16203
16217
|
try {
|
|
16204
|
-
await We(He(
|
|
16218
|
+
await We(He(Dm(), e), t), `${e}`;
|
|
16205
16219
|
} catch (t) {
|
|
16206
|
-
|
|
16220
|
+
Om(`updating data in Firebase for ${e}`, t, n);
|
|
16207
16221
|
}
|
|
16208
16222
|
};
|
|
16209
16223
|
setChunks = async (e, t, { chunkSize: n = 1e3, purge: r = !1, onProgress: i } = {}) => {
|
|
16210
|
-
let a = He(
|
|
16224
|
+
let a = He(Dm(), e);
|
|
16211
16225
|
try {
|
|
16212
16226
|
r && (await Ue(a), i?.(0, 0, `Purging existing data at ${e}`));
|
|
16213
16227
|
let o = Object.entries(Nt(t)), s = Math.ceil(o.length / n);
|
|
@@ -16217,14 +16231,14 @@ var um = () => {
|
|
|
16217
16231
|
i?.(t, s, `Saving chunk ${t}/${s}`);
|
|
16218
16232
|
}
|
|
16219
16233
|
} catch (t) {
|
|
16220
|
-
|
|
16234
|
+
Om(`setting data in chunks in Firebase for ${e}`, t, !1);
|
|
16221
16235
|
}
|
|
16222
16236
|
};
|
|
16223
16237
|
remove = async (e, t = !1) => {
|
|
16224
16238
|
try {
|
|
16225
|
-
await Ue(He(
|
|
16239
|
+
await Ue(He(Dm(), e)), `${e}`;
|
|
16226
16240
|
} catch (n) {
|
|
16227
|
-
|
|
16241
|
+
Om(`removing data from Firebase for ${e}`, n, t);
|
|
16228
16242
|
}
|
|
16229
16243
|
};
|
|
16230
16244
|
count = async (e) => (await this.readShallow(e)).length;
|
|
@@ -16232,14 +16246,14 @@ var um = () => {
|
|
|
16232
16246
|
let o = Fa();
|
|
16233
16247
|
if (!o || !e) return () => void 0;
|
|
16234
16248
|
let s = () => {
|
|
16235
|
-
let { dbRef: o, clientWhere: s } =
|
|
16249
|
+
let { dbRef: o, clientWhere: s } = Mm(He(Dm(), e), r, n);
|
|
16236
16250
|
return Le(o, (e) => {
|
|
16237
16251
|
let n = e.val();
|
|
16238
16252
|
if (!n) {
|
|
16239
16253
|
t([]);
|
|
16240
16254
|
return;
|
|
16241
16255
|
}
|
|
16242
|
-
let o = a ? a(
|
|
16256
|
+
let o = a ? a(Im(n, s, r)) : Im(n, s, r), c = Object.entries(o);
|
|
16243
16257
|
if (!i) {
|
|
16244
16258
|
t(c.map(([e, t], n) => typeof t == "object" && t ? {
|
|
16245
16259
|
_index: n,
|
|
@@ -16248,22 +16262,22 @@ var um = () => {
|
|
|
16248
16262
|
} : {
|
|
16249
16263
|
_index: n,
|
|
16250
16264
|
[za]: e,
|
|
16251
|
-
[
|
|
16265
|
+
[Em.value]: t
|
|
16252
16266
|
}));
|
|
16253
16267
|
return;
|
|
16254
16268
|
}
|
|
16255
16269
|
let l = Object.keys(i);
|
|
16256
16270
|
t(c.map(([e, t], n) => {
|
|
16257
16271
|
let r = typeof t == "object" && t ? {
|
|
16258
|
-
[
|
|
16272
|
+
[Em.key]: e,
|
|
16259
16273
|
...t
|
|
16260
16274
|
} : {
|
|
16261
|
-
[
|
|
16262
|
-
[
|
|
16275
|
+
[Em.key]: e,
|
|
16276
|
+
[Em.value]: t
|
|
16263
16277
|
}, a = {};
|
|
16264
16278
|
for (let n of l) {
|
|
16265
16279
|
let o = i[n];
|
|
16266
|
-
a[n] = o.includes("{") ? et.parse(r, o) : o ===
|
|
16280
|
+
a[n] = o.includes("{") ? et.parse(r, o) : o === Em.key ? e : o === Em.value ? t : r[o];
|
|
16267
16281
|
}
|
|
16268
16282
|
return {
|
|
16269
16283
|
[za]: e,
|
|
@@ -16280,10 +16294,10 @@ var um = () => {
|
|
|
16280
16294
|
};
|
|
16281
16295
|
};
|
|
16282
16296
|
};
|
|
16283
|
-
new
|
|
16297
|
+
new Rm();
|
|
16284
16298
|
//#endregion
|
|
16285
16299
|
//#region src/providers/auth/firebase/FirebaseAuthProvider.ts
|
|
16286
|
-
var
|
|
16300
|
+
var zm = {
|
|
16287
16301
|
github: "github.com",
|
|
16288
16302
|
apple: "apple.com",
|
|
16289
16303
|
microsoft: "microsoft.com",
|
|
@@ -16291,10 +16305,10 @@ var Bm = {
|
|
|
16291
16305
|
twitter: "twitter.com",
|
|
16292
16306
|
facebook: "facebook.com"
|
|
16293
16307
|
};
|
|
16294
|
-
function
|
|
16295
|
-
return new R(
|
|
16308
|
+
function Bm(e) {
|
|
16309
|
+
return new R(zm[e] ?? e);
|
|
16296
16310
|
}
|
|
16297
|
-
function
|
|
16311
|
+
function Vm(e) {
|
|
16298
16312
|
return e ? {
|
|
16299
16313
|
uid: e.uid,
|
|
16300
16314
|
email: e.email ?? void 0,
|
|
@@ -16303,7 +16317,7 @@ function Hm(e) {
|
|
|
16303
16317
|
isAnonymous: e.isAnonymous
|
|
16304
16318
|
} : null;
|
|
16305
16319
|
}
|
|
16306
|
-
var
|
|
16320
|
+
var Hm = class {
|
|
16307
16321
|
options;
|
|
16308
16322
|
appName;
|
|
16309
16323
|
initPromise;
|
|
@@ -16317,7 +16331,7 @@ var Um = class {
|
|
|
16317
16331
|
return this.getConfigurationState().configured;
|
|
16318
16332
|
}
|
|
16319
16333
|
getUser() {
|
|
16320
|
-
return
|
|
16334
|
+
return Vm(Fa(this.appName)?.currentUser ?? null);
|
|
16321
16335
|
}
|
|
16322
16336
|
isAuthenticated() {
|
|
16323
16337
|
return !!this.getUser();
|
|
@@ -16329,18 +16343,18 @@ var Um = class {
|
|
|
16329
16343
|
let n = e.method ?? "password";
|
|
16330
16344
|
if (n === "anonymous") {
|
|
16331
16345
|
let { user: e } = await ee(t);
|
|
16332
|
-
return
|
|
16346
|
+
return Vm(e);
|
|
16333
16347
|
}
|
|
16334
16348
|
if (n === "oauth") {
|
|
16335
16349
|
let { provider: n } = e;
|
|
16336
16350
|
if (!n) throw Error("FirebaseAuthProvider.signIn: provider is required for oauth");
|
|
16337
|
-
let { user: r } = await re(t,
|
|
16338
|
-
return
|
|
16351
|
+
let { user: r } = await re(t, Bm(n));
|
|
16352
|
+
return Vm(r);
|
|
16339
16353
|
}
|
|
16340
16354
|
let { email: r, password: i } = e;
|
|
16341
16355
|
if (!r || !i) throw Error("FirebaseAuthProvider.signIn: email and password are required");
|
|
16342
16356
|
let { user: a } = await ne(t, r, i);
|
|
16343
|
-
return
|
|
16357
|
+
return Vm(a);
|
|
16344
16358
|
}
|
|
16345
16359
|
async signOut() {
|
|
16346
16360
|
await this.initPromise;
|
|
@@ -16351,7 +16365,7 @@ var Um = class {
|
|
|
16351
16365
|
onAuthChange(e) {
|
|
16352
16366
|
if (!this.options.config) {
|
|
16353
16367
|
let t = Fa(this.appName);
|
|
16354
|
-
return t ? H(t, (t) => e(
|
|
16368
|
+
return t ? H(t, (t) => e(Vm(t))) : (e(null), () => {});
|
|
16355
16369
|
}
|
|
16356
16370
|
let t = () => {}, n = !1;
|
|
16357
16371
|
return this.initPromise.then(() => {
|
|
@@ -16361,7 +16375,7 @@ var Um = class {
|
|
|
16361
16375
|
e(null);
|
|
16362
16376
|
return;
|
|
16363
16377
|
}
|
|
16364
|
-
t = H(r, (t) => e(
|
|
16378
|
+
t = H(r, (t) => e(Vm(t)));
|
|
16365
16379
|
}), () => {
|
|
16366
16380
|
n = !0, t();
|
|
16367
16381
|
};
|
|
@@ -16379,26 +16393,26 @@ var Um = class {
|
|
|
16379
16393
|
let { claims: n } = await t.currentUser.getIdTokenResult(e);
|
|
16380
16394
|
return n;
|
|
16381
16395
|
}
|
|
16382
|
-
},
|
|
16383
|
-
function
|
|
16396
|
+
}, Um = "https://oauth2.googleapis.com/token";
|
|
16397
|
+
function Wm(e) {
|
|
16384
16398
|
let t = e.replace(/-----BEGIN PRIVATE KEY-----/, "").replace(/-----END PRIVATE KEY-----/, "").replace(/\s+/g, ""), n = atob(t), r = new Uint8Array(n.length);
|
|
16385
16399
|
for (let e = 0; e < n.length; e++) r[e] = n.charCodeAt(e);
|
|
16386
16400
|
return r.buffer;
|
|
16387
16401
|
}
|
|
16388
|
-
function
|
|
16402
|
+
function Gm(e) {
|
|
16389
16403
|
return btoa(typeof e == "string" ? e : String.fromCharCode(...new Uint8Array(e))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
16390
16404
|
}
|
|
16391
|
-
async function
|
|
16392
|
-
let n = `${
|
|
16405
|
+
async function Km(e, t) {
|
|
16406
|
+
let n = `${Gm(JSON.stringify({
|
|
16393
16407
|
alg: "RS256",
|
|
16394
16408
|
typ: "JWT"
|
|
16395
|
-
}))}.${
|
|
16409
|
+
}))}.${Gm(JSON.stringify(e))}`, r = await crypto.subtle.importKey("pkcs8", Wm(t), {
|
|
16396
16410
|
name: "RSASSA-PKCS1-v1_5",
|
|
16397
16411
|
hash: "SHA-256"
|
|
16398
16412
|
}, !1, ["sign"]);
|
|
16399
|
-
return `${n}.${
|
|
16413
|
+
return `${n}.${Gm(await crypto.subtle.sign("RSASSA-PKCS1-v1_5", r, new TextEncoder().encode(n)))}`;
|
|
16400
16414
|
}
|
|
16401
|
-
var
|
|
16415
|
+
var qm = class {
|
|
16402
16416
|
config;
|
|
16403
16417
|
cache = /* @__PURE__ */ new Map();
|
|
16404
16418
|
constructor(e) {
|
|
@@ -16407,13 +16421,13 @@ var Jm = class {
|
|
|
16407
16421
|
async getToken(e = "https://www.googleapis.com/auth/cloud-platform") {
|
|
16408
16422
|
let t = this.cache.get(e);
|
|
16409
16423
|
if (t && t.expiresAt > Date.now() + 6e4) return t.token;
|
|
16410
|
-
let n = Math.floor(Date.now() / 1e3), r = await
|
|
16424
|
+
let n = Math.floor(Date.now() / 1e3), r = await Km({
|
|
16411
16425
|
iss: this.config.client_email,
|
|
16412
16426
|
scope: e,
|
|
16413
|
-
aud:
|
|
16427
|
+
aud: Um,
|
|
16414
16428
|
iat: n,
|
|
16415
16429
|
exp: n + 3600
|
|
16416
|
-
}, this.config.private_key), i = await fetch(
|
|
16430
|
+
}, this.config.private_key), i = await fetch(Um, {
|
|
16417
16431
|
method: "POST",
|
|
16418
16432
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
16419
16433
|
body: new URLSearchParams({
|
|
@@ -16431,7 +16445,7 @@ var Jm = class {
|
|
|
16431
16445
|
expiresAt: Date.now() + (a.expires_in ?? 3600) * 1e3
|
|
16432
16446
|
}), a.access_token;
|
|
16433
16447
|
}
|
|
16434
|
-
},
|
|
16448
|
+
}, Jm = "www.dropbox.com/oauth2", Ym = class {
|
|
16435
16449
|
config;
|
|
16436
16450
|
constructor(e) {
|
|
16437
16451
|
this.config = e;
|
|
@@ -16455,7 +16469,7 @@ var Jm = class {
|
|
|
16455
16469
|
async signIn(e = {}) {
|
|
16456
16470
|
if (!this.isConfigured()) throw Error("DropboxAuthProvider: missing dropbox.clientId configuration.");
|
|
16457
16471
|
return pi({
|
|
16458
|
-
authServer:
|
|
16472
|
+
authServer: Jm,
|
|
16459
16473
|
clientID: this.config.clientId,
|
|
16460
16474
|
scopes: e.scopes,
|
|
16461
16475
|
refreshParamName: "token_access_type"
|
|
@@ -16476,7 +16490,7 @@ var Jm = class {
|
|
|
16476
16490
|
isAuthenticated() {
|
|
16477
16491
|
return this.isConfigured() ? !!vi(this.config.clientId)?.access_token : !1;
|
|
16478
16492
|
}
|
|
16479
|
-
},
|
|
16493
|
+
}, Xm = (e) => {
|
|
16480
16494
|
let t = Oa("oAuth2");
|
|
16481
16495
|
if (!t) return console.warn("GoogleAuth: Missing oAuth2.clientId in configuration"), Promise.reject("Google client ID not found");
|
|
16482
16496
|
let n = e.join(" "), r = `googleAccessToken::${n}`, i = `googleExpiresAt::${n}`;
|
|
@@ -16493,8 +16507,8 @@ var Jm = class {
|
|
|
16493
16507
|
};
|
|
16494
16508
|
//#endregion
|
|
16495
16509
|
//#region src/providers/email/google/email.ts
|
|
16496
|
-
async function
|
|
16497
|
-
let i = await
|
|
16510
|
+
async function Zm({ to: e, bcc: t, subject: n, message: r }) {
|
|
16511
|
+
let i = await Xm(["https://www.googleapis.com/auth/gmail.send"]), a = [`To: ${e.join(", ")}`];
|
|
16498
16512
|
t && t.length && a.push(`Bcc: ${t.join(", ")}`);
|
|
16499
16513
|
let o = [
|
|
16500
16514
|
...a,
|
|
@@ -16519,7 +16533,7 @@ async function Qm({ to: e, bcc: t, subject: n, message: r }) {
|
|
|
16519
16533
|
}
|
|
16520
16534
|
//#endregion
|
|
16521
16535
|
//#region src/providers/email/google/GmailEmailProvider.ts
|
|
16522
|
-
var
|
|
16536
|
+
var Qm = class {
|
|
16523
16537
|
getConfigurationState() {
|
|
16524
16538
|
return oi("GmailEmailProvider", ai(Oa("oAuth2"), ["clientId"], "google.oAuth2."));
|
|
16525
16539
|
}
|
|
@@ -16528,7 +16542,7 @@ var $m = class {
|
|
|
16528
16542
|
}
|
|
16529
16543
|
async send(e) {
|
|
16530
16544
|
if (!this.isConfigured()) throw Error(this.getConfigurationState().reason || "GmailEmailProvider is not configured.");
|
|
16531
|
-
await
|
|
16545
|
+
await Zm({
|
|
16532
16546
|
to: Array.isArray(e.to) ? e.to : [e.to],
|
|
16533
16547
|
bcc: e.bcc ? Array.isArray(e.bcc) ? e.bcc : [e.bcc] : void 0,
|
|
16534
16548
|
subject: e.subject,
|
|
@@ -16538,7 +16552,7 @@ var $m = class {
|
|
|
16538
16552
|
};
|
|
16539
16553
|
//#endregion
|
|
16540
16554
|
//#region src/providers/auth/supabase/SupabaseAuthProvider.ts
|
|
16541
|
-
function
|
|
16555
|
+
function $m(e) {
|
|
16542
16556
|
return e ? {
|
|
16543
16557
|
uid: e.id,
|
|
16544
16558
|
email: e.email ?? void 0,
|
|
@@ -16547,7 +16561,7 @@ function eh(e) {
|
|
|
16547
16561
|
raw: e
|
|
16548
16562
|
} : null;
|
|
16549
16563
|
}
|
|
16550
|
-
var
|
|
16564
|
+
var eh = class {
|
|
16551
16565
|
config;
|
|
16552
16566
|
get client() {
|
|
16553
16567
|
return Za(this.config.url, this.config.anonKey);
|
|
@@ -16562,7 +16576,7 @@ var th = class {
|
|
|
16562
16576
|
return this.getConfigurationState().configured;
|
|
16563
16577
|
}
|
|
16564
16578
|
getUser() {
|
|
16565
|
-
return
|
|
16579
|
+
return $m((this.client.auth?._session ?? null)?.user ?? null);
|
|
16566
16580
|
}
|
|
16567
16581
|
isAuthenticated() {
|
|
16568
16582
|
return !!this.getUser();
|
|
@@ -16572,7 +16586,7 @@ var th = class {
|
|
|
16572
16586
|
if (t === "anonymous") {
|
|
16573
16587
|
let { data: e, error: t } = await this.client.auth.signInAnonymously();
|
|
16574
16588
|
if (t) throw t;
|
|
16575
|
-
return
|
|
16589
|
+
return $m(e.user);
|
|
16576
16590
|
}
|
|
16577
16591
|
if (t === "magic_link") {
|
|
16578
16592
|
let t = e.email;
|
|
@@ -16601,7 +16615,7 @@ var th = class {
|
|
|
16601
16615
|
password: r
|
|
16602
16616
|
});
|
|
16603
16617
|
if (a) throw a;
|
|
16604
|
-
return
|
|
16618
|
+
return $m(i.user);
|
|
16605
16619
|
}
|
|
16606
16620
|
async signOut() {
|
|
16607
16621
|
let { error: e } = await this.client.auth.signOut();
|
|
@@ -16609,10 +16623,10 @@ var th = class {
|
|
|
16609
16623
|
}
|
|
16610
16624
|
onAuthChange(e) {
|
|
16611
16625
|
this.client.auth.getSession().then(({ data: t }) => {
|
|
16612
|
-
e(
|
|
16626
|
+
e($m(t.session?.user ?? null));
|
|
16613
16627
|
});
|
|
16614
16628
|
let { data: { subscription: t } } = this.client.auth.onAuthStateChange((t, n) => {
|
|
16615
|
-
e(
|
|
16629
|
+
e($m(n?.user ?? null));
|
|
16616
16630
|
});
|
|
16617
16631
|
return () => t.unsubscribe();
|
|
16618
16632
|
}
|
|
@@ -16623,15 +16637,15 @@ var th = class {
|
|
|
16623
16637
|
if (!n) throw Error("SupabaseAuthProvider: no active session");
|
|
16624
16638
|
return n;
|
|
16625
16639
|
}
|
|
16626
|
-
},
|
|
16627
|
-
function
|
|
16640
|
+
}, th = "https://api.anthropic.com/v1/models", nh = "https://api.anthropic.com/v1/messages";
|
|
16641
|
+
function rh(e) {
|
|
16628
16642
|
return {
|
|
16629
16643
|
name: e.name,
|
|
16630
16644
|
description: e.description,
|
|
16631
16645
|
input_schema: e.inputSchema
|
|
16632
16646
|
};
|
|
16633
16647
|
}
|
|
16634
|
-
function
|
|
16648
|
+
function ih(e) {
|
|
16635
16649
|
if (e.role === "user") return {
|
|
16636
16650
|
role: "user",
|
|
16637
16651
|
content: e.content
|
|
@@ -16663,7 +16677,7 @@ function ah(e) {
|
|
|
16663
16677
|
}))
|
|
16664
16678
|
};
|
|
16665
16679
|
}
|
|
16666
|
-
function
|
|
16680
|
+
function ah(e) {
|
|
16667
16681
|
let t = e?.content;
|
|
16668
16682
|
if (!Array.isArray(t)) return null;
|
|
16669
16683
|
let n = t.filter((e) => e?.type === "text").map((e) => String(e.text ?? "")), r = t.filter((e) => e?.type === "tool_use");
|
|
@@ -16682,7 +16696,7 @@ function oh(e) {
|
|
|
16682
16696
|
text: i
|
|
16683
16697
|
} : null;
|
|
16684
16698
|
}
|
|
16685
|
-
var
|
|
16699
|
+
var oh = {
|
|
16686
16700
|
id: "anthropic",
|
|
16687
16701
|
label: "Anthropic",
|
|
16688
16702
|
description: "Claude models via the Anthropic API.",
|
|
@@ -16706,7 +16720,7 @@ var sh = {
|
|
|
16706
16720
|
supportsDocuments: !0
|
|
16707
16721
|
},
|
|
16708
16722
|
discoverModels: async (e) => {
|
|
16709
|
-
let t = await Wt(
|
|
16723
|
+
let t = await Wt(th, { headers: {
|
|
16710
16724
|
"x-api-key": e,
|
|
16711
16725
|
"anthropic-version": "2023-06-01"
|
|
16712
16726
|
} }, al);
|
|
@@ -16734,7 +16748,7 @@ var sh = {
|
|
|
16734
16748
|
type: "text",
|
|
16735
16749
|
text: n.prompt
|
|
16736
16750
|
}] : n.prompt;
|
|
16737
|
-
return
|
|
16751
|
+
return ah(await Wt(nh, {
|
|
16738
16752
|
method: "POST",
|
|
16739
16753
|
headers: {
|
|
16740
16754
|
"x-api-key": t,
|
|
@@ -16745,18 +16759,18 @@ var sh = {
|
|
|
16745
16759
|
model: n.model,
|
|
16746
16760
|
max_tokens: 4096,
|
|
16747
16761
|
...n.role ? { system: Jc.parseRole(n.role, n) } : {},
|
|
16748
|
-
messages: [...(n.history ?? []).map(
|
|
16762
|
+
messages: [...(n.history ?? []).map(ih), ...n.prompt ? [{
|
|
16749
16763
|
role: "user",
|
|
16750
16764
|
content: i
|
|
16751
16765
|
}] : []],
|
|
16752
|
-
...n.tools?.length ? { tools: n.tools.map(
|
|
16766
|
+
...n.tools?.length ? { tools: n.tools.map(rh) } : {},
|
|
16753
16767
|
...typeof n.temperature == "number" ? { temperature: n.temperature } : {}
|
|
16754
16768
|
},
|
|
16755
16769
|
signal: n.signal
|
|
16756
16770
|
}, al));
|
|
16757
16771
|
}
|
|
16758
|
-
},
|
|
16759
|
-
function
|
|
16772
|
+
}, sh = (e) => e.replace(/\/+$/, "");
|
|
16773
|
+
function ch(e) {
|
|
16760
16774
|
return {
|
|
16761
16775
|
type: "function",
|
|
16762
16776
|
function: {
|
|
@@ -16766,7 +16780,7 @@ function lh(e) {
|
|
|
16766
16780
|
}
|
|
16767
16781
|
};
|
|
16768
16782
|
}
|
|
16769
|
-
function
|
|
16783
|
+
function lh(e) {
|
|
16770
16784
|
if (typeof e != "string") return {};
|
|
16771
16785
|
try {
|
|
16772
16786
|
return JSON.parse(e);
|
|
@@ -16774,7 +16788,7 @@ function uh(e) {
|
|
|
16774
16788
|
return {};
|
|
16775
16789
|
}
|
|
16776
16790
|
}
|
|
16777
|
-
function
|
|
16791
|
+
function uh(e) {
|
|
16778
16792
|
return e.role === "user" ? [{
|
|
16779
16793
|
role: "user",
|
|
16780
16794
|
content: e.content
|
|
@@ -16795,7 +16809,7 @@ function dh(e) {
|
|
|
16795
16809
|
content: typeof e.output == "string" ? e.output : JSON.stringify(e.output)
|
|
16796
16810
|
}));
|
|
16797
16811
|
}
|
|
16798
|
-
function
|
|
16812
|
+
function dh(e) {
|
|
16799
16813
|
let t = e?.choices?.[0]?.message;
|
|
16800
16814
|
if (!t) return null;
|
|
16801
16815
|
let n = Array.isArray(t.tool_calls) ? t.tool_calls : [];
|
|
@@ -16808,7 +16822,7 @@ function fh(e) {
|
|
|
16808
16822
|
return {
|
|
16809
16823
|
id: String(e.id),
|
|
16810
16824
|
name: String(t.name ?? ""),
|
|
16811
|
-
input:
|
|
16825
|
+
input: lh(t.arguments)
|
|
16812
16826
|
};
|
|
16813
16827
|
}),
|
|
16814
16828
|
text: e || void 0
|
|
@@ -16820,8 +16834,8 @@ function fh(e) {
|
|
|
16820
16834
|
text: r
|
|
16821
16835
|
} : null;
|
|
16822
16836
|
}
|
|
16823
|
-
var
|
|
16824
|
-
let m =
|
|
16837
|
+
var fh = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a, defaultModel: o, fallbackModels: s, baseUrl: c, modelsUrl: l, chatCompletionsUrl: u, dashboardUrl: d, credentialsHint: f, validateApiKey: p }) => {
|
|
16838
|
+
let m = sh(c), h = l || `${m}/models`, g = u || `${m}/chat/completions`;
|
|
16825
16839
|
return {
|
|
16826
16840
|
id: t,
|
|
16827
16841
|
label: n,
|
|
@@ -16898,22 +16912,22 @@ var ph = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a
|
|
|
16898
16912
|
role: "system",
|
|
16899
16913
|
content: Jc.parseRole(r.role, r)
|
|
16900
16914
|
}] : [],
|
|
16901
|
-
...(r.history ?? []).flatMap(
|
|
16915
|
+
...(r.history ?? []).flatMap(uh),
|
|
16902
16916
|
...r.prompt ? [{
|
|
16903
16917
|
role: "user",
|
|
16904
16918
|
content: a
|
|
16905
16919
|
}] : []
|
|
16906
16920
|
],
|
|
16907
|
-
...r.tools?.length ? { tools: r.tools.map(
|
|
16921
|
+
...r.tools?.length ? { tools: r.tools.map(ch) } : {},
|
|
16908
16922
|
...typeof r.temperature == "number" ? { temperature: r.temperature } : {}
|
|
16909
16923
|
},
|
|
16910
16924
|
signal: r.signal
|
|
16911
16925
|
}, al);
|
|
16912
16926
|
if (!o) throw dl(n);
|
|
16913
|
-
return
|
|
16927
|
+
return dh(o);
|
|
16914
16928
|
}
|
|
16915
16929
|
};
|
|
16916
|
-
},
|
|
16930
|
+
}, ph = fh({
|
|
16917
16931
|
id: "deepseek",
|
|
16918
16932
|
label: "DeepSeek",
|
|
16919
16933
|
description: "Cost-efficient reasoning and chat models.",
|
|
@@ -16923,15 +16937,15 @@ var ph = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a
|
|
|
16923
16937
|
baseUrl: "https://api.deepseek.com",
|
|
16924
16938
|
dashboardUrl: "https://platform.deepseek.com/api_keys",
|
|
16925
16939
|
credentialsHint: "DeepSeek platform → API Keys → Create new API key."
|
|
16926
|
-
}),
|
|
16927
|
-
function
|
|
16940
|
+
}), mh = "https://generativelanguage.googleapis.com/v1beta/models", hh = "https://generativelanguage.googleapis.com/v1beta/models";
|
|
16941
|
+
function gh(e) {
|
|
16928
16942
|
return [{ function_declarations: e.map((e) => ({
|
|
16929
16943
|
name: e.name,
|
|
16930
16944
|
description: e.description,
|
|
16931
16945
|
parameters: e.inputSchema
|
|
16932
16946
|
})) }];
|
|
16933
16947
|
}
|
|
16934
|
-
function
|
|
16948
|
+
function _h(e) {
|
|
16935
16949
|
if (e.role === "user") return {
|
|
16936
16950
|
role: "user",
|
|
16937
16951
|
parts: [{ text: e.content }]
|
|
@@ -16956,7 +16970,7 @@ function vh(e) {
|
|
|
16956
16970
|
} }))
|
|
16957
16971
|
};
|
|
16958
16972
|
}
|
|
16959
|
-
function
|
|
16973
|
+
function vh(e) {
|
|
16960
16974
|
let t = e?.candidates?.[0]?.content?.parts;
|
|
16961
16975
|
if (!Array.isArray(t)) return null;
|
|
16962
16976
|
let n = t.filter((e) => typeof e?.text == "string").map((e) => e.text), r = t.filter((e) => e?.functionCall);
|
|
@@ -16975,7 +16989,7 @@ function yh(e) {
|
|
|
16975
16989
|
text: i
|
|
16976
16990
|
} : null;
|
|
16977
16991
|
}
|
|
16978
|
-
var
|
|
16992
|
+
var yh = {
|
|
16979
16993
|
id: "gemini",
|
|
16980
16994
|
label: "Gemini",
|
|
16981
16995
|
description: "Google's multimodal Gemini model family.",
|
|
@@ -16999,12 +17013,12 @@ var bh = {
|
|
|
16999
17013
|
supportsDocuments: !0
|
|
17000
17014
|
},
|
|
17001
17015
|
discoverModels: async (e) => {
|
|
17002
|
-
let t = await Wt(`${
|
|
17016
|
+
let t = await Wt(`${mh}?key=${e}`, null, al);
|
|
17003
17017
|
return Array.isArray(t?.models) ? t.models.map((e) => e.name?.replace(/^models\//, "")).filter(Boolean) : [];
|
|
17004
17018
|
},
|
|
17005
17019
|
validateApiKey: async (e) => {
|
|
17006
17020
|
try {
|
|
17007
|
-
let t = await Wt(`${
|
|
17021
|
+
let t = await Wt(`${mh}?key=${e}`, null, al);
|
|
17008
17022
|
return t === null ? {
|
|
17009
17023
|
valid: !1,
|
|
17010
17024
|
error: "Nessuna risposta dal server (CORS o rete)"
|
|
@@ -17025,22 +17039,22 @@ var bh = {
|
|
|
17025
17039
|
mime_type: e.mimeType,
|
|
17026
17040
|
data: e.base64
|
|
17027
17041
|
} }), { text: n.prompt }];
|
|
17028
|
-
return
|
|
17042
|
+
return vh(await Wt(`${hh}/${n.model}:generateContent?key=${t}`, {
|
|
17029
17043
|
method: "POST",
|
|
17030
17044
|
headers: n.logId ? { [e]: n.logId } : void 0,
|
|
17031
17045
|
body: {
|
|
17032
|
-
contents: [...(n.history ?? []).map(
|
|
17046
|
+
contents: [...(n.history ?? []).map(_h), ...n.prompt ? [{
|
|
17033
17047
|
role: "user",
|
|
17034
17048
|
parts: r
|
|
17035
17049
|
}] : []],
|
|
17036
17050
|
...n.role ? { systemInstruction: { parts: [{ text: Jc.parseRole(n.role, n) }] } } : {},
|
|
17037
|
-
...n.tools?.length ? { tools:
|
|
17051
|
+
...n.tools?.length ? { tools: gh(n.tools) } : {},
|
|
17038
17052
|
generationConfig: typeof n.temperature == "number" ? { temperature: n.temperature } : void 0
|
|
17039
17053
|
},
|
|
17040
17054
|
signal: n.signal
|
|
17041
17055
|
}, al));
|
|
17042
17056
|
}
|
|
17043
|
-
},
|
|
17057
|
+
}, bh = fh({
|
|
17044
17058
|
id: "mistral",
|
|
17045
17059
|
label: "Mistral",
|
|
17046
17060
|
description: "European-hosted open and commercial language models.",
|
|
@@ -17054,7 +17068,7 @@ var bh = {
|
|
|
17054
17068
|
baseUrl: "https://api.mistral.ai/v1",
|
|
17055
17069
|
dashboardUrl: "https://console.mistral.ai/api-keys",
|
|
17056
17070
|
credentialsHint: "Mistral Console → API Keys → Create new key."
|
|
17057
|
-
}),
|
|
17071
|
+
}), xh = fh({
|
|
17058
17072
|
id: "openai",
|
|
17059
17073
|
label: "OpenAI",
|
|
17060
17074
|
description: "GPT models via the OpenAI API.",
|
|
@@ -17072,7 +17086,7 @@ var bh = {
|
|
|
17072
17086
|
baseUrl: "https://api.openai.com/v1",
|
|
17073
17087
|
dashboardUrl: "https://platform.openai.com/api-keys",
|
|
17074
17088
|
credentialsHint: "OpenAI dashboard → API keys → Create new secret key."
|
|
17075
|
-
}),
|
|
17089
|
+
}), Sh = "https://opencode.ai/zen/v1/models", Ch = "https://opencode.ai/zen/v1/chat/completions", wh = {
|
|
17076
17090
|
id: "opencode",
|
|
17077
17091
|
label: "OpenCode",
|
|
17078
17092
|
description: "OpenCode Zen — a curated set of coding-focused models.",
|
|
@@ -17104,7 +17118,7 @@ var bh = {
|
|
|
17104
17118
|
supportsDocuments: !0
|
|
17105
17119
|
},
|
|
17106
17120
|
discoverModels: async (e) => {
|
|
17107
|
-
let t = await Wt(
|
|
17121
|
+
let t = await Wt(Sh, { headers: { Authorization: `Bearer ${e}` } }, al);
|
|
17108
17122
|
return (Array.isArray(t?.data) ? t.data : Array.isArray(t?.models) ? t.models : Array.isArray(t) ? t : []).map((e) => e.id).filter((e) => typeof e == "string" && e.length > 0);
|
|
17109
17123
|
},
|
|
17110
17124
|
complete: async (t, n) => {
|
|
@@ -17120,7 +17134,7 @@ var bh = {
|
|
|
17120
17134
|
}).concat({
|
|
17121
17135
|
type: "text",
|
|
17122
17136
|
text: n.prompt
|
|
17123
|
-
}) : n.prompt, a = await Wt(
|
|
17137
|
+
}) : n.prompt, a = await Wt(Ch, {
|
|
17124
17138
|
method: "POST",
|
|
17125
17139
|
headers: {
|
|
17126
17140
|
Authorization: `Bearer ${t}`,
|
|
@@ -17133,21 +17147,21 @@ var bh = {
|
|
|
17133
17147
|
role: "system",
|
|
17134
17148
|
content: Jc.parseRole(n.role, n)
|
|
17135
17149
|
}] : [],
|
|
17136
|
-
...(n.history ?? []).flatMap(
|
|
17150
|
+
...(n.history ?? []).flatMap(uh),
|
|
17137
17151
|
...n.prompt ? [{
|
|
17138
17152
|
role: "user",
|
|
17139
17153
|
content: i
|
|
17140
17154
|
}] : []
|
|
17141
17155
|
],
|
|
17142
|
-
...n.tools?.length ? { tools: n.tools.map(
|
|
17156
|
+
...n.tools?.length ? { tools: n.tools.map(ch) } : {},
|
|
17143
17157
|
...typeof n.temperature == "number" ? { temperature: n.temperature } : {}
|
|
17144
17158
|
},
|
|
17145
17159
|
signal: n.signal
|
|
17146
17160
|
}, al);
|
|
17147
17161
|
if (!a) throw dl("OpenCode");
|
|
17148
|
-
return
|
|
17162
|
+
return dh(a);
|
|
17149
17163
|
}
|
|
17150
|
-
},
|
|
17164
|
+
}, Th = fh({
|
|
17151
17165
|
id: "openrouter",
|
|
17152
17166
|
label: "OpenRouter",
|
|
17153
17167
|
description: "Unified access to many model providers through one API.",
|
|
@@ -17181,10 +17195,10 @@ var bh = {
|
|
|
17181
17195
|
};
|
|
17182
17196
|
}
|
|
17183
17197
|
}
|
|
17184
|
-
}),
|
|
17198
|
+
}), Eh = {
|
|
17185
17199
|
dbRealtime: {
|
|
17186
17200
|
service: "data",
|
|
17187
|
-
create: () => new
|
|
17201
|
+
create: () => new Rm()
|
|
17188
17202
|
},
|
|
17189
17203
|
firestoreDb: {
|
|
17190
17204
|
service: "data",
|
|
@@ -17196,26 +17210,26 @@ var bh = {
|
|
|
17196
17210
|
},
|
|
17197
17211
|
firebaseAuth: {
|
|
17198
17212
|
service: "auth",
|
|
17199
|
-
create: () => new
|
|
17213
|
+
create: () => new Hm()
|
|
17200
17214
|
}
|
|
17201
|
-
},
|
|
17215
|
+
}, Dh = {
|
|
17202
17216
|
googleAuth: {
|
|
17203
17217
|
service: "auth",
|
|
17204
|
-
create: () => new
|
|
17218
|
+
create: () => new ym()
|
|
17205
17219
|
},
|
|
17206
17220
|
gmail: {
|
|
17207
17221
|
service: "email",
|
|
17208
|
-
create: () => new
|
|
17222
|
+
create: () => new Qm()
|
|
17209
17223
|
},
|
|
17210
17224
|
googleServiceAccount: {
|
|
17211
17225
|
service: "credentials",
|
|
17212
|
-
create: (e) => new
|
|
17226
|
+
create: (e) => new qm(e.serviceAccount),
|
|
17213
17227
|
when: (e) => !!e.serviceAccount
|
|
17214
17228
|
}
|
|
17215
|
-
},
|
|
17229
|
+
}, Oh = { dropboxAuth: {
|
|
17216
17230
|
service: "auth",
|
|
17217
|
-
create: (e) => new
|
|
17218
|
-
} },
|
|
17231
|
+
create: (e) => new Ym(e)
|
|
17232
|
+
} }, kh = {
|
|
17219
17233
|
supabaseDb: {
|
|
17220
17234
|
service: "data",
|
|
17221
17235
|
create: (e) => new co(e)
|
|
@@ -17226,32 +17240,32 @@ var bh = {
|
|
|
17226
17240
|
},
|
|
17227
17241
|
supabaseAuth: {
|
|
17228
17242
|
service: "auth",
|
|
17229
|
-
create: (e) => new
|
|
17243
|
+
create: (e) => new eh(e)
|
|
17230
17244
|
}
|
|
17231
|
-
},
|
|
17245
|
+
}, Ah = { mock: {
|
|
17232
17246
|
service: "data",
|
|
17233
17247
|
create: (e) => new go(e?.data)
|
|
17234
|
-
} },
|
|
17248
|
+
} }, jh = (e, t) => ({
|
|
17235
17249
|
service: "ai",
|
|
17236
17250
|
create: (n) => new _l(e, n?.[t] || ""),
|
|
17237
17251
|
when: (e) => !!e?.[t]
|
|
17238
|
-
}),
|
|
17239
|
-
firebase:
|
|
17240
|
-
google:
|
|
17241
|
-
dropbox:
|
|
17242
|
-
supabase:
|
|
17243
|
-
mock:
|
|
17252
|
+
}), Mh = {
|
|
17253
|
+
firebase: Eh,
|
|
17254
|
+
google: Dh,
|
|
17255
|
+
dropbox: Oh,
|
|
17256
|
+
supabase: kh,
|
|
17257
|
+
mock: Ah,
|
|
17244
17258
|
ai: {
|
|
17245
|
-
openai:
|
|
17246
|
-
openrouter:
|
|
17247
|
-
opencode:
|
|
17248
|
-
deepseek:
|
|
17249
|
-
gemini:
|
|
17250
|
-
anthropic:
|
|
17251
|
-
mistral:
|
|
17259
|
+
openai: jh(xh, "openaiApiKey"),
|
|
17260
|
+
openrouter: jh(Th, "openRouterApiKey"),
|
|
17261
|
+
opencode: jh(wh, "openCodeApiKey"),
|
|
17262
|
+
deepseek: jh(ph, "deepSeekApiKey"),
|
|
17263
|
+
gemini: jh(yh, "geminiApiKey"),
|
|
17264
|
+
anthropic: jh(oh, "anthropicApiKey"),
|
|
17265
|
+
mistral: jh(bh, "mistralApiKey")
|
|
17252
17266
|
}
|
|
17253
|
-
},
|
|
17254
|
-
function
|
|
17267
|
+
}, Nh = () => /* @__PURE__ */ t.createElement("div", { className: "flex min-h-[calc(100vh-4rem)] items-center justify-center" }, /* @__PURE__ */ t.createElement("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-muted border-t-primary" }));
|
|
17268
|
+
function Ph(e, t) {
|
|
17255
17269
|
if (!t) return;
|
|
17256
17270
|
let n = t, r = typeof t == "object" && !Array.isArray(t) ? Object.entries(n) : [];
|
|
17257
17271
|
if (r.length > 0 && r.every(([, e]) => typeof e == "object" && !!e)) {
|
|
@@ -17260,10 +17274,10 @@ function Fh(e, t) {
|
|
|
17260
17274
|
}
|
|
17261
17275
|
e.custom = t;
|
|
17262
17276
|
}
|
|
17263
|
-
function
|
|
17277
|
+
function Fh(e, t, n = "default") {
|
|
17264
17278
|
return t && e[t] ? t : Object.keys(e)[0] ?? n;
|
|
17265
17279
|
}
|
|
17266
|
-
function
|
|
17280
|
+
function Ih(e = {}) {
|
|
17267
17281
|
let t = {
|
|
17268
17282
|
data: {},
|
|
17269
17283
|
storage: {},
|
|
@@ -17272,24 +17286,24 @@ function Lh(e = {}) {
|
|
|
17272
17286
|
ai: {},
|
|
17273
17287
|
credentials: {}
|
|
17274
17288
|
}, n = (e) => t[e] ??= {};
|
|
17275
|
-
for (let [t, r] of Object.entries(
|
|
17289
|
+
for (let [t, r] of Object.entries(Mh)) {
|
|
17276
17290
|
let i = e[t];
|
|
17277
17291
|
if (i !== void 0) for (let [e, t] of Object.entries(r)) t.when && !t.when(i) || (n(t.service)[e] = t.create(i));
|
|
17278
17292
|
}
|
|
17279
|
-
for (let [t, r] of Object.entries(e.custom ?? {}))
|
|
17280
|
-
Object.keys(t.data).length === 0 && (t.data.mock = new go()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new
|
|
17293
|
+
for (let [t, r] of Object.entries(e.custom ?? {})) Ph(n(t), r);
|
|
17294
|
+
Object.keys(t.data).length === 0 && (t.data.mock = new go()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new ym());
|
|
17281
17295
|
let r = e.services ?? {}, i = {};
|
|
17282
17296
|
for (let [e, n] of Object.entries(t)) i[e] = {
|
|
17283
17297
|
registry: n,
|
|
17284
|
-
defaultKey:
|
|
17298
|
+
defaultKey: Fh(n, r[e])
|
|
17285
17299
|
};
|
|
17286
17300
|
return i;
|
|
17287
17301
|
}
|
|
17288
|
-
var
|
|
17289
|
-
|
|
17290
|
-
},
|
|
17291
|
-
function
|
|
17292
|
-
let [p, g] = h(() =>
|
|
17302
|
+
var Lh = {}, Rh = (e) => {
|
|
17303
|
+
Lh = e;
|
|
17304
|
+
}, zh = (e) => Lh[e] || [];
|
|
17305
|
+
function Bh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native", scrapeConfig: i, iconProvider: a, googleMaps: o, themeProvider: s, i18n: c, children: l, errorReportUrl: u, debug: d, basename: f }) {
|
|
17306
|
+
let [p, g] = h(() => Ih(n)), v = m(p);
|
|
17293
17307
|
v.current = p;
|
|
17294
17308
|
let y = m(void 0);
|
|
17295
17309
|
y.current ||= (async (e, t, n) => {
|
|
@@ -17306,7 +17320,7 @@ function Vh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native",
|
|
|
17306
17320
|
})));
|
|
17307
17321
|
});
|
|
17308
17322
|
let b = y.current, x = e ?? t.Fragment;
|
|
17309
|
-
return /* @__PURE__ */ t.createElement(
|
|
17323
|
+
return /* @__PURE__ */ t.createElement(_m, {
|
|
17310
17324
|
fullPage: !0,
|
|
17311
17325
|
reportUrl: u,
|
|
17312
17326
|
debug: d
|
|
@@ -17328,10 +17342,10 @@ function Vh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native",
|
|
|
17328
17342
|
} }, /* @__PURE__ */ t.createElement(ga, {
|
|
17329
17343
|
registries: p,
|
|
17330
17344
|
setProvider: b
|
|
17331
|
-
}, /* @__PURE__ */ t.createElement(ti, p.auth, /* @__PURE__ */ t.createElement(
|
|
17345
|
+
}, /* @__PURE__ */ t.createElement(ti, p.auth, /* @__PURE__ */ t.createElement(wm, p.credentials, /* @__PURE__ */ t.createElement(wi, p.data, /* @__PURE__ */ t.createElement(cc, p.storage, /* @__PURE__ */ t.createElement(xm, p.email, /* @__PURE__ */ t.createElement(Qc, p.ai, /* @__PURE__ */ t.createElement(Sr, { config: a }, /* @__PURE__ */ t.createElement(pf, { config: o }, /* @__PURE__ */ t.createElement(Cp, { appName: r }, /* @__PURE__ */ t.createElement(Pn, { config: c }, /* @__PURE__ */ t.createElement(xn, { config: s }, /* @__PURE__ */ t.createElement(x, null, l))))))))))))))));
|
|
17332
17346
|
}
|
|
17333
|
-
function
|
|
17334
|
-
|
|
17347
|
+
function Vh({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, children: a, ...o }) {
|
|
17348
|
+
Rh(r);
|
|
17335
17349
|
let s = ({ children: e }) => /* @__PURE__ */ t.createElement(t.Fragment, null, e), c = ({ pageSource: e, message: n }) => /* @__PURE__ */ t.createElement(Io, { variant: "warning" }, "Missing Page: ", e, n && /* @__PURE__ */ t.createElement("code", { className: "ml-2" }, n));
|
|
17336
17350
|
function l(r, a, l) {
|
|
17337
17351
|
let u = `./pages${a.component ? "/" + a.component : a.path === "/" ? "/Home" : et.toCamel(a.path.split("*")[0])}.js`, d = a.page || t.lazy(() => e(u).then((e) => typeof e.default == "function" ? { default: e.default } : (console.warn(`⚠️ Invalid default export in ${u}`), { default: () => /* @__PURE__ */ t.createElement(c, { pageSource: u }) })).catch((e) => (console.error(`❌ Failed to load ${u}:`, e), { default: () => /* @__PURE__ */ t.createElement(c, {
|
|
@@ -17341,32 +17355,32 @@ function Hh({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, chil
|
|
|
17341
17355
|
return /* @__PURE__ */ t.createElement(y, {
|
|
17342
17356
|
key: `${r}-${l}`,
|
|
17343
17357
|
path: a.path,
|
|
17344
|
-
element: /* @__PURE__ */ t.createElement(f, null, /* @__PURE__ */ t.createElement(
|
|
17358
|
+
element: /* @__PURE__ */ t.createElement(f, null, /* @__PURE__ */ t.createElement(_m, {
|
|
17345
17359
|
key: a.path,
|
|
17346
17360
|
reportUrl: o.errorReportUrl,
|
|
17347
17361
|
debug: o.debug
|
|
17348
|
-
}, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(
|
|
17362
|
+
}, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(Nh, null) }, /* @__PURE__ */ t.createElement(d, null))))
|
|
17349
17363
|
});
|
|
17350
17364
|
}
|
|
17351
17365
|
let u = (e) => Object.keys(e).flatMap((t) => e[t].flatMap((e, n) => [e.path && l(t, e, n), e.children && u({ children: e.children })].filter(Boolean)));
|
|
17352
|
-
return /* @__PURE__ */ t.createElement(
|
|
17366
|
+
return /* @__PURE__ */ t.createElement(Bh, o, a, /* @__PURE__ */ t.createElement(b, null, /* @__PURE__ */ t.createElement(y, {
|
|
17353
17367
|
path: ci,
|
|
17354
17368
|
element: /* @__PURE__ */ t.createElement(hi, null)
|
|
17355
17369
|
}), /* @__PURE__ */ t.createElement(t.Fragment, null, u({
|
|
17356
17370
|
default: [{ path: "/" }],
|
|
17357
|
-
...
|
|
17371
|
+
...Lh,
|
|
17358
17372
|
_auth: [{
|
|
17359
17373
|
path: "/users",
|
|
17360
|
-
page:
|
|
17374
|
+
page: cm,
|
|
17361
17375
|
layout: n
|
|
17362
17376
|
}]
|
|
17363
17377
|
})), /* @__PURE__ */ t.createElement(y, {
|
|
17364
17378
|
path: "*",
|
|
17365
|
-
element: /* @__PURE__ */ t.createElement(
|
|
17379
|
+
element: /* @__PURE__ */ t.createElement(lm, null)
|
|
17366
17380
|
})));
|
|
17367
17381
|
}
|
|
17368
|
-
var
|
|
17369
|
-
let t =
|
|
17382
|
+
var Hh = (e) => {
|
|
17383
|
+
let t = zh(e), n = x(), r = (e) => e.map((e) => {
|
|
17370
17384
|
let t = n.pathname === e.path, i = e.children ? r(e.children) : [], a = t || i.some((e) => e.active);
|
|
17371
17385
|
return {
|
|
17372
17386
|
...e,
|
|
@@ -17375,7 +17389,7 @@ var Uh = (e) => {
|
|
|
17375
17389
|
};
|
|
17376
17390
|
});
|
|
17377
17391
|
return p(() => r(t), [n.pathname]);
|
|
17378
|
-
},
|
|
17392
|
+
}, Uh = {
|
|
17379
17393
|
common: {
|
|
17380
17394
|
save: "Salva",
|
|
17381
17395
|
cancel: "Annulla",
|
|
@@ -17542,7 +17556,7 @@ var Uh = (e) => {
|
|
|
17542
17556
|
notConfigured: "La ricerca indirizzi non è configurata (manca la API key Google Maps).",
|
|
17543
17557
|
loadError: "Impossibile caricare la ricerca indirizzi."
|
|
17544
17558
|
}
|
|
17545
|
-
},
|
|
17559
|
+
}, Wh = {
|
|
17546
17560
|
common: {
|
|
17547
17561
|
save: "Speichern",
|
|
17548
17562
|
cancel: "Abbrechen",
|
|
@@ -17709,7 +17723,7 @@ var Uh = (e) => {
|
|
|
17709
17723
|
notConfigured: "Adresssuche ist nicht konfiguriert (Google Maps API-Schlüssel fehlt).",
|
|
17710
17724
|
loadError: "Adresssuche konnte nicht geladen werden."
|
|
17711
17725
|
}
|
|
17712
|
-
},
|
|
17726
|
+
}, Gh = {
|
|
17713
17727
|
common: {
|
|
17714
17728
|
save: "Сохранить",
|
|
17715
17729
|
cancel: "Отменить",
|
|
@@ -17876,7 +17890,7 @@ var Uh = (e) => {
|
|
|
17876
17890
|
notConfigured: "Поиск адресов не настроен (отсутствует ключ Google Maps API).",
|
|
17877
17891
|
loadError: "Не удалось загрузить поиск адресов."
|
|
17878
17892
|
}
|
|
17879
|
-
},
|
|
17893
|
+
}, Kh = {
|
|
17880
17894
|
common: {
|
|
17881
17895
|
save: "保存",
|
|
17882
17896
|
cancel: "取消",
|
|
@@ -18043,7 +18057,7 @@ var Uh = (e) => {
|
|
|
18043
18057
|
notConfigured: "地址搜索未配置(缺少 Google Maps API 密钥)。",
|
|
18044
18058
|
loadError: "无法加载地址搜索。"
|
|
18045
18059
|
}
|
|
18046
|
-
},
|
|
18060
|
+
}, qh = {
|
|
18047
18061
|
common: {
|
|
18048
18062
|
save: "حفظ",
|
|
18049
18063
|
cancel: "إلغاء",
|
|
@@ -18210,22 +18224,22 @@ var Uh = (e) => {
|
|
|
18210
18224
|
notConfigured: "البحث عن العناوين غير مُعد (مفتاح Google Maps API مفقود).",
|
|
18211
18225
|
loadError: "تعذر تحميل البحث عن العناوين."
|
|
18212
18226
|
}
|
|
18213
|
-
},
|
|
18214
|
-
ar: () =>
|
|
18215
|
-
de: () =>
|
|
18227
|
+
}, Jh = /* @__PURE__ */ Je({
|
|
18228
|
+
ar: () => qh,
|
|
18229
|
+
de: () => Wh,
|
|
18216
18230
|
en: () => wn,
|
|
18217
|
-
it: () =>
|
|
18218
|
-
ru: () =>
|
|
18219
|
-
zh: () =>
|
|
18220
|
-
}),
|
|
18231
|
+
it: () => Uh,
|
|
18232
|
+
ru: () => Gh,
|
|
18233
|
+
zh: () => Kh
|
|
18234
|
+
}), Yh = (e) => ya("api", e);
|
|
18221
18235
|
//#endregion
|
|
18222
18236
|
//#region src/providers/api/direct.ts
|
|
18223
|
-
async function
|
|
18237
|
+
async function Xh(e) {
|
|
18224
18238
|
if (!e.ok) throw Error(`ApiProvider request failed: ${e.status} ${e.statusText}`);
|
|
18225
18239
|
let t = await e.text();
|
|
18226
18240
|
return t ? JSON.parse(t) : void 0;
|
|
18227
18241
|
}
|
|
18228
|
-
var
|
|
18242
|
+
var Zh = class {
|
|
18229
18243
|
config;
|
|
18230
18244
|
constructor(e) {
|
|
18231
18245
|
this.config = e;
|
|
@@ -18240,7 +18254,7 @@ var Qh = class {
|
|
|
18240
18254
|
...e.body,
|
|
18241
18255
|
...this.config.body
|
|
18242
18256
|
};
|
|
18243
|
-
return
|
|
18257
|
+
return Xh(await al(n.toString(), {
|
|
18244
18258
|
method: t,
|
|
18245
18259
|
headers: {
|
|
18246
18260
|
"Content-Type": "application/json",
|
|
@@ -18249,7 +18263,7 @@ var Qh = class {
|
|
|
18249
18263
|
body: t === "GET" || t === "HEAD" ? void 0 : JSON.stringify(r)
|
|
18250
18264
|
}));
|
|
18251
18265
|
}
|
|
18252
|
-
},
|
|
18266
|
+
}, Qh = class {
|
|
18253
18267
|
resolver;
|
|
18254
18268
|
constructor(e) {
|
|
18255
18269
|
this.resolver = e;
|
|
@@ -18257,7 +18271,7 @@ var Qh = class {
|
|
|
18257
18271
|
async fetch(e) {
|
|
18258
18272
|
return this.resolver(e);
|
|
18259
18273
|
}
|
|
18260
|
-
},
|
|
18274
|
+
}, $h = class {
|
|
18261
18275
|
config;
|
|
18262
18276
|
constructor(e) {
|
|
18263
18277
|
this.config = e;
|
|
@@ -18268,7 +18282,7 @@ var Qh = class {
|
|
|
18268
18282
|
request: e
|
|
18269
18283
|
}, void 0, this.config.region);
|
|
18270
18284
|
}
|
|
18271
|
-
},
|
|
18285
|
+
}, eg = class {
|
|
18272
18286
|
config;
|
|
18273
18287
|
constructor(e) {
|
|
18274
18288
|
this.config = e;
|
|
@@ -18281,7 +18295,7 @@ var Qh = class {
|
|
|
18281
18295
|
if (n) throw n;
|
|
18282
18296
|
return t;
|
|
18283
18297
|
}
|
|
18284
|
-
},
|
|
18298
|
+
}, tg = [
|
|
18285
18299
|
{
|
|
18286
18300
|
id: "resend",
|
|
18287
18301
|
label: "Resend",
|
|
@@ -18392,7 +18406,7 @@ var Qh = class {
|
|
|
18392
18406
|
],
|
|
18393
18407
|
credentialsHint: "Ask your mail host or hosting provider for the SMTP host, port, and credentials."
|
|
18394
18408
|
}
|
|
18395
|
-
],
|
|
18409
|
+
], ng = [
|
|
18396
18410
|
{
|
|
18397
18411
|
id: "cloudflare_pages",
|
|
18398
18412
|
label: "Cloudflare Pages",
|
|
@@ -18622,15 +18636,15 @@ var Qh = class {
|
|
|
18622
18636
|
description: "No vendor — packages the build as a downloadable archive for self-hosting anywhere else.",
|
|
18623
18637
|
credentialFields: []
|
|
18624
18638
|
}
|
|
18625
|
-
],
|
|
18626
|
-
|
|
18627
|
-
Eh,
|
|
18639
|
+
], rg = [
|
|
18640
|
+
xh,
|
|
18628
18641
|
Th,
|
|
18629
|
-
|
|
18642
|
+
wh,
|
|
18643
|
+
ph,
|
|
18644
|
+
yh,
|
|
18645
|
+
oh,
|
|
18630
18646
|
bh,
|
|
18631
|
-
|
|
18632
|
-
xh,
|
|
18633
|
-
ph({
|
|
18647
|
+
fh({
|
|
18634
18648
|
id: "glm",
|
|
18635
18649
|
label: "ZhipuAI (GLM)",
|
|
18636
18650
|
description: "Zhipu AI's GLM model family.",
|
|
@@ -18647,7 +18661,7 @@ var Qh = class {
|
|
|
18647
18661
|
dashboardUrl: "https://bigmodel.cn/usercenter/apikeys",
|
|
18648
18662
|
credentialsHint: "Zhipu BigModel → User Center → API Keys → Create Key."
|
|
18649
18663
|
})
|
|
18650
|
-
],
|
|
18664
|
+
], ig = (e) => ({
|
|
18651
18665
|
id: e.id,
|
|
18652
18666
|
label: e.label,
|
|
18653
18667
|
description: e.description ?? "",
|
|
@@ -18658,7 +18672,7 @@ var Qh = class {
|
|
|
18658
18672
|
}],
|
|
18659
18673
|
credentialsUrl: e.dashboardUrl,
|
|
18660
18674
|
credentialsHint: e.credentialsHint
|
|
18661
|
-
}),
|
|
18675
|
+
}), ag = rg.map(ig), og = {
|
|
18662
18676
|
id: "openai-compatible",
|
|
18663
18677
|
label: "OpenAI-compatible",
|
|
18664
18678
|
description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
|
|
@@ -18672,9 +18686,9 @@ var Qh = class {
|
|
|
18672
18686
|
type: "text",
|
|
18673
18687
|
placeholder: "https://api.example.com/v1"
|
|
18674
18688
|
}]
|
|
18675
|
-
},
|
|
18689
|
+
}, sg = (e) => {
|
|
18676
18690
|
let t = e?.openAICompatible?.baseUrl?.trim();
|
|
18677
|
-
return t ? [
|
|
18691
|
+
return t ? [fh({
|
|
18678
18692
|
id: "openai-compatible",
|
|
18679
18693
|
label: e?.openAICompatible?.label?.trim() || "OpenAI-compatible",
|
|
18680
18694
|
description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
|
|
@@ -18686,35 +18700,35 @@ var Qh = class {
|
|
|
18686
18700
|
modelsUrl: e?.openAICompatible?.modelsUrl?.trim() || void 0,
|
|
18687
18701
|
chatCompletionsUrl: e?.openAICompatible?.chatCompletionsUrl?.trim() || void 0
|
|
18688
18702
|
})] : [];
|
|
18689
|
-
},
|
|
18703
|
+
}, cg = (e) => e ? [...rg, ...sg(e)].reduce((t, n) => {
|
|
18690
18704
|
let r = n.id === "openai-compatible" ? e.openAICompatible?.apiKey?.trim() || "" : typeof n.configKey == "string" && typeof e[n.configKey] == "string" ? String(e[n.configKey] || "").trim() : "";
|
|
18691
18705
|
return r && (t[n.id] = new _l(n, r)), t;
|
|
18692
|
-
}, {}) : {},
|
|
18706
|
+
}, {}) : {}, lg = void 0;
|
|
18693
18707
|
typeof wa == "function" && wa((e) => {
|
|
18694
|
-
|
|
18708
|
+
lg = e.google;
|
|
18695
18709
|
});
|
|
18696
|
-
var
|
|
18710
|
+
var ug = {
|
|
18697
18711
|
ita: "geoTargetConstants/2380",
|
|
18698
18712
|
rome: "geoTargetConstants/1033236",
|
|
18699
18713
|
mil: "geoTargetConstants/1033239",
|
|
18700
18714
|
nap: "geoTargetConstants/1033245",
|
|
18701
18715
|
tor: "geoTargetConstants/1033247"
|
|
18702
|
-
},
|
|
18716
|
+
}, dg = {
|
|
18703
18717
|
it: "languageConstants/1000",
|
|
18704
18718
|
en: "languageConstants/1001",
|
|
18705
18719
|
fr: "languageConstants/1002",
|
|
18706
18720
|
es: "languageConstants/1003",
|
|
18707
18721
|
de: "languageConstants/1005"
|
|
18708
18722
|
};
|
|
18709
|
-
function
|
|
18710
|
-
return
|
|
18723
|
+
function fg(e) {
|
|
18724
|
+
return ug[e.toLowerCase()] || "geoTargetConstants/2380";
|
|
18711
18725
|
}
|
|
18712
|
-
function
|
|
18713
|
-
return
|
|
18726
|
+
function pg(e) {
|
|
18727
|
+
return dg[e.toLowerCase()] || "languageConstants/1000";
|
|
18714
18728
|
}
|
|
18715
|
-
async function
|
|
18716
|
-
if (!
|
|
18717
|
-
let i = await
|
|
18729
|
+
async function mg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", languageCode: r = "it" }) {
|
|
18730
|
+
if (!lg?.developerToken) return console.error("\n❌ Google Ads API: developerToken non configurato.\n\nPer ottenere un developerToken segui questi passaggi:\n\n1️⃣ Vai su https://ads.google.com/aw/apicenter\n2️⃣ Seleziona o crea un account Google Ads Manager (MCC) se non ne hai uno.\n3️⃣ Vai alla sezione \"Strumenti e impostazioni\" → \"Accesso API\" (o \"API Center\").\n4️⃣ Clicca su \"Richiedi accesso API\" se non l'hai ancora fatto.\n5️⃣ Copia il valore del tuo Developer Token (è un identificatore simile a: 'ABc123456789xyz').\n6️⃣ Inseriscilo nel tuo file di configurazione, nella sezione:\n config.google.developerToken\n\nℹ️ Attenzione: Inizialmente il token sarà in modalità di test. Per usarlo in produzione, dovrai richiedere l'approvazione da Google Ads.\n"), [];
|
|
18731
|
+
let i = await Xm(["https://www.googleapis.com/auth/adwords"]), a = fg(n), o = pg(r), s = `https://googleads.googleapis.com/v13/customers/${t}:generateKeywordIdeas`, c = {
|
|
18718
18732
|
keywordSeed: { keywords: [e] },
|
|
18719
18733
|
geoTargetConstants: [a],
|
|
18720
18734
|
language: o
|
|
@@ -18722,7 +18736,7 @@ async function hg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
18722
18736
|
method: "POST",
|
|
18723
18737
|
headers: {
|
|
18724
18738
|
Authorization: `Bearer ${i}`,
|
|
18725
|
-
"developer-token":
|
|
18739
|
+
"developer-token": lg.developerToken,
|
|
18726
18740
|
"Content-Type": "application/json"
|
|
18727
18741
|
},
|
|
18728
18742
|
body: JSON.stringify(c)
|
|
@@ -18740,7 +18754,7 @@ async function hg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
18740
18754
|
}
|
|
18741
18755
|
//#endregion
|
|
18742
18756
|
//#region src/providers/seo/google/trend.ts
|
|
18743
|
-
async function
|
|
18757
|
+
async function hg(e, t = "IT", n = "today 12-m") {
|
|
18744
18758
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
18745
18759
|
comparisonItem: [{
|
|
18746
18760
|
keyword: e,
|
|
@@ -18760,7 +18774,7 @@ async function gg(e, t = "IT", n = "today 12-m") {
|
|
|
18760
18774
|
}))
|
|
18761
18775
|
};
|
|
18762
18776
|
}
|
|
18763
|
-
async function
|
|
18777
|
+
async function gg(e, t = "IT", n = "today 12-m") {
|
|
18764
18778
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
18765
18779
|
comparisonItem: [{
|
|
18766
18780
|
keyword: e,
|
|
@@ -18786,13 +18800,13 @@ async function _g(e, t = "IT", n = "today 12-m") {
|
|
|
18786
18800
|
}
|
|
18787
18801
|
//#endregion
|
|
18788
18802
|
//#region src/providers/storage/dropbox.tsx
|
|
18789
|
-
var
|
|
18803
|
+
var _g = 5e3, vg = "https://www.dropbox.com/home", yg = void 0;
|
|
18790
18804
|
typeof wa == "function" && wa((e) => {
|
|
18791
|
-
|
|
18805
|
+
yg = e.dropbox;
|
|
18792
18806
|
});
|
|
18793
|
-
var
|
|
18794
|
-
if (!
|
|
18795
|
-
let r = await bi(
|
|
18807
|
+
var bg = async (e, t, n = {}) => {
|
|
18808
|
+
if (!yg) return console.error("DropBox: Config not found"), null;
|
|
18809
|
+
let r = await bi(yg.clientId);
|
|
18796
18810
|
if (!r) throw Error("DropBox: Access token not found");
|
|
18797
18811
|
return await fetch(e, {
|
|
18798
18812
|
method: "POST",
|
|
@@ -18805,12 +18819,12 @@ var xg = async (e, t, n = {}) => {
|
|
|
18805
18819
|
}).catch((e) => (console.error("There was a problem with the fetch operation:", e), null)).finally(() => {
|
|
18806
18820
|
console.log("DropBox: Fetch operation completed");
|
|
18807
18821
|
});
|
|
18808
|
-
},
|
|
18809
|
-
if (!
|
|
18822
|
+
}, xg = async (e, t, n = {}) => {
|
|
18823
|
+
if (!yg) {
|
|
18810
18824
|
console.error("DropBox: Config not found");
|
|
18811
18825
|
return;
|
|
18812
18826
|
}
|
|
18813
|
-
let r = await bi(
|
|
18827
|
+
let r = await bi(yg.clientId);
|
|
18814
18828
|
if (!r) {
|
|
18815
18829
|
console.error("DropBox: Access token not found");
|
|
18816
18830
|
return;
|
|
@@ -18835,47 +18849,47 @@ var xg = async (e, t, n = {}) => {
|
|
|
18835
18849
|
}).finally(() => {
|
|
18836
18850
|
console.log("DropBox: Fetch operation completed", e, t);
|
|
18837
18851
|
});
|
|
18838
|
-
},
|
|
18839
|
-
let n =
|
|
18840
|
-
return (t ?
|
|
18841
|
-
},
|
|
18852
|
+
}, Sg = (e, t = !1) => {
|
|
18853
|
+
let n = yg?.rootPath || "";
|
|
18854
|
+
return (t ? vg : "") + (e.startsWith(n) ? e : n + e);
|
|
18855
|
+
}, Cg = async (e, t = "", n = !1) => {
|
|
18842
18856
|
let r = {};
|
|
18843
|
-
return (await
|
|
18857
|
+
return (await Lg.listFolders({
|
|
18844
18858
|
path: `${e + t}`,
|
|
18845
18859
|
recursive: !0
|
|
18846
18860
|
})).forEach((e) => {
|
|
18847
18861
|
e[".tag"] !== "folder" && (r[n ? ri.changeFilename(e.path_display, { ext: "" }) : e.path_display] = e.name);
|
|
18848
18862
|
}), r;
|
|
18849
|
-
},
|
|
18863
|
+
}, wg = async (e, t) => {
|
|
18850
18864
|
if (!e.async_job_id) return Promise.reject(e);
|
|
18851
18865
|
let n, r = !0;
|
|
18852
|
-
for (; r;) await ut(100), n = await
|
|
18866
|
+
for (; r;) await ut(100), n = await xg(`https://api.dropboxapi.com/2/${t}/check`, { async_job_id: e.async_job_id }), console.log("DropBox: Check folders response: ", n), n?.[".tag"] !== "in_progress" && (r = !1);
|
|
18853
18867
|
return n?.[".tag"] === "complete" ? Promise.resolve(n.entries) : Promise.reject(n);
|
|
18854
|
-
},
|
|
18855
|
-
let n = "files/create_folder_batch", r = await
|
|
18868
|
+
}, Tg = async (e, t = "") => {
|
|
18869
|
+
let n = "files/create_folder_batch", r = await xg(`https://api.dropboxapi.com/2/${n}`, {
|
|
18856
18870
|
autorename: !1,
|
|
18857
18871
|
force_async: !0,
|
|
18858
|
-
paths: e.map((e) =>
|
|
18872
|
+
paths: e.map((e) => Sg(t + e))
|
|
18859
18873
|
});
|
|
18860
|
-
return r ?
|
|
18861
|
-
},
|
|
18862
|
-
let n = "files/create_folder_batch", r = await
|
|
18863
|
-
return r ?
|
|
18864
|
-
},
|
|
18874
|
+
return r ? wg(r, n) : void 0;
|
|
18875
|
+
}, Eg = async (e, t = "") => {
|
|
18876
|
+
let n = "files/create_folder_batch", r = await xg(`https://api.dropboxapi.com/2/${n}`, { entries: e.map((e) => ({ path: Sg(t + e) })) });
|
|
18877
|
+
return r ? wg(r, n) : void 0;
|
|
18878
|
+
}, Dg = async (e, t) => xg("https://api.dropboxapi.com/2/files/tags/add", {
|
|
18865
18879
|
path: e,
|
|
18866
18880
|
tag_text: t.toLowerCase().replaceAll(/[^a-z0-9]/g, "")
|
|
18867
|
-
}),
|
|
18868
|
-
for (let n in e) for (let r of e[n]) await
|
|
18869
|
-
},
|
|
18870
|
-
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await
|
|
18881
|
+
}), Og = async (e, t = "") => {
|
|
18882
|
+
for (let n in e) for (let r of e[n]) await Dg(Sg(t + n), r);
|
|
18883
|
+
}, kg = async ({ path: e = "", recursive: t = !1 } = {}) => {
|
|
18884
|
+
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await xg("https://api.dropboxapi.com/2/files/list_folder", {
|
|
18871
18885
|
include_deleted: !1,
|
|
18872
18886
|
include_has_explicit_shared_members: !1,
|
|
18873
18887
|
include_media_info: !1,
|
|
18874
18888
|
include_mounted_folders: !0,
|
|
18875
18889
|
include_non_downloadable_files: !0,
|
|
18876
|
-
path:
|
|
18890
|
+
path: Sg(e),
|
|
18877
18891
|
recursive: n
|
|
18878
|
-
}) : await
|
|
18892
|
+
}) : await xg("https://api.dropboxapi.com/2/files/list_folder/continue", { cursor: t }), i = {
|
|
18879
18893
|
has_more: !0,
|
|
18880
18894
|
cursor: "",
|
|
18881
18895
|
entries: []
|
|
@@ -18888,44 +18902,44 @@ var xg = async (e, t, n = {}) => {
|
|
|
18888
18902
|
recursive: t
|
|
18889
18903
|
}), i && n.push(...i.entries);
|
|
18890
18904
|
return n;
|
|
18891
|
-
},
|
|
18892
|
-
let t = async (e) => await
|
|
18905
|
+
}, Ag = async (e) => {
|
|
18906
|
+
let t = async (e) => await xg("https://api.dropboxapi.com/2/files/copy_batch_v2", {
|
|
18893
18907
|
entries: e,
|
|
18894
18908
|
autorename: !1
|
|
18895
|
-
}), n = async (e) => await
|
|
18909
|
+
}), n = async (e) => await xg("https://api.dropboxapi.com/2/files/copy_batch/check_v2", { async_job_id: e }), r = [], i = [];
|
|
18896
18910
|
for (let a = 0; a < e.length; a += 900) {
|
|
18897
18911
|
i = e.slice(a, a + 900).map((e) => ({
|
|
18898
|
-
from_path:
|
|
18899
|
-
to_path:
|
|
18912
|
+
from_path: Sg(e.from),
|
|
18913
|
+
to_path: Sg(e.to)
|
|
18900
18914
|
}));
|
|
18901
18915
|
let o = await t(i);
|
|
18902
18916
|
if (!o) continue;
|
|
18903
18917
|
if (o.error) throw Error(`Error starting copy: ${o.error}`);
|
|
18904
18918
|
let s = o;
|
|
18905
|
-
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await ut(
|
|
18919
|
+
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await ut(_g), s = await n(o.async_job_id ?? "");
|
|
18906
18920
|
if (s?.[".tag"] === "failed") throw Error(`Copy operation failed: ${s[".tag"]}`);
|
|
18907
18921
|
s?.[".tag"] === "complete" && s.entries && r.push(...s.entries);
|
|
18908
18922
|
}
|
|
18909
18923
|
return r.filter((e) => e[".tag"] === "failure").map((e) => e.failure);
|
|
18910
|
-
},
|
|
18911
|
-
let t = async (e) => await
|
|
18924
|
+
}, jg = async (e) => {
|
|
18925
|
+
let t = async (e) => await xg("https://api.dropboxapi.com/2/files/move_v2", {
|
|
18912
18926
|
...e,
|
|
18913
18927
|
autorename: !0
|
|
18914
18928
|
});
|
|
18915
18929
|
for (let n of e) await t({
|
|
18916
|
-
from_path:
|
|
18917
|
-
to_path:
|
|
18930
|
+
from_path: Sg(n.from),
|
|
18931
|
+
to_path: Sg(n.to)
|
|
18918
18932
|
});
|
|
18919
|
-
},
|
|
18933
|
+
}, Mg = async ({ thumbnailsRequest: e = [], size: t = "w64h64", format: n = "jpeg", mode: r = "strict" }, i) => {
|
|
18920
18934
|
let a = {}, o = [];
|
|
18921
18935
|
for (let s = 0; s < e.length; s += 25) {
|
|
18922
18936
|
let c = e.slice(s, s + 25), l = c.map((e) => ({
|
|
18923
|
-
path:
|
|
18937
|
+
path: Sg(e.path),
|
|
18924
18938
|
format: n,
|
|
18925
18939
|
size: t,
|
|
18926
18940
|
mode: r
|
|
18927
18941
|
}));
|
|
18928
|
-
await ut(100), o.push(
|
|
18942
|
+
await ut(100), o.push(xg("https://content.dropboxapi.com/2/files/get_thumbnail_batch", { entries: l }).then((e) => {
|
|
18929
18943
|
if (!e) return;
|
|
18930
18944
|
let n = e.entries.reduce((e, n, r) => {
|
|
18931
18945
|
let i = c[r].path, [a, o] = t.replace("w", "").split("h").map(Number), s = n;
|
|
@@ -18944,7 +18958,7 @@ var xg = async (e, t, n = {}) => {
|
|
|
18944
18958
|
}));
|
|
18945
18959
|
}
|
|
18946
18960
|
return Promise.all(o).then(() => a);
|
|
18947
|
-
},
|
|
18961
|
+
}, Ng = (e, t = "application/octet-stream", n = 512) => {
|
|
18948
18962
|
let r = atob(e), i = [];
|
|
18949
18963
|
for (let e = 0; e < r.length; e += n) {
|
|
18950
18964
|
let t = r.slice(e, e + n), a = Array(t.length);
|
|
@@ -18953,11 +18967,11 @@ var xg = async (e, t, n = {}) => {
|
|
|
18953
18967
|
i.push(o);
|
|
18954
18968
|
}
|
|
18955
18969
|
return new Blob(i, { type: t });
|
|
18956
|
-
},
|
|
18970
|
+
}, Pg = async (e, t) => {
|
|
18957
18971
|
try {
|
|
18958
18972
|
let n = t.split(",")[1];
|
|
18959
|
-
|
|
18960
|
-
path:
|
|
18973
|
+
bg("https://content.dropboxapi.com/2/files/upload", Ng(n, "application/octet-stream"), { "Dropbox-API-Arg": JSON.stringify({
|
|
18974
|
+
path: Sg(e),
|
|
18961
18975
|
mode: "overwrite",
|
|
18962
18976
|
autorename: !0,
|
|
18963
18977
|
mute: !1
|
|
@@ -18967,12 +18981,12 @@ var xg = async (e, t, n = {}) => {
|
|
|
18967
18981
|
} catch (e) {
|
|
18968
18982
|
console.error("Errore durante il caricamento su Dropbox:", e);
|
|
18969
18983
|
}
|
|
18970
|
-
},
|
|
18971
|
-
if (!
|
|
18984
|
+
}, Fg = (e = !1) => yg ? _i(yg.clientId, e) : !1, Ig = (e = {}) => {
|
|
18985
|
+
if (!yg) return /* @__PURE__ */ t.createElement("div", {
|
|
18972
18986
|
title: "DropBox: configurazione mancante. Recupera il \"Client ID\" accedendo a https://www.dropbox.com/developers, vai su \"App Console\", seleziona un'app esistente o chiedi il Client ID a chi ha configurato il sistema.",
|
|
18973
18987
|
className: "text-danger flex items-center gap-2"
|
|
18974
18988
|
}, /* @__PURE__ */ t.createElement(Q, { name: "warning" }), /* @__PURE__ */ t.createElement("span", null, "Dropbox non configurato"));
|
|
18975
|
-
let n =
|
|
18989
|
+
let n = Fg(!0);
|
|
18976
18990
|
return /* @__PURE__ */ t.createElement(Si, {
|
|
18977
18991
|
provider: "dropboxAuth",
|
|
18978
18992
|
intent: "connect",
|
|
@@ -18984,33 +18998,33 @@ var xg = async (e, t, n = {}) => {
|
|
|
18984
18998
|
title: n ? "DropBox Connected" : "DropBox Disconnected"
|
|
18985
18999
|
}
|
|
18986
19000
|
});
|
|
18987
|
-
},
|
|
19001
|
+
}, Lg = {
|
|
18988
19002
|
setRootPath: (e) => {
|
|
18989
|
-
|
|
19003
|
+
yg && (yg.rootPath = e);
|
|
18990
19004
|
},
|
|
18991
|
-
resolvePath:
|
|
18992
|
-
createFolders:
|
|
18993
|
-
deleteBulk:
|
|
18994
|
-
addTags:
|
|
18995
|
-
listFolders:
|
|
18996
|
-
getThumbnails:
|
|
18997
|
-
search:
|
|
18998
|
-
upload:
|
|
18999
|
-
copy:
|
|
19000
|
-
move:
|
|
19001
|
-
},
|
|
19005
|
+
resolvePath: Sg,
|
|
19006
|
+
createFolders: Tg,
|
|
19007
|
+
deleteBulk: Eg,
|
|
19008
|
+
addTags: Og,
|
|
19009
|
+
listFolders: kg,
|
|
19010
|
+
getThumbnails: Mg,
|
|
19011
|
+
search: Cg,
|
|
19012
|
+
upload: Pg,
|
|
19013
|
+
copy: Ag,
|
|
19014
|
+
move: jg
|
|
19015
|
+
}, Rg = "https://api.serpapi.com/search", zg = "google", Bg = "google_images", Vg = "google_autocomplete", Hg = "google_trends", Ug = "google_maps", Wg = "google_maps_photos", Gg = "google_maps_reviews", Kg = {
|
|
19002
19016
|
engine: null,
|
|
19003
19017
|
device: null,
|
|
19004
19018
|
no_cache: !1,
|
|
19005
19019
|
async: !1,
|
|
19006
19020
|
output: "json"
|
|
19007
|
-
},
|
|
19021
|
+
}, qg = { q: null }, Jg = {
|
|
19008
19022
|
tbs: null,
|
|
19009
19023
|
safe: "active",
|
|
19010
19024
|
nfpr: 0,
|
|
19011
19025
|
filter: 1
|
|
19012
19026
|
};
|
|
19013
|
-
function
|
|
19027
|
+
function Yg(e) {
|
|
19014
19028
|
let t = Rc(), n = Rc(!0), r = zc(!0), i = {
|
|
19015
19029
|
location: t,
|
|
19016
19030
|
uule: null
|
|
@@ -19028,13 +19042,13 @@ function Xg(e) {
|
|
|
19028
19042
|
hl: r
|
|
19029
19043
|
};
|
|
19030
19044
|
return {
|
|
19031
|
-
[
|
|
19032
|
-
...
|
|
19045
|
+
[zg]: {
|
|
19046
|
+
...Kg,
|
|
19033
19047
|
...i,
|
|
19034
19048
|
...o,
|
|
19035
|
-
...Yg,
|
|
19036
19049
|
...Jg,
|
|
19037
|
-
|
|
19050
|
+
...qg,
|
|
19051
|
+
engine: zg,
|
|
19038
19052
|
ludocid: null,
|
|
19039
19053
|
lsig: null,
|
|
19040
19054
|
kgmid: null,
|
|
@@ -19043,29 +19057,29 @@ function Xg(e) {
|
|
|
19043
19057
|
start: null,
|
|
19044
19058
|
num: null
|
|
19045
19059
|
},
|
|
19046
|
-
[
|
|
19047
|
-
...
|
|
19060
|
+
[Bg]: {
|
|
19061
|
+
...Kg,
|
|
19048
19062
|
...i,
|
|
19049
19063
|
...o,
|
|
19050
|
-
...Yg,
|
|
19051
19064
|
...Jg,
|
|
19052
|
-
|
|
19065
|
+
...qg,
|
|
19066
|
+
engine: Bg,
|
|
19053
19067
|
chips: null,
|
|
19054
19068
|
ijn: null
|
|
19055
19069
|
},
|
|
19056
|
-
[
|
|
19057
|
-
...
|
|
19070
|
+
[Vg]: {
|
|
19071
|
+
...Kg,
|
|
19058
19072
|
...o,
|
|
19059
|
-
...
|
|
19060
|
-
engine:
|
|
19073
|
+
...qg,
|
|
19074
|
+
engine: Vg,
|
|
19061
19075
|
cp: null,
|
|
19062
19076
|
client: null
|
|
19063
19077
|
},
|
|
19064
|
-
[
|
|
19065
|
-
...
|
|
19078
|
+
[Hg]: {
|
|
19079
|
+
...Kg,
|
|
19066
19080
|
...a,
|
|
19067
|
-
...
|
|
19068
|
-
engine:
|
|
19081
|
+
...qg,
|
|
19082
|
+
engine: Hg,
|
|
19069
19083
|
data_type: null,
|
|
19070
19084
|
tz: null,
|
|
19071
19085
|
cat: null,
|
|
@@ -19073,73 +19087,73 @@ function Xg(e) {
|
|
|
19073
19087
|
date: null,
|
|
19074
19088
|
csv: null
|
|
19075
19089
|
},
|
|
19076
|
-
[
|
|
19077
|
-
...
|
|
19090
|
+
[Ug]: {
|
|
19091
|
+
...Kg,
|
|
19078
19092
|
...i,
|
|
19079
19093
|
...o,
|
|
19080
|
-
...Yg,
|
|
19081
19094
|
...Jg,
|
|
19095
|
+
...qg,
|
|
19096
|
+
engine: Ug
|
|
19097
|
+
},
|
|
19098
|
+
[Wg]: {
|
|
19099
|
+
...Kg,
|
|
19100
|
+
...s,
|
|
19082
19101
|
engine: Wg
|
|
19083
19102
|
},
|
|
19084
19103
|
[Gg]: {
|
|
19085
|
-
...
|
|
19104
|
+
...Kg,
|
|
19086
19105
|
...s,
|
|
19087
19106
|
engine: Gg
|
|
19088
|
-
},
|
|
19089
|
-
[Kg]: {
|
|
19090
|
-
...qg,
|
|
19091
|
-
...s,
|
|
19092
|
-
engine: Kg
|
|
19093
19107
|
}
|
|
19094
19108
|
}[e] ?? {};
|
|
19095
19109
|
}
|
|
19096
|
-
var
|
|
19110
|
+
var Xg = void 0;
|
|
19097
19111
|
typeof wa == "function" && wa((e) => {
|
|
19098
|
-
|
|
19112
|
+
Xg = e.scrape;
|
|
19099
19113
|
});
|
|
19100
|
-
function
|
|
19114
|
+
function Zg(e) {
|
|
19101
19115
|
let t = {};
|
|
19102
19116
|
for (let n in e) e[n] !== null && (t[n] = e[n]);
|
|
19103
19117
|
return t;
|
|
19104
19118
|
}
|
|
19105
|
-
var
|
|
19106
|
-
function
|
|
19107
|
-
let t =
|
|
19108
|
-
return t.length === 0 ? null : (e &&
|
|
19119
|
+
var Qg = 0;
|
|
19120
|
+
function $g(e = !1) {
|
|
19121
|
+
let t = Xg?.serpApiKey?.split(",").map((e) => e.trim()).filter(Boolean) || [];
|
|
19122
|
+
return t.length === 0 ? null : (e && Qg++, Qg < t.length ? t[Qg] : null);
|
|
19109
19123
|
}
|
|
19110
|
-
var
|
|
19124
|
+
var e_ = async (e, t) => {
|
|
19111
19125
|
let n = (n) => {
|
|
19112
|
-
let r =
|
|
19113
|
-
...
|
|
19126
|
+
let r = Zg({
|
|
19127
|
+
...Yg(t),
|
|
19114
19128
|
api_key: n,
|
|
19115
19129
|
q: e
|
|
19116
19130
|
});
|
|
19117
|
-
return console.log(
|
|
19118
|
-
}, r =
|
|
19131
|
+
return console.log(Rg, r), `${Rg}?${new URLSearchParams(r)}`;
|
|
19132
|
+
}, r = $g();
|
|
19119
19133
|
for (; r;) try {
|
|
19120
19134
|
return await Wt(n(r));
|
|
19121
19135
|
} catch (e) {
|
|
19122
19136
|
if (e?.error === "quota_exceeded") {
|
|
19123
|
-
console.warn(`SerpApi: invalid api key: ${r}`, e), r =
|
|
19137
|
+
console.warn(`SerpApi: invalid api key: ${r}`, e), r = $g(!0);
|
|
19124
19138
|
continue;
|
|
19125
19139
|
}
|
|
19126
19140
|
throw console.error(`SerpApi: ${r}`, e), e;
|
|
19127
19141
|
}
|
|
19128
19142
|
return null;
|
|
19129
|
-
},
|
|
19143
|
+
}, t_ = async (e, t, n) => {
|
|
19130
19144
|
let r = `${ka}/${ct(t)}/${ct(e)}`, i = await n.read(r);
|
|
19131
19145
|
if (i) return i;
|
|
19132
|
-
let a = await
|
|
19146
|
+
let a = await e_(e, t);
|
|
19133
19147
|
return a ? n.set(r, a) : console.warn(`SerpApi ${t}: No Result`), a ?? {};
|
|
19134
|
-
},
|
|
19135
|
-
googleSearch: async (t) =>
|
|
19136
|
-
googleImages: async (t) =>
|
|
19137
|
-
googleAutocomplete: async (t) =>
|
|
19138
|
-
googleTrends: async (t) =>
|
|
19139
|
-
googleMaps: async (t) =>
|
|
19140
|
-
googleMapsPhotos: async (t) =>
|
|
19141
|
-
googleMapsReviews: async (t) =>
|
|
19142
|
-
}),
|
|
19148
|
+
}, n_ = (e) => ({
|
|
19149
|
+
googleSearch: async (t) => t_(t, zg, e),
|
|
19150
|
+
googleImages: async (t) => t_(t, Bg, e),
|
|
19151
|
+
googleAutocomplete: async (t) => t_(t, Vg, e),
|
|
19152
|
+
googleTrends: async (t) => t_(t, Hg, e),
|
|
19153
|
+
googleMaps: async (t) => t_(t, Ug, e),
|
|
19154
|
+
googleMapsPhotos: async (t) => t_(t, Wg, e),
|
|
19155
|
+
googleMapsReviews: async (t) => t_(t, Gg, e)
|
|
19156
|
+
}), r_ = {
|
|
19143
19157
|
"+": "+",
|
|
19144
19158
|
"﹢": "+",
|
|
19145
19159
|
"-": "-",
|
|
@@ -19214,7 +19228,7 @@ var t_ = async (e, t) => {
|
|
|
19214
19228
|
x: "x",
|
|
19215
19229
|
y: "y",
|
|
19216
19230
|
z: "z"
|
|
19217
|
-
},
|
|
19231
|
+
}, i_ = {
|
|
19218
19232
|
email: {
|
|
19219
19233
|
description: "Email: no spaces -> Lower/Trim",
|
|
19220
19234
|
transformations: [{
|
|
@@ -19260,7 +19274,7 @@ var t_ = async (e, t) => {
|
|
|
19260
19274
|
transformations: [],
|
|
19261
19275
|
mask: ["toSlug"]
|
|
19262
19276
|
}
|
|
19263
|
-
},
|
|
19277
|
+
}, a_ = [
|
|
19264
19278
|
{
|
|
19265
19279
|
pattern: "email*",
|
|
19266
19280
|
use: "email"
|
|
@@ -19277,24 +19291,24 @@ var t_ = async (e, t) => {
|
|
|
19277
19291
|
pattern: "date*",
|
|
19278
19292
|
use: "date"
|
|
19279
19293
|
}
|
|
19280
|
-
],
|
|
19281
|
-
function
|
|
19282
|
-
return e ? e.normalize("NFKC").replace(
|
|
19294
|
+
], o_ = new RegExp(Object.keys(r_).join("|"), "g");
|
|
19295
|
+
function s_(e) {
|
|
19296
|
+
return e ? e.normalize("NFKC").replace(o_, (e) => r_[e] ?? e) : "";
|
|
19283
19297
|
}
|
|
19284
|
-
var
|
|
19298
|
+
var c_ = class {
|
|
19285
19299
|
config;
|
|
19286
19300
|
matches;
|
|
19287
19301
|
constructor(e = {}, t = []) {
|
|
19288
19302
|
this.config = {
|
|
19289
|
-
...
|
|
19303
|
+
...i_,
|
|
19290
19304
|
...e
|
|
19291
|
-
}, this.matches = [...
|
|
19305
|
+
}, this.matches = [...a_, ...t];
|
|
19292
19306
|
}
|
|
19293
19307
|
apply(e, t, n = !1) {
|
|
19294
19308
|
let r = this.config[e];
|
|
19295
19309
|
if (!r) return n ? It(t) : t;
|
|
19296
19310
|
let i = t;
|
|
19297
|
-
i =
|
|
19311
|
+
i = s_(String(i ?? ""));
|
|
19298
19312
|
let a = r.exclusions;
|
|
19299
19313
|
if (Array.isArray(a) && a.length) {
|
|
19300
19314
|
let e = String(i).toLowerCase();
|
|
@@ -19353,7 +19367,7 @@ var l_ = class {
|
|
|
19353
19367
|
};
|
|
19354
19368
|
//#endregion
|
|
19355
19369
|
//#region src/libs/csv.ts
|
|
19356
|
-
function
|
|
19370
|
+
function l_(e, t) {
|
|
19357
19371
|
let n = Oe.parse(e, {
|
|
19358
19372
|
header: !0,
|
|
19359
19373
|
skipEmptyLines: !0,
|
|
@@ -19366,6 +19380,6 @@ function u_(e, t) {
|
|
|
19366
19380
|
};
|
|
19367
19381
|
}
|
|
19368
19382
|
//#endregion
|
|
19369
|
-
export { Qc as AIProvider,
|
|
19383
|
+
export { Qc as AIProvider, rg as AI_PROVIDER_DEFINITIONS, ag as AI_PROVIDER_DESCRIPTORS, Hr as ActionButton, Ef as AddressAutocomplete, Io as Alert, Vh as App, Bh as AppProvider, zi as AsyncDropdown, Si as AuthButton, ti as AuthProvider, Js as Autocomplete, sn as BUILT_IN_THEMES, nn as BUILT_IN_THEME_IDS, Ur as BackLink, Qn as Badge, Zn as BadgeOverlay, Ki as Brand, ea as Breadcrumbs, wl as CONTEXT_MENU_SEARCH_THRESHOLD, ji as Card, ta as Carousel, Gl as Chatbot, js as Checkbox, Ys as Checklist, Go as Code, Mu as CodeEditor, pu as CodeSyntaxError, Jn as Col, Ss as Color, nd as Component, rd as ComponentBlock, Kn as Container, Bl as ContextMenu, yc as CropImage, ap as DEFAULT_DOCUMENT_HEAD, ip as DEFAULT_HEAD_APP_NAME, op as DEFAULT_LANGUAGE_HEAD, Is as DEFAULT_ORDER, wi as DataProvider, Cs as Date, Ts as DateTime, Zh as DirectApiProviderAdapter, Ig as DropBoxConnectButton, Ym as DropboxAuthProvider, Ri as Dropdown, Bi as DropdownButton, Ui as DropdownDivider, Hi as DropdownHeader, Vi as DropdownItem, Wi as DropdownMenu, tg as EMAIL_PROVIDER_DEFINITIONS, bs as Email, xm as EmailProvider, hs as FieldError, Ec as FileNameEditor, $h as FirebaseApiProviderAdapter, Hm as FirebaseAuthProvider, Rm as FirebaseDataProvider, So as FirebaseStorageProvider, Ya as FirestoreDataProvider, jd as Form, gd as FormControllerContext, Kp as Gallery, Qm as GmailEmailProvider, Wr as GoSite, ym as GoogleAuthProvider, pf as GoogleMapsProvider, qm as GoogleServiceAccountProvider, sm as Grid, om as GridArray, am as GridCore, Hf as GridDB, qp as GridGalleryView, tp as GridTableView, Fp as Head, Cp as HeadProvider, As as Hidden, Pn as I18nProvider, Q as Icon, Sr as IconProvider, Gi as Image, ii as ImageAvatar, dc as ImageEditor, pc as ImageField, _s as Input, Ns as Label, df as LayoutBuilder, kf as ListCard, Fs as ListGroup, Ei as Loader, Vr as LoadingButton, qo as LocaleSwitcher, dr as LucideIconProvider, Up as MarkdownReader, Ii as Menu, Qh as MockApiProviderAdapter, go as MockDataProvider, Mi as Modal, Fi as ModalOk, Pi as ModalYesNo, Ds as Month, r_ as NORMALIZE_MAP, na as Notifications, ys as Number, og as OPENAI_COMPATIBLE_PROVIDER_DESCRIPTOR, zs as Order, ng as PUBLISH_PROVIDER_DEFINITIONS, cm as PageUsers, Gp as Pagination, xs as Password, $o as Percentage, mr as PhosphorIconProvider, ru as Prompt, Kl as PromptMode, Cl as PromptUtils, No as ProviderSwitcher, Os as Range, Gr as ReferSite, Hd as Repeat, ed as RichText, qn as Row, c_ as Sanitizer, ia as Search, qs as Select, zf as SideNav, cc as StorageProvider, vs as String, eg as SupabaseApiProviderAdapter, eh as SupabaseAuthProvider, co as SupabaseDataProvider, Co as SupabaseStorageProvider, Ms as Switch, Xd as Tab, Wp as TabDynamic, Jd as TabItem, qd as TabLayouts, $d as Table, Ps as TextArea, ma as ThemeSwitcher, ws as Time, sa as Toolbar, Df as UploadCSV, Pc as UploadDocument, Fc as UploadImage, ks as Url, Es as Week, Z as Wrapper, xt as arrayUnique, Et as arraysEqual, Tt as base64Encode, At as base64ToBlob, jt as base64ToUrl, qi as buildBreadcrumbSchema, Ll as buildTextCommandContext, Er as buttonBaseClass, kr as buttonDangerClass, Pr as buttonDarkClass, Mr as buttonInfoClass, Nr as buttonLightClass, zr as buttonLinkClass, Lr as buttonOutlineDangerClass, Fr as buttonOutlinePrimaryClass, Ir as buttonOutlineSecondaryClass, Rr as buttonOutlineSuccessClass, Dr as buttonPrimaryClass, Or as buttonSecondaryClass, Ar as buttonSuccessClass, jr as buttonWarningClass, Ra as callFirebaseFunction, ht as checkConditions, Nt as cleanRecord, X as cn, il as configureProxy, et as converter, it as copyToClipboard, gt as crc32, cg as createAIProviderRegistry, rr as createMotionTransition, En as createTranslations, rt as decodeJWT, Tn as defineLocaleMessages, lt as dirname, Lg as dropBox, ft as eventClosest, Wt as fetchJson, Ut as fetchRest, Gt as fetchWithRetry, ss as fieldAddonClass, is as fieldControlBaseClass, rs as fieldFeedbackClass, os as fieldGroupClass, ns as fieldLabelClass, as as fieldTextAreaBaseClass, Yc as formatAIModelRef, dt as generateUniqueId, gl as getAIModelCatalog, bi as getAccessToken, Pl as getAutoClosedSuffixLength, Cu as getCodeValidationResult, Nc as getFileUrl, Zr as getGlobalVars, hg as getGoogleTrendsData, gg as getGoogleTrendsRelated, mg as getKeywordIdeas, si as getProviderConfigurationState, Mt as getRecordValue, Wd as getTabLayoutConfig, Kd as getTabPaneClassName, Gd as getTabTriggerClassName, Xm as googleGetAccessToken, Nl as hasAutoClosedSuffix, Dn as interpolate, yt as intersectObjects, Yn as isBadgeDescriptor, St as isEmpty, Ot as isInteractiveElement, sl as isProxyEnabled, _f as loadGoogleMaps, vt as loadScripts, Jh as locales, Fl as matchCommandTrigger, Xn as normalizeBadgeProps, ct as normalizeKey, ot as normalizePath, s_ as normalizeVisualChars, Xc as parseAIModelRef, l_ as parseCsvText, ri as path, al as proxyFetch, Ft as recordsEqual, To as registerProviderSessionFactory, $r as removeGlobalVars, kt as render2Base64, mt as replacePlaceholders, bt as replaceVariables, ir as resolveMotionEffect, fu as runPrompt, wt as safeClone, Dt as sanitizeKey, n_ as scrape, Zm as sendEmail, Qr as setGlobalVars, ut as sleep, It as smartTypeCast, pt as substrCount, ig as toProviderDescriptor, at as trimPath, st as trimSlash, _t as ucfirst, $c as useAIProvider, el as useAIProviderRegistry, _i as useAccessToken, Yh as useApiProvider, Mp as useAssetsHead, ni as useAuthProvider, Tm as useCredentialsProvider, Ti as useDataProvider, jp as useDocumentHead, Fg as useDropBoxConnect, ts as useEditorHeight, Sm as useEmailProvider, cr as useEnterMotion, Dc as useFileUploadCore, vd as useFormActions, Dd as useFormContext, _d as useFormController, Xr as useGlobalVars, mf as useGoogleMapsConfig, Ep as useHead, Op as useHeadLinks, Fn as useI18n, wr as useIconController, Cr as useIconProvider, ec as useImage, Ap as useLanguageHead, Hh as useMenu, ar as useMotionEffect, or as useMotionState, kp as usePaginationHead, sr as usePressMotion, ya as useProvider, jo as useProviderSession, ol as useProxy, Np as usePwaHead, Pp as useSchemaOrgHead, va as useSetProvider, Dp as useSocialHead, lc as useStorageProvider, Y as useTheme, Cn as useThemeController, Su as validateCodeSyntax };
|
|
19370
19384
|
|
|
19371
19385
|
//# sourceMappingURL=index.mjs.map
|