@primestyleai/tryon 5.10.195 → 5.10.196

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,28 +1,28 @@
1
1
  "use client";
2
- const p = "ps_session";
3
- const A = "ps_mem_";
4
- let E = null;
5
- function b() {
2
+ const f = "ps_session";
3
+ const U = "ps_mem_";
4
+ let I = null;
5
+ function w() {
6
6
  try {
7
7
  return typeof window < "u" && typeof window.localStorage < "u";
8
8
  } catch {
9
9
  return !1;
10
10
  }
11
11
  }
12
- function T() {
12
+ function C() {
13
13
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
14
14
  return crypto.randomUUID();
15
- const t = "0123456789abcdef";
16
- let e = A;
17
- for (let o = 0; o < 32; o++) e += t[Math.floor(Math.random() * 16)];
15
+ const o = "0123456789abcdef";
16
+ let e = U;
17
+ for (let t = 0; t < 32; t++) e += o[Math.floor(Math.random() * 16)];
18
18
  return e;
19
19
  }
20
- function I() {
21
- if (!b()) return E;
20
+ function z() {
21
+ if (!w()) return I;
22
22
  try {
23
- const t = window.localStorage.getItem(p);
24
- if (!t) return null;
25
- const e = JSON.parse(t);
23
+ const o = window.localStorage.getItem(f);
24
+ if (!o) return null;
25
+ const e = JSON.parse(o);
26
26
  return typeof e.id != "string" || typeof e.issuedAt != "number" ? null : {
27
27
  id: e.id,
28
28
  issuedAt: e.issuedAt,
@@ -32,182 +32,207 @@ function I() {
32
32
  return null;
33
33
  }
34
34
  }
35
- function f(t) {
36
- if (E = t, !!b())
35
+ function P(o) {
36
+ if (I = o, !!w())
37
37
  try {
38
- window.localStorage.setItem(p, JSON.stringify(t));
38
+ window.localStorage.setItem(f, JSON.stringify(o));
39
39
  } catch {
40
40
  }
41
41
  }
42
- function S(t) {
42
+ function A(o) {
43
43
  if (!(typeof window > "u"))
44
44
  try {
45
45
  const e = window.clarity;
46
- typeof e == "function" && e("set", p, t);
46
+ typeof e == "function" && e("set", f, o);
47
47
  } catch {
48
48
  }
49
49
  }
50
- function c() {
51
- const t = Date.now(), e = I();
52
- if (e && t - e.lastSeenAt < 2592e6)
53
- return t - e.lastSeenAt > 5 * 60 * 1e3 && f({ ...e, lastSeenAt: t }), S(e.id), e.id;
54
- const o = { id: T(), issuedAt: t, lastSeenAt: t };
55
- return f(o), S(o.id), o.id;
56
- }
57
50
  function m() {
51
+ const o = Date.now(), e = z();
52
+ if (e && o - e.lastSeenAt < 2592e6)
53
+ return o - e.lastSeenAt > 5 * 60 * 1e3 && P({ ...e, lastSeenAt: o }), A(e.id), e.id;
54
+ const t = { id: C(), issuedAt: o, lastSeenAt: o };
55
+ return P(t), A(t.id), t.id;
56
+ }
57
+ function g() {
58
58
  if (typeof navigator > "u") return null;
59
- const t = (navigator.userAgent || "").toLowerCase();
60
- return /ipad|tablet|(android(?!.*mobile))/.test(t) ? "tablet" : /mobile|android|iphone|ipod|blackberry|iemobile|opera mini/.test(t) ? "mobile" : "desktop";
59
+ const o = (navigator.userAgent || "").toLowerCase();
60
+ return /ipad|tablet|(android(?!.*mobile))/.test(o) ? "tablet" : /mobile|android|iphone|ipod|blackberry|iemobile|opera mini/.test(o) ? "mobile" : "desktop";
61
+ }
62
+ const D = "http://localhost:4000";
63
+ function G(o) {
64
+ return /\/apps\/primestyle(?:\/|$)/.test(o) || /\/api\/proxy(?:\/|$)/.test(o);
65
+ }
66
+ function B() {
67
+ if (typeof window > "u") return null;
68
+ const o = window;
69
+ if (o.Shopify?.shop) return o.Shopify.shop;
70
+ const e = window.location.hostname;
71
+ return e.endsWith(".myshopify.com") ? e : null;
61
72
  }
62
- const w = "http://localhost:4000";
63
- class Y {
64
- constructor(e, o) {
65
- this.apiKey = e || void 0, this.baseUrl = (o || w).replace(/\/+$/, "");
73
+ class ee {
74
+ constructor(e, t) {
75
+ this.apiKey = e || void 0, this.baseUrl = (t || D).replace(/\/+$/, "");
66
76
  }
67
77
  get headers() {
68
- return v(this.apiKey);
78
+ return T(this.apiKey);
69
79
  }
70
- async submitTryOn(e, o, a, s, r) {
80
+ async submitTryOn(e, t, a, s, r) {
71
81
  const i = {
72
- garmentImage: o,
82
+ garmentImage: t,
73
83
  // Attribution fields — backend logs these into the TryOnEvent collection
74
84
  // so non-technical operators can answer "which products are being tried on
75
85
  // and by how many customers". Safe fallbacks when absent.
76
- sessionId: c(),
77
- deviceHint: m()
86
+ sessionId: m(),
87
+ deviceHint: g()
78
88
  };
79
- if (r?.modelImageId && (i.modelImageId = r.modelImageId), e && (i.modelImage = e), a && a.length > 0 && (i.fitInfo = a), s && s !== "apparel" && (i.category = s), r?.productId && (i.productId = r.productId), r?.productTitle && (i.productTitle = r.productTitle), r?.productCategory && (i.productCategory = r.productCategory), r?.productSubcategory && (i.productSubcategory = r.productSubcategory), r?.productFitType && (i.productFitType = r.productFitType), r?.productType && (i.productType = r.productType), r?.productTags?.length && (i.productTags = r.productTags), r?.productDescription && (i.productDescription = r.productDescription), r?.productMaterial && (i.productMaterial = r.productMaterial), r?.garmentDetailImage && r.garmentDetailImage !== o && (i.garmentDetailImage = r.garmentDetailImage), r?.silhouetteContext && (i.silhouetteContext = r.silhouetteContext), r?.editFromPrevious && (i.editFromPrevious = !0), a && a.length > 0)
80
- for (const n of a) {
81
- const l = (n.garmentRange || "").replace(/[^\d.\-–]/g, " ").trim().split(/[\s\-–]+/).filter(Boolean).map(Number).filter((u) => !isNaN(u));
82
- if (l.length && n.userValue != null) {
83
- const u = (Math.min(...l) + Math.max(...l)) / 2;
84
- Math.round((n.userValue - u) * 10) / 10;
89
+ if (r?.modelImageId && (i.modelImageId = r.modelImageId), e && (i.modelImage = e), a && a.length > 0 && (i.fitInfo = a), s && s !== "apparel" && (i.category = s), r?.productId && (i.productId = r.productId), r?.productTitle && (i.productTitle = r.productTitle), r?.productCategory && (i.productCategory = r.productCategory), r?.productSubcategory && (i.productSubcategory = r.productSubcategory), r?.productFitType && (i.productFitType = r.productFitType), r?.productType && (i.productType = r.productType), r?.productTags?.length && (i.productTags = r.productTags), r?.productDescription && (i.productDescription = r.productDescription), r?.productMaterial && (i.productMaterial = r.productMaterial), r?.garmentDetailImage && r.garmentDetailImage !== t && (i.garmentDetailImage = r.garmentDetailImage), r?.silhouetteContext && (i.silhouetteContext = r.silhouetteContext), r?.editFromPrevious && (i.editFromPrevious = !0), a && a.length > 0)
90
+ for (const l of a) {
91
+ const d = (l.garmentRange || "").replace(/[^\d.\-–]/g, " ").trim().split(/[\s\-–]+/).filter(Boolean).map(Number).filter((u) => !isNaN(u));
92
+ if (d.length && l.userValue != null) {
93
+ const u = (Math.min(...d) + Math.max(...d)) / 2;
94
+ Math.round((l.userValue - u) * 10) / 10;
85
95
  }
86
96
  }
87
- const d = await fetch(`${this.baseUrl}/api/v1/tryon`, {
97
+ const n = await fetch(`${this.baseUrl}/api/v1/tryon`, {
88
98
  method: "POST",
89
99
  headers: this.headers,
90
100
  body: JSON.stringify(i)
91
101
  });
92
- if (!d.ok) {
93
- const n = await d.json().catch(() => ({}));
94
- throw d.status === 402 ? new h(
95
- n.message || "Insufficient try-ons",
102
+ if (!n.ok) {
103
+ const l = await n.json().catch(() => ({}));
104
+ throw n.status === 402 ? new c(
105
+ l.message || "Insufficient try-ons",
96
106
  "INSUFFICIENT_BALANCE"
97
- ) : new h(
98
- n.message || "Failed to submit try-on",
107
+ ) : new c(
108
+ l.message || "Failed to submit try-on",
99
109
  "API_ERROR"
100
110
  );
101
111
  }
102
- return d.json();
112
+ return n.json();
103
113
  }
104
114
  async getStatus(e) {
105
- const o = await fetch(`${this.baseUrl}/api/v1/tryon/status/${e}`, {
115
+ const t = await fetch(`${this.baseUrl}/api/v1/tryon/status/${e}`, {
106
116
  headers: this.headers
107
117
  });
108
- if (!o.ok) {
109
- const a = await o.json().catch(() => ({}));
110
- throw new h(
118
+ if (!t.ok) {
119
+ const a = await t.json().catch(() => ({}));
120
+ throw new c(
111
121
  a.message || "Failed to get status",
112
122
  "API_ERROR"
113
123
  );
114
124
  }
115
- return o.json();
125
+ return t.json();
116
126
  }
117
127
  async submitTryOnFeedback(e) {
118
- const o = await fetch(`${this.baseUrl}/api/v1/tryon/feedback`, {
128
+ const t = await fetch(`${this.baseUrl}/api/v1/tryon/feedback`, {
119
129
  method: "POST",
120
130
  headers: this.headers,
121
131
  body: JSON.stringify({
122
132
  ...e,
123
- sessionId: c(),
124
- deviceHint: m()
133
+ sessionId: m(),
134
+ deviceHint: g()
125
135
  })
126
136
  });
127
- if (!o.ok) {
128
- const a = await o.json().catch(() => ({}));
129
- throw new h(
137
+ if (!t.ok) {
138
+ const a = await t.json().catch(() => ({}));
139
+ throw new c(
130
140
  a.message || "Failed to submit try-on feedback",
131
141
  "API_ERROR"
132
142
  );
133
143
  }
134
- return o.json();
144
+ return t.json();
135
145
  }
136
146
  async reportEvent(e) {
137
- const o = await fetch(`${this.baseUrl}/api/v1/tryon/event`, {
147
+ const t = await fetch(`${this.baseUrl}/api/v1/tryon/event`, {
138
148
  method: "POST",
139
149
  headers: this.headers,
140
150
  keepalive: !0,
141
151
  body: JSON.stringify({
142
152
  ...e,
143
- sessionId: c(),
144
- deviceHint: m()
153
+ sessionId: m(),
154
+ deviceHint: g()
145
155
  })
146
156
  });
147
- if (!o.ok) {
148
- const a = await o.json().catch(() => ({}));
149
- throw new h(
157
+ if (!t.ok) {
158
+ const a = await t.json().catch(() => ({}));
159
+ throw new c(
150
160
  a.message || "Failed to report SDK event",
151
161
  "EVENT_REPORT_FAILED"
152
162
  );
153
163
  }
154
- return o.json();
164
+ return t.json();
155
165
  }
156
166
  async reportClientError(e) {
157
- const o = await fetch(`${this.baseUrl}/api/v1/tryon/client-error`, {
167
+ const t = await fetch(`${this.baseUrl}/api/v1/tryon/client-error`, {
158
168
  method: "POST",
159
169
  headers: this.headers,
160
170
  keepalive: !0,
161
171
  body: JSON.stringify({
162
172
  ...e,
163
- sessionId: c(),
164
- deviceHint: m()
173
+ sessionId: m(),
174
+ deviceHint: g()
165
175
  })
166
176
  });
167
- if (!o.ok) {
168
- const a = await o.json().catch(() => ({}));
169
- throw new h(
177
+ if (!t.ok) {
178
+ const a = await t.json().catch(() => ({}));
179
+ throw new c(
170
180
  a.message || "Failed to report SDK client error",
171
181
  "CLIENT_ERROR_REPORT_FAILED"
172
182
  );
173
183
  }
174
- return o.json();
184
+ return t.json();
185
+ }
186
+ async reportReplayChunk(e) {
187
+ const t = G(this.baseUrl), a = t ? B() : null, s = t && a ? `${this.baseUrl}/events/replay` : `${this.baseUrl}/api/v1/tryon/replay`, r = t && a ? T() : this.headers, i = t && a ? { shopDomain: a, ...e } : e, n = await fetch(s, {
188
+ method: "POST",
189
+ headers: r,
190
+ body: JSON.stringify(i)
191
+ });
192
+ if (!n.ok) {
193
+ const l = await n.json().catch(() => ({}));
194
+ throw new c(
195
+ l.message || "Failed to report SDK replay",
196
+ "REPLAY_REPORT_FAILED"
197
+ );
198
+ }
199
+ return n.json();
175
200
  }
176
201
  getStreamUrl(e) {
177
- const o = e ? `/api/v1/tryon/stream/${encodeURIComponent(e)}` : "/api/v1/tryon/stream", a = `${this.baseUrl}${o}`;
202
+ const t = e ? `/api/v1/tryon/stream/${encodeURIComponent(e)}` : "/api/v1/tryon/stream", a = `${this.baseUrl}${t}`;
178
203
  return this.apiKey ? `${a}?key=${encodeURIComponent(this.apiKey)}` : a;
179
204
  }
180
205
  }
181
- function v(t) {
206
+ function T(o) {
182
207
  const e = { "Content-Type": "application/json" };
183
- return t && (e.Authorization = `Bearer ${t}`), e;
208
+ return o && (e.Authorization = `Bearer ${o}`), e;
184
209
  }
185
- class h extends Error {
186
- constructor(e, o) {
187
- super(e), this.name = "PrimeStyleError", this.code = o;
210
+ class c extends Error {
211
+ constructor(e, t) {
212
+ super(e), this.name = "PrimeStyleError", this.code = t;
188
213
  }
189
214
  }
190
- class F {
215
+ class oe {
191
216
  constructor(e) {
192
217
  this.eventSource = null, this.listeners = /* @__PURE__ */ new Map(), this.reconnectTimer = null, this.reconnectAttempts = 0, this.maxReconnectAttempts = 5, this.streamUrl = e;
193
218
  }
194
219
  connect() {
195
220
  this.eventSource || (this.eventSource = new EventSource(this.streamUrl), this.eventSource.addEventListener("vto-update", (e) => {
196
221
  try {
197
- const o = JSON.parse(e.data);
198
- this.emit(o.galleryId, o);
222
+ const t = JSON.parse(e.data);
223
+ this.emit(t.galleryId, t);
199
224
  } catch {
200
225
  }
201
226
  }), this.eventSource.onmessage = (e) => {
202
227
  try {
203
- const o = JSON.parse(e.data), a = this.listeners.keys().next().value, s = o.galleryId || o.jobId || a;
228
+ const t = JSON.parse(e.data), a = this.listeners.keys().next().value, s = t.galleryId || t.jobId || a;
204
229
  if (!s) return;
205
230
  this.emit(s, {
206
231
  galleryId: s,
207
- status: o.status,
208
- imageUrl: o.imageUrl ?? null,
209
- error: o.error ?? null,
210
- timestamp: o.timestamp ?? Date.now()
232
+ status: t.status,
233
+ imageUrl: t.imageUrl ?? null,
234
+ error: t.error ?? null,
235
+ timestamp: t.timestamp ?? Date.now()
211
236
  });
212
237
  } catch {
213
238
  }
@@ -224,57 +249,57 @@ class F {
224
249
  this.connect();
225
250
  }, e);
226
251
  }
227
- onJob(e, o) {
228
- return this.listeners.has(e) || this.listeners.set(e, /* @__PURE__ */ new Set()), this.listeners.get(e).add(o), this.eventSource || this.connect(), () => {
252
+ onJob(e, t) {
253
+ return this.listeners.has(e) || this.listeners.set(e, /* @__PURE__ */ new Set()), this.listeners.get(e).add(t), this.eventSource || this.connect(), () => {
229
254
  const a = this.listeners.get(e);
230
- a && (a.delete(o), a.size === 0 && this.listeners.delete(e)), this.listeners.size === 0 && this.disconnect();
255
+ a && (a.delete(t), a.size === 0 && this.listeners.delete(e)), this.listeners.size === 0 && this.disconnect();
231
256
  };
232
257
  }
233
- emit(e, o) {
258
+ emit(e, t) {
234
259
  const a = this.listeners.get(e);
235
- a && a.forEach((s) => s(o));
260
+ a && a.forEach((s) => s(t));
236
261
  }
237
262
  disconnect() {
238
263
  this.reconnectTimer && (clearTimeout(this.reconnectTimer), this.reconnectTimer = null), this.eventSource && (this.eventSource.close(), this.eventSource = null), this.listeners.clear(), this.reconnectAttempts = 0;
239
264
  }
240
265
  }
241
- const U = 512, C = 0.65;
242
- function z(t, e = {}) {
243
- const o = e.maxDimension ?? U, a = e.quality ?? C;
266
+ const N = 512, H = 0.65;
267
+ function M(o, e = {}) {
268
+ const t = e.maxDimension ?? N, a = e.quality ?? H;
244
269
  return new Promise((s, r) => {
245
270
  const i = new FileReader();
246
271
  i.onload = () => {
247
- const d = new Image();
248
- d.onload = () => {
272
+ const n = new Image();
273
+ n.onload = () => {
249
274
  try {
250
- const n = document.createElement("canvas");
251
- let { width: l, height: u } = d;
252
- (l > o || u > o) && (l > u ? (u = Math.round(u * o / l), l = o) : (l = Math.round(l * o / u), u = o)), n.width = l, n.height = u;
253
- const y = n.getContext("2d");
254
- if (!y) {
275
+ const l = document.createElement("canvas");
276
+ let { width: d, height: u } = n;
277
+ (d > t || u > t) && (d > u ? (u = Math.round(u * t / d), d = t) : (d = Math.round(d * t / u), u = t)), l.width = d, l.height = u;
278
+ const b = l.getContext("2d");
279
+ if (!b) {
255
280
  r(new Error("Canvas context not available"));
256
281
  return;
257
282
  }
258
- y.drawImage(d, 0, 0, l, u);
259
- const P = n.toDataURL("image/jpeg", a);
260
- s(P);
261
- } catch (n) {
262
- r(n);
283
+ b.drawImage(n, 0, 0, d, u);
284
+ const v = l.toDataURL("image/jpeg", a);
285
+ s(v);
286
+ } catch (l) {
287
+ r(l);
263
288
  }
264
- }, d.onerror = () => r(new Error("Failed to load image")), d.src = i.result;
265
- }, i.onerror = () => r(new Error("Failed to read file")), i.readAsDataURL(t);
289
+ }, n.onerror = () => r(new Error("Failed to load image")), n.src = i.result;
290
+ }, i.onerror = () => r(new Error("Failed to read file")), i.readAsDataURL(o);
266
291
  });
267
292
  }
268
- function K(t) {
269
- return ["image/jpeg", "image/png", "image/webp", "image/avif"].includes(t.type);
293
+ function te(o) {
294
+ return ["image/jpeg", "image/png", "image/webp", "image/avif"].includes(o.type);
270
295
  }
271
- async function V(t, e, o) {
296
+ async function re(o, e, t) {
272
297
  try {
273
- const a = typeof t == "string" ? t : await z(t, { maxDimension: 384, quality: 0.6 }), s = await fetch(`${e}/api/v1/sizing/age-check`, {
298
+ const a = typeof o == "string" ? o : await M(o, { maxDimension: 384, quality: 0.6 }), s = await fetch(`${e}/api/v1/sizing/age-check`, {
274
299
  method: "POST",
275
300
  headers: {
276
301
  "Content-Type": "application/json",
277
- Authorization: `Bearer ${o}`
302
+ Authorization: `Bearer ${t}`
278
303
  },
279
304
  body: JSON.stringify({ bodyImage: a })
280
305
  });
@@ -292,18 +317,18 @@ async function V(t, e, o) {
292
317
  return { isAdult: !0, confidence: "low" };
293
318
  }
294
319
  }
295
- const g = {};
296
- function D(t, e) {
297
- g[t] = { ...g[t] || {}, ...e };
320
+ const p = {};
321
+ function k(o, e) {
322
+ p[o] = { ...p[o] || {}, ...e };
298
323
  }
299
- function j(t) {
300
- const e = t?.toLowerCase().split("-")[0] || "en";
301
- return (o) => e === "en" || !g[e] ? o : g[e][o] ?? o;
324
+ function ae(o) {
325
+ const e = o?.toLowerCase().split("-")[0] || "en";
326
+ return (t) => e === "en" || !p[e] ? t : p[e][t] ?? t;
302
327
  }
303
- function J() {
328
+ function ie() {
304
329
  return typeof navigator > "u" ? "en" : (navigator.language || navigator.userLanguage || "en").split("-")[0].toLowerCase();
305
330
  }
306
- const q = [
331
+ const se = [
307
332
  "en",
308
333
  "es",
309
334
  "fr",
@@ -314,7 +339,7 @@ const q = [
314
339
  "zh",
315
340
  "ko",
316
341
  "ar"
317
- ], Z = {
342
+ ], ne = {
318
343
  en: "English",
319
344
  es: "Español",
320
345
  fr: "Français",
@@ -325,7 +350,7 @@ const q = [
325
350
  zh: "中文",
326
351
  ko: "한국어",
327
352
  ar: "العربية"
328
- }, x = [
353
+ }, le = [
329
354
  "Virtual Try-On",
330
355
  "Find Your Size & See It On You",
331
356
  "See Your Fit",
@@ -519,7 +544,68 @@ const q = [
519
544
  // ── Photo step — profile photo preload pill ──
520
545
  "Loaded from profile",
521
546
  "Clear"
522
- ], G = {
547
+ ], L = "ps-clarity-script", R = "wwb75cfm2z";
548
+ let y = null;
549
+ function S(o) {
550
+ const e = String(o || "").trim();
551
+ return e && /^[a-z0-9]+$/i.test(e) ? e : null;
552
+ }
553
+ function W() {
554
+ let o = "";
555
+ try {
556
+ o = process.env.NEXT_PUBLIC_PRIMESTYLE_CLARITY_PROJECT_ID ?? "";
557
+ } catch {
558
+ }
559
+ if (!o)
560
+ try {
561
+ o = process.env.NEXT_PUBLIC_CLARITY_PROJECT_ID ?? "";
562
+ } catch {
563
+ }
564
+ return S(o);
565
+ }
566
+ function O() {
567
+ if (typeof window > "u") return null;
568
+ const o = window;
569
+ return S(o.PrimeStyleAIClarityProjectId || o.PRIMESTYLE_CLARITY_PROJECT_ID);
570
+ }
571
+ function Y(o) {
572
+ return S(o) || O() || W() || R;
573
+ }
574
+ function E() {
575
+ if (typeof window > "u") return null;
576
+ const o = window.clarity;
577
+ return typeof o == "function" ? o : null;
578
+ }
579
+ function F(o) {
580
+ if (typeof window > "u" || typeof document > "u") return null;
581
+ const e = `${L}-${o}`;
582
+ return document.getElementById(e) || ((t, a, s, r, i) => {
583
+ t[s] = t[s] || function(...d) {
584
+ const u = t[s];
585
+ (u.q = u.q || []).push(d);
586
+ };
587
+ const n = a.createElement(r), l = a.getElementsByTagName(r)[0];
588
+ n.id = e, n.async = !0, n.src = "https://www.clarity.ms/tag/" + i, l?.parentNode?.insertBefore(n, l);
589
+ })(window, document, "clarity", "script", o), E();
590
+ }
591
+ function h(o, e) {
592
+ const t = E();
593
+ if (!(!t || e === void 0 || e === null || e === ""))
594
+ try {
595
+ t("set", o, String(e).slice(0, 512));
596
+ } catch {
597
+ }
598
+ }
599
+ function j(o = {}) {
600
+ const e = m();
601
+ h("ps_session", e), h("ps_sdk_session", e), h("ps_product_id", o.productId || void 0), h("ps_product_title", o.productTitle || void 0), h("ps_product_url", o.productUrl || void 0), h("ps_sdk_view", o.view || void 0), h("ps_tryon_job_id", o.jobId || void 0), h("ps_source", o.source || void 0);
602
+ }
603
+ function ue(o = {}) {
604
+ if (typeof window > "u" || typeof document > "u") return !1;
605
+ const e = Y(o.projectId);
606
+ return y = y || e, F(y), E() ? (j(o), !0) : !1;
607
+ }
608
+ const K = {
523
609
  "Virtual Try-On": "Probador Virtual",
524
610
  "Find Your Size & See It On You": "Encuentra tu talla y pruébatelo",
525
611
  "See Your Fit": "Ver tu ajuste",
@@ -774,7 +860,7 @@ const q = [
774
860
  // ── Photo step — profile photo preload pill ──
775
861
  "Loaded from profile": "Cargada del perfil",
776
862
  Clear: "Borrar"
777
- }, B = {
863
+ }, V = {
778
864
  "Virtual Try-On": "Essayage Virtuel",
779
865
  "Find Your Size & See It On You": "Trouvez votre taille et essayez-le",
780
866
  "See Your Fit": "Voir votre ajustement",
@@ -1029,7 +1115,7 @@ const q = [
1029
1115
  // ── Photo step — profile photo preload pill ──
1030
1116
  "Loaded from profile": "Chargée depuis le profil",
1031
1117
  Clear: "Effacer"
1032
- }, N = {
1118
+ }, J = {
1033
1119
  "Virtual Try-On": "Virtuelle Anprobe",
1034
1120
  "Find Your Size & See It On You": "Finden Sie Ihre Größe und probieren Sie es an",
1035
1121
  "See Your Fit": "Ihre Passform ansehen",
@@ -1284,7 +1370,7 @@ const q = [
1284
1370
  // ── Photo step — profile photo preload pill ──
1285
1371
  "Loaded from profile": "Aus Profil geladen",
1286
1372
  Clear: "Löschen"
1287
- }, H = {
1373
+ }, q = {
1288
1374
  "Virtual Try-On": "Prova Virtuale",
1289
1375
  "Find Your Size & See It On You": "Trova la tua taglia e provalo",
1290
1376
  "See Your Fit": "Vedi la vestibilità",
@@ -1539,7 +1625,7 @@ const q = [
1539
1625
  // ── Photo step — profile photo preload pill ──
1540
1626
  "Loaded from profile": "Caricata dal profilo",
1541
1627
  Clear: "Cancella"
1542
- }, M = {
1628
+ }, _ = {
1543
1629
  "Virtual Try-On": "Provador Virtual",
1544
1630
  "Find Your Size & See It On You": "Encontre seu tamanho e experimente",
1545
1631
  "See Your Fit": "Veja seu ajuste",
@@ -1794,7 +1880,7 @@ const q = [
1794
1880
  // ── Photo step — profile photo preload pill ──
1795
1881
  "Loaded from profile": "Carregada do perfil",
1796
1882
  Clear: "Limpar"
1797
- }, k = {
1883
+ }, Z = {
1798
1884
  "Virtual Try-On": "バーチャル試着",
1799
1885
  "Find Your Size & See It On You": "あなたのサイズを見つけて試着",
1800
1886
  "See Your Fit": "フィット感を見る",
@@ -2049,7 +2135,7 @@ const q = [
2049
2135
  // ── Photo step — profile photo preload pill ──
2050
2136
  "Loaded from profile": "プロフィールから読み込み",
2051
2137
  Clear: "クリア"
2052
- }, L = {
2138
+ }, x = {
2053
2139
  "Virtual Try-On": "虚拟试穿",
2054
2140
  "Find Your Size & See It On You": "找到你的尺码并试穿",
2055
2141
  "See Your Fit": "查看合身效果",
@@ -2304,7 +2390,7 @@ const q = [
2304
2390
  // ── Photo step — profile photo preload pill ──
2305
2391
  "Loaded from profile": "已从个人资料加载",
2306
2392
  Clear: "清除"
2307
- }, R = {
2393
+ }, Q = {
2308
2394
  "Virtual Try-On": "가상 피팅",
2309
2395
  "Find Your Size & See It On You": "사이즈를 찾고 입어보세요",
2310
2396
  "See Your Fit": "핏 확인하기",
@@ -2559,7 +2645,7 @@ const q = [
2559
2645
  // ── Photo step — profile photo preload pill ──
2560
2646
  "Loaded from profile": "프로필에서 불러옴",
2561
2647
  Clear: "지우기"
2562
- }, W = {
2648
+ }, $ = {
2563
2649
  "Virtual Try-On": "تجربة افتراضية",
2564
2650
  "Find Your Size & See It On You": "اعثر على مقاسك وجرّبه",
2565
2651
  "See Your Fit": "شاهد الملاءمة",
@@ -2814,34 +2900,36 @@ const q = [
2814
2900
  // ── Photo step — profile photo preload pill ──
2815
2901
  "Loaded from profile": "تم التحميل من الملف الشخصي",
2816
2902
  Clear: "مسح"
2817
- }, O = {
2818
- es: G,
2819
- fr: B,
2820
- de: N,
2821
- it: H,
2822
- pt: M,
2823
- ja: k,
2824
- zh: L,
2825
- ko: R,
2826
- ar: W
2903
+ }, X = {
2904
+ es: K,
2905
+ fr: V,
2906
+ de: J,
2907
+ it: q,
2908
+ pt: _,
2909
+ ja: Z,
2910
+ zh: x,
2911
+ ko: Q,
2912
+ ar: $
2827
2913
  };
2828
- for (const [t, e] of Object.entries(O))
2829
- D(t, e);
2914
+ for (const [o, e] of Object.entries(X))
2915
+ k(o, e);
2830
2916
  export {
2831
- Y as A,
2832
- Z as L,
2833
- h as P,
2834
- F as S,
2835
- x as T,
2836
- z as a,
2837
- q as b,
2838
- j as c,
2839
- V as d,
2840
- J as e,
2841
- m as f,
2842
- c as g,
2843
- K as i,
2844
- v as j,
2845
- D as r
2917
+ ee as A,
2918
+ ne as L,
2919
+ c as P,
2920
+ oe as S,
2921
+ le as T,
2922
+ M as a,
2923
+ se as b,
2924
+ ae as c,
2925
+ re as d,
2926
+ ie as e,
2927
+ g as f,
2928
+ m as g,
2929
+ te as i,
2930
+ T as j,
2931
+ k as r,
2932
+ ue as s,
2933
+ j as t
2846
2934
  };
2847
- //# sourceMappingURL=index-D_9-KLXy.js.map
2935
+ //# sourceMappingURL=index-8lZs7T93.js.map