@providame/vue 0.0.9 → 0.0.12

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.
@@ -90,33 +90,33 @@ var z = class extends Error {
90
90
  constructor(e = "no applicable key found in the JSON Web Key Set", t) {
91
91
  super(e, t);
92
92
  }
93
- }, ae = class extends z {
93
+ }, q = class extends z {
94
94
  [Symbol.asyncIterator];
95
95
  static code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
96
96
  code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
97
97
  constructor(e = "multiple matching keys found in the JSON Web Key Set", t) {
98
98
  super(e, t);
99
99
  }
100
- }, oe = class extends z {
100
+ }, ae = class extends z {
101
101
  static code = "ERR_JWKS_TIMEOUT";
102
102
  code = "ERR_JWKS_TIMEOUT";
103
103
  constructor(e = "request timed out", t) {
104
104
  super(e, t);
105
105
  }
106
- }, se = class extends z {
106
+ }, oe = class extends z {
107
107
  static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
108
108
  code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
109
109
  constructor(e = "signature verification failed", t) {
110
110
  super(e, t);
111
111
  }
112
- }, q = (e, t = "algorithm.name") => /* @__PURE__ */ TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`), J = (e, t) => e.name === t;
113
- function ce(e) {
112
+ }, J = (e, t = "algorithm.name") => /* @__PURE__ */ TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`), Y = (e, t) => e.name === t;
113
+ function se(e) {
114
114
  return parseInt(e.name.slice(4), 10);
115
115
  }
116
- function Y(e, t) {
117
- if (ce(e.hash) !== t) throw q(`SHA-${t}`, "algorithm.hash");
116
+ function X(e, t) {
117
+ if (se(e.hash) !== t) throw J(`SHA-${t}`, "algorithm.hash");
118
118
  }
119
- function X(e) {
119
+ function ce(e) {
120
120
  switch (e) {
121
121
  case "ES256": return "P-256";
122
122
  case "ES384": return "P-384";
@@ -132,36 +132,36 @@ function ue(e, t, n) {
132
132
  case "HS256":
133
133
  case "HS384":
134
134
  case "HS512":
135
- if (!J(e.algorithm, "HMAC")) throw q("HMAC");
136
- Y(e.algorithm, parseInt(t.slice(2), 10));
135
+ if (!Y(e.algorithm, "HMAC")) throw J("HMAC");
136
+ X(e.algorithm, parseInt(t.slice(2), 10));
137
137
  break;
138
138
  case "RS256":
139
139
  case "RS384":
140
140
  case "RS512":
141
- if (!J(e.algorithm, "RSASSA-PKCS1-v1_5")) throw q("RSASSA-PKCS1-v1_5");
142
- Y(e.algorithm, parseInt(t.slice(2), 10));
141
+ if (!Y(e.algorithm, "RSASSA-PKCS1-v1_5")) throw J("RSASSA-PKCS1-v1_5");
142
+ X(e.algorithm, parseInt(t.slice(2), 10));
143
143
  break;
144
144
  case "PS256":
145
145
  case "PS384":
146
146
  case "PS512":
147
- if (!J(e.algorithm, "RSA-PSS")) throw q("RSA-PSS");
148
- Y(e.algorithm, parseInt(t.slice(2), 10));
147
+ if (!Y(e.algorithm, "RSA-PSS")) throw J("RSA-PSS");
148
+ X(e.algorithm, parseInt(t.slice(2), 10));
149
149
  break;
150
150
  case "Ed25519":
151
151
  case "EdDSA":
152
- if (!J(e.algorithm, "Ed25519")) throw q("Ed25519");
152
+ if (!Y(e.algorithm, "Ed25519")) throw J("Ed25519");
153
153
  break;
154
154
  case "ML-DSA-44":
155
155
  case "ML-DSA-65":
156
156
  case "ML-DSA-87":
157
- if (!J(e.algorithm, t)) throw q(t);
157
+ if (!Y(e.algorithm, t)) throw J(t);
158
158
  break;
159
159
  case "ES256":
160
160
  case "ES384":
161
161
  case "ES512": {
162
- if (!J(e.algorithm, "ECDSA")) throw q("ECDSA");
163
- let n = X(t);
164
- if (e.algorithm.namedCurve !== n) throw q(n, "algorithm.namedCurve");
162
+ if (!Y(e.algorithm, "ECDSA")) throw J("ECDSA");
163
+ let n = ce(t);
164
+ if (e.algorithm.namedCurve !== n) throw J(n, "algorithm.namedCurve");
165
165
  break;
166
166
  }
167
167
  default: throw TypeError("CryptoKey does not support this operation");
@@ -627,7 +627,7 @@ async function We(e, t, n) {
627
627
  let l = !1;
628
628
  typeof t == "function" && (t = await t(r, e), l = !0), Ne(s, t, "verify");
629
629
  let u = L(e.protected === void 0 ? /* @__PURE__ */ new Uint8Array() : ne(e.protected), ne("."), typeof e.payload == "string" ? o ? ne(e.payload) : te.encode(e.payload) : e.payload), d = ve(e.signature, "signature", W), f = await Ue(t, s);
630
- if (!await _e(s, f, d, u)) throw new se();
630
+ if (!await _e(s, f, d, u)) throw new oe();
631
631
  let p;
632
632
  p = o ? ve(e.payload, "payload", W) : typeof e.payload == "string" ? te.encode(e.payload) : e.payload;
633
633
  let m = { payload: p };
@@ -844,7 +844,7 @@ var ct = class {
844
844
  }), { 0: o, length: s } = a;
845
845
  if (s === 0) throw new K();
846
846
  if (s !== 1) {
847
- let e = new ae(), t = this.#t;
847
+ let e = new q(), t = this.#t;
848
848
  throw e[Symbol.asyncIterator] = async function* () {
849
849
  for (let e of a) try {
850
850
  yield await lt(t, e, n);
@@ -890,7 +890,7 @@ async function mt(e, t, n, r = fetch) {
890
890
  redirect: "manual",
891
891
  headers: t
892
892
  }).catch((e) => {
893
- throw e.name === "TimeoutError" ? new oe() : e;
893
+ throw e.name === "TimeoutError" ? new ae() : e;
894
894
  });
895
895
  if (i.status !== 200) throw new z("Expected 200 OK from the JSON Web Key Set HTTP response");
896
896
  try {
@@ -1117,9 +1117,6 @@ function jt(e) {
1117
1117
  return {
1118
1118
  issuer: e.issuer,
1119
1119
  jwksUri: e.jwks_uri,
1120
- authorizationEndpoint: e.authorization_endpoint,
1121
- tokenEndpoint: e.token_endpoint,
1122
- userinfoEndpoint: e.userinfo_endpoint,
1123
1120
  projectId: e.project_id,
1124
1121
  clientId: e.client_id,
1125
1122
  environment: e.environment,
@@ -3017,30 +3014,30 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3017
3014
  e && (e.querySelector("input:not([disabled])") ?? e.querySelector("button:not([disabled])"))?.focus();
3018
3015
  });
3019
3016
  }
3020
- let R = S(""), z = S(""), B = S(""), V = S(""), H = S(!1), U = S(""), W = S(!1), ie = Lt(), G = S(!1), K = S(""), ae = S(""), oe = S(""), se = S(!1), q = S(""), J = S(""), ce = S(!1), Y = S("");
3021
- j(() => [O.status.value, G.value], re), j(() => N.status.value, re);
3022
- let X = S(0), le;
3023
- function ue() {
3024
- clearInterval(le), X.value = Vi, le = setInterval(() => {
3025
- --X.value, X.value <= 0 && clearInterval(le);
3017
+ let R = S(""), z = S(""), B = S(""), V = S(""), H = S(!1), U = S(""), W = S(!1), ie = Lt(), G = n(() => O.status.value === "idle" || O.status.value === "needs_first_factor"), K = S(!1), q = S(""), ae = S(""), oe = S(""), J = S(!1), Y = S(""), se = S(""), X = S(!1), ce = S(""), le = n(() => G.value ? "combined" : O.status.value);
3018
+ j(() => [le.value, K.value], re), j(() => N.status.value, re);
3019
+ let ue = S(0), de;
3020
+ function fe() {
3021
+ clearInterval(de), ue.value = Vi, de = setInterval(() => {
3022
+ --ue.value, ue.value <= 0 && clearInterval(de);
3026
3023
  }, 1e3);
3027
3024
  }
3028
- y(() => clearInterval(le)), j(() => O.isComplete.value, (e) => {
3025
+ y(() => clearInterval(de)), j(() => O.isComplete.value, (e) => {
3029
3026
  e && O.session.value && E("complete", O.session.value);
3030
3027
  }), j(() => N.isComplete.value, (e) => {
3031
3028
  e && N.session.value && E("complete", N.session.value);
3032
3029
  });
3033
- async function de() {
3030
+ async function pe() {
3034
3031
  try {
3035
3032
  await O.signInWithPasskey(R.value, window.location.hostname), O.status.value === "needs_mfa_enrollment" && !O.enrollment.value && await O.enrollTotp();
3036
3033
  } catch {}
3037
3034
  }
3038
- async function fe() {
3035
+ async function me() {
3039
3036
  try {
3040
3037
  await O.signInWithPassword(R.value, z.value), O.status.value === "needs_mfa_enrollment" && !O.enrollment.value && await O.enrollTotp();
3041
3038
  } catch {}
3042
3039
  }
3043
- async function pe() {
3040
+ async function he() {
3044
3041
  try {
3045
3042
  H.value ? await O.attemptSecondFactor({
3046
3043
  strategy: "backup_code",
@@ -3051,31 +3048,31 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3051
3048
  });
3052
3049
  } catch {}
3053
3050
  }
3054
- async function me() {
3051
+ async function ge() {
3055
3052
  try {
3056
3053
  await O.verifyTotpEnrollment(U.value);
3057
3054
  } catch {}
3058
3055
  }
3059
- async function he() {
3060
- G.value = !0, K.value = R.value;
3056
+ async function _e() {
3057
+ K.value = !0, q.value = R.value;
3061
3058
  try {
3062
- await N.create({ email: R.value }), ue();
3059
+ await N.create({ email: R.value }), fe();
3063
3060
  } catch {}
3064
3061
  }
3065
- function ge() {
3066
- G.value = !1, N.reset(), K.value = "", ae.value = "", oe.value = "", q.value = "", J.value = "", ce.value = !1, Y.value = "", clearInterval(le), X.value = 0;
3062
+ function ve() {
3063
+ K.value = !1, N.reset(), q.value = "", ae.value = "", oe.value = "", Y.value = "", se.value = "", X.value = !1, ce.value = "", clearInterval(de), ue.value = 0;
3067
3064
  }
3068
- async function _e() {
3065
+ async function ye() {
3069
3066
  try {
3070
- await N.resend(), ue();
3067
+ await N.resend(), fe();
3071
3068
  } catch {}
3072
3069
  }
3073
- async function ve() {
3070
+ async function be() {
3074
3071
  try {
3075
- await N.create({ email: K.value }), ue();
3072
+ await N.create({ email: q.value }), fe();
3076
3073
  } catch {}
3077
3074
  }
3078
- async function ye() {
3075
+ async function xe() {
3079
3076
  try {
3080
3077
  await N.attempt({
3081
3078
  code: ae.value,
@@ -3083,23 +3080,23 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3083
3080
  }), N.status.value === "needs_mfa_enrollment" && !N.enrollment.value && await N.enrollTotp();
3084
3081
  } catch {}
3085
3082
  }
3086
- async function be() {
3083
+ async function Se() {
3087
3084
  try {
3088
- ce.value ? await N.attemptSecondFactor({
3085
+ X.value ? await N.attemptSecondFactor({
3089
3086
  strategy: "backup_code",
3090
- code: J.value
3087
+ code: se.value
3091
3088
  }) : await N.attemptSecondFactor({
3092
3089
  strategy: "totp",
3093
- code: q.value
3090
+ code: Y.value
3094
3091
  });
3095
3092
  } catch {}
3096
3093
  }
3097
- async function xe() {
3094
+ async function Ce() {
3098
3095
  try {
3099
- await N.verifyTotpEnrollment(Y.value);
3096
+ await N.verifyTotpEnrollment(ce.value);
3100
3097
  } catch {}
3101
3098
  }
3102
- async function Se(e) {
3099
+ async function we(e) {
3103
3100
  try {
3104
3101
  await M.signIn(e);
3105
3102
  } catch {}
@@ -3130,25 +3127,25 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3130
3127
  class: m(["mrd-title", k(l).elementProps("headerTitle").class]),
3131
3128
  role: "status",
3132
3129
  "aria-live": "polite"
3133
- }, D(G.value ? "Reset your password" : v.value), 3),
3134
- !G.value && c.subtitle ? (b(), a("p", Gr, D(c.subtitle), 1)) : G.value && k(N).status.value === "idle" ? (b(), a("p", Kr, " Enter your email and we'll send you a reset code. ")) : i("", !0)
3130
+ }, D(K.value ? "Reset your password" : v.value), 3),
3131
+ !K.value && c.subtitle ? (b(), a("p", Gr, D(c.subtitle), 1)) : K.value && k(N).status.value === "idle" ? (b(), a("p", Kr, " Enter your email and we'll send you a reset code. ")) : i("", !0)
3135
3132
  ]),
3136
- !G.value && k(O).status.value !== "complete" && (k(O).error.value || k(M).error.value) ? (b(), a("p", {
3133
+ !K.value && k(O).status.value !== "complete" && (k(O).error.value || k(M).error.value) ? (b(), a("p", {
3137
3134
  key: 0,
3138
3135
  id: "mrd-signin-error",
3139
3136
  class: m(["mrd-error", k(l).elementProps("alert").class]),
3140
3137
  role: "alert"
3141
3138
  }, D((k(O).error.value ?? k(M).error.value)?.message), 3)) : i("", !0),
3142
- G.value && k(N).error.value ? (b(), a("p", {
3139
+ K.value && k(N).error.value ? (b(), a("p", {
3143
3140
  key: 1,
3144
3141
  id: "mrd-signin-reset-error",
3145
3142
  class: m(["mrd-error", k(l).elementProps("alert").class]),
3146
3143
  role: "alert"
3147
3144
  }, D(k(N).error.value.message), 3)) : i("", !0),
3148
- G.value ? (b(), a(e, { key: 3 }, [k(N).status.value === "idle" && k(N).loading.value ? (b(), a("p", vi, "Sending reset code…")) : k(N).status.value === "idle" ? (b(), a("form", {
3145
+ K.value ? (b(), a(e, { key: 3 }, [k(N).status.value === "idle" && k(N).loading.value ? (b(), a("p", vi, "Sending reset code…")) : k(N).status.value === "idle" ? (b(), a("form", {
3149
3146
  key: 1,
3150
3147
  class: "mrd-form",
3151
- onSubmit: F(ve, ["prevent"])
3148
+ onSubmit: F(be, ["prevent"])
3152
3149
  }, [
3153
3150
  n[27] ||= o("label", {
3154
3151
  class: "mrd-label",
@@ -3156,7 +3153,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3156
3153
  }, "Email", -1),
3157
3154
  P(o("input", {
3158
3155
  id: "mrd-reset-email",
3159
- "onUpdate:modelValue": n[8] ||= (e) => K.value = e,
3156
+ "onUpdate:modelValue": n[8] ||= (e) => q.value = e,
3160
3157
  type: "email",
3161
3158
  autocomplete: "email",
3162
3159
  class: "mrd-input",
@@ -3164,7 +3161,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3164
3161
  required: "",
3165
3162
  "aria-invalid": !!k(N).error.value,
3166
3163
  "aria-describedby": k(N).error.value ? "mrd-signin-reset-error" : void 0
3167
- }, null, 8, yi), [[A, K.value]]),
3164
+ }, null, 8, yi), [[A, q.value]]),
3168
3165
  o("button", {
3169
3166
  class: "mrd-button",
3170
3167
  disabled: k(N).loading.value,
@@ -3173,9 +3170,9 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3173
3170
  ], 32)) : k(N).status.value === "needs_verification" ? (b(), a("form", {
3174
3171
  key: 2,
3175
3172
  class: "mrd-form",
3176
- onSubmit: F(ye, ["prevent"])
3173
+ onSubmit: F(xe, ["prevent"])
3177
3174
  }, [
3178
- o("p", xi, "If an account exists for " + D(K.value) + ", we sent a reset code.", 1),
3175
+ o("p", xi, "If an account exists for " + D(q.value) + ", we sent a reset code.", 1),
3179
3176
  n[28] ||= o("label", {
3180
3177
  class: "mrd-label",
3181
3178
  for: "mrd-reset-code"
@@ -3198,7 +3195,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3198
3195
  o("div", Ci, [P(o("input", {
3199
3196
  id: "mrd-reset-password",
3200
3197
  "onUpdate:modelValue": n[10] ||= (e) => oe.value = e,
3201
- type: se.value ? "text" : "password",
3198
+ type: J.value ? "text" : "password",
3202
3199
  autocomplete: "new-password",
3203
3200
  class: "mrd-input",
3204
3201
  minlength: "8",
@@ -3208,9 +3205,9 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3208
3205
  }, null, 8, wi), [[ee, oe.value]]), o("button", {
3209
3206
  type: "button",
3210
3207
  class: "mrd-password-toggle",
3211
- "aria-label": se.value ? "Hide password" : "Show password",
3212
- onClick: n[11] ||= (e) => se.value = !se.value,
3213
- innerHTML: se.value ? k(nr) : k(tr)
3208
+ "aria-label": J.value ? "Hide password" : "Show password",
3209
+ onClick: n[11] ||= (e) => J.value = !J.value,
3210
+ innerHTML: J.value ? k(nr) : k(tr)
3214
3211
  }, null, 8, Ti)]),
3215
3212
  o("button", {
3216
3213
  class: "mrd-button",
@@ -3221,37 +3218,37 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3221
3218
  id: "mrd-reset-resend",
3222
3219
  type: "button",
3223
3220
  class: "mrd-link-button",
3224
- disabled: X.value > 0,
3225
- onClick: _e
3226
- }, D(X.value > 0 ? `Resend code (${X.value}s)` : "Resend code"), 9, Oi), o("button", {
3221
+ disabled: ue.value > 0,
3222
+ onClick: ye
3223
+ }, D(ue.value > 0 ? `Resend code (${ue.value}s)` : "Resend code"), 9, Oi), o("button", {
3227
3224
  id: "mrd-back-to-sign-in-inline",
3228
3225
  type: "button",
3229
3226
  class: "mrd-link-button",
3230
- onClick: ge
3227
+ onClick: ve
3231
3228
  }, " Back to sign in ")])
3232
3229
  ], 32)) : k(N).status.value === "needs_second_factor" ? (b(), a("form", {
3233
3230
  key: 3,
3234
3231
  class: "mrd-form",
3235
- onSubmit: F(be, ["prevent"])
3232
+ onSubmit: F(Se, ["prevent"])
3236
3233
  }, [
3237
- ce.value ? (b(), a(e, { key: 1 }, [n[31] ||= o("label", {
3234
+ X.value ? (b(), a(e, { key: 1 }, [n[31] ||= o("label", {
3238
3235
  class: "mrd-label",
3239
3236
  for: "mrd-reset-backup-code"
3240
3237
  }, "Backup code", -1), P(o("input", {
3241
3238
  id: "mrd-reset-backup-code",
3242
- "onUpdate:modelValue": n[13] ||= (e) => J.value = e,
3239
+ "onUpdate:modelValue": n[13] ||= (e) => se.value = e,
3243
3240
  autocomplete: "off",
3244
3241
  class: "mrd-input",
3245
3242
  placeholder: "xxxx-xxxx",
3246
3243
  required: "",
3247
3244
  "aria-invalid": !!k(N).error.value,
3248
3245
  "aria-describedby": k(N).error.value ? "mrd-signin-reset-error" : void 0
3249
- }, null, 8, Ai), [[A, J.value]])], 64)) : (b(), a(e, { key: 0 }, [n[30] ||= o("label", {
3246
+ }, null, 8, Ai), [[A, se.value]])], 64)) : (b(), a(e, { key: 0 }, [n[30] ||= o("label", {
3250
3247
  class: "mrd-label",
3251
3248
  for: "mrd-reset-2fa-code"
3252
3249
  }, "Authentication code", -1), P(o("input", {
3253
3250
  id: "mrd-reset-2fa-code",
3254
- "onUpdate:modelValue": n[12] ||= (e) => q.value = e,
3251
+ "onUpdate:modelValue": n[12] ||= (e) => Y.value = e,
3255
3252
  inputmode: "numeric",
3256
3253
  autocomplete: "one-time-code",
3257
3254
  class: "mrd-input",
@@ -3259,7 +3256,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3259
3256
  required: "",
3260
3257
  "aria-invalid": !!k(N).error.value,
3261
3258
  "aria-describedby": k(N).error.value ? "mrd-signin-reset-error" : void 0
3262
- }, null, 8, ki), [[A, q.value]])], 64)),
3259
+ }, null, 8, ki), [[A, Y.value]])], 64)),
3263
3260
  o("button", {
3264
3261
  class: "mrd-button",
3265
3262
  disabled: k(N).loading.value,
@@ -3270,12 +3267,12 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3270
3267
  type: "button",
3271
3268
  class: "mrd-link-button",
3272
3269
  disabled: k(N).loading.value,
3273
- onClick: n[14] ||= (e) => ce.value = !ce.value
3274
- }, D(ce.value ? "Use authenticator code instead" : "Use a backup code instead"), 9, Mi)
3270
+ onClick: n[14] ||= (e) => X.value = !X.value
3271
+ }, D(X.value ? "Use authenticator code instead" : "Use a backup code instead"), 9, Mi)
3275
3272
  ], 32)) : k(N).status.value === "needs_mfa_enrollment" ? (b(), a("form", {
3276
3273
  key: 4,
3277
3274
  class: "mrd-form",
3278
- onSubmit: F(xe, ["prevent"])
3275
+ onSubmit: F(Ce, ["prevent"])
3279
3276
  }, [
3280
3277
  n[33] ||= o("p", { class: "mrd-hint" }, " This account requires a second factor. Add it to your authenticator app, then enter the code it generates. ", -1),
3281
3278
  k(N).enrollment.value ? (b(), a(e, { key: 0 }, [n[32] ||= o("p", { class: "mrd-label" }, "Secret key", -1), o("p", Ni, D(k(N).enrollment.value.secret), 1)], 64)) : i("", !0),
@@ -3285,7 +3282,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3285
3282
  }, "Authentication code", -1),
3286
3283
  P(o("input", {
3287
3284
  id: "mrd-reset-enroll-code",
3288
- "onUpdate:modelValue": n[15] ||= (e) => Y.value = e,
3285
+ "onUpdate:modelValue": n[15] ||= (e) => ce.value = e,
3289
3286
  inputmode: "numeric",
3290
3287
  autocomplete: "one-time-code",
3291
3288
  class: "mrd-input",
@@ -3293,7 +3290,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3293
3290
  required: "",
3294
3291
  "aria-invalid": !!k(N).error.value,
3295
3292
  "aria-describedby": k(N).error.value ? "mrd-signin-reset-error" : void 0
3296
- }, null, 8, Pi), [[A, Y.value]]),
3293
+ }, null, 8, Pi), [[A, ce.value]]),
3297
3294
  o("button", {
3298
3295
  class: "mrd-button",
3299
3296
  disabled: k(N).loading.value,
@@ -3304,25 +3301,25 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3304
3301
  id: "mrd-back-to-sign-in",
3305
3302
  type: "button",
3306
3303
  class: "mrd-link-button",
3307
- onClick: ge
3304
+ onClick: ve
3308
3305
  }, " Back to sign in ")) : i("", !0)], 64)) : (b(), a(e, { key: 2 }, [
3309
- k(O).status.value === "idle" && k(M).providers.value.length ? (b(), a("div", qr, [o("div", Jr, [(b(!0), a(e, null, C(k(M).providers.value, (e) => (b(), a("button", {
3306
+ G.value && k(M).providers.value.length ? (b(), a("div", qr, [o("div", Jr, [(b(!0), a(e, null, C(k(M).providers.value, (e) => (b(), a("button", {
3310
3307
  key: e.provider,
3311
3308
  type: "button",
3312
3309
  class: "mrd-idp-button",
3313
3310
  title: `Continue with ${e.displayName}`,
3314
3311
  "aria-label": `Continue with ${e.displayName}`,
3315
3312
  disabled: k(M).loading.value || k(O).loading.value,
3316
- onClick: (t) => Se(e.provider)
3313
+ onClick: (t) => we(e.provider)
3317
3314
  }, [k(ir)(e.provider) ? (b(), a("span", {
3318
3315
  key: 0,
3319
3316
  class: "mrd-idp-icon",
3320
3317
  innerHTML: k(ir)(e.provider)
3321
3318
  }, null, 8, Xr)) : (b(), a("span", Zr, D(e.displayName.charAt(0)), 1)), o("span", Qr, "Continue with " + D(e.displayName), 1)], 8, Yr))), 128))]), n[16] ||= o("div", { class: "mrd-divider" }, [o("span", null, "or continue with email")], -1)])) : i("", !0),
3322
- k(O).status.value === "idle" ? (b(), a("form", {
3319
+ G.value ? (b(), a("form", {
3323
3320
  key: 1,
3324
3321
  class: "mrd-form",
3325
- onSubmit: F(fe, ["prevent"])
3322
+ onSubmit: F(me, ["prevent"])
3326
3323
  }, [
3327
3324
  o("label", {
3328
3325
  class: m(["mrd-label", k(l).elementProps("formFieldLabel").class]),
@@ -3370,19 +3367,19 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3370
3367
  class: "mrd-button-secondary",
3371
3368
  "data-mrd-action": "sign-in-with-passkey",
3372
3369
  disabled: k(O).loading.value || !R.value,
3373
- onClick: de
3370
+ onClick: pe
3374
3371
  }, " Sign in with a passkey ", 8, ii)) : i("", !0),
3375
3372
  o("button", {
3376
3373
  id: "mrd-forgot-password",
3377
3374
  type: "button",
3378
3375
  class: m(["mrd-link-button", k(l).elementProps("footerActionLink").class]),
3379
3376
  disabled: k(O).loading.value,
3380
- onClick: he
3377
+ onClick: _e
3381
3378
  }, " Forgot password? ", 10, ai)
3382
3379
  ], 32)) : k(O).status.value === "needs_second_factor" ? (b(), a("form", {
3383
3380
  key: 2,
3384
3381
  class: "mrd-form",
3385
- onSubmit: F(pe, ["prevent"])
3382
+ onSubmit: F(he, ["prevent"])
3386
3383
  }, [
3387
3384
  H.value ? (b(), a(e, { key: 1 }, [n[19] ||= o("label", {
3388
3385
  class: "mrd-label",
@@ -3425,7 +3422,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3425
3422
  ], 32)) : k(O).status.value === "needs_mfa_enrollment" ? (b(), a("form", {
3426
3423
  key: 3,
3427
3424
  class: "mrd-form",
3428
- onSubmit: F(me, ["prevent"])
3425
+ onSubmit: F(ge, ["prevent"])
3429
3426
  }, [
3430
3427
  n[21] ||= o("p", { class: "mrd-hint" }, " This account requires a second factor. Add it to your authenticator app, then enter the code it generates. ", -1),
3431
3428
  k(O).enrollment.value ? (b(), a(e, { key: 0 }, [n[20] ||= o("p", { class: "mrd-label" }, "Secret key", -1), o("p", ui, D(k(O).enrollment.value.secret), 1)], 64)) : i("", !0),
@@ -3551,20 +3548,20 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3551
3548
  },
3552
3549
  emits: ["complete", "switchToSignIn"],
3553
3550
  setup(t, { emit: c }) {
3554
- let l = t, d = Sn(void 0, "signUp", l.appearance), f = Rr(), g = n(() => l.logo ?? br(f.value.logoUrl)), v = n(() => l.logo ? void 0 : br(f.value.logoUrlDark)), y = n(() => l.title ?? (f.value.appName ? `Create your ${f.value.appName} account` : "Create your account")), x = n(() => Sr(l.signInUrl)), w = u(), T = n(() => !!w?.vnode.props?.onSwitchToSignIn), E = c, O = Or(), M = Dr(), N = Q(), te = S(""), I = S(""), L = S(!1), ne = S(""), re = S(""), R = S(""), z = S(""), B = S(""), V = S(""), H = S(""), U = S(""), W = S(""), ie = S(""), G = S(""), K = S(!1), ae = S(""), oe = S(null);
3555
- function se() {
3551
+ let l = t, d = Sn(void 0, "signUp", l.appearance), f = Rr(), g = n(() => l.logo ?? br(f.value.logoUrl)), v = n(() => l.logo ? void 0 : br(f.value.logoUrlDark)), y = n(() => l.title ?? (f.value.appName ? `Create your ${f.value.appName} account` : "Create your account")), x = n(() => Sr(l.signInUrl)), w = u(), T = n(() => !!w?.vnode.props?.onSwitchToSignIn), E = c, O = Or(), M = Dr(), N = Q(), te = S(""), I = S(""), L = S(!1), ne = S(""), re = S(""), R = S(""), z = S(""), B = S(""), V = S(""), H = S(""), U = S(""), W = S(""), ie = S(""), G = S(""), K = S(!1), q = S(""), ae = S(null);
3552
+ function oe() {
3556
3553
  p(() => {
3557
- let e = oe.value;
3554
+ let e = ae.value;
3558
3555
  e && (e.querySelector("input:not([disabled])") ?? e.querySelector("button:not([disabled])"))?.focus();
3559
3556
  });
3560
3557
  }
3561
- j(() => O.status.value, se), _(async () => {
3558
+ j(() => O.status.value, oe), _(async () => {
3562
3559
  try {
3563
3560
  let e = await N.configuration();
3564
3561
  z.value = e.turnstileSiteKey ?? "", V.value = br(e.tosUrl) ?? "", H.value = br(e.privacyUrl) ?? "", U.value = br(e.helpUrl) ?? "", W.value = Cr(e.supportEmail) ?? "";
3565
3562
  } catch {}
3566
3563
  });
3567
- async function q() {
3564
+ async function J() {
3568
3565
  try {
3569
3566
  await O.create({
3570
3567
  email: te.value,
@@ -3573,18 +3570,18 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3573
3570
  lastName: re.value || void 0,
3574
3571
  turnstileToken: B.value || void 0,
3575
3572
  inviteToken: l.inviteToken || void 0
3576
- }), await ce();
3573
+ }), await se();
3577
3574
  } catch {}
3578
3575
  }
3579
- async function J() {
3576
+ async function Y() {
3580
3577
  try {
3581
- await O.attemptVerification({ code: R.value }), await ce();
3578
+ await O.attemptVerification({ code: R.value }), await se();
3582
3579
  } catch {}
3583
3580
  }
3584
- async function ce() {
3581
+ async function se() {
3585
3582
  O.status.value === "needs_mfa_enrollment" && !O.enrollment.value && await O.enrollTotp(), O.isComplete.value && O.session.value && E("complete", O.session.value);
3586
3583
  }
3587
- async function Y() {
3584
+ async function X() {
3588
3585
  try {
3589
3586
  K.value ? await O.attemptSecondFactor({
3590
3587
  strategy: "backup_code",
@@ -3592,12 +3589,12 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3592
3589
  }) : await O.attemptSecondFactor({
3593
3590
  strategy: "totp",
3594
3591
  code: ie.value
3595
- }), await ce();
3592
+ }), await se();
3596
3593
  } catch {}
3597
3594
  }
3598
- async function X() {
3595
+ async function ce() {
3599
3596
  try {
3600
- await O.verifyTotpEnrollment(ae.value), await ce();
3597
+ await O.verifyTotpEnrollment(q.value), await se();
3601
3598
  } catch {}
3602
3599
  }
3603
3600
  async function le(e) {
@@ -3607,7 +3604,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3607
3604
  }
3608
3605
  return (t, n) => (b(), a("div", {
3609
3606
  ref_key: "cardRef",
3610
- ref: oe,
3607
+ ref: ae,
3611
3608
  class: m(["mrd-card mrd-card-md", k(d).elementProps("card").class]),
3612
3609
  style: h(k(d).rootStyle)
3613
3610
  }, [
@@ -3656,7 +3653,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3656
3653
  k(O).status.value === "idle" ? (b(), a("form", {
3657
3654
  key: 2,
3658
3655
  class: "mrd-form",
3659
- onSubmit: F(q, ["prevent"])
3656
+ onSubmit: F(J, ["prevent"])
3660
3657
  }, [
3661
3658
  l.collectName ? (b(), a("div", ta, [o("div", na, [n[13] ||= o("div", { class: "mrd-label-row" }, [o("label", {
3662
3659
  class: "mrd-label",
@@ -3743,7 +3740,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3743
3740
  ], 32)) : k(O).status.value === "needs_verification" ? (b(), a("form", {
3744
3741
  key: 3,
3745
3742
  class: "mrd-form",
3746
- onSubmit: F(J, ["prevent"])
3743
+ onSubmit: F(Y, ["prevent"])
3747
3744
  }, [
3748
3745
  o("p", fa, "We sent a verification code to " + D(te.value) + ".", 1),
3749
3746
  n[19] ||= o("label", {
@@ -3769,7 +3766,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3769
3766
  ], 32)) : k(O).status.value === "needs_second_factor" ? (b(), a("form", {
3770
3767
  key: 4,
3771
3768
  class: "mrd-form",
3772
- onSubmit: F(Y, ["prevent"])
3769
+ onSubmit: F(X, ["prevent"])
3773
3770
  }, [
3774
3771
  K.value ? (b(), a(e, { key: 1 }, [n[21] ||= o("label", {
3775
3772
  class: "mrd-label",
@@ -3812,7 +3809,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3812
3809
  ], 32)) : k(O).status.value === "needs_mfa_enrollment" ? (b(), a("form", {
3813
3810
  key: 5,
3814
3811
  class: "mrd-form",
3815
- onSubmit: F(X, ["prevent"])
3812
+ onSubmit: F(ce, ["prevent"])
3816
3813
  }, [
3817
3814
  n[23] ||= o("p", { class: "mrd-hint" }, " This account requires a second factor. Add it to your authenticator app, then enter the code it generates. ", -1),
3818
3815
  k(O).enrollment.value ? (b(), a(e, { key: 0 }, [n[22] ||= o("p", { class: "mrd-label" }, "Secret key", -1), o("p", ya, D(k(O).enrollment.value.secret), 1)], 64)) : i("", !0),
@@ -3822,7 +3819,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3822
3819
  }, "Authentication code", -1),
3823
3820
  P(o("input", {
3824
3821
  id: "mrd-signup-enroll-code",
3825
- "onUpdate:modelValue": n[10] ||= (e) => ae.value = e,
3822
+ "onUpdate:modelValue": n[10] ||= (e) => q.value = e,
3826
3823
  inputmode: "numeric",
3827
3824
  autocomplete: "one-time-code",
3828
3825
  class: "mrd-input",
@@ -3830,7 +3827,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3830
3827
  required: "",
3831
3828
  "aria-invalid": !!(k(O).error.value || k(M).error.value),
3832
3829
  "aria-describedby": k(O).error.value || k(M).error.value ? "mrd-signup-error" : void 0
3833
- }, null, 8, ba), [[A, ae.value]]),
3830
+ }, null, 8, ba), [[A, q.value]]),
3834
3831
  o("button", {
3835
3832
  class: "mrd-button",
3836
3833
  disabled: k(O).loading.value,
@@ -5541,47 +5538,47 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5541
5538
  function z() {
5542
5539
  g.value = !1, w.value = "", M.value = null;
5543
5540
  }
5544
- let B = S([]), V = Lt(), H = S(!1), U = S(!1), W = S(""), ie = S(""), G = S(""), K = S(""), ae = S(!1), oe = S(null);
5545
- async function se() {
5546
- K.value = "", ae.value = !0;
5541
+ let B = S([]), V = Lt(), H = S(!1), U = S(!1), W = S(""), ie = S(""), G = S(""), K = S(""), q = S(!1), ae = S(null);
5542
+ async function oe() {
5543
+ K.value = "", q.value = !0;
5547
5544
  try {
5548
5545
  B.value = await r.user.passkeys.list();
5549
5546
  } catch (e) {
5550
5547
  K.value = e instanceof Error ? e.message : "Couldn't load your passkeys.";
5551
5548
  } finally {
5552
- ae.value = !1;
5549
+ q.value = !1;
5553
5550
  }
5554
5551
  }
5555
- async function q(e) {
5556
- G.value = "", oe.value = e;
5552
+ async function J(e) {
5553
+ G.value = "", ae.value = e;
5557
5554
  try {
5558
5555
  await r.user.passkeys.remove(e), B.value = B.value.filter((t) => t.id !== e);
5559
5556
  } catch (e) {
5560
5557
  G.value = e instanceof Error ? e.message : "Couldn't remove that passkey — try again.";
5561
5558
  } finally {
5562
- oe.value = null;
5559
+ ae.value = null;
5563
5560
  }
5564
5561
  }
5565
- function J() {
5562
+ function Y() {
5566
5563
  H.value = !1, W.value = "", ie.value = "";
5567
5564
  }
5568
- async function ce() {
5565
+ async function se() {
5569
5566
  ie.value = "", U.value = !0;
5570
5567
  try {
5571
- await r.user.passkeys.registerWithBrowser(window.location.hostname, W.value || "Passkey"), J(), await se();
5568
+ await r.user.passkeys.registerWithBrowser(window.location.hostname, W.value || "Passkey"), Y(), await oe();
5572
5569
  } catch (e) {
5573
5570
  ie.value = Gt(e);
5574
5571
  } finally {
5575
5572
  U.value = !1;
5576
5573
  }
5577
5574
  }
5578
- let Y = S([]), X = S(""), le = S(!1), ue = S(""), de = S(null);
5575
+ let X = S([]), ce = S(""), le = S(!1), ue = S(""), de = S(null);
5579
5576
  async function fe() {
5580
- X.value = "", le.value = !0;
5577
+ ce.value = "", le.value = !0;
5581
5578
  try {
5582
- Y.value = await r.user.sessions.list();
5579
+ X.value = await r.user.sessions.list();
5583
5580
  } catch (e) {
5584
- X.value = e instanceof Error ? e.message : "Couldn't load your sessions.";
5581
+ ce.value = e instanceof Error ? e.message : "Couldn't load your sessions.";
5585
5582
  } finally {
5586
5583
  le.value = !1;
5587
5584
  }
@@ -5589,7 +5586,7 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5589
5586
  async function pe(e) {
5590
5587
  ue.value = "", de.value = e;
5591
5588
  try {
5592
- await r.user.sessions.revoke(e), Y.value = Y.value.filter((t) => t.id !== e);
5589
+ await r.user.sessions.revoke(e), X.value = X.value.filter((t) => t.id !== e);
5593
5590
  } catch (e) {
5594
5591
  ue.value = e instanceof Error ? e.message : "Couldn't revoke that session — try again.";
5595
5592
  } finally {
@@ -5641,7 +5638,7 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5641
5638
  }
5642
5639
  }
5643
5640
  return _(() => {
5644
- F(), se(), fe();
5641
+ F(), oe(), fe();
5645
5642
  }), (t, n) => (b(), a("div", qc, [
5646
5643
  o("section", Jc, [
5647
5644
  n[16] ||= o("h3", { class: "mrd-psection-title" }, "Sign-in methods", -1),
@@ -5774,9 +5771,9 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5774
5771
  type: "button",
5775
5772
  class: "mrd-link-button",
5776
5773
  "data-mrd-action": "retry-load-passkeys",
5777
- onClick: se
5774
+ onClick: oe
5778
5775
  }, " Retry ")])) : G.value ? (b(), a("p", xl, D(G.value), 1)) : i("", !0),
5779
- ae.value ? (b(), a("p", Sl, "Loading passkeys…")) : i("", !0),
5776
+ q.value ? (b(), a("p", Sl, "Loading passkeys…")) : i("", !0),
5780
5777
  (b(!0), a(e, null, C(B.value, (e) => (b(), a("div", {
5781
5778
  class: "mrd-prow",
5782
5779
  key: e.id
@@ -5785,9 +5782,9 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5785
5782
  class: "mrd-prow-action mrd-prow-action--muted",
5786
5783
  "data-mrd-action": `remove-passkey-${e.id}`,
5787
5784
  "aria-label": `Remove passkey ${e.name}`,
5788
- disabled: oe.value === e.id,
5789
- onClick: (t) => q(e.id)
5790
- }, D(oe.value === e.id ? "…" : "Remove"), 9, wl)]))), 128)),
5785
+ disabled: ae.value === e.id,
5786
+ onClick: (t) => J(e.id)
5787
+ }, D(ae.value === e.id ? "…" : "Remove"), 9, wl)]))), 128)),
5791
5788
  o("div", Tl, [n[17] ||= o("span", { class: "mrd-prow-sub" }, "Sign in without a password using Face ID, Touch ID, or a security key", -1), k(V) && !H.value ? (b(), a("button", {
5792
5789
  key: 0,
5793
5790
  type: "button",
@@ -5810,26 +5807,26 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5810
5807
  type: "button",
5811
5808
  class: "mrd-btn-ghost-sm",
5812
5809
  "data-mrd-action": "cancel-add-passkey",
5813
- onClick: J
5810
+ onClick: Y
5814
5811
  }, " Cancel "), o("button", {
5815
5812
  type: "button",
5816
5813
  class: "mrd-btn-sm",
5817
5814
  "data-mrd-action": "add-passkey",
5818
5815
  disabled: U.value,
5819
- onClick: ce
5816
+ onClick: se
5820
5817
  }, D(U.value ? "…" : "Add passkey"), 9, jl)])
5821
5818
  ])) : i("", !0)
5822
5819
  ]),
5823
5820
  o("section", Ml, [
5824
5821
  n[21] ||= o("h3", { class: "mrd-psection-title" }, "Active sessions", -1),
5825
- X.value ? (b(), a("p", Nl, [s(D(X.value) + " ", 1), o("button", {
5822
+ ce.value ? (b(), a("p", Nl, [s(D(ce.value) + " ", 1), o("button", {
5826
5823
  type: "button",
5827
5824
  class: "mrd-link-button",
5828
5825
  "data-mrd-action": "retry-load-sessions",
5829
5826
  onClick: fe
5830
5827
  }, " Retry ")])) : ue.value ? (b(), a("p", Pl, D(ue.value), 1)) : i("", !0),
5831
- le.value ? (b(), a("p", Fl, "Loading sessions…")) : !Y.value.length && !X.value ? (b(), a("p", Il, "No active sessions.")) : i("", !0),
5832
- (b(!0), a(e, null, C(Y.value, (e) => (b(), a("div", {
5828
+ le.value ? (b(), a("p", Fl, "Loading sessions…")) : !X.value.length && !ce.value ? (b(), a("p", Il, "No active sessions.")) : i("", !0),
5829
+ (b(!0), a(e, null, C(X.value, (e) => (b(), a("div", {
5833
5830
  class: "mrd-prow",
5834
5831
  key: e.id
5835
5832
  }, [o("span", null, [n[20] ||= o("span", { class: "mrd-prow-value" }, "Session", -1), o("span", Ll, "Started " + D(me(e.createdAt)), 1)]), o("button", {