@asafarim/booking-calendar 0.2.1 → 0.4.1
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/README.md +188 -135
- package/dist/JumpToDateModal.d.ts +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +696 -577
- package/dist/style.css +1 -0
- package/package.json +12 -7
- package/LICENSE +0 -23
- package/dist/index.css +0 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { startOfMonth as
|
|
3
|
-
var
|
|
1
|
+
import Ze, { useState as _, useEffect as Te, useRef as Xe, useCallback as he } from "react";
|
|
2
|
+
import { startOfMonth as ke, endOfMonth as Re, startOfWeek as ne, endOfWeek as _e, eachDayOfInterval as Qe, isSameMonth as et, isToday as ae, format as H, isSameDay as Q, startOfDay as Dt, differenceInMinutes as ze, addDays as Oe, addMinutes as tt } from "date-fns";
|
|
3
|
+
var De = { exports: {} }, te = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.min.js
|
|
@@ -10,21 +10,21 @@ var ve = { exports: {} }, Z = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var a =
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
S !== void 0 && (
|
|
21
|
-
for (
|
|
22
|
-
if (
|
|
23
|
-
return { $$typeof:
|
|
13
|
+
var Ke;
|
|
14
|
+
function kt() {
|
|
15
|
+
if (Ke) return te;
|
|
16
|
+
Ke = 1;
|
|
17
|
+
var a = Ze, y = Symbol.for("react.element"), E = Symbol.for("react.fragment"), w = Object.prototype.hasOwnProperty, p = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function o(f, c, S) {
|
|
19
|
+
var v, C = {}, j = null, d = null;
|
|
20
|
+
S !== void 0 && (j = "" + S), c.key !== void 0 && (j = "" + c.key), c.ref !== void 0 && (d = c.ref);
|
|
21
|
+
for (v in c) w.call(c, v) && !m.hasOwnProperty(v) && (C[v] = c[v]);
|
|
22
|
+
if (f && f.defaultProps) for (v in c = f.defaultProps, c) C[v] === void 0 && (C[v] = c[v]);
|
|
23
|
+
return { $$typeof: y, type: f, key: j, ref: d, props: C, _owner: p.current };
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return te.Fragment = E, te.jsx = o, te.jsxs = o, te;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
27
|
+
var re = {};
|
|
28
28
|
/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-jsx-runtime.development.js
|
|
@@ -34,91 +34,91 @@ var Q = {};
|
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
var
|
|
38
|
-
function
|
|
39
|
-
return
|
|
40
|
-
var a =
|
|
37
|
+
var Ge;
|
|
38
|
+
function Rt() {
|
|
39
|
+
return Ge || (Ge = 1, process.env.NODE_ENV !== "production" && function() {
|
|
40
|
+
var a = Ze, y = Symbol.for("react.element"), E = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), f = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), d = Symbol.for("react.offscreen"), i = Symbol.iterator, b = "@@iterator";
|
|
41
41
|
function O(e) {
|
|
42
42
|
if (e === null || typeof e != "object")
|
|
43
43
|
return null;
|
|
44
|
-
var r =
|
|
44
|
+
var r = i && e[i] || e[b];
|
|
45
45
|
return typeof r == "function" ? r : null;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
function
|
|
47
|
+
var k = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
+
function s(e) {
|
|
49
49
|
{
|
|
50
|
-
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0),
|
|
51
|
-
n[
|
|
52
|
-
|
|
50
|
+
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++)
|
|
51
|
+
n[u - 1] = arguments[u];
|
|
52
|
+
T("error", e, n);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function T(e, r, n) {
|
|
56
56
|
{
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
var
|
|
60
|
-
return String(
|
|
57
|
+
var u = k.ReactDebugCurrentFrame, N = u.getStackAddendum();
|
|
58
|
+
N !== "" && (r += "%s", n = n.concat([N]));
|
|
59
|
+
var D = n.map(function(x) {
|
|
60
|
+
return String(x);
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
D.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, D);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
function
|
|
68
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
65
|
+
var A = !1, Y = !1, V = !1, B = !1, L = !1, q;
|
|
66
|
+
q = Symbol.for("react.module.reference");
|
|
67
|
+
function z(e) {
|
|
68
|
+
return !!(typeof e == "string" || typeof e == "function" || e === w || e === m || L || e === p || e === S || e === v || B || e === d || A || Y || V || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === C || e.$$typeof === o || e.$$typeof === f || e.$$typeof === c || // This needs to include all possible module reference object
|
|
69
69
|
// types supported by any Flight configuration anywhere since
|
|
70
70
|
// we don't know which Flight build this will end up being used
|
|
71
71
|
// with.
|
|
72
|
-
e.$$typeof ===
|
|
72
|
+
e.$$typeof === q || e.getModuleId !== void 0));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
var
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
78
|
-
var
|
|
79
|
-
return
|
|
74
|
+
function h(e, r, n) {
|
|
75
|
+
var u = e.displayName;
|
|
76
|
+
if (u)
|
|
77
|
+
return u;
|
|
78
|
+
var N = r.displayName || r.name || "";
|
|
79
|
+
return N !== "" ? n + "(" + N + ")" : n;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function K(e) {
|
|
82
82
|
return e.displayName || "Context";
|
|
83
83
|
}
|
|
84
84
|
function $(e) {
|
|
85
85
|
if (e == null)
|
|
86
86
|
return null;
|
|
87
|
-
if (typeof e.tag == "number" &&
|
|
87
|
+
if (typeof e.tag == "number" && s("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
88
88
|
return e.displayName || e.name || null;
|
|
89
89
|
if (typeof e == "string")
|
|
90
90
|
return e;
|
|
91
91
|
switch (e) {
|
|
92
|
-
case
|
|
92
|
+
case w:
|
|
93
93
|
return "Fragment";
|
|
94
|
-
case
|
|
94
|
+
case E:
|
|
95
95
|
return "Portal";
|
|
96
|
-
case
|
|
96
|
+
case m:
|
|
97
97
|
return "Profiler";
|
|
98
|
-
case
|
|
98
|
+
case p:
|
|
99
99
|
return "StrictMode";
|
|
100
100
|
case S:
|
|
101
101
|
return "Suspense";
|
|
102
|
-
case
|
|
102
|
+
case v:
|
|
103
103
|
return "SuspenseList";
|
|
104
104
|
}
|
|
105
105
|
if (typeof e == "object")
|
|
106
106
|
switch (e.$$typeof) {
|
|
107
|
-
case
|
|
107
|
+
case f:
|
|
108
108
|
var r = e;
|
|
109
|
-
return
|
|
110
|
-
case
|
|
109
|
+
return K(r) + ".Consumer";
|
|
110
|
+
case o:
|
|
111
111
|
var n = e;
|
|
112
|
-
return
|
|
113
|
-
case
|
|
114
|
-
return
|
|
115
|
-
case
|
|
116
|
-
var
|
|
117
|
-
return
|
|
118
|
-
case
|
|
119
|
-
var
|
|
112
|
+
return K(n._context) + ".Provider";
|
|
113
|
+
case c:
|
|
114
|
+
return h(e, e.render, "ForwardRef");
|
|
115
|
+
case C:
|
|
116
|
+
var u = e.displayName || null;
|
|
117
|
+
return u !== null ? u : $(e.type) || "Memo";
|
|
118
|
+
case j: {
|
|
119
|
+
var N = e, D = N._payload, x = N._init;
|
|
120
120
|
try {
|
|
121
|
-
return $(
|
|
121
|
+
return $(x(D));
|
|
122
122
|
} catch {
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
@@ -126,18 +126,18 @@ function _t() {
|
|
|
126
126
|
}
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
var F = Object.assign,
|
|
130
|
-
function
|
|
129
|
+
var F = Object.assign, J = 0, se, ie, oe, ce, l, U, le;
|
|
130
|
+
function ue() {
|
|
131
131
|
}
|
|
132
|
-
|
|
132
|
+
ue.__reactDisabledLog = !0;
|
|
133
133
|
function be() {
|
|
134
134
|
{
|
|
135
|
-
if (
|
|
136
|
-
|
|
135
|
+
if (J === 0) {
|
|
136
|
+
se = console.log, ie = console.info, oe = console.warn, ce = console.error, l = console.group, U = console.groupCollapsed, le = console.groupEnd;
|
|
137
137
|
var e = {
|
|
138
138
|
configurable: !0,
|
|
139
139
|
enumerable: !0,
|
|
140
|
-
value:
|
|
140
|
+
value: ue,
|
|
141
141
|
writable: !0
|
|
142
142
|
};
|
|
143
143
|
Object.defineProperties(console, {
|
|
@@ -150,12 +150,12 @@ function _t() {
|
|
|
150
150
|
groupEnd: e
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
J++;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function ge() {
|
|
157
157
|
{
|
|
158
|
-
if (
|
|
158
|
+
if (J--, J === 0) {
|
|
159
159
|
var e = {
|
|
160
160
|
configurable: !0,
|
|
161
161
|
enumerable: !0,
|
|
@@ -163,237 +163,237 @@ function _t() {
|
|
|
163
163
|
};
|
|
164
164
|
Object.defineProperties(console, {
|
|
165
165
|
log: F({}, e, {
|
|
166
|
-
value:
|
|
166
|
+
value: se
|
|
167
167
|
}),
|
|
168
168
|
info: F({}, e, {
|
|
169
|
-
value:
|
|
169
|
+
value: ie
|
|
170
170
|
}),
|
|
171
171
|
warn: F({}, e, {
|
|
172
|
-
value:
|
|
172
|
+
value: oe
|
|
173
173
|
}),
|
|
174
174
|
error: F({}, e, {
|
|
175
|
-
value:
|
|
175
|
+
value: ce
|
|
176
176
|
}),
|
|
177
177
|
group: F({}, e, {
|
|
178
|
-
value:
|
|
178
|
+
value: l
|
|
179
179
|
}),
|
|
180
180
|
groupCollapsed: F({}, e, {
|
|
181
|
-
value:
|
|
181
|
+
value: U
|
|
182
182
|
}),
|
|
183
183
|
groupEnd: F({}, e, {
|
|
184
|
-
value:
|
|
184
|
+
value: le
|
|
185
185
|
})
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
J < 0 && s("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
var
|
|
192
|
-
function
|
|
191
|
+
var ye = k.ReactCurrentDispatcher, je;
|
|
192
|
+
function de(e, r, n) {
|
|
193
193
|
{
|
|
194
194
|
if (je === void 0)
|
|
195
195
|
try {
|
|
196
196
|
throw Error();
|
|
197
|
-
} catch (
|
|
198
|
-
var
|
|
199
|
-
je =
|
|
197
|
+
} catch (N) {
|
|
198
|
+
var u = N.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
+
je = u && u[1] || "";
|
|
200
200
|
}
|
|
201
201
|
return `
|
|
202
202
|
` + je + e;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
var
|
|
205
|
+
var xe = !1, fe;
|
|
206
206
|
{
|
|
207
|
-
var
|
|
208
|
-
|
|
207
|
+
var nt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
+
fe = new nt();
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
if (!e ||
|
|
210
|
+
function Pe(e, r) {
|
|
211
|
+
if (!e || xe)
|
|
212
212
|
return "";
|
|
213
213
|
{
|
|
214
|
-
var n =
|
|
214
|
+
var n = fe.get(e);
|
|
215
215
|
if (n !== void 0)
|
|
216
216
|
return n;
|
|
217
217
|
}
|
|
218
|
-
var
|
|
219
|
-
|
|
220
|
-
var
|
|
218
|
+
var u;
|
|
219
|
+
xe = !0;
|
|
220
|
+
var N = Error.prepareStackTrace;
|
|
221
221
|
Error.prepareStackTrace = void 0;
|
|
222
|
-
var
|
|
223
|
-
|
|
222
|
+
var D;
|
|
223
|
+
D = ye.current, ye.current = null, be();
|
|
224
224
|
try {
|
|
225
225
|
if (r) {
|
|
226
|
-
var
|
|
226
|
+
var x = function() {
|
|
227
227
|
throw Error();
|
|
228
228
|
};
|
|
229
|
-
if (Object.defineProperty(
|
|
229
|
+
if (Object.defineProperty(x.prototype, "props", {
|
|
230
230
|
set: function() {
|
|
231
231
|
throw Error();
|
|
232
232
|
}
|
|
233
233
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
234
|
try {
|
|
235
|
-
Reflect.construct(
|
|
236
|
-
} catch (
|
|
237
|
-
|
|
235
|
+
Reflect.construct(x, []);
|
|
236
|
+
} catch (I) {
|
|
237
|
+
u = I;
|
|
238
238
|
}
|
|
239
|
-
Reflect.construct(e, [],
|
|
239
|
+
Reflect.construct(e, [], x);
|
|
240
240
|
} else {
|
|
241
241
|
try {
|
|
242
|
-
|
|
243
|
-
} catch (
|
|
244
|
-
|
|
242
|
+
x.call();
|
|
243
|
+
} catch (I) {
|
|
244
|
+
u = I;
|
|
245
245
|
}
|
|
246
|
-
e.call(
|
|
246
|
+
e.call(x.prototype);
|
|
247
247
|
}
|
|
248
248
|
} else {
|
|
249
249
|
try {
|
|
250
250
|
throw Error();
|
|
251
|
-
} catch (
|
|
252
|
-
|
|
251
|
+
} catch (I) {
|
|
252
|
+
u = I;
|
|
253
253
|
}
|
|
254
254
|
e();
|
|
255
255
|
}
|
|
256
|
-
} catch (
|
|
257
|
-
if (
|
|
258
|
-
for (var
|
|
259
|
-
`), M =
|
|
260
|
-
`),
|
|
261
|
-
|
|
262
|
-
for (;
|
|
263
|
-
if (
|
|
264
|
-
if (
|
|
256
|
+
} catch (I) {
|
|
257
|
+
if (I && u && typeof I.stack == "string") {
|
|
258
|
+
for (var g = I.stack.split(`
|
|
259
|
+
`), M = u.stack.split(`
|
|
260
|
+
`), R = g.length - 1, P = M.length - 1; R >= 1 && P >= 0 && g[R] !== M[P]; )
|
|
261
|
+
P--;
|
|
262
|
+
for (; R >= 1 && P >= 0; R--, P--)
|
|
263
|
+
if (g[R] !== M[P]) {
|
|
264
|
+
if (R !== 1 || P !== 1)
|
|
265
265
|
do
|
|
266
|
-
if (
|
|
267
|
-
var
|
|
268
|
-
` +
|
|
269
|
-
return e.displayName &&
|
|
266
|
+
if (R--, P--, P < 0 || g[R] !== M[P]) {
|
|
267
|
+
var W = `
|
|
268
|
+
` + g[R].replace(" at new ", " at ");
|
|
269
|
+
return e.displayName && W.includes("<anonymous>") && (W = W.replace("<anonymous>", e.displayName)), typeof e == "function" && fe.set(e, W), W;
|
|
270
270
|
}
|
|
271
|
-
while (
|
|
271
|
+
while (R >= 1 && P >= 0);
|
|
272
272
|
break;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
} finally {
|
|
276
|
-
|
|
276
|
+
xe = !1, ye.current = D, ge(), Error.prepareStackTrace = N;
|
|
277
277
|
}
|
|
278
|
-
var
|
|
279
|
-
return typeof e == "function" &&
|
|
278
|
+
var Z = e ? e.displayName || e.name : "", X = Z ? de(Z) : "";
|
|
279
|
+
return typeof e == "function" && fe.set(e, X), X;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
return
|
|
281
|
+
function at(e, r, n) {
|
|
282
|
+
return Pe(e, !1);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function st(e) {
|
|
285
285
|
var r = e.prototype;
|
|
286
286
|
return !!(r && r.isReactComponent);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function me(e, r, n) {
|
|
289
289
|
if (e == null)
|
|
290
290
|
return "";
|
|
291
291
|
if (typeof e == "function")
|
|
292
|
-
return
|
|
292
|
+
return Pe(e, st(e));
|
|
293
293
|
if (typeof e == "string")
|
|
294
|
-
return
|
|
294
|
+
return de(e);
|
|
295
295
|
switch (e) {
|
|
296
296
|
case S:
|
|
297
|
-
return
|
|
298
|
-
case
|
|
299
|
-
return
|
|
297
|
+
return de("Suspense");
|
|
298
|
+
case v:
|
|
299
|
+
return de("SuspenseList");
|
|
300
300
|
}
|
|
301
301
|
if (typeof e == "object")
|
|
302
302
|
switch (e.$$typeof) {
|
|
303
|
-
case
|
|
304
|
-
return
|
|
305
|
-
case
|
|
306
|
-
return
|
|
307
|
-
case
|
|
308
|
-
var
|
|
303
|
+
case c:
|
|
304
|
+
return at(e.render);
|
|
305
|
+
case C:
|
|
306
|
+
return me(e.type, r, n);
|
|
307
|
+
case j: {
|
|
308
|
+
var u = e, N = u._payload, D = u._init;
|
|
309
309
|
try {
|
|
310
|
-
return
|
|
310
|
+
return me(D(N), r, n);
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
return "";
|
|
316
316
|
}
|
|
317
|
-
var
|
|
318
|
-
function
|
|
317
|
+
var ee = Object.prototype.hasOwnProperty, Me = {}, $e = k.ReactDebugCurrentFrame;
|
|
318
|
+
function ve(e) {
|
|
319
319
|
if (e) {
|
|
320
|
-
var r = e._owner, n =
|
|
321
|
-
|
|
320
|
+
var r = e._owner, n = me(e.type, e._source, r ? r.type : null);
|
|
321
|
+
$e.setExtraStackFrame(n);
|
|
322
322
|
} else
|
|
323
|
-
|
|
323
|
+
$e.setExtraStackFrame(null);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function it(e, r, n, u, N) {
|
|
326
326
|
{
|
|
327
|
-
var
|
|
328
|
-
for (var
|
|
329
|
-
if (
|
|
330
|
-
var
|
|
327
|
+
var D = Function.call.bind(ee);
|
|
328
|
+
for (var x in e)
|
|
329
|
+
if (D(e, x)) {
|
|
330
|
+
var g = void 0;
|
|
331
331
|
try {
|
|
332
|
-
if (typeof e[
|
|
333
|
-
var M = Error((
|
|
332
|
+
if (typeof e[x] != "function") {
|
|
333
|
+
var M = Error((u || "React class") + ": " + n + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
334
|
throw M.name = "Invariant Violation", M;
|
|
335
335
|
}
|
|
336
|
-
|
|
337
|
-
} catch (
|
|
338
|
-
|
|
336
|
+
g = e[x](r, x, u, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
|
+
} catch (R) {
|
|
338
|
+
g = R;
|
|
339
339
|
}
|
|
340
|
-
|
|
340
|
+
g && !(g instanceof Error) && (ve(N), s("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", u || "React class", n, x, typeof g), ve(null)), g instanceof Error && !(g.message in Me) && (Me[g.message] = !0, ve(N), s("Failed %s type: %s", n, g.message), ve(null));
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
var
|
|
345
|
-
function
|
|
346
|
-
return
|
|
344
|
+
var ot = Array.isArray;
|
|
345
|
+
function we(e) {
|
|
346
|
+
return ot(e);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function ct(e) {
|
|
349
349
|
{
|
|
350
350
|
var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
351
351
|
return n;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function lt(e) {
|
|
355
355
|
try {
|
|
356
|
-
return
|
|
356
|
+
return Fe(e), !1;
|
|
357
357
|
} catch {
|
|
358
358
|
return !0;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Fe(e) {
|
|
362
362
|
return "" + e;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
if (
|
|
366
|
-
return
|
|
364
|
+
function Ie(e) {
|
|
365
|
+
if (lt(e))
|
|
366
|
+
return s("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ct(e)), Fe(e);
|
|
367
367
|
}
|
|
368
|
-
var
|
|
368
|
+
var Ae = k.ReactCurrentOwner, ut = {
|
|
369
369
|
key: !0,
|
|
370
370
|
ref: !0,
|
|
371
371
|
__self: !0,
|
|
372
372
|
__source: !0
|
|
373
|
-
},
|
|
374
|
-
function
|
|
375
|
-
if (
|
|
373
|
+
}, Ye, We;
|
|
374
|
+
function dt(e) {
|
|
375
|
+
if (ee.call(e, "ref")) {
|
|
376
376
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
377
377
|
if (r && r.isReactWarning)
|
|
378
378
|
return !1;
|
|
379
379
|
}
|
|
380
380
|
return e.ref !== void 0;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
if (
|
|
382
|
+
function ft(e) {
|
|
383
|
+
if (ee.call(e, "key")) {
|
|
384
384
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
385
385
|
if (r && r.isReactWarning)
|
|
386
386
|
return !1;
|
|
387
387
|
}
|
|
388
388
|
return e.key !== void 0;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
typeof e.ref == "string" &&
|
|
390
|
+
function mt(e, r) {
|
|
391
|
+
typeof e.ref == "string" && Ae.current;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function vt(e, r) {
|
|
394
394
|
{
|
|
395
395
|
var n = function() {
|
|
396
|
-
|
|
396
|
+
Ye || (Ye = !0, s("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
397
397
|
};
|
|
398
398
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
399
399
|
get: n,
|
|
@@ -401,10 +401,10 @@ function _t() {
|
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function ht(e, r) {
|
|
405
405
|
{
|
|
406
406
|
var n = function() {
|
|
407
|
-
|
|
407
|
+
We || (We = !0, s("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
408
408
|
};
|
|
409
409
|
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
410
410
|
get: n,
|
|
@@ -412,70 +412,70 @@ function _t() {
|
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var
|
|
416
|
-
var
|
|
415
|
+
var pt = function(e, r, n, u, N, D, x) {
|
|
416
|
+
var g = {
|
|
417
417
|
// This tag allows us to uniquely identify this as a React Element
|
|
418
|
-
$$typeof:
|
|
418
|
+
$$typeof: y,
|
|
419
419
|
// Built-in properties that belong on the element
|
|
420
420
|
type: e,
|
|
421
421
|
key: r,
|
|
422
422
|
ref: n,
|
|
423
|
-
props:
|
|
423
|
+
props: x,
|
|
424
424
|
// Record the component responsible for creating this element.
|
|
425
|
-
_owner:
|
|
425
|
+
_owner: D
|
|
426
426
|
};
|
|
427
|
-
return
|
|
427
|
+
return g._store = {}, Object.defineProperty(g._store, "validated", {
|
|
428
428
|
configurable: !1,
|
|
429
429
|
enumerable: !1,
|
|
430
430
|
writable: !0,
|
|
431
431
|
value: !1
|
|
432
|
-
}), Object.defineProperty(
|
|
432
|
+
}), Object.defineProperty(g, "_self", {
|
|
433
433
|
configurable: !1,
|
|
434
434
|
enumerable: !1,
|
|
435
435
|
writable: !1,
|
|
436
|
-
value:
|
|
437
|
-
}), Object.defineProperty(
|
|
436
|
+
value: u
|
|
437
|
+
}), Object.defineProperty(g, "_source", {
|
|
438
438
|
configurable: !1,
|
|
439
439
|
enumerable: !1,
|
|
440
440
|
writable: !1,
|
|
441
|
-
value:
|
|
442
|
-
}), Object.freeze && (Object.freeze(
|
|
441
|
+
value: N
|
|
442
|
+
}), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
|
|
443
443
|
};
|
|
444
|
-
function
|
|
444
|
+
function bt(e, r, n, u, N) {
|
|
445
445
|
{
|
|
446
|
-
var
|
|
447
|
-
n !== void 0 && (
|
|
448
|
-
for (
|
|
449
|
-
|
|
446
|
+
var D, x = {}, g = null, M = null;
|
|
447
|
+
n !== void 0 && (Ie(n), g = "" + n), ft(r) && (Ie(r.key), g = "" + r.key), dt(r) && (M = r.ref, mt(r, N));
|
|
448
|
+
for (D in r)
|
|
449
|
+
ee.call(r, D) && !ut.hasOwnProperty(D) && (x[D] = r[D]);
|
|
450
450
|
if (e && e.defaultProps) {
|
|
451
|
-
var
|
|
452
|
-
for (
|
|
453
|
-
|
|
451
|
+
var R = e.defaultProps;
|
|
452
|
+
for (D in R)
|
|
453
|
+
x[D] === void 0 && (x[D] = R[D]);
|
|
454
454
|
}
|
|
455
|
-
if (
|
|
456
|
-
var
|
|
457
|
-
|
|
455
|
+
if (g || M) {
|
|
456
|
+
var P = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
457
|
+
g && vt(x, P), M && ht(x, P);
|
|
458
458
|
}
|
|
459
|
-
return
|
|
459
|
+
return pt(e, g, M, N, u, Ae.current, x);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
var
|
|
463
|
-
function
|
|
462
|
+
var Ee = k.ReactCurrentOwner, Be = k.ReactDebugCurrentFrame;
|
|
463
|
+
function G(e) {
|
|
464
464
|
if (e) {
|
|
465
|
-
var r = e._owner, n =
|
|
466
|
-
|
|
465
|
+
var r = e._owner, n = me(e.type, e._source, r ? r.type : null);
|
|
466
|
+
Be.setExtraStackFrame(n);
|
|
467
467
|
} else
|
|
468
|
-
|
|
468
|
+
Be.setExtraStackFrame(null);
|
|
469
469
|
}
|
|
470
|
-
var
|
|
471
|
-
|
|
472
|
-
function
|
|
473
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
470
|
+
var Ne;
|
|
471
|
+
Ne = !1;
|
|
472
|
+
function Ce(e) {
|
|
473
|
+
return typeof e == "object" && e !== null && e.$$typeof === y;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Le() {
|
|
476
476
|
{
|
|
477
|
-
if (
|
|
478
|
-
var e = $(
|
|
477
|
+
if (Ee.current) {
|
|
478
|
+
var e = $(Ee.current.type);
|
|
479
479
|
if (e)
|
|
480
480
|
return `
|
|
481
481
|
|
|
@@ -484,13 +484,13 @@ Check the render method of \`` + e + "`.";
|
|
|
484
484
|
return "";
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function gt(e) {
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
490
|
-
var
|
|
491
|
-
function
|
|
490
|
+
var Ve = {};
|
|
491
|
+
function yt(e) {
|
|
492
492
|
{
|
|
493
|
-
var r =
|
|
493
|
+
var r = Le();
|
|
494
494
|
if (!r) {
|
|
495
495
|
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
496
496
|
n && (r = `
|
|
@@ -500,39 +500,39 @@ Check the top-level render call using <` + n + ">.");
|
|
|
500
500
|
return r;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Je(e, r) {
|
|
504
504
|
{
|
|
505
505
|
if (!e._store || e._store.validated || e.key != null)
|
|
506
506
|
return;
|
|
507
507
|
e._store.validated = !0;
|
|
508
|
-
var n =
|
|
509
|
-
if (
|
|
508
|
+
var n = yt(r);
|
|
509
|
+
if (Ve[n])
|
|
510
510
|
return;
|
|
511
|
-
|
|
512
|
-
var
|
|
513
|
-
e && e._owner && e._owner !==
|
|
511
|
+
Ve[n] = !0;
|
|
512
|
+
var u = "";
|
|
513
|
+
e && e._owner && e._owner !== Ee.current && (u = " It was passed a child from " + $(e._owner.type) + "."), G(e), s('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, u), G(null);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function Ue(e, r) {
|
|
517
517
|
{
|
|
518
518
|
if (typeof e != "object")
|
|
519
519
|
return;
|
|
520
|
-
if (
|
|
520
|
+
if (we(e))
|
|
521
521
|
for (var n = 0; n < e.length; n++) {
|
|
522
|
-
var
|
|
523
|
-
|
|
522
|
+
var u = e[n];
|
|
523
|
+
Ce(u) && Je(u, r);
|
|
524
524
|
}
|
|
525
|
-
else if (
|
|
525
|
+
else if (Ce(e))
|
|
526
526
|
e._store && (e._store.validated = !0);
|
|
527
527
|
else if (e) {
|
|
528
|
-
var
|
|
529
|
-
if (typeof
|
|
530
|
-
for (var
|
|
531
|
-
|
|
528
|
+
var N = O(e);
|
|
529
|
+
if (typeof N == "function" && N !== e.entries)
|
|
530
|
+
for (var D = N.call(e), x; !(x = D.next()).done; )
|
|
531
|
+
Ce(x.value) && Je(x.value, r);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function jt(e) {
|
|
536
536
|
{
|
|
537
537
|
var r = e.type;
|
|
538
538
|
if (r == null || typeof r == "string")
|
|
@@ -540,225 +540,222 @@ Check the top-level render call using <` + n + ">.");
|
|
|
540
540
|
var n;
|
|
541
541
|
if (typeof r == "function")
|
|
542
542
|
n = r.propTypes;
|
|
543
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
543
|
+
else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here.
|
|
544
544
|
// Inner props are checked in the reconciler.
|
|
545
|
-
r.$$typeof ===
|
|
545
|
+
r.$$typeof === C))
|
|
546
546
|
n = r.propTypes;
|
|
547
547
|
else
|
|
548
548
|
return;
|
|
549
549
|
if (n) {
|
|
550
|
-
var
|
|
551
|
-
|
|
552
|
-
} else if (r.PropTypes !== void 0 && !
|
|
553
|
-
|
|
554
|
-
var
|
|
555
|
-
|
|
550
|
+
var u = $(r);
|
|
551
|
+
it(n, e.props, "prop", u, e);
|
|
552
|
+
} else if (r.PropTypes !== void 0 && !Ne) {
|
|
553
|
+
Ne = !0;
|
|
554
|
+
var N = $(r);
|
|
555
|
+
s("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
|
|
556
556
|
}
|
|
557
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
557
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && s("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function xt(e) {
|
|
561
561
|
{
|
|
562
562
|
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
|
|
563
|
-
var
|
|
564
|
-
if (
|
|
565
|
-
|
|
563
|
+
var u = r[n];
|
|
564
|
+
if (u !== "children" && u !== "key") {
|
|
565
|
+
G(e), s("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), G(null);
|
|
566
566
|
break;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
e.ref !== null && (
|
|
569
|
+
e.ref !== null && (G(e), s("Invalid attribute `ref` supplied to `React.Fragment`."), G(null));
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
var
|
|
573
|
-
function
|
|
572
|
+
var He = {};
|
|
573
|
+
function qe(e, r, n, u, N, D) {
|
|
574
574
|
{
|
|
575
|
-
var
|
|
576
|
-
if (!
|
|
577
|
-
var
|
|
578
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
579
|
-
var M =
|
|
580
|
-
M ?
|
|
581
|
-
var
|
|
582
|
-
e === null ?
|
|
575
|
+
var x = z(e);
|
|
576
|
+
if (!x) {
|
|
577
|
+
var g = "";
|
|
578
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (g += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
+
var M = gt();
|
|
580
|
+
M ? g += M : g += Le();
|
|
581
|
+
var R;
|
|
582
|
+
e === null ? R = "null" : we(e) ? R = "array" : e !== void 0 && e.$$typeof === y ? (R = "<" + ($(e.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, s("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, g);
|
|
583
583
|
}
|
|
584
|
-
var
|
|
585
|
-
if (
|
|
586
|
-
return
|
|
587
|
-
if (
|
|
588
|
-
var
|
|
589
|
-
if (
|
|
590
|
-
if (
|
|
591
|
-
if (
|
|
592
|
-
for (var
|
|
593
|
-
|
|
594
|
-
Object.freeze && Object.freeze(
|
|
584
|
+
var P = bt(e, r, n, N, D);
|
|
585
|
+
if (P == null)
|
|
586
|
+
return P;
|
|
587
|
+
if (x) {
|
|
588
|
+
var W = r.children;
|
|
589
|
+
if (W !== void 0)
|
|
590
|
+
if (u)
|
|
591
|
+
if (we(W)) {
|
|
592
|
+
for (var Z = 0; Z < W.length; Z++)
|
|
593
|
+
Ue(W[Z], e);
|
|
594
|
+
Object.freeze && Object.freeze(W);
|
|
595
595
|
} else
|
|
596
|
-
|
|
596
|
+
s("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
597
|
else
|
|
598
|
-
|
|
598
|
+
Ue(W, e);
|
|
599
599
|
}
|
|
600
|
-
if (
|
|
601
|
-
var
|
|
602
|
-
return
|
|
603
|
-
}),
|
|
604
|
-
if (!
|
|
605
|
-
var
|
|
606
|
-
|
|
600
|
+
if (ee.call(r, "key")) {
|
|
601
|
+
var X = $(e), I = Object.keys(r).filter(function(Tt) {
|
|
602
|
+
return Tt !== "key";
|
|
603
|
+
}), Se = I.length > 0 ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
+
if (!He[X + Se]) {
|
|
605
|
+
var St = I.length > 0 ? "{" + I.join(": ..., ") + ": ...}" : "{}";
|
|
606
|
+
s(`A props object containing a "key" prop is being spread into JSX:
|
|
607
607
|
let props = %s;
|
|
608
608
|
<%s {...props} />
|
|
609
609
|
React keys must be passed directly to JSX without using spread:
|
|
610
610
|
let props = %s;
|
|
611
|
-
<%s key={someKey} {...props} />`,
|
|
611
|
+
<%s key={someKey} {...props} />`, Se, X, St, X), He[X + Se] = !0;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
return e ===
|
|
614
|
+
return e === w ? xt(P) : jt(P), P;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
return
|
|
617
|
+
function wt(e, r, n) {
|
|
618
|
+
return qe(e, r, n, !0);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
620
|
+
function Et(e, r, n) {
|
|
621
|
+
return qe(e, r, n, !1);
|
|
622
622
|
}
|
|
623
|
-
var
|
|
624
|
-
|
|
625
|
-
}()),
|
|
623
|
+
var Nt = Et, Ct = wt;
|
|
624
|
+
re.Fragment = w, re.jsx = Nt, re.jsxs = Ct;
|
|
625
|
+
}()), re;
|
|
626
626
|
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
627
|
+
process.env.NODE_ENV === "production" ? De.exports = kt() : De.exports = Rt();
|
|
628
|
+
var t = De.exports;
|
|
629
|
+
function pe({ status: a, size: y = "md" }) {
|
|
630
|
+
return /* @__PURE__ */ t.jsx("span", { className: `bc-status-badge bc-status-${a.toLowerCase()} bc-badge-${y}`, children: a });
|
|
630
631
|
}
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
const u = new Date(g);
|
|
641
|
-
u.setHours(9, 0, 0, 0);
|
|
642
|
-
const s = new Date(g);
|
|
643
|
-
s.setHours(10, 0, 0, 0), C(u, s);
|
|
632
|
+
function _t({ currentDate: a, bookings: y, onSlotClick: E, onBookingClick: w }) {
|
|
633
|
+
const p = ke(a), m = Re(a), o = ne(p), f = _e(m), c = Qe({ start: o, end: f }), S = [];
|
|
634
|
+
for (let j = 0; j < c.length; j += 7)
|
|
635
|
+
S.push(c.slice(j, j + 7));
|
|
636
|
+
const v = (j) => y.filter((d) => Q(new Date(d.startTime), j)), C = (j) => {
|
|
637
|
+
const d = new Date(j);
|
|
638
|
+
d.setHours(9, 0, 0, 0);
|
|
639
|
+
const i = new Date(j);
|
|
640
|
+
i.setHours(10, 0, 0, 0), E(d, i);
|
|
644
641
|
};
|
|
645
642
|
return /* @__PURE__ */ t.jsxs("div", { className: "bc-month-view", children: [
|
|
646
|
-
/* @__PURE__ */ t.jsx("div", { className: "bc-month-header", children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((
|
|
647
|
-
/* @__PURE__ */ t.jsx("div", { className: "bc-month-grid", children: S.map((
|
|
648
|
-
const
|
|
643
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-month-header", children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((j) => /* @__PURE__ */ t.jsx("div", { className: "bc-month-header-cell", children: j }, j)) }),
|
|
644
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-month-grid", children: S.map((j, d) => /* @__PURE__ */ t.jsx("div", { className: "bc-month-week", children: j.map((i) => {
|
|
645
|
+
const b = v(i), O = et(i, a), k = ae(i);
|
|
649
646
|
return /* @__PURE__ */ t.jsxs(
|
|
650
647
|
"div",
|
|
651
648
|
{
|
|
652
|
-
className: `bc-month-day ${O ? "" : "bc-other-month"} ${
|
|
653
|
-
onClick: () =>
|
|
649
|
+
className: `bc-month-day ${O ? "" : "bc-other-month"} ${k ? "bc-today" : ""}`,
|
|
650
|
+
onClick: () => C(i),
|
|
654
651
|
children: [
|
|
655
|
-
/* @__PURE__ */ t.jsx("div", { className: "bc-month-day-number", children:
|
|
652
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-month-day-number", children: H(i, "d") }),
|
|
656
653
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-month-day-events", children: [
|
|
657
|
-
|
|
654
|
+
b.slice(0, 3).map((s) => /* @__PURE__ */ t.jsxs(
|
|
658
655
|
"div",
|
|
659
656
|
{
|
|
660
657
|
className: "bc-month-event",
|
|
661
|
-
onClick: (
|
|
662
|
-
|
|
658
|
+
onClick: (T) => {
|
|
659
|
+
T.stopPropagation(), w(s);
|
|
663
660
|
},
|
|
664
661
|
children: [
|
|
665
|
-
/* @__PURE__ */ t.jsx(
|
|
666
|
-
/* @__PURE__ */ t.jsx("span", { className: "bc-month-event-title", children:
|
|
662
|
+
/* @__PURE__ */ t.jsx(pe, { status: s.status, size: "sm" }),
|
|
663
|
+
/* @__PURE__ */ t.jsx("span", { className: "bc-month-event-title", children: s.title })
|
|
667
664
|
]
|
|
668
665
|
},
|
|
669
|
-
|
|
666
|
+
s.id
|
|
670
667
|
)),
|
|
671
|
-
|
|
668
|
+
b.length > 3 && /* @__PURE__ */ t.jsxs("div", { className: "bc-month-event-more", children: [
|
|
672
669
|
"+",
|
|
673
|
-
|
|
670
|
+
b.length - 3,
|
|
674
671
|
" more"
|
|
675
672
|
] })
|
|
676
673
|
] })
|
|
677
674
|
]
|
|
678
675
|
},
|
|
679
|
-
|
|
676
|
+
i.toISOString()
|
|
680
677
|
);
|
|
681
|
-
}) },
|
|
678
|
+
}) }, d)) })
|
|
682
679
|
] });
|
|
683
680
|
}
|
|
684
|
-
function
|
|
685
|
-
return { getEventPosition: (
|
|
686
|
-
const
|
|
681
|
+
function rt() {
|
|
682
|
+
return { getEventPosition: (E, w) => {
|
|
683
|
+
const p = Dt(w), m = new Date(E.startTime), o = new Date(E.endTime), f = ze(m, p), c = ze(o, m), S = f / (24 * 60) * 100, v = c / (24 * 60) * 100;
|
|
687
684
|
return {
|
|
688
685
|
top: S,
|
|
689
|
-
height:
|
|
686
|
+
height: v,
|
|
690
687
|
left: 0,
|
|
691
688
|
width: 95
|
|
692
689
|
};
|
|
693
|
-
}, detectOverlaps: (
|
|
694
|
-
const
|
|
695
|
-
return
|
|
696
|
-
let
|
|
697
|
-
for (const
|
|
698
|
-
if (!
|
|
699
|
-
const
|
|
700
|
-
return
|
|
690
|
+
}, detectOverlaps: (E, w) => {
|
|
691
|
+
const p = E.filter((o) => new Date(o.startTime).toDateString() === w.toDateString()), m = [];
|
|
692
|
+
return p.sort((o, f) => new Date(o.startTime).getTime() - new Date(f.startTime).getTime()), p.forEach((o) => {
|
|
693
|
+
let f = !1;
|
|
694
|
+
for (const c of m)
|
|
695
|
+
if (!c.some((v) => {
|
|
696
|
+
const C = new Date(v.startTime).getTime(), j = new Date(v.endTime).getTime(), d = new Date(o.startTime).getTime(), i = new Date(o.endTime).getTime();
|
|
697
|
+
return C < i && d < j;
|
|
701
698
|
})) {
|
|
702
|
-
|
|
699
|
+
c.push(o), f = !0;
|
|
703
700
|
break;
|
|
704
701
|
}
|
|
705
|
-
|
|
706
|
-
}),
|
|
702
|
+
f || m.push([o]);
|
|
703
|
+
}), m;
|
|
707
704
|
} };
|
|
708
705
|
}
|
|
709
|
-
function
|
|
706
|
+
function Ot({
|
|
710
707
|
currentDate: a,
|
|
711
|
-
bookings:
|
|
712
|
-
onSlotClick:
|
|
713
|
-
onBookingClick:
|
|
708
|
+
bookings: y,
|
|
709
|
+
onSlotClick: E,
|
|
710
|
+
onBookingClick: w
|
|
714
711
|
}) {
|
|
715
|
-
const
|
|
716
|
-
const O = new Date(
|
|
717
|
-
O.setHours(
|
|
718
|
-
const
|
|
719
|
-
|
|
712
|
+
const p = ne(a), m = Array.from({ length: 7 }, (i, b) => Oe(p, b)), o = Array.from({ length: 24 }, (i, b) => b), f = /* @__PURE__ */ new Date(), c = m.some((i) => Q(i, f)), S = f.getHours(), v = f.getMinutes(), C = (S * 60 + v) / (24 * 60) * 100, { getEventPosition: j } = rt(), d = (i, b) => {
|
|
713
|
+
const O = new Date(i);
|
|
714
|
+
O.setHours(b, 0, 0, 0);
|
|
715
|
+
const k = tt(O, 60);
|
|
716
|
+
E(O, k);
|
|
720
717
|
};
|
|
721
718
|
return /* @__PURE__ */ t.jsxs("div", { className: "bc-week-view", children: [
|
|
722
719
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-week-header", children: [
|
|
723
720
|
/* @__PURE__ */ t.jsx("div", { className: "bc-week-time-gutter" }),
|
|
724
|
-
|
|
721
|
+
m.map((i) => /* @__PURE__ */ t.jsxs(
|
|
725
722
|
"div",
|
|
726
723
|
{
|
|
727
|
-
className: `bc-week-day-header ${
|
|
724
|
+
className: `bc-week-day-header ${ae(i) ? "bc-today" : ""}`,
|
|
728
725
|
children: [
|
|
729
|
-
/* @__PURE__ */ t.jsx("div", { className: "bc-week-day-name", children:
|
|
730
|
-
/* @__PURE__ */ t.jsx("div", { className: "bc-week-day-date", children:
|
|
726
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-week-day-name", children: H(i, "EEE") }),
|
|
727
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-week-day-date", children: H(i, "d") })
|
|
731
728
|
]
|
|
732
729
|
},
|
|
733
|
-
|
|
730
|
+
i.toISOString()
|
|
734
731
|
))
|
|
735
732
|
] }),
|
|
736
733
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-week-body", children: [
|
|
737
|
-
/* @__PURE__ */ t.jsx("div", { className: "bc-week-time-column", children:
|
|
734
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-week-time-column", children: o.map((i) => /* @__PURE__ */ t.jsx("div", { className: "bc-week-time-slot", children: H((/* @__PURE__ */ new Date()).setHours(i, 0), "ha") }, i)) }),
|
|
738
735
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-week-grid-container", children: [
|
|
739
|
-
|
|
736
|
+
c && Q(m[f.getDay()], f) && /* @__PURE__ */ t.jsx(
|
|
740
737
|
"div",
|
|
741
738
|
{
|
|
742
739
|
className: "bc-week-now-line",
|
|
743
|
-
style: { top: `${
|
|
740
|
+
style: { top: `${C}%` },
|
|
744
741
|
children: /* @__PURE__ */ t.jsx("div", { className: "bc-week-now-dot" })
|
|
745
742
|
}
|
|
746
743
|
),
|
|
747
|
-
|
|
744
|
+
m.map((i) => /* @__PURE__ */ t.jsxs(
|
|
748
745
|
"div",
|
|
749
746
|
{
|
|
750
|
-
className: `bc-week-day-column ${
|
|
747
|
+
className: `bc-week-day-column ${ae(i) ? "bc-today" : ""}`,
|
|
751
748
|
children: [
|
|
752
|
-
|
|
749
|
+
o.map((b) => /* @__PURE__ */ t.jsx(
|
|
753
750
|
"div",
|
|
754
751
|
{
|
|
755
752
|
className: "bc-week-grid-slot",
|
|
756
|
-
onClick: () =>
|
|
753
|
+
onClick: () => d(i, b)
|
|
757
754
|
},
|
|
758
|
-
|
|
755
|
+
b
|
|
759
756
|
)),
|
|
760
|
-
|
|
761
|
-
const O =
|
|
757
|
+
y.filter((b) => Q(new Date(b.startTime), i)).map((b) => {
|
|
758
|
+
const O = j(b, i);
|
|
762
759
|
return /* @__PURE__ */ t.jsxs(
|
|
763
760
|
"div",
|
|
764
761
|
{
|
|
@@ -769,75 +766,75 @@ function Pt({
|
|
|
769
766
|
left: `${O.left}%`,
|
|
770
767
|
width: `${O.width}%`
|
|
771
768
|
},
|
|
772
|
-
onClick: (
|
|
773
|
-
|
|
769
|
+
onClick: (k) => {
|
|
770
|
+
k.stopPropagation(), w(b);
|
|
774
771
|
},
|
|
775
772
|
children: [
|
|
776
|
-
/* @__PURE__ */ t.jsx(
|
|
777
|
-
/* @__PURE__ */ t.jsx("div", { className: "bc-week-event-title", children:
|
|
778
|
-
/* @__PURE__ */ t.jsx("div", { className: "bc-week-event-time", children:
|
|
773
|
+
/* @__PURE__ */ t.jsx(pe, { status: b.status, size: "xs" }),
|
|
774
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-week-event-title", children: b.title }),
|
|
775
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-week-event-time", children: H(new Date(b.startTime), "h:mm a") })
|
|
779
776
|
]
|
|
780
777
|
},
|
|
781
|
-
|
|
778
|
+
b.id
|
|
782
779
|
);
|
|
783
780
|
})
|
|
784
781
|
]
|
|
785
782
|
},
|
|
786
|
-
|
|
783
|
+
i.toISOString()
|
|
787
784
|
))
|
|
788
785
|
] })
|
|
789
786
|
] })
|
|
790
787
|
] });
|
|
791
788
|
}
|
|
792
|
-
function
|
|
793
|
-
const
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
const
|
|
797
|
-
|
|
789
|
+
function Pt({ currentDate: a, bookings: y, onSlotClick: E, onBookingClick: w }) {
|
|
790
|
+
const p = Array.from({ length: 24 }, (d, i) => i), { getEventPosition: m } = rt(), o = /* @__PURE__ */ new Date(), f = ae(a), c = o.getHours(), S = o.getMinutes(), v = (c * 60 + S) / (24 * 60) * 100, C = y.filter((d) => Q(new Date(d.startTime), a)), j = (d) => {
|
|
791
|
+
const i = new Date(a);
|
|
792
|
+
i.setHours(d, 0, 0, 0);
|
|
793
|
+
const b = tt(i, 60);
|
|
794
|
+
E(i, b);
|
|
798
795
|
};
|
|
799
796
|
return /* @__PURE__ */ t.jsxs("div", { className: "bc-day-view", children: [
|
|
800
|
-
/* @__PURE__ */ t.jsx("div", { className: "bc-day-header", children: /* @__PURE__ */ t.jsx("div", { className: "bc-day-title", children:
|
|
797
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-day-header", children: /* @__PURE__ */ t.jsx("div", { className: "bc-day-title", children: H(a, "EEEE, MMMM d, yyyy") }) }),
|
|
801
798
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-day-body", children: [
|
|
802
|
-
/* @__PURE__ */ t.jsx("div", { className: "bc-day-time-column", children:
|
|
799
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-day-time-column", children: p.map((d) => /* @__PURE__ */ t.jsx("div", { className: "bc-day-time-slot", children: H((/* @__PURE__ */ new Date()).setHours(d, 0), "h a") }, d)) }),
|
|
803
800
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-day-grid-container", children: [
|
|
804
|
-
|
|
801
|
+
f && /* @__PURE__ */ t.jsx("div", { className: "bc-day-now-line", style: { top: `${v}%` }, children: /* @__PURE__ */ t.jsx("div", { className: "bc-day-now-dot" }) }),
|
|
805
802
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-day-column", children: [
|
|
806
|
-
|
|
803
|
+
p.map((d) => /* @__PURE__ */ t.jsx(
|
|
807
804
|
"div",
|
|
808
805
|
{
|
|
809
806
|
className: "bc-day-grid-slot",
|
|
810
|
-
onClick: () =>
|
|
807
|
+
onClick: () => j(d)
|
|
811
808
|
},
|
|
812
|
-
|
|
809
|
+
d
|
|
813
810
|
)),
|
|
814
|
-
|
|
815
|
-
const
|
|
811
|
+
C.map((d) => {
|
|
812
|
+
const i = m(d, a);
|
|
816
813
|
return /* @__PURE__ */ t.jsxs(
|
|
817
814
|
"div",
|
|
818
815
|
{
|
|
819
816
|
className: "bc-day-event",
|
|
820
817
|
style: {
|
|
821
|
-
top: `${
|
|
822
|
-
height: `${
|
|
823
|
-
left: `${
|
|
824
|
-
width: `${
|
|
818
|
+
top: `${i.top}%`,
|
|
819
|
+
height: `${i.height}%`,
|
|
820
|
+
left: `${i.left}%`,
|
|
821
|
+
width: `${i.width}%`
|
|
825
822
|
},
|
|
826
|
-
onClick: (
|
|
827
|
-
|
|
823
|
+
onClick: (b) => {
|
|
824
|
+
b.stopPropagation(), w(d);
|
|
828
825
|
},
|
|
829
826
|
children: [
|
|
830
|
-
/* @__PURE__ */ t.jsx(
|
|
831
|
-
/* @__PURE__ */ t.jsx("div", { className: "bc-day-event-title", children:
|
|
832
|
-
/* @__PURE__ */ t.jsx("div", { className: "bc-day-event-client", children:
|
|
827
|
+
/* @__PURE__ */ t.jsx(pe, { status: d.status, size: "sm" }),
|
|
828
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-day-event-title", children: d.title }),
|
|
829
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-day-event-client", children: d.clientName }),
|
|
833
830
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-day-event-time", children: [
|
|
834
|
-
|
|
831
|
+
H(new Date(d.startTime), "h:mm a"),
|
|
835
832
|
" - ",
|
|
836
|
-
|
|
833
|
+
H(new Date(d.endTime), "h:mm a")
|
|
837
834
|
] })
|
|
838
835
|
]
|
|
839
836
|
},
|
|
840
|
-
|
|
837
|
+
d.id
|
|
841
838
|
);
|
|
842
839
|
})
|
|
843
840
|
] })
|
|
@@ -845,89 +842,89 @@ function Mt({ currentDate: a, bookings: j, onSlotClick: C, onBookingClick: b })
|
|
|
845
842
|
] })
|
|
846
843
|
] });
|
|
847
844
|
}
|
|
848
|
-
function
|
|
845
|
+
function Mt({
|
|
849
846
|
booking: a,
|
|
850
|
-
initialSlot:
|
|
851
|
-
onClose:
|
|
852
|
-
onCreate:
|
|
853
|
-
onUpdate:
|
|
854
|
-
onDelete:
|
|
855
|
-
onSendConfirmation:
|
|
847
|
+
initialSlot: y,
|
|
848
|
+
onClose: E,
|
|
849
|
+
onCreate: w,
|
|
850
|
+
onUpdate: p,
|
|
851
|
+
onDelete: m,
|
|
852
|
+
onSendConfirmation: o
|
|
856
853
|
}) {
|
|
857
|
-
const [
|
|
858
|
-
|
|
859
|
-
a ? (
|
|
860
|
-
}, [a,
|
|
861
|
-
const
|
|
862
|
-
const
|
|
863
|
-
return `${
|
|
864
|
-
},
|
|
865
|
-
const
|
|
866
|
-
return
|
|
867
|
-
},
|
|
868
|
-
if (
|
|
854
|
+
const [f, c] = _(""), [S, v] = _(""), [C, j] = _(""), [d, i] = _(""), [b, O] = _(""), [k, s] = _(""), [T, A] = _(""), [Y, V] = _(""), [B, L] = _(""), [q, z] = _("Pending"), [h, K] = _({}), [$, F] = _(!1);
|
|
855
|
+
Te(() => {
|
|
856
|
+
a ? (c(a.title), v(a.clientName), j(a.clientEmail), i(a.clientPhone || ""), O(a.meetingReason || ""), s(J(new Date(a.startTime))), A(J(new Date(a.endTime))), V(a.location || ""), L(a.description || ""), z(a.status)) : y && (s(J(y.start)), A(J(y.end)));
|
|
857
|
+
}, [a, y]);
|
|
858
|
+
const J = (l) => {
|
|
859
|
+
const U = l.getFullYear(), le = String(l.getMonth() + 1).padStart(2, "0"), ue = String(l.getDate()).padStart(2, "0"), be = String(l.getHours()).padStart(2, "0"), ge = String(l.getMinutes()).padStart(2, "0");
|
|
860
|
+
return `${U}-${le}-${ue}T${be}:${ge}`;
|
|
861
|
+
}, se = () => {
|
|
862
|
+
const l = {};
|
|
863
|
+
return f.trim() || (l.title = "Title is required"), S.trim() || (l.clientName = "Client name is required"), C.trim() || (l.clientEmail = "Client email is required"), C && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(C) && (l.clientEmail = "Invalid email format"), k || (l.startTime = "Start time is required"), T || (l.endTime = "End time is required"), k && T && new Date(k) >= new Date(T) && (l.endTime = "End time must be after start time"), K(l), Object.keys(l).length === 0;
|
|
864
|
+
}, ie = async (l) => {
|
|
865
|
+
if (l.preventDefault(), !!se()) {
|
|
869
866
|
F(!0);
|
|
870
867
|
try {
|
|
871
|
-
const
|
|
872
|
-
title:
|
|
868
|
+
const U = {
|
|
869
|
+
title: f,
|
|
873
870
|
clientName: S,
|
|
874
|
-
clientEmail:
|
|
875
|
-
clientPhone:
|
|
876
|
-
meetingReason:
|
|
877
|
-
startTime:
|
|
878
|
-
endTime:
|
|
879
|
-
location:
|
|
880
|
-
description:
|
|
881
|
-
status:
|
|
871
|
+
clientEmail: C,
|
|
872
|
+
clientPhone: d || void 0,
|
|
873
|
+
meetingReason: b || void 0,
|
|
874
|
+
startTime: k,
|
|
875
|
+
endTime: T,
|
|
876
|
+
location: Y || void 0,
|
|
877
|
+
description: B || void 0,
|
|
878
|
+
status: q
|
|
882
879
|
};
|
|
883
|
-
a &&
|
|
884
|
-
} catch (
|
|
885
|
-
console.error("Failed to save booking:",
|
|
880
|
+
a && p ? await p(a.id, U) : w && await w(U), E();
|
|
881
|
+
} catch (U) {
|
|
882
|
+
console.error("Failed to save booking:", U);
|
|
886
883
|
} finally {
|
|
887
884
|
F(!1);
|
|
888
885
|
}
|
|
889
886
|
}
|
|
890
|
-
},
|
|
891
|
-
if (!(!a || !
|
|
887
|
+
}, oe = async () => {
|
|
888
|
+
if (!(!a || !m) && confirm("Are you sure you want to delete this booking?")) {
|
|
892
889
|
F(!0);
|
|
893
890
|
try {
|
|
894
|
-
await
|
|
895
|
-
} catch (
|
|
896
|
-
console.error("Failed to delete booking:",
|
|
891
|
+
await m(a.id), E();
|
|
892
|
+
} catch (l) {
|
|
893
|
+
console.error("Failed to delete booking:", l);
|
|
897
894
|
} finally {
|
|
898
895
|
F(!1);
|
|
899
896
|
}
|
|
900
897
|
}
|
|
901
|
-
},
|
|
902
|
-
if (!(!a || !
|
|
898
|
+
}, ce = async () => {
|
|
899
|
+
if (!(!a || !o)) {
|
|
903
900
|
F(!0);
|
|
904
901
|
try {
|
|
905
|
-
await
|
|
906
|
-
} catch (
|
|
907
|
-
console.error("Failed to send confirmation:",
|
|
902
|
+
await o(a.id);
|
|
903
|
+
} catch (l) {
|
|
904
|
+
console.error("Failed to send confirmation:", l);
|
|
908
905
|
} finally {
|
|
909
906
|
F(!1);
|
|
910
907
|
}
|
|
911
908
|
}
|
|
912
909
|
};
|
|
913
|
-
return /* @__PURE__ */ t.jsx("div", { className: "bc-modal-overlay", onClick:
|
|
910
|
+
return /* @__PURE__ */ t.jsx("div", { className: "bc-modal-overlay", onClick: E, children: /* @__PURE__ */ t.jsxs("div", { className: "bc-modal", onClick: (l) => l.stopPropagation(), children: [
|
|
914
911
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-modal-header", children: [
|
|
915
912
|
/* @__PURE__ */ t.jsx("h2", { children: a ? "Edit Booking" : "Create Booking" }),
|
|
916
|
-
/* @__PURE__ */ t.jsx("button", { className: "bc-modal-close", onClick:
|
|
913
|
+
/* @__PURE__ */ t.jsx("button", { className: "bc-modal-close", onClick: E, children: "×" })
|
|
917
914
|
] }),
|
|
918
|
-
/* @__PURE__ */ t.jsxs("form", { className: "bc-modal-body", onSubmit:
|
|
915
|
+
/* @__PURE__ */ t.jsxs("form", { className: "bc-modal-body", onSubmit: ie, children: [
|
|
919
916
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-form-group", children: [
|
|
920
917
|
/* @__PURE__ */ t.jsx("label", { children: "Title *" }),
|
|
921
918
|
/* @__PURE__ */ t.jsx(
|
|
922
919
|
"input",
|
|
923
920
|
{
|
|
924
921
|
type: "text",
|
|
925
|
-
value:
|
|
926
|
-
onChange: (
|
|
927
|
-
className:
|
|
922
|
+
value: f,
|
|
923
|
+
onChange: (l) => c(l.target.value),
|
|
924
|
+
className: h.title ? "bc-input-error" : ""
|
|
928
925
|
}
|
|
929
926
|
),
|
|
930
|
-
|
|
927
|
+
h.title && /* @__PURE__ */ t.jsx("span", { className: "bc-error-text", children: h.title })
|
|
931
928
|
] }),
|
|
932
929
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-form-row", children: [
|
|
933
930
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-form-group", children: [
|
|
@@ -937,11 +934,11 @@ function $t({
|
|
|
937
934
|
{
|
|
938
935
|
type: "text",
|
|
939
936
|
value: S,
|
|
940
|
-
onChange: (
|
|
941
|
-
className:
|
|
937
|
+
onChange: (l) => v(l.target.value),
|
|
938
|
+
className: h.clientName ? "bc-input-error" : ""
|
|
942
939
|
}
|
|
943
940
|
),
|
|
944
|
-
|
|
941
|
+
h.clientName && /* @__PURE__ */ t.jsx("span", { className: "bc-error-text", children: h.clientName })
|
|
945
942
|
] }),
|
|
946
943
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-form-group", children: [
|
|
947
944
|
/* @__PURE__ */ t.jsx("label", { children: "Client Email *" }),
|
|
@@ -949,12 +946,12 @@ function $t({
|
|
|
949
946
|
"input",
|
|
950
947
|
{
|
|
951
948
|
type: "email",
|
|
952
|
-
value:
|
|
953
|
-
onChange: (
|
|
954
|
-
className:
|
|
949
|
+
value: C,
|
|
950
|
+
onChange: (l) => j(l.target.value),
|
|
951
|
+
className: h.clientEmail ? "bc-input-error" : ""
|
|
955
952
|
}
|
|
956
953
|
),
|
|
957
|
-
|
|
954
|
+
h.clientEmail && /* @__PURE__ */ t.jsx("span", { className: "bc-error-text", children: h.clientEmail })
|
|
958
955
|
] })
|
|
959
956
|
] }),
|
|
960
957
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-form-row", children: [
|
|
@@ -964,8 +961,8 @@ function $t({
|
|
|
964
961
|
"input",
|
|
965
962
|
{
|
|
966
963
|
type: "tel",
|
|
967
|
-
value:
|
|
968
|
-
onChange: (
|
|
964
|
+
value: d,
|
|
965
|
+
onChange: (l) => i(l.target.value)
|
|
969
966
|
}
|
|
970
967
|
)
|
|
971
968
|
] }),
|
|
@@ -975,8 +972,8 @@ function $t({
|
|
|
975
972
|
"input",
|
|
976
973
|
{
|
|
977
974
|
type: "text",
|
|
978
|
-
value:
|
|
979
|
-
onChange: (
|
|
975
|
+
value: b,
|
|
976
|
+
onChange: (l) => O(l.target.value)
|
|
980
977
|
}
|
|
981
978
|
)
|
|
982
979
|
] })
|
|
@@ -988,12 +985,12 @@ function $t({
|
|
|
988
985
|
"input",
|
|
989
986
|
{
|
|
990
987
|
type: "datetime-local",
|
|
991
|
-
value:
|
|
992
|
-
onChange: (
|
|
993
|
-
className:
|
|
988
|
+
value: k,
|
|
989
|
+
onChange: (l) => s(l.target.value),
|
|
990
|
+
className: h.startTime ? "bc-input-error" : ""
|
|
994
991
|
}
|
|
995
992
|
),
|
|
996
|
-
|
|
993
|
+
h.startTime && /* @__PURE__ */ t.jsx("span", { className: "bc-error-text", children: h.startTime })
|
|
997
994
|
] }),
|
|
998
995
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-form-group", children: [
|
|
999
996
|
/* @__PURE__ */ t.jsx("label", { children: "End Time *" }),
|
|
@@ -1001,12 +998,12 @@ function $t({
|
|
|
1001
998
|
"input",
|
|
1002
999
|
{
|
|
1003
1000
|
type: "datetime-local",
|
|
1004
|
-
value:
|
|
1005
|
-
onChange: (
|
|
1006
|
-
className:
|
|
1001
|
+
value: T,
|
|
1002
|
+
onChange: (l) => A(l.target.value),
|
|
1003
|
+
className: h.endTime ? "bc-input-error" : ""
|
|
1007
1004
|
}
|
|
1008
1005
|
),
|
|
1009
|
-
|
|
1006
|
+
h.endTime && /* @__PURE__ */ t.jsx("span", { className: "bc-error-text", children: h.endTime })
|
|
1010
1007
|
] })
|
|
1011
1008
|
] }),
|
|
1012
1009
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-form-group", children: [
|
|
@@ -1015,8 +1012,8 @@ function $t({
|
|
|
1015
1012
|
"input",
|
|
1016
1013
|
{
|
|
1017
1014
|
type: "text",
|
|
1018
|
-
value:
|
|
1019
|
-
onChange: (
|
|
1015
|
+
value: Y,
|
|
1016
|
+
onChange: (l) => V(l.target.value),
|
|
1020
1017
|
placeholder: "Office, Zoom, etc."
|
|
1021
1018
|
}
|
|
1022
1019
|
)
|
|
@@ -1026,8 +1023,8 @@ function $t({
|
|
|
1026
1023
|
/* @__PURE__ */ t.jsx(
|
|
1027
1024
|
"textarea",
|
|
1028
1025
|
{
|
|
1029
|
-
value:
|
|
1030
|
-
onChange: (
|
|
1026
|
+
value: B,
|
|
1027
|
+
onChange: (l) => L(l.target.value),
|
|
1031
1028
|
rows: 3
|
|
1032
1029
|
}
|
|
1033
1030
|
)
|
|
@@ -1037,8 +1034,8 @@ function $t({
|
|
|
1037
1034
|
/* @__PURE__ */ t.jsxs(
|
|
1038
1035
|
"select",
|
|
1039
1036
|
{
|
|
1040
|
-
value:
|
|
1041
|
-
onChange: (
|
|
1037
|
+
value: q,
|
|
1038
|
+
onChange: (l) => z(l.target.value),
|
|
1042
1039
|
children: [
|
|
1043
1040
|
/* @__PURE__ */ t.jsx("option", { value: "Pending", children: "Pending" }),
|
|
1044
1041
|
/* @__PURE__ */ t.jsx("option", { value: "Confirmed", children: "Confirmed" }),
|
|
@@ -1048,26 +1045,26 @@ function $t({
|
|
|
1048
1045
|
]
|
|
1049
1046
|
}
|
|
1050
1047
|
),
|
|
1051
|
-
/* @__PURE__ */ t.jsx(
|
|
1048
|
+
/* @__PURE__ */ t.jsx(pe, { status: q, size: "sm" })
|
|
1052
1049
|
] }),
|
|
1053
1050
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-modal-footer", children: [
|
|
1054
1051
|
/* @__PURE__ */ t.jsxs("div", { className: "bc-modal-actions-left", children: [
|
|
1055
|
-
a &&
|
|
1052
|
+
a && m && /* @__PURE__ */ t.jsx(
|
|
1056
1053
|
"button",
|
|
1057
1054
|
{
|
|
1058
1055
|
type: "button",
|
|
1059
1056
|
className: "bc-btn bc-btn-danger",
|
|
1060
|
-
onClick:
|
|
1057
|
+
onClick: oe,
|
|
1061
1058
|
disabled: $,
|
|
1062
1059
|
children: "Delete"
|
|
1063
1060
|
}
|
|
1064
1061
|
),
|
|
1065
|
-
a &&
|
|
1062
|
+
a && o && /* @__PURE__ */ t.jsx(
|
|
1066
1063
|
"button",
|
|
1067
1064
|
{
|
|
1068
1065
|
type: "button",
|
|
1069
1066
|
className: "bc-btn bc-btn-secondary",
|
|
1070
|
-
onClick:
|
|
1067
|
+
onClick: ce,
|
|
1071
1068
|
disabled: $,
|
|
1072
1069
|
children: "Send Confirmation"
|
|
1073
1070
|
}
|
|
@@ -1079,7 +1076,7 @@ function $t({
|
|
|
1079
1076
|
{
|
|
1080
1077
|
type: "button",
|
|
1081
1078
|
className: "bc-btn bc-btn-secondary",
|
|
1082
|
-
onClick:
|
|
1079
|
+
onClick: E,
|
|
1083
1080
|
disabled: $,
|
|
1084
1081
|
children: "Cancel"
|
|
1085
1082
|
}
|
|
@@ -1098,166 +1095,287 @@ function $t({
|
|
|
1098
1095
|
] })
|
|
1099
1096
|
] }) });
|
|
1100
1097
|
}
|
|
1101
|
-
|
|
1098
|
+
const $t = [
|
|
1099
|
+
"Jan",
|
|
1100
|
+
"Feb",
|
|
1101
|
+
"Mar",
|
|
1102
|
+
"Apr",
|
|
1103
|
+
"May",
|
|
1104
|
+
"Jun",
|
|
1105
|
+
"Jul",
|
|
1106
|
+
"Aug",
|
|
1107
|
+
"Sep",
|
|
1108
|
+
"Oct",
|
|
1109
|
+
"Nov",
|
|
1110
|
+
"Dec"
|
|
1111
|
+
], Ft = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
1112
|
+
function It({ isOpen: a, currentDate: y, onClose: E, onSelect: w }) {
|
|
1113
|
+
const [p, m] = _(y.getFullYear()), [o, f] = _(y.getMonth()), c = Xe(null), S = Xe(null);
|
|
1114
|
+
Te(() => {
|
|
1115
|
+
a && (m(y.getFullYear()), f(y.getMonth()), setTimeout(() => {
|
|
1116
|
+
var s;
|
|
1117
|
+
return (s = c.current) == null ? void 0 : s.focus();
|
|
1118
|
+
}, 0));
|
|
1119
|
+
}, [a, y]), Te(() => {
|
|
1120
|
+
const s = (T) => {
|
|
1121
|
+
T.key === "Escape" && a && E();
|
|
1122
|
+
};
|
|
1123
|
+
return document.addEventListener("keydown", s), () => document.removeEventListener("keydown", s);
|
|
1124
|
+
}, [a, E]);
|
|
1125
|
+
const v = (s) => {
|
|
1126
|
+
s.target === S.current && E();
|
|
1127
|
+
}, C = (s) => {
|
|
1128
|
+
const T = parseInt(s.target.value, 10);
|
|
1129
|
+
!isNaN(T) && T >= 1900 && T <= 2100 && m(T);
|
|
1130
|
+
}, j = () => {
|
|
1131
|
+
p < 2100 && m(p + 1);
|
|
1132
|
+
}, d = () => {
|
|
1133
|
+
p > 1900 && m(p - 1);
|
|
1134
|
+
}, i = (s) => {
|
|
1135
|
+
f(s);
|
|
1136
|
+
}, b = (s) => {
|
|
1137
|
+
w(s), E();
|
|
1138
|
+
}, O = () => {
|
|
1139
|
+
const s = new Date(p, o, 1), T = ke(s), A = Re(s), Y = ne(T), V = _e(A), B = [];
|
|
1140
|
+
let L = Y;
|
|
1141
|
+
for (; L <= V; )
|
|
1142
|
+
B.push(L), L = Oe(L, 1);
|
|
1143
|
+
return B;
|
|
1144
|
+
};
|
|
1145
|
+
if (!a) return null;
|
|
1146
|
+
const k = O();
|
|
1147
|
+
return /* @__PURE__ */ t.jsx("div", { className: "bc-modal-overlay", ref: S, onClick: v, children: /* @__PURE__ */ t.jsxs("div", { className: "bc-modal bc-jump-modal", children: [
|
|
1148
|
+
/* @__PURE__ */ t.jsxs("div", { className: "bc-modal-header", children: [
|
|
1149
|
+
/* @__PURE__ */ t.jsx("h3", { children: "Jump to Date" }),
|
|
1150
|
+
/* @__PURE__ */ t.jsx("button", { className: "bc-modal-close", onClick: E, "aria-label": "Close", children: "×" })
|
|
1151
|
+
] }),
|
|
1152
|
+
/* @__PURE__ */ t.jsxs("div", { className: "bc-modal-body", children: [
|
|
1153
|
+
/* @__PURE__ */ t.jsxs("div", { className: "bc-jump-year-row", children: [
|
|
1154
|
+
/* @__PURE__ */ t.jsx("button", { className: "bc-jump-year-btn", onClick: d, "aria-label": "Previous year", children: "−" }),
|
|
1155
|
+
/* @__PURE__ */ t.jsx(
|
|
1156
|
+
"input",
|
|
1157
|
+
{
|
|
1158
|
+
ref: c,
|
|
1159
|
+
type: "number",
|
|
1160
|
+
className: "bc-jump-year-input",
|
|
1161
|
+
value: p,
|
|
1162
|
+
onChange: C,
|
|
1163
|
+
min: 1900,
|
|
1164
|
+
max: 2100,
|
|
1165
|
+
"aria-label": "Year"
|
|
1166
|
+
}
|
|
1167
|
+
),
|
|
1168
|
+
/* @__PURE__ */ t.jsx("button", { className: "bc-jump-year-btn", onClick: j, "aria-label": "Next year", children: "+" })
|
|
1169
|
+
] }),
|
|
1170
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-jump-month-grid", children: $t.map((s, T) => /* @__PURE__ */ t.jsx(
|
|
1171
|
+
"button",
|
|
1172
|
+
{
|
|
1173
|
+
className: `bc-jump-month-btn ${o === T ? "bc-jump-selected" : ""}`,
|
|
1174
|
+
onClick: () => i(T),
|
|
1175
|
+
children: s
|
|
1176
|
+
},
|
|
1177
|
+
s
|
|
1178
|
+
)) }),
|
|
1179
|
+
/* @__PURE__ */ t.jsxs("div", { className: "bc-jump-calendar", children: [
|
|
1180
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-jump-weekdays", children: Ft.map((s) => /* @__PURE__ */ t.jsx("div", { className: "bc-jump-weekday", children: s }, s)) }),
|
|
1181
|
+
/* @__PURE__ */ t.jsx("div", { className: "bc-jump-days", children: k.map((s, T) => {
|
|
1182
|
+
const A = new Date(p, o, 1), Y = et(s, A), V = Q(s, y), B = ae(s);
|
|
1183
|
+
return /* @__PURE__ */ t.jsx(
|
|
1184
|
+
"button",
|
|
1185
|
+
{
|
|
1186
|
+
className: `bc-jump-day ${Y ? "" : "bc-jump-day-muted"} ${V ? "bc-jump-day-selected" : ""} ${B ? "bc-jump-day-today" : ""}`,
|
|
1187
|
+
onClick: () => b(s),
|
|
1188
|
+
children: s.getDate()
|
|
1189
|
+
},
|
|
1190
|
+
T
|
|
1191
|
+
);
|
|
1192
|
+
}) })
|
|
1193
|
+
] })
|
|
1194
|
+
] })
|
|
1195
|
+
] }) });
|
|
1196
|
+
}
|
|
1197
|
+
function Wt({
|
|
1102
1198
|
bookings: a,
|
|
1103
|
-
onCreateBooking:
|
|
1104
|
-
onUpdateBooking:
|
|
1105
|
-
onDeleteBooking:
|
|
1106
|
-
onSendConfirmation:
|
|
1107
|
-
initialView:
|
|
1108
|
-
initialDate:
|
|
1109
|
-
className:
|
|
1199
|
+
onCreateBooking: y,
|
|
1200
|
+
onUpdateBooking: E,
|
|
1201
|
+
onDeleteBooking: w,
|
|
1202
|
+
onSendConfirmation: p,
|
|
1203
|
+
initialView: m = "week",
|
|
1204
|
+
initialDate: o = /* @__PURE__ */ new Date(),
|
|
1205
|
+
className: f = ""
|
|
1110
1206
|
}) {
|
|
1111
|
-
const [
|
|
1207
|
+
const [c, S] = _(o), [v, C] = _(m), [j, d] = _(
|
|
1112
1208
|
null
|
|
1113
|
-
), [
|
|
1114
|
-
|
|
1115
|
-
},
|
|
1116
|
-
|
|
1117
|
-
},
|
|
1118
|
-
|
|
1119
|
-
},
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1122
|
-
},
|
|
1123
|
-
const
|
|
1124
|
-
|
|
1125
|
-
},
|
|
1209
|
+
), [i, b] = _(!1), [O, k] = _(!1), [s, T] = _(null), A = (h, K) => {
|
|
1210
|
+
T({ start: h, end: K }), d(null), b(!0);
|
|
1211
|
+
}, Y = (h) => {
|
|
1212
|
+
d(h), T(null), b(!0);
|
|
1213
|
+
}, V = () => {
|
|
1214
|
+
b(!1), d(null), T(null);
|
|
1215
|
+
}, B = () => {
|
|
1216
|
+
const h = new Date(c);
|
|
1217
|
+
v === "month" ? h.setMonth(h.getMonth() - 1) : v === "week" ? h.setDate(h.getDate() - 7) : h.setDate(h.getDate() - 1), S(h);
|
|
1218
|
+
}, L = () => {
|
|
1219
|
+
const h = new Date(c);
|
|
1220
|
+
v === "month" ? h.setMonth(h.getMonth() + 1) : v === "week" ? h.setDate(h.getDate() + 7) : h.setDate(h.getDate() + 1), S(h);
|
|
1221
|
+
}, q = () => {
|
|
1126
1222
|
S(/* @__PURE__ */ new Date());
|
|
1223
|
+
}, z = (h) => {
|
|
1224
|
+
S(h);
|
|
1127
1225
|
};
|
|
1128
|
-
return /* @__PURE__ */ t.jsxs("div", { className: `booking-calendar ${
|
|
1226
|
+
return /* @__PURE__ */ t.jsxs("div", { className: `booking-calendar ${f}`, children: [
|
|
1129
1227
|
/* @__PURE__ */ t.jsxs("div", { className: "booking-calendar-header", children: [
|
|
1130
1228
|
/* @__PURE__ */ t.jsxs("div", { className: "booking-calendar-nav", children: [
|
|
1131
|
-
/* @__PURE__ */ t.jsx("button", { onClick:
|
|
1132
|
-
/* @__PURE__ */ t.jsx("button", { onClick:
|
|
1133
|
-
/* @__PURE__ */ t.jsx("button", { onClick:
|
|
1134
|
-
/* @__PURE__ */ t.jsx("h2", { className: "current-date", children: l.toLocaleDateString("en-US", {
|
|
1135
|
-
month: "long",
|
|
1136
|
-
year: "numeric"
|
|
1137
|
-
}) })
|
|
1229
|
+
/* @__PURE__ */ t.jsx("button", { onClick: B, className: "nav-btn", "aria-label": "Previous", children: "←" }),
|
|
1230
|
+
/* @__PURE__ */ t.jsx("button", { onClick: q, className: "nav-btn", children: "Today" }),
|
|
1231
|
+
/* @__PURE__ */ t.jsx("button", { onClick: L, className: "nav-btn", "aria-label": "Next", children: "→" })
|
|
1138
1232
|
] }),
|
|
1233
|
+
/* @__PURE__ */ t.jsx(
|
|
1234
|
+
"button",
|
|
1235
|
+
{
|
|
1236
|
+
className: "current-date current-date-btn",
|
|
1237
|
+
onClick: () => k(!0),
|
|
1238
|
+
"aria-label": "Jump to date",
|
|
1239
|
+
children: c.toLocaleDateString("en-US", {
|
|
1240
|
+
month: "long",
|
|
1241
|
+
year: "numeric"
|
|
1242
|
+
})
|
|
1243
|
+
}
|
|
1244
|
+
),
|
|
1139
1245
|
/* @__PURE__ */ t.jsxs("div", { className: "booking-calendar-view-switcher", children: [
|
|
1140
1246
|
/* @__PURE__ */ t.jsx(
|
|
1141
1247
|
"button",
|
|
1142
1248
|
{
|
|
1143
|
-
onClick: () =>
|
|
1144
|
-
className:
|
|
1249
|
+
onClick: () => C("month"),
|
|
1250
|
+
className: v === "month" ? "active" : "",
|
|
1251
|
+
"aria-label": "Month view",
|
|
1145
1252
|
children: "Month"
|
|
1146
1253
|
}
|
|
1147
1254
|
),
|
|
1148
1255
|
/* @__PURE__ */ t.jsx(
|
|
1149
1256
|
"button",
|
|
1150
1257
|
{
|
|
1151
|
-
onClick: () =>
|
|
1152
|
-
className:
|
|
1258
|
+
onClick: () => C("week"),
|
|
1259
|
+
className: v === "week" ? "active" : "",
|
|
1260
|
+
"aria-label": "Week view",
|
|
1153
1261
|
children: "Week"
|
|
1154
1262
|
}
|
|
1155
1263
|
),
|
|
1156
1264
|
/* @__PURE__ */ t.jsx(
|
|
1157
1265
|
"button",
|
|
1158
1266
|
{
|
|
1159
|
-
onClick: () =>
|
|
1160
|
-
className:
|
|
1267
|
+
onClick: () => C("day"),
|
|
1268
|
+
className: v === "day" ? "active" : "",
|
|
1269
|
+
"aria-label": "Day view",
|
|
1161
1270
|
children: "Day"
|
|
1162
1271
|
}
|
|
1163
1272
|
)
|
|
1164
1273
|
] })
|
|
1165
1274
|
] }),
|
|
1166
1275
|
/* @__PURE__ */ t.jsxs("div", { className: "booking-calendar-body", children: [
|
|
1167
|
-
|
|
1168
|
-
|
|
1276
|
+
v === "month" && /* @__PURE__ */ t.jsx(
|
|
1277
|
+
_t,
|
|
1169
1278
|
{
|
|
1170
|
-
currentDate:
|
|
1279
|
+
currentDate: c,
|
|
1171
1280
|
bookings: a,
|
|
1172
|
-
onSlotClick:
|
|
1173
|
-
onBookingClick:
|
|
1281
|
+
onSlotClick: A,
|
|
1282
|
+
onBookingClick: Y
|
|
1174
1283
|
}
|
|
1175
1284
|
),
|
|
1176
|
-
|
|
1177
|
-
|
|
1285
|
+
v === "week" && /* @__PURE__ */ t.jsx(
|
|
1286
|
+
Ot,
|
|
1178
1287
|
{
|
|
1179
|
-
currentDate:
|
|
1288
|
+
currentDate: c,
|
|
1180
1289
|
bookings: a,
|
|
1181
|
-
onSlotClick:
|
|
1182
|
-
onBookingClick:
|
|
1290
|
+
onSlotClick: A,
|
|
1291
|
+
onBookingClick: Y
|
|
1183
1292
|
}
|
|
1184
1293
|
),
|
|
1185
|
-
|
|
1186
|
-
|
|
1294
|
+
v === "day" && /* @__PURE__ */ t.jsx(
|
|
1295
|
+
Pt,
|
|
1187
1296
|
{
|
|
1188
|
-
currentDate:
|
|
1297
|
+
currentDate: c,
|
|
1189
1298
|
bookings: a,
|
|
1190
|
-
onSlotClick:
|
|
1191
|
-
onBookingClick:
|
|
1299
|
+
onSlotClick: A,
|
|
1300
|
+
onBookingClick: Y
|
|
1192
1301
|
}
|
|
1193
1302
|
)
|
|
1194
1303
|
] }),
|
|
1195
|
-
|
|
1196
|
-
|
|
1304
|
+
i && /* @__PURE__ */ t.jsx(
|
|
1305
|
+
Mt,
|
|
1306
|
+
{
|
|
1307
|
+
booking: j,
|
|
1308
|
+
initialSlot: s,
|
|
1309
|
+
onClose: V,
|
|
1310
|
+
onCreate: y,
|
|
1311
|
+
onUpdate: E,
|
|
1312
|
+
onDelete: w,
|
|
1313
|
+
onSendConfirmation: p
|
|
1314
|
+
}
|
|
1315
|
+
),
|
|
1316
|
+
O && /* @__PURE__ */ t.jsx(
|
|
1317
|
+
It,
|
|
1197
1318
|
{
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
onClose:
|
|
1201
|
-
|
|
1202
|
-
onUpdate: C,
|
|
1203
|
-
onDelete: b,
|
|
1204
|
-
onSendConfirmation: y
|
|
1319
|
+
isOpen: O,
|
|
1320
|
+
currentDate: c,
|
|
1321
|
+
onClose: () => k(!1),
|
|
1322
|
+
onSelect: z
|
|
1205
1323
|
}
|
|
1206
1324
|
)
|
|
1207
1325
|
] });
|
|
1208
1326
|
}
|
|
1209
|
-
function
|
|
1327
|
+
function Bt({
|
|
1210
1328
|
status: a,
|
|
1211
|
-
size:
|
|
1329
|
+
size: y = "md"
|
|
1212
1330
|
}) {
|
|
1213
1331
|
return /* @__PURE__ */ t.jsx(
|
|
1214
1332
|
"span",
|
|
1215
1333
|
{
|
|
1216
|
-
className: `bc-delivery-badge bc-delivery-${a.toLowerCase()} bc-badge-${
|
|
1334
|
+
className: `bc-delivery-badge bc-delivery-${a.toLowerCase()} bc-badge-${y}`,
|
|
1217
1335
|
children: a
|
|
1218
1336
|
}
|
|
1219
1337
|
);
|
|
1220
1338
|
}
|
|
1221
|
-
function
|
|
1222
|
-
return { getWeekDays: (
|
|
1223
|
-
const
|
|
1224
|
-
return Array.from({ length: 7 }, (
|
|
1225
|
-
}, getMonthDays: (
|
|
1226
|
-
const
|
|
1227
|
-
return
|
|
1228
|
-
}, getTimeSlots: (
|
|
1229
|
-
const
|
|
1230
|
-
for (let
|
|
1231
|
-
for (let
|
|
1232
|
-
|
|
1233
|
-
return
|
|
1339
|
+
function Lt() {
|
|
1340
|
+
return { getWeekDays: (w) => {
|
|
1341
|
+
const p = ne(w);
|
|
1342
|
+
return Array.from({ length: 7 }, (m, o) => Oe(p, o));
|
|
1343
|
+
}, getMonthDays: (w) => {
|
|
1344
|
+
const p = ke(w), m = Re(w), o = ne(p), f = _e(m);
|
|
1345
|
+
return Qe({ start: o, end: f });
|
|
1346
|
+
}, getTimeSlots: (w = 30) => {
|
|
1347
|
+
const p = [];
|
|
1348
|
+
for (let m = 0; m < 24; m++)
|
|
1349
|
+
for (let o = 0; o < 60; o += w)
|
|
1350
|
+
p.push({ hour: m, minute: o });
|
|
1351
|
+
return p;
|
|
1234
1352
|
} };
|
|
1235
1353
|
}
|
|
1236
|
-
function
|
|
1237
|
-
const [a,
|
|
1354
|
+
function Vt() {
|
|
1355
|
+
const [a, y] = _({
|
|
1238
1356
|
isDragging: !1,
|
|
1239
1357
|
draggedEventId: null,
|
|
1240
1358
|
startX: 0,
|
|
1241
1359
|
startY: 0,
|
|
1242
1360
|
currentX: 0,
|
|
1243
1361
|
currentY: 0
|
|
1244
|
-
}),
|
|
1245
|
-
|
|
1362
|
+
}), E = he((o, f, c) => {
|
|
1363
|
+
y({
|
|
1246
1364
|
isDragging: !0,
|
|
1247
|
-
draggedEventId:
|
|
1248
|
-
startX:
|
|
1249
|
-
startY:
|
|
1250
|
-
currentX:
|
|
1251
|
-
currentY:
|
|
1365
|
+
draggedEventId: o,
|
|
1366
|
+
startX: f,
|
|
1367
|
+
startY: c,
|
|
1368
|
+
currentX: f,
|
|
1369
|
+
currentY: c
|
|
1252
1370
|
});
|
|
1253
|
-
}, []),
|
|
1254
|
-
|
|
1255
|
-
...
|
|
1256
|
-
currentX:
|
|
1257
|
-
currentY:
|
|
1371
|
+
}, []), w = he((o, f) => {
|
|
1372
|
+
y((c) => ({
|
|
1373
|
+
...c,
|
|
1374
|
+
currentX: o,
|
|
1375
|
+
currentY: f
|
|
1258
1376
|
}));
|
|
1259
|
-
}, []),
|
|
1260
|
-
|
|
1377
|
+
}, []), p = he(() => {
|
|
1378
|
+
y({
|
|
1261
1379
|
isDragging: !1,
|
|
1262
1380
|
draggedEventId: null,
|
|
1263
1381
|
startX: 0,
|
|
@@ -1265,27 +1383,28 @@ function Bt() {
|
|
|
1265
1383
|
currentX: 0,
|
|
1266
1384
|
currentY: 0
|
|
1267
1385
|
});
|
|
1268
|
-
}, []),
|
|
1386
|
+
}, []), m = he(() => ({
|
|
1269
1387
|
x: a.currentX - a.startX,
|
|
1270
1388
|
y: a.currentY - a.startY
|
|
1271
1389
|
}), [a]);
|
|
1272
1390
|
return {
|
|
1273
1391
|
dragState: a,
|
|
1274
|
-
handleDragStart:
|
|
1275
|
-
handleDragMove:
|
|
1276
|
-
handleDragEnd:
|
|
1277
|
-
getDragOffset:
|
|
1392
|
+
handleDragStart: E,
|
|
1393
|
+
handleDragMove: w,
|
|
1394
|
+
handleDragEnd: p,
|
|
1395
|
+
getDragOffset: m
|
|
1278
1396
|
};
|
|
1279
1397
|
}
|
|
1280
1398
|
export {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1399
|
+
Wt as BookingCalendar,
|
|
1400
|
+
Mt as BookingModal,
|
|
1401
|
+
pe as BookingStatusBadge,
|
|
1402
|
+
Pt as DayView,
|
|
1403
|
+
Bt as DeliveryStatusBadge,
|
|
1404
|
+
It as JumpToDateModal,
|
|
1405
|
+
_t as MonthView,
|
|
1406
|
+
Ot as WeekView,
|
|
1407
|
+
Lt as useCalendarGrid,
|
|
1408
|
+
Vt as useDragInteractions,
|
|
1409
|
+
rt as useEventLayout
|
|
1291
1410
|
};
|