@lystech/core 3.0.54 → 3.0.55
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.
|
@@ -8301,7 +8301,7 @@ const {
|
|
|
8301
8301
|
mergeConfig: SQ
|
|
8302
8302
|
} = Dn, kf = window.location.href.includes("localhost"), D1 = kf ? "http://localhost:8081/api/" : "https://lysbunback-usgg4.ondigitalocean.app/api/";
|
|
8303
8303
|
kf && (console.log("isLocal", kf), console.log("Backend", D1));
|
|
8304
|
-
const
|
|
8304
|
+
const kt = Dn.create({
|
|
8305
8305
|
baseURL: D1,
|
|
8306
8306
|
withCredentials: !0,
|
|
8307
8307
|
headers: {
|
|
@@ -8312,7 +8312,7 @@ const Ht = Dn.create({
|
|
|
8312
8312
|
async function BI(e) {
|
|
8313
8313
|
try {
|
|
8314
8314
|
if (!e || e === "none") return null;
|
|
8315
|
-
const t = await
|
|
8315
|
+
const t = await kt.get("organizations/details");
|
|
8316
8316
|
return t == null ? void 0 : t.data;
|
|
8317
8317
|
} catch (t) {
|
|
8318
8318
|
return console.log(t), null;
|
|
@@ -8320,14 +8320,14 @@ async function BI(e) {
|
|
|
8320
8320
|
}
|
|
8321
8321
|
async function kI(e) {
|
|
8322
8322
|
try {
|
|
8323
|
-
return await
|
|
8323
|
+
return await kt.put("organizations", e);
|
|
8324
8324
|
} catch (t) {
|
|
8325
8325
|
return console.log(t), !1;
|
|
8326
8326
|
}
|
|
8327
8327
|
}
|
|
8328
8328
|
async function HI(e) {
|
|
8329
8329
|
try {
|
|
8330
|
-
return await
|
|
8330
|
+
return await kt.put("organizations/paypal/enabled", {
|
|
8331
8331
|
paypalEnabled: e ? 1 : 0
|
|
8332
8332
|
});
|
|
8333
8333
|
} catch (t) {
|
|
@@ -8336,7 +8336,7 @@ async function HI(e) {
|
|
|
8336
8336
|
}
|
|
8337
8337
|
async function VI(e, t, n) {
|
|
8338
8338
|
try {
|
|
8339
|
-
return await
|
|
8339
|
+
return await kt.put("organizations/paypal/config", {
|
|
8340
8340
|
paypalClientId: e,
|
|
8341
8341
|
paypalAppSecret: t,
|
|
8342
8342
|
sandbox: n
|
|
@@ -8346,7 +8346,7 @@ async function VI(e, t, n) {
|
|
|
8346
8346
|
}
|
|
8347
8347
|
}
|
|
8348
8348
|
async function YI() {
|
|
8349
|
-
return !!(await
|
|
8349
|
+
return !!(await kt.put("organizations/mode/toggle")).data;
|
|
8350
8350
|
}
|
|
8351
8351
|
class cl {
|
|
8352
8352
|
constructor() {
|
|
@@ -11264,7 +11264,7 @@ var jp = 0, Mu = /* @__PURE__ */ new Map();
|
|
|
11264
11264
|
function bC(e) {
|
|
11265
11265
|
Mu.delete(e);
|
|
11266
11266
|
}
|
|
11267
|
-
var
|
|
11267
|
+
var Ht = function(t) {
|
|
11268
11268
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
11269
11269
|
jp += 1;
|
|
11270
11270
|
var r = jp;
|
|
@@ -11280,11 +11280,11 @@ var kt = function(t) {
|
|
|
11280
11280
|
}
|
|
11281
11281
|
return a(n), r;
|
|
11282
11282
|
};
|
|
11283
|
-
|
|
11283
|
+
Ht.cancel = function(e) {
|
|
11284
11284
|
var t = Mu.get(e);
|
|
11285
11285
|
return bC(e), pC(t);
|
|
11286
11286
|
};
|
|
11287
|
-
process.env.NODE_ENV !== "production" && (
|
|
11287
|
+
process.env.NODE_ENV !== "production" && (Ht.ids = function() {
|
|
11288
11288
|
return Mu;
|
|
11289
11289
|
});
|
|
11290
11290
|
function yC(e) {
|
|
@@ -14607,12 +14607,12 @@ var gw = dr() ? pm : qe;
|
|
|
14607
14607
|
const Q4 = function() {
|
|
14608
14608
|
var e = l.useRef(null);
|
|
14609
14609
|
function t() {
|
|
14610
|
-
|
|
14610
|
+
Ht.cancel(e.current);
|
|
14611
14611
|
}
|
|
14612
14612
|
function n(r) {
|
|
14613
14613
|
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
|
|
14614
14614
|
t();
|
|
14615
|
-
var i =
|
|
14615
|
+
var i = Ht(function() {
|
|
14616
14616
|
a <= 1 ? r({
|
|
14617
14617
|
isCanceled: function() {
|
|
14618
14618
|
return i !== e.current;
|
|
@@ -17153,12 +17153,12 @@ const k6 = (e) => {
|
|
|
17153
17153
|
}
|
|
17154
17154
|
if (l.useEffect(() => {
|
|
17155
17155
|
if (n) {
|
|
17156
|
-
const P =
|
|
17156
|
+
const P = Ht(() => {
|
|
17157
17157
|
x(), S(!0);
|
|
17158
17158
|
});
|
|
17159
17159
|
let O;
|
|
17160
17160
|
return typeof ResizeObserver < "u" && (O = new ResizeObserver(x), O.observe(n)), () => {
|
|
17161
|
-
|
|
17161
|
+
Ht.cancel(P), O == null || O.disconnect();
|
|
17162
17162
|
};
|
|
17163
17163
|
}
|
|
17164
17164
|
}, []), !C)
|
|
@@ -17225,7 +17225,7 @@ const k6 = (e) => {
|
|
|
17225
17225
|
});
|
|
17226
17226
|
}), s = l.useRef(null);
|
|
17227
17227
|
return (u) => {
|
|
17228
|
-
|
|
17228
|
+
Ht.cancel(s.current), s.current = Ht(() => {
|
|
17229
17229
|
o(u);
|
|
17230
17230
|
});
|
|
17231
17231
|
};
|
|
@@ -22254,7 +22254,7 @@ var Es = /* @__PURE__ */ l.forwardRef(qL);
|
|
|
22254
22254
|
Es.displayName = "Item";
|
|
22255
22255
|
function JL(e) {
|
|
22256
22256
|
if (typeof MessageChannel > "u")
|
|
22257
|
-
|
|
22257
|
+
Ht(e);
|
|
22258
22258
|
else {
|
|
22259
22259
|
var t = new MessageChannel();
|
|
22260
22260
|
t.port1.onmessage = function() {
|
|
@@ -23841,13 +23841,13 @@ const xS = function(e, t, n, r) {
|
|
|
23841
23841
|
function Hz(e, t, n, r, a, i, o) {
|
|
23842
23842
|
var s = Le(0), c = Le(null), u = Le(null), d = Le(!1), f = xS(t, n, r, a);
|
|
23843
23843
|
function h(b, C) {
|
|
23844
|
-
if (
|
|
23844
|
+
if (Ht.cancel(c.current), !f(!1, C)) {
|
|
23845
23845
|
var S = b;
|
|
23846
23846
|
if (!S._virtualHandled)
|
|
23847
23847
|
S._virtualHandled = !0;
|
|
23848
23848
|
else
|
|
23849
23849
|
return;
|
|
23850
|
-
s.current += C, u.current = C, ab || S.preventDefault(), c.current =
|
|
23850
|
+
s.current += C, u.current = C, ab || S.preventDefault(), c.current = Ht(function() {
|
|
23851
23851
|
var E = d.current ? 10 : 1;
|
|
23852
23852
|
o(s.current * E, !1), s.current = 0;
|
|
23853
23853
|
});
|
|
@@ -23859,7 +23859,7 @@ function Hz(e, t, n, r, a, i, o) {
|
|
|
23859
23859
|
var g = Le(null), p = Le(null);
|
|
23860
23860
|
function m(b) {
|
|
23861
23861
|
if (e) {
|
|
23862
|
-
|
|
23862
|
+
Ht.cancel(p.current), p.current = Ht(function() {
|
|
23863
23863
|
g.current = null;
|
|
23864
23864
|
}, 2);
|
|
23865
23865
|
var C = b.deltaX, S = b.deltaY, E = b.shiftKey, x = C, A = S;
|
|
@@ -24009,9 +24009,9 @@ function Gz(e, t, n) {
|
|
|
24009
24009
|
var r = t.current;
|
|
24010
24010
|
if (e && r) {
|
|
24011
24011
|
var a = !1, i, o, s = function() {
|
|
24012
|
-
|
|
24012
|
+
Ht.cancel(i);
|
|
24013
24013
|
}, c = function h() {
|
|
24014
|
-
s(), i =
|
|
24014
|
+
s(), i = Ht(function() {
|
|
24015
24015
|
n(o), h();
|
|
24016
24016
|
});
|
|
24017
24017
|
}, u = function(v) {
|
|
@@ -24094,7 +24094,7 @@ function Kz(e, t, n, r, a, i, o, s) {
|
|
|
24094
24094
|
s();
|
|
24095
24095
|
return;
|
|
24096
24096
|
}
|
|
24097
|
-
if (
|
|
24097
|
+
if (Ht.cancel(c.current), typeof v == "number")
|
|
24098
24098
|
o(v);
|
|
24099
24099
|
else if (v && lt(v) === "object") {
|
|
24100
24100
|
var g, p = v.align;
|
|
@@ -24157,13 +24157,13 @@ var Qh = /* @__PURE__ */ l.forwardRef(function(e, t) {
|
|
|
24157
24157
|
if (y) {
|
|
24158
24158
|
var ee, ne = function(de) {
|
|
24159
24159
|
var se = W.current, Ce = se.dragging, ye = se.pageY, Se = se.startTop;
|
|
24160
|
-
|
|
24160
|
+
Ht.cancel(ee);
|
|
24161
24161
|
var $ = T.current.getBoundingClientRect(), le = f / (u ? $.width : $.height);
|
|
24162
24162
|
if (Ce) {
|
|
24163
24163
|
var we = (Kh(de, u) - ye) * le, Ee = Se;
|
|
24164
24164
|
!N && u ? Ee -= we : Ee += we;
|
|
24165
24165
|
var pe = X.current, Oe = te.current, Pe = Oe ? Ee / Oe : 0, De = Math.ceil(Pe * pe);
|
|
24166
|
-
De = Math.max(De, 0), De = Math.min(De, pe), ee =
|
|
24166
|
+
De = Math.max(De, 0), De = Math.min(De, pe), ee = Ht(function() {
|
|
24167
24167
|
c(De, u);
|
|
24168
24168
|
});
|
|
24169
24169
|
}
|
|
@@ -24179,7 +24179,7 @@ var Qh = /* @__PURE__ */ l.forwardRef(function(e, t) {
|
|
|
24179
24179
|
}), window.addEventListener("touchend", oe, {
|
|
24180
24180
|
passive: !0
|
|
24181
24181
|
}), function() {
|
|
24182
|
-
window.removeEventListener("mousemove", ne), window.removeEventListener("touchmove", ne), window.removeEventListener("mouseup", oe), window.removeEventListener("touchend", oe),
|
|
24182
|
+
window.removeEventListener("mousemove", ne), window.removeEventListener("touchmove", ne), window.removeEventListener("mouseup", oe), window.removeEventListener("touchend", oe), Ht.cancel(ee);
|
|
24183
24183
|
};
|
|
24184
24184
|
}
|
|
24185
24185
|
}, [y]), l.useEffect(function() {
|
|
@@ -28075,7 +28075,7 @@ function I7(e) {
|
|
|
28075
28075
|
}
|
|
28076
28076
|
};
|
|
28077
28077
|
l.useEffect(function() {
|
|
28078
|
-
return t ? (window.addEventListener("keydown", u), a &&
|
|
28078
|
+
return t ? (window.addEventListener("keydown", u), a && Ht(c, 3), function() {
|
|
28079
28079
|
window.removeEventListener("keydown", u), o.current = !1;
|
|
28080
28080
|
}) : function() {
|
|
28081
28081
|
o.current = !1;
|
|
@@ -28336,7 +28336,7 @@ function W7(e, t, n, r, a, i, o, s, c, u) {
|
|
|
28336
28336
|
var d = l.useRef(), f = l.useRef();
|
|
28337
28337
|
f.current = t;
|
|
28338
28338
|
var h = function() {
|
|
28339
|
-
|
|
28339
|
+
Ht.cancel(d.current);
|
|
28340
28340
|
};
|
|
28341
28341
|
return l.useEffect(function() {
|
|
28342
28342
|
return function() {
|
|
@@ -28354,7 +28354,7 @@ function W7(e, t, n, r, a, i, o, s, c, u) {
|
|
|
28354
28354
|
var z = L, V = L.querySelector("a");
|
|
28355
28355
|
V != null && V.getAttribute("href") && (z = V);
|
|
28356
28356
|
var Y = S.get(L);
|
|
28357
|
-
s(Y), h(), d.current =
|
|
28357
|
+
s(Y), h(), d.current = Ht(function() {
|
|
28358
28358
|
f.current === Y && z.focus();
|
|
28359
28359
|
});
|
|
28360
28360
|
}
|
|
@@ -28367,7 +28367,7 @@ function W7(e, t, n, r, a, i, o, s, c, u) {
|
|
|
28367
28367
|
} else if (P.inlineTrigger)
|
|
28368
28368
|
c(A);
|
|
28369
28369
|
else if (P.offset > 0)
|
|
28370
|
-
c(A, !0), h(), d.current =
|
|
28370
|
+
c(A, !0), h(), d.current = Ht(function() {
|
|
28371
28371
|
m = _h(p, r);
|
|
28372
28372
|
var D = x.getAttribute("aria-controls"), L = document.getElementById(D), z = wb(L, m.elements);
|
|
28373
28373
|
O(z);
|
|
@@ -28694,10 +28694,10 @@ function s5(e) {
|
|
|
28694
28694
|
motionAppear: !0
|
|
28695
28695
|
}), j = l.useRef();
|
|
28696
28696
|
return l.useEffect(function() {
|
|
28697
|
-
return j.current =
|
|
28697
|
+
return j.current = Ht(function() {
|
|
28698
28698
|
O(n);
|
|
28699
28699
|
}), function() {
|
|
28700
|
-
|
|
28700
|
+
Ht.cancel(j.current);
|
|
28701
28701
|
};
|
|
28702
28702
|
}, [n]), /* @__PURE__ */ l.createElement(yl, {
|
|
28703
28703
|
prefixCls: t,
|
|
@@ -30366,11 +30366,11 @@ function Q5(e, t, n) {
|
|
|
30366
30366
|
var r = mn(t, {
|
|
30367
30367
|
value: e
|
|
30368
30368
|
}), a = Q(r, 2), i = a[0], o = a[1], s = ue.useRef(e), c = ue.useRef(), u = function() {
|
|
30369
|
-
|
|
30369
|
+
Ht.cancel(c.current);
|
|
30370
30370
|
}, d = Ut(function() {
|
|
30371
30371
|
o(s.current), n && i !== s.current && n(s.current);
|
|
30372
30372
|
}), f = Ut(function(h, v) {
|
|
30373
|
-
u(), s.current = h, h || v ? d() : c.current =
|
|
30373
|
+
u(), s.current = h, h || v ? d() : c.current = Ht(d);
|
|
30374
30374
|
});
|
|
30375
30375
|
return ue.useEffect(function() {
|
|
30376
30376
|
return u;
|
|
@@ -30420,11 +30420,11 @@ function kv(e, t) {
|
|
|
30420
30420
|
if (e)
|
|
30421
30421
|
r.current(e);
|
|
30422
30422
|
else {
|
|
30423
|
-
var a =
|
|
30423
|
+
var a = Ht(function() {
|
|
30424
30424
|
r.current(e);
|
|
30425
30425
|
}, n);
|
|
30426
30426
|
return function() {
|
|
30427
|
-
|
|
30427
|
+
Ht.cancel(a);
|
|
30428
30428
|
};
|
|
30429
30429
|
}
|
|
30430
30430
|
}, [e]);
|
|
@@ -31066,7 +31066,7 @@ function eB(e, t) {
|
|
|
31066
31066
|
var n = l.useRef(!1), r = l.useRef(null), a = l.useRef(null), i = function() {
|
|
31067
31067
|
return n.current;
|
|
31068
31068
|
}, o = function() {
|
|
31069
|
-
|
|
31069
|
+
Ht.cancel(r.current), n.current = !1;
|
|
31070
31070
|
}, s = l.useRef(), c = function() {
|
|
31071
31071
|
var f = e.current;
|
|
31072
31072
|
if (a.current = null, s.current = 0, f) {
|
|
@@ -31074,7 +31074,7 @@ function eB(e, t) {
|
|
|
31074
31074
|
o(), n.current = !0, s.current += 1;
|
|
31075
31075
|
var m = f.scrollTop, y = v.offsetTop, b = h.offsetTop, C = b - y;
|
|
31076
31076
|
if (b === 0 && h !== v || !ku(f)) {
|
|
31077
|
-
s.current <= 5 && (r.current =
|
|
31077
|
+
s.current <= 5 && (r.current = Ht(p));
|
|
31078
31078
|
return;
|
|
31079
31079
|
}
|
|
31080
31080
|
var S = m + (C - m) * $5, E = Math.abs(C - S);
|
|
@@ -31086,7 +31086,7 @@ function eB(e, t) {
|
|
|
31086
31086
|
f.scrollTop = C, o();
|
|
31087
31087
|
return;
|
|
31088
31088
|
}
|
|
31089
|
-
f.scrollTop = S, r.current =
|
|
31089
|
+
f.scrollTop = S, r.current = Ht(p);
|
|
31090
31090
|
};
|
|
31091
31091
|
h && v && g();
|
|
31092
31092
|
}
|
|
@@ -32123,10 +32123,10 @@ var yB = ["active", "showActiveCls", "suffixIcon", "format", "validateFormat", "
|
|
|
32123
32123
|
$(o);
|
|
32124
32124
|
return;
|
|
32125
32125
|
}
|
|
32126
|
-
return oe.current.setSelectionRange(Ce, ye), Z.current =
|
|
32126
|
+
return oe.current.setSelectionRange(Ce, ye), Z.current = Ht(function() {
|
|
32127
32127
|
oe.current.setSelectionRange(Ce, ye);
|
|
32128
32128
|
}), function() {
|
|
32129
|
-
|
|
32129
|
+
Ht.cancel(Z.current);
|
|
32130
32130
|
};
|
|
32131
32131
|
}
|
|
32132
32132
|
}, [J, o, R, ee, k, Ce, ye, ae, $]);
|
|
@@ -32901,10 +32901,10 @@ var MB = ["prefixCls", "className", "style", "checked", "disabled", "defaultChec
|
|
|
32901
32901
|
});
|
|
32902
32902
|
function IB(e) {
|
|
32903
32903
|
const t = ue.useRef(null), n = () => {
|
|
32904
|
-
|
|
32904
|
+
Ht.cancel(t.current), t.current = null;
|
|
32905
32905
|
};
|
|
32906
32906
|
return [() => {
|
|
32907
|
-
n(), t.current =
|
|
32907
|
+
n(), t.current = Ht(() => {
|
|
32908
32908
|
t.current = null;
|
|
32909
32909
|
});
|
|
32910
32910
|
}, (i) => {
|
|
@@ -35071,7 +35071,7 @@ var $B = function(t) {
|
|
|
35071
35071
|
return typeof s == "function" ? s(y) : typeof s == "number" ? s : y;
|
|
35072
35072
|
}, [s]);
|
|
35073
35073
|
function m() {
|
|
35074
|
-
|
|
35074
|
+
Ht.cancel(g.current);
|
|
35075
35075
|
}
|
|
35076
35076
|
return qe(function() {
|
|
35077
35077
|
var y = {};
|
|
@@ -35082,7 +35082,7 @@ var $B = function(t) {
|
|
|
35082
35082
|
u === "start" && (y[b] = n[b]), u === "center" && (y[b] = n[b] + n.width / 2, y.transform = a ? "translateX(50%)" : "translateX(-50%)"), u === "end" && (y[b] = n[b] + n.width, y.transform = "translateX(-100%)");
|
|
35083
35083
|
} else
|
|
35084
35084
|
y.height = p(n.height), u === "start" && (y.top = n.top), u === "center" && (y.top = n.top + n.height / 2, y.transform = "translateY(-50%)"), u === "end" && (y.top = n.top + n.height, y.transform = "translateY(-100%)");
|
|
35085
|
-
return m(), g.current =
|
|
35085
|
+
return m(), g.current = Ht(function() {
|
|
35086
35086
|
var C = h && y && Object.keys(y).every(function(S) {
|
|
35087
35087
|
var E = y[S], x = h[S];
|
|
35088
35088
|
return typeof E == "number" && typeof x == "number" ? Math.round(E) === Math.round(x) : E === x;
|
|
@@ -38918,7 +38918,7 @@ const UH = /* @__PURE__ */ l.forwardRef((e, t) => {
|
|
|
38918
38918
|
const v = (y) => {
|
|
38919
38919
|
a(o, y.target.value);
|
|
38920
38920
|
}, g = () => {
|
|
38921
|
-
|
|
38921
|
+
Ht(() => {
|
|
38922
38922
|
var y;
|
|
38923
38923
|
const b = (y = h.current) === null || y === void 0 ? void 0 : y.input;
|
|
38924
38924
|
document.activeElement === b && b && b.select();
|
|
@@ -39337,9 +39337,9 @@ var a9 = ["prefixCls", "defaultValue", "value", "autoSize", "onResize", "classNa
|
|
|
39337
39337
|
O();
|
|
39338
39338
|
}, [T]);
|
|
39339
39339
|
var V = l.useRef(), Y = function() {
|
|
39340
|
-
|
|
39340
|
+
Ht.cancel(V.current);
|
|
39341
39341
|
}, F = function(k) {
|
|
39342
|
-
T === bf && (s == null || s(k), o && (Y(), V.current =
|
|
39342
|
+
T === bf && (s == null || s(k), o && (Y(), V.current = Ht(function() {
|
|
39343
39343
|
z();
|
|
39344
39344
|
})));
|
|
39345
39345
|
};
|
|
@@ -40239,7 +40239,7 @@ function T9({
|
|
|
40239
40239
|
}
|
|
40240
40240
|
}
|
|
40241
40241
|
return pm(() => {
|
|
40242
|
-
const i =
|
|
40242
|
+
const i = kt.interceptors.request.use(
|
|
40243
40243
|
(s) => {
|
|
40244
40244
|
const c = localStorage.getItem("authKey"), u = localStorage.getItem(
|
|
40245
40245
|
"impersonatedUserAuthKey"
|
|
@@ -40267,7 +40267,7 @@ function T9({
|
|
|
40267
40267
|
type: "error",
|
|
40268
40268
|
message: "une erreur est survenue"
|
|
40269
40269
|
}), Promise.reject(s))
|
|
40270
|
-
), o =
|
|
40270
|
+
), o = kt.interceptors.response.use(
|
|
40271
40271
|
(s) => (r(s), s),
|
|
40272
40272
|
async (s) => {
|
|
40273
40273
|
var p, m, y, b, C, S, E;
|
|
@@ -40284,7 +40284,7 @@ function T9({
|
|
|
40284
40284
|
}
|
|
40285
40285
|
);
|
|
40286
40286
|
return () => {
|
|
40287
|
-
|
|
40287
|
+
kt.interceptors.request.eject(i), kt.interceptors.response.eject(o);
|
|
40288
40288
|
};
|
|
40289
40289
|
}, []), /* @__PURE__ */ w.jsx(HE.Provider, { value: { children: e }, children: e });
|
|
40290
40290
|
}
|
|
@@ -40544,7 +40544,7 @@ function H9({
|
|
|
40544
40544
|
n && console.log("Notifications push désactivées par la prop usePushNotifications."), h("Notifications push désactivées.");
|
|
40545
40545
|
return;
|
|
40546
40546
|
}
|
|
40547
|
-
"serviceWorker" in navigator && "PushManager" in window ? (a(!0), n && console.log("Les notifications push sont supportées."), g(!0),
|
|
40547
|
+
"serviceWorker" in navigator && "PushManager" in window ? (a(!0), n && console.log("Les notifications push sont supportées."), g(!0), kt.get("/push-notification/key").then((b) => {
|
|
40548
40548
|
d(b.data.publicVapidKey), n && console.log("Clé publique VAPID récupérée:", b.data.publicVapidKey);
|
|
40549
40549
|
}).catch((b) => {
|
|
40550
40550
|
n && console.error("Erreur lors de la récupération de la clé VAPID:", b), h("Erreur: Impossible de récupérer la clé VAPID du serveur.");
|
|
@@ -40566,7 +40566,7 @@ function H9({
|
|
|
40566
40566
|
userVisibleOnly: !0,
|
|
40567
40567
|
applicationServerKey: k9(u)
|
|
40568
40568
|
});
|
|
40569
|
-
n && console.log("Abonnement push réussi:", C), c(C), o(!0), h("Abonnement réussi !"), await
|
|
40569
|
+
n && console.log("Abonnement push réussi:", C), c(C), o(!0), h("Abonnement réussi !"), await kt.post("/push-notification/subscribe", C), n && console.log("Abonnement envoyé au serveur.");
|
|
40570
40570
|
} catch (b) {
|
|
40571
40571
|
n && console.error("Échec de l'abonnement push:", b), h(`Échec de l'abonnement: ${b instanceof Error ? b.message : String(b)}`);
|
|
40572
40572
|
}
|
|
@@ -40591,7 +40591,7 @@ function H9({
|
|
|
40591
40591
|
return;
|
|
40592
40592
|
}
|
|
40593
40593
|
try {
|
|
40594
|
-
const E = await
|
|
40594
|
+
const E = await kt.post("/push-notification/send", { title: b, body: C });
|
|
40595
40595
|
E.status === 200 ? h("Notification de test envoyée (vérifiez votre écran).") : h(`Erreur lors de l'envoi de la notification: ${((S = E.data) == null ? void 0 : S.message) || E.statusText}`);
|
|
40596
40596
|
} catch (E) {
|
|
40597
40597
|
n && console.error("Erreur lors de l'envoi de la notification de test:", E), h(`Erreur réseau lors de l'envoi: ${E instanceof Error ? E.message : String(E)}`);
|
|
@@ -41487,7 +41487,7 @@ function fV({ enableInstallAppButton: e, enablePushNotificationButton: t }) {
|
|
|
41487
41487
|
)
|
|
41488
41488
|
] });
|
|
41489
41489
|
}
|
|
41490
|
-
const hV = "lystechcorenpmpackage", mV = "lystechcorenpmpackage:last-version", vV = "3.0.
|
|
41490
|
+
const hV = "lystechcorenpmpackage", mV = "lystechcorenpmpackage:last-version", vV = "3.0.54";
|
|
41491
41491
|
function gV(e = {}) {
|
|
41492
41492
|
const {
|
|
41493
41493
|
packageName: t = hV,
|
|
@@ -41720,7 +41720,7 @@ function bV({
|
|
|
41720
41720
|
);
|
|
41721
41721
|
}
|
|
41722
41722
|
async function yV() {
|
|
41723
|
-
return await
|
|
41723
|
+
return await kt.get("/users/roles");
|
|
41724
41724
|
}
|
|
41725
41725
|
const CV = (e, t) => br(
|
|
41726
41726
|
["user-role-details", e, t],
|
|
@@ -41744,7 +41744,7 @@ const CV = (e, t) => br(
|
|
|
41744
41744
|
appId: "1:237347321732:web:7f9586d48e488d73ddcfd1"
|
|
41745
41745
|
};
|
|
41746
41746
|
async function hA(e) {
|
|
41747
|
-
const t = await
|
|
41747
|
+
const t = await kt.get(`users/impersonate/${e}`);
|
|
41748
41748
|
return t == null ? void 0 : t.data;
|
|
41749
41749
|
}
|
|
41750
41750
|
const SV = (e) => br(
|
|
@@ -41757,7 +41757,7 @@ const SV = (e) => br(
|
|
|
41757
41757
|
async function xV(e) {
|
|
41758
41758
|
const t = new FormData();
|
|
41759
41759
|
t.append("image", e);
|
|
41760
|
-
const n = await
|
|
41760
|
+
const n = await kt.put("users/image", t, {
|
|
41761
41761
|
headers: {
|
|
41762
41762
|
"Content-Type": "multipart/form-data"
|
|
41763
41763
|
// Indique que les données sont un formulaire multipart
|
|
@@ -41768,24 +41768,24 @@ async function xV(e) {
|
|
|
41768
41768
|
return n == null ? void 0 : n.data;
|
|
41769
41769
|
}
|
|
41770
41770
|
async function EV(e, t) {
|
|
41771
|
-
const n = await
|
|
41771
|
+
const n = await kt.put("users/image/url", {
|
|
41772
41772
|
authKey: e,
|
|
41773
41773
|
imageUrl: t
|
|
41774
41774
|
});
|
|
41775
41775
|
return n == null ? void 0 : n.data;
|
|
41776
41776
|
}
|
|
41777
41777
|
async function AV(e) {
|
|
41778
|
-
const t = await
|
|
41778
|
+
const t = await kt.post("auth/request-reset-password", {
|
|
41779
41779
|
email: e
|
|
41780
41780
|
});
|
|
41781
41781
|
return t == null ? void 0 : t.data;
|
|
41782
41782
|
}
|
|
41783
41783
|
async function OV(e) {
|
|
41784
|
-
const t = await
|
|
41784
|
+
const t = await kt.post(`auth/activate/${e}`);
|
|
41785
41785
|
return t == null ? void 0 : t.data;
|
|
41786
41786
|
}
|
|
41787
41787
|
async function PV(e) {
|
|
41788
|
-
return await
|
|
41788
|
+
return await kt.post("auth/register", { ...e });
|
|
41789
41789
|
}
|
|
41790
41790
|
const mA = ir({});
|
|
41791
41791
|
function Or() {
|
|
@@ -41901,7 +41901,7 @@ function MV({ children: e, shouldRedirectAfterLogin: t, loginRedirectRoute: n, q
|
|
|
41901
41901
|
}, []);
|
|
41902
41902
|
async function z() {
|
|
41903
41903
|
try {
|
|
41904
|
-
const $ = await
|
|
41904
|
+
const $ = await kt.get("/auth/me");
|
|
41905
41905
|
return console.log("Validate Me Response", $), $.data && ie($ == null ? void 0 : $.data), $ == null ? void 0 : $.data;
|
|
41906
41906
|
} catch ($) {
|
|
41907
41907
|
return console.log("Validate Me Error", $), null;
|
|
@@ -41928,7 +41928,7 @@ function MV({ children: e, shouldRedirectAfterLogin: t, loginRedirectRoute: n, q
|
|
|
41928
41928
|
const Pe = {
|
|
41929
41929
|
email: $,
|
|
41930
41930
|
password: le
|
|
41931
|
-
}, De = await
|
|
41931
|
+
}, De = await kt.get("/auth/login", {
|
|
41932
41932
|
headers: Pe
|
|
41933
41933
|
}), je = !!De.data;
|
|
41934
41934
|
we({ result: je, data: De == null ? void 0 : De.data }), Oe > 0 ? setTimeout(() => {
|
|
@@ -41939,7 +41939,7 @@ function MV({ children: e, shouldRedirectAfterLogin: t, loginRedirectRoute: n, q
|
|
|
41939
41939
|
}
|
|
41940
41940
|
}
|
|
41941
41941
|
async function F($) {
|
|
41942
|
-
const le = await
|
|
41942
|
+
const le = await kt.post("/auth/login/third-party", {
|
|
41943
41943
|
providerData: $
|
|
41944
41944
|
}), we = le == null ? void 0 : le.data;
|
|
41945
41945
|
if (!we) {
|
|
@@ -41974,7 +41974,13 @@ function MV({ children: e, shouldRedirectAfterLogin: t, loginRedirectRoute: n, q
|
|
|
41974
41974
|
}
|
|
41975
41975
|
}
|
|
41976
41976
|
async function W() {
|
|
41977
|
-
b(void 0)
|
|
41977
|
+
b(void 0);
|
|
41978
|
+
try {
|
|
41979
|
+
await kt.post("/auth/logout");
|
|
41980
|
+
} catch ($) {
|
|
41981
|
+
console.warn("Déconnexion serveur échouée", $);
|
|
41982
|
+
}
|
|
41983
|
+
sessionStorage.clear(), localStorage.clear(), ie(null), kP(P), A("/login");
|
|
41978
41984
|
}
|
|
41979
41985
|
async function k($) {
|
|
41980
41986
|
const le = sN($.credential);
|
|
@@ -42093,12 +42099,12 @@ function MV({ children: e, shouldRedirectAfterLogin: t, loginRedirectRoute: n, q
|
|
|
42093
42099
|
) });
|
|
42094
42100
|
}
|
|
42095
42101
|
async function NV() {
|
|
42096
|
-
return (await
|
|
42102
|
+
return (await kt.get(
|
|
42097
42103
|
"/politique-and-conditions/9716a5de-02be-4fb2-b9b5-85ad82bfae4f"
|
|
42098
42104
|
)).data;
|
|
42099
42105
|
}
|
|
42100
42106
|
async function IV() {
|
|
42101
|
-
return (await
|
|
42107
|
+
return (await kt.get("/politique-and-conditions")).data;
|
|
42102
42108
|
}
|
|
42103
42109
|
const RV = () => br({
|
|
42104
42110
|
queryKey: ["lystech-politique-and-conditions"],
|
|
@@ -42109,7 +42115,7 @@ const RV = () => br({
|
|
|
42109
42115
|
enabled: !!e
|
|
42110
42116
|
});
|
|
42111
42117
|
async function jV() {
|
|
42112
|
-
const e = await
|
|
42118
|
+
const e = await kt.get("collections/invitation");
|
|
42113
42119
|
return (e == null ? void 0 : e.data) || [];
|
|
42114
42120
|
}
|
|
42115
42121
|
const $v = (e, t) => br(
|
|
@@ -42127,11 +42133,11 @@ async function PQ(e, t) {
|
|
|
42127
42133
|
const n = {
|
|
42128
42134
|
code: e,
|
|
42129
42135
|
products: t
|
|
42130
|
-
}, r = await
|
|
42136
|
+
}, r = await kt.post("promo-codes/validate", n);
|
|
42131
42137
|
return r == null ? void 0 : r.data;
|
|
42132
42138
|
}
|
|
42133
42139
|
async function TV() {
|
|
42134
|
-
const e = await
|
|
42140
|
+
const e = await kt.get("promo-codes/user");
|
|
42135
42141
|
return e == null ? void 0 : e.data;
|
|
42136
42142
|
}
|
|
42137
42143
|
const MQ = (e) => br(["personal-promo-codes", e], TV, {
|
|
@@ -42141,7 +42147,7 @@ const MQ = (e) => br(["personal-promo-codes", e], TV, {
|
|
|
42141
42147
|
refetchOnWindowFocus: !0
|
|
42142
42148
|
});
|
|
42143
42149
|
async function LV() {
|
|
42144
|
-
const e = await
|
|
42150
|
+
const e = await kt.get("images/featured");
|
|
42145
42151
|
return e == null ? void 0 : e.data;
|
|
42146
42152
|
}
|
|
42147
42153
|
const NQ = () => br(["featured-images"], LV, {
|
|
@@ -42150,7 +42156,7 @@ const NQ = () => br(["featured-images"], LV, {
|
|
|
42150
42156
|
}
|
|
42151
42157
|
});
|
|
42152
42158
|
async function zV(e) {
|
|
42153
|
-
const t = await
|
|
42159
|
+
const t = await kt.get(`/posts/slug/${e}`);
|
|
42154
42160
|
if (t.status !== 200)
|
|
42155
42161
|
throw new Error(
|
|
42156
42162
|
`Error fetching post with ID ${e}: ${t.statusText}`
|
|
@@ -42162,18 +42168,18 @@ const IQ = (e, t) => br(
|
|
|
42162
42168
|
() => zV(e)
|
|
42163
42169
|
);
|
|
42164
42170
|
async function FV(e) {
|
|
42165
|
-
const t = await
|
|
42171
|
+
const t = await kt.get(`/shop/collection/${e}`);
|
|
42166
42172
|
return t == null ? void 0 : t.data;
|
|
42167
42173
|
}
|
|
42168
42174
|
async function BV(e, t) {
|
|
42169
|
-
const n = await
|
|
42175
|
+
const n = await kt.post("/shop/breakdown", {
|
|
42170
42176
|
products: e,
|
|
42171
42177
|
promoCodes: t
|
|
42172
42178
|
});
|
|
42173
42179
|
return n == null ? void 0 : n.data;
|
|
42174
42180
|
}
|
|
42175
42181
|
async function kV(e) {
|
|
42176
|
-
const t = await
|
|
42182
|
+
const t = await kt.post("/shop/save", e);
|
|
42177
42183
|
return t == null ? void 0 : t.data;
|
|
42178
42184
|
}
|
|
42179
42185
|
const RQ = (e, t, n) => br(
|
|
@@ -42191,7 +42197,7 @@ const RQ = (e, t, n) => br(
|
|
|
42191
42197
|
), DQ = () => Lm();
|
|
42192
42198
|
async function jQ() {
|
|
42193
42199
|
try {
|
|
42194
|
-
const e = await
|
|
42200
|
+
const e = await kt.get("/shop/collections");
|
|
42195
42201
|
return localStorage.setItem("collections", JSON.stringify(e == null ? void 0 : e.data)), (e == null ? void 0 : e.data) || [];
|
|
42196
42202
|
} catch (e) {
|
|
42197
42203
|
return console.log(e), [];
|
|
@@ -42864,11 +42870,11 @@ function eg() {
|
|
|
42864
42870
|
] });
|
|
42865
42871
|
}
|
|
42866
42872
|
async function KV() {
|
|
42867
|
-
const e = await
|
|
42873
|
+
const e = await kt.get("customer-bills");
|
|
42868
42874
|
return e == null ? void 0 : e.data;
|
|
42869
42875
|
}
|
|
42870
42876
|
async function QV(e) {
|
|
42871
|
-
const t = await
|
|
42877
|
+
const t = await kt.get(`customer-bills/bill/${e}`);
|
|
42872
42878
|
return t == null ? void 0 : t.data;
|
|
42873
42879
|
}
|
|
42874
42880
|
const ZV = (e, t, n = !0) => br({
|
|
@@ -42878,7 +42884,7 @@ const ZV = (e, t, n = !0) => br({
|
|
|
42878
42884
|
});
|
|
42879
42885
|
async function XV(e) {
|
|
42880
42886
|
var n;
|
|
42881
|
-
const t = await
|
|
42887
|
+
const t = await kt.put("users/notification", {
|
|
42882
42888
|
notificationEnabled: e
|
|
42883
42889
|
});
|
|
42884
42890
|
return (n = t == null ? void 0 : t.data) == null ? void 0 : n.success;
|
|
@@ -44021,7 +44027,7 @@ const xY = bm(function({
|
|
|
44021
44027
|
] });
|
|
44022
44028
|
});
|
|
44023
44029
|
async function EY() {
|
|
44024
|
-
const e = await
|
|
44030
|
+
const e = await kt.get("/shipping-options");
|
|
44025
44031
|
return (e ? e.data : []).sort((n, r) => r.isDefault - n.isDefault);
|
|
44026
44032
|
}
|
|
44027
44033
|
const AY = (e) => br(
|
|
@@ -45780,7 +45786,7 @@ async function JY(e) {
|
|
|
45780
45786
|
promoCodes: e.promoCodes || [],
|
|
45781
45787
|
currency: e.currency,
|
|
45782
45788
|
intent: e.intent
|
|
45783
|
-
}, n = await
|
|
45789
|
+
}, n = await kt.post("paypal/create-order", t);
|
|
45784
45790
|
if (n.status === 200)
|
|
45785
45791
|
return n;
|
|
45786
45792
|
throw new Error("Failed to create PayPal order");
|
|
@@ -45789,7 +45795,7 @@ async function _Y(e, t) {
|
|
|
45789
45795
|
const n = {
|
|
45790
45796
|
orderID: e,
|
|
45791
45797
|
shippingOptions: t
|
|
45792
|
-
}, r = await
|
|
45798
|
+
}, r = await kt.post(
|
|
45793
45799
|
`paypal/shipping-changed/${e}`,
|
|
45794
45800
|
n
|
|
45795
45801
|
);
|
|
@@ -45798,7 +45804,7 @@ async function _Y(e, t) {
|
|
|
45798
45804
|
throw new Error("Failed to update shipping options for PayPal order");
|
|
45799
45805
|
}
|
|
45800
45806
|
async function $Y(e) {
|
|
45801
|
-
const t = await
|
|
45807
|
+
const t = await kt.post(`paypal/capture-order/${e}`);
|
|
45802
45808
|
if (t.status === 200)
|
|
45803
45809
|
return t;
|
|
45804
45810
|
throw new Error("Failed to capture PayPal order");
|
|
@@ -49404,7 +49410,7 @@ export {
|
|
|
49404
49410
|
yY as ShopProductPopup,
|
|
49405
49411
|
wY as SquareImage,
|
|
49406
49412
|
dV as SubscribeToPushNotification,
|
|
49407
|
-
|
|
49413
|
+
kt as axiosInstance,
|
|
49408
49414
|
OQ as default,
|
|
49409
49415
|
jQ as fetchAvailableCollections,
|
|
49410
49416
|
JV as formatDateToReadable,
|