@aaravpos/appointment-barber-booking 3.0.2 → 3.0.4
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 +21 -21
- package/dist/index.js +299 -294
- package/dist/styles.css +9 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import j, { Component as gl, PureComponent as Nl, createContext as Cl, createElement as
|
|
1
|
+
import j, { Component as gl, PureComponent as Nl, createContext as Cl, createElement as Rn, forwardRef as qo, useCallback as Ue, useContext as Sl, useEffect as de, useMemo as ge, useRef as De, useState as Z } from "react";
|
|
2
2
|
import { Provider as Pl, useDispatch as ze, useSelector as J } from "react-redux";
|
|
3
3
|
import { applyMiddleware as wl, combineReducers as Ko, compose as fr, createStore as _l, isAction as jr, isPlainObject as Yo } from "redux";
|
|
4
4
|
import { FLUSH as Ol, PAUSE as El, PERSIST as Il, PURGE as Tl, REGISTER as Al, REHYDRATE as xl, persistReducer as Ml, persistStore as kl } from "redux-persist";
|
|
5
5
|
import { Fragment as $e, jsx as u, jsxs as g } from "react/jsx-runtime";
|
|
6
6
|
import { DateTime as ve } from "luxon";
|
|
7
7
|
import { ToastContainer as Dl, toast as re } from "react-toastify";
|
|
8
|
-
import { Controller as dt, useForm as
|
|
8
|
+
import { Controller as dt, useForm as va } from "react-hook-form";
|
|
9
9
|
import { debounce as Rl } from "lodash";
|
|
10
10
|
import * as Ic from "redux";
|
|
11
11
|
var Fl = Object.create, pr = Object.defineProperty, jl = Object.getOwnPropertyDescriptor, Ll = Object.getOwnPropertyNames, Bl = Object.getPrototypeOf, Ul = Object.prototype.hasOwnProperty, Te = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), Vl = (e, t) => {
|
|
@@ -16,7 +16,7 @@ var Fl = Object.create, pr = Object.defineProperty, jl = Object.getOwnPropertyDe
|
|
|
16
16
|
enumerable: !0
|
|
17
17
|
});
|
|
18
18
|
return t || pr(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
19
|
-
},
|
|
19
|
+
}, Fn = (e, t, r, n) => {
|
|
20
20
|
if (t && typeof t == "object" || typeof t == "function")
|
|
21
21
|
for (var a = Ll(t), i = 0, o = a.length, s; i < o; i++)
|
|
22
22
|
s = a[i], !Ul.call(e, s) && s !== r && pr(e, s, {
|
|
@@ -24,7 +24,7 @@ var Fl = Object.create, pr = Object.defineProperty, jl = Object.getOwnPropertyDe
|
|
|
24
24
|
enumerable: !(n = jl(t, s)) || n.enumerable
|
|
25
25
|
});
|
|
26
26
|
return e;
|
|
27
|
-
}, Gl = (e, t, r) => (
|
|
27
|
+
}, Gl = (e, t, r) => (Fn(e, t, "default"), r && Fn(r, t, "default")), ya = (e, t, r) => (r = e != null ? Fl(Bl(e)) : {}, Fn(t || !e || !e.__esModule ? pr(r, "default", {
|
|
28
28
|
value: e,
|
|
29
29
|
enumerable: !0
|
|
30
30
|
}) : r, e));
|
|
@@ -50,10 +50,10 @@ function Wl(e, t, r) {
|
|
|
50
50
|
function Hl(e, t) {
|
|
51
51
|
return t && (rr(t) === "object" || typeof t == "function") ? t : nr(e);
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
return
|
|
53
|
+
function jn(e) {
|
|
54
|
+
return jn = Object.setPrototypeOf ? Object.getPrototypeOf : function(r) {
|
|
55
55
|
return r.__proto__ || Object.getPrototypeOf(r);
|
|
56
|
-
},
|
|
56
|
+
}, jn(e);
|
|
57
57
|
}
|
|
58
58
|
function nr(e) {
|
|
59
59
|
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -65,12 +65,12 @@ function ql(e, t) {
|
|
|
65
65
|
value: e,
|
|
66
66
|
writable: !0,
|
|
67
67
|
configurable: !0
|
|
68
|
-
} }), t &&
|
|
68
|
+
} }), t && Ln(e, t);
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return
|
|
70
|
+
function Ln(e, t) {
|
|
71
|
+
return Ln = Object.setPrototypeOf || function(n, a) {
|
|
72
72
|
return n.__proto__ = a, n;
|
|
73
|
-
},
|
|
73
|
+
}, Ln(e, t);
|
|
74
74
|
}
|
|
75
75
|
function ar(e, t, r) {
|
|
76
76
|
return t in e ? Object.defineProperty(e, t, {
|
|
@@ -86,7 +86,7 @@ var Zo = /* @__PURE__ */ (function(e) {
|
|
|
86
86
|
var r, n;
|
|
87
87
|
zl(this, t);
|
|
88
88
|
for (var a = arguments.length, i = new Array(a), o = 0; o < a; o++) i[o] = arguments[o];
|
|
89
|
-
return n = Hl(this, (r =
|
|
89
|
+
return n = Hl(this, (r = jn(t)).call.apply(r, [this].concat(i))), ar(nr(n), "state", { bootstrapped: !1 }), ar(nr(n), "_unsubscribe", void 0), ar(nr(n), "handlePersistorState", function() {
|
|
90
90
|
n.props.persistor.getState().bootstrapped && (n.props.onBeforeLift ? Promise.resolve(n.props.onBeforeLift()).finally(function() {
|
|
91
91
|
return n.setState({ bootstrapped: !0 });
|
|
92
92
|
}) : n.setState({ bootstrapped: !0 }), n._unsubscribe && n._unsubscribe());
|
|
@@ -152,13 +152,13 @@ function we(e, ...t) {
|
|
|
152
152
|
}
|
|
153
153
|
throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`);
|
|
154
154
|
}
|
|
155
|
-
var Ee = Object, mt = Ee.getPrototypeOf, mr = "constructor", Lr = "prototype",
|
|
155
|
+
var Ee = Object, mt = Ee.getPrototypeOf, mr = "constructor", Lr = "prototype", Bn = "configurable", hr = "enumerable", ir = "writable", Pt = "value", _e = (e) => !!e && !!e[Ne];
|
|
156
156
|
function ke(e) {
|
|
157
157
|
return e ? Jo(e) || Ur(e) || !!e[ai] || !!e[mr]?.[ai] || Vr(e) || Gr(e) : !1;
|
|
158
158
|
}
|
|
159
159
|
var Yl = Ee[Lr][mr].toString(), ii = /* @__PURE__ */ new WeakMap();
|
|
160
160
|
function Jo(e) {
|
|
161
|
-
if (!e || !
|
|
161
|
+
if (!e || !ba(e)) return !1;
|
|
162
162
|
const t = mt(e);
|
|
163
163
|
if (t === null || t === Ee[Lr]) return !0;
|
|
164
164
|
const r = Ee.hasOwnProperty.call(t, mr) && t[mr];
|
|
@@ -179,19 +179,19 @@ function Ut(e) {
|
|
|
179
179
|
const t = e[Ne];
|
|
180
180
|
return t ? t.type_ : Ur(e) ? 1 : Vr(e) ? 2 : Gr(e) ? 3 : 0;
|
|
181
181
|
}
|
|
182
|
-
var oi = (e, t, r = Ut(e)) => r === 2 ? e.has(t) : Ee[Lr].hasOwnProperty.call(e, t),
|
|
182
|
+
var oi = (e, t, r = Ut(e)) => r === 2 ? e.has(t) : Ee[Lr].hasOwnProperty.call(e, t), Un = (e, t, r = Ut(e)) => r === 2 ? e.get(t) : e[t], vr = (e, t, r, n = Ut(e)) => {
|
|
183
183
|
n === 2 ? e.set(t, r) : n === 3 ? e.add(r) : e[t] = r;
|
|
184
184
|
};
|
|
185
185
|
function Xl(e, t) {
|
|
186
186
|
return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
|
|
187
187
|
}
|
|
188
|
-
var Ur = Array.isArray, Vr = (e) => e instanceof Map, Gr = (e) => e instanceof Set,
|
|
188
|
+
var Ur = Array.isArray, Vr = (e) => e instanceof Map, Gr = (e) => e instanceof Set, ba = (e) => typeof e == "object", Je = (e) => typeof e == "function", Nn = (e) => typeof e == "boolean";
|
|
189
189
|
function Jl(e) {
|
|
190
190
|
const t = +e;
|
|
191
191
|
return Number.isInteger(t) && String(t) === e;
|
|
192
192
|
}
|
|
193
|
-
var je = (e) => e.copy_ || e.base_,
|
|
194
|
-
function
|
|
193
|
+
var je = (e) => e.copy_ || e.base_, $a = (e) => e.modified_ ? e.copy_ : e.base_;
|
|
194
|
+
function Vn(e, t) {
|
|
195
195
|
if (Vr(e)) return new Map(e);
|
|
196
196
|
if (Gr(e)) return new Set(e);
|
|
197
197
|
if (Ur(e)) return Array[Lr].slice.call(e);
|
|
@@ -202,8 +202,8 @@ function Un(e, t) {
|
|
|
202
202
|
let a = Reflect.ownKeys(n);
|
|
203
203
|
for (let i = 0; i < a.length; i++) {
|
|
204
204
|
const o = a[i], s = n[o];
|
|
205
|
-
s[ir] === !1 && (s[ir] = !0, s[
|
|
206
|
-
[
|
|
205
|
+
s[ir] === !1 && (s[ir] = !0, s[Bn] = !0), (s.get || s.set) && (n[o] = {
|
|
206
|
+
[Bn]: !0,
|
|
207
207
|
[ir]: !0,
|
|
208
208
|
[hr]: s[hr],
|
|
209
209
|
[Pt]: e[o]
|
|
@@ -232,9 +232,9 @@ function Ql() {
|
|
|
232
232
|
}
|
|
233
233
|
var Kt = { [Pt]: Ql };
|
|
234
234
|
function Wr(e) {
|
|
235
|
-
return e === null || !
|
|
235
|
+
return e === null || !ba(e) ? !0 : Ee.isFrozen(e);
|
|
236
236
|
}
|
|
237
|
-
var yr = "MapSet",
|
|
237
|
+
var yr = "MapSet", Gn = "Patches", si = "ArrayMethods", Qo = {};
|
|
238
238
|
function nt(e) {
|
|
239
239
|
const t = Qo[e];
|
|
240
240
|
return t || we(0, e), t;
|
|
@@ -251,12 +251,12 @@ var di = (e) => !!Qo[e], wt, es = () => wt, ec = (e, t) => ({
|
|
|
251
251
|
arrayMethodsPlugin_: di(si) ? nt(si) : void 0
|
|
252
252
|
});
|
|
253
253
|
function li(e, t) {
|
|
254
|
-
t && (e.patchPlugin_ = nt(
|
|
255
|
-
}
|
|
256
|
-
function Gn(e) {
|
|
257
|
-
zn(e), e.drafts_.forEach(tc), e.drafts_ = null;
|
|
254
|
+
t && (e.patchPlugin_ = nt(Gn), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
|
|
258
255
|
}
|
|
259
256
|
function zn(e) {
|
|
257
|
+
Wn(e), e.drafts_.forEach(tc), e.drafts_ = null;
|
|
258
|
+
}
|
|
259
|
+
function Wn(e) {
|
|
260
260
|
e === wt && (wt = e.parent_);
|
|
261
261
|
}
|
|
262
262
|
var ci = (e) => wt = ec(wt, e);
|
|
@@ -268,11 +268,11 @@ function ui(e, t) {
|
|
|
268
268
|
t.unfinalizedDrafts_ = t.drafts_.length;
|
|
269
269
|
const r = t.drafts_[0];
|
|
270
270
|
if (e !== void 0 && e !== r) {
|
|
271
|
-
r[Ne].modified_ && (
|
|
271
|
+
r[Ne].modified_ && (zn(t), we(4)), ke(e) && (e = fi(t, e));
|
|
272
272
|
const { patchPlugin_: n } = t;
|
|
273
273
|
n && n.generateReplacementPatches_(r[Ne].base_, e, t);
|
|
274
274
|
} else e = fi(t, r);
|
|
275
|
-
return rc(t, e, !0),
|
|
275
|
+
return rc(t, e, !0), zn(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== Xo ? e : void 0;
|
|
276
276
|
}
|
|
277
277
|
function fi(e, t) {
|
|
278
278
|
if (Wr(t)) return t;
|
|
@@ -296,7 +296,7 @@ function ts(e) {
|
|
|
296
296
|
var Hr = (e, t) => e.scope_ === t, nc = [];
|
|
297
297
|
function rs(e, t, r, n) {
|
|
298
298
|
const a = je(e), i = e.type_;
|
|
299
|
-
if (n !== void 0 &&
|
|
299
|
+
if (n !== void 0 && Un(a, n, i) === t) {
|
|
300
300
|
vr(a, n, r, i);
|
|
301
301
|
return;
|
|
302
302
|
}
|
|
@@ -317,7 +317,7 @@ function ac(e, t, r) {
|
|
|
317
317
|
const i = t;
|
|
318
318
|
if (!i || !Hr(i, a)) return;
|
|
319
319
|
a.mapSetPlugin_?.fixSetContents(i);
|
|
320
|
-
const o =
|
|
320
|
+
const o = $a(i);
|
|
321
321
|
rs(e, i.draft_ ?? i, o, r), ns(i, a);
|
|
322
322
|
});
|
|
323
323
|
}
|
|
@@ -336,18 +336,18 @@ function ic(e, t, r) {
|
|
|
336
336
|
if (_e(r)) {
|
|
337
337
|
const a = r[Ne];
|
|
338
338
|
Hr(a, n) && a.callbacks_.push(function() {
|
|
339
|
-
or(e), rs(e, r,
|
|
339
|
+
or(e), rs(e, r, $a(a), t);
|
|
340
340
|
});
|
|
341
341
|
} else ke(r) && e.callbacks_.push(function() {
|
|
342
342
|
const i = je(e);
|
|
343
|
-
e.type_ === 3 ? i.has(r) && br(r, n.handledSet_, n) :
|
|
343
|
+
e.type_ === 3 ? i.has(r) && br(r, n.handledSet_, n) : Un(i, t, e.type_) === r && n.drafts_.length > 1 && (e.assigned_.get(t) ?? !1) === !0 && e.copy_ && br(Un(e.copy_, t, e.type_), n.handledSet_, n);
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
function br(e, t, r) {
|
|
347
347
|
return !r.immer_.autoFreeze_ && r.unfinalizedDrafts_ < 1 || _e(e) || t.has(e) || !ke(e) || Wr(e) || (t.add(e), Br(e, (n, a) => {
|
|
348
348
|
if (_e(a)) {
|
|
349
349
|
const i = a[Ne];
|
|
350
|
-
Hr(i, r) && (vr(e, n,
|
|
350
|
+
Hr(i, r) && (vr(e, n, $a(i), e.type_), ts(i));
|
|
351
351
|
} else ke(a) && br(a, t, r);
|
|
352
352
|
})), e;
|
|
353
353
|
}
|
|
@@ -382,9 +382,9 @@ var $r = {
|
|
|
382
382
|
if (!oi(a, t, e.type_)) return sc(e, a, t);
|
|
383
383
|
const i = a[t];
|
|
384
384
|
if (e.finalized_ || !ke(i) || n && e.operationMethod && r?.isMutatingArrayMethod(e.operationMethod) && Jl(t)) return i;
|
|
385
|
-
if (i ===
|
|
385
|
+
if (i === Cn(e.base_, t)) {
|
|
386
386
|
or(e);
|
|
387
|
-
const o = e.type_ === 1 ? +t : t, s =
|
|
387
|
+
const o = e.type_ === 1 ? +t : t, s = qn(e.scope_, i, e, o);
|
|
388
388
|
return e.copy_[o] = s;
|
|
389
389
|
}
|
|
390
390
|
return i;
|
|
@@ -400,22 +400,22 @@ var $r = {
|
|
|
400
400
|
if (n?.set)
|
|
401
401
|
return n.set.call(e.draft_, r), !0;
|
|
402
402
|
if (!e.modified_) {
|
|
403
|
-
const a =
|
|
403
|
+
const a = Cn(je(e), t), i = a?.[Ne];
|
|
404
404
|
if (i && i.base_ === r)
|
|
405
405
|
return e.copy_[t] = r, e.assigned_.set(t, !1), !0;
|
|
406
406
|
if (Xl(r, a) && (r !== void 0 || oi(e.base_, t, e.type_))) return !0;
|
|
407
|
-
or(e),
|
|
407
|
+
or(e), Hn(e);
|
|
408
408
|
}
|
|
409
409
|
return e.copy_[t] === r && (r !== void 0 || t in e.copy_) || Number.isNaN(r) && Number.isNaN(e.copy_[t]) || (e.copy_[t] = r, e.assigned_.set(t, !0), ic(e, t, r)), !0;
|
|
410
410
|
},
|
|
411
411
|
deleteProperty(e, t) {
|
|
412
|
-
return or(e),
|
|
412
|
+
return or(e), Cn(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_.set(t, !1), Hn(e)) : e.assigned_.delete(t), e.copy_ && delete e.copy_[t], !0;
|
|
413
413
|
},
|
|
414
414
|
getOwnPropertyDescriptor(e, t) {
|
|
415
415
|
const r = je(e), n = Reflect.getOwnPropertyDescriptor(r, t);
|
|
416
416
|
return n && {
|
|
417
417
|
[ir]: !0,
|
|
418
|
-
[
|
|
418
|
+
[Bn]: e.type_ !== 1 || t !== "length",
|
|
419
419
|
[hr]: n[hr],
|
|
420
420
|
[Pt]: r[t]
|
|
421
421
|
};
|
|
@@ -443,7 +443,7 @@ _t.deleteProperty = function(e, t) {
|
|
|
443
443
|
_t.set = function(e, t, r) {
|
|
444
444
|
return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && we(14), $r.set.call(this, e[0], t, r, e[0]);
|
|
445
445
|
};
|
|
446
|
-
function
|
|
446
|
+
function Cn(e, t) {
|
|
447
447
|
const r = e[Ne];
|
|
448
448
|
return (r ? je(r) : e)[t];
|
|
449
449
|
}
|
|
@@ -460,11 +460,11 @@ function as(e, t) {
|
|
|
460
460
|
r = mt(r);
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
function
|
|
464
|
-
e.modified_ || (e.modified_ = !0, e.parent_ &&
|
|
463
|
+
function Hn(e) {
|
|
464
|
+
e.modified_ || (e.modified_ = !0, e.parent_ && Hn(e.parent_));
|
|
465
465
|
}
|
|
466
466
|
function or(e) {
|
|
467
|
-
e.copy_ || (e.assigned_ = /* @__PURE__ */ new Map(), e.copy_ =
|
|
467
|
+
e.copy_ || (e.assigned_ = /* @__PURE__ */ new Map(), e.copy_ = Vn(e.base_, e.scope_.immer_.useStrictShallowCopy_));
|
|
468
468
|
}
|
|
469
469
|
var dc = class {
|
|
470
470
|
constructor(e) {
|
|
@@ -480,18 +480,18 @@ var dc = class {
|
|
|
480
480
|
Je(r) || we(6), n !== void 0 && !Je(n) && we(7);
|
|
481
481
|
let a;
|
|
482
482
|
if (ke(t)) {
|
|
483
|
-
const i = ci(this), o =
|
|
483
|
+
const i = ci(this), o = qn(i, t, void 0);
|
|
484
484
|
let s = !0;
|
|
485
485
|
try {
|
|
486
486
|
a = r(o), s = !1;
|
|
487
487
|
} finally {
|
|
488
|
-
s ?
|
|
488
|
+
s ? zn(i) : Wn(i);
|
|
489
489
|
}
|
|
490
490
|
return li(i, n), ui(a, i);
|
|
491
|
-
} else if (!t || !
|
|
491
|
+
} else if (!t || !ba(t)) {
|
|
492
492
|
if (a = r(t), a === void 0 && (a = t), a === Xo && (a = void 0), this.autoFreeze_ && zr(a, !0), n) {
|
|
493
493
|
const i = [], o = [];
|
|
494
|
-
nt(
|
|
494
|
+
nt(Gn).generateReplacementPatches_(t, a, {
|
|
495
495
|
patches_: i,
|
|
496
496
|
inversePatches_: o
|
|
497
497
|
}), n(i, o);
|
|
@@ -508,12 +508,12 @@ var dc = class {
|
|
|
508
508
|
n,
|
|
509
509
|
a
|
|
510
510
|
];
|
|
511
|
-
},
|
|
511
|
+
}, Nn(e?.autoFreeze) && this.setAutoFreeze(e.autoFreeze), Nn(e?.useStrictShallowCopy) && this.setUseStrictShallowCopy(e.useStrictShallowCopy), Nn(e?.useStrictIteration) && this.setUseStrictIteration(e.useStrictIteration);
|
|
512
512
|
}
|
|
513
513
|
createDraft(e) {
|
|
514
514
|
ke(e) || we(8), _e(e) && (e = qr(e));
|
|
515
|
-
const t = ci(this), r =
|
|
516
|
-
return r[Ne].isManual_ = !0,
|
|
515
|
+
const t = ci(this), r = qn(t, e, void 0);
|
|
516
|
+
return r[Ne].isManual_ = !0, Wn(t), r;
|
|
517
517
|
}
|
|
518
518
|
finishDraft(e, t) {
|
|
519
519
|
const r = e && e[Ne];
|
|
@@ -543,11 +543,11 @@ var dc = class {
|
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
r > -1 && (t = t.slice(r + 1));
|
|
546
|
-
const n = nt(
|
|
546
|
+
const n = nt(Gn).applyPatches_;
|
|
547
547
|
return _e(e) ? n(e, t) : this.produce(e, (a) => n(a, t));
|
|
548
548
|
}
|
|
549
549
|
};
|
|
550
|
-
function
|
|
550
|
+
function qn(e, t, r, n) {
|
|
551
551
|
const [a, i] = Vr(t) ? nt(yr).proxyMap_(t, r) : Gr(t) ? nt(yr).proxySet_(t, r) : oc(t, r);
|
|
552
552
|
return (r?.scope_ ?? es()).drafts_.push(a), i.callbacks_ = r?.callbacks_ ?? [], i.key_ = n, r && n !== void 0 ? ac(r, i, n) : i.callbacks_.push(function(s) {
|
|
553
553
|
s.mapSetPlugin_?.fixSetContents(i);
|
|
@@ -564,8 +564,8 @@ function is(e) {
|
|
|
564
564
|
let r, n = !0;
|
|
565
565
|
if (t) {
|
|
566
566
|
if (!t.modified_) return t.base_;
|
|
567
|
-
t.finalized_ = !0, r =
|
|
568
|
-
} else r =
|
|
567
|
+
t.finalized_ = !0, r = Vn(e, t.scope_.immer_.useStrictShallowCopy_), n = t.scope_.immer_.shouldUseStrictIteration();
|
|
568
|
+
} else r = Vn(e, !0);
|
|
569
569
|
return Br(r, (a, i) => {
|
|
570
570
|
vr(r, a, is(i));
|
|
571
571
|
}, n), t && (t.finalized_ = !1), r;
|
|
@@ -783,7 +783,7 @@ function Yr(e, t = {}) {
|
|
|
783
783
|
i = 0;
|
|
784
784
|
}, o;
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function ga(e, ...t) {
|
|
787
787
|
const r = typeof e == "function" ? {
|
|
788
788
|
memoize: e,
|
|
789
789
|
memoizeOptions: t
|
|
@@ -835,16 +835,16 @@ function $a(e, ...t) {
|
|
|
835
835
|
};
|
|
836
836
|
return Object.assign(n, { withTypes: () => n }), n;
|
|
837
837
|
}
|
|
838
|
-
var _c = /* @__PURE__ */
|
|
838
|
+
var _c = /* @__PURE__ */ ga(Yr);
|
|
839
839
|
function ss(e) {
|
|
840
840
|
return ({ dispatch: r, getState: n }) => (a) => (i) => typeof i == "function" ? i(r, n, e) : a(i);
|
|
841
841
|
}
|
|
842
|
-
var Oc = ss(), Ec = ss,
|
|
842
|
+
var Oc = ss(), Ec = ss, Kn = /* @__PURE__ */ Vl({
|
|
843
843
|
ReducerType: () => Ms,
|
|
844
|
-
SHOULD_AUTOBATCH: () =>
|
|
844
|
+
SHOULD_AUTOBATCH: () => Sa,
|
|
845
845
|
TaskAbortError: () => zt,
|
|
846
|
-
Tuple: () =>
|
|
847
|
-
addListener: () =>
|
|
846
|
+
Tuple: () => Na,
|
|
847
|
+
addListener: () => _a,
|
|
848
848
|
asyncThunkCreator: () => Uc,
|
|
849
849
|
autoBatchEnhancer: () => Ns,
|
|
850
850
|
buildCreateSlice: () => ks,
|
|
@@ -863,7 +863,7 @@ var Oc = ss(), Ec = ss, qn = /* @__PURE__ */ Vl({
|
|
|
863
863
|
createNextState: () => Kr,
|
|
864
864
|
createReducer: () => Ps,
|
|
865
865
|
createSelector: () => _c,
|
|
866
|
-
createSelectorCreator: () =>
|
|
866
|
+
createSelectorCreator: () => ga,
|
|
867
867
|
createSerializableStateInvariantMiddleware: () => gs,
|
|
868
868
|
createSlice: () => Ye,
|
|
869
869
|
current: () => qr,
|
|
@@ -879,7 +879,7 @@ var Oc = ss(), Ec = ss, qn = /* @__PURE__ */ Vl({
|
|
|
879
879
|
isFulfilled: () => Es,
|
|
880
880
|
isImmutableDefault: () => hs,
|
|
881
881
|
isPending: () => _s,
|
|
882
|
-
isPlain: () =>
|
|
882
|
+
isPlain: () => Ca,
|
|
883
883
|
isRejected: () => Sr,
|
|
884
884
|
isRejectedWithValue: () => Os,
|
|
885
885
|
lruMemoize: () => Nc,
|
|
@@ -887,13 +887,13 @@ var Oc = ss(), Ec = ss, qn = /* @__PURE__ */ Vl({
|
|
|
887
887
|
nanoid: () => Gt,
|
|
888
888
|
original: () => Zl,
|
|
889
889
|
prepareAutoBatched: () => Dc,
|
|
890
|
-
removeListener: () =>
|
|
890
|
+
removeListener: () => Oa,
|
|
891
891
|
unwrapResult: () => As,
|
|
892
892
|
weakMapMemoize: () => Yr
|
|
893
893
|
});
|
|
894
|
-
Gl(
|
|
894
|
+
Gl(Kn, Ic);
|
|
895
895
|
var ds = (...e) => {
|
|
896
|
-
const t =
|
|
896
|
+
const t = ga(...e), r = Object.assign((...n) => {
|
|
897
897
|
const a = t(...n), i = (o, ...s) => a(_e(o) ? qr(o) : o, ...s);
|
|
898
898
|
return Object.assign(i, a), i;
|
|
899
899
|
}, { withTypes: () => r });
|
|
@@ -965,7 +965,7 @@ It is disabled in production builds, so you don't need to worry about that.`);
|
|
|
965
965
|
}
|
|
966
966
|
};
|
|
967
967
|
}
|
|
968
|
-
var
|
|
968
|
+
var Na = class St extends Array {
|
|
969
969
|
constructor(...t) {
|
|
970
970
|
super(...t), Object.setPrototypeOf(this, St.prototype);
|
|
971
971
|
}
|
|
@@ -1060,11 +1060,11 @@ function bs(e = {}) {
|
|
|
1060
1060
|
};
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1063
|
+
function Ca(e) {
|
|
1064
1064
|
const t = typeof e;
|
|
1065
1065
|
return e == null || t === "string" || t === "boolean" || t === "number" || Array.isArray(e) || Yo(e);
|
|
1066
1066
|
}
|
|
1067
|
-
function Nr(e, t = "", r =
|
|
1067
|
+
function Nr(e, t = "", r = Ca, n, a = [], i) {
|
|
1068
1068
|
let o;
|
|
1069
1069
|
if (!r(e)) return {
|
|
1070
1070
|
keyPath: t || "<root>",
|
|
@@ -1095,7 +1095,7 @@ function $s(e) {
|
|
|
1095
1095
|
function gs(e = {}) {
|
|
1096
1096
|
if (process.env.NODE_ENV === "production") return () => (t) => (r) => t(r);
|
|
1097
1097
|
{
|
|
1098
|
-
const { isSerializable: t =
|
|
1098
|
+
const { isSerializable: t = Ca, getEntries: r, ignoredActions: n = [], ignoredActionPaths: a = ["meta.arg", "meta.baseQueryMeta"], ignoredPaths: i = [], warnAfter: o = 32, ignoreState: s = !1, ignoreActions: d = !1, disableCache: l = !1 } = e, c = !l && WeakSet ? /* @__PURE__ */ new WeakSet() : void 0;
|
|
1099
1099
|
return (f) => (h) => (m) => {
|
|
1100
1100
|
if (!jr(m)) return h(m);
|
|
1101
1101
|
const p = h(m), v = ms(o, "SerializableStateInvariantMiddleware");
|
|
@@ -1125,7 +1125,7 @@ function Zt(e) {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
var kc = () => function(t) {
|
|
1127
1127
|
const { thunk: r = !0, immutableCheck: n = !0, serializableCheck: a = !0, actionCreatorCheck: i = !0 } = t ?? {};
|
|
1128
|
-
let o = new
|
|
1128
|
+
let o = new Na();
|
|
1129
1129
|
if (r && (Zt(r) ? o.push(Oc) : o.push(Ec(r.extraArgument))), process.env.NODE_ENV !== "production") {
|
|
1130
1130
|
if (n) {
|
|
1131
1131
|
let s = {};
|
|
@@ -1141,9 +1141,9 @@ var kc = () => function(t) {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
1143
|
return o;
|
|
1144
|
-
},
|
|
1144
|
+
}, Sa = "RTK_autoBatch", Dc = () => (e) => ({
|
|
1145
1145
|
payload: e,
|
|
1146
|
-
meta: { [
|
|
1146
|
+
meta: { [Sa]: !0 }
|
|
1147
1147
|
}), yi = (e) => (t) => {
|
|
1148
1148
|
setTimeout(t, e);
|
|
1149
1149
|
}, Ns = (e = { type: "raf" }) => (t) => (...r) => {
|
|
@@ -1161,7 +1161,7 @@ var kc = () => function(t) {
|
|
|
1161
1161
|
},
|
|
1162
1162
|
dispatch(c) {
|
|
1163
1163
|
try {
|
|
1164
|
-
return a = !c?.meta?.[
|
|
1164
|
+
return a = !c?.meta?.[Sa], i = !a, i && (o || (o = !0, d(l))), n.dispatch(c);
|
|
1165
1165
|
} finally {
|
|
1166
1166
|
a = !0;
|
|
1167
1167
|
}
|
|
@@ -1169,7 +1169,7 @@ var kc = () => function(t) {
|
|
|
1169
1169
|
});
|
|
1170
1170
|
}, Rc = (e) => function(r) {
|
|
1171
1171
|
const { autoBatch: n = !0 } = r ?? {};
|
|
1172
|
-
let a = new
|
|
1172
|
+
let a = new Na(e);
|
|
1173
1173
|
return n && a.push(Ns(typeof n == "object" ? n : void 0)), a;
|
|
1174
1174
|
};
|
|
1175
1175
|
function Cs(e) {
|
|
@@ -1330,7 +1330,7 @@ var jc = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", Gt
|
|
|
1330
1330
|
"message",
|
|
1331
1331
|
"stack",
|
|
1332
1332
|
"code"
|
|
1333
|
-
],
|
|
1333
|
+
], Sn = class {
|
|
1334
1334
|
constructor(e, t) {
|
|
1335
1335
|
this.payload = e, this.meta = t;
|
|
1336
1336
|
}
|
|
@@ -1418,14 +1418,14 @@ var jc = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", Gt
|
|
|
1418
1418
|
requestId: m,
|
|
1419
1419
|
signal: p.signal,
|
|
1420
1420
|
abort: $,
|
|
1421
|
-
rejectWithValue: (N, T) => new
|
|
1421
|
+
rejectWithValue: (N, T) => new Sn(N, T),
|
|
1422
1422
|
fulfillWithValue: (N, T) => new bi(N, T)
|
|
1423
1423
|
})).then((N) => {
|
|
1424
|
-
if (N instanceof
|
|
1424
|
+
if (N instanceof Sn) throw N;
|
|
1425
1425
|
return N instanceof bi ? a(N.payload, m, d, N.meta) : a(N, m, d);
|
|
1426
1426
|
})]);
|
|
1427
1427
|
} catch (P) {
|
|
1428
|
-
S = P instanceof
|
|
1428
|
+
S = P instanceof Sn ? o(null, m, d, P.payload, P.meta) : o(P, m, d);
|
|
1429
1429
|
} finally {
|
|
1430
1430
|
v && p.signal.removeEventListener("abort", v);
|
|
1431
1431
|
}
|
|
@@ -1907,13 +1907,13 @@ function nu(e = {}) {
|
|
|
1907
1907
|
...n
|
|
1908
1908
|
};
|
|
1909
1909
|
}
|
|
1910
|
-
var au = "task", Fs = "listener", js = "completed",
|
|
1910
|
+
var au = "task", Fs = "listener", js = "completed", Pa = "cancelled", iu = `task-${Pa}`, ou = `task-${js}`, Yn = `${Fs}-${Pa}`, su = `${Fs}-${js}`, zt = class {
|
|
1911
1911
|
constructor(e) {
|
|
1912
|
-
this.code = e, this.message = `${au} ${
|
|
1912
|
+
this.code = e, this.message = `${au} ${Pa} (reason: ${e})`;
|
|
1913
1913
|
}
|
|
1914
1914
|
name = "TaskAbortError";
|
|
1915
1915
|
message;
|
|
1916
|
-
},
|
|
1916
|
+
}, wa = (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
|
}, Pr = () => {
|
|
1919
1919
|
}, Ls = (e, t = Pr) => (e.catch(t), e), Bs = (e, t) => (e.addEventListener("abort", t, { once: !0 }), () => e.removeEventListener("abort", t)), et = (e) => {
|
|
@@ -1952,7 +1952,7 @@ var du = async (e, t) => {
|
|
|
1952
1952
|
}, { assign: ut } = Object, gi = {}, Wt = "listenerMiddleware", lu = (e, t) => {
|
|
1953
1953
|
const r = (n) => Bs(e, () => n.abort(e.reason));
|
|
1954
1954
|
return (n, a) => {
|
|
1955
|
-
|
|
1955
|
+
wa(n, "taskExecutor");
|
|
1956
1956
|
const i = new AbortController();
|
|
1957
1957
|
r(i);
|
|
1958
1958
|
const o = du(async () => {
|
|
@@ -2008,7 +2008,7 @@ var du = async (e, t) => {
|
|
|
2008
2008
|
else if (n) a = n;
|
|
2009
2009
|
else if (!a)
|
|
2010
2010
|
throw new Error(process.env.NODE_ENV === "production" ? Y(21) : "Creating or removing a listener requires one of the known fields for matching an action");
|
|
2011
|
-
return
|
|
2011
|
+
return wa(i, "options.listener"), {
|
|
2012
2012
|
predicate: a,
|
|
2013
2013
|
type: t,
|
|
2014
2014
|
effect: i
|
|
@@ -2028,12 +2028,12 @@ var du = async (e, t) => {
|
|
|
2028
2028
|
}, { withTypes: () => zs }), Ni = (e, t) => {
|
|
2029
2029
|
const { type: r, effect: n, predicate: a } = Gs(t);
|
|
2030
2030
|
return Array.from(e.values()).find((i) => (typeof r == "string" ? i.type === r : i.predicate === a) && i.effect === n);
|
|
2031
|
-
},
|
|
2031
|
+
}, Zn = (e) => {
|
|
2032
2032
|
e.pending.forEach((t) => {
|
|
2033
|
-
t.abort(
|
|
2033
|
+
t.abort(Yn);
|
|
2034
2034
|
});
|
|
2035
2035
|
}, uu = (e, t) => () => {
|
|
2036
|
-
for (const r of t.keys())
|
|
2036
|
+
for (const r of t.keys()) Zn(r);
|
|
2037
2037
|
e.clear();
|
|
2038
2038
|
}, Ci = (e, t, r) => {
|
|
2039
2039
|
try {
|
|
@@ -2043,7 +2043,7 @@ var du = async (e, t) => {
|
|
|
2043
2043
|
throw n;
|
|
2044
2044
|
}, 0);
|
|
2045
2045
|
}
|
|
2046
|
-
},
|
|
2046
|
+
}, _a = /* @__PURE__ */ ut(/* @__PURE__ */ xe(`${Wt}/add`), { withTypes: () => _a }), Ws = /* @__PURE__ */ xe(`${Wt}/removeAll`), Oa = /* @__PURE__ */ ut(/* @__PURE__ */ xe(`${Wt}/remove`), { withTypes: () => Oa }), fu = (...e) => {
|
|
2047
2047
|
console.error(`${Wt}/error`, ...e);
|
|
2048
2048
|
}, pu = (e = {}) => {
|
|
2049
2049
|
const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), n = (m) => {
|
|
@@ -2053,14 +2053,14 @@ var du = async (e, t) => {
|
|
|
2053
2053
|
const p = r.get(m) ?? 1;
|
|
2054
2054
|
p === 1 ? r.delete(m) : r.set(m, p - 1);
|
|
2055
2055
|
}, { extra: i, onError: o = fu } = e;
|
|
2056
|
-
|
|
2056
|
+
wa(o, "onError");
|
|
2057
2057
|
const s = (m) => (m.unsubscribe = () => t.delete(m.id), t.set(m.id, m), (p) => {
|
|
2058
|
-
m.unsubscribe(), p?.cancelActive &&
|
|
2058
|
+
m.unsubscribe(), p?.cancelActive && Zn(m);
|
|
2059
2059
|
}), d = (m) => s(Ni(t, m) ?? zs(m));
|
|
2060
2060
|
ut(d, { withTypes: () => d });
|
|
2061
2061
|
const l = (m) => {
|
|
2062
2062
|
const p = Ni(t, m);
|
|
2063
|
-
return p && (p.unsubscribe(), m.cancelActive &&
|
|
2063
|
+
return p && (p.unsubscribe(), m.cancelActive && Zn(p)), !!p;
|
|
2064
2064
|
};
|
|
2065
2065
|
ut(l, { withTypes: () => l });
|
|
2066
2066
|
const c = async (m, p, v, b) => {
|
|
@@ -2081,11 +2081,11 @@ var du = async (e, t) => {
|
|
|
2081
2081
|
},
|
|
2082
2082
|
cancelActiveListeners: () => {
|
|
2083
2083
|
m.pending.forEach((P, O, N) => {
|
|
2084
|
-
P !== $ && (P.abort(
|
|
2084
|
+
P !== $ && (P.abort(Yn), N.delete(P));
|
|
2085
2085
|
});
|
|
2086
2086
|
},
|
|
2087
2087
|
cancel: () => {
|
|
2088
|
-
$.abort(
|
|
2088
|
+
$.abort(Yn), m.pending.delete($);
|
|
2089
2089
|
},
|
|
2090
2090
|
throwIfCancelled: () => {
|
|
2091
2091
|
et($.signal);
|
|
@@ -2100,12 +2100,12 @@ var du = async (e, t) => {
|
|
|
2100
2100
|
return {
|
|
2101
2101
|
middleware: (m) => (p) => (v) => {
|
|
2102
2102
|
if (!jr(v)) return p(v);
|
|
2103
|
-
if (
|
|
2103
|
+
if (_a.match(v)) return d(v.payload);
|
|
2104
2104
|
if (Ws.match(v)) {
|
|
2105
2105
|
f();
|
|
2106
2106
|
return;
|
|
2107
2107
|
}
|
|
2108
|
-
if (
|
|
2108
|
+
if (Oa.match(v)) return l(v.payload);
|
|
2109
2109
|
let b = m.getState();
|
|
2110
2110
|
const $ = () => {
|
|
2111
2111
|
if (b === gi) throw new Error(process.env.NODE_ENV === "production" ? Y(23) : `${Wt}: getOriginalState can only be called synchronously`);
|
|
@@ -2152,8 +2152,8 @@ var du = async (e, t) => {
|
|
|
2152
2152
|
withMiddleware: r,
|
|
2153
2153
|
instanceId: e
|
|
2154
2154
|
};
|
|
2155
|
-
}, yu = (e) => "reducerPath" in e && typeof e.reducerPath == "string", bu = (e) => e.flatMap((t) => yu(t) ? [[t.reducerPath, t.reducer]] : Object.entries(t)),
|
|
2156
|
-
if (a ===
|
|
2155
|
+
}, yu = (e) => "reducerPath" in e && typeof e.reducerPath == "string", bu = (e) => e.flatMap((t) => yu(t) ? [[t.reducerPath, t.reducer]] : Object.entries(t)), Ea = /* @__PURE__ */ Symbol.for("rtk-state-proxy-original"), $u = (e) => !!e && !!e[Ea], gu = /* @__PURE__ */ new WeakMap(), Nu = (e, t, r) => Qe(gu, e, () => new Proxy(e, { get: (n, a, i) => {
|
|
2156
|
+
if (a === Ea) return n;
|
|
2157
2157
|
const o = Reflect.get(n, a, i);
|
|
2158
2158
|
if (typeof o > "u") {
|
|
2159
2159
|
const s = r[a];
|
|
@@ -2168,7 +2168,7 @@ var du = async (e, t) => {
|
|
|
2168
2168
|
return o;
|
|
2169
2169
|
} })), Cu = (e) => {
|
|
2170
2170
|
if (!$u(e)) throw new Error(process.env.NODE_ENV === "production" ? Y(25) : "original must be used on state Proxy");
|
|
2171
|
-
return e[
|
|
2171
|
+
return e[Ea];
|
|
2172
2172
|
}, Su = {}, Pu = (e = Su) => e;
|
|
2173
2173
|
function wu(...e) {
|
|
2174
2174
|
const t = Object.fromEntries(bu(e)), r = () => Object.keys(t).length ? Ko(t) : Pu;
|
|
@@ -2296,9 +2296,12 @@ var Fe = [
|
|
|
2296
2296
|
toggleProfessional: (e, t) => {
|
|
2297
2297
|
e.selectedProfessional = t.payload, e.superCategories = t.payload.superCategories || [], e.selectedServices = [], e.selectedCategory = null;
|
|
2298
2298
|
},
|
|
2299
|
+
deleteService: (e, t) => {
|
|
2300
|
+
e.selectedServices = e.selectedServices.filter((r) => r.id !== t.payload);
|
|
2301
|
+
},
|
|
2299
2302
|
clearServices: () => Pi
|
|
2300
2303
|
}
|
|
2301
|
-
}), { setServicePayload: ku, setCategory: Tv, toggleService: wi, clearServices: Av, incrementService: Du, decrementService: _i, toggleProfessional: Ru } = Ks.actions, Fu = Ks.reducer, We = "https://prod.aaravpos.com/api/v1", Ze = () => ({
|
|
2304
|
+
}), { setServicePayload: ku, setCategory: Tv, toggleService: wi, clearServices: Av, incrementService: Du, decrementService: _i, toggleProfessional: Ru, deleteService: xv } = Ks.actions, Fu = Ks.reducer, We = "https://prod.aaravpos.com/api/v1", Ze = () => ({
|
|
2302
2305
|
"Content-Type": "application/json",
|
|
2303
2306
|
Authorization: `Bearer ${Jr.getState()?.barber?.outletDetails?.token}`
|
|
2304
2307
|
}), ju = async (e, t, r) => {
|
|
@@ -2446,7 +2449,7 @@ var Fe = [
|
|
|
2446
2449
|
t.loading = !1;
|
|
2447
2450
|
});
|
|
2448
2451
|
}
|
|
2449
|
-
}), { setSelectedSlots:
|
|
2452
|
+
}), { setSelectedSlots: Pn, clearSlots: Hu, setSelectedDate: _r, setSelectedTime: wn } = Zs.actions, qu = Zs.reducer, lr = Xr("appointment/create", async (e, { rejectWithValue: t }) => {
|
|
2450
2453
|
try {
|
|
2451
2454
|
return await Bu(e);
|
|
2452
2455
|
} catch (r) {
|
|
@@ -2494,7 +2497,7 @@ var Fe = [
|
|
|
2494
2497
|
t.loading = !1, t.error = r.payload || "Appointment failed";
|
|
2495
2498
|
});
|
|
2496
2499
|
}
|
|
2497
|
-
}), { resetAppointment:
|
|
2500
|
+
}), { resetAppointment: Mv, setBookingMode: kv, setUserDetails: _n, setTips: Ku, setAppointmentId: Jt, clearUserDetails: Js } = Xs.actions, Yu = Xs.reducer, Qs = Ye({
|
|
2498
2501
|
name: "outletList",
|
|
2499
2502
|
initialState: { outlets: [] },
|
|
2500
2503
|
reducers: {
|
|
@@ -2505,7 +2508,7 @@ var Fe = [
|
|
|
2505
2508
|
e.outlets = [];
|
|
2506
2509
|
}
|
|
2507
2510
|
}
|
|
2508
|
-
}), { setOutletList: Zu, clearOutletList:
|
|
2511
|
+
}), { setOutletList: Zu, clearOutletList: Dv } = Qs.actions, Xu = Qs.reducer, ed = Ye({
|
|
2509
2512
|
name: "theme",
|
|
2510
2513
|
initialState: {
|
|
2511
2514
|
button: {
|
|
@@ -2539,12 +2542,12 @@ function cr(e) {
|
|
|
2539
2542
|
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
2540
2543
|
}, cr(e);
|
|
2541
2544
|
}
|
|
2542
|
-
function
|
|
2545
|
+
function On() {
|
|
2543
2546
|
}
|
|
2544
2547
|
var ef = {
|
|
2545
|
-
getItem:
|
|
2546
|
-
setItem:
|
|
2547
|
-
removeItem:
|
|
2548
|
+
getItem: On,
|
|
2549
|
+
setItem: On,
|
|
2550
|
+
removeItem: On
|
|
2548
2551
|
};
|
|
2549
2552
|
function tf(e) {
|
|
2550
2553
|
if ((typeof self > "u" ? "undefined" : cr(self)) !== "object" || !(e in self)) return !1;
|
|
@@ -2580,7 +2583,7 @@ function nf(e) {
|
|
|
2580
2583
|
}
|
|
2581
2584
|
};
|
|
2582
2585
|
}
|
|
2583
|
-
var af = (0,
|
|
2586
|
+
var af = (0, Kn.combineReducers)({ barber: (0, Kn.combineReducers)({
|
|
2584
2587
|
breadcrumbs: Iu,
|
|
2585
2588
|
outletDetails: Mu,
|
|
2586
2589
|
service: Fu,
|
|
@@ -2612,13 +2615,13 @@ var af = (0, qn.combineReducers)({ barber: (0, qn.combineReducers)({
|
|
|
2612
2615
|
Tl,
|
|
2613
2616
|
Al
|
|
2614
2617
|
] } })
|
|
2615
|
-
}),
|
|
2618
|
+
}), Ia = kl(Jr), Rv = Jr.getState;
|
|
2616
2619
|
function lf({ children: e }) {
|
|
2617
2620
|
return /* @__PURE__ */ u(Pl, {
|
|
2618
2621
|
store: Jr,
|
|
2619
2622
|
children: /* @__PURE__ */ u(Zo, {
|
|
2620
2623
|
loading: null,
|
|
2621
|
-
persistor:
|
|
2624
|
+
persistor: Ia,
|
|
2622
2625
|
children: e
|
|
2623
2626
|
})
|
|
2624
2627
|
});
|
|
@@ -2630,7 +2633,7 @@ var cf = (e) => {
|
|
|
2630
2633
|
}, td = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(), uf = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ff = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (t, r, n) => n ? n.toUpperCase() : r.toLowerCase()), Ai = (e) => {
|
|
2631
2634
|
const t = ff(e);
|
|
2632
2635
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2633
|
-
},
|
|
2636
|
+
}, En = {
|
|
2634
2637
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2635
2638
|
width: 24,
|
|
2636
2639
|
height: 24,
|
|
@@ -2645,19 +2648,19 @@ var cf = (e) => {
|
|
|
2645
2648
|
return !1;
|
|
2646
2649
|
}, mf = Cl({}), hf = () => Sl(mf), vf = qo(({ color: e, size: t, strokeWidth: r, absoluteStrokeWidth: n, className: a = "", children: i, iconNode: o, ...s }, d) => {
|
|
2647
2650
|
const { size: l = 24, strokeWidth: c = 2, absoluteStrokeWidth: f = !1, color: h = "currentColor", className: m = "" } = hf() ?? {}, p = n ?? f ? Number(r ?? c) * 24 / Number(t ?? l) : r ?? c;
|
|
2648
|
-
return
|
|
2651
|
+
return Rn("svg", {
|
|
2649
2652
|
ref: d,
|
|
2650
|
-
...
|
|
2651
|
-
width: t ?? l ??
|
|
2652
|
-
height: t ?? l ??
|
|
2653
|
+
...En,
|
|
2654
|
+
width: t ?? l ?? En.width,
|
|
2655
|
+
height: t ?? l ?? En.height,
|
|
2653
2656
|
stroke: e ?? h,
|
|
2654
2657
|
strokeWidth: p,
|
|
2655
2658
|
className: td("lucide", m, a),
|
|
2656
2659
|
...!i && !pf(s) && { "aria-hidden": "true" },
|
|
2657
2660
|
...s
|
|
2658
|
-
}, [...o.map(([v, b]) =>
|
|
2661
|
+
}, [...o.map(([v, b]) => Rn(v, b)), ...Array.isArray(i) ? i : [i]]);
|
|
2659
2662
|
}), te = (e, t) => {
|
|
2660
|
-
const r = qo(({ className: n, ...a }, i) =>
|
|
2663
|
+
const r = qo(({ className: n, ...a }, i) => Rn(vf, {
|
|
2661
2664
|
ref: i,
|
|
2662
2665
|
iconNode: t,
|
|
2663
2666
|
className: td(`lucide-${uf(Ai(e))}`, `lucide-${e}`, n),
|
|
@@ -2737,7 +2740,7 @@ var cf = (e) => {
|
|
|
2737
2740
|
], gf = te("calendar-days", $f), Nf = [["path", {
|
|
2738
2741
|
d: "M20 6 9 17l-5-5",
|
|
2739
2742
|
key: "1gmf2c"
|
|
2740
|
-
}]],
|
|
2743
|
+
}]], Ta = te("check", Nf), Cf = [["path", {
|
|
2741
2744
|
d: "m6 9 6 6 6-6",
|
|
2742
2745
|
key: "qrunsl"
|
|
2743
2746
|
}]], rd = te("chevron-down", Cf), Sf = [["path", {
|
|
@@ -3145,9 +3148,9 @@ var it = [
|
|
|
3145
3148
|
time: 1,
|
|
3146
3149
|
confirm: 2
|
|
3147
3150
|
};
|
|
3148
|
-
function
|
|
3151
|
+
function Aa() {
|
|
3149
3152
|
const e = ze(), { width: t } = l1(), { currentStep: r, completedSteps: n } = J((m) => m.barber.breadcrumbs), a = it.findIndex((m) => m.page === r), { selectedServices: i } = J((m) => m.barber.service), { isOpenSidebar: o } = J((m) => m.barber.theme), s = () => {
|
|
3150
|
-
|
|
3153
|
+
Ia.purge(), e({ type: "RESET_ALL" });
|
|
3151
3154
|
}, d = (m) => {
|
|
3152
3155
|
const p = it.findIndex((b) => b.page === r), v = it.findIndex((b) => b.page === m);
|
|
3153
3156
|
v < p && (e(Eu(m)), v <= ki.time && e(Hu()), v <= ki.confirm && e(Js())), e(Ou(m));
|
|
@@ -3207,7 +3210,7 @@ function Ta() {
|
|
|
3207
3210
|
]
|
|
3208
3211
|
}) });
|
|
3209
3212
|
}
|
|
3210
|
-
function
|
|
3213
|
+
function xa({ children: e, sidebar: t, renderButton: r }) {
|
|
3211
3214
|
const { isOpenSidebar: n } = J((a) => a.barber.theme);
|
|
3212
3215
|
return /* @__PURE__ */ g("div", {
|
|
3213
3216
|
className: "aaravpos-barber-main-layout",
|
|
@@ -3258,7 +3261,7 @@ var u1 = (e) => Number(e.price || e.min_price || 0), Qt = (e, { perUnit: t = !1
|
|
|
3258
3261
|
"Nov",
|
|
3259
3262
|
"Dec"
|
|
3260
3263
|
];
|
|
3261
|
-
function
|
|
3264
|
+
function Ma({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime: n = !1, showTip: a = !1, tipPct: i = 0, onTipChange: o, consentRequired: s = !1, consentCompleted: d = 0, totalConsents: l = 0, checkingConsent: c = !1, loading: f = !1, showFooterButton: h = !1, showBookingSection: m = !0 }) {
|
|
3262
3265
|
const p = ze(), { outletName: v, timeZone: b } = J((M) => M.barber.outletDetails), { selectedSlotIndexes: $, slots: y, selectedDate: S } = J((M) => M.barber.slots), { staff: P, selectedServices: O, selectedProfessional: N } = J((M) => M.barber.service), T = ve.now().setZone(b ?? "UTC"), [D, H] = Z(""), [X, ae] = Z(!1), ce = De(null), ue = De(null), [ye, Ce] = Z(0), me = [
|
|
3263
3266
|
0,
|
|
3264
3267
|
5,
|
|
@@ -3294,8 +3297,8 @@ function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime:
|
|
|
3294
3297
|
O
|
|
3295
3298
|
]), he = Q.reduce((M, F) => M + Number(F.price || F.min_price || 0) * (F.qty || 1), 0), x = Q.reduce((M, F) => M + Number(F.duration || F.min_time || F.estimated_time || 0) * (F.qty || 1), 0), C = Math.ceil(x / se), E = (M) => {
|
|
3296
3299
|
if (!fe.length) return "";
|
|
3297
|
-
const F = fe[M]?.
|
|
3298
|
-
return !F || !pe ? "" : `${F} - ${pe.
|
|
3300
|
+
const F = fe[M]?.start_time_12h, pe = fe[M + C - 1];
|
|
3301
|
+
return !F || !pe ? "" : `${F} - ${pe.end_time_12h || pe.start_time_12h}`;
|
|
3299
3302
|
}, k = S || {
|
|
3300
3303
|
day: T.day,
|
|
3301
3304
|
month: T.month,
|
|
@@ -3502,15 +3505,15 @@ function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime:
|
|
|
3502
3505
|
m && /* @__PURE__ */ g("div", {
|
|
3503
3506
|
className: "aaravpos-barber-mt-auto",
|
|
3504
3507
|
children: [
|
|
3505
|
-
/* @__PURE__ */ u(
|
|
3508
|
+
/* @__PURE__ */ u(In, {
|
|
3506
3509
|
label: "Service",
|
|
3507
3510
|
value: /* @__PURE__ */ g($e, { children: [/* @__PURE__ */ u(Se, { size: 14 }), he.toFixed(2)] })
|
|
3508
3511
|
}),
|
|
3509
|
-
a && /* @__PURE__ */ u(
|
|
3512
|
+
a && /* @__PURE__ */ u(In, {
|
|
3510
3513
|
label: `Tip (${z}%)`,
|
|
3511
3514
|
value: /* @__PURE__ */ g($e, { children: [/* @__PURE__ */ u(Se, { size: 14 }), W.toFixed(2)] })
|
|
3512
3515
|
}),
|
|
3513
|
-
(!n || R) && /* @__PURE__ */ u(
|
|
3516
|
+
(!n || R) && /* @__PURE__ */ u(In, {
|
|
3514
3517
|
label: "Taxes",
|
|
3515
3518
|
value: /* @__PURE__ */ g($e, { children: [/* @__PURE__ */ u(Se, { size: 14 }), G.toFixed(2)] })
|
|
3516
3519
|
}),
|
|
@@ -3541,7 +3544,7 @@ function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime:
|
|
|
3541
3544
|
]
|
|
3542
3545
|
});
|
|
3543
3546
|
}
|
|
3544
|
-
function
|
|
3547
|
+
function In({ label: e, value: t }) {
|
|
3545
3548
|
return /* @__PURE__ */ g("div", {
|
|
3546
3549
|
className: "aaravpos-barber-summary-row",
|
|
3547
3550
|
children: [/* @__PURE__ */ u("span", {
|
|
@@ -3566,8 +3569,8 @@ function p1() {
|
|
|
3566
3569
|
if (!m?.length) return;
|
|
3567
3570
|
const y = m.find((S) => S?.categories?.some((P) => P?.services?.length > 0));
|
|
3568
3571
|
y && !s && (d(y), c(null));
|
|
3569
|
-
}, [m, s]), /* @__PURE__ */ g(
|
|
3570
|
-
sidebar: /* @__PURE__ */ u(
|
|
3572
|
+
}, [m, s]), /* @__PURE__ */ g(xa, {
|
|
3573
|
+
sidebar: /* @__PURE__ */ u(Ma, {
|
|
3571
3574
|
goToStep: () => e(Be()),
|
|
3572
3575
|
showFooterButton: !0,
|
|
3573
3576
|
showBookingSection: !1
|
|
@@ -3581,7 +3584,7 @@ function p1() {
|
|
|
3581
3584
|
children: ["Choose Time ", /* @__PURE__ */ u(Qr, { size: 16 })]
|
|
3582
3585
|
})
|
|
3583
3586
|
}) : null,
|
|
3584
|
-
children: [/* @__PURE__ */ u(
|
|
3587
|
+
children: [/* @__PURE__ */ u(Aa, {}), /* @__PURE__ */ g("div", {
|
|
3585
3588
|
className: "aaravpos-barber-margin-top-20",
|
|
3586
3589
|
children: [
|
|
3587
3590
|
/* @__PURE__ */ g("div", {
|
|
@@ -4048,7 +4051,7 @@ function $1() {
|
|
|
4048
4051
|
day: x.day,
|
|
4049
4052
|
month: x.month,
|
|
4050
4053
|
year: x.year
|
|
4051
|
-
})), e(
|
|
4054
|
+
})), e(wn(null));
|
|
4052
4055
|
}, ue = (x) => {
|
|
4053
4056
|
if (!y.length) return;
|
|
4054
4057
|
const C = y.slice(x, x + H);
|
|
@@ -4060,9 +4063,9 @@ function $1() {
|
|
|
4060
4063
|
re.warning("Selected time range is not fully available");
|
|
4061
4064
|
return;
|
|
4062
4065
|
}
|
|
4063
|
-
e(
|
|
4066
|
+
e(wn(y[x].start_time));
|
|
4064
4067
|
const E = Array.from({ length: H }, (k, U) => x + U);
|
|
4065
|
-
e(
|
|
4068
|
+
e(Pn({
|
|
4066
4069
|
indexes: E,
|
|
4067
4070
|
ids: E.map((k) => y[k]?.id)
|
|
4068
4071
|
})), setTimeout(() => {
|
|
@@ -4074,7 +4077,7 @@ function $1() {
|
|
|
4074
4077
|
const x = y.findIndex((E) => E.start_time === c);
|
|
4075
4078
|
if (x === -1) return;
|
|
4076
4079
|
const C = Array.from({ length: H }, (E, k) => x + k);
|
|
4077
|
-
C.length === d.length && C.every((E, k) => E === d[k]) || e(
|
|
4080
|
+
C.length === d.length && C.every((E, k) => E === d[k]) || e(Pn({
|
|
4078
4081
|
indexes: C,
|
|
4079
4082
|
ids: C.map((E) => y[E]?.id)
|
|
4080
4083
|
}));
|
|
@@ -4101,7 +4104,7 @@ function $1() {
|
|
|
4101
4104
|
Ce,
|
|
4102
4105
|
me
|
|
4103
4106
|
]), de(() => {
|
|
4104
|
-
h || (e(
|
|
4107
|
+
h || (e(wn(null)), e(Pn({
|
|
4105
4108
|
indexes: [],
|
|
4106
4109
|
ids: []
|
|
4107
4110
|
})));
|
|
@@ -4109,10 +4112,10 @@ function $1() {
|
|
|
4109
4112
|
h,
|
|
4110
4113
|
l,
|
|
4111
4114
|
e
|
|
4112
|
-
]), /* @__PURE__ */ g(
|
|
4115
|
+
]), /* @__PURE__ */ g(xa, {
|
|
4113
4116
|
sidebar: /* @__PURE__ */ u("div", {
|
|
4114
4117
|
className: "aaravpos-barber-aside",
|
|
4115
|
-
children: /* @__PURE__ */ u(
|
|
4118
|
+
children: /* @__PURE__ */ u(Ma, {
|
|
4116
4119
|
buttonText: "Confirm Details",
|
|
4117
4120
|
onButtonClick: () => {
|
|
4118
4121
|
if (!c || !d.length) {
|
|
@@ -4125,7 +4128,7 @@ function $1() {
|
|
|
4125
4128
|
})
|
|
4126
4129
|
}),
|
|
4127
4130
|
children: [
|
|
4128
|
-
/* @__PURE__ */ u(
|
|
4131
|
+
/* @__PURE__ */ u(Aa, {}),
|
|
4129
4132
|
/* @__PURE__ */ u("div", {
|
|
4130
4133
|
style: { marginTop: 15 },
|
|
4131
4134
|
children: /* @__PURE__ */ u("h1", {
|
|
@@ -4217,7 +4220,7 @@ function $1() {
|
|
|
4217
4220
|
className: "aaravpos-barber-scroll-area",
|
|
4218
4221
|
style: h ? { height: 300 } : {},
|
|
4219
4222
|
children: [h ? /* @__PURE__ */ u(y1, {}) : /* @__PURE__ */ u($e, { children: y?.length ? /* @__PURE__ */ g($e, { children: [
|
|
4220
|
-
/* @__PURE__ */ u(
|
|
4223
|
+
/* @__PURE__ */ u(Tn, {
|
|
4221
4224
|
label: "Morning",
|
|
4222
4225
|
icon: /* @__PURE__ */ u(a1, {
|
|
4223
4226
|
size: 18,
|
|
@@ -4230,7 +4233,7 @@ function $1() {
|
|
|
4230
4233
|
isOpen: Q === "morning",
|
|
4231
4234
|
onToggle: () => he(Q === "morning" ? null : "morning")
|
|
4232
4235
|
}),
|
|
4233
|
-
/* @__PURE__ */ u(
|
|
4236
|
+
/* @__PURE__ */ u(Tn, {
|
|
4234
4237
|
label: "Afternoon",
|
|
4235
4238
|
icon: /* @__PURE__ */ u(r1, {
|
|
4236
4239
|
size: 18,
|
|
@@ -4243,7 +4246,7 @@ function $1() {
|
|
|
4243
4246
|
isOpen: Q === "afternoon",
|
|
4244
4247
|
onToggle: () => he(Q === "afternoon" ? null : "afternoon")
|
|
4245
4248
|
}),
|
|
4246
|
-
/* @__PURE__ */ u(
|
|
4249
|
+
/* @__PURE__ */ u(Tn, {
|
|
4247
4250
|
label: "Evening",
|
|
4248
4251
|
icon: /* @__PURE__ */ u(Rf, {
|
|
4249
4252
|
size: 18,
|
|
@@ -4281,7 +4284,7 @@ function Ri({ onClick: e, children: t }) {
|
|
|
4281
4284
|
children: t
|
|
4282
4285
|
});
|
|
4283
4286
|
}
|
|
4284
|
-
function
|
|
4287
|
+
function Tn({ icon: e, label: t, slots: r, allSlots: n, selectedSlotIndexes: a, handleSlotSelect: i, isOpen: o, onToggle: s }) {
|
|
4285
4288
|
return !r || r?.length === 0 ? null : /* @__PURE__ */ g("div", {
|
|
4286
4289
|
className: "aaravpos-barber-slot-section",
|
|
4287
4290
|
children: [/* @__PURE__ */ g("div", {
|
|
@@ -4307,7 +4310,7 @@ function In({ icon: e, label: t, slots: r, allSlots: n, selectedSlotIndexes: a,
|
|
|
4307
4310
|
className: `aaravpos-barber-slot-card ${f ? "aaravpos-barber-slot-card-disabled" : c ? "aaravpos-barber-slot-card-selected" : "aaravpos-barber-slot-card-default"}`,
|
|
4308
4311
|
children: [/* @__PURE__ */ u("span", {
|
|
4309
4312
|
className: "aaravpos-barber-slot-time",
|
|
4310
|
-
children: d.
|
|
4313
|
+
children: d.start_time_12h
|
|
4311
4314
|
}), /* @__PURE__ */ u("span", {
|
|
4312
4315
|
className: "aaravpos-barber-slot-status",
|
|
4313
4316
|
children: f ? "Booked" : "Available"
|
|
@@ -4323,7 +4326,7 @@ var g1 = (e) => e.replace(/\D/g, "").slice(0, 16).replace(/(.{4})/g, "$1 ").trim
|
|
|
4323
4326
|
return t.length >= 3 ? `${t.slice(0, 2)}/${t.slice(2)}` : t;
|
|
4324
4327
|
}, C1 = (e) => e.replace(/\D/g, "").slice(0, 3);
|
|
4325
4328
|
function S1({ onClose: e, onPay: t, amount: r }) {
|
|
4326
|
-
const { timeZone: n } = J((c) => c?.barber?.outletDetails), { control: a, handleSubmit: i, reset: o, formState: { errors: s, isSubmitting: d } } =
|
|
4329
|
+
const { timeZone: n } = J((c) => c?.barber?.outletDetails), { control: a, handleSubmit: i, reset: o, formState: { errors: s, isSubmitting: d } } = va({ defaultValues: {
|
|
4327
4330
|
name: "",
|
|
4328
4331
|
number: "",
|
|
4329
4332
|
expiry: "",
|
|
@@ -4532,14 +4535,14 @@ function S1({ onClose: e, onPay: t, amount: r }) {
|
|
|
4532
4535
|
})
|
|
4533
4536
|
});
|
|
4534
4537
|
}
|
|
4535
|
-
function
|
|
4536
|
-
return
|
|
4538
|
+
function Xn() {
|
|
4539
|
+
return Xn = Object.assign ? Object.assign.bind() : function(e) {
|
|
4537
4540
|
for (var t = 1; t < arguments.length; t++) {
|
|
4538
4541
|
var r = arguments[t];
|
|
4539
4542
|
for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
4540
4543
|
}
|
|
4541
4544
|
return e;
|
|
4542
|
-
},
|
|
4545
|
+
}, Xn.apply(null, arguments);
|
|
4543
4546
|
}
|
|
4544
4547
|
function P1(e, t) {
|
|
4545
4548
|
if (e == null) return {};
|
|
@@ -4593,10 +4596,10 @@ function E1(e, t, r) {
|
|
|
4593
4596
|
function I1(e, t) {
|
|
4594
4597
|
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
4595
4598
|
}
|
|
4596
|
-
function
|
|
4597
|
-
return
|
|
4599
|
+
function Jn(e, t) {
|
|
4600
|
+
return Jn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
|
|
4598
4601
|
return r.__proto__ = n, r;
|
|
4599
|
-
},
|
|
4602
|
+
}, Jn(e, t);
|
|
4600
4603
|
}
|
|
4601
4604
|
function T1(e, t) {
|
|
4602
4605
|
if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
|
|
@@ -4604,7 +4607,7 @@ function T1(e, t) {
|
|
|
4604
4607
|
value: e,
|
|
4605
4608
|
writable: !0,
|
|
4606
4609
|
configurable: !0
|
|
4607
|
-
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t &&
|
|
4610
|
+
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t && Jn(e, t);
|
|
4608
4611
|
}
|
|
4609
4612
|
function Ir(e) {
|
|
4610
4613
|
return Ir = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
@@ -4820,7 +4823,7 @@ var k1 = /* @__PURE__ */ Te(((e) => {
|
|
|
4820
4823
|
}
|
|
4821
4824
|
return c;
|
|
4822
4825
|
};
|
|
4823
|
-
})),
|
|
4826
|
+
})), ka = /* @__PURE__ */ Te(((e, t) => {
|
|
4824
4827
|
var r = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
4825
4828
|
t.exports = r;
|
|
4826
4829
|
})), dd = /* @__PURE__ */ Te(((e, t) => {
|
|
@@ -4829,7 +4832,7 @@ var k1 = /* @__PURE__ */ Te(((e) => {
|
|
|
4829
4832
|
var r = function() {
|
|
4830
4833
|
};
|
|
4831
4834
|
if (process.env.NODE_ENV !== "production") {
|
|
4832
|
-
var n =
|
|
4835
|
+
var n = ka(), a = {}, i = dd();
|
|
4833
4836
|
r = function(s) {
|
|
4834
4837
|
var d = "Warning: " + s;
|
|
4835
4838
|
typeof console < "u" && console.error(d);
|
|
@@ -4864,7 +4867,7 @@ var k1 = /* @__PURE__ */ Te(((e) => {
|
|
|
4864
4867
|
process.env.NODE_ENV !== "production" && (a = {});
|
|
4865
4868
|
}, t.exports = o;
|
|
4866
4869
|
})), j1 = /* @__PURE__ */ Te(((e, t) => {
|
|
4867
|
-
var r = sd(), n = R1(), a =
|
|
4870
|
+
var r = sd(), n = R1(), a = ka(), i = dd(), o = F1(), s = function() {
|
|
4868
4871
|
};
|
|
4869
4872
|
process.env.NODE_ENV !== "production" && (s = function(l) {
|
|
4870
4873
|
var c = "Warning: " + l;
|
|
@@ -5137,7 +5140,7 @@ Valid keys: ` + JSON.stringify(Object.keys(C), null, " "));
|
|
|
5137
5140
|
return v.checkPropTypes = o, v.resetWarningCache = o.resetWarningCache, v.PropTypes = v, v;
|
|
5138
5141
|
};
|
|
5139
5142
|
})), L1 = /* @__PURE__ */ Te(((e, t) => {
|
|
5140
|
-
var r =
|
|
5143
|
+
var r = ka();
|
|
5141
5144
|
function n() {
|
|
5142
5145
|
}
|
|
5143
5146
|
function a() {
|
|
@@ -5183,7 +5186,7 @@ Valid keys: ` + JSON.stringify(Object.keys(C), null, " "));
|
|
|
5183
5186
|
var r = sd(), n = !0;
|
|
5184
5187
|
t.exports = j1()(r.isElement, n);
|
|
5185
5188
|
} else t.exports = L1()();
|
|
5186
|
-
})), _ = /* @__PURE__ */
|
|
5189
|
+
})), _ = /* @__PURE__ */ ya(B1(), 1);
|
|
5187
5190
|
function at(e, t, r) {
|
|
5188
5191
|
this.x = e, this.y = t, this.time = r || (/* @__PURE__ */ new Date()).getTime();
|
|
5189
5192
|
}
|
|
@@ -5196,10 +5199,10 @@ at.prototype.distanceTo = function(e) {
|
|
|
5196
5199
|
at.prototype.equals = function(e) {
|
|
5197
5200
|
return this.x === e.x && this.y === e.y && this.time === e.time;
|
|
5198
5201
|
};
|
|
5199
|
-
function
|
|
5202
|
+
function Da(e, t, r, n) {
|
|
5200
5203
|
this.startPoint = e, this.control1 = t, this.control2 = r, this.endPoint = n;
|
|
5201
5204
|
}
|
|
5202
|
-
|
|
5205
|
+
Da.prototype.length = function() {
|
|
5203
5206
|
for (var e = 10, t = 0, r = void 0, n = void 0, a = 0; a <= e; a += 1) {
|
|
5204
5207
|
var i = a / e, o = this._point(i, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), s = this._point(i, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
|
|
5205
5208
|
if (a > 0) {
|
|
@@ -5210,7 +5213,7 @@ ka.prototype.length = function() {
|
|
|
5210
5213
|
}
|
|
5211
5214
|
return t;
|
|
5212
5215
|
};
|
|
5213
|
-
|
|
5216
|
+
Da.prototype._point = function(e, t, r, n, a) {
|
|
5214
5217
|
return t * (1 - e) * (1 - e) * (1 - e) + 3 * r * (1 - e) * (1 - e) * e + 3 * n * (1 - e) * e * e + a * e * e * e;
|
|
5215
5218
|
};
|
|
5216
5219
|
function U1(e, t, r) {
|
|
@@ -5325,7 +5328,7 @@ ee.prototype._addPoint = function(e) {
|
|
|
5325
5328
|
t.length === 3 && t.unshift(t[0]), r = this._calculateCurveControlPoints(t[0], t[1], t[2]);
|
|
5326
5329
|
var n = r.c2;
|
|
5327
5330
|
r = this._calculateCurveControlPoints(t[1], t[2], t[3]);
|
|
5328
|
-
var a = r.c1, i = new
|
|
5331
|
+
var a = r.c1, i = new Da(t[1], n, a, t[2]), o = this._calculateCurveWidths(i);
|
|
5329
5332
|
return t.shift(), {
|
|
5330
5333
|
curve: i,
|
|
5331
5334
|
widths: o
|
|
@@ -5476,7 +5479,7 @@ var V1 = /* @__PURE__ */ Te(((e, t) => {
|
|
|
5476
5479
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.default = a;
|
|
5477
5480
|
}]);
|
|
5478
5481
|
});
|
|
5479
|
-
})), G1 = /* @__PURE__ */
|
|
5482
|
+
})), G1 = /* @__PURE__ */ ya(V1(), 1), z1 = ["canvasProps", "clearOnResize"], rn = /* @__PURE__ */ (function(e) {
|
|
5480
5483
|
T1(r, e);
|
|
5481
5484
|
var t = M1(r);
|
|
5482
5485
|
function r() {
|
|
@@ -5514,7 +5517,7 @@ var V1 = /* @__PURE__ */ Te(((e, t) => {
|
|
|
5514
5517
|
}
|
|
5515
5518
|
}, n.render = function() {
|
|
5516
5519
|
var s = n.props.canvasProps;
|
|
5517
|
-
return /* @__PURE__ */ j.createElement("canvas",
|
|
5520
|
+
return /* @__PURE__ */ j.createElement("canvas", Xn({ ref: n.setRef }, s));
|
|
5518
5521
|
}, n.on = function() {
|
|
5519
5522
|
return window.addEventListener("resize", n._checkClearOnResize), n.getSignaturePad().on();
|
|
5520
5523
|
}, n.off = function() {
|
|
@@ -5551,7 +5554,7 @@ rn.propTypes = {
|
|
|
5551
5554
|
rn.defaultProps = { clearOnResize: !0 };
|
|
5552
5555
|
rn.refNullError = /* @__PURE__ */ new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");
|
|
5553
5556
|
var W1 = ({ onClose: e, onConfirm: t, enforcement: r, heading: n, consent: a }) => {
|
|
5554
|
-
const i = De(null), { register: o, handleSubmit: s, control: d, reset: l, watch: c, setValue: f, formState: { errors: h, isSubmitting: m } } =
|
|
5557
|
+
const i = De(null), { register: o, handleSubmit: s, control: d, reset: l, watch: c, setValue: f, formState: { errors: h, isSubmitting: m } } = va({
|
|
5555
5558
|
defaultValues: {
|
|
5556
5559
|
accepted: !1,
|
|
5557
5560
|
typedName: "",
|
|
@@ -5707,7 +5710,7 @@ var W1 = ({ onClose: e, onConfirm: t, enforcement: r, heading: n, consent: a })
|
|
|
5707
5710
|
type: "submit",
|
|
5708
5711
|
disabled: !O,
|
|
5709
5712
|
className: `aaravpos-barber-consent-submit-btn ${O ? "aaravpos-barber-consent-submit-active" : "aaravpos-barber-consent-submit-disabled"}`,
|
|
5710
|
-
children: [/* @__PURE__ */ u(
|
|
5713
|
+
children: [/* @__PURE__ */ u(Ta, {}), r === "DRAW_SIGNATURE" || r === "TYPED_NAME" ? "Sign & Continue" : "I Agree"]
|
|
5711
5714
|
})]
|
|
5712
5715
|
})
|
|
5713
5716
|
]
|
|
@@ -13242,12 +13245,12 @@ function ji(e, t) {
|
|
|
13242
13245
|
for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
|
|
13243
13246
|
return n;
|
|
13244
13247
|
}
|
|
13245
|
-
function
|
|
13248
|
+
function Qn(e, t) {
|
|
13246
13249
|
for (var r = 0, n = Y1(t.split("")), a; !(a = n()).done; ) a.value === e && r++;
|
|
13247
13250
|
return r;
|
|
13248
13251
|
}
|
|
13249
13252
|
function X1(e, t) {
|
|
13250
|
-
for (var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "x", n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : " ", a = e.length, i =
|
|
13253
|
+
for (var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "x", n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : " ", a = e.length, i = Qn("(", e) - Qn(")", e); i > 0 && a < t.length; )
|
|
13251
13254
|
e += t[a].replace(r, n), t[a] === ")" && i--, a++;
|
|
13252
13255
|
return e;
|
|
13253
13256
|
}
|
|
@@ -13285,7 +13288,7 @@ function e0(e) {
|
|
|
13285
13288
|
if (!e) return function(a) {
|
|
13286
13289
|
return { text: a };
|
|
13287
13290
|
};
|
|
13288
|
-
var n =
|
|
13291
|
+
var n = Qn(t, e);
|
|
13289
13292
|
return function(a) {
|
|
13290
13293
|
if (!a) return {
|
|
13291
13294
|
text: "",
|
|
@@ -13363,7 +13366,7 @@ function o0() {
|
|
|
13363
13366
|
}
|
|
13364
13367
|
var s0 = /Android/i;
|
|
13365
13368
|
function d0(e, t, r, n, a) {
|
|
13366
|
-
|
|
13369
|
+
ea(t, r, n, void 0, a);
|
|
13367
13370
|
}
|
|
13368
13371
|
function l0(e, t, r, n, a) {
|
|
13369
13372
|
if (!r0(t)) {
|
|
@@ -13373,7 +13376,7 @@ function l0(e, t, r, n, a) {
|
|
|
13373
13376
|
case "Backspace":
|
|
13374
13377
|
e.preventDefault();
|
|
13375
13378
|
var o = n0(t);
|
|
13376
|
-
return o ? (c0(t, o),
|
|
13379
|
+
return o ? (c0(t, o), ea(t, r, n, void 0, a)) : ea(t, r, n, i, a);
|
|
13377
13380
|
default:
|
|
13378
13381
|
}
|
|
13379
13382
|
}
|
|
@@ -13382,7 +13385,7 @@ function c0(e, t) {
|
|
|
13382
13385
|
var r = e.value;
|
|
13383
13386
|
r = r.slice(0, t.start) + r.slice(t.end), e.value = r, cd(e, t.start);
|
|
13384
13387
|
}
|
|
13385
|
-
function
|
|
13388
|
+
function ea(e, t, r, n, a) {
|
|
13386
13389
|
var i = K1(e.value, i0(e), t), o = i.value, s = i.caret;
|
|
13387
13390
|
if (n) {
|
|
13388
13391
|
var d = q1(o, s, n);
|
|
@@ -14166,26 +14169,26 @@ var j0 = [
|
|
|
14166
14169
|
"UAN",
|
|
14167
14170
|
"VOICEMAIL"
|
|
14168
14171
|
];
|
|
14169
|
-
function
|
|
14172
|
+
function Ra(e, t, r) {
|
|
14170
14173
|
if (t = t || {}, !(!e.country && !e.countryCallingCode)) {
|
|
14171
14174
|
r = new le(r), r.selectNumberingPlan(e.country, e.countryCallingCode);
|
|
14172
14175
|
var n = t.v2 ? e.nationalNumber : e.phone;
|
|
14173
14176
|
if (Ge(n, r.nationalNumberPattern())) {
|
|
14174
|
-
if (
|
|
14175
|
-
return r.type("MOBILE") && r.type("MOBILE").pattern() === "" || !r.type("MOBILE") ||
|
|
14177
|
+
if (An(n, "FIXED_LINE", r))
|
|
14178
|
+
return r.type("MOBILE") && r.type("MOBILE").pattern() === "" || !r.type("MOBILE") || An(n, "MOBILE", r) ? "FIXED_LINE_OR_MOBILE" : "FIXED_LINE";
|
|
14176
14179
|
for (var a = R0(j0), i; !(i = a()).done; ) {
|
|
14177
14180
|
var o = i.value;
|
|
14178
|
-
if (
|
|
14181
|
+
if (An(n, o, r)) return o;
|
|
14179
14182
|
}
|
|
14180
14183
|
}
|
|
14181
14184
|
}
|
|
14182
14185
|
}
|
|
14183
|
-
function
|
|
14186
|
+
function An(e, t, r) {
|
|
14184
14187
|
var n = r.type(t);
|
|
14185
14188
|
return !n || !n.pattern() || n.possibleLengths() && n.possibleLengths().indexOf(e.length) < 0 ? !1 : Ge(e, n.pattern());
|
|
14186
14189
|
}
|
|
14187
14190
|
function L0(e, t, r) {
|
|
14188
|
-
return t = t || {}, r = new le(r), r.selectNumberingPlan(e.country, e.countryCallingCode), r.hasTypes() ?
|
|
14191
|
+
return t = t || {}, r = new le(r), r.selectNumberingPlan(e.country, e.countryCallingCode), r.hasTypes() ? Ra(e, t, r.metadata) !== void 0 : Ge(t.v2 ? e.nationalNumber : e.phone, r.nationalNumberPattern());
|
|
14189
14192
|
}
|
|
14190
14193
|
function B0(e, t, r) {
|
|
14191
14194
|
var n = new le(r).getCountryCodesForCallingCode(e);
|
|
@@ -14211,7 +14214,7 @@ function vd(e, t, r, n) {
|
|
|
14211
14214
|
}
|
|
14212
14215
|
}
|
|
14213
14216
|
}
|
|
14214
|
-
function
|
|
14217
|
+
function ta(e, t) {
|
|
14215
14218
|
if (e && t.numberingPlan.nationalPrefixForParsing()) {
|
|
14216
14219
|
var r = new RegExp("^(?:" + t.numberingPlan.nationalPrefixForParsing() + ")"), n = r.exec(e);
|
|
14217
14220
|
if (n) {
|
|
@@ -14271,14 +14274,14 @@ function yd(e, t) {
|
|
|
14271
14274
|
var o = i.value;
|
|
14272
14275
|
if (n.selectNumberingPlan(o), n.leadingDigits()) {
|
|
14273
14276
|
if (e && e.search(n.leadingDigits()) === 0) return o;
|
|
14274
|
-
} else if (
|
|
14277
|
+
} else if (Ra({
|
|
14275
14278
|
phone: e,
|
|
14276
14279
|
country: o
|
|
14277
14280
|
}, void 0, n.metadata)) return o;
|
|
14278
14281
|
}
|
|
14279
14282
|
}
|
|
14280
14283
|
var X0 = !1;
|
|
14281
|
-
function
|
|
14284
|
+
function Fa(e, t) {
|
|
14282
14285
|
var r = t.nationalNumber, n = t.metadata;
|
|
14283
14286
|
if (X0 && n.isNonGeographicCallingCode(e))
|
|
14284
14287
|
return "001";
|
|
@@ -14289,11 +14292,11 @@ function Ra(e, t) {
|
|
|
14289
14292
|
metadata: n.metadata
|
|
14290
14293
|
});
|
|
14291
14294
|
}
|
|
14292
|
-
function
|
|
14293
|
-
var n =
|
|
14295
|
+
function ra(e, t, r) {
|
|
14296
|
+
var n = ta(e, r), a = n.carrierCode, i = n.nationalNumber;
|
|
14294
14297
|
if (i !== e) {
|
|
14295
14298
|
if (!J0(e, i, r)) return { nationalNumber: e };
|
|
14296
|
-
if (r.numberingPlan.possibleLengths() && (t || (t =
|
|
14299
|
+
if (r.numberingPlan.possibleLengths() && (t || (t = Fa(r.numberingPlan.callingCode(), {
|
|
14297
14300
|
nationalNumber: i,
|
|
14298
14301
|
metadata: r
|
|
14299
14302
|
})), !Q0(i, t, r)))
|
|
@@ -14320,7 +14323,7 @@ function bd(e, t, r, n, a) {
|
|
|
14320
14323
|
var i = t || r ? Xe(t || r, a) : n;
|
|
14321
14324
|
if (e.indexOf(i) === 0) {
|
|
14322
14325
|
a = new le(a), a.selectNumberingPlan(t || r, i);
|
|
14323
|
-
var o = e.slice(i.length), s =
|
|
14326
|
+
var o = e.slice(i.length), s = ra(o, t, a).nationalNumber, d = ra(e, t, a).nationalNumber;
|
|
14324
14327
|
if (!Ge(d, a.nationalNumberPattern()) && Ge(s, a.nationalNumberPattern()) || on(d, t, a) === "TOO_LONG") return {
|
|
14325
14328
|
countryCallingCode: i,
|
|
14326
14329
|
number: o
|
|
@@ -14328,7 +14331,7 @@ function bd(e, t, r, n, a) {
|
|
|
14328
14331
|
}
|
|
14329
14332
|
return { number: e };
|
|
14330
14333
|
}
|
|
14331
|
-
function
|
|
14334
|
+
function ja(e, t, r, n, a) {
|
|
14332
14335
|
if (!e) return {};
|
|
14333
14336
|
var i;
|
|
14334
14337
|
if (e[0] !== "+") {
|
|
@@ -14409,9 +14412,9 @@ function up(e, t, r, n) {
|
|
|
14409
14412
|
var a = n.countryCallingCode(), i = r.v2 ? e.nationalNumber : e.phone, o;
|
|
14410
14413
|
switch (t) {
|
|
14411
14414
|
case "NATIONAL":
|
|
14412
|
-
return i ? (o = Ar(i, e.carrierCode, "NATIONAL", n, r),
|
|
14415
|
+
return i ? (o = Ar(i, e.carrierCode, "NATIONAL", n, r), xn(o, e.ext, n, r.formatExtension)) : "";
|
|
14413
14416
|
case "INTERNATIONAL":
|
|
14414
|
-
return i ? (o = Ar(i, null, "INTERNATIONAL", n, r), o = "+".concat(a, " ").concat(o),
|
|
14417
|
+
return i ? (o = Ar(i, null, "INTERNATIONAL", n, r), o = "+".concat(a, " ").concat(o), xn(o, e.ext, n, r.formatExtension)) : "+".concat(a);
|
|
14415
14418
|
case "E.164":
|
|
14416
14419
|
return "+".concat(a).concat(i);
|
|
14417
14420
|
case "RFC3966":
|
|
@@ -14422,7 +14425,7 @@ function up(e, t, r, n) {
|
|
|
14422
14425
|
case "IDD":
|
|
14423
14426
|
if (!r.fromCountry) return;
|
|
14424
14427
|
var s = pp(i, e.carrierCode, a, r.fromCountry, n);
|
|
14425
|
-
return s ?
|
|
14428
|
+
return s ? xn(s, e.ext, n, r.formatExtension) : void 0;
|
|
14426
14429
|
default:
|
|
14427
14430
|
throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t, '"'));
|
|
14428
14431
|
}
|
|
@@ -14445,7 +14448,7 @@ function fp(e, t) {
|
|
|
14445
14448
|
return Ge(t, r.pattern());
|
|
14446
14449
|
});
|
|
14447
14450
|
}
|
|
14448
|
-
function
|
|
14451
|
+
function xn(e, t, r, n) {
|
|
14449
14452
|
return t ? n(e, t, r) : e;
|
|
14450
14453
|
}
|
|
14451
14454
|
function pp(e, t, r, n, a) {
|
|
@@ -14542,7 +14545,7 @@ var gp = !1, Pd = /* @__PURE__ */ (function() {
|
|
|
14542
14545
|
n = r;
|
|
14543
14546
|
var a = t;
|
|
14544
14547
|
if (!Sp.test(a)) throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');
|
|
14545
|
-
var i =
|
|
14548
|
+
var i = ja(a, void 0, void 0, void 0, n), o = i.countryCallingCode;
|
|
14546
14549
|
if (r = i.number, t = o, !r) throw new Error("Invalid `number` argument passed: too short");
|
|
14547
14550
|
}
|
|
14548
14551
|
if (!r) throw new TypeError("`nationalNumber` argument is required");
|
|
@@ -14593,7 +14596,7 @@ var gp = !1, Pd = /* @__PURE__ */ (function() {
|
|
|
14593
14596
|
{
|
|
14594
14597
|
key: "getType",
|
|
14595
14598
|
value: function() {
|
|
14596
|
-
return
|
|
14599
|
+
return Ra(this, { v2: !0 }, this.getMetadata());
|
|
14597
14600
|
}
|
|
14598
14601
|
},
|
|
14599
14602
|
{
|
|
@@ -14667,7 +14670,7 @@ function Op(e, t) {
|
|
|
14667
14670
|
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
14668
14671
|
}
|
|
14669
14672
|
function Ep(e, t, r) {
|
|
14670
|
-
return t = It(t), Ip(e,
|
|
14673
|
+
return t = It(t), Ip(e, La() ? Reflect.construct(t, r || [], It(e).constructor) : t.apply(e, r));
|
|
14671
14674
|
}
|
|
14672
14675
|
function Ip(e, t) {
|
|
14673
14676
|
if (t && (yt(t) == "object" || typeof t == "function")) return t;
|
|
@@ -14686,9 +14689,9 @@ function Ap(e, t) {
|
|
|
14686
14689
|
configurable: !0
|
|
14687
14690
|
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t && Et(e, t);
|
|
14688
14691
|
}
|
|
14689
|
-
function
|
|
14692
|
+
function na(e) {
|
|
14690
14693
|
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
14691
|
-
return
|
|
14694
|
+
return na = function(n) {
|
|
14692
14695
|
if (n === null || !Mp(n)) return n;
|
|
14693
14696
|
if (typeof n != "function") throw new TypeError("Super expression must either be null or a function");
|
|
14694
14697
|
if (t !== void 0) {
|
|
@@ -14704,22 +14707,22 @@ function ra(e) {
|
|
|
14704
14707
|
writable: !0,
|
|
14705
14708
|
configurable: !0
|
|
14706
14709
|
} }), Et(a, n);
|
|
14707
|
-
},
|
|
14710
|
+
}, na(e);
|
|
14708
14711
|
}
|
|
14709
14712
|
function xp(e, t, r) {
|
|
14710
|
-
if (
|
|
14713
|
+
if (La()) return Reflect.construct.apply(null, arguments);
|
|
14711
14714
|
var n = [null];
|
|
14712
14715
|
n.push.apply(n, t);
|
|
14713
14716
|
var a = new (e.bind.apply(e, n))();
|
|
14714
14717
|
return r && Et(a, r.prototype), a;
|
|
14715
14718
|
}
|
|
14716
|
-
function
|
|
14719
|
+
function La() {
|
|
14717
14720
|
try {
|
|
14718
14721
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
14719
14722
|
}));
|
|
14720
14723
|
} catch {
|
|
14721
14724
|
}
|
|
14722
|
-
return (
|
|
14725
|
+
return (La = function() {
|
|
14723
14726
|
return !!e;
|
|
14724
14727
|
})();
|
|
14725
14728
|
}
|
|
@@ -14746,7 +14749,7 @@ var Le = /* @__PURE__ */ (function(e) {
|
|
|
14746
14749
|
return Op(this, t), n = Ep(this, t, [r]), Object.setPrototypeOf(n, t.prototype), n.name = n.constructor.name, n;
|
|
14747
14750
|
}
|
|
14748
14751
|
return Ap(t, e), Pp(t);
|
|
14749
|
-
})(/* @__PURE__ */
|
|
14752
|
+
})(/* @__PURE__ */ na(Error)), no = new RegExp("(?:" + Cd() + ")$", "i");
|
|
14750
14753
|
function kp(e) {
|
|
14751
14754
|
var t = e.search(no);
|
|
14752
14755
|
if (t < 0) return {};
|
|
@@ -14866,7 +14869,7 @@ function io(e, t) {
|
|
|
14866
14869
|
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
14867
14870
|
return n;
|
|
14868
14871
|
}
|
|
14869
|
-
function
|
|
14872
|
+
function aa(e) {
|
|
14870
14873
|
for (var t = "", r = jp(e.split("")), n; !(n = r()).done; ) {
|
|
14871
14874
|
var a = n.value;
|
|
14872
14875
|
t += _d(a, t) || "";
|
|
@@ -14883,11 +14886,11 @@ function _d(e, t, r) {
|
|
|
14883
14886
|
}
|
|
14884
14887
|
return wd(e);
|
|
14885
14888
|
}
|
|
14886
|
-
var oo = "([" + Pe + "]|[\\-\\.\\(\\)]?)", Bp = "^\\+" + oo + "*[" + Pe + "]" + oo + "*$", Up = new RegExp(Bp, "g"),
|
|
14889
|
+
var oo = "([" + Pe + "]|[\\-\\.\\(\\)]?)", Bp = "^\\+" + oo + "*[" + Pe + "]" + oo + "*$", Up = new RegExp(Bp, "g"), ia = Pe, Vp = "[" + ia + "]+((\\-)*[" + ia + "])*", Gp = "[a-zA-Z]+((\\-)*[" + ia + "])*", zp = "^(" + Vp + "\\.)*" + Gp + "\\.?$", Wp = new RegExp(zp, "g"), so = "tel:", oa = ";phone-context=", Hp = ";isub=";
|
|
14887
14890
|
function qp(e) {
|
|
14888
|
-
var t = e.indexOf(
|
|
14891
|
+
var t = e.indexOf(oa);
|
|
14889
14892
|
if (t < 0) return null;
|
|
14890
|
-
var r = t +
|
|
14893
|
+
var r = t + oa.length;
|
|
14891
14894
|
if (r >= e.length) return "";
|
|
14892
14895
|
var n = e.indexOf(";", r);
|
|
14893
14896
|
return n >= 0 ? e.substring(r, n) : e.substring(r);
|
|
@@ -14904,7 +14907,7 @@ function Yp(e, t) {
|
|
|
14904
14907
|
a = "", n.charAt(0) === "+" && (a += n);
|
|
14905
14908
|
var i = e.indexOf(so), o;
|
|
14906
14909
|
i >= 0 ? o = i + so.length : o = 0;
|
|
14907
|
-
var s = e.indexOf(
|
|
14910
|
+
var s = e.indexOf(oa);
|
|
14908
14911
|
a += e.substring(o, s);
|
|
14909
14912
|
}
|
|
14910
14913
|
var d = a.indexOf(Hp);
|
|
@@ -14978,7 +14981,7 @@ function n2(e, t, r) {
|
|
|
14978
14981
|
return r && (n.ext = r), n;
|
|
14979
14982
|
}
|
|
14980
14983
|
function a2(e, t, r, n) {
|
|
14981
|
-
var a =
|
|
14984
|
+
var a = ja(aa(e), void 0, t, r, n.metadata), i = a.countryCallingCodeSource, o = a.countryCallingCode, s = a.number, d;
|
|
14982
14985
|
if (o) n.selectNumberingPlan(o);
|
|
14983
14986
|
else if (s && (t || r))
|
|
14984
14987
|
n.selectNumberingPlan(t, r), t ? d = t : Qp && n.isNonGeographicCallingCode(r) && (d = "001"), o = r || Xe(t, n.metadata);
|
|
@@ -14987,7 +14990,7 @@ function a2(e, t, r, n) {
|
|
|
14987
14990
|
countryCallingCodeSource: i,
|
|
14988
14991
|
countryCallingCode: o
|
|
14989
14992
|
};
|
|
14990
|
-
var l =
|
|
14993
|
+
var l = ra(aa(s), d, n), c = l.nationalNumber, f = l.carrierCode, h = Fa(o, {
|
|
14991
14994
|
nationalNumber: c,
|
|
14992
14995
|
metadata: n
|
|
14993
14996
|
});
|
|
@@ -15422,7 +15425,7 @@ function bo(e, t) {
|
|
|
15422
15425
|
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
15423
15426
|
return n;
|
|
15424
15427
|
}
|
|
15425
|
-
var
|
|
15428
|
+
var Mn = new RegExp("x");
|
|
15426
15429
|
function ur(e, t) {
|
|
15427
15430
|
if (t < 1) return "";
|
|
15428
15431
|
for (var r = ""; t > 1; )
|
|
@@ -15446,8 +15449,8 @@ function M2(e) {
|
|
|
15446
15449
|
function k2(e, t, r) {
|
|
15447
15450
|
for (var n = A2(r.split("")), a; !(a = n()).done; ) {
|
|
15448
15451
|
var i = a.value;
|
|
15449
|
-
if (e.slice(t + 1).search(
|
|
15450
|
-
t = e.search(
|
|
15452
|
+
if (e.slice(t + 1).search(Mn) < 0) return;
|
|
15453
|
+
t = e.search(Mn), e = e.replace(Mn, i);
|
|
15451
15454
|
}
|
|
15452
15455
|
return [e, t];
|
|
15453
15456
|
}
|
|
@@ -15539,7 +15542,7 @@ var G2 = /* @__PURE__ */ (function() {
|
|
|
15539
15542
|
var n = this.context[0], a = n.branches, i = n.instructions;
|
|
15540
15543
|
if (a) return {
|
|
15541
15544
|
op: "|",
|
|
15542
|
-
args: a.concat([
|
|
15545
|
+
args: a.concat([kn(i)])
|
|
15543
15546
|
};
|
|
15544
15547
|
if (i.length === 0) throw new Error("Pattern is required");
|
|
15545
15548
|
return i.length === 1 ? i[0] : i;
|
|
@@ -15586,7 +15589,7 @@ var G2 = /* @__PURE__ */ (function() {
|
|
|
15586
15589
|
if (!this.getContext().or) throw new Error('")" operator must be preceded by "(?:" operator');
|
|
15587
15590
|
if (i && this.parsePattern(i), this.getContext().instructions.length === 0) throw new Error('No instructions found after "|" operator in an "or" group');
|
|
15588
15591
|
var s = this.getContext().branches;
|
|
15589
|
-
s.push(
|
|
15592
|
+
s.push(kn(this.getContext().instructions)), this.endContext(), this.getContext().instructions.push({
|
|
15590
15593
|
op: "|",
|
|
15591
15594
|
args: s
|
|
15592
15595
|
});
|
|
@@ -15596,7 +15599,7 @@ var G2 = /* @__PURE__ */ (function() {
|
|
|
15596
15599
|
if (i && this.parsePattern(i), !this.getContext().branches)
|
|
15597
15600
|
if (this.context.length === 1) this.getContext().branches = [];
|
|
15598
15601
|
else throw new Error('"branches" not found in an "or" group context');
|
|
15599
|
-
this.getContext().branches.push(
|
|
15602
|
+
this.getContext().branches.push(kn(this.getContext().instructions)), this.getContext().instructions = [];
|
|
15600
15603
|
break;
|
|
15601
15604
|
case "[":
|
|
15602
15605
|
i && this.parsePattern(i), this.startContext({ oneOfSet: !0 });
|
|
@@ -15629,7 +15632,7 @@ function z2(e) {
|
|
|
15629
15632
|
return t;
|
|
15630
15633
|
}
|
|
15631
15634
|
var W2 = /[\(\)\[\]\?\:\|]/, H2 = new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");
|
|
15632
|
-
function
|
|
15635
|
+
function kn(e) {
|
|
15633
15636
|
return e.length === 1 ? e[0] : e;
|
|
15634
15637
|
}
|
|
15635
15638
|
function Co(e, t) {
|
|
@@ -15703,13 +15706,13 @@ var J2 = /* @__PURE__ */ (function() {
|
|
|
15703
15706
|
value: function(r) {
|
|
15704
15707
|
var n = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).allowOverflow;
|
|
15705
15708
|
if (!r) throw new Error("String is required");
|
|
15706
|
-
var a =
|
|
15709
|
+
var a = sa(r.split(""), this.matchTree, !0);
|
|
15707
15710
|
if (a && a.match && delete a.matchedChars, !(a && a.overflow && !n))
|
|
15708
15711
|
return a;
|
|
15709
15712
|
}
|
|
15710
15713
|
}]);
|
|
15711
15714
|
})();
|
|
15712
|
-
function
|
|
15715
|
+
function sa(e, t, r) {
|
|
15713
15716
|
if (typeof t == "string") {
|
|
15714
15717
|
var n = e.join("");
|
|
15715
15718
|
return t.indexOf(n) === 0 ? e.length === t.length ? {
|
|
@@ -15722,7 +15725,7 @@ function oa(e, t, r) {
|
|
|
15722
15725
|
}
|
|
15723
15726
|
if (Array.isArray(t)) {
|
|
15724
15727
|
for (var a = e.slice(), i = 0; i < t.length; ) {
|
|
15725
|
-
var o = t[i], s =
|
|
15728
|
+
var o = t[i], s = sa(a, o, r && i === t.length - 1);
|
|
15726
15729
|
if (s) {
|
|
15727
15730
|
if (s.overflow) return s;
|
|
15728
15731
|
if (s.match) {
|
|
@@ -15746,7 +15749,7 @@ function oa(e, t, r) {
|
|
|
15746
15749
|
switch (t.op) {
|
|
15747
15750
|
case "|":
|
|
15748
15751
|
for (var d, l = Co(t.args), c; !(c = l()).done; ) {
|
|
15749
|
-
var f = c.value, h =
|
|
15752
|
+
var f = c.value, h = sa(e, f, r);
|
|
15750
15753
|
if (h) {
|
|
15751
15754
|
if (h.overflow) return h;
|
|
15752
15755
|
if (h.match) return {
|
|
@@ -15839,7 +15842,7 @@ function nm(e, t) {
|
|
|
15839
15842
|
}
|
|
15840
15843
|
return (t === "string" ? String : Number)(e);
|
|
15841
15844
|
}
|
|
15842
|
-
var
|
|
15845
|
+
var da = "9", am = ur(da, 15), im = /[- ]/, Mr = !0, om = Mr && function() {
|
|
15843
15846
|
return /\[([^\[\]])*\]/g;
|
|
15844
15847
|
}, sm = Mr && function() {
|
|
15845
15848
|
return /\d(?=[^,}][^,}])/g;
|
|
@@ -15987,7 +15990,7 @@ var sa = "9", am = ur(sa, 15), im = /[- ]/, Mr = !0, om = Mr && function() {
|
|
|
15987
15990
|
Mr && (d = d.replace(om(), "\\d").replace(sm(), "\\d"));
|
|
15988
15991
|
var l = am.match(d)[0];
|
|
15989
15992
|
if (!(a.length > l.length)) {
|
|
15990
|
-
var c = new RegExp("^" + d + "$"), f = a.replace(/\d/g,
|
|
15993
|
+
var c = new RegExp("^" + d + "$"), f = a.replace(/\d/g, da);
|
|
15991
15994
|
c.test(f) && (l = f);
|
|
15992
15995
|
var h = this.getFormatFormat(r, i), m;
|
|
15993
15996
|
if (this.shouldTryNationalPrefixFormattingRule(r, {
|
|
@@ -15999,7 +16002,7 @@ var sa = "9", am = ur(sa, 15), im = /[- ]/, Mr = !0, om = Mr && function() {
|
|
|
15999
16002
|
for (var v = o.length; v > 0; )
|
|
16000
16003
|
h = h.replace(/\d/, "x"), v--;
|
|
16001
16004
|
}
|
|
16002
|
-
var b = l.replace(new RegExp(d), h).replace(new RegExp(
|
|
16005
|
+
var b = l.replace(new RegExp(d), h).replace(new RegExp(da, "g"), "x");
|
|
16003
16006
|
return m || (s ? b = ur("x", s.length) + " " + b : o && (b = ur("x", o.length) + this.getSeparatorAfterNationalPrefix(r) + b)), i && (b = $d(b)), b;
|
|
16004
16007
|
}
|
|
16005
16008
|
}
|
|
@@ -16142,7 +16145,7 @@ var bm = "[" + Me + Pe + "]+", $m = new RegExp("^" + bm + "$", "i"), gm = "(?:["
|
|
|
16142
16145
|
{
|
|
16143
16146
|
key: "extractCountryCallingCode",
|
|
16144
16147
|
value: function(r) {
|
|
16145
|
-
var n =
|
|
16148
|
+
var n = ja("+" + r.getDigitsWithoutInternationalPrefix(), r.country, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), a = n.countryCallingCode, i = n.number;
|
|
16146
16149
|
if (a)
|
|
16147
16150
|
return r.setCallingCode(a), r.update({ nationalSignificantNumber: i }), !0;
|
|
16148
16151
|
}
|
|
@@ -16162,7 +16165,7 @@ var bm = "[" + Me + Pe + "]+", $m = new RegExp("^" + bm + "$", "i"), gm = "(?:["
|
|
|
16162
16165
|
key: "extractNationalSignificantNumber",
|
|
16163
16166
|
value: function(r, n) {
|
|
16164
16167
|
if (this.hasSelectedNumberingPlan) {
|
|
16165
|
-
var a =
|
|
16168
|
+
var a = ta(r, this.metadata), i = a.nationalPrefix, o = a.nationalNumber, s = a.carrierCode;
|
|
16166
16169
|
if (o !== r)
|
|
16167
16170
|
return this.onExtractedNationalNumber(i, s, o, r, n), !0;
|
|
16168
16171
|
}
|
|
@@ -16173,7 +16176,7 @@ var bm = "[" + Me + Pe + "]+", $m = new RegExp("^" + bm + "$", "i"), gm = "(?:["
|
|
|
16173
16176
|
value: function(r, n, a) {
|
|
16174
16177
|
if (!this.hasExtractedNationalSignificantNumber) return this.extractNationalSignificantNumber(r, a);
|
|
16175
16178
|
if (this.couldPossiblyExtractAnotherNationalSignificantNumber) {
|
|
16176
|
-
var i =
|
|
16179
|
+
var i = ta(r, this.metadata), o = i.nationalPrefix, s = i.nationalNumber, d = i.carrierCode;
|
|
16177
16180
|
if (s !== n)
|
|
16178
16181
|
return this.onExtractedNationalNumber(o, d, s, r, a), !0;
|
|
16179
16182
|
}
|
|
@@ -16488,7 +16491,7 @@ var Mo = !1, gt = /* @__PURE__ */ (function() {
|
|
|
16488
16491
|
{
|
|
16489
16492
|
key: "determineTheCountry",
|
|
16490
16493
|
value: function() {
|
|
16491
|
-
this.state.setCountry(
|
|
16494
|
+
this.state.setCountry(Fa(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, {
|
|
16492
16495
|
nationalNumber: this.state.nationalSignificantNumber,
|
|
16493
16496
|
metadata: this.metadata
|
|
16494
16497
|
}));
|
|
@@ -16566,12 +16569,12 @@ function ko(e) {
|
|
|
16566
16569
|
function Rm(e, t, r) {
|
|
16567
16570
|
return r || (r = t, t = void 0), new gt(t, r).input(e);
|
|
16568
16571
|
}
|
|
16569
|
-
var kr = /* @__PURE__ */
|
|
16572
|
+
var kr = /* @__PURE__ */ ya(H1(), 1);
|
|
16570
16573
|
function Td(e) {
|
|
16571
16574
|
var t = e.inputFormat, r = e.country, n = e.metadata;
|
|
16572
16575
|
return t === "NATIONAL_PART_OF_INTERNATIONAL" ? "+".concat(Xe(r, n)) : "";
|
|
16573
16576
|
}
|
|
16574
|
-
function
|
|
16577
|
+
function la(e, t) {
|
|
16575
16578
|
return t && (e = e.slice(t.length), e[0] === " " && (e = e.slice(1))), e;
|
|
16576
16579
|
}
|
|
16577
16580
|
function Fm(e, t, r) {
|
|
@@ -16601,14 +16604,14 @@ var Lm = 8, Bm = "+", Um = [
|
|
|
16601
16604
|
"international",
|
|
16602
16605
|
"withCountryCallingCode"
|
|
16603
16606
|
];
|
|
16604
|
-
function
|
|
16605
|
-
return
|
|
16607
|
+
function ca() {
|
|
16608
|
+
return ca = Object.assign ? Object.assign.bind() : function(e) {
|
|
16606
16609
|
for (var t = 1; t < arguments.length; t++) {
|
|
16607
16610
|
var r = arguments[t];
|
|
16608
16611
|
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
16609
16612
|
}
|
|
16610
16613
|
return e;
|
|
16611
|
-
},
|
|
16614
|
+
}, ca.apply(this, arguments);
|
|
16612
16615
|
}
|
|
16613
16616
|
function Vm(e, t) {
|
|
16614
16617
|
if (e == null) return {};
|
|
@@ -16637,7 +16640,7 @@ function zm(e) {
|
|
|
16637
16640
|
country: i,
|
|
16638
16641
|
metadata: d
|
|
16639
16642
|
}), v = m.input(p + h), b = m.getTemplate();
|
|
16640
|
-
return p && (v =
|
|
16643
|
+
return p && (v = la(v, p), b && (b = la(b, p))), {
|
|
16641
16644
|
text: v,
|
|
16642
16645
|
template: b
|
|
16643
16646
|
};
|
|
@@ -16645,7 +16648,7 @@ function zm(e) {
|
|
|
16645
16648
|
onKeyDown: a,
|
|
16646
16649
|
inputFormat: o
|
|
16647
16650
|
});
|
|
16648
|
-
return /* @__PURE__ */ j.createElement(N0,
|
|
16651
|
+
return /* @__PURE__ */ j.createElement(N0, ca({}, l, {
|
|
16649
16652
|
ref: n,
|
|
16650
16653
|
parse: Fm,
|
|
16651
16654
|
format: c,
|
|
@@ -16677,14 +16680,14 @@ var Wm = zm(), Hm = [
|
|
|
16677
16680
|
"international",
|
|
16678
16681
|
"withCountryCallingCode"
|
|
16679
16682
|
];
|
|
16680
|
-
function
|
|
16681
|
-
return
|
|
16683
|
+
function ua() {
|
|
16684
|
+
return ua = Object.assign ? Object.assign.bind() : function(e) {
|
|
16682
16685
|
for (var t = 1; t < arguments.length; t++) {
|
|
16683
16686
|
var r = arguments[t];
|
|
16684
16687
|
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
16685
16688
|
}
|
|
16686
16689
|
return e;
|
|
16687
|
-
},
|
|
16690
|
+
}, ua.apply(this, arguments);
|
|
16688
16691
|
}
|
|
16689
16692
|
function qm(e, t) {
|
|
16690
16693
|
if (e == null) return {};
|
|
@@ -16712,7 +16715,7 @@ function Ym(e) {
|
|
|
16712
16715
|
country: s,
|
|
16713
16716
|
metadata: c
|
|
16714
16717
|
}), v = Ue(function($) {
|
|
16715
|
-
var y =
|
|
16718
|
+
var y = aa($.target.value);
|
|
16716
16719
|
y === a && Do(p, y, s, c).indexOf($.target.value) === 0 && (y = y.slice(0, -1)), i(y);
|
|
16717
16720
|
}, [
|
|
16718
16721
|
p,
|
|
@@ -16724,7 +16727,7 @@ function Ym(e) {
|
|
|
16724
16727
|
onKeyDown: o,
|
|
16725
16728
|
inputFormat: d
|
|
16726
16729
|
});
|
|
16727
|
-
return /* @__PURE__ */ j.createElement(h,
|
|
16730
|
+
return /* @__PURE__ */ j.createElement(h, ua({}, m, {
|
|
16728
16731
|
ref: n,
|
|
16729
16732
|
value: Do(p, a, s, c),
|
|
16730
16733
|
onChange: v,
|
|
@@ -16748,7 +16751,7 @@ function Ym(e) {
|
|
|
16748
16751
|
}
|
|
16749
16752
|
var Zm = Ym();
|
|
16750
16753
|
function Do(e, t, r, n) {
|
|
16751
|
-
return
|
|
16754
|
+
return la(Rm(e + t, r, n), e);
|
|
16752
16755
|
}
|
|
16753
16756
|
function Xm(e) {
|
|
16754
16757
|
return Ro(e[0]) + Ro(e[1]);
|
|
@@ -16905,14 +16908,14 @@ var oh = [
|
|
|
16905
16908
|
"flags",
|
|
16906
16909
|
"flagUrl"
|
|
16907
16910
|
];
|
|
16908
|
-
function
|
|
16909
|
-
return
|
|
16911
|
+
function fa() {
|
|
16912
|
+
return fa = Object.assign ? Object.assign.bind() : function(e) {
|
|
16910
16913
|
for (var t = 1; t < arguments.length; t++) {
|
|
16911
16914
|
var r = arguments[t];
|
|
16912
16915
|
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
16913
16916
|
}
|
|
16914
16917
|
return e;
|
|
16915
|
-
},
|
|
16918
|
+
}, fa.apply(this, arguments);
|
|
16916
16919
|
}
|
|
16917
16920
|
function sh(e, t) {
|
|
16918
16921
|
if (e == null) return {};
|
|
@@ -16931,15 +16934,15 @@ function dh(e, t) {
|
|
|
16931
16934
|
a = n[i], !(t.indexOf(a) >= 0) && (r[a] = e[a]);
|
|
16932
16935
|
return r;
|
|
16933
16936
|
}
|
|
16934
|
-
function
|
|
16937
|
+
function Ba(e) {
|
|
16935
16938
|
var t = e.country, r = e.countryName, n = e.flags, a = e.flagUrl, i = sh(e, oh);
|
|
16936
|
-
return n && n[t] ? n[t]({ title: r }) : /* @__PURE__ */ j.createElement("img",
|
|
16939
|
+
return n && n[t] ? n[t]({ title: r }) : /* @__PURE__ */ j.createElement("img", fa({}, i, {
|
|
16937
16940
|
alt: r,
|
|
16938
16941
|
role: r ? void 0 : "presentation",
|
|
16939
16942
|
src: a.replace("{XX}", t).replace("{xx}", t.toLowerCase())
|
|
16940
16943
|
}));
|
|
16941
16944
|
}
|
|
16942
|
-
|
|
16945
|
+
Ba.propTypes = {
|
|
16943
16946
|
country: _.default.string.isRequired,
|
|
16944
16947
|
countryName: _.default.string.isRequired,
|
|
16945
16948
|
flags: _.default.objectOf(_.default.elementType),
|
|
@@ -16955,7 +16958,7 @@ function Rr() {
|
|
|
16955
16958
|
return e;
|
|
16956
16959
|
}, Rr.apply(this, arguments);
|
|
16957
16960
|
}
|
|
16958
|
-
function
|
|
16961
|
+
function Ua(e, t) {
|
|
16959
16962
|
if (e == null) return {};
|
|
16960
16963
|
var r = fh(e, t), n, a;
|
|
16961
16964
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -16973,7 +16976,7 @@ function fh(e, t) {
|
|
|
16973
16976
|
return r;
|
|
16974
16977
|
}
|
|
16975
16978
|
function dn(e) {
|
|
16976
|
-
var t = e.aspectRatio, r =
|
|
16979
|
+
var t = e.aspectRatio, r = Ua(e, lh);
|
|
16977
16980
|
return t === 1 ? /* @__PURE__ */ j.createElement(Fd, r) : /* @__PURE__ */ j.createElement(Rd, r);
|
|
16978
16981
|
}
|
|
16979
16982
|
dn.propTypes = {
|
|
@@ -16981,7 +16984,7 @@ dn.propTypes = {
|
|
|
16981
16984
|
aspectRatio: _.default.number
|
|
16982
16985
|
};
|
|
16983
16986
|
function Rd(e) {
|
|
16984
|
-
var t = e.title, r =
|
|
16987
|
+
var t = e.title, r = Ua(e, ch);
|
|
16985
16988
|
return /* @__PURE__ */ j.createElement("svg", Rr({}, r, {
|
|
16986
16989
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16987
16990
|
viewBox: "0 0 75 50"
|
|
@@ -17019,7 +17022,7 @@ function Rd(e) {
|
|
|
17019
17022
|
}
|
|
17020
17023
|
Rd.propTypes = { title: _.default.string.isRequired };
|
|
17021
17024
|
function Fd(e) {
|
|
17022
|
-
var t = e.title, r =
|
|
17025
|
+
var t = e.title, r = Ua(e, uh);
|
|
17023
17026
|
return /* @__PURE__ */ j.createElement("svg", Rr({}, r, {
|
|
17024
17027
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17025
17028
|
viewBox: "0 0 50 50"
|
|
@@ -17133,14 +17136,14 @@ var bh = [
|
|
|
17133
17136
|
"label",
|
|
17134
17137
|
"aspectRatio"
|
|
17135
17138
|
];
|
|
17136
|
-
function
|
|
17137
|
-
return
|
|
17139
|
+
function pa() {
|
|
17140
|
+
return pa = Object.assign ? Object.assign.bind() : function(e) {
|
|
17138
17141
|
for (var t = 1; t < arguments.length; t++) {
|
|
17139
17142
|
var r = arguments[t];
|
|
17140
17143
|
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
17141
17144
|
}
|
|
17142
17145
|
return e;
|
|
17143
|
-
},
|
|
17146
|
+
}, pa.apply(this, arguments);
|
|
17144
17147
|
}
|
|
17145
17148
|
function $h(e, t) {
|
|
17146
17149
|
if (e == null) return {};
|
|
@@ -17163,7 +17166,7 @@ function Bd(e) {
|
|
|
17163
17166
|
var t = e.flags, r = e.flagUrl, n = e.flagComponent, a = e.internationalIcon;
|
|
17164
17167
|
function i(o) {
|
|
17165
17168
|
var s = o.country, d = o.label, l = o.aspectRatio, c = $h(o, bh), f = a === dn ? l : void 0;
|
|
17166
|
-
return /* @__PURE__ */ j.createElement("div",
|
|
17169
|
+
return /* @__PURE__ */ j.createElement("div", pa({}, c, { className: (0, kr.default)("PhoneInputCountryIcon", {
|
|
17167
17170
|
"PhoneInputCountryIcon--square": f === 1,
|
|
17168
17171
|
"PhoneInputCountryIcon--border": s
|
|
17169
17172
|
}) }), s ? /* @__PURE__ */ j.createElement(n, {
|
|
@@ -17184,9 +17187,9 @@ function Bd(e) {
|
|
|
17184
17187
|
aspectRatio: _.default.number
|
|
17185
17188
|
}, i;
|
|
17186
17189
|
}
|
|
17187
|
-
var
|
|
17190
|
+
var Fv = Bd({
|
|
17188
17191
|
flagUrl: "https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",
|
|
17189
|
-
flagComponent:
|
|
17192
|
+
flagComponent: Ba,
|
|
17190
17193
|
internationalIcon: dn
|
|
17191
17194
|
});
|
|
17192
17195
|
function Nh(e, t) {
|
|
@@ -17637,12 +17640,12 @@ function qh(e, t) {
|
|
|
17637
17640
|
value: e,
|
|
17638
17641
|
writable: !0,
|
|
17639
17642
|
configurable: !0
|
|
17640
|
-
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t &&
|
|
17643
|
+
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t && ma(e, t);
|
|
17641
17644
|
}
|
|
17642
|
-
function
|
|
17643
|
-
return
|
|
17645
|
+
function ma(e, t) {
|
|
17646
|
+
return ma = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, a) {
|
|
17644
17647
|
return n.__proto__ = a, n;
|
|
17645
|
-
},
|
|
17648
|
+
}, ma(e, t);
|
|
17646
17649
|
}
|
|
17647
17650
|
function Ae(e, t, r) {
|
|
17648
17651
|
return t = Yd(t), t in e ? Object.defineProperty(e, t, {
|
|
@@ -17920,7 +17923,7 @@ Zd.propTypes = {
|
|
|
17920
17923
|
var Wo = {
|
|
17921
17924
|
autoComplete: "tel",
|
|
17922
17925
|
countrySelectComponent: kd,
|
|
17923
|
-
flagComponent:
|
|
17926
|
+
flagComponent: Ba,
|
|
17924
17927
|
flagUrl: "https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",
|
|
17925
17928
|
internationalIcon: dn,
|
|
17926
17929
|
inputComponent: "input",
|
|
@@ -18204,14 +18207,14 @@ var Jh = {
|
|
|
18204
18207
|
ZW: "Zimbabwe",
|
|
18205
18208
|
ZZ: "International"
|
|
18206
18209
|
}, Qh = ["metadata", "labels"];
|
|
18207
|
-
function
|
|
18208
|
-
return
|
|
18210
|
+
function ha() {
|
|
18211
|
+
return ha = Object.assign ? Object.assign.bind() : function(e) {
|
|
18209
18212
|
for (var t = 1; t < arguments.length; t++) {
|
|
18210
18213
|
var r = arguments[t];
|
|
18211
18214
|
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
18212
18215
|
}
|
|
18213
18216
|
return e;
|
|
18214
|
-
},
|
|
18217
|
+
}, ha.apply(this, arguments);
|
|
18215
18218
|
}
|
|
18216
18219
|
function ev(e, t) {
|
|
18217
18220
|
if (e == null) return {};
|
|
@@ -18233,7 +18236,7 @@ function tv(e, t) {
|
|
|
18233
18236
|
function Xd(e) {
|
|
18234
18237
|
var t = /* @__PURE__ */ j.forwardRef(function(r, n) {
|
|
18235
18238
|
var a = r.metadata, i = a === void 0 ? e : a, o = r.labels, s = o === void 0 ? Jh : o, d = ev(r, Qh);
|
|
18236
|
-
return /* @__PURE__ */ j.createElement(Zd,
|
|
18239
|
+
return /* @__PURE__ */ j.createElement(Zd, ha({}, d, {
|
|
18237
18240
|
ref: n,
|
|
18238
18241
|
metadata: i,
|
|
18239
18242
|
labels: s
|
|
@@ -18244,13 +18247,13 @@ function Xd(e) {
|
|
|
18244
18247
|
labels: Vd
|
|
18245
18248
|
}, t;
|
|
18246
18249
|
}
|
|
18247
|
-
var
|
|
18250
|
+
var jv = Xd();
|
|
18248
18251
|
function rv(e, t) {
|
|
18249
18252
|
var r = Array.prototype.slice.call(t);
|
|
18250
18253
|
return r.push(ld), e.apply(this, r);
|
|
18251
18254
|
}
|
|
18252
18255
|
var nv = Xd(ld);
|
|
18253
|
-
function
|
|
18256
|
+
function Dn() {
|
|
18254
18257
|
return rv(w2, arguments);
|
|
18255
18258
|
}
|
|
18256
18259
|
var av = [
|
|
@@ -18279,7 +18282,7 @@ var av = [
|
|
|
18279
18282
|
return +`${t}${r}`;
|
|
18280
18283
|
};
|
|
18281
18284
|
function dv() {
|
|
18282
|
-
const e = ze(), { tenantId: t, id: r } = J((w) => w.barber.outletDetails), { timeZone: n, image: a, outletName: i, address: o } = J((w) => w.barber.outletDetails), { staff: s, selectedServices: d, selectedProfessional: l } = J((w) => w.barber.service), { selectedSlotIds: c, selectedDate: f, selectedTime: h } = J((w) => w.barber.slots), { userDetails: m, bookingMode: p, tipPct: v } = J((w) => w.barber.appointment), b = Array.isArray(d) ? d : [d], { selectedSlotIndexes: $, slots: y } = J((w) => w.barber.slots), [S, P] = Z(!1), [O, N] = Z(!1), [T, D] = Z(null), [H, X] = Z("person"), [ae, ce] = Z(!1), [ue, ye] = Z(""), [Ce, me] = Z(""), [fe, se] = Z(null), [Q, he] = Z(null), [x, C] = Z({}), [E, k] = Z({}), [U, R] = Z(!1), q = De(!1), V = De(""), G = ve.now().setZone(n ?? "UTC"), [z, W] = Z(null), [K, A] = Z(!1), M = De(""), F = De(null), { register: pe, handleSubmit: He, control: Nt, watch: Ht, reset: cn, trigger:
|
|
18285
|
+
const e = ze(), { tenantId: t, id: r } = J((w) => w.barber.outletDetails), { timeZone: n, image: a, outletName: i, address: o } = J((w) => w.barber.outletDetails), { staff: s, selectedServices: d, selectedProfessional: l } = J((w) => w.barber.service), { selectedSlotIds: c, selectedDate: f, selectedTime: h } = J((w) => w.barber.slots), { userDetails: m, bookingMode: p, tipPct: v } = J((w) => w.barber.appointment), b = Array.isArray(d) ? d : [d], { selectedSlotIndexes: $, slots: y } = J((w) => w.barber.slots), [S, P] = Z(!1), [O, N] = Z(!1), [T, D] = Z(null), [H, X] = Z("person"), [ae, ce] = Z(!1), [ue, ye] = Z(""), [Ce, me] = Z(""), [fe, se] = Z(null), [Q, he] = Z(null), [x, C] = Z({}), [E, k] = Z({}), [U, R] = Z(!1), q = De(!1), V = De(""), G = ve.now().setZone(n ?? "UTC"), [z, W] = Z(null), [K, A] = Z(!1), M = De(""), F = De(null), { register: pe, handleSubmit: He, control: Nt, watch: Ht, reset: cn, trigger: Va, setValue: Ct, formState: { errors: qe, isSubmitted: Ga, isSubmitting: Jd } } = va({
|
|
18283
18286
|
defaultValues: {
|
|
18284
18287
|
firstName: m?.firstName || "",
|
|
18285
18288
|
lastName: m?.lastName || "",
|
|
@@ -18306,19 +18309,21 @@ function dv() {
|
|
|
18306
18309
|
...y?.evening ?? []
|
|
18307
18310
|
], el = mn.reduce((w, I) => w + Number(I.duration ?? 0), 0), tl = Math.ceil(el / iv), rl = (w) => {
|
|
18308
18311
|
if (!hn.length) return "";
|
|
18309
|
-
const I = hn[w]?.
|
|
18310
|
-
return !I || !L ? "" : `${I} - ${L.
|
|
18311
|
-
},
|
|
18312
|
+
const I = hn[w]?.start_time_12h, L = hn[w + tl - 1];
|
|
18313
|
+
return !I || !L ? "" : `${I} - ${L.end_time_12h ?? L.start_time_12h}`;
|
|
18314
|
+
}, za = {
|
|
18312
18315
|
day: Number(f?.day ?? G.day),
|
|
18313
18316
|
month: Number(f?.month ?? G.month),
|
|
18314
18317
|
year: Number(f?.year ?? G.year)
|
|
18315
|
-
},
|
|
18318
|
+
}, vn = $?.[0];
|
|
18319
|
+
console.log("------selectedStartIndex---", vn);
|
|
18320
|
+
const Wa = vn !== void 0 ? rl(vn) : null, nl = Wa ? `${av[za.month - 1]} ${za.day} at ${Wa}` : null, yn = mn.reduce((w, I) => w + Number(I.price) * (I.qty ?? 1), 0), Ha = mn.reduce((w, I) => w + I.tax, 0), al = Math.round(Ha * 100), qa = yn * v / 100, il = Math.round(qa * 100), Ka = yn + qa + Ha, Ie = ge(() => b.filter((w) => !(!Ys(w) || (w?.consent_rule?.enforcementMode ?? w?.enforcementMode) === "FIXED")), [b]), ol = ge(() => Ie.map((w) => String(w.id)).filter(Boolean), [Ie]), sl = (w) => {
|
|
18316
18321
|
const I = w?.consent_template ?? w?.consentTemplate ?? null;
|
|
18317
18322
|
return {
|
|
18318
18323
|
heading: String(I?.heading ?? "").trim(),
|
|
18319
18324
|
consent: String(I?.consent ?? "").trim()
|
|
18320
18325
|
};
|
|
18321
|
-
},
|
|
18326
|
+
}, bn = (w) => {
|
|
18322
18327
|
C((I) => ({
|
|
18323
18328
|
...I,
|
|
18324
18329
|
[String(w)]: !0
|
|
@@ -18335,18 +18340,18 @@ function dv() {
|
|
|
18335
18340
|
keepDirty: !1
|
|
18336
18341
|
});
|
|
18337
18342
|
}, [m, cn]), de(() => {
|
|
18338
|
-
|
|
18343
|
+
Ga && Va(["phone", "email"]);
|
|
18339
18344
|
}, [
|
|
18340
18345
|
un,
|
|
18341
18346
|
fn,
|
|
18342
|
-
|
|
18343
|
-
|
|
18347
|
+
Ga,
|
|
18348
|
+
Va
|
|
18344
18349
|
]);
|
|
18345
18350
|
const Ya = Ue(async ({ value: w, type: I }) => {
|
|
18346
18351
|
if (!w) return;
|
|
18347
18352
|
let L = "";
|
|
18348
18353
|
if (I === "phone") {
|
|
18349
|
-
if (!
|
|
18354
|
+
if (!Dn(w)) return;
|
|
18350
18355
|
L = pn(w);
|
|
18351
18356
|
}
|
|
18352
18357
|
if (I === "email") {
|
|
@@ -18360,7 +18365,7 @@ function dv() {
|
|
|
18360
18365
|
search: L,
|
|
18361
18366
|
tenantId: t
|
|
18362
18367
|
}))?.data?.[0];
|
|
18363
|
-
B ? (Ct("firstName", B.first_name || "", { shouldValidate: !0 }), Ct("lastName", B.last_name || ""), B.phone &&
|
|
18368
|
+
B ? (Ct("firstName", B.first_name || "", { shouldValidate: !0 }), Ct("lastName", B.last_name || ""), B.phone && Dn(B.phone) && Ct("phone", B.phone), B.email && Ct("email", B.email), e(_n({
|
|
18364
18369
|
email: B.email,
|
|
18365
18370
|
firstName: B.first_name,
|
|
18366
18371
|
lastName: B.last_name,
|
|
@@ -18418,7 +18423,7 @@ function dv() {
|
|
|
18418
18423
|
I[B] = { data: {
|
|
18419
18424
|
checked: !0,
|
|
18420
18425
|
needsSignature: Oe
|
|
18421
|
-
} }, Oe ||
|
|
18426
|
+
} }, Oe || bn(B);
|
|
18422
18427
|
}
|
|
18423
18428
|
k(I);
|
|
18424
18429
|
} catch (I) {
|
|
@@ -18427,7 +18432,7 @@ function dv() {
|
|
|
18427
18432
|
R(!1);
|
|
18428
18433
|
}
|
|
18429
18434
|
}
|
|
18430
|
-
},
|
|
18435
|
+
}, $n = ge(() => Ie.filter((w) => {
|
|
18431
18436
|
const I = String(w.id);
|
|
18432
18437
|
if (x[I]) return !1;
|
|
18433
18438
|
const L = E[I];
|
|
@@ -18436,7 +18441,7 @@ function dv() {
|
|
|
18436
18441
|
Ie,
|
|
18437
18442
|
x,
|
|
18438
18443
|
E
|
|
18439
|
-
]), Xa = ol.length, Ja = Xa -
|
|
18444
|
+
]), Xa = ol.length, Ja = Xa - $n.length, Qa = $n.length === 0, ei = async () => {
|
|
18440
18445
|
if (!q.current) {
|
|
18441
18446
|
q.current = !0;
|
|
18442
18447
|
try {
|
|
@@ -18448,9 +18453,9 @@ function dv() {
|
|
|
18448
18453
|
re.warn("Please enter Email or Mobile Number before signing consent.");
|
|
18449
18454
|
return;
|
|
18450
18455
|
}
|
|
18451
|
-
const w =
|
|
18456
|
+
const w = $n[0];
|
|
18452
18457
|
if (!w) {
|
|
18453
|
-
await
|
|
18458
|
+
await gn();
|
|
18454
18459
|
return;
|
|
18455
18460
|
}
|
|
18456
18461
|
const I = String(w.id);
|
|
@@ -18476,7 +18481,7 @@ function dv() {
|
|
|
18476
18481
|
needsSignature: Re
|
|
18477
18482
|
} }
|
|
18478
18483
|
})), !Re) {
|
|
18479
|
-
|
|
18484
|
+
bn(I), re.success("Consent already signed for this service."), setTimeout(() => ei(), 250);
|
|
18480
18485
|
return;
|
|
18481
18486
|
}
|
|
18482
18487
|
} else k((Oe) => ({
|
|
@@ -18530,7 +18535,7 @@ function dv() {
|
|
|
18530
18535
|
isChecked: w?.accepted,
|
|
18531
18536
|
signatureDataUrl: w?.signatureDataUrl,
|
|
18532
18537
|
emailMe: w?.emailMe
|
|
18533
|
-
}),
|
|
18538
|
+
}), bn(I), ce(!1), V.current = "", re.success("Consent captured.");
|
|
18534
18539
|
}, pl = () => {
|
|
18535
18540
|
ce(!1), he(null);
|
|
18536
18541
|
}, ml = async (w, I, L) => {
|
|
@@ -18558,7 +18563,7 @@ function dv() {
|
|
|
18558
18563
|
};
|
|
18559
18564
|
let ti = "";
|
|
18560
18565
|
f && (ti = `${f?.year}-${String(f?.month).padStart(2, "0")}-${String(f?.day).padStart(2, "0")}`);
|
|
18561
|
-
const
|
|
18566
|
+
const gn = async (w) => {
|
|
18562
18567
|
const I = w || m, L = {
|
|
18563
18568
|
tenantId: t,
|
|
18564
18569
|
outletId: r,
|
|
@@ -18606,7 +18611,7 @@ function dv() {
|
|
|
18606
18611
|
re.error("Select time");
|
|
18607
18612
|
return;
|
|
18608
18613
|
}
|
|
18609
|
-
e(
|
|
18614
|
+
e(_n(I)), Ie.length > 0 ? Qa ? await gn(I) : await ei() : await gn(I);
|
|
18610
18615
|
}, vl = async (w) => {
|
|
18611
18616
|
const I = {
|
|
18612
18617
|
...w,
|
|
@@ -18620,7 +18625,7 @@ function dv() {
|
|
|
18620
18625
|
re.error("Select time");
|
|
18621
18626
|
return;
|
|
18622
18627
|
}
|
|
18623
|
-
e(
|
|
18628
|
+
e(_n(I)), e(tt(!0));
|
|
18624
18629
|
}, yl = (w) => {
|
|
18625
18630
|
const I = w.replace(/\s/g, "");
|
|
18626
18631
|
return /^4/.test(I) ? "VISA" : /^5[1-5]/.test(I) ? "MASTERCARD" : /^3[47]/.test(I) ? "AMEX" : /^6/.test(I) ? "DISCOVER" : "UNKNOWN";
|
|
@@ -18677,10 +18682,10 @@ function dv() {
|
|
|
18677
18682
|
}, $l = () => {
|
|
18678
18683
|
N(!1), re.warning("Appointment booked. Payment was cancelled."), e(Jt(String(T?.appointmentId))), e(Be());
|
|
18679
18684
|
};
|
|
18680
|
-
return /* @__PURE__ */ g(
|
|
18685
|
+
return /* @__PURE__ */ g(xa, {
|
|
18681
18686
|
sidebar: /* @__PURE__ */ u("div", {
|
|
18682
18687
|
className: "aaravpos-barber-aside",
|
|
18683
|
-
children: /* @__PURE__ */ u(
|
|
18688
|
+
children: /* @__PURE__ */ u(Ma, {
|
|
18684
18689
|
buttonText: "Book Appointment",
|
|
18685
18690
|
onButtonClick: He(hl),
|
|
18686
18691
|
showTip: H === "card",
|
|
@@ -18694,7 +18699,7 @@ function dv() {
|
|
|
18694
18699
|
})
|
|
18695
18700
|
}),
|
|
18696
18701
|
children: [
|
|
18697
|
-
/* @__PURE__ */ g($e, { children: [/* @__PURE__ */ u(
|
|
18702
|
+
/* @__PURE__ */ g($e, { children: [/* @__PURE__ */ u(Aa, {}), /* @__PURE__ */ g("div", {
|
|
18698
18703
|
className: "aaravpos-barber-margin-top-20",
|
|
18699
18704
|
children: [
|
|
18700
18705
|
/* @__PURE__ */ u("h1", {
|
|
@@ -18748,7 +18753,7 @@ function dv() {
|
|
|
18748
18753
|
}),
|
|
18749
18754
|
/* @__PURE__ */ g("span", {
|
|
18750
18755
|
className: "aaravpos-barber-appointment-price",
|
|
18751
|
-
children: [/* @__PURE__ */ u(Se, { size: 14 }),
|
|
18756
|
+
children: [/* @__PURE__ */ u(Se, { size: 14 }), yn]
|
|
18752
18757
|
})
|
|
18753
18758
|
]
|
|
18754
18759
|
}), /* @__PURE__ */ g("div", {
|
|
@@ -18796,7 +18801,7 @@ function dv() {
|
|
|
18796
18801
|
name: "phone",
|
|
18797
18802
|
rules: { validate: (w) => {
|
|
18798
18803
|
const I = pn(w), L = !!I, B = !!fn?.trim();
|
|
18799
|
-
return !L && !B ? "Enter phone or email" : L && I.length < 8 ? "Phone number must be minimum 8 digits" : L && I.length > 16 ? "Phone number must be maximum 16 digits" : L && !
|
|
18804
|
+
return !L && !B ? "Enter phone or email" : L && I.length < 8 ? "Phone number must be minimum 8 digits" : L && I.length > 16 ? "Phone number must be maximum 16 digits" : L && !Dn(w) ? "Enter valid phone number" : !0;
|
|
18800
18805
|
} },
|
|
18801
18806
|
render: ({ field: w }) => /* @__PURE__ */ g("div", {
|
|
18802
18807
|
className: "aaravpos-barber-input-wrapper",
|
|
@@ -19035,7 +19040,7 @@ function uv({ icon: e, label: t, selected: r, onClick: n }) {
|
|
|
19035
19040
|
children: "Payment will be collected at the outlet during your appointment."
|
|
19036
19041
|
})] }), r && /* @__PURE__ */ u("div", {
|
|
19037
19042
|
className: "aaravpos-barber-paymentcard-check",
|
|
19038
|
-
children: /* @__PURE__ */ u(
|
|
19043
|
+
children: /* @__PURE__ */ u(Ta, { size: 18 })
|
|
19039
19044
|
})]
|
|
19040
19045
|
})
|
|
19041
19046
|
})]
|
|
@@ -19063,7 +19068,7 @@ function fv() {
|
|
|
19063
19068
|
})();
|
|
19064
19069
|
}, [t]);
|
|
19065
19070
|
const f = () => {
|
|
19066
|
-
|
|
19071
|
+
Ia.purge(), e({ type: "RESET_ALL" });
|
|
19067
19072
|
};
|
|
19068
19073
|
if (i) return /* @__PURE__ */ u("div", {
|
|
19069
19074
|
className: "aaravpos-barber-loading-container",
|
|
@@ -19091,7 +19096,7 @@ function fv() {
|
|
|
19091
19096
|
children: [
|
|
19092
19097
|
/* @__PURE__ */ u("div", {
|
|
19093
19098
|
className: "aaravpos-barber-success-icon success-pulse",
|
|
19094
|
-
children: /* @__PURE__ */ u(
|
|
19099
|
+
children: /* @__PURE__ */ u(Ta, {})
|
|
19095
19100
|
}),
|
|
19096
19101
|
/* @__PURE__ */ u("h1", {
|
|
19097
19102
|
className: "aaravpos-barber-success-title",
|
|
@@ -19179,7 +19184,7 @@ function fv() {
|
|
|
19179
19184
|
n.appointmentDate,
|
|
19180
19185
|
" at",
|
|
19181
19186
|
" ",
|
|
19182
|
-
n.
|
|
19187
|
+
n.start_time_12h
|
|
19183
19188
|
]
|
|
19184
19189
|
})]
|
|
19185
19190
|
}),
|
|
@@ -19314,7 +19319,7 @@ var yv = ({ bookingCode: e }) => {
|
|
|
19314
19319
|
className: "aaravpos-barber-overflow-hidden",
|
|
19315
19320
|
children: /* @__PURE__ */ u(mv, {})
|
|
19316
19321
|
});
|
|
19317
|
-
},
|
|
19322
|
+
}, Lv = ({ ...e }) => /* @__PURE__ */ u(lf, { children: /* @__PURE__ */ u(yv, { ...e }) });
|
|
19318
19323
|
export {
|
|
19319
|
-
|
|
19324
|
+
Lv as AppointmentBarberBooking
|
|
19320
19325
|
};
|