gentiq 0.7.32 → 0.8.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.
@@ -1,10 +1,10 @@
1
- import { jsx as i, Fragment as J, jsxs as _ } from "react/jsx-runtime";
1
+ import { jsx as i, Fragment as J, jsxs as w } from "react/jsx-runtime";
2
2
  import * as Ce from "react";
3
3
  import { createContext as de, useContext as Fe, useState as B, useEffect as Q, useCallback as oe, useMemo as St, Children as cn, useRef as Ge, memo as pe } from "react";
4
4
  import { useTranslation as M, initReactI18next as un } from "react-i18next";
5
5
  import { Slot as Et } from "@radix-ui/react-slot";
6
6
  import { cva as De } from "class-variance-authority";
7
- import { ArrowDownIcon as dn, ChevronDownIcon as ie, BookIcon as pn, XIcon as he, CheckIcon as Pe, ArrowUpIcon as hn, Loader2Icon as gn, SquareIcon as mn, FileIcon as Nt, PaperclipIcon as fn, MessageCircle as bn, RefreshCcwIcon as yn, ThumbsUpIcon as kn, ThumbsDownIcon as vn, CopyIcon as Tt, BrainIcon as wn, WrenchIcon as _n, ImagePlusIcon as xn, CodeIcon as Sn, DownloadIcon as ue, GlobeIcon as En, XCircleIcon as Ct, CheckCircleIcon as Nn, ClockIcon as Tn, CircleIcon as Cn, ChevronUpIcon as An } from "lucide-react";
7
+ import { ArrowDownIcon as dn, ChevronDownIcon as ie, BookIcon as pn, XIcon as he, CheckIcon as Pe, ArrowUpIcon as hn, Loader2Icon as gn, SquareIcon as mn, FileIcon as Nt, PaperclipIcon as fn, MessageCircle as bn, RefreshCcwIcon as yn, ThumbsUpIcon as kn, ThumbsDownIcon as vn, CopyIcon as Tt, BrainIcon as _n, WrenchIcon as wn, ImagePlusIcon as xn, CodeIcon as Sn, DownloadIcon as ue, GlobeIcon as En, XCircleIcon as Ct, CheckCircleIcon as Nn, ClockIcon as Tn, CircleIcon as Cn, ChevronUpIcon as An } from "lucide-react";
8
8
  import * as K from "@radix-ui/react-tooltip";
9
9
  import { toast as In } from "sonner";
10
10
  import "@radix-ui/react-scroll-area";
@@ -48,15 +48,15 @@ function xi({
48
48
  Q(() => {
49
49
  const u = window.document.documentElement;
50
50
  if (u.classList.remove("light", "dark"), g === "system") {
51
- const w = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
52
- u.classList.add(w);
51
+ const _ = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
52
+ u.classList.add(_);
53
53
  return;
54
54
  }
55
55
  u.classList.add(g);
56
56
  }, [g]), Q(() => {
57
- const u = window.document.documentElement, w = m.language?.split("-")[0] || m.language;
57
+ const u = window.document.documentElement, _ = m.language?.split("-")[0] || m.language;
58
58
  let v = o?.typography?.fontFamily;
59
- if (typeof v == "object" && v !== null && (v = v[m.language] || v[w] || v.en || Object.values(v)[0]), v) {
59
+ if (typeof v == "object" && v !== null && (v = v[m.language] || v[_] || v.en || Object.values(v)[0]), v) {
60
60
  const C = v.includes(" ") && !v.startsWith("'") && !v.startsWith('"') ? `"${v}"` : v;
61
61
  u.style.setProperty("--gentiq-font-family", C), u.style.fontFamily = C, window.document.body && (window.document.body.style.fontFamily = C);
62
62
  }
@@ -417,7 +417,7 @@ function qn(e) {
417
417
  renderMessagePart: p,
418
418
  chat: f,
419
419
  readonly: m
420
- } = e, { showToolDetails: g } = Hn(), { TextPart: b, ReasoningPart: y, ToolPart: u, FilePart: w, toolComponents: v, threadActions: h } = W(), { feedback: C, handleFeedback: E, copy: R } = $n(n, c);
420
+ } = e, { showToolDetails: g } = Hn(), { TextPart: b, ReasoningPart: y, ToolPart: u, FilePart: _, toolComponents: v, threadActions: h } = W(), { feedback: C, handleFeedback: E, copy: R } = $n(n, c);
421
421
  if (p) {
422
422
  const O = p(t, n);
423
423
  if (O !== void 0)
@@ -462,7 +462,7 @@ function qn(e) {
462
462
  showToolCalls: !!g
463
463
  }
464
464
  ) : t.type === "file" ? /* @__PURE__ */ i(
465
- w,
465
+ _,
466
466
  {
467
467
  part: t,
468
468
  message: n
@@ -593,7 +593,7 @@ function $e({ ...e }) {
593
593
  }
594
594
  const Xn = ({ className: e, ...t }) => /* @__PURE__ */ i(ze, { className: k("not-prose mb-4 text-primary text-xs", e), ...t }), Kn = ({ className: e, count: t, children: n, ...o }) => {
595
595
  const { t: r } = M(["chat"]);
596
- return /* @__PURE__ */ i(Ue, { className: k("flex items-center gap-2", e), ...o, children: n ?? /* @__PURE__ */ _(J, { children: [
596
+ return /* @__PURE__ */ i(Ue, { className: k("flex items-center gap-2", e), ...o, children: n ?? /* @__PURE__ */ w(J, { children: [
597
597
  /* @__PURE__ */ i("p", { className: "font-medium", children: r("used_sources", { count: t }) }),
598
598
  /* @__PURE__ */ i(ie, { className: "h-4 w-4" })
599
599
  ] }) });
@@ -607,7 +607,7 @@ const Xn = ({ className: e, ...t }) => /* @__PURE__ */ i(ze, { className: k("not
607
607
  ),
608
608
  ...t
609
609
  }
610
- ), Jn = ({ href: e, title: t, children: n, ...o }) => /* @__PURE__ */ i("a", { className: "flex items-center gap-2", href: e, rel: "noreferrer", target: "_blank", ...o, children: n ?? /* @__PURE__ */ _(J, { children: [
610
+ ), Jn = ({ href: e, title: t, children: n, ...o }) => /* @__PURE__ */ i("a", { className: "flex items-center gap-2", href: e, rel: "noreferrer", target: "_blank", ...o, children: n ?? /* @__PURE__ */ w(J, { children: [
611
611
  /* @__PURE__ */ i(pn, { className: "h-4 w-4" }),
612
612
  /* @__PURE__ */ i("span", { className: "block font-medium", children: t })
613
613
  ] }) }), Qn = ({ latestProgress: e, parts: t }) => {
@@ -619,7 +619,7 @@ const Xn = ({ className: e, ...t }) => /* @__PURE__ */ i(ze, { className: k("not
619
619
  return /* @__PURE__ */ i("div", { className: k(
620
620
  "flex w-full py-3 mx-auto max-w-4xl px-4 md:px-0 animate-in-bubble",
621
621
  f === "rtl" ? "justify-end" : "justify-start"
622
- ), children: /* @__PURE__ */ _("div", { className: k("flex items-center gap-3 text-sm text-muted-foreground", f === "rtl" && "flex-row-reverse"), dir: f, children: [
622
+ ), children: /* @__PURE__ */ w("div", { className: k("flex items-center gap-3 text-sm text-muted-foreground", f === "rtl" && "flex-row-reverse"), dir: f, children: [
623
623
  s ? /* @__PURE__ */ i("div", { className: "size-4 animate-spin rounded-full border-2 border-primary border-r-transparent shrink-0" }) : p ? /* @__PURE__ */ i(he, { className: "size-4 text-destructive shrink-0" }) : /* @__PURE__ */ i(Pe, { className: "size-4 text-green-500 shrink-0" }),
624
624
  /* @__PURE__ */ i("span", { className: k("font-medium", s && "animate-pulse"), children: o })
625
625
  ] }) });
@@ -636,51 +636,51 @@ function eo({
636
636
  className: s,
637
637
  readonly: p
638
638
  }) {
639
- const { i18n: f, t: m } = M(["chat", "translation"]), g = f.language === "fa", { WelcomeScreen: b } = W(), y = e[e.length - 1], u = y?.role === "assistant" && (t === "ready" || y.parts.some((w) => w.type === "data-chat-finished"));
640
- return /* @__PURE__ */ _(Vn, { className: k("min-h-0 flex-1", s), children: [
641
- /* @__PURE__ */ _(Wn, { className: "max-w-4xl mx-auto w-full px-4 md:px-0 pb-32", dir: "ltr", children: [
642
- e.length === 0 && !n ? /* @__PURE__ */ i(b, { onSuggestionClick: l }) : e.map((w) => /* @__PURE__ */ _("div", { children: [
643
- w.role === "assistant" && w.parts.filter((v) => v.type === "source-url").length > 0 && /* @__PURE__ */ _(Xn, { children: [
644
- /* @__PURE__ */ i(Kn, { count: w.parts.filter((v) => v.type === "source-url").length }),
645
- w.parts.filter((v) => v.type === "source-url").map((v, h) => /* @__PURE__ */ i(Zn, { children: /* @__PURE__ */ i(Jn, { href: v.url, title: v.url }, `${w.id}-${h}`) }, `${w.id}-${h}`))
639
+ const { i18n: f, t: m } = M(["chat", "translation"]), g = f.language === "fa", { WelcomeScreen: b } = W(), y = e[e.length - 1], u = y?.role === "assistant" && (t === "ready" || y.parts.some((_) => _.type === "data-chat-finished"));
640
+ return /* @__PURE__ */ w(Vn, { className: k("min-h-0 flex-1", s), children: [
641
+ /* @__PURE__ */ w(Wn, { className: "max-w-4xl mx-auto w-full px-4 md:px-0 pb-32", dir: "ltr", children: [
642
+ e.length === 0 && !n ? /* @__PURE__ */ i(b, { onSuggestionClick: l }) : e.map((_) => /* @__PURE__ */ w("div", { children: [
643
+ _.role === "assistant" && _.parts.filter((v) => v.type === "source-url").length > 0 && /* @__PURE__ */ w(Xn, { children: [
644
+ /* @__PURE__ */ i(Kn, { count: _.parts.filter((v) => v.type === "source-url").length }),
645
+ _.parts.filter((v) => v.type === "source-url").map((v, h) => /* @__PURE__ */ i(Zn, { children: /* @__PURE__ */ i(Jn, { href: v.url, title: v.url }, `${_.id}-${h}`) }, `${_.id}-${h}`))
646
646
  ] }),
647
- w.parts.map((v, h) => /* @__PURE__ */ i(
647
+ _.parts.map((v, h) => /* @__PURE__ */ i(
648
648
  qn,
649
649
  {
650
650
  part: v,
651
- message: w,
651
+ message: _,
652
652
  status: t,
653
653
  index: h,
654
654
  regen: a,
655
- lastMessage: w.id === e.at(-1)?.id,
655
+ lastMessage: _.id === e.at(-1)?.id,
656
656
  conversationId: r,
657
657
  isFinished: u,
658
658
  chat: c,
659
659
  readonly: p
660
660
  },
661
- `${w.id}-${h}`
661
+ `${_.id}-${h}`
662
662
  ))
663
- ] }, w.id)),
663
+ ] }, _.id)),
664
664
  (() => {
665
665
  if (!y || y.role !== "assistant") return null;
666
- const w = y.parts.filter((h) => h.type === "data-progress-update");
667
- if (w.length === 0) return null;
668
- const v = w[w.length - 1];
666
+ const _ = y.parts.filter((h) => h.type === "data-progress-update");
667
+ if (_.length === 0) return null;
668
+ const v = _[_.length - 1];
669
669
  return v ? /* @__PURE__ */ i(Qn, { latestProgress: v, parts: y.parts }) : null;
670
670
  })(),
671
671
  (n || t === "submitted") && /* @__PURE__ */ i("div", { className: "animate-in-bubble", children: /* @__PURE__ */ i(fe, {}) }),
672
672
  t === "streaming" && (() => {
673
- const w = e[e.length - 1];
674
- return !w || w.role === "user" ? /* @__PURE__ */ i(fe, {}) : w.parts?.some(
673
+ const _ = e[e.length - 1];
674
+ return !_ || _.role === "user" ? /* @__PURE__ */ i(fe, {}) : _.parts?.some(
675
675
  (h) => h.type === "text" && h.text?.trim().length > 0 || h.type === "reasoning" || h.type === "tool-invocation" || h.type === "tool-call"
676
676
  ) ? null : /* @__PURE__ */ i(fe, {});
677
677
  })(),
678
- t === "error" && o && /* @__PURE__ */ i("div", { className: "mx-auto max-w-4xl w-full px-4 my-3 animate-in-bubble", children: /* @__PURE__ */ _("div", { className: k(
678
+ t === "error" && o && /* @__PURE__ */ i("div", { className: "mx-auto max-w-4xl w-full px-4 my-3 animate-in-bubble", children: /* @__PURE__ */ w("div", { className: k(
679
679
  "flex w-full items-start gap-3 px-4 py-3.5 rounded-xl bg-destructive/8 border border-destructive/15",
680
680
  g ? "border-r-2 border-r-destructive/60" : "border-l-2 border-l-destructive/60"
681
681
  ), dir: g ? "rtl" : "ltr", children: [
682
682
  /* @__PURE__ */ i("div", { className: "size-1.5 rounded-full bg-destructive mt-2 shrink-0" }),
683
- /* @__PURE__ */ _("div", { className: k("text-sm text-destructive/90 leading-relaxed flex-1", g ? "text-right" : "text-left"), children: [
683
+ /* @__PURE__ */ w("div", { className: k("text-sm text-destructive/90 leading-relaxed flex-1", g ? "text-right" : "text-left"), children: [
684
684
  /* @__PURE__ */ i("span", { className: "font-semibold", children: m("error") }),
685
685
  " ",
686
686
  o.message
@@ -823,7 +823,7 @@ function Ft({
823
823
  children: n,
824
824
  ...o
825
825
  }) {
826
- return /* @__PURE__ */ i(K.Portal, { children: /* @__PURE__ */ _(
826
+ return /* @__PURE__ */ i(K.Portal, { children: /* @__PURE__ */ w(
827
827
  K.Content,
828
828
  {
829
829
  "data-slot": "tooltip-content",
@@ -865,7 +865,7 @@ function co({
865
865
  Q(() => {
866
866
  !b && a === "/" && y.current && y.current.focus();
867
867
  }, [a, b]);
868
- const w = oe((E) => {
868
+ const _ = oe((E) => {
869
869
  if (E.target.files) {
870
870
  const R = Array.from(E.target.files), $ = s?.attachments?.maxSize;
871
871
  if ($ && R.filter((ne) => ne.size > $).length > 0) {
@@ -883,20 +883,20 @@ function co({
883
883
  m.forEach(($) => R.items.add($)), e(p, R.files), f(""), g([]);
884
884
  }
885
885
  };
886
- return /* @__PURE__ */ i("div", { className: k("shrink-0 px-4 pb-5 pt-2 md:px-6 md:pb-6 w-full", l), children: /* @__PURE__ */ i("div", { className: "max-w-4xl mx-auto w-full", children: /* @__PURE__ */ _(no, { onSubmit: C, children: [
886
+ return /* @__PURE__ */ i("div", { className: k("shrink-0 px-4 pb-5 pt-2 md:px-6 md:pb-6 w-full", l), children: /* @__PURE__ */ i("div", { className: "max-w-4xl mx-auto w-full", children: /* @__PURE__ */ w(no, { onSubmit: C, children: [
887
887
  /* @__PURE__ */ i(
888
888
  "input",
889
889
  {
890
890
  type: "file",
891
891
  ref: u,
892
- onChange: w,
892
+ onChange: _,
893
893
  multiple: !0,
894
894
  accept: s?.attachments?.types?.join(",") || "image/*,text/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx",
895
895
  className: "hidden"
896
896
  }
897
897
  ),
898
- /* @__PURE__ */ _("div", { className: "flex flex-col flex-1 gap-2", children: [
899
- m.length > 0 && /* @__PURE__ */ i("div", { className: "flex flex-wrap gap-2 px-2 pt-2", children: m.map((E, R) => /* @__PURE__ */ _("div", { className: "group relative flex items-center gap-2 rounded-xl glass-surface px-2.5 py-1.5 text-sm shadow-sm", children: [
898
+ /* @__PURE__ */ w("div", { className: "flex flex-col flex-1 gap-2", children: [
899
+ m.length > 0 && /* @__PURE__ */ i("div", { className: "flex flex-wrap gap-2 px-2 pt-2", children: m.map((E, R) => /* @__PURE__ */ w("div", { className: "group relative flex items-center gap-2 rounded-xl glass-surface px-2.5 py-1.5 text-sm shadow-sm", children: [
900
900
  E.type.startsWith("image/") ? /* @__PURE__ */ i("img", { src: URL.createObjectURL(E), alt: E.name, className: "size-7 rounded-lg object-cover ring-1 ring-border/50" }) : /* @__PURE__ */ i(Nt, { className: "size-3.5 text-muted-foreground shrink-0" }),
901
901
  /* @__PURE__ */ i("span", { className: "max-w-[120px] truncate text-xs font-medium text-foreground/80", children: E.name }),
902
902
  /* @__PURE__ */ i("button", { type: "button", onClick: () => v(R), className: "ml-0.5 flex items-center justify-center size-4 rounded-full hover:bg-destructive/15 text-muted-foreground/60 hover:text-destructive transition-all duration-150", children: /* @__PURE__ */ i(he, { className: "size-2.5" }) })
@@ -912,8 +912,8 @@ function co({
912
912
  }
913
913
  )
914
914
  ] }),
915
- /* @__PURE__ */ _(ro, { children: [
916
- /* @__PURE__ */ i(ao, { children: (s?.attachments?.enabled ?? !1) && /* @__PURE__ */ _(Ot, { children: [
915
+ /* @__PURE__ */ w(ro, { children: [
916
+ /* @__PURE__ */ i(ao, { children: (s?.attachments?.enabled ?? !1) && /* @__PURE__ */ w(Ot, { children: [
917
917
  /* @__PURE__ */ i(Lt, { asChild: !0, children: /* @__PURE__ */ i(io, { variant: "ghost", onClick: () => u.current?.click(), disabled: h, children: /* @__PURE__ */ i(fn, { className: "size-4" }) }) }),
918
918
  /* @__PURE__ */ i(Ft, { children: c("attach_file") })
919
919
  ] }) }),
@@ -969,31 +969,31 @@ const go = ({ onSuggestionClick: e, icons: t }) => {
969
969
  const { t: n, i18n: o } = M(["chat", "translation"]), { welcome: r } = W(), a = typeof r?.greeting == "function", { user: l, firstName: c, isLoading: s } = ho({
970
970
  enabled: a
971
971
  }), p = r?.prompts ?? [], f = p.map((u) => {
972
- const w = typeof u == "string" ? u : u.text;
973
- return n(w);
972
+ const _ = typeof u == "string" ? u : u.text;
973
+ return n(_);
974
974
  }).filter((u) => u !== null && u !== ""), m = o.dir() === "rtl", g = r?.greeting, b = typeof g == "function" ? g({ user: l, firstName: c, isLoading: s, t: n }) : g ? n(g) ?? g : n("welcome.title"), y = r?.subtitle ? n(r.subtitle) : null;
975
- return /* @__PURE__ */ _(
975
+ return /* @__PURE__ */ w(
976
976
  "div",
977
977
  {
978
978
  dir: m ? "rtl" : "ltr",
979
979
  className: "flex flex-col items-center justify-center min-h-[60vh] text-center px-6 animate-in fade-in duration-700 ease-out",
980
980
  children: [
981
- r?.icon && /* @__PURE__ */ _("div", { className: "mb-8 relative flex items-center justify-center", children: [
981
+ r?.icon && /* @__PURE__ */ w("div", { className: "mb-8 relative flex items-center justify-center", children: [
982
982
  /* @__PURE__ */ i("div", { className: "absolute size-24 rounded-full bg-primary/5 blur-[40px] animate-pulse" }),
983
983
  /* @__PURE__ */ i("div", { className: "relative size-12 md:size-16 rounded-xl bg-gradient-to-br from-surface to-secondary flex items-center justify-center border border-border/10 dark:border-border/5 shadow-xl shadow-black/10", children: typeof r.icon == "function" ? /* @__PURE__ */ i(r.icon, { className: "size-6 md:size-8 text-primary opacity-80" }) : r.icon })
984
984
  ] }),
985
- (b || y) && /* @__PURE__ */ _("div", { className: "space-y-3 mb-12 max-w-xl mx-auto", children: [
985
+ (b || y) && /* @__PURE__ */ w("div", { className: "space-y-3 mb-12 max-w-xl mx-auto", children: [
986
986
  b && /* @__PURE__ */ i("h1", { className: "text-2xl md:text-3xl font-black tracking-tight leading-tight text-foreground", children: b }),
987
987
  y && /* @__PURE__ */ i("p", { className: "text-muted-foreground text-base md:text-lg font-medium max-w-md mx-auto leading-relaxed opacity-85 dark:opacity-70", children: y })
988
988
  ] }),
989
- f.length > 0 && /* @__PURE__ */ i("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-3 w-full max-w-xl", children: f.map((u, w) => {
990
- const v = p[w], h = typeof v != "string" ? v.icon : null, C = t && t[w % t.length] ? t[w % t.length] : bn, E = h || C;
989
+ f.length > 0 && /* @__PURE__ */ i("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-3 w-full max-w-xl", children: f.map((u, _) => {
990
+ const v = p[_], h = typeof v != "string" ? v.icon : null, C = t && t[_ % t.length] ? t[_ % t.length] : bn, E = h || C;
991
991
  return /* @__PURE__ */ i(
992
992
  "div",
993
993
  {
994
994
  className: "animate-in fade-in slide-in-from-bottom-3 duration-700 fill-mode-both",
995
- style: { animationDelay: `${w * 80}ms` },
996
- children: /* @__PURE__ */ _(
995
+ style: { animationDelay: `${_ * 80}ms` },
996
+ children: /* @__PURE__ */ w(
997
997
  uo,
998
998
  {
999
999
  onClick: () => e(u),
@@ -1007,7 +1007,7 @@ const go = ({ onSuggestionClick: e, icons: t }) => {
1007
1007
  "hover:-translate-y-0.5 transition-[background-color,border-color,transform] duration-300 ease-out-quint"
1008
1008
  ),
1009
1009
  children: [
1010
- /* @__PURE__ */ _("div", { className: "flex items-center gap-3 w-full text-start", children: [
1010
+ /* @__PURE__ */ w("div", { className: "flex items-center gap-3 w-full text-start", children: [
1011
1011
  /* @__PURE__ */ i("div", { className: "size-8 rounded-lg bg-secondary/35 dark:bg-background/40 flex items-center justify-center shrink-0 border border-border/10 dark:border-border/5 group-hover:bg-primary group-hover:text-primary-foreground transition-colors duration-300", children: /* @__PURE__ */ i(E, { className: "size-4" }) }),
1012
1012
  /* @__PURE__ */ i("div", { className: "flex flex-col gap-0.5 overflow-hidden", children: /* @__PURE__ */ i("span", { className: "text-sm md:text-base font-semibold text-foreground/80 group-hover:text-foreground transition-colors", children: u.length > 60 ? u.substring(0, 60) + "..." : u }) })
1013
1013
  ] }),
@@ -1019,7 +1019,7 @@ const go = ({ onSuggestionClick: e, icons: t }) => {
1019
1019
  }
1020
1020
  )
1021
1021
  },
1022
- w
1022
+ _
1023
1023
  );
1024
1024
  }) })
1025
1025
  ]
@@ -1080,7 +1080,7 @@ const go = ({ onSuggestionClick: e, icons: t }) => {
1080
1080
  size: a = "sm",
1081
1081
  ...l
1082
1082
  }) => {
1083
- const c = /* @__PURE__ */ _(
1083
+ const c = /* @__PURE__ */ w(
1084
1084
  ee,
1085
1085
  {
1086
1086
  className: k(
@@ -1101,7 +1101,7 @@ const go = ({ onSuggestionClick: e, icons: t }) => {
1101
1101
  ]
1102
1102
  }
1103
1103
  );
1104
- return e ? /* @__PURE__ */ i(Rt, { children: /* @__PURE__ */ _(Ot, { children: [
1104
+ return e ? /* @__PURE__ */ i(Rt, { children: /* @__PURE__ */ w(Ot, { children: [
1105
1105
  /* @__PURE__ */ i(Lt, { asChild: !0, children: c }),
1106
1106
  /* @__PURE__ */ i(Ft, { children: /* @__PURE__ */ i("p", { children: e }) })
1107
1107
  ] }) }) : c;
@@ -2224,7 +2224,7 @@ const bo = te({
2224
2224
  return "xml:" + t.slice(3).toLowerCase();
2225
2225
  }
2226
2226
  }), ko = /[A-Z]/g, Ze = /-[a-z]/g, vo = /^data[-\w.:]+$/i;
2227
- function wo(e, t) {
2227
+ function _o(e, t) {
2228
2228
  const n = ae(t);
2229
2229
  let o = t, r = D;
2230
2230
  if (n in e.normal)
@@ -2236,7 +2236,7 @@ function wo(e, t) {
2236
2236
  } else {
2237
2237
  const a = t.slice(4);
2238
2238
  if (!Ze.test(a)) {
2239
- let l = a.replace(ko, _o);
2239
+ let l = a.replace(ko, wo);
2240
2240
  l.charAt(0) !== "-" && (l = "-" + l), t = "data" + l;
2241
2241
  }
2242
2242
  }
@@ -2244,7 +2244,7 @@ function wo(e, t) {
2244
2244
  }
2245
2245
  return new r(o, t);
2246
2246
  }
2247
- function _o(e) {
2247
+ function wo(e) {
2248
2248
  return "-" + e.toLowerCase();
2249
2249
  }
2250
2250
  function xo(e) {
@@ -2332,7 +2332,7 @@ function To(e) {
2332
2332
  return !!("children" in e && Array.isArray(e.children));
2333
2333
  }
2334
2334
  function Co(e, t, n, o) {
2335
- const r = wo(e, n);
2335
+ const r = _o(e, n);
2336
2336
  let a;
2337
2337
  if (o != null) {
2338
2338
  if (typeof o == "number") {
@@ -2944,7 +2944,7 @@ function lr(e, t, n, o) {
2944
2944
  }
2945
2945
  return g;
2946
2946
  function g() {
2947
- let b = Zt, y, u, w;
2947
+ let b = Zt, y, u, _;
2948
2948
  if (a(s, p, f[f.length - 1] || void 0) && (b = sr(n(s, f)), b[0] === st))
2949
2949
  return b;
2950
2950
  if ("children" in s && s.children) {
@@ -2953,9 +2953,9 @@ function lr(e, t, n, o) {
2953
2953
  s
2954
2954
  );
2955
2955
  if (v.children && b[0] !== Jt)
2956
- for (u = -1 + l, w = f.concat(v); u > -1 && u < v.children.length; ) {
2956
+ for (u = -1 + l, _ = f.concat(v); u > -1 && u < v.children.length; ) {
2957
2957
  const h = v.children[u];
2958
- if (y = c(h, u, w)(), y[0] === st)
2958
+ if (y = c(h, u, _)(), y[0] === st)
2959
2959
  return y;
2960
2960
  u = typeof y[1] == "number" ? y[1] : u + l;
2961
2961
  }
@@ -2986,10 +2986,10 @@ function dr(e) {
2986
2986
  displayMode: f,
2987
2987
  throwOnError: !0
2988
2988
  });
2989
- } catch (w) {
2989
+ } catch (_) {
2990
2990
  const v = (
2991
2991
  /** @type {Error} */
2992
- w
2992
+ _
2993
2993
  ), h = v.name.toLowerCase();
2994
2994
  o.message("Could not render math with KaTeX", {
2995
2995
  ancestors: [...a, r],
@@ -3013,7 +3013,7 @@ function dr(e) {
3013
3013
  properties: {
3014
3014
  className: ["katex-error"],
3015
3015
  style: "color:" + (t.errorColor || "#cc0000"),
3016
- title: String(w)
3016
+ title: String(_)
3017
3017
  },
3018
3018
  children: [{ type: "text", value: b }]
3019
3019
  }
@@ -3216,24 +3216,24 @@ function fr(e, t, n) {
3216
3216
  return h === null || j(h) ? (e.exit("chunkString"), e.exit("mathFlowFenceMeta"), m(h)) : h === 36 ? n(h) : (e.consume(h), f);
3217
3217
  }
3218
3218
  function m(h) {
3219
- return e.exit("mathFlowFence"), o.interrupt ? t(h) : e.attempt(ut, g, w)(h);
3219
+ return e.exit("mathFlowFence"), o.interrupt ? t(h) : e.attempt(ut, g, _)(h);
3220
3220
  }
3221
3221
  function g(h) {
3222
3222
  return e.attempt({
3223
3223
  tokenize: v,
3224
3224
  partial: !0
3225
- }, w, b)(h);
3225
+ }, _, b)(h);
3226
3226
  }
3227
3227
  function b(h) {
3228
3228
  return (a ? ce(e, y, "linePrefix", a + 1) : y)(h);
3229
3229
  }
3230
3230
  function y(h) {
3231
- return h === null ? w(h) : j(h) ? e.attempt(ut, g, w)(h) : (e.enter("mathFlowValue"), u(h));
3231
+ return h === null ? _(h) : j(h) ? e.attempt(ut, g, _)(h) : (e.enter("mathFlowValue"), u(h));
3232
3232
  }
3233
3233
  function u(h) {
3234
3234
  return h === null || j(h) ? (e.exit("mathFlowValue"), y(h)) : (e.consume(h), u);
3235
3235
  }
3236
- function w(h) {
3236
+ function _(h) {
3237
3237
  return e.exit("mathFlow"), t(h);
3238
3238
  }
3239
3239
  function v(h, C, E) {
@@ -3304,7 +3304,7 @@ function kr(e) {
3304
3304
  function vr(e) {
3305
3305
  return e !== 36 || this.events[this.events.length - 1][1].type === "characterEscape";
3306
3306
  }
3307
- function wr(e) {
3307
+ function _r(e) {
3308
3308
  return {
3309
3309
  flow: {
3310
3310
  36: mr
@@ -3314,13 +3314,13 @@ function wr(e) {
3314
3314
  }
3315
3315
  };
3316
3316
  }
3317
- const _r = {};
3317
+ const wr = {};
3318
3318
  function xr(e) {
3319
3319
  const t = (
3320
3320
  /** @type {Processor} */
3321
3321
  this
3322
- ), n = e || _r, o = t.data(), r = o.micromarkExtensions || (o.micromarkExtensions = []), a = o.fromMarkdownExtensions || (o.fromMarkdownExtensions = []), l = o.toMarkdownExtensions || (o.toMarkdownExtensions = []);
3323
- r.push(wr(n)), a.push(hr()), l.push(gr(n));
3322
+ ), n = e || wr, o = t.data(), r = o.micromarkExtensions || (o.micromarkExtensions = []), a = o.fromMarkdownExtensions || (o.fromMarkdownExtensions = []), l = o.toMarkdownExtensions || (o.toMarkdownExtensions = []);
3323
+ r.push(_r(n)), a.push(hr()), l.push(gr(n));
3324
3324
  }
3325
3325
  function Sr(e = {}) {
3326
3326
  var t, n;
@@ -3357,10 +3357,10 @@ function Er({
3357
3357
  feedbackEnabled: f,
3358
3358
  retryEnabled: m
3359
3359
  }) {
3360
- const { t: g } = M(["chat"]), { textComponents: b, remarkPlugins: y, rehypePlugins: u } = W(), w = ge(e.text), v = !o && r && (n === "streaming" || n === "submitted"), h = l || (() => {
3360
+ const { t: g } = M(["chat"]), { textComponents: b, remarkPlugins: y, rehypePlugins: u } = W(), _ = ge(e.text), v = !o && r && (n === "streaming" || n === "submitted"), h = l || (() => {
3361
3361
  });
3362
- return /* @__PURE__ */ _("div", { className: "group py-2 first:pt-4 animate-in-bubble", children: [
3363
- /* @__PURE__ */ i(Dt, { from: t.role, children: /* @__PURE__ */ i(Pt, { dir: w, children: /* @__PURE__ */ i(
3362
+ return /* @__PURE__ */ w("div", { className: "group py-2 first:pt-4 animate-in-bubble", children: [
3363
+ /* @__PURE__ */ i(Dt, { from: t.role, children: /* @__PURE__ */ i(Pt, { dir: _, children: /* @__PURE__ */ i(
3364
3364
  je,
3365
3365
  {
3366
3366
  className: k(t.role === "user" && "whitespace-pre-wrap break-words"),
@@ -3370,8 +3370,8 @@ function Er({
3370
3370
  children: e.text
3371
3371
  }
3372
3372
  ) }) }),
3373
- a && !v && /* @__PURE__ */ _(mo, { className: k("mt-1.5 ml-0.5", t.role === "user" && "justify-end"), children: [
3374
- t.role === "assistant" && /* @__PURE__ */ _(J, { children: [
3373
+ a && !v && /* @__PURE__ */ w(mo, { className: k("mt-1.5 ml-0.5", t.role === "user" && "justify-end"), children: [
3374
+ t.role === "assistant" && /* @__PURE__ */ w(J, { children: [
3375
3375
  r && m && /* @__PURE__ */ i(
3376
3376
  se,
3377
3377
  {
@@ -3381,7 +3381,7 @@ function Er({
3381
3381
  children: /* @__PURE__ */ i(yn, { className: "size-3" })
3382
3382
  }
3383
3383
  ),
3384
- f && /* @__PURE__ */ _(J, { children: [
3384
+ f && /* @__PURE__ */ w(J, { children: [
3385
3385
  /* @__PURE__ */ i(
3386
3386
  se,
3387
3387
  {
@@ -3455,14 +3455,14 @@ const Qt = de(null), Nr = () => {
3455
3455
  };
3456
3456
  }
3457
3457
  }, [t, s, o, p, g]);
3458
- const w = (v) => {
3458
+ const _ = (v) => {
3459
3459
  p(v);
3460
3460
  };
3461
3461
  return /* @__PURE__ */ i(Qt.Provider, { value: { isStreaming: t, isOpen: s, setIsOpen: p, duration: f }, children: /* @__PURE__ */ i(
3462
3462
  ze,
3463
3463
  {
3464
3464
  className: k("not-prose mb-4", e),
3465
- onOpenChange: w,
3465
+ onOpenChange: _,
3466
3466
  open: s,
3467
3467
  ...c,
3468
3468
  children: l
@@ -3471,9 +3471,9 @@ const Qt = de(null), Nr = () => {
3471
3471
  }
3472
3472
  ), tn = pe(({ className: e, children: t, ...n }) => {
3473
3473
  const { isStreaming: o, isOpen: r, duration: a } = Nr();
3474
- return /* @__PURE__ */ i(Ue, { className: k("flex items-center gap-2 text-muted-foreground text-sm", e), ...n, children: t ?? /* @__PURE__ */ _(J, { children: [
3475
- /* @__PURE__ */ i(wn, { className: "size-4" }),
3476
- o || a === 0 ? /* @__PURE__ */ i("p", { children: "Thinking..." }) : /* @__PURE__ */ _("p", { children: [
3474
+ return /* @__PURE__ */ i(Ue, { className: k("flex items-center gap-2 text-muted-foreground text-sm", e), ...n, children: t ?? /* @__PURE__ */ w(J, { children: [
3475
+ /* @__PURE__ */ i(_n, { className: "size-4" }),
3476
+ o || a === 0 ? /* @__PURE__ */ i("p", { children: "Thinking..." }) : /* @__PURE__ */ w("p", { children: [
3477
3477
  "Thought for ",
3478
3478
  a,
3479
3479
  " ",
@@ -3509,7 +3509,7 @@ function Ar({
3509
3509
  lastMessage: r
3510
3510
  }) {
3511
3511
  const a = ge(e.text);
3512
- return /* @__PURE__ */ _(
3512
+ return /* @__PURE__ */ w(
3513
3513
  en,
3514
3514
  {
3515
3515
  className: "w-full animate-in-bubble",
@@ -3576,9 +3576,9 @@ function Pr({
3576
3576
  showCloseButton: n = !0,
3577
3577
  ...o
3578
3578
  }) {
3579
- return /* @__PURE__ */ _(Fr, { "data-slot": "dialog-portal", children: [
3579
+ return /* @__PURE__ */ w(Fr, { "data-slot": "dialog-portal", children: [
3580
3580
  /* @__PURE__ */ i(Dr, {}),
3581
- /* @__PURE__ */ _(
3581
+ /* @__PURE__ */ w(
3582
3582
  H.Content,
3583
3583
  {
3584
3584
  "data-slot": "dialog-content",
@@ -3589,7 +3589,7 @@ function Pr({
3589
3589
  ...o,
3590
3590
  children: [
3591
3591
  t,
3592
- n && /* @__PURE__ */ _(
3592
+ n && /* @__PURE__ */ w(
3593
3593
  H.Close,
3594
3594
  {
3595
3595
  "data-slot": "dialog-close",
@@ -4708,10 +4708,10 @@ function Br() {
4708
4708
  }
4709
4709
  var Hr = Br();
4710
4710
  const qr = /* @__PURE__ */ q(Hr);
4711
- var we, ht;
4711
+ var _e, ht;
4712
4712
  function jr() {
4713
- if (ht) return we;
4714
- ht = 1, we = e, e.displayName = "javascript", e.aliases = ["js"];
4713
+ if (ht) return _e;
4714
+ ht = 1, _e = e, e.displayName = "javascript", e.aliases = ["js"];
4715
4715
  function e(t) {
4716
4716
  t.languages.javascript = t.languages.extend("clike", {
4717
4717
  "class-name": [
@@ -4836,14 +4836,14 @@ function jr() {
4836
4836
  "javascript"
4837
4837
  )), t.languages.js = t.languages.javascript;
4838
4838
  }
4839
- return we;
4839
+ return _e;
4840
4840
  }
4841
4841
  var Gr = jr();
4842
4842
  const Vr = /* @__PURE__ */ q(Gr);
4843
- var _e, gt;
4843
+ var we, gt;
4844
4844
  function Wr() {
4845
- if (gt) return _e;
4846
- gt = 1, _e = e, e.displayName = "typescript", e.aliases = ["ts"];
4845
+ if (gt) return we;
4846
+ gt = 1, we = e, e.displayName = "typescript", e.aliases = ["ts"];
4847
4847
  function e(t) {
4848
4848
  (function(n) {
4849
4849
  n.languages.typescript = n.languages.extend("javascript", {
@@ -4891,7 +4891,7 @@ function Wr() {
4891
4891
  }), n.languages.ts = n.languages.typescript;
4892
4892
  })(t);
4893
4893
  }
4894
- return _e;
4894
+ return we;
4895
4895
  }
4896
4896
  var Yr = Wr();
4897
4897
  const Xr = /* @__PURE__ */ q(Yr);
@@ -5547,7 +5547,7 @@ function sa() {
5547
5547
  return;
5548
5548
  function b(y) {
5549
5549
  if (!(!y || typeof y == "string"))
5550
- for (var u = 0, w = y.length; u < w; u++) {
5550
+ for (var u = 0, _ = y.length; u < _; u++) {
5551
5551
  var v = y[u];
5552
5552
  if (v.type !== "code") {
5553
5553
  b(v.content);
@@ -5566,7 +5566,7 @@ function sa() {
5566
5566
  }), n.hooks.add("wrap", function(g) {
5567
5567
  if (g.type === "code-block") {
5568
5568
  for (var b = "", y = 0, u = g.classes.length; y < u; y++) {
5569
- var w = g.classes[y], v = /language-(.+)/.exec(w);
5569
+ var _ = g.classes[y], v = /language-(.+)/.exec(_);
5570
5570
  if (v) {
5571
5571
  b = v[1];
5572
5572
  break;
@@ -5602,8 +5602,8 @@ function sa() {
5602
5602
  var b = g.replace(s, "");
5603
5603
  return b = b.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(y, u) {
5604
5604
  if (u = u.toLowerCase(), u[0] === "#") {
5605
- var w;
5606
- return u[1] === "x" ? w = parseInt(u.slice(2), 16) : w = Number(u.slice(1)), f(w);
5605
+ var _;
5606
+ return u[1] === "x" ? _ = parseInt(u.slice(2), 16) : _ = Number(u.slice(1)), f(_);
5607
5607
  } else {
5608
5608
  var v = p[u];
5609
5609
  return v || y;
@@ -5640,7 +5640,7 @@ const da = de({
5640
5640
  className: k("relative w-full overflow-hidden rounded-md border bg-background text-foreground", o),
5641
5641
  dir: "ltr",
5642
5642
  ...a,
5643
- children: /* @__PURE__ */ _("div", { className: "relative", children: [
5643
+ children: /* @__PURE__ */ w("div", { className: "relative", children: [
5644
5644
  /* @__PURE__ */ i(
5645
5645
  U,
5646
5646
  {
@@ -5701,7 +5701,7 @@ function pa(e, t = "size-4") {
5701
5701
  web_fetch: /* @__PURE__ */ i(ue, { className: t }),
5702
5702
  code_execution: /* @__PURE__ */ i(Sn, { className: t }),
5703
5703
  image_generation: /* @__PURE__ */ i(xn, { className: t })
5704
- }[e] ?? /* @__PURE__ */ i(_n, { className: t });
5704
+ }[e] ?? /* @__PURE__ */ i(wn, { className: t });
5705
5705
  }
5706
5706
  const ha = ({ className: e, ...t }) => /* @__PURE__ */ i(ze, { className: k("not-prose mb-4 w-full rounded-md border", e), ...t }), ga = ({ status: e }) => {
5707
5707
  const { t } = M(["tools_ui"]), n = {
@@ -5710,7 +5710,7 @@ const ha = ({ className: e, ...t }) => /* @__PURE__ */ i(ze, { className: k("not
5710
5710
  "output-available": t("completed"),
5711
5711
  "output-error": t("error")
5712
5712
  };
5713
- return /* @__PURE__ */ _(Rr, { className: "gap-1.5 rounded-full text-xs", variant: "secondary", children: [
5713
+ return /* @__PURE__ */ w(Rr, { className: "gap-1.5 rounded-full text-xs", variant: "secondary", children: [
5714
5714
  {
5715
5715
  "input-streaming": /* @__PURE__ */ i(Cn, { className: "size-4" }),
5716
5716
  "input-available": /* @__PURE__ */ i(Tn, { className: "size-4 animate-pulse" }),
@@ -5721,8 +5721,8 @@ const ha = ({ className: e, ...t }) => /* @__PURE__ */ i(ze, { className: k("not
5721
5721
  ] });
5722
5722
  }, ma = ({ className: e, type: t, state: n, toolName: o, ...r }) => {
5723
5723
  const a = o || (t.startsWith("tool-") ? t.slice(5) : t), l = pa(a, "size-4 text-muted-foreground");
5724
- return /* @__PURE__ */ _(Ue, { className: k("flex w-full items-center justify-between gap-4 p-3", e), ...r, children: [
5725
- /* @__PURE__ */ _("div", { className: "flex items-center gap-2", children: [
5724
+ return /* @__PURE__ */ w(Ue, { className: k("flex w-full items-center justify-between gap-4 p-3", e), ...r, children: [
5725
+ /* @__PURE__ */ w("div", { className: "flex items-center gap-2", children: [
5726
5726
  l,
5727
5727
  /* @__PURE__ */ i("span", { className: "font-medium text-sm", children: a }),
5728
5728
  /* @__PURE__ */ i(ga, { status: n })
@@ -5748,7 +5748,7 @@ const ha = ({ className: e, ...t }) => /* @__PURE__ */ i(ze, { className: k("not
5748
5748
  return JSON.stringify(e, null, 2);
5749
5749
  }, ba = ({ className: e, input: t, ...n }) => {
5750
5750
  const { t: o } = M(["tools_ui"]);
5751
- return /* @__PURE__ */ _("div", { className: k("space-y-2 overflow-hidden p-4", e), ...n, children: [
5751
+ return /* @__PURE__ */ w("div", { className: k("space-y-2 overflow-hidden p-4", e), ...n, children: [
5752
5752
  /* @__PURE__ */ i("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: o("parameters") }),
5753
5753
  /* @__PURE__ */ i("div", { className: "rounded-md bg-muted/50", children: /* @__PURE__ */ i(Le, { code: on(t), language: "json" }) })
5754
5754
  ] });
@@ -5770,18 +5770,18 @@ const ha = ({ className: e, ...t }) => /* @__PURE__ */ i(ze, { className: k("not
5770
5770
  }
5771
5771
  return typeof t == "object" && t !== null && !("$$typeof" in t) ? /* @__PURE__ */ i(Le, { code: JSON.stringify(t, null, 2), language: "json" }) : t;
5772
5772
  };
5773
- return /* @__PURE__ */ _("div", { className: k("space-y-2 p-4", e), ...o, children: [
5773
+ return /* @__PURE__ */ w("div", { className: k("space-y-2 p-4", e), ...o, children: [
5774
5774
  /* @__PURE__ */ i("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: r(n ? "error" : "result") }),
5775
- n && /* @__PURE__ */ _(Or, { children: [
5776
- /* @__PURE__ */ i(Lr, { asChild: !0, children: /* @__PURE__ */ _(ee, { variant: "destructive", size: "sm", children: [
5775
+ n && /* @__PURE__ */ w(Or, { children: [
5776
+ /* @__PURE__ */ i(Lr, { asChild: !0, children: /* @__PURE__ */ w(ee, { variant: "destructive", size: "sm", children: [
5777
5777
  /* @__PURE__ */ i(Ct, { className: "mr-1.5 size-4" }),
5778
5778
  r("view_error")
5779
5779
  ] }) }),
5780
- /* @__PURE__ */ _(Pr, { className: "max-w-2xl", children: [
5780
+ /* @__PURE__ */ w(Pr, { className: "max-w-2xl", children: [
5781
5781
  /* @__PURE__ */ i(Mr, { children: /* @__PURE__ */ i(zr, { className: "text-destructive", children: r("tool_error") }) }),
5782
- /* @__PURE__ */ _("div", { className: "space-y-4", children: [
5782
+ /* @__PURE__ */ w("div", { className: "space-y-4", children: [
5783
5783
  /* @__PURE__ */ i("div", { className: "max-h-96 overflow-auto rounded-md bg-destructive/10 p-4 text-destructive text-sm", children: /* @__PURE__ */ i("pre", { className: "whitespace-pre-wrap break-words", children: on(n) }) }),
5784
- /* @__PURE__ */ _(ee, { variant: "outline", size: "sm", onClick: c, children: [
5784
+ /* @__PURE__ */ w(ee, { variant: "outline", size: "sm", onClick: c, children: [
5785
5785
  /* @__PURE__ */ i(Tt, { className: "mr-1.5 size-4" }),
5786
5786
  r(a ? "copied" : "copy_error")
5787
5787
  ] })
@@ -5817,9 +5817,9 @@ function ka({
5817
5817
  const c = o[l];
5818
5818
  return /* @__PURE__ */ i(c, { part: e, message: t, chat: n });
5819
5819
  }
5820
- return r ? /* @__PURE__ */ _(ha, { className: "animate-in-bubble", children: [
5820
+ return r ? /* @__PURE__ */ w(ha, { className: "animate-in-bubble", children: [
5821
5821
  /* @__PURE__ */ i(ma, { type: e.type, state: a.state, toolName: l }),
5822
- /* @__PURE__ */ _(fa, { children: [
5822
+ /* @__PURE__ */ w(fa, { children: [
5823
5823
  /* @__PURE__ */ i(ba, { input: a.input }),
5824
5824
  (a.state === "output-available" || a.state === "output-error") && /* @__PURE__ */ i(ya, { errorText: a.errorText, output: a.output })
5825
5825
  ] })
@@ -5834,7 +5834,7 @@ function va({
5834
5834
  const s = document.createElement("a");
5835
5835
  s.href = o.url, s.download = a, document.body.appendChild(s), s.click(), document.body.removeChild(s);
5836
5836
  };
5837
- return /* @__PURE__ */ i("div", { className: "py-2 animate-in-bubble", children: /* @__PURE__ */ i(Dt, { from: t.role, children: /* @__PURE__ */ i(Pt, { isPlain: !0, children: r ? /* @__PURE__ */ _("div", { className: "group relative max-w-[280px] rounded-xl overflow-hidden border border-border/5 transition-all duration-300 hover:border-primary/30 hover:shadow-[0_0_20px_var(--glow)]", children: [
5837
+ return /* @__PURE__ */ i("div", { className: "py-2 animate-in-bubble", children: /* @__PURE__ */ i(Dt, { from: t.role, children: /* @__PURE__ */ i(Pt, { isPlain: !0, children: r ? /* @__PURE__ */ w("div", { className: "group relative max-w-[280px] rounded-xl overflow-hidden border border-border/5 transition-all duration-300 hover:border-primary/30 hover:shadow-[0_0_20px_var(--glow)]", children: [
5838
5838
  /* @__PURE__ */ i(
5839
5839
  "img",
5840
5840
  {
@@ -5843,7 +5843,7 @@ function va({
5843
5843
  className: "max-h-[280px] w-full rounded-xl object-cover transition-transform duration-500 group-hover:scale-105"
5844
5844
  }
5845
5845
  ),
5846
- /* @__PURE__ */ _("div", { className: "absolute inset-x-0 bottom-0 p-3 bg-gradient-to-t from-black/80 via-black/40 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-between", children: [
5846
+ /* @__PURE__ */ w("div", { className: "absolute inset-x-0 bottom-0 p-3 bg-gradient-to-t from-black/80 via-black/40 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-between", children: [
5847
5847
  /* @__PURE__ */ i("span", { className: "text-[10px] text-white truncate max-w-[150px] font-medium drop-shadow-sm", children: a }),
5848
5848
  /* @__PURE__ */ i(
5849
5849
  "button",
@@ -5863,9 +5863,9 @@ function va({
5863
5863
  children: /* @__PURE__ */ i(ue, { className: "size-4" })
5864
5864
  }
5865
5865
  ) })
5866
- ] }) : /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: /* @__PURE__ */ _("div", { className: "group inline-flex items-center gap-3 rounded-xl p-3 text-sm transition-all duration-300 bg-secondary/10 border border-border/5 hover:border-primary/30 hover:bg-secondary/20 hover:shadow-[0_0_15px_var(--glow)]", children: [
5866
+ ] }) : /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: /* @__PURE__ */ w("div", { className: "group inline-flex items-center gap-3 rounded-xl p-3 text-sm transition-all duration-300 bg-secondary/10 border border-border/5 hover:border-primary/30 hover:bg-secondary/20 hover:shadow-[0_0_15px_var(--glow)]", children: [
5867
5867
  /* @__PURE__ */ i("div", { className: "p-2.5 rounded-lg bg-background/50 border border-border/10 group-hover:border-primary/20 group-hover:text-primary transition-colors", children: /* @__PURE__ */ i(Nt, { className: "size-4 shrink-0" }) }),
5868
- /* @__PURE__ */ _("div", { className: "flex flex-col min-w-0 mr-4", children: [
5868
+ /* @__PURE__ */ w("div", { className: "flex flex-col min-w-0 mr-4", children: [
5869
5869
  /* @__PURE__ */ i("span", { className: "truncate max-w-[180px] font-semibold text-foreground/90 leading-none mb-1 group-hover:text-foreground transition-colors", children: a }),
5870
5870
  (o.mediaType || o.media_type) && /* @__PURE__ */ i("span", { className: "text-[10px] text-muted-foreground uppercase font-bold tracking-widest opacity-60", children: (o.mediaType || o.media_type).split("/").pop() })
5871
5871
  ] }),
@@ -5981,11 +5981,11 @@ function Ii({
5981
5981
  return /* @__PURE__ */ i(rn.Provider, { value: m, children: f });
5982
5982
  }
5983
5983
  const {
5984
- slice: wa,
5985
- forEach: _a
5984
+ slice: _a,
5985
+ forEach: wa
5986
5986
  } = [];
5987
5987
  function xa(e) {
5988
- return _a.call(wa.call(arguments, 1), (t) => {
5988
+ return wa.call(_a.call(arguments, 1), (t) => {
5989
5989
  if (t)
5990
5990
  for (const n in t)
5991
5991
  e[n] === void 0 && (e[n] = t[n]);
@@ -6037,7 +6037,7 @@ const vt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Ea = function(e, t) {
6037
6037
  throw new TypeError("option sameSite is invalid");
6038
6038
  }
6039
6039
  return o.partitioned && (a += "; Partitioned"), a;
6040
- }, wt = {
6040
+ }, _t = {
6041
6041
  create(e, t, n, o) {
6042
6042
  let r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
6043
6043
  path: "/",
@@ -6066,7 +6066,7 @@ var Na = {
6066
6066
  lookupCookie: t
6067
6067
  } = e;
6068
6068
  if (t && typeof document < "u")
6069
- return wt.read(t) || void 0;
6069
+ return _t.read(t) || void 0;
6070
6070
  },
6071
6071
  // Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties
6072
6072
  cacheUserLanguage(e, t) {
@@ -6076,7 +6076,7 @@ var Na = {
6076
6076
  cookieDomain: r,
6077
6077
  cookieOptions: a
6078
6078
  } = t;
6079
- n && typeof document < "u" && wt.create(n, e, o, r, a);
6079
+ n && typeof document < "u" && _t.create(n, e, o, r, a);
6080
6080
  }
6081
6081
  }, Ta = {
6082
6082
  name: "querystring",
@@ -6130,7 +6130,7 @@ var Na = {
6130
6130
  }
6131
6131
  };
6132
6132
  let Y = null;
6133
- const _t = () => {
6133
+ const wt = () => {
6134
6134
  if (Y !== null) return Y;
6135
6135
  try {
6136
6136
  if (Y = typeof window < "u" && window.localStorage !== null, !Y)
@@ -6149,7 +6149,7 @@ var Aa = {
6149
6149
  let {
6150
6150
  lookupLocalStorage: t
6151
6151
  } = e;
6152
- if (t && _t())
6152
+ if (t && wt())
6153
6153
  return window.localStorage.getItem(t) || void 0;
6154
6154
  },
6155
6155
  // Deconstruct the options object and extract the lookupLocalStorage property
@@ -6157,7 +6157,7 @@ var Aa = {
6157
6157
  let {
6158
6158
  lookupLocalStorage: n
6159
6159
  } = t;
6160
- n && _t() && window.localStorage.setItem(n, e);
6160
+ n && wt() && window.localStorage.setItem(n, e);
6161
6161
  }
6162
6162
  };
6163
6163
  let X = null;
@@ -6288,7 +6288,7 @@ class sn {
6288
6288
  }
6289
6289
  }
6290
6290
  sn.type = "languageDetector";
6291
- const Pa = { new_conversation: "New conversation", tooltip_new_conversation: "Start a new conversation", delete_conversation: "Delete", delete_confirm_title: "Delete conversation?", delete_confirm_description: "Are you sure you want to delete this chat? This action cannot be undone.", cancel: "Cancel", delete: "Delete", chat_deleted_success: "Chat deleted successfully", logout: "Logout", new_chat: "New Chat", rename_conversation: "Rename", rename_success: "Conversation renamed successfully", rename_failed: "Failed to rename conversation", search_conversations: "Search conversations...", save: "Save", no_conversations: "No conversations yet", loading_more: "Loading more...", pinned_success: "Conversation pinned", unpinned_success: "Conversation unpinned", pin_failed: "Failed to pin conversation", share_success: "Link copied", share_description: "The shareable link has been copied to your clipboard.", share_failed: "Failed to generate share link", pin_conversation: "Pin", unpin_conversation: "Unpin", share_conversation: "Share" }, Ma = { tools: "Tools", error: "Error:", input_placeholder: "Ask something...", insufficient_balance: "Insufficient balance. Please recharge your account to continue.", regenerate: "Regenerate", retry: "Retry", copy: "Copy", like: "Like", dislike: "Dislike", attach_file: "Attach file", remove_file: "Remove file", used_sources: "Used {{count}} sources", welcome: { title: "Hello! How can I help you today?", subtitle: "Ask me anything and I'll do my best to help.", suggestions: ["What can you help me with?", "Tell me something interesting", "Help me write an email", "Explain a concept to me"] }, disclaimer: "AI can make mistakes. Check important info." }, za = { pending: "Pending", running: "Running", completed: "Completed", error: "Error", parameters: "Parameters", result: "Result", view_error: "View Error", tool_error: "Tool Error", copied: "Copied!", copy_error: "Copy Error" }, Ua = { login_tab: "Login", signup_tab: "Sign Up", phone: "Phone", phone_placeholder: "Phone number", password: "Password", name: "Name", name_placeholder: "First Name", surname: "Surname", surname_placeholder: "Last Name", loading: "Loading...", logging_in: "Logging in...", signing_up: "Signing up...", auth_page_disabled_title: "The sign-in page is currently disabled.", auth_page_disabled_description: "Please contact the administrator for access.", select_placeholder: "Select an option", login_button: "Login", signup_button: "Sign Up" }, $a = { toggle: "Change theme", light: "Switch to light theme", dark: "Switch to dark theme", system: "Switch to system theme" }, Ba = { select_placeholder: "Select an option", loading: "Loading...", retry: "Retry", save: "Save", saving: "Saving...", cancel: "Cancel", delete: "Delete", edit: "Edit", search: "Search", search_placeholder: "Search...", no_data: "No data available", loading_more: "Loading more...", confirm_delete: "Are you sure you want to delete?", error_loading: "Error loading data", dashboard: { title: "Admin Panel", logout: "Logout", tabs: { analytics: "Analytics", chat_history: "Chats", users: "Users", admins: "Admins", settings: "Settings" } }, app_settings: { title: "System Settings", subtitle: "Manage global configuration for application appearance and behavior.", sections: { general: "Basic Information", chat: "Chat Experience", user_billing: "User & Billing" }, general: { app_name: "App Name", admin_title: "Admin Panel Title", language: "Default Language", language_help: "The language users see on their first visit (if not auto-detected).", appearance: "Default Appearance", appearance_help: "These values apply when a user has not saved their own appearance preferences.", default_theme: "Default Theme", default_accent: "Default Accent Color", default_accent_help: "Enter any browser-supported CSS color, such as #3b82f6, rgb(59 130 246), or oklch(0.623 0.214 259.815).", default_accent_invalid: "Enter a valid browser-supported CSS color.", default_accent_preview: "Accent color preview" }, chat: { welcome_greeting: "Welcome Greeting", welcome_subtitle: "Welcome Subtitle", disclaimer: "Disclaimer Text", show_tool_details: "Show technical tool details", show_tool_details_help: "Enable this to show professional technical details of AI tools to users.", show_settings: "Show settings icon for users", show_settings_help: "Show a settings gear icon in the chat interface for user customization.", show_version_in_settings: "Show app version in user settings", show_version_in_settings_help: "Show the app version at the bottom of the user settings dialog. This does not affect the admin settings page.", disable_signup: "Disable signup", disable_signup_help: "Hide the signup tab so users can only log in.", disable_auth_page: "Disable login/signup page", disable_auth_page_help: "Hide the entire auth page and prevent users from reaching login or signup forms.", composer_attachments: "Enable File Attachments", composer_attachments_help: "Allow users to upload and attach files to their messages.", thread_actions_feedback: "Enable Feedback Buttons", thread_actions_feedback_help: "Show like/dislike buttons on AI responses.", thread_actions_retry: "Enable Retry Button", thread_actions_retry_help: "Show a retry button to regenerate the last AI response.", history_enabled: "Enable Chat History Sidebar", history_enabled_help: "Show the sidebar containing previous conversations.", history_show_delete: "Allow Deleting Conversations", history_show_rename: "Allow Renaming Conversations", history_show_share: "Allow Sharing Conversations", history_show_pin: "Allow Pinning Conversations", sections_modes: "Settings Tab Modes", sections_modes_help: "Control visibility and interactability of settings tabs for users.", mode_editable: "Enable (Editable)", mode_faded: "Fade (Readonly)", mode_hidden: "Hide (Disable)", general_tab: "General Tab", profile_tab: "Profile Tab", account_tab: "Account Tab", inner_fields_modes: "Inner Fields Visibility", inner_fields_modes_help: "Configure visibility for individual fields within each tab." }, user_billing: { initial_balance_tokens: "Default Initial Tokens", initial_balance_requests: "Default Initial Requests", initial_balance_help: "These values will be assigned to new users by default if not specified during creation." }, save_success: "Settings saved successfully", save_error: "Failed to save settings", save: "Save Changes", translations_management: "Translations Management", editor_tips: "All changes are saved automatically to local state. Don't forget to push 'Save Changes' to persist.", sync_from_code: "Sync from Code", reset_button: "Reset to Defaults", reset_confirm_title: "Reset Settings?", reset_confirm_description: "This will reset all fields to their original default values from the code. Current unsaved changes will be lost.", preview: "Preview", tips_label: "TIPS" }, analytics: { title: "Analytics & Statistics", days: "{{count}} Days", total_users: "Total Users", total_threads: "Total Threads", total_messages: "Total Messages", total_token_usage: "Total Token Usage", threads_chart: "Threads", messages_chart: "Messages", token_usage_chart: "Token Usage", active_users: "Active Users", conversations: "conversations", threads: "threads", feedback: "User Feedback", total_feedback: "Total Feedback", positive: "Positive", negative: "Negative", loading_analytics: "Loading analytics...", error_loading: "Error loading data" }, chat_history: { title: "Chat History Management", search_placeholder: "Search by name, phone, thread title, or ID...", search_button: "Search", threads_list: "Threads List", thread_count: "{{count}}", no_thread_title: "Untitled conversation", messages: "Messages", messages_for: "Messages for: {{title}}", select_thread: "Select a conversation to view", no_threads: "No conversations found", empty_thread: "This conversation is empty", loading_threads: "Loading...", loading_messages: "Loading messages...", user_label: "User", assistant_label: "AI Assistant", input_tokens: "Input: {{value}}", output_tokens: "Output: {{value}}", total_tokens: "Total: {{value}}", all_feedbacks: "All Conversations", liked_feedbacks: "Liked 👍", disliked_feedbacks: "Disliked 👎", any_feedback: "With Feedback", output_available: "Output Available", running: "Running...", unnamed_file: "Unnamed File", download_file: "Download File" }, users: { title: "User Management", user_count: "User count: {{count}}", add_user: "Add New User", edit_user: "Edit User", phone: "Phone Number", phone_placeholder: "09123456789", name: "Name", surname: "Surname", initial_tokens: "Initial Tokens (optional)", initial_requests: "Initial Requests (optional)", balance: "Balance", requests_label: "Requests", tokens_label: "Tokens", token_limit: "Token Limit", request_limit: "Request Limit", tokens_usage: "Tokens Usage", requests_usage: "Requests Usage", actions: "Actions", copy_token: "Copy Token (auto-refresh)", token_copied: "Token copied successfully", no_token: "No token found for this user", recharge: "Recharge Balance", full_charge: "Full Charge", update_balance: "Update Balance", update_balance_for: "Update Balance for", token_count: "Token Count", request_count: "Request Count", updating: "Updating...", no_users: "No users found.", confirm_delete_user: "Are you sure you want to delete this user?", tokens_exceed_limit: "Tokens cannot exceed the specified limit", requests_exceed_limit: "Requests cannot exceed the specified limit", metadata: "Metadata (JSON)", initial_balance: "Initial Balance", custom_fields: "Additional Fields", metadata_raw: "Metadata (Raw JSON)", advanced_usage: "Advanced usage", invalid_json: "Invalid JSON format" }, admins: { title: "Admin Management", admin_count: "Admin count: {{count}}", add_admin: "Add New Admin", edit_admin: "Edit Admin", username: "Username", name: "Name", password: "Password", password_edit: "New Password (leave empty to keep current)", permissions: "Permissions", perm_chat_history: "Chat History", perm_admin_management: "Admin Management", perm_user_management: "User Management", perm_analytics: "Analytics", perm_settings: "Settings", no_admins: "No admins found.", confirm_delete_admin: "Are you sure you want to delete this admin?" }, errors: { access_denied_title: "Access Denied", access_denied_message: "You don't have the necessary permissions to access this page. You can contact the administrator!", back_to_dashboard: "Back to Dashboard" }, login: { title: "Admin Panel", setup_title: "Initial Setup", setup_description: "No admin account exists yet. Set a password for the default admin user to get started.", set_password: "Set Password", set_password_placeholder: "Choose a strong password", confirm_password: "Confirm Password", confirm_password_placeholder: "Re-enter the password", passwords_mismatch: "Passwords do not match", password_too_short: "Password must be at least 4 characters", create_admin: "Create Admin & Login", setting_up: "Setting up...", username: "Username", username_placeholder: "Username", password: "Password", password_placeholder: "••••••••", submit: "Login", logging_in: "Logging in...", error: "Login failed", copyright: "© 2026 AI Chatbot Platform" } }, Ha = { title: "Settings", sections: { profile: "Profile", general: "General", account: "Account" }, profile: { title: "Profile Information", subtitle: "Update your personal details below.", name: "First Name", surname: "Last Name", phone: "Phone Number", password: "New Password", password_placeholder: "Leave empty to keep current", save: "Save Changes", saving: "Saving...", success: "Profile updated successfully", error: "Failed to update profile", select_placeholder: "Select an option" }, general: { title: "General Settings", subtitle: "Configure look and feel and language.", theme: "Theme", language: "Language", themes: { light: "Light", dark: "Dark", system: "System" }, accent: "Accent Color", radius: "Rounded Corners", radius_levels: { sharp: "Sharp", round: "Round" }, languages: { en: "English", fa: "Persian" } }, account: { title: "Account & Usage", subtitle: "Monitor your quotas and manage your session.", balance: "Current Balance", tokens: "Tokens", requests: "Requests", logout: "Logout", logout_confirm: "Are you sure you want to logout?", last_recharge: "Last balance update on" } }, qa = { unauthorized: "Authentication required. Please login again.", invalid_credentials: "Invalid phone number or password.", phone_required: "Phone number is required.", password_required: "Password is required.", name_surname_required: "Name and surname are required.", phone_already_exists: "This phone number is already registered.", invalid_token: "Your session has expired. Please login again.", user_not_found: "User not found.", insufficient_balance: "Insufficient balance. Please recharge your account.", me_update_failed: "Failed to update profile information.", thread_not_found: "Conversation not found.", access_denied: "You do not have permission to perform this action.", feedback_save_failed: "Failed to save feedback.", thread_update_failed: "Failed to update conversation.", thread_delete_failed: "Failed to delete conversation.", attachment_not_found: "Attachment not found.", thread_share_failed: "Failed to share conversation.", model_quota_reached_error: "The system cannot respond at this time. Please try again later.", admin_already_exists: "Admin with this username already exists.", admin_not_found: "Admin not found.", cannot_delete_self: "You cannot delete your own admin account.", admin_update_failed: "Failed to update admin information.", internal_error: "An internal server error occurred. Please try again later.", validation_error: "Invalid data provided. Please check your input.", not_found: "The requested resource was not found." }, ja = {
6291
+ const Pa = { new_conversation: "New conversation", tooltip_new_conversation: "Start a new conversation", delete_conversation: "Delete", delete_confirm_title: "Delete conversation?", delete_confirm_description: "Are you sure you want to delete this chat? This action cannot be undone.", cancel: "Cancel", delete: "Delete", chat_deleted_success: "Chat deleted successfully", logout: "Logout", new_chat: "New Chat", rename_conversation: "Rename", rename_success: "Conversation renamed successfully", rename_failed: "Failed to rename conversation", search_conversations: "Search conversations...", save: "Save", no_conversations: "No conversations yet", loading_more: "Loading more...", pinned_success: "Conversation pinned", unpinned_success: "Conversation unpinned", pin_failed: "Failed to pin conversation", share_success: "Link copied", share_description: "The shareable link has been copied to your clipboard.", share_failed: "Failed to generate share link", pin_conversation: "Pin", unpin_conversation: "Unpin", share_conversation: "Share" }, Ma = { tools: "Tools", error: "Error:", input_placeholder: "Ask something...", insufficient_balance: "Insufficient balance. Please recharge your account to continue.", regenerate: "Regenerate", retry: "Retry", copy: "Copy", like: "Like", dislike: "Dislike", attach_file: "Attach file", remove_file: "Remove file", used_sources: "Used {{count}} sources", welcome: { title: "Hello! How can I help you today?", subtitle: "Ask me anything and I'll do my best to help.", suggestions: ["What can you help me with?", "Tell me something interesting", "Help me write an email", "Explain a concept to me"] }, disclaimer: "AI can make mistakes. Check important info." }, za = { pending: "Pending", running: "Running", completed: "Completed", error: "Error", parameters: "Parameters", result: "Result", view_error: "View Error", tool_error: "Tool Error", copied: "Copied!", copy_error: "Copy Error" }, Ua = { login_tab: "Login", signup_tab: "Sign Up", phone: "Phone", phone_placeholder: "Phone number", password: "Password", name: "Name", name_placeholder: "First Name", surname: "Surname", surname_placeholder: "Last Name", loading: "Loading...", logging_in: "Logging in...", signing_up: "Signing up...", auth_page_disabled_title: "The sign-in page is currently disabled.", auth_page_disabled_description: "Please contact the administrator for access.", select_placeholder: "Select an option", login_button: "Login", signup_button: "Sign Up" }, $a = { toggle: "Change theme", light: "Switch to light theme", dark: "Switch to dark theme", system: "Switch to system theme" }, Ba = { select_placeholder: "Select an option", loading: "Loading...", retry: "Retry", save: "Save", saving: "Saving...", cancel: "Cancel", delete: "Delete", edit: "Edit", search: "Search", search_placeholder: "Search...", no_data: "No data available", loading_more: "Loading more...", confirm_delete: "Are you sure you want to delete?", error_loading: "Error loading data", dashboard: { title: "Admin Panel", logout: "Logout", tabs: { analytics: "Analytics", chat_history: "Chats", users: "Users", admins: "Admins", settings: "Settings" } }, app_settings: { title: "System Settings", subtitle: "Manage global configuration for application appearance and behavior.", sections: { general: "Basic Information", chat: "Chat Experience", user_billing: "User & Billing" }, general: { app_name: "App Name", admin_title: "Admin Panel Title", language: "Default Language", language_help: "The language users see on their first visit (if not auto-detected).", appearance: "Default Appearance", appearance_help: "These values apply when a user has not saved their own appearance preferences.", default_theme: "Default Theme", default_accent: "Default Accent Color", default_accent_help: "Enter any browser-supported CSS color, such as #3b82f6, rgb(59 130 246), or oklch(0.623 0.214 259.815).", default_accent_invalid: "Enter a valid browser-supported CSS color.", default_accent_preview: "Accent color preview" }, chat: { welcome_greeting: "Welcome Greeting", welcome_subtitle: "Welcome Subtitle", disclaimer: "Disclaimer Text", show_tool_details: "Show technical tool details", show_tool_details_help: "Enable this to show professional technical details of AI tools to users.", show_settings: "Show settings icon for users", show_settings_help: "Show a settings gear icon in the chat interface for user customization.", show_version_in_settings: "Show app version in user settings", show_version_in_settings_help: "Show the app version at the bottom of the user settings dialog. This does not affect the admin settings page.", disable_signup: "Disable signup", disable_signup_help: "Hide the signup tab so users can only log in.", disable_auth_page: "Disable login/signup page", disable_auth_page_help: "Hide the entire auth page and prevent users from reaching login or signup forms.", composer_attachments: "Enable File Attachments", composer_attachments_help: "Allow users to upload and attach files to their messages.", thread_actions_feedback: "Enable Feedback Buttons", thread_actions_feedback_help: "Show like/dislike buttons on AI responses.", thread_actions_retry: "Enable Retry Button", thread_actions_retry_help: "Show a retry button to regenerate the last AI response.", history_enabled: "Enable Chat History Sidebar", history_enabled_help: "Show the sidebar containing previous conversations.", history_show_delete: "Allow Deleting Conversations", history_show_rename: "Allow Renaming Conversations", history_show_share: "Allow Sharing Conversations", history_show_pin: "Allow Pinning Conversations", sections_modes: "Settings Tab Modes", sections_modes_help: "Control visibility and interactability of settings tabs for users.", mode_editable: "Enable (Editable)", mode_faded: "Fade (Readonly)", mode_hidden: "Hide (Disable)", general_tab: "General Tab", profile_tab: "Profile Tab", account_tab: "Account Tab", inner_fields_modes: "Inner Fields Visibility", inner_fields_modes_help: "Configure visibility for individual fields within each tab." }, user_billing: { initial_balance_tokens: "Default Initial Tokens", initial_balance_requests: "Default Initial Requests", initial_balance_help: "These values will be assigned to new users by default if not specified during creation." }, save_success: "Settings saved successfully", save_error: "Failed to save settings", save: "Save Changes", translations_management: "Translations Management", editor_tips: "All changes are saved automatically to local state. Don't forget to push 'Save Changes' to persist.", sync_from_code: "Sync from Code", reset_button: "Reset to Defaults", reset_confirm_title: "Reset Settings?", reset_confirm_description: "This will reset all fields to their original default values from the code. Current unsaved changes will be lost.", preview: "Preview", tips_label: "TIPS" }, analytics: { title: "Analytics & Statistics", days: "{{count}} Days", total_users: "Total Users", total_threads: "Total Threads", total_messages: "Total Messages", total_token_usage: "Total Token Usage", usage_cost: "Usage & Cost", input: "Input", output: "Output", cost: "Cost", threads_chart: "Threads", messages_chart: "Messages", token_usage_chart: "Token Usage", active_users: "Active Users", conversations: "conversations", threads: "threads", feedback: "User Feedback", total_feedback: "Total Feedback", positive: "Positive", negative: "Negative", loading_analytics: "Loading analytics...", error_loading: "Error loading data" }, chat_history: { title: "Chat History Management", search_placeholder: "Search by name, phone, thread title, or ID...", search_button: "Search", threads_list: "Threads List", thread_count: "{{count}}", no_thread_title: "Untitled conversation", messages: "Messages", messages_for: "Messages for: {{title}}", select_thread: "Select a conversation to view", no_threads: "No conversations found", empty_thread: "This conversation is empty", loading_threads: "Loading...", loading_messages: "Loading messages...", user_label: "User", assistant_label: "AI Assistant", input_tokens: "Input: {{value}}", output_tokens: "Output: {{value}}", total_tokens: "Total: {{value}}", cost: "Cost: {{value}}", unpriced: "Unpriced", all_feedbacks: "All Conversations", liked_feedbacks: "Liked 👍", disliked_feedbacks: "Disliked 👎", any_feedback: "With Feedback", output_available: "Output Available", running: "Running...", unnamed_file: "Unnamed File", download_file: "Download File" }, users: { title: "User Management", user_count: "User count: {{count}}", add_user: "Add New User", edit_user: "Edit User", phone: "Phone Number", phone_placeholder: "09123456789", name: "Name", surname: "Surname", initial_tokens: "Initial Tokens (optional)", initial_requests: "Initial Requests (optional)", balance: "Balance", requests_label: "Requests", tokens_label: "Tokens", token_limit: "Token Limit", request_limit: "Request Limit", tokens_usage: "Tokens Usage", requests_usage: "Requests Usage", actions: "Actions", copy_token: "Copy Token (auto-refresh)", token_copied: "Token copied successfully", no_token: "No token found for this user", recharge: "Recharge Balance", full_charge: "Full Charge", update_balance: "Update Balance", update_balance_for: "Update Balance for", token_count: "Token Count", request_count: "Request Count", updating: "Updating...", no_users: "No users found.", sort_ascending: "Sort ascending", sort_descending: "Sort descending", confirm_delete_user: "Are you sure you want to delete this user?", tokens_exceed_limit: "Tokens cannot exceed the specified limit", requests_exceed_limit: "Requests cannot exceed the specified limit", metadata: "Metadata (JSON)", initial_balance: "Initial Balance", custom_fields: "Additional Fields", metadata_raw: "Metadata (Raw JSON)", advanced_usage: "Advanced usage", invalid_json: "Invalid JSON format", auto_recharge: "Automatic Balance Renewal", auto_recharge_help: "Restore this user's balance to its limits on a recurring schedule.", enabled: "Enabled", recharge_interval: "Every", recharge_unit: "Interval Unit", recharge_unit_minute: "Minute(s)", recharge_unit_hour: "Hour(s)", recharge_unit_day: "Day(s)", recharge_unit_week: "Week(s)", recharge_unit_month: "Month(s)", recharge_schedule_help: "New schedules begin when saved. Existing schedules keep their current cycle anchor.", next_recharge: "Next renewal", last_recharge: "Last automatic renewal", not_available: "Not available", recharge_interval_invalid: "The renewal interval must be a positive whole number", recharge_policy_not_saved: "The backend did not save the renewal policy. Restart or update the backend to the version that supports automatic renewal.", usage_summary: "Usage Summary", input_tokens: "Input Tokens", output_tokens: "Output Tokens", total_tokens: "Total Tokens", requests_made: "Requests Made", total_cost: "Total Cost", renewals: "Balance Renewals", unpriced_requests: "Unpriced Requests" }, admins: { title: "Admin Management", admin_count: "Admin count: {{count}}", add_admin: "Add New Admin", edit_admin: "Edit Admin", username: "Username", name: "Name", password: "Password", password_edit: "New Password (leave empty to keep current)", permissions: "Permissions", perm_chat_history: "Chat History", perm_admin_management: "Admin Management", perm_user_management: "User Management", perm_analytics: "Analytics", perm_settings: "Settings", no_admins: "No admins found.", confirm_delete_admin: "Are you sure you want to delete this admin?" }, errors: { access_denied_title: "Access Denied", access_denied_message: "You don't have the necessary permissions to access this page. You can contact the administrator!", back_to_dashboard: "Back to Dashboard" }, login: { title: "Admin Panel", setup_title: "Initial Setup", setup_description: "No admin account exists yet. Set a password for the default admin user to get started.", set_password: "Set Password", set_password_placeholder: "Choose a strong password", confirm_password: "Confirm Password", confirm_password_placeholder: "Re-enter the password", passwords_mismatch: "Passwords do not match", password_too_short: "Password must be at least 4 characters", create_admin: "Create Admin & Login", setting_up: "Setting up...", username: "Username", username_placeholder: "Username", password: "Password", password_placeholder: "••••••••", submit: "Login", logging_in: "Logging in...", error: "Login failed", copyright: "© 2026 AI Chatbot Platform" } }, Ha = { title: "Settings", sections: { profile: "Profile", general: "General", account: "Account" }, profile: { title: "Profile Information", subtitle: "Update your personal details below.", name: "First Name", surname: "Last Name", phone: "Phone Number", password: "New Password", password_placeholder: "Leave empty to keep current", save: "Save Changes", saving: "Saving...", success: "Profile updated successfully", error: "Failed to update profile", select_placeholder: "Select an option" }, general: { title: "General Settings", subtitle: "Configure look and feel and language.", theme: "Theme", language: "Language", themes: { light: "Light", dark: "Dark", system: "System" }, accent: "Accent Color", radius: "Rounded Corners", radius_levels: { sharp: "Sharp", round: "Round" }, languages: { en: "English", fa: "Persian" } }, account: { title: "Account & Usage", subtitle: "Monitor your quotas and manage your session.", balance: "Current Balance", tokens: "Tokens", requests: "Requests", logout: "Logout", logout_confirm: "Are you sure you want to logout?", last_recharge: "Last balance update on" } }, qa = { unauthorized: "Authentication required. Please login again.", invalid_credentials: "Invalid phone number or password.", phone_required: "Phone number is required.", password_required: "Password is required.", name_surname_required: "Name and surname are required.", phone_already_exists: "This phone number is already registered.", invalid_token: "Your session has expired. Please login again.", user_not_found: "User not found.", insufficient_balance: "Insufficient balance. Please recharge your account.", me_update_failed: "Failed to update profile information.", thread_not_found: "Conversation not found.", access_denied: "You do not have permission to perform this action.", feedback_save_failed: "Failed to save feedback.", thread_update_failed: "Failed to update conversation.", thread_delete_failed: "Failed to delete conversation.", attachment_not_found: "Attachment not found.", thread_share_failed: "Failed to share conversation.", model_quota_reached_error: "The system cannot respond at this time. Please try again later.", admin_already_exists: "Admin with this username already exists.", admin_not_found: "Admin not found.", cannot_delete_self: "You cannot delete your own admin account.", admin_update_failed: "Failed to update admin information.", internal_error: "An internal server error occurred. Please try again later.", validation_error: "Invalid data provided. Please check your input.", not_found: "The requested resource was not found." }, ja = {
6292
6292
  sidebar: Pa,
6293
6293
  chat: Ma,
6294
6294
  tools_ui: za,
@@ -6297,7 +6297,7 @@ const Pa = { new_conversation: "New conversation", tooltip_new_conversation: "St
6297
6297
  admin: Ba,
6298
6298
  settings: Ha,
6299
6299
  errors: qa
6300
- }, Ga = { new_conversation: "گفتگوی جدید", tooltip_new_conversation: "شروع یک گفتگوی جدید", delete_conversation: "حذف", delete_confirm_title: "حذف گفتگو؟", delete_confirm_description: "آیا از حذف این گفتگو اطمینان دارید؟ این عمل قابل بازگشت نیست.", cancel: "انصراف", delete: "حذف", chat_deleted_success: "گفتگو با موفقیت حذف شد", logout: "خروج", new_chat: "گفتگوی جدید", rename_conversation: "تغییر نام", rename_success: "نام گفتگو با موفقیت تغییر کرد", rename_failed: "خطا در تغییر نام گفتگو", search_conversations: "جستجوی گفتگوها...", save: "ذخیره", no_conversations: "هنوز گفتگویی ندارید", loading_more: "در حال بارگذاری...", pinned_success: "گفتگو پین شد", unpinned_success: "گفتگو از حالت پین خارج شد", pin_failed: "خطا در پین کردن گفتگو", share_success: "لینک کپی شد", share_description: "لینک اشتراک‌گذاری در حافظه موقت کپی شد.", share_failed: "خطا در ایجاد لینک اشتراک‌گذاری", pin_conversation: "پین", unpin_conversation: "برداشتن پین", share_conversation: "اشتراک‌گذاری" }, Va = { tools: "ابزارها", error: "خطا:", input_placeholder: "سوالتو اینجا بپرس...", insufficient_balance: "موجودی حساب شما کافی نیست. لطفا برای ادامه، حساب خود را شارژ کنید.", regenerate: "تولید مجدد", retry: "تلاش مجدد", copy: "کپی", like: "پسندیدم", dislike: "نپسندیدم", attach_file: "پیوست فایل", remove_file: "حذف فایل", used_sources: "از {{count}} منبع استفاده شد", welcome: { title: "سلام! چطور می‌تونم کمکت کنم؟", subtitle: "هر سوالی داری بپرس، تمام تلاشمو می‌کنم کمکت کنم.", suggestions: ["چه کارهایی می‌تونی انجام بدی؟", "یه چیز جالب بهم بگو", "کمکم کن یه ایمیل بنویسم", "یه مفهوم رو برام توضیح بده"] }, disclaimer: "هوش مصنوعی ممکن است اشتباه کند. اطلاعات مهم را بررسی کنید." }, Wa = { pending: "در انتظار", running: "در حال اجرا", completed: "تکمیل شده", error: "خطا", parameters: "پارامترها", result: "نتیجه", view_error: "نمایش خطا", tool_error: "خطای ابزار", copied: "کپی شد!", copy_error: "کپی خطا" }, Ya = { login_tab: "ورود", signup_tab: "ثبت نام", phone: "شماره تلفن", phone_placeholder: "شماره تلفن", password: "رمز عبور", name: "نام", name_placeholder: "نام", surname: "نام خانوادگی", surname_placeholder: "نام خانوادگی", logging_in: "در حال ورود...", signing_up: "در حال ثبت نام...", auth_page_disabled_title: "صفحه ورود غیرفعال شده است.", auth_page_disabled_description: "برای دسترسی با مدیر سامانه تماس بگیرید.", select_placeholder: "انتخاب کنید", login_button: "ورود", signup_button: "ثبت نام" }, Xa = { toggle: "تغییر تم", light: "تغییر به تم روشن", dark: "تغییر به تم تاریک", system: "تغییر به تم سیستم" }, Ka = { select_placeholder: "انتخاب کنید", loading: "در حال بارگذاری...", retry: "تلاش مجدد", save: "ذخیره", saving: "در حال ذخیره...", cancel: "انصراف", delete: "حذف", edit: "ویرایش", search: "جستجو", search_placeholder: "جستجو...", no_data: "داده‌ای موجود نیست", loading_more: "در حال بارگذاری بیشتر...", confirm_delete: "آیا از حذف اطمینان دارید؟", error_loading: "خطا در بارگذاری داده‌ها", dashboard: { title: "پنل ادمین", logout: "خروج", tabs: { analytics: "تحلیل و آمار", chat_history: "گفتگوها", users: "کاربران", admins: "ادمین‌ها", settings: "تنظیمات" } }, app_settings: { title: "تنظیمات سامانه", subtitle: "پیکربندی کلی ظاهر و رفتار سامانه را مدیریت کنید.", sections: { general: "اطلاعات پایه", chat: "تنظیمات گفتگو", user_billing: "کاربری و مالی" }, general: { app_name: "نام سامانه", admin_title: "عنوان پنل ادمین", language: "زبان پیش‌فرض", language_help: "زبانی که کاربر در اولین ورود مشاهده می‌کند (در صورت عدم تشخیص خودکار).", appearance: "ظاهر پیش‌فرض", appearance_help: "این مقادیر زمانی اعمال می‌شوند که کاربر تنظیمات ظاهری خود را ذخیره نکرده باشد.", default_theme: "پوسته پیش‌فرض", default_accent: "رنگ اصلی پیش‌فرض", default_accent_help: "هر رنگ CSS پشتیبانی‌شده توسط مرورگر را وارد کنید؛ مانند #3b82f6 یا rgb(59 130 246).", default_accent_invalid: "یک رنگ CSS معتبر و پشتیبانی‌شده توسط مرورگر وارد کنید.", default_accent_preview: "پیش‌نمایش رنگ اصلی" }, chat: { welcome_greeting: "پیام خوش‌آمدگویی", welcome_subtitle: "زیرعنوان خوش‌آمدگویی", disclaimer: "متن سلب مسئولیت", show_tool_details: "نمایش جزئیات فنی ابزارها (Tools)", show_tool_details_help: "برای نمایش جزئیات فنی و نحوه عملکرد ابزارهای هوش مصنوعی به کاربران، این گزینه را فعال کنید.", show_settings: "نمایش آیکون تنظیمات برای کاربران", show_settings_help: "نمایش چرخ‌دنده تنظیمات در محیط چت برای شخصی‌سازی توسط کاربر.", show_version_in_settings: "نمایش نسخه برنامه در تنظیمات کاربر", show_version_in_settings_help: "نسخه برنامه را در پایین پنجره تنظیمات کاربر نمایش می‌دهد. این گزینه روی صفحه تنظیمات ادمین اثری ندارد.", disable_signup: "غیرفعال‌سازی ثبت‌نام", disable_signup_help: "تب ثبت‌نام را مخفی می‌کند تا کاربران فقط بتوانند وارد شوند.", disable_auth_page: "غیرفعال‌سازی صفحه ورود/ثبت‌نام", disable_auth_page_help: "کل صفحه احراز هویت را مخفی می‌کند و دسترسی به فرم‌های ورود و ثبت‌نام را می‌بندد.", composer_attachments: "فعال‌سازی پیوست فایل", composer_attachments_help: "اجازه به کاربران برای آپلود و پیوست فایل به پیام‌ها.", thread_actions_feedback: "فعال‌سازی دکمه‌های بازخورد", thread_actions_feedback_help: "نمایش دکمه‌های پسندیدن/نپسندیدن در پاسخ‌های هوش مصنوعی.", thread_actions_retry: "فعال‌سازی دکمه تلاش مجدد", thread_actions_retry_help: "نمایش دکمه تلاش مجدد برای تولید دوباره آخرین پاسخ هوش مصنوعی.", history_enabled: "فعال‌سازی سایدبار تاریخچه", history_enabled_help: "نمایش منوی کناری شامل گفتگوهای قبلی.", history_show_delete: "اجازه حذف گفتگوها", history_show_rename: "اجازه تغییر نام گفتگوها", history_show_share: "اجازه اشتراک‌گذاری گفتگوها", history_show_pin: "اجازه پین کردن گفتگوها", sections_modes: "وضعیت نمایش تب‌های تنظیمات", sections_modes_help: "کنترل نمایش یا غیرفعال بودن تب‌های مختلف در بخش تنظیمات کاربر.", mode_editable: "فعال (قابل ویرایش)", mode_faded: "محو (فقط خواندنی)", mode_hidden: "مخفی (غیرفعال)", general_tab: "تب عمومی", profile_tab: "تب پروفایل", account_tab: "تب حساب کاربری", inner_fields_modes: "مشاهده‌پذیری فیلدهای داخلی", inner_fields_modes_help: "وضعیت نمایش فیلدهای هر تب را به‌صورت مجزا پیکربندی کنید." }, user_billing: { initial_balance_tokens: "توکن اولیه پیش‌فرض", initial_balance_requests: "تعداد درخواست اولیه پیش‌فرض", initial_balance_help: "این مقادیر به‌صورت خودکار به کاربران جدید اختصاص داده می‌شوند، مگر اینکه هنگام ایجاد کاربر مقدار دیگری تعیین شود." }, save_success: "تنظیمات با موفقیت ذخیره شد", save_error: "خطا در ذخیره‌سازی تنظیمات", save: "ذخیره تغییرات", translations_management: "مدیریت ترجمه‌ها", editor_tips: "تمام تغییرات به‌صورت خودکار در حالت محلی ذخیره می‌شوند. برای نهایی‌سازی، دکمه «ذخیره تغییرات» را بزنید.", sync_from_code: "همگام‌سازی از کد", reset_button: "بازنشانی به تنظیمات اولیه", reset_confirm_title: "بازنشانی تنظیمات؟", reset_confirm_description: "این عمل تمام فیلدها را به مقادیر پیش‌فرض در کد بازمی‌گرداند. تغییرات ذخیره نشده فعلی از بین خواهند رفت.", preview: "پیش‌نمایش", tips_label: "نکته" }, analytics: { title: "تحلیل و آمار", days: "{{count}} روز", total_users: "تعداد کاربران", total_threads: "تعداد گفتگوها", total_messages: "تعداد پیام‌ها", total_token_usage: "مصرف کل توکن", threads_chart: "گفتگوها", messages_chart: "پیام‌ها", token_usage_chart: "مصرف توکن", active_users: "کاربران فعال", conversations: "گفتگو", threads: "گفتگو", feedback: "نظرات کاربران", total_feedback: "کل نظرات", positive: "مثبت", negative: "منفی", loading_analytics: "در حال بارگذاری تحلیل‌ها...", error_loading: "خطا در بارگذاری داده‌ها" }, chat_history: { title: "مدیریت تاریخچه گفتگوها", search_placeholder: "جستجو بر اساس نام، شماره تماس، عنوان گفتگو یا شناسه...", search_button: "جستجو", threads_list: "لیست گفتگوها", thread_count: "{{count}}", no_thread_title: "گفتگو بدون عنوان", messages: "پیام‌ها", messages_for: "پیام‌های گفتگو: {{title}}", select_thread: "یک گفتگو را برای مشاهده انتخاب کنید", no_threads: "هیچ گفتگویی یافت نشد", empty_thread: "این گفتگو خالی است", loading_threads: "در حال بارگذاری...", loading_messages: "در حال بارگذاری پیام‌ها...", user_label: "کاربر", assistant_label: "دستیار هوشمند", input_tokens: "ورودی: {{value}}", output_tokens: "خروجی: {{value}}", total_tokens: "کل: {{value}}", all_feedbacks: "همه گفتگوها", liked_feedbacks: "پسندیده شده 👍", disliked_feedbacks: "نپسندیده شده 👎", any_feedback: "دارای بازخورد", output_available: "خروجی موجود است", running: "در حال اجرا...", unnamed_file: "فایل بدون نام", download_file: "دانلود فایل" }, users: { title: "مدیریت کاربران", user_count: "تعداد کاربران: {{count}}", add_user: "افزودن کاربر جدید", edit_user: "ویرایش کاربر", phone: "شماره تلفن", phone_placeholder: "۰۹۱۲۳۴۵۶۷۸۹", name: "نام", surname: "نام خانوادگی", initial_tokens: "تعداد توکن اولیه (اختیاری)", initial_requests: "تعداد درخواست اولیه (اختیاری)", balance: "موجودی", requests_label: "درخواست‌ها", tokens_label: "توکن‌ها", token_limit: "سقف توکن", request_limit: "سقف درخواست", tokens_usage: "میزان مصرف توکن", requests_usage: "میزان مصرف درخواست", actions: "عملیات", copy_token: "کپی توکن (با بروزرسانی خودکار)", token_copied: "توکن با موفقیت کپی شد", no_token: "توکنی برای این کاربر یافت نشد", recharge: "شارژ موجودی", full_charge: "شارژ کامل", update_balance: "بروزرسانی موجودی", update_balance_for: "بروزرسانی موجودی", token_count: "تعداد توکن", request_count: "تعداد درخواست", updating: "در حال بروزرسانی...", no_users: "هیچ کاربری یافت نشد.", confirm_delete_user: "آیا از حذف این کاربر اطمینان دارید؟", tokens_exceed_limit: "تعداد توکن نمی‌تواند بیشتر از سقف مجاز باشد", requests_exceed_limit: "تعداد درخواست نمی‌تواند بیشتر از سقف مجاز باشد", metadata: "متادیتا (JSON)", initial_balance: "موجودی اولیه", custom_fields: "فیلدهای اضافه", metadata_raw: "متادیتا (JSON خام)", advanced_usage: "استفاده پیشرفته", invalid_json: "فرمت JSON نامعتبر است" }, admins: { title: "مدیریت ادمین‌ها", admin_count: "تعداد ادمین‌ها: {{count}}", add_admin: "افزودن ادمین جدید", edit_admin: "ویرایش ادمین", username: "نام کاربری", name: "نام", password: "رمز عبور", password_edit: "رمز عبور جدید (خالی بگذارید تا تغییر نکند)", permissions: "دسترسی‌ها", perm_chat_history: "تاریخچه گفتگوها", perm_admin_management: "مدیریت ادمین‌ها", perm_user_management: "مدیریت کاربران", perm_analytics: "تحلیل و آمار", perm_settings: "تنظیمات", no_admins: "هیچ ادمینی یافت نشد.", confirm_delete_admin: "آیا از حذف این ادمین اطمینان دارید؟" }, errors: { access_denied_title: "عدم دسترسی", access_denied_message: "شما مجوزهای لازم برای دسترسی به این صفحه را ندارید. می‌توانید با مدیر سیستم تماس بگیرید.", back_to_dashboard: "بازگشت به پیشخوان" }, login: { title: "پنل ادمین", setup_title: "راه‌اندازی اولیه", setup_description: "هنوز حساب ادمینی وجود ندارد. برای شروع، یک رمز عبور برای کاربر ادمین پیش‌فرض تنظیم کنید.", set_password: "تعیین رمز عبور", set_password_placeholder: "یک رمز عبور قوی انتخاب کنید", confirm_password: "تأیید رمز عبور", confirm_password_placeholder: "رمز عبور را دوباره وارد کنید", passwords_mismatch: "رمزهای عبور مطابقت ندارند", password_too_short: "رمز عبور باید حداقل ۴ کاراکتر باشد", create_admin: "ایجاد ادمین و ورود", setting_up: "در حال راه‌اندازی...", username: "نام کاربری", username_placeholder: "نام کاربری", password: "رمز عبور", password_placeholder: "••••••••", submit: "ورود به پنل", logging_in: "در حال ورود...", error: "خطا در ورود", copyright: "© ۲۰۲۶ پلتفرم چت‌بات هوشمند" } }, Za = { title: "تنظیمات", sections: { profile: "پروفایل", general: "عمومی", account: "حساب کاربری" }, profile: { title: "اطلاعات پروفایل", subtitle: "اطلاعات شخصی خود را در زیر بروز کنید.", name: "نام", surname: "نام خانوادگی", phone: "شماره تلفن", password: "رمز عبور جدید", password_placeholder: "برای عدم تغییر خالی بگذارید", save: "ذخیره تغییرات", saving: "در حال ذخیره...", success: "پروفایل با موفقیت بروزرسانی شد", error: "خطا در بروزرسانی پروفایل", select_placeholder: "انتخاب کنید" }, general: { title: "تنظیمات عمومی", subtitle: "ظاهر و زبان برنامه را تنظیم کنید.", theme: "تم", language: "زبان", themes: { light: "روشن", dark: "تاریک", system: "سیستم" }, accent: "رنگ اصلی", radius: "میزان گردی لبه‌ها", radius_levels: { sharp: "تیز", round: "گرد" }, languages: { en: "English", fa: "فارسی" } }, account: { title: "حساب و میزان مصرف", subtitle: "سهمیه مصرف و نشست خود را مدیریت کنید.", balance: "موجود فعلی", tokens: "توکن‌ها", requests: "درخواست‌ها", logout: "خروج از حساب", logout_confirm: "آیا از خروج اطمینان دارید؟", last_recharge: "آخرین بروزرسانی اعتبار در تاریخ" } }, Ja = { unauthorized: "دسترسی مجاز نیست. لطفاً دوباره وارد شوید.", invalid_credentials: "شماره تلفن یا رمز عبور اشتباه است.", phone_required: "شماره تلفن الزامی است.", password_required: "رمز عبور الزامی است.", name_surname_required: "نام و نام خانوادگی الزامی است.", phone_already_exists: "این شماره تلفن قبلاً ثبت شده است.", invalid_token: "نشست شما منقضی شده است. لطفاً دوباره وارد شوید.", user_not_found: "کاربر یافت نشد.", insufficient_balance: "موجودی کافی نیست. لطفاً حساب خود را شارژ کنید.", me_update_failed: "خطا در بروزرسانی اطلاعات پروفایل.", thread_not_found: "گفتگو یافت نشد.", access_denied: "شما اجازه انجام این عملیات را ندارید.", feedback_save_failed: "خطا در ثبت بازخورد.", thread_update_failed: "خطا در بروزرسانی گفتگو.", thread_delete_failed: "خطا در حذف گفتگو.", attachment_not_found: "فایل پیوست یافت نشد.", thread_share_failed: "خطا در اشتراک‌گذاری گفتگو.", model_quota_reached_error: "سامانه در حال حاضر قادر به پاسخ‌گویی نیست. لطفاً بعداً دوباره تلاش کنید.", admin_already_exists: "ادمین با این نام کاربری قبلاً ایجاد شده است.", admin_not_found: "ادمین یافت نشد.", cannot_delete_self: "شما نمی‌توانید حساب مدیریت خود را حذف کنید.", admin_update_failed: "خطا در بروزرسانی اطلاعات ادمین.", internal_error: "یک خطای داخلی در سرور رخ داده است. لطفاً بعداً تلاش کنید.", validation_error: "داده‌های ارسالی معتبر نیستند. لطفاً ورودی‌های خود را بررسی کنید.", not_found: "منبع مورد نظر یافت نشد." }, Qa = {
6300
+ }, Ga = { new_conversation: "گفتگوی جدید", tooltip_new_conversation: "شروع یک گفتگوی جدید", delete_conversation: "حذف", delete_confirm_title: "حذف گفتگو؟", delete_confirm_description: "آیا از حذف این گفتگو اطمینان دارید؟ این عمل قابل بازگشت نیست.", cancel: "انصراف", delete: "حذف", chat_deleted_success: "گفتگو با موفقیت حذف شد", logout: "خروج", new_chat: "گفتگوی جدید", rename_conversation: "تغییر نام", rename_success: "نام گفتگو با موفقیت تغییر کرد", rename_failed: "خطا در تغییر نام گفتگو", search_conversations: "جستجوی گفتگوها...", save: "ذخیره", no_conversations: "هنوز گفتگویی ندارید", loading_more: "در حال بارگذاری...", pinned_success: "گفتگو پین شد", unpinned_success: "گفتگو از حالت پین خارج شد", pin_failed: "خطا در پین کردن گفتگو", share_success: "لینک کپی شد", share_description: "لینک اشتراک‌گذاری در حافظه موقت کپی شد.", share_failed: "خطا در ایجاد لینک اشتراک‌گذاری", pin_conversation: "پین", unpin_conversation: "برداشتن پین", share_conversation: "اشتراک‌گذاری" }, Va = { tools: "ابزارها", error: "خطا:", input_placeholder: "سوالتو اینجا بپرس...", insufficient_balance: "موجودی حساب شما کافی نیست. لطفا برای ادامه، حساب خود را شارژ کنید.", regenerate: "تولید مجدد", retry: "تلاش مجدد", copy: "کپی", like: "پسندیدم", dislike: "نپسندیدم", attach_file: "پیوست فایل", remove_file: "حذف فایل", used_sources: "از {{count}} منبع استفاده شد", welcome: { title: "سلام! چطور می‌تونم کمکت کنم؟", subtitle: "هر سوالی داری بپرس، تمام تلاشمو می‌کنم کمکت کنم.", suggestions: ["چه کارهایی می‌تونی انجام بدی؟", "یه چیز جالب بهم بگو", "کمکم کن یه ایمیل بنویسم", "یه مفهوم رو برام توضیح بده"] }, disclaimer: "هوش مصنوعی ممکن است اشتباه کند. اطلاعات مهم را بررسی کنید." }, Wa = { pending: "در انتظار", running: "در حال اجرا", completed: "تکمیل شده", error: "خطا", parameters: "پارامترها", result: "نتیجه", view_error: "نمایش خطا", tool_error: "خطای ابزار", copied: "کپی شد!", copy_error: "کپی خطا" }, Ya = { login_tab: "ورود", signup_tab: "ثبت نام", phone: "شماره تلفن", phone_placeholder: "شماره تلفن", password: "رمز عبور", name: "نام", name_placeholder: "نام", surname: "نام خانوادگی", surname_placeholder: "نام خانوادگی", logging_in: "در حال ورود...", signing_up: "در حال ثبت نام...", auth_page_disabled_title: "صفحه ورود غیرفعال شده است.", auth_page_disabled_description: "برای دسترسی با مدیر سامانه تماس بگیرید.", select_placeholder: "انتخاب کنید", login_button: "ورود", signup_button: "ثبت نام" }, Xa = { toggle: "تغییر تم", light: "تغییر به تم روشن", dark: "تغییر به تم تاریک", system: "تغییر به تم سیستم" }, Ka = { select_placeholder: "انتخاب کنید", loading: "در حال بارگذاری...", retry: "تلاش مجدد", save: "ذخیره", saving: "در حال ذخیره...", cancel: "انصراف", delete: "حذف", edit: "ویرایش", search: "جستجو", search_placeholder: "جستجو...", no_data: "داده‌ای موجود نیست", loading_more: "در حال بارگذاری بیشتر...", confirm_delete: "آیا از حذف اطمینان دارید؟", error_loading: "خطا در بارگذاری داده‌ها", dashboard: { title: "پنل ادمین", logout: "خروج", tabs: { analytics: "تحلیل و آمار", chat_history: "گفتگوها", users: "کاربران", admins: "ادمین‌ها", settings: "تنظیمات" } }, app_settings: { title: "تنظیمات سامانه", subtitle: "پیکربندی کلی ظاهر و رفتار سامانه را مدیریت کنید.", sections: { general: "اطلاعات پایه", chat: "تنظیمات گفتگو", user_billing: "کاربری و مالی" }, general: { app_name: "نام سامانه", admin_title: "عنوان پنل ادمین", language: "زبان پیش‌فرض", language_help: "زبانی که کاربر در اولین ورود مشاهده می‌کند (در صورت عدم تشخیص خودکار).", appearance: "ظاهر پیش‌فرض", appearance_help: "این مقادیر زمانی اعمال می‌شوند که کاربر تنظیمات ظاهری خود را ذخیره نکرده باشد.", default_theme: "پوسته پیش‌فرض", default_accent: "رنگ اصلی پیش‌فرض", default_accent_help: "هر رنگ CSS پشتیبانی‌شده توسط مرورگر را وارد کنید؛ مانند #3b82f6 یا rgb(59 130 246).", default_accent_invalid: "یک رنگ CSS معتبر و پشتیبانی‌شده توسط مرورگر وارد کنید.", default_accent_preview: "پیش‌نمایش رنگ اصلی" }, chat: { welcome_greeting: "پیام خوش‌آمدگویی", welcome_subtitle: "زیرعنوان خوش‌آمدگویی", disclaimer: "متن سلب مسئولیت", show_tool_details: "نمایش جزئیات فنی ابزارها (Tools)", show_tool_details_help: "برای نمایش جزئیات فنی و نحوه عملکرد ابزارهای هوش مصنوعی به کاربران، این گزینه را فعال کنید.", show_settings: "نمایش آیکون تنظیمات برای کاربران", show_settings_help: "نمایش چرخ‌دنده تنظیمات در محیط چت برای شخصی‌سازی توسط کاربر.", show_version_in_settings: "نمایش نسخه برنامه در تنظیمات کاربر", show_version_in_settings_help: "نسخه برنامه را در پایین پنجره تنظیمات کاربر نمایش می‌دهد. این گزینه روی صفحه تنظیمات ادمین اثری ندارد.", disable_signup: "غیرفعال‌سازی ثبت‌نام", disable_signup_help: "تب ثبت‌نام را مخفی می‌کند تا کاربران فقط بتوانند وارد شوند.", disable_auth_page: "غیرفعال‌سازی صفحه ورود/ثبت‌نام", disable_auth_page_help: "کل صفحه احراز هویت را مخفی می‌کند و دسترسی به فرم‌های ورود و ثبت‌نام را می‌بندد.", composer_attachments: "فعال‌سازی پیوست فایل", composer_attachments_help: "اجازه به کاربران برای آپلود و پیوست فایل به پیام‌ها.", thread_actions_feedback: "فعال‌سازی دکمه‌های بازخورد", thread_actions_feedback_help: "نمایش دکمه‌های پسندیدن/نپسندیدن در پاسخ‌های هوش مصنوعی.", thread_actions_retry: "فعال‌سازی دکمه تلاش مجدد", thread_actions_retry_help: "نمایش دکمه تلاش مجدد برای تولید دوباره آخرین پاسخ هوش مصنوعی.", history_enabled: "فعال‌سازی سایدبار تاریخچه", history_enabled_help: "نمایش منوی کناری شامل گفتگوهای قبلی.", history_show_delete: "اجازه حذف گفتگوها", history_show_rename: "اجازه تغییر نام گفتگوها", history_show_share: "اجازه اشتراک‌گذاری گفتگوها", history_show_pin: "اجازه پین کردن گفتگوها", sections_modes: "وضعیت نمایش تب‌های تنظیمات", sections_modes_help: "کنترل نمایش یا غیرفعال بودن تب‌های مختلف در بخش تنظیمات کاربر.", mode_editable: "فعال (قابل ویرایش)", mode_faded: "محو (فقط خواندنی)", mode_hidden: "مخفی (غیرفعال)", general_tab: "تب عمومی", profile_tab: "تب پروفایل", account_tab: "تب حساب کاربری", inner_fields_modes: "مشاهده‌پذیری فیلدهای داخلی", inner_fields_modes_help: "وضعیت نمایش فیلدهای هر تب را به‌صورت مجزا پیکربندی کنید." }, user_billing: { initial_balance_tokens: "توکن اولیه پیش‌فرض", initial_balance_requests: "تعداد درخواست اولیه پیش‌فرض", initial_balance_help: "این مقادیر به‌صورت خودکار به کاربران جدید اختصاص داده می‌شوند، مگر اینکه هنگام ایجاد کاربر مقدار دیگری تعیین شود." }, save_success: "تنظیمات با موفقیت ذخیره شد", save_error: "خطا در ذخیره‌سازی تنظیمات", save: "ذخیره تغییرات", translations_management: "مدیریت ترجمه‌ها", editor_tips: "تمام تغییرات به‌صورت خودکار در حالت محلی ذخیره می‌شوند. برای نهایی‌سازی، دکمه «ذخیره تغییرات» را بزنید.", sync_from_code: "همگام‌سازی از کد", reset_button: "بازنشانی به تنظیمات اولیه", reset_confirm_title: "بازنشانی تنظیمات؟", reset_confirm_description: "این عمل تمام فیلدها را به مقادیر پیش‌فرض در کد بازمی‌گرداند. تغییرات ذخیره نشده فعلی از بین خواهند رفت.", preview: "پیش‌نمایش", tips_label: "نکته" }, analytics: { title: "تحلیل و آمار", days: "{{count}} روز", total_users: "تعداد کاربران", total_threads: "تعداد گفتگوها", total_messages: "تعداد پیام‌ها", total_token_usage: "مصرف کل توکن", usage_cost: "مصرف و هزینه", input: "ورودی", output: "خروجی", cost: "هزینه", threads_chart: "گفتگوها", messages_chart: "پیام‌ها", token_usage_chart: "مصرف توکن", active_users: "کاربران فعال", conversations: "گفتگو", threads: "گفتگو", feedback: "نظرات کاربران", total_feedback: "کل نظرات", positive: "مثبت", negative: "منفی", loading_analytics: "در حال بارگذاری تحلیل‌ها...", error_loading: "خطا در بارگذاری داده‌ها" }, chat_history: { title: "مدیریت تاریخچه گفتگوها", search_placeholder: "جستجو بر اساس نام، شماره تماس، عنوان گفتگو یا شناسه...", search_button: "جستجو", threads_list: "لیست گفتگوها", thread_count: "{{count}}", no_thread_title: "گفتگو بدون عنوان", messages: "پیام‌ها", messages_for: "پیام‌های گفتگو: {{title}}", select_thread: "یک گفتگو را برای مشاهده انتخاب کنید", no_threads: "هیچ گفتگویی یافت نشد", empty_thread: "این گفتگو خالی است", loading_threads: "در حال بارگذاری...", loading_messages: "در حال بارگذاری پیام‌ها...", user_label: "کاربر", assistant_label: "دستیار هوشمند", input_tokens: "ورودی: {{value}}", output_tokens: "خروجی: {{value}}", total_tokens: "کل: {{value}}", cost: "هزینه: {{value}}", unpriced: "بدون هزینه", all_feedbacks: "همه گفتگوها", liked_feedbacks: "پسندیده شده 👍", disliked_feedbacks: "نپسندیده شده 👎", any_feedback: "دارای بازخورد", output_available: "خروجی موجود است", running: "در حال اجرا...", unnamed_file: "فایل بدون نام", download_file: "دانلود فایل" }, users: { title: "مدیریت کاربران", user_count: "تعداد کاربران: {{count}}", add_user: "افزودن کاربر جدید", edit_user: "ویرایش کاربر", phone: "شماره تلفن", phone_placeholder: "۰۹۱۲۳۴۵۶۷۸۹", name: "نام", surname: "نام خانوادگی", initial_tokens: "تعداد توکن اولیه (اختیاری)", initial_requests: "تعداد درخواست اولیه (اختیاری)", balance: "موجودی", requests_label: "درخواست‌ها", tokens_label: "توکن‌ها", token_limit: "سقف توکن", request_limit: "سقف درخواست", tokens_usage: "میزان مصرف توکن", requests_usage: "میزان مصرف درخواست", actions: "عملیات", copy_token: "کپی توکن (با بروزرسانی خودکار)", token_copied: "توکن با موفقیت کپی شد", no_token: "توکنی برای این کاربر یافت نشد", recharge: "شارژ موجودی", full_charge: "شارژ کامل", update_balance: "بروزرسانی موجودی", update_balance_for: "بروزرسانی موجودی", token_count: "تعداد توکن", request_count: "تعداد درخواست", updating: "در حال بروزرسانی...", no_users: "هیچ کاربری یافت نشد.", sort_ascending: "مرتب‌سازی صعودی", sort_descending: "مرتب‌سازی نزولی", confirm_delete_user: "آیا از حذف این کاربر اطمینان دارید؟", tokens_exceed_limit: "تعداد توکن نمی‌تواند بیشتر از سقف مجاز باشد", requests_exceed_limit: "تعداد درخواست نمی‌تواند بیشتر از سقف مجاز باشد", metadata: "متادیتا (JSON)", initial_balance: "موجودی اولیه", custom_fields: "فیلدهای اضافه", metadata_raw: "متادیتا (JSON خام)", advanced_usage: "استفاده پیشرفته", invalid_json: "فرمت JSON نامعتبر است", auto_recharge: "تمدید خودکار موجودی", auto_recharge_help: "موجودی این کاربر را طبق یک برنامه تکرارشونده تا سقف تعیین‌شده بازنشانی می‌کند.", enabled: "فعال", recharge_interval: "هر", recharge_unit: "واحد بازه", recharge_unit_minute: "دقیقه", recharge_unit_hour: "ساعت", recharge_unit_day: "روز", recharge_unit_week: "هفته", recharge_unit_month: "ماه", recharge_schedule_help: "برنامه جدید از زمان ذخیره آغاز می‌شود. برنامه موجود مبدأ دوره فعلی خود را حفظ می‌کند.", next_recharge: "تمدید بعدی", last_recharge: "آخرین تمدید خودکار", not_available: "در دسترس نیست", recharge_interval_invalid: "بازه تمدید باید یک عدد صحیح مثبت باشد", recharge_policy_not_saved: "سرور تنظیمات تمدید خودکار را ذخیره نکرد. سرور را راه‌اندازی مجدد یا به نسخه پشتیبان‌کننده از تمدید خودکار بروزرسانی کنید.", usage_summary: "خلاصه مصرف", input_tokens: "توکن‌های ورودی", output_tokens: "توکن‌های خروجی", total_tokens: "کل توکن‌ها", requests_made: "تعداد درخواست‌ها", total_cost: "هزینه کل", renewals: "دفعات شارژ موجودی", unpriced_requests: "درخواست‌های بدون هزینه‌ی ثبت شده" }, admins: { title: "مدیریت ادمین‌ها", admin_count: "تعداد ادمین‌ها: {{count}}", add_admin: "افزودن ادمین جدید", edit_admin: "ویرایش ادمین", username: "نام کاربری", name: "نام", password: "رمز عبور", password_edit: "رمز عبور جدید (خالی بگذارید تا تغییر نکند)", permissions: "دسترسی‌ها", perm_chat_history: "تاریخچه گفتگوها", perm_admin_management: "مدیریت ادمین‌ها", perm_user_management: "مدیریت کاربران", perm_analytics: "تحلیل و آمار", perm_settings: "تنظیمات", no_admins: "هیچ ادمینی یافت نشد.", confirm_delete_admin: "آیا از حذف این ادمین اطمینان دارید؟" }, errors: { access_denied_title: "عدم دسترسی", access_denied_message: "شما مجوزهای لازم برای دسترسی به این صفحه را ندارید. می‌توانید با مدیر سیستم تماس بگیرید.", back_to_dashboard: "بازگشت به پیشخوان" }, login: { title: "پنل ادمین", setup_title: "راه‌اندازی اولیه", setup_description: "هنوز حساب ادمینی وجود ندارد. برای شروع، یک رمز عبور برای کاربر ادمین پیش‌فرض تنظیم کنید.", set_password: "تعیین رمز عبور", set_password_placeholder: "یک رمز عبور قوی انتخاب کنید", confirm_password: "تأیید رمز عبور", confirm_password_placeholder: "رمز عبور را دوباره وارد کنید", passwords_mismatch: "رمزهای عبور مطابقت ندارند", password_too_short: "رمز عبور باید حداقل ۴ کاراکتر باشد", create_admin: "ایجاد ادمین و ورود", setting_up: "در حال راه‌اندازی...", username: "نام کاربری", username_placeholder: "نام کاربری", password: "رمز عبور", password_placeholder: "••••••••", submit: "ورود به پنل", logging_in: "در حال ورود...", error: "خطا در ورود", copyright: "© ۲۰۲۶ پلتفرم چت‌بات هوشمند" } }, Za = { title: "تنظیمات", sections: { profile: "پروفایل", general: "عمومی", account: "حساب کاربری" }, profile: { title: "اطلاعات پروفایل", subtitle: "اطلاعات شخصی خود را در زیر بروز کنید.", name: "نام", surname: "نام خانوادگی", phone: "شماره تلفن", password: "رمز عبور جدید", password_placeholder: "برای عدم تغییر خالی بگذارید", save: "ذخیره تغییرات", saving: "در حال ذخیره...", success: "پروفایل با موفقیت بروزرسانی شد", error: "خطا در بروزرسانی پروفایل", select_placeholder: "انتخاب کنید" }, general: { title: "تنظیمات عمومی", subtitle: "ظاهر و زبان برنامه را تنظیم کنید.", theme: "تم", language: "زبان", themes: { light: "روشن", dark: "تاریک", system: "سیستم" }, accent: "رنگ اصلی", radius: "میزان گردی لبه‌ها", radius_levels: { sharp: "تیز", round: "گرد" }, languages: { en: "English", fa: "فارسی" } }, account: { title: "حساب و میزان مصرف", subtitle: "سهمیه مصرف و نشست خود را مدیریت کنید.", balance: "موجود فعلی", tokens: "توکن‌ها", requests: "درخواست‌ها", logout: "خروج از حساب", logout_confirm: "آیا از خروج اطمینان دارید؟", last_recharge: "آخرین بروزرسانی اعتبار در تاریخ" } }, Ja = { unauthorized: "دسترسی مجاز نیست. لطفاً دوباره وارد شوید.", invalid_credentials: "شماره تلفن یا رمز عبور اشتباه است.", phone_required: "شماره تلفن الزامی است.", password_required: "رمز عبور الزامی است.", name_surname_required: "نام و نام خانوادگی الزامی است.", phone_already_exists: "این شماره تلفن قبلاً ثبت شده است.", invalid_token: "نشست شما منقضی شده است. لطفاً دوباره وارد شوید.", user_not_found: "کاربر یافت نشد.", insufficient_balance: "موجودی کافی نیست. لطفاً حساب خود را شارژ کنید.", me_update_failed: "خطا در بروزرسانی اطلاعات پروفایل.", thread_not_found: "گفتگو یافت نشد.", access_denied: "شما اجازه انجام این عملیات را ندارید.", feedback_save_failed: "خطا در ثبت بازخورد.", thread_update_failed: "خطا در بروزرسانی گفتگو.", thread_delete_failed: "خطا در حذف گفتگو.", attachment_not_found: "فایل پیوست یافت نشد.", thread_share_failed: "خطا در اشتراک‌گذاری گفتگو.", model_quota_reached_error: "سامانه در حال حاضر قادر به پاسخ‌گویی نیست. لطفاً بعداً دوباره تلاش کنید.", admin_already_exists: "ادمین با این نام کاربری قبلاً ایجاد شده است.", admin_not_found: "ادمین یافت نشد.", cannot_delete_self: "شما نمی‌توانید حساب مدیریت خود را حذف کنید.", admin_update_failed: "خطا در بروزرسانی اطلاعات ادمین.", internal_error: "یک خطای داخلی در سرور رخ داده است. لطفاً بعداً تلاش کنید.", validation_error: "داده‌های ارسالی معتبر نیستند. لطفاً ورودی‌های خود را بررسی کنید.", not_found: "منبع مورد نظر یافت نشد." }, Qa = {
6301
6301
  sidebar: Ga,
6302
6302
  chat: Va,
6303
6303
  tools_ui: Wa,
@@ -6367,7 +6367,7 @@ function Pi({
6367
6367
  children: n,
6368
6368
  ...o
6369
6369
  }) {
6370
- return /* @__PURE__ */ _(
6370
+ return /* @__PURE__ */ w(
6371
6371
  F.Trigger,
6372
6372
  {
6373
6373
  "data-slot": "select-trigger",
@@ -6390,7 +6390,7 @@ function Mi({
6390
6390
  position: n = "popper",
6391
6391
  ...o
6392
6392
  }) {
6393
- return /* @__PURE__ */ i(F.Portal, { children: /* @__PURE__ */ _(
6393
+ return /* @__PURE__ */ i(F.Portal, { children: /* @__PURE__ */ w(
6394
6394
  F.Content,
6395
6395
  {
6396
6396
  "data-slot": "select-content",
@@ -6429,7 +6429,7 @@ function zi({ className: e, ...t }) {
6429
6429
  );
6430
6430
  }
6431
6431
  function Ui({ className: e, children: t, ...n }) {
6432
- return /* @__PURE__ */ _(
6432
+ return /* @__PURE__ */ w(
6433
6433
  F.Item,
6434
6434
  {
6435
6435
  "data-slot": "select-item",