trade-safety 1.2.0 → 1.4.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.
@@ -0,0 +1,6 @@
1
+ interface AISummarySectionProps {
2
+ summary: string;
3
+ }
4
+ export declare function AISummarySection({ summary }: AISummarySectionProps): import("react").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=AISummarySection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AISummarySection.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/AISummarySection.tsx"],"names":[],"mappings":"AAQA,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,qBAAqB,+BAUlE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAQ9C,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BA4C/D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAS9C,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BAgD/D"}
@@ -0,0 +1,9 @@
1
+ export interface HomeHeroSectionProps {
2
+ value: string;
3
+ onChange: (value: string) => void;
4
+ onSubmit: () => void;
5
+ isLoading: boolean;
6
+ error: string | null;
7
+ }
8
+ export declare function HomeHeroSection({ value, onChange, onSubmit, isLoading, error, }: HomeHeroSectionProps): import("react").JSX.Element;
9
+ //# sourceMappingURL=HomeHeroSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HomeHeroSection.d.ts","sourceRoot":"","sources":["../../src/components/HomeHeroSection.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,KAAK,GACN,EAAE,oBAAoB,+BAqHtB"}
@@ -0,0 +1,8 @@
1
+ import { SafetyLevel } from '../types';
2
+ interface PageHeaderProps {
3
+ level: SafetyLevel;
4
+ score: number;
5
+ }
6
+ export declare function PageHeader({ level, score }: PageHeaderProps): import("react").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=PageHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../src/components/PageHeader.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,UAAU,eAAe;IACvB,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,eAAe,+BAa3D"}
@@ -24,12 +24,14 @@ export declare const tradeSafetyTranslations: {
24
24
  title: string;
25
25
  subtitle: string;
26
26
  placeholder: string;
27
+ placeholderExample: string;
27
28
  advancedOptions: string;
28
29
  amountPlaceholder: string;
29
30
  checkSafety: string;
30
31
  analyzing: string;
31
32
  analyzingDescription: string;
32
33
  tryExample: string;
34
+ disclaimer: string;
33
35
  };
34
36
  features: {
35
37
  title: string;
@@ -86,6 +88,7 @@ export declare const tradeSafetyTranslations: {
86
88
  priceWarnings: string;
87
89
  safetyChecklist: string;
88
90
  checklistDescription: string;
91
+ aiSummary: string;
89
92
  recommendation: string;
90
93
  expertAdvice: string;
91
94
  expertName: string;
@@ -103,6 +106,20 @@ export declare const tradeSafetyTranslations: {
103
106
  message: string;
104
107
  };
105
108
  };
109
+ safetyLevel: {
110
+ safe: {
111
+ title: string;
112
+ description: string;
113
+ };
114
+ caution: {
115
+ title: string;
116
+ description: string;
117
+ };
118
+ danger: {
119
+ title: string;
120
+ description: string;
121
+ };
122
+ };
106
123
  companionCta: {
107
124
  title: string;
108
125
  description: string;
@@ -115,12 +132,14 @@ export declare const tradeSafetyTranslations: {
115
132
  title: string;
116
133
  subtitle: string;
117
134
  placeholder: string;
135
+ placeholderExample: string;
118
136
  advancedOptions: string;
119
137
  amountPlaceholder: string;
120
138
  checkSafety: string;
121
139
  analyzing: string;
122
140
  analyzingDescription: string;
123
141
  tryExample: string;
142
+ disclaimer: string;
124
143
  };
125
144
  features: {
126
145
  title: string;
@@ -177,6 +196,7 @@ export declare const tradeSafetyTranslations: {
177
196
  priceWarnings: string;
178
197
  safetyChecklist: string;
179
198
  checklistDescription: string;
199
+ aiSummary: string;
180
200
  recommendation: string;
181
201
  expertAdvice: string;
182
202
  expertName: string;
@@ -194,6 +214,20 @@ export declare const tradeSafetyTranslations: {
194
214
  message: string;
195
215
  };
196
216
  };
217
+ safetyLevel: {
218
+ safe: {
219
+ title: string;
220
+ description: string;
221
+ };
222
+ caution: {
223
+ title: string;
224
+ description: string;
225
+ };
226
+ danger: {
227
+ title: string;
228
+ description: string;
229
+ };
230
+ };
197
231
  companionCta: {
198
232
  title: string;
199
233
  description: string;
@@ -206,12 +240,14 @@ export declare const tradeSafetyTranslations: {
206
240
  title: string;
207
241
  subtitle: string;
208
242
  placeholder: string;
243
+ placeholderExample: string;
209
244
  advancedOptions: string;
210
245
  amountPlaceholder: string;
211
246
  checkSafety: string;
212
247
  analyzing: string;
213
248
  analyzingDescription: string;
214
249
  tryExample: string;
250
+ disclaimer: string;
215
251
  };
216
252
  features: {
217
253
  title: string;
@@ -268,6 +304,7 @@ export declare const tradeSafetyTranslations: {
268
304
  priceWarnings: string;
269
305
  safetyChecklist: string;
270
306
  checklistDescription: string;
307
+ aiSummary: string;
271
308
  recommendation: string;
272
309
  expertAdvice: string;
273
310
  expertName: string;
@@ -285,6 +322,20 @@ export declare const tradeSafetyTranslations: {
285
322
  message: string;
286
323
  };
287
324
  };
325
+ safetyLevel: {
326
+ safe: {
327
+ title: string;
328
+ description: string;
329
+ };
330
+ caution: {
331
+ title: string;
332
+ description: string;
333
+ };
334
+ danger: {
335
+ title: string;
336
+ description: string;
337
+ };
338
+ };
288
339
  companionCta: {
289
340
  title: string;
290
341
  description: string;
@@ -297,12 +348,14 @@ export declare const tradeSafetyTranslations: {
297
348
  title: string;
298
349
  subtitle: string;
299
350
  placeholder: string;
351
+ placeholderExample: string;
300
352
  advancedOptions: string;
301
353
  amountPlaceholder: string;
302
354
  checkSafety: string;
303
355
  analyzing: string;
304
356
  analyzingDescription: string;
305
357
  tryExample: string;
358
+ disclaimer: string;
306
359
  };
307
360
  features: {
308
361
  title: string;
@@ -359,6 +412,7 @@ export declare const tradeSafetyTranslations: {
359
412
  priceWarnings: string;
360
413
  safetyChecklist: string;
361
414
  checklistDescription: string;
415
+ aiSummary: string;
362
416
  recommendation: string;
363
417
  expertAdvice: string;
364
418
  expertName: string;
@@ -376,6 +430,20 @@ export declare const tradeSafetyTranslations: {
376
430
  message: string;
377
431
  };
378
432
  };
433
+ safetyLevel: {
434
+ safe: {
435
+ title: string;
436
+ description: string;
437
+ };
438
+ caution: {
439
+ title: string;
440
+ description: string;
441
+ };
442
+ danger: {
443
+ title: string;
444
+ description: string;
445
+ };
446
+ };
379
447
  companionCta: {
380
448
  title: string;
381
449
  description: string;
@@ -388,12 +456,14 @@ export declare const tradeSafetyTranslations: {
388
456
  title: string;
389
457
  subtitle: string;
390
458
  placeholder: string;
459
+ placeholderExample: string;
391
460
  advancedOptions: string;
392
461
  amountPlaceholder: string;
393
462
  checkSafety: string;
394
463
  analyzing: string;
395
464
  analyzingDescription: string;
396
465
  tryExample: string;
466
+ disclaimer: string;
397
467
  };
398
468
  features: {
399
469
  title: string;
@@ -450,6 +520,7 @@ export declare const tradeSafetyTranslations: {
450
520
  priceWarnings: string;
451
521
  safetyChecklist: string;
452
522
  checklistDescription: string;
523
+ aiSummary: string;
453
524
  recommendation: string;
454
525
  expertAdvice: string;
455
526
  expertName: string;
@@ -467,6 +538,20 @@ export declare const tradeSafetyTranslations: {
467
538
  message: string;
468
539
  };
469
540
  };
541
+ safetyLevel: {
542
+ safe: {
543
+ title: string;
544
+ description: string;
545
+ };
546
+ caution: {
547
+ title: string;
548
+ description: string;
549
+ };
550
+ danger: {
551
+ title: string;
552
+ description: string;
553
+ };
554
+ };
470
555
  companionCta: {
471
556
  title: string;
472
557
  description: string;
@@ -479,12 +564,14 @@ export declare const tradeSafetyTranslations: {
479
564
  title: string;
480
565
  subtitle: string;
481
566
  placeholder: string;
567
+ placeholderExample: string;
482
568
  advancedOptions: string;
483
569
  amountPlaceholder: string;
484
570
  checkSafety: string;
485
571
  analyzing: string;
486
572
  analyzingDescription: string;
487
573
  tryExample: string;
574
+ disclaimer: string;
488
575
  };
489
576
  features: {
490
577
  title: string;
@@ -541,6 +628,7 @@ export declare const tradeSafetyTranslations: {
541
628
  priceWarnings: string;
542
629
  safetyChecklist: string;
543
630
  checklistDescription: string;
631
+ aiSummary: string;
544
632
  recommendation: string;
545
633
  expertAdvice: string;
546
634
  expertName: string;
@@ -558,6 +646,20 @@ export declare const tradeSafetyTranslations: {
558
646
  message: string;
559
647
  };
560
648
  };
649
+ safetyLevel: {
650
+ safe: {
651
+ title: string;
652
+ description: string;
653
+ };
654
+ caution: {
655
+ title: string;
656
+ description: string;
657
+ };
658
+ danger: {
659
+ title: string;
660
+ description: string;
661
+ };
662
+ };
561
663
  companionCta: {
562
664
  title: string;
563
665
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../src/i18n/translations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,6BAA6B;AAC7B,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOnC,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../src/i18n/translations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,6BAA6B;AAC7B,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOnC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -4,8 +4,10 @@
4
4
  * AI-powered safety analysis for K-pop merchandise trading
5
5
  */
6
6
  export { DetailedResult } from './components/DetailedResult';
7
+ export { HomeHeroSection } from './components/HomeHeroSection';
8
+ export type { HomeHeroSectionProps } from './components/HomeHeroSection';
7
9
  export { TradeSafetyRepository } from './repositories';
8
- export type { TradeSafetyCheckRepositoryResponse, TradeSafetyCheckFullResponse, QuickCheckRepositoryResponse, } from './repositories/TradeSafetyRepository';
10
+ export type { TradeSafetyCheckRepositoryResponse } from './repositories/TradeSafetyRepository';
9
11
  export * from './types';
10
12
  export { TRADE_SAFETY_NS, tradeSafetyTranslations } from './i18n/translations';
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EACV,kCAAkC,EAClC,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,sCAAsC,CAAC;AAG9C,cAAc,SAAS,CAAC;AAIxB,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAG/F,cAAc,SAAS,CAAC;AAIxB,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),o=require("react-i18next");require("i18next");require("i18next-resources-to-backend");const l=require("./locale.js"),x=require("react"),g=require("@aioia/core"),t=require("zod");function p(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(s,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return s.default=e,Object.freeze(s)}const c=p(x);function f(e){var s,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(s=0;s<i;s++)e[s]&&(n=f(e[s]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function _(){for(var e,s,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(s=f(e))&&(a&&(a+=" "),a+=s);return a}const b={default:"border-base-300",error:"border-error bg-error/10",warning:"border-warning bg-warning/10",success:"border-success bg-success/10",info:"border-info bg-info/10"};function u({title:e,icon:s,variant:n="default",children:a}){return a?r.jsxs("div",{className:_("rounded-lg border p-6",b[n]),children:[e&&r.jsxs("h2",{className:"mb-2 flex items-center gap-2 font-bold",children:[e,s]}),a]}):null}function j({data:e}){const{t:s,i18n:n}=o.useTranslation(l.TRADE_SAFETY_NS);return e?r.jsxs(u,{title:s("result.priceAnalysis"),children:[e.market_price_range&&r.jsxs("div",{className:"mb-2",children:[r.jsx("h3",{className:"text-sm font-bold",children:s("result.marketPrice")}),r.jsx("p",{className:"text-xs",children:e.market_price_range})]}),e.offered_price&&r.jsxs("div",{className:"mb-2",children:[r.jsx("h3",{className:"text-sm font-bold",children:s("result.offeredPrice")}),r.jsx("p",{className:"text-xs",children:new Intl.NumberFormat(n.language,{style:"currency",currency:e.currency||"USD"}).format(e.offered_price)})]}),e.price_assessment&&r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold",children:s("result.priceAssessment")}),r.jsx("p",{className:"text-xs",children:e.price_assessment})]})]}):null}function S({recommendation:e}){const{t:s}=o.useTranslation(l.TRADE_SAFETY_NS);return e?r.jsx(u,{title:s("result.recommendation"),children:r.jsx("p",{className:"text-xs",children:e})}):null}function v({title:e,titleId:s,...n},a){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":s},n),e?c.createElement("title",{id:s},e):null,c.createElement("path",{fillRule:"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const y=c.forwardRef(v);function z({title:e,titleId:s,...n},a){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":s},n),e?c.createElement("title",{id:s},e):null,c.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const w=c.forwardRef(z);function N({title:e,titleId:s,...n},a){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":s},n),e?c.createElement("title",{id:s},e):null,c.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-2.625 6c-.54 0-.828.419-.936.634a1.96 1.96 0 0 0-.189.866c0 .298.059.605.189.866.108.215.395.634.936.634.54 0 .828-.419.936-.634.13-.26.189-.568.189-.866 0-.298-.059-.605-.189-.866-.108-.215-.395-.634-.936-.634Zm4.314.634c.108-.215.395-.634.936-.634.54 0 .828.419.936.634.13.26.189.568.189.866 0 .298-.059.605-.189.866-.108.215-.395.634-.936.634-.54 0-.828-.419-.936-.634a1.96 1.96 0 0 1-.189-.866c0-.298.059-.605.189-.866Zm-4.34 7.964a.75.75 0 0 1-1.061-1.06 5.236 5.236 0 0 1 3.73-1.538 5.236 5.236 0 0 1 3.695 1.538.75.75 0 1 1-1.061 1.06 3.736 3.736 0 0 0-2.639-1.098 3.736 3.736 0 0 0-2.664 1.098Z",clipRule:"evenodd"}))}const R=c.forwardRef(N);function T({title:e,titleId:s,...n},a){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":s},n),e?c.createElement("title",{id:s},e):null,c.createElement("path",{fillRule:"evenodd",d:"M11.484 2.17a.75.75 0 0 1 1.032 0 11.209 11.209 0 0 0 7.877 3.08.75.75 0 0 1 .722.515 12.74 12.74 0 0 1 .635 3.985c0 5.942-4.064 10.933-9.563 12.348a.749.749 0 0 1-.374 0C6.314 20.683 2.25 15.692 2.25 9.75c0-1.39.223-2.73.635-3.985a.75.75 0 0 1 .722-.516l.143.001c2.996 0 5.718-1.17 7.734-3.08ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75ZM12 15a.75.75 0 0 0-.75.75v.008c0 .414.336.75.75.75h.008a.75.75 0 0 0 .75-.75v-.008a.75.75 0 0 0-.75-.75H12Z",clipRule:"evenodd"}))}const E=c.forwardRef(T);function k({items:e}){const{t:s}=o.useTranslation(l.TRADE_SAFETY_NS);return e.length===0?null:r.jsxs("div",{className:"mb-4",children:[r.jsxs("h2",{className:"flex items-center gap-1 py-4 font-bold",children:[s("result.safetyChecklist")," ",r.jsx(y,{className:"size-6"})]}),r.jsx(u,{variant:"info",children:e.map((n,a)=>r.jsxs("label",{className:"label w-fit cursor-pointer gap-2",children:[r.jsx("input",{type:"checkbox",className:"checkbox rounded-full [--chkbg:theme(colors.neutral)] [--chkfg:theme(colors.neutral-content)]"}),r.jsx("span",{className:"label-text",children:n})]},a))})]})}const A={error:R,warning:w,success:E},D={error:"result.riskSignals",warning:"result.cautions",success:"result.safeIndicators"};function d({signals:e,variant:s="error"}){const{t:n}=o.useTranslation(l.TRADE_SAFETY_NS);if(e.length===0)return null;const a=A[s];return r.jsxs("div",{className:"mb-4",children:[r.jsxs("h2",{className:"flex items-center gap-1 py-4 font-bold",children:[n(D[s])," ",r.jsx(a,{className:"size-6"})]}),r.jsx("div",{className:"space-y-3",children:e.map((i,h)=>r.jsx(u,{variant:s,children:r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold",children:i.title}),r.jsx("p",{className:"text-xs",children:i.description})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold",children:n("result.whatToDo")}),r.jsx("p",{className:"text-xs",children:i.what_to_do})]})]})},h))})]})}function C({translation:e,nuance:s}){const{t:n}=o.useTranslation(l.TRADE_SAFETY_NS);return r.jsxs(u,{title:n("result.translation"),children:[e&&r.jsxs("div",{className:"mb-2",children:[r.jsx("h3",{className:"text-sm font-bold",children:n("result.translationTitle")}),r.jsx("p",{className:"text-xs",children:e})]}),s&&r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold",children:n("result.nuanceTitle")}),r.jsx("p",{className:"text-xs",children:s})]})]})}function F({analysis:e}){return r.jsxs("div",{children:[r.jsxs("div",{className:"mb-4 flex flex-col gap-4",children:[(e.translation||e.nuance_explanation)&&r.jsx(C,{translation:e.translation,nuance:e.nuance_explanation}),e.price_analysis&&r.jsx(j,{data:e.price_analysis}),e.recommendation&&r.jsx(S,{recommendation:e.recommendation})]}),e.risk_signals.length>0&&r.jsx(d,{signals:e.risk_signals,variant:"error"}),e.cautions.length>0&&r.jsx(d,{signals:e.cautions,variant:"warning"}),e.safe_indicators.length>0&&r.jsx(d,{signals:e.safe_indicators,variant:"success"}),e.safety_checklist.length>0&&r.jsx(k,{items:e.safety_checklist})]})}const m=t.z.object({category:t.z.enum(["payment","seller","platform","price","content"]),severity:t.z.enum(["high","medium","low"]),title:t.z.string(),description:t.z.string(),what_to_do:t.z.string()}),O=t.z.object({market_price_range:t.z.string().nullish(),offered_price:t.z.number().nullish(),currency:t.z.string().nullish(),price_assessment:t.z.string(),warnings:t.z.array(t.z.string())}),Z=t.z.object({translation:t.z.string().nullish(),nuance_explanation:t.z.string().nullish(),risk_signals:t.z.array(m),cautions:t.z.array(m),safe_indicators:t.z.array(m),price_analysis:O,safety_checklist:t.z.array(t.z.string()),risk_score:t.z.number(),recommendation:t.z.string(),emotional_support:t.z.string()}),q=t.z.object({risk_signals_count:t.z.number(),cautions_count:t.z.number(),safe_indicators_count:t.z.number()}),M=t.z.object({id:t.z.string(),user_id:t.z.string().nullish(),input_text:t.z.string(),llm_analysis:Z,risk_score:t.z.number(),expert_advice:t.z.string().nullish(),expert_reviewed:t.z.boolean(),expert_reviewed_at:t.z.string().nullish(),expert_reviewed_by:t.z.string().nullish(),created_at:t.z.string(),updated_at:t.z.string()}),I=t.z.union([M,t.z.object({id:t.z.string(),quick_summary:q,signup_required:t.z.literal(!0)})]);class Y extends g.BaseCrudRepository{constructor(){super(...arguments),this.resource="trade-safety"}getDataSchema(){return I}}const B={high:70,medium:40};exports.TRADE_SAFETY_NS=l.TRADE_SAFETY_NS;exports.tradeSafetyTranslations=l.tradeSafetyTranslations;exports.DetailedResult=F;exports.RISK_SCORE_THRESHOLDS=B;exports.TradeSafetyRepository=Y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),m=require("react-i18next");require("i18next");require("i18next-resources-to-backend");const d=require("./locale.js"),u=require("react"),E=require("@aioia/core"),a=require("zod");function O(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=O(u);function _(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=_(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function w(){for(var e,t,n=0,s="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=_(e))&&(s&&(s+=" "),s+=t);return s}const T={default:"border-base-300",error:"border-error bg-error/10",warning:"border-warning bg-warning/10",success:"border-success bg-success/10",info:"border-info bg-info/10"};function h({title:e,icon:t,variant:n="default",children:s}){return s?r.jsxs("div",{className:w("rounded-lg border p-6",T[n]),children:[e&&r.jsxs("h2",{className:"mb-2 flex items-center gap-2 font-bold",children:[e,t]}),s]}):null}function R({summary:e}){const{t}=m.useTranslation(d.TRADE_SAFETY_NS);return r.jsx(h,{title:t("result.aiSummary"),children:r.jsx("p",{className:"rounded-lg bg-base-200 p-6 text-sm leading-relaxed text-base-content",children:e})})}function A({data:e}){const{t,i18n:n}=m.useTranslation(d.TRADE_SAFETY_NS);return e?r.jsxs(h,{title:t("result.priceAnalysis"),children:[e.market_price_range&&r.jsxs("div",{className:"mb-2",children:[r.jsx("h3",{className:"text-sm font-bold",children:t("result.marketPrice")}),r.jsx("p",{className:"text-xs",children:e.market_price_range})]}),e.offered_price&&r.jsxs("div",{className:"mb-2",children:[r.jsx("h3",{className:"text-sm font-bold",children:t("result.offeredPrice")}),r.jsx("p",{className:"text-xs",children:new Intl.NumberFormat(n.language,{style:"currency",currency:e.currency||"USD"}).format(e.offered_price)})]}),e.price_assessment&&r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold",children:t("result.priceAssessment")}),r.jsx("p",{className:"text-xs",children:e.price_assessment})]})]}):null}function P({recommendation:e}){const{t}=m.useTranslation(d.TRADE_SAFETY_NS);return e?r.jsx(h,{title:t("result.recommendation"),children:r.jsx("p",{className:"text-xs",children:e})}):null}function C({title:e,titleId:t,...n},s){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const k=c.forwardRef(C);function D({title:e,titleId:t,...n},s){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const F=c.forwardRef(D);function M({title:e,titleId:t,...n},s){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-2.625 6c-.54 0-.828.419-.936.634a1.96 1.96 0 0 0-.189.866c0 .298.059.605.189.866.108.215.395.634.936.634.54 0 .828-.419.936-.634.13-.26.189-.568.189-.866 0-.298-.059-.605-.189-.866-.108-.215-.395-.634-.936-.634Zm4.314.634c.108-.215.395-.634.936-.634.54 0 .828.419.936.634.13.26.189.568.189.866 0 .298-.059.605-.189.866-.108.215-.395.634-.936.634-.54 0-.828-.419-.936-.634a1.96 1.96 0 0 1-.189-.866c0-.298.059-.605.189-.866Zm-4.34 7.964a.75.75 0 0 1-1.061-1.06 5.236 5.236 0 0 1 3.73-1.538 5.236 5.236 0 0 1 3.695 1.538.75.75 0 1 1-1.061 1.06 3.736 3.736 0 0 0-2.639-1.098 3.736 3.736 0 0 0-2.664 1.098Z",clipRule:"evenodd"}))}const H=c.forwardRef(M);function Z({title:e,titleId:t,...n},s){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M11.484 2.17a.75.75 0 0 1 1.032 0 11.209 11.209 0 0 0 7.877 3.08.75.75 0 0 1 .722.515 12.74 12.74 0 0 1 .635 3.985c0 5.942-4.064 10.933-9.563 12.348a.749.749 0 0 1-.374 0C6.314 20.683 2.25 15.692 2.25 9.75c0-1.39.223-2.73.635-3.985a.75.75 0 0 1 .722-.516l.143.001c2.996 0 5.718-1.17 7.734-3.08ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75ZM12 15a.75.75 0 0 0-.75.75v.008c0 .414.336.75.75.75h.008a.75.75 0 0 0 .75-.75v-.008a.75.75 0 0 0-.75-.75H12Z",clipRule:"evenodd"}))}const Y=c.forwardRef(Z);function B({items:e}){const{t}=m.useTranslation(d.TRADE_SAFETY_NS);return e.length===0?null:r.jsxs("div",{className:"mb-4",children:[r.jsxs("h2",{className:"flex items-center gap-1 py-4 font-bold",children:[t("result.safetyChecklist")," ",r.jsx(k,{className:"size-6"})]}),r.jsx(h,{variant:"info",children:e.map((n,s)=>r.jsxs("label",{className:"label w-fit cursor-pointer gap-2",children:[r.jsx("input",{type:"checkbox",className:"checkbox rounded-full [--chkbg:theme(colors.neutral)] [--chkfg:theme(colors.neutral-content)]"}),r.jsx("span",{className:"label-text",children:n})]},s))})]})}const I={error:H,warning:F,success:Y},L={error:"result.riskSignals",warning:"result.cautions",success:"result.safeIndicators"};function g({signals:e,variant:t="error"}){const{t:n}=m.useTranslation(d.TRADE_SAFETY_NS);if(e.length===0)return null;const s=I[t];return r.jsxs("div",{className:"mb-4",children:[r.jsxs("h2",{className:"flex items-center gap-1 py-4 font-bold",children:[n(L[t])," ",r.jsx(s,{className:"size-6"})]}),r.jsx("div",{className:"space-y-3",children:e.map((l,i)=>r.jsx(h,{variant:t,children:r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold",children:l.title}),r.jsx("p",{className:"text-xs",children:l.description})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold",children:n("result.whatToDo")}),r.jsx("p",{className:"text-xs",children:l.what_to_do})]})]})},i))})]})}function q({translation:e,nuance:t}){const{t:n}=m.useTranslation(d.TRADE_SAFETY_NS);return r.jsxs(h,{title:n("result.translation"),children:[e&&r.jsxs("div",{className:"mb-2",children:[r.jsx("h3",{className:"text-sm font-bold",children:n("result.translationTitle")}),r.jsx("p",{className:"text-xs",children:e})]}),t&&r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold",children:n("result.nuanceTitle")}),r.jsx("p",{className:"text-xs",children:t})]})]})}function W({analysis:e}){return r.jsxs("div",{children:[e.ai_summary&&r.jsx(R,{summary:e.ai_summary}),r.jsxs("div",{className:"my-4 flex flex-col gap-4",children:[(e.translation||e.nuance_explanation)&&r.jsx(q,{translation:e.translation,nuance:e.nuance_explanation}),e.price_analysis&&r.jsx(A,{data:e.price_analysis}),e.recommendation&&r.jsx(P,{recommendation:e.recommendation})]}),e.risk_signals.length>0&&r.jsx(g,{signals:e.risk_signals,variant:"error"}),e.cautions.length>0&&r.jsx(g,{signals:e.cautions,variant:"warning"}),e.safe_indicators.length>0&&r.jsx(g,{signals:e.safe_indicators,variant:"success"}),e.safety_checklist.length>0&&r.jsx(B,{items:e.safety_checklist})]})}var N={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},v=u.createContext&&u.createContext(N),$=["attr","size","title"];function K(e,t){if(e==null)return{};var n=V(e,t),s,l;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(l=0;l<i.length;l++)s=i[l],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function V(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},b.apply(this,arguments)}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,s)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y(Object(n),!0).forEach(function(s){X(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function X(e,t,n){return t=G(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e){var t=U(e,"string");return typeof t=="symbol"?t:t+""}function U(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S(e){return e&&e.map((t,n)=>u.createElement(t.tag,p({key:n},t.attr),S(t.child)))}function z(e){return t=>u.createElement(J,b({attr:p({},e.attr)},t),S(e.child))}function J(e){var t=n=>{var{attr:s,size:l,title:i}=e,x=K(e,$),f=l||n.size||"1em",o;return n.className&&(o=n.className),e.className&&(o=(o?o+" ":"")+e.className),u.createElement("svg",b({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,s,x,{className:o,style:p(p({color:e.color||n.color},n.style),e.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),i&&u.createElement("title",null,i),e.children)};return v!==void 0?u.createElement(v.Consumer,null,n=>t(n)):t(N)}function Q(e){return z({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)}function ee(e){return z({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)}function te({value:e,onChange:t,onSubmit:n,isLoading:s,error:l}){const{t:i}=m.useTranslation(d.TRADE_SAFETY_NS),x=s?r.jsx("span",{className:"loading loading-spinner loading-sm"}):i("hero.checkSafety"),f=s||!e.trim();return r.jsx("div",{className:"flex w-full flex-col items-center justify-center",children:r.jsxs("div",{className:"w-full lg:max-w-[720px]",children:[r.jsx("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:i("hero.title")}),r.jsx("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:i("hero.subtitle")}),r.jsxs("div",{className:w("mb-4",!l&&"sm:mb-8 md:mb-12"),children:[r.jsxs("div",{className:"relative hidden lg:block",children:[r.jsx("input",{type:"text",className:"input input-bordered h-[72px] w-full pr-36 text-sm placeholder:text-base-300 focus:outline-none",placeholder:i("hero.placeholder"),"aria-label":i("hero.placeholder"),value:e,onChange:o=>t(o.target.value),disabled:s,onKeyDown:o=>{o.key==="Enter"&&!f&&n()}}),r.jsx("button",{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",onClick:n,disabled:f,children:x})]}),r.jsx("div",{className:"block lg:hidden",children:r.jsxs("div",{className:"relative h-[400px] w-full overflow-hidden rounded-xl border border-base-300 bg-base-100",children:[!e&&r.jsx("div",{className:"pointer-events-none absolute inset-0 overflow-hidden p-5 pb-24 text-base text-base-300","aria-hidden":"true",children:r.jsxs("div",{className:"whitespace-pre-line leading-relaxed",children:[r.jsx("p",{className:"mb-4 text-base-300",children:i("hero.placeholder")}),i("hero.placeholderExample")]})}),r.jsx("div",{className:"absolute inset-0 overflow-hidden pb-24",children:r.jsx("textarea",{className:"textarea size-full resize-none overflow-auto bg-transparent p-4 leading-6 text-base-content focus:outline-none",value:e,"aria-label":i("hero.placeholder"),onChange:o=>t(o.target.value),disabled:s,placeholder:""})}),r.jsx("div",{className:"absolute inset-x-4 bottom-4 z-10",children:r.jsx("button",{className:"btn btn-neutral h-16 w-full text-base font-medium text-neutral-content",onClick:n,disabled:f,children:x})})]})})]}),l&&r.jsx("div",{className:"alert alert-error mb-6 flex items-center gap-2 text-sm",children:r.jsx("span",{children:l})}),r.jsx("p",{className:"mb-4 text-left text-xs text-base-content/60 sm:mb-8 sm:text-center md:mb-12",children:i("hero.disclaimer")}),r.jsxs("div",{className:"flex items-center justify-start gap-6 sm:justify-center",children:[r.jsx("a",{href:"https://x.com",target:"_blank",rel:"noopener noreferrer","aria-label":"X",children:r.jsx(ee,{className:"size-6 text-base-content transition-colors hover:text-base-content/70"})}),r.jsx("a",{href:"https://reddit.com",target:"_blank",rel:"noopener noreferrer","aria-label":"Reddit",children:r.jsx(Q,{className:"size-6 text-base-content transition-colors hover:text-base-content/70"})})]})]})})}const j=a.z.object({category:a.z.enum(["payment","seller","platform","price","content"]),severity:a.z.enum(["high","medium","low"]),title:a.z.string(),description:a.z.string(),what_to_do:a.z.string()}),re=a.z.object({market_price_range:a.z.string().nullish(),offered_price:a.z.number().nullish(),currency:a.z.string().nullish(),price_assessment:a.z.string(),warnings:a.z.array(a.z.string())}),ne=a.z.object({ai_summary:a.z.string(),translation:a.z.string().nullish(),nuance_explanation:a.z.string().nullish(),risk_signals:a.z.array(j),cautions:a.z.array(j),safe_indicators:a.z.array(j),price_analysis:re,safety_checklist:a.z.array(a.z.string()),safe_score:a.z.number(),recommendation:a.z.string(),emotional_support:a.z.string()}),se=a.z.object({id:a.z.string(),user_id:a.z.string().nullish(),input_text:a.z.string(),llm_analysis:ne,safe_score:a.z.number(),expert_advice:a.z.string().nullish(),expert_reviewed:a.z.boolean(),expert_reviewed_at:a.z.string().nullish(),expert_reviewed_by:a.z.string().nullish(),created_at:a.z.string(),updated_at:a.z.string()});class ae extends E.BaseCrudRepository{constructor(){super(...arguments),this.resource="trade-safety"}getDataSchema(){return se}}const le={safe:70,caution:40};exports.TRADE_SAFETY_NS=d.TRADE_SAFETY_NS;exports.tradeSafetyTranslations=d.tradeSafetyTranslations;exports.DetailedResult=W;exports.HomeHeroSection=te;exports.SAFETY_SCORE_THRESHOLDS=le;exports.TradeSafetyRepository=ae;
2
2
  //# sourceMappingURL=index.js.map