@aaravpos/appointment-barber-booking 2.0.6 → 2.0.7
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/index.cjs +25 -25
- package/dist/index.js +124 -116
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -147,7 +147,7 @@ var Qo = /* @__PURE__ */ Symbol.for("immer-nothing"), ii = /* @__PURE__ */ Symbo
|
|
|
147
147
|
] : [];
|
|
148
148
|
function Ee(e, ...t) {
|
|
149
149
|
if (process.env.NODE_ENV !== "production") {
|
|
150
|
-
const r = Yl[e], n =
|
|
150
|
+
const r = Yl[e], n = tt(r) ? r.apply(null, t) : r;
|
|
151
151
|
throw new Error(`[Immer] ${n}`);
|
|
152
152
|
}
|
|
153
153
|
throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`);
|
|
@@ -163,7 +163,7 @@ function es(e) {
|
|
|
163
163
|
if (t === null || t === Ae[Wr]) return !0;
|
|
164
164
|
const r = Ae.hasOwnProperty.call(t, gr) && t[gr];
|
|
165
165
|
if (r === Object) return !0;
|
|
166
|
-
if (!
|
|
166
|
+
if (!tt(r)) return !1;
|
|
167
167
|
let n = oi.get(r);
|
|
168
168
|
return n === void 0 && (n = Function.toString.call(r), oi.set(r, n)), n === Zl;
|
|
169
169
|
}
|
|
@@ -185,7 +185,7 @@ var si = (e, t, r = zt(e)) => r === 2 ? e.has(t) : Ae[Wr].hasOwnProperty.call(e,
|
|
|
185
185
|
function Jl(e, t) {
|
|
186
186
|
return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
|
|
187
187
|
}
|
|
188
|
-
var qr = Array.isArray, Kr = (e) => e instanceof Map, Yr = (e) => e instanceof Set, ya = (e) => typeof e == "object",
|
|
188
|
+
var qr = Array.isArray, Kr = (e) => e instanceof Map, Yr = (e) => e instanceof Set, ya = (e) => typeof e == "object", tt = (e) => typeof e == "function", Cn = (e) => typeof e == "boolean";
|
|
189
189
|
function Ql(e) {
|
|
190
190
|
const t = +e;
|
|
191
191
|
return Number.isInteger(t) && String(t) === e;
|
|
@@ -235,7 +235,7 @@ function Xr(e) {
|
|
|
235
235
|
return e === null || !ya(e) ? !0 : Ae.isFrozen(e);
|
|
236
236
|
}
|
|
237
237
|
var Sr = "MapSet", Vn = "Patches", di = "ArrayMethods", ts = {};
|
|
238
|
-
function
|
|
238
|
+
function it(e) {
|
|
239
239
|
const t = ts[e];
|
|
240
240
|
return t || Ee(0, e), t;
|
|
241
241
|
}
|
|
@@ -247,11 +247,11 @@ var li = (e) => !!ts[e], Et, rs = () => Et, tc = (e, t) => ({
|
|
|
247
247
|
unfinalizedDrafts_: 0,
|
|
248
248
|
handledSet_: /* @__PURE__ */ new Set(),
|
|
249
249
|
processedForPatches_: /* @__PURE__ */ new Set(),
|
|
250
|
-
mapSetPlugin_: li(Sr) ?
|
|
251
|
-
arrayMethodsPlugin_: li(di) ?
|
|
250
|
+
mapSetPlugin_: li(Sr) ? it(Sr) : void 0,
|
|
251
|
+
arrayMethodsPlugin_: li(di) ? it(di) : void 0
|
|
252
252
|
});
|
|
253
253
|
function ci(e, t) {
|
|
254
|
-
t && (e.patchPlugin_ =
|
|
254
|
+
t && (e.patchPlugin_ = it(Vn), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
|
|
255
255
|
}
|
|
256
256
|
function Gn(e) {
|
|
257
257
|
zn(e), e.drafts_.forEach(rc), e.drafts_ = null;
|
|
@@ -469,7 +469,7 @@ function fr(e) {
|
|
|
469
469
|
var lc = class {
|
|
470
470
|
constructor(e) {
|
|
471
471
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.useStrictIteration_ = !1, this.produce = (t, r, n) => {
|
|
472
|
-
if (
|
|
472
|
+
if (tt(t) && !tt(r)) {
|
|
473
473
|
const i = r;
|
|
474
474
|
r = t;
|
|
475
475
|
const o = this;
|
|
@@ -477,7 +477,7 @@ var lc = class {
|
|
|
477
477
|
return o.produce(d, (c) => r.call(this, c, ...l));
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
|
-
|
|
480
|
+
tt(r) || Ee(6), n !== void 0 && !tt(n) && Ee(7);
|
|
481
481
|
let a;
|
|
482
482
|
if (Fe(t)) {
|
|
483
483
|
const i = ui(this), o = Hn(i, t, void 0);
|
|
@@ -491,7 +491,7 @@ var lc = class {
|
|
|
491
491
|
} else if (!t || !ya(t)) {
|
|
492
492
|
if (a = r(t), a === void 0 && (a = t), a === Qo && (a = void 0), this.autoFreeze_ && Zr(a, !0), n) {
|
|
493
493
|
const i = [], o = [];
|
|
494
|
-
|
|
494
|
+
it(Vn).generateReplacementPatches_(t, a, {
|
|
495
495
|
patches_: i,
|
|
496
496
|
inversePatches_: o
|
|
497
497
|
}), n(i, o);
|
|
@@ -499,7 +499,7 @@ var lc = class {
|
|
|
499
499
|
return a;
|
|
500
500
|
} else Ee(1, t);
|
|
501
501
|
}, this.produceWithPatches = (t, r) => {
|
|
502
|
-
if (
|
|
502
|
+
if (tt(t)) return (i, ...o) => this.produceWithPatches(i, (s) => t(s, ...o));
|
|
503
503
|
let n, a;
|
|
504
504
|
return [
|
|
505
505
|
this.produce(t, r, (i, o) => {
|
|
@@ -543,12 +543,12 @@ var lc = class {
|
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
r > -1 && (t = t.slice(r + 1));
|
|
546
|
-
const n =
|
|
546
|
+
const n = it(Vn).applyPatches_;
|
|
547
547
|
return Ie(e) ? n(e, t) : this.produce(e, (a) => n(a, t));
|
|
548
548
|
}
|
|
549
549
|
};
|
|
550
550
|
function Hn(e, t, r, n) {
|
|
551
|
-
const [a, i] = Kr(t) ?
|
|
551
|
+
const [a, i] = Kr(t) ? it(Sr).proxyMap_(t, r) : Yr(t) ? it(Sr).proxySet_(t, r) : sc(t, r);
|
|
552
552
|
return (r?.scope_ ?? rs()).drafts_.push(a), i.callbacks_ = r?.callbacks_ ?? [], i.key_ = n, r && n !== void 0 ? ic(r, i, n) : i.callbacks_.push(function(s) {
|
|
553
553
|
s.mapSetPlugin_?.fixSetContents(i);
|
|
554
554
|
const { patchPlugin_: d } = s;
|
|
@@ -865,7 +865,7 @@ var Ec = ls(), Ic = ls, qn = /* @__PURE__ */ Gl({
|
|
|
865
865
|
createSelector: () => Oc,
|
|
866
866
|
createSelectorCreator: () => $a,
|
|
867
867
|
createSerializableStateInvariantMiddleware: () => Cs,
|
|
868
|
-
createSlice: () =>
|
|
868
|
+
createSlice: () => Xe,
|
|
869
869
|
current: () => Qr,
|
|
870
870
|
findNonSerializableValue: () => Or,
|
|
871
871
|
formatProdErrorMessage: () => Y,
|
|
@@ -983,7 +983,7 @@ function yi(e) {
|
|
|
983
983
|
return Fe(e) ? en(e, () => {
|
|
984
984
|
}) : e;
|
|
985
985
|
}
|
|
986
|
-
function
|
|
986
|
+
function rt(e, t, r) {
|
|
987
987
|
return e.has(t) ? e.get(t) : e.set(t, r(t)).get(t);
|
|
988
988
|
}
|
|
989
989
|
function ys(e) {
|
|
@@ -1528,15 +1528,15 @@ function Rs({ creators: e } = {}) {
|
|
|
1528
1528
|
function O(T) {
|
|
1529
1529
|
let k = T[b];
|
|
1530
1530
|
if (typeof k > "u") {
|
|
1531
|
-
if (S) k =
|
|
1531
|
+
if (S) k = rt(m, O, y);
|
|
1532
1532
|
else if (process.env.NODE_ENV !== "production") throw new Error(process.env.NODE_ENV === "production" ? Y(15) : "selectSlice returned undefined for an uninjected slice reducer");
|
|
1533
1533
|
}
|
|
1534
1534
|
return k;
|
|
1535
1535
|
}
|
|
1536
1536
|
function N(T = f) {
|
|
1537
|
-
return
|
|
1537
|
+
return rt(rt(h, S, () => /* @__PURE__ */ new WeakMap()), T, () => {
|
|
1538
1538
|
const k = {};
|
|
1539
|
-
for (const [q, J] of Object.entries(n.selectors ?? {})) k[q] = zc(J, T, () =>
|
|
1539
|
+
for (const [q, J] of Object.entries(n.selectors ?? {})) k[q] = zc(J, T, () => rt(m, T, y), S);
|
|
1540
1540
|
return k;
|
|
1541
1541
|
});
|
|
1542
1542
|
}
|
|
@@ -1581,7 +1581,7 @@ function zc(e, t, r, n) {
|
|
|
1581
1581
|
}
|
|
1582
1582
|
return a.unwrapped = e, a;
|
|
1583
1583
|
}
|
|
1584
|
-
var
|
|
1584
|
+
var Xe = /* @__PURE__ */ Rs();
|
|
1585
1585
|
function Wc() {
|
|
1586
1586
|
function e(t, r) {
|
|
1587
1587
|
return {
|
|
@@ -1688,14 +1688,14 @@ function ut(e, t) {
|
|
|
1688
1688
|
const r = t(e);
|
|
1689
1689
|
return process.env.NODE_ENV !== "production" && r === void 0 && console.warn("The entity passed to the `selectId` implementation returned undefined.", "You should probably provide your own `selectId` implementation.", "The entity that was passed:", e, "The `selectId` implementation:", t.toString()), r;
|
|
1690
1690
|
}
|
|
1691
|
-
function
|
|
1691
|
+
function Ze(e) {
|
|
1692
1692
|
return Array.isArray(e) || (e = Object.values(e)), e;
|
|
1693
1693
|
}
|
|
1694
1694
|
function pr(e) {
|
|
1695
1695
|
return Ie(e) ? Qr(e) : e;
|
|
1696
1696
|
}
|
|
1697
1697
|
function Fs(e, t, r) {
|
|
1698
|
-
e =
|
|
1698
|
+
e = Ze(e);
|
|
1699
1699
|
const n = pr(r.ids), a = new Set(n), i = [], o = /* @__PURE__ */ new Set([]), s = [];
|
|
1700
1700
|
for (const d of e) {
|
|
1701
1701
|
const l = ut(d, t);
|
|
@@ -1716,7 +1716,7 @@ function js(e) {
|
|
|
1716
1716
|
y in v.entities || (v.ids.push(y), v.entities[y] = p);
|
|
1717
1717
|
}
|
|
1718
1718
|
function r(p, v) {
|
|
1719
|
-
p =
|
|
1719
|
+
p = Ze(p);
|
|
1720
1720
|
for (const y of p) t(y, v);
|
|
1721
1721
|
}
|
|
1722
1722
|
function n(p, v) {
|
|
@@ -1724,11 +1724,11 @@ function js(e) {
|
|
|
1724
1724
|
y in v.entities || v.ids.push(y), v.entities[y] = p;
|
|
1725
1725
|
}
|
|
1726
1726
|
function a(p, v) {
|
|
1727
|
-
p =
|
|
1727
|
+
p = Ze(p);
|
|
1728
1728
|
for (const y of p) n(y, v);
|
|
1729
1729
|
}
|
|
1730
1730
|
function i(p, v) {
|
|
1731
|
-
p =
|
|
1731
|
+
p = Ze(p), v.ids = [], v.entities = {}, r(p, v);
|
|
1732
1732
|
}
|
|
1733
1733
|
function o(p, v) {
|
|
1734
1734
|
return s([p], v);
|
|
@@ -1807,7 +1807,7 @@ function nu(e, t) {
|
|
|
1807
1807
|
return o([y], $);
|
|
1808
1808
|
}
|
|
1809
1809
|
function o(y, $, P) {
|
|
1810
|
-
y =
|
|
1810
|
+
y = Ze(y);
|
|
1811
1811
|
const b = new Set(P ?? pr($.ids)), S = /* @__PURE__ */ new Set(), O = y.filter((N) => {
|
|
1812
1812
|
const T = ut(N, e), k = !S.has(T);
|
|
1813
1813
|
return k && S.add(T), !b.has(T) && k;
|
|
@@ -1819,16 +1819,16 @@ function nu(e, t) {
|
|
|
1819
1819
|
}
|
|
1820
1820
|
function d(y, $) {
|
|
1821
1821
|
let P = {};
|
|
1822
|
-
if (y =
|
|
1822
|
+
if (y = Ze(y), y.length !== 0) {
|
|
1823
1823
|
for (const b of y) {
|
|
1824
1824
|
const S = e(b);
|
|
1825
1825
|
P[S] = b, delete $.entities[S];
|
|
1826
1826
|
}
|
|
1827
|
-
y =
|
|
1827
|
+
y = Ze(P), v($, y);
|
|
1828
1828
|
}
|
|
1829
1829
|
}
|
|
1830
1830
|
function l(y, $) {
|
|
1831
|
-
y =
|
|
1831
|
+
y = Ze(y), $.entities = {}, $.ids = [], o(y, $, []);
|
|
1832
1832
|
}
|
|
1833
1833
|
function c(y, $) {
|
|
1834
1834
|
return f([y], $);
|
|
@@ -1916,7 +1916,7 @@ var iu = "task", Ls = "listener", Bs = "completed", Sa = "cancelled", ou = `task
|
|
|
1916
1916
|
}, Pa = (e, t) => {
|
|
1917
1917
|
if (typeof e != "function") throw new TypeError(process.env.NODE_ENV === "production" ? Y(32) : `${t} is not a function`);
|
|
1918
1918
|
}, Tr = () => {
|
|
1919
|
-
}, Us = (e, t = Tr) => (e.catch(t), e), Vs = (e, t) => (e.addEventListener("abort", t, { once: !0 }), () => e.removeEventListener("abort", t)),
|
|
1919
|
+
}, Us = (e, t = Tr) => (e.catch(t), e), Vs = (e, t) => (e.addEventListener("abort", t, { once: !0 }), () => e.removeEventListener("abort", t)), nt = (e) => {
|
|
1920
1920
|
if (e.aborted) throw new qt(e.reason);
|
|
1921
1921
|
};
|
|
1922
1922
|
function Gs(e, t) {
|
|
@@ -1946,7 +1946,7 @@ var lu = async (e, t) => {
|
|
|
1946
1946
|
} finally {
|
|
1947
1947
|
t?.();
|
|
1948
1948
|
}
|
|
1949
|
-
}, Ar = (e) => (t) => Us(Gs(e, t).then((r) => (
|
|
1949
|
+
}, Ar = (e) => (t) => Us(Gs(e, t).then((r) => (nt(e), r))), zs = (e) => {
|
|
1950
1950
|
const t = Ar(e);
|
|
1951
1951
|
return (r) => t(new Promise((n) => setTimeout(n, r)));
|
|
1952
1952
|
}, { assign: pt } = Object, Ni = {}, Kt = "listenerMiddleware", cu = (e, t) => {
|
|
@@ -1956,13 +1956,13 @@ var lu = async (e, t) => {
|
|
|
1956
1956
|
const i = new AbortController();
|
|
1957
1957
|
r(i);
|
|
1958
1958
|
const o = lu(async () => {
|
|
1959
|
-
|
|
1959
|
+
nt(e), nt(i.signal);
|
|
1960
1960
|
const s = await n({
|
|
1961
1961
|
pause: Ar(i.signal),
|
|
1962
1962
|
delay: zs(i.signal),
|
|
1963
1963
|
signal: i.signal
|
|
1964
1964
|
});
|
|
1965
|
-
return
|
|
1965
|
+
return nt(i.signal), s;
|
|
1966
1966
|
}, () => i.abort(su));
|
|
1967
1967
|
return a?.autoJoin && t.push(o.catch(Tr)), {
|
|
1968
1968
|
result: Ar(e)(o),
|
|
@@ -1973,7 +1973,7 @@ var lu = async (e, t) => {
|
|
|
1973
1973
|
};
|
|
1974
1974
|
}, uu = (e, t) => {
|
|
1975
1975
|
const r = async (n, a) => {
|
|
1976
|
-
|
|
1976
|
+
nt(t);
|
|
1977
1977
|
let i = () => {
|
|
1978
1978
|
};
|
|
1979
1979
|
const o = [new Promise((s, d) => {
|
|
@@ -1994,7 +1994,7 @@ var lu = async (e, t) => {
|
|
|
1994
1994
|
a != null && o.push(new Promise((s) => setTimeout(s, a, null)));
|
|
1995
1995
|
try {
|
|
1996
1996
|
const s = await Gs(t, Promise.race(o));
|
|
1997
|
-
return
|
|
1997
|
+
return nt(t), s;
|
|
1998
1998
|
} finally {
|
|
1999
1999
|
i();
|
|
2000
2000
|
}
|
|
@@ -2088,7 +2088,7 @@ var lu = async (e, t) => {
|
|
|
2088
2088
|
$.abort(Kn), m.pending.delete($);
|
|
2089
2089
|
},
|
|
2090
2090
|
throwIfCancelled: () => {
|
|
2091
|
-
|
|
2091
|
+
nt($.signal);
|
|
2092
2092
|
}
|
|
2093
2093
|
})));
|
|
2094
2094
|
} catch (S) {
|
|
@@ -2143,16 +2143,16 @@ var lu = async (e, t) => {
|
|
|
2143
2143
|
meta: { instanceId: e }
|
|
2144
2144
|
})), { withTypes: () => r }), n = Object.assign(function(...d) {
|
|
2145
2145
|
d.forEach((l) => {
|
|
2146
|
-
|
|
2146
|
+
rt(t, l, hu);
|
|
2147
2147
|
});
|
|
2148
|
-
}, { withTypes: () => n }), a = (s) => br(...Array.from(t.values()).map((d) =>
|
|
2148
|
+
}, { withTypes: () => n }), a = (s) => br(...Array.from(t.values()).map((d) => rt(d.applied, s, d.middleware))), i = Er(r, vu(e));
|
|
2149
2149
|
return {
|
|
2150
2150
|
middleware: (s) => (d) => (l) => i(l) ? (n(...l.payload), s.dispatch) : a(s)(d)(l),
|
|
2151
2151
|
addMiddleware: n,
|
|
2152
2152
|
withMiddleware: r,
|
|
2153
2153
|
instanceId: e
|
|
2154
2154
|
};
|
|
2155
|
-
}, bu = (e) => "reducerPath" in e && typeof e.reducerPath == "string", $u = (e) => e.flatMap((t) => bu(t) ? [[t.reducerPath, t.reducer]] : Object.entries(t)), Oa = /* @__PURE__ */ Symbol.for("rtk-state-proxy-original"), gu = (e) => !!e && !!e[Oa], Nu = /* @__PURE__ */ new WeakMap(), Cu = (e, t, r) =>
|
|
2155
|
+
}, bu = (e) => "reducerPath" in e && typeof e.reducerPath == "string", $u = (e) => e.flatMap((t) => bu(t) ? [[t.reducerPath, t.reducer]] : Object.entries(t)), Oa = /* @__PURE__ */ Symbol.for("rtk-state-proxy-original"), gu = (e) => !!e && !!e[Oa], Nu = /* @__PURE__ */ new WeakMap(), Cu = (e, t, r) => rt(Nu, e, () => new Proxy(e, { get: (n, a, i) => {
|
|
2156
2156
|
if (a === Oa) return n;
|
|
2157
2157
|
const o = Reflect.get(n, a, i);
|
|
2158
2158
|
if (typeof o > "u") {
|
|
@@ -2202,7 +2202,7 @@ var Be = [
|
|
|
2202
2202
|
], Ou = {
|
|
2203
2203
|
currentStep: "professionals",
|
|
2204
2204
|
completedSteps: ["professionals"]
|
|
2205
|
-
}, Ks =
|
|
2205
|
+
}, Ks = Xe({
|
|
2206
2206
|
name: "breadcrumbs",
|
|
2207
2207
|
initialState: Ou,
|
|
2208
2208
|
reducers: {
|
|
@@ -2249,7 +2249,7 @@ var Be = [
|
|
|
2249
2249
|
isService: !0,
|
|
2250
2250
|
currency: "",
|
|
2251
2251
|
token: ""
|
|
2252
|
-
}, Ys =
|
|
2252
|
+
}, Ys = Xe({
|
|
2253
2253
|
name: "outletDetails",
|
|
2254
2254
|
initialState: Pi,
|
|
2255
2255
|
reducers: {
|
|
@@ -2268,7 +2268,7 @@ var Be = [
|
|
|
2268
2268
|
selectedCategory: null,
|
|
2269
2269
|
selectedServices: [],
|
|
2270
2270
|
selectedProfessional: null
|
|
2271
|
-
}, Zs =
|
|
2271
|
+
}, Zs = Xe({
|
|
2272
2272
|
name: "service",
|
|
2273
2273
|
initialState: wi,
|
|
2274
2274
|
reducers: {
|
|
@@ -2298,7 +2298,7 @@ var Be = [
|
|
|
2298
2298
|
},
|
|
2299
2299
|
clearServices: () => wi
|
|
2300
2300
|
}
|
|
2301
|
-
}), { setServicePayload: Du, setCategory: Av, toggleService: _i, clearServices: xv, incrementService: Ru, decrementService: Oi, toggleProfessional: Fu } = Zs.actions, ju = Zs.reducer, Ke = "https://prod.aaravpos.com/api/v1",
|
|
2301
|
+
}), { setServicePayload: Du, setCategory: Av, toggleService: _i, clearServices: xv, incrementService: Ru, decrementService: Oi, toggleProfessional: Fu } = Zs.actions, ju = Zs.reducer, Ke = "https://prod.aaravpos.com/api/v1", Je = () => ({
|
|
2302
2302
|
"Content-Type": "application/json",
|
|
2303
2303
|
Authorization: `Bearer ${an.getState()?.barber?.outletDetails?.token}`
|
|
2304
2304
|
}), Lu = async (e, t, r) => {
|
|
@@ -2316,14 +2316,14 @@ var Be = [
|
|
|
2316
2316
|
}, Bu = async (e, t, r) => {
|
|
2317
2317
|
const n = await fetch(`${Ke}/integration/slot/tenant/${e}/staff/${t}/online?date=${r}`, {
|
|
2318
2318
|
method: "GET",
|
|
2319
|
-
headers:
|
|
2319
|
+
headers: Je()
|
|
2320
2320
|
});
|
|
2321
2321
|
if (!n.ok) throw new Error("Failed to fetch services");
|
|
2322
2322
|
return await n.json();
|
|
2323
2323
|
}, Uu = async (e) => {
|
|
2324
2324
|
const t = await fetch(`${Ke}/integration/appointment/create`, {
|
|
2325
2325
|
method: "POST",
|
|
2326
|
-
headers:
|
|
2326
|
+
headers: Je(),
|
|
2327
2327
|
body: JSON.stringify(e)
|
|
2328
2328
|
});
|
|
2329
2329
|
if (!t.ok) throw new Error("Failed to fetch services");
|
|
@@ -2331,14 +2331,14 @@ var Be = [
|
|
|
2331
2331
|
}, Vu = async (e, t) => {
|
|
2332
2332
|
const r = await fetch(`${Ke}/integration/appointment/details?tenantId=${t}&appointmentId=${e}`, {
|
|
2333
2333
|
method: "GET",
|
|
2334
|
-
headers:
|
|
2334
|
+
headers: Je()
|
|
2335
2335
|
});
|
|
2336
2336
|
if (!r.ok) throw new Error("Failed to fetch appointment details");
|
|
2337
2337
|
return await r.json();
|
|
2338
2338
|
}, Gu = async ({ search: e, tenantId: t }) => {
|
|
2339
2339
|
const r = await fetch(`${Ke}/integration/customer/drop-down/list?tenantId=${t}&search=${encodeURIComponent(e || "")}`, {
|
|
2340
2340
|
method: "GET",
|
|
2341
|
-
headers:
|
|
2341
|
+
headers: Je()
|
|
2342
2342
|
});
|
|
2343
2343
|
if (!r.ok) throw new Error("Failed to fetch customers");
|
|
2344
2344
|
return await r.json();
|
|
@@ -2346,7 +2346,7 @@ var Be = [
|
|
|
2346
2346
|
try {
|
|
2347
2347
|
const t = await fetch(`${Ke}/payment/pay/customer/direct`, {
|
|
2348
2348
|
method: "POST",
|
|
2349
|
-
headers:
|
|
2349
|
+
headers: Je(),
|
|
2350
2350
|
body: JSON.stringify(e)
|
|
2351
2351
|
}), r = await t.json();
|
|
2352
2352
|
if (!t.ok) throw r;
|
|
@@ -2358,7 +2358,7 @@ var Be = [
|
|
|
2358
2358
|
try {
|
|
2359
2359
|
const t = await fetch(`${Ke}/payment/orders/${e}/invoicing/finalize`, {
|
|
2360
2360
|
method: "POST",
|
|
2361
|
-
headers:
|
|
2361
|
+
headers: Je()
|
|
2362
2362
|
}), r = await t.json();
|
|
2363
2363
|
if (!t.ok) throw r;
|
|
2364
2364
|
return r;
|
|
@@ -2377,7 +2377,7 @@ var Be = [
|
|
|
2377
2377
|
}, Ti = async (e, t, r) => {
|
|
2378
2378
|
const n = await fetch(`${Ke}/concent/check/${e}/${t}?serviceId=${r}`, {
|
|
2379
2379
|
method: "GET",
|
|
2380
|
-
headers:
|
|
2380
|
+
headers: Je()
|
|
2381
2381
|
});
|
|
2382
2382
|
if (!n.ok) throw new Error("Failed to check consent requirement");
|
|
2383
2383
|
return n.json();
|
|
@@ -2396,12 +2396,12 @@ var Be = [
|
|
|
2396
2396
|
d === "CHECKBOX_ONLY" && (h.isChecked = l ?? !0), c && (h.typedName = c), f && (h.imageUrl = f);
|
|
2397
2397
|
const m = await fetch(`${Ke}/concent/customer-sign`, {
|
|
2398
2398
|
method: "POST",
|
|
2399
|
-
headers:
|
|
2399
|
+
headers: Je(),
|
|
2400
2400
|
body: JSON.stringify(h)
|
|
2401
2401
|
}), p = await m.json();
|
|
2402
2402
|
if (!m.ok) throw p;
|
|
2403
2403
|
return p;
|
|
2404
|
-
}, mr = nn("slots/getStaffSlots", async ({ tenantId: e, staffId: t, date: r }) => await Bu(e, t, r)), Js =
|
|
2404
|
+
}, mr = nn("slots/getStaffSlots", async ({ tenantId: e, staffId: t, date: r }) => await Bu(e, t, r)), Js = Xe({
|
|
2405
2405
|
name: "slots",
|
|
2406
2406
|
initialState: {
|
|
2407
2407
|
selectedSlotIndexes: [],
|
|
@@ -2462,7 +2462,7 @@ var Be = [
|
|
|
2462
2462
|
userDetails: null,
|
|
2463
2463
|
tipPct: 0,
|
|
2464
2464
|
bookingMode: "booking"
|
|
2465
|
-
}, Qs =
|
|
2465
|
+
}, Qs = Xe({
|
|
2466
2466
|
name: "appointment",
|
|
2467
2467
|
initialState: Ai,
|
|
2468
2468
|
reducers: {
|
|
@@ -2494,7 +2494,7 @@ var Be = [
|
|
|
2494
2494
|
t.loading = !1, t.error = r.payload || "Appointment failed";
|
|
2495
2495
|
});
|
|
2496
2496
|
}
|
|
2497
|
-
}), { resetAppointment: Mv, setBookingMode: kv, setUserDetails: xi, setTips: Yu, setAppointmentId: nr, clearUserDetails: ed } = Qs.actions, Zu = Qs.reducer, td =
|
|
2497
|
+
}), { resetAppointment: Mv, setBookingMode: kv, setUserDetails: xi, setTips: Yu, setAppointmentId: nr, clearUserDetails: ed } = Qs.actions, Zu = Qs.reducer, td = Xe({
|
|
2498
2498
|
name: "outletList",
|
|
2499
2499
|
initialState: { outlets: [] },
|
|
2500
2500
|
reducers: {
|
|
@@ -2505,7 +2505,7 @@ var Be = [
|
|
|
2505
2505
|
e.outlets = [];
|
|
2506
2506
|
}
|
|
2507
2507
|
}
|
|
2508
|
-
}), { setOutletList: Xu, clearOutletList: Dv } = td.actions, Ju = td.reducer, rd =
|
|
2508
|
+
}), { setOutletList: Xu, clearOutletList: Dv } = td.actions, Ju = td.reducer, rd = Xe({
|
|
2509
2509
|
name: "theme",
|
|
2510
2510
|
initialState: {
|
|
2511
2511
|
button: {
|
|
@@ -3277,7 +3277,7 @@ function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime:
|
|
|
3277
3277
|
}));
|
|
3278
3278
|
const V = O?.find((H) => H.id === T.id);
|
|
3279
3279
|
return V ? N.map((H) => {
|
|
3280
|
-
const Oe = V.assignments?.find((
|
|
3280
|
+
const Oe = V.assignments?.find((et) => et.id === H.id), ye = {
|
|
3281
3281
|
...H,
|
|
3282
3282
|
price: Oe?.price || H.price || H.min_price || 0,
|
|
3283
3283
|
duration: Oe?.duration || H.estimated_time || H.min_time || 0
|
|
@@ -3452,13 +3452,13 @@ function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime:
|
|
|
3452
3452
|
/* @__PURE__ */ u("div", {
|
|
3453
3453
|
className: "aaravpos-barber-tip-options",
|
|
3454
3454
|
children: [...me, "custom"].map((V, H) => {
|
|
3455
|
-
const Oe = V === "custom", ye = Oe ? ne : W === V,
|
|
3455
|
+
const Oe = V === "custom", ye = Oe ? ne : W === V, et = H === 0, Zt = H === [...me, "custom"].length - 1;
|
|
3456
3456
|
return /* @__PURE__ */ u("button", {
|
|
3457
3457
|
onClick: () => {
|
|
3458
3458
|
Oe ? (he(!0), o?.(Number(q) || 0)) : (he(!1), J(""), o?.(Number(V)));
|
|
3459
3459
|
},
|
|
3460
3460
|
className: `aaravpos-barber-tip-btn
|
|
3461
|
-
${
|
|
3461
|
+
${et || Zt ? "aaravpos-barber-tip-btn-fixed" : "aaravpos-barber-tip-btn-flex"}
|
|
3462
3462
|
${ye ? "aaravpos-barber-tip-btn-active" : ""}`,
|
|
3463
3463
|
children: Oe ? "Custom" : V === 0 ? "No tip" : `${V}%`
|
|
3464
3464
|
}, V);
|
|
@@ -5184,16 +5184,16 @@ Valid keys: ` + JSON.stringify(Object.keys(C), null, " "));
|
|
|
5184
5184
|
t.exports = L1()(r.isElement, n);
|
|
5185
5185
|
} else t.exports = B1()();
|
|
5186
5186
|
})), _ = /* @__PURE__ */ va(U1(), 1);
|
|
5187
|
-
function
|
|
5187
|
+
function ot(e, t, r) {
|
|
5188
5188
|
this.x = e, this.y = t, this.time = r || (/* @__PURE__ */ new Date()).getTime();
|
|
5189
5189
|
}
|
|
5190
|
-
|
|
5190
|
+
ot.prototype.velocityFrom = function(e) {
|
|
5191
5191
|
return this.time !== e.time ? this.distanceTo(e) / (this.time - e.time) : 1;
|
|
5192
5192
|
};
|
|
5193
|
-
|
|
5193
|
+
ot.prototype.distanceTo = function(e) {
|
|
5194
5194
|
return Math.sqrt(Math.pow(this.x - e.x, 2) + Math.pow(this.y - e.y, 2));
|
|
5195
5195
|
};
|
|
5196
|
-
|
|
5196
|
+
ot.prototype.equals = function(e) {
|
|
5197
5197
|
return this.x === e.x && this.y === e.y && this.time === e.time;
|
|
5198
5198
|
};
|
|
5199
5199
|
function ka(e, t, r, n) {
|
|
@@ -5317,7 +5317,7 @@ Q.prototype._reset = function() {
|
|
|
5317
5317
|
};
|
|
5318
5318
|
Q.prototype._createPoint = function(e, t, r) {
|
|
5319
5319
|
var n = this._canvas.getBoundingClientRect();
|
|
5320
|
-
return new
|
|
5320
|
+
return new ot(e - n.left, t - n.top, r || (/* @__PURE__ */ new Date()).getTime());
|
|
5321
5321
|
};
|
|
5322
5322
|
Q.prototype._addPoint = function(e) {
|
|
5323
5323
|
var t = this.points, r = void 0;
|
|
@@ -5345,8 +5345,8 @@ Q.prototype._calculateCurveControlPoints = function(e, t, r) {
|
|
|
5345
5345
|
y: d.y + h * m
|
|
5346
5346
|
}, v = t.x - p.x, y = t.y - p.y;
|
|
5347
5347
|
return {
|
|
5348
|
-
c1: new
|
|
5349
|
-
c2: new
|
|
5348
|
+
c1: new ot(s.x + v, s.y + y),
|
|
5349
|
+
c2: new ot(d.x + v, d.y + y)
|
|
5350
5350
|
};
|
|
5351
5351
|
};
|
|
5352
5352
|
Q.prototype._calculateCurveWidths = function(e) {
|
|
@@ -5384,7 +5384,7 @@ Q.prototype._fromData = function(e, t, r) {
|
|
|
5384
5384
|
for (var n = 0; n < e.length; n += 1) {
|
|
5385
5385
|
var a = e[n];
|
|
5386
5386
|
if (a.length > 1) for (var i = 0; i < a.length; i += 1) {
|
|
5387
|
-
var o = a[i], s = new
|
|
5387
|
+
var o = a[i], s = new ot(o.x, o.y, o.time), d = o.color;
|
|
5388
5388
|
if (i === 0)
|
|
5389
5389
|
this.penColor = d, this._reset(), this._addPoint(s);
|
|
5390
5390
|
else if (i !== a.length - 1) {
|
|
@@ -13574,7 +13574,7 @@ function Hi(e, t) {
|
|
|
13574
13574
|
return e[1] && t[1] ? e[1] > t[1] ? 1 : e[1] < t[1] ? -1 : 0 : !e[1] && t[1] ? 1 : e[1] && !t[1] ? -1 : 0;
|
|
13575
13575
|
}
|
|
13576
13576
|
var S0 = {}.constructor;
|
|
13577
|
-
function
|
|
13577
|
+
function at(e) {
|
|
13578
13578
|
return e != null && e.constructor === S0;
|
|
13579
13579
|
}
|
|
13580
13580
|
function bt(e) {
|
|
@@ -14035,12 +14035,12 @@ function Zi(e, t) {
|
|
|
14035
14035
|
}
|
|
14036
14036
|
function pd(e) {
|
|
14037
14037
|
if (!e) throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");
|
|
14038
|
-
if (!
|
|
14038
|
+
if (!at(e) || !at(e.countries)) throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(at(e) ? "an object of shape: { " + Object.keys(e).join(", ") + " }" : "a " + x0(e) + ": " + e, "."));
|
|
14039
14039
|
}
|
|
14040
14040
|
var x0 = function(t) {
|
|
14041
14041
|
return bt(t);
|
|
14042
14042
|
};
|
|
14043
|
-
function
|
|
14043
|
+
function Qe(e, t) {
|
|
14044
14044
|
if (t = new ue(t), t.hasCountry(e)) return t.selectNumberingPlan(e).countryCallingCode();
|
|
14045
14045
|
throw new Error("Unknown country: ".concat(e));
|
|
14046
14046
|
}
|
|
@@ -14317,7 +14317,7 @@ function ep(e, t, r) {
|
|
|
14317
14317
|
}
|
|
14318
14318
|
}
|
|
14319
14319
|
function gd(e, t, r, n, a) {
|
|
14320
|
-
var i = t || r ?
|
|
14320
|
+
var i = t || r ? Qe(t || r, a) : n;
|
|
14321
14321
|
if (e.indexOf(i) === 0) {
|
|
14322
14322
|
a = new ue(a), a.selectNumberingPlan(t || r, i);
|
|
14323
14323
|
var o = e.slice(i.length), s = ta(o, t, a).nationalNumber, d = ta(e, t, a).nationalNumber;
|
|
@@ -14449,7 +14449,7 @@ function xn(e, t, r, n) {
|
|
|
14449
14449
|
return t ? n(e, t, r) : e;
|
|
14450
14450
|
}
|
|
14451
14451
|
function mp(e, t, r, n, a) {
|
|
14452
|
-
if (
|
|
14452
|
+
if (Qe(n, a.metadata) === r) {
|
|
14453
14453
|
var i = Fr(e, t, "NATIONAL", a);
|
|
14454
14454
|
return r === "1" ? r + " " + i : i;
|
|
14455
14455
|
}
|
|
@@ -14538,7 +14538,7 @@ var Np = !1, _d = /* @__PURE__ */ (function() {
|
|
|
14538
14538
|
if (bp(this, e), !t) throw new TypeError("First argument is required");
|
|
14539
14539
|
if (typeof t != "string") throw new TypeError("First argument must be a string");
|
|
14540
14540
|
if (t[0] === "+" && !r) throw new TypeError("`metadata` argument not passed");
|
|
14541
|
-
if (
|
|
14541
|
+
if (at(r) && at(r.countries)) {
|
|
14542
14542
|
n = r;
|
|
14543
14543
|
var a = t;
|
|
14544
14544
|
if (!Pp.test(a)) throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');
|
|
@@ -14981,7 +14981,7 @@ function i2(e, t, r, n) {
|
|
|
14981
14981
|
var a = Fa(na(e), void 0, t, r, n.metadata), i = a.countryCallingCodeSource, o = a.countryCallingCode, s = a.number, d;
|
|
14982
14982
|
if (o) n.selectNumberingPlan(o);
|
|
14983
14983
|
else if (s && (t || r))
|
|
14984
|
-
n.selectNumberingPlan(t, r), t ? d = t : e2 && n.isNonGeographicCallingCode(r) && (d = "001"), o = r ||
|
|
14984
|
+
n.selectNumberingPlan(t, r), t ? d = t : e2 && n.isNonGeographicCallingCode(r) && (d = "001"), o = r || Qe(t, n.metadata);
|
|
14985
14985
|
else return {};
|
|
14986
14986
|
if (!s) return {
|
|
14987
14987
|
countryCallingCodeSource: i,
|
|
@@ -15153,7 +15153,7 @@ function Id(e) {
|
|
|
15153
15153
|
else throw new TypeError("A text for parsing must be a string.");
|
|
15154
15154
|
if (!n || typeof n == "string")
|
|
15155
15155
|
i ? (s = a, d = i) : (s = void 0, d = a), n && (s = c2({ defaultCountry: n }, s));
|
|
15156
|
-
else if (
|
|
15156
|
+
else if (at(n)) a ? (s = n, d = a) : d = n;
|
|
15157
15157
|
else throw new Error("Invalid second argument: ".concat(n));
|
|
15158
15158
|
return {
|
|
15159
15159
|
text: o,
|
|
@@ -16357,7 +16357,7 @@ var Do = !1, Ct = /* @__PURE__ */ (function() {
|
|
|
16357
16357
|
key: "getCountryAndCallingCode",
|
|
16358
16358
|
value: function(r) {
|
|
16359
16359
|
var n, a;
|
|
16360
|
-
return r && (
|
|
16360
|
+
return r && (at(r) ? (n = r.defaultCountry, a = r.defaultCallingCode) : n = r), n && !this.metadata.hasCountry(n) && (n = void 0), a && Do && this.metadata.isNonGeographicCallingCode(a) && (n = "001"), [n, a];
|
|
16361
16361
|
}
|
|
16362
16362
|
},
|
|
16363
16363
|
{
|
|
@@ -16569,7 +16569,7 @@ function Fm(e, t, r) {
|
|
|
16569
16569
|
var Br = /* @__PURE__ */ va(q1(), 1);
|
|
16570
16570
|
function xd(e) {
|
|
16571
16571
|
var t = e.inputFormat, r = e.country, n = e.metadata;
|
|
16572
|
-
return t === "NATIONAL_PART_OF_INTERNATIONAL" ? "+".concat(
|
|
16572
|
+
return t === "NATIONAL_PART_OF_INTERNATIONAL" ? "+".concat(Qe(r, n)) : "";
|
|
16573
16573
|
}
|
|
16574
16574
|
function da(e, t) {
|
|
16575
16575
|
return t && (e = e.slice(t.length), e[0] === " " && (e = e.slice(1))), e;
|
|
@@ -17232,7 +17232,7 @@ var Gd = _.default.shape({
|
|
|
17232
17232
|
countries: _.default.object.isRequired
|
|
17233
17233
|
}), zd = _.default.objectOf(_.default.string);
|
|
17234
17234
|
function We(e, t) {
|
|
17235
|
-
return "+" +
|
|
17235
|
+
return "+" + Qe(e, t);
|
|
17236
17236
|
}
|
|
17237
17237
|
function _h(e) {
|
|
17238
17238
|
var t = e.value, r = e.phoneNumber, n = e.defaultCountry, a = e.getAnyCountry, i = e.countries, o = e.required, s = e.metadata, d;
|
|
@@ -17264,7 +17264,7 @@ function Ih(e, t) {
|
|
|
17264
17264
|
if (n) {
|
|
17265
17265
|
if (e[0] === "+") {
|
|
17266
17266
|
if (i)
|
|
17267
|
-
return e.indexOf("+" +
|
|
17267
|
+
return e.indexOf("+" + Qe(n, a)) === 0 ? Dh(e, n, a) : "";
|
|
17268
17268
|
if (r) {
|
|
17269
17269
|
var o = We(n, a);
|
|
17270
17270
|
return e.indexOf(o) === 0 ? e : o;
|
|
@@ -17286,7 +17286,7 @@ function ft(e, t, r) {
|
|
|
17286
17286
|
}
|
|
17287
17287
|
if (t) {
|
|
17288
17288
|
var a = qd(e, t, r);
|
|
17289
|
-
return "+".concat(
|
|
17289
|
+
return "+".concat(Qe(t, r)).concat(a || "");
|
|
17290
17290
|
}
|
|
17291
17291
|
}
|
|
17292
17292
|
}
|
|
@@ -17360,7 +17360,7 @@ function kh(e, t, r) {
|
|
|
17360
17360
|
}
|
|
17361
17361
|
function Dh(e, t, r) {
|
|
17362
17362
|
if (t) {
|
|
17363
|
-
var n = "+" +
|
|
17363
|
+
var n = "+" + Qe(t, r);
|
|
17364
17364
|
if (e.length < n.length) {
|
|
17365
17365
|
if (n.indexOf(e) === 0) return "";
|
|
17366
17366
|
} else if (e.indexOf(n) === 0) return e.slice(n.length);
|
|
@@ -18279,14 +18279,15 @@ var iv = [
|
|
|
18279
18279
|
return +`${t}${r}`;
|
|
18280
18280
|
};
|
|
18281
18281
|
function lv() {
|
|
18282
|
-
const e = qe(), { tenantId: t, id: r } = X((w) => w.barber.outletDetails), { timeZone: n, image: a, outletName: i, address: o } = X((w) => w.barber.outletDetails), { staff: s, selectedServices: d, selectedProfessional: l } = X((w) => w.barber.service), { selectedSlotIds: c, selectedDate: f, selectedTime: h } = X((w) => w.barber.slots), { userDetails: m, bookingMode: p, tipPct: v } = X((w) => w.barber.appointment), y = Array.isArray(d) ? d : [d], { selectedSlotIndexes: $, slots: P } = X((w) => w.barber.slots), [b, S] = Z(!1), [O, N] = Z(!1), [T, k] = Z(null), [q, J] = Z("person"), [ne, he] = Z(!1), [fe, pe] = Z(""), [Pe, ve] = Z(""), [me, ae] = Z(null), [ie, le] = Z(null), [x, C] = Z({}), [E, M] = Z({}), [L, D] = Z(!1), G = je(!1), B = je(""), U = be.now().setZone(n ?? "UTC"), [z, W] = Z(null), [K, A] = Z(!1), oe = je(""), $e = je(null), { register: V, handleSubmit: H, control: Oe, watch: ye, reset:
|
|
18282
|
+
const e = qe(), { tenantId: t, id: r } = X((w) => w.barber.outletDetails), { timeZone: n, image: a, outletName: i, address: o } = X((w) => w.barber.outletDetails), { staff: s, selectedServices: d, selectedProfessional: l } = X((w) => w.barber.service), { selectedSlotIds: c, selectedDate: f, selectedTime: h } = X((w) => w.barber.slots), { userDetails: m, bookingMode: p, tipPct: v } = X((w) => w.barber.appointment), y = Array.isArray(d) ? d : [d], { selectedSlotIndexes: $, slots: P } = X((w) => w.barber.slots), [b, S] = Z(!1), [O, N] = Z(!1), [T, k] = Z(null), [q, J] = Z("person"), [ne, he] = Z(!1), [fe, pe] = Z(""), [Pe, ve] = Z(""), [me, ae] = Z(null), [ie, le] = Z(null), [x, C] = Z({}), [E, M] = Z({}), [L, D] = Z(!1), G = je(!1), B = je(""), U = be.now().setZone(n ?? "UTC"), [z, W] = Z(null), [K, A] = Z(!1), oe = je(""), $e = je(null), { register: V, handleSubmit: H, control: Oe, watch: ye, reset: et, trigger: Zt, setValue: St, formState: { errors: Ye, isSubmitted: Ua } } = ha({
|
|
18283
18283
|
defaultValues: {
|
|
18284
18284
|
firstName: m?.firstName || "",
|
|
18285
18285
|
lastName: m?.lastName || "",
|
|
18286
18286
|
phone: m?.phone || "",
|
|
18287
18287
|
email: m?.email || ""
|
|
18288
18288
|
},
|
|
18289
|
-
mode: "
|
|
18289
|
+
mode: "onChange",
|
|
18290
|
+
reValidateMode: "onChange"
|
|
18290
18291
|
}), Pt = ye("phone"), wt = ye("email"), Xt = (w) => w?.replace(/\s+/g, "") || "", Va = (w) => /^\S+@\S+\.\S+$/.test(w), vn = y.map((w) => {
|
|
18291
18292
|
const I = s?.find((j) => j.id === l?.id)?.assignments?.find((j) => j.id === w.id), R = {
|
|
18292
18293
|
...w,
|
|
@@ -18326,14 +18327,14 @@ function lv() {
|
|
|
18326
18327
|
ce(() => {
|
|
18327
18328
|
m && xe?.length > 0 && ll();
|
|
18328
18329
|
}, [m, xe?.length]), ce(() => {
|
|
18329
|
-
|
|
18330
|
+
et({
|
|
18330
18331
|
...m,
|
|
18331
18332
|
phone: m?.phone || ""
|
|
18332
18333
|
}, {
|
|
18333
18334
|
keepErrors: !0,
|
|
18334
18335
|
keepDirty: !1
|
|
18335
18336
|
});
|
|
18336
|
-
}, [m,
|
|
18337
|
+
}, [m, et]), ce(() => {
|
|
18337
18338
|
Ua && Zt(["phone", "email"]);
|
|
18338
18339
|
}, [
|
|
18339
18340
|
Pt,
|
|
@@ -18390,7 +18391,7 @@ function lv() {
|
|
|
18390
18391
|
type: R
|
|
18391
18392
|
});
|
|
18392
18393
|
}, dl = () => {
|
|
18393
|
-
|
|
18394
|
+
et({
|
|
18394
18395
|
firstName: "",
|
|
18395
18396
|
lastName: "",
|
|
18396
18397
|
email: "",
|
|
@@ -18824,9 +18825,9 @@ function lv() {
|
|
|
18824
18825
|
})]
|
|
18825
18826
|
})
|
|
18826
18827
|
}),
|
|
18827
|
-
|
|
18828
|
+
Ye.phone && /* @__PURE__ */ u("p", {
|
|
18828
18829
|
className: "aaravpos-barber-error-text",
|
|
18829
|
-
children:
|
|
18830
|
+
children: Ye.phone.message
|
|
18830
18831
|
}),
|
|
18831
18832
|
K && /* @__PURE__ */ g("div", {
|
|
18832
18833
|
className: "aaravpos-barber-autofill-text",
|
|
@@ -18868,7 +18869,7 @@ function lv() {
|
|
|
18868
18869
|
},
|
|
18869
18870
|
validate: (w) => {
|
|
18870
18871
|
const I = !!w?.trim(), R = !!Xt(Pt);
|
|
18871
|
-
return !I && !R ? "Enter phone or email" : I &&
|
|
18872
|
+
return !I && !R ? "Enter phone or email" : I && !/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/.test(w) ? "Invalid email" : !0;
|
|
18872
18873
|
},
|
|
18873
18874
|
onChange: (w) => {
|
|
18874
18875
|
Za(w.target.value, null, "email");
|
|
@@ -18878,9 +18879,9 @@ function lv() {
|
|
|
18878
18879
|
placeholder: "Email address",
|
|
18879
18880
|
className: "aaravpos-barber-custom-input"
|
|
18880
18881
|
}),
|
|
18881
|
-
|
|
18882
|
+
Ye.email && /* @__PURE__ */ u("p", {
|
|
18882
18883
|
className: "aaravpos-barber-error-text",
|
|
18883
|
-
children:
|
|
18884
|
+
children: Ye.email.message
|
|
18884
18885
|
})
|
|
18885
18886
|
]
|
|
18886
18887
|
}),
|
|
@@ -18922,40 +18923,47 @@ function lv() {
|
|
|
18922
18923
|
placeholder: "First Name",
|
|
18923
18924
|
className: "aaravpos-barber-custom-input"
|
|
18924
18925
|
}),
|
|
18925
|
-
|
|
18926
|
+
Ye.firstName && /* @__PURE__ */ u("p", {
|
|
18926
18927
|
className: "aaravpos-barber-error-text",
|
|
18927
|
-
children:
|
|
18928
|
+
children: Ye.firstName.message
|
|
18928
18929
|
})
|
|
18929
18930
|
]
|
|
18930
18931
|
}),
|
|
18931
18932
|
/* @__PURE__ */ g("div", {
|
|
18932
18933
|
className: "aaravpos-barber-form-group",
|
|
18933
|
-
children: [
|
|
18934
|
-
|
|
18935
|
-
|
|
18936
|
-
|
|
18937
|
-
|
|
18938
|
-
id: "last_name",
|
|
18939
|
-
minLength: 2,
|
|
18940
|
-
maxLength: 20,
|
|
18941
|
-
autoComplete: "family-name",
|
|
18942
|
-
...V("lastName", {
|
|
18943
|
-
minLength: {
|
|
18944
|
-
value: 2,
|
|
18945
|
-
message: "Last name must be at least 2 characters"
|
|
18946
|
-
},
|
|
18947
|
-
maxLength: {
|
|
18948
|
-
value: 30,
|
|
18949
|
-
message: "Last name cannot exceed 30 characters"
|
|
18950
|
-
},
|
|
18951
|
-
pattern: {
|
|
18952
|
-
value: /^[A-Za-z\s]+$/,
|
|
18953
|
-
message: "Only letters are allowed"
|
|
18954
|
-
}
|
|
18934
|
+
children: [
|
|
18935
|
+
/* @__PURE__ */ u("label", {
|
|
18936
|
+
htmlFor: "last_name",
|
|
18937
|
+
className: "aaravpos-barber-form-label",
|
|
18938
|
+
children: "Last Name"
|
|
18955
18939
|
}),
|
|
18956
|
-
|
|
18957
|
-
|
|
18958
|
-
|
|
18940
|
+
/* @__PURE__ */ u("input", {
|
|
18941
|
+
id: "last_name",
|
|
18942
|
+
minLength: 2,
|
|
18943
|
+
maxLength: 20,
|
|
18944
|
+
autoComplete: "family-name",
|
|
18945
|
+
...V("lastName", {
|
|
18946
|
+
minLength: {
|
|
18947
|
+
value: 2,
|
|
18948
|
+
message: "Last name must be at least 2 characters"
|
|
18949
|
+
},
|
|
18950
|
+
maxLength: {
|
|
18951
|
+
value: 30,
|
|
18952
|
+
message: "Last name cannot exceed 30 characters"
|
|
18953
|
+
},
|
|
18954
|
+
pattern: {
|
|
18955
|
+
value: /^[A-Za-z\s]+$/,
|
|
18956
|
+
message: "Only letters are allowed"
|
|
18957
|
+
}
|
|
18958
|
+
}),
|
|
18959
|
+
placeholder: "Last Name",
|
|
18960
|
+
className: "aaravpos-barber-custom-input"
|
|
18961
|
+
}),
|
|
18962
|
+
Ye.lastName && /* @__PURE__ */ u("p", {
|
|
18963
|
+
className: "text-red-500 text-sm mt-1",
|
|
18964
|
+
children: Ye.lastName.message
|
|
18965
|
+
})
|
|
18966
|
+
]
|
|
18959
18967
|
})
|
|
18960
18968
|
]
|
|
18961
18969
|
}), /* @__PURE__ */ u("button", {
|