@llmnative/react 1.40.0 → 1.42.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 +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +542 -497
- package/dist/index.mjs.map +1 -1
- package/dist/{modelIdentity-D93fYZOo.mjs → modelIdentity-7FU6Fu1c.mjs} +3 -1
- package/dist/modelIdentity-7FU6Fu1c.mjs.map +1 -0
- package/dist/modelIdentity-IPIcwgh4.js +2 -0
- package/dist/modelIdentity-IPIcwgh4.js.map +1 -0
- package/dist/{server-BFQ0FDEk.js → server-CI-At3yx.js} +2 -2
- package/dist/{server-BFQ0FDEk.js.map → server-CI-At3yx.js.map} +1 -1
- package/dist/{server-BYI2zjyG.mjs → server-CnxXTZU9.mjs} +2 -2
- package/dist/{server-BYI2zjyG.mjs.map → server-CnxXTZU9.mjs.map} +1 -1
- package/dist/server.js +1 -1
- package/dist/server.mjs +2 -2
- package/dist/types/src/Config.d.ts +2 -0
- package/dist/types/src/components/widgets/Form.d.ts +8 -0
- package/dist/types/src/providers/ai/opencode.d.ts +6 -0
- package/dist/types/src/providers/ai/opencodeGo.d.ts +3 -0
- package/dist/types/src/providers/ai/shared.d.ts +1 -1
- package/dist/types/src/providers/manifest.d.ts +1 -1
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/llms-full.txt +12 -1
- package/package.json +1 -1
- package/dist/modelIdentity-BEUaBIlb.js +0 -2
- package/dist/modelIdentity-BEUaBIlb.js.map +0 -1
- package/dist/modelIdentity-D93fYZOo.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, i as r, n as i, o as a, r as o, s, t as c, u as l } from "./modelIdentity-
|
|
1
|
+
import { a as e, c as t, d as n, i as r, n as i, o as a, r as o, s, t as c, u as l } from "./modelIdentity-7FU6Fu1c.mjs";
|
|
2
2
|
import { t as u } from "./logHeader-Busbc8OO.mjs";
|
|
3
3
|
import d, { Children as f, Fragment as p, Suspense as m, createContext as h, forwardRef as g, useCallback as _, useContext as v, useEffect as y, useId as b, useImperativeHandle as x, useLayoutEffect as S, useMemo as C, useRef as w, useState as T, useSyncExternalStore as E } from "react";
|
|
4
4
|
import { BrowserRouter as D, Link as O, Route as k, Routes as A, useLocation as j, useNavigate as M } from "react-router-dom";
|
|
@@ -4284,7 +4284,7 @@ var Vi = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
4284
4284
|
}))
|
|
4285
4285
|
}, e);
|
|
4286
4286
|
}, oa = ({ menuKey: e, as: t = "ul", badges: n = {}, before: r = void 0, after: i = void 0, wrapperClassName: a = void 0, className: o = void 0, headerClassName: s = void 0, itemClassName: c = void 0, linkClassName: l = void 0, iconClassName: u = void 0, textClassName: f = void 0, badgeClassName: p = void 0, arrowClassName: m = void 0, submenuClassName: h = void 0 }) => {
|
|
4287
|
-
let g =
|
|
4287
|
+
let g = Rv(e), _ = J("menu"), v = ({ item: e, index: r }) => {
|
|
4288
4288
|
let [i, a] = T(e.active);
|
|
4289
4289
|
y(() => {
|
|
4290
4290
|
a(e.active);
|
|
@@ -14361,62 +14361,62 @@ function xp(e) {
|
|
|
14361
14361
|
subscribe: (e) => (n.add(e), () => n.delete(e))
|
|
14362
14362
|
};
|
|
14363
14363
|
}
|
|
14364
|
-
var Sp = {}, Cp = ({ children: e, appearance: t = void 0, controller: n = void 0, header: r = void 0, footer: i = void 0, path: a = void 0, defaultValues: o = void 0, keyGenerator: s = void 0, onLoad: c = void 0, onRecordChange: l = void 0, onSave: u = void 0, onDelete: f = void 0, onComplete: p = void 0, log: m = !1, showNotice: h = !0,
|
|
14365
|
-
let
|
|
14366
|
-
|
|
14367
|
-
let
|
|
14368
|
-
if (!
|
|
14369
|
-
let e = yt(
|
|
14364
|
+
var Sp = {}, Cp = ({ children: e, appearance: t = void 0, controller: n = void 0, header: r = void 0, footer: i = void 0, path: a = void 0, defaultValues: o = void 0, keyGenerator: s = void 0, onLoad: c = void 0, onRecordChange: l = void 0, onSave: u = void 0, onDelete: f = void 0, onComplete: p = void 0, log: m = !1, showNotice: h = !0, requireChanges: g = !0, draftBucket: v = void 0, noticeAnchorRef: b = void 0, showBack: x = !1, wrapperClassName: S = void 0, headerClassName: D = void 0, className: O = void 0, footerClassName: k = void 0, formClassName: A = void 0 }) => {
|
|
14365
|
+
let M = j(), N = J("form"), P = Y("form"), F = zi(), I = rp(n), L = ep(I), R = w(void 0);
|
|
14366
|
+
R.current ||= xp(o);
|
|
14367
|
+
let z = R.current, B = E(z.subscribe, z.getRecord), V = z.setRecord, [U, W] = T(!1), [ee, te] = T(!1), ne = !o?.[uo], G = w(Ft(o ?? {})), [K, re] = T(() => yp(o)), [ie, ae] = T(null), oe = w({ isDirty: !1 }), se = C(() => {
|
|
14368
|
+
if (!v) return;
|
|
14369
|
+
let e = yt(v), t = yt(a || `${M.pathname}${M.hash || ""}`);
|
|
14370
14370
|
return e && t ? `llmnative.form-draft.${e}.${t}` : void 0;
|
|
14371
14371
|
}, [
|
|
14372
|
-
|
|
14373
|
-
|
|
14374
|
-
|
|
14372
|
+
v,
|
|
14373
|
+
M.pathname,
|
|
14374
|
+
M.hash,
|
|
14375
14375
|
a
|
|
14376
|
-
]),
|
|
14377
|
-
|
|
14378
|
-
}, [
|
|
14379
|
-
if (
|
|
14380
|
-
}, [
|
|
14381
|
-
|
|
14382
|
-
}, []), [
|
|
14383
|
-
h &&
|
|
14376
|
+
]), ce = !!(u || a || !ne), le = !(!f && ne), ue = C(() => !Kt(B, G.current), [B, G.current]), de = P.noChangesToSave ?? "No changes to save", fe = P.draftRestoreTitle ?? "Unsaved changes found", pe = P.draftRestoreMessage ?? "A local draft is available for this form. Restore it or discard it.", q = P.draftRestoreAction ?? "Restore", me = P.draftDiscardAction ?? "Discard", he = P.draftRestoredTitle ?? "Draft restored", ge = P.draftRestoredMessage ?? "The local draft has been restored. You can still discard it for a few seconds.", _e = _(() => {
|
|
14377
|
+
se && typeof localStorage < "u" && localStorage.removeItem(se);
|
|
14378
|
+
}, [se]), ve = _(() => {
|
|
14379
|
+
if (se && typeof localStorage < "u") return bp(localStorage.getItem(se));
|
|
14380
|
+
}, [se]), ye = _(() => {
|
|
14381
|
+
V(Ft(G.current));
|
|
14382
|
+
}, []), [be, xe] = T(void 0), Se = _(({ message: e, type: t = "danger" }) => {
|
|
14383
|
+
h && xe({
|
|
14384
14384
|
type: t,
|
|
14385
14385
|
message: e
|
|
14386
14386
|
});
|
|
14387
|
-
}, [h]), [
|
|
14388
|
-
|
|
14389
|
-
}, [
|
|
14390
|
-
let e =
|
|
14387
|
+
}, [h]), [Ce, we] = T({}), Te = w({}), Ee = w(null), De = w(B), Oe = w(o), ke = w(u), Ae = w(f), je = w(p), Me = w(a), Ne = w(m), Pe = _(() => {
|
|
14388
|
+
_e(), ye(), ae(null);
|
|
14389
|
+
}, [_e, ye]), Fe = _(() => {
|
|
14390
|
+
let e = ve();
|
|
14391
14391
|
if (!e) {
|
|
14392
|
-
|
|
14392
|
+
ae(null);
|
|
14393
14393
|
return;
|
|
14394
14394
|
}
|
|
14395
|
-
|
|
14396
|
-
}, [
|
|
14397
|
-
|
|
14398
|
-
}, [
|
|
14399
|
-
|
|
14400
|
-
}, []), Le = _((e) => {
|
|
14401
|
-
delete we.current[e];
|
|
14395
|
+
V(Ft(e)), ae("restored");
|
|
14396
|
+
}, [ve]), Ie = _(() => {
|
|
14397
|
+
we({}), xe(void 0), ae(null), ye();
|
|
14398
|
+
}, [ye]), Le = _((e, t) => {
|
|
14399
|
+
Te.current[e] = t;
|
|
14402
14400
|
}, []), Re = _((e) => {
|
|
14403
|
-
|
|
14401
|
+
delete Te.current[e];
|
|
14402
|
+
}, []), ze = _((e) => {
|
|
14403
|
+
we((t) => {
|
|
14404
14404
|
if (!t[e]) return t;
|
|
14405
14405
|
let { [e]: n, ...r } = t;
|
|
14406
14406
|
return r;
|
|
14407
14407
|
});
|
|
14408
|
-
}, []),
|
|
14408
|
+
}, []), Be = _(async () => {
|
|
14409
14409
|
let e = {};
|
|
14410
|
-
for (let [t, n] of Object.entries(
|
|
14410
|
+
for (let [t, n] of Object.entries(Te.current)) {
|
|
14411
14411
|
let { required: r, label: i, validator: a } = n.current, o = t.split(".").reduce((e, t) => {
|
|
14412
14412
|
if (e != null) {
|
|
14413
14413
|
if (Array.isArray(e)) return e[Number(t)];
|
|
14414
14414
|
if (typeof e == "object") return e[t];
|
|
14415
14415
|
}
|
|
14416
|
-
},
|
|
14416
|
+
}, De.current);
|
|
14417
14417
|
if (r && (o == null || typeof o == "string" && o.trim() === "" || Array.isArray(o) && o.length === 0)) {
|
|
14418
14418
|
let n = ul(i);
|
|
14419
|
-
e[t] = n ? Bn(
|
|
14419
|
+
e[t] = n ? Bn(P.requiredField, { field: n }) : P.requiredFieldGeneric;
|
|
14420
14420
|
continue;
|
|
14421
14421
|
}
|
|
14422
14422
|
if (a) {
|
|
@@ -14424,17 +14424,17 @@ var Sp = {}, Cp = ({ children: e, appearance: t = void 0, controller: n = void 0
|
|
|
14424
14424
|
n && (e[t] = n);
|
|
14425
14425
|
}
|
|
14426
14426
|
}
|
|
14427
|
-
if (
|
|
14427
|
+
if (we(e), Object.keys(e).length > 0) {
|
|
14428
14428
|
let t = Object.keys(e)[0];
|
|
14429
14429
|
requestAnimationFrame(() => {
|
|
14430
|
-
|
|
14430
|
+
Ee.current?.querySelector(`[name="${CSS.escape(t)}"]`)?.focus();
|
|
14431
14431
|
});
|
|
14432
14432
|
}
|
|
14433
14433
|
return Object.keys(e).length === 0;
|
|
14434
|
-
}, [
|
|
14434
|
+
}, [P]), Ve = _((e) => {
|
|
14435
14435
|
if (!a) return;
|
|
14436
14436
|
let t = vt(a);
|
|
14437
|
-
if (
|
|
14437
|
+
if (ne) return t.split("/").filter(Boolean).length % 2 == 0 && !s ? `/${t}` : `/${t}/${s?.(e) ?? Date.now().toString()}`;
|
|
14438
14438
|
let n = e[uo];
|
|
14439
14439
|
if (!n) return a;
|
|
14440
14440
|
let r = t.split("/").filter(Boolean);
|
|
@@ -14442,99 +14442,100 @@ var Sp = {}, Cp = ({ children: e, appearance: t = void 0, controller: n = void 0
|
|
|
14442
14442
|
}, [
|
|
14443
14443
|
a,
|
|
14444
14444
|
s,
|
|
14445
|
-
|
|
14446
|
-
]),
|
|
14447
|
-
if (
|
|
14445
|
+
ne
|
|
14446
|
+
]), He = _(async (e) => {
|
|
14447
|
+
if (Ne.current && Me.current && F) {
|
|
14448
14448
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = di("user");
|
|
14449
|
-
|
|
14449
|
+
F.set(`/log/${Me.current}/${yt(t)}`, {
|
|
14450
14450
|
user: n?.email ?? "unknown",
|
|
14451
14451
|
when: t,
|
|
14452
14452
|
action: e,
|
|
14453
|
-
record:
|
|
14453
|
+
record: De.current
|
|
14454
14454
|
});
|
|
14455
14455
|
}
|
|
14456
|
-
return
|
|
14457
|
-
message: e === "delete" ?
|
|
14456
|
+
return Se({
|
|
14457
|
+
message: e === "delete" ? P.deleteSuccess : P.saveSuccess,
|
|
14458
14458
|
type: "success"
|
|
14459
|
-
}), await
|
|
14460
|
-
record:
|
|
14459
|
+
}), await je.current?.({
|
|
14460
|
+
record: De.current,
|
|
14461
14461
|
action: e
|
|
14462
14462
|
}) ?? !0;
|
|
14463
14463
|
}, [
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
]),
|
|
14468
|
-
if (e?.preventDefault?.(), !
|
|
14469
|
-
message:
|
|
14464
|
+
F,
|
|
14465
|
+
Se,
|
|
14466
|
+
P
|
|
14467
|
+
]), Ue = _(async (e) => {
|
|
14468
|
+
if (e?.preventDefault?.(), g && !ue) return h && xe({
|
|
14469
|
+
message: de,
|
|
14470
14470
|
type: "info"
|
|
14471
14471
|
}), !1;
|
|
14472
14472
|
if (H(() => {
|
|
14473
|
-
|
|
14474
|
-
}), !await
|
|
14475
|
-
message:
|
|
14473
|
+
we({}), h && xe(void 0);
|
|
14474
|
+
}), !await Be()) return h && xe({
|
|
14475
|
+
message: P.noticeRequiredFields,
|
|
14476
14476
|
type: "warning"
|
|
14477
14477
|
}), !1;
|
|
14478
|
-
let t =
|
|
14479
|
-
|
|
14478
|
+
let t = ne ? "create" : "update";
|
|
14479
|
+
W(!0);
|
|
14480
14480
|
try {
|
|
14481
|
-
let e = (
|
|
14482
|
-
record:
|
|
14483
|
-
prevRecord:
|
|
14481
|
+
let e = (ke.current && await ke.current({
|
|
14482
|
+
record: De.current,
|
|
14483
|
+
prevRecord: Oe.current,
|
|
14484
14484
|
action: t,
|
|
14485
|
-
storagePath:
|
|
14486
|
-
})) ??
|
|
14487
|
-
return e && await
|
|
14485
|
+
storagePath: Me.current
|
|
14486
|
+
})) ?? Ve(De.current ?? {});
|
|
14487
|
+
return e && await F.set(e, Wt(De.current)), G.current = Ft(De.current ?? {}), re(yp(De.current)), _e(), ae(null), await He(t);
|
|
14488
14488
|
} finally {
|
|
14489
|
-
|
|
14489
|
+
W(!1);
|
|
14490
14490
|
}
|
|
14491
14491
|
}, [
|
|
14492
|
-
|
|
14493
|
-
Be,
|
|
14494
|
-
P,
|
|
14495
|
-
N.noticeRequiredFields,
|
|
14492
|
+
_e,
|
|
14496
14493
|
Ve,
|
|
14497
|
-
|
|
14498
|
-
|
|
14494
|
+
F,
|
|
14495
|
+
P.noticeRequiredFields,
|
|
14496
|
+
He,
|
|
14499
14497
|
ue,
|
|
14498
|
+
ne,
|
|
14499
|
+
de,
|
|
14500
|
+
g,
|
|
14500
14501
|
h,
|
|
14501
|
-
|
|
14502
|
-
]),
|
|
14503
|
-
e?.preventDefault?.(), h &&
|
|
14502
|
+
Be
|
|
14503
|
+
]), We = _(async (e) => {
|
|
14504
|
+
e?.preventDefault?.(), h && xe(void 0), te(!0);
|
|
14504
14505
|
try {
|
|
14505
|
-
let e = (
|
|
14506
|
-
return e && await
|
|
14506
|
+
let e = (Ae.current && await Ae.current({ record: De.current })) ?? Ve(De.current ?? {});
|
|
14507
|
+
return e && await F.remove(e), _e(), ae(null), await He("delete");
|
|
14507
14508
|
} finally {
|
|
14508
|
-
|
|
14509
|
+
te(!1);
|
|
14509
14510
|
}
|
|
14510
14511
|
}, [
|
|
14511
|
-
|
|
14512
|
-
Be,
|
|
14513
|
-
P,
|
|
14512
|
+
_e,
|
|
14514
14513
|
Ve,
|
|
14514
|
+
F,
|
|
14515
|
+
He,
|
|
14515
14516
|
h
|
|
14516
14517
|
]);
|
|
14517
14518
|
y(() => {
|
|
14518
14519
|
let e = Ft(o ?? {});
|
|
14519
|
-
if (o && (
|
|
14520
|
-
|
|
14520
|
+
if (o && (V(e), c?.(Ft(e))), G.current = e, re(yp(e)), !v) {
|
|
14521
|
+
ae(null);
|
|
14521
14522
|
return;
|
|
14522
14523
|
}
|
|
14523
|
-
let t =
|
|
14524
|
+
let t = ve();
|
|
14524
14525
|
if (t && yp(t) !== yp(e)) {
|
|
14525
|
-
|
|
14526
|
+
ae("restore");
|
|
14526
14527
|
return;
|
|
14527
14528
|
}
|
|
14528
|
-
|
|
14529
|
+
ae(null);
|
|
14529
14530
|
}, [
|
|
14530
14531
|
JSON.stringify(o),
|
|
14531
|
-
|
|
14532
|
+
v,
|
|
14532
14533
|
c,
|
|
14533
|
-
|
|
14534
|
+
ve
|
|
14534
14535
|
]), y(() => {
|
|
14535
|
-
|
|
14536
|
-
}, [
|
|
14537
|
-
|
|
14536
|
+
De.current = B, B !== void 0 && l?.(B);
|
|
14537
|
+
}, [B, l]), y(() => {
|
|
14538
|
+
Oe.current = o, ke.current = u, Ae.current = f, je.current = p, Me.current = a, Ne.current = m;
|
|
14538
14539
|
}, [
|
|
14539
14540
|
o,
|
|
14540
14541
|
m,
|
|
@@ -14543,215 +14544,216 @@ var Sp = {}, Cp = ({ children: e, appearance: t = void 0, controller: n = void 0
|
|
|
14543
14544
|
u,
|
|
14544
14545
|
a
|
|
14545
14546
|
]), y(() => {
|
|
14546
|
-
if (!
|
|
14547
|
-
if (!
|
|
14548
|
-
let e =
|
|
14549
|
-
if (e && yp(e) !==
|
|
14550
|
-
localStorage.removeItem(
|
|
14547
|
+
if (!se || typeof localStorage > "u" || B === void 0) return;
|
|
14548
|
+
if (!ue) {
|
|
14549
|
+
let e = ve();
|
|
14550
|
+
if (e && yp(e) !== K) return;
|
|
14551
|
+
localStorage.removeItem(se);
|
|
14551
14552
|
return;
|
|
14552
14553
|
}
|
|
14553
14554
|
let e = window.setTimeout(() => {
|
|
14554
14555
|
try {
|
|
14555
|
-
localStorage.setItem(
|
|
14556
|
+
localStorage.setItem(se, JSON.stringify(Wt(B)));
|
|
14556
14557
|
} catch {
|
|
14557
|
-
|
|
14558
|
+
Se({
|
|
14558
14559
|
type: "warning",
|
|
14559
|
-
message:
|
|
14560
|
+
message: P.draftSaveError ?? "Could not save a local draft — the change is too large for browser storage (e.g. an unsent image upload). Save the form to keep it."
|
|
14560
14561
|
});
|
|
14561
14562
|
}
|
|
14562
14563
|
}, 150);
|
|
14563
14564
|
return () => window.clearTimeout(e);
|
|
14564
14565
|
}, [
|
|
14565
|
-
|
|
14566
|
-
|
|
14567
|
-
|
|
14568
|
-
|
|
14569
|
-
|
|
14570
|
-
|
|
14566
|
+
K,
|
|
14567
|
+
se,
|
|
14568
|
+
ue,
|
|
14569
|
+
Se,
|
|
14570
|
+
ve,
|
|
14571
|
+
B
|
|
14571
14572
|
]), y(() => {
|
|
14572
|
-
|
|
14573
|
-
storageKey:
|
|
14574
|
-
record:
|
|
14575
|
-
isDirty:
|
|
14573
|
+
oe.current = {
|
|
14574
|
+
storageKey: se,
|
|
14575
|
+
record: B,
|
|
14576
|
+
isDirty: ue
|
|
14576
14577
|
};
|
|
14577
14578
|
}, [
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
|
|
14579
|
+
se,
|
|
14580
|
+
ue,
|
|
14581
|
+
B
|
|
14581
14582
|
]), y(() => () => {
|
|
14582
|
-
let { storageKey: e, record: t, isDirty: n } =
|
|
14583
|
+
let { storageKey: e, record: t, isDirty: n } = oe.current;
|
|
14583
14584
|
if (e && n && t && typeof localStorage < "u") try {
|
|
14584
14585
|
localStorage.setItem(e, JSON.stringify(Wt(t)));
|
|
14585
14586
|
} catch {}
|
|
14586
14587
|
}, []), y(() => {
|
|
14587
|
-
|
|
14588
|
-
save:
|
|
14589
|
-
delete:
|
|
14590
|
-
reset:
|
|
14591
|
-
restoreDraft:
|
|
14592
|
-
discardDraft:
|
|
14588
|
+
L.bindActions({
|
|
14589
|
+
save: Ue,
|
|
14590
|
+
delete: We,
|
|
14591
|
+
reset: Ie,
|
|
14592
|
+
restoreDraft: Fe,
|
|
14593
|
+
discardDraft: Pe
|
|
14593
14594
|
});
|
|
14594
14595
|
}, [
|
|
14595
|
-
|
|
14596
|
-
|
|
14596
|
+
L,
|
|
14597
|
+
Pe,
|
|
14598
|
+
We,
|
|
14597
14599
|
Ue,
|
|
14598
|
-
|
|
14599
|
-
Fe
|
|
14600
|
-
Pe
|
|
14600
|
+
Ie,
|
|
14601
|
+
Fe
|
|
14601
14602
|
]), y(() => {
|
|
14602
|
-
|
|
14603
|
-
record:
|
|
14604
|
-
isNewRecord:
|
|
14605
|
-
isDirty:
|
|
14606
|
-
canSave:
|
|
14607
|
-
canDelete:
|
|
14608
|
-
isSaving:
|
|
14609
|
-
isDeleting:
|
|
14610
|
-
saveDisabled: !
|
|
14611
|
-
deleteDisabled: !
|
|
14612
|
-
hasDraft:
|
|
14613
|
-
draftStatus:
|
|
14614
|
-
errors:
|
|
14615
|
-
hasErrors: Object.keys(
|
|
14603
|
+
L.setState({
|
|
14604
|
+
record: De.current,
|
|
14605
|
+
isNewRecord: ne,
|
|
14606
|
+
isDirty: ue,
|
|
14607
|
+
canSave: ce,
|
|
14608
|
+
canDelete: le,
|
|
14609
|
+
isSaving: U,
|
|
14610
|
+
isDeleting: ee,
|
|
14611
|
+
saveDisabled: !ce || g && !ue || U,
|
|
14612
|
+
deleteDisabled: !le || ee,
|
|
14613
|
+
hasDraft: ie !== null,
|
|
14614
|
+
draftStatus: ie,
|
|
14615
|
+
errors: Ce,
|
|
14616
|
+
hasErrors: Object.keys(Ce).length > 0
|
|
14616
14617
|
});
|
|
14617
14618
|
}, [
|
|
14618
|
-
ce,
|
|
14619
|
-
se,
|
|
14620
|
-
I,
|
|
14621
|
-
re,
|
|
14622
|
-
Se,
|
|
14623
|
-
W,
|
|
14624
14619
|
le,
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
|
|
14633
|
-
|
|
14634
|
-
|
|
14635
|
-
|
|
14620
|
+
ce,
|
|
14621
|
+
L,
|
|
14622
|
+
ie,
|
|
14623
|
+
Ce,
|
|
14624
|
+
ee,
|
|
14625
|
+
ue,
|
|
14626
|
+
ne,
|
|
14627
|
+
U,
|
|
14628
|
+
B,
|
|
14629
|
+
g
|
|
14630
|
+
]), y(() => () => tp(I), [L]);
|
|
14631
|
+
let Ge = _((e) => {
|
|
14632
|
+
e.defaultPrevented || !e.ctrlKey && !e.metaKey || e.key.toLowerCase() !== "s" || I.saveDisabled || (e.preventDefault(), I.save());
|
|
14633
|
+
}, [I]), Ke = C(() => ({
|
|
14634
|
+
registerField: Le,
|
|
14635
|
+
unregisterField: Re,
|
|
14636
|
+
clearFieldError: ze,
|
|
14637
|
+
errors: Ce
|
|
14636
14638
|
}), [
|
|
14637
|
-
Ie,
|
|
14638
14639
|
Le,
|
|
14639
14640
|
Re,
|
|
14640
|
-
|
|
14641
|
-
|
|
14642
|
-
|
|
14641
|
+
ze,
|
|
14642
|
+
Ce
|
|
14643
|
+
]), qe = C(() => ({
|
|
14644
|
+
store: z,
|
|
14643
14645
|
wrapperClassName: "mb-3"
|
|
14644
|
-
}), [
|
|
14646
|
+
}), [z]), Je = C(() => /* @__PURE__ */ d.createElement(np.Provider, { value: I }, /* @__PURE__ */ d.createElement(up.Provider, { value: qe }, /* @__PURE__ */ d.createElement(dp.Provider, { value: Ke }, typeof e == "function" ? e({ record: B }) : e))), [
|
|
14645
14647
|
e,
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
]),
|
|
14651
|
-
variant:
|
|
14652
|
-
appearance:
|
|
14653
|
-
placement:
|
|
14654
|
-
anchorRef:
|
|
14655
|
-
timeout:
|
|
14656
|
-
onClose:
|
|
14657
|
-
},
|
|
14658
|
-
if (!
|
|
14659
|
-
let e =
|
|
14648
|
+
I,
|
|
14649
|
+
qe,
|
|
14650
|
+
B,
|
|
14651
|
+
Ke
|
|
14652
|
+
]), Ye = C(() => be ? /* @__PURE__ */ d.createElement(ss, {
|
|
14653
|
+
variant: be.type,
|
|
14654
|
+
appearance: b ? "default" : "text",
|
|
14655
|
+
placement: b ? "sticky" : "inline",
|
|
14656
|
+
anchorRef: b,
|
|
14657
|
+
timeout: be.type === "success" ? 3e3 : void 0,
|
|
14658
|
+
onClose: be.type === "success" ? () => xe(void 0) : void 0
|
|
14659
|
+
}, be.message) : null, [be, b]), Xe = C(() => {
|
|
14660
|
+
if (!ie) return null;
|
|
14661
|
+
let e = ie === "restore" ? fe : he, t = ie === "restore" ? pe : ge;
|
|
14660
14662
|
return /* @__PURE__ */ d.createElement(ss, {
|
|
14661
|
-
variant:
|
|
14662
|
-
timeout:
|
|
14663
|
-
onClose:
|
|
14664
|
-
}, /* @__PURE__ */ d.createElement("div", { className: "flex items-start justify-between gap-3" }, /* @__PURE__ */ d.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ d.createElement("div", { className: "font-medium" }, e), /* @__PURE__ */ d.createElement("div", { className: "text-sm opacity-90" }, t)), /* @__PURE__ */ d.createElement("div", { className: "flex shrink-0 items-center gap-2" },
|
|
14665
|
-
label:
|
|
14663
|
+
variant: ie === "restore" ? "warning" : "info",
|
|
14664
|
+
timeout: ie === "restored" ? 6e3 : void 0,
|
|
14665
|
+
onClose: ie === "restored" ? () => ae(null) : void 0
|
|
14666
|
+
}, /* @__PURE__ */ d.createElement("div", { className: "flex items-start justify-between gap-3" }, /* @__PURE__ */ d.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ d.createElement("div", { className: "font-medium" }, e), /* @__PURE__ */ d.createElement("div", { className: "text-sm opacity-90" }, t)), /* @__PURE__ */ d.createElement("div", { className: "flex shrink-0 items-center gap-2" }, ie === "restore" ? /* @__PURE__ */ d.createElement(d.Fragment, null, /* @__PURE__ */ d.createElement(ni, {
|
|
14667
|
+
label: q,
|
|
14666
14668
|
variant: "warning",
|
|
14667
|
-
onClick: () =>
|
|
14669
|
+
onClick: () => Fe()
|
|
14668
14670
|
}), /* @__PURE__ */ d.createElement(ni, {
|
|
14669
|
-
label:
|
|
14671
|
+
label: me,
|
|
14670
14672
|
variant: "outline-secondary",
|
|
14671
|
-
onClick: () =>
|
|
14673
|
+
onClick: () => Pe()
|
|
14672
14674
|
})) : /* @__PURE__ */ d.createElement(ni, {
|
|
14673
|
-
label:
|
|
14675
|
+
label: me,
|
|
14674
14676
|
variant: "outline-secondary",
|
|
14675
|
-
onClick: () =>
|
|
14677
|
+
onClick: () => Pe()
|
|
14676
14678
|
}))));
|
|
14677
14679
|
}, [
|
|
14678
|
-
|
|
14680
|
+
Pe,
|
|
14681
|
+
me,
|
|
14682
|
+
ie,
|
|
14679
14683
|
q,
|
|
14680
|
-
re,
|
|
14681
14684
|
pe,
|
|
14682
14685
|
fe,
|
|
14683
|
-
|
|
14686
|
+
ge,
|
|
14684
14687
|
he,
|
|
14685
|
-
|
|
14686
|
-
|
|
14687
|
-
]), Xe = C(() => {
|
|
14688
|
+
Fe
|
|
14689
|
+
]), Ze = C(() => {
|
|
14688
14690
|
switch (t) {
|
|
14689
|
-
case "empty": return /* @__PURE__ */ d.createElement(d.Fragment, null,
|
|
14691
|
+
case "empty": return /* @__PURE__ */ d.createElement(d.Fragment, null, Xe, Je, Ye);
|
|
14690
14692
|
default: return /* @__PURE__ */ d.createElement(Gi, {
|
|
14691
14693
|
header: r || /* @__PURE__ */ d.createElement(wa, {
|
|
14692
|
-
rootItem:
|
|
14694
|
+
rootItem: ne ? P.headerAdd : P.headerEdit,
|
|
14693
14695
|
trail: a || void 0
|
|
14694
14696
|
}),
|
|
14695
|
-
footer: (i || !
|
|
14696
|
-
className: X(
|
|
14697
|
-
label:
|
|
14698
|
-
title:
|
|
14699
|
-
disabled:
|
|
14700
|
-
loading:
|
|
14701
|
-
onClick: (e) =>
|
|
14702
|
-
}), (f || !
|
|
14703
|
-
className:
|
|
14704
|
-
label:
|
|
14705
|
-
disabled:
|
|
14706
|
-
loading:
|
|
14707
|
-
onClick: (e) =>
|
|
14708
|
-
}),
|
|
14709
|
-
className:
|
|
14710
|
-
label:
|
|
14697
|
+
footer: (i || !ne || u || f || x || !!a) && /* @__PURE__ */ d.createElement(d.Fragment, null, i, Ye, (u || !!a || !ne) && /* @__PURE__ */ d.createElement(ti, {
|
|
14698
|
+
className: X(N.Form.buttonSaveClass, I.saveDisabled && "cursor-not-allowed opacity-50"),
|
|
14699
|
+
label: P.buttonSave,
|
|
14700
|
+
title: I.saveDisabled && !ue ? de : void 0,
|
|
14701
|
+
disabled: I.saveDisabled,
|
|
14702
|
+
loading: I.isSaving,
|
|
14703
|
+
onClick: (e) => I.save(e)
|
|
14704
|
+
}), (f || !ne) && /* @__PURE__ */ d.createElement(ti, {
|
|
14705
|
+
className: N.Form.buttonDeleteClass,
|
|
14706
|
+
label: P.buttonDelete,
|
|
14707
|
+
disabled: I.deleteDisabled,
|
|
14708
|
+
loading: I.isDeleting,
|
|
14709
|
+
onClick: (e) => I.delete(e)
|
|
14710
|
+
}), x && /* @__PURE__ */ d.createElement(ri, {
|
|
14711
|
+
className: N.Form.buttonBackClass,
|
|
14712
|
+
label: P.buttonBack
|
|
14711
14713
|
})),
|
|
14712
|
-
headerClassName:
|
|
14713
|
-
bodyClassName:
|
|
14714
|
-
footerClassName:
|
|
14715
|
-
}, /* @__PURE__ */ d.createElement(d.Fragment, null,
|
|
14714
|
+
headerClassName: D || N.Form.Card.headerClassName,
|
|
14715
|
+
bodyClassName: O || N.Form.Card.bodyClassName,
|
|
14716
|
+
footerClassName: k || N.Form.Card.footerClassName
|
|
14717
|
+
}, /* @__PURE__ */ d.createElement(d.Fragment, null, Xe, Je));
|
|
14716
14718
|
}
|
|
14717
14719
|
}, [
|
|
14718
14720
|
t,
|
|
14719
|
-
D,
|
|
14720
|
-
qe,
|
|
14721
|
-
N.buttonBack,
|
|
14722
|
-
N.buttonDelete,
|
|
14723
|
-
N.buttonSave,
|
|
14724
|
-
N.headerAdd,
|
|
14725
|
-
N.headerEdit,
|
|
14726
|
-
Ye,
|
|
14727
|
-
i,
|
|
14728
14721
|
O,
|
|
14729
|
-
|
|
14722
|
+
Je,
|
|
14723
|
+
P.buttonBack,
|
|
14724
|
+
P.buttonDelete,
|
|
14725
|
+
P.buttonSave,
|
|
14726
|
+
P.headerAdd,
|
|
14727
|
+
P.headerEdit,
|
|
14728
|
+
Xe,
|
|
14729
|
+
i,
|
|
14730
|
+
k,
|
|
14731
|
+
I,
|
|
14730
14732
|
r,
|
|
14731
|
-
|
|
14732
|
-
le,
|
|
14733
|
-
te,
|
|
14733
|
+
D,
|
|
14734
14734
|
ue,
|
|
14735
|
-
|
|
14735
|
+
ne,
|
|
14736
|
+
de,
|
|
14737
|
+
Ye,
|
|
14736
14738
|
f,
|
|
14737
14739
|
u,
|
|
14738
14740
|
a,
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
|
|
14742
|
-
|
|
14743
|
-
|
|
14744
|
-
|
|
14745
|
-
|
|
14741
|
+
x,
|
|
14742
|
+
N.Form.buttonDeleteClass,
|
|
14743
|
+
N.Form.buttonSaveClass,
|
|
14744
|
+
N.Form.buttonBackClass,
|
|
14745
|
+
N.Form.Card.bodyClassName,
|
|
14746
|
+
N.Form.Card.footerClassName,
|
|
14747
|
+
N.Form.Card.headerClassName
|
|
14746
14748
|
]);
|
|
14747
|
-
return /* @__PURE__ */ d.createElement(Z, { className:
|
|
14748
|
-
ref:
|
|
14749
|
-
className:
|
|
14749
|
+
return /* @__PURE__ */ d.createElement(Z, { className: S || N.Form.wrapperClassName }, /* @__PURE__ */ d.createElement("form", {
|
|
14750
|
+
ref: Ee,
|
|
14751
|
+
className: A,
|
|
14750
14752
|
noValidate: !0,
|
|
14751
14753
|
onSubmit: (e) => e.preventDefault(),
|
|
14752
|
-
onKeyDownCapture:
|
|
14753
|
-
onKeyDown:
|
|
14754
|
-
},
|
|
14754
|
+
onKeyDownCapture: Ge,
|
|
14755
|
+
onKeyDown: Ge
|
|
14756
|
+
}, Ze));
|
|
14755
14757
|
}, wp = "flex items-center justify-between gap-3 border-b border-border/50 px-3 py-2", Tp = "text-xs font-medium uppercase tracking-[0.14em] text-muted-foreground", Ep = "px-3 py-3", Dp = "h-7 w-7 rounded-md bg-transparent p-0 text-muted-foreground hover:bg-destructive/10 hover:text-destructive", Op = ({ name: e, children: t, onChange: n, onAdd: r, onRemove: i, className: a, layout: o = "horizontal", minItems: s = void 0, maxItems: c = void 0, label: l = void 0, labelPosition: u = "top", hideRemoveButton: f = !1, readOnly: p = !1 }) => {
|
|
14756
14758
|
let { value: m, handleChange: h } = pp({
|
|
14757
14759
|
name: e,
|
|
@@ -16119,7 +16121,7 @@ function Cm({ group: e, expanded: t, openItems: n, showIcons: r, onToggle: i })
|
|
|
16119
16121
|
}))));
|
|
16120
16122
|
}
|
|
16121
16123
|
function wm({ menuKey: e, items: t, bottomItems: n = [], defaultCollapsed: r = !1, collapsed: i, onCollapsedChange: a, showIcons: o = !0, showCollapseButton: s = !0, footer: c, header: l, embedded: u = !1 }) {
|
|
16122
|
-
let { pathname: f } = j(), p = J("sideNav"), m = Y("sideNav"), h =
|
|
16124
|
+
let { pathname: f } = j(), p = J("sideNav"), m = Y("sideNav"), h = Rv(e ?? ""), g = t ?? (e ? _m(h) : []), v = i !== void 0, [b, x] = T(r), S = i === void 0 ? b : i, C = _((e) => {
|
|
16123
16125
|
let t = typeof e == "function" ? e(S) : e;
|
|
16124
16126
|
v ? a?.(t) : x(t);
|
|
16125
16127
|
}, [
|
|
@@ -20193,47 +20195,88 @@ var Q_ = {
|
|
|
20193
20195
|
let t = await tn(rv, { headers: { Authorization: `Bearer ${e}` } }, Pu);
|
|
20194
20196
|
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).filter((e) => !lv(e));
|
|
20195
20197
|
},
|
|
20196
|
-
complete:
|
|
20197
|
-
|
|
20198
|
-
|
|
20199
|
-
|
|
20200
|
-
|
|
20201
|
-
|
|
20202
|
-
|
|
20203
|
-
|
|
20204
|
-
|
|
20205
|
-
|
|
20206
|
-
|
|
20207
|
-
|
|
20208
|
-
|
|
20209
|
-
|
|
20210
|
-
|
|
20211
|
-
|
|
20212
|
-
|
|
20213
|
-
|
|
20214
|
-
}
|
|
20215
|
-
|
|
20216
|
-
|
|
20217
|
-
|
|
20218
|
-
|
|
20219
|
-
|
|
20220
|
-
|
|
20221
|
-
|
|
20222
|
-
|
|
20223
|
-
|
|
20224
|
-
|
|
20225
|
-
|
|
20226
|
-
|
|
20227
|
-
|
|
20228
|
-
|
|
20229
|
-
|
|
20230
|
-
|
|
20231
|
-
|
|
20232
|
-
|
|
20233
|
-
|
|
20234
|
-
|
|
20235
|
-
}
|
|
20236
|
-
|
|
20198
|
+
complete: (e, t) => dv(iv, "OpenCode", e, t)
|
|
20199
|
+
};
|
|
20200
|
+
async function dv(e, t, n, r, i = {}) {
|
|
20201
|
+
let a = r.attachments ?? [], o = a.length > 0 ? a.map((e) => e.mimeType.startsWith("image/") ? {
|
|
20202
|
+
type: "image_url",
|
|
20203
|
+
image_url: { url: `data:${e.mimeType};base64,${e.base64}` }
|
|
20204
|
+
} : Qu.isTextAttachment(e.mimeType) ? {
|
|
20205
|
+
type: "text",
|
|
20206
|
+
text: `[File: ${e.name}]\n${Qu.decodeBase64Text(e.base64)}`
|
|
20207
|
+
} : {
|
|
20208
|
+
type: "text",
|
|
20209
|
+
text: `[File attached: ${e.name} (${e.mimeType})]`
|
|
20210
|
+
}).concat({
|
|
20211
|
+
type: "text",
|
|
20212
|
+
text: r.prompt
|
|
20213
|
+
}) : r.prompt, s = await tn(e, {
|
|
20214
|
+
method: "POST",
|
|
20215
|
+
headers: {
|
|
20216
|
+
Authorization: `Bearer ${n}`,
|
|
20217
|
+
...r.logId ? { [u]: r.logId } : {},
|
|
20218
|
+
...i
|
|
20219
|
+
},
|
|
20220
|
+
body: {
|
|
20221
|
+
model: r.model,
|
|
20222
|
+
messages: [
|
|
20223
|
+
...r.role ? [{
|
|
20224
|
+
role: "system",
|
|
20225
|
+
content: bu.parseRole(r.role, r)
|
|
20226
|
+
}] : [],
|
|
20227
|
+
...(r.history ?? []).flatMap(k_),
|
|
20228
|
+
...r.prompt ? [{
|
|
20229
|
+
role: "user",
|
|
20230
|
+
content: o
|
|
20231
|
+
}] : []
|
|
20232
|
+
],
|
|
20233
|
+
...r.tools?.length ? { tools: r.tools.map(D_) } : {},
|
|
20234
|
+
...typeof r.temperature == "number" ? { temperature: r.temperature } : {}
|
|
20235
|
+
},
|
|
20236
|
+
signal: r.signal
|
|
20237
|
+
}, Pu);
|
|
20238
|
+
if (!s) throw Bu(t);
|
|
20239
|
+
return A_(s);
|
|
20240
|
+
}
|
|
20241
|
+
//#endregion
|
|
20242
|
+
//#region src/providers/ai/opencodeGo.ts
|
|
20243
|
+
var fv = "https://opencode.ai/zen/go/v1/models", pv = "https://opencode.ai/zen/go/v1/chat/completions", mv = "x-opencode-session", hv = "kimi-k3", gv = [
|
|
20244
|
+
hv,
|
|
20245
|
+
"kimi-k3.1-pro",
|
|
20246
|
+
"glm-5.3",
|
|
20247
|
+
"glm-5.3-flash",
|
|
20248
|
+
"deepseek-v4.1-flash",
|
|
20249
|
+
"deepseek-v4-pro",
|
|
20250
|
+
"qwen3.8-max",
|
|
20251
|
+
"qwen3.8-flash",
|
|
20252
|
+
"minimax-m3",
|
|
20253
|
+
"claude-haiku-5-5",
|
|
20254
|
+
"gemini-4-argon"
|
|
20255
|
+
], _v = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `s-${Date.now()}-${Math.random().toString(36).slice(2)}`, vv = {
|
|
20256
|
+
id: "opencode-go",
|
|
20257
|
+
label: "OpenCode Go",
|
|
20258
|
+
description: "OpenCode Go — a monthly subscription to open and frontier coding models, with an API key.",
|
|
20259
|
+
configKey: "openCodeGoApiKey",
|
|
20260
|
+
defaultModel: hv,
|
|
20261
|
+
fallbackModels: gv,
|
|
20262
|
+
dashboardUrl: "https://opencode.ai/go",
|
|
20263
|
+
credentialsHint: "OpenCode Console → subscribe to Go → API key.",
|
|
20264
|
+
credentialFields: [{
|
|
20265
|
+
key: "apiKey",
|
|
20266
|
+
label: "API Key",
|
|
20267
|
+
type: "password"
|
|
20268
|
+
}],
|
|
20269
|
+
capabilities: {
|
|
20270
|
+
supportsTemperature: !0,
|
|
20271
|
+
supportsVision: !0,
|
|
20272
|
+
supportsDocuments: !0
|
|
20273
|
+
},
|
|
20274
|
+
discoverModels: async (e) => {
|
|
20275
|
+
let t = await tn(fv, { headers: { Authorization: `Bearer ${e}` } }, Pu);
|
|
20276
|
+
return (Array.isArray(t?.data) ? t.data : []).map((e) => e.id).filter((e) => typeof e == "string" && e.length > 0).filter((e) => !lv(e));
|
|
20277
|
+
},
|
|
20278
|
+
complete: (e, t) => dv(pv, "OpenCode Go", e, t, { [mv]: t.logId || _v() })
|
|
20279
|
+
}, yv = (e) => {
|
|
20237
20280
|
if (!e || typeof e != "object") return;
|
|
20238
20281
|
let { prompt: t, completion: n } = e, r = Number(t), i = Number(n);
|
|
20239
20282
|
if (t === void 0 || n === void 0 || !Number.isFinite(r) || !Number.isFinite(i) || r < 0 || i < 0) return;
|
|
@@ -20244,7 +20287,7 @@ var Q_ = {
|
|
|
20244
20287
|
currency: "USD",
|
|
20245
20288
|
source: "provider"
|
|
20246
20289
|
};
|
|
20247
|
-
},
|
|
20290
|
+
}, bv = j_({
|
|
20248
20291
|
id: "openrouter",
|
|
20249
20292
|
label: "OpenRouter",
|
|
20250
20293
|
description: "Unified access to many model providers through one API.",
|
|
@@ -20260,7 +20303,7 @@ var Q_ = {
|
|
|
20260
20303
|
credentialsHint: "OpenRouter → Settings → API Keys → Create Key.",
|
|
20261
20304
|
mapModelEntry: (e) => typeof e.id == "string" ? {
|
|
20262
20305
|
model: e.id,
|
|
20263
|
-
pricing:
|
|
20306
|
+
pricing: yv(e.pricing)
|
|
20264
20307
|
} : void 0,
|
|
20265
20308
|
validateApiKey: async (e) => {
|
|
20266
20309
|
try {
|
|
@@ -20282,7 +20325,7 @@ var Q_ = {
|
|
|
20282
20325
|
};
|
|
20283
20326
|
}
|
|
20284
20327
|
}
|
|
20285
|
-
}),
|
|
20328
|
+
}), xv = {
|
|
20286
20329
|
dbRealtime: {
|
|
20287
20330
|
service: "data",
|
|
20288
20331
|
create: () => new e_()
|
|
@@ -20299,7 +20342,7 @@ var Q_ = {
|
|
|
20299
20342
|
service: "auth",
|
|
20300
20343
|
create: () => new i_()
|
|
20301
20344
|
}
|
|
20302
|
-
},
|
|
20345
|
+
}, Sv = {
|
|
20303
20346
|
googleAuth: {
|
|
20304
20347
|
service: "auth",
|
|
20305
20348
|
create: () => new Fg()
|
|
@@ -20313,14 +20356,14 @@ var Q_ = {
|
|
|
20313
20356
|
create: (e) => new l_(e.serviceAccount),
|
|
20314
20357
|
when: (e) => !!e.serviceAccount
|
|
20315
20358
|
}
|
|
20316
|
-
},
|
|
20359
|
+
}, Cv = { dropboxAuth: {
|
|
20317
20360
|
service: "auth",
|
|
20318
20361
|
create: (e) => new d_(e)
|
|
20319
|
-
} },
|
|
20362
|
+
} }, wv = { githubAuth: {
|
|
20320
20363
|
service: "auth",
|
|
20321
20364
|
create: (e) => new p_(e),
|
|
20322
20365
|
when: (e) => !!e?.sessionUrl?.trim()
|
|
20323
|
-
} },
|
|
20366
|
+
} }, Tv = {
|
|
20324
20367
|
supabaseDb: {
|
|
20325
20368
|
service: "data",
|
|
20326
20369
|
create: (e) => new Po(e)
|
|
@@ -20333,29 +20376,30 @@ var Q_ = {
|
|
|
20333
20376
|
service: "auth",
|
|
20334
20377
|
create: (e) => new v_(e)
|
|
20335
20378
|
}
|
|
20336
|
-
},
|
|
20379
|
+
}, Ev = { mock: {
|
|
20337
20380
|
service: "data",
|
|
20338
20381
|
create: (e) => new Vo(e?.data)
|
|
20339
|
-
} },
|
|
20382
|
+
} }, Dv = (e, t) => ({
|
|
20340
20383
|
service: "ai",
|
|
20341
20384
|
create: (n) => new Ku(e, n?.[t] || ""),
|
|
20342
20385
|
when: (e) => !!e?.[t]
|
|
20343
|
-
}),
|
|
20344
|
-
firebase:
|
|
20345
|
-
google:
|
|
20346
|
-
dropbox:
|
|
20347
|
-
github:
|
|
20348
|
-
supabase:
|
|
20349
|
-
mock:
|
|
20386
|
+
}), Ov = {
|
|
20387
|
+
firebase: xv,
|
|
20388
|
+
google: Sv,
|
|
20389
|
+
dropbox: Cv,
|
|
20390
|
+
github: wv,
|
|
20391
|
+
supabase: Tv,
|
|
20392
|
+
mock: Ev,
|
|
20350
20393
|
ai: {
|
|
20351
|
-
openai:
|
|
20352
|
-
openrouter:
|
|
20353
|
-
opencode:
|
|
20354
|
-
|
|
20355
|
-
|
|
20356
|
-
|
|
20357
|
-
|
|
20358
|
-
|
|
20394
|
+
openai: Dv(nv, "openaiApiKey"),
|
|
20395
|
+
openrouter: Dv(bv, "openRouterApiKey"),
|
|
20396
|
+
opencode: Dv(uv, "openCodeApiKey"),
|
|
20397
|
+
"opencode-go": Dv(vv, "openCodeGoApiKey"),
|
|
20398
|
+
deepseek: Dv(K_, "deepSeekApiKey"),
|
|
20399
|
+
gemini: Dv(Q_, "geminiApiKey"),
|
|
20400
|
+
anthropic: Dv(w_, "anthropicApiKey"),
|
|
20401
|
+
mistral: Dv($_, "mistralApiKey"),
|
|
20402
|
+
groq: Dv(tv, "groqApiKey"),
|
|
20359
20403
|
cloudflare: {
|
|
20360
20404
|
service: "ai",
|
|
20361
20405
|
create: (e) => new Ku(W_({
|
|
@@ -20366,8 +20410,8 @@ var Q_ = {
|
|
|
20366
20410
|
when: (e) => !!e?.cloudflare?.apiToken?.trim() && !!e?.cloudflare?.accountId?.trim()
|
|
20367
20411
|
}
|
|
20368
20412
|
}
|
|
20369
|
-
},
|
|
20370
|
-
function
|
|
20413
|
+
}, kv = () => /* @__PURE__ */ d.createElement("div", { className: "flex min-h-[calc(100vh-4rem)] items-center justify-center" }, /* @__PURE__ */ d.createElement("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-muted border-t-primary" }));
|
|
20414
|
+
function Av(e, t) {
|
|
20371
20415
|
if (!t) return;
|
|
20372
20416
|
let n = t, r = typeof t == "object" && !Array.isArray(t) ? Object.entries(n) : [];
|
|
20373
20417
|
if (r.length > 0 && r.every(([, e]) => typeof e == "object" && !!e)) {
|
|
@@ -20376,10 +20420,10 @@ function Sv(e, t) {
|
|
|
20376
20420
|
}
|
|
20377
20421
|
e.custom = t;
|
|
20378
20422
|
}
|
|
20379
|
-
function
|
|
20423
|
+
function jv(e, t, n = "default") {
|
|
20380
20424
|
return t && e[t] ? t : Object.keys(e)[0] ?? n;
|
|
20381
20425
|
}
|
|
20382
|
-
function
|
|
20426
|
+
function Mv(e = {}) {
|
|
20383
20427
|
let t = {
|
|
20384
20428
|
data: {},
|
|
20385
20429
|
storage: {},
|
|
@@ -20388,24 +20432,24 @@ function wv(e = {}) {
|
|
|
20388
20432
|
ai: {},
|
|
20389
20433
|
credentials: {}
|
|
20390
20434
|
}, n = (e) => t[e] ??= {};
|
|
20391
|
-
for (let [t, r] of Object.entries(
|
|
20435
|
+
for (let [t, r] of Object.entries(Ov)) {
|
|
20392
20436
|
let i = e[t];
|
|
20393
20437
|
if (i !== void 0) for (let [e, t] of Object.entries(r)) (!t.when || t.when(i)) && (n(t.service)[e] = t.create(i));
|
|
20394
20438
|
}
|
|
20395
|
-
for (let [t, r] of Object.entries(e.custom ?? {}))
|
|
20439
|
+
for (let [t, r] of Object.entries(e.custom ?? {})) Av(n(t), r);
|
|
20396
20440
|
Object.keys(t.data).length === 0 && (t.data.mock = new Vo()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new Fg());
|
|
20397
20441
|
let r = e.services ?? {}, i = {};
|
|
20398
20442
|
for (let [e, n] of Object.entries(t)) i[e] = {
|
|
20399
20443
|
registry: n,
|
|
20400
|
-
defaultKey:
|
|
20444
|
+
defaultKey: jv(n, r[e])
|
|
20401
20445
|
};
|
|
20402
20446
|
return i;
|
|
20403
20447
|
}
|
|
20404
|
-
var
|
|
20405
|
-
|
|
20406
|
-
},
|
|
20407
|
-
function
|
|
20408
|
-
let [p, m] = T(() =>
|
|
20448
|
+
var Nv = {}, Pv = (e) => {
|
|
20449
|
+
Nv = e;
|
|
20450
|
+
}, Fv = (e) => Nv[e] || [];
|
|
20451
|
+
function Iv({ contextProviders: e, providers: t = {}, appName: n = "LLM Native", scrapeConfig: r, iconProvider: i, googleMaps: a, themeProvider: o, i18n: s, children: c, errorReportUrl: l, debug: u, basename: f }) {
|
|
20452
|
+
let [p, m] = T(() => Mv(t)), h = w(p);
|
|
20409
20453
|
h.current = p;
|
|
20410
20454
|
let g = w(void 0);
|
|
20411
20455
|
g.current ||= (async (e, t, n) => {
|
|
@@ -20446,8 +20490,8 @@ function Ov({ contextProviders: e, providers: t = {}, appName: n = "LLM Native",
|
|
|
20446
20490
|
setProvider: _
|
|
20447
20491
|
}, /* @__PURE__ */ d.createElement(hi, p.auth, /* @__PURE__ */ d.createElement(Bg, p.credentials, /* @__PURE__ */ d.createElement(Ri, p.data, /* @__PURE__ */ d.createElement(Pl, p.storage, /* @__PURE__ */ d.createElement(Lg, p.email, /* @__PURE__ */ d.createElement(Tu, p.ai, /* @__PURE__ */ d.createElement(Ir, { config: i }, /* @__PURE__ */ d.createElement(Qp, { config: a }, /* @__PURE__ */ d.createElement(ch, { appName: n }, /* @__PURE__ */ d.createElement(qn, { config: s }, /* @__PURE__ */ d.createElement(Pn, { config: o }, /* @__PURE__ */ d.createElement(v, null, c))))))))))))))));
|
|
20448
20492
|
}
|
|
20449
|
-
function
|
|
20450
|
-
|
|
20493
|
+
function Lv({ importPage: e, LayoutDefault: t = void 0, menuConfig: n = {}, children: r, ...i }) {
|
|
20494
|
+
Pv(n);
|
|
20451
20495
|
let a = ({ children: e }) => /* @__PURE__ */ d.createElement(d.Fragment, null, e), o = ({ pageSource: e, message: t }) => /* @__PURE__ */ d.createElement(ss, { variant: "warning" }, "Missing Page: ", e, t && /* @__PURE__ */ d.createElement("code", { className: "ml-2" }, t));
|
|
20452
20496
|
function s(n, r, s) {
|
|
20453
20497
|
let c = `./pages${r.component ? "/" + r.component : r.path === "/" ? "/Home" : dt.toCamel(r.path.split("*")[0])}.js`, l = r.page || d.lazy(() => e(c).then((e) => typeof e.default == "function" ? { default: e.default } : (console.warn(`⚠️ Invalid default export in ${c}`), { default: () => /* @__PURE__ */ d.createElement(o, { pageSource: c }) })).catch((e) => (console.error(`❌ Failed to load ${c}:`, e), { default: () => /* @__PURE__ */ d.createElement(o, {
|
|
@@ -20461,16 +20505,16 @@ function kv({ importPage: e, LayoutDefault: t = void 0, menuConfig: n = {}, chil
|
|
|
20461
20505
|
key: r.path,
|
|
20462
20506
|
reportUrl: i.errorReportUrl,
|
|
20463
20507
|
debug: i.debug
|
|
20464
|
-
}, /* @__PURE__ */ d.createElement(m, { fallback: /* @__PURE__ */ d.createElement(
|
|
20508
|
+
}, /* @__PURE__ */ d.createElement(m, { fallback: /* @__PURE__ */ d.createElement(kv, null) }, /* @__PURE__ */ d.createElement(l, null))))
|
|
20465
20509
|
});
|
|
20466
20510
|
}
|
|
20467
|
-
let c = (e) => Object.keys(e).flatMap((t) => e[t].flatMap((e, n) => [e.path && s(t, e, n), e.children && c({ children: e.children })].filter(Boolean))), l = (e, t) => e.some((e) => e.path === t || !!e.children && l(e.children, t)), u = Object.values(
|
|
20468
|
-
return /* @__PURE__ */ d.createElement(
|
|
20511
|
+
let c = (e) => Object.keys(e).flatMap((t) => e[t].flatMap((e, n) => [e.path && s(t, e, n), e.children && c({ children: e.children })].filter(Boolean))), l = (e, t) => e.some((e) => e.path === t || !!e.children && l(e.children, t)), u = Object.values(Nv).some((e) => l(e, "/")) ? {} : { default: [{ path: "/" }] };
|
|
20512
|
+
return /* @__PURE__ */ d.createElement(Iv, i, r, /* @__PURE__ */ d.createElement(A, null, /* @__PURE__ */ d.createElement(k, {
|
|
20469
20513
|
path: Si,
|
|
20470
20514
|
element: /* @__PURE__ */ d.createElement(ki, null)
|
|
20471
20515
|
}), /* @__PURE__ */ d.createElement(d.Fragment, null, c({
|
|
20472
20516
|
...u,
|
|
20473
|
-
...
|
|
20517
|
+
...Nv,
|
|
20474
20518
|
_auth: [{
|
|
20475
20519
|
path: "/users",
|
|
20476
20520
|
page: Cg,
|
|
@@ -20481,8 +20525,8 @@ function kv({ importPage: e, LayoutDefault: t = void 0, menuConfig: n = {}, chil
|
|
|
20481
20525
|
element: /* @__PURE__ */ d.createElement(wg, null)
|
|
20482
20526
|
})));
|
|
20483
20527
|
}
|
|
20484
|
-
var
|
|
20485
|
-
let t =
|
|
20528
|
+
var Rv = (e) => {
|
|
20529
|
+
let t = Fv(e), n = j(), r = (e) => e.map((e) => {
|
|
20486
20530
|
let t = n.pathname === e.path, i = e.children ? r(e.children) : [], a = t || i.some((e) => e.active);
|
|
20487
20531
|
return {
|
|
20488
20532
|
...e,
|
|
@@ -20491,7 +20535,7 @@ var Av = (e) => {
|
|
|
20491
20535
|
};
|
|
20492
20536
|
});
|
|
20493
20537
|
return C(() => r(t), [n.pathname]);
|
|
20494
|
-
},
|
|
20538
|
+
}, zv = {
|
|
20495
20539
|
common: {
|
|
20496
20540
|
save: "Salva",
|
|
20497
20541
|
cancel: "Annulla",
|
|
@@ -20835,7 +20879,7 @@ var Av = (e) => {
|
|
|
20835
20879
|
dataTable: "Dati del grafico",
|
|
20836
20880
|
sequence: "Sequenza"
|
|
20837
20881
|
}
|
|
20838
|
-
},
|
|
20882
|
+
}, Bv = {
|
|
20839
20883
|
common: {
|
|
20840
20884
|
save: "Speichern",
|
|
20841
20885
|
cancel: "Abbrechen",
|
|
@@ -21179,7 +21223,7 @@ var Av = (e) => {
|
|
|
21179
21223
|
dataTable: "Diagrammdaten",
|
|
21180
21224
|
sequence: "Abfolge"
|
|
21181
21225
|
}
|
|
21182
|
-
},
|
|
21226
|
+
}, Vv = {
|
|
21183
21227
|
common: {
|
|
21184
21228
|
save: "Сохранить",
|
|
21185
21229
|
cancel: "Отменить",
|
|
@@ -21523,7 +21567,7 @@ var Av = (e) => {
|
|
|
21523
21567
|
dataTable: "Данные диаграммы",
|
|
21524
21568
|
sequence: "Последовательность"
|
|
21525
21569
|
}
|
|
21526
|
-
},
|
|
21570
|
+
}, Hv = {
|
|
21527
21571
|
common: {
|
|
21528
21572
|
save: "保存",
|
|
21529
21573
|
cancel: "取消",
|
|
@@ -21867,7 +21911,7 @@ var Av = (e) => {
|
|
|
21867
21911
|
dataTable: "图表数据",
|
|
21868
21912
|
sequence: "顺序"
|
|
21869
21913
|
}
|
|
21870
|
-
},
|
|
21914
|
+
}, Uv = {
|
|
21871
21915
|
common: {
|
|
21872
21916
|
save: "حفظ",
|
|
21873
21917
|
cancel: "إلغاء",
|
|
@@ -22211,22 +22255,22 @@ var Av = (e) => {
|
|
|
22211
22255
|
dataTable: "بيانات المخطط",
|
|
22212
22256
|
sequence: "التسلسل"
|
|
22213
22257
|
}
|
|
22214
|
-
},
|
|
22215
|
-
ar: () =>
|
|
22216
|
-
de: () =>
|
|
22258
|
+
}, Wv = /* @__PURE__ */ at({
|
|
22259
|
+
ar: () => Uv,
|
|
22260
|
+
de: () => Bv,
|
|
22217
22261
|
en: () => Ln,
|
|
22218
|
-
it: () =>
|
|
22219
|
-
ru: () =>
|
|
22220
|
-
zh: () =>
|
|
22221
|
-
}),
|
|
22262
|
+
it: () => zv,
|
|
22263
|
+
ru: () => Vv,
|
|
22264
|
+
zh: () => Hv
|
|
22265
|
+
}), Gv = (e) => Wa("api", e);
|
|
22222
22266
|
//#endregion
|
|
22223
22267
|
//#region src/providers/api/direct.ts
|
|
22224
|
-
async function
|
|
22268
|
+
async function Kv(e) {
|
|
22225
22269
|
if (!e.ok) throw Error(`ApiProvider request failed: ${e.status} ${e.statusText}`);
|
|
22226
22270
|
let t = await e.text();
|
|
22227
22271
|
return t ? JSON.parse(t) : void 0;
|
|
22228
22272
|
}
|
|
22229
|
-
var
|
|
22273
|
+
var qv = class {
|
|
22230
22274
|
config;
|
|
22231
22275
|
constructor(e) {
|
|
22232
22276
|
this.config = e;
|
|
@@ -22241,7 +22285,7 @@ var zv = class {
|
|
|
22241
22285
|
...e.body,
|
|
22242
22286
|
...this.config.body
|
|
22243
22287
|
};
|
|
22244
|
-
return
|
|
22288
|
+
return Kv(await Pu(n.toString(), {
|
|
22245
22289
|
method: t,
|
|
22246
22290
|
headers: {
|
|
22247
22291
|
"Content-Type": "application/json",
|
|
@@ -22250,7 +22294,7 @@ var zv = class {
|
|
|
22250
22294
|
body: t === "GET" || t === "HEAD" ? void 0 : JSON.stringify(r)
|
|
22251
22295
|
}));
|
|
22252
22296
|
}
|
|
22253
|
-
},
|
|
22297
|
+
}, Jv = class {
|
|
22254
22298
|
resolver;
|
|
22255
22299
|
constructor(e) {
|
|
22256
22300
|
this.resolver = e;
|
|
@@ -22258,7 +22302,7 @@ var zv = class {
|
|
|
22258
22302
|
async fetch(e) {
|
|
22259
22303
|
return this.resolver(e);
|
|
22260
22304
|
}
|
|
22261
|
-
},
|
|
22305
|
+
}, Yv = class {
|
|
22262
22306
|
config;
|
|
22263
22307
|
constructor(e) {
|
|
22264
22308
|
this.config = e;
|
|
@@ -22269,7 +22313,7 @@ var zv = class {
|
|
|
22269
22313
|
request: e
|
|
22270
22314
|
}, void 0, this.config.region);
|
|
22271
22315
|
}
|
|
22272
|
-
},
|
|
22316
|
+
}, Xv = class {
|
|
22273
22317
|
config;
|
|
22274
22318
|
constructor(e) {
|
|
22275
22319
|
this.config = e;
|
|
@@ -22282,7 +22326,7 @@ var zv = class {
|
|
|
22282
22326
|
if (n) throw n;
|
|
22283
22327
|
return t;
|
|
22284
22328
|
}
|
|
22285
|
-
},
|
|
22329
|
+
}, Zv = [
|
|
22286
22330
|
{
|
|
22287
22331
|
id: "resend",
|
|
22288
22332
|
label: "Resend",
|
|
@@ -22393,7 +22437,7 @@ var zv = class {
|
|
|
22393
22437
|
],
|
|
22394
22438
|
credentialsHint: "Ask your mail host or hosting provider for the SMTP host, port, and credentials."
|
|
22395
22439
|
}
|
|
22396
|
-
],
|
|
22440
|
+
], Qv = [
|
|
22397
22441
|
{
|
|
22398
22442
|
id: "cloudflare_pages",
|
|
22399
22443
|
label: "Cloudflare Pages",
|
|
@@ -22623,10 +22667,11 @@ var zv = class {
|
|
|
22623
22667
|
description: "No vendor — packages the build as a downloadable archive for self-hosting anywhere else.",
|
|
22624
22668
|
credentialFields: []
|
|
22625
22669
|
}
|
|
22626
|
-
],
|
|
22670
|
+
], $v = [
|
|
22627
22671
|
nv,
|
|
22628
|
-
|
|
22672
|
+
bv,
|
|
22629
22673
|
uv,
|
|
22674
|
+
vv,
|
|
22630
22675
|
K_,
|
|
22631
22676
|
Q_,
|
|
22632
22677
|
w_,
|
|
@@ -22649,7 +22694,7 @@ var zv = class {
|
|
|
22649
22694
|
credentialsHint: "Zhipu BigModel → User Center → API Keys → Create Key."
|
|
22650
22695
|
}),
|
|
22651
22696
|
tv
|
|
22652
|
-
],
|
|
22697
|
+
], ey = (e) => ({
|
|
22653
22698
|
id: e.id,
|
|
22654
22699
|
label: e.label,
|
|
22655
22700
|
description: e.description ?? "",
|
|
@@ -22660,7 +22705,7 @@ var zv = class {
|
|
|
22660
22705
|
}],
|
|
22661
22706
|
credentialsUrl: e.dashboardUrl,
|
|
22662
22707
|
credentialsHint: e.credentialsHint
|
|
22663
|
-
}),
|
|
22708
|
+
}), ty = [...$v.map(ey), G_], ny = {
|
|
22664
22709
|
id: "openai-compatible",
|
|
22665
22710
|
label: "OpenAI-compatible",
|
|
22666
22711
|
description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
|
|
@@ -22674,7 +22719,7 @@ var zv = class {
|
|
|
22674
22719
|
type: "text",
|
|
22675
22720
|
placeholder: "https://api.example.com/v1"
|
|
22676
22721
|
}]
|
|
22677
|
-
},
|
|
22722
|
+
}, ry = (e) => {
|
|
22678
22723
|
let t = [], n = e?.cloudflare?.accountId?.trim();
|
|
22679
22724
|
n && t.push(W_({
|
|
22680
22725
|
accountId: n,
|
|
@@ -22694,10 +22739,10 @@ var zv = class {
|
|
|
22694
22739
|
modelsUrl: e?.openAICompatible?.modelsUrl?.trim() || void 0,
|
|
22695
22740
|
chatCompletionsUrl: e?.openAICompatible?.chatCompletionsUrl?.trim() || void 0
|
|
22696
22741
|
})] : t;
|
|
22697
|
-
},
|
|
22742
|
+
}, iy = (e) => e ? [...$v, ...ry(e)].reduce((t, n) => {
|
|
22698
22743
|
let r = n.id === "openai-compatible" ? e.openAICompatible?.apiKey?.trim() || "" : n.id === "cloudflare" ? e.cloudflare?.apiToken?.trim() || "" : typeof n.configKey == "string" && typeof e[n.configKey] == "string" ? String(e[n.configKey] || "").trim() : "";
|
|
22699
22744
|
return r && (t[n.id] = new Ku(n, r)), t;
|
|
22700
|
-
}, {}) : {},
|
|
22745
|
+
}, {}) : {}, ay = (e, { scope: t }) => iy(e.reduce((e, r) => {
|
|
22701
22746
|
let i = n(t, r.id);
|
|
22702
22747
|
if (r.id === "openai-compatible") return r.baseUrl ? {
|
|
22703
22748
|
...e,
|
|
@@ -22715,37 +22760,37 @@ var zv = class {
|
|
|
22715
22760
|
accountId: r.accountId
|
|
22716
22761
|
}
|
|
22717
22762
|
} : e;
|
|
22718
|
-
let a =
|
|
22763
|
+
let a = $v.find((e) => e.id === r.id)?.configKey;
|
|
22719
22764
|
return a ? {
|
|
22720
22765
|
...e,
|
|
22721
22766
|
[a]: i
|
|
22722
22767
|
} : e;
|
|
22723
|
-
}, {})),
|
|
22768
|
+
}, {})), oy = void 0;
|
|
22724
22769
|
typeof Ya == "function" && Ya((e) => {
|
|
22725
|
-
|
|
22770
|
+
oy = e.google;
|
|
22726
22771
|
});
|
|
22727
|
-
var
|
|
22772
|
+
var sy = {
|
|
22728
22773
|
ita: "geoTargetConstants/2380",
|
|
22729
22774
|
rome: "geoTargetConstants/1033236",
|
|
22730
22775
|
mil: "geoTargetConstants/1033239",
|
|
22731
22776
|
nap: "geoTargetConstants/1033245",
|
|
22732
22777
|
tor: "geoTargetConstants/1033247"
|
|
22733
|
-
},
|
|
22778
|
+
}, cy = {
|
|
22734
22779
|
it: "languageConstants/1000",
|
|
22735
22780
|
en: "languageConstants/1001",
|
|
22736
22781
|
fr: "languageConstants/1002",
|
|
22737
22782
|
es: "languageConstants/1003",
|
|
22738
22783
|
de: "languageConstants/1005"
|
|
22739
22784
|
};
|
|
22740
|
-
function
|
|
22741
|
-
return
|
|
22785
|
+
function ly(e) {
|
|
22786
|
+
return sy[e.toLowerCase()] || "geoTargetConstants/2380";
|
|
22742
22787
|
}
|
|
22743
|
-
function
|
|
22744
|
-
return
|
|
22788
|
+
function uy(e) {
|
|
22789
|
+
return cy[e.toLowerCase()] || "languageConstants/1000";
|
|
22745
22790
|
}
|
|
22746
|
-
async function
|
|
22747
|
-
if (!
|
|
22748
|
-
let i = await m_(["https://www.googleapis.com/auth/adwords"]), a =
|
|
22791
|
+
async function dy({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", languageCode: r = "it" }) {
|
|
22792
|
+
if (!oy?.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"), [];
|
|
22793
|
+
let i = await m_(["https://www.googleapis.com/auth/adwords"]), a = ly(n), o = uy(r), s = `https://googleads.googleapis.com/v13/customers/${t}:generateKeywordIdeas`, c = {
|
|
22749
22794
|
keywordSeed: { keywords: [e] },
|
|
22750
22795
|
geoTargetConstants: [a],
|
|
22751
22796
|
language: o
|
|
@@ -22753,7 +22798,7 @@ async function ry({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
22753
22798
|
method: "POST",
|
|
22754
22799
|
headers: {
|
|
22755
22800
|
Authorization: `Bearer ${i}`,
|
|
22756
|
-
"developer-token":
|
|
22801
|
+
"developer-token": oy.developerToken,
|
|
22757
22802
|
"Content-Type": "application/json"
|
|
22758
22803
|
},
|
|
22759
22804
|
body: JSON.stringify(c)
|
|
@@ -22771,7 +22816,7 @@ async function ry({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
22771
22816
|
}
|
|
22772
22817
|
//#endregion
|
|
22773
22818
|
//#region src/providers/seo/google/trend.ts
|
|
22774
|
-
async function
|
|
22819
|
+
async function fy(e, t = "IT", n = "today 12-m") {
|
|
22775
22820
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
22776
22821
|
comparisonItem: [{
|
|
22777
22822
|
keyword: e,
|
|
@@ -22791,7 +22836,7 @@ async function iy(e, t = "IT", n = "today 12-m") {
|
|
|
22791
22836
|
}))
|
|
22792
22837
|
};
|
|
22793
22838
|
}
|
|
22794
|
-
async function
|
|
22839
|
+
async function py(e, t = "IT", n = "today 12-m") {
|
|
22795
22840
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
22796
22841
|
comparisonItem: [{
|
|
22797
22842
|
keyword: e,
|
|
@@ -22817,13 +22862,13 @@ async function ay(e, t = "IT", n = "today 12-m") {
|
|
|
22817
22862
|
}
|
|
22818
22863
|
//#endregion
|
|
22819
22864
|
//#region src/providers/storage/dropbox.tsx
|
|
22820
|
-
var
|
|
22865
|
+
var my = 5e3, hy = "https://www.dropbox.com/home", gy = void 0;
|
|
22821
22866
|
typeof Ya == "function" && Ya((e) => {
|
|
22822
|
-
|
|
22867
|
+
gy = e.dropbox;
|
|
22823
22868
|
});
|
|
22824
|
-
var
|
|
22825
|
-
if (!
|
|
22826
|
-
let r = await Pi(
|
|
22869
|
+
var _y = async (e, t, n = {}) => {
|
|
22870
|
+
if (!gy) return console.error("DropBox: Config not found"), null;
|
|
22871
|
+
let r = await Pi(gy.clientId);
|
|
22827
22872
|
if (!r) throw Error("DropBox: Access token not found");
|
|
22828
22873
|
return await fetch(e, {
|
|
22829
22874
|
method: "POST",
|
|
@@ -22836,12 +22881,12 @@ var ly = async (e, t, n = {}) => {
|
|
|
22836
22881
|
}).catch((e) => (console.error("There was a problem with the fetch operation:", e), null)).finally(() => {
|
|
22837
22882
|
console.log("DropBox: Fetch operation completed");
|
|
22838
22883
|
});
|
|
22839
|
-
},
|
|
22840
|
-
if (!
|
|
22884
|
+
}, vy = async (e, t, n = {}) => {
|
|
22885
|
+
if (!gy) {
|
|
22841
22886
|
console.error("DropBox: Config not found");
|
|
22842
22887
|
return;
|
|
22843
22888
|
}
|
|
22844
|
-
let r = await Pi(
|
|
22889
|
+
let r = await Pi(gy.clientId);
|
|
22845
22890
|
if (!r) {
|
|
22846
22891
|
console.error("DropBox: Access token not found");
|
|
22847
22892
|
return;
|
|
@@ -22866,47 +22911,47 @@ var ly = async (e, t, n = {}) => {
|
|
|
22866
22911
|
}).finally(() => {
|
|
22867
22912
|
console.log("DropBox: Fetch operation completed", e, t);
|
|
22868
22913
|
});
|
|
22869
|
-
},
|
|
22870
|
-
let n =
|
|
22871
|
-
return (t ?
|
|
22872
|
-
},
|
|
22914
|
+
}, yy = (e, t = !1) => {
|
|
22915
|
+
let n = gy?.rootPath || "";
|
|
22916
|
+
return (t ? hy : "") + (e.startsWith(n) ? e : n + e);
|
|
22917
|
+
}, by = async (e, t = "", n = !1) => {
|
|
22873
22918
|
let r = {};
|
|
22874
|
-
return (await
|
|
22919
|
+
return (await Py.listFolders({
|
|
22875
22920
|
path: `${e + t}`,
|
|
22876
22921
|
recursive: !0
|
|
22877
22922
|
})).forEach((e) => {
|
|
22878
22923
|
e[".tag"] !== "folder" && (r[n ? _i.changeFilename(e.path_display, { ext: "" }) : e.path_display] = e.name);
|
|
22879
22924
|
}), r;
|
|
22880
|
-
},
|
|
22925
|
+
}, xy = async (e, t) => {
|
|
22881
22926
|
if (!e.async_job_id) return Promise.reject(e);
|
|
22882
22927
|
let n, r = !0;
|
|
22883
|
-
for (; r;) await xt(100), n = await
|
|
22928
|
+
for (; r;) await xt(100), n = await vy(`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);
|
|
22884
22929
|
return n?.[".tag"] === "complete" ? Promise.resolve(n.entries) : Promise.reject(n);
|
|
22885
|
-
},
|
|
22886
|
-
let n = "files/create_folder_batch", r = await
|
|
22930
|
+
}, Sy = async (e, t = "") => {
|
|
22931
|
+
let n = "files/create_folder_batch", r = await vy(`https://api.dropboxapi.com/2/${n}`, {
|
|
22887
22932
|
autorename: !1,
|
|
22888
22933
|
force_async: !0,
|
|
22889
|
-
paths: e.map((e) =>
|
|
22934
|
+
paths: e.map((e) => yy(t + e))
|
|
22890
22935
|
});
|
|
22891
|
-
return r ?
|
|
22892
|
-
},
|
|
22893
|
-
let n = "files/create_folder_batch", r = await
|
|
22894
|
-
return r ?
|
|
22895
|
-
},
|
|
22936
|
+
return r ? xy(r, n) : void 0;
|
|
22937
|
+
}, Cy = async (e, t = "") => {
|
|
22938
|
+
let n = "files/create_folder_batch", r = await vy(`https://api.dropboxapi.com/2/${n}`, { entries: e.map((e) => ({ path: yy(t + e) })) });
|
|
22939
|
+
return r ? xy(r, n) : void 0;
|
|
22940
|
+
}, wy = async (e, t) => vy("https://api.dropboxapi.com/2/files/tags/add", {
|
|
22896
22941
|
path: e,
|
|
22897
22942
|
tag_text: t.toLowerCase().replaceAll(/[^a-z0-9]/g, "")
|
|
22898
|
-
}),
|
|
22899
|
-
for (let n in e) for (let r of e[n]) await
|
|
22900
|
-
},
|
|
22901
|
-
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await
|
|
22943
|
+
}), Ty = async (e, t = "") => {
|
|
22944
|
+
for (let n in e) for (let r of e[n]) await wy(yy(t + n), r);
|
|
22945
|
+
}, Ey = async ({ path: e = "", recursive: t = !1 } = {}) => {
|
|
22946
|
+
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await vy("https://api.dropboxapi.com/2/files/list_folder", {
|
|
22902
22947
|
include_deleted: !1,
|
|
22903
22948
|
include_has_explicit_shared_members: !1,
|
|
22904
22949
|
include_media_info: !1,
|
|
22905
22950
|
include_mounted_folders: !0,
|
|
22906
22951
|
include_non_downloadable_files: !0,
|
|
22907
|
-
path:
|
|
22952
|
+
path: yy(e),
|
|
22908
22953
|
recursive: n
|
|
22909
|
-
}) : await
|
|
22954
|
+
}) : await vy("https://api.dropboxapi.com/2/files/list_folder/continue", { cursor: t }), i = {
|
|
22910
22955
|
has_more: !0,
|
|
22911
22956
|
cursor: "",
|
|
22912
22957
|
entries: []
|
|
@@ -22919,44 +22964,44 @@ var ly = async (e, t, n = {}) => {
|
|
|
22919
22964
|
recursive: t
|
|
22920
22965
|
}), i && n.push(...i.entries);
|
|
22921
22966
|
return n;
|
|
22922
|
-
},
|
|
22923
|
-
let t = async (e) => await
|
|
22967
|
+
}, Dy = async (e) => {
|
|
22968
|
+
let t = async (e) => await vy("https://api.dropboxapi.com/2/files/copy_batch_v2", {
|
|
22924
22969
|
entries: e,
|
|
22925
22970
|
autorename: !1
|
|
22926
|
-
}), n = async (e) => await
|
|
22971
|
+
}), n = async (e) => await vy("https://api.dropboxapi.com/2/files/copy_batch/check_v2", { async_job_id: e }), r = [], i = [];
|
|
22927
22972
|
for (let a = 0; a < e.length; a += 900) {
|
|
22928
22973
|
i = e.slice(a, a + 900).map((e) => ({
|
|
22929
|
-
from_path:
|
|
22930
|
-
to_path:
|
|
22974
|
+
from_path: yy(e.from),
|
|
22975
|
+
to_path: yy(e.to)
|
|
22931
22976
|
}));
|
|
22932
22977
|
let o = await t(i);
|
|
22933
22978
|
if (!o) continue;
|
|
22934
22979
|
if (o.error) throw Error(`Error starting copy: ${o.error}`);
|
|
22935
22980
|
let s = o;
|
|
22936
|
-
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await xt(
|
|
22981
|
+
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await xt(my), s = await n(o.async_job_id ?? "");
|
|
22937
22982
|
if (s?.[".tag"] === "failed") throw Error(`Copy operation failed: ${s[".tag"]}`);
|
|
22938
22983
|
s?.[".tag"] === "complete" && s.entries && r.push(...s.entries);
|
|
22939
22984
|
}
|
|
22940
22985
|
return r.filter((e) => e[".tag"] === "failure").map((e) => e.failure);
|
|
22941
|
-
},
|
|
22942
|
-
let t = async (e) => await
|
|
22986
|
+
}, Oy = async (e) => {
|
|
22987
|
+
let t = async (e) => await vy("https://api.dropboxapi.com/2/files/move_v2", {
|
|
22943
22988
|
...e,
|
|
22944
22989
|
autorename: !0
|
|
22945
22990
|
});
|
|
22946
22991
|
for (let n of e) await t({
|
|
22947
|
-
from_path:
|
|
22948
|
-
to_path:
|
|
22992
|
+
from_path: yy(n.from),
|
|
22993
|
+
to_path: yy(n.to)
|
|
22949
22994
|
});
|
|
22950
|
-
},
|
|
22995
|
+
}, ky = async ({ thumbnailsRequest: e = [], size: t = "w64h64", format: n = "jpeg", mode: r = "strict" }, i) => {
|
|
22951
22996
|
let a = {}, o = [];
|
|
22952
22997
|
for (let s = 0; s < e.length; s += 25) {
|
|
22953
22998
|
let c = e.slice(s, s + 25), l = c.map((e) => ({
|
|
22954
|
-
path:
|
|
22999
|
+
path: yy(e.path),
|
|
22955
23000
|
format: n,
|
|
22956
23001
|
size: t,
|
|
22957
23002
|
mode: r
|
|
22958
23003
|
}));
|
|
22959
|
-
await xt(100), o.push(
|
|
23004
|
+
await xt(100), o.push(vy("https://content.dropboxapi.com/2/files/get_thumbnail_batch", { entries: l }).then((e) => {
|
|
22960
23005
|
if (!e) return;
|
|
22961
23006
|
let n = e.entries.reduce((e, n, r) => {
|
|
22962
23007
|
let i = c[r].path, [a, o] = t.replace("w", "").split("h").map(Number), s = n;
|
|
@@ -22975,7 +23020,7 @@ var ly = async (e, t, n = {}) => {
|
|
|
22975
23020
|
}));
|
|
22976
23021
|
}
|
|
22977
23022
|
return Promise.all(o).then(() => a);
|
|
22978
|
-
},
|
|
23023
|
+
}, Ay = (e, t = "application/octet-stream", n = 512) => {
|
|
22979
23024
|
let r = atob(e), i = [];
|
|
22980
23025
|
for (let e = 0; e < r.length; e += n) {
|
|
22981
23026
|
let t = r.slice(e, e + n), a = Array(t.length);
|
|
@@ -22984,11 +23029,11 @@ var ly = async (e, t, n = {}) => {
|
|
|
22984
23029
|
i.push(o);
|
|
22985
23030
|
}
|
|
22986
23031
|
return new Blob(i, { type: t });
|
|
22987
|
-
},
|
|
23032
|
+
}, jy = async (e, t) => {
|
|
22988
23033
|
try {
|
|
22989
23034
|
let n = t.split(",")[1];
|
|
22990
|
-
|
|
22991
|
-
path:
|
|
23035
|
+
_y("https://content.dropboxapi.com/2/files/upload", Ay(n, "application/octet-stream"), { "Dropbox-API-Arg": JSON.stringify({
|
|
23036
|
+
path: yy(e),
|
|
22992
23037
|
mode: "overwrite",
|
|
22993
23038
|
autorename: !0,
|
|
22994
23039
|
mute: !1
|
|
@@ -22998,12 +23043,12 @@ var ly = async (e, t, n = {}) => {
|
|
|
22998
23043
|
} catch (e) {
|
|
22999
23044
|
console.error("Errore durante il caricamento su Dropbox:", e);
|
|
23000
23045
|
}
|
|
23001
|
-
},
|
|
23002
|
-
if (!
|
|
23046
|
+
}, My = (e = !1) => gy ? ji(gy.clientId, e) : !1, Ny = (e = {}) => {
|
|
23047
|
+
if (!gy) return /* @__PURE__ */ d.createElement("div", {
|
|
23003
23048
|
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.",
|
|
23004
23049
|
className: "text-danger flex items-center gap-2"
|
|
23005
23050
|
}, /* @__PURE__ */ d.createElement(Q, { name: "warning" }), /* @__PURE__ */ d.createElement("span", null, "Dropbox non configurato"));
|
|
23006
|
-
let t =
|
|
23051
|
+
let t = My(!0);
|
|
23007
23052
|
return /* @__PURE__ */ d.createElement(Ii, {
|
|
23008
23053
|
provider: "dropboxAuth",
|
|
23009
23054
|
intent: "connect",
|
|
@@ -23015,33 +23060,33 @@ var ly = async (e, t, n = {}) => {
|
|
|
23015
23060
|
title: t ? "DropBox Connected" : "DropBox Disconnected"
|
|
23016
23061
|
}
|
|
23017
23062
|
});
|
|
23018
|
-
},
|
|
23063
|
+
}, Py = {
|
|
23019
23064
|
setRootPath: (e) => {
|
|
23020
|
-
|
|
23021
|
-
},
|
|
23022
|
-
resolvePath:
|
|
23023
|
-
createFolders:
|
|
23024
|
-
deleteBulk:
|
|
23025
|
-
addTags:
|
|
23026
|
-
listFolders:
|
|
23027
|
-
getThumbnails:
|
|
23028
|
-
search:
|
|
23029
|
-
upload:
|
|
23030
|
-
copy:
|
|
23031
|
-
move:
|
|
23032
|
-
},
|
|
23065
|
+
gy && (gy.rootPath = e);
|
|
23066
|
+
},
|
|
23067
|
+
resolvePath: yy,
|
|
23068
|
+
createFolders: Sy,
|
|
23069
|
+
deleteBulk: Cy,
|
|
23070
|
+
addTags: Ty,
|
|
23071
|
+
listFolders: Ey,
|
|
23072
|
+
getThumbnails: ky,
|
|
23073
|
+
search: by,
|
|
23074
|
+
upload: jy,
|
|
23075
|
+
copy: Dy,
|
|
23076
|
+
move: Oy
|
|
23077
|
+
}, Fy = "https://api.serpapi.com/search", Iy = "google", Ly = "google_images", Ry = "google_autocomplete", zy = "google_trends", By = "google_maps", Vy = "google_maps_photos", Hy = "google_maps_reviews", Uy = {
|
|
23033
23078
|
engine: null,
|
|
23034
23079
|
device: null,
|
|
23035
23080
|
no_cache: !1,
|
|
23036
23081
|
async: !1,
|
|
23037
23082
|
output: "json"
|
|
23038
|
-
},
|
|
23083
|
+
}, Wy = { q: null }, Gy = {
|
|
23039
23084
|
tbs: null,
|
|
23040
23085
|
safe: "active",
|
|
23041
23086
|
nfpr: 0,
|
|
23042
23087
|
filter: 1
|
|
23043
23088
|
};
|
|
23044
|
-
function
|
|
23089
|
+
function Ky(e) {
|
|
23045
23090
|
let t = uu(), n = uu(!0), r = du(!0), i = {
|
|
23046
23091
|
location: t,
|
|
23047
23092
|
uule: null
|
|
@@ -23059,13 +23104,13 @@ function Ry(e) {
|
|
|
23059
23104
|
hl: r
|
|
23060
23105
|
};
|
|
23061
23106
|
return {
|
|
23062
|
-
[
|
|
23063
|
-
...
|
|
23107
|
+
[Iy]: {
|
|
23108
|
+
...Uy,
|
|
23064
23109
|
...i,
|
|
23065
23110
|
...o,
|
|
23066
|
-
...
|
|
23067
|
-
...
|
|
23068
|
-
engine:
|
|
23111
|
+
...Gy,
|
|
23112
|
+
...Wy,
|
|
23113
|
+
engine: Iy,
|
|
23069
23114
|
ludocid: null,
|
|
23070
23115
|
lsig: null,
|
|
23071
23116
|
kgmid: null,
|
|
@@ -23074,29 +23119,29 @@ function Ry(e) {
|
|
|
23074
23119
|
start: null,
|
|
23075
23120
|
num: null
|
|
23076
23121
|
},
|
|
23077
|
-
[
|
|
23078
|
-
...
|
|
23122
|
+
[Ly]: {
|
|
23123
|
+
...Uy,
|
|
23079
23124
|
...i,
|
|
23080
23125
|
...o,
|
|
23081
|
-
...
|
|
23082
|
-
...
|
|
23083
|
-
engine:
|
|
23126
|
+
...Gy,
|
|
23127
|
+
...Wy,
|
|
23128
|
+
engine: Ly,
|
|
23084
23129
|
chips: null,
|
|
23085
23130
|
ijn: null
|
|
23086
23131
|
},
|
|
23087
|
-
[
|
|
23088
|
-
...
|
|
23132
|
+
[Ry]: {
|
|
23133
|
+
...Uy,
|
|
23089
23134
|
...o,
|
|
23090
|
-
...
|
|
23091
|
-
engine:
|
|
23135
|
+
...Wy,
|
|
23136
|
+
engine: Ry,
|
|
23092
23137
|
cp: null,
|
|
23093
23138
|
client: null
|
|
23094
23139
|
},
|
|
23095
|
-
[
|
|
23096
|
-
...
|
|
23140
|
+
[zy]: {
|
|
23141
|
+
...Uy,
|
|
23097
23142
|
...a,
|
|
23098
|
-
...
|
|
23099
|
-
engine:
|
|
23143
|
+
...Wy,
|
|
23144
|
+
engine: zy,
|
|
23100
23145
|
data_type: null,
|
|
23101
23146
|
tz: null,
|
|
23102
23147
|
cat: null,
|
|
@@ -23104,73 +23149,73 @@ function Ry(e) {
|
|
|
23104
23149
|
date: null,
|
|
23105
23150
|
csv: null
|
|
23106
23151
|
},
|
|
23107
|
-
[
|
|
23108
|
-
...
|
|
23152
|
+
[By]: {
|
|
23153
|
+
...Uy,
|
|
23109
23154
|
...i,
|
|
23110
23155
|
...o,
|
|
23111
|
-
...
|
|
23112
|
-
...
|
|
23113
|
-
engine:
|
|
23156
|
+
...Gy,
|
|
23157
|
+
...Wy,
|
|
23158
|
+
engine: By
|
|
23114
23159
|
},
|
|
23115
|
-
[
|
|
23116
|
-
...
|
|
23160
|
+
[Vy]: {
|
|
23161
|
+
...Uy,
|
|
23117
23162
|
...s,
|
|
23118
|
-
engine:
|
|
23163
|
+
engine: Vy
|
|
23119
23164
|
},
|
|
23120
|
-
[
|
|
23121
|
-
...
|
|
23165
|
+
[Hy]: {
|
|
23166
|
+
...Uy,
|
|
23122
23167
|
...s,
|
|
23123
|
-
engine:
|
|
23168
|
+
engine: Hy
|
|
23124
23169
|
}
|
|
23125
23170
|
}[e] ?? {};
|
|
23126
23171
|
}
|
|
23127
|
-
var
|
|
23172
|
+
var qy = void 0;
|
|
23128
23173
|
typeof Ya == "function" && Ya((e) => {
|
|
23129
|
-
|
|
23174
|
+
qy = e.scrape;
|
|
23130
23175
|
});
|
|
23131
|
-
function
|
|
23176
|
+
function Jy(e) {
|
|
23132
23177
|
let t = {};
|
|
23133
23178
|
for (let n in e) e[n] !== null && (t[n] = e[n]);
|
|
23134
23179
|
return t;
|
|
23135
23180
|
}
|
|
23136
|
-
var
|
|
23137
|
-
function
|
|
23138
|
-
let t =
|
|
23139
|
-
return t.length === 0 ? null : (e &&
|
|
23181
|
+
var Yy = 0;
|
|
23182
|
+
function Xy(e = !1) {
|
|
23183
|
+
let t = qy?.serpApiKey?.split(",").map((e) => e.trim()).filter(Boolean) || [];
|
|
23184
|
+
return t.length === 0 ? null : (e && Yy++, Yy < t.length ? t[Yy] : null);
|
|
23140
23185
|
}
|
|
23141
|
-
var
|
|
23186
|
+
var Zy = async (e, t) => {
|
|
23142
23187
|
let n = (n) => {
|
|
23143
|
-
let r =
|
|
23144
|
-
...
|
|
23188
|
+
let r = Jy({
|
|
23189
|
+
...Ky(t),
|
|
23145
23190
|
api_key: n,
|
|
23146
23191
|
q: e
|
|
23147
23192
|
});
|
|
23148
|
-
return console.log(
|
|
23149
|
-
}, r =
|
|
23193
|
+
return console.log(Fy, r), `${Fy}?${new URLSearchParams(r)}`;
|
|
23194
|
+
}, r = Xy();
|
|
23150
23195
|
for (; r;) try {
|
|
23151
23196
|
return await tn(n(r));
|
|
23152
23197
|
} catch (e) {
|
|
23153
23198
|
if (e?.error === "quota_exceeded") {
|
|
23154
|
-
console.warn(`SerpApi: invalid api key: ${r}`, e), r =
|
|
23199
|
+
console.warn(`SerpApi: invalid api key: ${r}`, e), r = Xy(!0);
|
|
23155
23200
|
continue;
|
|
23156
23201
|
}
|
|
23157
23202
|
throw console.error(`SerpApi: ${r}`, e), e;
|
|
23158
23203
|
}
|
|
23159
23204
|
return null;
|
|
23160
|
-
},
|
|
23205
|
+
}, Qy = async (e, t, n) => {
|
|
23161
23206
|
let r = `${eo}/${yt(t)}/${yt(e)}`, i = await n.read(r);
|
|
23162
23207
|
if (i) return i;
|
|
23163
|
-
let a = await
|
|
23208
|
+
let a = await Zy(e, t);
|
|
23164
23209
|
return a ? n.set(r, a) : console.warn(`SerpApi ${t}: No Result`), a ?? {};
|
|
23165
|
-
},
|
|
23166
|
-
googleSearch: async (t) =>
|
|
23167
|
-
googleImages: async (t) =>
|
|
23168
|
-
googleAutocomplete: async (t) =>
|
|
23169
|
-
googleTrends: async (t) =>
|
|
23170
|
-
googleMaps: async (t) =>
|
|
23171
|
-
googleMapsPhotos: async (t) =>
|
|
23172
|
-
googleMapsReviews: async (t) =>
|
|
23173
|
-
}),
|
|
23210
|
+
}, $y = (e) => ({
|
|
23211
|
+
googleSearch: async (t) => Qy(t, Iy, e),
|
|
23212
|
+
googleImages: async (t) => Qy(t, Ly, e),
|
|
23213
|
+
googleAutocomplete: async (t) => Qy(t, Ry, e),
|
|
23214
|
+
googleTrends: async (t) => Qy(t, zy, e),
|
|
23215
|
+
googleMaps: async (t) => Qy(t, By, e),
|
|
23216
|
+
googleMapsPhotos: async (t) => Qy(t, Vy, e),
|
|
23217
|
+
googleMapsReviews: async (t) => Qy(t, Hy, e)
|
|
23218
|
+
}), eb = {
|
|
23174
23219
|
"+": "+",
|
|
23175
23220
|
"﹢": "+",
|
|
23176
23221
|
"-": "-",
|
|
@@ -23245,7 +23290,7 @@ var Uy = async (e, t) => {
|
|
|
23245
23290
|
x: "x",
|
|
23246
23291
|
y: "y",
|
|
23247
23292
|
z: "z"
|
|
23248
|
-
},
|
|
23293
|
+
}, tb = {
|
|
23249
23294
|
email: {
|
|
23250
23295
|
description: "Email: no spaces -> Lower/Trim",
|
|
23251
23296
|
transformations: [{
|
|
@@ -23291,7 +23336,7 @@ var Uy = async (e, t) => {
|
|
|
23291
23336
|
transformations: [],
|
|
23292
23337
|
mask: ["toSlug"]
|
|
23293
23338
|
}
|
|
23294
|
-
},
|
|
23339
|
+
}, nb = [
|
|
23295
23340
|
{
|
|
23296
23341
|
pattern: "email*",
|
|
23297
23342
|
use: "email"
|
|
@@ -23308,24 +23353,24 @@ var Uy = async (e, t) => {
|
|
|
23308
23353
|
pattern: "date*",
|
|
23309
23354
|
use: "date"
|
|
23310
23355
|
}
|
|
23311
|
-
],
|
|
23312
|
-
function
|
|
23313
|
-
return e ? e.normalize("NFKC").replace(
|
|
23356
|
+
], rb = new RegExp(Object.keys(eb).join("|"), "g");
|
|
23357
|
+
function ib(e) {
|
|
23358
|
+
return e ? e.normalize("NFKC").replace(rb, (e) => eb[e] ?? e) : "";
|
|
23314
23359
|
}
|
|
23315
|
-
var
|
|
23360
|
+
var ab = class {
|
|
23316
23361
|
config;
|
|
23317
23362
|
matches;
|
|
23318
23363
|
constructor(e = {}, t = []) {
|
|
23319
23364
|
this.config = {
|
|
23320
|
-
...
|
|
23365
|
+
...tb,
|
|
23321
23366
|
...e
|
|
23322
|
-
}, this.matches = [...
|
|
23367
|
+
}, this.matches = [...nb, ...t];
|
|
23323
23368
|
}
|
|
23324
23369
|
apply(e, t, n = !1) {
|
|
23325
23370
|
let r = this.config[e];
|
|
23326
23371
|
if (!r) return n ? qt(t) : t;
|
|
23327
23372
|
let i = t;
|
|
23328
|
-
i =
|
|
23373
|
+
i = ib(String(i ?? ""));
|
|
23329
23374
|
let a = r.exclusions;
|
|
23330
23375
|
if (Array.isArray(a) && a.length) {
|
|
23331
23376
|
let e = String(i).toLowerCase();
|
|
@@ -23384,7 +23429,7 @@ var Zy = class {
|
|
|
23384
23429
|
};
|
|
23385
23430
|
//#endregion
|
|
23386
23431
|
//#region src/libs/csv.ts
|
|
23387
|
-
function
|
|
23432
|
+
function ob(e, t) {
|
|
23388
23433
|
let n = Re.parse(e, {
|
|
23389
23434
|
header: !0,
|
|
23390
23435
|
skipEmptyLines: !0,
|
|
@@ -23397,6 +23442,6 @@ function Qy(e, t) {
|
|
|
23397
23442
|
};
|
|
23398
23443
|
}
|
|
23399
23444
|
//#endregion
|
|
23400
|
-
export { Tu as AIProvider,
|
|
23445
|
+
export { Tu as AIProvider, $v as AI_PROVIDER_DEFINITIONS, ty as AI_PROVIDER_DESCRIPTORS, a as AI_PROVIDER_HOSTS, ni as ActionButton, dm as AddressAutocomplete, ss as Alert, hc as AnimatedNumber, Lv as App, Iv as AppProvider, ac as AreaChart, la as AsyncDropdown, Ii as AuthButton, hi as AuthProvider, bl as Autocomplete, bn as BUILT_IN_THEMES, gn as BUILT_IN_THEME_IDS, ri as BackLink, fr as Badge, dr as BadgeOverlay, lc as BarList, ga as Brand, wa as Breadcrumbs, G_ as CLOUDFLARE_PROVIDER_DESCRIPTOR, $u as CONTEXT_MENU_SEARCH_THRESHOLD, pc as CalendarHeatmap, Gi as Card, Ta as Carousel, Js as ChartDataTable, Ks as ChartLegend, Gh as ChatMarkdown, ig as ChatQuestions, qh as ChatReasoning, kd as Chatbot, tl as Checkbox, xl as Checklist, Os as Code, _f as CodeEditor, Zd as CodeSyntaxError, cr as Col, Kc as Color, Zs as ColumnChart, Hf as Component, Uf as ComponentBlock, or as Container, gd as ContextMenu, Gl as CropImage, Wm as DEFAULT_DOCUMENT_HEAD, Um as DEFAULT_HEAD_APP_NAME, Gm as DEFAULT_LANGUAGE_HEAD, ol as DEFAULT_ORDER, Ri as DataProvider, qc as Date, Yc as DateTime, us as DescriptionList, qv as DirectApiProviderAdapter, ec as DivergingBarChart, Ny as DropBoxConnectButton, d_ as DropboxAuthProvider, ca as Dropdown, ua as DropdownButton, pa as DropdownDivider, fa as DropdownHeader, da as DropdownItem, ma as DropdownMenu, Zv as EMAIL_PROVIDER_DEFINITIONS, Wc as Email, Lg as EmailProvider, zc as FieldError, Ql as FileNameEditor, Yv as FirebaseApiProviderAdapter, i_ as FirebaseAuthProvider, e_ as FirebaseDataProvider, qo as FirebaseStorageProvider, xo as FirestoreDataProvider, _p as Form, np as FormControllerContext, sg as Gallery, p_ as GitHubAuthProvider, g_ as GmailEmailProvider, ii as GoSite, Fg as GoogleAuthProvider, Qp as GoogleMapsProvider, l_ as GoogleServiceAccountProvider, Sg as Grid, xg as GridArray, bg as GridCore, Dm as GridDB, cg as GridGalleryView, Bm as GridTableView, bh as Head, ch as HeadProvider, dc as Heatmap, el as Hidden, qn as I18nProvider, Q as Icon, Ir as IconProvider, Ms as Identicon, ha as Image, vi as ImageAvatar, Ll as ImageEditor, zl as ImageField, Vc as Input, rl as Label, Xp as LayoutBuilder, ic as LineChart, mm as ListCard, al as ListGroup, Bi as Loader, ti as LoadingButton, _c as LocaleSwitcher, Tr as LucideIconProvider, Oh as MarkdownReader, uc as MeasureBarList, oa as Menu, Jv as MockApiProviderAdapter, Vo as MockDataProvider, na as Modal, aa as ModalOk, ia as ModalYesNo, Zc as Month, eb as NORMALIZE_MAP, Da as Notifications, Uc as Number, ny as OPENAI_COMPATIBLE_PROVIDER_DESCRIPTOR, ll as Order, Qv as PUBLISH_PROVIDER_DEFINITIONS, Cg as PageUsers, og as Pagination, Gc as Password, Cc as Percentage, Or as PhosphorIconProvider, Vd as Prompt, Ad as PromptMode, Qu as PromptUtils, is as ProviderSwitcher, Qc as Range, ai as ReferSite, Op as Repeat, zf as RichText, sr as Row, s as SERVER_CREDENTIAL_PREFIX, ab as Sanitizer, sc as ScatterChart, ka as Search, vl as Select, $s as SequenceColumnChart, wm as SideNav, oc as Sparkline, Qs as StackedColumnChart, Pl as StorageProvider, Hc as String, Xv as SupabaseApiProviderAdapter, v_ as SupabaseAuthProvider, Po as SupabaseDataProvider, Jo as SupabaseStorageProvider, nl as Switch, Ip as Tab, ag as TabDynamic, Pp as TabItem, Np as TabLayouts, zp as Table, il as TextArea, za as ThemeSwitcher, Jc as Time, Ma as Toolbar, ms as Tree, fm as UploadCSV, ou as UploadDocument, su as UploadImage, $c as Url, Xc as Week, Z as Wrapper, Mt as arrayUnique, Lt as arraysEqual, It as base64Encode, Vt as base64ToBlob, Ht as base64ToUrl, _a as buildBreadcrumbSchema, c as buildModelIdentityIndex, fd as buildTextCommandContext, Br as buttonBaseClass, Ur as buttonDangerClass, Jr as buttonDarkClass, Kr as buttonInfoClass, qr as buttonLightClass, $r as buttonLinkClass, Zr as buttonOutlineDangerClass, Yr as buttonOutlinePrimaryClass, Xr as buttonOutlineSecondaryClass, Qr as buttonOutlineSuccessClass, Vr as buttonPrimaryClass, Hr as buttonSecondaryClass, Wr as buttonSuccessClass, Gr as buttonWarningClass, lo as callFirebaseFunction, i as canonicalModelName, Ps as chartFill, Ns as chartToken, Et as checkConditions, Wt as cleanRecord, X as cn, ju as configureProxy, dt as converter, ht as copyToClipboard, Dt as crc32, iy as createAIProviderRegistry, W_ as createCloudflareProviderDefinition, _r as createMotionTransition, ay as createServerCredentialAIRegistry, zn as createTranslations, mt as decodeJWT, Rn as defineLocaleMessages, bt as dirname, Py as dropBox, Ct as eventClosest, tn as fetchJson, en as fetchRest, nn as fetchWithRetry, jc as fieldAddonClass, Oc as fieldControlBaseClass, Dc as fieldFeedbackClass, Ac as fieldGroupClass, Ec as fieldLabelClass, kc as fieldTextAreaBaseClass, Su as formatAIModelRef, St as generateUniqueId, Gu as getAIModelCatalog, Pi as getAccessToken, ld as getAutoClosedSuffixLength, cf as getCodeValidationResult, au as getFileUrl, di as getGlobalVars, fy as getGoogleTrendsData, py as getGoogleTrendsRelated, dy as getKeywordIdeas, xi as getProviderConfigurationState, Ut as getRecordValue, Ap as getTabLayoutConfig, Mp as getTabPaneClassName, jp as getTabTriggerClassName, m_ as googleGetAccessToken, _d as groupModelOptions, cd as hasAutoClosedSuffix, js as identiconPattern, Bn as interpolate, At as intersectObjects, l as isAIProviderTarget, lr as isBadgeDescriptor, Nt as isEmpty, xu as isFreeAIModel, yd as isFreeModelOption, zt as isInteractiveElement, Iu as isProxyEnabled, ul as labelText, nm as loadGoogleMaps, o as loadModelIdentityIndex, kt as loadScripts, Wv as locales, ud as matchCommandTrigger, Ls as niceMax, ur as normalizeBadgeProps, yt as normalizeKey, _t as normalizePath, ib as normalizeVisualChars, Cu as parseAIModelRef, ob as parseCsvText, _i as path, Pu as proxyFetch, Kt as recordsEqual, Xo as registerProviderSessionFactory, pi as removeGlobalVars, Bt as render2Base64, Lh as repairStreamingMarkdown, Tt as replacePlaceholders, jt as replaceVariables, r as resolveModel, vr as resolveMotionEffect, Xd as runPrompt, Ft as safeClone, Rt as sanitizeKey, $y as scrape, h_ as sendEmail, n as serverCredential, fi as setGlobalVars, xt as sleep, qt as smartTypeCast, wt as substrCount, Rs as ticks, ey as toProviderDescriptor, hs as treeFromPaths, gt as trimPath, vt as trimSlash, Ot as ucfirst, Eu as useAIProvider, Du as useAIProviderRegistry, ji as useAccessToken, Hs as useAnimatedValues, Gv as useApiProvider, _h as useAssetsHead, gi as useAuthProvider, zs as useChartFormat, qs as useChartTooltip, Gs as useChartWidth, Vg as useCredentialsProvider, zi as useDataProvider, gh as useDocumentHead, My as useDropBoxConnect, Tc as useEditorHeight, Rg as useEmailProvider, Sr as useEnterMotion, $l as useFileUploadCore, ip as useFormActions, pp as useFormContext, rp as useFormController, ui as useGlobalVars, $p as useGoogleMapsConfig, dh as useHead, ph as useHeadLinks, Y as useI18n, Rr as useIconController, Lr as useIconProvider, El as useImage, hh as useLanguageHead, Rv as useMenu, yr as useMotionEffect, br as useMotionState, mh as usePaginationHead, xr as usePressMotion, Wa as useProvider, ns as useProviderSession, Fu as useProxy, vh as usePwaHead, Us as useReveal, yh as useSchemaOrgHead, Ua as useSetProvider, fh as useSocialHead, Fl as useStorageProvider, J as useTheme, In as useThemeController, sf as validateCodeSyntax };
|
|
23401
23446
|
|
|
23402
23447
|
//# sourceMappingURL=index.mjs.map
|