chordia-ui 3.2.0 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es2.js CHANGED
@@ -1,23 +1,23 @@
1
- import { jsxs as S, jsx as p, Fragment as xe } from "react/jsx-runtime";
2
- import Q, { useMemo as We, useState as T, useRef as je, useEffect as fe, useCallback as ze, useImperativeHandle as vn, lazy as eo, Suspense as to } from "react";
3
- import { CircleCheckBig as no, ShieldCheck as oo, Radar as ro, EyeOff as io, Eye as so } from "lucide-react";
1
+ import { jsxs as I, jsx as p, Fragment as Se } from "react/jsx-runtime";
2
+ import ne, { useMemo as _e, useState as j, useRef as xe, useEffect as ce, useCallback as Xe, useImperativeHandle as Sn, lazy as uo, Suspense as po } from "react";
3
+ import { CircleCheckBig as go, ShieldCheck as ho, Radar as fo, EyeOff as vo, Eye as mo } from "lucide-react";
4
4
  import "./colors.es.js";
5
- const mn = Q.createContext(void 0), Wt = (e) => (...t) => {
5
+ const Cn = ne.createContext(void 0), en = (e) => (...t) => {
6
6
  if (!e)
7
7
  throw Error("You can only use this function after sdk initialization. Make sure to supply 'projectId' to <AuthProvider /> component");
8
8
  return e(...t);
9
- }, ao = () => typeof window < "u" && !!window.descopeBridge, Ke = { "x-descope-sdk-name": "react", "x-descope-sdk-version": "2.26.7" }, Yt = typeof window < "u";
10
- var Ve = function() {
11
- return Ve = Object.assign || function(t) {
9
+ }, yo = () => typeof window < "u" && !!window.descopeBridge, Qe = { "x-descope-sdk-name": "react", "x-descope-sdk-version": "2.26.7" }, tn = typeof window < "u";
10
+ var Ge = function() {
11
+ return Ge = Object.assign || function(t) {
12
12
  for (var n, o = 1, r = arguments.length; o < r; o++) {
13
13
  n = arguments[o];
14
14
  for (var i in n)
15
15
  Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
16
16
  }
17
17
  return t;
18
- }, Ve.apply(this, arguments);
18
+ }, Ge.apply(this, arguments);
19
19
  };
20
- function D(e, t) {
20
+ function P(e, t) {
21
21
  var n = {};
22
22
  for (var o in e)
23
23
  Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
@@ -26,47 +26,47 @@ function D(e, t) {
26
26
  t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
27
27
  return n;
28
28
  }
29
- function Oi(e, t, n, o) {
29
+ function Li(e, t, n, o) {
30
30
  function r(i) {
31
- return i instanceof n ? i : new n(function(s) {
32
- s(i);
31
+ return i instanceof n ? i : new n(function(a) {
32
+ a(i);
33
33
  });
34
34
  }
35
- return new (n || (n = Promise))(function(i, s) {
35
+ return new (n || (n = Promise))(function(i, a) {
36
36
  function l(d) {
37
37
  try {
38
38
  c(o.next(d));
39
39
  } catch (u) {
40
- s(u);
40
+ a(u);
41
41
  }
42
42
  }
43
- function a(d) {
43
+ function s(d) {
44
44
  try {
45
45
  c(o.throw(d));
46
46
  } catch (u) {
47
- s(u);
47
+ a(u);
48
48
  }
49
49
  }
50
50
  function c(d) {
51
- d.done ? i(d.value) : r(d.value).then(l, a);
51
+ d.done ? i(d.value) : r(d.value).then(l, s);
52
52
  }
53
53
  c((o = o.apply(e, t || [])).next());
54
54
  });
55
55
  }
56
- function lo(e, t, n) {
56
+ function wo(e, t, n) {
57
57
  if (n || arguments.length === 2)
58
58
  for (var o = 0, r = t.length, i; o < r; o++)
59
59
  (i || !(o in t)) && (i || (i = Array.prototype.slice.call(t, 0, o)), i[o] = t[o]);
60
60
  return e.concat(i || Array.prototype.slice.call(t));
61
61
  }
62
- function Ui(e, t, n, o) {
62
+ function Fi(e, t, n, o) {
63
63
  if (n === "a" && !o)
64
64
  throw new TypeError("Private accessor was defined without a getter");
65
65
  if (typeof t == "function" ? e !== t || !o : !t.has(e))
66
66
  throw new TypeError("Cannot read private member from an object whose class did not declare it");
67
67
  return n === "m" ? o : n === "a" ? o.call(e) : o ? o.value : t.get(e);
68
68
  }
69
- function Ai(e, t, n, o, r) {
69
+ function qi(e, t, n, o, r) {
70
70
  if (o === "m")
71
71
  throw new TypeError("Private method is not writable");
72
72
  if (o === "a" && !r)
@@ -75,16 +75,16 @@ function Ai(e, t, n, o, r) {
75
75
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
76
76
  return o === "a" ? r.call(e, n) : r ? r.value = n : t.set(e, n), n;
77
77
  }
78
- class Ae extends Error {
78
+ class Le extends Error {
79
79
  }
80
- Ae.prototype.name = "InvalidTokenError";
81
- function co(e) {
80
+ Le.prototype.name = "InvalidTokenError";
81
+ function bo(e) {
82
82
  return decodeURIComponent(atob(e).replace(/(.)/g, (t, n) => {
83
83
  let o = n.charCodeAt(0).toString(16).toUpperCase();
84
84
  return o.length < 2 && (o = "0" + o), "%" + o;
85
85
  }));
86
86
  }
87
- function uo(e) {
87
+ function ko(e) {
88
88
  let t = e.replace(/-/g, "+").replace(/_/g, "/");
89
89
  switch (t.length % 4) {
90
90
  case 0:
@@ -99,32 +99,32 @@ function uo(e) {
99
99
  throw new Error("base64 string is not of the correct length");
100
100
  }
101
101
  try {
102
- return co(t);
102
+ return bo(t);
103
103
  } catch {
104
104
  return atob(t);
105
105
  }
106
106
  }
107
- function St(e, t) {
107
+ function Dt(e, t) {
108
108
  if (typeof e != "string")
109
- throw new Ae("Invalid token specified: must be a string");
109
+ throw new Le("Invalid token specified: must be a string");
110
110
  t || (t = {});
111
111
  const n = t.header === !0 ? 0 : 1, o = e.split(".")[n];
112
112
  if (typeof o != "string")
113
- throw new Ae(`Invalid token specified: missing part #${n + 1}`);
113
+ throw new Le(`Invalid token specified: missing part #${n + 1}`);
114
114
  let r;
115
115
  try {
116
- r = uo(o);
116
+ r = ko(o);
117
117
  } catch (i) {
118
- throw new Ae(`Invalid token specified: invalid base64 for part #${n + 1} (${i.message})`);
118
+ throw new Le(`Invalid token specified: invalid base64 for part #${n + 1} (${i.message})`);
119
119
  }
120
120
  try {
121
121
  return JSON.parse(r);
122
122
  } catch (i) {
123
- throw new Ae(`Invalid token specified: invalid json for part #${n + 1} (${i.message})`);
123
+ throw new Le(`Invalid token specified: invalid json for part #${n + 1} (${i.message})`);
124
124
  }
125
125
  }
126
126
  var v = { accessKey: { exchange: "/v1/auth/accesskey/exchange" }, otp: { verify: "/v1/auth/otp/verify", signIn: "/v1/auth/otp/signin", signUp: "/v1/auth/otp/signup", update: { email: "/v1/auth/otp/update/email", phone: "/v1/auth/otp/update/phone" }, signUpOrIn: "/v1/auth/otp/signup-in" }, magicLink: { verify: "/v1/auth/magiclink/verify", signIn: "/v1/auth/magiclink/signin", signUp: "/v1/auth/magiclink/signup", update: { email: "/v1/auth/magiclink/update/email", phone: "/v1/auth/magiclink/update/phone" }, signUpOrIn: "/v1/auth/magiclink/signup-in" }, enchantedLink: { verify: "/v1/auth/enchantedlink/verify", signIn: "/v1/auth/enchantedlink/signin", signUp: "/v1/auth/enchantedlink/signup", session: "/v1/auth/enchantedlink/pending-session", update: { email: "/v1/auth/enchantedlink/update/email" }, signUpOrIn: "/v1/auth/enchantedlink/signup-in" }, oauth: { start: "/v1/auth/oauth/authorize", exchange: "/v1/auth/oauth/exchange", startNative: "v1/auth/oauth/native/start", finishNative: "v1/auth/oauth/native/finish", oneTap: { getOneTapClientId: "/v1/auth/onetap/clientid/{provider}", exchangeOneTapIDToken: "/v1/auth/onetap/idtoken/exchange", verifyOneTapIDToken: "/v1/auth/onetap/idtoken/verify" } }, outbound: { connect: "/v1/outbound/oauth/connect" }, saml: { start: "/v1/auth/saml/authorize", exchange: "/v1/auth/saml/exchange" }, totp: { verify: "/v1/auth/totp/verify", signUp: "/v1/auth/totp/signup", update: "/v1/auth/totp/update" }, notp: { signIn: "/v1/auth/notp/whatsapp/signin", signUp: "/v1/auth/notp/whatsapp/signup", signUpOrIn: "/v1/auth/notp/whatsapp/signup-in", session: "/v1/auth/notp/pending-session" }, webauthn: { signUp: { start: "/v1/auth/webauthn/signup/start", finish: "/v1/auth/webauthn/signup/finish" }, signIn: { start: "/v1/auth/webauthn/signin/start", finish: "/v1/auth/webauthn/signin/finish" }, signUpOrIn: { start: "/v1/auth/webauthn/signup-in/start" }, update: { start: "v1/auth/webauthn/update/start", finish: "/v1/auth/webauthn/update/finish" } }, password: { signUp: "/v1/auth/password/signup", signIn: "/v1/auth/password/signin", sendReset: "/v1/auth/password/reset", update: "/v1/auth/password/update", replace: "/v1/auth/password/replace", policy: "/v1/auth/password/policy" }, refresh: "/v1/auth/refresh", tryRefresh: "/v1/auth/try-refresh", selectTenant: "/v1/auth/tenant/select", logout: "/v1/auth/logout", logoutAll: "/v1/auth/logoutall", me: "/v1/auth/me", myTenants: "/v1/auth/me/tenants", history: "/v1/auth/me/history", flow: { start: "/v1/flow/start", next: "/v1/flow/next" } };
127
- const wn = "<region>", po = `https://api.${wn}descope.com`, $t = 1e3, Qt = 6e5, yn = "dct", Xt = () => {
127
+ const On = "<region>", Io = `https://api.${On}descope.com`, nn = 1e3, on = 6e5, Un = "dct", rn = () => {
128
128
  const e = {};
129
129
  return { headers(t) {
130
130
  const n = typeof t.entries == "function" ? Object.fromEntries(t.entries()) : t;
@@ -143,55 +143,55 @@ const wn = "<region>", po = `https://api.${wn}descope.com`, $t = 1e3, Qt = 6e5,
143
143
  return e.Retries = t, this;
144
144
  }, build: () => Object.keys(e).flatMap((t) => e[t] ? [`${t !== "Title" ? `${t}: ` : ""}${e[t]}`] : []).join(`
145
145
  `) };
146
- }, go = [521, 524], Gt = (e) => async (...t) => {
146
+ }, xo = [521, 524], an = (e) => async (...t) => {
147
147
  let n = await e(...t);
148
- go.includes(n.status) && (n = await e(...t), n.retries = 1);
148
+ xo.includes(n.status) && (n = await e(...t), n.retries = 1);
149
149
  const o = await n.text();
150
150
  return n.text = () => Promise.resolve(o), n.json = () => Promise.resolve(JSON.parse(o)), n.clone = () => n, n;
151
- }, ho = (e, t) => {
151
+ }, So = (e, t) => {
152
152
  const n = t || fetch;
153
153
  return n || e == null || e.warn("Fetch is not defined, you will not be able to send http requests, if you are running in a test, make sure fetch is defined globally"), e ? async (...o) => {
154
154
  if (!n)
155
155
  throw Error("Cannot send http request, fetch is not defined, if you are running in a test, make sure fetch is defined globally");
156
- e.log(((i) => Xt().title("Request").url(i[0]).method(i[1].method).headers(i[1].headers).body(i[1].body).build())(o));
157
- const r = await Gt(n)(...o);
156
+ e.log(((i) => rn().title("Request").url(i[0]).method(i[1].method).headers(i[1].headers).body(i[1].body).build())(o));
157
+ const r = await an(n)(...o);
158
158
  return e[r.ok ? "log" : "error"](await (async (i) => {
159
- const s = await i.text();
160
- return Xt().title("Response").url(i.url.toString()).status(`${i.status} ${i.statusText}`).headers(i.headers).body(s).retries(i.retries).build();
159
+ const a = await i.text();
160
+ return rn().title("Response").url(i.url.toString()).status(`${i.status} ${i.statusText}`).headers(i.headers).body(a).retries(i.retries).build();
161
161
  })(r)), r;
162
- } : Gt(n);
162
+ } : an(n);
163
163
  };
164
- let Ne;
165
- const fo = () => {
166
- if (Ne)
167
- return Ne;
164
+ let Ve;
165
+ const Co = () => {
166
+ if (Ve)
167
+ return Ve;
168
168
  const e = /* @__PURE__ */ new Date(), t = `${e.getUTCFullYear().toString()}-${(e.getUTCMonth() + 1).toString().padStart(2, "0")}-${e.getUTCDate().toString().padStart(2, "0")}-${e.getUTCHours().toString().padStart(2, "0")}:${e.getUTCMinutes().toString().padStart(2, "0")}:${e.getUTCSeconds().toString().padStart(2, "0")}:${e.getUTCMilliseconds().toString()}`, n = Math.floor(1e3 + 9e3 * Math.random());
169
- return Ne = `${t}-${n}`, Ne;
169
+ return Ve = `${t}-${n}`, Ve;
170
170
  };
171
- var he;
171
+ var Ie;
172
172
  (function(e) {
173
173
  e.get = "GET", e.delete = "DELETE", e.post = "POST", e.put = "PUT", e.patch = "PATCH";
174
- })(he || (he = {}));
175
- const Zt = ({ path: e, baseUrl: t, queryParams: n, projectId: o }) => {
174
+ })(Ie || (Ie = {}));
175
+ const sn = ({ path: e, baseUrl: t, queryParams: n, projectId: o }) => {
176
176
  const r = o.slice(1, -27);
177
- t = t.replace(wn, r ? r + "." : "");
177
+ t = t.replace(On, r ? r + "." : "");
178
178
  let i = e ? `${t.replace(/\/$/, "")}/${e == null ? void 0 : e.replace(/^\//, "")}` : t;
179
179
  if (n) {
180
- const s = Object.keys(n);
181
- s.forEach((l, a) => {
182
- i = `${i}${a === 0 ? "?" : ""}${l}=${encodeURIComponent(n[l])}${a === s.length - 1 ? "" : "&"}`;
180
+ const a = Object.keys(n);
181
+ a.forEach((l, s) => {
182
+ i = `${i}${s === 0 ? "?" : ""}${l}=${encodeURIComponent(n[l])}${s === a.length - 1 ? "" : "&"}`;
183
183
  });
184
184
  }
185
185
  return i;
186
- }, vo = (...e) => new Headers(e.reduce((t, n) => (((o) => Array.isArray(o) ? o : o instanceof Headers ? Array.from(o.entries()) : o ? Object.entries(o) : [])(n).forEach(([o, r]) => {
186
+ }, Oo = (...e) => new Headers(e.reduce((t, n) => (((o) => Array.isArray(o) ? o : o instanceof Headers ? Array.from(o.entries()) : o ? Object.entries(o) : [])(n).forEach(([o, r]) => {
187
187
  t[o] = typeof r == "function" ? r() : r;
188
- }), t), {})), mo = { "Content-Type": "application/json" }, wo = (e, t = "") => {
188
+ }), t), {})), Uo = { "Content-Type": "application/json" }, Ao = (e, t = "") => {
189
189
  let n = e;
190
190
  return t && (n = n + ":" + t), { Authorization: `Bearer ${n}` };
191
- }, yo = (e, t) => {
192
- const n = { "x-descope-sdk-session-id": fo(), "x-descope-sdk-name": "core-js", "x-descope-sdk-version": "2.57.0", "x-descope-project-id": e };
191
+ }, To = (e, t) => {
192
+ const n = { "x-descope-sdk-session-id": Co(), "x-descope-sdk-name": "core-js", "x-descope-sdk-version": "2.57.0", "x-descope-project-id": e };
193
193
  return t && (n["x-descope-refresh-cookie-name"] = t), n;
194
- }, bo = (e) => {
194
+ }, jo = (e) => {
195
195
  try {
196
196
  e = JSON.parse(e);
197
197
  } catch {
@@ -199,191 +199,191 @@ const Zt = ({ path: e, baseUrl: t, queryParams: n, projectId: o }) => {
199
199
  }
200
200
  return typeof e == "object" && e !== null;
201
201
  };
202
- var ko = ((e) => (t) => {
202
+ var Eo = ((e) => (t) => {
203
203
  var n;
204
204
  return e(Object.assign(Object.assign({}, t), { hooks: { beforeRequest: (o) => {
205
205
  var r;
206
206
  const i = [].concat(((r = t.hooks) === null || r === void 0 ? void 0 : r.beforeRequest) || []);
207
- return i == null ? void 0 : i.reduce((s, l) => l(s), o);
207
+ return i == null ? void 0 : i.reduce((a, l) => l(a), o);
208
208
  }, afterRequest: async (o, r) => {
209
209
  var i;
210
- const s = [].concat(((i = t.hooks) === null || i === void 0 ? void 0 : i.afterRequest) || []);
211
- s.length != 0 && (await Promise.allSettled(s == null ? void 0 : s.map((l) => l(o, r == null ? void 0 : r.clone())))).forEach((l) => {
212
- var a;
213
- return l.status === "rejected" && ((a = t.logger) === null || a === void 0 ? void 0 : a.error(l.reason));
210
+ const a = [].concat(((i = t.hooks) === null || i === void 0 ? void 0 : i.afterRequest) || []);
211
+ a.length != 0 && (await Promise.allSettled(a == null ? void 0 : a.map((l) => l(o, r == null ? void 0 : r.clone())))).forEach((l) => {
212
+ var s;
213
+ return l.status === "rejected" && ((s = t.logger) === null || s === void 0 ? void 0 : s.error(l.reason));
214
214
  });
215
215
  }, transformResponse: (n = t.hooks) === null || n === void 0 ? void 0 : n.transformResponse } }));
216
- })(({ baseUrl: e, projectId: t, baseConfig: n, refreshCookieName: o, logger: r, hooks: i, cookiePolicy: s, fetch: l }) => {
217
- const a = e || po, c = ho(r, l), d = async (u) => {
216
+ })(({ baseUrl: e, projectId: t, baseConfig: n, refreshCookieName: o, logger: r, hooks: i, cookiePolicy: a, fetch: l }) => {
217
+ const s = e || Io, c = So(r, l), d = async (u) => {
218
218
  var g;
219
- const w = i != null && i.beforeRequest ? i.beforeRequest(u) : u, { path: h, body: f, headers: y, queryParams: O, method: x, token: A } = w, E = ((q) => q === void 0 ? void 0 : JSON.stringify(q))(f), L = { headers: vo(wo(t, A), yo(t, o), (n == null ? void 0 : n.baseHeaders) || {}, bo(E) ? mo : {}, y), method: x, body: E };
220
- s !== null && (L.credentials = s || "include");
221
- const N = await c(Zt({ path: h, baseUrl: a, queryParams: O, projectId: t }), L);
222
- if (i != null && i.afterRequest && await i.afterRequest(u, N == null ? void 0 : N.clone()), i == null ? void 0 : i.transformResponse) {
223
- const q = await N.json(), H = (((g = N.headers) === null || g === void 0 ? void 0 : g.get("set-cookie")) || "").split(";").reduce((F, C) => {
224
- const [J, V] = C.split("=");
225
- return Object.assign(Object.assign({}, F), { [J.trim()]: V });
226
- }, {}), B = Object.assign(Object.assign({}, N), { json: () => Promise.resolve(q), cookies: H });
227
- return B.clone = () => B, i.transformResponse(B);
219
+ const y = i != null && i.beforeRequest ? i.beforeRequest(u) : u, { path: f, body: h, headers: b, queryParams: S, method: x, token: O } = y, R = ((z) => z === void 0 ? void 0 : JSON.stringify(z))(h), F = { headers: Oo(Ao(t, O), To(t, o), (n == null ? void 0 : n.baseHeaders) || {}, jo(R) ? Uo : {}, b), method: x, body: R };
220
+ a !== null && (F.credentials = a || "include");
221
+ const J = await c(sn({ path: f, baseUrl: s, queryParams: S, projectId: t }), F);
222
+ if (i != null && i.afterRequest && await i.afterRequest(u, J == null ? void 0 : J.clone()), i == null ? void 0 : i.transformResponse) {
223
+ const z = await J.json(), V = (((g = J.headers) === null || g === void 0 ? void 0 : g.get("set-cookie")) || "").split(";").reduce((M, U) => {
224
+ const [N, q] = U.split("=");
225
+ return Object.assign(Object.assign({}, M), { [N.trim()]: q });
226
+ }, {}), H = Object.assign(Object.assign({}, J), { json: () => Promise.resolve(z), cookies: V });
227
+ return H.clone = () => H, i.transformResponse(H);
228
228
  }
229
- return N;
229
+ return J;
230
230
  };
231
- return { get: (u, { headers: g, queryParams: w, token: h } = {}) => d({ path: u, headers: g, queryParams: w, body: void 0, method: he.get, token: h }), post: (u, g, { headers: w, queryParams: h, token: f } = {}) => d({ path: u, headers: w, queryParams: h, body: g, method: he.post, token: f }), patch: (u, g, { headers: w, queryParams: h, token: f } = {}) => d({ path: u, headers: w, queryParams: h, body: g, method: he.patch, token: f }), put: (u, g, { headers: w, queryParams: h, token: f } = {}) => d({ path: u, headers: w, queryParams: h, body: g, method: he.put, token: f }), delete: (u, { headers: g, queryParams: w, token: h } = {}) => d({ path: u, headers: g, queryParams: w, body: void 0, method: he.delete, token: h }), hooks: i, buildUrl: (u, g) => Zt({ projectId: t, baseUrl: a, path: u, queryParams: g }) };
232
- }), Io = { TOO_MANY_REQUESTS: 429 };
233
- function bn(e, t, n) {
231
+ return { get: (u, { headers: g, queryParams: y, token: f } = {}) => d({ path: u, headers: g, queryParams: y, body: void 0, method: Ie.get, token: f }), post: (u, g, { headers: y, queryParams: f, token: h } = {}) => d({ path: u, headers: y, queryParams: f, body: g, method: Ie.post, token: h }), patch: (u, g, { headers: y, queryParams: f, token: h } = {}) => d({ path: u, headers: y, queryParams: f, body: g, method: Ie.patch, token: h }), put: (u, g, { headers: y, queryParams: f, token: h } = {}) => d({ path: u, headers: y, queryParams: f, body: g, method: Ie.put, token: h }), delete: (u, { headers: g, queryParams: y, token: f } = {}) => d({ path: u, headers: g, queryParams: y, body: void 0, method: Ie.delete, token: f }), hooks: i, buildUrl: (u, g) => sn({ projectId: t, baseUrl: s, path: u, queryParams: g }) };
232
+ }), Do = { TOO_MANY_REQUESTS: 429 };
233
+ function An(e, t, n) {
234
234
  var o;
235
- let r = Ye(e);
235
+ let r = et(e);
236
236
  if (t) {
237
- if (!(r != null && r.tenants) && (r == null ? void 0 : r[yn]) === t)
237
+ if (!(r != null && r.tenants) && (r == null ? void 0 : r[Un]) === t)
238
238
  return (r == null ? void 0 : r[n]) || [];
239
239
  r = (o = r == null ? void 0 : r.tenants) === null || o === void 0 ? void 0 : o[t];
240
240
  }
241
241
  const i = r == null ? void 0 : r[n];
242
242
  return Array.isArray(i) ? i : [];
243
243
  }
244
- function Ye(e) {
244
+ function et(e) {
245
245
  if (typeof e != "string" || !e)
246
246
  throw new Error("Invalid token provided");
247
- return St(e);
247
+ return Dt(e);
248
248
  }
249
- function xo(e) {
250
- const { exp: t } = Ye(e);
249
+ function Ro(e) {
250
+ const { exp: t } = et(e);
251
251
  return (/* @__PURE__ */ new Date()).getTime() / 1e3 > t;
252
252
  }
253
- function So(e) {
254
- let t = Ye(e);
253
+ function No(e) {
254
+ let t = et(e);
255
255
  const n = Object.keys(t == null ? void 0 : t.tenants);
256
256
  return Array.isArray(n) ? n : [];
257
257
  }
258
- function Co(e, t) {
259
- return bn(e, t, "permissions");
258
+ function Po(e, t) {
259
+ return An(e, t, "permissions");
260
260
  }
261
- function Oo(e, t) {
262
- return bn(e, t, "roles");
261
+ function Lo(e, t) {
262
+ return An(e, t, "roles");
263
263
  }
264
- const $ = (...e) => e.join("/").replace(/\/{2,}/g, "/");
264
+ const G = (...e) => e.join("/").replace(/\/{2,}/g, "/");
265
265
  async function m(e, t) {
266
266
  var n;
267
267
  const o = await e, r = { code: o.status, ok: o.ok, response: o }, i = await o.clone().json();
268
- return o.ok ? r.data = t ? t(i) : i : (r.error = i, o.status === Io.TOO_MANY_REQUESTS && Object.assign(r.error, { retryAfter: Number.parseInt((n = o.headers) === null || n === void 0 ? void 0 : n.get("retry-after")) || 0 })), r;
268
+ return o.ok ? r.data = t ? t(i) : i : (r.error = i, o.status === Do.TOO_MANY_REQUESTS && Object.assign(r.error, { retryAfter: Number.parseInt((n = o.headers) === null || n === void 0 ? void 0 : n.get("retry-after")) || 0 })), r;
269
269
  }
270
- function Uo(e) {
270
+ function Fo(e) {
271
271
  var t;
272
- return ((t = Ye(e)) === null || t === void 0 ? void 0 : t[yn]) || "";
272
+ return ((t = et(e)) === null || t === void 0 ? void 0 : t[Un]) || "";
273
273
  }
274
- const ue = (e, t) => (n = t) => (o) => !e(o) && n.replace("{val}", o), kn = (e, t) => (n = t) => (o) => {
274
+ const me = (e, t) => (n = t) => (o) => !e(o) && n.replace("{val}", o), Tn = (e, t) => (n = t) => (o) => {
275
275
  const r = e.filter((i) => i(o));
276
276
  return !(r.length < e.length) && (n ? n.replace("{val}", o) : r.join(" OR "));
277
- }, In = (...e) => ({ validate: (t) => (e.forEach((n) => {
277
+ }, jn = (...e) => ({ validate: (t) => (e.forEach((n) => {
278
278
  const o = n(t);
279
279
  if (o)
280
280
  throw new Error(o);
281
- }), !0) }), xn = (e) => (t) => e.test(t), Ao = xn(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/), To = xn(/^\+[1-9]{1}[0-9]{3,14}$/), jo = (e, t) => (n) => In(...t).validate(((o, r, i) => {
282
- const s = (Array.isArray(r) ? r.join(".") : String(r)).replace(/\[\\?("|')?(\w|d)+\\?("|')?\]/g, (d, u, g) => "." + g).split("."), l = s.length;
283
- let a = 0, c = o === Object(o) ? o : void 0;
284
- for (; c != null && a < l; )
285
- c = c[s[a++]];
286
- return a && a === l && c !== void 0 ? c : i;
287
- })(n, e)), Eo = ue(Ao, '"{val}" is not a valid email'), Do = ue(To, '"{val}" is not a valid phone number'), Ro = ue((_t = 1, (e) => e.length >= _t), "Minimum length is 1");
288
- var _t;
289
- const Ie = ue((e) => typeof e == "string", "Input is not a string"), No = ue((e) => Array.isArray(e), "Input is not an array"), Po = ue((e) => typeof e == "boolean", "Input is not a boolean"), Lo = ue((e) => e === void 0, "Input is defined"), ht = kn([Ie(), Lo()], "Input is not a string or undefined"), qo = kn([No(), Po()], "Input is not an array or boolean"), k = (...e) => (t) => (...n) => (e.forEach((o, r) => In(...o).validate(n[r])), t(...n)), Sn = (e) => [Ie(`"${e}" must be a string`)], Cn = (e) => [ht(`"${e}" must be string or undefined`)], U = (e) => [Ie(`"${e}" must be a string`), Ro(`"${e}" must not be empty`)], Ct = (e) => [Ie(`"${e}" must be a string`), Eo()], On = (e) => [Ie(`"${e}" must be a string`), Do()], Fo = k(U("accessKey")), Bo = (e) => ({ exchange: Fo((t, n) => m(e.post(v.accessKey.exchange, { loginOptions: n }, { token: t }))) }), Se = (e, t, n) => (t.forEach((o) => {
281
+ }), !0) }), En = (e) => (t) => e.test(t), qo = En(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/), Bo = En(/^\+[1-9]{1}[0-9]{3,14}$/), Jo = (e, t) => (n) => jn(...t).validate(((o, r, i) => {
282
+ const a = (Array.isArray(r) ? r.join(".") : String(r)).replace(/\[\\?("|')?(\w|d)+\\?("|')?\]/g, (d, u, g) => "." + g).split("."), l = a.length;
283
+ let s = 0, c = o === Object(o) ? o : void 0;
284
+ for (; c != null && s < l; )
285
+ c = c[a[s++]];
286
+ return s && s === l && c !== void 0 ? c : i;
287
+ })(n, e)), Ko = me(qo, '"{val}" is not a valid email'), zo = me(Bo, '"{val}" is not a valid phone number'), Ho = me((ln = 1, (e) => e.length >= ln), "Minimum length is 1");
288
+ var ln;
289
+ const Te = me((e) => typeof e == "string", "Input is not a string"), Vo = me((e) => Array.isArray(e), "Input is not an array"), Mo = me((e) => typeof e == "boolean", "Input is not a boolean"), Wo = me((e) => e === void 0, "Input is defined"), It = Tn([Te(), Wo()], "Input is not a string or undefined"), Yo = Tn([Vo(), Mo()], "Input is not an array or boolean"), k = (...e) => (t) => (...n) => (e.forEach((o, r) => jn(...o).validate(n[r])), t(...n)), Dn = (e) => [Te(`"${e}" must be a string`)], Rn = (e) => [It(`"${e}" must be string or undefined`)], A = (e) => [Te(`"${e}" must be a string`), Ho(`"${e}" must not be empty`)], Rt = (e) => [Te(`"${e}" must be a string`), Ko()], Nn = (e) => [Te(`"${e}" must be a string`), zo()], $o = k(A("accessKey")), Qo = (e) => ({ exchange: $o((t, n) => m(e.post(v.accessKey.exchange, { loginOptions: n }, { token: t }))) }), Ee = (e, t, n) => (t.forEach((o) => {
290
290
  const r = o.split(".");
291
- let i = r.shift(), s = e;
291
+ let i = r.shift(), a = e;
292
292
  for (; r.length > 0; ) {
293
- if (s = s[i], !i || !s)
293
+ if (a = a[i], !i || !a)
294
294
  throw Error(`Invalid path "${o}", "${i}" is missing or has no value`);
295
295
  i = r.shift();
296
296
  }
297
- if (typeof s[i] != "function")
297
+ if (typeof a[i] != "function")
298
298
  throw Error(`"${o}" is not a function`);
299
- const l = s[i];
300
- s[i] = n(l);
301
- }), e), Un = ({ pollingIntervalMs: e = 1e3, timeoutMs: t = 6e5 } = {}) => ({ pollingIntervalMs: Math.max(e || $t, $t), timeoutMs: Math.min(t || Qt, Qt) });
302
- var de, ft;
299
+ const l = a[i];
300
+ a[i] = n(l);
301
+ }), e), Pn = ({ pollingIntervalMs: e = 1e3, timeoutMs: t = 6e5 } = {}) => ({ pollingIntervalMs: Math.max(e || nn, nn), timeoutMs: Math.min(t || on, on) });
302
+ var ve, xt;
303
303
  (function(e) {
304
304
  e.sms = "sms", e.voice = "voice", e.whatsapp = "whatsapp", e.im = "im";
305
- })(de || (de = {})), function(e) {
305
+ })(ve || (ve = {})), function(e) {
306
306
  e.email = "email";
307
- }(ft || (ft = {}));
308
- const re = Object.assign(Object.assign({}, de), ft);
309
- var en;
307
+ }(xt || (xt = {}));
308
+ const de = Object.assign(Object.assign({}, ve), xt);
309
+ var cn;
310
310
  (function(e) {
311
311
  e.waiting = "waiting", e.running = "running", e.completed = "completed", e.failed = "failed";
312
- })(en || (en = {}));
313
- const An = U("loginId"), Jo = k(U("token")), ot = k(An), Ko = k(U("pendingRef")), Ho = k(An, Ct("email")), zo = (e) => ({ verify: Jo((t) => m(e.post(v.enchantedLink.verify, { token: t }))), signIn: ot((t, n, o = {}, r) => {
314
- var { providerId: i } = o, s = D(o, ["providerId"]);
315
- return m(e.post($(v.enchantedLink.signIn, re.email), { loginId: t, URI: n, loginOptions: s, providerId: i }, { token: r }));
316
- }), signUpOrIn: ot((t, n, o = {}) => {
317
- var { providerId: r } = o, i = D(o, ["providerId"]);
318
- return m(e.post($(v.enchantedLink.signUpOrIn, re.email), { loginId: t, URI: n, loginOptions: i, providerId: r }));
319
- }), signUp: ot((t, n, o, r = {}) => {
320
- var { providerId: i } = r, s = D(r, ["providerId"]);
321
- return m(e.post($(v.enchantedLink.signUp, re.email), { loginId: t, URI: n, user: o, loginOptions: s, providerId: i }));
322
- }), waitForSession: Ko((t, n) => new Promise((o) => {
323
- const { pollingIntervalMs: r, timeoutMs: i } = Un(n);
324
- let s;
312
+ })(cn || (cn = {}));
313
+ const Ln = A("loginId"), Xo = k(A("token")), ut = k(Ln), Go = k(A("pendingRef")), Zo = k(Ln, Rt("email")), _o = (e) => ({ verify: Xo((t) => m(e.post(v.enchantedLink.verify, { token: t }))), signIn: ut((t, n, o = {}, r) => {
314
+ var { providerId: i } = o, a = P(o, ["providerId"]);
315
+ return m(e.post(G(v.enchantedLink.signIn, de.email), { loginId: t, URI: n, loginOptions: a, providerId: i }, { token: r }));
316
+ }), signUpOrIn: ut((t, n, o = {}) => {
317
+ var { providerId: r } = o, i = P(o, ["providerId"]);
318
+ return m(e.post(G(v.enchantedLink.signUpOrIn, de.email), { loginId: t, URI: n, loginOptions: i, providerId: r }));
319
+ }), signUp: ut((t, n, o, r = {}) => {
320
+ var { providerId: i } = r, a = P(r, ["providerId"]);
321
+ return m(e.post(G(v.enchantedLink.signUp, de.email), { loginId: t, URI: n, user: o, loginOptions: a, providerId: i }));
322
+ }), waitForSession: Go((t, n) => new Promise((o) => {
323
+ const { pollingIntervalMs: r, timeoutMs: i } = Pn(n);
324
+ let a;
325
325
  const l = setInterval(async () => {
326
- const a = await e.post(v.enchantedLink.session, { pendingRef: t });
327
- a.ok && (clearInterval(l), s && clearTimeout(s), o(m(Promise.resolve(a))));
326
+ const s = await e.post(v.enchantedLink.session, { pendingRef: t });
327
+ s.ok && (clearInterval(l), a && clearTimeout(a), o(m(Promise.resolve(s))));
328
328
  }, r);
329
- s = setTimeout(() => {
329
+ a = setTimeout(() => {
330
330
  o({ error: { errorDescription: `Session polling timeout exceeded: ${i}ms`, errorCode: "0" }, ok: !1 }), clearInterval(l);
331
331
  }, i);
332
- })), update: { email: Ho((t, n, o, r, i) => m(e.post(v.enchantedLink.update.email, Object.assign({ loginId: t, email: n, URI: o }, i), { token: r }))) } }), Vo = k(U("flowId")), Mo = k(U("executionId"), U("stepId"), U("interactionId")), Wo = (e) => ({ start: Vo((t, n, o, r, i, s, l, a = !1) => m(e.post(v.flow.start, { flowId: t, options: n, conditionInteractionId: o, interactionId: r, componentsVersion: i, flowVersions: s, input: l, isCustomScreen: a }))), next: Mo((t, n, o, r, i, s, l = !1) => m(e.post(v.flow.next, { executionId: t, stepId: n, interactionId: o, version: r, componentsVersion: i, input: s, isCustomScreen: l }))) }), Ot = U("loginId"), Yo = k(U("token")), rt = k(Ot), $o = k(Ot, On("phone")), Qo = k(Ot, Ct("email")), it = Object.keys(re).filter((e) => e !== de.voice && e !== de.im), Xo = (e) => ({ verify: Yo((t) => m(e.post(v.magicLink.verify, { token: t }))), signIn: it.reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: rt((o, r, i = {}, s) => {
333
- var { providerId: l } = i, a = D(i, ["providerId"]);
334
- return m(e.post($(v.magicLink.signIn, n), { loginId: o, URI: r, loginOptions: a, providerId: l }, { token: s }));
335
- }) }), {}), signUp: it.reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: rt((o, r, i, s = {}) => {
336
- var { providerId: l } = s, a = D(s, ["providerId"]);
337
- return m(e.post($(v.magicLink.signUp, n), { loginId: o, URI: r, user: i, loginOptions: a, providerId: l }));
338
- }) }), {}), signUpOrIn: it.reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: rt((o, r, i = {}) => {
339
- var { providerId: s } = i, l = D(i, ["providerId"]);
340
- return m(e.post($(v.magicLink.signUpOrIn, n), { loginId: o, URI: r, loginOptions: l, providerId: s }));
341
- }) }), {}), update: { email: Qo((t, n, o, r, i) => m(e.post(v.magicLink.update.email, Object.assign({ loginId: t, email: n, URI: o }, i), { token: r }))), phone: Object.keys(de).filter((t) => t !== de.voice).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: $o((o, r, i, s, l) => m(e.post($(v.magicLink.update.phone, n), Object.assign({ loginId: o, phone: r, URI: i }, l), { token: s }))) }), {}) } });
342
- var vt;
332
+ })), update: { email: Zo((t, n, o, r, i) => m(e.post(v.enchantedLink.update.email, Object.assign({ loginId: t, email: n, URI: o }, i), { token: r }))) } }), er = k(A("flowId")), tr = k(A("executionId"), A("stepId"), A("interactionId")), nr = (e) => ({ start: er((t, n, o, r, i, a, l, s = !1) => m(e.post(v.flow.start, { flowId: t, options: n, conditionInteractionId: o, interactionId: r, componentsVersion: i, flowVersions: a, input: l, isCustomScreen: s }))), next: tr((t, n, o, r, i, a, l = !1) => m(e.post(v.flow.next, { executionId: t, stepId: n, interactionId: o, version: r, componentsVersion: i, input: a, isCustomScreen: l }))) }), Nt = A("loginId"), or = k(A("token")), pt = k(Nt), rr = k(Nt, Nn("phone")), ir = k(Nt, Rt("email")), gt = Object.keys(de).filter((e) => e !== ve.voice && e !== ve.im), ar = (e) => ({ verify: or((t) => m(e.post(v.magicLink.verify, { token: t }))), signIn: gt.reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: pt((o, r, i = {}, a) => {
333
+ var { providerId: l } = i, s = P(i, ["providerId"]);
334
+ return m(e.post(G(v.magicLink.signIn, n), { loginId: o, URI: r, loginOptions: s, providerId: l }, { token: a }));
335
+ }) }), {}), signUp: gt.reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: pt((o, r, i, a = {}) => {
336
+ var { providerId: l } = a, s = P(a, ["providerId"]);
337
+ return m(e.post(G(v.magicLink.signUp, n), { loginId: o, URI: r, user: i, loginOptions: s, providerId: l }));
338
+ }) }), {}), signUpOrIn: gt.reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: pt((o, r, i = {}) => {
339
+ var { providerId: a } = i, l = P(i, ["providerId"]);
340
+ return m(e.post(G(v.magicLink.signUpOrIn, n), { loginId: o, URI: r, loginOptions: l, providerId: a }));
341
+ }) }), {}), update: { email: ir((t, n, o, r, i) => m(e.post(v.magicLink.update.email, Object.assign({ loginId: t, email: n, URI: o }, i), { token: r }))), phone: Object.keys(ve).filter((t) => t !== ve.voice).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: rr((o, r, i, a, l) => m(e.post(G(v.magicLink.update.phone, n), Object.assign({ loginId: o, phone: r, URI: i }, l), { token: a }))) }), {}) } });
342
+ var St;
343
343
  (function(e) {
344
344
  e.facebook = "facebook", e.github = "github", e.google = "google", e.microsoft = "microsoft", e.gitlab = "gitlab", e.apple = "apple", e.discord = "discord", e.linkedin = "linkedin", e.slack = "slack";
345
- })(vt || (vt = {}));
346
- const Go = k(U("code")), Zo = (e) => ({ start: Object.assign((t, n, o, r, i) => m(e.post(v.oauth.start, o || {}, { queryParams: Object.assign(Object.assign({ provider: t }, n && { redirectURL: n }), i && { loginHint: i }), token: r })), Object.keys(vt).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: (o, r, i, s) => m(e.post(v.oauth.start, r || {}, { queryParams: Object.assign(Object.assign({ provider: n }, o && { redirectURL: o }), s && { loginHint: s }), token: i })) }), {})), exchange: Go((t) => m(e.post(v.oauth.exchange, { code: t }))), startNative: (t, n, o) => m(e.post(v.oauth.startNative, { provider: t, loginOptions: n, implicit: o })), finishNative: (t, n, o, r, i) => m(e.post(v.oauth.finishNative, { provider: t, stateId: n, user: o, code: r, idToken: i })), getOneTapClientId: (t) => m(e.get(v.oauth.oneTap.getOneTapClientId.replace("{provider}", t))), verifyOneTapIDToken: (t, n, o, r) => m(e.post(v.oauth.oneTap.verifyOneTapIDToken, { provider: t, idToken: n, nonce: o, loginOptions: r })), exchangeOneTapIDToken: (t, n, o, r) => m(e.post(v.oauth.oneTap.exchangeOneTapIDToken, { provider: t, idToken: n, nonce: o, loginOptions: r })) }), _o = U("appId"), er = k(_o), tr = (e) => ({ connect: er((t, n, o) => {
345
+ })(St || (St = {}));
346
+ const sr = k(A("code")), lr = (e) => ({ start: Object.assign((t, n, o, r, i) => m(e.post(v.oauth.start, o || {}, { queryParams: Object.assign(Object.assign({ provider: t }, n && { redirectURL: n }), i && { loginHint: i }), token: r })), Object.keys(St).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: (o, r, i, a) => m(e.post(v.oauth.start, r || {}, { queryParams: Object.assign(Object.assign({ provider: n }, o && { redirectURL: o }), a && { loginHint: a }), token: i })) }), {})), exchange: sr((t) => m(e.post(v.oauth.exchange, { code: t }))), startNative: (t, n, o) => m(e.post(v.oauth.startNative, { provider: t, loginOptions: n, implicit: o })), finishNative: (t, n, o, r, i) => m(e.post(v.oauth.finishNative, { provider: t, stateId: n, user: o, code: r, idToken: i })), getOneTapClientId: (t) => m(e.get(v.oauth.oneTap.getOneTapClientId.replace("{provider}", t))), verifyOneTapIDToken: (t, n, o, r) => m(e.post(v.oauth.oneTap.verifyOneTapIDToken, { provider: t, idToken: n, nonce: o, loginOptions: r })), exchangeOneTapIDToken: (t, n, o, r) => m(e.post(v.oauth.oneTap.exchangeOneTapIDToken, { provider: t, idToken: n, nonce: o, loginOptions: r })) }), cr = A("appId"), dr = k(cr), ur = (e) => ({ connect: dr((t, n, o) => {
347
347
  const r = n == null ? void 0 : n.tenantId, i = n == null ? void 0 : n.tenantLevel;
348
348
  return n == null || delete n.tenantId, n == null || delete n.tenantLevel, m(e.post(v.outbound.connect, { appId: t, tenantId: r, tenantLevel: i, options: n }, { token: o }));
349
- }) }), $e = U("loginId"), nr = k($e, U("code")), st = k($e), or = k($e, On("phone")), rr = k($e, Ct("email")), ir = (e) => ({ verify: Object.keys(re).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: nr((o, r) => m(e.post($(v.otp.verify, n), { code: r, loginId: o }))) }), {}), signIn: Object.keys(re).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: st((o, r = {}, i) => {
350
- var { providerId: s } = r, l = D(r, ["providerId"]);
351
- return m(e.post($(v.otp.signIn, n), { loginId: o, loginOptions: l, providerId: s }, { token: i }));
352
- }) }), {}), signUp: Object.keys(re).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: st((o, r, i = {}) => {
353
- var { providerId: s } = i, l = D(i, ["providerId"]);
354
- return m(e.post($(v.otp.signUp, n), { loginId: o, user: r, loginOptions: l, providerId: s }));
355
- }) }), {}), signUpOrIn: Object.keys(re).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: st((o, r = {}) => {
356
- var { providerId: i } = r, s = D(r, ["providerId"]);
357
- return m(e.post($(v.otp.signUpOrIn, n), { loginId: o, loginOptions: s, providerId: i }));
358
- }) }), {}), update: { email: rr((t, n, o, r) => m(e.post(v.otp.update.email, Object.assign({ loginId: t, email: n }, r), { token: o }))), phone: Object.keys(de).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: or((o, r, i, s) => m(e.post($(v.otp.update.phone, n), Object.assign({ loginId: o, phone: r }, s), { token: i }))) }), {}) } }), sr = k(U("tenant")), ar = k(U("code")), lr = (e) => ({ start: sr((t, n, o, r, i, s, l, a) => m(e.post(v.saml.start, o || {}, Object.assign({ queryParams: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ tenant: t }, n && { redirectURL: n }), i && { ssoId: i }), s && { forceAuthn: "true" }), l && { loginHint: l }), a && { initiatedEmail: t }) }, r && { token: r })))), exchange: ar((t) => m(e.post(v.saml.exchange, { code: t }))) }), Ut = U("loginId"), cr = k(Ut, U("code")), dr = k(Ut), ur = k(Ut), pr = (e) => ({ signUp: dr((t, n) => m(e.post(v.totp.signUp, { loginId: t, user: n }))), verify: cr((t, n, o, r) => m(e.post(v.totp.verify, { loginId: t, code: n, loginOptions: o }, { token: r }))), update: ur((t, n) => m(e.post(v.totp.update, { loginId: t }, { token: n }))) }), Qe = U("loginId"), Tn = U("newPassword"), tn = k(Qe, U("password")), gr = k(Qe), hr = k(Qe, Tn), fr = k(Qe, U("oldPassword"), Tn), vr = (e) => ({ signUp: tn((t, n, o, r = {}) => {
359
- var { providerId: i } = r, s = D(r, ["providerId"]);
360
- return m(e.post(v.password.signUp, { loginId: t, password: n, user: o, loginOptions: s, providerId: i }));
361
- }), signIn: tn((t, n, o = {}) => {
362
- var { providerId: r } = o, i = D(o, ["providerId"]);
349
+ }) }), tt = A("loginId"), pr = k(tt, A("code")), ht = k(tt), gr = k(tt, Nn("phone")), hr = k(tt, Rt("email")), fr = (e) => ({ verify: Object.keys(de).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: pr((o, r) => m(e.post(G(v.otp.verify, n), { code: r, loginId: o }))) }), {}), signIn: Object.keys(de).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: ht((o, r = {}, i) => {
350
+ var { providerId: a } = r, l = P(r, ["providerId"]);
351
+ return m(e.post(G(v.otp.signIn, n), { loginId: o, loginOptions: l, providerId: a }, { token: i }));
352
+ }) }), {}), signUp: Object.keys(de).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: ht((o, r, i = {}) => {
353
+ var { providerId: a } = i, l = P(i, ["providerId"]);
354
+ return m(e.post(G(v.otp.signUp, n), { loginId: o, user: r, loginOptions: l, providerId: a }));
355
+ }) }), {}), signUpOrIn: Object.keys(de).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: ht((o, r = {}) => {
356
+ var { providerId: i } = r, a = P(r, ["providerId"]);
357
+ return m(e.post(G(v.otp.signUpOrIn, n), { loginId: o, loginOptions: a, providerId: i }));
358
+ }) }), {}), update: { email: hr((t, n, o, r) => m(e.post(v.otp.update.email, Object.assign({ loginId: t, email: n }, r), { token: o }))), phone: Object.keys(ve).reduce((t, n) => Object.assign(Object.assign({}, t), { [n]: gr((o, r, i, a) => m(e.post(G(v.otp.update.phone, n), Object.assign({ loginId: o, phone: r }, a), { token: i }))) }), {}) } }), vr = k(A("tenant")), mr = k(A("code")), yr = (e) => ({ start: vr((t, n, o, r, i, a, l, s) => m(e.post(v.saml.start, o || {}, Object.assign({ queryParams: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ tenant: t }, n && { redirectURL: n }), i && { ssoId: i }), a && { forceAuthn: "true" }), l && { loginHint: l }), s && { initiatedEmail: t }) }, r && { token: r })))), exchange: mr((t) => m(e.post(v.saml.exchange, { code: t }))) }), Pt = A("loginId"), wr = k(Pt, A("code")), br = k(Pt), kr = k(Pt), Ir = (e) => ({ signUp: br((t, n) => m(e.post(v.totp.signUp, { loginId: t, user: n }))), verify: wr((t, n, o, r) => m(e.post(v.totp.verify, { loginId: t, code: n, loginOptions: o }, { token: r }))), update: kr((t, n) => m(e.post(v.totp.update, { loginId: t }, { token: n }))) }), nt = A("loginId"), Fn = A("newPassword"), dn = k(nt, A("password")), xr = k(nt), Sr = k(nt, Fn), Cr = k(nt, A("oldPassword"), Fn), Or = (e) => ({ signUp: dn((t, n, o, r = {}) => {
359
+ var { providerId: i } = r, a = P(r, ["providerId"]);
360
+ return m(e.post(v.password.signUp, { loginId: t, password: n, user: o, loginOptions: a, providerId: i }));
361
+ }), signIn: dn((t, n, o = {}) => {
362
+ var { providerId: r } = o, i = P(o, ["providerId"]);
363
363
  return m(e.post(v.password.signIn, { loginId: t, password: n, loginOptions: i, providerId: r }));
364
- }), sendReset: gr((t, n, o) => m(e.post(v.password.sendReset, { loginId: t, redirectUrl: n, templateOptions: o }))), update: hr((t, n, o) => m(e.post(v.password.update, { loginId: t, newPassword: n }, { token: o }))), replace: fr((t, n, o) => m(e.post(v.password.replace, { loginId: t, oldPassword: n, newPassword: o }))), policy: () => m(e.get(v.password.policy)) }), mr = Sn("loginId"), At = U("loginId"), Xe = U("origin"), wr = k(At, Xe, U("name")), yr = k(At, Xe), br = k(mr, Xe), kr = k(At, Xe, Cn("token")), at = k(U("transactionId"), U("response")), Ir = (e) => ({ signUp: { start: wr((t, n, o, r) => m(e.post(v.webauthn.signUp.start, { user: { loginId: t, name: o }, origin: n, passkeyOptions: r }))), finish: at((t, n) => m(e.post(v.webauthn.signUp.finish, { transactionId: t, response: n }))) }, signIn: { start: br((t, n, o, r, i) => m(e.post(v.webauthn.signIn.start, { loginId: t, origin: n, loginOptions: o, passkeyOptions: i }, { token: r }))), finish: at((t, n) => m(e.post(v.webauthn.signIn.finish, { transactionId: t, response: n }))) }, signUpOrIn: { start: yr((t, n, o) => m(e.post(v.webauthn.signUpOrIn.start, { loginId: t, origin: n, passkeyOptions: o }))) }, update: { start: kr((t, n, o, r) => m(e.post(v.webauthn.update.start, { loginId: t, origin: n, passkeyOptions: r }, { token: o }))), finish: at((t, n) => m(e.post(v.webauthn.update.finish, { transactionId: t, response: n }))) } }), xr = Sn("loginId"), lt = k(xr), Sr = k(U("pendingRef")), Cr = (e) => ({ signUpOrIn: lt((t, n = {}) => {
365
- var { providerId: o } = n, r = D(n, ["providerId"]);
364
+ }), sendReset: xr((t, n, o) => m(e.post(v.password.sendReset, { loginId: t, redirectUrl: n, templateOptions: o }))), update: Sr((t, n, o) => m(e.post(v.password.update, { loginId: t, newPassword: n }, { token: o }))), replace: Cr((t, n, o) => m(e.post(v.password.replace, { loginId: t, oldPassword: n, newPassword: o }))), policy: () => m(e.get(v.password.policy)) }), Ur = Dn("loginId"), Lt = A("loginId"), ot = A("origin"), Ar = k(Lt, ot, A("name")), Tr = k(Lt, ot), jr = k(Ur, ot), Er = k(Lt, ot, Rn("token")), ft = k(A("transactionId"), A("response")), Dr = (e) => ({ signUp: { start: Ar((t, n, o, r) => m(e.post(v.webauthn.signUp.start, { user: { loginId: t, name: o }, origin: n, passkeyOptions: r }))), finish: ft((t, n) => m(e.post(v.webauthn.signUp.finish, { transactionId: t, response: n }))) }, signIn: { start: jr((t, n, o, r, i) => m(e.post(v.webauthn.signIn.start, { loginId: t, origin: n, loginOptions: o, passkeyOptions: i }, { token: r }))), finish: ft((t, n) => m(e.post(v.webauthn.signIn.finish, { transactionId: t, response: n }))) }, signUpOrIn: { start: Tr((t, n, o) => m(e.post(v.webauthn.signUpOrIn.start, { loginId: t, origin: n, passkeyOptions: o }))) }, update: { start: Er((t, n, o, r) => m(e.post(v.webauthn.update.start, { loginId: t, origin: n, passkeyOptions: r }, { token: o }))), finish: ft((t, n) => m(e.post(v.webauthn.update.finish, { transactionId: t, response: n }))) } }), Rr = Dn("loginId"), vt = k(Rr), Nr = k(A("pendingRef")), Pr = (e) => ({ signUpOrIn: vt((t, n = {}) => {
365
+ var { providerId: o } = n, r = P(n, ["providerId"]);
366
366
  return m(e.post(v.notp.signUpOrIn, { loginId: t, loginOptions: r, providerId: o }));
367
- }), signUp: lt((t, n, o = {}) => {
368
- var { providerId: r } = o, i = D(o, ["providerId"]);
367
+ }), signUp: vt((t, n, o = {}) => {
368
+ var { providerId: r } = o, i = P(o, ["providerId"]);
369
369
  return m(e.post(v.notp.signUp, { loginId: t, user: n, providerId: r, loginOptions: i }));
370
- }), signIn: lt((t, n = {}, o) => {
371
- var { providerId: r } = n, i = D(n, ["providerId"]);
370
+ }), signIn: vt((t, n = {}, o) => {
371
+ var { providerId: r } = n, i = P(n, ["providerId"]);
372
372
  return m(e.post(v.notp.signIn, { loginId: t, loginOptions: i, providerId: r }, { token: o }));
373
- }), waitForSession: Sr((t, n) => new Promise((o) => {
374
- const { pollingIntervalMs: r, timeoutMs: i } = Un(n);
375
- let s;
373
+ }), waitForSession: Nr((t, n) => new Promise((o) => {
374
+ const { pollingIntervalMs: r, timeoutMs: i } = Pn(n);
375
+ let a;
376
376
  const l = setInterval(async () => {
377
- const a = await e.post(v.notp.session, { pendingRef: t });
378
- a.ok && (clearInterval(l), s && clearTimeout(s), o(m(Promise.resolve(a))));
377
+ const s = await e.post(v.notp.session, { pendingRef: t });
378
+ s.ok && (clearInterval(l), a && clearTimeout(a), o(m(Promise.resolve(s))));
379
379
  }, r);
380
- s = setTimeout(() => {
380
+ a = setTimeout(() => {
381
381
  o({ error: { errorDescription: `Session polling timeout exceeded: ${i}ms`, errorCode: "0" }, ok: !1 }), clearInterval(l);
382
382
  }, i);
383
- })) }), Ce = k(U("token")), Oe = k(Cn("token"));
384
- var nn, on, Or = k([(nn = "projectId", on = U("projectId"), ue(jo(nn, on))())])((e) => {
385
- const { projectId: t, logger: n, baseUrl: o, cookiePolicy: r, baseHeaders: i = {}, refreshCookieName: s, fetch: l } = e;
386
- return a = ko({ baseUrl: o, projectId: t, logger: n, hooks: { get beforeRequest() {
383
+ })) }), De = k(A("token")), Re = k(Rn("token"));
384
+ var un, pn, Lr = k([(un = "projectId", pn = A("projectId"), me(Jo(un, pn))())])((e) => {
385
+ const { projectId: t, logger: n, baseUrl: o, cookiePolicy: r, baseHeaders: i = {}, refreshCookieName: a, fetch: l } = e;
386
+ return s = Eo({ baseUrl: o, projectId: t, logger: n, hooks: { get beforeRequest() {
387
387
  var c;
388
388
  return (c = e.hooks) === null || c === void 0 ? void 0 : c.beforeRequest;
389
389
  }, get afterRequest() {
@@ -392,19 +392,19 @@ var nn, on, Or = k([(nn = "projectId", on = U("projectId"), ue(jo(nn, on))())])(
392
392
  }, get transformResponse() {
393
393
  var c;
394
394
  return (c = e.hooks) === null || c === void 0 ? void 0 : c.transformResponse;
395
- } }, cookiePolicy: r, baseConfig: { baseHeaders: i }, refreshCookieName: s, fetch: l }), { accessKey: Bo(a), otp: ir(a), magicLink: Xo(a), enchantedLink: zo(a), oauth: Zo(a), outbound: tr(a), saml: lr(a), totp: pr(a), notp: Cr(a), webauthn: Ir(a), password: vr(a), flow: Wo(a), refresh: Oe((c, d, u, g) => {
396
- const w = {};
397
- u && (w.externalToken = u);
398
- const h = g ? v.tryRefresh : v.refresh;
399
- return m(a.post(h, w, { token: c, queryParams: d }));
400
- }), selectTenant: k([Ie("tenantId")], [ht('"token" must be string or undefined')])((c, d) => m(a.post(v.selectTenant, { tenant: c }, { token: d }))), logout: Oe((c) => m(a.post(v.logout, {}, { token: c }))), logoutAll: Oe((c) => m(a.post(v.logoutAll, {}, { token: c }))), me: Oe((c) => m(a.get(v.me, { token: c }))), myTenants: k([qo('"tenants" must a string array or a boolean')], [ht('"token" must be string or undefined')])((c, d) => {
395
+ } }, cookiePolicy: r, baseConfig: { baseHeaders: i }, refreshCookieName: a, fetch: l }), { accessKey: Qo(s), otp: fr(s), magicLink: ar(s), enchantedLink: _o(s), oauth: lr(s), outbound: ur(s), saml: yr(s), totp: Ir(s), notp: Pr(s), webauthn: Dr(s), password: Or(s), flow: nr(s), refresh: Re((c, d, u, g) => {
396
+ const y = {};
397
+ u && (y.externalToken = u);
398
+ const f = g ? v.tryRefresh : v.refresh;
399
+ return m(s.post(f, y, { token: c, queryParams: d }));
400
+ }), selectTenant: k([Te("tenantId")], [It('"token" must be string or undefined')])((c, d) => m(s.post(v.selectTenant, { tenant: c }, { token: d }))), logout: Re((c) => m(s.post(v.logout, {}, { token: c }))), logoutAll: Re((c) => m(s.post(v.logoutAll, {}, { token: c }))), me: Re((c) => m(s.get(v.me, { token: c }))), myTenants: k([Yo('"tenants" must a string array or a boolean')], [It('"token" must be string or undefined')])((c, d) => {
401
401
  const u = {};
402
- return typeof c == "boolean" ? u.dct = c : u.ids = c, m(a.post(v.myTenants, u, { token: d }));
403
- }), history: Oe((c) => m(a.get(v.history, { token: c }))), isJwtExpired: Ce(xo), getTenants: Ce(So), getJwtPermissions: Ce(Co), getJwtRoles: Ce(Oo), getCurrentTenant: Ce(Uo), httpClient: a };
404
- var a;
405
- }), Ur = Object.assign(Or, { DeliveryMethods: re });
402
+ return typeof c == "boolean" ? u.dct = c : u.ids = c, m(s.post(v.myTenants, u, { token: d }));
403
+ }), history: Re((c) => m(s.get(v.history, { token: c }))), isJwtExpired: De(Ro), getTenants: De(No), getJwtPermissions: De(Po), getJwtRoles: De(Lo), getCurrentTenant: De(Fo), httpClient: s };
404
+ var s;
405
+ }), Fr = Object.assign(Lr, { DeliveryMethods: de });
406
406
  /*! js-cookie v3.0.5 | MIT */
407
- function Pe(e) {
407
+ function Me(e) {
408
408
  for (var t = 1; t < arguments.length; t++) {
409
409
  var n = arguments[t];
410
410
  for (var o in n)
@@ -412,7 +412,7 @@ function Pe(e) {
412
412
  }
413
413
  return e;
414
414
  }
415
- var Ar = {
415
+ var qr = {
416
416
  read: function(e) {
417
417
  return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
418
418
  },
@@ -423,28 +423,28 @@ var Ar = {
423
423
  );
424
424
  }
425
425
  };
426
- function mt(e, t) {
427
- function n(r, i, s) {
426
+ function Ct(e, t) {
427
+ function n(r, i, a) {
428
428
  if (!(typeof document > "u")) {
429
- s = Pe({}, t, s), typeof s.expires == "number" && (s.expires = new Date(Date.now() + s.expires * 864e5)), s.expires && (s.expires = s.expires.toUTCString()), r = encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
429
+ a = Me({}, t, a), typeof a.expires == "number" && (a.expires = new Date(Date.now() + a.expires * 864e5)), a.expires && (a.expires = a.expires.toUTCString()), r = encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
430
430
  var l = "";
431
- for (var a in s)
432
- s[a] && (l += "; " + a, s[a] !== !0 && (l += "=" + s[a].split(";")[0]));
431
+ for (var s in a)
432
+ a[s] && (l += "; " + s, a[s] !== !0 && (l += "=" + a[s].split(";")[0]));
433
433
  return document.cookie = r + "=" + e.write(i, r) + l;
434
434
  }
435
435
  }
436
436
  function o(r) {
437
437
  if (!(typeof document > "u" || arguments.length && !r)) {
438
- for (var i = document.cookie ? document.cookie.split("; ") : [], s = {}, l = 0; l < i.length; l++) {
439
- var a = i[l].split("="), c = a.slice(1).join("=");
438
+ for (var i = document.cookie ? document.cookie.split("; ") : [], a = {}, l = 0; l < i.length; l++) {
439
+ var s = i[l].split("="), c = s.slice(1).join("=");
440
440
  try {
441
- var d = decodeURIComponent(a[0]);
442
- if (s[d] = e.read(c, d), r === d)
441
+ var d = decodeURIComponent(s[0]);
442
+ if (a[d] = e.read(c, d), r === d)
443
443
  break;
444
444
  } catch {
445
445
  }
446
446
  }
447
- return r ? s[r] : s;
447
+ return r ? a[r] : a;
448
448
  }
449
449
  }
450
450
  return Object.create(
@@ -455,16 +455,16 @@ function mt(e, t) {
455
455
  n(
456
456
  r,
457
457
  "",
458
- Pe({}, i, {
458
+ Me({}, i, {
459
459
  expires: -1
460
460
  })
461
461
  );
462
462
  },
463
463
  withAttributes: function(r) {
464
- return mt(this.converter, Pe({}, this.attributes, r));
464
+ return Ct(this.converter, Me({}, this.attributes, r));
465
465
  },
466
466
  withConverter: function(r) {
467
- return mt(Pe({}, this.converter, r), this.attributes);
467
+ return Ct(Me({}, this.converter, r), this.attributes);
468
468
  }
469
469
  },
470
470
  {
@@ -473,23 +473,23 @@ function mt(e, t) {
473
473
  }
474
474
  );
475
475
  }
476
- var ke = mt(Ar, { path: "/" });
477
- function Tr(e, t) {
476
+ var Ae = Ct(qr, { path: "/" });
477
+ function Br(e, t) {
478
478
  return function(n, o) {
479
479
  return Object.prototype.hasOwnProperty.call(n, o);
480
480
  }(e, t) ? e[t] : void 0;
481
481
  }
482
- function jr(e, t, n, o) {
483
- var r, i = document, s = "securitypolicyviolation", l = function(c) {
482
+ function Jr(e, t, n, o) {
483
+ var r, i = document, a = "securitypolicyviolation", l = function(c) {
484
484
  var d = new URL(e, location.href), u = c.blockedURI;
485
- u !== d.href && u !== d.protocol.slice(0, -1) && u !== d.origin || (r = c, a());
485
+ u !== d.href && u !== d.protocol.slice(0, -1) && u !== d.origin || (r = c, s());
486
486
  };
487
- i.addEventListener(s, l);
488
- var a = function() {
489
- return i.removeEventListener(s, l);
487
+ i.addEventListener(a, l);
488
+ var s = function() {
489
+ return i.removeEventListener(a, l);
490
490
  };
491
- return o == null || o.then(a, a), Promise.resolve().then(t).then(function(c) {
492
- return a(), c;
491
+ return o == null || o.then(s, s), Promise.resolve().then(t).then(function(c) {
492
+ return s(), c;
493
493
  }, function(c) {
494
494
  return new Promise(function(d) {
495
495
  var u = new MessageChannel();
@@ -497,278 +497,278 @@ function jr(e, t, n, o) {
497
497
  return d();
498
498
  }, u.port2.postMessage(null);
499
499
  }).then(function() {
500
- if (a(), r)
500
+ if (s(), r)
501
501
  return n(r);
502
502
  throw c;
503
503
  });
504
504
  });
505
505
  }
506
- var Er = { default: "endpoint" }, jn = "Blocked by CSP", En = "The endpoint parameter is not a valid URL", Dr = "API key required", Rr = "3.11.6", Tt = "Failed to load the JS script of the agent", jt = "9319";
507
- function Nr(e, t) {
508
- var n, o, r, i, s, l, a, c = [], d = (n = function(h) {
509
- var f = lo([], h, !0);
506
+ var Kr = { default: "endpoint" }, qn = "Blocked by CSP", Bn = "The endpoint parameter is not a valid URL", zr = "API key required", Hr = "3.11.6", Ft = "Failed to load the JS script of the agent", qt = "9319";
507
+ function Vr(e, t) {
508
+ var n, o, r, i, a, l, s, c = [], d = (n = function(f) {
509
+ var h = wo([], f, !0);
510
510
  return { current: function() {
511
- return f[0];
511
+ return h[0];
512
512
  }, postpone: function() {
513
- var y = f.shift();
514
- y !== void 0 && f.push(y);
513
+ var b = h.shift();
514
+ b !== void 0 && h.push(b);
515
515
  }, exclude: function() {
516
- f.shift();
516
+ h.shift();
517
517
  } };
518
- }(e), i = 100, s = 3e3, l = 0, o = function() {
519
- return Math.random() * Math.min(s, i * Math.pow(2, l++));
520
- }, r = /* @__PURE__ */ new Set(), [n.current(), function(h, f) {
521
- var y, O = f instanceof Error ? f.message : "";
522
- if (O === jn || O === En)
523
- n.exclude(), y = 0;
524
- else if (O === jt)
518
+ }(e), i = 100, a = 3e3, l = 0, o = function() {
519
+ return Math.random() * Math.min(a, i * Math.pow(2, l++));
520
+ }, r = /* @__PURE__ */ new Set(), [n.current(), function(f, h) {
521
+ var b, S = h instanceof Error ? h.message : "";
522
+ if (S === qn || S === Bn)
523
+ n.exclude(), b = 0;
524
+ else if (S === qt)
525
525
  n.exclude();
526
- else if (O === Tt) {
527
- var x = Date.now() - h.getTime() < 50, A = n.current();
528
- A && x && !r.has(A) && (r.add(A), y = 0), n.postpone();
526
+ else if (S === Ft) {
527
+ var x = Date.now() - f.getTime() < 50, O = n.current();
528
+ O && x && !r.has(O) && (r.add(O), b = 0), n.postpone();
529
529
  } else
530
530
  n.postpone();
531
- var E = n.current();
532
- return E === void 0 ? void 0 : [E, y ?? h.getTime() + o() - Date.now()];
531
+ var R = n.current();
532
+ return R === void 0 ? void 0 : [R, b ?? f.getTime() + o() - Date.now()];
533
533
  }]), u = d[0], g = d[1];
534
534
  if (u === void 0)
535
535
  return Promise.reject(new TypeError("The list of script URL patterns is empty"));
536
- var w = function(h) {
537
- var f = /* @__PURE__ */ new Date(), y = function(x) {
538
- return c.push({ url: h, startedAt: f, finishedAt: /* @__PURE__ */ new Date(), error: x });
539
- }, O = t(h);
540
- return O.then(function() {
541
- return y();
542
- }, y), O.catch(function(x) {
543
- if (a != null || (a = x), c.length >= 5)
544
- throw a;
545
- var A = g(f, x);
546
- if (!A)
547
- throw a;
548
- var E, L = A[0], N = A[1];
549
- return (E = N, new Promise(function(q) {
550
- return setTimeout(q, E);
536
+ var y = function(f) {
537
+ var h = /* @__PURE__ */ new Date(), b = function(x) {
538
+ return c.push({ url: f, startedAt: h, finishedAt: /* @__PURE__ */ new Date(), error: x });
539
+ }, S = t(f);
540
+ return S.then(function() {
541
+ return b();
542
+ }, b), S.catch(function(x) {
543
+ if (s != null || (s = x), c.length >= 5)
544
+ throw s;
545
+ var O = g(h, x);
546
+ if (!O)
547
+ throw s;
548
+ var R, F = O[0], J = O[1];
549
+ return (R = J, new Promise(function(z) {
550
+ return setTimeout(z, R);
551
551
  })).then(function() {
552
- return w(L);
552
+ return y(F);
553
553
  });
554
554
  });
555
555
  };
556
- return w(u).then(function(h) {
557
- return [h, c];
556
+ return y(u).then(function(f) {
557
+ return [f, c];
558
558
  });
559
559
  }
560
- var Dn = "https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js", Pr = Dn;
561
- function Lr(e) {
560
+ var Jn = "https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js", Mr = Jn;
561
+ function Wr(e) {
562
562
  var t;
563
563
  e.scriptUrlPattern;
564
- var n = e.token, o = e.apiKey, r = o === void 0 ? n : o, i = D(e, ["scriptUrlPattern", "token", "apiKey"]), s = (t = Tr(e, "scriptUrlPattern")) !== null && t !== void 0 ? t : Dn, l = function() {
564
+ var n = e.token, o = e.apiKey, r = o === void 0 ? n : o, i = P(e, ["scriptUrlPattern", "token", "apiKey"]), a = (t = Br(e, "scriptUrlPattern")) !== null && t !== void 0 ? t : Jn, l = function() {
565
565
  var d = [], u = function() {
566
566
  d.push({ time: /* @__PURE__ */ new Date(), state: document.visibilityState });
567
- }, g = function(w, h, f, y) {
568
- return w.addEventListener(h, f, y), function() {
569
- return w.removeEventListener(h, f, y);
567
+ }, g = function(y, f, h, b) {
568
+ return y.addEventListener(f, h, b), function() {
569
+ return y.removeEventListener(f, h, b);
570
570
  };
571
571
  }(document, "visibilitychange", u);
572
572
  return u(), [d, g];
573
- }(), a = l[0], c = l[1];
573
+ }(), s = l[0], c = l[1];
574
574
  return Promise.resolve().then(function() {
575
575
  if (!r || typeof r != "string")
576
- throw new Error(Dr);
576
+ throw new Error(zr);
577
577
  var d = function(u, g) {
578
- return (Array.isArray(u) ? u : [u]).map(function(w) {
579
- return function(h, f) {
580
- var y = encodeURIComponent;
581
- return h.replace(/<[^<>]+>/g, function(O) {
582
- return O === "<version>" ? "3" : O === "<apiKey>" ? y(f) : O === "<loaderVersion>" ? y(Rr) : O;
578
+ return (Array.isArray(u) ? u : [u]).map(function(y) {
579
+ return function(f, h) {
580
+ var b = encodeURIComponent;
581
+ return f.replace(/<[^<>]+>/g, function(S) {
582
+ return S === "<version>" ? "3" : S === "<apiKey>" ? b(h) : S === "<loaderVersion>" ? b(Hr) : S;
583
583
  });
584
- }(String(w), g);
584
+ }(String(y), g);
585
585
  });
586
- }(s, r);
587
- return Nr(d, qr);
586
+ }(a, r);
587
+ return Vr(d, Yr);
588
588
  }).catch(function(d) {
589
589
  throw c(), function(u) {
590
- return u instanceof Error && u.message === jt ? new Error(Tt) : u;
590
+ return u instanceof Error && u.message === qt ? new Error(Ft) : u;
591
591
  }(d);
592
592
  }).then(function(d) {
593
593
  var u = d[0], g = d[1];
594
- return c(), u.load(Ve(Ve({}, i), { ldi: { attempts: g, visibilityStates: a } }));
594
+ return c(), u.load(Ge(Ge({}, i), { ldi: { attempts: g, visibilityStates: s } }));
595
595
  });
596
596
  }
597
- function qr(e) {
598
- return jr(e, function() {
597
+ function Yr(e) {
598
+ return Jr(e, function() {
599
599
  return function(t) {
600
600
  return new Promise(function(n, o) {
601
601
  if (function(l) {
602
602
  if (URL.prototype)
603
603
  try {
604
604
  return new URL(l, location.href), !1;
605
- } catch (a) {
606
- if (a instanceof Error && a.name === "TypeError")
605
+ } catch (s) {
606
+ if (s instanceof Error && s.name === "TypeError")
607
607
  return !0;
608
- throw a;
608
+ throw s;
609
609
  }
610
610
  }(t))
611
- throw new Error(En);
611
+ throw new Error(Bn);
612
612
  var r = document.createElement("script"), i = function() {
613
613
  var l;
614
614
  return (l = r.parentNode) === null || l === void 0 ? void 0 : l.removeChild(r);
615
- }, s = document.head || document.getElementsByTagName("head")[0];
615
+ }, a = document.head || document.getElementsByTagName("head")[0];
616
616
  r.onload = function() {
617
617
  i(), n();
618
618
  }, r.onerror = function() {
619
- i(), o(new Error(Tt));
620
- }, r.async = !0, r.src = t, s.appendChild(r);
619
+ i(), o(new Error(Ft));
620
+ }, r.async = !0, r.src = t, a.appendChild(r);
621
621
  });
622
622
  }(e);
623
623
  }, function() {
624
- throw new Error(jn);
625
- }).then(Fr);
624
+ throw new Error(qn);
625
+ }).then($r);
626
626
  }
627
- function Fr() {
627
+ function $r() {
628
628
  var e = window, t = "__fpjs_p_l_b", n = e[t];
629
629
  if (function(o, r) {
630
- var i, s = (i = Object.getOwnPropertyDescriptor) === null || i === void 0 ? void 0 : i.call(Object, o, r);
631
- s != null && s.configurable ? delete o[r] : s && !s.writable || (o[r] = void 0);
630
+ var i, a = (i = Object.getOwnPropertyDescriptor) === null || i === void 0 ? void 0 : i.call(Object, o, r);
631
+ a != null && a.configurable ? delete o[r] : a && !a.writable || (o[r] = void 0);
632
632
  }(e, t), typeof (n == null ? void 0 : n.load) != "function")
633
- throw new Error(jt);
633
+ throw new Error(qt);
634
634
  return n;
635
635
  }
636
- const Rn = "3.2.0", z = typeof window < "u", ct = Math.pow(2, 31) - 1, Br = `https://descopecdn.com/npm/oidc-client-ts@${Rn}/dist/browser/oidc-client-ts.min.js`, Jr = `https://cdn.jsdelivr.net/npm/oidc-client-ts@${Rn}/dist/browser/oidc-client-ts.min.js`, Kr = ["/v1/auth/refresh", "/v1/auth/try-refresh", "/v1/auth/me", "/v1/auth/me/tenants", "/v1/auth/me/history"];
637
- let _;
638
- const Nn = (e) => {
636
+ const Kn = "3.2.0", Y = typeof window < "u", mt = Math.pow(2, 31) - 1, Qr = `https://descopecdn.com/npm/oidc-client-ts@${Kn}/dist/browser/oidc-client-ts.min.js`, Xr = `https://cdn.jsdelivr.net/npm/oidc-client-ts@${Kn}/dist/browser/oidc-client-ts.min.js`, Gr = ["/v1/auth/refresh", "/v1/auth/try-refresh", "/v1/auth/me", "/v1/auth/me/tenants", "/v1/auth/me/history"];
637
+ let ie;
638
+ const zn = (e) => {
639
639
  try {
640
- return St(e).exp;
640
+ return Dt(e).exp;
641
641
  } catch {
642
642
  return null;
643
643
  }
644
- }, Hr = (e) => {
644
+ }, Zr = (e) => {
645
645
  const { refresh_expire_in: t, refresh_token: n } = e;
646
- return t ? Math.floor(Date.now() / 1e3) + t : Nn(n);
647
- }, zr = (e) => {
646
+ return t ? Math.floor(Date.now() / 1e3) + t : zn(n);
647
+ }, _r = (e) => {
648
648
  const { expires_in: t, expires_at: n, access_token: o } = e;
649
- return n || (t ? Math.floor(Date.now() / 1e3) + t : o ? Nn(o) : void 0);
650
- }, Pn = (e) => {
651
- const { access_token: t, id_token: n, refresh_token: o, refresh_expire_in: r } = e, i = D(e, ["access_token", "id_token", "refresh_token", "refresh_expire_in"]);
652
- return Object.assign({ sessionJwt: e.sessionJwt || t, idToken: n, refreshJwt: e.refreshJwt || o, sessionExpiration: e.sessionExpiration || zr(e), cookieExpiration: e.cookieExpiration || Hr(e) }, i);
653
- }, me = (e, t) => {
649
+ return n || (t ? Math.floor(Date.now() / 1e3) + t : o ? zn(o) : void 0);
650
+ }, Hn = (e) => {
651
+ const { access_token: t, id_token: n, refresh_token: o, refresh_expire_in: r } = e, i = P(e, ["access_token", "id_token", "refresh_token", "refresh_expire_in"]);
652
+ return Object.assign({ sessionJwt: e.sessionJwt || t, idToken: n, refreshJwt: e.refreshJwt || o, sessionExpiration: e.sessionExpiration || _r(e), cookieExpiration: e.cookieExpiration || Zr(e) }, i);
653
+ }, Ce = (e, t) => {
654
654
  var n;
655
655
  return ["beforeRequest", "afterRequest"].reduce((o, r) => {
656
656
  var i;
657
657
  return o[r] = [].concat(((i = e.hooks) === null || i === void 0 ? void 0 : i[r]) || []).concat((t == null ? void 0 : t[r]) || []), o;
658
658
  }, (n = e.hooks) !== null && n !== void 0 ? n : e.hooks = {}), e;
659
- }, Le = async (e) => {
659
+ }, We = async (e) => {
660
660
  if (!(e != null && e.ok))
661
661
  return {};
662
662
  const t = await (e == null ? void 0 : e.clone().json()), n = (t == null ? void 0 : t.authInfo) || t || {};
663
- return Pn(n);
664
- }, wt = () => z && !!window.descopeBridge, dt = (e, t) => {
663
+ return Hn(n);
664
+ }, Ot = () => Y && !!window.descopeBridge, yt = (e, t) => {
665
665
  if (!((t == null ? void 0 : t.status) >= 400 && (t == null ? void 0 : t.status) < 500))
666
666
  return !1;
667
667
  const n = (e == null ? void 0 : e.path) || "";
668
- return Kr.includes(n);
669
- }, Vr = _ !== void 0 || z && window.localStorage !== void 0, oe = (e, t) => {
668
+ return Gr.includes(n);
669
+ }, ei = ie !== void 0 || Y && window.localStorage !== void 0, le = (e, t) => {
670
670
  var n, o;
671
- return (o = (n = _ || z && window.localStorage) === null || n === void 0 ? void 0 : n.setItem) === null || o === void 0 ? void 0 : o.call(n, e, t);
672
- }, ee = (e) => {
671
+ return (o = (n = ie || Y && window.localStorage) === null || n === void 0 ? void 0 : n.setItem) === null || o === void 0 ? void 0 : o.call(n, e, t);
672
+ }, ae = (e) => {
673
673
  var t, n;
674
- return (n = (t = _ || z && window.localStorage) === null || t === void 0 ? void 0 : t.getItem) === null || n === void 0 ? void 0 : n.call(t, e);
675
- }, X = (e) => {
674
+ return (n = (t = ie || Y && window.localStorage) === null || t === void 0 ? void 0 : t.getItem) === null || n === void 0 ? void 0 : n.call(t, e);
675
+ }, oe = (e) => {
676
676
  var t, n;
677
- return (n = (t = _ || z && window.localStorage) === null || t === void 0 ? void 0 : t.removeItem) === null || n === void 0 ? void 0 : n.call(t, e);
678
- }, Mr = (e) => {
677
+ return (n = (t = ie || Y && window.localStorage) === null || t === void 0 ? void 0 : t.removeItem) === null || n === void 0 ? void 0 : n.call(t, e);
678
+ }, ti = (e) => {
679
679
  var t, n, o, r, i;
680
- return (i = (n = (t = _ == null ? void 0 : _.key) === null || t === void 0 ? void 0 : t.call(_, e)) !== null && n !== void 0 ? n : z && ((r = (o = window.localStorage) === null || o === void 0 ? void 0 : o.key) === null || r === void 0 ? void 0 : r.call(o, e))) !== null && i !== void 0 ? i : null;
681
- }, K = (...e) => {
680
+ return (i = (n = (t = ie == null ? void 0 : ie.key) === null || t === void 0 ? void 0 : t.call(ie, e)) !== null && n !== void 0 ? n : Y && ((r = (o = window.localStorage) === null || o === void 0 ? void 0 : o.key) === null || r === void 0 ? void 0 : r.call(o, e))) !== null && i !== void 0 ? i : null;
681
+ }, W = (...e) => {
682
682
  console.debug(...e);
683
- }, rn = (...e) => {
683
+ }, gn = (...e) => {
684
684
  console.warn(...e);
685
- }, Wr = (e, t) => {
685
+ }, ni = (e, t) => {
686
686
  let n;
687
687
  var o;
688
- return t > 0 ? (n = 1e3 * t, K(`Using provided nextRefreshSeconds: ${t}s`)) : n = ((o = e) ? o.getTime() - (/* @__PURE__ */ new Date()).getTime() : 0) - 2e4, n > ct && (K(`Timeout is too large (${n}ms), setting it to ${ct}ms`), n = ct), n;
689
- }, Ge = "DS", De = "DSR", Et = "DSI";
690
- function sn(e, t, n) {
688
+ return t > 0 ? (n = 1e3 * t, W(`Using provided nextRefreshSeconds: ${t}s`)) : n = ((o = e) ? o.getTime() - (/* @__PURE__ */ new Date()).getTime() : 0) - 2e4, n > mt && (W(`Timeout is too large (${n}ms), setting it to ${mt}ms`), n = mt), n;
689
+ }, rt = "DS", Je = "DSR", Bt = "DSI";
690
+ function hn(e, t, n) {
691
691
  if (t) {
692
- const { cookieDomain: o, cookiePath: r, cookieSameSite: i, cookieExpiration: s, cookieSecure: l } = n, a = new Date(1e3 * s), c = yt(o);
693
- ke.set(e, t, { path: r, domain: c ? o : void 0, expires: a, sameSite: i, secure: l });
692
+ const { cookieDomain: o, cookiePath: r, cookieSameSite: i, cookieExpiration: a, cookieSecure: l } = n, s = new Date(1e3 * a), c = Ut(o);
693
+ Ae.set(e, t, { path: r, domain: c ? o : void 0, expires: s, sameSite: i, secure: l });
694
694
  }
695
695
  }
696
- function yt(e) {
696
+ function Ut(e) {
697
697
  const t = window.location.hostname.split("."), n = e == null ? void 0 : e.split(".");
698
698
  return t.slice(-(n == null ? void 0 : n.length)).join(".") === e;
699
699
  }
700
- const Dt = (e) => (e == null ? void 0 : e.cookieName) || Ge, Me = (e) => (e == null ? void 0 : e.cookieName) || De;
701
- function Te(e = "", t) {
702
- return ke.get(Me(t)) || ee(`${e}${De}`) || "";
700
+ const Jt = (e) => (e == null ? void 0 : e.cookieName) || rt, Ze = (e) => (e == null ? void 0 : e.cookieName) || Je;
701
+ function Fe(e = "", t) {
702
+ return Ae.get(Ze(t)) || ae(`${e}${Je}`) || "";
703
703
  }
704
- function an(e = "", t) {
705
- return ke.get(Dt(t)) || ee(`${e}${Ge}`) || "";
704
+ function fn(e = "", t) {
705
+ return Ae.get(Jt(t)) || ae(`${e}${rt}`) || "";
706
706
  }
707
- function Ln(e = "") {
708
- return ee(`${e}${Et}`) || "";
707
+ function Vn(e = "") {
708
+ return ae(`${e}${Bt}`) || "";
709
709
  }
710
- function qn(e = "", t, n, o) {
711
- X(`${e}${De}`), X(`${e}${Ge}`), X(`${e}${Et}`);
712
- const r = Dt(t);
713
- ke.remove(r, o == null ? void 0 : o.session);
714
- const i = Me(n);
715
- ke.remove(i, o == null ? void 0 : o.refresh);
710
+ function Mn(e = "", t, n, o) {
711
+ oe(`${e}${Je}`), oe(`${e}${rt}`), oe(`${e}${Bt}`);
712
+ const r = Jt(t);
713
+ Ae.remove(r, o == null ? void 0 : o.session);
714
+ const i = Ze(n);
715
+ Ae.remove(i, o == null ? void 0 : o.refresh);
716
716
  }
717
- const Yr = (e, t) => (n) => {
718
- const o = Object.assign(n, { token: n.token || Te(e, t) }), r = function(i = "") {
719
- return ee(`${i}DTD`) || "";
717
+ const oi = (e, t) => (n) => {
718
+ const o = Object.assign(n, { token: n.token || Fe(e, t) }), r = function(i = "") {
719
+ return ae(`${i}DTD`) || "";
720
720
  }(e);
721
721
  return r && (o.headers = Object.assign(Object.assign({}, o.headers || {}), { "x-descope-trusted-device-token": r })), o;
722
- }, $r = z && (localStorage == null ? void 0 : localStorage.getItem("fingerprint.endpoint.url")) || "https://api.descope.com", Qr = "vsid", Xr = "vrid", Rt = "fp", Fn = (e = !1) => {
723
- const t = ee(Rt);
722
+ }, ri = Y && (localStorage == null ? void 0 : localStorage.getItem("fingerprint.endpoint.url")) || "https://api.descope.com", ii = "vsid", ai = "vrid", Kt = "fp", Wn = (e = !1) => {
723
+ const t = ae(Kt);
724
724
  if (!t)
725
725
  return null;
726
726
  const n = JSON.parse(t);
727
727
  return (/* @__PURE__ */ new Date()).getTime() > n.expiry && !e ? null : n.value;
728
- }, Gr = async (e, t = $r) => {
728
+ }, si = async (e, t = ri) => {
729
729
  try {
730
- if (Fn())
730
+ if (Wn())
731
731
  return;
732
732
  const n = (Date.now().toString(36) + Math.random().toString(36).substring(2) + Math.random().toString(36).substring(2)).substring(0, 27), o = new URL(t);
733
733
  o.pathname = "/fXj8gt3x8VulJBna/x96Emn69oZwcd7I6";
734
734
  const r = new URL(t);
735
735
  r.pathname = "/fXj8gt3x8VulJBna/w78aRZnnDZ3Aqw0I";
736
- const i = r.toString() + "?apiKey=<apiKey>&version=<version>&loaderVersion=<loaderVersion>", s = Lr({ apiKey: e, endpoint: [o.toString(), Er], scriptUrlPattern: [i, Pr] }), l = await s, { requestId: a } = await l.get({ linkedId: n }), c = ((d, u) => ({ [Qr]: d, [Xr]: u }))(n, a);
736
+ const i = r.toString() + "?apiKey=<apiKey>&version=<version>&loaderVersion=<loaderVersion>", a = Wr({ apiKey: e, endpoint: [o.toString(), Kr], scriptUrlPattern: [i, Mr] }), l = await a, { requestId: s } = await l.get({ linkedId: n }), c = ((d, u) => ({ [ii]: d, [ai]: u }))(n, s);
737
737
  ((d) => {
738
738
  const u = { value: d, expiry: (/* @__PURE__ */ new Date()).getTime() + 864e5 };
739
- oe(Rt, JSON.stringify(u));
739
+ le(Kt, JSON.stringify(u));
740
740
  })(c);
741
741
  } catch (n) {
742
742
  console.warn("Could not load fingerprint", n);
743
743
  }
744
- }, Ti = () => {
745
- X(Rt);
746
- }, Zr = (e) => {
747
- const t = Fn(!0);
744
+ }, Bi = () => {
745
+ oe(Kt);
746
+ }, li = (e) => {
747
+ const t = Wn(!0);
748
748
  return t && e.body && (e.body.fpData = t), e;
749
- }, be = "descopeFlowNonce", ln = "X-Descope-Flow-Nonce", cn = "/v1/flow/start", bt = "/v1/flow/next", kt = (e, t = be) => `${t}${e}`, _r = (e, t = be) => {
749
+ }, Ue = "descopeFlowNonce", vn = "X-Descope-Flow-Nonce", mn = "/v1/flow/start", At = "/v1/flow/next", Tt = (e, t = Ue) => `${t}${e}`, ci = (e, t = Ue) => {
750
750
  try {
751
- const n = kt(e, t);
752
- X(n);
751
+ const n = Tt(e, t);
752
+ oe(n);
753
753
  } catch (n) {
754
754
  console.error("Error removing flow nonce:", n);
755
755
  }
756
- }, Bn = (e) => {
756
+ }, Yn = (e) => {
757
757
  var t;
758
758
  return ((t = /.*\|#\|(.*)/.exec(e)) === null || t === void 0 ? void 0 : t[1]) || null;
759
- }, dn = (e) => {
759
+ }, yn = (e) => {
760
760
  var t;
761
- return e.path === bt && (!((t = e.body) === null || t === void 0) && t.executionId) ? Bn(e.body.executionId) : null;
762
- }, Nt = "dls_last_user_login_id", Pt = "dls_last_user_display_name", un = (e) => oe(Nt, e), It = () => ee(Nt), xt = () => ee(Pt), ei = (e) => async (...t) => {
761
+ return e.path === At && (!((t = e.body) === null || t === void 0) && t.executionId) ? Yn(e.body.executionId) : null;
762
+ }, zt = "dls_last_user_login_id", Ht = "dls_last_user_display_name", wn = (e) => le(zt, e), jt = () => ae(zt), Et = () => ae(Ht), di = (e) => async (...t) => {
763
763
  var n;
764
764
  t[1] = t[1] || {};
765
- const [, o = {}] = t, r = It(), i = xt();
765
+ const [, o = {}] = t, r = jt(), i = Et();
766
766
  return r && ((n = o.lastAuth) !== null && n !== void 0 || (o.lastAuth = {}), o.lastAuth.loginId = r, o.lastAuth.name = i), await e(...t);
767
- }, ti = (e) => (t) => async (...n) => {
767
+ }, ui = (e) => (t) => async (...n) => {
768
768
  const o = await t(...n);
769
- return e || (X(Nt), X(Pt)), o;
769
+ return e || (oe(zt), oe(Ht)), o;
770
770
  };
771
- function qe() {
771
+ function Ye() {
772
772
  const e = [];
773
773
  return { pub: (t) => {
774
774
  e.forEach((n) => n(t));
@@ -777,34 +777,34 @@ function qe() {
777
777
  return () => e.splice(n, 1);
778
778
  } };
779
779
  }
780
- const ni = (e, t, n, o) => (r) => async (...i) => {
781
- const s = await r(...i);
782
- return qn(e, t, n, o == null ? void 0 : o()), s;
780
+ const pi = (e, t, n, o) => (r) => async (...i) => {
781
+ const a = await r(...i);
782
+ return Mn(e, t, n, o == null ? void 0 : o()), a;
783
783
  };
784
- async function Fe(e) {
784
+ async function $e(e) {
785
785
  const t = function(r) {
786
786
  var i;
787
- const s = JSON.parse(r);
788
- return s.publicKey.challenge = Ee(s.publicKey.challenge), s.publicKey.user.id = Ee(s.publicKey.user.id), (i = s.publicKey.excludeCredentials) === null || i === void 0 || i.forEach((l) => {
789
- l.id = Ee(l.id);
790
- }), s;
787
+ const a = JSON.parse(r);
788
+ return a.publicKey.challenge = Be(a.publicKey.challenge), a.publicKey.user.id = Be(a.publicKey.user.id), (i = a.publicKey.excludeCredentials) === null || i === void 0 || i.forEach((l) => {
789
+ l.id = Be(l.id);
790
+ }), a;
791
791
  }(e);
792
- return o = await navigator.credentials.create(t), JSON.stringify({ id: o.id, rawId: ce(o.rawId), type: o.type, response: { attestationObject: ce(o.response.attestationObject), clientDataJSON: ce(o.response.clientDataJSON) } });
792
+ return o = await navigator.credentials.create(t), JSON.stringify({ id: o.id, rawId: fe(o.rawId), type: o.type, response: { attestationObject: fe(o.response.attestationObject), clientDataJSON: fe(o.response.clientDataJSON) } });
793
793
  var o;
794
794
  }
795
- async function ut(e) {
796
- const t = Kn(e);
797
- return Hn(await navigator.credentials.get(t));
795
+ async function wt(e) {
796
+ const t = Qn(e);
797
+ return Xn(await navigator.credentials.get(t));
798
798
  }
799
- async function oi(e, t) {
800
- const n = Kn(e);
801
- return n.signal = t.signal, n.mediation = "conditional", Hn(await navigator.credentials.get(n));
799
+ async function gi(e, t) {
800
+ const n = Qn(e);
801
+ return n.signal = t.signal, n.mediation = "conditional", Xn(await navigator.credentials.get(n));
802
802
  }
803
- async function Jn(e = !1) {
803
+ async function $n(e = !1) {
804
804
  var t, n;
805
- if (!z)
805
+ if (!Y)
806
806
  return Promise.resolve(!1);
807
- if (wt()) {
807
+ if (Ot()) {
808
808
  const r = (n = (t = window.descopeBridge) === null || t === void 0 ? void 0 : t.hostInfo) === null || n === void 0 ? void 0 : n.webauthn;
809
809
  if (typeof r == "boolean")
810
810
  return r;
@@ -812,34 +812,34 @@ async function Jn(e = !1) {
812
812
  const o = !!(window.PublicKeyCredential && navigator.credentials && navigator.credentials.create && navigator.credentials.get);
813
813
  return o && e && PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable ? PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() : o;
814
814
  }
815
- function Kn(e) {
815
+ function Qn(e) {
816
816
  var t;
817
817
  const n = JSON.parse(e);
818
- return n.publicKey.challenge = Ee(n.publicKey.challenge), (t = n.publicKey.allowCredentials) === null || t === void 0 || t.forEach((o) => {
819
- o.id = Ee(o.id);
818
+ return n.publicKey.challenge = Be(n.publicKey.challenge), (t = n.publicKey.allowCredentials) === null || t === void 0 || t.forEach((o) => {
819
+ o.id = Be(o.id);
820
820
  }), n;
821
821
  }
822
- function Hn(e) {
823
- return JSON.stringify({ id: e.id, rawId: ce(e.rawId), type: e.type, response: { authenticatorData: ce(e.response.authenticatorData), clientDataJSON: ce(e.response.clientDataJSON), signature: ce(e.response.signature), userHandle: e.response.userHandle ? ce(e.response.userHandle) : void 0 } });
822
+ function Xn(e) {
823
+ return JSON.stringify({ id: e.id, rawId: fe(e.rawId), type: e.type, response: { authenticatorData: fe(e.response.authenticatorData), clientDataJSON: fe(e.response.clientDataJSON), signature: fe(e.response.signature), userHandle: e.response.userHandle ? fe(e.response.userHandle) : void 0 } });
824
824
  }
825
- function Ee(e) {
825
+ function Be(e) {
826
826
  const t = e.replace(/_/g, "/").replace(/-/g, "+");
827
827
  return Uint8Array.from(atob(t), (n) => n.charCodeAt(0)).buffer;
828
828
  }
829
- function ce(e) {
829
+ function fe(e) {
830
830
  return btoa(String.fromCharCode.apply(null, new Uint8Array(e))).replace(/\//g, "_").replace(/\+/g, "-").replace(/=/g, "");
831
831
  }
832
- var pn, ri = (pn = (e) => ({ async signUp(t, n, o) {
832
+ var bn, hi = (bn = (e) => ({ async signUp(t, n, o) {
833
833
  const r = await e.webauthn.signUp.start(t, window.location.origin, n, o);
834
834
  if (!r.ok)
835
835
  return r;
836
- const i = await Fe(r.data.options);
836
+ const i = await $e(r.data.options);
837
837
  return await e.webauthn.signUp.finish(r.data.transactionId, i);
838
838
  }, async signIn(t, n) {
839
839
  const o = await e.webauthn.signIn.start(t, window.location.origin, void 0, void 0, n);
840
840
  if (!o.ok)
841
841
  return o;
842
- const r = await ut(o.data.options);
842
+ const r = await wt(o.data.options);
843
843
  return await e.webauthn.signIn.finish(o.data.transactionId, r);
844
844
  }, async signUpOrIn(t, n) {
845
845
  var o;
@@ -847,70 +847,70 @@ var pn, ri = (pn = (e) => ({ async signUp(t, n, o) {
847
847
  if (!r.ok)
848
848
  return r;
849
849
  if (!((o = r.data) === null || o === void 0) && o.create) {
850
- const i = await Fe(r.data.options);
850
+ const i = await $e(r.data.options);
851
851
  return await e.webauthn.signUp.finish(r.data.transactionId, i);
852
852
  }
853
853
  {
854
- const i = await ut(r.data.options);
854
+ const i = await wt(r.data.options);
855
855
  return await e.webauthn.signIn.finish(r.data.transactionId, i);
856
856
  }
857
857
  }, async update(t, n, o) {
858
858
  const r = await e.webauthn.update.start(t, window.location.origin, n, o);
859
859
  if (!r.ok)
860
860
  return r;
861
- const i = await Fe(r.data.options);
861
+ const i = await $e(r.data.options);
862
862
  return await e.webauthn.update.finish(r.data.transactionId, i);
863
- }, helpers: { create: Fe, get: ut, isSupported: Jn, conditional: oi } }), (...e) => {
864
- const t = pn(...e);
863
+ }, helpers: { create: $e, get: wt, isSupported: $n, conditional: gi } }), (...e) => {
864
+ const t = bn(...e);
865
865
  return Object.assign(t.signUp, e[0].webauthn.signUp), Object.assign(t.signIn, e[0].webauthn.signIn), Object.assign(t.signUpOrIn, e[0].webauthn.signUpOrIn), Object.assign(t.update, e[0].webauthn.update), t;
866
866
  });
867
- const gn = { config: "/fedcm/config" }, ii = () => {
867
+ const kn = { config: "/fedcm/config" }, fi = () => {
868
868
  if (window.crypto && window.crypto.getRandomValues) {
869
869
  const e = new Uint8Array(16);
870
870
  return window.crypto.getRandomValues(e), Array.from(e, (t) => t.toString(16).padStart(2, "0")).join("");
871
871
  }
872
872
  return Math.random().toString(36).substring(2);
873
873
  };
874
- async function hn(e, t) {
874
+ async function In(e, t) {
875
875
  var n;
876
876
  try {
877
- await zn(e, t);
877
+ await Gn(e, t);
878
878
  } catch (o) {
879
879
  (n = t == null ? void 0 : t.onFailed) === null || n === void 0 || n.call(t, o);
880
880
  }
881
881
  }
882
- async function zn(e, t) {
882
+ async function Gn(e, t) {
883
883
  var n, o;
884
- const r = await async function(i, s = "google", l, a, c) {
885
- const d = ii(), u = await async function() {
886
- return new Promise((h, f) => {
884
+ const r = await async function(i, a = "google", l, s, c) {
885
+ const d = fi(), u = await async function() {
886
+ return new Promise((f, h) => {
887
887
  if (window.google)
888
- return void h(window.google.accounts.id);
889
- let y = document.getElementById("google-gsi-client-script");
890
- y || (y = document.createElement("script"), document.head.appendChild(y), y.async = !0, y.defer = !0, y.id = "google-gsi-client-script", y.src = "https://accounts.google.com/gsi/client"), y.onload = function() {
891
- window.google ? h(window.google.accounts.id) : f("Failed to load Google GSI client script - not loaded properly");
892
- }, y.onerror = function() {
893
- f("Failed to load Google GSI client script - failed to load");
888
+ return void f(window.google.accounts.id);
889
+ let b = document.getElementById("google-gsi-client-script");
890
+ b || (b = document.createElement("script"), document.head.appendChild(b), b.async = !0, b.defer = !0, b.id = "google-gsi-client-script", b.src = "https://accounts.google.com/gsi/client"), b.onload = function() {
891
+ window.google ? f(window.google.accounts.id) : h("Failed to load Google GSI client script - not loaded properly");
892
+ }, b.onerror = function() {
893
+ h("Failed to load Google GSI client script - failed to load");
894
894
  };
895
895
  });
896
- }(), g = await i.oauth.getOneTapClientId(s);
896
+ }(), g = await i.oauth.getOneTapClientId(a);
897
897
  if (!g.ok)
898
- throw new Error("Failed to get OneTap client ID for provider " + s);
899
- const w = g.data.clientId;
900
- return new Promise((h) => {
901
- var f, y;
902
- const O = (x) => {
903
- h({ provider: s, nonce: d, credential: x == null ? void 0 : x.credential });
898
+ throw new Error("Failed to get OneTap client ID for provider " + a);
899
+ const y = g.data.clientId;
900
+ return new Promise((f) => {
901
+ var h, b;
902
+ const S = (x) => {
903
+ f({ provider: a, nonce: d, credential: x == null ? void 0 : x.credential });
904
904
  };
905
- u.initialize(Object.assign(Object.assign({}, l), { itp_support: (f = l == null ? void 0 : l.itp_support) === null || f === void 0 || f, use_fedcm_for_prompt: (y = l == null ? void 0 : l.use_fedcm_for_prompt) === null || y === void 0 || y, client_id: w, callback: O, nonce: d })), u.prompt((x) => {
906
- var A, E;
905
+ u.initialize(Object.assign(Object.assign({}, l), { itp_support: (h = l == null ? void 0 : l.itp_support) === null || h === void 0 || h, use_fedcm_for_prompt: (b = l == null ? void 0 : l.use_fedcm_for_prompt) === null || b === void 0 || b, client_id: y, callback: S, nonce: d })), u.prompt((x) => {
906
+ var O, R;
907
907
  if (c && (x != null && x.isDismissedMoment())) {
908
- const L = (A = x.getDismissedReason) === null || A === void 0 ? void 0 : A.call(x);
909
- return c == null || c(L), void O();
908
+ const F = (O = x.getDismissedReason) === null || O === void 0 ? void 0 : O.call(x);
909
+ return c == null || c(F), void S();
910
910
  }
911
- if (a && (x != null && x.isSkippedMoment())) {
912
- const L = (E = x.getSkippedReason) === null || E === void 0 ? void 0 : E.call(x);
913
- return a == null || a(L), void O();
911
+ if (s && (x != null && x.isSkippedMoment())) {
912
+ const F = (R = x.getSkippedReason) === null || R === void 0 ? void 0 : R.call(x);
913
+ return s == null || s(F), void S();
914
914
  }
915
915
  });
916
916
  });
@@ -929,78 +929,78 @@ async function zn(e, t) {
929
929
  (o = t == null ? void 0 : t.onAuthenticated) === null || o === void 0 || o.call(t, i.data);
930
930
  }
931
931
  }
932
- var si = (e) => Object.assign(Object.assign({}, e.flow), { start: async (...t) => {
933
- const n = await Jn(), o = Object.assign(Object.assign({ location: window.location.href }, t[1]), { deviceInfo: { webAuthnSupport: n }, startOptionsVersion: 1 });
932
+ var vi = (e) => Object.assign(Object.assign({}, e.flow), { start: async (...t) => {
933
+ const n = await $n(), o = Object.assign(Object.assign({ location: window.location.href }, t[1]), { deviceInfo: { webAuthnSupport: n }, startOptionsVersion: 1 });
934
934
  return t[1] = o, e.flow.start(...t);
935
935
  } });
936
- const ai = () => window.location.search.includes("code") && window.location.search.includes("state");
937
- let pt;
938
- const Vn = (e, t) => new Promise((n, o) => {
936
+ const mi = () => window.location.search.includes("code") && window.location.search.includes("state");
937
+ let bt;
938
+ const Zn = (e, t) => new Promise((n, o) => {
939
939
  if (!e.length)
940
940
  return o(new Error("No URLs provided to loadScriptWithFallback"));
941
941
  const r = t();
942
942
  if (r)
943
943
  return n(r);
944
- const i = e.shift(), s = document.createElement("script");
945
- s.src = i, s.id = ((l) => {
946
- let a = 0;
944
+ const i = e.shift(), a = document.createElement("script");
945
+ a.src = i, a.id = ((l) => {
946
+ let s = 0;
947
947
  for (let c = 0; c < l.length; c++)
948
- a = (a << 5) - a + l.charCodeAt(c), a |= 0;
949
- return Math.abs(a).toString(16);
950
- })(i), s.onload = () => {
948
+ s = (s << 5) - s + l.charCodeAt(c), s |= 0;
949
+ return Math.abs(s).toString(16);
950
+ })(i), a.onload = () => {
951
951
  const l = t();
952
952
  if (l)
953
953
  return n(l);
954
954
  throw new Error("Could not get entry after loading script from URL");
955
- }, s.addEventListener("error", () => {
956
- Vn(e, t), s.setAttribute("data-error", "true");
957
- }), document.body.appendChild(s);
958
- }), li = async (e, t, n) => {
959
- pt || (pt = (async () => {
955
+ }, a.addEventListener("error", () => {
956
+ Zn(e, t), a.setAttribute("data-error", "true");
957
+ }), document.body.appendChild(a);
958
+ }), yi = async (e, t, n) => {
959
+ bt || (bt = (async () => {
960
960
  try {
961
961
  return require("oidc-client-ts");
962
962
  } catch {
963
- return Vn([Br, Jr], () => window.oidc);
963
+ return Zn([Qr, Xr], () => window.oidc);
964
964
  }
965
965
  })());
966
- const { OidcClient: o, WebStorageStateStore: r } = await pt;
966
+ const { OidcClient: o, WebStorageStateStore: r } = await bt;
967
967
  if (!o)
968
968
  throw new Error("oidc-client-ts is not installed. Please install it by running `npm install oidc-client-ts`");
969
969
  const i = (n == null ? void 0 : n.redirectUri) || window.location.href;
970
- let s, l, a, c;
970
+ let a, l, s, c;
971
971
  if (n != null && n.issuer) {
972
972
  if (!n.clientId)
973
973
  throw new Error("clientId is required when providing a custom issuer/authority");
974
- s = n.issuer, l = n.clientId, a = `${l}_user`, c = "openid";
974
+ a = n.issuer, l = n.clientId, s = `${l}_user`, c = "openid";
975
975
  } else
976
- n != null && n.applicationId ? (s = e.httpClient.buildUrl(t), s = `${s}/${n.applicationId}`, l = t, a = `${l}_user`, c = "openid email roles descope.custom_claims offline_access") : (s = e.httpClient.buildUrl(t), l = t, a = `${l}_user`, c = "openid email roles descope.custom_claims offline_access");
977
- const d = { authority: s, client_id: l, redirect_uri: i, response_type: "code", scope: (n == null ? void 0 : n.scope) || c, stateStore: new r({ store: window.localStorage, prefix: l }), loadUserInfo: !0, fetchRequestCredentials: "same-origin" };
978
- return n != null && n.redirectUri && (d.redirect_uri = n.redirectUri), { client: new o(d), stateUserKey: a };
979
- }, ci = (e, t, n) => {
976
+ n != null && n.applicationId ? (a = e.httpClient.buildUrl(t), a = `${a}/${n.applicationId}`, l = t, s = `${l}_user`, c = "openid email roles descope.custom_claims offline_access") : (a = e.httpClient.buildUrl(t), l = t, s = `${l}_user`, c = "openid email roles descope.custom_claims offline_access");
977
+ const d = { authority: a, client_id: l, redirect_uri: i, response_type: "code", scope: (n == null ? void 0 : n.scope) || c, stateStore: new r({ store: window.localStorage, prefix: l }), loadUserInfo: !0, fetchRequestCredentials: "same-origin" };
978
+ return n != null && n.redirectUri && (d.redirect_uri = n.redirectUri), { client: new o(d), stateUserKey: s };
979
+ }, wi = (e, t, n) => {
980
980
  const o = async () => {
981
- let i, s;
982
- return i && s || ({ client: i, stateUserKey: s } = await li(e, t, n)), { client: i, stateUserKey: s };
981
+ let i, a;
982
+ return i && a || ({ client: i, stateUserKey: a } = await yi(e, t, n)), { client: i, stateUserKey: a };
983
983
  }, r = async (i = "") => {
984
- var s;
985
- const { client: l, stateUserKey: a } = await o(), c = await l.processSigninResponse(i || window.location.href);
984
+ var a;
985
+ const { client: l, stateUserKey: s } = await o(), c = await l.processSigninResponse(i || window.location.href);
986
986
  var d;
987
- return await ((s = e.httpClient.hooks) === null || s === void 0 ? void 0 : s.afterRequest({}, new Response(JSON.stringify(c)))), oe(a, JSON.stringify({ id_token: (d = c).id_token, session_state: d.session_state, profile: d.profile })), (() => {
987
+ return await ((a = e.httpClient.hooks) === null || a === void 0 ? void 0 : a.afterRequest({}, new Response(JSON.stringify(c)))), le(s, JSON.stringify({ id_token: (d = c).id_token, session_state: d.session_state, profile: d.profile })), (() => {
988
988
  const u = new URL(window.location.href);
989
989
  u.searchParams.delete("code"), u.searchParams.delete("state"), window.history.replaceState({}, document.title, u.toString());
990
990
  })(), c;
991
991
  };
992
- return { loginWithRedirect: async (i = {}, s = !1) => {
993
- const { client: l } = await o(), a = await l.createSigninRequest(i), { url: c } = a;
994
- return s || (window.location.href = c), { ok: !0, data: a };
992
+ return { loginWithRedirect: async (i = {}, a = !1) => {
993
+ const { client: l } = await o(), s = await l.createSigninRequest(i), { url: c } = s;
994
+ return a || (window.location.href = c), { ok: !0, data: s };
995
995
  }, finishLogin: r, finishLoginIfNeed: async (i = "") => {
996
- if (ai())
996
+ if (mi())
997
997
  return await r(i);
998
998
  }, refreshToken: async (i) => {
999
- var s;
1000
- const { client: l, stateUserKey: a } = await o(), c = ((g) => {
1001
- const w = ee(g);
1002
- return w ? JSON.parse(w) : null;
1003
- })(a);
999
+ var a;
1000
+ const { client: l, stateUserKey: s } = await o(), c = ((g) => {
1001
+ const y = ae(g);
1002
+ return y ? JSON.parse(y) : null;
1003
+ })(s);
1004
1004
  if (!c)
1005
1005
  throw new Error("User not found in storage to refresh token");
1006
1006
  let d = i;
@@ -1009,24 +1009,24 @@ const Vn = (e, t) => new Promise((n, o) => {
1009
1009
  e.httpClient.hooks.beforeRequest(g), d = g.token;
1010
1010
  }
1011
1011
  const u = await l.useRefreshToken({ state: { refresh_token: d, session_state: c.session_state, profile: c.profile } });
1012
- return await ((s = e.httpClient.hooks) === null || s === void 0 ? void 0 : s.afterRequest({}, new Response(JSON.stringify(u)))), u;
1013
- }, logout: async (i, s = !1) => {
1014
- const { client: l, stateUserKey: a } = await o();
1015
- i || (i = {}), i.id_token_hint = i.id_token_hint || Ln(), i.post_logout_redirect_uri = i.post_logout_redirect_uri || window.location.href;
1012
+ return await ((a = e.httpClient.hooks) === null || a === void 0 ? void 0 : a.afterRequest({}, new Response(JSON.stringify(u)))), u;
1013
+ }, logout: async (i, a = !1) => {
1014
+ const { client: l, stateUserKey: s } = await o();
1015
+ i || (i = {}), i.id_token_hint = i.id_token_hint || Vn(), i.post_logout_redirect_uri = i.post_logout_redirect_uri || window.location.href;
1016
1016
  const c = await l.createSignoutRequest(i), { url: d } = c;
1017
- return X(a), s || window.location.replace(d), c;
1017
+ return oe(s), a || window.location.replace(d), c;
1018
1018
  } };
1019
- }, di = function(...e) {
1019
+ }, bi = function(...e) {
1020
1020
  return (t) => e.reduce((n, o) => o(n), t);
1021
1021
  }((e) => (t) => {
1022
1022
  var n;
1023
- return n = t.customStorage, _ = n, e(t);
1023
+ return n = t.customStorage, ie = n, e(t);
1024
1024
  }, (e) => (t) => {
1025
- var { fpKey: n, fpLoad: o } = t, r = D(t, ["fpKey", "fpLoad"]);
1026
- return z ? (n && o && Gr(n).catch(() => null), e(me(r, { beforeRequest: Zr }))) : e(r);
1025
+ var { fpKey: n, fpLoad: o } = t, r = P(t, ["fpKey", "fpLoad"]);
1026
+ return Y ? (n && o && si(n).catch(() => null), e(Ce(r, { beforeRequest: li }))) : e(r);
1027
1027
  }, (e) => (t) => {
1028
- var { autoRefresh: n } = t, o = D(t, ["autoRefresh"]);
1029
- if (!n || wt())
1028
+ var { autoRefresh: n } = t, o = P(t, ["autoRefresh"]);
1029
+ if (!n || Ot())
1030
1030
  return e(o);
1031
1031
  const { clearAllTimers: r, setTimer: i } = (() => {
1032
1032
  const c = [];
@@ -1037,228 +1037,228 @@ const Vn = (e, t) => new Promise((n, o) => {
1037
1037
  c.push(setTimeout(d, u));
1038
1038
  } };
1039
1039
  })();
1040
- let s, l;
1041
- z && document.addEventListener("visibilitychange", () => {
1042
- document.visibilityState === "visible" && s && /* @__PURE__ */ new Date() > s && (K("Expiration time passed, refreshing session"), a.refresh(Te() || l));
1040
+ let a, l;
1041
+ Y && document.addEventListener("visibilitychange", () => {
1042
+ document.visibilityState === "visible" && a && /* @__PURE__ */ new Date() > a && (W("Expiration time passed, refreshing session"), s.refresh(Fe() || l));
1043
1043
  });
1044
- const a = e(me(o, { afterRequest: async (c, d) => {
1045
- const { sessionJwt: u, refreshJwt: g, sessionExpiration: w, nextRefreshSeconds: h } = await Le(d);
1046
- if (dt(c, d))
1047
- K("Session invalidated, canceling all timers"), r();
1048
- else if (u || w) {
1049
- if (s = ((O, x) => {
1044
+ const s = e(Ce(o, { afterRequest: async (c, d) => {
1045
+ const { sessionJwt: u, refreshJwt: g, sessionExpiration: y, nextRefreshSeconds: f } = await We(d);
1046
+ if (yt(c, d))
1047
+ W("Session invalidated, canceling all timers"), r();
1048
+ else if (u || y) {
1049
+ if (a = ((S, x) => {
1050
1050
  if (x)
1051
1051
  return new Date(1e3 * x);
1052
- K("Could not extract expiration time from session token, trying to decode the token");
1052
+ W("Could not extract expiration time from session token, trying to decode the token");
1053
1053
  try {
1054
- const A = St(O);
1055
- if (A.exp)
1056
- return new Date(1e3 * A.exp);
1054
+ const O = Dt(S);
1055
+ if (O.exp)
1056
+ return new Date(1e3 * O.exp);
1057
1057
  } catch {
1058
1058
  return null;
1059
1059
  }
1060
- })(u, w), !s)
1061
- return void K("Could not extract expiration time from session token");
1060
+ })(u, y), !a)
1061
+ return void W("Could not extract expiration time from session token");
1062
1062
  l = g;
1063
- const f = Wr(s, h);
1064
- if (r(), f <= 2e4)
1065
- return void K("Session is too close to expiration, not setting refresh timer");
1066
- const y = new Date(Date.now() + f).toLocaleTimeString("en-US", { hour12: !1 });
1067
- K(`Setting refresh timer for ${y}. (${f}ms)`), i(() => {
1068
- z && document.visibilityState === "hidden" ? K("Skipping refresh due to timer - document is hidden") : (K("Refreshing session due to timer"), a.refresh(Te() || g));
1069
- }, f);
1063
+ const h = ni(a, f);
1064
+ if (r(), h <= 2e4)
1065
+ return void W("Session is too close to expiration, not setting refresh timer");
1066
+ const b = new Date(Date.now() + h).toLocaleTimeString("en-US", { hour12: !1 });
1067
+ W(`Setting refresh timer for ${b}. (${h}ms)`), i(() => {
1068
+ Y && document.visibilityState === "hidden" ? W("Skipping refresh due to timer - document is hidden") : (W("Refreshing session due to timer"), s.refresh(Fe() || g));
1069
+ }, h);
1070
1070
  }
1071
1071
  } }));
1072
- return Se(a, ["logout", "logoutAll", "oidc.logout"], (c) => async (...d) => {
1072
+ return Ee(s, ["logout", "logoutAll", "oidc.logout"], (c) => async (...d) => {
1073
1073
  const u = await c(...d);
1074
- return K("Clearing all timers"), r(), u;
1074
+ return W("Clearing all timers"), r(), u;
1075
1075
  });
1076
1076
  }, (e) => (t) => e(Object.assign(Object.assign({}, t), { baseHeaders: Object.assign({ "x-descope-sdk-name": "web-js", "x-descope-sdk-version": "1.45.0" }, t.baseHeaders) })), (e) => (t) => {
1077
- const n = qe(), o = qe(), r = qe(), i = qe(), s = e(me(t, { afterRequest: async (a, c) => {
1078
- if (dt(a, c))
1079
- K("Session invalidated, notifying subscribers with empty values"), o.pub(null), r.pub(null), n.pub(null), i.pub(null);
1077
+ const n = Ye(), o = Ye(), r = Ye(), i = Ye(), a = e(Ce(t, { afterRequest: async (s, c) => {
1078
+ if (yt(s, c))
1079
+ W("Session invalidated, notifying subscribers with empty values"), o.pub(null), r.pub(null), n.pub(null), i.pub(null);
1080
1080
  else {
1081
- const d = await (async (h) => {
1082
- const f = await Le(h);
1083
- return (f == null ? void 0 : f.user) || (f != null && f.hasOwnProperty("userId") ? f : void 0);
1081
+ const d = await (async (f) => {
1082
+ const h = await We(f);
1083
+ return (h == null ? void 0 : h.user) || (h != null && h.hasOwnProperty("userId") ? h : void 0);
1084
1084
  })(c);
1085
1085
  d && r.pub(d);
1086
- const { sessionJwt: u, sessionExpiration: g, claims: w } = await Le(c);
1087
- u && o.pub(u), w && i.pub(w), (g || u) && n.pub(g || 42);
1086
+ const { sessionJwt: u, sessionExpiration: g, claims: y } = await We(c);
1087
+ u && o.pub(u), y && i.pub(y), (g || u) && n.pub(g || 42);
1088
1088
  }
1089
- } })), l = Se(s, ["logout", "logoutAll", "oidc.logout"], (a) => async (...c) => {
1090
- const d = await a(...c);
1089
+ } })), l = Ee(a, ["logout", "logoutAll", "oidc.logout"], (s) => async (...c) => {
1090
+ const d = await s(...c);
1091
1091
  return o.pub(null), r.pub(null), n.pub(null), i.pub(null), d;
1092
1092
  });
1093
- return Object.assign(l, { onSessionTokenChange: o.sub, onUserChange: r.sub, onClaimsChange: i.sub, onIsAuthenticatedChange: (a) => n.sub((c) => {
1094
- a(!!c);
1093
+ return Object.assign(l, { onSessionTokenChange: o.sub, onUserChange: r.sub, onClaimsChange: i.sub, onIsAuthenticatedChange: (s) => n.sub((c) => {
1094
+ s(!!c);
1095
1095
  }) });
1096
1096
  }, (e) => (t) => {
1097
- const { enableFlowNonce: n = !0, nonceStoragePrefix: o = be } = t, r = D(t, ["enableFlowNonce", "nonceStoragePrefix"]);
1098
- return n ? (((i = be) => {
1097
+ const { enableFlowNonce: n = !0, nonceStoragePrefix: o = Ue } = t, r = P(t, ["enableFlowNonce", "nonceStoragePrefix"]);
1098
+ return n ? (((i = Ue) => {
1099
1099
  try {
1100
- if (!Vr)
1100
+ if (!ei)
1101
1101
  return;
1102
- for (let c = 0; c < (s = void 0, l = void 0, a = void 0, (a = (s = _ == null ? void 0 : _.length) !== null && s !== void 0 ? s : z && ((l = window.localStorage) === null || l === void 0 ? void 0 : l.length)) !== null && a !== void 0 ? a : 0); c++) {
1103
- const d = Mr(c);
1102
+ for (let c = 0; c < (a = void 0, l = void 0, s = void 0, (s = (a = ie == null ? void 0 : ie.length) !== null && a !== void 0 ? a : Y && ((l = window.localStorage) === null || l === void 0 ? void 0 : l.length)) !== null && s !== void 0 ? s : 0); c++) {
1103
+ const d = ti(c);
1104
1104
  if (d && d.startsWith(i)) {
1105
- const u = ee(d);
1105
+ const u = ae(d);
1106
1106
  if (u)
1107
1107
  try {
1108
- JSON.parse(u).expiry < Date.now() && X(d);
1108
+ JSON.parse(u).expiry < Date.now() && oe(d);
1109
1109
  } catch {
1110
- X(d);
1110
+ oe(d);
1111
1111
  }
1112
1112
  }
1113
1113
  }
1114
1114
  } catch (c) {
1115
1115
  console.error("Error cleaning up expired nonces:", c);
1116
1116
  }
1117
- var s, l, a;
1118
- })(o), e(me(r, { afterRequest: async (i, s) => {
1119
- if (i.path !== cn && i.path !== bt)
1117
+ var a, l, s;
1118
+ })(o), e(Ce(r, { afterRequest: async (i, a) => {
1119
+ if (i.path !== mn && i.path !== At)
1120
1120
  return;
1121
- const { nonce: l, executionId: a } = await (async (c, d) => {
1121
+ const { nonce: l, executionId: s } = await (async (c, d) => {
1122
1122
  try {
1123
- const u = d.headers.get(ln);
1124
- let g = await d.clone().json().then((w) => (w == null ? void 0 : w.executionId) || null).catch(() => null);
1125
- return g || (g = dn(c)), { nonce: u, executionId: Bn(g) };
1123
+ const u = d.headers.get(vn);
1124
+ let g = await d.clone().json().then((y) => (y == null ? void 0 : y.executionId) || null).catch(() => null);
1125
+ return g || (g = yn(c)), { nonce: u, executionId: Yn(g) };
1126
1126
  } catch {
1127
1127
  return { nonce: null, executionId: null };
1128
1128
  }
1129
- })(i, s);
1130
- l && a && ((c, d, u, g = be) => {
1129
+ })(i, a);
1130
+ l && s && ((c, d, u, g = Ue) => {
1131
1131
  try {
1132
- const w = kt(c, g), h = u ? 172800 : 10800, f = { value: d, expiry: Date.now() + 1e3 * h, isStart: u };
1133
- oe(w, JSON.stringify(f));
1134
- } catch (w) {
1135
- console.error("Error setting flow nonce:", w);
1132
+ const y = Tt(c, g), f = u ? 172800 : 10800, h = { value: d, expiry: Date.now() + 1e3 * f, isStart: u };
1133
+ le(y, JSON.stringify(h));
1134
+ } catch (y) {
1135
+ console.error("Error setting flow nonce:", y);
1136
1136
  }
1137
- })(a, l, i.path === cn, o);
1137
+ })(s, l, i.path === mn, o);
1138
1138
  }, beforeRequest: (i) => {
1139
- if (i.path === bt) {
1140
- const s = dn(i);
1141
- if (s) {
1142
- const l = ((a, c = be) => {
1139
+ if (i.path === At) {
1140
+ const a = yn(i);
1141
+ if (a) {
1142
+ const l = ((s, c = Ue) => {
1143
1143
  try {
1144
- const d = kt(a, c), u = ee(d);
1144
+ const d = Tt(s, c), u = ae(d);
1145
1145
  if (!u)
1146
1146
  return null;
1147
1147
  const g = JSON.parse(u);
1148
- return g.expiry < Date.now() ? (_r(a, c), null) : g.value;
1148
+ return g.expiry < Date.now() ? (ci(s, c), null) : g.value;
1149
1149
  } catch (d) {
1150
1150
  return console.error("Error getting flow nonce:", d), null;
1151
1151
  }
1152
- })(s, o);
1153
- l && (i.headers = i.headers || {}, i.headers[ln] = l);
1152
+ })(a, o);
1153
+ l && (i.headers = i.headers || {}, i.headers[vn] = l);
1154
1154
  }
1155
1155
  }
1156
1156
  return i;
1157
1157
  } }))) : e(r);
1158
1158
  }, (e) => (t) => {
1159
- var { storeLastAuthenticatedUser: n = !0, keepLastAuthenticatedUserAfterLogout: o = !1 } = t, r = D(t, ["storeLastAuthenticatedUser", "keepLastAuthenticatedUserAfterLogout"]);
1159
+ var { storeLastAuthenticatedUser: n = !0, keepLastAuthenticatedUserAfterLogout: o = !1 } = t, r = P(t, ["storeLastAuthenticatedUser", "keepLastAuthenticatedUserAfterLogout"]);
1160
1160
  if (!n)
1161
- return Object.assign(e(r), { getLastUserLoginId: It, getLastUserDisplayName: xt });
1162
- const i = e(me(r, { afterRequest: async (l, a) => {
1161
+ return Object.assign(e(r), { getLastUserLoginId: jt, getLastUserDisplayName: Et });
1162
+ const i = e(Ce(r, { afterRequest: async (l, s) => {
1163
1163
  var c;
1164
- const { userInfo: d, lastAuth: u } = await (async (h) => {
1165
- if (!(h != null && h.ok))
1164
+ const { userInfo: d, lastAuth: u } = await (async (f) => {
1165
+ if (!(f != null && f.ok))
1166
1166
  return { userInfo: void 0, lastAuth: void 0 };
1167
- const f = await (h == null ? void 0 : h.clone().json()), y = Pn((f == null ? void 0 : f.authInfo) || f || {});
1168
- return { userInfo: (y == null ? void 0 : y.user) || (y != null && y.hasOwnProperty("userId") ? y : void 0), lastAuth: f.lastAuth };
1169
- })(a), g = (c = d == null ? void 0 : d.loginIds) === null || c === void 0 ? void 0 : c[0], w = d == null ? void 0 : d.name;
1170
- g ? (un(g), ((h) => {
1171
- oe(Pt, h);
1172
- })(w)) : u != null && u.loginId && un(u.loginId);
1167
+ const h = await (f == null ? void 0 : f.clone().json()), b = Hn((h == null ? void 0 : h.authInfo) || h || {});
1168
+ return { userInfo: (b == null ? void 0 : b.user) || (b != null && b.hasOwnProperty("userId") ? b : void 0), lastAuth: h.lastAuth };
1169
+ })(s), g = (c = d == null ? void 0 : d.loginIds) === null || c === void 0 ? void 0 : c[0], y = d == null ? void 0 : d.name;
1170
+ g ? (wn(g), ((f) => {
1171
+ le(Ht, f);
1172
+ })(y)) : u != null && u.loginId && wn(u.loginId);
1173
1173
  } }));
1174
- let s = Se(i, ["flow.start"], ei);
1175
- return s = Se(s, ["logout", "logoutAll"], ti(o)), Object.assign(s, { getLastUserLoginId: It, getLastUserDisplayName: xt });
1174
+ let a = Ee(i, ["flow.start"], di);
1175
+ return a = Ee(a, ["logout", "logoutAll"], ui(o)), Object.assign(a, { getLastUserLoginId: jt, getLastUserDisplayName: Et });
1176
1176
  }, (e) => (t) => {
1177
- var { persistTokens: n, sessionTokenViaCookie: o, refreshTokenViaCookie: r, storagePrefix: i } = t, s = D(t, ["persistTokens", "sessionTokenViaCookie", "refreshTokenViaCookie", "storagePrefix"]);
1178
- if (!n || !z)
1179
- return e(s);
1177
+ var { persistTokens: n, sessionTokenViaCookie: o, refreshTokenViaCookie: r, storagePrefix: i } = t, a = P(t, ["persistTokens", "sessionTokenViaCookie", "refreshTokenViaCookie", "storagePrefix"]);
1178
+ if (!n || !Y)
1179
+ return e(a);
1180
1180
  let l;
1181
- const a = e(me(s, { beforeRequest: Yr(i, r), afterRequest: async (d, u) => {
1182
- if (dt(d, u))
1183
- K("Session invalidated, clearing persisted tokens"), qn(i, o, r, l);
1181
+ const s = e(Ce(a, { beforeRequest: oi(i, r), afterRequest: async (d, u) => {
1182
+ if (yt(d, u))
1183
+ W("Session invalidated, clearing persisted tokens"), Mn(i, o, r, l);
1184
1184
  else {
1185
- const g = ((w = {}, h = !1, f = "", y = !1) => {
1186
- var O, x, A, E;
1187
- const { sessionJwt: L, refreshJwt: N, trustedDeviceJwt: q } = w;
1188
- let H;
1189
- if (N)
1190
- if (y) {
1191
- X(`${f}${De}`);
1192
- const B = y.sameSite || "Strict", F = (O = y.secure) === null || O === void 0 || O, C = (x = y.domain) !== null && x !== void 0 ? x : w.cookieDomain, J = Me(y);
1193
- F && window.location.protocol !== "https:" && rn("Refresh token cookie is configured with secure=true but the page is not using HTTPS. The cookie will not be set. To fix this, pass refreshTokenViaCookie: { secure: process.env['NODE_ENV'] !== 'development' }");
1194
- const V = Object.assign(Object.assign({}, w), { cookieSameSite: B, cookieSecure: F, cookieDomain: C });
1195
- sn(J, N, V);
1196
- const Y = yt(C);
1197
- H = Object.assign(Object.assign({}, H), { refresh: { path: V.cookiePath, domain: Y ? C : void 0 } });
1185
+ const g = ((y = {}, f = !1, h = "", b = !1) => {
1186
+ var S, x, O, R;
1187
+ const { sessionJwt: F, refreshJwt: J, trustedDeviceJwt: z } = y;
1188
+ let V;
1189
+ if (J)
1190
+ if (b) {
1191
+ oe(`${h}${Je}`);
1192
+ const H = b.sameSite || "Strict", M = (S = b.secure) === null || S === void 0 || S, U = (x = b.domain) !== null && x !== void 0 ? x : y.cookieDomain, N = Ze(b);
1193
+ M && window.location.protocol !== "https:" && gn("Refresh token cookie is configured with secure=true but the page is not using HTTPS. The cookie will not be set. To fix this, pass refreshTokenViaCookie: { secure: process.env['NODE_ENV'] !== 'development' }");
1194
+ const q = Object.assign(Object.assign({}, y), { cookieSameSite: H, cookieSecure: M, cookieDomain: U });
1195
+ hn(N, J, q);
1196
+ const Z = Ut(U);
1197
+ V = Object.assign(Object.assign({}, V), { refresh: { path: q.cookiePath, domain: Z ? U : void 0 } });
1198
1198
  } else {
1199
- const B = Me(y);
1200
- ke.remove(B), oe(`${f}${De}`, N);
1199
+ const H = Ze(b);
1200
+ Ae.remove(H), le(`${h}${Je}`, J);
1201
1201
  }
1202
- if (L)
1203
- if (h) {
1204
- const B = h.sameSite || "Strict", F = (A = h.secure) === null || A === void 0 || A, C = (E = h.domain) !== null && E !== void 0 ? E : w.cookieDomain, J = Dt(h);
1205
- F && window.location.protocol !== "https:" && rn("Session token cookie is configured with secure=true but the page is not using HTTPS. The cookie will not be set. To fix this, pass sessionTokenViaCookie: { secure: process.env['NODE_ENV'] !== 'development' }");
1206
- const V = Object.assign(Object.assign({}, w), { cookieSameSite: B, cookieSecure: F, cookieDomain: C });
1207
- sn(J, L, V);
1208
- const Y = yt(C);
1209
- H = Object.assign(Object.assign({}, H), { session: { path: V.cookiePath, domain: Y ? C : void 0 } });
1202
+ if (F)
1203
+ if (f) {
1204
+ const H = f.sameSite || "Strict", M = (O = f.secure) === null || O === void 0 || O, U = (R = f.domain) !== null && R !== void 0 ? R : y.cookieDomain, N = Jt(f);
1205
+ M && window.location.protocol !== "https:" && gn("Session token cookie is configured with secure=true but the page is not using HTTPS. The cookie will not be set. To fix this, pass sessionTokenViaCookie: { secure: process.env['NODE_ENV'] !== 'development' }");
1206
+ const q = Object.assign(Object.assign({}, y), { cookieSameSite: H, cookieSecure: M, cookieDomain: U });
1207
+ hn(N, F, q);
1208
+ const Z = Ut(U);
1209
+ V = Object.assign(Object.assign({}, V), { session: { path: q.cookiePath, domain: Z ? U : void 0 } });
1210
1210
  } else
1211
- oe(`${f}${Ge}`, L);
1212
- return w.idToken && oe(`${f}${Et}`, w.idToken), q && oe(`${f}DTD`, q), H;
1213
- })(await Le(u), o, i, r);
1211
+ le(`${h}${rt}`, F);
1212
+ return y.idToken && le(`${h}${Bt}`, y.idToken), z && le(`${h}DTD`, z), V;
1213
+ })(await We(u), o, i, r);
1214
1214
  g && (l = g);
1215
1215
  }
1216
- } })), c = Se(a, ["logout", "logoutAll", "oidc.logout"], ni(i, o, r, () => l));
1217
- return Object.assign(c, { getRefreshToken: () => Te(i, r), getSessionToken: () => an(i, o), getIdToken: () => Ln(i) });
1216
+ } })), c = Ee(s, ["logout", "logoutAll", "oidc.logout"], pi(i, o, r, () => l));
1217
+ return Object.assign(c, { getRefreshToken: () => Fe(i, r), getSessionToken: () => fn(i, o), getIdToken: () => Vn(i) });
1218
1218
  })((e) => {
1219
- const t = Ur(e), n = ci(t, e.projectId, e.oidcConfig);
1220
- return Object.assign(Object.assign({}, t), { refresh: async (i, s) => {
1219
+ const t = Fr(e), n = wi(t, e.projectId, e.oidcConfig);
1220
+ return Object.assign(Object.assign({}, t), { refresh: async (i, a) => {
1221
1221
  var l;
1222
- if (wt())
1223
- return K(`Refresh called in native flow: ${new Error().stack}`), Promise.resolve({ ok: !1, error: { errorCode: "J171000", errorDescription: "Refresh is not supported in native flows via the web SDK" } });
1222
+ if (Ot())
1223
+ return W(`Refresh called in native flow: ${new Error().stack}`), Promise.resolve({ ok: !1, error: { errorCode: "J171000", errorDescription: "Refresh is not supported in native flows via the web SDK" } });
1224
1224
  if (e.oidcConfig)
1225
1225
  try {
1226
1226
  return await n.refreshToken(i), Promise.resolve({ ok: !0 });
1227
1227
  } catch (u) {
1228
1228
  return Promise.resolve({ ok: !1, error: { errorCode: "J161001", errorDescription: u.toString() } });
1229
1229
  }
1230
- const a = an(), c = Te();
1230
+ const s = fn(), c = Fe();
1231
1231
  let d = "";
1232
1232
  if (e.getExternalToken)
1233
1233
  try {
1234
1234
  d = await ((l = e.getExternalToken) === null || l === void 0 ? void 0 : l.call(e));
1235
1235
  } catch (u) {
1236
- K("Error getting external token while refreshing", u);
1236
+ W("Error getting external token while refreshing", u);
1237
1237
  }
1238
- return t.refresh(i, { dcs: a ? "t" : "f", dcr: c ? "t" : "f" }, d, s);
1238
+ return t.refresh(i, { dcs: s ? "t" : "f", dcr: c ? "t" : "f" }, d, a);
1239
1239
  }, logout: async (i) => {
1240
1240
  if (e.oidcConfig)
1241
1241
  try {
1242
1242
  return await n.logout({ id_token_hint: i }), Promise.resolve({ ok: !0 });
1243
- } catch (s) {
1244
- return Promise.resolve({ ok: !1, error: { errorCode: "J161000", errorDescription: s.toString() } });
1243
+ } catch (a) {
1244
+ return Promise.resolve({ ok: !1, error: { errorCode: "J161000", errorDescription: a.toString() } });
1245
1245
  }
1246
1246
  return t.logout(i);
1247
- }, flow: si(t), webauthn: ri(t), fedcm: (o = t, r = e.projectId, { onetap: { requestExchangeCode(i) {
1248
- hn(o, i);
1247
+ }, flow: vi(t), webauthn: hi(t), fedcm: (o = t, r = e.projectId, { onetap: { requestExchangeCode(i) {
1248
+ In(o, i);
1249
1249
  }, requestAuthentication(i) {
1250
- hn(o, i);
1251
- } }, async oneTap(i, s, l, a, c) {
1252
- await zn(o, { provider: i, oneTapConfig: s, loginOptions: l, onSkipped: a, onDismissed: c });
1250
+ In(o, i);
1251
+ } }, async oneTap(i, a, l, s, c) {
1252
+ await Gn(o, { provider: i, oneTapConfig: a, loginOptions: l, onSkipped: s, onDismissed: c });
1253
1253
  }, async launch(i) {
1254
- var s;
1255
- const l = { identity: { context: i || "signin", providers: [{ configURL: o.httpClient.buildUrl(r + gn.config), clientId: r }] } }, a = await ((s = navigator.credentials) === null || s === void 0 ? void 0 : s.get(l));
1256
- return o.refresh(a.token);
1257
- }, isSupported: () => z && "IdentityCredential" in window, async isLoggedIn(i) {
1258
- var s;
1259
- const l = o.httpClient.buildUrl(r + gn.config);
1254
+ var a;
1255
+ const l = { identity: { context: i || "signin", providers: [{ configURL: o.httpClient.buildUrl(r + kn.config), clientId: r }] } }, s = await ((a = navigator.credentials) === null || a === void 0 ? void 0 : a.get(l));
1256
+ return o.refresh(s.token);
1257
+ }, isSupported: () => Y && "IdentityCredential" in window, async isLoggedIn(i) {
1258
+ var a;
1259
+ const l = o.httpClient.buildUrl(r + kn.config);
1260
1260
  try {
1261
- const a = { identity: { context: i || "signin", providers: [{ configURL: l, clientId: r }] } }, c = await ((s = navigator.credentials) === null || s === void 0 ? void 0 : s.get(a));
1261
+ const s = { identity: { context: i || "signin", providers: [{ configURL: l, clientId: r }] } }, c = await ((a = navigator.credentials) === null || a === void 0 ? void 0 : a.get(s));
1262
1262
  return !!c && !!c.token;
1263
1263
  } catch {
1264
1264
  return !1;
@@ -1266,48 +1266,48 @@ const Vn = (e, t) => new Promise((n, o) => {
1266
1266
  } }), oidc: n });
1267
1267
  var o, r;
1268
1268
  });
1269
- let Lt;
1270
- const Mn = (e) => {
1271
- const t = di(Object.assign({ persistTokens: Yt, autoRefresh: Yt }, e));
1272
- return Lt = t, t;
1273
- }, ui = () => Mn({ projectId: "temp pid", persistTokens: !1, autoRefresh: !1, storeLastAuthenticatedUser: !1 });
1274
- Lt = ui();
1275
- const pi = () => Lt;
1276
- var gi = ({ projectId: e, baseUrl: t, persistTokens: n, autoRefresh: o, sessionTokenViaCookie: r, refreshTokenViaCookie: i, refreshCookieName: s, oidcConfig: l, storeLastAuthenticatedUser: a, keepLastAuthenticatedUserAfterLogout: c, getExternalToken: d, hooks: u, customStorage: g }) => We(() => {
1269
+ let Vt;
1270
+ const _n = (e) => {
1271
+ const t = bi(Object.assign({ persistTokens: tn, autoRefresh: tn }, e));
1272
+ return Vt = t, t;
1273
+ }, ki = () => _n({ projectId: "temp pid", persistTokens: !1, autoRefresh: !1, storeLastAuthenticatedUser: !1 });
1274
+ Vt = ki();
1275
+ const Ii = () => Vt;
1276
+ var xi = ({ projectId: e, baseUrl: t, persistTokens: n, autoRefresh: o, sessionTokenViaCookie: r, refreshTokenViaCookie: i, refreshCookieName: a, oidcConfig: l, storeLastAuthenticatedUser: s, keepLastAuthenticatedUserAfterLogout: c, getExternalToken: d, hooks: u, customStorage: g }) => _e(() => {
1277
1277
  if (e)
1278
- return Mn({ projectId: e, baseUrl: t, sessionTokenViaCookie: r, refreshTokenViaCookie: i, baseHeaders: Ke, persistTokens: n, autoRefresh: o, refreshCookieName: s, oidcConfig: l, storeLastAuthenticatedUser: a, keepLastAuthenticatedUserAfterLogout: c, hooks: u, getExternalToken: d, customStorage: g });
1278
+ return _n({ projectId: e, baseUrl: t, sessionTokenViaCookie: r, refreshTokenViaCookie: i, baseHeaders: Qe, persistTokens: n, autoRefresh: o, refreshCookieName: a, oidcConfig: l, storeLastAuthenticatedUser: s, keepLastAuthenticatedUserAfterLogout: c, hooks: u, getExternalToken: d, customStorage: g });
1279
1279
  }, [e, t, JSON.stringify(r), JSON.stringify(i), d, g]);
1280
- const hi = ({ projectId: e, baseUrl: t = "", baseStaticUrl: n = "", baseCdnUrl: o = "", sessionTokenViaCookie: r = !1, refreshTokenViaCookie: i = !1, hooks: s, persistTokens: l = !0, autoRefresh: a = !0, oidcConfig: c, storeLastAuthenticatedUser: d = !0, keepLastAuthenticatedUserAfterLogout: u = !1, refreshCookieName: g = "", getExternalToken: w, customStorage: h, children: f }) => {
1281
- const [y, O] = T(), [x, A] = T(), [E, L] = T(), [N, q] = T(!1), [H, B] = T(!1), [F, C] = T(!1), [J, V] = T(!!c), Y = je(!1), P = gi({ projectId: e, baseUrl: t, persistTokens: l, autoRefresh: a, sessionTokenViaCookie: r, refreshTokenViaCookie: i, hooks: s, oidcConfig: c, storeLastAuthenticatedUser: d, keepLastAuthenticatedUserAfterLogout: u, refreshCookieName: g, getExternalToken: w, customStorage: h });
1282
- fe(() => {
1283
- if (P) {
1284
- const pe = P.onSessionTokenChange(A), G = P.onUserChange(O), I = P.onIsAuthenticatedChange(q), Ze = P.onClaimsChange(L);
1280
+ const Si = ({ projectId: e, baseUrl: t = "", baseStaticUrl: n = "", baseCdnUrl: o = "", sessionTokenViaCookie: r = !1, refreshTokenViaCookie: i = !1, hooks: a, persistTokens: l = !0, autoRefresh: s = !0, oidcConfig: c, storeLastAuthenticatedUser: d = !0, keepLastAuthenticatedUserAfterLogout: u = !1, refreshCookieName: g = "", getExternalToken: y, customStorage: f, children: h }) => {
1281
+ const [b, S] = j(), [x, O] = j(), [R, F] = j(), [J, z] = j(!1), [V, H] = j(!1), [M, U] = j(!1), [N, q] = j(!!c), Z = xe(!1), L = xi({ projectId: e, baseUrl: t, persistTokens: l, autoRefresh: s, sessionTokenViaCookie: r, refreshTokenViaCookie: i, hooks: a, oidcConfig: c, storeLastAuthenticatedUser: d, keepLastAuthenticatedUserAfterLogout: u, refreshCookieName: g, getExternalToken: y, customStorage: f });
1282
+ ce(() => {
1283
+ if (L) {
1284
+ const pe = L.onSessionTokenChange(O), X = L.onUserChange(S), C = L.onIsAuthenticatedChange(z), je = L.onClaimsChange(F);
1285
1285
  return () => {
1286
- pe(), G(), I(), Ze();
1286
+ pe(), X(), C(), je();
1287
1287
  };
1288
1288
  }
1289
- }, [P]);
1290
- const M = je(!1), te = je(!1);
1291
- fe(() => {
1292
- P && c && !Y.current && (Y.current = !0, P.oidc.finishLoginIfNeed().finally(() => {
1293
- V(!1), M.current = !0;
1289
+ }, [L]);
1290
+ const se = xe(!1), re = xe(!1);
1291
+ ce(() => {
1292
+ L && c && !Z.current && (Z.current = !0, L.oidc.finishLoginIfNeed().finally(() => {
1293
+ q(!1), se.current = !0;
1294
1294
  }));
1295
1295
  }, []);
1296
- const ie = ze(() => {
1297
- ao() || M.current || (M.current = !0, C(!0), Wt(P == null ? void 0 : P.refresh)(void 0, !0).then(() => {
1298
- C(!1);
1296
+ const ye = Xe(() => {
1297
+ yo() || se.current || (se.current = !0, U(!0), en(L == null ? void 0 : L.refresh)(void 0, !0).then(() => {
1298
+ U(!1);
1299
1299
  }));
1300
- }, [P]), se = ze(() => {
1301
- te.current || (te.current = !0, B(!0), Wt(P.me)().then(() => {
1302
- B(!1);
1300
+ }, [L]), $ = Xe(() => {
1301
+ re.current || (re.current = !0, H(!0), en(L.me)().then(() => {
1302
+ H(!1);
1303
1303
  }));
1304
- }, [P]), ve = We(() => ({ fetchUser: se, user: y, isUserLoading: H, isUserFetched: te.current, fetchSession: ie, session: x, isAuthenticated: N, isSessionLoading: F, isOidcLoading: J, isSessionFetched: M.current, projectId: e, baseUrl: t, baseStaticUrl: n, baseCdnUrl: o, storeLastAuthenticatedUser: d, keepLastAuthenticatedUserAfterLogout: u, refreshCookieName: g, customStorage: h, setUser: O, setSession: A, setIsAuthenticated: q, claims: E, sdk: P }), [se, y, H, te.current, ie, x, N, F, J, M.current, e, t, n, o, u, g, h, O, A, q, E, P]);
1305
- return Q.createElement(mn.Provider, { value: ve }, f);
1304
+ }, [L]), ue = _e(() => ({ fetchUser: $, user: b, isUserLoading: V, isUserFetched: re.current, fetchSession: ye, session: x, isAuthenticated: J, isSessionLoading: M, isOidcLoading: N, isSessionFetched: se.current, projectId: e, baseUrl: t, baseStaticUrl: n, baseCdnUrl: o, storeLastAuthenticatedUser: d, keepLastAuthenticatedUserAfterLogout: u, refreshCookieName: g, customStorage: f, setUser: S, setSession: O, setIsAuthenticated: z, claims: R, sdk: L }), [$, b, V, re.current, ye, x, J, M, N, se.current, e, t, n, o, u, g, f, S, O, z, R, L]);
1305
+ return ne.createElement(Cn.Provider, { value: ue }, h);
1306
1306
  };
1307
- function ji(...e) {
1307
+ function Ji(...e) {
1308
1308
  return (t) => e.reduce((n, o) => o(n), t);
1309
1309
  }
1310
- const Ei = (...e) => e.join("/").replace(/\/+/g, "/"), fn = (e) => e.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_.]+/g, "-").toLowerCase(), Di = (e) => {
1310
+ const Ki = (...e) => e.join("/").replace(/\/+/g, "/"), xn = (e) => e.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_.]+/g, "-").toLowerCase(), zi = (e) => {
1311
1311
  const t = Symbol(((n) => {
1312
1312
  const o = n.toString();
1313
1313
  let r = 0;
@@ -1321,58 +1321,58 @@ const Ei = (...e) => e.join("/").replace(/\/+/g, "/"), fn = (e) => e.replace(/([
1321
1321
  const o = e(n);
1322
1322
  return o[t] = !0, o;
1323
1323
  };
1324
- }, fi = (e) => {
1324
+ }, Ci = (e) => {
1325
1325
  const [, t, n] = /(.*)\.(prop|attr)$/.exec(e) || [, e, "rest"];
1326
1326
  return { trimmedKey: t, category: n };
1327
- }, vi = (e) => typeof e == "string" || e == null ? e : JSON.stringify(e), mi = (e) => Q.forwardRef((t, n) => {
1328
- const { prop: o, attr: r, rest: i } = We(() => Object.entries(t).reduce((a, [c, d]) => {
1329
- const { trimmedKey: u, category: g } = fi(c);
1330
- return g === "prop" ? a.prop.push([u, d]) : g === "attr" ? a.attr.push([fn(u), vi(d)]) : Object.assign(a.rest, { [fn(u)]: d }), a;
1331
- }, { attr: [], prop: [], rest: {} }), [t]), s = je(null), l = ze((a) => {
1332
- s.current = a, a && (o.forEach(([c, d]) => {
1333
- s.current[c] = d;
1327
+ }, Oi = (e) => typeof e == "string" || e == null ? e : JSON.stringify(e), Ui = (e) => ne.forwardRef((t, n) => {
1328
+ const { prop: o, attr: r, rest: i } = _e(() => Object.entries(t).reduce((s, [c, d]) => {
1329
+ const { trimmedKey: u, category: g } = Ci(c);
1330
+ return g === "prop" ? s.prop.push([u, d]) : g === "attr" ? s.attr.push([xn(u), Oi(d)]) : Object.assign(s.rest, { [xn(u)]: d }), s;
1331
+ }, { attr: [], prop: [], rest: {} }), [t]), a = xe(null), l = Xe((s) => {
1332
+ a.current = s, s && (o.forEach(([c, d]) => {
1333
+ a.current[c] = d;
1334
1334
  }), r.forEach(([c, d]) => {
1335
- d == null ? a.removeAttribute(c) : a.setAttribute(c, d);
1335
+ d == null ? s.removeAttribute(c) : s.setAttribute(c, d);
1336
1336
  }));
1337
- }, [o, r, s]);
1338
- return vn(n, () => s.current), Q.createElement(e, Object.assign({ ref: l }, i));
1339
- }), wi = eo(async () => (((customElements == null ? void 0 : customElements.get("descope-wc")) || await import("./index.es3.js").then((e) => e.a).then((e) => e.default)).sdkConfigOverrides = { baseHeaders: Ke, persistTokens: !1, hooks: { get beforeRequest() {
1340
- return pi().httpClient.hooks.beforeRequest;
1337
+ }, [o, r, a]);
1338
+ return Sn(n, () => a.current), ne.createElement(e, Object.assign({ ref: l }, i));
1339
+ }), Ai = uo(async () => (((customElements == null ? void 0 : customElements.get("descope-wc")) || await import("./index.es3.js").then((e) => e.a).then((e) => e.default)).sdkConfigOverrides = { baseHeaders: Qe, persistTokens: !1, hooks: { get beforeRequest() {
1340
+ return Ii().httpClient.hooks.beforeRequest;
1341
1341
  }, set beforeRequest(e) {
1342
- } } }, { default: mi(Q.forwardRef((e, t) => {
1343
- var { "external-request-id": n } = e, o = D(e, ["external-request-id"]);
1344
- return We(() => {
1342
+ } } }, { default: Ui(ne.forwardRef((e, t) => {
1343
+ var { "external-request-id": n } = e, o = P(e, ["external-request-id"]);
1344
+ return _e(() => {
1345
1345
  var r, i;
1346
- r = "x-external-rid", (i = n) ? Ke[r] = i : delete Ke[r];
1347
- }, [n]), Q.createElement("descope-wc", Object.assign({ ref: t }, o));
1348
- })) })), yi = Q.forwardRef(({ flowId: e, onSuccess: t, onError: n, onReady: o, logger: r, tenant: i, theme: s, nonce: l, locale: a, debug: c, client: d, form: u, telemetryKey: g, redirectUrl: w, autoFocus: h, validateOnBlur: f, restartOnError: y, errorTransformer: O, styleId: x, onScreenUpdate: A, dismissScreenErrorOnInput: E, outboundAppId: L, outboundAppScopes: N, popupOrigin: q, children: H, externalRequestId: B }, F) => {
1349
- const [C, J] = T(null);
1350
- vn(F, () => C);
1351
- const { projectId: V, baseUrl: Y, baseStaticUrl: P, baseCdnUrl: M, storeLastAuthenticatedUser: te, keepLastAuthenticatedUserAfterLogout: ie, refreshCookieName: se, customStorage: ve, sdk: pe } = Q.useContext(mn), G = ze(async (I) => {
1352
- await pe.httpClient.hooks.afterRequest({}, new Response(JSON.stringify(I.detail))), t && t(I);
1346
+ r = "x-external-rid", (i = n) ? Qe[r] = i : delete Qe[r];
1347
+ }, [n]), ne.createElement("descope-wc", Object.assign({ ref: t }, o));
1348
+ })) })), Ti = ne.forwardRef(({ flowId: e, onSuccess: t, onError: n, onReady: o, logger: r, tenant: i, theme: a, nonce: l, locale: s, debug: c, client: d, form: u, telemetryKey: g, redirectUrl: y, autoFocus: f, validateOnBlur: h, restartOnError: b, errorTransformer: S, styleId: x, onScreenUpdate: O, dismissScreenErrorOnInput: R, outboundAppId: F, outboundAppScopes: J, popupOrigin: z, children: V, externalRequestId: H }, M) => {
1349
+ const [U, N] = j(null);
1350
+ Sn(M, () => U);
1351
+ const { projectId: q, baseUrl: Z, baseStaticUrl: L, baseCdnUrl: se, storeLastAuthenticatedUser: re, keepLastAuthenticatedUserAfterLogout: ye, refreshCookieName: $, customStorage: ue, sdk: pe } = ne.useContext(Cn), X = Xe(async (C) => {
1352
+ await pe.httpClient.hooks.afterRequest({}, new Response(JSON.stringify(C.detail))), t && t(C);
1353
1353
  }, [t]);
1354
- return fe(() => {
1355
- const I = C;
1356
- return I == null || I.addEventListener("success", G), n && (I == null || I.addEventListener("error", n)), o && (I == null || I.addEventListener("ready", o)), () => {
1357
- n && (I == null || I.removeEventListener("error", n)), o && (I == null || I.removeEventListener("ready", o)), I == null || I.removeEventListener("success", G);
1354
+ return ce(() => {
1355
+ const C = U;
1356
+ return C == null || C.addEventListener("success", X), n && (C == null || C.addEventListener("error", n)), o && (C == null || C.addEventListener("ready", o)), () => {
1357
+ n && (C == null || C.removeEventListener("error", n)), o && (C == null || C.removeEventListener("ready", o)), C == null || C.removeEventListener("success", X);
1358
1358
  };
1359
- }, [C, n, G]), fe(() => {
1360
- const I = C;
1361
- return I == null || I.addEventListener("success", G), () => {
1362
- I == null || I.removeEventListener("success", G);
1359
+ }, [U, n, X]), ce(() => {
1360
+ const C = U;
1361
+ return C == null || C.addEventListener("success", X), () => {
1362
+ C == null || C.removeEventListener("success", X);
1363
1363
  };
1364
- }, [C, G]), fe(() => {
1365
- const I = C;
1366
- return n && (I == null || I.addEventListener("error", n)), () => {
1367
- n && (I == null || I.removeEventListener("error", n));
1364
+ }, [U, X]), ce(() => {
1365
+ const C = U;
1366
+ return n && (C == null || C.addEventListener("error", n)), () => {
1367
+ n && (C == null || C.removeEventListener("error", n));
1368
1368
  };
1369
- }, [C, n]), fe(() => {
1370
- const I = C;
1371
- return o && (I == null || I.addEventListener("ready", o)), () => {
1372
- o && (I == null || I.removeEventListener("error", o));
1369
+ }, [U, n]), ce(() => {
1370
+ const C = U;
1371
+ return o && (C == null || C.addEventListener("ready", o)), () => {
1372
+ o && (C == null || C.removeEventListener("error", o));
1373
1373
  };
1374
- }, [C, o]), Q.createElement("form", null, Q.createElement(to, { fallback: null }, Q.createElement(wi, { projectId: V, flowId: e, baseUrl: Y, baseStaticUrl: P, baseCdnUrl: M, ref: J, telemetryKey: g, redirectUrl: w, autoFocus: h, styleId: x, validateOnBlur: f, restartOnError: y, keepLastAuthenticatedUserAfterLogout: ie, tenant: i, externalRequestId: B, customStorage: ve, "theme.attr": s, "nonce.attr": l, "locale.attr": a, "form.attr": u, "client.attr": d, "debug.attr": c, "outbound-app-id.attr": L, "outbound-app-scopes.attr": N, "popup-origin.attr": q, "store-last-authenticated-user.attr": te, "refreshCookieName.attr": se, "dismiss-screen-error-on-input.attr": E, "errorTransformer.prop": O, "logger.prop": r, "onScreenUpdate.prop": A, "customStorage.prop": ve }, H)));
1375
- }), bi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK8AAAAwCAYAAABnoirjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAI6lJREFUeAHtfQd8FsX29pTdfXtCeoBQAsHQAkIiVZSioFKkCCooiCD2ggXUq4Kici8qol4VkHJB6YIKFyki5AoIIkFASuihpJGet26Zme9sCgYMmgT1u/dPzu8Xfcvu7OzMM+c85zmzLw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2SpQ+/u7tVbR/mzwXriO+QN0klSsHNu5wpVfmJ2gM9QO+G0DpHErMXeZU2I+65Nuk8k+7HId6HP9U7npgYBe+++v1drl7K8C76VGgVZQqGJdtC3SarXydu2OG+ZTtKjWaq3Waq3Waq3W/svs/wHDkxYoFqn0jQAAAABJRU5ErkJggg==", He = "var(--color-green)", j = "var(--font-sans)", ne = {
1374
+ }, [U, o]), ne.createElement("form", null, ne.createElement(po, { fallback: null }, ne.createElement(Ai, { projectId: q, flowId: e, baseUrl: Z, baseStaticUrl: L, baseCdnUrl: se, ref: N, telemetryKey: g, redirectUrl: y, autoFocus: f, styleId: x, validateOnBlur: h, restartOnError: b, keepLastAuthenticatedUserAfterLogout: ye, tenant: i, externalRequestId: H, customStorage: ue, "theme.attr": a, "nonce.attr": l, "locale.attr": s, "form.attr": u, "client.attr": d, "debug.attr": c, "outbound-app-id.attr": F, "outbound-app-scopes.attr": J, "popup-origin.attr": z, "store-last-authenticated-user.attr": re, "refreshCookieName.attr": $, "dismiss-screen-error-on-input.attr": R, "errorTransformer.prop": S, "logger.prop": r, "onScreenUpdate.prop": O, "customStorage.prop": ue }, V)));
1375
+ }), ji = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK8AAAAwCAYAAABnoirjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAI6lJREFUeAHtfQd8FsX29pTdfXtCeoBQAsHQAkIiVZSioFKkCCooiCD2ggXUq4Kici8qol4VkHJB6YIKFyki5AoIIkFASuihpJGet26Zme9sCgYMmgT1u/dPzu8Xfcvu7OzMM+c85zmzLwjVWq3VWq3V2l9rGP3/Mdy9e3d67tw5Wv6BoigiMvIQT05GDN4KVGu19jv2l4G3ZcuWSl5enhzjcEgbt8yIEQF/ksAikjNu44gjgkmAEnHeSh0pjia3n4uOjtbCwsL0Q4cO6agWzLVWif3Z4MWNG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xYoFqn0jQAAAABJRU5ErkJggg==", qe = "var(--color-green)", D = "var(--font-sans)", _ = {
1376
1376
  width: "100%",
1377
1377
  height: 40,
1378
1378
  padding: "10px 14px",
@@ -1383,22 +1383,22 @@ const Ei = (...e) => e.join("/").replace(/\/+/g, "/"), fn = (e) => e.replace(/([
1383
1383
  borderRadius: 4,
1384
1384
  background: "white",
1385
1385
  color: "var(--color-text)",
1386
- fontFamily: j,
1386
+ fontFamily: D,
1387
1387
  outline: "none",
1388
1388
  boxSizing: "border-box",
1389
1389
  transition: "border-color 0.15s, box-shadow 0.15s"
1390
- }, ae = (e) => {
1390
+ }, ee = (e) => {
1391
1391
  e.target.style.borderColor = "var(--color-green)", e.target.style.boxShadow = "0 0 0 3px var(--color-green-ring)";
1392
- }, le = (e) => {
1392
+ }, te = (e) => {
1393
1393
  e.target.style.borderColor = "var(--color-input-border)", e.target.style.boxShadow = "none";
1394
1394
  };
1395
- function Be({ title: e, subtitle: t }) {
1396
- return /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
1397
- /* @__PURE__ */ p("h2", { style: { fontFamily: j, fontWeight: 600, fontSize: "36px", lineHeight: "44px", color: "var(--color-text)", margin: 0 }, children: e }),
1398
- /* @__PURE__ */ p("p", { style: { fontFamily: j, fontSize: 18, fontWeight: 400, lineHeight: "26px", color: "var(--color-text-secondary)", margin: 0 }, children: t })
1395
+ function Ne({ title: e, subtitle: t }) {
1396
+ return /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
1397
+ /* @__PURE__ */ p("h2", { style: { fontFamily: D, fontWeight: 600, fontSize: "36px", lineHeight: "44px", color: "var(--color-text)", margin: 0 }, children: e }),
1398
+ /* @__PURE__ */ p("p", { style: { fontFamily: D, fontSize: 18, fontWeight: 400, lineHeight: "26px", color: "var(--color-text-secondary)", margin: 0 }, children: t })
1399
1399
  ] });
1400
1400
  }
1401
- function we({ onClick: e, disabled: t, children: n, type: o = "button" }) {
1401
+ function be({ onClick: e, disabled: t, children: n, type: o = "button" }) {
1402
1402
  const r = !t;
1403
1403
  return /* @__PURE__ */ p(
1404
1404
  "button",
@@ -1420,7 +1420,7 @@ function we({ onClick: e, disabled: t, children: n, type: o = "button" }) {
1420
1420
  fontSize: 16,
1421
1421
  fontWeight: 600,
1422
1422
  lineHeight: "23px",
1423
- fontFamily: j,
1423
+ fontFamily: D,
1424
1424
  cursor: r ? "pointer" : "not-allowed",
1425
1425
  transition: "background 0.15s",
1426
1426
  boxSizing: "border-box"
@@ -1435,13 +1435,13 @@ function we({ onClick: e, disabled: t, children: n, type: o = "button" }) {
1435
1435
  }
1436
1436
  );
1437
1437
  }
1438
- function Z({ label: e, gap: t = 12, labelSize: n = 16, labelStyle: o, children: r }) {
1439
- return /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", gap: t, width: "100%" }, children: [
1440
- /* @__PURE__ */ p("label", { style: { fontSize: n, fontWeight: 400, color: "var(--color-text)", fontFamily: j, lineHeight: "100%", ...o }, children: e }),
1438
+ function Q({ label: e, gap: t = 12, labelSize: n = 16, labelStyle: o, children: r }) {
1439
+ return /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", gap: t, width: "100%" }, children: [
1440
+ /* @__PURE__ */ p("label", { style: { fontSize: n, fontWeight: 400, color: "var(--color-text)", fontFamily: D, lineHeight: "100%", ...o }, children: e }),
1441
1441
  r
1442
1442
  ] });
1443
1443
  }
1444
- function gt({ show: e, onToggle: t }) {
1444
+ function kt({ show: e, onToggle: t }) {
1445
1445
  return /* @__PURE__ */ p(
1446
1446
  "button",
1447
1447
  {
@@ -1449,29 +1449,29 @@ function gt({ show: e, onToggle: t }) {
1449
1449
  tabIndex: -1,
1450
1450
  onClick: t,
1451
1451
  style: { position: "absolute", right: 14, top: "50%", transform: "translateY(-50%)", background: "none", border: "none", padding: 0, cursor: "pointer", color: "var(--color-text-secondary)", display: "flex", alignItems: "center" },
1452
- children: e ? /* @__PURE__ */ p(io, { size: 16 }) : /* @__PURE__ */ p(so, { size: 16 })
1452
+ children: e ? /* @__PURE__ */ p(vo, { size: 16 }) : /* @__PURE__ */ p(mo, { size: 16 })
1453
1453
  }
1454
1454
  );
1455
1455
  }
1456
- function Je() {
1456
+ function Pe() {
1457
1457
  return /* @__PURE__ */ p("hr", { style: { width: "100%", border: "none", borderTop: "1px solid var(--color-divider)", margin: 0 } });
1458
1458
  }
1459
- function Ue({ text: e, linkText: t, onClick: n }) {
1460
- return /* @__PURE__ */ S("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", gap: 4, width: "100%" }, children: [
1461
- /* @__PURE__ */ p("span", { style: { fontSize: 15, fontWeight: 400, lineHeight: "22px", color: "var(--color-text)", fontFamily: j }, children: e }),
1459
+ function Oe({ text: e, linkText: t, onClick: n }) {
1460
+ return /* @__PURE__ */ I("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", gap: 4, width: "100%" }, children: [
1461
+ /* @__PURE__ */ p("span", { style: { fontSize: 15, fontWeight: 400, lineHeight: "22px", color: "var(--color-text)", fontFamily: D }, children: e }),
1462
1462
  /* @__PURE__ */ p(
1463
1463
  "button",
1464
1464
  {
1465
1465
  type: "button",
1466
1466
  onClick: n,
1467
- style: { background: "none", border: "none", padding: 0, fontSize: 15, fontWeight: 600, lineHeight: "22px", color: He, cursor: "pointer", fontFamily: j, textDecoration: "underline" },
1467
+ style: { background: "none", border: "none", padding: 0, fontSize: 15, fontWeight: 600, lineHeight: "22px", color: qe, cursor: "pointer", fontFamily: D, textDecoration: "underline" },
1468
1468
  children: t
1469
1469
  }
1470
1470
  )
1471
1471
  ] });
1472
1472
  }
1473
- function ye({ onTerms: e, onPrivacyPolicy: t, paddingTop: n }) {
1474
- return /* @__PURE__ */ p("div", { style: { display: "flex", justifyContent: "center", width: "100%", ...n ? { marginTop: "auto", paddingTop: n } : {} }, children: /* @__PURE__ */ S("span", { style: { fontSize: 15, fontWeight: 400, lineHeight: "22px", color: "var(--color-text)", fontFamily: j, textAlign: "center", whiteSpace: "nowrap" }, children: [
1473
+ function ke({ onTerms: e, onPrivacyPolicy: t, paddingTop: n }) {
1474
+ return /* @__PURE__ */ p("div", { style: { display: "flex", justifyContent: "center", width: "100%", ...n ? { marginTop: "auto", paddingTop: n } : {} }, children: /* @__PURE__ */ I("span", { style: { fontSize: 15, fontWeight: 400, lineHeight: "22px", color: "var(--color-text)", fontFamily: D, textAlign: "center", whiteSpace: "nowrap" }, children: [
1475
1475
  "By continuing, you agree to our",
1476
1476
  " ",
1477
1477
  /* @__PURE__ */ p(
@@ -1480,7 +1480,7 @@ function ye({ onTerms: e, onPrivacyPolicy: t, paddingTop: n }) {
1480
1480
  href: "https://pages.chordia.ai/terms-of-use/",
1481
1481
  target: "_blank",
1482
1482
  rel: "noopener noreferrer",
1483
- style: { fontSize: 15, fontWeight: 400, color: "var(--color-text)", fontFamily: j, textDecoration: "underline", textUnderlineOffset: 2 },
1483
+ style: { fontSize: 15, fontWeight: 400, color: "var(--color-text)", fontFamily: D, textDecoration: "underline", textUnderlineOffset: 2 },
1484
1484
  children: "Terms"
1485
1485
  }
1486
1486
  ),
@@ -1493,16 +1493,16 @@ function ye({ onTerms: e, onPrivacyPolicy: t, paddingTop: n }) {
1493
1493
  href: "https://pages.chordia.ai/privacy-notice/",
1494
1494
  target: "_blank",
1495
1495
  rel: "noopener noreferrer",
1496
- style: { fontSize: 15, fontWeight: 400, color: "var(--color-text)", fontFamily: j, textDecoration: "underline", textUnderlineOffset: 2 },
1496
+ style: { fontSize: 15, fontWeight: 400, color: "var(--color-text)", fontFamily: D, textDecoration: "underline", textUnderlineOffset: 2 },
1497
1497
  children: "Privacy Policy"
1498
1498
  }
1499
1499
  ),
1500
1500
  "."
1501
1501
  ] }) });
1502
1502
  }
1503
- function ki({ projectId: e, onSuccess: t, onError: n }) {
1504
- return e ? /* @__PURE__ */ p(hi, { projectId: e, children: /* @__PURE__ */ p(
1505
- yi,
1503
+ function Ei({ projectId: e, onSuccess: t, onError: n }) {
1504
+ return e ? /* @__PURE__ */ p(Si, { projectId: e, children: /* @__PURE__ */ p(
1505
+ Ti,
1506
1506
  {
1507
1507
  flowId: "sign-up-or-in-otp-or-social",
1508
1508
  onSuccess: t,
@@ -1510,54 +1510,75 @@ function ki({ projectId: e, onSuccess: t, onError: n }) {
1510
1510
  }
1511
1511
  ) }) : null;
1512
1512
  }
1513
- function Ri({
1513
+ function Hi({
1514
1514
  onLogin: e,
1515
1515
  onForgotPassword: t,
1516
1516
  onOneTimeCode: n,
1517
1517
  onVerifyCode: o,
1518
1518
  onResendCode: r,
1519
1519
  onSignUp: i,
1520
- onResetPassword: s,
1520
+ onResetPassword: a,
1521
1521
  onTerms: l,
1522
- onPrivacyPolicy: a,
1522
+ onPrivacyPolicy: s,
1523
1523
  onDescopeSuccess: c,
1524
1524
  onDescopeError: d,
1525
1525
  descopeProjectId: u,
1526
1526
  onGoToLogin: g,
1527
- loading: w,
1528
- error: h,
1529
- defaultView: f = "signin"
1527
+ loading: y,
1528
+ error: f,
1529
+ codeError: h,
1530
+ defaultView: b = "signin"
1530
1531
  }) {
1531
- const [y, O] = T(""), [x, A] = T(""), [E, L] = T(!1), [N, q] = T(!1), [H, B] = T(null), [F, C] = T(f), [J, V] = T(""), [Y, P] = T(""), [M, te] = T(["", "", "", ""]), ie = je([]), [se, ve] = T(""), [pe, G] = T(""), [I, Ze] = T(""), [_e, Wn] = T(""), [qt, Yn] = T(""), [et, $n] = T(!1), [tt, Qn] = T(!1), [nt, Xn] = T(""), [Ft, Bt] = T(0), Jt = 3;
1532
- fe(() => {
1533
- const b = setInterval(() => Bt((R) => (R + 1) % Jt), 4e3);
1534
- return () => clearInterval(b);
1532
+ const [S, x] = j(""), [O, R] = j(""), [F, J] = j(!1), [z, V] = j(!1), [H, M] = j(null), [U, N] = j(b), [q, Z] = j(""), [L, se] = j(""), [re, ye] = j(""), [$, ue] = j(["", "", "", "", "", ""]), pe = xe([]), [X, C] = j(""), [je, eo] = j(""), [Ke, to] = j(""), [it, no] = j(""), [Mt, oo] = j(""), [at, ro] = j(!1), [st, io] = j(!1), [lt, ao] = j(""), [Wt, Yt] = j(0), $t = 3;
1533
+ ce(() => {
1534
+ const w = setInterval(() => Yt((T) => (T + 1) % $t), 4e3);
1535
+ return () => clearInterval(w);
1535
1536
  }, []);
1536
- const Kt = w ?? N, ge = h ?? H, Ht = y && x && !Kt, zt = (b) => {
1537
- b.target.style.borderColor = ge ? "var(--color-text)" : "var(--color-green)", b.target.style.boxShadow = ge ? "none" : "0 0 0 3px var(--color-green-ring)";
1538
- }, Vt = (b) => {
1539
- b.target.style.borderColor = ge ? "var(--color-text)" : "var(--color-input-border)", b.target.style.boxShadow = "none";
1540
- }, Gn = (b, R) => {
1541
- var Mt;
1542
- const W = R.replace(/\D/g, "").slice(-1), Re = [...M];
1543
- Re[b] = W, te(Re), W && b < 3 && ((Mt = ie.current[b + 1]) == null || Mt.focus());
1544
- }, Zn = (b, R) => {
1545
- var W;
1546
- R.key === "Backspace" && !M[b] && b > 0 && ((W = ie.current[b - 1]) == null || W.focus());
1547
- }, _n = async (b) => {
1548
- if (b.preventDefault(), !!Ht) {
1549
- B(null), q(!0);
1537
+ const ze = xe(null), He = xe(null), [so, lo] = j(!1);
1538
+ ce(() => {
1539
+ const w = () => {
1540
+ const he = ze.current, dt = He.current;
1541
+ he && he.value && x(he.value), dt && dt.value && R(dt.value);
1542
+ }, T = [100, 300, 600, 1e3, 2e3].map((he) => setTimeout(w, he)), E = (he) => {
1543
+ (he.animationName === "onAutoFillStart" || he.target.matches(":-webkit-autofill")) && (lo(!0), setTimeout(w, 50));
1544
+ }, B = ze.current, K = He.current;
1545
+ B == null || B.addEventListener("animationstart", E), K == null || K.addEventListener("animationstart", E);
1546
+ const ge = () => setTimeout(w, 0);
1547
+ return B == null || B.addEventListener("input", ge), K == null || K.addEventListener("input", ge), () => {
1548
+ T.forEach(clearTimeout), B == null || B.removeEventListener("animationstart", E), K == null || K.removeEventListener("animationstart", E), B == null || B.removeEventListener("input", ge), K == null || K.removeEventListener("input", ge);
1549
+ };
1550
+ }, []), ce(() => {
1551
+ h && U === "verifycode" && (ue(["", "", "", "", "", ""]), N("getcodewithname"));
1552
+ }, [h]);
1553
+ const ct = y ?? z, we = f ?? H, Qt = S && O && !ct || so && !ct, Xt = (w) => {
1554
+ w.target.style.borderColor = we ? "var(--color-text)" : "var(--color-green)", w.target.style.boxShadow = we ? "none" : "0 0 0 3px var(--color-green-ring)";
1555
+ }, Gt = (w) => {
1556
+ w.target.style.borderColor = we ? "var(--color-text)" : "var(--color-input-border)", w.target.style.boxShadow = "none";
1557
+ }, Zt = (w, T) => {
1558
+ var K;
1559
+ const E = T.replace(/\D/g, "").slice(-1), B = [...$];
1560
+ B[w] = E, ue(B), E && w < 5 && ((K = pe.current[w + 1]) == null || K.focus());
1561
+ }, _t = (w, T) => {
1562
+ var E;
1563
+ T.key === "Backspace" && !$[w] && w > 0 && ((E = pe.current[w - 1]) == null || E.focus());
1564
+ }, co = async (w) => {
1565
+ var B, K;
1566
+ if (w.preventDefault(), !Qt)
1567
+ return;
1568
+ const T = S || ((B = ze.current) == null ? void 0 : B.value) || "", E = O || ((K = He.current) == null ? void 0 : K.value) || "";
1569
+ if (!(!T || !E)) {
1570
+ M(null), V(!0);
1550
1571
  try {
1551
- await (e == null ? void 0 : e(y, x));
1552
- } catch (R) {
1553
- B((R == null ? void 0 : R.message) || "Something went wrong. Please try again.");
1572
+ await (e == null ? void 0 : e(T, E));
1573
+ } catch (ge) {
1574
+ M((ge == null ? void 0 : ge.message) || "Something went wrong. Please try again.");
1554
1575
  } finally {
1555
- q(!1);
1576
+ V(!1);
1556
1577
  }
1557
1578
  }
1558
1579
  };
1559
- return /* @__PURE__ */ S("div", { style: { position: "fixed", inset: 0, display: "flex", overflow: "hidden", fontFamily: j, background: "white" }, children: [
1560
- /* @__PURE__ */ S("div", { style: {
1580
+ return /* @__PURE__ */ I("div", { style: { position: "fixed", inset: 0, display: "flex", overflow: "hidden", fontFamily: D, background: "white" }, children: [
1581
+ /* @__PURE__ */ I("div", { style: {
1561
1582
  flex: "0 0 628px",
1562
1583
  width: 628,
1563
1584
  minHeight: 0,
@@ -1568,16 +1589,16 @@ function Ri({
1568
1589
  position: "relative",
1569
1590
  overflow: "hidden"
1570
1591
  }, children: [
1571
- /* @__PURE__ */ p("img", { src: bi, alt: "Chordia", style: {
1592
+ /* @__PURE__ */ p("img", { src: ji, alt: "Chordia", style: {
1572
1593
  width: 175,
1573
1594
  height: 48,
1574
1595
  objectFit: "contain",
1575
1596
  marginBottom: 100,
1576
1597
  flexShrink: 0
1577
1598
  } }),
1578
- /* @__PURE__ */ S("div", { style: { flex: 1, display: "flex", flexDirection: "column", justifyContent: "flex-start", gap: 22 }, children: [
1599
+ /* @__PURE__ */ I("div", { style: { flex: 1, display: "flex", flexDirection: "column", justifyContent: "flex-start", gap: 22 }, children: [
1579
1600
  /* @__PURE__ */ p("h1", { style: {
1580
- fontFamily: j,
1601
+ fontFamily: D,
1581
1602
  fontSize: "clamp(28px, 2.8vw, 28px)",
1582
1603
  fontWeight: 800,
1583
1604
  color: "var(--color-text-inverse)",
@@ -1586,30 +1607,30 @@ function Ri({
1586
1607
  letterSpacing: "-0.02em",
1587
1608
  paddingRight: 48
1588
1609
  }, children: "Three Solutions. One Platform." }),
1589
- /* @__PURE__ */ S("div", { style: { position: "relative", width: 412, height: 320, overflow: "hidden", WebkitMaskImage: "-webkit-radial-gradient(white, black)" }, children: [
1610
+ /* @__PURE__ */ I("div", { style: { position: "relative", width: 412, height: 320, overflow: "hidden", WebkitMaskImage: "-webkit-radial-gradient(white, black)" }, children: [
1590
1611
  /* @__PURE__ */ p("div", { style: {
1591
1612
  display: "flex",
1592
1613
  gap: 16,
1593
1614
  height: "100%",
1594
- transform: `translateX(${-Ft * 280}px)`,
1615
+ transform: `translateX(${-Wt * 280}px)`,
1595
1616
  transition: "transform 0.5s cubic-bezier(0.4, 0, 0.2, 1)"
1596
1617
  }, children: [
1597
1618
  {
1598
- Icon: no,
1619
+ Icon: go,
1599
1620
  title: "Evaluation Quality Monitoring",
1600
1621
  info: "Stop sampling 2% of calls and hoping for the best. Chordia analyzes every conversation for quality, compliance, and coaching signals — with evidence, not opinions."
1601
1622
  },
1602
1623
  {
1603
- Icon: oo,
1624
+ Icon: ho,
1604
1625
  title: "Compliance Monitoring",
1605
1626
  info: "Continuously monitor customer service conversations for missed disclosures, risky language, and compliance gaps."
1606
1627
  },
1607
1628
  {
1608
- Icon: ro,
1629
+ Icon: fo,
1609
1630
  title: "Signal Intelligence",
1610
1631
  info: "Identify emerging themes, sentiment shifts, and customer issues hidden inside everyday service conversations."
1611
1632
  }
1612
- ].map(({ Icon: b, title: R, info: W }, Re) => /* @__PURE__ */ S("div", { style: {
1633
+ ].map(({ Icon: w, title: T, info: E }, B) => /* @__PURE__ */ I("div", { style: {
1613
1634
  flexShrink: 0,
1614
1635
  width: 264,
1615
1636
  height: 320,
@@ -1623,26 +1644,26 @@ function Ri({
1623
1644
  border: "1px solid var(--surface-card-dark-border)",
1624
1645
  background: "var(--surface-card-dark)"
1625
1646
  }, children: [
1626
- /* @__PURE__ */ p(b, { width: 36, height: 36, color: "var(--color-card-icon)", strokeWidth: 2.5 }),
1627
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
1647
+ /* @__PURE__ */ p(w, { width: 36, height: 36, color: "var(--color-card-icon)", strokeWidth: 2.5 }),
1648
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
1628
1649
  /* @__PURE__ */ p("span", { style: {
1629
- fontFamily: j,
1650
+ fontFamily: D,
1630
1651
  fontSize: 24,
1631
1652
  fontStyle: "normal",
1632
1653
  fontWeight: 600,
1633
1654
  lineHeight: "28px",
1634
1655
  color: "var(--color-card-text)"
1635
- }, children: R }),
1656
+ }, children: T }),
1636
1657
  /* @__PURE__ */ p("span", { style: {
1637
- fontFamily: j,
1658
+ fontFamily: D,
1638
1659
  fontSize: 12,
1639
1660
  fontStyle: "normal",
1640
1661
  fontWeight: 400,
1641
1662
  lineHeight: "normal",
1642
1663
  color: "rgba(255,255,255,0.65)"
1643
- }, children: W })
1664
+ }, children: E })
1644
1665
  ] })
1645
- ] }, Re)) }),
1666
+ ] }, B)) }),
1646
1667
  /* @__PURE__ */ p("div", { style: {
1647
1668
  position: "absolute",
1648
1669
  top: 0,
@@ -1653,10 +1674,10 @@ function Ri({
1653
1674
  pointerEvents: "none"
1654
1675
  } })
1655
1676
  ] }),
1656
- /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: 8, height: 4, marginTop: 16, alignSelf: "flex-start", marginLeft: 22 }, children: Array.from({ length: Jt }).map((b, R) => /* @__PURE__ */ p(
1677
+ /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", gap: 8, height: 4, marginTop: 16, alignSelf: "flex-start", marginLeft: 22 }, children: Array.from({ length: $t }).map((w, T) => /* @__PURE__ */ p(
1657
1678
  "button",
1658
1679
  {
1659
- onClick: () => Bt(R),
1680
+ onClick: () => Yt(T),
1660
1681
  style: {
1661
1682
  width: 80,
1662
1683
  height: 4,
@@ -1664,11 +1685,11 @@ function Ri({
1664
1685
  border: "none",
1665
1686
  padding: 0,
1666
1687
  cursor: "pointer",
1667
- background: R === Ft ? "rgba(255,255,255,0.7)" : "rgba(255,255,255,0.25)",
1688
+ background: T === Wt ? "rgba(255,255,255,0.7)" : "rgba(255,255,255,0.25)",
1668
1689
  transition: "background 0.3s ease"
1669
1690
  }
1670
1691
  },
1671
- R
1692
+ T
1672
1693
  )) })
1673
1694
  ] })
1674
1695
  ] }),
@@ -1684,284 +1705,363 @@ function Ri({
1684
1705
  background: "white",
1685
1706
  overflowY: "auto",
1686
1707
  minHeight: 0
1687
- }, children: /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start", width: "100%", maxWidth: 360, gap: 28 }, children: F === "signup" ? (
1708
+ }, children: /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start", width: "100%", maxWidth: 360, gap: 28 }, children: U === "signup" ? (
1688
1709
  /* ── Sign Up ── */
1689
- /* @__PURE__ */ S(xe, { children: [
1690
- /* @__PURE__ */ p(Be, { title: "Sign Up", subtitle: "Please enter your basic details to continue" }),
1691
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 16 }, children: [
1692
- /* @__PURE__ */ S("div", { style: { display: "flex", gap: 16, width: "100%" }, children: [
1693
- /* @__PURE__ */ p(Z, { label: "First Name", gap: 8, children: /* @__PURE__ */ p(
1710
+ /* @__PURE__ */ I(Se, { children: [
1711
+ /* @__PURE__ */ p(Ne, { title: "Sign Up", subtitle: "Please enter your basic details to continue" }),
1712
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 16 }, children: [
1713
+ /* @__PURE__ */ I("div", { style: { display: "flex", gap: 16, width: "100%" }, children: [
1714
+ /* @__PURE__ */ p(Q, { label: "First Name", gap: 8, children: /* @__PURE__ */ p(
1694
1715
  "input",
1695
1716
  {
1696
1717
  type: "text",
1697
- value: se,
1698
- onChange: (b) => ve(b.target.value),
1718
+ value: X,
1719
+ onChange: (w) => C(w.target.value),
1699
1720
  placeholder: "First name",
1700
1721
  autoFocus: !0,
1701
1722
  autoComplete: "given-name",
1702
- style: ne,
1703
- onFocus: ae,
1704
- onBlur: le
1723
+ style: _,
1724
+ onFocus: ee,
1725
+ onBlur: te
1705
1726
  }
1706
1727
  ) }),
1707
- /* @__PURE__ */ p(Z, { label: "Last Name", gap: 8, children: /* @__PURE__ */ p(
1728
+ /* @__PURE__ */ p(Q, { label: "Last Name", gap: 8, children: /* @__PURE__ */ p(
1708
1729
  "input",
1709
1730
  {
1710
1731
  type: "text",
1711
- value: pe,
1712
- onChange: (b) => G(b.target.value),
1732
+ value: je,
1733
+ onChange: (w) => eo(w.target.value),
1713
1734
  placeholder: "Last name",
1714
1735
  autoComplete: "family-name",
1715
- style: ne,
1716
- onFocus: ae,
1717
- onBlur: le
1736
+ style: _,
1737
+ onFocus: ee,
1738
+ onBlur: te
1718
1739
  }
1719
1740
  ) })
1720
1741
  ] }),
1721
- /* @__PURE__ */ p(Z, { label: "Email", gap: 8, children: /* @__PURE__ */ p(
1742
+ /* @__PURE__ */ p(Q, { label: "Email", gap: 8, children: /* @__PURE__ */ p(
1722
1743
  "input",
1723
1744
  {
1724
1745
  type: "email",
1725
- value: I,
1726
- onChange: (b) => Ze(b.target.value),
1746
+ value: Ke,
1747
+ onChange: (w) => to(w.target.value),
1727
1748
  placeholder: "workemail@example.com",
1728
1749
  autoComplete: "email",
1729
- style: ne,
1730
- onFocus: ae,
1731
- onBlur: le
1750
+ style: _,
1751
+ onFocus: ee,
1752
+ onBlur: te
1732
1753
  }
1733
1754
  ) }),
1734
- /* @__PURE__ */ p(Z, { label: "Create Password", gap: 8, children: /* @__PURE__ */ S("div", { style: { position: "relative" }, children: [
1755
+ /* @__PURE__ */ p(Q, { label: "Create Password", gap: 8, children: /* @__PURE__ */ I("div", { style: { position: "relative" }, children: [
1735
1756
  /* @__PURE__ */ p(
1736
1757
  "input",
1737
1758
  {
1738
- type: et ? "text" : "password",
1739
- value: _e,
1740
- onChange: (b) => Wn(b.target.value),
1759
+ type: at ? "text" : "password",
1760
+ value: it,
1761
+ onChange: (w) => no(w.target.value),
1741
1762
  placeholder: "Enter password",
1742
1763
  autoComplete: "new-password",
1743
- style: { ...ne, padding: "10px 44px 10px 14px" },
1744
- onFocus: ae,
1745
- onBlur: le
1764
+ style: { ..._, padding: "10px 44px 10px 14px" },
1765
+ onFocus: ee,
1766
+ onBlur: te
1746
1767
  }
1747
1768
  ),
1748
- /* @__PURE__ */ p(gt, { show: et, onToggle: () => $n(!et) })
1769
+ /* @__PURE__ */ p(kt, { show: at, onToggle: () => ro(!at) })
1749
1770
  ] }) }),
1750
- /* @__PURE__ */ p(Z, { label: "Confirm Password", gap: 8, children: /* @__PURE__ */ S("div", { style: { position: "relative" }, children: [
1771
+ /* @__PURE__ */ p(Q, { label: "Confirm Password", gap: 8, children: /* @__PURE__ */ I("div", { style: { position: "relative" }, children: [
1751
1772
  /* @__PURE__ */ p(
1752
1773
  "input",
1753
1774
  {
1754
- type: tt ? "text" : "password",
1755
- value: qt,
1756
- onChange: (b) => Yn(b.target.value),
1775
+ type: st ? "text" : "password",
1776
+ value: Mt,
1777
+ onChange: (w) => oo(w.target.value),
1757
1778
  placeholder: "Enter password",
1758
1779
  autoComplete: "new-password",
1759
- style: { ...ne, padding: "10px 44px 10px 14px" },
1760
- onFocus: ae,
1761
- onBlur: le
1780
+ style: { ..._, padding: "10px 44px 10px 14px" },
1781
+ onFocus: ee,
1782
+ onBlur: te
1762
1783
  }
1763
1784
  ),
1764
- /* @__PURE__ */ p(gt, { show: tt, onToggle: () => Qn(!tt) })
1785
+ /* @__PURE__ */ p(kt, { show: st, onToggle: () => io(!st) })
1765
1786
  ] }) }),
1766
- (() => /* @__PURE__ */ p(we, { onClick: () => {
1767
- i == null || i({ firstName: se, lastName: pe, email: I, password: _e }), C("verifyemail");
1768
- }, disabled: !(se && pe && I && _e && qt), children: "Create Account" }))(),
1769
- /* @__PURE__ */ p(Ue, { text: "I am already a member", linkText: "Sign In", onClick: () => {
1770
- C("signin"), g == null || g();
1787
+ (() => /* @__PURE__ */ p(be, { onClick: () => {
1788
+ i == null || i({ firstName: X, lastName: je, email: Ke, password: it }), N("verifyemail");
1789
+ }, disabled: !(X && je && Ke && it && Mt), children: "Create Account" }))(),
1790
+ /* @__PURE__ */ p(Oe, { text: "I am already a member", linkText: "Sign In", onClick: () => {
1791
+ N("signin"), g == null || g();
1771
1792
  } }),
1772
- /* @__PURE__ */ p(ye, { onTerms: l, onPrivacyPolicy: a })
1793
+ /* @__PURE__ */ p(ke, { onTerms: l, onPrivacyPolicy: s })
1773
1794
  ] })
1774
1795
  ] })
1775
- ) : F === "verifyemail" ? (
1796
+ ) : U === "verifyemail" ? (
1776
1797
  /* ── Verify Email ── */
1777
- /* @__PURE__ */ S(xe, { children: [
1778
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", gap: 16 }, children: [
1779
- /* @__PURE__ */ p("h2", { style: { fontFamily: j, fontWeight: 600, fontSize: "36px", lineHeight: "52px", color: "var(--color-text)", margin: 0 }, children: "Verify Email" }),
1780
- /* @__PURE__ */ p("p", { style: { fontFamily: j, fontSize: 18, fontWeight: 400, lineHeight: "26px", color: "var(--color-text-secondary)", margin: 0 }, children: "Verify your email to continue the signup process." })
1798
+ /* @__PURE__ */ I(Se, { children: [
1799
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", gap: 16 }, children: [
1800
+ /* @__PURE__ */ p("h2", { style: { fontFamily: D, fontWeight: 600, fontSize: "36px", lineHeight: "52px", color: "var(--color-text)", margin: 0 }, children: "Verify Email" }),
1801
+ /* @__PURE__ */ p("p", { style: { fontFamily: D, fontSize: 18, fontWeight: 400, lineHeight: "26px", color: "var(--color-text-secondary)", margin: 0 }, children: "Verify your email to continue the signup process." })
1781
1802
  ] }),
1782
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 24 }, children: [
1783
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
1784
- /* @__PURE__ */ p("p", { style: { fontFamily: j, fontSize: 18, fontWeight: 400, lineHeight: "24px", color: "var(--color-text-secondary)", margin: 0 }, children: "We have sent a verification link to:" }),
1785
- /* @__PURE__ */ p("p", { style: { fontFamily: j, fontSize: 18, fontWeight: 600, lineHeight: "24px", color: "var(--color-text)", margin: 0 }, children: I || "youremail@workemail.com" })
1803
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 24 }, children: [
1804
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
1805
+ /* @__PURE__ */ p("p", { style: { fontFamily: D, fontSize: 18, fontWeight: 400, lineHeight: "24px", color: "var(--color-text-secondary)", margin: 0 }, children: "We have sent a verification link to:" }),
1806
+ /* @__PURE__ */ p("p", { style: { fontFamily: D, fontSize: 18, fontWeight: 600, lineHeight: "24px", color: "var(--color-text)", margin: 0 }, children: Ke || "youremail@workemail.com" })
1786
1807
  ] }),
1787
- /* @__PURE__ */ p("p", { style: { fontFamily: j, fontSize: 18, fontWeight: 400, lineHeight: "24px", color: "var(--color-text-secondary)", margin: 0 }, children: "Click on the link to complete the verification process. You might need to check your Spam folder" }),
1788
- /* @__PURE__ */ p(we, { onClick: () => {
1789
- C("signin"), g == null || g();
1808
+ /* @__PURE__ */ p("p", { style: { fontFamily: D, fontSize: 18, fontWeight: 400, lineHeight: "24px", color: "var(--color-text-secondary)", margin: 0 }, children: "Click on the link to complete the verification process. You might need to check your Spam folder" }),
1809
+ /* @__PURE__ */ p(be, { onClick: () => {
1810
+ N("signin"), g == null || g();
1790
1811
  }, children: "Go To Login" })
1791
1812
  ] }),
1792
- /* @__PURE__ */ p(ye, { onTerms: l, onPrivacyPolicy: a, paddingTop: 40 })
1813
+ /* @__PURE__ */ p(ke, { onTerms: l, onPrivacyPolicy: s, paddingTop: 40 })
1793
1814
  ] })
1794
- ) : F === "verifycode" ? (
1815
+ ) : U === "verifycode" ? (
1795
1816
  /* ── Verify Code ── */
1796
- /* @__PURE__ */ S(xe, { children: [
1797
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
1798
- /* @__PURE__ */ p("h2", { style: { fontFamily: j, fontWeight: 600, fontSize: "36px", lineHeight: "52px", color: "var(--color-text)", margin: 0 }, children: "Sign In with code" }),
1799
- /* @__PURE__ */ S("p", { style: { fontFamily: j, fontSize: 18, fontWeight: 400, lineHeight: "26px", color: "var(--color-text-secondary)", margin: 0 }, children: [
1817
+ /* @__PURE__ */ I(Se, { children: [
1818
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
1819
+ /* @__PURE__ */ p("h2", { style: { fontFamily: D, fontWeight: 600, fontSize: "36px", lineHeight: "52px", color: "var(--color-text)", margin: 0 }, children: "Sign In with code" }),
1820
+ /* @__PURE__ */ I("p", { style: { fontFamily: D, fontSize: 18, fontWeight: 400, lineHeight: "26px", color: "var(--color-text-secondary)", margin: 0 }, children: [
1800
1821
  "We have sent a one-time code to your email:",
1801
1822
  " ",
1802
- /* @__PURE__ */ p("span", { style: { color: "var(--color-text)" }, children: Y || "workemail@example.com" }),
1823
+ /* @__PURE__ */ p("span", { style: { color: "var(--color-text)" }, children: re || "workemail@example.com" }),
1803
1824
  " ",
1804
1825
  /* @__PURE__ */ p(
1805
1826
  "button",
1806
1827
  {
1807
1828
  type: "button",
1808
- onClick: () => C("getcode"),
1809
- style: { background: "none", border: "none", padding: 0, fontSize: 18, fontWeight: 400, color: He, cursor: "pointer", fontFamily: j, textDecoration: "underline" },
1829
+ onClick: () => N("getcode"),
1830
+ style: { background: "none", border: "none", padding: 0, fontSize: 18, fontWeight: 400, color: qe, cursor: "pointer", fontFamily: D, textDecoration: "underline" },
1810
1831
  children: "Change email"
1811
1832
  }
1812
1833
  )
1813
1834
  ] })
1814
1835
  ] }),
1815
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 16 }, children: [
1816
- /* @__PURE__ */ p(Z, { label: "Enter one-time code", gap: 12, children: /* @__PURE__ */ p("div", { style: { display: "flex", gap: 12 }, children: M.map((b, R) => /* @__PURE__ */ p(
1836
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 16 }, children: [
1837
+ /* @__PURE__ */ p(Q, { label: "Enter one-time code", gap: 12, children: /* @__PURE__ */ p("div", { style: { display: "flex", gap: 8 }, children: $.map((w, T) => /* @__PURE__ */ p(
1817
1838
  "input",
1818
1839
  {
1819
- ref: (W) => {
1820
- ie.current[R] = W;
1840
+ ref: (E) => {
1841
+ pe.current[T] = E;
1821
1842
  },
1822
1843
  type: "text",
1823
1844
  inputMode: "numeric",
1824
1845
  maxLength: 1,
1825
- value: b,
1826
- onChange: (W) => Gn(R, W.target.value),
1827
- onKeyDown: (W) => Zn(R, W),
1828
- autoFocus: R === 0,
1846
+ value: w,
1847
+ onChange: (E) => Zt(T, E.target.value),
1848
+ onKeyDown: (E) => _t(T, E),
1849
+ autoFocus: T === 0,
1829
1850
  style: {
1830
- width: 72,
1831
- height: 72,
1851
+ flex: 1,
1852
+ minWidth: 0,
1853
+ height: 40,
1832
1854
  textAlign: "center",
1833
- fontSize: 24,
1855
+ fontSize: 16,
1834
1856
  fontWeight: 600,
1835
- fontFamily: j,
1857
+ fontFamily: D,
1836
1858
  color: "var(--color-text)",
1837
1859
  border: "1px solid var(--color-input-border)",
1838
- borderRadius: 8,
1860
+ borderRadius: 4,
1839
1861
  outline: "none",
1840
1862
  background: "white",
1841
1863
  boxSizing: "border-box",
1842
1864
  transition: "border-color 0.15s, box-shadow 0.15s",
1843
- caretColor: He
1865
+ caretColor: qe
1844
1866
  },
1845
- onFocus: ae,
1846
- onBlur: le
1867
+ onFocus: ee,
1868
+ onBlur: te
1847
1869
  },
1848
- R
1870
+ T
1849
1871
  )) }) }),
1850
- /* @__PURE__ */ p(we, { onClick: () => o == null ? void 0 : o(Y, M.join("")), disabled: M.some((b) => !b), children: "Verify Code" }),
1851
- /* @__PURE__ */ p(Je, {}),
1852
- /* @__PURE__ */ p(Ue, { text: "Not received yet?", linkText: "Resend", onClick: () => r == null ? void 0 : r(Y) }),
1853
- /* @__PURE__ */ p(ye, { onTerms: l, onPrivacyPolicy: a, paddingTop: 40 })
1872
+ /* @__PURE__ */ p(be, { onClick: () => o == null ? void 0 : o(re, $.join("")), disabled: $.some((w) => !w), children: "Verify Code" }),
1873
+ /* @__PURE__ */ p(Pe, {}),
1874
+ /* @__PURE__ */ p(Oe, { text: "Not received yet?", linkText: "Resend", onClick: () => r == null ? void 0 : r(re) }),
1875
+ /* @__PURE__ */ p(ke, { onTerms: l, onPrivacyPolicy: s, paddingTop: 40 })
1854
1876
  ] })
1855
1877
  ] })
1856
- ) : F === "getcode" ? (
1857
- /* ── Get Code ── */
1858
- /* @__PURE__ */ S(xe, { children: [
1859
- /* @__PURE__ */ p(Be, { title: "Get code", subtitle: "We'll send a one time pass-code to your email" }),
1860
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 16 }, children: [
1861
- /* @__PURE__ */ p(Z, { label: "Email", gap: 12, children: /* @__PURE__ */ p(
1878
+ ) : U === "getcode" ? (
1879
+ /* ── Get Code (original — email only) ── */
1880
+ /* @__PURE__ */ I(Se, { children: [
1881
+ /* @__PURE__ */ p(Ne, { title: "Get code", subtitle: "We'll send a one time pass-code to your email" }),
1882
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 16 }, children: [
1883
+ /* @__PURE__ */ p(Q, { label: "Email", gap: 12, children: /* @__PURE__ */ p(
1862
1884
  "input",
1863
1885
  {
1864
1886
  type: "email",
1865
- value: J,
1866
- onChange: (b) => V(b.target.value),
1887
+ value: q,
1888
+ onChange: (w) => Z(w.target.value),
1867
1889
  placeholder: "workemail@example.com",
1868
1890
  autoFocus: !0,
1869
1891
  autoComplete: "email",
1870
- style: ne,
1871
- onFocus: ae,
1872
- onBlur: le
1892
+ style: _,
1893
+ onFocus: ee,
1894
+ onBlur: te
1895
+ }
1896
+ ) }),
1897
+ /* @__PURE__ */ p(be, { onClick: () => {
1898
+ ye(q), ue(["", "", "", "", "", ""]), N("verifycode"), n == null || n(q);
1899
+ }, disabled: !q, children: "Send One-time Code" }),
1900
+ /* @__PURE__ */ p(Pe, {}),
1901
+ /* @__PURE__ */ p(Oe, { text: "I have my password", linkText: "Back to Sign in", onClick: () => {
1902
+ N("signin"), g == null || g();
1903
+ } }),
1904
+ /* @__PURE__ */ p(ke, { onTerms: l, onPrivacyPolicy: s, paddingTop: 40 })
1905
+ ] })
1906
+ ] })
1907
+ ) : U === "getcodewithname" ? (
1908
+ /* ── Get Code with Full Name (unregistered email) ── */
1909
+ /* @__PURE__ */ I(Se, { children: [
1910
+ /* @__PURE__ */ p(Ne, { title: "Complete your sign in", subtitle: "We’ve sent a one-time code to your email. Please enter the code and your full name to sign in" }),
1911
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 16 }, children: [
1912
+ /* @__PURE__ */ p(Q, { label: "Email", gap: 12, children: /* @__PURE__ */ p(
1913
+ "input",
1914
+ {
1915
+ type: "email",
1916
+ value: q,
1917
+ onChange: (w) => Z(w.target.value),
1918
+ placeholder: "workemail@example.com",
1919
+ autoComplete: "email",
1920
+ style: _,
1921
+ onFocus: ee,
1922
+ onBlur: te
1923
+ }
1924
+ ) }),
1925
+ /* @__PURE__ */ p(Q, { label: "Full Name", gap: 12, children: /* @__PURE__ */ p(
1926
+ "input",
1927
+ {
1928
+ type: "text",
1929
+ value: L,
1930
+ onChange: (w) => se(w.target.value),
1931
+ placeholder: "Enter your full name",
1932
+ autoComplete: "name",
1933
+ style: _,
1934
+ onFocus: ee,
1935
+ onBlur: te
1873
1936
  }
1874
1937
  ) }),
1875
- /* @__PURE__ */ p(we, { onClick: () => {
1876
- P(J), te(["", "", "", ""]), C("verifycode"), n == null || n(J);
1877
- }, disabled: !J, children: "Send One-time Code" }),
1878
- /* @__PURE__ */ p(Je, {}),
1879
- /* @__PURE__ */ p(Ue, { text: "I have my password", linkText: "Back to Sign in", onClick: () => {
1880
- C("signin"), g == null || g();
1938
+ /* @__PURE__ */ p(Q, { label: "Enter one-time code", gap: 12, children: /* @__PURE__ */ p("div", { style: { display: "flex", gap: 8 }, children: $.map((w, T) => /* @__PURE__ */ p(
1939
+ "input",
1940
+ {
1941
+ ref: (E) => {
1942
+ pe.current[T] = E;
1943
+ },
1944
+ type: "text",
1945
+ inputMode: "numeric",
1946
+ maxLength: 1,
1947
+ value: w,
1948
+ onChange: (E) => Zt(T, E.target.value),
1949
+ onKeyDown: (E) => _t(T, E),
1950
+ autoFocus: T === 0,
1951
+ style: {
1952
+ flex: 1,
1953
+ minWidth: 0,
1954
+ height: 40,
1955
+ textAlign: "center",
1956
+ fontSize: 16,
1957
+ fontWeight: 600,
1958
+ fontFamily: D,
1959
+ color: "var(--color-text)",
1960
+ border: "1px solid var(--color-input-border)",
1961
+ borderRadius: 4,
1962
+ outline: "none",
1963
+ background: "white",
1964
+ boxSizing: "border-box",
1965
+ transition: "border-color 0.15s, box-shadow 0.15s",
1966
+ caretColor: qe
1967
+ },
1968
+ onFocus: ee,
1969
+ onBlur: te
1970
+ },
1971
+ T
1972
+ )) }) }),
1973
+ /* @__PURE__ */ p(be, { onClick: () => {
1974
+ ye(q), n == null || n(q, L, $.join(""));
1975
+ }, disabled: !q || !L || $.some((w) => !w), children: "Verify & Sign In" }),
1976
+ /* @__PURE__ */ p(Pe, {}),
1977
+ /* @__PURE__ */ p(Oe, { text: "I have my password", linkText: "Back to Sign in", onClick: () => {
1978
+ N("signin"), g == null || g();
1881
1979
  } }),
1882
- /* @__PURE__ */ p(ye, { onTerms: l, onPrivacyPolicy: a, paddingTop: 40 })
1980
+ /* @__PURE__ */ p(ke, { onTerms: l, onPrivacyPolicy: s, paddingTop: 40 })
1883
1981
  ] })
1884
1982
  ] })
1885
- ) : F === "resetpassword" ? (
1983
+ ) : U === "resetpassword" ? (
1886
1984
  /* ── Reset Password ── */
1887
- /* @__PURE__ */ S(xe, { children: [
1888
- /* @__PURE__ */ p(Be, { title: "Reset Password", subtitle: "We'll send an email to reset your password" }),
1889
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 16 }, children: [
1890
- /* @__PURE__ */ p(Z, { label: "Email", gap: 12, children: /* @__PURE__ */ p(
1985
+ /* @__PURE__ */ I(Se, { children: [
1986
+ /* @__PURE__ */ p(Ne, { title: "Reset Password", subtitle: "We'll send an email to reset your password" }),
1987
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 16 }, children: [
1988
+ /* @__PURE__ */ p(Q, { label: "Email", gap: 12, children: /* @__PURE__ */ p(
1891
1989
  "input",
1892
1990
  {
1893
1991
  type: "email",
1894
- value: nt,
1895
- onChange: (b) => Xn(b.target.value),
1992
+ value: lt,
1993
+ onChange: (w) => ao(w.target.value),
1896
1994
  placeholder: "workemail@example.com",
1897
1995
  autoFocus: !0,
1898
1996
  autoComplete: "email",
1899
- style: ne,
1900
- onFocus: ae,
1901
- onBlur: le
1997
+ style: _,
1998
+ onFocus: ee,
1999
+ onBlur: te
1902
2000
  }
1903
2001
  ) }),
1904
- /* @__PURE__ */ p(we, { onClick: () => s == null ? void 0 : s(nt), disabled: !nt, children: "Send Reset Link" }),
1905
- /* @__PURE__ */ p(Je, {}),
1906
- /* @__PURE__ */ p(Ue, { text: "I have my password", linkText: "Back to Sign in", onClick: () => {
1907
- C("signin"), g == null || g();
2002
+ /* @__PURE__ */ p(be, { onClick: () => a == null ? void 0 : a(lt), disabled: !lt, children: "Send Reset Link" }),
2003
+ /* @__PURE__ */ p(Pe, {}),
2004
+ /* @__PURE__ */ p(Oe, { text: "I have my password", linkText: "Back to Sign in", onClick: () => {
2005
+ N("signin"), g == null || g();
1908
2006
  } }),
1909
- /* @__PURE__ */ p(ye, { onTerms: l, onPrivacyPolicy: a, paddingTop: 40 })
2007
+ /* @__PURE__ */ p(ke, { onTerms: l, onPrivacyPolicy: s, paddingTop: 40 })
1910
2008
  ] })
1911
2009
  ] })
1912
2010
  ) : (
1913
2011
  /* ── Sign In ── */
1914
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start", width: "100%", gap: 48 }, children: [
1915
- /* @__PURE__ */ p(Be, { title: "Sign in", subtitle: "Enter your email & password to continue" }),
1916
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start", width: "100%", gap: 8 }, children: [
1917
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start", width: "100%", gap: 16 }, children: [
1918
- /* @__PURE__ */ S("form", { onSubmit: _n, style: { width: "100%", display: "flex", flexDirection: "column", gap: 16 }, children: [
1919
- /* @__PURE__ */ p(Z, { label: "Email", gap: 12, children: /* @__PURE__ */ p(
2012
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start", width: "100%", gap: 48 }, children: [
2013
+ /* @__PURE__ */ p(Ne, { title: "Sign in", subtitle: "Enter your email & password to continue" }),
2014
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start", width: "100%", gap: 8 }, children: [
2015
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start", width: "100%", gap: 16 }, children: [
2016
+ /* @__PURE__ */ I("form", { onSubmit: co, style: { width: "100%", display: "flex", flexDirection: "column", gap: 16 }, children: [
2017
+ /* @__PURE__ */ p(Q, { label: "Email", gap: 12, children: /* @__PURE__ */ p(
1920
2018
  "input",
1921
2019
  {
2020
+ ref: ze,
1922
2021
  type: "email",
1923
- value: y,
1924
- onChange: (b) => O(b.target.value),
2022
+ value: S,
2023
+ onChange: (w) => x(w.target.value),
1925
2024
  placeholder: "workemail@example.com",
1926
2025
  required: !0,
1927
2026
  autoComplete: "email",
1928
- style: { ...ne, border: `1px solid ${ge ? "var(--color-text)" : "var(--color-input-border)"}` },
1929
- onFocus: zt,
1930
- onBlur: Vt
2027
+ style: { ..._, border: `1px solid ${we ? "var(--color-text)" : "var(--color-input-border)"}` },
2028
+ onFocus: Xt,
2029
+ onBlur: Gt
1931
2030
  }
1932
2031
  ) }),
1933
- /* @__PURE__ */ p(Z, { label: "Password", gap: 12, children: /* @__PURE__ */ S("div", { style: { position: "relative" }, children: [
2032
+ /* @__PURE__ */ p(Q, { label: "Password", gap: 12, children: /* @__PURE__ */ I("div", { style: { position: "relative" }, children: [
1934
2033
  /* @__PURE__ */ p(
1935
2034
  "input",
1936
2035
  {
1937
- type: E ? "text" : "password",
1938
- value: x,
1939
- onChange: (b) => A(b.target.value),
2036
+ ref: He,
2037
+ type: F ? "text" : "password",
2038
+ value: O,
2039
+ onChange: (w) => R(w.target.value),
1940
2040
  placeholder: "Enter password",
1941
2041
  required: !0,
1942
2042
  autoComplete: "current-password",
1943
- style: { ...ne, padding: "10px 44px 10px 16px", border: `1px solid ${ge ? "var(--color-text)" : "var(--color-input-border)"}` },
1944
- onFocus: zt,
1945
- onBlur: Vt
2043
+ style: { ..._, padding: "10px 44px 10px 16px", border: `1px solid ${we ? "var(--color-text)" : "var(--color-input-border)"}` },
2044
+ onFocus: Xt,
2045
+ onBlur: Gt
1946
2046
  }
1947
2047
  ),
1948
- /* @__PURE__ */ p(gt, { show: E, onToggle: () => L(!E) })
2048
+ /* @__PURE__ */ p(kt, { show: F, onToggle: () => J(!F) })
1949
2049
  ] }) }),
1950
- /* @__PURE__ */ p(we, { type: "submit", disabled: !Ht, children: Kt ? "Signing in…" : "Sign In" })
2050
+ /* @__PURE__ */ p(be, { type: "submit", disabled: !Qt, children: ct ? "Signing in…" : "Sign In" })
1951
2051
  ] }),
1952
- ge && /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", padding: 8, gap: 6, width: "100%", boxSizing: "border-box", background: "var(--color-error-bg)", borderRadius: 5, fontSize: 15, fontWeight: 400, lineHeight: "22px", color: "var(--color-text)", fontFamily: j }, children: [
2052
+ we && /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", padding: 8, gap: 6, width: "100%", boxSizing: "border-box", background: "var(--color-error-bg)", borderRadius: 5, fontSize: 15, fontWeight: 400, lineHeight: "22px", color: "var(--color-text)", fontFamily: D }, children: [
1953
2053
  /* @__PURE__ */ p("svg", { width: "17", height: "17", viewBox: "0 0 24 24", fill: "var(--color-text)", style: { flexShrink: 0 }, children: /* @__PURE__ */ p("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" }) }),
1954
- ge
2054
+ we
1955
2055
  ] }),
1956
- /* @__PURE__ */ S("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", width: "100%" }, children: [
2056
+ /* @__PURE__ */ I("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", width: "100%" }, children: [
1957
2057
  /* @__PURE__ */ p(
1958
2058
  "button",
1959
2059
  {
1960
2060
  type: "button",
1961
2061
  onClick: () => {
1962
- C("resetpassword"), t == null || t();
2062
+ N("resetpassword"), t == null || t();
1963
2063
  },
1964
- style: { background: "none", border: "none", padding: 0, fontSize: 15, fontWeight: 400, lineHeight: "100%", color: "var(--color-text)", cursor: "pointer", fontFamily: j, textDecoration: "underline" },
2064
+ style: { background: "none", border: "none", padding: 0, fontSize: 15, fontWeight: 400, lineHeight: "100%", color: "var(--color-text)", cursor: "pointer", fontFamily: D, textDecoration: "underline" },
1965
2065
  children: "Forgot Password?"
1966
2066
  }
1967
2067
  ),
@@ -1970,38 +2070,38 @@ function Ri({
1970
2070
  {
1971
2071
  type: "button",
1972
2072
  onClick: () => {
1973
- C("getcode"), n == null || n();
2073
+ N("getcode"), n == null || n();
1974
2074
  },
1975
- style: { background: "none", border: "none", padding: 0, fontSize: 15, fontWeight: 600, lineHeight: "100%", color: He, cursor: "pointer", fontFamily: j, textDecoration: "underline solid", textUnderlineOffset: 0, textDecorationSkipInk: "none" },
2075
+ style: { background: "none", border: "none", padding: 0, fontSize: 15, fontWeight: 600, lineHeight: "100%", color: qe, cursor: "pointer", fontFamily: D, textDecoration: "underline solid", textUnderlineOffset: 0, textDecorationSkipInk: "none" },
1976
2076
  children: "Sign in with one-time code"
1977
2077
  }
1978
2078
  )
1979
2079
  ] }),
1980
- /* @__PURE__ */ S("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 2 }, children: [
1981
- /* @__PURE__ */ p(Je, {}),
1982
- /* @__PURE__ */ p(ki, { projectId: u, onSuccess: c, onError: d })
2080
+ /* @__PURE__ */ I("div", { style: { display: "flex", flexDirection: "column", width: "100%", gap: 2 }, children: [
2081
+ /* @__PURE__ */ p(Pe, {}),
2082
+ /* @__PURE__ */ p(Ei, { projectId: u, onSuccess: c, onError: d })
1983
2083
  ] })
1984
2084
  ] }),
1985
- /* @__PURE__ */ p(Ue, { text: "Not a member yet?", linkText: "Sign Up", onClick: () => {
1986
- C("signup"), i == null || i();
2085
+ /* @__PURE__ */ p(Oe, { text: "Not a member yet?", linkText: "Sign Up", onClick: () => {
2086
+ N("signup"), i == null || i();
1987
2087
  } }),
1988
- /* @__PURE__ */ p(ye, { onTerms: l, onPrivacyPolicy: a, paddingTop: 6 })
2088
+ /* @__PURE__ */ p(ke, { onTerms: l, onPrivacyPolicy: s, paddingTop: 16 })
1989
2089
  ] })
1990
2090
  ] })
1991
2091
  ) }) })
1992
2092
  ] });
1993
2093
  }
1994
2094
  export {
1995
- di as $,
1996
- Ri as L,
1997
- Gr as W,
1998
- Ti as X,
1999
- Ui as _,
2000
- Ai as a,
2001
- Oi as b,
2002
- D as c,
2003
- Di as h,
2004
- ji as r,
2005
- Ei as s
2095
+ bi as $,
2096
+ Hi as L,
2097
+ si as W,
2098
+ Bi as X,
2099
+ Fi as _,
2100
+ qi as a,
2101
+ Li as b,
2102
+ P as c,
2103
+ zi as h,
2104
+ Ji as r,
2105
+ Ki as s
2006
2106
  };
2007
2107
  //# sourceMappingURL=index.es2.js.map