doct-ui-auth-kit 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +11 -0
  2. package/dist/adapters/http-auth-adapter.d.ts +1 -5
  3. package/dist/auth/index.d.ts +2 -2
  4. package/dist/components/form/rhf-doct-phone-input.d.ts +1 -1
  5. package/dist/components/form/rhf-input-field.d.ts +1 -1
  6. package/dist/components/form/rhf-otp-input-field.d.ts +1 -1
  7. package/dist/components/layout/auth-layout-preset.d.ts +7 -2
  8. package/dist/components/layout/auth-layout-public.d.ts +8 -12
  9. package/dist/components/layout/auth-layout-wrapper.d.ts +21 -2
  10. package/dist/components/layout/auth-layout.d.ts +1 -1
  11. package/dist/components/layout/image-slider.d.ts +2 -2
  12. package/dist/components/layout/main-layout.d.ts +2 -2
  13. package/dist/constants/layout-presets.d.ts +1 -5
  14. package/dist/core/auth-api-adapter.d.ts +1 -1
  15. package/dist/core/auth-context.d.ts +5 -5
  16. package/dist/core/auth-provider.d.ts +2 -2
  17. package/dist/core/auth-types.d.ts +1 -1
  18. package/dist/core/device-detection.d.ts +2 -6
  19. package/dist/core/sso-session.d.ts +2 -6
  20. package/dist/core/use-auth-flow.d.ts +2 -6
  21. package/dist/hooks/use-login-entry-form.d.ts +2 -2
  22. package/dist/hooks/use-main-auth-page-handlers.d.ts +2 -2
  23. package/dist/hooks/use-otp-verification.d.ts +3 -3
  24. package/dist/hooks/use-repeat-login.d.ts +2 -2
  25. package/dist/hooks/use-signup-form.d.ts +2 -2
  26. package/dist/index.d.ts +11 -36
  27. package/dist/index.js +3 -2
  28. package/dist/pages/login-entry.d.ts +4 -4
  29. package/dist/pages/main-login.d.ts +2 -2
  30. package/dist/pages/otp-verification.d.ts +2 -2
  31. package/dist/pages/repeat-login.d.ts +2 -2
  32. package/dist/pages/signup.d.ts +4 -43
  33. package/dist/pages.js +6 -5
  34. package/dist/signup-DeeuWsoF.js +1718 -0
  35. package/dist/types/auth-api-adapter.d.ts +1 -5
  36. package/dist/types/auth-layout-types.d.ts +1 -1
  37. package/dist/types/auth-provider.d.ts +7 -4
  38. package/dist/types/device-detection.d.ts +4 -1
  39. package/dist/types/flow.d.ts +1 -4
  40. package/dist/types/forms.d.ts +28 -2
  41. package/dist/types/layout-presets.d.ts +1 -6
  42. package/dist/types/layout.d.ts +1 -1
  43. package/dist/types/login-form.d.ts +24 -7
  44. package/dist/types/main-login.d.ts +11 -0
  45. package/dist/types/otp-verification.d.ts +15 -3
  46. package/dist/types/pages.d.ts +10 -10
  47. package/dist/types/repeat-login.d.ts +1 -0
  48. package/dist/types/signup-form.d.ts +10 -3
  49. package/dist/utils/set-form-errors-from-zod.d.ts +1 -1
  50. package/dist/validations/schemas.d.ts +4 -7
  51. package/package.json +4 -4
  52. package/dist/signup-BJWKwg7j.js +0 -1723
  53. package/dist/stories/components/default-footer.d.ts +0 -5
  54. package/dist/stories/components/enterprise-header.d.ts +0 -5
  55. package/dist/stories/components/index.d.ts +0 -2
@@ -1,1723 +0,0 @@
1
- import { jsxs as F, jsx as p, Fragment as Ge } from "react/jsx-runtime";
2
- import { DoctTypography as I, DoctButton as M, DoctPhoneInput as Ve, DoctLabeledInput as qe, DoctOtpInput as Ye } 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 Ke, useContext as Xe, 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 Ze() {
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 Je() {
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 Qe() {
35
- return Ae || (Ae = 1, process.env.NODE_ENV === "production" ? ce.exports = Ze() : ce.exports = Je()), ce.exports;
36
- }
37
- var E = Qe(), 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), et = ["attr", "size", "title"];
44
- function tt(n, e) {
45
- if (n == null) return {};
46
- var t = nt(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 nt(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
- lt(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 lt(n, e, t) {
96
- return e = it(e), e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
97
- }
98
- function it(n) {
99
- var e = ot(n, "string");
100
- return typeof e == "symbol" ? e : e + "";
101
- }
102
- function ot(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(st, de({
119
- attr: fe({}, n.attr)
120
- }, e), ke(n.child));
121
- }
122
- function st(n) {
123
- var e = (t) => {
124
- var {
125
- attr: l,
126
- size: s,
127
- title: o
128
- } = n, i = tt(n, et), 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 rt(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"], at = 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 = Ke(null);
166
- function xe() {
167
- const n = Xe($e);
168
- if (!n)
169
- throw new Error("AuthLayout compound components must be used within AuthLayout.Root");
170
- return n;
171
- }
172
- function ct(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 ut(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 = ct(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 dt(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 ft(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 mt(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 ht(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 gt(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 pt(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 vt(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: ut,
343
- Header: dt,
344
- Main: pt,
345
- Logo: ft,
346
- Title: mt,
347
- Description: ht,
348
- Body: gt,
349
- Footer: vt
350
- };
351
- function bt(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 yt(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(bt, { 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 St(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(yt, { 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 ? at : 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(Ge, { 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(St, { 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 xt() {
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 wt = "openid email profile", Re = 2e3;
561
- function Ct(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 xt(), !(!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: wt,
582
- ux_mode: "popup",
583
- callback: (C) => {
584
- c.current(C.code);
585
- },
586
- error_callback: Nt
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 Nt() {
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(Ve, { 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(qe, { ...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 _t(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(_t), 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()), Et = W.object({
722
- fullName: Ce,
723
- phone: Ne
724
- }), Pt = W.object({
725
- fullName: Ce,
726
- email: _e
727
- }), At = W.object({
728
- fullName: Ce,
729
- email: _e,
730
- phone: Ne
731
- }), Le = {
732
- phone: Et,
733
- email: Pt,
734
- foreign: At
735
- }, Ot = W.object({
736
- phone: Ne
737
- }), Tt = W.object({
738
- email: _e
739
- }), Fe = {
740
- phone: Ot,
741
- email: Tt
742
- }, ie = 6, It = 60, Rt = 120;
743
- function Lt(n) {
744
- return n === "phone" ? It : Rt;
745
- }
746
- const Ft = 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 Mt(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 kt = {
804
- phone: "Enter Phone Number",
805
- email: "Enter Email Address"
806
- }, Dt = {
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 ?? kt[t], h = s ?? Dt[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($t, { 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 Wt(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 $t(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
- } = Mt(g);
907
- let v;
908
- e[14] !== d || e[15] !== f || e[16] !== h ? (v = /* @__PURE__ */ p(Wt, { 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 jt(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 Ut(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 zt(n) {
924
- return {
925
- triggerSignIn() {
926
- }
927
- };
928
- }
929
- function ze(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 = Yt, o = qt, i = Vt, r = Gt, c = l.providers?.google?.clientId ?? "";
934
- let a;
935
- e[2] !== l.providers?.google?.onCredential ? (a = l.providers?.google?.onCredential ?? Ht, 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
- } = Ct(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 ?? Bt, 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
- } = zt(), 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 Bt() {
971
- }
972
- function Ht() {
973
- }
974
- function Gt() {
975
- }
976
- function Vt() {
977
- }
978
- function qt() {
979
- }
980
- function Yt() {
981
- }
982
- const Kt = {
983
- phone: "Kindly check your Mobile.",
984
- email: "Kindly check your Email Inbox."
985
- }, Xt = {
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 Zt(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 = Lt(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
- }, Qt), 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(Jt);
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 = Ft.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 Jt(n) {
1070
- return n <= 1 ? 0 : n - 1;
1071
- }
1072
- function Qt() {
1073
- return "";
1074
- }
1075
- const en = "Mobile";
1076
- function tn(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 ? en : 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 nn(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 Be() {
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 ln() {
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(rt, { 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 = ze(n);
1201
- let l;
1202
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ p(ln, {}), 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(Be, {}), 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(He, { handlers: t }) }), e[3] = t, e[4] = i) : i = e[4], i;
1209
- };
1210
- function yn(n) {
1211
- const e = E.c(2), t = ze(n);
1212
- let l;
1213
- return e[0] !== t ? (l = /* @__PURE__ */ p(He, { handlers: t }), e[0] = t, e[1] = l) : l = e[1], l;
1214
- }
1215
- const He = (n) => {
1216
- const e = E.c(19), {
1217
- handlers: t
1218
- } = n, {
1219
- onContinueWithMobile: l,
1220
- onContinueWithEmail: s,
1221
- onContinueWithGoogle: o,
1222
- onContinueWithApple: i
1223
- } = t;
1224
- let r;
1225
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ p(ue, { children: "Continue with Mobile" }), e[0] = r) : r = e[0];
1226
- let c;
1227
- 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];
1228
- let a;
1229
- e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ p(ue, { children: "Continue with Email" }), e[3] = a) : a = e[3];
1230
- let m;
1231
- 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];
1232
- let g;
1233
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ p(Ut, { "aria-hidden": !0 }), e[6] = g) : g = e[6];
1234
- let u;
1235
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ p(ue, { children: "Continue with Google" }), e[7] = u) : u = e[7];
1236
- let d;
1237
- 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];
1238
- let f;
1239
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ p(jt, { "aria-hidden": !0 }), e[10] = f) : f = e[10];
1240
- let h;
1241
- e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ p(ue, { children: "Continue with Apple" }), e[11] = h) : h = e[11];
1242
- let v;
1243
- 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];
1244
- let b;
1245
- 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: [
1246
- c,
1247
- m,
1248
- d,
1249
- v
1250
- ] }), e[14] = v, e[15] = c, e[16] = m, e[17] = d, e[18] = b) : b = e[18], b;
1251
- }, ue = (n) => {
1252
- const e = E.c(2), {
1253
- children: t
1254
- } = n;
1255
- let l;
1256
- 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;
1257
- };
1258
- function on(n) {
1259
- const e = E.c(10), {
1260
- name: t,
1261
- label: l,
1262
- className: s,
1263
- control: o,
1264
- length: i,
1265
- inputClassName: r,
1266
- autoFocus: c
1267
- } = n, a = i === void 0 ? 6 : i, m = ne(), g = o || m.control;
1268
- let u;
1269
- e[0] !== c || e[1] !== s || e[2] !== r || e[3] !== l || e[4] !== a ? (u = (f) => {
1270
- const {
1271
- field: h,
1272
- fieldState: v
1273
- } = f;
1274
- return /* @__PURE__ */ F("div", { children: [
1275
- l && /* @__PURE__ */ p("label", { className: "block mb-1", children: l }),
1276
- /* @__PURE__ */ p(Ye, { length: a, value: h.value || [], onChange: h.onChange, ...c !== void 0 && {
1277
- autoFocus: c
1278
- }, ...s && {
1279
- className: s
1280
- }, ...r && {
1281
- inputClassName: r
1282
- }, ...v.error?.message !== void 0 && v.error?.message !== "" && {
1283
- error: v.error.message
1284
- } })
1285
- ] });
1286
- }, e[0] = c, e[1] = s, e[2] = r, e[3] = l, e[4] = a, e[5] = u) : u = e[5];
1287
- let d;
1288
- 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;
1289
- }
1290
- function Sn(n) {
1291
- const e = E.c(41);
1292
- let t, l, s, o;
1293
- e[0] !== n ? ({
1294
- layoutType: s,
1295
- variant: o,
1296
- onBack: l,
1297
- ...t
1298
- } = 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]);
1299
- const i = s === void 0 ? "withSlider" : s;
1300
- let r;
1301
- e[5] !== o ? (r = o !== void 0 && {
1302
- variant: o
1303
- }, e[5] = o, e[6] = r) : r = e[6];
1304
- let c;
1305
- 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];
1306
- let a;
1307
- e[9] !== t.title ? (a = t.title !== void 0 && {
1308
- title: t.title
1309
- }, e[9] = t.title, e[10] = a) : a = e[10];
1310
- let m;
1311
- e[11] !== t.isForeignUser ? (m = t.isForeignUser !== void 0 && {
1312
- isForeignUser: t.isForeignUser
1313
- }, e[11] = t.isForeignUser, e[12] = m) : m = e[12];
1314
- let g;
1315
- e[13] !== l ? (g = l !== void 0 && {
1316
- onBack: l
1317
- }, e[13] = l, e[14] = g) : g = e[14];
1318
- let u;
1319
- e[15] !== t.onSubmit ? (u = t.onSubmit !== void 0 && {
1320
- onSubmit: t.onSubmit
1321
- }, e[15] = t.onSubmit, e[16] = u) : u = e[16];
1322
- let d;
1323
- e[17] !== t.onResendCode ? (d = t.onResendCode !== void 0 && {
1324
- onResendCode: t.onResendCode
1325
- }, e[17] = t.onResendCode, e[18] = d) : d = e[18];
1326
- let f;
1327
- e[19] !== t.submitApi ? (f = t.submitApi !== void 0 && {
1328
- submitApi: t.submitApi
1329
- }, e[19] = t.submitApi, e[20] = f) : f = e[20];
1330
- let h;
1331
- e[21] !== t.onSuccess ? (h = t.onSuccess !== void 0 && {
1332
- onSuccess: t.onSuccess
1333
- }, e[21] = t.onSuccess, e[22] = h) : h = e[22];
1334
- let v;
1335
- e[23] !== t.onError ? (v = t.onError !== void 0 && {
1336
- onError: t.onError
1337
- }, e[23] = t.onError, e[24] = v) : v = e[24];
1338
- let b;
1339
- 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];
1340
- let y;
1341
- 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;
1342
- }
1343
- function sn(n) {
1344
- return !Array.isArray(n) || n.length !== ie ? !1 : n.every((e) => typeof e == "string" && /^\d$/.test(e));
1345
- }
1346
- function rn(n) {
1347
- const e = E.c(28), {
1348
- mode: t,
1349
- title: l,
1350
- recipientDisplay: s,
1351
- isForeignUser: o,
1352
- handleSubmit: i,
1353
- handleResend: r,
1354
- canResend: c,
1355
- timerText: a,
1356
- isSubmitting: m
1357
- } = n, g = ne();
1358
- let u;
1359
- if (e[0] !== g) {
1360
- const P = g.watch("otp");
1361
- u = sn(P), e[0] = g, e[1] = u;
1362
- } else
1363
- u = e[1];
1364
- const d = u;
1365
- let f;
1366
- e[2] !== i || e[3] !== g ? (f = g.handleSubmit(i), e[2] = i, e[3] = g, e[4] = f) : f = e[4];
1367
- let h;
1368
- 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];
1369
- const v = o ? "mb-2 text-black/80" : "mb-6 text-black/80";
1370
- let b;
1371
- 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];
1372
- let y;
1373
- e[10] !== o || e[11] !== t ? (y = o && /* @__PURE__ */ p(I, { variant: "body2", align: "left", className: "mb-6 text-black/80", children: Kt[t] }), e[10] = o, e[11] = t, e[12] = y) : y = e[12];
1374
- let w;
1375
- 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];
1376
- let x;
1377
- 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];
1378
- const S = !d || m, C = m ? "Verifying…" : "Submit";
1379
- let _;
1380
- 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];
1381
- let N;
1382
- 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: [
1383
- h,
1384
- b,
1385
- y,
1386
- w,
1387
- x,
1388
- _
1389
- ] }), e[21] = _, e[22] = f, e[23] = h, e[24] = b, e[25] = y, e[26] = x, e[27] = N) : N = e[27], N;
1390
- }
1391
- function an(n) {
1392
- const e = E.c(30), {
1393
- mode: t,
1394
- title: l,
1395
- recipientDisplay: s,
1396
- isForeignUser: o,
1397
- onSubmit: i,
1398
- onResendCode: r,
1399
- submitApi: c,
1400
- onSuccess: a,
1401
- onError: m
1402
- } = n, g = o === void 0 ? !1 : o;
1403
- let u;
1404
- e[0] !== i ? (u = i !== void 0 && {
1405
- onSubmit: i
1406
- }, e[0] = i, e[1] = u) : u = e[1];
1407
- let d;
1408
- e[2] !== r ? (d = r !== void 0 && {
1409
- onResendCode: r
1410
- }, e[2] = r, e[3] = d) : d = e[3];
1411
- let f;
1412
- e[4] !== c ? (f = c !== void 0 && {
1413
- submitApi: c
1414
- }, e[4] = c, e[5] = f) : f = e[5];
1415
- let h;
1416
- e[6] !== a ? (h = a !== void 0 && {
1417
- onSuccess: a
1418
- }, e[6] = a, e[7] = h) : h = e[7];
1419
- let v;
1420
- e[8] !== m ? (v = m !== void 0 && {
1421
- onError: m
1422
- }, e[8] = m, e[9] = v) : v = e[9];
1423
- let b;
1424
- e[10] !== t || e[11] !== u || e[12] !== d || e[13] !== f || e[14] !== h || e[15] !== v ? (b = {
1425
- mode: t,
1426
- ...u,
1427
- ...d,
1428
- ...f,
1429
- ...h,
1430
- ...v
1431
- }, e[10] = t, e[11] = u, e[12] = d, e[13] = f, e[14] = h, e[15] = v, e[16] = b) : b = e[16];
1432
- const {
1433
- methods: y,
1434
- handleSubmit: w,
1435
- handleResend: x,
1436
- canResend: S,
1437
- timerText: C,
1438
- isSubmitting: _
1439
- } = Zt(b), N = l ?? Xt[t];
1440
- let P;
1441
- 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];
1442
- let A;
1443
- 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;
1444
- }
1445
- function xn(n) {
1446
- const e = E.c(31), {
1447
- lastUsedMethod: t,
1448
- onContinueWithLastMethod: l,
1449
- onUseAnotherMethod: s,
1450
- continueApi: o,
1451
- onSuccess: i,
1452
- onError: r,
1453
- layoutType: c,
1454
- variant: a
1455
- } = n, m = t === void 0 ? "Mobile" : t, g = c === void 0 ? "withSlider" : c, u = a === "mobile" || g === "standalone";
1456
- let d;
1457
- 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];
1458
- const f = d;
1459
- let h;
1460
- e[1] !== a ? (h = a !== void 0 && {
1461
- variant: a
1462
- }, e[1] = a, e[2] = h) : h = e[2];
1463
- let v;
1464
- 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: [
1465
- " ",
1466
- "Welcome Back!",
1467
- " "
1468
- ] }), e[3] = u, e[4] = v) : v = e[4];
1469
- let b;
1470
- e[5] !== m ? (b = /* @__PURE__ */ F(I, { variant: "body1", align: "center", color: "black", children: [
1471
- "Last time you used ",
1472
- m,
1473
- " to log in."
1474
- ] }), e[5] = m, e[6] = b) : b = e[6];
1475
- let y;
1476
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ p(Be, {}), e[7] = y) : y = e[7];
1477
- let w;
1478
- e[8] !== l ? (w = l !== void 0 && {
1479
- onContinueWithLastMethod: l
1480
- }, e[8] = l, e[9] = w) : w = e[9];
1481
- let x;
1482
- e[10] !== s ? (x = s !== void 0 && {
1483
- onUseAnotherMethod: s
1484
- }, e[10] = s, e[11] = x) : x = e[11];
1485
- let S;
1486
- e[12] !== o ? (S = o !== void 0 && {
1487
- continueApi: o
1488
- }, e[12] = o, e[13] = S) : S = e[13];
1489
- let C;
1490
- e[14] !== i ? (C = i !== void 0 && {
1491
- onSuccess: i
1492
- }, e[14] = i, e[15] = C) : C = e[15];
1493
- let _;
1494
- e[16] !== r ? (_ = r !== void 0 && {
1495
- onError: r
1496
- }, e[16] = r, e[17] = _) : _ = e[17];
1497
- let N;
1498
- 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];
1499
- let P;
1500
- 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;
1501
- }
1502
- function cn(n) {
1503
- const e = E.c(31);
1504
- let t, l;
1505
- e[0] !== n ? ({
1506
- onUseAnotherMethod: l,
1507
- ...t
1508
- } = n, e[0] = n, e[1] = t, e[2] = l) : (t = e[1], l = e[2]);
1509
- let s;
1510
- e[3] !== t.lastUsedMethod ? (s = t.lastUsedMethod !== void 0 && {
1511
- lastUsedMethod: t.lastUsedMethod
1512
- }, e[3] = t.lastUsedMethod, e[4] = s) : s = e[4];
1513
- let o;
1514
- e[5] !== t.onContinueWithLastMethod ? (o = t.onContinueWithLastMethod !== void 0 && {
1515
- onContinueWithLastMethod: t.onContinueWithLastMethod
1516
- }, e[5] = t.onContinueWithLastMethod, e[6] = o) : o = e[6];
1517
- let i;
1518
- e[7] !== t.continueApi ? (i = t.continueApi !== void 0 && {
1519
- continueApi: t.continueApi
1520
- }, e[7] = t.continueApi, e[8] = i) : i = e[8];
1521
- let r;
1522
- e[9] !== t.onSuccess ? (r = t.onSuccess !== void 0 && {
1523
- onSuccess: t.onSuccess
1524
- }, e[9] = t.onSuccess, e[10] = r) : r = e[10];
1525
- let c;
1526
- e[11] !== t.onError ? (c = t.onError !== void 0 && {
1527
- onError: t.onError
1528
- }, e[11] = t.onError, e[12] = c) : c = e[12];
1529
- let a;
1530
- e[13] !== s || e[14] !== o || e[15] !== i || e[16] !== r || e[17] !== c ? (a = {
1531
- ...s,
1532
- ...o,
1533
- ...i,
1534
- ...r,
1535
- ...c
1536
- }, e[13] = s, e[14] = o, e[15] = i, e[16] = r, e[17] = c, e[18] = a) : a = e[18];
1537
- const {
1538
- handleContinue: m,
1539
- isSubmitting: g,
1540
- lastUsedMethod: u
1541
- } = tn(a), d = g ? "Continuing…" : `Continue with ${u}`;
1542
- let f;
1543
- 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];
1544
- let h;
1545
- 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];
1546
- let v;
1547
- 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];
1548
- let b;
1549
- 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];
1550
- let y;
1551
- return e[28] !== b || e[29] !== h ? (y = /* @__PURE__ */ F("div", { className: "w-full flex flex-col gap-[12px]", children: [
1552
- h,
1553
- b
1554
- ] }), e[28] = b, e[29] = h, e[30] = y) : y = e[30], y;
1555
- }
1556
- function wn(n) {
1557
- const e = E.c(31), {
1558
- layoutType: t,
1559
- variant: l
1560
- } = n, s = t === void 0 ? "standalone" : t, o = l === void 0 ? "mobile" : l;
1561
- let i;
1562
- e[0] !== n.pendingPhone ? (i = n.pendingPhone !== void 0 && {
1563
- pendingPhone: n.pendingPhone
1564
- }, e[0] = n.pendingPhone, e[1] = i) : i = e[1];
1565
- let r;
1566
- e[2] !== n.onSubmit ? (r = n.onSubmit !== void 0 && {
1567
- onSubmit: n.onSubmit
1568
- }, e[2] = n.onSubmit, e[3] = r) : r = e[3];
1569
- let c;
1570
- e[4] !== n.submitApi ? (c = n.submitApi !== void 0 && {
1571
- submitApi: n.submitApi
1572
- }, e[4] = n.submitApi, e[5] = c) : c = e[5];
1573
- let a;
1574
- e[6] !== n.onSuccess ? (a = n.onSuccess !== void 0 && {
1575
- onSuccess: n.onSuccess
1576
- }, e[6] = n.onSuccess, e[7] = a) : a = e[7];
1577
- let m;
1578
- e[8] !== n.onError ? (m = n.onError !== void 0 && {
1579
- onError: n.onError
1580
- }, e[8] = n.onError, e[9] = m) : m = e[9];
1581
- let g;
1582
- 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 = {
1583
- userType: n.userType,
1584
- loginMethod: n.loginMethod,
1585
- signupCollectField: n.signupCollectField,
1586
- ...i,
1587
- ...r,
1588
- ...c,
1589
- ...a,
1590
- ...m
1591
- }, 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];
1592
- const u = g;
1593
- let d;
1594
- 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];
1595
- const f = d;
1596
- let h;
1597
- 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];
1598
- const v = h, b = n.loginMethod === "phone" ? "email" : "phone";
1599
- let y;
1600
- 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];
1601
- const w = b === "phone" ? "Phone Number" : "Email Address";
1602
- let x;
1603
- e[22] !== w ? (x = /* @__PURE__ */ F(I, { variant: "title2", align: "center", children: [
1604
- "Please tell us your ",
1605
- y,
1606
- " and",
1607
- " ",
1608
- /* @__PURE__ */ p("span", { className: "font-bold", children: w }),
1609
- " ",
1610
- "for extended security of your account."
1611
- ] }), e[22] = w, e[23] = x) : x = e[23];
1612
- const S = x;
1613
- let C;
1614
- e[24] !== u ? (C = /* @__PURE__ */ p(dn, { ...u }), e[24] = u, e[25] = C) : C = e[25];
1615
- let _;
1616
- 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], _;
1617
- }
1618
- function un(n) {
1619
- const e = E.c(16), {
1620
- isPhone: t,
1621
- handleSubmit: l,
1622
- isFormValid: s,
1623
- isSubmitting: o
1624
- } = n, i = ne();
1625
- let r;
1626
- if (e[0] !== s || e[1] !== i) {
1627
- const v = i.watch();
1628
- r = s(v ?? {}), e[0] = s, e[1] = i, e[2] = r;
1629
- } else
1630
- r = e[2];
1631
- const c = r;
1632
- let a;
1633
- e[3] !== l || e[4] !== i ? (a = i.handleSubmit(l), e[3] = l, e[4] = i, e[5] = a) : a = e[5];
1634
- let m;
1635
- 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];
1636
- let g;
1637
- e[7] !== t ? (g = /* @__PURE__ */ F("div", { className: "mb-6 flex w-full flex-col gap-[12px]", children: [
1638
- m,
1639
- 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" })
1640
- ] }), e[7] = t, e[8] = g) : g = e[8];
1641
- const u = !c || o, d = o ? "Continuing…" : "Continue";
1642
- let f;
1643
- 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];
1644
- let h;
1645
- 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: [
1646
- g,
1647
- f
1648
- ] }), e[12] = a, e[13] = g, e[14] = f, e[15] = h) : h = e[15], h;
1649
- }
1650
- function dn(n) {
1651
- const e = E.c(23), {
1652
- loginMethod: t,
1653
- pendingPhone: l,
1654
- onSubmit: s,
1655
- submitApi: o,
1656
- onSuccess: i,
1657
- onError: r
1658
- } = n, c = l === void 0 ? "" : l, a = t === "phone" ? "email" : "phone";
1659
- let m;
1660
- e[0] !== s ? (m = s !== void 0 && {
1661
- onSubmit: s
1662
- }, e[0] = s, e[1] = m) : m = e[1];
1663
- let g;
1664
- e[2] !== o ? (g = o !== void 0 && {
1665
- submitApi: o
1666
- }, e[2] = o, e[3] = g) : g = e[3];
1667
- let u;
1668
- e[4] !== i ? (u = i !== void 0 && {
1669
- onSuccess: i
1670
- }, e[4] = i, e[5] = u) : u = e[5];
1671
- let d;
1672
- e[6] !== r ? (d = r !== void 0 && {
1673
- onError: r
1674
- }, e[6] = r, e[7] = d) : d = e[7];
1675
- let f;
1676
- e[8] !== a || e[9] !== c || e[10] !== m || e[11] !== g || e[12] !== u || e[13] !== d ? (f = {
1677
- mode: a,
1678
- defaultPhone: c,
1679
- ...m,
1680
- ...g,
1681
- ...u,
1682
- ...d
1683
- }, e[8] = a, e[9] = c, e[10] = m, e[11] = g, e[12] = u, e[13] = d, e[14] = f) : f = e[14];
1684
- const {
1685
- methods: h,
1686
- handleSubmit: v,
1687
- isPhone: b,
1688
- isFormValid: y,
1689
- isSubmitting: w
1690
- } = nn(f);
1691
- let x;
1692
- 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];
1693
- let S;
1694
- 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;
1695
- }
1696
- export {
1697
- oe as A,
1698
- Xt as D,
1699
- bt as I,
1700
- $t as L,
1701
- yn as M,
1702
- an as O,
1703
- cn as R,
1704
- dn as S,
1705
- vn as a,
1706
- bn as b,
1707
- Sn as c,
1708
- xn as d,
1709
- wn as e,
1710
- E as f,
1711
- B as g,
1712
- St as h,
1713
- ie as i,
1714
- Rt as j,
1715
- It as k,
1716
- zt as l,
1717
- Mt as m,
1718
- ze as n,
1719
- Zt as o,
1720
- tn as p,
1721
- nn as q,
1722
- Ct as u
1723
- };