@llmnative/react 1.17.0 → 1.17.1
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 +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +226 -229
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/providers/ai/opencode.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3764,7 +3764,7 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3764
3764
|
}))
|
|
3765
3765
|
}, e);
|
|
3766
3766
|
}, 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 }) => {
|
|
3767
|
-
let y =
|
|
3767
|
+
let y = Og(e), b = Y("menu"), x = ({ item: e, index: i }) => {
|
|
3768
3768
|
let [a, o] = h(e.active);
|
|
3769
3769
|
l(() => {
|
|
3770
3770
|
o(e.active);
|
|
@@ -8437,7 +8437,7 @@ var ol = (e, t) => {
|
|
|
8437
8437
|
pricing: r
|
|
8438
8438
|
} : t;
|
|
8439
8439
|
});
|
|
8440
|
-
}, xl = "ai.models.
|
|
8440
|
+
}, xl = "ai.models.v3.", Sl = 1e3 * 60 * 60 * 24, Cl = (e) => {
|
|
8441
8441
|
if (e instanceof Error) return e.message;
|
|
8442
8442
|
if (typeof e == "object" && e) {
|
|
8443
8443
|
let t = e;
|
|
@@ -13934,7 +13934,7 @@ function rp({ group: e, expanded: n, openItems: r, showIcons: i, onToggle: a })
|
|
|
13934
13934
|
}))));
|
|
13935
13935
|
}
|
|
13936
13936
|
function ip({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCollapsedChange: a, showIcons: o = !0, showCollapseButton: c = !0, footer: u, header: d, embedded: f = !1 }) {
|
|
13937
|
-
let { pathname: p } = x(), g = Y("sideNav"), _ =
|
|
13937
|
+
let { pathname: p } = x(), g = Y("sideNav"), _ = Og(e ?? ""), v = n ?? (e ? Zf(_) : []), y = i !== void 0, [b, S] = h(r), C = i === void 0 ? b : i, w = s((e) => {
|
|
13938
13938
|
let t = typeof e == "function" ? e(C) : e;
|
|
13939
13939
|
y ? a?.(t) : S(t);
|
|
13940
13940
|
}, [
|
|
@@ -17306,25 +17306,22 @@ var $h = {
|
|
|
17306
17306
|
baseUrl: "https://api.openai.com/v1",
|
|
17307
17307
|
dashboardUrl: "https://platform.openai.com/api-keys",
|
|
17308
17308
|
credentialsHint: "OpenAI dashboard → API keys → Create new secret key."
|
|
17309
|
-
}), ng = "https://opencode.ai/zen/v1/models", rg = "https://opencode.ai/zen/v1/chat/completions", ig =
|
|
17309
|
+
}), ng = "https://opencode.ai/zen/v1/models", rg = "https://opencode.ai/zen/v1/chat/completions", ig = "deepseek-v4.1-flash", ag = [
|
|
17310
|
+
ig,
|
|
17311
|
+
"deepseek-v4-pro",
|
|
17312
|
+
"glm-5.3",
|
|
17313
|
+
"glm-5.3-flash",
|
|
17314
|
+
"grok-build-0.1",
|
|
17315
|
+
"kimi-k3",
|
|
17316
|
+
"minimax-m3",
|
|
17317
|
+
"qwen3.8-flash"
|
|
17318
|
+
], og = /-free$/, sg = /* @__PURE__ */ new Set(["big-pickle"]), cg = (e) => og.test(e) || sg.has(e), lg = {
|
|
17310
17319
|
id: "opencode",
|
|
17311
17320
|
label: "OpenCode",
|
|
17312
17321
|
description: "OpenCode Zen — a curated set of coding-focused models.",
|
|
17313
17322
|
configKey: "openCodeApiKey",
|
|
17314
|
-
defaultModel:
|
|
17315
|
-
fallbackModels:
|
|
17316
|
-
"big-pickle",
|
|
17317
|
-
"deepseek-v4-flash-free",
|
|
17318
|
-
"glm-5",
|
|
17319
|
-
"glm-5.1",
|
|
17320
|
-
"grok-build-0.1",
|
|
17321
|
-
"kimi-k2.5",
|
|
17322
|
-
"kimi-k2.6",
|
|
17323
|
-
"mimo-v2.5-free",
|
|
17324
|
-
"minimax-m2.5",
|
|
17325
|
-
"minimax-m2.7",
|
|
17326
|
-
"nemotron-3-super-free"
|
|
17327
|
-
],
|
|
17323
|
+
defaultModel: ig,
|
|
17324
|
+
fallbackModels: ag,
|
|
17328
17325
|
dashboardUrl: "https://opencode.ai",
|
|
17329
17326
|
credentialsHint: "OpenCode Zen dashboard → API Keys → Create Key.",
|
|
17330
17327
|
credentialFields: [{
|
|
@@ -17339,7 +17336,7 @@ var $h = {
|
|
|
17339
17336
|
},
|
|
17340
17337
|
discoverModels: async (e) => {
|
|
17341
17338
|
let t = await Wt(ng, { headers: { Authorization: `Bearer ${e}` } }, ol);
|
|
17342
|
-
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);
|
|
17339
|
+
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) => !cg(e));
|
|
17343
17340
|
},
|
|
17344
17341
|
complete: async (t, n) => {
|
|
17345
17342
|
let r = n.attachments ?? [], i = r.length > 0 ? r.map((e) => e.mimeType.startsWith("image/") ? {
|
|
@@ -17381,7 +17378,7 @@ var $h = {
|
|
|
17381
17378
|
if (!a) throw wl("OpenCode");
|
|
17382
17379
|
return jh(a);
|
|
17383
17380
|
}
|
|
17384
|
-
},
|
|
17381
|
+
}, ug = (e) => {
|
|
17385
17382
|
if (!e || typeof e != "object") return;
|
|
17386
17383
|
let { prompt: t, completion: n } = e, r = Number(t), i = Number(n);
|
|
17387
17384
|
if (t === void 0 || n === void 0 || !Number.isFinite(r) || !Number.isFinite(i) || r < 0 || i < 0) return;
|
|
@@ -17392,7 +17389,7 @@ var $h = {
|
|
|
17392
17389
|
currency: "USD",
|
|
17393
17390
|
source: "provider"
|
|
17394
17391
|
};
|
|
17395
|
-
},
|
|
17392
|
+
}, dg = Mh({
|
|
17396
17393
|
id: "openrouter",
|
|
17397
17394
|
label: "OpenRouter",
|
|
17398
17395
|
description: "Unified access to many model providers through one API.",
|
|
@@ -17408,7 +17405,7 @@ var $h = {
|
|
|
17408
17405
|
credentialsHint: "OpenRouter → Settings → API Keys → Create Key.",
|
|
17409
17406
|
mapModelEntry: (e) => typeof e.id == "string" ? {
|
|
17410
17407
|
model: e.id,
|
|
17411
|
-
pricing:
|
|
17408
|
+
pricing: ug(e.pricing)
|
|
17412
17409
|
} : void 0,
|
|
17413
17410
|
validateApiKey: async (e) => {
|
|
17414
17411
|
try {
|
|
@@ -17430,7 +17427,7 @@ var $h = {
|
|
|
17430
17427
|
};
|
|
17431
17428
|
}
|
|
17432
17429
|
}
|
|
17433
|
-
}),
|
|
17430
|
+
}), fg = {
|
|
17434
17431
|
dbRealtime: {
|
|
17435
17432
|
service: "data",
|
|
17436
17433
|
create: () => new rh()
|
|
@@ -17447,7 +17444,7 @@ var $h = {
|
|
|
17447
17444
|
service: "auth",
|
|
17448
17445
|
create: () => new sh()
|
|
17449
17446
|
}
|
|
17450
|
-
},
|
|
17447
|
+
}, pg = {
|
|
17451
17448
|
googleAuth: {
|
|
17452
17449
|
service: "auth",
|
|
17453
17450
|
create: () => new Rm()
|
|
@@ -17461,10 +17458,10 @@ var $h = {
|
|
|
17461
17458
|
create: (e) => new fh(e.serviceAccount),
|
|
17462
17459
|
when: (e) => !!e.serviceAccount
|
|
17463
17460
|
}
|
|
17464
|
-
},
|
|
17461
|
+
}, mg = { dropboxAuth: {
|
|
17465
17462
|
service: "auth",
|
|
17466
17463
|
create: (e) => new mh(e)
|
|
17467
|
-
} },
|
|
17464
|
+
} }, hg = {
|
|
17468
17465
|
supabaseDb: {
|
|
17469
17466
|
service: "data",
|
|
17470
17467
|
create: (e) => new co(e)
|
|
@@ -17477,27 +17474,27 @@ var $h = {
|
|
|
17477
17474
|
service: "auth",
|
|
17478
17475
|
create: (e) => new yh(e)
|
|
17479
17476
|
}
|
|
17480
|
-
},
|
|
17477
|
+
}, gg = { mock: {
|
|
17481
17478
|
service: "data",
|
|
17482
17479
|
create: (e) => new go(e?.data)
|
|
17483
|
-
} },
|
|
17480
|
+
} }, _g = (e, t) => ({
|
|
17484
17481
|
service: "ai",
|
|
17485
17482
|
create: (n) => new Al(e, n?.[t] || ""),
|
|
17486
17483
|
when: (e) => !!e?.[t]
|
|
17487
|
-
}),
|
|
17488
|
-
firebase:
|
|
17489
|
-
google:
|
|
17490
|
-
dropbox:
|
|
17491
|
-
supabase:
|
|
17492
|
-
mock:
|
|
17484
|
+
}), vg = {
|
|
17485
|
+
firebase: fg,
|
|
17486
|
+
google: pg,
|
|
17487
|
+
dropbox: mg,
|
|
17488
|
+
supabase: hg,
|
|
17489
|
+
mock: gg,
|
|
17493
17490
|
ai: {
|
|
17494
|
-
openai:
|
|
17495
|
-
openrouter:
|
|
17496
|
-
opencode:
|
|
17497
|
-
deepseek:
|
|
17498
|
-
gemini:
|
|
17499
|
-
anthropic:
|
|
17500
|
-
mistral:
|
|
17491
|
+
openai: _g(tg, "openaiApiKey"),
|
|
17492
|
+
openrouter: _g(dg, "openRouterApiKey"),
|
|
17493
|
+
opencode: _g(lg, "openCodeApiKey"),
|
|
17494
|
+
deepseek: _g(qh, "deepSeekApiKey"),
|
|
17495
|
+
gemini: _g($h, "geminiApiKey"),
|
|
17496
|
+
anthropic: _g(Th, "anthropicApiKey"),
|
|
17497
|
+
mistral: _g(eg, "mistralApiKey"),
|
|
17501
17498
|
cloudflare: {
|
|
17502
17499
|
service: "ai",
|
|
17503
17500
|
create: (e) => new Al(Gh({
|
|
@@ -17508,8 +17505,8 @@ var $h = {
|
|
|
17508
17505
|
when: (e) => !!e?.cloudflare?.apiToken?.trim() && !!e?.cloudflare?.accountId?.trim()
|
|
17509
17506
|
}
|
|
17510
17507
|
}
|
|
17511
|
-
},
|
|
17512
|
-
function
|
|
17508
|
+
}, yg = () => /* @__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" }));
|
|
17509
|
+
function bg(e, t) {
|
|
17513
17510
|
if (!t) return;
|
|
17514
17511
|
let n = t, r = typeof t == "object" && !Array.isArray(t) ? Object.entries(n) : [];
|
|
17515
17512
|
if (r.length > 0 && r.every(([, e]) => typeof e == "object" && !!e)) {
|
|
@@ -17518,10 +17515,10 @@ function hg(e, t) {
|
|
|
17518
17515
|
}
|
|
17519
17516
|
e.custom = t;
|
|
17520
17517
|
}
|
|
17521
|
-
function
|
|
17518
|
+
function xg(e, t, n = "default") {
|
|
17522
17519
|
return t && e[t] ? t : Object.keys(e)[0] ?? n;
|
|
17523
17520
|
}
|
|
17524
|
-
function
|
|
17521
|
+
function Sg(e = {}) {
|
|
17525
17522
|
let t = {
|
|
17526
17523
|
data: {},
|
|
17527
17524
|
storage: {},
|
|
@@ -17530,24 +17527,24 @@ function _g(e = {}) {
|
|
|
17530
17527
|
ai: {},
|
|
17531
17528
|
credentials: {}
|
|
17532
17529
|
}, n = (e) => t[e] ??= {};
|
|
17533
|
-
for (let [t, r] of Object.entries(
|
|
17530
|
+
for (let [t, r] of Object.entries(vg)) {
|
|
17534
17531
|
let i = e[t];
|
|
17535
17532
|
if (i !== void 0) for (let [e, t] of Object.entries(r)) t.when && !t.when(i) || (n(t.service)[e] = t.create(i));
|
|
17536
17533
|
}
|
|
17537
|
-
for (let [t, r] of Object.entries(e.custom ?? {}))
|
|
17534
|
+
for (let [t, r] of Object.entries(e.custom ?? {})) bg(n(t), r);
|
|
17538
17535
|
Object.keys(t.data).length === 0 && (t.data.mock = new go()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new Rm());
|
|
17539
17536
|
let r = e.services ?? {}, i = {};
|
|
17540
17537
|
for (let [e, n] of Object.entries(t)) i[e] = {
|
|
17541
17538
|
registry: n,
|
|
17542
|
-
defaultKey:
|
|
17539
|
+
defaultKey: xg(n, r[e])
|
|
17543
17540
|
};
|
|
17544
17541
|
return i;
|
|
17545
17542
|
}
|
|
17546
|
-
var
|
|
17547
|
-
|
|
17548
|
-
},
|
|
17549
|
-
function
|
|
17550
|
-
let [p, g] = h(() =>
|
|
17543
|
+
var Cg = {}, wg = (e) => {
|
|
17544
|
+
Cg = e;
|
|
17545
|
+
}, Tg = (e) => Cg[e] || [];
|
|
17546
|
+
function Eg({ 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 }) {
|
|
17547
|
+
let [p, g] = h(() => Sg(n)), v = m(p);
|
|
17551
17548
|
v.current = p;
|
|
17552
17549
|
let y = m(void 0);
|
|
17553
17550
|
y.current ||= (async (e, t, n) => {
|
|
@@ -17588,8 +17585,8 @@ function xg({ contextProviders: e, providers: n = {}, appName: r = "LLM Native",
|
|
|
17588
17585
|
setProvider: b
|
|
17589
17586
|
}, /* @__PURE__ */ t.createElement(ti, p.auth, /* @__PURE__ */ t.createElement(Um, p.credentials, /* @__PURE__ */ t.createElement(wi, p.data, /* @__PURE__ */ t.createElement(cc, p.storage, /* @__PURE__ */ t.createElement(Bm, p.email, /* @__PURE__ */ t.createElement($c, p.ai, /* @__PURE__ */ t.createElement(Sr, { config: a }, /* @__PURE__ */ t.createElement(Mf, { config: o }, /* @__PURE__ */ t.createElement(Hp, { appName: r }, /* @__PURE__ */ t.createElement(Pn, { config: c }, /* @__PURE__ */ t.createElement(xn, { config: s }, /* @__PURE__ */ t.createElement(x, null, l))))))))))))))));
|
|
17590
17587
|
}
|
|
17591
|
-
function
|
|
17592
|
-
|
|
17588
|
+
function Dg({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, children: a, ...o }) {
|
|
17589
|
+
wg(r);
|
|
17593
17590
|
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));
|
|
17594
17591
|
function l(r, a, l) {
|
|
17595
17592
|
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, {
|
|
@@ -17603,16 +17600,16 @@ function Sg({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, chil
|
|
|
17603
17600
|
key: a.path,
|
|
17604
17601
|
reportUrl: o.errorReportUrl,
|
|
17605
17602
|
debug: o.debug
|
|
17606
|
-
}, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(
|
|
17603
|
+
}, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(yg, null) }, /* @__PURE__ */ t.createElement(d, null))))
|
|
17607
17604
|
});
|
|
17608
17605
|
}
|
|
17609
17606
|
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)));
|
|
17610
|
-
return /* @__PURE__ */ t.createElement(
|
|
17607
|
+
return /* @__PURE__ */ t.createElement(Eg, o, a, /* @__PURE__ */ t.createElement(b, null, /* @__PURE__ */ t.createElement(y, {
|
|
17611
17608
|
path: ci,
|
|
17612
17609
|
element: /* @__PURE__ */ t.createElement(hi, null)
|
|
17613
17610
|
}), /* @__PURE__ */ t.createElement(t.Fragment, null, u({
|
|
17614
17611
|
default: [{ path: "/" }],
|
|
17615
|
-
...
|
|
17612
|
+
...Cg,
|
|
17616
17613
|
_auth: [{
|
|
17617
17614
|
path: "/users",
|
|
17618
17615
|
page: Dm,
|
|
@@ -17623,8 +17620,8 @@ function Sg({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, chil
|
|
|
17623
17620
|
element: /* @__PURE__ */ t.createElement(Om, null)
|
|
17624
17621
|
})));
|
|
17625
17622
|
}
|
|
17626
|
-
var
|
|
17627
|
-
let t =
|
|
17623
|
+
var Og = (e) => {
|
|
17624
|
+
let t = Tg(e), n = x(), r = (e) => e.map((e) => {
|
|
17628
17625
|
let t = n.pathname === e.path, i = e.children ? r(e.children) : [], a = t || i.some((e) => e.active);
|
|
17629
17626
|
return {
|
|
17630
17627
|
...e,
|
|
@@ -17633,7 +17630,7 @@ var Cg = (e) => {
|
|
|
17633
17630
|
};
|
|
17634
17631
|
});
|
|
17635
17632
|
return p(() => r(t), [n.pathname]);
|
|
17636
|
-
},
|
|
17633
|
+
}, kg = {
|
|
17637
17634
|
common: {
|
|
17638
17635
|
save: "Salva",
|
|
17639
17636
|
cancel: "Annulla",
|
|
@@ -17804,7 +17801,7 @@ var Cg = (e) => {
|
|
|
17804
17801
|
notConfigured: "La ricerca indirizzi non è configurata (manca la API key Google Maps).",
|
|
17805
17802
|
loadError: "Impossibile caricare la ricerca indirizzi."
|
|
17806
17803
|
}
|
|
17807
|
-
},
|
|
17804
|
+
}, Ag = {
|
|
17808
17805
|
common: {
|
|
17809
17806
|
save: "Speichern",
|
|
17810
17807
|
cancel: "Abbrechen",
|
|
@@ -17975,7 +17972,7 @@ var Cg = (e) => {
|
|
|
17975
17972
|
notConfigured: "Adresssuche ist nicht konfiguriert (Google Maps API-Schlüssel fehlt).",
|
|
17976
17973
|
loadError: "Adresssuche konnte nicht geladen werden."
|
|
17977
17974
|
}
|
|
17978
|
-
},
|
|
17975
|
+
}, jg = {
|
|
17979
17976
|
common: {
|
|
17980
17977
|
save: "Сохранить",
|
|
17981
17978
|
cancel: "Отменить",
|
|
@@ -18146,7 +18143,7 @@ var Cg = (e) => {
|
|
|
18146
18143
|
notConfigured: "Поиск адресов не настроен (отсутствует ключ Google Maps API).",
|
|
18147
18144
|
loadError: "Не удалось загрузить поиск адресов."
|
|
18148
18145
|
}
|
|
18149
|
-
},
|
|
18146
|
+
}, Mg = {
|
|
18150
18147
|
common: {
|
|
18151
18148
|
save: "保存",
|
|
18152
18149
|
cancel: "取消",
|
|
@@ -18317,7 +18314,7 @@ var Cg = (e) => {
|
|
|
18317
18314
|
notConfigured: "地址搜索未配置(缺少 Google Maps API 密钥)。",
|
|
18318
18315
|
loadError: "无法加载地址搜索。"
|
|
18319
18316
|
}
|
|
18320
|
-
},
|
|
18317
|
+
}, Ng = {
|
|
18321
18318
|
common: {
|
|
18322
18319
|
save: "حفظ",
|
|
18323
18320
|
cancel: "إلغاء",
|
|
@@ -18488,22 +18485,22 @@ var Cg = (e) => {
|
|
|
18488
18485
|
notConfigured: "البحث عن العناوين غير مُعد (مفتاح Google Maps API مفقود).",
|
|
18489
18486
|
loadError: "تعذر تحميل البحث عن العناوين."
|
|
18490
18487
|
}
|
|
18491
|
-
},
|
|
18492
|
-
ar: () =>
|
|
18493
|
-
de: () =>
|
|
18488
|
+
}, Pg = /* @__PURE__ */ Je({
|
|
18489
|
+
ar: () => Ng,
|
|
18490
|
+
de: () => Ag,
|
|
18494
18491
|
en: () => wn,
|
|
18495
|
-
it: () =>
|
|
18496
|
-
ru: () =>
|
|
18497
|
-
zh: () =>
|
|
18498
|
-
}),
|
|
18492
|
+
it: () => kg,
|
|
18493
|
+
ru: () => jg,
|
|
18494
|
+
zh: () => Mg
|
|
18495
|
+
}), Fg = (e) => ya("api", e);
|
|
18499
18496
|
//#endregion
|
|
18500
18497
|
//#region src/providers/api/direct.ts
|
|
18501
|
-
async function
|
|
18498
|
+
async function Ig(e) {
|
|
18502
18499
|
if (!e.ok) throw Error(`ApiProvider request failed: ${e.status} ${e.statusText}`);
|
|
18503
18500
|
let t = await e.text();
|
|
18504
18501
|
return t ? JSON.parse(t) : void 0;
|
|
18505
18502
|
}
|
|
18506
|
-
var
|
|
18503
|
+
var Lg = class {
|
|
18507
18504
|
config;
|
|
18508
18505
|
constructor(e) {
|
|
18509
18506
|
this.config = e;
|
|
@@ -18518,7 +18515,7 @@ var Mg = class {
|
|
|
18518
18515
|
...e.body,
|
|
18519
18516
|
...this.config.body
|
|
18520
18517
|
};
|
|
18521
|
-
return
|
|
18518
|
+
return Ig(await ol(n.toString(), {
|
|
18522
18519
|
method: t,
|
|
18523
18520
|
headers: {
|
|
18524
18521
|
"Content-Type": "application/json",
|
|
@@ -18527,7 +18524,7 @@ var Mg = class {
|
|
|
18527
18524
|
body: t === "GET" || t === "HEAD" ? void 0 : JSON.stringify(r)
|
|
18528
18525
|
}));
|
|
18529
18526
|
}
|
|
18530
|
-
},
|
|
18527
|
+
}, Rg = class {
|
|
18531
18528
|
resolver;
|
|
18532
18529
|
constructor(e) {
|
|
18533
18530
|
this.resolver = e;
|
|
@@ -18535,7 +18532,7 @@ var Mg = class {
|
|
|
18535
18532
|
async fetch(e) {
|
|
18536
18533
|
return this.resolver(e);
|
|
18537
18534
|
}
|
|
18538
|
-
},
|
|
18535
|
+
}, zg = class {
|
|
18539
18536
|
config;
|
|
18540
18537
|
constructor(e) {
|
|
18541
18538
|
this.config = e;
|
|
@@ -18546,7 +18543,7 @@ var Mg = class {
|
|
|
18546
18543
|
request: e
|
|
18547
18544
|
}, void 0, this.config.region);
|
|
18548
18545
|
}
|
|
18549
|
-
},
|
|
18546
|
+
}, Bg = class {
|
|
18550
18547
|
config;
|
|
18551
18548
|
constructor(e) {
|
|
18552
18549
|
this.config = e;
|
|
@@ -18559,7 +18556,7 @@ var Mg = class {
|
|
|
18559
18556
|
if (n) throw n;
|
|
18560
18557
|
return t;
|
|
18561
18558
|
}
|
|
18562
|
-
},
|
|
18559
|
+
}, Vg = [
|
|
18563
18560
|
{
|
|
18564
18561
|
id: "resend",
|
|
18565
18562
|
label: "Resend",
|
|
@@ -18670,7 +18667,7 @@ var Mg = class {
|
|
|
18670
18667
|
],
|
|
18671
18668
|
credentialsHint: "Ask your mail host or hosting provider for the SMTP host, port, and credentials."
|
|
18672
18669
|
}
|
|
18673
|
-
],
|
|
18670
|
+
], Hg = [
|
|
18674
18671
|
{
|
|
18675
18672
|
id: "cloudflare_pages",
|
|
18676
18673
|
label: "Cloudflare Pages",
|
|
@@ -18900,10 +18897,10 @@ var Mg = class {
|
|
|
18900
18897
|
description: "No vendor — packages the build as a downloadable archive for self-hosting anywhere else.",
|
|
18901
18898
|
credentialFields: []
|
|
18902
18899
|
}
|
|
18903
|
-
],
|
|
18900
|
+
], Ug = [
|
|
18904
18901
|
tg,
|
|
18905
|
-
|
|
18906
|
-
|
|
18902
|
+
dg,
|
|
18903
|
+
lg,
|
|
18907
18904
|
qh,
|
|
18908
18905
|
$h,
|
|
18909
18906
|
Th,
|
|
@@ -18925,7 +18922,7 @@ var Mg = class {
|
|
|
18925
18922
|
dashboardUrl: "https://bigmodel.cn/usercenter/apikeys",
|
|
18926
18923
|
credentialsHint: "Zhipu BigModel → User Center → API Keys → Create Key."
|
|
18927
18924
|
})
|
|
18928
|
-
],
|
|
18925
|
+
], Wg = (e) => ({
|
|
18929
18926
|
id: e.id,
|
|
18930
18927
|
label: e.label,
|
|
18931
18928
|
description: e.description ?? "",
|
|
@@ -18936,7 +18933,7 @@ var Mg = class {
|
|
|
18936
18933
|
}],
|
|
18937
18934
|
credentialsUrl: e.dashboardUrl,
|
|
18938
18935
|
credentialsHint: e.credentialsHint
|
|
18939
|
-
}),
|
|
18936
|
+
}), Gg = [...Ug.map(Wg), Kh], Kg = {
|
|
18940
18937
|
id: "openai-compatible",
|
|
18941
18938
|
label: "OpenAI-compatible",
|
|
18942
18939
|
description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
|
|
@@ -18950,7 +18947,7 @@ var Mg = class {
|
|
|
18950
18947
|
type: "text",
|
|
18951
18948
|
placeholder: "https://api.example.com/v1"
|
|
18952
18949
|
}]
|
|
18953
|
-
},
|
|
18950
|
+
}, qg = (e) => {
|
|
18954
18951
|
let t = [], n = e?.cloudflare?.accountId?.trim();
|
|
18955
18952
|
n && t.push(Gh({
|
|
18956
18953
|
accountId: n,
|
|
@@ -18970,35 +18967,35 @@ var Mg = class {
|
|
|
18970
18967
|
modelsUrl: e?.openAICompatible?.modelsUrl?.trim() || void 0,
|
|
18971
18968
|
chatCompletionsUrl: e?.openAICompatible?.chatCompletionsUrl?.trim() || void 0
|
|
18972
18969
|
})] : t;
|
|
18973
|
-
},
|
|
18970
|
+
}, Jg = (e) => e ? [...Ug, ...qg(e)].reduce((t, n) => {
|
|
18974
18971
|
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() : "";
|
|
18975
18972
|
return r && (t[n.id] = new Al(n, r)), t;
|
|
18976
|
-
}, {}) : {},
|
|
18973
|
+
}, {}) : {}, Yg = void 0;
|
|
18977
18974
|
typeof wa == "function" && wa((e) => {
|
|
18978
|
-
|
|
18975
|
+
Yg = e.google;
|
|
18979
18976
|
});
|
|
18980
|
-
var
|
|
18977
|
+
var Xg = {
|
|
18981
18978
|
ita: "geoTargetConstants/2380",
|
|
18982
18979
|
rome: "geoTargetConstants/1033236",
|
|
18983
18980
|
mil: "geoTargetConstants/1033239",
|
|
18984
18981
|
nap: "geoTargetConstants/1033245",
|
|
18985
18982
|
tor: "geoTargetConstants/1033247"
|
|
18986
|
-
},
|
|
18983
|
+
}, Zg = {
|
|
18987
18984
|
it: "languageConstants/1000",
|
|
18988
18985
|
en: "languageConstants/1001",
|
|
18989
18986
|
fr: "languageConstants/1002",
|
|
18990
18987
|
es: "languageConstants/1003",
|
|
18991
18988
|
de: "languageConstants/1005"
|
|
18992
18989
|
};
|
|
18993
|
-
function
|
|
18994
|
-
return
|
|
18990
|
+
function Qg(e) {
|
|
18991
|
+
return Xg[e.toLowerCase()] || "geoTargetConstants/2380";
|
|
18995
18992
|
}
|
|
18996
|
-
function
|
|
18997
|
-
return
|
|
18993
|
+
function $g(e) {
|
|
18994
|
+
return Zg[e.toLowerCase()] || "languageConstants/1000";
|
|
18998
18995
|
}
|
|
18999
|
-
async function
|
|
19000
|
-
if (!
|
|
19001
|
-
let i = await hh(["https://www.googleapis.com/auth/adwords"]), a =
|
|
18996
|
+
async function e_({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", languageCode: r = "it" }) {
|
|
18997
|
+
if (!Yg?.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"), [];
|
|
18998
|
+
let i = await hh(["https://www.googleapis.com/auth/adwords"]), a = Qg(n), o = $g(r), s = `https://googleads.googleapis.com/v13/customers/${t}:generateKeywordIdeas`, c = {
|
|
19002
18999
|
keywordSeed: { keywords: [e] },
|
|
19003
19000
|
geoTargetConstants: [a],
|
|
19004
19001
|
language: o
|
|
@@ -19006,7 +19003,7 @@ async function Yg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
19006
19003
|
method: "POST",
|
|
19007
19004
|
headers: {
|
|
19008
19005
|
Authorization: `Bearer ${i}`,
|
|
19009
|
-
"developer-token":
|
|
19006
|
+
"developer-token": Yg.developerToken,
|
|
19010
19007
|
"Content-Type": "application/json"
|
|
19011
19008
|
},
|
|
19012
19009
|
body: JSON.stringify(c)
|
|
@@ -19024,7 +19021,7 @@ async function Yg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
19024
19021
|
}
|
|
19025
19022
|
//#endregion
|
|
19026
19023
|
//#region src/providers/seo/google/trend.ts
|
|
19027
|
-
async function
|
|
19024
|
+
async function t_(e, t = "IT", n = "today 12-m") {
|
|
19028
19025
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
19029
19026
|
comparisonItem: [{
|
|
19030
19027
|
keyword: e,
|
|
@@ -19044,7 +19041,7 @@ async function Xg(e, t = "IT", n = "today 12-m") {
|
|
|
19044
19041
|
}))
|
|
19045
19042
|
};
|
|
19046
19043
|
}
|
|
19047
|
-
async function
|
|
19044
|
+
async function n_(e, t = "IT", n = "today 12-m") {
|
|
19048
19045
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
19049
19046
|
comparisonItem: [{
|
|
19050
19047
|
keyword: e,
|
|
@@ -19070,13 +19067,13 @@ async function Zg(e, t = "IT", n = "today 12-m") {
|
|
|
19070
19067
|
}
|
|
19071
19068
|
//#endregion
|
|
19072
19069
|
//#region src/providers/storage/dropbox.tsx
|
|
19073
|
-
var
|
|
19070
|
+
var r_ = 5e3, i_ = "https://www.dropbox.com/home", a_ = void 0;
|
|
19074
19071
|
typeof wa == "function" && wa((e) => {
|
|
19075
|
-
|
|
19072
|
+
a_ = e.dropbox;
|
|
19076
19073
|
});
|
|
19077
|
-
var
|
|
19078
|
-
if (!
|
|
19079
|
-
let r = await bi(
|
|
19074
|
+
var o_ = async (e, t, n = {}) => {
|
|
19075
|
+
if (!a_) return console.error("DropBox: Config not found"), null;
|
|
19076
|
+
let r = await bi(a_.clientId);
|
|
19080
19077
|
if (!r) throw Error("DropBox: Access token not found");
|
|
19081
19078
|
return await fetch(e, {
|
|
19082
19079
|
method: "POST",
|
|
@@ -19089,12 +19086,12 @@ var t_ = async (e, t, n = {}) => {
|
|
|
19089
19086
|
}).catch((e) => (console.error("There was a problem with the fetch operation:", e), null)).finally(() => {
|
|
19090
19087
|
console.log("DropBox: Fetch operation completed");
|
|
19091
19088
|
});
|
|
19092
|
-
},
|
|
19093
|
-
if (!
|
|
19089
|
+
}, s_ = async (e, t, n = {}) => {
|
|
19090
|
+
if (!a_) {
|
|
19094
19091
|
console.error("DropBox: Config not found");
|
|
19095
19092
|
return;
|
|
19096
19093
|
}
|
|
19097
|
-
let r = await bi(
|
|
19094
|
+
let r = await bi(a_.clientId);
|
|
19098
19095
|
if (!r) {
|
|
19099
19096
|
console.error("DropBox: Access token not found");
|
|
19100
19097
|
return;
|
|
@@ -19119,47 +19116,47 @@ var t_ = async (e, t, n = {}) => {
|
|
|
19119
19116
|
}).finally(() => {
|
|
19120
19117
|
console.log("DropBox: Fetch operation completed", e, t);
|
|
19121
19118
|
});
|
|
19122
|
-
},
|
|
19123
|
-
let n =
|
|
19124
|
-
return (t ?
|
|
19125
|
-
},
|
|
19119
|
+
}, c_ = (e, t = !1) => {
|
|
19120
|
+
let n = a_?.rootPath || "";
|
|
19121
|
+
return (t ? i_ : "") + (e.startsWith(n) ? e : n + e);
|
|
19122
|
+
}, l_ = async (e, t = "", n = !1) => {
|
|
19126
19123
|
let r = {};
|
|
19127
|
-
return (await
|
|
19124
|
+
return (await C_.listFolders({
|
|
19128
19125
|
path: `${e + t}`,
|
|
19129
19126
|
recursive: !0
|
|
19130
19127
|
})).forEach((e) => {
|
|
19131
19128
|
e[".tag"] !== "folder" && (r[n ? ri.changeFilename(e.path_display, { ext: "" }) : e.path_display] = e.name);
|
|
19132
19129
|
}), r;
|
|
19133
|
-
},
|
|
19130
|
+
}, u_ = async (e, t) => {
|
|
19134
19131
|
if (!e.async_job_id) return Promise.reject(e);
|
|
19135
19132
|
let n, r = !0;
|
|
19136
|
-
for (; r;) await ut(100), n = await
|
|
19133
|
+
for (; r;) await ut(100), n = await s_(`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);
|
|
19137
19134
|
return n?.[".tag"] === "complete" ? Promise.resolve(n.entries) : Promise.reject(n);
|
|
19138
|
-
},
|
|
19139
|
-
let n = "files/create_folder_batch", r = await
|
|
19135
|
+
}, d_ = async (e, t = "") => {
|
|
19136
|
+
let n = "files/create_folder_batch", r = await s_(`https://api.dropboxapi.com/2/${n}`, {
|
|
19140
19137
|
autorename: !1,
|
|
19141
19138
|
force_async: !0,
|
|
19142
|
-
paths: e.map((e) =>
|
|
19139
|
+
paths: e.map((e) => c_(t + e))
|
|
19143
19140
|
});
|
|
19144
|
-
return r ?
|
|
19145
|
-
},
|
|
19146
|
-
let n = "files/create_folder_batch", r = await
|
|
19147
|
-
return r ?
|
|
19148
|
-
},
|
|
19141
|
+
return r ? u_(r, n) : void 0;
|
|
19142
|
+
}, f_ = async (e, t = "") => {
|
|
19143
|
+
let n = "files/create_folder_batch", r = await s_(`https://api.dropboxapi.com/2/${n}`, { entries: e.map((e) => ({ path: c_(t + e) })) });
|
|
19144
|
+
return r ? u_(r, n) : void 0;
|
|
19145
|
+
}, p_ = async (e, t) => s_("https://api.dropboxapi.com/2/files/tags/add", {
|
|
19149
19146
|
path: e,
|
|
19150
19147
|
tag_text: t.toLowerCase().replaceAll(/[^a-z0-9]/g, "")
|
|
19151
|
-
}),
|
|
19152
|
-
for (let n in e) for (let r of e[n]) await c_(
|
|
19153
|
-
},
|
|
19154
|
-
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await
|
|
19148
|
+
}), m_ = async (e, t = "") => {
|
|
19149
|
+
for (let n in e) for (let r of e[n]) await p_(c_(t + n), r);
|
|
19150
|
+
}, h_ = async ({ path: e = "", recursive: t = !1 } = {}) => {
|
|
19151
|
+
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await s_("https://api.dropboxapi.com/2/files/list_folder", {
|
|
19155
19152
|
include_deleted: !1,
|
|
19156
19153
|
include_has_explicit_shared_members: !1,
|
|
19157
19154
|
include_media_info: !1,
|
|
19158
19155
|
include_mounted_folders: !0,
|
|
19159
19156
|
include_non_downloadable_files: !0,
|
|
19160
|
-
path:
|
|
19157
|
+
path: c_(e),
|
|
19161
19158
|
recursive: n
|
|
19162
|
-
}) : await
|
|
19159
|
+
}) : await s_("https://api.dropboxapi.com/2/files/list_folder/continue", { cursor: t }), i = {
|
|
19163
19160
|
has_more: !0,
|
|
19164
19161
|
cursor: "",
|
|
19165
19162
|
entries: []
|
|
@@ -19172,44 +19169,44 @@ var t_ = async (e, t, n = {}) => {
|
|
|
19172
19169
|
recursive: t
|
|
19173
19170
|
}), i && n.push(...i.entries);
|
|
19174
19171
|
return n;
|
|
19175
|
-
},
|
|
19176
|
-
let t = async (e) => await
|
|
19172
|
+
}, g_ = async (e) => {
|
|
19173
|
+
let t = async (e) => await s_("https://api.dropboxapi.com/2/files/copy_batch_v2", {
|
|
19177
19174
|
entries: e,
|
|
19178
19175
|
autorename: !1
|
|
19179
|
-
}), n = async (e) => await
|
|
19176
|
+
}), n = async (e) => await s_("https://api.dropboxapi.com/2/files/copy_batch/check_v2", { async_job_id: e }), r = [], i = [];
|
|
19180
19177
|
for (let a = 0; a < e.length; a += 900) {
|
|
19181
19178
|
i = e.slice(a, a + 900).map((e) => ({
|
|
19182
|
-
from_path:
|
|
19183
|
-
to_path:
|
|
19179
|
+
from_path: c_(e.from),
|
|
19180
|
+
to_path: c_(e.to)
|
|
19184
19181
|
}));
|
|
19185
19182
|
let o = await t(i);
|
|
19186
19183
|
if (!o) continue;
|
|
19187
19184
|
if (o.error) throw Error(`Error starting copy: ${o.error}`);
|
|
19188
19185
|
let s = o;
|
|
19189
|
-
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await ut(
|
|
19186
|
+
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await ut(r_), s = await n(o.async_job_id ?? "");
|
|
19190
19187
|
if (s?.[".tag"] === "failed") throw Error(`Copy operation failed: ${s[".tag"]}`);
|
|
19191
19188
|
s?.[".tag"] === "complete" && s.entries && r.push(...s.entries);
|
|
19192
19189
|
}
|
|
19193
19190
|
return r.filter((e) => e[".tag"] === "failure").map((e) => e.failure);
|
|
19194
|
-
},
|
|
19195
|
-
let t = async (e) => await
|
|
19191
|
+
}, __ = async (e) => {
|
|
19192
|
+
let t = async (e) => await s_("https://api.dropboxapi.com/2/files/move_v2", {
|
|
19196
19193
|
...e,
|
|
19197
19194
|
autorename: !0
|
|
19198
19195
|
});
|
|
19199
19196
|
for (let n of e) await t({
|
|
19200
|
-
from_path:
|
|
19201
|
-
to_path:
|
|
19197
|
+
from_path: c_(n.from),
|
|
19198
|
+
to_path: c_(n.to)
|
|
19202
19199
|
});
|
|
19203
|
-
},
|
|
19200
|
+
}, v_ = async ({ thumbnailsRequest: e = [], size: t = "w64h64", format: n = "jpeg", mode: r = "strict" }, i) => {
|
|
19204
19201
|
let a = {}, o = [];
|
|
19205
19202
|
for (let s = 0; s < e.length; s += 25) {
|
|
19206
19203
|
let c = e.slice(s, s + 25), l = c.map((e) => ({
|
|
19207
|
-
path:
|
|
19204
|
+
path: c_(e.path),
|
|
19208
19205
|
format: n,
|
|
19209
19206
|
size: t,
|
|
19210
19207
|
mode: r
|
|
19211
19208
|
}));
|
|
19212
|
-
await ut(100), o.push(
|
|
19209
|
+
await ut(100), o.push(s_("https://content.dropboxapi.com/2/files/get_thumbnail_batch", { entries: l }).then((e) => {
|
|
19213
19210
|
if (!e) return;
|
|
19214
19211
|
let n = e.entries.reduce((e, n, r) => {
|
|
19215
19212
|
let i = c[r].path, [a, o] = t.replace("w", "").split("h").map(Number), s = n;
|
|
@@ -19228,7 +19225,7 @@ var t_ = async (e, t, n = {}) => {
|
|
|
19228
19225
|
}));
|
|
19229
19226
|
}
|
|
19230
19227
|
return Promise.all(o).then(() => a);
|
|
19231
|
-
},
|
|
19228
|
+
}, y_ = (e, t = "application/octet-stream", n = 512) => {
|
|
19232
19229
|
let r = atob(e), i = [];
|
|
19233
19230
|
for (let e = 0; e < r.length; e += n) {
|
|
19234
19231
|
let t = r.slice(e, e + n), a = Array(t.length);
|
|
@@ -19237,11 +19234,11 @@ var t_ = async (e, t, n = {}) => {
|
|
|
19237
19234
|
i.push(o);
|
|
19238
19235
|
}
|
|
19239
19236
|
return new Blob(i, { type: t });
|
|
19240
|
-
},
|
|
19237
|
+
}, b_ = async (e, t) => {
|
|
19241
19238
|
try {
|
|
19242
19239
|
let n = t.split(",")[1];
|
|
19243
|
-
|
|
19244
|
-
path:
|
|
19240
|
+
o_("https://content.dropboxapi.com/2/files/upload", y_(n, "application/octet-stream"), { "Dropbox-API-Arg": JSON.stringify({
|
|
19241
|
+
path: c_(e),
|
|
19245
19242
|
mode: "overwrite",
|
|
19246
19243
|
autorename: !0,
|
|
19247
19244
|
mute: !1
|
|
@@ -19251,12 +19248,12 @@ var t_ = async (e, t, n = {}) => {
|
|
|
19251
19248
|
} catch (e) {
|
|
19252
19249
|
console.error("Errore durante il caricamento su Dropbox:", e);
|
|
19253
19250
|
}
|
|
19254
|
-
},
|
|
19255
|
-
if (!
|
|
19251
|
+
}, x_ = (e = !1) => a_ ? _i(a_.clientId, e) : !1, S_ = (e = {}) => {
|
|
19252
|
+
if (!a_) return /* @__PURE__ */ t.createElement("div", {
|
|
19256
19253
|
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.",
|
|
19257
19254
|
className: "text-danger flex items-center gap-2"
|
|
19258
19255
|
}, /* @__PURE__ */ t.createElement(Q, { name: "warning" }), /* @__PURE__ */ t.createElement("span", null, "Dropbox non configurato"));
|
|
19259
|
-
let n =
|
|
19256
|
+
let n = x_(!0);
|
|
19260
19257
|
return /* @__PURE__ */ t.createElement(Si, {
|
|
19261
19258
|
provider: "dropboxAuth",
|
|
19262
19259
|
intent: "connect",
|
|
@@ -19268,33 +19265,33 @@ var t_ = async (e, t, n = {}) => {
|
|
|
19268
19265
|
title: n ? "DropBox Connected" : "DropBox Disconnected"
|
|
19269
19266
|
}
|
|
19270
19267
|
});
|
|
19271
|
-
},
|
|
19268
|
+
}, C_ = {
|
|
19272
19269
|
setRootPath: (e) => {
|
|
19273
|
-
|
|
19270
|
+
a_ && (a_.rootPath = e);
|
|
19274
19271
|
},
|
|
19275
|
-
resolvePath:
|
|
19276
|
-
createFolders:
|
|
19277
|
-
deleteBulk:
|
|
19278
|
-
addTags:
|
|
19279
|
-
listFolders:
|
|
19280
|
-
getThumbnails:
|
|
19281
|
-
search:
|
|
19282
|
-
upload:
|
|
19283
|
-
copy:
|
|
19284
|
-
move:
|
|
19285
|
-
},
|
|
19272
|
+
resolvePath: c_,
|
|
19273
|
+
createFolders: d_,
|
|
19274
|
+
deleteBulk: f_,
|
|
19275
|
+
addTags: m_,
|
|
19276
|
+
listFolders: h_,
|
|
19277
|
+
getThumbnails: v_,
|
|
19278
|
+
search: l_,
|
|
19279
|
+
upload: b_,
|
|
19280
|
+
copy: g_,
|
|
19281
|
+
move: __
|
|
19282
|
+
}, w_ = "https://api.serpapi.com/search", T_ = "google", E_ = "google_images", D_ = "google_autocomplete", O_ = "google_trends", k_ = "google_maps", A_ = "google_maps_photos", j_ = "google_maps_reviews", M_ = {
|
|
19286
19283
|
engine: null,
|
|
19287
19284
|
device: null,
|
|
19288
19285
|
no_cache: !1,
|
|
19289
19286
|
async: !1,
|
|
19290
19287
|
output: "json"
|
|
19291
|
-
},
|
|
19288
|
+
}, N_ = { q: null }, P_ = {
|
|
19292
19289
|
tbs: null,
|
|
19293
19290
|
safe: "active",
|
|
19294
19291
|
nfpr: 0,
|
|
19295
19292
|
filter: 1
|
|
19296
19293
|
};
|
|
19297
|
-
function
|
|
19294
|
+
function F_(e) {
|
|
19298
19295
|
let t = Rc(), n = Rc(!0), r = zc(!0), i = {
|
|
19299
19296
|
location: t,
|
|
19300
19297
|
uule: null
|
|
@@ -19312,13 +19309,13 @@ function A_(e) {
|
|
|
19312
19309
|
hl: r
|
|
19313
19310
|
};
|
|
19314
19311
|
return {
|
|
19315
|
-
[
|
|
19316
|
-
...
|
|
19312
|
+
[T_]: {
|
|
19313
|
+
...M_,
|
|
19317
19314
|
...i,
|
|
19318
19315
|
...o,
|
|
19319
|
-
...
|
|
19320
|
-
...
|
|
19321
|
-
engine:
|
|
19316
|
+
...P_,
|
|
19317
|
+
...N_,
|
|
19318
|
+
engine: T_,
|
|
19322
19319
|
ludocid: null,
|
|
19323
19320
|
lsig: null,
|
|
19324
19321
|
kgmid: null,
|
|
@@ -19327,29 +19324,29 @@ function A_(e) {
|
|
|
19327
19324
|
start: null,
|
|
19328
19325
|
num: null
|
|
19329
19326
|
},
|
|
19330
|
-
[
|
|
19331
|
-
...
|
|
19327
|
+
[E_]: {
|
|
19328
|
+
...M_,
|
|
19332
19329
|
...i,
|
|
19333
19330
|
...o,
|
|
19334
|
-
...
|
|
19335
|
-
...
|
|
19336
|
-
engine:
|
|
19331
|
+
...P_,
|
|
19332
|
+
...N_,
|
|
19333
|
+
engine: E_,
|
|
19337
19334
|
chips: null,
|
|
19338
19335
|
ijn: null
|
|
19339
19336
|
},
|
|
19340
|
-
[
|
|
19341
|
-
...
|
|
19337
|
+
[D_]: {
|
|
19338
|
+
...M_,
|
|
19342
19339
|
...o,
|
|
19343
|
-
...
|
|
19344
|
-
engine:
|
|
19340
|
+
...N_,
|
|
19341
|
+
engine: D_,
|
|
19345
19342
|
cp: null,
|
|
19346
19343
|
client: null
|
|
19347
19344
|
},
|
|
19348
|
-
[
|
|
19349
|
-
...
|
|
19345
|
+
[O_]: {
|
|
19346
|
+
...M_,
|
|
19350
19347
|
...a,
|
|
19351
|
-
...
|
|
19352
|
-
engine:
|
|
19348
|
+
...N_,
|
|
19349
|
+
engine: O_,
|
|
19353
19350
|
data_type: null,
|
|
19354
19351
|
tz: null,
|
|
19355
19352
|
cat: null,
|
|
@@ -19357,73 +19354,73 @@ function A_(e) {
|
|
|
19357
19354
|
date: null,
|
|
19358
19355
|
csv: null
|
|
19359
19356
|
},
|
|
19360
|
-
[
|
|
19361
|
-
...
|
|
19357
|
+
[k_]: {
|
|
19358
|
+
...M_,
|
|
19362
19359
|
...i,
|
|
19363
19360
|
...o,
|
|
19364
|
-
...
|
|
19365
|
-
...
|
|
19366
|
-
engine:
|
|
19361
|
+
...P_,
|
|
19362
|
+
...N_,
|
|
19363
|
+
engine: k_
|
|
19367
19364
|
},
|
|
19368
|
-
[
|
|
19369
|
-
...
|
|
19365
|
+
[A_]: {
|
|
19366
|
+
...M_,
|
|
19370
19367
|
...s,
|
|
19371
|
-
engine:
|
|
19368
|
+
engine: A_
|
|
19372
19369
|
},
|
|
19373
|
-
[
|
|
19374
|
-
...
|
|
19370
|
+
[j_]: {
|
|
19371
|
+
...M_,
|
|
19375
19372
|
...s,
|
|
19376
|
-
engine:
|
|
19373
|
+
engine: j_
|
|
19377
19374
|
}
|
|
19378
19375
|
}[e] ?? {};
|
|
19379
19376
|
}
|
|
19380
|
-
var
|
|
19377
|
+
var I_ = void 0;
|
|
19381
19378
|
typeof wa == "function" && wa((e) => {
|
|
19382
|
-
|
|
19379
|
+
I_ = e.scrape;
|
|
19383
19380
|
});
|
|
19384
|
-
function
|
|
19381
|
+
function L_(e) {
|
|
19385
19382
|
let t = {};
|
|
19386
19383
|
for (let n in e) e[n] !== null && (t[n] = e[n]);
|
|
19387
19384
|
return t;
|
|
19388
19385
|
}
|
|
19389
|
-
var
|
|
19390
|
-
function
|
|
19391
|
-
let t =
|
|
19392
|
-
return t.length === 0 ? null : (e &&
|
|
19386
|
+
var R_ = 0;
|
|
19387
|
+
function z_(e = !1) {
|
|
19388
|
+
let t = I_?.serpApiKey?.split(",").map((e) => e.trim()).filter(Boolean) || [];
|
|
19389
|
+
return t.length === 0 ? null : (e && R_++, R_ < t.length ? t[R_] : null);
|
|
19393
19390
|
}
|
|
19394
|
-
var
|
|
19391
|
+
var B_ = async (e, t) => {
|
|
19395
19392
|
let n = (n) => {
|
|
19396
|
-
let r =
|
|
19397
|
-
...
|
|
19393
|
+
let r = L_({
|
|
19394
|
+
...F_(t),
|
|
19398
19395
|
api_key: n,
|
|
19399
19396
|
q: e
|
|
19400
19397
|
});
|
|
19401
|
-
return console.log(
|
|
19402
|
-
}, r =
|
|
19398
|
+
return console.log(w_, r), `${w_}?${new URLSearchParams(r)}`;
|
|
19399
|
+
}, r = z_();
|
|
19403
19400
|
for (; r;) try {
|
|
19404
19401
|
return await Wt(n(r));
|
|
19405
19402
|
} catch (e) {
|
|
19406
19403
|
if (e?.error === "quota_exceeded") {
|
|
19407
|
-
console.warn(`SerpApi: invalid api key: ${r}`, e), r =
|
|
19404
|
+
console.warn(`SerpApi: invalid api key: ${r}`, e), r = z_(!0);
|
|
19408
19405
|
continue;
|
|
19409
19406
|
}
|
|
19410
19407
|
throw console.error(`SerpApi: ${r}`, e), e;
|
|
19411
19408
|
}
|
|
19412
19409
|
return null;
|
|
19413
|
-
},
|
|
19410
|
+
}, V_ = async (e, t, n) => {
|
|
19414
19411
|
let r = `${ka}/${ct(t)}/${ct(e)}`, i = await n.read(r);
|
|
19415
19412
|
if (i) return i;
|
|
19416
|
-
let a = await
|
|
19413
|
+
let a = await B_(e, t);
|
|
19417
19414
|
return a ? n.set(r, a) : console.warn(`SerpApi ${t}: No Result`), a ?? {};
|
|
19418
|
-
},
|
|
19419
|
-
googleSearch: async (t) =>
|
|
19420
|
-
googleImages: async (t) =>
|
|
19421
|
-
googleAutocomplete: async (t) =>
|
|
19422
|
-
googleTrends: async (t) =>
|
|
19423
|
-
googleMaps: async (t) =>
|
|
19424
|
-
googleMapsPhotos: async (t) =>
|
|
19425
|
-
googleMapsReviews: async (t) =>
|
|
19426
|
-
}),
|
|
19415
|
+
}, H_ = (e) => ({
|
|
19416
|
+
googleSearch: async (t) => V_(t, T_, e),
|
|
19417
|
+
googleImages: async (t) => V_(t, E_, e),
|
|
19418
|
+
googleAutocomplete: async (t) => V_(t, D_, e),
|
|
19419
|
+
googleTrends: async (t) => V_(t, O_, e),
|
|
19420
|
+
googleMaps: async (t) => V_(t, k_, e),
|
|
19421
|
+
googleMapsPhotos: async (t) => V_(t, A_, e),
|
|
19422
|
+
googleMapsReviews: async (t) => V_(t, j_, e)
|
|
19423
|
+
}), U_ = {
|
|
19427
19424
|
"+": "+",
|
|
19428
19425
|
"﹢": "+",
|
|
19429
19426
|
"-": "-",
|
|
@@ -19498,7 +19495,7 @@ var F_ = async (e, t) => {
|
|
|
19498
19495
|
x: "x",
|
|
19499
19496
|
y: "y",
|
|
19500
19497
|
z: "z"
|
|
19501
|
-
},
|
|
19498
|
+
}, W_ = {
|
|
19502
19499
|
email: {
|
|
19503
19500
|
description: "Email: no spaces -> Lower/Trim",
|
|
19504
19501
|
transformations: [{
|
|
@@ -19544,7 +19541,7 @@ var F_ = async (e, t) => {
|
|
|
19544
19541
|
transformations: [],
|
|
19545
19542
|
mask: ["toSlug"]
|
|
19546
19543
|
}
|
|
19547
|
-
},
|
|
19544
|
+
}, G_ = [
|
|
19548
19545
|
{
|
|
19549
19546
|
pattern: "email*",
|
|
19550
19547
|
use: "email"
|
|
@@ -19561,24 +19558,24 @@ var F_ = async (e, t) => {
|
|
|
19561
19558
|
pattern: "date*",
|
|
19562
19559
|
use: "date"
|
|
19563
19560
|
}
|
|
19564
|
-
],
|
|
19565
|
-
function
|
|
19566
|
-
return e ? e.normalize("NFKC").replace(
|
|
19561
|
+
], K_ = new RegExp(Object.keys(U_).join("|"), "g");
|
|
19562
|
+
function q_(e) {
|
|
19563
|
+
return e ? e.normalize("NFKC").replace(K_, (e) => U_[e] ?? e) : "";
|
|
19567
19564
|
}
|
|
19568
|
-
var
|
|
19565
|
+
var J_ = class {
|
|
19569
19566
|
config;
|
|
19570
19567
|
matches;
|
|
19571
19568
|
constructor(e = {}, t = []) {
|
|
19572
19569
|
this.config = {
|
|
19573
|
-
...
|
|
19570
|
+
...W_,
|
|
19574
19571
|
...e
|
|
19575
|
-
}, this.matches = [...
|
|
19572
|
+
}, this.matches = [...G_, ...t];
|
|
19576
19573
|
}
|
|
19577
19574
|
apply(e, t, n = !1) {
|
|
19578
19575
|
let r = this.config[e];
|
|
19579
19576
|
if (!r) return n ? It(t) : t;
|
|
19580
19577
|
let i = t;
|
|
19581
|
-
i =
|
|
19578
|
+
i = q_(String(i ?? ""));
|
|
19582
19579
|
let a = r.exclusions;
|
|
19583
19580
|
if (Array.isArray(a) && a.length) {
|
|
19584
19581
|
let e = String(i).toLowerCase();
|
|
@@ -19637,7 +19634,7 @@ var U_ = class {
|
|
|
19637
19634
|
};
|
|
19638
19635
|
//#endregion
|
|
19639
19636
|
//#region src/libs/csv.ts
|
|
19640
|
-
function
|
|
19637
|
+
function Y_(e, t) {
|
|
19641
19638
|
let n = Oe.parse(e, {
|
|
19642
19639
|
header: !0,
|
|
19643
19640
|
skipEmptyLines: !0,
|
|
@@ -19650,6 +19647,6 @@ function W_(e, t) {
|
|
|
19650
19647
|
};
|
|
19651
19648
|
}
|
|
19652
19649
|
//#endregion
|
|
19653
|
-
export { $c as AIProvider,
|
|
19650
|
+
export { $c as AIProvider, Ug as AI_PROVIDER_DEFINITIONS, Gg as AI_PROVIDER_DESCRIPTORS, Hr as ActionButton, Gf as AddressAutocomplete, Io as Alert, Dg as App, Eg 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, Kh as CLOUDFLARE_PROVIDER_DESCRIPTOR, Ll as CONTEXT_MENU_SEARCH_THRESHOLD, ji as Card, ta as Carousel, uu as Chatbot, js as Checkbox, Ys as Checklist, Go as Code, Zu as CodeEditor, Mu as CodeSyntaxError, Jn as Col, Ss as Color, xd as Component, Sd as ComponentBlock, Kn as Container, $l as ContextMenu, yc as CropImage, wp as DEFAULT_DOCUMENT_HEAD, Cp as DEFAULT_HEAD_APP_NAME, Tp as DEFAULT_LANGUAGE_HEAD, Is as DEFAULT_ORDER, wi as DataProvider, Cs as Date, Ts as DateTime, Lg as DirectApiProviderAdapter, S_ as DropBoxConnectButton, mh as DropboxAuthProvider, Ri as Dropdown, Bi as DropdownButton, Ui as DropdownDivider, Hi as DropdownHeader, Vi as DropdownItem, Wi as DropdownMenu, Vg as EMAIL_PROVIDER_DEFINITIONS, bs as Email, Bm as EmailProvider, hs as FieldError, Ec as FileNameEditor, zg as FirebaseApiProviderAdapter, sh as FirebaseAuthProvider, rh as FirebaseDataProvider, So as FirebaseStorageProvider, Ya as FirestoreDataProvider, Xd as Form, Fd as FormControllerContext, dm as Gallery, _h as GmailEmailProvider, Wr as GoSite, Rm as GoogleAuthProvider, Mf as GoogleMapsProvider, fh as GoogleServiceAccountProvider, Em as Grid, Tm as GridArray, wm as GridCore, sp as GridDB, fm as GridGalleryView, bp as GridTableView, em as Head, Hp 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, Af as LayoutBuilder, Jf as ListCard, Fs as ListGroup, Ei as Loader, Vr as LoadingButton, qo as LocaleSwitcher, dr as LucideIconProvider, cm as MarkdownReader, Ii as Menu, Rg as MockApiProviderAdapter, go as MockDataProvider, Mi as Modal, Fi as ModalOk, Pi as ModalYesNo, Ds as Month, U_ as NORMALIZE_MAP, na as Notifications, ys as Number, Kg as OPENAI_COMPATIBLE_PROVIDER_DESCRIPTOR, zs as Order, Hg as PUBLISH_PROVIDER_DEFINITIONS, Dm as PageUsers, um as Pagination, xs as Password, $o as Percentage, mr as PhosphorIconProvider, Su as Prompt, du as PromptMode, Il as PromptUtils, No as ProviderSwitcher, Os as Range, Gr as ReferSite, cf as Repeat, yd as RichText, qn as Row, J_ as Sanitizer, ia as Search, qs as Select, ip as SideNav, cc as StorageProvider, vs as String, Bg as SupabaseApiProviderAdapter, yh as SupabaseAuthProvider, co as SupabaseDataProvider, Co as SupabaseStorageProvider, Ms as Switch, gf as Tab, lm as TabDynamic, mf as TabItem, pf as TabLayouts, yf as Table, Ps as TextArea, ma as ThemeSwitcher, ws as Time, sa as Toolbar, Kf 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, Xl 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, al as configureProxy, et as converter, it as copyToClipboard, gt as crc32, Jg as createAIProviderRegistry, Gh as createCloudflareProviderDefinition, rr as createMotionTransition, En as createTranslations, rt as decodeJWT, Tn as defineLocaleMessages, lt as dirname, C_ 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, Xc as formatAIModelRef, dt as generateUniqueId, kl as getAIModelCatalog, bi as getAccessToken, ql as getAutoClosedSuffixLength, Hu as getCodeValidationResult, Nc as getFileUrl, Zr as getGlobalVars, t_ as getGoogleTrendsData, n_ as getGoogleTrendsRelated, e_ as getKeywordIdeas, si as getProviderConfigurationState, Mt as getRecordValue, uf as getTabLayoutConfig, ff as getTabPaneClassName, df as getTabTriggerClassName, hh as googleGetAccessToken, Kl as hasAutoClosedSuffix, Dn as interpolate, yt as intersectObjects, Yn as isBadgeDescriptor, St as isEmpty, Yc as isFreeAIModel, tu as isFreeModelOption, Ot as isInteractiveElement, cl as isProxyEnabled, If as loadGoogleMaps, vt as loadScripts, Pg as locales, Jl as matchCommandTrigger, Xn as normalizeBadgeProps, ct as normalizeKey, ot as normalizePath, q_ as normalizeVisualChars, Zc as parseAIModelRef, Y_ as parseCsvText, ri as path, ol as proxyFetch, Ft as recordsEqual, To as registerProviderSessionFactory, $r as removeGlobalVars, kt as render2Base64, mt as replacePlaceholders, bt as replaceVariables, ir as resolveMotionEffect, ju as runPrompt, wt as safeClone, Dt as sanitizeKey, H_ as scrape, gh as sendEmail, Qr as setGlobalVars, ut as sleep, It as smartTypeCast, pt as substrCount, Wg as toProviderDescriptor, at as trimPath, st as trimSlash, _t as ucfirst, el as useAIProvider, tl as useAIProviderRegistry, _i as useAccessToken, Fg as useApiProvider, Zp as useAssetsHead, ni as useAuthProvider, Wm as useCredentialsProvider, Ti as useDataProvider, Xp as useDocumentHead, x_ as useDropBoxConnect, ts as useEditorHeight, Vm as useEmailProvider, cr as useEnterMotion, Dc as useFileUploadCore, Ld as useFormActions, Kd as useFormContext, Id as useFormController, Xr as useGlobalVars, Nf as useGoogleMapsConfig, Gp as useHead, qp as useHeadLinks, Fn as useI18n, wr as useIconController, Cr as useIconProvider, ec as useImage, Yp as useLanguageHead, Og as useMenu, ar as useMotionEffect, or as useMotionState, Jp as usePaginationHead, sr as usePressMotion, ya as useProvider, jo as useProviderSession, sl as useProxy, Qp as usePwaHead, $p as useSchemaOrgHead, va as useSetProvider, Kp as useSocialHead, lc as useStorageProvider, Y as useTheme, Cn as useThemeController, Vu as validateCodeSyntax };
|
|
19654
19651
|
|
|
19655
19652
|
//# sourceMappingURL=index.mjs.map
|