@fluid-app/fluid-cli-theme-dev 0.1.432 → 0.1.434
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist-cli-preview/.vite/manifest.json +311 -314
- package/dist/dist-cli-preview/account-screens.js +1 -1
- package/dist/dist-cli-preview/chunks/{Breadcrumb-D_SqXp7d.js → Breadcrumb-BKdVGms9.js} +1 -1
- package/dist/dist-cli-preview/chunks/{Combobox-Km3Vrphp.js → Combobox-CyU4gagO.js} +27 -27
- package/dist/dist-cli-preview/chunks/{ContactsScreen-kuRxflCD.js → ContactsScreen-nqNyMwxa.js} +370 -370
- package/dist/dist-cli-preview/chunks/MediaScreen-BGWqRFE4.js +8 -0
- package/dist/dist-cli-preview/chunks/{MemberManagementProviders-BS6VVAvZ.js → MemberManagementProviders-D8tSqPWo.js} +6 -6
- package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-DMuIxGxX.js → MemberShareablesScreen-nYcxHAnv.js} +1313 -1329
- package/dist/dist-cli-preview/chunks/MessagingScreen-DaCvmrAU.js +50551 -0
- package/dist/dist-cli-preview/chunks/MobileActionSheet-DaIBkwQD.js +3884 -0
- package/dist/dist-cli-preview/chunks/{MySiteScreen-Ch1cOkKp.js → MySiteScreen-BYY4CFhu.js} +15 -15
- package/dist/dist-cli-preview/chunks/OrdersScreen-DDdLpJ-7.js +9 -0
- package/dist/dist-cli-preview/chunks/{OrdersScreen-DFqHUrkC.js → OrdersScreen-DkZKc0Z_.js} +7 -7
- package/dist/dist-cli-preview/chunks/PlaylistsScreen-F04j44L-.js +8 -0
- package/dist/dist-cli-preview/chunks/{PortalTenantClientProvider-DWOzWTBJ.js → PortalTenantClientProvider-D6a79po2.js} +1 -1
- package/dist/dist-cli-preview/chunks/{ProfileScreen-C_gqCV47.js → ProfileScreen-BPw0o_kl.js} +222 -237
- package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-DiXGHeoZ.js → SubscriptionsScreen-DuiI_9iF.js} +3 -3
- package/dist/dist-cli-preview/chunks/{account-screen-runtime-BjzMc3GU.js → account-screen-runtime-BYj9PrHT.js} +2326 -2358
- package/dist/dist-cli-preview/chunks/ar-1KIG4DjU.js +1032 -0
- package/dist/dist-cli-preview/chunks/{arrow-left-D62DJteK.js → arrow-left-DnjGVTam.js} +1 -1
- package/dist/dist-cli-preview/chunks/bg-yBy5d6ww.js +1032 -0
- package/dist/dist-cli-preview/chunks/bn-BDIXtBiu.js +1032 -0
- package/dist/dist-cli-preview/chunks/{cli-preview-c45YGC1E.js → cli-preview-C-nTMZQi.js} +10 -10
- package/dist/dist-cli-preview/chunks/{client.gen-DfWiOTes.js → client.gen-DO8I8bB0.js} +9 -9
- package/dist/dist-cli-preview/chunks/{copy-zqKnEIeM.js → copy-COLmacny.js} +1 -1
- package/dist/dist-cli-preview/chunks/{countries-api-adapter-DRty_8ei.js → countries-api-adapter-B2ub-v6x.js} +2 -2
- package/dist/dist-cli-preview/chunks/{create-card-entry-container-4VLe3B5O.js → create-card-entry-container-C7h1cYNe.js} +7380 -7374
- package/dist/dist-cli-preview/chunks/cs-eyeSjS66.js +1032 -0
- package/dist/dist-cli-preview/chunks/da-BMwLUsWZ.js +1032 -0
- package/dist/dist-cli-preview/chunks/de-CWgvDnNQ.js +1032 -0
- package/dist/dist-cli-preview/chunks/el-BhX-RBtB.js +1032 -0
- package/dist/dist-cli-preview/chunks/ellipsis-wdxlMcjt.js +15 -0
- package/dist/dist-cli-preview/chunks/es-fIpwOat4.js +1032 -0
- package/dist/dist-cli-preview/chunks/{eye-Ce93vUsx.js → eye-Cs-LW2s_.js} +1 -1
- package/dist/dist-cli-preview/chunks/fi-BI9n529u.js +1032 -0
- package/dist/dist-cli-preview/chunks/fr-DMDmmtDd.js +1032 -0
- package/dist/dist-cli-preview/chunks/he-BQxAPia2.js +1032 -0
- package/dist/dist-cli-preview/chunks/{hey-api-client-GUem9W6L.js → hey-api-client-C0XYGcOp.js} +1 -1
- package/dist/dist-cli-preview/chunks/hi--CH25zD0.js +1032 -0
- package/dist/dist-cli-preview/chunks/hr-vHPscpGv.js +1032 -0
- package/dist/dist-cli-preview/chunks/hu-BQTLt458.js +1032 -0
- package/dist/dist-cli-preview/chunks/id-R9lUJSOz.js +1032 -0
- package/dist/dist-cli-preview/chunks/{index-B_xDY7q5.js → index-C3BTHcpz.js} +249 -232
- package/dist/dist-cli-preview/chunks/{index-DotYg_8P.js → index-DSTWchdg.js} +2294 -2088
- package/dist/dist-cli-preview/chunks/index-qwhiPvOP.js +135 -0
- package/dist/dist-cli-preview/chunks/isAfter-CcghMy5x.js +1324 -0
- package/dist/dist-cli-preview/chunks/it-iN8sGAC0.js +1032 -0
- package/dist/dist-cli-preview/chunks/ja-BGIZaAW0.js +1032 -0
- package/dist/dist-cli-preview/chunks/ko-Cr6Wl_2I.js +1032 -0
- package/dist/dist-cli-preview/chunks/log-out-BIykSy7b.js +30 -0
- package/dist/dist-cli-preview/chunks/{map-pin-C_2_P4BZ.js → map-pin-Be34_dU6.js} +1 -1
- package/dist/dist-cli-preview/chunks/messaging-D7ENrup9.js +4 -0
- package/dist/dist-cli-preview/chunks/{mount-account-screen-DLu4WsoN.js → mount-account-screen-BfLjUsgR.js} +8 -8
- package/dist/dist-cli-preview/chunks/ms-CVPERbjz.js +1032 -0
- package/dist/dist-cli-preview/chunks/{navigate-account-screen-Zm16FA01.js → navigate-account-screen-CiKHtySl.js} +1 -1
- package/dist/dist-cli-preview/chunks/nl-38XjLPxf.js +1032 -0
- package/dist/dist-cli-preview/chunks/no-C9CyNben.js +1032 -0
- package/dist/dist-cli-preview/chunks/pause-BBpqu34U.js +41 -0
- package/dist/dist-cli-preview/chunks/pl-DmR9h5su.js +1032 -0
- package/dist/dist-cli-preview/chunks/pt-t-mbd11H.js +1032 -0
- package/dist/dist-cli-preview/chunks/ro-T2DyDJMM.js +1032 -0
- package/dist/dist-cli-preview/chunks/ru-DEgbQN8m.js +1032 -0
- package/dist/dist-cli-preview/chunks/{schemas-CcDaDYH8.js → schemas-EHBiwcQ2.js} +1748 -1618
- package/dist/dist-cli-preview/chunks/{screen-route-slug-utils-CKharc6_.js → screen-route-slug-utils-Bq-L-ohr.js} +1 -1
- package/dist/dist-cli-preview/chunks/{sheet-haptics-context-DTfySPrq.js → sheet-haptics-context-DT2_eUzd.js} +1 -1
- package/dist/dist-cli-preview/chunks/{sidebar-CkC-f9zG.js → sidebar-C09syHYk.js} +10 -10
- package/dist/dist-cli-preview/chunks/sk-CFYGY_a5.js +1032 -0
- package/dist/dist-cli-preview/chunks/{sortable.esm-e9hcrOle.js → sortable.esm-ClljxXn3.js} +2 -2
- package/dist/dist-cli-preview/chunks/{store-api-context-CDtl_X71.js → store-api-context-DzwRm7gt.js} +1 -1
- package/dist/dist-cli-preview/chunks/sv-i61vcDan.js +1032 -0
- package/dist/dist-cli-preview/chunks/th-DfFRan1t.js +1032 -0
- package/dist/dist-cli-preview/chunks/tl-olBNOPcn.js +1032 -0
- package/dist/dist-cli-preview/chunks/tr-LZKZ4tKb.js +1032 -0
- package/dist/dist-cli-preview/chunks/trash-2-CZhp1ODr.js +17 -0
- package/dist/dist-cli-preview/chunks/uk-BtXttbkl.js +1032 -0
- package/dist/dist-cli-preview/chunks/{use-mobile-DF76-293.js → use-mobile-B7ojcHh2.js} +3 -3
- package/dist/dist-cli-preview/chunks/{use-optional-store-DT9WAQPd.js → use-optional-store-DJYDCvhI.js} +2 -2
- package/dist/dist-cli-preview/chunks/use-store-DeK8QAFv.js +400 -0
- package/dist/dist-cli-preview/chunks/{useInfiniteQuery-CDXQnWw0.js → useInfiniteQuery-FHeNizQM.js} +1 -1
- package/dist/dist-cli-preview/chunks/{user-B-jZvwGL.js → user-ozIT6Hhj.js} +1 -1
- package/dist/dist-cli-preview/chunks/{users-TuK7MiQN.js → users-JoDv7hjw.js} +1 -1
- package/dist/dist-cli-preview/chunks/vi-BHWnhETf.js +1032 -0
- package/dist/dist-cli-preview/chunks/zh_CN-CTgClYOF.js +1032 -0
- package/dist/dist-cli-preview/chunks/zh_TW-aQ6cE6PF.js +1032 -0
- package/package.json +2 -2
- package/dist/dist-cli-preview/chunks/MediaScreen-BvJdBMeQ.js +0 -8
- package/dist/dist-cli-preview/chunks/MessagingScreen-BKHqT1Ej.js +0 -35760
- package/dist/dist-cli-preview/chunks/MobileActionSheet-CBoGiv4j.js +0 -2950
- package/dist/dist-cli-preview/chunks/OrdersScreen-BGgj4BZS.js +0 -9
- package/dist/dist-cli-preview/chunks/PlaylistsScreen-Bx1XIkZA.js +0 -8
- package/dist/dist-cli-preview/chunks/Select-sVTiAmsy.js +0 -952
- package/dist/dist-cli-preview/chunks/Textarea-D-fkMEdH.js +0 -349
- package/dist/dist-cli-preview/chunks/ar-2rvzIrIR.js +0 -626
- package/dist/dist-cli-preview/chunks/bg-BYPRLePV.js +0 -626
- package/dist/dist-cli-preview/chunks/bn-C0wttE43.js +0 -626
- package/dist/dist-cli-preview/chunks/cs-C7Irs0-j.js +0 -626
- package/dist/dist-cli-preview/chunks/da-80sKijLl.js +0 -626
- package/dist/dist-cli-preview/chunks/de-tvILU4R6.js +0 -626
- package/dist/dist-cli-preview/chunks/el-B3kxyML7.js +0 -626
- package/dist/dist-cli-preview/chunks/es-BTQqBZ3c.js +0 -626
- package/dist/dist-cli-preview/chunks/fi-B3aiDLBd.js +0 -626
- package/dist/dist-cli-preview/chunks/fr-C6aLQLnC.js +0 -626
- package/dist/dist-cli-preview/chunks/he-yMMGeZ3u.js +0 -626
- package/dist/dist-cli-preview/chunks/hi-Cnovv3v0.js +0 -626
- package/dist/dist-cli-preview/chunks/hr-B9M6sJu9.js +0 -626
- package/dist/dist-cli-preview/chunks/hu-D__s9KvX.js +0 -626
- package/dist/dist-cli-preview/chunks/id-CrrK_-vk.js +0 -626
- package/dist/dist-cli-preview/chunks/index-BF-Yok75.js +0 -341
- package/dist/dist-cli-preview/chunks/it-C_g-lMfy.js +0 -626
- package/dist/dist-cli-preview/chunks/ja-Dmdbg-it.js +0 -626
- package/dist/dist-cli-preview/chunks/ko-C-jyYnAw.js +0 -626
- package/dist/dist-cli-preview/chunks/lock-B3ps7XBv.js +0 -14
- package/dist/dist-cli-preview/chunks/log-out-CDzQuZ5N.js +0 -15
- package/dist/dist-cli-preview/chunks/messaging-BETZIbiu.js +0 -4
- package/dist/dist-cli-preview/chunks/ms-Bk6rBm7W.js +0 -626
- package/dist/dist-cli-preview/chunks/nl-Bh5tyFlK.js +0 -626
- package/dist/dist-cli-preview/chunks/no-BqMQtHFU.js +0 -626
- package/dist/dist-cli-preview/chunks/pl-B4xTBpA_.js +0 -626
- package/dist/dist-cli-preview/chunks/pt-Biz6F-Fo.js +0 -626
- package/dist/dist-cli-preview/chunks/ro-BKd4fPGi.js +0 -626
- package/dist/dist-cli-preview/chunks/ru-CD8HG55y.js +0 -626
- package/dist/dist-cli-preview/chunks/sk-5vqOdyEq.js +0 -626
- package/dist/dist-cli-preview/chunks/sv-D-_y-QCE.js +0 -626
- package/dist/dist-cli-preview/chunks/th-BHVHNGsc.js +0 -626
- package/dist/dist-cli-preview/chunks/tl-DdaRIJXv.js +0 -626
- package/dist/dist-cli-preview/chunks/tr-CP55XLFp.js +0 -626
- package/dist/dist-cli-preview/chunks/trash-2-C5c1weGY.js +0 -137
- package/dist/dist-cli-preview/chunks/uk-C5cwrSwu.js +0 -626
- package/dist/dist-cli-preview/chunks/use-store-DUukxuYV.js +0 -92
- package/dist/dist-cli-preview/chunks/vi-7y-mSoow.js +0 -626
- package/dist/dist-cli-preview/chunks/zh_CN-cvRqvqNw.js +0 -626
- package/dist/dist-cli-preview/chunks/zh_TW-_Qzm5B74.js +0 -626
package/dist/dist-cli-preview/chunks/{ProfileScreen-C_gqCV47.js → ProfileScreen-BPw0o_kl.js}
RENAMED
|
@@ -1,52 +1,37 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { u as R, a as St, b as B, c as Et, M as Pt } from "./MemberManagementProviders-
|
|
3
|
-
import { O as At } from "./OrdersScreen-
|
|
4
|
-
import { F as
|
|
1
|
+
import { c as oe, i as mt, l as v, j as n, aa as ht, ab as le, ac as pt, ad as re, M as ce, ae as gt, K as E, I as je, H as A, B as de, D as Ae, E as ue, x as xt, G as Q, af as bt, J as H, a8 as T, ag as _t, ah as vt, a7 as yt, P as jt, ai as Z, z as fe, R as Me, q as Ct, Y as wt, N as Nt } from "./account-screen-runtime-BYj9PrHT.js";
|
|
2
|
+
import { u as R, a as St, b as B, c as Et, M as Pt } from "./MemberManagementProviders-D8tSqPWo.js";
|
|
3
|
+
import { O as At } from "./OrdersScreen-DkZKc0Z_.js";
|
|
4
|
+
import { F as J, e as Mt, f as Rt, S as Ft, P as It, a as Lt, b as kt, d as Dt, A as Ot, C as Re, c as zt, g as Tt, u as Bt, i as Ut, h as Qt, T as qt, j as $t, k as Vt, m as Ht, E as Kt, l as Fe } from "./create-card-entry-container-C7h1cYNe.js";
|
|
5
5
|
import { c as Gt } from "./member-permissions-ndhNmlOk.js";
|
|
6
|
-
import { u as me } from "./use-store-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { A as Ce } from "./arrow-left-
|
|
16
|
-
import { L as tr } from "./log-out-CDzQuZ5N.js";
|
|
6
|
+
import { u as me, B as Ie } from "./use-store-DeK8QAFv.js";
|
|
7
|
+
import { R as Le, j as Yt, u as K, m as Wt, o as ne, s as L } from "./schemas-EHBiwcQ2.js";
|
|
8
|
+
import { I as Xt } from "./sheet-haptics-context-DT2_eUzd.js";
|
|
9
|
+
import { u as Y } from "./sidebar-C09syHYk.js";
|
|
10
|
+
import { u as Zt } from "./countries-api-adapter-B2ub-v6x.js";
|
|
11
|
+
import { u as Jt } from "./PortalTenantClientProvider-D6a79po2.js";
|
|
12
|
+
import { P as ke } from "./pause-BBpqu34U.js";
|
|
13
|
+
import { M as er } from "./map-pin-Be34_dU6.js";
|
|
14
|
+
import { L as tr, a as rr } from "./log-out-BIykSy7b.js";
|
|
15
|
+
import { A as Ce } from "./arrow-left-DnjGVTam.js";
|
|
17
16
|
/**
|
|
18
17
|
* @license lucide-react v0.575.0 - ISC
|
|
19
18
|
*
|
|
20
19
|
* This source code is licensed under the ISC license.
|
|
21
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
22
21
|
*/
|
|
23
|
-
const
|
|
24
|
-
["path", { d: "m5 8 6 6", key: "1wu5hv" }],
|
|
25
|
-
["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
|
|
26
|
-
["path", { d: "M2 5h12", key: "or177f" }],
|
|
27
|
-
["path", { d: "M7 2h1", key: "1t2jsx" }],
|
|
28
|
-
["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
|
|
29
|
-
["path", { d: "M14 18h6", key: "1m8k6r" }]
|
|
30
|
-
], nr = Z("languages", rr);
|
|
31
|
-
/**
|
|
32
|
-
* @license lucide-react v0.575.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/
|
|
37
|
-
const sr = [
|
|
22
|
+
const nr = [
|
|
38
23
|
["path", { d: "m2 9 3-3 3 3", key: "1ltn5i" }],
|
|
39
24
|
["path", { d: "M13 18H7a2 2 0 0 1-2-2V6", key: "1r6tfw" }],
|
|
40
25
|
["path", { d: "m22 15-3 3-3-3", key: "4rnwn2" }],
|
|
41
26
|
["path", { d: "M11 6h6a2 2 0 0 1 2 2v10", key: "2f72bc" }]
|
|
42
|
-
], De =
|
|
27
|
+
], De = oe("repeat-2", nr);
|
|
43
28
|
/**
|
|
44
29
|
* @license lucide-react v0.575.0 - ISC
|
|
45
30
|
*
|
|
46
31
|
* This source code is licensed under the ISC license.
|
|
47
32
|
* See the LICENSE file in the root directory of this source tree.
|
|
48
33
|
*/
|
|
49
|
-
const
|
|
34
|
+
const sr = [
|
|
50
35
|
[
|
|
51
36
|
"path",
|
|
52
37
|
{
|
|
@@ -54,18 +39,18 @@ const ar = [
|
|
|
54
39
|
key: "r04s7s"
|
|
55
40
|
}
|
|
56
41
|
]
|
|
57
|
-
],
|
|
42
|
+
], ar = oe("star", sr);
|
|
58
43
|
/**
|
|
59
44
|
* @license lucide-react v0.575.0 - ISC
|
|
60
45
|
*
|
|
61
46
|
* This source code is licensed under the ISC license.
|
|
62
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
63
48
|
*/
|
|
64
|
-
const
|
|
49
|
+
const ir = [
|
|
65
50
|
["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
|
|
66
51
|
["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
|
|
67
|
-
],
|
|
68
|
-
var
|
|
52
|
+
], or = oe("user-round", ir);
|
|
53
|
+
var ee = { exports: {} }, te = {};
|
|
69
54
|
/**
|
|
70
55
|
* @license React
|
|
71
56
|
* use-sync-external-store-shim.production.js
|
|
@@ -76,8 +61,8 @@ var te = { exports: {} }, re = {};
|
|
|
76
61
|
* LICENSE file in the root directory of this source tree.
|
|
77
62
|
*/
|
|
78
63
|
var we;
|
|
79
|
-
function
|
|
80
|
-
if (we) return
|
|
64
|
+
function lr() {
|
|
65
|
+
if (we) return te;
|
|
81
66
|
we = 1;
|
|
82
67
|
var e = mt();
|
|
83
68
|
function i(o, c) {
|
|
@@ -114,29 +99,29 @@ function cr() {
|
|
|
114
99
|
return c();
|
|
115
100
|
}
|
|
116
101
|
var s = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? t : g;
|
|
117
|
-
return
|
|
102
|
+
return te.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : s, te;
|
|
118
103
|
}
|
|
119
104
|
var Ne;
|
|
120
|
-
function
|
|
121
|
-
return Ne || (Ne = 1,
|
|
105
|
+
function cr() {
|
|
106
|
+
return Ne || (Ne = 1, ee.exports = lr()), ee.exports;
|
|
122
107
|
}
|
|
123
|
-
var
|
|
124
|
-
function
|
|
125
|
-
return
|
|
126
|
-
|
|
108
|
+
var dr = cr();
|
|
109
|
+
function ur() {
|
|
110
|
+
return dr.useSyncExternalStore(
|
|
111
|
+
fr,
|
|
127
112
|
() => !0,
|
|
128
113
|
() => !1
|
|
129
114
|
);
|
|
130
115
|
}
|
|
131
|
-
function
|
|
116
|
+
function fr() {
|
|
132
117
|
return () => {
|
|
133
118
|
};
|
|
134
119
|
}
|
|
135
|
-
var he = "Avatar", [
|
|
120
|
+
var he = "Avatar", [mr] = ht(he), [hr, Oe] = mr(he), ze = v.forwardRef(
|
|
136
121
|
(e, i) => {
|
|
137
122
|
const { __scopeAvatar: r, ...l } = e, [d, u] = v.useState("idle");
|
|
138
123
|
return /* @__PURE__ */ n.jsx(
|
|
139
|
-
|
|
124
|
+
hr,
|
|
140
125
|
{
|
|
141
126
|
scope: r,
|
|
142
127
|
imageLoadingStatus: d,
|
|
@@ -150,10 +135,10 @@ ze.displayName = he;
|
|
|
150
135
|
var Te = "AvatarImage", Be = v.forwardRef(
|
|
151
136
|
(e, i) => {
|
|
152
137
|
const { __scopeAvatar: r, src: l, onLoadingStatusChange: d = () => {
|
|
153
|
-
}, ...u } = e, p = Oe(Te, r), g =
|
|
138
|
+
}, ...u } = e, p = Oe(Te, r), g = pr(l, u), a = pt((t) => {
|
|
154
139
|
d(t), p.onImageLoadingStatusChange(t);
|
|
155
140
|
});
|
|
156
|
-
return
|
|
141
|
+
return re(() => {
|
|
157
142
|
g !== "idle" && a(g);
|
|
158
143
|
}, [g, a]), g === "loaded" ? /* @__PURE__ */ n.jsx(le.img, { ...u, ref: i, src: l }) : null;
|
|
159
144
|
}
|
|
@@ -174,13 +159,13 @@ Qe.displayName = Ue;
|
|
|
174
159
|
function Se(e, i) {
|
|
175
160
|
return e ? i ? (e.src !== i && (e.src = i), e.complete && e.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
176
161
|
}
|
|
177
|
-
function
|
|
178
|
-
const l =
|
|
162
|
+
function pr(e, { referrerPolicy: i, crossOrigin: r }) {
|
|
163
|
+
const l = ur(), d = v.useRef(null), u = l ? (d.current || (d.current = new window.Image()), d.current) : null, [p, g] = v.useState(
|
|
179
164
|
() => Se(u, e)
|
|
180
165
|
);
|
|
181
|
-
return
|
|
166
|
+
return re(() => {
|
|
182
167
|
g(Se(u, e));
|
|
183
|
-
}, [u, e]),
|
|
168
|
+
}, [u, e]), re(() => {
|
|
184
169
|
const a = (o) => () => {
|
|
185
170
|
g(o);
|
|
186
171
|
};
|
|
@@ -191,14 +176,14 @@ function gr(e, { referrerPolicy: i, crossOrigin: r }) {
|
|
|
191
176
|
};
|
|
192
177
|
}, [u, r, i]), p;
|
|
193
178
|
}
|
|
194
|
-
var
|
|
195
|
-
function
|
|
179
|
+
var gr = ze, xr = Be, br = Qe;
|
|
180
|
+
function _r({
|
|
196
181
|
className: e,
|
|
197
182
|
size: i = "default",
|
|
198
183
|
...r
|
|
199
184
|
}) {
|
|
200
185
|
return /* @__PURE__ */ n.jsx(
|
|
201
|
-
|
|
186
|
+
gr,
|
|
202
187
|
{
|
|
203
188
|
"data-slot": "avatar",
|
|
204
189
|
"data-size": i,
|
|
@@ -210,12 +195,12 @@ function vr({
|
|
|
210
195
|
}
|
|
211
196
|
);
|
|
212
197
|
}
|
|
213
|
-
function
|
|
198
|
+
function vr({
|
|
214
199
|
className: e,
|
|
215
200
|
...i
|
|
216
201
|
}) {
|
|
217
202
|
return /* @__PURE__ */ n.jsx(
|
|
218
|
-
|
|
203
|
+
xr,
|
|
219
204
|
{
|
|
220
205
|
"data-slot": "avatar-image",
|
|
221
206
|
className: ce("aspect-square size-full", e),
|
|
@@ -223,7 +208,7 @@ function yr({
|
|
|
223
208
|
}
|
|
224
209
|
);
|
|
225
210
|
}
|
|
226
|
-
function
|
|
211
|
+
function yr({
|
|
227
212
|
className: e,
|
|
228
213
|
...i
|
|
229
214
|
}) {
|
|
@@ -239,7 +224,7 @@ function jr({
|
|
|
239
224
|
}
|
|
240
225
|
);
|
|
241
226
|
}
|
|
242
|
-
function
|
|
227
|
+
function jr({
|
|
243
228
|
control: e,
|
|
244
229
|
isOpen: i,
|
|
245
230
|
onSubmit: r,
|
|
@@ -256,17 +241,17 @@ function Cr({
|
|
|
256
241
|
fullName: m,
|
|
257
242
|
onUploadAvatar: f
|
|
258
243
|
}) {
|
|
259
|
-
const { t: h } = R(), { field: x } = gt({ control: e, name: "avatar_url" }), [N, w] = v.useState(!1),
|
|
244
|
+
const { t: h } = R(), { field: x } = gt({ control: e, name: "avatar_url" }), [N, w] = v.useState(!1), b = v.useRef(null), C = v.useRef(0);
|
|
260
245
|
v.useEffect(() => {
|
|
261
246
|
C.current += 1, w(!1);
|
|
262
247
|
}, [i]);
|
|
263
248
|
const M = async (j) => {
|
|
264
|
-
const
|
|
265
|
-
if (j.target.value = "",
|
|
249
|
+
const $ = j.target.files?.[0];
|
|
250
|
+
if (j.target.value = "", !$ || !f) return;
|
|
266
251
|
const I = ++C.current;
|
|
267
252
|
w(!0);
|
|
268
253
|
try {
|
|
269
|
-
const G = await f(
|
|
254
|
+
const G = await f($);
|
|
270
255
|
G && C.current === I && x.onChange(G);
|
|
271
256
|
} finally {
|
|
272
257
|
C.current === I && w(!1);
|
|
@@ -293,13 +278,13 @@ function Cr({
|
|
|
293
278
|
I instanceof Error ? I.message : h("failed_to_initiate_email_change")
|
|
294
279
|
);
|
|
295
280
|
}
|
|
296
|
-
},
|
|
281
|
+
}, q = () => {
|
|
297
282
|
z(!1), y(""), P(void 0);
|
|
298
283
|
}, O = () => {
|
|
299
|
-
|
|
284
|
+
q(), l();
|
|
300
285
|
};
|
|
301
286
|
return /* @__PURE__ */ n.jsxs(
|
|
302
|
-
|
|
287
|
+
Le,
|
|
303
288
|
{
|
|
304
289
|
open: i,
|
|
305
290
|
onOpenChange: (j) => !j && O(),
|
|
@@ -333,7 +318,7 @@ function Cr({
|
|
|
333
318
|
variant: "outline",
|
|
334
319
|
size: "sm",
|
|
335
320
|
disabled: N,
|
|
336
|
-
onClick: () =>
|
|
321
|
+
onClick: () => b.current?.click(),
|
|
337
322
|
children: [
|
|
338
323
|
N && /* @__PURE__ */ n.jsx("div", { className: "mr-2 size-3.5 animate-spin rounded-full border-2 border-current/30 border-t-current" }),
|
|
339
324
|
h(N ? "uploading" : "change")
|
|
@@ -354,7 +339,7 @@ function Cr({
|
|
|
354
339
|
/* @__PURE__ */ n.jsx(
|
|
355
340
|
"input",
|
|
356
341
|
{
|
|
357
|
-
ref:
|
|
342
|
+
ref: b,
|
|
358
343
|
id: "avatar-file-input",
|
|
359
344
|
"aria-label": h("profile_photo"),
|
|
360
345
|
type: "file",
|
|
@@ -369,7 +354,7 @@ function Cr({
|
|
|
369
354
|
] })
|
|
370
355
|
] }),
|
|
371
356
|
/* @__PURE__ */ n.jsx(
|
|
372
|
-
|
|
357
|
+
J,
|
|
373
358
|
{
|
|
374
359
|
control: e,
|
|
375
360
|
name: "first_name",
|
|
@@ -381,7 +366,7 @@ function Cr({
|
|
|
381
366
|
}
|
|
382
367
|
),
|
|
383
368
|
/* @__PURE__ */ n.jsx(
|
|
384
|
-
|
|
369
|
+
J,
|
|
385
370
|
{
|
|
386
371
|
control: e,
|
|
387
372
|
name: "last_name",
|
|
@@ -401,7 +386,7 @@ function Cr({
|
|
|
401
386
|
}
|
|
402
387
|
),
|
|
403
388
|
/* @__PURE__ */ n.jsx(
|
|
404
|
-
|
|
389
|
+
J,
|
|
405
390
|
{
|
|
406
391
|
control: e,
|
|
407
392
|
name: "phone_number",
|
|
@@ -443,7 +428,7 @@ function Cr({
|
|
|
443
428
|
y(j.target.value), P(void 0);
|
|
444
429
|
},
|
|
445
430
|
onKeyDown: (j) => {
|
|
446
|
-
j.key === "Enter" && (j.preventDefault(), W()), j.key === "Escape" &&
|
|
431
|
+
j.key === "Enter" && (j.preventDefault(), W()), j.key === "Escape" && q();
|
|
447
432
|
},
|
|
448
433
|
"aria-invalid": !!D || void 0,
|
|
449
434
|
autoFocus: !0
|
|
@@ -461,7 +446,7 @@ function Cr({
|
|
|
461
446
|
type: "button",
|
|
462
447
|
variant: "outline",
|
|
463
448
|
size: "sm",
|
|
464
|
-
onClick:
|
|
449
|
+
onClick: q,
|
|
465
450
|
children: h("cancel")
|
|
466
451
|
}
|
|
467
452
|
),
|
|
@@ -507,7 +492,7 @@ function Cr({
|
|
|
507
492
|
] })
|
|
508
493
|
] }),
|
|
509
494
|
u && /* @__PURE__ */ n.jsx("p", { className: "text-destructive text-sm", children: u }),
|
|
510
|
-
/* @__PURE__ */ n.jsx(
|
|
495
|
+
/* @__PURE__ */ n.jsx(Yt, { className: "flex flex-row items-center justify-end", children: /* @__PURE__ */ n.jsx("div", { className: "flex-1 text-right", children: /* @__PURE__ */ n.jsxs(
|
|
511
496
|
E,
|
|
512
497
|
{
|
|
513
498
|
type: "button",
|
|
@@ -523,20 +508,20 @@ function Cr({
|
|
|
523
508
|
}
|
|
524
509
|
);
|
|
525
510
|
}
|
|
526
|
-
var
|
|
511
|
+
var Cr = Object.defineProperty, X = Object.getOwnPropertySymbols, qe = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable, Ee = (e, i, r) => i in e ? Cr(e, i, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[i] = r, se = (e, i) => {
|
|
527
512
|
for (var r in i || (i = {}))
|
|
528
|
-
|
|
513
|
+
qe.call(i, r) && Ee(e, r, i[r]);
|
|
529
514
|
if (X)
|
|
530
515
|
for (var r of X(i))
|
|
531
|
-
|
|
516
|
+
$e.call(i, r) && Ee(e, r, i[r]);
|
|
532
517
|
return e;
|
|
533
|
-
},
|
|
518
|
+
}, ae = (e, i) => {
|
|
534
519
|
var r = {};
|
|
535
520
|
for (var l in e)
|
|
536
|
-
|
|
521
|
+
qe.call(e, l) && i.indexOf(l) < 0 && (r[l] = e[l]);
|
|
537
522
|
if (e != null && X)
|
|
538
523
|
for (var l of X(e))
|
|
539
|
-
i.indexOf(l) < 0 &&
|
|
524
|
+
i.indexOf(l) < 0 && $e.call(e, l) && (r[l] = e[l]);
|
|
540
525
|
return r;
|
|
541
526
|
};
|
|
542
527
|
/**
|
|
@@ -546,14 +531,14 @@ var wr = Object.defineProperty, X = Object.getOwnPropertySymbols, $e = Object.pr
|
|
|
546
531
|
*/
|
|
547
532
|
var U;
|
|
548
533
|
((e) => {
|
|
549
|
-
const i = class
|
|
534
|
+
const i = class _ {
|
|
550
535
|
/*-- Constructor (low level) and fields --*/
|
|
551
536
|
// Creates a new QR Code with the given version number,
|
|
552
537
|
// error correction level, data codeword bytes, and mask number.
|
|
553
538
|
// This is a low-level API that most users should not use directly.
|
|
554
539
|
// A mid-level API is the encodeSegments() function.
|
|
555
540
|
constructor(a, t, s, o) {
|
|
556
|
-
if (this.version = a, this.errorCorrectionLevel = t, this.modules = [], this.isFunction = [], a <
|
|
541
|
+
if (this.version = a, this.errorCorrectionLevel = t, this.modules = [], this.isFunction = [], a < _.MIN_VERSION || a > _.MAX_VERSION)
|
|
557
542
|
throw new RangeError("Version value out of range");
|
|
558
543
|
if (o < -1 || o > 7)
|
|
559
544
|
throw new RangeError("Mask value out of range");
|
|
@@ -583,7 +568,7 @@ var U;
|
|
|
583
568
|
// ecl argument if it can be done without increasing the version.
|
|
584
569
|
static encodeText(a, t) {
|
|
585
570
|
const s = e.QrSegment.makeSegments(a);
|
|
586
|
-
return
|
|
571
|
+
return _.encodeSegments(s, t);
|
|
587
572
|
}
|
|
588
573
|
// Returns a QR Code representing the given binary data at the given error correction level.
|
|
589
574
|
// This function always encodes using the binary segment mode, not any text mode. The maximum number of
|
|
@@ -591,7 +576,7 @@ var U;
|
|
|
591
576
|
// The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.
|
|
592
577
|
static encodeBinary(a, t) {
|
|
593
578
|
const s = e.QrSegment.makeBytes(a);
|
|
594
|
-
return
|
|
579
|
+
return _.encodeSegments([s], t);
|
|
595
580
|
}
|
|
596
581
|
/*-- Static factory functions (mid level) --*/
|
|
597
582
|
// Returns a QR Code representing the given segments with the given encoding parameters.
|
|
@@ -604,35 +589,35 @@ var U;
|
|
|
604
589
|
// between modes (such as alphanumeric and byte) to encode text in less space.
|
|
605
590
|
// This is a mid-level API; the high-level API is encodeText() and encodeBinary().
|
|
606
591
|
static encodeSegments(a, t, s = 1, o = 40, c = -1, m = !0) {
|
|
607
|
-
if (!(
|
|
592
|
+
if (!(_.MIN_VERSION <= s && s <= o && o <= _.MAX_VERSION) || c < -1 || c > 7)
|
|
608
593
|
throw new RangeError("Invalid value");
|
|
609
594
|
let f, h;
|
|
610
595
|
for (f = s; ; f++) {
|
|
611
|
-
const
|
|
612
|
-
if (C <=
|
|
596
|
+
const b = _.getNumDataCodewords(f, t) * 8, C = p.getTotalBits(a, f);
|
|
597
|
+
if (C <= b) {
|
|
613
598
|
h = C;
|
|
614
599
|
break;
|
|
615
600
|
}
|
|
616
601
|
if (f >= o)
|
|
617
602
|
throw new RangeError("Data too long");
|
|
618
603
|
}
|
|
619
|
-
for (const
|
|
620
|
-
m && h <=
|
|
604
|
+
for (const b of [_.Ecc.MEDIUM, _.Ecc.QUARTILE, _.Ecc.HIGH])
|
|
605
|
+
m && h <= _.getNumDataCodewords(f, b) * 8 && (t = b);
|
|
621
606
|
let x = [];
|
|
622
|
-
for (const
|
|
623
|
-
r(
|
|
624
|
-
for (const C of
|
|
607
|
+
for (const b of a) {
|
|
608
|
+
r(b.mode.modeBits, 4, x), r(b.numChars, b.mode.numCharCountBits(f), x);
|
|
609
|
+
for (const C of b.getData())
|
|
625
610
|
x.push(C);
|
|
626
611
|
}
|
|
627
612
|
d(x.length == h);
|
|
628
|
-
const N =
|
|
613
|
+
const N = _.getNumDataCodewords(f, t) * 8;
|
|
629
614
|
d(x.length <= N), r(0, Math.min(4, N - x.length), x), r(0, (8 - x.length % 8) % 8, x), d(x.length % 8 == 0);
|
|
630
|
-
for (let
|
|
631
|
-
r(
|
|
615
|
+
for (let b = 236; x.length < N; b ^= 253)
|
|
616
|
+
r(b, 8, x);
|
|
632
617
|
let w = [];
|
|
633
618
|
for (; w.length * 8 < x.length; )
|
|
634
619
|
w.push(0);
|
|
635
|
-
return x.forEach((
|
|
620
|
+
return x.forEach((b, C) => w[C >>> 3] |= b << 7 - (C & 7)), new _(f, t, w, c);
|
|
636
621
|
}
|
|
637
622
|
/*-- Accessor methods --*/
|
|
638
623
|
// Returns the color of the module (pixel) at the given coordinates, which is false
|
|
@@ -718,28 +703,28 @@ var U;
|
|
|
718
703
|
// codewords appended to it, based on this object's version and error correction level.
|
|
719
704
|
addEccAndInterleave(a) {
|
|
720
705
|
const t = this.version, s = this.errorCorrectionLevel;
|
|
721
|
-
if (a.length !=
|
|
706
|
+
if (a.length != _.getNumDataCodewords(t, s))
|
|
722
707
|
throw new RangeError("Invalid argument");
|
|
723
|
-
const o =
|
|
708
|
+
const o = _.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][t], c = _.ECC_CODEWORDS_PER_BLOCK[s.ordinal][t], m = Math.floor(_.getNumRawDataModules(t) / 8), f = o - m % o, h = Math.floor(m / o);
|
|
724
709
|
let x = [];
|
|
725
|
-
const N =
|
|
726
|
-
for (let
|
|
727
|
-
let M = a.slice(C, C + h - c + (
|
|
710
|
+
const N = _.reedSolomonComputeDivisor(c);
|
|
711
|
+
for (let b = 0, C = 0; b < o; b++) {
|
|
712
|
+
let M = a.slice(C, C + h - c + (b < f ? 0 : 1));
|
|
728
713
|
C += M.length;
|
|
729
|
-
const k =
|
|
730
|
-
|
|
714
|
+
const k = _.reedSolomonComputeRemainder(M, N);
|
|
715
|
+
b < f && M.push(0), x.push(M.concat(k));
|
|
731
716
|
}
|
|
732
717
|
let w = [];
|
|
733
|
-
for (let
|
|
718
|
+
for (let b = 0; b < x[0].length; b++)
|
|
734
719
|
x.forEach((C, M) => {
|
|
735
|
-
(
|
|
720
|
+
(b != h - c || M >= f) && w.push(C[b]);
|
|
736
721
|
});
|
|
737
722
|
return d(w.length == m), w;
|
|
738
723
|
}
|
|
739
724
|
// Draws the given sequence of 8-bit codewords (data and error correction) onto the entire
|
|
740
725
|
// data area of this QR Code. Function modules need to be marked off before this is called.
|
|
741
726
|
drawCodewords(a) {
|
|
742
|
-
if (a.length != Math.floor(
|
|
727
|
+
if (a.length != Math.floor(_.getNumRawDataModules(this.version) / 8))
|
|
743
728
|
throw new RangeError("Invalid argument");
|
|
744
729
|
let t = 0;
|
|
745
730
|
for (let s = this.size - 1; s >= 1; s -= 2) {
|
|
@@ -801,25 +786,25 @@ var U;
|
|
|
801
786
|
for (let c = 0; c < this.size; c++) {
|
|
802
787
|
let m = !1, f = 0, h = [0, 0, 0, 0, 0, 0, 0];
|
|
803
788
|
for (let x = 0; x < this.size; x++)
|
|
804
|
-
this.modules[c][x] == m ? (f++, f == 5 ? a +=
|
|
805
|
-
a += this.finderPenaltyTerminateAndCount(m, f, h) *
|
|
789
|
+
this.modules[c][x] == m ? (f++, f == 5 ? a += _.PENALTY_N1 : f > 5 && a++) : (this.finderPenaltyAddHistory(f, h), m || (a += this.finderPenaltyCountPatterns(h) * _.PENALTY_N3), m = this.modules[c][x], f = 1);
|
|
790
|
+
a += this.finderPenaltyTerminateAndCount(m, f, h) * _.PENALTY_N3;
|
|
806
791
|
}
|
|
807
792
|
for (let c = 0; c < this.size; c++) {
|
|
808
793
|
let m = !1, f = 0, h = [0, 0, 0, 0, 0, 0, 0];
|
|
809
794
|
for (let x = 0; x < this.size; x++)
|
|
810
|
-
this.modules[x][c] == m ? (f++, f == 5 ? a +=
|
|
811
|
-
a += this.finderPenaltyTerminateAndCount(m, f, h) *
|
|
795
|
+
this.modules[x][c] == m ? (f++, f == 5 ? a += _.PENALTY_N1 : f > 5 && a++) : (this.finderPenaltyAddHistory(f, h), m || (a += this.finderPenaltyCountPatterns(h) * _.PENALTY_N3), m = this.modules[x][c], f = 1);
|
|
796
|
+
a += this.finderPenaltyTerminateAndCount(m, f, h) * _.PENALTY_N3;
|
|
812
797
|
}
|
|
813
798
|
for (let c = 0; c < this.size - 1; c++)
|
|
814
799
|
for (let m = 0; m < this.size - 1; m++) {
|
|
815
800
|
const f = this.modules[c][m];
|
|
816
|
-
f == this.modules[c][m + 1] && f == this.modules[c + 1][m] && f == this.modules[c + 1][m + 1] && (a +=
|
|
801
|
+
f == this.modules[c][m + 1] && f == this.modules[c + 1][m] && f == this.modules[c + 1][m + 1] && (a += _.PENALTY_N2);
|
|
817
802
|
}
|
|
818
803
|
let t = 0;
|
|
819
804
|
for (const c of this.modules)
|
|
820
805
|
t = c.reduce((m, f) => m + (f ? 1 : 0), t);
|
|
821
806
|
const s = this.size * this.size, o = Math.ceil(Math.abs(t * 20 - s * 10) / s) - 1;
|
|
822
|
-
return d(0 <= o && o <= 9), a += o *
|
|
807
|
+
return d(0 <= o && o <= 9), a += o * _.PENALTY_N4, d(0 <= a && a <= 2568888), a;
|
|
823
808
|
}
|
|
824
809
|
/*-- Private helper functions --*/
|
|
825
810
|
// Returns an ascending list of positions of alignment patterns for this version number.
|
|
@@ -840,7 +825,7 @@ var U;
|
|
|
840
825
|
// all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.
|
|
841
826
|
// The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.
|
|
842
827
|
static getNumRawDataModules(a) {
|
|
843
|
-
if (a <
|
|
828
|
+
if (a < _.MIN_VERSION || a > _.MAX_VERSION)
|
|
844
829
|
throw new RangeError("Version number out of range");
|
|
845
830
|
let t = (16 * a + 128) * a + 64;
|
|
846
831
|
if (a >= 2) {
|
|
@@ -853,7 +838,7 @@ var U;
|
|
|
853
838
|
// QR Code of the given version number and error correction level, with remainder bits discarded.
|
|
854
839
|
// This stateless pure function could be implemented as a (40*4)-cell lookup table.
|
|
855
840
|
static getNumDataCodewords(a, t) {
|
|
856
|
-
return Math.floor(
|
|
841
|
+
return Math.floor(_.getNumRawDataModules(a) / 8) - _.ECC_CODEWORDS_PER_BLOCK[t.ordinal][a] * _.NUM_ERROR_CORRECTION_BLOCKS[t.ordinal][a];
|
|
857
842
|
}
|
|
858
843
|
// Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be
|
|
859
844
|
// implemented as a lookup table over all possible parameter values, instead of as an algorithm.
|
|
@@ -867,8 +852,8 @@ var U;
|
|
|
867
852
|
let s = 1;
|
|
868
853
|
for (let o = 0; o < a; o++) {
|
|
869
854
|
for (let c = 0; c < t.length; c++)
|
|
870
|
-
t[c] =
|
|
871
|
-
s =
|
|
855
|
+
t[c] = _.reedSolomonMultiply(t[c], s), c + 1 < t.length && (t[c] ^= t[c + 1]);
|
|
856
|
+
s = _.reedSolomonMultiply(s, 2);
|
|
872
857
|
}
|
|
873
858
|
return t;
|
|
874
859
|
}
|
|
@@ -877,7 +862,7 @@ var U;
|
|
|
877
862
|
let s = t.map((o) => 0);
|
|
878
863
|
for (const o of a) {
|
|
879
864
|
const c = o ^ s.shift();
|
|
880
|
-
s.push(0), t.forEach((m, f) => s[f] ^=
|
|
865
|
+
s.push(0), t.forEach((m, f) => s[f] ^= _.reedSolomonMultiply(m, c));
|
|
881
866
|
}
|
|
882
867
|
return s;
|
|
883
868
|
}
|
|
@@ -1085,12 +1070,12 @@ var V = U;
|
|
|
1085
1070
|
* Copyright (c) Paul O'Shannessy
|
|
1086
1071
|
* SPDX-License-Identifier: ISC
|
|
1087
1072
|
*/
|
|
1088
|
-
var
|
|
1073
|
+
var wr = {
|
|
1089
1074
|
L: V.QrCode.Ecc.LOW,
|
|
1090
1075
|
M: V.QrCode.Ecc.MEDIUM,
|
|
1091
1076
|
Q: V.QrCode.Ecc.QUARTILE,
|
|
1092
1077
|
H: V.QrCode.Ecc.HIGH
|
|
1093
|
-
}, Ve = 128, He = "L", Ke = "#FFFFFF", Ge = "#000000", Ye = !1, We = 1,
|
|
1078
|
+
}, Ve = 128, He = "L", Ke = "#FFFFFF", Ge = "#000000", Ye = !1, We = 1, Nr = 4, Sr = 0, Er = 0.1;
|
|
1094
1079
|
function Xe(e, i = 0) {
|
|
1095
1080
|
const r = [];
|
|
1096
1081
|
return e.forEach(function(l, d) {
|
|
@@ -1117,10 +1102,10 @@ function Xe(e, i = 0) {
|
|
|
1117
1102
|
function Ze(e, i) {
|
|
1118
1103
|
return e.slice().map((r, l) => l < i.y || l >= i.y + i.h ? r : r.map((d, u) => u < i.x || u >= i.x + i.w ? d : !1));
|
|
1119
1104
|
}
|
|
1120
|
-
function
|
|
1105
|
+
function Pr(e, i, r, l) {
|
|
1121
1106
|
if (l == null)
|
|
1122
1107
|
return null;
|
|
1123
|
-
const d = e.length + r * 2, u = Math.floor(i *
|
|
1108
|
+
const d = e.length + r * 2, u = Math.floor(i * Er), p = d / i, g = (l.width || u) * p, a = (l.height || u) * p, t = l.x == null ? e.length / 2 - g / 2 : l.x * p, s = l.y == null ? e.length / 2 - a / 2 : l.y * p, o = l.opacity == null ? 1 : l.opacity;
|
|
1124
1109
|
let c = null;
|
|
1125
1110
|
if (l.excavate) {
|
|
1126
1111
|
let f = Math.floor(t), h = Math.floor(s), x = Math.ceil(g + t - f), N = Math.ceil(a + s - h);
|
|
@@ -1129,8 +1114,8 @@ function Ar(e, i, r, l) {
|
|
|
1129
1114
|
const m = l.crossOrigin;
|
|
1130
1115
|
return { x: t, y: s, h: a, w: g, excavation: c, opacity: o, crossOrigin: m };
|
|
1131
1116
|
}
|
|
1132
|
-
function
|
|
1133
|
-
return i != null ? Math.max(Math.floor(i), 0) : e ?
|
|
1117
|
+
function Ar(e, i) {
|
|
1118
|
+
return i != null ? Math.max(Math.floor(i), 0) : e ? Nr : Sr;
|
|
1134
1119
|
}
|
|
1135
1120
|
function Je({
|
|
1136
1121
|
value: e,
|
|
@@ -1146,7 +1131,7 @@ function Je({
|
|
|
1146
1131
|
const f = (Array.isArray(e) ? e : [e]).reduce((h, x) => (h.push(...V.QrSegment.makeSegments(x)), h), []);
|
|
1147
1132
|
return V.QrCode.encodeSegments(
|
|
1148
1133
|
f,
|
|
1149
|
-
|
|
1134
|
+
wr[i],
|
|
1150
1135
|
r,
|
|
1151
1136
|
void 0,
|
|
1152
1137
|
void 0,
|
|
@@ -1155,7 +1140,7 @@ function Je({
|
|
|
1155
1140
|
}, [e, i, r, g]);
|
|
1156
1141
|
const { cells: t, margin: s, numCells: o, calculatedImageSettings: c } = A.useMemo(() => {
|
|
1157
1142
|
let m = a.getModules();
|
|
1158
|
-
const f =
|
|
1143
|
+
const f = Ar(l, d), h = m.length + f * 2, x = Pr(
|
|
1159
1144
|
m,
|
|
1160
1145
|
p,
|
|
1161
1146
|
f,
|
|
@@ -1176,14 +1161,14 @@ function Je({
|
|
|
1176
1161
|
calculatedImageSettings: c
|
|
1177
1162
|
};
|
|
1178
1163
|
}
|
|
1179
|
-
var
|
|
1164
|
+
var Mr = (function() {
|
|
1180
1165
|
try {
|
|
1181
1166
|
new Path2D().addPath(new Path2D());
|
|
1182
1167
|
} catch {
|
|
1183
1168
|
return !1;
|
|
1184
1169
|
}
|
|
1185
1170
|
return !0;
|
|
1186
|
-
})(),
|
|
1171
|
+
})(), Rr = A.forwardRef(
|
|
1187
1172
|
function(i, r) {
|
|
1188
1173
|
const l = i, {
|
|
1189
1174
|
value: d,
|
|
@@ -1196,7 +1181,7 @@ var Rr = (function() {
|
|
|
1196
1181
|
boostLevel: o,
|
|
1197
1182
|
marginSize: c,
|
|
1198
1183
|
imageSettings: m
|
|
1199
|
-
} = l, h =
|
|
1184
|
+
} = l, h = ae(l, [
|
|
1200
1185
|
"value",
|
|
1201
1186
|
"size",
|
|
1202
1187
|
"level",
|
|
@@ -1207,9 +1192,9 @@ var Rr = (function() {
|
|
|
1207
1192
|
"boostLevel",
|
|
1208
1193
|
"marginSize",
|
|
1209
1194
|
"imageSettings"
|
|
1210
|
-
]), { style: x } = h, N =
|
|
1195
|
+
]), { style: x } = h, N = ae(h, ["style"]), w = m?.src, b = A.useRef(null), C = A.useRef(null), M = A.useCallback(
|
|
1211
1196
|
(O) => {
|
|
1212
|
-
|
|
1197
|
+
b.current = O, typeof r == "function" ? r(O) : r && (r.current = O);
|
|
1213
1198
|
},
|
|
1214
1199
|
[r]
|
|
1215
1200
|
), [k, z] = A.useState(!1), { margin: F, cells: y, numCells: D, calculatedImageSettings: P } = Je({
|
|
@@ -1223,20 +1208,20 @@ var Rr = (function() {
|
|
|
1223
1208
|
size: u
|
|
1224
1209
|
});
|
|
1225
1210
|
A.useEffect(() => {
|
|
1226
|
-
if (
|
|
1227
|
-
const O =
|
|
1211
|
+
if (b.current != null) {
|
|
1212
|
+
const O = b.current, j = O.getContext("2d");
|
|
1228
1213
|
if (!j)
|
|
1229
1214
|
return;
|
|
1230
|
-
let
|
|
1215
|
+
let $ = y;
|
|
1231
1216
|
const I = C.current, G = P != null && I !== null && I.complete && I.naturalHeight !== 0 && I.naturalWidth !== 0;
|
|
1232
|
-
G && P.excavation != null && (
|
|
1217
|
+
G && P.excavation != null && ($ = Ze(
|
|
1233
1218
|
y,
|
|
1234
1219
|
P.excavation
|
|
1235
1220
|
));
|
|
1236
1221
|
const ve = window.devicePixelRatio || 1;
|
|
1237
1222
|
O.height = O.width = u * ve;
|
|
1238
1223
|
const ye = u / D * ve;
|
|
1239
|
-
j.scale(ye, ye), j.fillStyle = g, j.fillRect(0, 0, D, D), j.fillStyle = a,
|
|
1224
|
+
j.scale(ye, ye), j.fillStyle = g, j.fillRect(0, 0, D, D), j.fillStyle = a, Mr ? j.fill(new Path2D(Xe($, F))) : y.forEach(function(ct, dt) {
|
|
1240
1225
|
ct.forEach(function(ut, ft) {
|
|
1241
1226
|
ut && j.fillRect(ft + F, dt + F, 1, 1);
|
|
1242
1227
|
});
|
|
@@ -1251,9 +1236,9 @@ var Rr = (function() {
|
|
|
1251
1236
|
}), A.useEffect(() => {
|
|
1252
1237
|
z(!1);
|
|
1253
1238
|
}, [w]);
|
|
1254
|
-
const W =
|
|
1255
|
-
let
|
|
1256
|
-
return w != null && (
|
|
1239
|
+
const W = se({ height: u, width: u }, x);
|
|
1240
|
+
let q = null;
|
|
1241
|
+
return w != null && (q = /* @__PURE__ */ A.createElement(
|
|
1257
1242
|
"img",
|
|
1258
1243
|
{
|
|
1259
1244
|
src: w,
|
|
@@ -1267,17 +1252,17 @@ var Rr = (function() {
|
|
|
1267
1252
|
}
|
|
1268
1253
|
)), /* @__PURE__ */ A.createElement(A.Fragment, null, /* @__PURE__ */ A.createElement(
|
|
1269
1254
|
"canvas",
|
|
1270
|
-
|
|
1255
|
+
se({
|
|
1271
1256
|
style: W,
|
|
1272
1257
|
height: u,
|
|
1273
1258
|
width: u,
|
|
1274
1259
|
ref: M,
|
|
1275
1260
|
role: "img"
|
|
1276
1261
|
}, N)
|
|
1277
|
-
),
|
|
1262
|
+
), q);
|
|
1278
1263
|
}
|
|
1279
1264
|
);
|
|
1280
|
-
|
|
1265
|
+
Rr.displayName = "QRCodeCanvas";
|
|
1281
1266
|
var et = A.forwardRef(
|
|
1282
1267
|
function(i, r) {
|
|
1283
1268
|
const l = i, {
|
|
@@ -1292,7 +1277,7 @@ var et = A.forwardRef(
|
|
|
1292
1277
|
title: c,
|
|
1293
1278
|
marginSize: m,
|
|
1294
1279
|
imageSettings: f
|
|
1295
|
-
} = l, h =
|
|
1280
|
+
} = l, h = ae(l, [
|
|
1296
1281
|
"value",
|
|
1297
1282
|
"size",
|
|
1298
1283
|
"level",
|
|
@@ -1304,7 +1289,7 @@ var et = A.forwardRef(
|
|
|
1304
1289
|
"title",
|
|
1305
1290
|
"marginSize",
|
|
1306
1291
|
"imageSettings"
|
|
1307
|
-
]), { margin: x, cells: N, numCells: w, calculatedImageSettings:
|
|
1292
|
+
]), { margin: x, cells: N, numCells: w, calculatedImageSettings: b } = Je({
|
|
1308
1293
|
value: d,
|
|
1309
1294
|
level: p,
|
|
1310
1295
|
minVersion: s,
|
|
@@ -1315,26 +1300,26 @@ var et = A.forwardRef(
|
|
|
1315
1300
|
size: u
|
|
1316
1301
|
});
|
|
1317
1302
|
let C = N, M = null;
|
|
1318
|
-
f != null &&
|
|
1303
|
+
f != null && b != null && (b.excavation != null && (C = Ze(
|
|
1319
1304
|
N,
|
|
1320
|
-
|
|
1305
|
+
b.excavation
|
|
1321
1306
|
)), M = /* @__PURE__ */ A.createElement(
|
|
1322
1307
|
"image",
|
|
1323
1308
|
{
|
|
1324
1309
|
href: f.src,
|
|
1325
|
-
height:
|
|
1326
|
-
width:
|
|
1327
|
-
x:
|
|
1328
|
-
y:
|
|
1310
|
+
height: b.h,
|
|
1311
|
+
width: b.w,
|
|
1312
|
+
x: b.x + x,
|
|
1313
|
+
y: b.y + x,
|
|
1329
1314
|
preserveAspectRatio: "none",
|
|
1330
|
-
opacity:
|
|
1331
|
-
crossOrigin:
|
|
1315
|
+
opacity: b.opacity,
|
|
1316
|
+
crossOrigin: b.crossOrigin
|
|
1332
1317
|
}
|
|
1333
1318
|
));
|
|
1334
1319
|
const k = Xe(C, x);
|
|
1335
1320
|
return /* @__PURE__ */ A.createElement(
|
|
1336
1321
|
"svg",
|
|
1337
|
-
|
|
1322
|
+
se({
|
|
1338
1323
|
height: u,
|
|
1339
1324
|
width: u,
|
|
1340
1325
|
viewBox: `0 0 ${w} ${w}`,
|
|
@@ -1356,10 +1341,10 @@ var et = A.forwardRef(
|
|
|
1356
1341
|
}
|
|
1357
1342
|
);
|
|
1358
1343
|
et.displayName = "QRCodeSVG";
|
|
1359
|
-
function
|
|
1344
|
+
function Fr(e, i) {
|
|
1360
1345
|
ue({ title: e, type: i });
|
|
1361
1346
|
}
|
|
1362
|
-
function
|
|
1347
|
+
function Ir({
|
|
1363
1348
|
onToast: e,
|
|
1364
1349
|
/* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */
|
|
1365
1350
|
background: i,
|
|
@@ -1370,7 +1355,7 @@ function Lr({
|
|
|
1370
1355
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1371
1356
|
...p
|
|
1372
1357
|
}) {
|
|
1373
|
-
const { currentSlug: g } = de(), a = e ??
|
|
1358
|
+
const { currentSlug: g } = de(), a = e ?? Fr, t = g.split("/")[1], s = t !== void 0, { data: o } = Ae(), c = o?.id, m = o === void 0;
|
|
1374
1359
|
return /* @__PURE__ */ n.jsx("div", { ...p, children: /* @__PURE__ */ n.jsx(Ft, { children: /* @__PURE__ */ n.jsx(It, { children: /* @__PURE__ */ n.jsx(Lt, { children: s ? /* @__PURE__ */ n.jsx(
|
|
1375
1360
|
kt,
|
|
1376
1361
|
{
|
|
@@ -1386,17 +1371,17 @@ function Lr({
|
|
|
1386
1371
|
}
|
|
1387
1372
|
) }) }) }) });
|
|
1388
1373
|
}
|
|
1389
|
-
const
|
|
1374
|
+
const ie = "profile/", Lr = /* @__PURE__ */ new Set(["orders", "subscriptions"]);
|
|
1390
1375
|
function Pe(e) {
|
|
1391
|
-
return e.startsWith(
|
|
1376
|
+
return e.startsWith(ie) ? e.slice(ie.length) : e;
|
|
1392
1377
|
}
|
|
1393
|
-
function
|
|
1378
|
+
function kr({
|
|
1394
1379
|
children: e
|
|
1395
1380
|
}) {
|
|
1396
1381
|
const { currentSlug: i, previousSlug: r, navigate: l } = de();
|
|
1397
1382
|
function d(u) {
|
|
1398
1383
|
const p = u.split("/")[0] ?? "";
|
|
1399
|
-
l(
|
|
1384
|
+
l(Lr.has(p) ? `${ie}${u}` : u);
|
|
1400
1385
|
}
|
|
1401
1386
|
return /* @__PURE__ */ n.jsx(
|
|
1402
1387
|
xt,
|
|
@@ -1413,7 +1398,7 @@ function Dr({
|
|
|
1413
1398
|
function tt() {
|
|
1414
1399
|
const e = St();
|
|
1415
1400
|
return Q({
|
|
1416
|
-
queryKey:
|
|
1401
|
+
queryKey: _t.languages(),
|
|
1417
1402
|
queryFn: async () => {
|
|
1418
1403
|
const i = [];
|
|
1419
1404
|
let r;
|
|
@@ -1432,7 +1417,7 @@ function tt() {
|
|
|
1432
1417
|
});
|
|
1433
1418
|
}
|
|
1434
1419
|
function rt() {
|
|
1435
|
-
const e =
|
|
1420
|
+
const e = bt(), i = H(), { setLocale: r } = T();
|
|
1436
1421
|
return K({
|
|
1437
1422
|
mutationFn: (l) => e.updateAccount({ account: l }),
|
|
1438
1423
|
onSuccess: (l, d) => {
|
|
@@ -1440,12 +1425,12 @@ function rt() {
|
|
|
1440
1425
|
}
|
|
1441
1426
|
});
|
|
1442
1427
|
}
|
|
1443
|
-
function
|
|
1428
|
+
function Dr({
|
|
1444
1429
|
account: e,
|
|
1445
1430
|
onClose: i
|
|
1446
1431
|
}) {
|
|
1447
|
-
const { t: r } = R(), { isMobile: l } = Y(), d = me(), u = tt(), p = rt(), g = d.data?.allow_name_edit === !1, a =
|
|
1448
|
-
|
|
1432
|
+
const { t: r } = R(), { isMobile: l } = Y(), d = me(), u = tt(), p = rt(), g = d.data?.allow_name_edit === !1, a = Wt(
|
|
1433
|
+
ne({
|
|
1449
1434
|
first_name: g ? L() : L().min(1, r("first_name_is_required")),
|
|
1450
1435
|
last_name: g ? L() : L().min(1, r("last_name_is_required")),
|
|
1451
1436
|
phone_number: L().optional(),
|
|
@@ -1476,7 +1461,7 @@ function Or({
|
|
|
1476
1461
|
}
|
|
1477
1462
|
});
|
|
1478
1463
|
return /* @__PURE__ */ n.jsx(
|
|
1479
|
-
|
|
1464
|
+
jr,
|
|
1480
1465
|
{
|
|
1481
1466
|
control: a.control,
|
|
1482
1467
|
isOpen: !0,
|
|
@@ -1514,7 +1499,7 @@ function nt(e) {
|
|
|
1514
1499
|
enabled: e
|
|
1515
1500
|
});
|
|
1516
1501
|
}
|
|
1517
|
-
function
|
|
1502
|
+
function Or() {
|
|
1518
1503
|
const e = B(), i = H();
|
|
1519
1504
|
return K({
|
|
1520
1505
|
mutationFn: async ({
|
|
@@ -1527,7 +1512,7 @@ function zr() {
|
|
|
1527
1512
|
onSuccess: () => i.invalidateQueries({ queryKey: pe })
|
|
1528
1513
|
});
|
|
1529
1514
|
}
|
|
1530
|
-
function
|
|
1515
|
+
function zr() {
|
|
1531
1516
|
const e = B(), i = H();
|
|
1532
1517
|
return K({
|
|
1533
1518
|
mutationFn: (r) => e.deleteAddress(r),
|
|
@@ -1555,7 +1540,7 @@ function st({
|
|
|
1555
1540
|
selectedAddress: r,
|
|
1556
1541
|
onAddressCreated: l
|
|
1557
1542
|
}) {
|
|
1558
|
-
const { t: d } = R(), { isMobile: u } = Y(), { locale: p } = T(), g = nt(e), a = ge(), t =
|
|
1543
|
+
const { t: d } = R(), { isMobile: u } = Y(), { locale: p } = T(), g = nt(e), a = ge(), t = Or(), s = v.useCallback(
|
|
1559
1544
|
(o) => Promise.resolve(
|
|
1560
1545
|
g.data?.countries.find((c) => c.code === o)?.states.map((c) => ({
|
|
1561
1546
|
name: c.name,
|
|
@@ -1616,8 +1601,8 @@ function st({
|
|
|
1616
1601
|
}
|
|
1617
1602
|
);
|
|
1618
1603
|
}
|
|
1619
|
-
function
|
|
1620
|
-
const { t: e } = R(), i = ge(), r =
|
|
1604
|
+
function Tr() {
|
|
1605
|
+
const { t: e } = R(), i = ge(), r = zr(), l = v.useRef(null), [d, u] = v.useState(), [p, g] = v.useState(null);
|
|
1621
1606
|
if (i.error) throw i.error;
|
|
1622
1607
|
function a() {
|
|
1623
1608
|
requestAnimationFrame(() => l.current?.focus());
|
|
@@ -1642,7 +1627,7 @@ function Br() {
|
|
|
1642
1627
|
/* @__PURE__ */ n.jsxs("div", { className: "space-y-1 text-sm", children: [
|
|
1643
1628
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
1644
1629
|
/* @__PURE__ */ n.jsx("p", { className: "font-medium", children: t.name }),
|
|
1645
|
-
t.default && /* @__PURE__ */ n.jsx(
|
|
1630
|
+
t.default && /* @__PURE__ */ n.jsx(Ie, { variant: "secondary", children: e("default") })
|
|
1646
1631
|
] }),
|
|
1647
1632
|
/* @__PURE__ */ n.jsx("p", { children: t.street1 }),
|
|
1648
1633
|
t.street2 && /* @__PURE__ */ n.jsx("p", { children: t.street2 }),
|
|
@@ -1726,7 +1711,7 @@ function at() {
|
|
|
1726
1711
|
}
|
|
1727
1712
|
});
|
|
1728
1713
|
}
|
|
1729
|
-
function
|
|
1714
|
+
function Br() {
|
|
1730
1715
|
const { t: e } = R(), { locale: i } = T(), r = at(), l = me();
|
|
1731
1716
|
if (r.error) throw r.error;
|
|
1732
1717
|
if (r.isPending || !l.data)
|
|
@@ -1771,7 +1756,7 @@ function Ur() {
|
|
|
1771
1756
|
] })
|
|
1772
1757
|
] });
|
|
1773
1758
|
}
|
|
1774
|
-
function
|
|
1759
|
+
function Ur({
|
|
1775
1760
|
children: e
|
|
1776
1761
|
}) {
|
|
1777
1762
|
const i = v.useRef(null), [r, l] = v.useState(null);
|
|
@@ -1787,18 +1772,18 @@ function Qr({
|
|
|
1787
1772
|
)
|
|
1788
1773
|
] });
|
|
1789
1774
|
}
|
|
1790
|
-
function
|
|
1775
|
+
function Qr({
|
|
1791
1776
|
onClose: e
|
|
1792
1777
|
}) {
|
|
1793
1778
|
const i = ge(), { t: r } = R(), { isMobile: l } = Y();
|
|
1794
|
-
return /* @__PURE__ */ n.jsx(
|
|
1779
|
+
return /* @__PURE__ */ n.jsx(Ur, { children: i.data ? /* @__PURE__ */ n.jsx(
|
|
1795
1780
|
qr,
|
|
1796
1781
|
{
|
|
1797
1782
|
initialAddresses: i.data.addresses,
|
|
1798
1783
|
onClose: e
|
|
1799
1784
|
}
|
|
1800
1785
|
) : /* @__PURE__ */ n.jsxs(
|
|
1801
|
-
|
|
1786
|
+
Le,
|
|
1802
1787
|
{
|
|
1803
1788
|
open: !0,
|
|
1804
1789
|
onOpenChange: (d) => {
|
|
@@ -1830,7 +1815,7 @@ function qr({
|
|
|
1830
1815
|
() => e.map(xe)
|
|
1831
1816
|
);
|
|
1832
1817
|
async function s() {
|
|
1833
|
-
await u.invalidateQueries({ queryKey:
|
|
1818
|
+
await u.invalidateQueries({ queryKey: Z.paymentMethods.all }), i();
|
|
1834
1819
|
}
|
|
1835
1820
|
const o = Bt({
|
|
1836
1821
|
payApi: d,
|
|
@@ -1844,7 +1829,7 @@ function qr({
|
|
|
1844
1829
|
payment_method: {
|
|
1845
1830
|
...m.payment_method,
|
|
1846
1831
|
type: "card",
|
|
1847
|
-
token_provider:
|
|
1832
|
+
token_provider: qt,
|
|
1848
1833
|
default: m.set_as_default
|
|
1849
1834
|
},
|
|
1850
1835
|
billing_address_id: m.billing_address_id,
|
|
@@ -1855,7 +1840,7 @@ function qr({
|
|
|
1855
1840
|
},
|
|
1856
1841
|
onError: () => g(r("failed_to_add_payment_method"))
|
|
1857
1842
|
});
|
|
1858
|
-
return /* @__PURE__ */ n.jsxs(
|
|
1843
|
+
return /* @__PURE__ */ n.jsxs($t, { api: a, children: [
|
|
1859
1844
|
/* @__PURE__ */ n.jsx(
|
|
1860
1845
|
Vt,
|
|
1861
1846
|
{
|
|
@@ -1895,7 +1880,7 @@ function qr({
|
|
|
1895
1880
|
function it() {
|
|
1896
1881
|
const e = B();
|
|
1897
1882
|
return Q({
|
|
1898
|
-
queryKey:
|
|
1883
|
+
queryKey: Z.paymentMethods.list(),
|
|
1899
1884
|
queryFn: () => e.fetchPaymentMethods()
|
|
1900
1885
|
});
|
|
1901
1886
|
}
|
|
@@ -1903,17 +1888,17 @@ function ot() {
|
|
|
1903
1888
|
const e = B(), i = H();
|
|
1904
1889
|
return K({
|
|
1905
1890
|
mutationFn: ({ id: r, body: l }) => e.updatePaymentMethod(r, l),
|
|
1906
|
-
onSuccess: () => i.invalidateQueries({ queryKey:
|
|
1891
|
+
onSuccess: () => i.invalidateQueries({ queryKey: Z.paymentMethods.all })
|
|
1907
1892
|
});
|
|
1908
1893
|
}
|
|
1909
|
-
function
|
|
1894
|
+
function $r() {
|
|
1910
1895
|
const e = B(), i = H();
|
|
1911
1896
|
return K({
|
|
1912
1897
|
mutationFn: (r) => e.deletePaymentMethod(r),
|
|
1913
|
-
onSuccess: () => i.invalidateQueries({ queryKey:
|
|
1898
|
+
onSuccess: () => i.invalidateQueries({ queryKey: Z.paymentMethods.all })
|
|
1914
1899
|
});
|
|
1915
1900
|
}
|
|
1916
|
-
function
|
|
1901
|
+
function Vr({
|
|
1917
1902
|
card: e,
|
|
1918
1903
|
onClose: i
|
|
1919
1904
|
}) {
|
|
@@ -1972,8 +1957,8 @@ function Hr({
|
|
|
1972
1957
|
}
|
|
1973
1958
|
);
|
|
1974
1959
|
}
|
|
1975
|
-
function
|
|
1976
|
-
const { t: e } = R(), { preview: i } = fe(), r = it(), l = ot(), d =
|
|
1960
|
+
function Hr() {
|
|
1961
|
+
const { t: e } = R(), { preview: i } = fe(), r = it(), l = ot(), d = $r(), u = v.useRef(null), p = v.useRef(null), [g, a] = v.useState(!1), [t, s] = v.useState(null), [o, c] = v.useState(null);
|
|
1977
1962
|
function m() {
|
|
1978
1963
|
requestAnimationFrame(() => {
|
|
1979
1964
|
(u.current?.isConnected ? u.current : p.current?.querySelector("button") ?? p.current)?.focus();
|
|
@@ -2014,7 +1999,7 @@ function Kr() {
|
|
|
2014
1999
|
brand: f.brand || e("card_fallback"),
|
|
2015
2000
|
lastFour: f.last_four
|
|
2016
2001
|
}) }),
|
|
2017
|
-
f.default && /* @__PURE__ */ n.jsx(
|
|
2002
|
+
f.default && /* @__PURE__ */ n.jsx(Ie, { variant: "secondary", children: e("default") })
|
|
2018
2003
|
] }),
|
|
2019
2004
|
f.exp_month !== null && f.exp_year !== null && /* @__PURE__ */ n.jsxs("p", { className: "text-muted-foreground text-sm", children: [
|
|
2020
2005
|
e("card_expires"),
|
|
@@ -2080,7 +2065,7 @@ function Kr() {
|
|
|
2080
2065
|
}
|
|
2081
2066
|
),
|
|
2082
2067
|
g && /* @__PURE__ */ n.jsx(
|
|
2083
|
-
|
|
2068
|
+
Qr,
|
|
2084
2069
|
{
|
|
2085
2070
|
onClose: () => {
|
|
2086
2071
|
a(!1), m();
|
|
@@ -2088,7 +2073,7 @@ function Kr() {
|
|
|
2088
2073
|
}
|
|
2089
2074
|
),
|
|
2090
2075
|
t && /* @__PURE__ */ n.jsx(
|
|
2091
|
-
|
|
2076
|
+
Vr,
|
|
2092
2077
|
{
|
|
2093
2078
|
card: t,
|
|
2094
2079
|
onClose: () => {
|
|
@@ -2121,7 +2106,7 @@ function Kr() {
|
|
|
2121
2106
|
}
|
|
2122
2107
|
);
|
|
2123
2108
|
}
|
|
2124
|
-
function
|
|
2109
|
+
function be({
|
|
2125
2110
|
icon: e,
|
|
2126
2111
|
label: i,
|
|
2127
2112
|
detail: r,
|
|
@@ -2160,7 +2145,7 @@ function _e({
|
|
|
2160
2145
|
}
|
|
2161
2146
|
);
|
|
2162
2147
|
}
|
|
2163
|
-
function
|
|
2148
|
+
function _e({
|
|
2164
2149
|
message: e,
|
|
2165
2150
|
retryLabel: i,
|
|
2166
2151
|
isRetrying: r,
|
|
@@ -2180,13 +2165,13 @@ function be({
|
|
|
2180
2165
|
)
|
|
2181
2166
|
] });
|
|
2182
2167
|
}
|
|
2183
|
-
function
|
|
2168
|
+
function Kr({
|
|
2184
2169
|
onOpen: e,
|
|
2185
2170
|
triggerRef: i
|
|
2186
2171
|
}) {
|
|
2187
2172
|
const { t: r } = R(), l = it(), d = l.data?.payment_methods.find((u) => u.default);
|
|
2188
2173
|
return l.error ? /* @__PURE__ */ n.jsx(
|
|
2189
|
-
|
|
2174
|
+
_e,
|
|
2190
2175
|
{
|
|
2191
2176
|
message: r("profile_payments_load_failed"),
|
|
2192
2177
|
retryLabel: r("profile_payments_retry"),
|
|
@@ -2194,7 +2179,7 @@ function Gr({
|
|
|
2194
2179
|
onRetry: () => void l.refetch()
|
|
2195
2180
|
}
|
|
2196
2181
|
) : /* @__PURE__ */ n.jsx(
|
|
2197
|
-
|
|
2182
|
+
be,
|
|
2198
2183
|
{
|
|
2199
2184
|
icon: Fe,
|
|
2200
2185
|
label: r("profile_default_payment"),
|
|
@@ -2219,24 +2204,24 @@ function lt(e, i, r) {
|
|
|
2219
2204
|
return new Intl.DateTimeFormat("en-US", l).format(e);
|
|
2220
2205
|
}
|
|
2221
2206
|
}
|
|
2222
|
-
function
|
|
2207
|
+
function Gr(e, i) {
|
|
2223
2208
|
if (!e) return null;
|
|
2224
2209
|
const r = new Date(e);
|
|
2225
2210
|
return Number.isNaN(r.getTime()) ? null : lt(r, i);
|
|
2226
2211
|
}
|
|
2227
|
-
function
|
|
2212
|
+
function Yr(e, i) {
|
|
2228
2213
|
if (!e) return null;
|
|
2229
2214
|
const r = /* @__PURE__ */ new Date(`${e.slice(0, 10)}T00:00:00Z`);
|
|
2230
2215
|
return Number.isNaN(r.getTime()) ? null : lt(r, i, "UTC");
|
|
2231
2216
|
}
|
|
2232
|
-
const
|
|
2233
|
-
subscription:
|
|
2217
|
+
const Wr = ne({
|
|
2218
|
+
subscription: ne({
|
|
2234
2219
|
token: L(),
|
|
2235
2220
|
plan_name: L().nullish(),
|
|
2236
2221
|
next_billing_date: L().nullish()
|
|
2237
2222
|
}).nullish()
|
|
2238
2223
|
});
|
|
2239
|
-
async function
|
|
2224
|
+
async function Xr(e = Ct) {
|
|
2240
2225
|
const i = await e(
|
|
2241
2226
|
"/api/member-storefront/subscriptions/next",
|
|
2242
2227
|
{
|
|
@@ -2246,35 +2231,35 @@ async function Zr(e = Ct) {
|
|
|
2246
2231
|
);
|
|
2247
2232
|
if (!i.ok)
|
|
2248
2233
|
throw new Error(`Next subscription request failed (${i.status})`);
|
|
2249
|
-
const { subscription: r } =
|
|
2234
|
+
const { subscription: r } = Wr.parse(await i.json());
|
|
2250
2235
|
return r ? {
|
|
2251
2236
|
token: r.token,
|
|
2252
2237
|
planName: r.plan_name ?? null,
|
|
2253
2238
|
nextBillingDate: r.next_billing_date ?? null
|
|
2254
2239
|
} : null;
|
|
2255
2240
|
}
|
|
2256
|
-
function
|
|
2241
|
+
function Zr() {
|
|
2257
2242
|
const e = Jt(), i = v.useMemo(() => Et(e), [e]);
|
|
2258
2243
|
return Q({
|
|
2259
2244
|
queryKey: ["memberStorefront", "profile", "latest-order"],
|
|
2260
2245
|
queryFn: async () => (await i.fetchCustomerOrders({ limit: 1 })).orders[0] ?? null
|
|
2261
2246
|
});
|
|
2262
2247
|
}
|
|
2263
|
-
function
|
|
2248
|
+
function Jr() {
|
|
2264
2249
|
const { fetch: e } = fe();
|
|
2265
2250
|
return Q({
|
|
2266
2251
|
queryKey: ["memberStorefront", "profile", "next-subscription"],
|
|
2267
|
-
queryFn: () =>
|
|
2252
|
+
queryFn: () => Xr(e)
|
|
2268
2253
|
});
|
|
2269
2254
|
}
|
|
2270
|
-
function
|
|
2255
|
+
function en({
|
|
2271
2256
|
onOpen: e,
|
|
2272
2257
|
triggerRef: i
|
|
2273
2258
|
}) {
|
|
2274
|
-
const { t: r } = R(), { locale: l } = T(), d =
|
|
2259
|
+
const { t: r } = R(), { locale: l } = T(), d = Zr();
|
|
2275
2260
|
if (d.error)
|
|
2276
2261
|
return /* @__PURE__ */ n.jsx(
|
|
2277
|
-
|
|
2262
|
+
_e,
|
|
2278
2263
|
{
|
|
2279
2264
|
message: r("profile_orders_load_failed"),
|
|
2280
2265
|
retryLabel: r("profile_orders_retry"),
|
|
@@ -2284,10 +2269,10 @@ function tn({
|
|
|
2284
2269
|
);
|
|
2285
2270
|
const u = d.data, p = d.isPending ? r("profile_loading") : u ? [
|
|
2286
2271
|
u.order_number ? `#${u.order_number}` : null,
|
|
2287
|
-
|
|
2272
|
+
Gr(u.created_at, l)
|
|
2288
2273
|
].filter(Boolean).join(" · ") || r("profile_view_orders") : r("profile_no_orders");
|
|
2289
2274
|
return /* @__PURE__ */ n.jsx(
|
|
2290
|
-
|
|
2275
|
+
be,
|
|
2291
2276
|
{
|
|
2292
2277
|
icon: ke,
|
|
2293
2278
|
label: r("profile_latest_order"),
|
|
@@ -2298,14 +2283,14 @@ function tn({
|
|
|
2298
2283
|
}
|
|
2299
2284
|
);
|
|
2300
2285
|
}
|
|
2301
|
-
function
|
|
2286
|
+
function tn({
|
|
2302
2287
|
onOpen: e,
|
|
2303
2288
|
triggerRef: i
|
|
2304
2289
|
}) {
|
|
2305
|
-
const { t: r } = R(), { locale: l } = T(), d =
|
|
2290
|
+
const { t: r } = R(), { locale: l } = T(), d = Jr();
|
|
2306
2291
|
if (d.error)
|
|
2307
2292
|
return /* @__PURE__ */ n.jsx(
|
|
2308
|
-
|
|
2293
|
+
_e,
|
|
2309
2294
|
{
|
|
2310
2295
|
message: r("profile_subscription_load_failed"),
|
|
2311
2296
|
retryLabel: r("profile_subscription_retry"),
|
|
@@ -2313,12 +2298,12 @@ function rn({
|
|
|
2313
2298
|
onRetry: () => void d.refetch()
|
|
2314
2299
|
}
|
|
2315
2300
|
);
|
|
2316
|
-
const u = d.data, p =
|
|
2301
|
+
const u = d.data, p = Yr(u?.nextBillingDate, l), g = d.isPending ? r("profile_loading") : u ? [
|
|
2317
2302
|
u.planName,
|
|
2318
2303
|
p ? r("profile_next_bill_on", { date: p }) : null
|
|
2319
2304
|
].filter(Boolean).join(" · ") || r("profile_view_subscriptions") : r("profile_no_next_subscription");
|
|
2320
2305
|
return /* @__PURE__ */ n.jsx(
|
|
2321
|
-
|
|
2306
|
+
be,
|
|
2322
2307
|
{
|
|
2323
2308
|
icon: De,
|
|
2324
2309
|
label: r("profile_next_subscription"),
|
|
@@ -2329,7 +2314,7 @@ function rn({
|
|
|
2329
2314
|
}
|
|
2330
2315
|
);
|
|
2331
2316
|
}
|
|
2332
|
-
function
|
|
2317
|
+
function rn({
|
|
2333
2318
|
onOpenPayment: e,
|
|
2334
2319
|
paymentTriggerRef: i,
|
|
2335
2320
|
onOpenOrder: r,
|
|
@@ -2342,15 +2327,15 @@ function nn({
|
|
|
2342
2327
|
/* @__PURE__ */ n.jsx("h2", { className: "text-muted-foreground text-sm font-medium", children: p("profile_at_a_glance") }),
|
|
2343
2328
|
/* @__PURE__ */ n.jsxs("div", { className: "space-y-3", children: [
|
|
2344
2329
|
/* @__PURE__ */ n.jsx(
|
|
2345
|
-
|
|
2330
|
+
Kr,
|
|
2346
2331
|
{
|
|
2347
2332
|
onOpen: e,
|
|
2348
2333
|
triggerRef: i
|
|
2349
2334
|
}
|
|
2350
2335
|
),
|
|
2351
|
-
/* @__PURE__ */ n.jsx(
|
|
2336
|
+
/* @__PURE__ */ n.jsx(en, { onOpen: r, triggerRef: l }),
|
|
2352
2337
|
/* @__PURE__ */ n.jsx(
|
|
2353
|
-
|
|
2338
|
+
tn,
|
|
2354
2339
|
{
|
|
2355
2340
|
onOpen: d,
|
|
2356
2341
|
triggerRef: u
|
|
@@ -2359,7 +2344,7 @@ function nn({
|
|
|
2359
2344
|
] })
|
|
2360
2345
|
] });
|
|
2361
2346
|
}
|
|
2362
|
-
function
|
|
2347
|
+
function nn({
|
|
2363
2348
|
initialLanguage: e
|
|
2364
2349
|
}) {
|
|
2365
2350
|
const { t: i } = R(), r = tt(), l = rt(), [d, u] = v.useState(e);
|
|
@@ -2409,17 +2394,17 @@ function sn({
|
|
|
2409
2394
|
}
|
|
2410
2395
|
);
|
|
2411
2396
|
}
|
|
2412
|
-
function
|
|
2397
|
+
function sn() {
|
|
2413
2398
|
const { t: e } = R(), i = Ae(), r = me(), { currentSlug: l, navigate: d } = de(), { preview: u } = fe(), p = at(), { locale: g } = T(), a = v.useRef(""), t = v.useRef({});
|
|
2414
2399
|
if (i.error) throw i.error;
|
|
2415
2400
|
if (r.error) throw r.error;
|
|
2416
2401
|
if (!i.data || !r.data)
|
|
2417
2402
|
return /* @__PURE__ */ n.jsx("p", { role: "status", className: "text-muted-foreground p-6", children: e("profile_loading") });
|
|
2418
|
-
const s = i.data, o = `${s.first_name} ${s.last_name}`.trim() || e("account_fallback"), c = Gt(s), m = l === "profile/language", f = l === "profile/addresses", h = l === "profile/payment-methods", x = l === "profile/points", N = l === "profile/orders" || l.startsWith("profile/orders/"), w = l === "profile/subscriptions" || l.startsWith("profile/subscriptions/"),
|
|
2403
|
+
const s = i.data, o = `${s.first_name} ${s.last_name}`.trim() || e("account_fallback"), c = Gt(s), m = l === "profile/language", f = l === "profile/addresses", h = l === "profile/payment-methods", x = l === "profile/points", N = l === "profile/orders" || l.startsWith("profile/orders/"), w = l === "profile/subscriptions" || l.startsWith("profile/subscriptions/"), b = N || w, C = l === "profile/orders" || l === "profile/subscriptions", M = r.data.reward_points_label_plural, k = M.charAt(0).toLocaleUpperCase(g) + M.slice(1), z = [
|
|
2419
2404
|
{
|
|
2420
2405
|
slug: "profile/information",
|
|
2421
2406
|
label: e("personal_information"),
|
|
2422
|
-
icon:
|
|
2407
|
+
icon: or,
|
|
2423
2408
|
dialog: !0
|
|
2424
2409
|
},
|
|
2425
2410
|
{
|
|
@@ -2441,14 +2426,14 @@ function an() {
|
|
|
2441
2426
|
{
|
|
2442
2427
|
slug: "profile/language",
|
|
2443
2428
|
label: e("language"),
|
|
2444
|
-
icon:
|
|
2429
|
+
icon: tr,
|
|
2445
2430
|
value: s.language_iso?.toUpperCase()
|
|
2446
2431
|
},
|
|
2447
2432
|
...p.data ? [
|
|
2448
2433
|
{
|
|
2449
2434
|
slug: "profile/points",
|
|
2450
2435
|
label: k,
|
|
2451
|
-
icon:
|
|
2436
|
+
icon: ar,
|
|
2452
2437
|
value: new Intl.NumberFormat(g).format(
|
|
2453
2438
|
p.data.points_ledgers[0]?.total_balance ?? 0
|
|
2454
2439
|
)
|
|
@@ -2463,12 +2448,12 @@ function an() {
|
|
|
2463
2448
|
}
|
|
2464
2449
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2465
2450
|
/* @__PURE__ */ n.jsx(Nt, { children: /* @__PURE__ */ n.jsx("span", { className: "text-lg font-semibold", children: e("breadcrumb") }) }),
|
|
2466
|
-
|
|
2451
|
+
b ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2467
2452
|
C && /* @__PURE__ */ n.jsx("div", { className: "px-5 pt-6 md:px-8", children: /* @__PURE__ */ n.jsxs(E, { variant: "ghost", onClick: F, children: [
|
|
2468
2453
|
/* @__PURE__ */ n.jsx(Ce, { "aria-hidden": "true", className: "size-4" }),
|
|
2469
2454
|
e("profile_back")
|
|
2470
2455
|
] }) }),
|
|
2471
|
-
/* @__PURE__ */ n.jsx(
|
|
2456
|
+
/* @__PURE__ */ n.jsx(kr, { children: N ? /* @__PURE__ */ n.jsx(At, {}) : /* @__PURE__ */ n.jsx(Ir, {}) })
|
|
2472
2457
|
] }) : /* @__PURE__ */ n.jsxs("main", { className: "mx-auto w-full max-w-3xl space-y-8 p-4 sm:p-8", children: [
|
|
2473
2458
|
m || f || x || h ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2474
2459
|
/* @__PURE__ */ n.jsxs(E, { variant: "ghost", onClick: F, children: [
|
|
@@ -2478,7 +2463,7 @@ function an() {
|
|
|
2478
2463
|
/* @__PURE__ */ n.jsx("h1", { className: "text-2xl font-semibold", children: x ? k : e(
|
|
2479
2464
|
h ? "payment_methods" : f ? "shipping_addresses" : "language"
|
|
2480
2465
|
) }),
|
|
2481
|
-
h ? /* @__PURE__ */ n.jsx(
|
|
2466
|
+
h ? /* @__PURE__ */ n.jsx(Hr, {}) : f ? /* @__PURE__ */ n.jsx(Tr, {}) : x ? /* @__PURE__ */ n.jsx(Br, {}) : /* @__PURE__ */ n.jsx(nn, { initialLanguage: s.language_iso ?? "" })
|
|
2482
2467
|
] }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2483
2468
|
/* @__PURE__ */ n.jsxs(
|
|
2484
2469
|
"section",
|
|
@@ -2488,15 +2473,15 @@ function an() {
|
|
|
2488
2473
|
children: [
|
|
2489
2474
|
/* @__PURE__ */ n.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-4 sm:gap-6", children: [
|
|
2490
2475
|
/* @__PURE__ */ n.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-3 sm:gap-4", children: [
|
|
2491
|
-
/* @__PURE__ */ n.jsxs(
|
|
2476
|
+
/* @__PURE__ */ n.jsxs(_r, { className: "size-12 shrink-0 sm:size-16", children: [
|
|
2492
2477
|
/* @__PURE__ */ n.jsx(
|
|
2493
|
-
|
|
2478
|
+
vr,
|
|
2494
2479
|
{
|
|
2495
2480
|
src: s.avatar_url ?? void 0,
|
|
2496
2481
|
alt: ""
|
|
2497
2482
|
}
|
|
2498
2483
|
),
|
|
2499
|
-
/* @__PURE__ */ n.jsx(
|
|
2484
|
+
/* @__PURE__ */ n.jsx(yr, { children: `${s.first_name[0] ?? ""}${s.last_name[0] ?? ""}` })
|
|
2500
2485
|
] }),
|
|
2501
2486
|
/* @__PURE__ */ n.jsxs("div", { className: "min-w-0 space-y-1", children: [
|
|
2502
2487
|
c && /* @__PURE__ */ n.jsx("p", { className: "text-muted-foreground text-xs font-medium", children: e("member_of", { company: r.data.name }) }),
|
|
@@ -2574,7 +2559,7 @@ function an() {
|
|
|
2574
2559
|
}
|
|
2575
2560
|
),
|
|
2576
2561
|
/* @__PURE__ */ n.jsx(
|
|
2577
|
-
|
|
2562
|
+
rn,
|
|
2578
2563
|
{
|
|
2579
2564
|
paymentTriggerRef: (y) => {
|
|
2580
2565
|
t.current["profile/default-payment"] = y;
|
|
@@ -2630,19 +2615,19 @@ function an() {
|
|
|
2630
2615
|
tabIndex: u ? -1 : void 0,
|
|
2631
2616
|
className: "text-muted-foreground hover:text-foreground focus-visible:ring-ring flex min-h-11 items-center gap-3 rounded-md px-1 text-sm focus-visible:ring-2",
|
|
2632
2617
|
children: [
|
|
2633
|
-
/* @__PURE__ */ n.jsx(
|
|
2618
|
+
/* @__PURE__ */ n.jsx(rr, { "aria-hidden": "true", className: "size-4" }),
|
|
2634
2619
|
e("sign_out")
|
|
2635
2620
|
]
|
|
2636
2621
|
}
|
|
2637
2622
|
)
|
|
2638
2623
|
] }),
|
|
2639
|
-
l === "profile/information" && /* @__PURE__ */ n.jsx(
|
|
2624
|
+
l === "profile/information" && /* @__PURE__ */ n.jsx(Dr, { account: s, onClose: F })
|
|
2640
2625
|
] })
|
|
2641
2626
|
] });
|
|
2642
2627
|
}
|
|
2643
|
-
function
|
|
2644
|
-
return /* @__PURE__ */ n.jsx(Pt, { children: /* @__PURE__ */ n.jsx(
|
|
2628
|
+
function Cn() {
|
|
2629
|
+
return /* @__PURE__ */ n.jsx(Pt, { children: /* @__PURE__ */ n.jsx(sn, {}) });
|
|
2645
2630
|
}
|
|
2646
2631
|
export {
|
|
2647
|
-
|
|
2632
|
+
Cn as default
|
|
2648
2633
|
};
|