doct-ui-auth-kit 1.0.4 → 1.0.6

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.
@@ -1,1714 +0,0 @@
1
- import { jsxs as F, jsx as p, Fragment as Be } from "react/jsx-runtime";
2
- import { DoctTypography as I, DoctButton as M, DoctPhoneInput as He, DoctLabeledInput as Ge, DoctOtpInput as Ve } from "docthub-core-components";
3
- import { useFormContext as ne, Controller as ve, useForm as be, FormProvider as ye } from "react-hook-form";
4
- import H, { createContext as qe, useContext as Ye, useState as V, useEffect as te, useRef as le } from "react";
5
- import { z as W } from "zod";
6
- var ce = { exports: {} }, he = {};
7
- var Ee;
8
- function Ke() {
9
- if (Ee) return he;
10
- Ee = 1;
11
- var n = H.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
12
- return he.c = function(e) {
13
- return n.H.useMemoCache(e);
14
- }, he;
15
- }
16
- var ge = {};
17
- var Pe;
18
- function Xe() {
19
- return Pe || (Pe = 1, process.env.NODE_ENV !== "production" && (function() {
20
- var n = H.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
21
- ge.c = function(e) {
22
- var t = n.H;
23
- return t === null && console.error(
24
- `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
25
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
26
- 2. You might be breaking the Rules of Hooks
27
- 3. You might have more than one copy of React in the same app
28
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
29
- ), t.useMemoCache(e);
30
- };
31
- })()), ge;
32
- }
33
- var Ae;
34
- function Ze() {
35
- return Ae || (Ae = 1, process.env.NODE_ENV === "production" ? ce.exports = Ke() : ce.exports = Xe()), ce.exports;
36
- }
37
- var E = Ze(), Me = {
38
- color: void 0,
39
- size: void 0,
40
- className: void 0,
41
- style: void 0,
42
- attr: void 0
43
- }, Oe = H.createContext && /* @__PURE__ */ H.createContext(Me), Je = ["attr", "size", "title"];
44
- function Qe(n, e) {
45
- if (n == null) return {};
46
- var t = et(n, e), l, s;
47
- if (Object.getOwnPropertySymbols) {
48
- var o = Object.getOwnPropertySymbols(n);
49
- for (s = 0; s < o.length; s++)
50
- l = o[s], !(e.indexOf(l) >= 0) && Object.prototype.propertyIsEnumerable.call(n, l) && (t[l] = n[l]);
51
- }
52
- return t;
53
- }
54
- function et(n, e) {
55
- if (n == null) return {};
56
- var t = {};
57
- for (var l in n)
58
- if (Object.prototype.hasOwnProperty.call(n, l)) {
59
- if (e.indexOf(l) >= 0) continue;
60
- t[l] = n[l];
61
- }
62
- return t;
63
- }
64
- function de() {
65
- return de = Object.assign ? Object.assign.bind() : function(n) {
66
- for (var e = 1; e < arguments.length; e++) {
67
- var t = arguments[e];
68
- for (var l in t)
69
- Object.prototype.hasOwnProperty.call(t, l) && (n[l] = t[l]);
70
- }
71
- return n;
72
- }, de.apply(this, arguments);
73
- }
74
- function Te(n, e) {
75
- var t = Object.keys(n);
76
- if (Object.getOwnPropertySymbols) {
77
- var l = Object.getOwnPropertySymbols(n);
78
- e && (l = l.filter(function(s) {
79
- return Object.getOwnPropertyDescriptor(n, s).enumerable;
80
- })), t.push.apply(t, l);
81
- }
82
- return t;
83
- }
84
- function fe(n) {
85
- for (var e = 1; e < arguments.length; e++) {
86
- var t = arguments[e] != null ? arguments[e] : {};
87
- e % 2 ? Te(Object(t), !0).forEach(function(l) {
88
- tt(n, l, t[l]);
89
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Te(Object(t)).forEach(function(l) {
90
- Object.defineProperty(n, l, Object.getOwnPropertyDescriptor(t, l));
91
- });
92
- }
93
- return n;
94
- }
95
- function tt(n, e, t) {
96
- return e = nt(e), e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
97
- }
98
- function nt(n) {
99
- var e = lt(n, "string");
100
- return typeof e == "symbol" ? e : e + "";
101
- }
102
- function lt(n, e) {
103
- if (typeof n != "object" || !n) return n;
104
- var t = n[Symbol.toPrimitive];
105
- if (t !== void 0) {
106
- var l = t.call(n, e);
107
- if (typeof l != "object") return l;
108
- throw new TypeError("@@toPrimitive must return a primitive value.");
109
- }
110
- return (e === "string" ? String : Number)(n);
111
- }
112
- function ke(n) {
113
- return n && n.map((e, t) => /* @__PURE__ */ H.createElement(e.tag, fe({
114
- key: t
115
- }, e.attr), ke(e.child)));
116
- }
117
- function me(n) {
118
- return (e) => /* @__PURE__ */ H.createElement(it, de({
119
- attr: fe({}, n.attr)
120
- }, e), ke(n.child));
121
- }
122
- function it(n) {
123
- var e = (t) => {
124
- var {
125
- attr: l,
126
- size: s,
127
- title: o
128
- } = n, i = Qe(n, Je), r = s || t.size || "1em", c;
129
- return t.className && (c = t.className), n.className && (c = (c ? c + " " : "") + n.className), /* @__PURE__ */ H.createElement("svg", de({
130
- stroke: "currentColor",
131
- fill: "currentColor",
132
- strokeWidth: "0"
133
- }, t.attr, l, i, {
134
- className: c,
135
- style: fe(fe({
136
- color: n.color || t.color
137
- }, t.style), n.style),
138
- height: r,
139
- width: r,
140
- xmlns: "http://www.w3.org/2000/svg"
141
- }), o && /* @__PURE__ */ H.createElement("title", null, o), n.children);
142
- };
143
- return Oe !== void 0 ? /* @__PURE__ */ H.createElement(Oe.Consumer, null, (t) => e(t)) : e(Me);
144
- }
145
- function Se(n) {
146
- return me({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }, child: [] }] })(n);
147
- }
148
- function ot(n) {
149
- return me({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }, child: [] }] })(n);
150
- }
151
- const De = ["/slider/slide-1.png", "/slider/slide-2.png", "/slider/slide-3.png", "/slider/slide-4.png", "/slider/slide-5.png"], st = 5e3;
152
- function We(n) {
153
- var e, t, l = "";
154
- if (typeof n == "string" || typeof n == "number") l += n;
155
- else if (typeof n == "object") if (Array.isArray(n)) {
156
- var s = n.length;
157
- for (e = 0; e < s; e++) n[e] && (t = We(n[e])) && (l && (l += " "), l += t);
158
- } else for (t in n) n[t] && (l && (l += " "), l += t);
159
- return l;
160
- }
161
- function R() {
162
- for (var n, e, t = 0, l = "", s = arguments.length; t < s; t++) (n = arguments[t]) && (e = We(n)) && (l && (l += " "), l += e);
163
- return l;
164
- }
165
- const $e = qe(null);
166
- function xe() {
167
- const n = Ye($e);
168
- if (!n)
169
- throw new Error("AuthLayout compound components must be used within AuthLayout.Root");
170
- return n;
171
- }
172
- function rt(n, e) {
173
- return e === "md" ? "max-w-md" : e === "lg" ? "max-w-lg" : n === "desktop" ? "max-w-[320px]" : "max-w-[360px]";
174
- }
175
- function we(n = "center") {
176
- switch (n) {
177
- case "left":
178
- return {
179
- flex: "justify-start",
180
- text: "text-left"
181
- };
182
- case "right":
183
- return {
184
- flex: "justify-end",
185
- text: "text-right"
186
- };
187
- default:
188
- return {
189
- flex: "justify-center",
190
- text: "text-center"
191
- };
192
- }
193
- }
194
- function at(n) {
195
- const e = E.c(18), {
196
- children: t,
197
- variant: l,
198
- maxWidth: s,
199
- className: o,
200
- contentClassName: i
201
- } = n, r = l === void 0 ? "mobile" : l, c = s === void 0 ? "sm" : s;
202
- let a;
203
- e[0] !== c || e[1] !== r ? (a = rt(r, c), e[0] = c, e[1] = r, e[2] = a) : a = e[2];
204
- const m = a;
205
- let g;
206
- e[3] !== c || e[4] !== m || e[5] !== r ? (g = {
207
- variant: r,
208
- maxWidth: c,
209
- maxWidthClass: m
210
- }, e[3] = c, e[4] = m, e[5] = r, e[6] = g) : g = e[6];
211
- const u = g;
212
- let d;
213
- e[7] !== o ? (d = R("min-h-svh w-full bg-white flex flex-col", o), e[7] = o, e[8] = d) : d = e[8];
214
- let f;
215
- e[9] !== t || e[10] !== d ? (f = /* @__PURE__ */ p("div", { className: d, children: t }), e[9] = t, e[10] = d, e[11] = f) : f = e[11];
216
- let h;
217
- e[12] !== i ? (h = /* @__PURE__ */ p("div", { className: "hidden", children: i }), e[12] = i, e[13] = h) : h = e[13];
218
- let v;
219
- return e[14] !== u || e[15] !== f || e[16] !== h ? (v = /* @__PURE__ */ F($e.Provider, { value: u, children: [
220
- f,
221
- h
222
- ] }), e[14] = u, e[15] = f, e[16] = h, e[17] = v) : v = e[17], v;
223
- }
224
- function ct(n) {
225
- const e = E.c(12), {
226
- children: t,
227
- className: l
228
- } = n, {
229
- variant: s
230
- } = xe();
231
- if (s === "desktop") {
232
- let r;
233
- e[0] !== l ? (r = R("flex justify-end px-5 pt-5 md:px-[20px] md:pt-[20px]", l), e[0] = l, e[1] = r) : r = e[1];
234
- let c;
235
- e[2] !== t ? (c = /* @__PURE__ */ p("div", { className: "w-auto", children: t }), e[2] = t, e[3] = c) : c = e[3];
236
- let a;
237
- return e[4] !== r || e[5] !== c ? (a = /* @__PURE__ */ p("div", { className: r, children: c }), e[4] = r, e[5] = c, e[6] = a) : a = e[6], a;
238
- }
239
- let o;
240
- e[7] !== l ? (o = R("mb-4 w-full md:mb-6", l), e[7] = l, e[8] = o) : o = e[8];
241
- let i;
242
- return e[9] !== t || e[10] !== o ? (i = /* @__PURE__ */ p("div", { className: o, children: t }), e[9] = t, e[10] = o, e[11] = i) : i = e[11], i;
243
- }
244
- function ut(n) {
245
- const e = E.c(6), {
246
- children: t,
247
- align: l,
248
- className: s
249
- } = n, o = l === void 0 ? "center" : l;
250
- let i;
251
- if (e[0] !== o || e[1] !== s) {
252
- const {
253
- flex: c
254
- } = we(o);
255
- i = R("flex w-full mb-4 md:mb-6", c, s), e[0] = o, e[1] = s, e[2] = i;
256
- } else
257
- i = e[2];
258
- let r;
259
- return e[3] !== t || e[4] !== i ? (r = /* @__PURE__ */ p("div", { className: i, children: t }), e[3] = t, e[4] = i, e[5] = r) : r = e[5], r;
260
- }
261
- function dt(n) {
262
- const e = E.c(6), {
263
- children: t,
264
- align: l,
265
- className: s
266
- } = n, o = l === void 0 ? "center" : l;
267
- let i;
268
- if (e[0] !== o || e[1] !== s) {
269
- const {
270
- flex: c,
271
- text: a
272
- } = we(o);
273
- i = R("flex w-full mb-4 md:mb-6", c, a, s), e[0] = o, e[1] = s, e[2] = i;
274
- } else
275
- i = e[2];
276
- let r;
277
- return e[3] !== t || e[4] !== i ? (r = /* @__PURE__ */ p("div", { className: i, children: t }), e[3] = t, e[4] = i, e[5] = r) : r = e[5], r;
278
- }
279
- function ft(n) {
280
- const e = E.c(6), {
281
- children: t,
282
- align: l,
283
- className: s
284
- } = n, o = l === void 0 ? "center" : l;
285
- let i;
286
- if (e[0] !== o || e[1] !== s) {
287
- const {
288
- flex: c,
289
- text: a
290
- } = we(o);
291
- i = R("flex w-full mb-4 md:mb-6", c, a, s), e[0] = o, e[1] = s, e[2] = i;
292
- } else
293
- i = e[2];
294
- let r;
295
- return e[3] !== t || e[4] !== i ? (r = /* @__PURE__ */ p("div", { className: i, children: t }), e[3] = t, e[4] = i, e[5] = r) : r = e[5], r;
296
- }
297
- function mt(n) {
298
- const e = E.c(5), {
299
- children: t,
300
- className: l
301
- } = n;
302
- let s;
303
- e[0] !== l ? (s = R("w-full flex flex-col space-y-4 mb-4 md:mb-6", l), e[0] = l, e[1] = s) : s = e[1];
304
- let o;
305
- return e[2] !== t || e[3] !== s ? (o = /* @__PURE__ */ p("div", { className: s, children: t }), e[2] = t, e[3] = s, e[4] = o) : o = e[4], o;
306
- }
307
- function ht(n) {
308
- const e = E.c(10), {
309
- children: t,
310
- sm: l,
311
- className: s
312
- } = n, {
313
- maxWidthClass: o
314
- } = xe();
315
- let i;
316
- e[0] !== s ? (i = R("flex-1 flex flex-col items-center justify-center", "px-5 py-8 md:py-12", "w-full", s), e[0] = s, e[1] = i) : i = e[1];
317
- const r = l ? "max-w-[320px]" : o;
318
- let c;
319
- e[2] !== r ? (c = R("w-full flex flex-col items-center", r), e[2] = r, e[3] = c) : c = e[3];
320
- let a;
321
- e[4] !== t || e[5] !== c ? (a = /* @__PURE__ */ p("div", { className: c, children: t }), e[4] = t, e[5] = c, e[6] = a) : a = e[6];
322
- let m;
323
- return e[7] !== i || e[8] !== a ? (m = /* @__PURE__ */ p("main", { className: i, children: a }), e[7] = i, e[8] = a, e[9] = m) : m = e[9], m;
324
- }
325
- function gt(n) {
326
- const e = E.c(10), {
327
- children: t,
328
- className: l
329
- } = n, {
330
- maxWidthClass: s
331
- } = xe();
332
- let o;
333
- e[0] !== l ? (o = R("px-5 py-6 md:py-8 w-full flex justify-center", l), e[0] = l, e[1] = o) : o = e[1];
334
- let i;
335
- e[2] !== s ? (i = R("w-full text-center", s), e[2] = s, e[3] = i) : i = e[3];
336
- let r;
337
- e[4] !== t || e[5] !== i ? (r = /* @__PURE__ */ p("div", { className: i, children: t }), e[4] = t, e[5] = i, e[6] = r) : r = e[6];
338
- let c;
339
- return e[7] !== o || e[8] !== r ? (c = /* @__PURE__ */ p("footer", { className: o, children: r }), e[7] = o, e[8] = r, e[9] = c) : c = e[9], c;
340
- }
341
- const B = {
342
- Root: at,
343
- Header: ct,
344
- Main: ht,
345
- Logo: ut,
346
- Title: dt,
347
- Description: ft,
348
- Body: mt,
349
- Footer: gt
350
- };
351
- function pt(n) {
352
- const e = E.c(38), {
353
- images: t,
354
- autoPlayInterval: l,
355
- className: s,
356
- hideIndicators: o,
357
- onSlideChange: i,
358
- activeIndex: r,
359
- onNavigate: c
360
- } = n, a = l === void 0 ? 5e3 : l, [m, g] = V(0), u = r !== void 0, d = u ? r : m;
361
- let f, h;
362
- e[0] !== a || e[1] !== d || e[2] !== t.length || e[3] !== u || e[4] !== i ? (f = () => {
363
- if (a > 0 && t.length > 1) {
364
- const O = setInterval(() => {
365
- const T = (d + 1) % t.length;
366
- u || g(T), i?.(T);
367
- }, a);
368
- return () => clearInterval(O);
369
- }
370
- }, h = [a, t.length, d, u, i], e[0] = a, e[1] = d, e[2] = t.length, e[3] = u, e[4] = i, e[5] = f, e[6] = h) : (f = e[5], h = e[6]), te(f, h);
371
- let v, b;
372
- e[7] !== t.length || e[8] !== u || e[9] !== i ? (v = () => {
373
- !u && t.length > 0 && i?.(0);
374
- }, b = [t.length, u, i], e[7] = t.length, e[8] = u, e[9] = i, e[10] = v, e[11] = b) : (v = e[10], b = e[11]), te(v, b);
375
- let y;
376
- e[12] !== u || e[13] !== c || e[14] !== i ? (y = (O) => {
377
- u ? (c?.(O), i?.(O)) : (g(O), i?.(O));
378
- }, e[12] = u, e[13] = c, e[14] = i, e[15] = y) : y = e[15];
379
- const w = y;
380
- if (t.length === 0)
381
- return null;
382
- const x = t.length;
383
- let S;
384
- e[16] !== s ? (S = R("relative w-full h-full min-h-0", s), e[16] = s, e[17] = S) : S = e[17];
385
- const C = `${x * 100}%`, _ = `translateX(-${d * 100 / x}%)`;
386
- let N;
387
- e[18] !== C || e[19] !== _ ? (N = {
388
- width: C,
389
- transform: _
390
- }, e[18] = C, e[19] = _, e[20] = N) : N = e[20];
391
- let P;
392
- if (e[21] !== t || e[22] !== x) {
393
- let O;
394
- e[24] !== x ? (O = (T, D) => /* @__PURE__ */ p("div", { className: "relative flex-shrink-0 h-full", style: {
395
- width: `${100 / x}%`
396
- }, children: /* @__PURE__ */ p("img", { src: T, alt: `Slide ${D + 1}`, className: "h-full w-full object-cover object-center" }) }, `${T}-${D}`), e[24] = x, e[25] = O) : O = e[25], P = t.map(O), e[21] = t, e[22] = x, e[23] = P;
397
- } else
398
- P = e[23];
399
- let A;
400
- e[26] !== N || e[27] !== P ? (A = /* @__PURE__ */ p("div", { className: "relative w-full h-full overflow-hidden", children: /* @__PURE__ */ p("div", { className: "flex h-full transition-transform duration-500 ease-in-out", style: N, children: P }) }), e[26] = N, e[27] = P, e[28] = A) : A = e[28];
401
- let L;
402
- e[29] !== d || e[30] !== w || e[31] !== o || e[32] !== t ? (L = t.length > 1 && !o && /* @__PURE__ */ p("div", { className: "absolute -top-10 left-1/2 flex -translate-x-1/2 gap-2 z-20", children: t.map((O, T) => /* @__PURE__ */ p("button", { type: "button", onClick: () => w(T), className: R("h-1 rounded-[3px] transition-all duration-300", T === d ? "w-8 bg-white" : "w-2 bg-white/40"), "aria-label": `Go to slide ${T + 1}` }, `indicator-${O}-${T}`)) }), e[29] = d, e[30] = w, e[31] = o, e[32] = t, e[33] = L) : L = e[33];
403
- let k;
404
- return e[34] !== A || e[35] !== L || e[36] !== S ? (k = /* @__PURE__ */ F("div", { className: S, children: [
405
- A,
406
- L
407
- ] }), e[34] = A, e[35] = L, e[36] = S, e[37] = k) : k = e[37], k;
408
- }
409
- function vt(n) {
410
- const e = E.c(20), {
411
- sliderImages: t,
412
- sliderAutoPlayInterval: l,
413
- activeSlideIndex: s,
414
- onSlideChange: o,
415
- ctaText: i,
416
- sliderTitles: r,
417
- className: c
418
- } = n, a = r?.[s];
419
- let m = i ?? null;
420
- if (a != null) {
421
- let v;
422
- e[0] !== a ? (v = typeof a == "string" ? /* @__PURE__ */ p(I, { variant: "h6", weight: "medium", align: "center", color: "#1e595a", className: "whitespace-pre-line", children: a }) : a, e[0] = a, e[1] = v) : v = e[1], m = v;
423
- }
424
- let g;
425
- e[2] !== c ? (g = R("relative w-full h-[100dvh] transition-colors duration-500", c), e[2] = c, e[3] = g) : g = e[3];
426
- let u;
427
- e[4] !== s || e[5] !== o || e[6] !== t ? (u = t.length > 1 && /* @__PURE__ */ p("div", { className: "absolute top-2.5 left-1/2 z-20 flex w-full max-w-[400px] -translate-x-1/2 gap-1.5 px-4", children: t.map((v, b) => /* @__PURE__ */ p("button", { type: "button", onClick: () => o(b), "aria-label": `Go to slide ${b + 1}`, "aria-current": b === s ? "true" : void 0, className: R("h-1 flex-1 rounded-[3px] cursor-pointer transition-all duration-300", b === s ? "bg-white" : "bg-white/40 hover:bg-white/60") }, `indicator-${v}-${b}`)) }), e[4] = s, e[5] = o, e[6] = t, e[7] = u) : u = e[7];
428
- let d;
429
- e[8] !== m ? (d = m != null && /* @__PURE__ */ p("div", { className: R("absolute left-1/2 top-[152.5px] z-10 flex w-[328px] -translate-x-1/2 items-center justify-center text-center transition-opacity duration-300"), children: m }), e[8] = m, e[9] = d) : d = e[9];
430
- let f;
431
- e[10] !== s || e[11] !== o || e[12] !== l || e[13] !== t ? (f = /* @__PURE__ */ p("div", { className: "absolute inset-0", children: t.length > 0 ? /* @__PURE__ */ p(pt, { images: t, autoPlayInterval: l, className: "h-full w-full", hideIndicators: !0, activeIndex: s, onSlideChange: o, onNavigate: o }) : /* @__PURE__ */ p("div", { className: "flex h-full w-full items-center justify-center bg-white/50 p-8", children: /* @__PURE__ */ p(I, { variant: "h6", weight: "medium", align: "center", className: "opacity-40 text-[#1e595a]", children: "No slides configured" }) }) }), e[10] = s, e[11] = o, e[12] = l, e[13] = t, e[14] = f) : f = e[14];
432
- let h;
433
- return e[15] !== g || e[16] !== u || e[17] !== d || e[18] !== f ? (h = /* @__PURE__ */ F("div", { className: g, children: [
434
- u,
435
- d,
436
- f
437
- ] }), e[15] = g, e[16] = u, e[17] = d, e[18] = f, e[19] = h) : h = e[19], h;
438
- }
439
- function bt(n) {
440
- const e = E.c(23), {
441
- sliderImages: t,
442
- sliderAutoPlayInterval: l,
443
- ctaText: s,
444
- sliderTitles: o,
445
- className: i,
446
- marketingClassName: r,
447
- contentClassName: c,
448
- children: a
449
- } = n, m = l === void 0 ? 5e3 : l, [g, u] = V(0), d = t ?? De;
450
- let f;
451
- e[0] !== i ? (f = R("min-h-svh w-full flex flex-1 flex-col transition-colors duration-500", i), e[0] = i, e[1] = f) : f = e[1];
452
- let h;
453
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = {
454
- backgroundColor: "#ffffff"
455
- }, e[2] = h) : h = e[2];
456
- let v;
457
- e[3] !== r ? (v = r && {
458
- className: r
459
- }, e[3] = r, e[4] = v) : v = e[4];
460
- let b;
461
- e[5] !== g || e[6] !== s || e[7] !== d || e[8] !== m || e[9] !== o || e[10] !== v ? (b = /* @__PURE__ */ p("div", { className: "hidden lg:block lg:w-[432px] lg:h-[100dvh] lg:flex-shrink-0 lg:flex-grow-0", children: /* @__PURE__ */ p(vt, { sliderImages: d, sliderAutoPlayInterval: m, activeSlideIndex: g, onSlideChange: u, ctaText: s, sliderTitles: o, ...v }) }), e[5] = g, e[6] = s, e[7] = d, e[8] = m, e[9] = o, e[10] = v, e[11] = b) : b = e[11];
462
- let y;
463
- e[12] !== c ? (y = R("flex-1 min-w-0 flex flex-col overflow-x-hidden", c), e[12] = c, e[13] = y) : y = e[13];
464
- let w;
465
- e[14] !== a || e[15] !== y ? (w = /* @__PURE__ */ p("div", { className: y, children: a }), e[14] = a, e[15] = y, e[16] = w) : w = e[16];
466
- let x;
467
- e[17] !== b || e[18] !== w ? (x = /* @__PURE__ */ F("div", { className: "flex w-full h-full min-h-svh flex-col lg:flex-row", children: [
468
- b,
469
- w
470
- ] }), e[17] = b, e[18] = w, e[19] = x) : x = e[19];
471
- let S;
472
- return e[20] !== f || e[21] !== x ? (S = /* @__PURE__ */ p("div", { className: f, style: h, children: x }), e[20] = f, e[21] = x, e[22] = S) : S = e[22], S;
473
- }
474
- function oe(n) {
475
- const e = E.c(58), {
476
- children: t,
477
- layoutType: l,
478
- logo: s,
479
- title: o,
480
- description: i,
481
- footer: r,
482
- header: c,
483
- onBack: a,
484
- backButton: m,
485
- sliderImages: g,
486
- sliderAutoPlayInterval: u,
487
- sliderTitles: d,
488
- variant: f,
489
- maxWidth: h,
490
- contentWidth: v,
491
- align: b,
492
- className: y
493
- } = n, w = l === void 0 ? "withSlider" : l, x = g === void 0 ? De : g, S = u === void 0 ? st : u, C = h === void 0 ? "sm" : h, _ = v === void 0 ? "default" : v, N = b === void 0 ? "center" : b, P = _ === "sm", A = f ?? (w === "withSlider" ? "desktop" : "mobile");
494
- let L;
495
- e[0] !== m || e[1] !== s || e[2] !== a ? (L = () => m ?? (a != null ? /* @__PURE__ */ p(M, { icon: /* @__PURE__ */ p(Se, {}), iconOnly: !0, onClick: a, size: "medium", variant: "outline", "aria-label": "Go back", className: "h-10 w-10" }) : s ? typeof s == "string" ? /* @__PURE__ */ p("div", { className: "h-[30px] w-[140px]", children: /* @__PURE__ */ p("img", { src: s, alt: "Docthub", className: "block h-full w-full object-cover" }) }) : s : null), e[0] = m, e[1] = s, e[2] = a, e[3] = L) : L = e[3];
496
- const k = L;
497
- let O;
498
- e[4] !== N || e[5] !== o ? (O = () => o ? typeof o == "string" ? /* @__PURE__ */ p(I, { variant: "h5", weight: "extraBold", align: N, className: "text-black", children: o }) : o : null, e[4] = N, e[5] = o, e[6] = O) : O = e[6];
499
- const T = O;
500
- let D;
501
- e[7] !== N || e[8] !== i ? (D = () => i ? typeof i == "string" ? /* @__PURE__ */ p(I, { variant: "title2", align: N, className: "text-black/80", children: i }) : i : null, e[7] = N, e[8] = i, e[9] = D) : D = e[9];
502
- const G = D;
503
- let $;
504
- e[10] !== c ? ($ = c && /* @__PURE__ */ p(B.Header, { children: c }), e[10] = c, e[11] = $) : $ = e[11];
505
- let j;
506
- e[12] !== k ? (j = k(), e[12] = k, e[13] = j) : j = e[13];
507
- let z;
508
- e[14] !== N || e[15] !== j ? (z = /* @__PURE__ */ p(B.Logo, { align: N, children: j }), e[14] = N, e[15] = j, e[16] = z) : z = e[16];
509
- let U;
510
- e[17] !== N || e[18] !== T || e[19] !== o ? (U = o && /* @__PURE__ */ p(B.Title, { align: N, children: T() }), e[17] = N, e[18] = T, e[19] = o, e[20] = U) : U = e[20];
511
- let q;
512
- e[21] !== N || e[22] !== i || e[23] !== G ? (q = i && /* @__PURE__ */ p(B.Description, { align: N, children: G() }), e[21] = N, e[22] = i, e[23] = G, e[24] = q) : q = e[24];
513
- let Y;
514
- e[25] !== t ? (Y = /* @__PURE__ */ p(B.Body, { children: t }), e[25] = t, e[26] = Y) : Y = e[26];
515
- let K;
516
- e[27] !== z || e[28] !== U || e[29] !== q || e[30] !== Y || e[31] !== P ? (K = /* @__PURE__ */ F(B.Main, { sm: P, children: [
517
- z,
518
- U,
519
- q,
520
- Y
521
- ] }), e[27] = z, e[28] = U, e[29] = q, e[30] = Y, e[31] = P, e[32] = K) : K = e[32];
522
- let X;
523
- e[33] !== r ? (X = r && /* @__PURE__ */ p(B.Footer, { children: r }), e[33] = r, e[34] = X) : X = e[34];
524
- let se;
525
- e[35] !== $ || e[36] !== K || e[37] !== X ? (se = /* @__PURE__ */ F(Be, { children: [
526
- $,
527
- K,
528
- X
529
- ] }), e[35] = $, e[36] = K, e[37] = X, e[38] = se) : se = e[38];
530
- const Z = se;
531
- if (w === "withSlider") {
532
- let Q;
533
- e[39] !== y ? (Q = y && {
534
- className: y
535
- }, e[39] = y, e[40] = Q) : Q = e[40];
536
- let ee;
537
- e[41] !== Z || e[42] !== C || e[43] !== A ? (ee = /* @__PURE__ */ p(B.Root, { variant: A, maxWidth: C, className: "bg-transparent", children: Z }), e[41] = Z, e[42] = C, e[43] = A, e[44] = ee) : ee = e[44];
538
- let ae;
539
- return e[45] !== S || e[46] !== x || e[47] !== d || e[48] !== Q || e[49] !== ee ? (ae = /* @__PURE__ */ p(bt, { sliderImages: x, sliderAutoPlayInterval: S, sliderTitles: d, ...Q, children: ee }), e[45] = S, e[46] = x, e[47] = d, e[48] = Q, e[49] = ee, e[50] = ae) : ae = e[50], ae;
540
- }
541
- let J;
542
- e[51] !== y ? (J = y && {
543
- className: y
544
- }, e[51] = y, e[52] = J) : J = e[52];
545
- let re;
546
- return e[53] !== Z || e[54] !== C || e[55] !== A || e[56] !== J ? (re = /* @__PURE__ */ p(B.Root, { variant: A, maxWidth: C, ...J, children: Z }), e[53] = Z, e[54] = C, e[55] = A, e[56] = J, e[57] = re) : re = e[57], re;
547
- }
548
- const Ie = "https://accounts.google.com/gsi/client";
549
- function yt() {
550
- return typeof window > "u" ? Promise.reject(new Error("GSI requires browser")) : window.google?.accounts?.id ? Promise.resolve() : new Promise((n, e) => {
551
- if (document.querySelector(`script[src="${Ie}"]`)) {
552
- const s = () => window.google?.accounts?.id ? n() : setTimeout(s, 50);
553
- s();
554
- return;
555
- }
556
- const l = document.createElement("script");
557
- l.src = Ie, l.async = !0, l.defer = !0, l.onload = () => n(), l.onerror = () => e(new Error("Failed to load Google Identity Services script")), document.body.appendChild(l);
558
- });
559
- }
560
- const St = "openid email profile", Re = 2e3;
561
- function xt(n) {
562
- const e = E.c(18), {
563
- clientId: t,
564
- onCredential: l,
565
- enableOneTap: s
566
- } = n, o = s === void 0 ? !1 : s, i = le(!1), r = le(null), c = le(l), a = le(0), m = le(!1);
567
- let g, u;
568
- e[0] !== l ? (g = () => {
569
- c.current = l;
570
- }, u = [l], e[0] = l, e[1] = g, e[2] = u) : (g = e[1], u = e[2]), te(g, u);
571
- let d;
572
- e[3] !== t ? (d = async () => {
573
- t && (await yt(), !(!window.google?.accounts?.id || !window.google?.accounts?.oauth2) && (i.current || (window.google.accounts.id.initialize({
574
- client_id: t,
575
- callback: (C) => {
576
- c.current(C.credential);
577
- },
578
- auto_select: !1
579
- }), r.current = window.google.accounts.oauth2.initCodeClient({
580
- client_id: t,
581
- scope: St,
582
- ux_mode: "popup",
583
- callback: (C) => {
584
- c.current(C.code);
585
- },
586
- error_callback: wt
587
- }), i.current = !0)));
588
- }, e[3] = t, e[4] = d) : d = e[4];
589
- const f = d;
590
- let h;
591
- e[5] !== t ? (h = async () => {
592
- if (!t)
593
- return;
594
- const C = Date.now();
595
- C - a.current < Re || (a.current = C, r.current?.requestCode());
596
- }, e[5] = t, e[6] = h) : h = e[6];
597
- const v = h;
598
- let b, y;
599
- e[7] !== t || e[8] !== f ? (b = () => {
600
- t && f();
601
- }, y = [t, f], e[7] = t, e[8] = f, e[9] = b, e[10] = y) : (b = e[9], y = e[10]), te(b, y);
602
- let w, x;
603
- e[11] !== t || e[12] !== o || e[13] !== f ? (w = () => {
604
- !o || !t || m.current || (m.current = !0, f().then(() => {
605
- if (!window.google?.accounts?.id)
606
- return;
607
- const C = Date.now();
608
- C - a.current < Re || (a.current = C, window.google.accounts.id.prompt());
609
- }));
610
- }, x = [o, t, f], e[11] = t, e[12] = o, e[13] = f, e[14] = w, e[15] = x) : (w = e[14], x = e[15]), te(w, x);
611
- let S;
612
- return e[16] !== v ? (S = {
613
- loginWithGoogle: v
614
- }, e[16] = v, e[17] = S) : S = e[17], S;
615
- }
616
- function wt() {
617
- }
618
- function je(n) {
619
- const e = E.c(14), {
620
- name: t,
621
- label: l,
622
- placeholder: s,
623
- helperText: o,
624
- defaultCountry: i,
625
- variant: r,
626
- required: c,
627
- disabled: a,
628
- control: m,
629
- error: g,
630
- autoFocus: u
631
- } = n, d = s === void 0 ? "Enter phone number" : s, f = i === void 0 ? "IN" : i, h = r === void 0 ? "default" : r, v = ne(), b = m ?? v.control;
632
- let y;
633
- e[0] !== u || e[1] !== f || e[2] !== a || e[3] !== g || e[4] !== o || e[5] !== l || e[6] !== d || e[7] !== c || e[8] !== h ? (y = (x) => {
634
- const {
635
- field: S,
636
- fieldState: C
637
- } = x, _ = g ?? C.error?.message;
638
- return /* @__PURE__ */ p(He, { placeholder: d, value: S.value ?? "", onValueChange: (N) => S.onChange(N ?? ""), defaultCountry: f, variant: h ?? "default", required: c ?? !1, disabled: a ?? !1, ...l != null && {
639
- label: l
640
- }, ...o != null && {
641
- helperText: o
642
- }, ..._ !== void 0 && {
643
- error: _
644
- }, ...u !== void 0 && {
645
- autoFocus: u
646
- } });
647
- }, e[0] = u, e[1] = f, e[2] = a, e[3] = g, e[4] = o, e[5] = l, e[6] = d, e[7] = c, e[8] = h, e[9] = y) : y = e[9];
648
- let w;
649
- return e[10] !== t || e[11] !== b || e[12] !== y ? (w = /* @__PURE__ */ p(ve, { name: t, control: b, render: y }), e[10] = t, e[11] = b, e[12] = y, e[13] = w) : w = e[13], w;
650
- }
651
- function pe(n) {
652
- const e = E.c(15), {
653
- name: t,
654
- label: l,
655
- placeholder: s,
656
- className: o,
657
- control: i,
658
- required: r,
659
- type: c,
660
- disabled: a,
661
- onKeyDown: m,
662
- maxLength: g,
663
- numericOnly: u,
664
- autoFocus: d
665
- } = n, f = ne(), h = i || f.control;
666
- let v;
667
- e[0] !== d || e[1] !== o || e[2] !== a || e[3] !== l || e[4] !== g || e[5] !== u || e[6] !== m || e[7] !== s || e[8] !== r || e[9] !== c ? (v = (y) => {
668
- const {
669
- field: w,
670
- fieldState: x
671
- } = y;
672
- return /* @__PURE__ */ p(Ge, { ...w, ...d !== void 0 && {
673
- autoFocus: d
674
- }, value: w.value ?? "", ...l !== void 0 && {
675
- label: l
676
- }, ...s !== void 0 && {
677
- placeholder: s
678
- }, ...x.error?.message !== void 0 && {
679
- error: x.error?.message
680
- }, ...o !== void 0 && {
681
- className: o
682
- }, ...r !== void 0 && {
683
- required: r
684
- }, type: c, ...a !== void 0 && {
685
- disabled: a
686
- }, onKeyDown: u ? (S) => {
687
- !/[0-9]/.test(S.key) && !["Backspace", "Tab", "Delete", "ArrowLeft", "ArrowRight", "Home", "End"].includes(S.key) && S.preventDefault(), m?.(S);
688
- } : m, ...g !== void 0 && {
689
- maxLength: g
690
- }, onChange: (S) => {
691
- const C = S.target?.value;
692
- if (typeof C == "string") {
693
- w.onChange(C.replace(/^\s+/, ""));
694
- let _ = C.replace(/^\s+/, "");
695
- u && (_ = _.replace(/\D/g, "")), w.onChange(_);
696
- } else
697
- w.onChange(C);
698
- }, onBlur: () => {
699
- const S = w.value;
700
- if (typeof S == "string") {
701
- const C = S.trim();
702
- C !== S && w.onChange(C);
703
- }
704
- w.onBlur();
705
- } });
706
- }, e[0] = d, e[1] = o, e[2] = a, e[3] = l, e[4] = g, e[5] = u, e[6] = m, e[7] = s, e[8] = r, e[9] = c, e[10] = v) : v = e[10];
707
- let b;
708
- return e[11] !== t || e[12] !== h || e[13] !== v ? (b = /* @__PURE__ */ p(ve, { name: t, control: h, render: v }), e[11] = t, e[12] = h, e[13] = v, e[14] = b) : b = e[14], b;
709
- }
710
- function Ue(n, e) {
711
- for (const t of n.issues) {
712
- const l = t.path[0];
713
- typeof l == "string" && e(l, {
714
- message: t.message
715
- });
716
- }
717
- }
718
- function Ct(n) {
719
- return n.trim().replace(/\b\w/g, (e) => e.toUpperCase());
720
- }
721
- const Ce = W.string().trim().min(3, "Full name must be at least 3 characters").transform(Ct), Ne = W.string().trim().min(1, "Phone number is required").refine((n) => /^\d+$/.test(n), "Phone number must contain only digits").refine((n) => n.length >= 7 && n.length <= 15, "Phone number must be between 7 and 15 digits"), _e = W.string().trim().min(1, "Email is required").email("Enter a valid email address").transform((n) => n.toLowerCase()), Nt = W.object({
722
- fullName: Ce,
723
- phone: Ne
724
- }), _t = W.object({
725
- fullName: Ce,
726
- email: _e
727
- }), Et = W.object({
728
- fullName: Ce,
729
- email: _e,
730
- phone: Ne
731
- }), Le = {
732
- phone: Nt,
733
- email: _t,
734
- foreign: Et
735
- }, Pt = W.object({
736
- phone: Ne
737
- }), At = W.object({
738
- email: _e
739
- }), Fe = {
740
- phone: Pt,
741
- email: At
742
- }, ie = 6, Ot = 60, Tt = 120;
743
- function It(n) {
744
- return n === "phone" ? Ot : Tt;
745
- }
746
- const Rt = W.object({
747
- otp: W.array(W.string()).length(ie, "Enter all 6 digits").refine((n) => n.every((e) => /^\d$/.test(e)) && n.join("").length === ie, "Invalid OTP! Please use correct code and submit again.")
748
- });
749
- function Lt(n) {
750
- const e = E.c(19), {
751
- mode: t,
752
- onSubmit: l,
753
- submitApi: s,
754
- onSuccess: o,
755
- onError: i
756
- } = n, [r, c] = V(!1), a = t === "phone";
757
- let m;
758
- e[0] !== a ? (m = a ? {
759
- phone: ""
760
- } : {
761
- email: ""
762
- }, e[0] = a, e[1] = m) : m = e[1];
763
- const g = m;
764
- let u;
765
- e[2] !== g ? (u = {
766
- defaultValues: g,
767
- mode: "onSubmit"
768
- }, e[2] = g, e[3] = u) : u = e[3];
769
- const d = be(u);
770
- let f;
771
- e[4] !== d || e[5] !== t || e[6] !== i || e[7] !== l || e[8] !== o || e[9] !== s ? (f = (w) => {
772
- const S = Fe[t].safeParse(w);
773
- if (!S.success) {
774
- Ue(S.error, (_, N) => d.setError(_, N));
775
- return;
776
- }
777
- const C = S.data;
778
- if (s) {
779
- c(!0), s(C).then(() => {
780
- o?.();
781
- }).catch((_) => {
782
- i?.(_);
783
- }).finally(() => {
784
- c(!1);
785
- });
786
- return;
787
- }
788
- l?.(C);
789
- }, e[4] = d, e[5] = t, e[6] = i, e[7] = l, e[8] = o, e[9] = s, e[10] = f) : f = e[10];
790
- const h = f;
791
- let v;
792
- e[11] !== t ? (v = (w) => Fe[t].safeParse(w).success, e[11] = t, e[12] = v) : v = e[12];
793
- const b = v;
794
- let y;
795
- return e[13] !== h || e[14] !== b || e[15] !== a || e[16] !== r || e[17] !== d ? (y = {
796
- methods: d,
797
- handleSubmit: h,
798
- isPhone: a,
799
- isFormValid: b,
800
- isSubmitting: r
801
- }, e[13] = h, e[14] = b, e[15] = a, e[16] = r, e[17] = d, e[18] = y) : y = e[18], y;
802
- }
803
- const Ft = {
804
- phone: "Enter Phone Number",
805
- email: "Enter Email Address"
806
- }, Mt = {
807
- phone: "We will send you 6 digit OTP on the given Phone Number.",
808
- email: "We will send you 6 digit OTP on the given Email Address."
809
- };
810
- function vn(n) {
811
- const e = E.c(25), {
812
- mode: t,
813
- title: l,
814
- subtitle: s,
815
- onBack: o,
816
- onSubmit: i,
817
- submitApi: r,
818
- onSuccess: c,
819
- onError: a,
820
- layoutType: m,
821
- variant: g
822
- } = n, u = m === void 0 ? "withSlider" : m, d = g === void 0 ? "desktop" : g, f = l ?? Ft[t], h = s ?? Mt[t];
823
- let v;
824
- e[0] !== d ? (v = d !== void 0 && {
825
- variant: d
826
- }, e[0] = d, e[1] = v) : v = e[1];
827
- let b;
828
- e[2] !== o ? (b = o != null ? /* @__PURE__ */ p(M, { icon: /* @__PURE__ */ p(Se, {}), iconOnly: !0, onClick: o, size: "medium", variant: "outline", "aria-label": "Go back", className: "mb-6 h-10 w-10" }) : void 0, e[2] = o, e[3] = b) : b = e[3];
829
- let y;
830
- e[4] !== i ? (y = i !== void 0 && {
831
- onSubmit: i
832
- }, e[4] = i, e[5] = y) : y = e[5];
833
- let w;
834
- e[6] !== r ? (w = r !== void 0 && {
835
- submitApi: r
836
- }, e[6] = r, e[7] = w) : w = e[7];
837
- let x;
838
- e[8] !== c ? (x = c !== void 0 && {
839
- onSuccess: c
840
- }, e[8] = c, e[9] = x) : x = e[9];
841
- let S;
842
- e[10] !== a ? (S = a !== void 0 && {
843
- onError: a
844
- }, e[10] = a, e[11] = S) : S = e[11];
845
- let C;
846
- e[12] !== t || e[13] !== y || e[14] !== w || e[15] !== x || e[16] !== S ? (C = /* @__PURE__ */ p(Dt, { mode: t, ...y, ...w, ...x, ...S }), e[12] = t, e[13] = y, e[14] = w, e[15] = x, e[16] = S, e[17] = C) : C = e[17];
847
- let _;
848
- return e[18] !== u || e[19] !== h || e[20] !== f || e[21] !== v || e[22] !== b || e[23] !== C ? (_ = /* @__PURE__ */ p(oe, { layoutType: u, ...v, contentWidth: "sm", align: "left", backButton: b, title: f, description: h, children: C }), e[18] = u, e[19] = h, e[20] = f, e[21] = v, e[22] = b, e[23] = C, e[24] = _) : _ = e[24], _;
849
- }
850
- function kt(n) {
851
- const e = E.c(11), {
852
- isPhone: t,
853
- handleSubmit: l,
854
- isSubmitting: s
855
- } = n, o = ne();
856
- let i;
857
- e[0] !== l || e[1] !== o ? (i = o.handleSubmit(l), e[0] = l, e[1] = o, e[2] = i) : i = e[2];
858
- let r;
859
- e[3] !== t ? (r = /* @__PURE__ */ p("div", { className: "mb-6 flex w-full flex-col gap-[12px]", children: t ? /* @__PURE__ */ p(je, { name: "phone", label: "Phone number", placeholder: "Phone number", defaultCountry: "IN", autoFocus: !0 }) : /* @__PURE__ */ p(pe, { name: "email", label: "Email address", placeholder: "Enter email address", type: "email", autoFocus: !0 }) }), e[3] = t, e[4] = r) : r = e[4];
860
- const c = s ? "Sending…" : "Continue";
861
- let a;
862
- e[5] !== c ? (a = /* @__PURE__ */ p(M, { type: "submit", variant: "primary", size: "large", fullWidth: !0, children: c }), e[5] = c, e[6] = a) : a = e[6];
863
- let m;
864
- return e[7] !== i || e[8] !== r || e[9] !== a ? (m = /* @__PURE__ */ F("form", { onSubmit: i, className: "w-full flex flex-col", children: [
865
- r,
866
- a
867
- ] }), e[7] = i, e[8] = r, e[9] = a, e[10] = m) : m = e[10], m;
868
- }
869
- function Dt(n) {
870
- const e = E.c(21), {
871
- mode: t,
872
- onSubmit: l,
873
- submitApi: s,
874
- onSuccess: o,
875
- onError: i
876
- } = n;
877
- let r;
878
- e[0] !== l ? (r = l !== void 0 && {
879
- onSubmit: l
880
- }, e[0] = l, e[1] = r) : r = e[1];
881
- let c;
882
- e[2] !== s ? (c = s !== void 0 && {
883
- submitApi: s
884
- }, e[2] = s, e[3] = c) : c = e[3];
885
- let a;
886
- e[4] !== o ? (a = o !== void 0 && {
887
- onSuccess: o
888
- }, e[4] = o, e[5] = a) : a = e[5];
889
- let m;
890
- e[6] !== i ? (m = i !== void 0 && {
891
- onError: i
892
- }, e[6] = i, e[7] = m) : m = e[7];
893
- let g;
894
- e[8] !== t || e[9] !== r || e[10] !== c || e[11] !== a || e[12] !== m ? (g = {
895
- mode: t,
896
- ...r,
897
- ...c,
898
- ...a,
899
- ...m
900
- }, e[8] = t, e[9] = r, e[10] = c, e[11] = a, e[12] = m, e[13] = g) : g = e[13];
901
- const {
902
- methods: u,
903
- handleSubmit: d,
904
- isPhone: f,
905
- isSubmitting: h
906
- } = Lt(g);
907
- let v;
908
- e[14] !== d || e[15] !== f || e[16] !== h ? (v = /* @__PURE__ */ p(kt, { isPhone: f, handleSubmit: d, isSubmitting: h }), e[14] = d, e[15] = f, e[16] = h, e[17] = v) : v = e[17];
909
- let b;
910
- return e[18] !== u || e[19] !== v ? (b = /* @__PURE__ */ p(ye, { ...u, children: v }), e[18] = u, e[19] = v, e[20] = b) : b = e[20], b;
911
- }
912
- function Wt(n) {
913
- return me({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z" }, child: [] }] })(n);
914
- }
915
- function $t(n) {
916
- return me({ attr: { version: "1.1", x: "0px", y: "0px", viewBox: "0 0 48 48", enableBackground: "new 0 0 48 48" }, child: [{ tag: "path", attr: { fill: "#FFC107", d: `M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\r
917
- c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24\r
918
- c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z` }, child: [] }, { tag: "path", attr: { fill: "#FF3D00", d: `M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657\r
919
- C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z` }, child: [] }, { tag: "path", attr: { fill: "#4CAF50", d: `M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\r
920
- c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z` }, child: [] }, { tag: "path", attr: { fill: "#1976D2", d: `M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\r
921
- c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z` }, child: [] }] })(n);
922
- }
923
- function jt(n) {
924
- return {
925
- triggerSignIn() {
926
- }
927
- };
928
- }
929
- function Ut(n) {
930
- const e = E.c(23);
931
- let t;
932
- e[0] !== n ? (t = n === void 0 ? {} : n, e[0] = n, e[1] = t) : t = e[1];
933
- const l = t, s = qt, o = Vt, i = Gt, r = Ht, c = l.providers?.google?.clientId ?? "";
934
- let a;
935
- e[2] !== l.providers?.google?.onCredential ? (a = l.providers?.google?.onCredential ?? Bt, e[2] = l.providers?.google?.onCredential, e[3] = a) : a = e[3];
936
- const m = l.providers?.google?.enableOneTap ?? !1;
937
- let g;
938
- e[4] !== c || e[5] !== a || e[6] !== m ? (g = {
939
- clientId: c,
940
- onCredential: a,
941
- enableOneTap: m
942
- }, e[4] = c, e[5] = a, e[6] = m, e[7] = g) : g = e[7];
943
- const {
944
- loginWithGoogle: u
945
- } = xt(g), d = l.providers?.apple?.clientId ?? "", f = l.providers?.apple?.redirectUri ?? "";
946
- let h;
947
- e[8] !== l.providers?.apple?.onCredential ? (h = l.providers?.apple?.onCredential ?? zt, e[8] = l.providers?.apple?.onCredential, e[9] = h) : h = e[9];
948
- let v;
949
- e[10] !== d || e[11] !== f || e[12] !== h ? (v = {
950
- clientId: d,
951
- redirectUri: f,
952
- onCredential: h
953
- }, e[10] = d, e[11] = f, e[12] = h, e[13] = v) : v = e[13];
954
- const {
955
- triggerSignIn: b
956
- } = jt(), y = l.onContinueWithMobile ?? s, w = l.onContinueWithEmail ?? o;
957
- let x;
958
- e[14] !== u || e[15] !== l.onContinueWithGoogle || e[16] !== l.providers?.google?.clientId ? (x = l.onContinueWithGoogle ?? (l.providers?.google?.clientId ? () => {
959
- u();
960
- } : i), e[14] = u, e[15] = l.onContinueWithGoogle, e[16] = l.providers?.google?.clientId, e[17] = x) : x = e[17];
961
- const S = l.onContinueWithApple ?? (l.providers?.apple?.clientId ? b : r);
962
- let C;
963
- return e[18] !== y || e[19] !== w || e[20] !== x || e[21] !== S ? (C = {
964
- onContinueWithMobile: y,
965
- onContinueWithEmail: w,
966
- onContinueWithGoogle: x,
967
- onContinueWithApple: S
968
- }, e[18] = y, e[19] = w, e[20] = x, e[21] = S, e[22] = C) : C = e[22], C;
969
- }
970
- function zt() {
971
- }
972
- function Bt() {
973
- }
974
- function Ht() {
975
- }
976
- function Gt() {
977
- }
978
- function Vt() {
979
- }
980
- function qt() {
981
- }
982
- const Yt = {
983
- phone: "Kindly check your Mobile.",
984
- email: "Kindly check your Email Inbox."
985
- }, Kt = {
986
- phone: "6 digit OTP has been sent to your Mobile",
987
- email: "6 digit OTP has been sent to your Email"
988
- };
989
- function Xt(n) {
990
- const e = E.c(29), {
991
- mode: t,
992
- onSubmit: l,
993
- onResendCode: s,
994
- submitApi: o,
995
- onSuccess: i,
996
- onError: r
997
- } = n, [c, a] = V(!1);
998
- let m;
999
- e[0] !== t ? (m = It(t), e[0] = t, e[1] = m) : m = e[1];
1000
- const g = m, [u, d] = V(g), f = u <= 0;
1001
- let h;
1002
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = Array.from({
1003
- length: ie
1004
- }, Jt), e[2] = h) : h = e[2];
1005
- const v = h;
1006
- let b;
1007
- e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
1008
- defaultValues: {
1009
- otp: v
1010
- },
1011
- mode: "onSubmit"
1012
- }, e[3] = b) : b = e[3];
1013
- const y = be(b);
1014
- let w, x;
1015
- e[4] !== u ? (w = () => {
1016
- if (u <= 0)
1017
- return;
1018
- const $ = setInterval(() => {
1019
- d(Zt);
1020
- }, 1e3);
1021
- return () => clearInterval($);
1022
- }, x = [u], e[4] = u, e[5] = w, e[6] = x) : (w = e[5], x = e[6]), te(w, x);
1023
- let S;
1024
- e[7] !== y || e[8] !== r || e[9] !== l || e[10] !== i || e[11] !== o ? (S = ($) => {
1025
- const j = Rt.safeParse($);
1026
- if (!j.success) {
1027
- const U = j.error.issues[0]?.message ?? "Invalid OTP";
1028
- y.setError("otp", {
1029
- message: U
1030
- });
1031
- return;
1032
- }
1033
- const z = j.data.otp.join("");
1034
- if (o) {
1035
- a(!0), o(z).then(() => {
1036
- i?.();
1037
- }).catch((U) => {
1038
- r?.(U);
1039
- }).finally(() => {
1040
- a(!1);
1041
- });
1042
- return;
1043
- }
1044
- l?.(z);
1045
- }, e[7] = y, e[8] = r, e[9] = l, e[10] = i, e[11] = o, e[12] = S) : S = e[12];
1046
- const C = S;
1047
- let _;
1048
- e[13] !== f || e[14] !== g || e[15] !== s ? (_ = () => {
1049
- f && (s?.(), d(g));
1050
- }, e[13] = f, e[14] = g, e[15] = s, e[16] = _) : _ = e[16];
1051
- const N = _, P = Math.floor(u / 60), A = u % 60, L = String(P);
1052
- let k;
1053
- e[17] !== L ? (k = L.padStart(2, "0"), e[17] = L, e[18] = k) : k = e[18];
1054
- const O = String(A);
1055
- let T;
1056
- e[19] !== O ? (T = O.padStart(2, "0"), e[19] = O, e[20] = T) : T = e[20];
1057
- const D = `Resend code in: ${k}:${T}`;
1058
- let G;
1059
- return e[21] !== f || e[22] !== N || e[23] !== C || e[24] !== c || e[25] !== y || e[26] !== u || e[27] !== D ? (G = {
1060
- methods: y,
1061
- handleSubmit: C,
1062
- handleResend: N,
1063
- resendSecondsLeft: u,
1064
- canResend: f,
1065
- timerText: D,
1066
- isSubmitting: c
1067
- }, e[21] = f, e[22] = N, e[23] = C, e[24] = c, e[25] = y, e[26] = u, e[27] = D, e[28] = G) : G = e[28], G;
1068
- }
1069
- function Zt(n) {
1070
- return n <= 1 ? 0 : n - 1;
1071
- }
1072
- function Jt() {
1073
- return "";
1074
- }
1075
- const Qt = "Mobile";
1076
- function en(n) {
1077
- const e = E.c(11);
1078
- let t;
1079
- e[0] !== n ? (t = n === void 0 ? {} : n, e[0] = n, e[1] = t) : t = e[1];
1080
- const l = t, [s, o] = V(!1), {
1081
- lastUsedMethod: i,
1082
- onContinueWithLastMethod: r,
1083
- continueApi: c,
1084
- onSuccess: a,
1085
- onError: m
1086
- } = l, g = i === void 0 ? Qt : i;
1087
- let u;
1088
- e[2] !== c || e[3] !== r || e[4] !== m || e[5] !== a ? (u = () => {
1089
- if (c) {
1090
- o(!0), c().then(() => {
1091
- a?.();
1092
- }).catch((h) => {
1093
- m?.(h);
1094
- }).finally(() => {
1095
- o(!1);
1096
- });
1097
- return;
1098
- }
1099
- r?.();
1100
- }, e[2] = c, e[3] = r, e[4] = m, e[5] = a, e[6] = u) : u = e[6];
1101
- const d = u;
1102
- let f;
1103
- return e[7] !== d || e[8] !== s || e[9] !== g ? (f = {
1104
- handleContinue: d,
1105
- isSubmitting: s,
1106
- lastUsedMethod: g
1107
- }, e[7] = d, e[8] = s, e[9] = g, e[10] = f) : f = e[10], f;
1108
- }
1109
- function tn(n) {
1110
- const e = E.c(22), {
1111
- mode: t,
1112
- defaultPhone: l,
1113
- onSubmit: s,
1114
- submitApi: o,
1115
- onSuccess: i,
1116
- onError: r
1117
- } = n, c = l === void 0 ? "" : l, [a, m] = V(!1), g = t === "phone", u = t === "foreign";
1118
- let d;
1119
- e[0] !== c || e[1] !== u || e[2] !== g ? (d = u ? {
1120
- fullName: "",
1121
- email: "",
1122
- phone: c
1123
- } : g ? {
1124
- fullName: "",
1125
- phone: ""
1126
- } : {
1127
- fullName: "",
1128
- email: ""
1129
- }, e[0] = c, e[1] = u, e[2] = g, e[3] = d) : d = e[3];
1130
- const f = d;
1131
- let h;
1132
- e[4] !== f ? (h = {
1133
- defaultValues: f,
1134
- mode: "onSubmit"
1135
- }, e[4] = f, e[5] = h) : h = e[5];
1136
- const v = be(h);
1137
- let b;
1138
- e[6] !== v || e[7] !== t || e[8] !== r || e[9] !== s || e[10] !== i || e[11] !== o ? (b = (C) => {
1139
- const N = Le[t].safeParse(C);
1140
- if (!N.success) {
1141
- Ue(N.error, (A, L) => v.setError(A, L));
1142
- return;
1143
- }
1144
- const P = {
1145
- fullName: N.data.fullName,
1146
- ..."phone" in N.data && N.data.phone && {
1147
- phone: N.data.phone
1148
- },
1149
- ..."email" in N.data && N.data.email && {
1150
- email: N.data.email
1151
- }
1152
- };
1153
- if (o) {
1154
- m(!0), o(P).then(() => {
1155
- i?.();
1156
- }).catch((A) => {
1157
- r?.(A);
1158
- }).finally(() => {
1159
- m(!1);
1160
- });
1161
- return;
1162
- }
1163
- s?.(P);
1164
- }, e[6] = v, e[7] = t, e[8] = r, e[9] = s, e[10] = i, e[11] = o, e[12] = b) : b = e[12];
1165
- const y = b;
1166
- let w;
1167
- e[13] !== t ? (w = (C) => Le[t].safeParse(C).success, e[13] = t, e[14] = w) : w = e[14];
1168
- const x = w;
1169
- let S;
1170
- return e[15] !== y || e[16] !== u || e[17] !== x || e[18] !== g || e[19] !== a || e[20] !== v ? (S = {
1171
- methods: v,
1172
- handleSubmit: y,
1173
- isPhone: g,
1174
- isForeign: u,
1175
- isFormValid: x,
1176
- isSubmitting: a
1177
- }, e[15] = y, e[16] = u, e[17] = x, e[18] = g, e[19] = a, e[20] = v, e[21] = S) : S = e[21], S;
1178
- }
1179
- function ze() {
1180
- const n = E.c(3);
1181
- let e, t;
1182
- n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ p("br", {}), t = /* @__PURE__ */ p("a", { href: "/terms", className: "font-semibold text-black underline", children: "Terms of Use" }), n[0] = e, n[1] = t) : (e = n[0], t = n[1]);
1183
- let l;
1184
- return n[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ F(I, { variant: "body3", align: "center", className: "opacity-60 text-black", children: [
1185
- "by continuing you agree to Docthub's",
1186
- e,
1187
- t,
1188
- " ",
1189
- "and",
1190
- " ",
1191
- /* @__PURE__ */ p("a", { href: "/privacy", className: "font-semibold text-black underline", children: "Privacy Policy." })
1192
- ] }), n[2] = l) : l = n[2], l;
1193
- }
1194
- function nn() {
1195
- const n = E.c(1);
1196
- let e;
1197
- return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ p(M, { icon: /* @__PURE__ */ p("div", { className: "flex items-center justify-center p-2 bg-[#002830] rounded-[10px]", children: /* @__PURE__ */ p(ot, { color: "white", className: "h-5 w-5" }) }), iconPosition: "right", size: "large", variant: "outline", "aria-label": "Go to Enterprise Login", className: "hidden sm:flex items-center gap-4 border border-[rgba(0,0,0,0.12)] px-[22px] py-[14px]", children: "Enterprise Login" }), n[0] = e) : e = n[0], e;
1198
- }
1199
- const bn = (n) => {
1200
- const e = E.c(5), t = Ut(n);
1201
- let l;
1202
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ p(nn, {}), e[0] = l) : l = e[0];
1203
- let s;
1204
- e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ p(I, { variant: "title1", weight: "bold", align: "center", children: "Healthcare Career App" }), e[1] = s) : s = e[1];
1205
- let o;
1206
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ p(ze, {}), e[2] = o) : o = e[2];
1207
- let i;
1208
- return e[3] !== t ? (i = /* @__PURE__ */ p(oe, { layoutType: "withSlider", variant: "desktop", header: l, logo: "/main-logo.svg", align: "center", title: s, description: "Welcome to the Healthcare Career App. Please sign in to continue.", footer: o, children: /* @__PURE__ */ p(ln, { handlers: t }) }), e[3] = t, e[4] = i) : i = e[4], i;
1209
- }, ln = (n) => {
1210
- const e = E.c(19), {
1211
- handlers: t
1212
- } = n, {
1213
- onContinueWithMobile: l,
1214
- onContinueWithEmail: s,
1215
- onContinueWithGoogle: o,
1216
- onContinueWithApple: i
1217
- } = t;
1218
- let r;
1219
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ p(ue, { children: "Continue with Mobile" }), e[0] = r) : r = e[0];
1220
- let c;
1221
- e[1] !== l ? (c = /* @__PURE__ */ p(M, { variant: "outline", size: "large", fullWidth: !0, onClick: l, children: r }), e[1] = l, e[2] = c) : c = e[2];
1222
- let a;
1223
- e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ p(ue, { children: "Continue with Email" }), e[3] = a) : a = e[3];
1224
- let m;
1225
- e[4] !== s ? (m = /* @__PURE__ */ p(M, { variant: "outline", size: "large", fullWidth: !0, onClick: s, children: a }), e[4] = s, e[5] = m) : m = e[5];
1226
- let g;
1227
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ p($t, { "aria-hidden": !0 }), e[6] = g) : g = e[6];
1228
- let u;
1229
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ p(ue, { children: "Continue with Google" }), e[7] = u) : u = e[7];
1230
- let d;
1231
- e[8] !== o ? (d = /* @__PURE__ */ p(M, { variant: "outline", size: "large", fullWidth: !0, icon: g, iconPosition: "left", onClick: o, children: u }), e[8] = o, e[9] = d) : d = e[9];
1232
- let f;
1233
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ p(Wt, { "aria-hidden": !0 }), e[10] = f) : f = e[10];
1234
- let h;
1235
- e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ p(ue, { children: "Continue with Apple" }), e[11] = h) : h = e[11];
1236
- let v;
1237
- e[12] !== i ? (v = /* @__PURE__ */ p(M, { variant: "outline", size: "large", fullWidth: !0, icon: f, iconPosition: "left", onClick: i, children: h }), e[12] = i, e[13] = v) : v = e[13];
1238
- let b;
1239
- return e[14] !== v || e[15] !== c || e[16] !== m || e[17] !== d ? (b = /* @__PURE__ */ F("div", { className: "w-full flex flex-col gap-3", children: [
1240
- c,
1241
- m,
1242
- d,
1243
- v
1244
- ] }), e[14] = v, e[15] = c, e[16] = m, e[17] = d, e[18] = b) : b = e[18], b;
1245
- }, ue = (n) => {
1246
- const e = E.c(2), {
1247
- children: t
1248
- } = n;
1249
- let l;
1250
- return e[0] !== t ? (l = /* @__PURE__ */ p(I, { variant: "textLabel1", weight: "semiBold", align: "center", className: "opacity-80", children: t }), e[0] = t, e[1] = l) : l = e[1], l;
1251
- };
1252
- function on(n) {
1253
- const e = E.c(10), {
1254
- name: t,
1255
- label: l,
1256
- className: s,
1257
- control: o,
1258
- length: i,
1259
- inputClassName: r,
1260
- autoFocus: c
1261
- } = n, a = i === void 0 ? 6 : i, m = ne(), g = o || m.control;
1262
- let u;
1263
- e[0] !== c || e[1] !== s || e[2] !== r || e[3] !== l || e[4] !== a ? (u = (f) => {
1264
- const {
1265
- field: h,
1266
- fieldState: v
1267
- } = f;
1268
- return /* @__PURE__ */ F("div", { children: [
1269
- l && /* @__PURE__ */ p("label", { className: "block mb-1", children: l }),
1270
- /* @__PURE__ */ p(Ve, { length: a, value: h.value || [], onChange: h.onChange, ...c !== void 0 && {
1271
- autoFocus: c
1272
- }, ...s && {
1273
- className: s
1274
- }, ...r && {
1275
- inputClassName: r
1276
- }, ...v.error?.message !== void 0 && v.error?.message !== "" && {
1277
- error: v.error.message
1278
- } })
1279
- ] });
1280
- }, e[0] = c, e[1] = s, e[2] = r, e[3] = l, e[4] = a, e[5] = u) : u = e[5];
1281
- let d;
1282
- return e[6] !== t || e[7] !== g || e[8] !== u ? (d = /* @__PURE__ */ p(ve, { name: t, control: g, render: u }), e[6] = t, e[7] = g, e[8] = u, e[9] = d) : d = e[9], d;
1283
- }
1284
- function yn(n) {
1285
- const e = E.c(41);
1286
- let t, l, s, o;
1287
- e[0] !== n ? ({
1288
- layoutType: s,
1289
- variant: o,
1290
- onBack: l,
1291
- ...t
1292
- } = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s, e[4] = o) : (t = e[1], l = e[2], s = e[3], o = e[4]);
1293
- const i = s === void 0 ? "withSlider" : s;
1294
- let r;
1295
- e[5] !== o ? (r = o !== void 0 && {
1296
- variant: o
1297
- }, e[5] = o, e[6] = r) : r = e[6];
1298
- let c;
1299
- e[7] !== l ? (c = l != null ? /* @__PURE__ */ p(M, { icon: /* @__PURE__ */ p(Se, {}), iconOnly: !0, onClick: l, size: "medium", variant: "outline", "aria-label": "Go back", className: "mb-6 h-10 w-10" }) : void 0, e[7] = l, e[8] = c) : c = e[8];
1300
- let a;
1301
- e[9] !== t.title ? (a = t.title !== void 0 && {
1302
- title: t.title
1303
- }, e[9] = t.title, e[10] = a) : a = e[10];
1304
- let m;
1305
- e[11] !== t.isForeignUser ? (m = t.isForeignUser !== void 0 && {
1306
- isForeignUser: t.isForeignUser
1307
- }, e[11] = t.isForeignUser, e[12] = m) : m = e[12];
1308
- let g;
1309
- e[13] !== l ? (g = l !== void 0 && {
1310
- onBack: l
1311
- }, e[13] = l, e[14] = g) : g = e[14];
1312
- let u;
1313
- e[15] !== t.onSubmit ? (u = t.onSubmit !== void 0 && {
1314
- onSubmit: t.onSubmit
1315
- }, e[15] = t.onSubmit, e[16] = u) : u = e[16];
1316
- let d;
1317
- e[17] !== t.onResendCode ? (d = t.onResendCode !== void 0 && {
1318
- onResendCode: t.onResendCode
1319
- }, e[17] = t.onResendCode, e[18] = d) : d = e[18];
1320
- let f;
1321
- e[19] !== t.submitApi ? (f = t.submitApi !== void 0 && {
1322
- submitApi: t.submitApi
1323
- }, e[19] = t.submitApi, e[20] = f) : f = e[20];
1324
- let h;
1325
- e[21] !== t.onSuccess ? (h = t.onSuccess !== void 0 && {
1326
- onSuccess: t.onSuccess
1327
- }, e[21] = t.onSuccess, e[22] = h) : h = e[22];
1328
- let v;
1329
- e[23] !== t.onError ? (v = t.onError !== void 0 && {
1330
- onError: t.onError
1331
- }, e[23] = t.onError, e[24] = v) : v = e[24];
1332
- let b;
1333
- e[25] !== t.mode || e[26] !== t.recipientDisplay || e[27] !== v || e[28] !== a || e[29] !== m || e[30] !== g || e[31] !== u || e[32] !== d || e[33] !== f || e[34] !== h ? (b = /* @__PURE__ */ p(an, { mode: t.mode, recipientDisplay: t.recipientDisplay, ...a, ...m, ...g, ...u, ...d, ...f, ...h, ...v }), e[25] = t.mode, e[26] = t.recipientDisplay, e[27] = v, e[28] = a, e[29] = m, e[30] = g, e[31] = u, e[32] = d, e[33] = f, e[34] = h, e[35] = b) : b = e[35];
1334
- let y;
1335
- return e[36] !== i || e[37] !== r || e[38] !== b || e[39] !== c ? (y = /* @__PURE__ */ p(oe, { layoutType: i, ...r, contentWidth: "sm", align: "left", backButton: c, children: b }), e[36] = i, e[37] = r, e[38] = b, e[39] = c, e[40] = y) : y = e[40], y;
1336
- }
1337
- function sn(n) {
1338
- return !Array.isArray(n) || n.length !== ie ? !1 : n.every((e) => typeof e == "string" && /^\d$/.test(e));
1339
- }
1340
- function rn(n) {
1341
- const e = E.c(28), {
1342
- mode: t,
1343
- title: l,
1344
- recipientDisplay: s,
1345
- isForeignUser: o,
1346
- handleSubmit: i,
1347
- handleResend: r,
1348
- canResend: c,
1349
- timerText: a,
1350
- isSubmitting: m
1351
- } = n, g = ne();
1352
- let u;
1353
- if (e[0] !== g) {
1354
- const P = g.watch("otp");
1355
- u = sn(P), e[0] = g, e[1] = u;
1356
- } else
1357
- u = e[1];
1358
- const d = u;
1359
- let f;
1360
- e[2] !== i || e[3] !== g ? (f = g.handleSubmit(i), e[2] = i, e[3] = g, e[4] = f) : f = e[4];
1361
- let h;
1362
- e[5] !== l ? (h = /* @__PURE__ */ p(I, { variant: "h5", weight: "extraBold", align: "left", className: "mb-2 text-black", children: l }), e[5] = l, e[6] = h) : h = e[6];
1363
- const v = o ? "mb-2 text-black/80" : "mb-6 text-black/80";
1364
- let b;
1365
- e[7] !== s || e[8] !== v ? (b = /* @__PURE__ */ p(I, { variant: "title2", align: "left", className: v, children: s }), e[7] = s, e[8] = v, e[9] = b) : b = e[9];
1366
- let y;
1367
- e[10] !== o || e[11] !== t ? (y = o && /* @__PURE__ */ p(I, { variant: "body2", align: "left", className: "mb-6 text-black/80", children: Yt[t] }), e[10] = o, e[11] = t, e[12] = y) : y = e[12];
1368
- let w;
1369
- e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ p("div", { className: "mb-4 flex w-full flex-col gap-[12px]", children: /* @__PURE__ */ p(on, { name: "otp", length: ie, autoFocus: !0 }) }), e[13] = w) : w = e[13];
1370
- let x;
1371
- e[14] !== c || e[15] !== r || e[16] !== a ? (x = /* @__PURE__ */ p("div", { className: "mb-6 flex items-center gap-2", children: c ? /* @__PURE__ */ p(M, { type: "button", variant: "outline", size: "small", onClick: r, children: "Resend Code" }) : /* @__PURE__ */ p(I, { variant: "body2", align: "left", className: "text-black/80", children: a }) }), e[14] = c, e[15] = r, e[16] = a, e[17] = x) : x = e[17];
1372
- const S = !d || m, C = m ? "Verifying…" : "Submit";
1373
- let _;
1374
- e[18] !== C || e[19] !== S ? (_ = /* @__PURE__ */ p(M, { type: "submit", variant: "primary", size: "large", fullWidth: !0, disabled: S, children: C }), e[18] = C, e[19] = S, e[20] = _) : _ = e[20];
1375
- let N;
1376
- return e[21] !== _ || e[22] !== f || e[23] !== h || e[24] !== b || e[25] !== y || e[26] !== x ? (N = /* @__PURE__ */ F("form", { onSubmit: f, className: "flex w-full flex-col", children: [
1377
- h,
1378
- b,
1379
- y,
1380
- w,
1381
- x,
1382
- _
1383
- ] }), e[21] = _, e[22] = f, e[23] = h, e[24] = b, e[25] = y, e[26] = x, e[27] = N) : N = e[27], N;
1384
- }
1385
- function an(n) {
1386
- const e = E.c(30), {
1387
- mode: t,
1388
- title: l,
1389
- recipientDisplay: s,
1390
- isForeignUser: o,
1391
- onSubmit: i,
1392
- onResendCode: r,
1393
- submitApi: c,
1394
- onSuccess: a,
1395
- onError: m
1396
- } = n, g = o === void 0 ? !1 : o;
1397
- let u;
1398
- e[0] !== i ? (u = i !== void 0 && {
1399
- onSubmit: i
1400
- }, e[0] = i, e[1] = u) : u = e[1];
1401
- let d;
1402
- e[2] !== r ? (d = r !== void 0 && {
1403
- onResendCode: r
1404
- }, e[2] = r, e[3] = d) : d = e[3];
1405
- let f;
1406
- e[4] !== c ? (f = c !== void 0 && {
1407
- submitApi: c
1408
- }, e[4] = c, e[5] = f) : f = e[5];
1409
- let h;
1410
- e[6] !== a ? (h = a !== void 0 && {
1411
- onSuccess: a
1412
- }, e[6] = a, e[7] = h) : h = e[7];
1413
- let v;
1414
- e[8] !== m ? (v = m !== void 0 && {
1415
- onError: m
1416
- }, e[8] = m, e[9] = v) : v = e[9];
1417
- let b;
1418
- e[10] !== t || e[11] !== u || e[12] !== d || e[13] !== f || e[14] !== h || e[15] !== v ? (b = {
1419
- mode: t,
1420
- ...u,
1421
- ...d,
1422
- ...f,
1423
- ...h,
1424
- ...v
1425
- }, e[10] = t, e[11] = u, e[12] = d, e[13] = f, e[14] = h, e[15] = v, e[16] = b) : b = e[16];
1426
- const {
1427
- methods: y,
1428
- handleSubmit: w,
1429
- handleResend: x,
1430
- canResend: S,
1431
- timerText: C,
1432
- isSubmitting: _
1433
- } = Xt(b), N = l ?? Kt[t];
1434
- let P;
1435
- e[17] !== S || e[18] !== N || e[19] !== x || e[20] !== w || e[21] !== g || e[22] !== _ || e[23] !== t || e[24] !== s || e[25] !== C ? (P = /* @__PURE__ */ p(rn, { mode: t, title: N, recipientDisplay: s, isForeignUser: g, handleSubmit: w, handleResend: x, canResend: S, timerText: C, isSubmitting: _ }), e[17] = S, e[18] = N, e[19] = x, e[20] = w, e[21] = g, e[22] = _, e[23] = t, e[24] = s, e[25] = C, e[26] = P) : P = e[26];
1436
- let A;
1437
- return e[27] !== y || e[28] !== P ? (A = /* @__PURE__ */ p(ye, { ...y, children: P }), e[27] = y, e[28] = P, e[29] = A) : A = e[29], A;
1438
- }
1439
- function Sn(n) {
1440
- const e = E.c(31), {
1441
- lastUsedMethod: t,
1442
- onContinueWithLastMethod: l,
1443
- onUseAnotherMethod: s,
1444
- continueApi: o,
1445
- onSuccess: i,
1446
- onError: r,
1447
- layoutType: c,
1448
- variant: a
1449
- } = n, m = t === void 0 ? "Mobile" : t, g = c === void 0 ? "withSlider" : c, u = a === "mobile" || g === "standalone";
1450
- let d;
1451
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ p("div", { className: "h-[30px] w-[140px]", children: /* @__PURE__ */ p("img", { src: "/main-logo.svg", alt: "Docthub", className: "block h-full w-full object-cover" }) }), e[0] = d) : d = e[0];
1452
- const f = d;
1453
- let h;
1454
- e[1] !== a ? (h = a !== void 0 && {
1455
- variant: a
1456
- }, e[1] = a, e[2] = h) : h = e[2];
1457
- let v;
1458
- e[3] !== u ? (v = u ? /* @__PURE__ */ p(I, { variant: "title1", weight: "bold", align: "center", className: "text-[#002830]", children: "Welcome Back!" }) : /* @__PURE__ */ F(I, { variant: "h6", weight: "extraBold", align: "left", className: "text-black", children: [
1459
- " ",
1460
- "Welcome Back!",
1461
- " "
1462
- ] }), e[3] = u, e[4] = v) : v = e[4];
1463
- let b;
1464
- e[5] !== m ? (b = /* @__PURE__ */ F(I, { variant: "body1", align: "center", color: "black", children: [
1465
- "Last time you used ",
1466
- m,
1467
- " to log in."
1468
- ] }), e[5] = m, e[6] = b) : b = e[6];
1469
- let y;
1470
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ p(ze, {}), e[7] = y) : y = e[7];
1471
- let w;
1472
- e[8] !== l ? (w = l !== void 0 && {
1473
- onContinueWithLastMethod: l
1474
- }, e[8] = l, e[9] = w) : w = e[9];
1475
- let x;
1476
- e[10] !== s ? (x = s !== void 0 && {
1477
- onUseAnotherMethod: s
1478
- }, e[10] = s, e[11] = x) : x = e[11];
1479
- let S;
1480
- e[12] !== o ? (S = o !== void 0 && {
1481
- continueApi: o
1482
- }, e[12] = o, e[13] = S) : S = e[13];
1483
- let C;
1484
- e[14] !== i ? (C = i !== void 0 && {
1485
- onSuccess: i
1486
- }, e[14] = i, e[15] = C) : C = e[15];
1487
- let _;
1488
- e[16] !== r ? (_ = r !== void 0 && {
1489
- onError: r
1490
- }, e[16] = r, e[17] = _) : _ = e[17];
1491
- let N;
1492
- e[18] !== m || e[19] !== C || e[20] !== _ || e[21] !== w || e[22] !== x || e[23] !== S ? (N = /* @__PURE__ */ p(cn, { lastUsedMethod: m, ...w, ...x, ...S, ...C, ..._ }), e[18] = m, e[19] = C, e[20] = _, e[21] = w, e[22] = x, e[23] = S, e[24] = N) : N = e[24];
1493
- let P;
1494
- return e[25] !== g || e[26] !== N || e[27] !== h || e[28] !== v || e[29] !== b ? (P = /* @__PURE__ */ p(oe, { layoutType: g, ...h, logo: f, title: v, description: b, footer: y, children: N }), e[25] = g, e[26] = N, e[27] = h, e[28] = v, e[29] = b, e[30] = P) : P = e[30], P;
1495
- }
1496
- function cn(n) {
1497
- const e = E.c(31);
1498
- let t, l;
1499
- e[0] !== n ? ({
1500
- onUseAnotherMethod: l,
1501
- ...t
1502
- } = n, e[0] = n, e[1] = t, e[2] = l) : (t = e[1], l = e[2]);
1503
- let s;
1504
- e[3] !== t.lastUsedMethod ? (s = t.lastUsedMethod !== void 0 && {
1505
- lastUsedMethod: t.lastUsedMethod
1506
- }, e[3] = t.lastUsedMethod, e[4] = s) : s = e[4];
1507
- let o;
1508
- e[5] !== t.onContinueWithLastMethod ? (o = t.onContinueWithLastMethod !== void 0 && {
1509
- onContinueWithLastMethod: t.onContinueWithLastMethod
1510
- }, e[5] = t.onContinueWithLastMethod, e[6] = o) : o = e[6];
1511
- let i;
1512
- e[7] !== t.continueApi ? (i = t.continueApi !== void 0 && {
1513
- continueApi: t.continueApi
1514
- }, e[7] = t.continueApi, e[8] = i) : i = e[8];
1515
- let r;
1516
- e[9] !== t.onSuccess ? (r = t.onSuccess !== void 0 && {
1517
- onSuccess: t.onSuccess
1518
- }, e[9] = t.onSuccess, e[10] = r) : r = e[10];
1519
- let c;
1520
- e[11] !== t.onError ? (c = t.onError !== void 0 && {
1521
- onError: t.onError
1522
- }, e[11] = t.onError, e[12] = c) : c = e[12];
1523
- let a;
1524
- e[13] !== s || e[14] !== o || e[15] !== i || e[16] !== r || e[17] !== c ? (a = {
1525
- ...s,
1526
- ...o,
1527
- ...i,
1528
- ...r,
1529
- ...c
1530
- }, e[13] = s, e[14] = o, e[15] = i, e[16] = r, e[17] = c, e[18] = a) : a = e[18];
1531
- const {
1532
- handleContinue: m,
1533
- isSubmitting: g,
1534
- lastUsedMethod: u
1535
- } = en(a), d = g ? "Continuing…" : `Continue with ${u}`;
1536
- let f;
1537
- e[19] !== d ? (f = /* @__PURE__ */ p(I, { variant: "textLabel1", weight: "semiBold", align: "center", className: "text-white", children: d }), e[19] = d, e[20] = f) : f = e[20];
1538
- let h;
1539
- e[21] !== m || e[22] !== g || e[23] !== f ? (h = /* @__PURE__ */ p(M, { variant: "primary", size: "large", fullWidth: !0, onClick: m, disabled: g, children: f }), e[21] = m, e[22] = g, e[23] = f, e[24] = h) : h = e[24];
1540
- let v;
1541
- e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ p(I, { variant: "textLabel1", weight: "semiBold", align: "center", className: "opacity-80", children: "Use another method" }), e[25] = v) : v = e[25];
1542
- let b;
1543
- e[26] !== l ? (b = /* @__PURE__ */ p(M, { variant: "outline", size: "large", fullWidth: !0, onClick: l, children: v }), e[26] = l, e[27] = b) : b = e[27];
1544
- let y;
1545
- return e[28] !== b || e[29] !== h ? (y = /* @__PURE__ */ F("div", { className: "w-full flex flex-col gap-[12px]", children: [
1546
- h,
1547
- b
1548
- ] }), e[28] = b, e[29] = h, e[30] = y) : y = e[30], y;
1549
- }
1550
- function xn(n) {
1551
- const e = E.c(31), {
1552
- layoutType: t,
1553
- variant: l
1554
- } = n, s = t === void 0 ? "standalone" : t, o = l === void 0 ? "mobile" : l;
1555
- let i;
1556
- e[0] !== n.pendingPhone ? (i = n.pendingPhone !== void 0 && {
1557
- pendingPhone: n.pendingPhone
1558
- }, e[0] = n.pendingPhone, e[1] = i) : i = e[1];
1559
- let r;
1560
- e[2] !== n.onSubmit ? (r = n.onSubmit !== void 0 && {
1561
- onSubmit: n.onSubmit
1562
- }, e[2] = n.onSubmit, e[3] = r) : r = e[3];
1563
- let c;
1564
- e[4] !== n.submitApi ? (c = n.submitApi !== void 0 && {
1565
- submitApi: n.submitApi
1566
- }, e[4] = n.submitApi, e[5] = c) : c = e[5];
1567
- let a;
1568
- e[6] !== n.onSuccess ? (a = n.onSuccess !== void 0 && {
1569
- onSuccess: n.onSuccess
1570
- }, e[6] = n.onSuccess, e[7] = a) : a = e[7];
1571
- let m;
1572
- e[8] !== n.onError ? (m = n.onError !== void 0 && {
1573
- onError: n.onError
1574
- }, e[8] = n.onError, e[9] = m) : m = e[9];
1575
- let g;
1576
- e[10] !== n.loginMethod || e[11] !== n.signupCollectField || e[12] !== n.userType || e[13] !== i || e[14] !== r || e[15] !== c || e[16] !== a || e[17] !== m ? (g = {
1577
- userType: n.userType,
1578
- loginMethod: n.loginMethod,
1579
- signupCollectField: n.signupCollectField,
1580
- ...i,
1581
- ...r,
1582
- ...c,
1583
- ...a,
1584
- ...m
1585
- }, e[10] = n.loginMethod, e[11] = n.signupCollectField, e[12] = n.userType, e[13] = i, e[14] = r, e[15] = c, e[16] = a, e[17] = m, e[18] = g) : g = e[18];
1586
- const u = g;
1587
- let d;
1588
- e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ p("img", { src: "/docthub.svg", alt: "Docthub Logo", width: 46, height: 46 }), e[19] = d) : d = e[19];
1589
- const f = d;
1590
- let h;
1591
- e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ p(I, { variant: "h5", weight: "extraBold", align: "center", className: "text-black", children: "Welcome to Docthub" }), e[20] = h) : h = e[20];
1592
- const v = h, b = n.loginMethod === "phone" ? "email" : "phone";
1593
- let y;
1594
- e[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ p("span", { className: "font-bold", children: "Full Name" }), e[21] = y) : y = e[21];
1595
- const w = b === "phone" ? "Phone Number" : "Email Address";
1596
- let x;
1597
- e[22] !== w ? (x = /* @__PURE__ */ F(I, { variant: "title2", align: "center", children: [
1598
- "Please tell us your ",
1599
- y,
1600
- " and",
1601
- " ",
1602
- /* @__PURE__ */ p("span", { className: "font-bold", children: w }),
1603
- " ",
1604
- "for extended security of your account."
1605
- ] }), e[22] = w, e[23] = x) : x = e[23];
1606
- const S = x;
1607
- let C;
1608
- e[24] !== u ? (C = /* @__PURE__ */ p(dn, { ...u }), e[24] = u, e[25] = C) : C = e[25];
1609
- let _;
1610
- return e[26] !== S || e[27] !== s || e[28] !== C || e[29] !== o ? (_ = /* @__PURE__ */ p(oe, { layoutType: s, variant: o, contentWidth: "sm", logo: f, title: v, description: S, children: C }), e[26] = S, e[27] = s, e[28] = C, e[29] = o, e[30] = _) : _ = e[30], _;
1611
- }
1612
- function un(n) {
1613
- const e = E.c(16), {
1614
- isPhone: t,
1615
- handleSubmit: l,
1616
- isFormValid: s,
1617
- isSubmitting: o
1618
- } = n, i = ne();
1619
- let r;
1620
- if (e[0] !== s || e[1] !== i) {
1621
- const v = i.watch();
1622
- r = s(v ?? {}), e[0] = s, e[1] = i, e[2] = r;
1623
- } else
1624
- r = e[2];
1625
- const c = r;
1626
- let a;
1627
- e[3] !== l || e[4] !== i ? (a = i.handleSubmit(l), e[3] = l, e[4] = i, e[5] = a) : a = e[5];
1628
- let m;
1629
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ p(pe, { name: "fullName", label: "Full name", placeholder: "Full name", type: "text", className: "w-full", autoFocus: !0 }), e[6] = m) : m = e[6];
1630
- let g;
1631
- e[7] !== t ? (g = /* @__PURE__ */ F("div", { className: "mb-6 flex w-full flex-col gap-[12px]", children: [
1632
- m,
1633
- t ? /* @__PURE__ */ p(je, { name: "phone", label: "Phone number", placeholder: "Phone number", defaultCountry: "IN" }) : /* @__PURE__ */ p(pe, { name: "email", label: "Email address", placeholder: "Email address", type: "email", className: "w-full" })
1634
- ] }), e[7] = t, e[8] = g) : g = e[8];
1635
- const u = !c || o, d = o ? "Continuing…" : "Continue";
1636
- let f;
1637
- e[9] !== u || e[10] !== d ? (f = /* @__PURE__ */ p(M, { type: "submit", variant: "primary", size: "large", fullWidth: !0, disabled: u, children: d }), e[9] = u, e[10] = d, e[11] = f) : f = e[11];
1638
- let h;
1639
- return e[12] !== a || e[13] !== g || e[14] !== f ? (h = /* @__PURE__ */ F("form", { onSubmit: a, className: "w-full flex flex-col items-center", children: [
1640
- g,
1641
- f
1642
- ] }), e[12] = a, e[13] = g, e[14] = f, e[15] = h) : h = e[15], h;
1643
- }
1644
- function dn(n) {
1645
- const e = E.c(23), {
1646
- loginMethod: t,
1647
- pendingPhone: l,
1648
- onSubmit: s,
1649
- submitApi: o,
1650
- onSuccess: i,
1651
- onError: r
1652
- } = n, c = l === void 0 ? "" : l, a = t === "phone" ? "email" : "phone";
1653
- let m;
1654
- e[0] !== s ? (m = s !== void 0 && {
1655
- onSubmit: s
1656
- }, e[0] = s, e[1] = m) : m = e[1];
1657
- let g;
1658
- e[2] !== o ? (g = o !== void 0 && {
1659
- submitApi: o
1660
- }, e[2] = o, e[3] = g) : g = e[3];
1661
- let u;
1662
- e[4] !== i ? (u = i !== void 0 && {
1663
- onSuccess: i
1664
- }, e[4] = i, e[5] = u) : u = e[5];
1665
- let d;
1666
- e[6] !== r ? (d = r !== void 0 && {
1667
- onError: r
1668
- }, e[6] = r, e[7] = d) : d = e[7];
1669
- let f;
1670
- e[8] !== a || e[9] !== c || e[10] !== m || e[11] !== g || e[12] !== u || e[13] !== d ? (f = {
1671
- mode: a,
1672
- defaultPhone: c,
1673
- ...m,
1674
- ...g,
1675
- ...u,
1676
- ...d
1677
- }, e[8] = a, e[9] = c, e[10] = m, e[11] = g, e[12] = u, e[13] = d, e[14] = f) : f = e[14];
1678
- const {
1679
- methods: h,
1680
- handleSubmit: v,
1681
- isPhone: b,
1682
- isFormValid: y,
1683
- isSubmitting: w
1684
- } = tn(f);
1685
- let x;
1686
- e[15] !== v || e[16] !== y || e[17] !== b || e[18] !== w ? (x = /* @__PURE__ */ p(un, { isPhone: b, handleSubmit: v, isFormValid: y, isSubmitting: w }), e[15] = v, e[16] = y, e[17] = b, e[18] = w, e[19] = x) : x = e[19];
1687
- let S;
1688
- return e[20] !== h || e[21] !== x ? (S = /* @__PURE__ */ p(ye, { ...h, children: x }), e[20] = h, e[21] = x, e[22] = S) : S = e[22], S;
1689
- }
1690
- export {
1691
- oe as A,
1692
- Kt as D,
1693
- pt as I,
1694
- vn as L,
1695
- bn as M,
1696
- yn as O,
1697
- Sn as R,
1698
- xn as S,
1699
- B as a,
1700
- an as b,
1701
- E as c,
1702
- dn as d,
1703
- bt as e,
1704
- ie as f,
1705
- Tt as g,
1706
- Ot as h,
1707
- jt as i,
1708
- Lt as j,
1709
- Ut as k,
1710
- Xt as l,
1711
- en as m,
1712
- tn as n,
1713
- xt as u
1714
- };