trade-safety 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,160 +1,199 @@
1
- import { jsxs as c, jsx as a } from "react/jsx-runtime";
2
- import { useTranslation as u } from "react-i18next";
1
+ import { jsxs as _, jsx as i } from "react/jsx-runtime";
2
+ import { useTranslation as D, Trans as Ie } from "react-i18next";
3
3
  import "i18next";
4
4
  import "i18next-resources-to-backend";
5
- import { TRADE_SAFETY_NS as d } from "./locale.mjs";
6
- import { tradeSafetyTranslations as ge } from "./locale.mjs";
7
- import * as g from "react";
8
- import m from "react";
9
- import { BaseCrudRepository as z } from "@aioia/core";
10
- import { z as i } from "zod";
11
- function j(e) {
12
- var t, r, n = "";
13
- if (typeof e == "string" || typeof e == "number") n += e;
14
- else if (typeof e == "object") if (Array.isArray(e)) {
15
- var s = e.length;
16
- for (t = 0; t < s; t++) e[t] && (r = j(e[t])) && (n && (n += " "), n += r);
17
- } else for (r in e) e[r] && (n && (n += " "), n += r);
18
- return n;
19
- }
20
- function w() {
21
- for (var e, t, r = 0, n = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t = j(e)) && (n && (n += " "), n += t);
22
- return n;
23
- }
24
- const E = {
5
+ import { TRADE_SAFETY_NS as $ } from "./locale.mjs";
6
+ import { tradeSafetyTranslations as Rr } from "./locale.mjs";
7
+ import * as C from "react";
8
+ import R, { useState as le, useEffect as $t } from "react";
9
+ import { BaseCrudRepository as zt } from "@aioia/core";
10
+ import { z as c } from "zod";
11
+ function At({
12
+ title: t,
13
+ titleId: n,
14
+ ...a
15
+ }, o) {
16
+ return /* @__PURE__ */ C.createElement("svg", Object.assign({
17
+ xmlns: "http://www.w3.org/2000/svg",
18
+ viewBox: "0 0 24 24",
19
+ fill: "currentColor",
20
+ "aria-hidden": "true",
21
+ "data-slot": "icon",
22
+ ref: o,
23
+ "aria-labelledby": n
24
+ }, a), t ? /* @__PURE__ */ C.createElement("title", {
25
+ id: n
26
+ }, t) : null, /* @__PURE__ */ C.createElement("path", {
27
+ fillRule: "evenodd",
28
+ d: "M2.625 6.75a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875 0A.75.75 0 0 1 8.25 6h12a.75.75 0 0 1 0 1.5h-12a.75.75 0 0 1-.75-.75ZM2.625 12a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0ZM7.5 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5h-12A.75.75 0 0 1 7.5 12Zm-4.875 5.25a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875 0a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5h-12a.75.75 0 0 1-.75-.75Z",
29
+ clipRule: "evenodd"
30
+ }));
31
+ }
32
+ const Ft = /* @__PURE__ */ C.forwardRef(At);
33
+ function Lt({
34
+ title: t,
35
+ titleId: n,
36
+ ...a
37
+ }, o) {
38
+ return /* @__PURE__ */ C.createElement("svg", Object.assign({
39
+ xmlns: "http://www.w3.org/2000/svg",
40
+ viewBox: "0 0 24 24",
41
+ fill: "currentColor",
42
+ "aria-hidden": "true",
43
+ "data-slot": "icon",
44
+ ref: o,
45
+ "aria-labelledby": n
46
+ }, a), t ? /* @__PURE__ */ C.createElement("title", {
47
+ id: n
48
+ }, t) : null, /* @__PURE__ */ C.createElement("path", {
49
+ fillRule: "evenodd",
50
+ d: "M9 4.5a.75.75 0 0 1 .721.544l.813 2.846a3.75 3.75 0 0 0 2.576 2.576l2.846.813a.75.75 0 0 1 0 1.442l-2.846.813a3.75 3.75 0 0 0-2.576 2.576l-.813 2.846a.75.75 0 0 1-1.442 0l-.813-2.846a3.75 3.75 0 0 0-2.576-2.576l-2.846-.813a.75.75 0 0 1 0-1.442l2.846-.813A3.75 3.75 0 0 0 7.466 7.89l.813-2.846A.75.75 0 0 1 9 4.5ZM18 1.5a.75.75 0 0 1 .728.568l.258 1.036c.236.94.97 1.674 1.91 1.91l1.036.258a.75.75 0 0 1 0 1.456l-1.036.258c-.94.236-1.674.97-1.91 1.91l-.258 1.036a.75.75 0 0 1-1.456 0l-.258-1.036a2.625 2.625 0 0 0-1.91-1.91l-1.036-.258a.75.75 0 0 1 0-1.456l1.036-.258a2.625 2.625 0 0 0 1.91-1.91l.258-1.036A.75.75 0 0 1 18 1.5ZM16.5 15a.75.75 0 0 1 .712.513l.394 1.183c.15.447.5.799.948.948l1.183.395a.75.75 0 0 1 0 1.422l-1.183.395c-.447.15-.799.5-.948.948l-.395 1.183a.75.75 0 0 1-1.422 0l-.395-1.183a1.5 1.5 0 0 0-.948-.948l-1.183-.395a.75.75 0 0 1 0-1.422l1.183-.395c.447-.15.799-.5.948-.948l.395-1.183A.75.75 0 0 1 16.5 15Z",
51
+ clipRule: "evenodd"
52
+ }));
53
+ }
54
+ const It = /* @__PURE__ */ C.forwardRef(Lt);
55
+ function Ke(t) {
56
+ var n, a, o = "";
57
+ if (typeof t == "string" || typeof t == "number") o += t;
58
+ else if (typeof t == "object") if (Array.isArray(t)) {
59
+ var p = t.length;
60
+ for (n = 0; n < p; n++) t[n] && (a = Ke(t[n])) && (o && (o += " "), o += a);
61
+ } else for (a in t) t[a] && (o && (o += " "), o += a);
62
+ return o;
63
+ }
64
+ function X() {
65
+ for (var t, n, a = 0, o = "", p = arguments.length; a < p; a++) (t = arguments[a]) && (n = Ke(t)) && (o && (o += " "), o += n);
66
+ return o;
67
+ }
68
+ const Mt = {
25
69
  danger: "bg-error/10 text-error",
26
70
  caution: "bg-error/10 text-error",
27
71
  safe: "bg-neutral/10 text-neutral"
28
- }, R = {
72
+ }, Wt = {
29
73
  danger: "result.danger.badge",
30
74
  caution: "result.caution.badge",
31
75
  safe: "result.safe.badge"
32
- }, A = {
76
+ }, Bt = {
33
77
  sm: "text-xl font-bold",
34
78
  lg: "text-2xl font-bold"
35
79
  };
36
- function b({
37
- badgeVariant: e,
38
- subtitle: t,
39
- icon: r,
40
- title: n,
41
- titleSize: s = "lg",
42
- children: l
80
+ function Y({
81
+ badgeVariant: t,
82
+ subtitle: n,
83
+ icon: a,
84
+ title: o,
85
+ titleSize: p = "lg",
86
+ children: y
43
87
  }) {
44
- const { t: f } = u(d);
45
- return /* @__PURE__ */ c("section", { className: "rounded-2xl bg-neutral-content p-6 shadow-sm", children: [
46
- /* @__PURE__ */ c("header", { className: "mb-4 flex flex-col items-start", children: [
47
- e && /* @__PURE__ */ a(
88
+ const { t: w } = D($);
89
+ return /* @__PURE__ */ _("section", { className: "rounded-2xl bg-neutral-content p-6 shadow-sm", children: [
90
+ /* @__PURE__ */ _("header", { className: "mb-4 flex flex-col items-start", children: [
91
+ t && /* @__PURE__ */ i(
48
92
  "div",
49
93
  {
50
- className: w(
94
+ className: X(
51
95
  "mb-2 rounded-full px-4 py-1 text-sm font-bold",
52
- E[e]
96
+ Mt[t]
53
97
  ),
54
- children: f(R[e])
98
+ children: w(Wt[t])
55
99
  }
56
100
  ),
57
- t && /* @__PURE__ */ a("p", { className: "mb-1 break-keep text-lg font-medium text-neutral", children: t }),
58
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2 text-neutral", children: [
59
- r && /* @__PURE__ */ a("span", { className: "text-base", children: r }),
60
- /* @__PURE__ */ a(
101
+ n && /* @__PURE__ */ i("p", { className: "mb-1 break-keep text-lg font-medium text-neutral", children: n }),
102
+ /* @__PURE__ */ _("div", { className: "flex items-center gap-2 text-neutral", children: [
103
+ a && /* @__PURE__ */ i("span", { className: "text-base", children: a }),
104
+ /* @__PURE__ */ i(
61
105
  "h2",
62
106
  {
63
- className: w(
107
+ className: X(
64
108
  "whitespace-pre-line break-keep sm:whitespace-normal",
65
- A[s]
109
+ Bt[p]
66
110
  ),
67
- children: n
111
+ children: o
68
112
  }
69
113
  )
70
114
  ] })
71
115
  ] }),
72
- /* @__PURE__ */ a("div", { children: l })
116
+ /* @__PURE__ */ i("div", { children: y })
73
117
  ] });
74
118
  }
75
- function T({ summary: e }) {
76
- const { t } = u(d);
77
- return /* @__PURE__ */ a(b, { title: t("result.aiSummary"), children: /* @__PURE__ */ a("p", { className: "rounded-lg bg-base-200 p-6 text-sm leading-relaxed text-base-content", children: e }) });
119
+ function Ut({ summary: t }) {
120
+ const { t: n } = D($);
121
+ return t.length === 0 ? null : /* @__PURE__ */ i(
122
+ Y,
123
+ {
124
+ title: n("result.aiSummary"),
125
+ icon: /* @__PURE__ */ i(It, { className: "size-6" }),
126
+ children: /* @__PURE__ */ i("div", { children: t.map((a, o) => /* @__PURE__ */ i(
127
+ "p",
128
+ {
129
+ className: X(
130
+ "py-2 text-sm leading-relaxed text-neutral first:pt-0",
131
+ o < t.length - 1 && "border-b border-base-300"
132
+ ),
133
+ children: a
134
+ },
135
+ `${a}-${o}`
136
+ )) })
137
+ }
138
+ );
78
139
  }
79
- function h({ title: e, content: t }) {
80
- return /* @__PURE__ */ c("div", { className: "text-neutral", children: [
81
- /* @__PURE__ */ a("h3", { className: "mb-1 break-keep text-lg font-semibold", children: e }),
82
- /* @__PURE__ */ a("p", { className: "break-keep", children: t })
140
+ function F({ title: t, content: n }) {
141
+ return /* @__PURE__ */ _("div", { className: "text-neutral", children: [
142
+ /* @__PURE__ */ i("h3", { className: "mb-1 break-keep text-lg font-semibold", children: t }),
143
+ /* @__PURE__ */ i("p", { className: "break-keep", children: n })
83
144
  ] });
84
145
  }
85
- function D({ data: e }) {
86
- const { t, i18n: r } = u(d);
87
- return e ? /* @__PURE__ */ a(
88
- b,
146
+ function Yt({ data: t }) {
147
+ const { t: n, i18n: a } = D($);
148
+ return t ? /* @__PURE__ */ i(
149
+ Y,
89
150
  {
90
- subtitle: t("result.priceAnalysis.subtitle"),
91
- title: t("result.priceAnalysis.title"),
92
- children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
93
- e.market_price_range && /* @__PURE__ */ a(
94
- h,
151
+ subtitle: n("result.priceAnalysis.subtitle"),
152
+ title: n("result.priceAnalysis.title"),
153
+ children: /* @__PURE__ */ _("div", { className: "space-y-4", children: [
154
+ t.market_price_range && /* @__PURE__ */ i(
155
+ F,
95
156
  {
96
- title: t("result.marketPrice"),
97
- content: e.market_price_range
157
+ title: n("result.marketPrice"),
158
+ content: t.market_price_range
98
159
  }
99
160
  ),
100
- e.offered_price && /* @__PURE__ */ a(
101
- h,
161
+ t.offered_price && /* @__PURE__ */ i(
162
+ F,
102
163
  {
103
- title: t("result.offeredPrice"),
104
- content: new Intl.NumberFormat(r.language, {
164
+ title: n("result.offeredPrice"),
165
+ content: new Intl.NumberFormat(a.language, {
105
166
  style: "currency",
106
- currency: e.currency || "USD"
107
- }).format(e.offered_price)
167
+ currency: t.currency || "USD"
168
+ }).format(t.offered_price)
108
169
  }
109
170
  ),
110
- e.price_assessment && /* @__PURE__ */ a(
111
- h,
171
+ t.price_assessment && /* @__PURE__ */ i(
172
+ F,
112
173
  {
113
- title: t("result.priceAssessment"),
114
- content: e.price_assessment
174
+ title: n("result.priceAssessment"),
175
+ content: t.price_assessment
115
176
  }
116
177
  )
117
178
  ] })
118
179
  }
119
180
  ) : null;
120
181
  }
121
- function L({
122
- title: e,
123
- titleId: t,
124
- ...r
125
- }, n) {
126
- return /* @__PURE__ */ g.createElement("svg", Object.assign({
127
- xmlns: "http://www.w3.org/2000/svg",
128
- viewBox: "0 0 24 24",
129
- fill: "currentColor",
130
- "aria-hidden": "true",
131
- "data-slot": "icon",
132
- ref: n,
133
- "aria-labelledby": t
134
- }, r), e ? /* @__PURE__ */ g.createElement("title", {
135
- id: t
136
- }, e) : null, /* @__PURE__ */ g.createElement("path", {
137
- fillRule: "evenodd",
138
- d: "M2.625 6.75a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875 0A.75.75 0 0 1 8.25 6h12a.75.75 0 0 1 0 1.5h-12a.75.75 0 0 1-.75-.75ZM2.625 12a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0ZM7.5 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5h-12A.75.75 0 0 1 7.5 12Zm-4.875 5.25a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875 0a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5h-12a.75.75 0 0 1-.75-.75Z",
139
- clipRule: "evenodd"
140
- }));
141
- }
142
- const H = /* @__PURE__ */ g.forwardRef(L);
143
- function M({ items: e }) {
144
- const { t } = u(d);
145
- return e.length === 0 ? null : /* @__PURE__ */ a(
146
- b,
182
+ function Zt({ items: t }) {
183
+ const { t: n } = D($);
184
+ return t.length === 0 ? null : /* @__PURE__ */ i(
185
+ Y,
147
186
  {
148
- icon: /* @__PURE__ */ a(H, { className: "size-6" }),
149
- title: t("result.safetyChecklist"),
187
+ icon: /* @__PURE__ */ i(Ft, { className: "size-6" }),
188
+ title: n("result.safetyChecklist"),
150
189
  titleSize: "sm",
151
- children: /* @__PURE__ */ a("div", { className: "space-y-4", children: e.map((r, n) => /* @__PURE__ */ c(
190
+ children: /* @__PURE__ */ i("div", { className: "space-y-4", children: t.map((a, o) => /* @__PURE__ */ _(
152
191
  "label",
153
192
  {
154
193
  className: "label cursor-pointer gap-4 rounded-2xl bg-base-200 p-4",
155
194
  children: [
156
- /* @__PURE__ */ a("span", { className: "label-text break-keep text-neutral", children: r }),
157
- /* @__PURE__ */ a(
195
+ /* @__PURE__ */ i("span", { className: "label-text break-keep text-neutral", children: a }),
196
+ /* @__PURE__ */ i(
158
197
  "input",
159
198
  {
160
199
  type: "checkbox",
@@ -163,366 +202,1048 @@ function M({ items: e }) {
163
202
  )
164
203
  ]
165
204
  },
166
- n
205
+ o
167
206
  )) })
168
207
  }
169
208
  );
170
209
  }
171
- const B = {
210
+ const Ht = {
172
211
  danger: "result.danger.title",
173
212
  caution: "result.caution.title",
174
213
  safe: "result.safe.title"
175
214
  };
176
- function y({ signals: e, variant: t }) {
177
- const { t: r } = u(d);
178
- return e.length === 0 ? null : /* @__PURE__ */ a(b, { badgeVariant: t, title: r(B[t]), children: /* @__PURE__ */ a("div", { className: "divide-y divide-base-300", children: e.map((n, s) => /* @__PURE__ */ c("div", { className: "space-y-4 py-4 first:pt-0 last:pb-0", children: [
179
- /* @__PURE__ */ a(h, { title: n.title, content: n.description }),
180
- /* @__PURE__ */ a(
181
- h,
215
+ function ce({ signals: t, variant: n }) {
216
+ const { t: a } = D($);
217
+ return t.length === 0 ? null : /* @__PURE__ */ i(Y, { badgeVariant: n, title: a(Ht[n]), children: /* @__PURE__ */ i("div", { className: "divide-y divide-base-300", children: t.map((o, p) => /* @__PURE__ */ _("div", { className: "space-y-4 py-4 first:pt-0 last:pb-0", children: [
218
+ /* @__PURE__ */ i(F, { title: o.title, content: o.description }),
219
+ /* @__PURE__ */ i(
220
+ F,
182
221
  {
183
- title: r("result.whatToDo"),
184
- content: n.what_to_do
222
+ title: a("result.whatToDo"),
223
+ content: o.what_to_do
185
224
  }
186
225
  )
187
- ] }, s)) }) });
226
+ ] }, p)) }) });
188
227
  }
189
- function F({
190
- translation: e,
191
- nuance: t
228
+ function Kt({
229
+ translation: t,
230
+ nuance: n
192
231
  }) {
193
- const { t: r } = u(d);
194
- return /* @__PURE__ */ a(
195
- b,
232
+ const { t: a } = D($);
233
+ return /* @__PURE__ */ i(
234
+ Y,
196
235
  {
197
- subtitle: r("result.translation.subtitle"),
198
- title: r("result.translation.title"),
199
- children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
200
- e && /* @__PURE__ */ a(
201
- h,
236
+ subtitle: a("result.translation.subtitle"),
237
+ title: a("result.translation.title"),
238
+ children: /* @__PURE__ */ _("div", { className: "space-y-4", children: [
239
+ t && /* @__PURE__ */ i(
240
+ F,
202
241
  {
203
- title: r("result.translation.label"),
204
- content: e
242
+ title: a("result.translation.label"),
243
+ content: t
205
244
  }
206
245
  ),
207
- t && /* @__PURE__ */ a(h, { title: r("result.nuance.label"), content: t })
246
+ n && /* @__PURE__ */ i(F, { title: a("result.nuance.label"), content: n })
208
247
  ] })
209
248
  }
210
249
  );
211
250
  }
212
- function ue({ analysis: e }) {
213
- return /* @__PURE__ */ c("div", { className: "space-y-6", children: [
214
- e.ai_summary && /* @__PURE__ */ a(T, { summary: e.ai_summary }),
215
- e.risk_signals.length > 0 && /* @__PURE__ */ a(y, { signals: e.risk_signals, variant: "danger" }),
216
- e.cautions.length > 0 && /* @__PURE__ */ a(y, { signals: e.cautions, variant: "caution" }),
217
- e.safe_indicators.length > 0 && /* @__PURE__ */ a(y, { signals: e.safe_indicators, variant: "safe" }),
218
- e.safety_checklist.length > 0 && /* @__PURE__ */ a(M, { items: e.safety_checklist }),
219
- (e.translation || e.nuance_explanation) && /* @__PURE__ */ a(
220
- F,
251
+ function wr({ analysis: t }) {
252
+ return /* @__PURE__ */ _("div", { className: "space-y-6", children: [
253
+ t.ai_summary.length > 0 && /* @__PURE__ */ i(Ut, { summary: t.ai_summary }),
254
+ t.risk_signals.length > 0 && /* @__PURE__ */ i(ce, { signals: t.risk_signals, variant: "danger" }),
255
+ t.cautions.length > 0 && /* @__PURE__ */ i(ce, { signals: t.cautions, variant: "caution" }),
256
+ t.safe_indicators.length > 0 && /* @__PURE__ */ i(ce, { signals: t.safe_indicators, variant: "safe" }),
257
+ t.safety_checklist.length > 0 && /* @__PURE__ */ i(Zt, { items: t.safety_checklist }),
258
+ (t.translation || t.nuance_explanation) && /* @__PURE__ */ i(
259
+ Kt,
221
260
  {
222
- translation: e.translation,
223
- nuance: e.nuance_explanation
261
+ translation: t.translation,
262
+ nuance: t.nuance_explanation
224
263
  }
225
264
  ),
226
- e.price_analysis && /* @__PURE__ */ a(D, { data: e.price_analysis })
265
+ t.price_analysis && /* @__PURE__ */ i(Yt, { data: t.price_analysis })
227
266
  ] });
228
267
  }
229
- var k = {
268
+ var Je = {
230
269
  color: void 0,
231
270
  size: void 0,
232
271
  className: void 0,
233
272
  style: void 0,
234
273
  attr: void 0
235
- }, N = m.createContext && /* @__PURE__ */ m.createContext(k), I = ["attr", "size", "title"];
236
- function Z(e, t) {
237
- if (e == null) return {};
238
- var r = W(e, t), n, s;
274
+ }, Me = R.createContext && /* @__PURE__ */ R.createContext(Je), Jt = ["attr", "size", "title"];
275
+ function qt(t, n) {
276
+ if (t == null) return {};
277
+ var a = Vt(t, n), o, p;
239
278
  if (Object.getOwnPropertySymbols) {
240
- var l = Object.getOwnPropertySymbols(e);
241
- for (s = 0; s < l.length; s++)
242
- n = l[s], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
279
+ var y = Object.getOwnPropertySymbols(t);
280
+ for (p = 0; p < y.length; p++)
281
+ o = y[p], !(n.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(t, o) && (a[o] = t[o]);
243
282
  }
244
- return r;
245
- }
246
- function W(e, t) {
247
- if (e == null) return {};
248
- var r = {};
249
- for (var n in e)
250
- if (Object.prototype.hasOwnProperty.call(e, n)) {
251
- if (t.indexOf(n) >= 0) continue;
252
- r[n] = e[n];
253
- }
254
- return r;
255
- }
256
- function x() {
257
- return x = Object.assign ? Object.assign.bind() : function(e) {
258
- for (var t = 1; t < arguments.length; t++) {
259
- var r = arguments[t];
260
- for (var n in r)
261
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
262
- }
263
- return e;
264
- }, x.apply(this, arguments);
265
- }
266
- function S(e, t) {
267
- var r = Object.keys(e);
283
+ return a;
284
+ }
285
+ function Vt(t, n) {
286
+ if (t == null) return {};
287
+ var a = {};
288
+ for (var o in t)
289
+ if (Object.prototype.hasOwnProperty.call(t, o)) {
290
+ if (n.indexOf(o) >= 0) continue;
291
+ a[o] = t[o];
292
+ }
293
+ return a;
294
+ }
295
+ function G() {
296
+ return G = Object.assign ? Object.assign.bind() : function(t) {
297
+ for (var n = 1; n < arguments.length; n++) {
298
+ var a = arguments[n];
299
+ for (var o in a)
300
+ Object.prototype.hasOwnProperty.call(a, o) && (t[o] = a[o]);
301
+ }
302
+ return t;
303
+ }, G.apply(this, arguments);
304
+ }
305
+ function We(t, n) {
306
+ var a = Object.keys(t);
268
307
  if (Object.getOwnPropertySymbols) {
269
- var n = Object.getOwnPropertySymbols(e);
270
- t && (n = n.filter(function(s) {
271
- return Object.getOwnPropertyDescriptor(e, s).enumerable;
272
- })), r.push.apply(r, n);
308
+ var o = Object.getOwnPropertySymbols(t);
309
+ n && (o = o.filter(function(p) {
310
+ return Object.getOwnPropertyDescriptor(t, p).enumerable;
311
+ })), a.push.apply(a, o);
273
312
  }
274
- return r;
275
- }
276
- function v(e) {
277
- for (var t = 1; t < arguments.length; t++) {
278
- var r = arguments[t] != null ? arguments[t] : {};
279
- t % 2 ? S(Object(r), !0).forEach(function(n) {
280
- $(e, n, r[n]);
281
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : S(Object(r)).forEach(function(n) {
282
- Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
313
+ return a;
314
+ }
315
+ function Q(t) {
316
+ for (var n = 1; n < arguments.length; n++) {
317
+ var a = arguments[n] != null ? arguments[n] : {};
318
+ n % 2 ? We(Object(a), !0).forEach(function(o) {
319
+ Xt(t, o, a[o]);
320
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(a)) : We(Object(a)).forEach(function(o) {
321
+ Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(a, o));
283
322
  });
284
323
  }
285
- return e;
324
+ return t;
286
325
  }
287
- function $(e, t, r) {
288
- return t = K(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
326
+ function Xt(t, n, a) {
327
+ return n = Gt(n), n in t ? Object.defineProperty(t, n, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = a, t;
289
328
  }
290
- function K(e) {
291
- var t = U(e, "string");
292
- return typeof t == "symbol" ? t : t + "";
329
+ function Gt(t) {
330
+ var n = Qt(t, "string");
331
+ return typeof n == "symbol" ? n : n + "";
293
332
  }
294
- function U(e, t) {
295
- if (typeof e != "object" || !e) return e;
296
- var r = e[Symbol.toPrimitive];
297
- if (r !== void 0) {
298
- var n = r.call(e, t);
299
- if (typeof n != "object") return n;
333
+ function Qt(t, n) {
334
+ if (typeof t != "object" || !t) return t;
335
+ var a = t[Symbol.toPrimitive];
336
+ if (a !== void 0) {
337
+ var o = a.call(t, n);
338
+ if (typeof o != "object") return o;
300
339
  throw new TypeError("@@toPrimitive must return a primitive value.");
301
340
  }
302
- return (t === "string" ? String : Number)(e);
341
+ return (n === "string" ? String : Number)(t);
303
342
  }
304
- function P(e) {
305
- return e && e.map((t, r) => /* @__PURE__ */ m.createElement(t.tag, v({
306
- key: r
307
- }, t.attr), P(t.child)));
343
+ function qe(t) {
344
+ return t && t.map((n, a) => /* @__PURE__ */ R.createElement(n.tag, Q({
345
+ key: a
346
+ }, n.attr), qe(n.child)));
308
347
  }
309
- function C(e) {
310
- return (t) => /* @__PURE__ */ m.createElement(X, x({
311
- attr: v({}, e.attr)
312
- }, t), P(e.child));
348
+ function Ve(t) {
349
+ return (n) => /* @__PURE__ */ R.createElement(er, G({
350
+ attr: Q({}, t.attr)
351
+ }, n), qe(t.child));
313
352
  }
314
- function X(e) {
315
- var t = (r) => {
353
+ function er(t) {
354
+ var n = (a) => {
316
355
  var {
317
- attr: n,
318
- size: s,
319
- title: l
320
- } = e, f = Z(e, I), p = s || r.size || "1em", o;
321
- return r.className && (o = r.className), e.className && (o = (o ? o + " " : "") + e.className), /* @__PURE__ */ m.createElement("svg", x({
356
+ attr: o,
357
+ size: p,
358
+ title: y
359
+ } = t, w = qt(t, Jt), v = p || a.size || "1em", d;
360
+ return a.className && (d = a.className), t.className && (d = (d ? d + " " : "") + t.className), /* @__PURE__ */ R.createElement("svg", G({
322
361
  stroke: "currentColor",
323
362
  fill: "currentColor",
324
363
  strokeWidth: "0"
325
- }, r.attr, n, f, {
326
- className: o,
327
- style: v(v({
328
- color: e.color || r.color
329
- }, r.style), e.style),
330
- height: p,
331
- width: p,
364
+ }, a.attr, o, w, {
365
+ className: d,
366
+ style: Q(Q({
367
+ color: t.color || a.color
368
+ }, a.style), t.style),
369
+ height: v,
370
+ width: v,
332
371
  xmlns: "http://www.w3.org/2000/svg"
333
- }), l && /* @__PURE__ */ m.createElement("title", null, l), e.children);
372
+ }), y && /* @__PURE__ */ R.createElement("title", null, y), t.children);
334
373
  };
335
- return N !== void 0 ? /* @__PURE__ */ m.createElement(N.Consumer, null, (r) => t(r)) : t(k);
374
+ return Me !== void 0 ? /* @__PURE__ */ R.createElement(Me.Consumer, null, (a) => n(a)) : n(Je);
336
375
  }
337
- function Y(e) {
338
- return C({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z" }, child: [] }] })(e);
376
+ function tr(t) {
377
+ return Ve({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z" }, child: [] }] })(t);
339
378
  }
340
- function q(e) {
341
- return C({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z" }, child: [] }] })(e);
379
+ function rr(t) {
380
+ return Ve({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z" }, child: [] }] })(t);
342
381
  }
343
- function de({
344
- value: e,
345
- onChange: t,
346
- onSubmit: r,
347
- isLoading: n,
348
- error: s
382
+ function Sr({
383
+ value: t,
384
+ onChange: n,
385
+ onSubmit: a,
386
+ isLoading: o,
387
+ error: p
349
388
  }) {
350
- const { t: l } = u(d), f = n ? /* @__PURE__ */ a("span", { className: "loading loading-spinner loading-sm" }) : l("hero.checkSafety"), p = n || !e.trim();
351
- return /* @__PURE__ */ a("div", { className: "flex w-full flex-col items-center justify-center", children: /* @__PURE__ */ c("div", { className: "w-full lg:max-w-[720px]", children: [
352
- /* @__PURE__ */ a("h1", { className: "mb-2 text-left text-3xl font-bold text-base-content sm:mb-8 sm:text-center sm:text-4xl md:mb-8", children: l("hero.title") }),
353
- /* @__PURE__ */ a("p", { className: "mb-4 text-left text-sm text-base-content/70 sm:mb-8 sm:text-center sm:text-base md:mb-16", children: l("hero.subtitle") }),
354
- /* @__PURE__ */ c("div", { className: w("mb-4", !s && "sm:mb-8 md:mb-12"), children: [
355
- /* @__PURE__ */ c("div", { className: "relative hidden lg:block", children: [
356
- /* @__PURE__ */ a(
389
+ const { t: y } = D($), w = o ? /* @__PURE__ */ i("span", { className: "loading loading-spinner loading-sm" }) : y("hero.checkSafety"), v = o || !t.trim();
390
+ return /* @__PURE__ */ i("div", { className: "flex w-full flex-col items-center justify-center", children: /* @__PURE__ */ _("div", { className: "w-full lg:max-w-[720px]", children: [
391
+ /* @__PURE__ */ i("h1", { className: "mb-2 text-left text-3xl font-bold text-base-content sm:mb-8 sm:text-center sm:text-4xl md:mb-8", children: y("hero.title") }),
392
+ /* @__PURE__ */ i("p", { className: "mb-4 text-left text-sm text-base-content/70 sm:mb-8 sm:text-center sm:text-base md:mb-16", children: y("hero.subtitle") }),
393
+ /* @__PURE__ */ _("div", { className: X("mb-4", !p && "sm:mb-8 md:mb-12"), children: [
394
+ /* @__PURE__ */ _("div", { className: "relative hidden lg:block", children: [
395
+ /* @__PURE__ */ i(
357
396
  "input",
358
397
  {
359
398
  type: "text",
360
399
  className: "input input-bordered h-[72px] w-full pr-36 text-sm placeholder:text-base-300 focus:outline-none",
361
- placeholder: l("hero.placeholder"),
362
- "aria-label": l("hero.placeholder"),
363
- value: e,
364
- onChange: (o) => t(o.target.value),
365
- disabled: n,
366
- onKeyDown: (o) => {
367
- o.key === "Enter" && !p && r();
400
+ placeholder: y("hero.placeholder"),
401
+ "aria-label": y("hero.placeholder"),
402
+ value: t,
403
+ onChange: (d) => n(d.target.value),
404
+ disabled: o,
405
+ onKeyDown: (d) => {
406
+ d.key === "Enter" && !v && a();
368
407
  }
369
408
  }
370
409
  ),
371
- /* @__PURE__ */ a(
410
+ /* @__PURE__ */ i(
372
411
  "button",
373
412
  {
374
413
  className: "btn btn-neutral absolute right-2 top-1/2 h-[56px] min-h-0 -translate-y-1/2 !animate-none px-6 font-bold text-neutral-content",
375
- onClick: r,
376
- disabled: p,
377
- children: f
414
+ onClick: a,
415
+ disabled: v,
416
+ children: w
378
417
  }
379
418
  )
380
419
  ] }),
381
- /* @__PURE__ */ a("div", { className: "block lg:hidden", children: /* @__PURE__ */ c("div", { className: "relative h-[400px] w-full overflow-hidden rounded-xl border border-base-300 bg-base-100", children: [
382
- !e && /* @__PURE__ */ a(
420
+ /* @__PURE__ */ i("div", { className: "block lg:hidden", children: /* @__PURE__ */ _("div", { className: "relative h-[400px] w-full overflow-hidden rounded-xl border border-base-300 bg-base-100", children: [
421
+ !t && /* @__PURE__ */ i(
383
422
  "div",
384
423
  {
385
424
  className: "pointer-events-none absolute inset-0 overflow-hidden p-5 pb-24 text-base text-base-300",
386
425
  "aria-hidden": "true",
387
- children: /* @__PURE__ */ c("div", { className: "whitespace-pre-line leading-relaxed", children: [
388
- /* @__PURE__ */ a("p", { className: "mb-4 text-base-300", children: l("hero.placeholder") }),
389
- l("hero.placeholderExample")
426
+ children: /* @__PURE__ */ _("div", { className: "whitespace-pre-line leading-relaxed", children: [
427
+ /* @__PURE__ */ i("p", { className: "mb-4 text-base-300", children: y("hero.placeholder") }),
428
+ y("hero.placeholderExample")
390
429
  ] })
391
430
  }
392
431
  ),
393
- /* @__PURE__ */ a("div", { className: "absolute inset-0 overflow-hidden pb-24", children: /* @__PURE__ */ a(
432
+ /* @__PURE__ */ i("div", { className: "absolute inset-0 overflow-hidden pb-24", children: /* @__PURE__ */ i(
394
433
  "textarea",
395
434
  {
396
435
  className: "textarea size-full resize-none overflow-auto bg-transparent p-4 leading-6 text-base-content focus:outline-none",
397
- value: e,
398
- "aria-label": l("hero.placeholder"),
399
- onChange: (o) => t(o.target.value),
400
- disabled: n,
436
+ value: t,
437
+ "aria-label": y("hero.placeholder"),
438
+ onChange: (d) => n(d.target.value),
439
+ disabled: o,
401
440
  placeholder: ""
402
441
  }
403
442
  ) }),
404
- /* @__PURE__ */ a("div", { className: "absolute inset-x-4 bottom-4 z-10", children: /* @__PURE__ */ a(
443
+ /* @__PURE__ */ i("div", { className: "absolute inset-x-4 bottom-4 z-10", children: /* @__PURE__ */ i(
405
444
  "button",
406
445
  {
407
446
  className: "btn btn-neutral h-16 w-full text-base font-medium text-neutral-content",
408
- onClick: r,
409
- disabled: p,
410
- children: f
447
+ onClick: a,
448
+ disabled: v,
449
+ children: w
411
450
  }
412
451
  ) })
413
452
  ] }) })
414
453
  ] }),
415
- s && /* @__PURE__ */ a("div", { className: "alert alert-error mb-6 flex items-center gap-2 text-sm", children: /* @__PURE__ */ a("span", { children: s }) }),
416
- /* @__PURE__ */ a("p", { className: "mb-4 text-left text-xs text-base-content/60 sm:mb-8 sm:text-center md:mb-12", children: l("hero.disclaimer") }),
417
- /* @__PURE__ */ c("div", { className: "flex items-center justify-start gap-6 sm:justify-center", children: [
418
- /* @__PURE__ */ a(
454
+ p && /* @__PURE__ */ i("div", { className: "alert alert-error mb-6 flex items-center gap-2 text-sm", children: /* @__PURE__ */ i("span", { children: p }) }),
455
+ /* @__PURE__ */ i("p", { className: "mb-4 text-left text-xs text-base-content/60 sm:mb-8 sm:text-center md:mb-12", children: y("hero.disclaimer") }),
456
+ /* @__PURE__ */ _("div", { className: "flex items-center justify-start gap-6 sm:justify-center", children: [
457
+ /* @__PURE__ */ i(
419
458
  "a",
420
459
  {
421
460
  href: "https://x.com",
422
461
  target: "_blank",
423
462
  rel: "noopener noreferrer",
424
463
  "aria-label": "X",
425
- children: /* @__PURE__ */ a(q, { className: "size-6 text-base-content transition-colors hover:text-base-content/70" })
464
+ children: /* @__PURE__ */ i(rr, { className: "size-6 text-base-content transition-colors hover:text-base-content/70" })
426
465
  }
427
466
  ),
428
- /* @__PURE__ */ a(
467
+ /* @__PURE__ */ i(
429
468
  "a",
430
469
  {
431
470
  href: "https://reddit.com",
432
471
  target: "_blank",
433
472
  rel: "noopener noreferrer",
434
473
  "aria-label": "Reddit",
435
- children: /* @__PURE__ */ a(Y, { className: "size-6 text-base-content transition-colors hover:text-base-content/70" })
474
+ children: /* @__PURE__ */ i(tr, { className: "size-6 text-base-content transition-colors hover:text-base-content/70" })
436
475
  }
437
476
  )
438
477
  ] })
439
478
  ] }) });
440
479
  }
441
- function me({ level: e, score: t }) {
442
- const { t: r } = u(d);
443
- return /* @__PURE__ */ c("div", { className: "mb-4 rounded-lg", children: [
444
- /* @__PURE__ */ a("h1", { className: "mb-2 text-3xl font-bold", children: r(`result.safetyLevel.${e}.title`) }),
445
- /* @__PURE__ */ a("p", { className: "mt-2 text-sm text-neutral", children: r(`result.safetyLevel.${e}.description`, { score: t }) })
480
+ var ue = { exports: {} }, U = {}, Be;
481
+ function nr() {
482
+ if (Be) return U;
483
+ Be = 1;
484
+ var t = R, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, p = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
485
+ function w(v, d, P) {
486
+ var x, k = {}, E = null, Z = null;
487
+ P !== void 0 && (E = "" + P), d.key !== void 0 && (E = "" + d.key), d.ref !== void 0 && (Z = d.ref);
488
+ for (x in d) o.call(d, x) && !y.hasOwnProperty(x) && (k[x] = d[x]);
489
+ if (v && v.defaultProps) for (x in d = v.defaultProps, d) k[x] === void 0 && (k[x] = d[x]);
490
+ return { $$typeof: n, type: v, key: E, ref: Z, props: k, _owner: p.current };
491
+ }
492
+ return U.Fragment = a, U.jsx = w, U.jsxs = w, U;
493
+ }
494
+ var V = {}, Ue;
495
+ function ar() {
496
+ return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && (function() {
497
+ var t = R, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), w = Symbol.for("react.provider"), v = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), Z = Symbol.for("react.offscreen"), de = Symbol.iterator, Xe = "@@iterator";
498
+ function Ge(e) {
499
+ if (e === null || typeof e != "object")
500
+ return null;
501
+ var r = de && e[de] || e[Xe];
502
+ return typeof r == "function" ? r : null;
503
+ }
504
+ var L = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
505
+ function S(e) {
506
+ {
507
+ for (var r = arguments.length, s = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
508
+ s[l - 1] = arguments[l];
509
+ Qe("error", e, s);
510
+ }
511
+ }
512
+ function Qe(e, r, s) {
513
+ {
514
+ var l = L.ReactDebugCurrentFrame, m = l.getStackAddendum();
515
+ m !== "" && (r += "%s", s = s.concat([m]));
516
+ var h = s.map(function(f) {
517
+ return String(f);
518
+ });
519
+ h.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, h);
520
+ }
521
+ }
522
+ var et = !1, tt = !1, rt = !1, nt = !1, at = !1, me;
523
+ me = Symbol.for("react.module.reference");
524
+ function ot(e) {
525
+ return !!(typeof e == "string" || typeof e == "function" || e === o || e === y || at || e === p || e === P || e === x || nt || e === Z || et || tt || rt || typeof e == "object" && e !== null && (e.$$typeof === E || e.$$typeof === k || e.$$typeof === w || e.$$typeof === v || e.$$typeof === d || // This needs to include all possible module reference object
526
+ // types supported by any Flight configuration anywhere since
527
+ // we don't know which Flight build this will end up being used
528
+ // with.
529
+ e.$$typeof === me || e.getModuleId !== void 0));
530
+ }
531
+ function st(e, r, s) {
532
+ var l = e.displayName;
533
+ if (l)
534
+ return l;
535
+ var m = r.displayName || r.name || "";
536
+ return m !== "" ? s + "(" + m + ")" : s;
537
+ }
538
+ function he(e) {
539
+ return e.displayName || "Context";
540
+ }
541
+ function T(e) {
542
+ if (e == null)
543
+ return null;
544
+ if (typeof e.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
545
+ return e.displayName || e.name || null;
546
+ if (typeof e == "string")
547
+ return e;
548
+ switch (e) {
549
+ case o:
550
+ return "Fragment";
551
+ case a:
552
+ return "Portal";
553
+ case y:
554
+ return "Profiler";
555
+ case p:
556
+ return "StrictMode";
557
+ case P:
558
+ return "Suspense";
559
+ case x:
560
+ return "SuspenseList";
561
+ }
562
+ if (typeof e == "object")
563
+ switch (e.$$typeof) {
564
+ case v:
565
+ var r = e;
566
+ return he(r) + ".Consumer";
567
+ case w:
568
+ var s = e;
569
+ return he(s._context) + ".Provider";
570
+ case d:
571
+ return st(e, e.render, "ForwardRef");
572
+ case k:
573
+ var l = e.displayName || null;
574
+ return l !== null ? l : T(e.type) || "Memo";
575
+ case E: {
576
+ var m = e, h = m._payload, f = m._init;
577
+ try {
578
+ return T(f(h));
579
+ } catch {
580
+ return null;
581
+ }
582
+ }
583
+ }
584
+ return null;
585
+ }
586
+ var z = Object.assign, W = 0, ye, be, ge, ve, xe, _e, we;
587
+ function Se() {
588
+ }
589
+ Se.__reactDisabledLog = !0;
590
+ function it() {
591
+ {
592
+ if (W === 0) {
593
+ ye = console.log, be = console.info, ge = console.warn, ve = console.error, xe = console.group, _e = console.groupCollapsed, we = console.groupEnd;
594
+ var e = {
595
+ configurable: !0,
596
+ enumerable: !0,
597
+ value: Se,
598
+ writable: !0
599
+ };
600
+ Object.defineProperties(console, {
601
+ info: e,
602
+ log: e,
603
+ warn: e,
604
+ error: e,
605
+ group: e,
606
+ groupCollapsed: e,
607
+ groupEnd: e
608
+ });
609
+ }
610
+ W++;
611
+ }
612
+ }
613
+ function lt() {
614
+ {
615
+ if (W--, W === 0) {
616
+ var e = {
617
+ configurable: !0,
618
+ enumerable: !0,
619
+ writable: !0
620
+ };
621
+ Object.defineProperties(console, {
622
+ log: z({}, e, {
623
+ value: ye
624
+ }),
625
+ info: z({}, e, {
626
+ value: be
627
+ }),
628
+ warn: z({}, e, {
629
+ value: ge
630
+ }),
631
+ error: z({}, e, {
632
+ value: ve
633
+ }),
634
+ group: z({}, e, {
635
+ value: xe
636
+ }),
637
+ groupCollapsed: z({}, e, {
638
+ value: _e
639
+ }),
640
+ groupEnd: z({}, e, {
641
+ value: we
642
+ })
643
+ });
644
+ }
645
+ W < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
646
+ }
647
+ }
648
+ var ee = L.ReactCurrentDispatcher, te;
649
+ function H(e, r, s) {
650
+ {
651
+ if (te === void 0)
652
+ try {
653
+ throw Error();
654
+ } catch (m) {
655
+ var l = m.stack.trim().match(/\n( *(at )?)/);
656
+ te = l && l[1] || "";
657
+ }
658
+ return `
659
+ ` + te + e;
660
+ }
661
+ }
662
+ var re = !1, K;
663
+ {
664
+ var ct = typeof WeakMap == "function" ? WeakMap : Map;
665
+ K = new ct();
666
+ }
667
+ function je(e, r) {
668
+ if (!e || re)
669
+ return "";
670
+ {
671
+ var s = K.get(e);
672
+ if (s !== void 0)
673
+ return s;
674
+ }
675
+ var l;
676
+ re = !0;
677
+ var m = Error.prepareStackTrace;
678
+ Error.prepareStackTrace = void 0;
679
+ var h;
680
+ h = ee.current, ee.current = null, it();
681
+ try {
682
+ if (r) {
683
+ var f = function() {
684
+ throw Error();
685
+ };
686
+ if (Object.defineProperty(f.prototype, "props", {
687
+ set: function() {
688
+ throw Error();
689
+ }
690
+ }), typeof Reflect == "object" && Reflect.construct) {
691
+ try {
692
+ Reflect.construct(f, []);
693
+ } catch (N) {
694
+ l = N;
695
+ }
696
+ Reflect.construct(e, [], f);
697
+ } else {
698
+ try {
699
+ f.call();
700
+ } catch (N) {
701
+ l = N;
702
+ }
703
+ e.call(f.prototype);
704
+ }
705
+ } else {
706
+ try {
707
+ throw Error();
708
+ } catch (N) {
709
+ l = N;
710
+ }
711
+ e();
712
+ }
713
+ } catch (N) {
714
+ if (N && l && typeof N.stack == "string") {
715
+ for (var u = N.stack.split(`
716
+ `), j = l.stack.split(`
717
+ `), b = u.length - 1, g = j.length - 1; b >= 1 && g >= 0 && u[b] !== j[g]; )
718
+ g--;
719
+ for (; b >= 1 && g >= 0; b--, g--)
720
+ if (u[b] !== j[g]) {
721
+ if (b !== 1 || g !== 1)
722
+ do
723
+ if (b--, g--, g < 0 || u[b] !== j[g]) {
724
+ var O = `
725
+ ` + u[b].replace(" at new ", " at ");
726
+ return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && K.set(e, O), O;
727
+ }
728
+ while (b >= 1 && g >= 0);
729
+ break;
730
+ }
731
+ }
732
+ } finally {
733
+ re = !1, ee.current = h, lt(), Error.prepareStackTrace = m;
734
+ }
735
+ var M = e ? e.displayName || e.name : "", A = M ? H(M) : "";
736
+ return typeof e == "function" && K.set(e, A), A;
737
+ }
738
+ function ut(e, r, s) {
739
+ return je(e, !1);
740
+ }
741
+ function ft(e) {
742
+ var r = e.prototype;
743
+ return !!(r && r.isReactComponent);
744
+ }
745
+ function J(e, r, s) {
746
+ if (e == null)
747
+ return "";
748
+ if (typeof e == "function")
749
+ return je(e, ft(e));
750
+ if (typeof e == "string")
751
+ return H(e);
752
+ switch (e) {
753
+ case P:
754
+ return H("Suspense");
755
+ case x:
756
+ return H("SuspenseList");
757
+ }
758
+ if (typeof e == "object")
759
+ switch (e.$$typeof) {
760
+ case d:
761
+ return ut(e.render);
762
+ case k:
763
+ return J(e.type, r, s);
764
+ case E: {
765
+ var l = e, m = l._payload, h = l._init;
766
+ try {
767
+ return J(h(m), r, s);
768
+ } catch {
769
+ }
770
+ }
771
+ }
772
+ return "";
773
+ }
774
+ var B = Object.prototype.hasOwnProperty, ke = {}, Ne = L.ReactDebugCurrentFrame;
775
+ function q(e) {
776
+ if (e) {
777
+ var r = e._owner, s = J(e.type, e._source, r ? r.type : null);
778
+ Ne.setExtraStackFrame(s);
779
+ } else
780
+ Ne.setExtraStackFrame(null);
781
+ }
782
+ function pt(e, r, s, l, m) {
783
+ {
784
+ var h = Function.call.bind(B);
785
+ for (var f in e)
786
+ if (h(e, f)) {
787
+ var u = void 0;
788
+ try {
789
+ if (typeof e[f] != "function") {
790
+ var j = Error((l || "React class") + ": " + s + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
791
+ throw j.name = "Invariant Violation", j;
792
+ }
793
+ u = e[f](r, f, l, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
794
+ } catch (b) {
795
+ u = b;
796
+ }
797
+ u && !(u instanceof Error) && (q(m), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", l || "React class", s, f, typeof u), q(null)), u instanceof Error && !(u.message in ke) && (ke[u.message] = !0, q(m), S("Failed %s type: %s", s, u.message), q(null));
798
+ }
799
+ }
800
+ }
801
+ var dt = Array.isArray;
802
+ function ne(e) {
803
+ return dt(e);
804
+ }
805
+ function mt(e) {
806
+ {
807
+ var r = typeof Symbol == "function" && Symbol.toStringTag, s = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
808
+ return s;
809
+ }
810
+ }
811
+ function ht(e) {
812
+ try {
813
+ return Oe(e), !1;
814
+ } catch {
815
+ return !0;
816
+ }
817
+ }
818
+ function Oe(e) {
819
+ return "" + e;
820
+ }
821
+ function Ee(e) {
822
+ if (ht(e))
823
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", mt(e)), Oe(e);
824
+ }
825
+ var Re = L.ReactCurrentOwner, yt = {
826
+ key: !0,
827
+ ref: !0,
828
+ __self: !0,
829
+ __source: !0
830
+ }, Pe, Te;
831
+ function bt(e) {
832
+ if (B.call(e, "ref")) {
833
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
834
+ if (r && r.isReactWarning)
835
+ return !1;
836
+ }
837
+ return e.ref !== void 0;
838
+ }
839
+ function gt(e) {
840
+ if (B.call(e, "key")) {
841
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
842
+ if (r && r.isReactWarning)
843
+ return !1;
844
+ }
845
+ return e.key !== void 0;
846
+ }
847
+ function vt(e, r) {
848
+ typeof e.ref == "string" && Re.current;
849
+ }
850
+ function xt(e, r) {
851
+ {
852
+ var s = function() {
853
+ Pe || (Pe = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
854
+ };
855
+ s.isReactWarning = !0, Object.defineProperty(e, "key", {
856
+ get: s,
857
+ configurable: !0
858
+ });
859
+ }
860
+ }
861
+ function _t(e, r) {
862
+ {
863
+ var s = function() {
864
+ Te || (Te = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
865
+ };
866
+ s.isReactWarning = !0, Object.defineProperty(e, "ref", {
867
+ get: s,
868
+ configurable: !0
869
+ });
870
+ }
871
+ }
872
+ var wt = function(e, r, s, l, m, h, f) {
873
+ var u = {
874
+ // This tag allows us to uniquely identify this as a React Element
875
+ $$typeof: n,
876
+ // Built-in properties that belong on the element
877
+ type: e,
878
+ key: r,
879
+ ref: s,
880
+ props: f,
881
+ // Record the component responsible for creating this element.
882
+ _owner: h
883
+ };
884
+ return u._store = {}, Object.defineProperty(u._store, "validated", {
885
+ configurable: !1,
886
+ enumerable: !1,
887
+ writable: !0,
888
+ value: !1
889
+ }), Object.defineProperty(u, "_self", {
890
+ configurable: !1,
891
+ enumerable: !1,
892
+ writable: !1,
893
+ value: l
894
+ }), Object.defineProperty(u, "_source", {
895
+ configurable: !1,
896
+ enumerable: !1,
897
+ writable: !1,
898
+ value: m
899
+ }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
900
+ };
901
+ function St(e, r, s, l, m) {
902
+ {
903
+ var h, f = {}, u = null, j = null;
904
+ s !== void 0 && (Ee(s), u = "" + s), gt(r) && (Ee(r.key), u = "" + r.key), bt(r) && (j = r.ref, vt(r));
905
+ for (h in r)
906
+ B.call(r, h) && !yt.hasOwnProperty(h) && (f[h] = r[h]);
907
+ if (e && e.defaultProps) {
908
+ var b = e.defaultProps;
909
+ for (h in b)
910
+ f[h] === void 0 && (f[h] = b[h]);
911
+ }
912
+ if (u || j) {
913
+ var g = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
914
+ u && xt(f, g), j && _t(f, g);
915
+ }
916
+ return wt(e, u, j, m, l, Re.current, f);
917
+ }
918
+ }
919
+ var ae = L.ReactCurrentOwner, Ce = L.ReactDebugCurrentFrame;
920
+ function I(e) {
921
+ if (e) {
922
+ var r = e._owner, s = J(e.type, e._source, r ? r.type : null);
923
+ Ce.setExtraStackFrame(s);
924
+ } else
925
+ Ce.setExtraStackFrame(null);
926
+ }
927
+ var oe;
928
+ oe = !1;
929
+ function se(e) {
930
+ return typeof e == "object" && e !== null && e.$$typeof === n;
931
+ }
932
+ function De() {
933
+ {
934
+ if (ae.current) {
935
+ var e = T(ae.current.type);
936
+ if (e)
937
+ return `
938
+
939
+ Check the render method of \`` + e + "`.";
940
+ }
941
+ return "";
942
+ }
943
+ }
944
+ function jt(e) {
945
+ return "";
946
+ }
947
+ var $e = {};
948
+ function kt(e) {
949
+ {
950
+ var r = De();
951
+ if (!r) {
952
+ var s = typeof e == "string" ? e : e.displayName || e.name;
953
+ s && (r = `
954
+
955
+ Check the top-level render call using <` + s + ">.");
956
+ }
957
+ return r;
958
+ }
959
+ }
960
+ function ze(e, r) {
961
+ {
962
+ if (!e._store || e._store.validated || e.key != null)
963
+ return;
964
+ e._store.validated = !0;
965
+ var s = kt(r);
966
+ if ($e[s])
967
+ return;
968
+ $e[s] = !0;
969
+ var l = "";
970
+ e && e._owner && e._owner !== ae.current && (l = " It was passed a child from " + T(e._owner.type) + "."), I(e), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, l), I(null);
971
+ }
972
+ }
973
+ function Ae(e, r) {
974
+ {
975
+ if (typeof e != "object")
976
+ return;
977
+ if (ne(e))
978
+ for (var s = 0; s < e.length; s++) {
979
+ var l = e[s];
980
+ se(l) && ze(l, r);
981
+ }
982
+ else if (se(e))
983
+ e._store && (e._store.validated = !0);
984
+ else if (e) {
985
+ var m = Ge(e);
986
+ if (typeof m == "function" && m !== e.entries)
987
+ for (var h = m.call(e), f; !(f = h.next()).done; )
988
+ se(f.value) && ze(f.value, r);
989
+ }
990
+ }
991
+ }
992
+ function Nt(e) {
993
+ {
994
+ var r = e.type;
995
+ if (r == null || typeof r == "string")
996
+ return;
997
+ var s;
998
+ if (typeof r == "function")
999
+ s = r.propTypes;
1000
+ else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
1001
+ // Inner props are checked in the reconciler.
1002
+ r.$$typeof === k))
1003
+ s = r.propTypes;
1004
+ else
1005
+ return;
1006
+ if (s) {
1007
+ var l = T(r);
1008
+ pt(s, e.props, "prop", l, e);
1009
+ } else if (r.PropTypes !== void 0 && !oe) {
1010
+ oe = !0;
1011
+ var m = T(r);
1012
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown");
1013
+ }
1014
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1015
+ }
1016
+ }
1017
+ function Ot(e) {
1018
+ {
1019
+ for (var r = Object.keys(e.props), s = 0; s < r.length; s++) {
1020
+ var l = r[s];
1021
+ if (l !== "children" && l !== "key") {
1022
+ I(e), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", l), I(null);
1023
+ break;
1024
+ }
1025
+ }
1026
+ e.ref !== null && (I(e), S("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
1027
+ }
1028
+ }
1029
+ var Fe = {};
1030
+ function Le(e, r, s, l, m, h) {
1031
+ {
1032
+ var f = ot(e);
1033
+ if (!f) {
1034
+ var u = "";
1035
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1036
+ var j = jt();
1037
+ j ? u += j : u += De();
1038
+ var b;
1039
+ e === null ? b = "null" : ne(e) ? b = "array" : e !== void 0 && e.$$typeof === n ? (b = "<" + (T(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, u);
1040
+ }
1041
+ var g = St(e, r, s, m, h);
1042
+ if (g == null)
1043
+ return g;
1044
+ if (f) {
1045
+ var O = r.children;
1046
+ if (O !== void 0)
1047
+ if (l)
1048
+ if (ne(O)) {
1049
+ for (var M = 0; M < O.length; M++)
1050
+ Ae(O[M], e);
1051
+ Object.freeze && Object.freeze(O);
1052
+ } else
1053
+ S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1054
+ else
1055
+ Ae(O, e);
1056
+ }
1057
+ if (B.call(r, "key")) {
1058
+ var A = T(e), N = Object.keys(r).filter(function(Dt) {
1059
+ return Dt !== "key";
1060
+ }), ie = N.length > 0 ? "{key: someKey, " + N.join(": ..., ") + ": ...}" : "{key: someKey}";
1061
+ if (!Fe[A + ie]) {
1062
+ var Ct = N.length > 0 ? "{" + N.join(": ..., ") + ": ...}" : "{}";
1063
+ S(`A props object containing a "key" prop is being spread into JSX:
1064
+ let props = %s;
1065
+ <%s {...props} />
1066
+ React keys must be passed directly to JSX without using spread:
1067
+ let props = %s;
1068
+ <%s key={someKey} {...props} />`, ie, A, Ct, A), Fe[A + ie] = !0;
1069
+ }
1070
+ }
1071
+ return e === o ? Ot(g) : Nt(g), g;
1072
+ }
1073
+ }
1074
+ function Et(e, r, s) {
1075
+ return Le(e, r, s, !0);
1076
+ }
1077
+ function Rt(e, r, s) {
1078
+ return Le(e, r, s, !1);
1079
+ }
1080
+ var Pt = Rt, Tt = Et;
1081
+ V.Fragment = o, V.jsx = Pt, V.jsxs = Tt;
1082
+ })()), V;
1083
+ }
1084
+ var Ye;
1085
+ function or() {
1086
+ return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? ue.exports = nr() : ue.exports = ar()), ue.exports;
1087
+ }
1088
+ var Ze = or();
1089
+ function sr({
1090
+ src: t,
1091
+ autoplay: n,
1092
+ loop: a = !0,
1093
+ ...o
1094
+ }) {
1095
+ const [p, y] = le(!1), [w, v] = le(null), [d, P] = le(!1);
1096
+ return $t(() => {
1097
+ let x = !0;
1098
+ return y(!0), Promise.all([
1099
+ import("./lottie-react.esm-BUHy0Xb6.mjs"),
1100
+ import("./isChromatic-5i32AXac-CtZ5BKgh.mjs")
1101
+ ]).then(([{ Player: k }, { default: E }]) => {
1102
+ x && (v(() => k), P(E()));
1103
+ }).catch((k) => {
1104
+ throw console.error("[LottiePlayer] Failed to load dependencies:", k), k;
1105
+ }), () => {
1106
+ x = !1;
1107
+ };
1108
+ }, []), !p || !w ? /* @__PURE__ */ Ze.jsx("div", { ...o }) : /* @__PURE__ */ Ze.jsx(
1109
+ w,
1110
+ {
1111
+ src: t,
1112
+ loop: a,
1113
+ autoplay: n !== void 0 ? n : !d,
1114
+ ...o
1115
+ }
1116
+ );
1117
+ }
1118
+ const ir = {
1119
+ danger: {
1120
+ lottie: "https://fonts.gstatic.com/s/e/notoemoji/latest/1f6a8/lottie.json",
1121
+ webp: "https://fonts.gstatic.com/s/e/notoemoji/latest/1f6a8/512.webp",
1122
+ gif: "https://fonts.gstatic.com/s/e/notoemoji/latest/1f6a8/512.gif",
1123
+ alt: "🚨"
1124
+ },
1125
+ caution: {
1126
+ lottie: "https://fonts.gstatic.com/s/e/notoemoji/latest/26a0_fe0f/lottie.json",
1127
+ webp: "https://fonts.gstatic.com/s/e/notoemoji/latest/26a0_fe0f/512.webp",
1128
+ gif: "https://fonts.gstatic.com/s/e/notoemoji/latest/26a0_fe0f/512.gif",
1129
+ alt: "⚠️"
1130
+ },
1131
+ safe: {
1132
+ lottie: "https://fonts.gstatic.com/s/e/notoemoji/latest/2705/lottie.json",
1133
+ webp: "https://fonts.gstatic.com/s/e/notoemoji/latest/2705/512.webp",
1134
+ gif: "https://fonts.gstatic.com/s/e/notoemoji/latest/2705/512.gif",
1135
+ alt: "✅"
1136
+ }
1137
+ }, fe = {
1138
+ danger: "font-bold text-error",
1139
+ caution: "font-bold text-warning",
1140
+ safe: "font-bold text-success"
1141
+ };
1142
+ function jr({ level: t, score: n }) {
1143
+ const { t: a } = D($), o = ir[t];
1144
+ return /* @__PURE__ */ _("div", { className: "mb-8 flex flex-col items-center text-center", children: [
1145
+ /* @__PURE__ */ i("div", { className: "mb-5 rounded-full bg-neutral/75 px-4 py-1.5", children: /* @__PURE__ */ i("span", { className: "text-sm font-medium text-neutral-content", children: a(`result.safetyLevel.${t}.badge`) }) }),
1146
+ /* @__PURE__ */ i("h1", { className: "mb-9 break-keep text-4xl font-bold leading-tight text-base-content", children: /* @__PURE__ */ i(
1147
+ Ie,
1148
+ {
1149
+ t: a,
1150
+ i18nKey: `result.safetyLevel.${t}.title`,
1151
+ components: [/* @__PURE__ */ i("strong", { className: fe[t] }, "0")]
1152
+ }
1153
+ ) }),
1154
+ /* @__PURE__ */ i("div", { className: "mb-9 flex size-32 items-center justify-center", children: /* @__PURE__ */ i(sr, { src: o.lottie, autoplay: !0, loop: !0, className: "size-full" }) }),
1155
+ /* @__PURE__ */ i("p", { className: "max-w-md break-keep text-xl leading-relaxed text-base-content", children: /* @__PURE__ */ i(
1156
+ Ie,
1157
+ {
1158
+ t: a,
1159
+ i18nKey: `result.safetyLevel.${t}.description`,
1160
+ values: { score: n },
1161
+ components: [
1162
+ /* @__PURE__ */ i("strong", { className: fe[t] }, "0"),
1163
+ /* @__PURE__ */ i("strong", { className: fe[t] }, "1")
1164
+ ]
1165
+ }
1166
+ ) })
446
1167
  ] });
447
1168
  }
448
- const O = {
1169
+ const He = {
449
1170
  safe: 70,
450
1171
  caution: 40
451
- }, he = (e) => e >= O.safe ? "safe" : e >= O.caution ? "caution" : "danger", _ = i.object({
452
- category: i.enum(["payment", "seller", "platform", "price", "content"]),
453
- severity: i.enum(["high", "medium", "low"]),
454
- title: i.string(),
455
- description: i.string(),
456
- what_to_do: i.string()
457
- }), G = i.object({
458
- market_price_range: i.string().nullish(),
459
- offered_price: i.number().nullish(),
460
- currency: i.string().nullish(),
461
- price_assessment: i.string(),
462
- warnings: i.array(i.string())
463
- }), J = i.object({
464
- ai_summary: i.string(),
465
- translation: i.string().nullish(),
466
- nuance_explanation: i.string().nullish(),
467
- risk_signals: i.array(_),
468
- cautions: i.array(_),
469
- safe_indicators: i.array(_),
470
- price_analysis: G,
471
- safety_checklist: i.array(i.string()),
472
- safe_score: i.number(),
473
- recommendation: i.string(),
474
- emotional_support: i.string()
475
- }), Q = i.object({
476
- id: i.string(),
477
- user_id: i.string().nullish(),
478
- input_text: i.string(),
479
- llm_analysis: J,
480
- safe_score: i.number(),
481
- expert_advice: i.string().nullish(),
482
- expert_reviewed: i.boolean(),
483
- expert_reviewed_at: i.string().nullish(),
484
- expert_reviewed_by: i.string().nullish(),
485
- created_at: i.string(),
486
- updated_at: i.string()
487
- }), V = i.enum(["twitter"]), ee = i.object({
488
- platform: V,
489
- author: i.string(),
490
- created_at: i.string().nullish(),
491
- text: i.string(),
492
- text_preview: i.string(),
493
- images: i.array(i.string())
494
- }), te = i.object({
495
- data: ee
1172
+ }, kr = (t) => t >= He.safe ? "safe" : t >= He.caution ? "caution" : "danger", pe = c.object({
1173
+ category: c.enum(["payment", "seller", "platform", "price", "content"]),
1174
+ severity: c.enum(["high", "medium", "low"]),
1175
+ title: c.string(),
1176
+ description: c.string(),
1177
+ what_to_do: c.string()
1178
+ }), lr = c.object({
1179
+ market_price_range: c.string().nullish(),
1180
+ offered_price: c.number().nullish(),
1181
+ currency: c.string().nullish(),
1182
+ price_assessment: c.string(),
1183
+ warnings: c.array(c.string())
1184
+ }), cr = c.object({
1185
+ ai_summary: c.array(c.string()),
1186
+ translation: c.string().nullish(),
1187
+ nuance_explanation: c.string().nullish(),
1188
+ risk_signals: c.array(pe),
1189
+ cautions: c.array(pe),
1190
+ safe_indicators: c.array(pe),
1191
+ price_analysis: lr,
1192
+ safety_checklist: c.array(c.string()),
1193
+ safe_score: c.number(),
1194
+ recommendation: c.string(),
1195
+ emotional_support: c.string()
1196
+ }), ur = c.object({
1197
+ id: c.string(),
1198
+ user_id: c.string().nullish(),
1199
+ input_text: c.string(),
1200
+ llm_analysis: cr,
1201
+ safe_score: c.number(),
1202
+ expert_advice: c.string().nullish(),
1203
+ expert_reviewed: c.boolean(),
1204
+ expert_reviewed_at: c.string().nullish(),
1205
+ expert_reviewed_by: c.string().nullish(),
1206
+ created_at: c.string(),
1207
+ updated_at: c.string()
1208
+ }), fr = c.enum(["twitter"]), pr = c.object({
1209
+ platform: fr,
1210
+ author: c.string(),
1211
+ created_at: c.string().nullish(),
1212
+ text: c.string(),
1213
+ text_preview: c.string(),
1214
+ images: c.array(c.string())
1215
+ }), dr = c.object({
1216
+ data: pr
496
1217
  });
497
- class fe extends z {
1218
+ class Nr extends zt {
498
1219
  constructor() {
499
1220
  super(...arguments), this.resource = "trade-safety";
500
1221
  }
501
1222
  getDataSchema() {
502
- return Q;
1223
+ return ur;
503
1224
  }
504
1225
  /**
505
1226
  * Fetch post preview metadata from a social media URL
506
1227
  * POST /trade-safety/preview
507
1228
  */
508
- async fetchPreview(t, r) {
509
- const n = `${this.apiService.buildUrl(this.resource)}/preview`, s = await this.apiService.request(n, {
510
- ...r,
1229
+ async fetchPreview(n, a) {
1230
+ const o = `${this.apiService.buildUrl(this.resource)}/preview`, p = await this.apiService.request(o, {
1231
+ ...a,
511
1232
  method: "POST",
512
1233
  headers: { "Content-Type": "application/json" },
513
- body: JSON.stringify({ url: t })
1234
+ body: JSON.stringify({ url: n })
514
1235
  });
515
- return this.validateResponse(s, te).data;
1236
+ return this.validateResponse(p, dr).data;
516
1237
  }
517
1238
  }
518
1239
  export {
519
- ue as DetailedResult,
520
- de as HomeHeroSection,
521
- me as PageHeader,
522
- O as SAFETY_SCORE_THRESHOLDS,
523
- d as TRADE_SAFETY_NS,
524
- fe as TradeSafetyRepository,
525
- he as getSafetyLevel,
526
- ge as tradeSafetyTranslations
1240
+ wr as DetailedResult,
1241
+ Sr as HomeHeroSection,
1242
+ jr as PageHeader,
1243
+ He as SAFETY_SCORE_THRESHOLDS,
1244
+ $ as TRADE_SAFETY_NS,
1245
+ Nr as TradeSafetyRepository,
1246
+ kr as getSafetyLevel,
1247
+ Rr as tradeSafetyTranslations
527
1248
  };
528
1249
  //# sourceMappingURL=index.mjs.map