trade-safety 1.1.3 → 1.3.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.
Files changed (44) hide show
  1. package/dist/components/DetailedResult/AnalysisCard.d.ts +9 -0
  2. package/dist/components/DetailedResult/AnalysisCard.d.ts.map +1 -0
  3. package/dist/components/DetailedResult/PriceAnalysisSection.d.ts.map +1 -1
  4. package/dist/components/DetailedResult/RecommendationSection.d.ts +2 -3
  5. package/dist/components/DetailedResult/RecommendationSection.d.ts.map +1 -1
  6. package/dist/components/DetailedResult/SafetyChecklistSection.d.ts.map +1 -1
  7. package/dist/components/DetailedResult/SignalsSection.d.ts +8 -0
  8. package/dist/components/DetailedResult/SignalsSection.d.ts.map +1 -0
  9. package/dist/components/DetailedResult/TranslationSection.d.ts +1 -1
  10. package/dist/components/DetailedResult/TranslationSection.d.ts.map +1 -1
  11. package/dist/components/DetailedResult/index.d.ts +1 -4
  12. package/dist/components/DetailedResult/index.d.ts.map +1 -1
  13. package/dist/components/HomeHeroSection.d.ts +9 -0
  14. package/dist/components/HomeHeroSection.d.ts.map +1 -0
  15. package/dist/i18n/translations.d.ts +12 -0
  16. package/dist/i18n/translations.d.ts.map +1 -1
  17. package/dist/index.d.ts +3 -3
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +415 -648
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/locale.js +43 -43
  24. package/dist/locale.js.map +1 -1
  25. package/dist/locale.mjs +69 -69
  26. package/dist/repositories/TradeSafetyRepository.d.ts +27 -69
  27. package/dist/repositories/TradeSafetyRepository.d.ts.map +1 -1
  28. package/package.json +2 -1
  29. package/dist/components/DetailedResult/CautionsSection.d.ts +0 -7
  30. package/dist/components/DetailedResult/CautionsSection.d.ts.map +0 -1
  31. package/dist/components/DetailedResult/CompanionCtaSection.d.ts +0 -2
  32. package/dist/components/DetailedResult/CompanionCtaSection.d.ts.map +0 -1
  33. package/dist/components/DetailedResult/ExpertAdviceSection.d.ts +0 -6
  34. package/dist/components/DetailedResult/ExpertAdviceSection.d.ts.map +0 -1
  35. package/dist/components/DetailedResult/RiskScoreHero.d.ts +0 -6
  36. package/dist/components/DetailedResult/RiskScoreHero.d.ts.map +0 -1
  37. package/dist/components/DetailedResult/RiskSignalsSection.d.ts +0 -7
  38. package/dist/components/DetailedResult/RiskSignalsSection.d.ts.map +0 -1
  39. package/dist/components/DetailedResult/SafeIndicatorsSection.d.ts +0 -7
  40. package/dist/components/DetailedResult/SafeIndicatorsSection.d.ts.map +0 -1
  41. package/dist/components/QuickResultTeaser.d.ts +0 -8
  42. package/dist/components/QuickResultTeaser.d.ts.map +0 -1
  43. package/dist/components/RiskSignalCard.d.ts +0 -8
  44. package/dist/components/RiskSignalCard.d.ts.map +0 -1
@@ -0,0 +1,9 @@
1
+ interface AnalysisCardProps {
2
+ title?: string;
3
+ icon?: React.ReactNode;
4
+ variant?: "default" | "error" | "warning" | "success" | "info";
5
+ children: React.ReactNode;
6
+ }
7
+ export declare function AnalysisCard({ title, icon, variant, children, }: AnalysisCardProps): import("react").JSX.Element | null;
8
+ export {};
9
+ //# sourceMappingURL=AnalysisCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnalysisCard.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/AnalysisCard.tsx"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;IAC/D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAUD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,OAAmB,EACnB,QAAQ,GACT,EAAE,iBAAiB,sCAcnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"PriceAnalysisSection.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/PriceAnalysisSection.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,UAAU,yBAAyB;IACjC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,EAAE,yBAAyB,sCAmEvE"}
1
+ {"version":3,"file":"PriceAnalysisSection.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/PriceAnalysisSection.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIxC,UAAU,yBAAyB;IACjC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,EAAE,yBAAyB,sCAiCvE"}
@@ -1,7 +1,6 @@
1
1
  interface RecommendationSectionProps {
2
- recommendation: string;
3
- emotionalSupport: string;
2
+ recommendation?: string;
4
3
  }
5
- export declare function RecommendationSection({ recommendation, emotionalSupport, }: RecommendationSectionProps): import("react").JSX.Element;
4
+ export declare function RecommendationSection({ recommendation, }: RecommendationSectionProps): import("react").JSX.Element | null;
6
5
  export {};
7
6
  //# sourceMappingURL=RecommendationSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RecommendationSection.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/RecommendationSection.tsx"],"names":[],"mappings":"AAOA,UAAU,0BAA0B;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,qBAAqB,CAAC,EACpC,cAAc,EACd,gBAAgB,GACjB,EAAE,0BAA0B,+BA6B5B"}
1
+ {"version":3,"file":"RecommendationSection.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/RecommendationSection.tsx"],"names":[],"mappings":"AAQA,UAAU,0BAA0B;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,cAAc,GACf,EAAE,0BAA0B,sCAU5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"SafetyChecklistSection.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/SafetyChecklistSection.tsx"],"names":[],"mappings":"AAQA,UAAU,2BAA2B;IACnC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,2BAA2B,sCAuC5E"}
1
+ {"version":3,"file":"SafetyChecklistSection.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/SafetyChecklistSection.tsx"],"names":[],"mappings":"AASA,UAAU,2BAA2B;IACnC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,2BAA2B,sCAuB5E"}
@@ -0,0 +1,8 @@
1
+ import { RiskSignal } from '../../types';
2
+ interface SignalsSectionProps {
3
+ signals: RiskSignal[];
4
+ variant?: "error" | "warning" | "success";
5
+ }
6
+ export declare function SignalsSection({ signals, variant, }: SignalsSectionProps): import("react").JSX.Element | null;
7
+ export {};
8
+ //# sourceMappingURL=SignalsSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignalsSection.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/SignalsSection.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrC,UAAU,mBAAmB;IAC3B,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;CAC3C;AAcD,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,OAAiB,GAClB,EAAE,mBAAmB,sCA8BrB"}
@@ -2,6 +2,6 @@ interface TranslationSectionProps {
2
2
  translation?: string | null;
3
3
  nuance?: string | null;
4
4
  }
5
- export declare function TranslationSection({ translation, nuance, }: TranslationSectionProps): import("react").JSX.Element | null;
5
+ export declare function TranslationSection({ translation, nuance, }: TranslationSectionProps): import("react").JSX.Element;
6
6
  export {};
7
7
  //# sourceMappingURL=TranslationSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TranslationSection.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/TranslationSection.tsx"],"names":[],"mappings":"AAOA,UAAU,uBAAuB;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EACX,MAAM,GACP,EAAE,uBAAuB,sCAuCzB"}
1
+ {"version":3,"file":"TranslationSection.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/TranslationSection.tsx"],"names":[],"mappings":"AAQA,UAAU,uBAAuB;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EACX,MAAM,GACP,EAAE,uBAAuB,+BAoBzB"}
@@ -1,10 +1,7 @@
1
1
  import { TradeSafetyAnalysis } from '../../types';
2
2
  interface DetailedResultProps {
3
3
  analysis: TradeSafetyAnalysis;
4
- expertAdvice?: string | null;
5
- /** Set to true to show AI companion CTA (for external integrations) */
6
- showCompanionCta?: boolean;
7
4
  }
8
- export declare function DetailedResult({ analysis, expertAdvice, showCompanionCta, }: DetailedResultProps): import("react").JSX.Element;
5
+ export declare function DetailedResult({ analysis }: DetailedResultProps): import("react").JSX.Element;
9
6
  export {};
10
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DetailedResult/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAalD,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAmBD,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,YAAY,EACZ,gBAAwB,GACzB,EAAE,mBAAmB,+BAiFrB"}
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"}
@@ -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"}
@@ -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;
@@ -115,12 +117,14 @@ export declare const tradeSafetyTranslations: {
115
117
  title: string;
116
118
  subtitle: string;
117
119
  placeholder: string;
120
+ placeholderExample: string;
118
121
  advancedOptions: string;
119
122
  amountPlaceholder: string;
120
123
  checkSafety: string;
121
124
  analyzing: string;
122
125
  analyzingDescription: string;
123
126
  tryExample: string;
127
+ disclaimer: string;
124
128
  };
125
129
  features: {
126
130
  title: string;
@@ -206,12 +210,14 @@ export declare const tradeSafetyTranslations: {
206
210
  title: string;
207
211
  subtitle: string;
208
212
  placeholder: string;
213
+ placeholderExample: string;
209
214
  advancedOptions: string;
210
215
  amountPlaceholder: string;
211
216
  checkSafety: string;
212
217
  analyzing: string;
213
218
  analyzingDescription: string;
214
219
  tryExample: string;
220
+ disclaimer: string;
215
221
  };
216
222
  features: {
217
223
  title: string;
@@ -297,12 +303,14 @@ export declare const tradeSafetyTranslations: {
297
303
  title: string;
298
304
  subtitle: string;
299
305
  placeholder: string;
306
+ placeholderExample: string;
300
307
  advancedOptions: string;
301
308
  amountPlaceholder: string;
302
309
  checkSafety: string;
303
310
  analyzing: string;
304
311
  analyzingDescription: string;
305
312
  tryExample: string;
313
+ disclaimer: string;
306
314
  };
307
315
  features: {
308
316
  title: string;
@@ -388,12 +396,14 @@ export declare const tradeSafetyTranslations: {
388
396
  title: string;
389
397
  subtitle: string;
390
398
  placeholder: string;
399
+ placeholderExample: string;
391
400
  advancedOptions: string;
392
401
  amountPlaceholder: string;
393
402
  checkSafety: string;
394
403
  analyzing: string;
395
404
  analyzingDescription: string;
396
405
  tryExample: string;
406
+ disclaimer: string;
397
407
  };
398
408
  features: {
399
409
  title: string;
@@ -479,12 +489,14 @@ export declare const tradeSafetyTranslations: {
479
489
  title: string;
480
490
  subtitle: string;
481
491
  placeholder: string;
492
+ placeholderExample: string;
482
493
  advancedOptions: string;
483
494
  amountPlaceholder: string;
484
495
  checkSafety: string;
485
496
  analyzing: string;
486
497
  analyzingDescription: string;
487
498
  tryExample: string;
499
+ disclaimer: string;
488
500
  };
489
501
  features: {
490
502
  title: 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,10 +4,10 @@
4
4
  * AI-powered safety analysis for K-pop merchandise trading
5
5
  */
6
6
  export { DetailedResult } from './components/DetailedResult';
7
- export { QuickResultTeaser } from './components/QuickResultTeaser';
8
- export { RiskSignalCard } from './components/RiskSignalCard';
7
+ export { HomeHeroSection } from './components/HomeHeroSection';
8
+ export type { HomeHeroSectionProps } from './components/HomeHeroSection';
9
9
  export { TradeSafetyRepository } from './repositories';
10
- export type { TradeSafetyCheckRepositoryResponse, TradeSafetyCheckFullResponse, QuickCheckRepositoryResponse, } from './repositories/TradeSafetyRepository';
10
+ export type { TradeSafetyCheckRepositoryResponse } from './repositories/TradeSafetyRepository';
11
11
  export * from './types';
12
12
  export { TRADE_SAFETY_NS, tradeSafetyTranslations } from './i18n/translations';
13
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;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,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 e=require("react/jsx-runtime"),i=require("framer-motion"),o=require("react-i18next");require("i18next");require("i18next-resources-to-backend");const c=require("./locale.js"),b=require("react"),f=require("next/link"),j=require("@aioia/core"),l=require("zod");function w(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const a in s)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(s,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:()=>s[a]})}}return t.default=s,Object.freeze(t)}const n=w(b);function N({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.createElement("path",{fillRule:"evenodd",d:"M4.804 21.644A6.707 6.707 0 0 0 6 21.75a6.721 6.721 0 0 0 3.583-1.029c.774.182 1.584.279 2.417.279 5.322 0 9.75-3.97 9.75-9 0-5.03-4.428-9-9.75-9s-9.75 3.97-9.75 9c0 2.409 1.025 4.587 2.674 6.192.232.226.277.428.254.543a3.73 3.73 0 0 1-.814 1.686.75.75 0 0 0 .44 1.223ZM8.25 10.875a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25ZM10.875 12a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875-1.125a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25Z",clipRule:"evenodd"}))}const y=n.forwardRef(N);function R({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.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 _=n.forwardRef(R);function S({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.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 E=n.forwardRef(S);function z({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.createElement("path",{fillRule:"evenodd",d:"M7.502 6h7.128A3.375 3.375 0 0 1 18 9.375v9.375a3 3 0 0 0 3-3V6.108c0-1.505-1.125-2.811-2.664-2.94a48.972 48.972 0 0 0-.673-.05A3 3 0 0 0 15 1.5h-1.5a3 3 0 0 0-2.663 1.618c-.225.015-.45.032-.673.05C8.662 3.295 7.554 4.542 7.502 6ZM13.5 3A1.5 1.5 0 0 0 12 4.5h4.5A1.5 1.5 0 0 0 15 3h-1.5Z",clipRule:"evenodd"}),n.createElement("path",{fillRule:"evenodd",d:"M3 9.375C3 8.339 3.84 7.5 4.875 7.5h9.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-9.75A1.875 1.875 0 0 1 3 20.625V9.375Zm9.586 4.594a.75.75 0 0 0-1.172-.938l-2.476 3.096-.908-.907a.75.75 0 0 0-1.06 1.06l1.5 1.5a.75.75 0 0 0 1.116-.062l3-3.75Z",clipRule:"evenodd"}))}const T=n.forwardRef(z);function A({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.createElement("path",{d:"M10.464 8.746c.227-.18.497-.311.786-.394v2.795a2.252 2.252 0 0 1-.786-.393c-.394-.313-.546-.681-.546-1.004 0-.323.152-.691.546-1.004ZM12.75 15.662v-2.824c.347.085.664.228.921.421.427.32.579.686.579.991 0 .305-.152.671-.579.991a2.534 2.534 0 0 1-.921.42Z"}),n.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.25ZM12.75 6a.75.75 0 0 0-1.5 0v.816a3.836 3.836 0 0 0-1.72.756c-.712.566-1.112 1.35-1.112 2.178 0 .829.4 1.612 1.113 2.178.502.4 1.102.647 1.719.756v2.978a2.536 2.536 0 0 1-.921-.421l-.879-.66a.75.75 0 0 0-.9 1.2l.879.66c.533.4 1.169.645 1.821.75V18a.75.75 0 0 0 1.5 0v-.81a4.124 4.124 0 0 0 1.821-.749c.745-.559 1.179-1.344 1.179-2.191 0-.847-.434-1.632-1.179-2.191a4.122 4.122 0 0 0-1.821-.75V8.354c.29.082.559.213.786.393l.415.33a.75.75 0 0 0 .933-1.175l-.415-.33a3.836 3.836 0 0 0-1.719-.755V6Z",clipRule:"evenodd"}))}const k=n.forwardRef(A);function C({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 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 Z=n.forwardRef(C);function M({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.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 u=n.forwardRef(M);function F({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.createElement("path",{d:"m11.645 20.91-.007-.003-.022-.012a15.247 15.247 0 0 1-.383-.218 25.18 25.18 0 0 1-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0 1 12 5.052 5.5 5.5 0 0 1 16.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 0 1-4.244 3.17 15.247 15.247 0 0 1-.383.219l-.022.012-.007.004-.003.001a.752.752 0 0 1-.704 0l-.003-.001Z"}))}const D=n.forwardRef(F);function O({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const $=n.forwardRef(O);function B({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.createElement("path",{fillRule:"evenodd",d:"M9 2.25a.75.75 0 0 1 .75.75v1.506a49.384 49.384 0 0 1 5.343.371.75.75 0 1 1-.186 1.489c-.66-.083-1.323-.151-1.99-.206a18.67 18.67 0 0 1-2.97 6.323c.318.384.65.753 1 1.107a.75.75 0 0 1-1.07 1.052A18.902 18.902 0 0 1 9 13.687a18.823 18.823 0 0 1-5.656 4.482.75.75 0 0 1-.688-1.333 17.323 17.323 0 0 0 5.396-4.353A18.72 18.72 0 0 1 5.89 8.598a.75.75 0 0 1 1.388-.568A17.21 17.21 0 0 0 9 11.224a17.168 17.168 0 0 0 2.391-5.165 48.04 48.04 0 0 0-8.298.307.75.75 0 0 1-.186-1.489 49.159 49.159 0 0 1 5.343-.371V3A.75.75 0 0 1 9 2.25ZM15.75 9a.75.75 0 0 1 .68.433l5.25 11.25a.75.75 0 1 1-1.36.634l-1.198-2.567h-6.744l-1.198 2.567a.75.75 0 0 1-1.36-.634l5.25-11.25A.75.75 0 0 1 15.75 9Zm-2.672 8.25h5.344l-2.672-5.726-2.672 5.726Z",clipRule:"evenodd"}))}const I=n.forwardRef(B);function q({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.createElement("path",{d:"M12 .75a8.25 8.25 0 0 0-4.135 15.39c.686.398 1.115 1.008 1.134 1.623a.75.75 0 0 0 .577.706c.352.083.71.148 1.074.195.323.041.6-.218.6-.544v-4.661a6.714 6.714 0 0 1-.937-.171.75.75 0 1 1 .374-1.453 5.261 5.261 0 0 0 2.626 0 .75.75 0 1 1 .374 1.452 6.712 6.712 0 0 1-.937.172v4.66c0 .327.277.586.6.545.364-.047.722-.112 1.074-.195a.75.75 0 0 0 .577-.706c.02-.615.448-1.225 1.134-1.623A8.25 8.25 0 0 0 12 .75Z"}),n.createElement("path",{fillRule:"evenodd",d:"M9.013 19.9a.75.75 0 0 1 .877-.597 11.319 11.319 0 0 0 4.22 0 .75.75 0 1 1 .28 1.473 12.819 12.819 0 0 1-4.78 0 .75.75 0 0 1-.597-.876ZM9.754 22.344a.75.75 0 0 1 .824-.668 13.682 13.682 0 0 0 2.844 0 .75.75 0 1 1 .156 1.492 15.156 15.156 0 0 1-3.156 0 .75.75 0 0 1-.668-.824Z",clipRule:"evenodd"}))}const Y=n.forwardRef(q);function H({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.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 p=n.forwardRef(H);function L({title:s,titleId:t,...a},r){return n.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:r,"aria-labelledby":t},a),s?n.createElement("title",{id:t},s):null,n.createElement("path",{fillRule:"evenodd",d:"M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z",clipRule:"evenodd"}))}const V=n.forwardRef(L);function v(s){var t,a,r="";if(typeof s=="string"||typeof s=="number")r+=s;else if(typeof s=="object")if(Array.isArray(s)){var d=s.length;for(t=0;t<d;t++)s[t]&&(a=v(s[t]))&&(r&&(r+=" "),r+=a)}else for(a in s)s[a]&&(r&&(r+=" "),r+=a);return r}function x(){for(var s,t,a=0,r="",d=arguments.length;a<d;a++)(s=arguments[a])&&(t=v(s))&&(r&&(r+=" "),r+=t);return r}const P={error:"bg-error/10 border-error/30",warning:"bg-warning/10 border-warning/30",success:"bg-success/10 border-success/30"},U={error:"text-error",warning:"text-warning",success:"text-success"},K={high:Z,medium:u,low:$};function h({signal:s,variant:t="error"}){const{t:a}=o.useTranslation(c.TRADE_SAFETY_NS),r=K[s.severity];return e.jsx("div",{className:x("card border-2 backdrop-blur-sm",P[t]),children:e.jsx("div",{className:"card-body",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx(r,{className:x("mt-1 size-8 shrink-0",U[t])}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"card-title text-xl",children:s.title}),e.jsx("p",{className:"mt-2 text-base-content/70",children:s.description}),e.jsxs("div",{className:"mt-4 rounded-lg bg-base-100/50 p-4",children:[e.jsxs("p",{className:"mb-2 text-sm font-semibold",children:["💡 ",a("result.whatToDo")]}),e.jsx("p",{className:"text-sm",children:s.what_to_do})]})]})]})})})}function Q({cautions:s}){const{t}=o.useTranslation(c.TRADE_SAFETY_NS);return s.length===0?null:e.jsxs("section",{children:[e.jsxs("h3",{className:"mb-6 flex items-center gap-3 text-3xl font-bold",children:[e.jsx(u,{className:"size-10 text-warning"}),t("result.cautions")]}),e.jsx("div",{className:"space-y-4",children:s.map((a,r)=>e.jsx(i.motion.div,{initial:{x:-50,opacity:0},animate:{x:0,opacity:1},transition:{delay:r*.1},whileHover:{scale:1.02,x:10},children:e.jsx(h,{signal:a,variant:"warning"})},r))})]})}function W(){const{t:s,i18n:t}=o.useTranslation(c.TRADE_SAFETY_NS),a=t.language;return e.jsx("section",{className:"hero min-h-[30vh] rounded-3xl bg-primary text-primary-content",children:e.jsx("div",{className:"hero-content text-center",children:e.jsxs("div",{children:[e.jsx(y,{className:"mx-auto mb-6 size-20"}),e.jsx("h3",{className:"mb-4 text-4xl font-bold",children:s("result.companionCta.title")}),e.jsx("p",{className:"mb-8 max-w-2xl text-xl",children:s("result.companionCta.description")}),e.jsx(f,{href:`/${a}/companions`,children:e.jsx(i.motion.button,{whileHover:{scale:1.1},whileTap:{scale:.95},className:"btn btn-lg bg-base-100 text-primary hover:bg-base-200",children:s("result.companionCta.button")})})]})})})}function G({advice:s}){const{t}=o.useTranslation(c.TRADE_SAFETY_NS);return e.jsx(i.motion.section,{whileHover:{scale:1.02},className:"card bg-secondary text-secondary-content shadow-xl",children:e.jsxs("div",{className:"card-body",children:[e.jsxs("div",{className:"mb-6 flex items-center gap-4",children:[e.jsx("div",{className:"avatar placeholder",children:e.jsx("div",{className:"w-16 rounded-full bg-primary text-primary-content",children:e.jsx(V,{className:"size-8"})})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-2xl font-bold",children:t("result.expertAdvice")}),e.jsx("p",{className:"opacity-80",children:t("result.expertName")})]})]}),e.jsx("div",{className:"prose max-w-none",children:e.jsx("p",{className:"whitespace-pre-wrap text-lg",children:s})})]})})}function J({data:s}){const{t,i18n:a}=o.useTranslation(c.TRADE_SAFETY_NS);return s?e.jsxs("section",{children:[e.jsxs("h3",{className:"mb-6 flex items-center gap-3 text-3xl font-bold",children:[e.jsx(k,{className:"size-10 text-secondary"}),t("result.priceAnalysis")]}),e.jsx("div",{className:"card bg-base-200 shadow-xl",children:e.jsxs("div",{className:"card-body",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.market_price_range&&e.jsxs("div",{children:[e.jsx("h4",{className:"mb-2 text-lg font-semibold",children:t("result.marketPrice")}),e.jsx("p",{className:"text-2xl font-bold",children:s.market_price_range})]}),s.offered_price&&e.jsxs("div",{children:[e.jsx("h4",{className:"mb-2 text-lg font-semibold",children:t("result.offeredPrice")}),e.jsx("p",{className:"text-2xl font-bold text-primary",children:new Intl.NumberFormat(a.language,{style:"currency",currency:s.currency||"USD"}).format(s.offered_price)})]})]}),e.jsxs("div",{className:"mt-6 rounded-lg bg-base-100 p-4",children:[e.jsx("h4",{className:"mb-2 text-lg font-semibold",children:t("result.priceAssessment")}),e.jsx("p",{className:"text-base-content/70",children:s.price_assessment})]}),s.warnings.length>0&&e.jsxs("div",{className:"mt-4",children:[e.jsxs("h4",{className:"mb-2 flex items-center gap-2 text-lg font-semibold text-warning",children:[e.jsx(u,{className:"size-6"}),t("result.priceWarnings")]}),e.jsx("ul",{className:"list-inside list-disc space-y-1",children:s.warnings.map((r,d)=>e.jsx("li",{className:"text-base-content/70",children:r},d))})]})]})})]}):null}function X({recommendation:s,emotionalSupport:t}){const{t:a}=o.useTranslation(c.TRADE_SAFETY_NS);return e.jsxs("section",{children:[e.jsxs("h3",{className:"mb-6 flex items-center gap-3 text-3xl font-bold",children:[e.jsx(Y,{className:"size-10 text-warning"}),a("result.recommendation")]}),e.jsx("div",{className:"card bg-base-200 shadow-xl",children:e.jsxs("div",{className:"card-body",children:[e.jsx("div",{className:"prose max-w-none",children:e.jsx("p",{className:"whitespace-pre-wrap text-lg text-base-content/70",children:s})}),e.jsx("div",{className:"divider"}),e.jsx("div",{className:"rounded-lg bg-base-100 p-4",children:e.jsxs("p",{className:"flex items-center gap-2 text-lg font-medium",children:[e.jsx(D,{className:"size-6 text-info"})," ",t]})})]})})]})}function ee(s){return s>=70?{level:"high",color:"error",Icon:p}:s>=40?{level:"medium",color:"warning",Icon:u}:{level:"low",color:"success",Icon:_}}function se({score:s}){const{t}=o.useTranslation(c.TRADE_SAFETY_NS),a=ee(s),{Icon:r}=a,d={error:"text-error",warning:"text-warning",success:"text-success"};return e.jsx("div",{className:"hero min-h-[40vh] rounded-3xl bg-base-200",children:e.jsx("div",{className:"hero-content text-center",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-4",children:e.jsx(r,{className:x("size-32",d[a.color])})}),e.jsx("h2",{className:"mb-4 text-5xl font-bold",children:t(`result.riskLevel.${a.level}.title`)}),e.jsx("div",{className:"mx-auto w-64",children:e.jsx("div",{className:x("radial-progress",d[a.color]),style:{"--value":s,"--size":"12rem","--thickness":"1rem"},role:"progressbar",children:e.jsx("span",{className:"text-5xl font-bold",children:s})})}),e.jsx("p",{className:"mt-6 max-w-lg text-xl text-base-content/70",children:t(`result.riskLevel.${a.level}.message`)})]})})})}function te({signals:s}){const{t}=o.useTranslation(c.TRADE_SAFETY_NS);return s.length===0?null:e.jsxs("section",{children:[e.jsxs("h3",{className:"mb-6 flex items-center gap-3 text-3xl font-bold",children:[e.jsx(p,{className:"size-10 text-error"}),t("result.riskSignals")]}),e.jsx("div",{className:"space-y-4",children:s.map((a,r)=>e.jsx(i.motion.div,{initial:{x:-50,opacity:0},animate:{x:0,opacity:1},transition:{delay:r*.1},whileHover:{scale:1.02,x:10},children:e.jsx(h,{signal:a,variant:"error"})},r))})]})}function ae({indicators:s}){const{t}=o.useTranslation(c.TRADE_SAFETY_NS);return s.length===0?null:e.jsxs("section",{children:[e.jsxs("h3",{className:"mb-6 flex items-center gap-3 text-3xl font-bold",children:[e.jsx(E,{className:"size-10 text-success"}),t("result.safeIndicators")]}),e.jsx("div",{className:"space-y-4",children:s.map((a,r)=>e.jsx(i.motion.div,{initial:{x:-50,opacity:0},animate:{x:0,opacity:1},transition:{delay:r*.1},whileHover:{scale:1.02,x:10},children:e.jsx(h,{signal:a,variant:"success"})},r))})]})}function re({items:s}){const{t}=o.useTranslation(c.TRADE_SAFETY_NS);return s.length===0?null:e.jsxs("section",{children:[e.jsxs("h3",{className:"mb-6 flex items-center gap-3 text-3xl font-bold",children:[e.jsx(T,{className:"size-10 text-primary"}),t("result.safetyChecklist")]}),e.jsx("div",{className:"card border-2 border-primary/30 bg-base-200",children:e.jsxs("div",{className:"card-body",children:[e.jsx("p",{className:"mb-6 text-lg text-base-content/70",children:t("result.checklistDescription")}),e.jsx("div",{className:"space-y-3",children:s.map((a,r)=>e.jsxs(i.motion.label,{initial:{x:-20,opacity:0},animate:{x:0,opacity:1},transition:{delay:r*.08},className:"flex cursor-pointer items-start gap-3 rounded-lg p-3 hover:bg-base-100/30",children:[e.jsx("input",{type:"checkbox",className:"checkbox-primary checkbox mt-1"}),e.jsx("span",{className:"text-lg",children:a})]},r))})]})})]})}function ne({translation:s,nuance:t}){const{t:a}=o.useTranslation(c.TRADE_SAFETY_NS);return!s&&!t?null:e.jsxs("section",{children:[e.jsxs("h3",{className:"mb-6 flex items-center gap-3 text-3xl font-bold",children:[e.jsx(I,{className:"size-10 text-primary"}),a("result.translation")]}),e.jsx("div",{className:"card bg-base-200 shadow-xl",children:e.jsxs("div",{className:"card-body",children:[s&&e.jsxs("div",{className:"mb-4",children:[e.jsx("h4",{className:"mb-2 text-lg font-semibold",children:a("result.translationTitle")}),e.jsx("p",{className:"whitespace-pre-wrap text-base-content/70",children:s})]}),t&&e.jsxs("div",{children:[e.jsx("h4",{className:"mb-2 text-lg font-semibold",children:a("result.nuanceTitle")}),e.jsx("p",{className:"whitespace-pre-wrap text-base-content/70",children:t})]})]})})]})}const m={initial:{y:40,opacity:0},animate:{y:0,opacity:1,transition:{duration:.6}}},le={animate:{transition:{staggerChildren:.15}}};function ie({analysis:s,expertAdvice:t,showCompanionCta:a=!1}){return e.jsxs(i.motion.div,{variants:le,initial:"initial",animate:"animate",className:"mx-auto max-w-5xl space-y-12",children:[e.jsx(i.motion.div,{variants:m,children:e.jsx(se,{score:s.risk_score})}),(s.translation||s.nuance_explanation)&&e.jsx(i.motion.div,{variants:m,children:e.jsx(ne,{translation:s.translation,nuance:s.nuance_explanation})}),s.risk_signals.length>0&&e.jsx(i.motion.div,{variants:m,children:e.jsx(te,{signals:s.risk_signals})}),s.cautions.length>0&&e.jsx(i.motion.div,{variants:m,children:e.jsx(Q,{cautions:s.cautions})}),s.safe_indicators.length>0&&e.jsx(i.motion.div,{variants:m,children:e.jsx(ae,{indicators:s.safe_indicators})}),s.price_analysis&&e.jsx(i.motion.div,{variants:m,children:e.jsx(J,{data:s.price_analysis})}),s.safety_checklist.length>0&&e.jsx(i.motion.div,{variants:m,children:e.jsx(re,{items:s.safety_checklist})}),t&&e.jsx(i.motion.div,{variants:m,children:e.jsx(G,{advice:t})}),e.jsx(i.motion.div,{variants:m,children:e.jsx(X,{recommendation:s.recommendation,emotionalSupport:s.emotional_support})}),a&&e.jsx(i.motion.div,{variants:m,children:e.jsx(W,{})})]})}function ce({summary:s,checkId:t}){const{t:a,i18n:r}=o.useTranslation(c.TRADE_SAFETY_NS),d=r.language;return e.jsxs("div",{className:"mx-auto max-w-2xl",children:[e.jsx("h1",{className:"mb-8 text-center text-3xl font-bold",children:a("result.title")}),e.jsxs("div",{className:"mb-8 grid grid-cols-1 gap-4 md:grid-cols-3",children:[e.jsx("div",{className:"card bg-error/10",children:e.jsxs("div",{className:"card-body items-center text-center",children:[e.jsx("h3",{className:"text-4xl font-bold text-error",children:s.risk_signals_count}),e.jsx("p",{className:"text-sm",children:a("result.riskSignals")})]})}),e.jsx("div",{className:"card bg-warning/10",children:e.jsxs("div",{className:"card-body items-center text-center",children:[e.jsx("h3",{className:"text-4xl font-bold text-warning",children:s.cautions_count}),e.jsx("p",{className:"text-sm",children:a("result.cautions")})]})}),e.jsx("div",{className:"card bg-success/10",children:e.jsxs("div",{className:"card-body items-center text-center",children:[e.jsx("h3",{className:"text-4xl font-bold text-success",children:s.safe_indicators_count}),e.jsx("p",{className:"text-sm",children:a("result.safeIndicators")})]})})]}),e.jsx("div",{className:"card bg-base-200 shadow-xl",children:e.jsxs("div",{className:"card-body items-center text-center",children:[e.jsx("h2",{className:"card-title text-2xl",children:a("result.signupRequired")}),e.jsx("p",{className:"mb-4 text-base-content/70",children:a("result.signupMessage")}),e.jsx(f,{href:`/${d}/login?callbackUrl=${encodeURIComponent(`/${d}/trade-safety/result/${t}`)}`,className:"btn btn-primary",children:a("login")})]})})]})}const g=l.z.object({category:l.z.enum(["payment","seller","platform","price","content"]),severity:l.z.enum(["high","medium","low"]),title:l.z.string(),description:l.z.string(),what_to_do:l.z.string()}),oe=l.z.object({market_price_range:l.z.string().nullish(),offered_price:l.z.number().nullish(),currency:l.z.string().nullish(),price_assessment:l.z.string(),warnings:l.z.array(l.z.string())}),de=l.z.object({translation:l.z.string().nullish(),nuance_explanation:l.z.string().nullish(),risk_signals:l.z.array(g),cautions:l.z.array(g),safe_indicators:l.z.array(g),price_analysis:oe,safety_checklist:l.z.array(l.z.string()),risk_score:l.z.number(),recommendation:l.z.string(),emotional_support:l.z.string()}),me=l.z.object({risk_signals_count:l.z.number(),cautions_count:l.z.number(),safe_indicators_count:l.z.number()}),xe=l.z.object({id:l.z.string(),user_id:l.z.string().nullish(),input_text:l.z.string(),llm_analysis:de,risk_score:l.z.number(),expert_advice:l.z.string().nullish(),expert_reviewed:l.z.boolean(),expert_reviewed_at:l.z.string().nullish(),expert_reviewed_by:l.z.string().nullish(),created_at:l.z.string(),updated_at:l.z.string()}),ue=l.z.union([xe,l.z.object({id:l.z.string(),quick_summary:me,signup_required:l.z.literal(!0)})]);class he extends j.BaseCrudRepository{constructor(){super(...arguments),this.resource="trade-safety"}getDataSchema(){return ue}}const ge={high:70,medium:40};exports.TRADE_SAFETY_NS=c.TRADE_SAFETY_NS;exports.tradeSafetyTranslations=c.tradeSafetyTranslations;exports.DetailedResult=ie;exports.QuickResultTeaser=ce;exports.RISK_SCORE_THRESHOLDS=ge;exports.RiskSignalCard=h;exports.TradeSafetyRepository=he;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),f=require("react-i18next");require("i18next");require("i18next-resources-to-backend");const u=require("./locale.js"),d=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 r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=O(d);function w(e){var t,r,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]&&(r=w(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function _(){for(var e,t,r=0,s="",l=arguments.length;r<l;r++)(e=arguments[r])&&(t=w(e))&&(s&&(s+=" "),s+=t);return s}const R={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:r="default",children:s}){return s?n.jsxs("div",{className:_("rounded-lg border p-6",R[r]),children:[e&&n.jsxs("h2",{className:"mb-2 flex items-center gap-2 font-bold",children:[e,t]}),s]}):null}function T({data:e}){const{t,i18n:r}=f.useTranslation(u.TRADE_SAFETY_NS);return e?n.jsxs(h,{title:t("result.priceAnalysis"),children:[e.market_price_range&&n.jsxs("div",{className:"mb-2",children:[n.jsx("h3",{className:"text-sm font-bold",children:t("result.marketPrice")}),n.jsx("p",{className:"text-xs",children:e.market_price_range})]}),e.offered_price&&n.jsxs("div",{className:"mb-2",children:[n.jsx("h3",{className:"text-sm font-bold",children:t("result.offeredPrice")}),n.jsx("p",{className:"text-xs",children:new Intl.NumberFormat(r.language,{style:"currency",currency:e.currency||"USD"}).format(e.offered_price)})]}),e.price_assessment&&n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-bold",children:t("result.priceAssessment")}),n.jsx("p",{className:"text-xs",children:e.price_assessment})]})]}):null}function A({recommendation:e}){const{t}=f.useTranslation(u.TRADE_SAFETY_NS);return e?n.jsx(h,{title:t("result.recommendation"),children:n.jsx("p",{className:"text-xs",children:e})}):null}function k({title:e,titleId:t,...r},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},r),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 P=c.forwardRef(k);function C({title:e,titleId:t,...r},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},r),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 D=c.forwardRef(C);function F({title:e,titleId:t,...r},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},r),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 M=c.forwardRef(F);function H({title:e,titleId:t,...r},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},r),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 Z=c.forwardRef(H);function I({items:e}){const{t}=f.useTranslation(u.TRADE_SAFETY_NS);return e.length===0?null:n.jsxs("div",{className:"mb-4",children:[n.jsxs("h2",{className:"flex items-center gap-1 py-4 font-bold",children:[t("result.safetyChecklist")," ",n.jsx(P,{className:"size-6"})]}),n.jsx(h,{variant:"info",children:e.map((r,s)=>n.jsxs("label",{className:"label w-fit cursor-pointer gap-2",children:[n.jsx("input",{type:"checkbox",className:"checkbox rounded-full [--chkbg:theme(colors.neutral)] [--chkfg:theme(colors.neutral-content)]"}),n.jsx("span",{className:"label-text",children:r})]},s))})]})}const B={error:M,warning:D,success:Z},L={error:"result.riskSignals",warning:"result.cautions",success:"result.safeIndicators"};function g({signals:e,variant:t="error"}){const{t:r}=f.useTranslation(u.TRADE_SAFETY_NS);if(e.length===0)return null;const s=B[t];return n.jsxs("div",{className:"mb-4",children:[n.jsxs("h2",{className:"flex items-center gap-1 py-4 font-bold",children:[r(L[t])," ",n.jsx(s,{className:"size-6"})]}),n.jsx("div",{className:"space-y-3",children:e.map((l,i)=>n.jsx(h,{variant:t,children:n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-bold",children:l.title}),n.jsx("p",{className:"text-xs",children:l.description})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-bold",children:r("result.whatToDo")}),n.jsx("p",{className:"text-xs",children:l.what_to_do})]})]})},i))})]})}function q({translation:e,nuance:t}){const{t:r}=f.useTranslation(u.TRADE_SAFETY_NS);return n.jsxs(h,{title:r("result.translation"),children:[e&&n.jsxs("div",{className:"mb-2",children:[n.jsx("h3",{className:"text-sm font-bold",children:r("result.translationTitle")}),n.jsx("p",{className:"text-xs",children:e})]}),t&&n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-bold",children:r("result.nuanceTitle")}),n.jsx("p",{className:"text-xs",children:t})]})]})}function Y({analysis:e}){return n.jsxs("div",{children:[n.jsxs("div",{className:"mb-4 flex flex-col gap-4",children:[(e.translation||e.nuance_explanation)&&n.jsx(q,{translation:e.translation,nuance:e.nuance_explanation}),e.price_analysis&&n.jsx(T,{data:e.price_analysis}),e.recommendation&&n.jsx(A,{recommendation:e.recommendation})]}),e.risk_signals.length>0&&n.jsx(g,{signals:e.risk_signals,variant:"error"}),e.cautions.length>0&&n.jsx(g,{signals:e.cautions,variant:"warning"}),e.safe_indicators.length>0&&n.jsx(g,{signals:e.safe_indicators,variant:"success"}),e.safety_checklist.length>0&&n.jsx(I,{items:e.safety_checklist})]})}var N={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},v=d.createContext&&d.createContext(N),K=["attr","size","title"];function W(e,t){if(e==null)return{};var r=$(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)&&(r[s]=e[s])}return r}function $(e,t){if(e==null)return{};var r={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;r[s]=e[s]}return r}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},b.apply(this,arguments)}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),r.push.apply(r,s)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(s){V(e,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))})}return e}function V(e,t,r){return t=X(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X(e){var t=G(e,"string");return typeof t=="symbol"?t:t+""}function G(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var s=r.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,r)=>d.createElement(t.tag,p({key:r},t.attr),S(t.child)))}function z(e){return t=>d.createElement(U,b({attr:p({},e.attr)},t),S(e.child))}function U(e){var t=r=>{var{attr:s,size:l,title:i}=e,x=W(e,K),m=l||r.size||"1em",o;return r.className&&(o=r.className),e.className&&(o=(o?o+" ":"")+e.className),d.createElement("svg",b({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,s,x,{className:o,style:p(p({color:e.color||r.color},r.style),e.style),height:m,width:m,xmlns:"http://www.w3.org/2000/svg"}),i&&d.createElement("title",null,i),e.children)};return v!==void 0?d.createElement(v.Consumer,null,r=>t(r)):t(N)}function J(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 Q(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 ee({value:e,onChange:t,onSubmit:r,isLoading:s,error:l}){const{t:i}=f.useTranslation(u.TRADE_SAFETY_NS),x=s?n.jsx("span",{className:"loading loading-spinner loading-sm"}):i("hero.checkSafety"),m=s||!e.trim();return n.jsx("div",{className:"flex w-full flex-col items-center justify-center",children:n.jsxs("div",{className:"w-full lg:max-w-[720px]",children:[n.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")}),n.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")}),n.jsxs("div",{className:_("mb-4",!l&&"sm:mb-8 md:mb-12"),children:[n.jsxs("div",{className:"relative hidden lg:block",children:[n.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"&&!m&&r()}}),n.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:r,disabled:m,children:x})]}),n.jsx("div",{className:"block lg:hidden",children:n.jsxs("div",{className:"relative h-[400px] w-full overflow-hidden rounded-xl border border-base-300 bg-base-100",children:[!e&&n.jsx("div",{className:"pointer-events-none absolute inset-0 overflow-hidden p-5 pb-24 text-base text-base-300","aria-hidden":"true",children:n.jsxs("div",{className:"whitespace-pre-line leading-relaxed",children:[n.jsx("p",{className:"mb-4 text-base-300",children:i("hero.placeholder")}),i("hero.placeholderExample")]})}),n.jsx("div",{className:"absolute inset-0 overflow-hidden pb-24",children:n.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:""})}),n.jsx("div",{className:"absolute inset-x-4 bottom-4 z-10",children:n.jsx("button",{className:"btn btn-neutral h-16 w-full text-base font-medium text-neutral-content",onClick:r,disabled:m,children:x})})]})})]}),l&&n.jsx("div",{className:"alert alert-error mb-6 flex items-center gap-2 text-sm",children:n.jsx("span",{children:l})}),n.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")}),n.jsxs("div",{className:"flex items-center justify-start gap-6 sm:justify-center",children:[n.jsx("a",{href:"https://x.com",target:"_blank",rel:"noopener noreferrer","aria-label":"X",children:n.jsx(Q,{className:"size-6 text-base-content transition-colors hover:text-base-content/70"})}),n.jsx("a",{href:"https://reddit.com",target:"_blank",rel:"noopener noreferrer","aria-label":"Reddit",children:n.jsx(J,{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()}),te=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())}),re=a.z.object({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:te,safety_checklist:a.z.array(a.z.string()),risk_score:a.z.number(),recommendation:a.z.string(),emotional_support:a.z.string()}),ne=a.z.object({id:a.z.string(),user_id:a.z.string().nullish(),input_text:a.z.string(),llm_analysis:re,risk_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 se extends E.BaseCrudRepository{constructor(){super(...arguments),this.resource="trade-safety"}getDataSchema(){return ne}}const ae={high:70,medium:40};exports.TRADE_SAFETY_NS=u.TRADE_SAFETY_NS;exports.tradeSafetyTranslations=u.tradeSafetyTranslations;exports.DetailedResult=Y;exports.HomeHeroSection=ee;exports.RISK_SCORE_THRESHOLDS=ae;exports.TradeSafetyRepository=se;
2
2
  //# sourceMappingURL=index.js.map