@stytch/vanilla-js 4.7.8 → 4.9.0

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.
@@ -140,7 +140,7 @@ var h, p, f, _, m, v, b;
140
140
  }(p || (p = {})), function (e) {
141
141
  e.Vessel = "Vessel", e.Phantom = "Phantom", e.Metamask = "Metamask", e.Coinbase = "Coinbase", e.Binance = "Binance", e.GenericEthereumWallet = "Other Ethereum Wallet", e.GenericSolanaWallet = "Other Solana Wallet";
142
142
  }(f || (f = {})), function (e) {
143
- e.embedded = "embedded", e.floating = "floating";
143
+ e.embedded = "embedded", e.floating = "floating", e.embeddedOnly = "embeddedOnly", e.floatingOrEmbedded = "floatingOrEmbedded", e.forceLegacyEmbedded = "forceLegacyEmbedded";
144
144
  }(_ || (_ = {})), function (e) {
145
145
  e.SMS = "sms", e.WhatsApp = "whatsapp", e.Email = "email";
146
146
  }(m || (m = {})), function (e) {
@@ -159,14 +159,14 @@ var g,
159
159
  }
160
160
  return a(t, c(Error)), r(t);
161
161
  }(),
162
- P = function (e) {
162
+ C = function (e) {
163
163
  function t(e, r) {
164
164
  var n;
165
165
  return i(this, t), (n = o(this, t)).name = "StytchSDKUsageError", n.message = "Invalid call to ".concat(e, "\n") + r, n;
166
166
  }
167
167
  return a(t, c(Error)), r(t);
168
168
  }(),
169
- C = function (e) {
169
+ P = function (e) {
170
170
  function t(e) {
171
171
  var r, n;
172
172
  i(this, t), (r = o(this, t)).name = "StytchSDKSchemaError";
@@ -242,13 +242,13 @@ var g,
242
242
  }
243
243
  return a(t, I), r(t);
244
244
  }(),
245
- j = function (e) {
245
+ F = function (e) {
246
246
  function t(e) {
247
247
  return i(this, t), o(this, t, ["InternalError", e || "An internal error has occurred. Please contact Stytch if this occurs."]);
248
248
  }
249
249
  return a(t, I), r(t);
250
250
  }(),
251
- F = function (e) {
251
+ j = function (e) {
252
252
  function t() {
253
253
  return i(this, t), o(this, t, ["NoBiometricsRegistrationError", "There is no biometric registration available. Authenticate with another method and add a new biometric registration first."]);
254
254
  }
@@ -425,11 +425,11 @@ var g,
425
425
  function le(e) {
426
426
  switch (e.message) {
427
427
  case "internal_error":
428
- return new j(e.message);
428
+ return new F(e.message);
429
429
  case "no_current_session":
430
430
  return new R();
431
431
  case "no_biometrics_registration":
432
- return new F();
432
+ return new j();
433
433
  case "biometrics_unavailable":
434
434
  case "device_hardware_error":
435
435
  case "biometrics_not_available":
@@ -494,60 +494,75 @@ function le(e) {
494
494
  }
495
495
  }
496
496
  function de(e, t) {
497
- return function (e) {
498
- if (Array.isArray(e)) return e;
499
- }(e) || function (e, t) {
500
- var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
501
- if (null != r) {
502
- var n,
503
- i,
504
- o,
505
- s,
506
- a = [],
507
- c = !0,
508
- u = !1;
497
+ var r = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
498
+ if (!r) {
499
+ if (Array.isArray(e) || (r = function (e, t) {
500
+ if (!e) return;
501
+ if ("string" == typeof e) return he(e, t);
502
+ var r = Object.prototype.toString.call(e).slice(8, -1);
503
+ "Object" === r && e.constructor && (r = e.constructor.name);
504
+ if ("Map" === r || "Set" === r) return Array.from(e);
505
+ if ("Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return he(e, t);
506
+ }(e)) || t && e && "number" == typeof e.length) {
507
+ r && (e = r);
508
+ var _n = 0,
509
+ i = function i() {};
510
+ return {
511
+ s: i,
512
+ n: function n() {
513
+ return _n >= e.length ? {
514
+ done: !0
515
+ } : {
516
+ done: !1,
517
+ value: e[_n++]
518
+ };
519
+ },
520
+ e: function e(_e2) {
521
+ throw _e2;
522
+ },
523
+ f: i
524
+ };
525
+ }
526
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
527
+ }
528
+ var o,
529
+ s = !0,
530
+ a = !1;
531
+ return {
532
+ s: function s() {
533
+ r = r.call(e);
534
+ },
535
+ n: function n() {
536
+ var e = r.next();
537
+ return s = e.done, e;
538
+ },
539
+ e: function e(_e3) {
540
+ a = !0, o = _e3;
541
+ },
542
+ f: function f() {
509
543
  try {
510
- if (o = (r = r.call(e)).next, 0 === t) {
511
- if (Object(r) !== r) return;
512
- c = !1;
513
- } else for (; !(c = (n = o.call(r)).done) && (a.push(n.value), a.length !== t); c = !0);
514
- } catch (e) {
515
- u = !0, i = e;
544
+ s || null == r["return"] || r["return"]();
516
545
  } finally {
517
- try {
518
- if (!c && null != r["return"] && (s = r["return"](), Object(s) !== s)) return;
519
- } finally {
520
- if (u) throw i;
521
- }
546
+ if (a) throw o;
522
547
  }
523
- return a;
524
548
  }
525
- }(e, t) || he(e, t) || function () {
526
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
527
- }();
549
+ };
528
550
  }
529
551
  function he(e, t) {
530
- if (e) {
531
- if ("string" == typeof e) return pe(e, t);
532
- var r = Object.prototype.toString.call(e).slice(8, -1);
533
- return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? pe(e, t) : void 0;
534
- }
535
- }
536
- function pe(e, t) {
537
552
  (null == t || t > e.length) && (t = e.length);
538
553
  for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
539
554
  return n;
540
555
  }
541
- function fe(e) {
542
- return fe = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
556
+ function pe(e) {
557
+ return pe = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
543
558
  return _typeof(e);
544
559
  } : function (e) {
545
560
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
546
- }, fe(e);
561
+ }, pe(e);
547
562
  }
548
- function _e() {
563
+ function fe() {
549
564
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
550
- _e = function _e() {
565
+ fe = function fe() {
551
566
  return t;
552
567
  };
553
568
  var e,
@@ -614,20 +629,20 @@ function _e() {
614
629
  w = y && y(y(D([])));
615
630
  w && w !== r && n.call(w, s) && (k = w);
616
631
  var S = g.prototype = v.prototype = Object.create(k);
617
- function P(e) {
632
+ function C(e) {
618
633
  ["next", "throw", "return"].forEach(function (t) {
619
634
  u(e, t, function (e) {
620
635
  return this._invoke(t, e);
621
636
  });
622
637
  });
623
638
  }
624
- function C(e, t) {
639
+ function P(e, t) {
625
640
  function r(i, o, s, a) {
626
641
  var c = d(e[i], e, o);
627
642
  if ("throw" !== c.type) {
628
643
  var u = c.arg,
629
644
  l = u.value;
630
- return l && "object" == fe(l) && n.call(l, "__await") ? t.resolve(l.__await).then(function (e) {
645
+ return l && "object" == pe(l) && n.call(l, "__await") ? t.resolve(l.__await).then(function (e) {
631
646
  r("next", e, s, a);
632
647
  }, function (e) {
633
648
  r("throw", e, s, a);
@@ -726,7 +741,7 @@ function _e() {
726
741
  return o.next = o;
727
742
  }
728
743
  }
729
- throw new TypeError(fe(t) + " is not iterable");
744
+ throw new TypeError(pe(t) + " is not iterable");
730
745
  }
731
746
  return b.prototype = g, i(S, "constructor", {
732
747
  value: g,
@@ -743,15 +758,15 @@ function _e() {
743
758
  return {
744
759
  __await: e
745
760
  };
746
- }, P(C.prototype), u(C.prototype, a, function () {
761
+ }, C(P.prototype), u(P.prototype, a, function () {
747
762
  return this;
748
- }), t.AsyncIterator = C, t.async = function (e, r, n, i, o) {
763
+ }), t.AsyncIterator = P, t.async = function (e, r, n, i, o) {
749
764
  void 0 === o && (o = Promise);
750
- var s = new C(l(e, r, n, i), o);
765
+ var s = new P(l(e, r, n, i), o);
751
766
  return t.isGeneratorFunction(r) ? s : s.next().then(function (e) {
752
767
  return e.done ? e.value : s.next();
753
768
  });
754
- }, P(S), u(S, c, "Generator"), u(S, s, function () {
769
+ }, C(S), u(S, c, "Generator"), u(S, s, function () {
755
770
  return this;
756
771
  }), u(S, "toString", function () {
757
772
  return "[object Generator]";
@@ -847,46 +862,46 @@ function _e() {
847
862
  }
848
863
  }, t;
849
864
  }
850
- function me(e, t) {
865
+ function _e(e, t) {
851
866
  for (var r = 0; r < t.length; r++) {
852
867
  var n = t[r];
853
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, be(n.key), n);
868
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, ve(n.key), n);
854
869
  }
855
870
  }
856
- function ve(e, t, r) {
857
- return t && me(e.prototype, t), r && me(e, r), Object.defineProperty(e, "prototype", {
871
+ function me(e, t, r) {
872
+ return t && _e(e.prototype, t), r && _e(e, r), Object.defineProperty(e, "prototype", {
858
873
  writable: !1
859
874
  }), e;
860
875
  }
861
- function be(e) {
876
+ function ve(e) {
862
877
  var t = function (e, t) {
863
- if ("object" != fe(e) || !e) return e;
878
+ if ("object" != pe(e) || !e) return e;
864
879
  var r = e[Symbol.toPrimitive];
865
880
  if (void 0 !== r) {
866
881
  var n = r.call(e, t || "default");
867
- if ("object" != fe(n)) return n;
882
+ if ("object" != pe(n)) return n;
868
883
  throw new TypeError("@@toPrimitive must return a primitive value.");
869
884
  }
870
885
  return ("string" === t ? String : Number)(e);
871
886
  }(e, "string");
872
- return "symbol" == fe(t) ? t : String(t);
887
+ return "symbol" == pe(t) ? t : String(t);
873
888
  }
874
- function ge(e, t) {
889
+ function be(e, t) {
875
890
  if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
876
891
  }
877
- function ke(e, t, r) {
878
- return t = Pe(t), function (e, t) {
879
- if (t && ("object" === fe(t) || "function" == typeof t)) return t;
892
+ function ge(e, t, r) {
893
+ return t = Se(t), function (e, t) {
894
+ if (t && ("object" === pe(t) || "function" == typeof t)) return t;
880
895
  if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
881
896
  return function (e) {
882
897
  if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
883
898
  return e;
884
899
  }(e);
885
- }(e, we() ? Reflect.construct(t, r || [], Pe(e).constructor) : t.apply(e, r));
900
+ }(e, ye() ? Reflect.construct(t, r || [], Se(e).constructor) : t.apply(e, r));
886
901
  }
887
- function ye(e) {
902
+ function ke(e) {
888
903
  var t = "function" == typeof Map ? new Map() : void 0;
889
- return ye = function ye(e) {
904
+ return ke = function ke(e) {
890
905
  if (null === e || !function (e) {
891
906
  try {
892
907
  return -1 !== Function.toString.call(e).indexOf("[native code]");
@@ -901,12 +916,12 @@ function ye(e) {
901
916
  }
902
917
  function r() {
903
918
  return function (e, t, r) {
904
- if (we()) return Reflect.construct.apply(null, arguments);
919
+ if (ye()) return Reflect.construct.apply(null, arguments);
905
920
  var n = [null];
906
921
  n.push.apply(n, t);
907
922
  var i = new (e.bind.apply(e, n))();
908
- return r && Se(i, r.prototype), i;
909
- }(e, arguments, Pe(this).constructor);
923
+ return r && we(i, r.prototype), i;
924
+ }(e, arguments, Se(this).constructor);
910
925
  }
911
926
  return r.prototype = Object.create(e.prototype, {
912
927
  constructor: {
@@ -915,26 +930,26 @@ function ye(e) {
915
930
  writable: !0,
916
931
  configurable: !0
917
932
  }
918
- }), Se(r, e);
919
- }, ye(e);
933
+ }), we(r, e);
934
+ }, ke(e);
920
935
  }
921
- function we() {
936
+ function ye() {
922
937
  try {
923
938
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
924
939
  } catch (e) {}
925
- return (we = function we() {
940
+ return (ye = function ye() {
926
941
  return !!e;
927
942
  })();
928
943
  }
929
- function Se(e, t) {
930
- return Se = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
944
+ function we(e, t) {
945
+ return we = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
931
946
  return e.__proto__ = t, e;
932
- }, Se(e, t);
947
+ }, we(e, t);
933
948
  }
934
- function Pe(e) {
935
- return Pe = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (e) {
949
+ function Se(e) {
950
+ return Se = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (e) {
936
951
  return e.__proto__ || Object.getPrototypeOf(e);
937
- }, Pe(e);
952
+ }, Se(e);
938
953
  }
939
954
  !function (e) {
940
955
  e.emailMagicLinks = "emailMagicLinks", e.sso = "sso", e.passwords = "passwords", e.oauth = "oauth";
@@ -946,7 +961,7 @@ function Pe(e) {
946
961
  e.Google = "google", e.Microsoft = "microsoft";
947
962
  }(w || (w = {}));
948
963
  var Ce;
949
- function Te(e, t, r, n) {
964
+ function Pe(e, t, r, n) {
950
965
  return new (r || (r = Promise))(function (i, o) {
951
966
  function s(e) {
952
967
  try {
@@ -974,11 +989,11 @@ function Te(e, t, r, n) {
974
989
  "function" == typeof SuppressedError && SuppressedError, function (e) {
975
990
  e.RequiredCatcha = "Catcha Required";
976
991
  }(Ce || (Ce = {}));
977
- var Oe,
978
- xe = function (e) {
992
+ var Te,
993
+ Oe = function (e) {
979
994
  function t(e) {
980
995
  var r;
981
- return ge(this, t), (r = ke(this, t, [e])).type = e, r;
996
+ return be(this, t), (r = ge(this, t, [e])).type = e, r;
982
997
  }
983
998
  return function (e, t) {
984
999
  if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
@@ -990,10 +1005,10 @@ var Oe,
990
1005
  }
991
1006
  }), Object.defineProperty(e, "prototype", {
992
1007
  writable: !1
993
- }), t && Se(e, t);
994
- }(t, ye(Error)), ve(t);
1008
+ }), t && we(e, t);
1009
+ }(t, ke(Error)), me(t);
995
1010
  }();
996
- function Ae(e) {
1011
+ function xe(e) {
997
1012
  var t,
998
1013
  r = e.method,
999
1014
  n = e.finalURL,
@@ -1001,9 +1016,9 @@ function Ae(e) {
1001
1016
  o = e.xSDKClientHeader,
1002
1017
  s = e.xSDKParentHostHeader,
1003
1018
  a = e.body;
1004
- return Te(this, void 0, void 0, _e().mark(function e() {
1019
+ return Pe(this, void 0, void 0, fe().mark(function e() {
1005
1020
  var c, u, l, d, h, p;
1006
- return _e().wrap(function (e) {
1021
+ return fe().wrap(function (e) {
1007
1022
  for (;;) switch (e.prev = e.next) {
1008
1023
  case 0:
1009
1024
  return c = {
@@ -1067,7 +1082,7 @@ function Ae(e) {
1067
1082
  e.next = 49;
1068
1083
  break;
1069
1084
  }
1070
- throw new xe(Ce.RequiredCatcha);
1085
+ throw new Oe(Ce.RequiredCatcha);
1071
1086
  case 49:
1072
1087
  throw new A("Invalid response from the Stytch servers.");
1073
1088
  case 50:
@@ -1077,23 +1092,23 @@ function Ae(e) {
1077
1092
  }, e, null, [[3, 9], [15, 22], [26, 32], [38, 44]]);
1078
1093
  }));
1079
1094
  }
1080
- var Ee = new Uint8Array(16);
1081
- function De() {
1082
- if (!Oe && !(Oe = "undefined" != typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || "undefined" != typeof msCrypto && "function" == typeof msCrypto.getRandomValues && msCrypto.getRandomValues.bind(msCrypto))) throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1083
- return Oe(Ee);
1095
+ var Ae = new Uint8Array(16);
1096
+ function Ee() {
1097
+ if (!Te && !(Te = "undefined" != typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || "undefined" != typeof msCrypto && "function" == typeof msCrypto.getRandomValues && msCrypto.getRandomValues.bind(msCrypto))) throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1098
+ return Te(Ae);
1084
1099
  }
1085
- var Ie = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
1086
- for (var Re = [], je = 0; je < 256; ++je) Re.push((je + 256).toString(16).substr(1));
1100
+ var De = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
1101
+ for (var Ie = [], Re = 0; Re < 256; ++Re) Ie.push((Re + 256).toString(16).substr(1));
1087
1102
  function Fe(e) {
1088
1103
  var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
1089
- r = (Re[e[t + 0]] + Re[e[t + 1]] + Re[e[t + 2]] + Re[e[t + 3]] + "-" + Re[e[t + 4]] + Re[e[t + 5]] + "-" + Re[e[t + 6]] + Re[e[t + 7]] + "-" + Re[e[t + 8]] + Re[e[t + 9]] + "-" + Re[e[t + 10]] + Re[e[t + 11]] + Re[e[t + 12]] + Re[e[t + 13]] + Re[e[t + 14]] + Re[e[t + 15]]).toLowerCase();
1104
+ r = (Ie[e[t + 0]] + Ie[e[t + 1]] + Ie[e[t + 2]] + Ie[e[t + 3]] + "-" + Ie[e[t + 4]] + Ie[e[t + 5]] + "-" + Ie[e[t + 6]] + Ie[e[t + 7]] + "-" + Ie[e[t + 8]] + Ie[e[t + 9]] + "-" + Ie[e[t + 10]] + Ie[e[t + 11]] + Ie[e[t + 12]] + Ie[e[t + 13]] + Ie[e[t + 14]] + Ie[e[t + 15]]).toLowerCase();
1090
1105
  if (!function (e) {
1091
- return "string" == typeof e && Ie.test(e);
1106
+ return "string" == typeof e && De.test(e);
1092
1107
  }(r)) throw TypeError("Stringified UUID is invalid");
1093
1108
  return r;
1094
1109
  }
1095
- function Le(e, t, r) {
1096
- var n = (e = e || {}).random || (e.rng || De)();
1110
+ function je(e, t, r) {
1111
+ var n = (e = e || {}).random || (e.rng || Ee)();
1097
1112
  if (n[6] = 15 & n[6] | 64, n[8] = 63 & n[8] | 128, t) {
1098
1113
  r = r || 0;
1099
1114
  for (var i = 0; i < 16; ++i) t[r + i] = n[i];
@@ -1101,19 +1116,19 @@ function Le(e, t, r) {
1101
1116
  }
1102
1117
  return Fe(n);
1103
1118
  }
1104
- var Me = {};
1105
- function Be(e, t) {
1106
- return Te(this, void 0, void 0, _e().mark(function r() {
1107
- return _e().wrap(function (r) {
1119
+ var Le = {};
1120
+ function Me(e, t) {
1121
+ return Pe(this, void 0, void 0, fe().mark(function r() {
1122
+ return fe().wrap(function (r) {
1108
1123
  for (;;) switch (r.prev = r.next) {
1109
1124
  case 0:
1110
- if (void 0 === Me[e]) {
1125
+ if (void 0 === Le[e]) {
1111
1126
  r.next = 2;
1112
1127
  break;
1113
1128
  }
1114
- return r.abrupt("return", Me[e]);
1129
+ return r.abrupt("return", Le[e]);
1115
1130
  case 2:
1116
- return Me[e] = Ke(e, t), r.abrupt("return", Me[e]);
1131
+ return Le[e] = Be(e, t), r.abrupt("return", Le[e]);
1117
1132
  case 4:
1118
1133
  case "end":
1119
1134
  return r.stop();
@@ -1121,10 +1136,10 @@ function Be(e, t) {
1121
1136
  }, r);
1122
1137
  }));
1123
1138
  }
1124
- function Ke(e, t) {
1139
+ function Be(e, t) {
1125
1140
  return new Promise(function (r, n) {
1126
1141
  var i = function (e) {
1127
- var t = ze(e);
1142
+ var t = Ke(e);
1128
1143
  if (t[0]) return t[0];
1129
1144
  }(e);
1130
1145
  if (i && "true" === i.dataset.loaded) try {
@@ -1148,94 +1163,47 @@ function Ke(e, t) {
1148
1163
  });
1149
1164
  });
1150
1165
  }
1151
- var ze = function ze(e) {
1166
+ var Ke = function Ke(e) {
1152
1167
  return document.querySelectorAll('script[src="'.concat(e, '"]'));
1153
1168
  };
1154
- var Ne,
1155
- Ue = ["[Stytch]"],
1156
- qe = function qe() {
1169
+ var ze,
1170
+ Ne = ["[Stytch]"],
1171
+ Ue = function Ue() {
1157
1172
  for (var e, t = arguments.length, r = new Array(t), n = 0; n < t; n++) r[n] = arguments[n];
1158
- return (e = console).warn.apply(e, Ue.concat(r));
1173
+ return (e = console).warn.apply(e, Ne.concat(r));
1159
1174
  },
1160
- We = function We() {
1175
+ qe = function qe() {
1161
1176
  for (var e, t = arguments.length, r = new Array(t), n = 0; n < t; n++) r[n] = arguments[n];
1162
- return (e = console).error.apply(e, Ue.concat(r));
1177
+ return (e = console).error.apply(e, Ne.concat(r));
1163
1178
  },
1164
- He = "\nYou can find your public token at https://stytch.com/dashboard/api-keys.",
1165
- Ge = function Ge(e) {
1179
+ We = "\nYou can find your public token at https://stytch.com/dashboard/api-keys.",
1180
+ He = function He(e) {
1166
1181
  return e.includes("public-token-test");
1167
1182
  },
1168
- Ve = function Ve(e) {
1183
+ Ge = function Ge(e) {
1169
1184
  var t = {
1170
1185
  isObject: function isObject(r, n) {
1171
- var i = "object" === fe(n) && !Array.isArray(n) && null !== n;
1172
- if (!i) throw new P(e, r + " must be an object.");
1186
+ var i = "object" === pe(n) && !Array.isArray(n) && null !== n;
1187
+ if (!i) throw new C(e, r + " must be an object.");
1173
1188
  return t;
1174
1189
  },
1175
1190
  isOptionalObject: function isOptionalObject(e, r) {
1176
1191
  return void 0 === r ? t : t.isObject(e, r);
1177
1192
  },
1178
1193
  isString: function isString(r, n) {
1179
- if ("string" != typeof n) throw new P(e, r + " must be a string.");
1194
+ if ("string" != typeof n) throw new C(e, r + " must be a string.");
1180
1195
  return t;
1181
1196
  },
1182
1197
  isOptionalString: function isOptionalString(e, r) {
1183
1198
  return void 0 === r ? t : t.isString(e, r);
1184
1199
  },
1185
1200
  isStringArray: function isStringArray(r, n) {
1186
- if (!Array.isArray(n)) throw new P(e, r + " must be an array of strings.");
1201
+ if (!Array.isArray(n)) throw new C(e, r + " must be an array of strings.");
1187
1202
  var i,
1188
- o = function (e, t) {
1189
- var r = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
1190
- if (!r) {
1191
- if (Array.isArray(e) || (r = he(e)) || t && e && "number" == typeof e.length) {
1192
- r && (e = r);
1193
- var _n = 0,
1194
- i = function i() {};
1195
- return {
1196
- s: i,
1197
- n: function n() {
1198
- return _n >= e.length ? {
1199
- done: !0
1200
- } : {
1201
- done: !1,
1202
- value: e[_n++]
1203
- };
1204
- },
1205
- e: function e(_e2) {
1206
- throw _e2;
1207
- },
1208
- f: i
1209
- };
1210
- }
1211
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1212
- }
1213
- var o,
1214
- s = !0,
1215
- a = !1;
1216
- return {
1217
- s: function s() {
1218
- r = r.call(e);
1219
- },
1220
- n: function n() {
1221
- var e = r.next();
1222
- return s = e.done, e;
1223
- },
1224
- e: function e(_e3) {
1225
- a = !0, o = _e3;
1226
- },
1227
- f: function f() {
1228
- try {
1229
- s || null == r["return"] || r["return"]();
1230
- } finally {
1231
- if (a) throw o;
1232
- }
1233
- }
1234
- };
1235
- }(n);
1203
+ o = de(n);
1236
1204
  try {
1237
1205
  for (o.s(); !(i = o.n()).done;) {
1238
- if ("string" != typeof i.value) throw new P(e, r + " must be an array of strings.");
1206
+ if ("string" != typeof i.value) throw new C(e, r + " must be an array of strings.");
1239
1207
  }
1240
1208
  } catch (e) {
1241
1209
  o.e(e);
@@ -1248,14 +1216,14 @@ var Ne,
1248
1216
  return void 0 === r ? t : t.isStringArray(e, r);
1249
1217
  },
1250
1218
  isNumber: function isNumber(r, n) {
1251
- if ("number" != typeof n) throw new P(e, r + " must be a number.");
1219
+ if ("number" != typeof n) throw new C(e, r + " must be a number.");
1252
1220
  return t;
1253
1221
  },
1254
1222
  isOptionalNumber: function isOptionalNumber(e, r) {
1255
1223
  return void 0 === r ? t : t.isNumber(e, r);
1256
1224
  },
1257
1225
  isBoolean: function isBoolean(r, n) {
1258
- if ("boolean" != typeof n) throw new P(e, r + " must be a boolean.");
1226
+ if ("boolean" != typeof n) throw new C(e, r + " must be a boolean.");
1259
1227
  return t;
1260
1228
  },
1261
1229
  isOptionalBoolean: function isOptionalBoolean(e, r) {
@@ -1264,14 +1232,14 @@ var Ne,
1264
1232
  };
1265
1233
  return t;
1266
1234
  },
1267
- Ye = ve(function e(t, r, n) {
1235
+ Ve = me(function e(t, r, n) {
1268
1236
  var i = this,
1269
1237
  o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : function () {
1270
1238
  return Promise.resolve(void 0);
1271
1239
  };
1272
- ge(this, e), this.bootstrapPromise = n, this.isEnabled = function () {
1273
- return Te(i, void 0, void 0, _e().mark(function e() {
1274
- return _e().wrap(function (e) {
1240
+ be(this, e), this.bootstrapPromise = n, this.isEnabled = function () {
1241
+ return Pe(i, void 0, void 0, fe().mark(function e() {
1242
+ return fe().wrap(function (e) {
1275
1243
  for (;;) switch (e.prev = e.next) {
1276
1244
  case 0:
1277
1245
  return e.abrupt("return", this.state.then(function (e) {
@@ -1284,9 +1252,9 @@ var Ne,
1284
1252
  }, e, this);
1285
1253
  }));
1286
1254
  }, this.getTelemetryID = function () {
1287
- return Te(i, void 0, void 0, _e().mark(function e() {
1255
+ return Pe(i, void 0, void 0, fe().mark(function e() {
1288
1256
  var t, r, n, i;
1289
- return _e().wrap(function (e) {
1257
+ return fe().wrap(function (e) {
1290
1258
  for (;;) switch (e.prev = e.next) {
1291
1259
  case 0:
1292
1260
  return e.next = 2, this.state;
@@ -1307,9 +1275,9 @@ var Ne,
1307
1275
  }, e, this);
1308
1276
  }));
1309
1277
  }, this.getDFPTelemetryIDAndCaptcha = function () {
1310
- return Te(i, void 0, void 0, _e().mark(function e() {
1278
+ return Pe(i, void 0, void 0, fe().mark(function e() {
1311
1279
  var t, r, n, i, o, s;
1312
- return _e().wrap(function (e) {
1280
+ return fe().wrap(function (e) {
1313
1281
  for (;;) switch (e.prev = e.next) {
1314
1282
  case 0:
1315
1283
  return e.next = 2, this.state;
@@ -1352,9 +1320,9 @@ var Ne,
1352
1320
  }, e, this);
1353
1321
  }));
1354
1322
  }, this.retryWithCaptchaAndDFP = function (e, t) {
1355
- return Te(i, void 0, void 0, _e().mark(function r() {
1323
+ return Pe(i, void 0, void 0, fe().mark(function r() {
1356
1324
  var n, i, o;
1357
- return _e().wrap(function (r) {
1325
+ return fe().wrap(function (r) {
1358
1326
  for (;;) switch (r.prev = r.next) {
1359
1327
  case 0:
1360
1328
  return r.next = 2, this.state;
@@ -1383,8 +1351,8 @@ var Ne,
1383
1351
  }, r, this);
1384
1352
  }));
1385
1353
  }, this.state = n.then(function (e) {
1386
- return Te(i, void 0, void 0, _e().mark(function n() {
1387
- return _e().wrap(function (n) {
1354
+ return Pe(i, void 0, void 0, fe().mark(function n() {
1355
+ return fe().wrap(function (n) {
1388
1356
  for (;;) switch (n.prev = n.next) {
1389
1357
  case 0:
1390
1358
  if (e.runDFPProtectedAuth) {
@@ -1399,7 +1367,7 @@ var Ne,
1399
1367
  executeRecaptcha: o
1400
1368
  });
1401
1369
  case 2:
1402
- return n.next = 4, Be("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
1370
+ return n.next = 4, Me("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
1403
1371
  return window.GetTelemetryID;
1404
1372
  });
1405
1373
  case 4:
@@ -1419,11 +1387,11 @@ var Ne,
1419
1387
  }));
1420
1388
  });
1421
1389
  }),
1422
- Je = function Je() {
1390
+ Ye = function Ye() {
1423
1391
  return {
1424
1392
  isEnabled: function isEnabled() {
1425
- return Te(void 0, void 0, void 0, _e().mark(function e() {
1426
- return _e().wrap(function (e) {
1393
+ return Pe(void 0, void 0, void 0, fe().mark(function e() {
1394
+ return fe().wrap(function (e) {
1427
1395
  for (;;) switch (e.prev = e.next) {
1428
1396
  case 0:
1429
1397
  return e.abrupt("return", !1);
@@ -1435,8 +1403,8 @@ var Ne,
1435
1403
  }));
1436
1404
  },
1437
1405
  getTelemetryID: function getTelemetryID() {
1438
- return Te(void 0, void 0, void 0, _e().mark(function e() {
1439
- return _e().wrap(function (e) {
1406
+ return Pe(void 0, void 0, void 0, fe().mark(function e() {
1407
+ return fe().wrap(function (e) {
1440
1408
  for (;;) switch (e.prev = e.next) {
1441
1409
  case 0:
1442
1410
  return e.abrupt("return", void 0);
@@ -1448,8 +1416,8 @@ var Ne,
1448
1416
  }));
1449
1417
  },
1450
1418
  getDFPTelemetryIDAndCaptcha: function getDFPTelemetryIDAndCaptcha() {
1451
- return Te(void 0, void 0, void 0, _e().mark(function e() {
1452
- return _e().wrap(function (e) {
1419
+ return Pe(void 0, void 0, void 0, fe().mark(function e() {
1420
+ return fe().wrap(function (e) {
1453
1421
  for (;;) switch (e.prev = e.next) {
1454
1422
  case 0:
1455
1423
  return e.abrupt("return", {
@@ -1464,8 +1432,8 @@ var Ne,
1464
1432
  }));
1465
1433
  },
1466
1434
  retryWithCaptchaAndDFP: function retryWithCaptchaAndDFP() {
1467
- return Te(void 0, void 0, void 0, _e().mark(function e() {
1468
- return _e().wrap(function (e) {
1435
+ return Pe(void 0, void 0, void 0, fe().mark(function e() {
1436
+ return fe().wrap(function (e) {
1469
1437
  for (;;) switch (e.prev = e.next) {
1470
1438
  case 0:
1471
1439
  throw new Error("DFP protected auth is disabled");
@@ -1478,11 +1446,11 @@ var Ne,
1478
1446
  }
1479
1447
  };
1480
1448
  },
1481
- $e = function () {
1449
+ Je = function () {
1482
1450
  function e() {
1483
- ge(this, e);
1451
+ be(this, e);
1484
1452
  }
1485
- return ve(e, null, [{
1453
+ return me(e, null, [{
1486
1454
  key: "marshall",
1487
1455
  value: function value(e) {
1488
1456
  return Object.assign(Object.assign({}, e), {
@@ -1504,7 +1472,7 @@ var Ne,
1504
1472
  case "SDKAPIUnreachableError":
1505
1473
  return e.inflate(S, t);
1506
1474
  case "StytchSDKSchemaError":
1507
- return e.inflate(C, t);
1475
+ return e.inflate(P, t);
1508
1476
  case "StytchAPIUnreachableError":
1509
1477
  return e.inflate(A, t);
1510
1478
  case "StytchAPISchemaError":
@@ -1530,11 +1498,11 @@ var Ne,
1530
1498
  }
1531
1499
  }]), e;
1532
1500
  }(),
1533
- Xe = function () {
1501
+ $e = function () {
1534
1502
  function e(t) {
1535
- ge(this, e), this.maxBatchSize = t.maxBatchSize, this.logEventURL = t.logEventURL, setInterval(this.flush.bind(this), t.intervalDurationMs), this.batch = [];
1503
+ be(this, e), this.maxBatchSize = t.maxBatchSize, this.logEventURL = t.logEventURL, setInterval(this.flush.bind(this), t.intervalDurationMs), this.batch = [];
1536
1504
  }
1537
- return ve(e, [{
1505
+ return me(e, [{
1538
1506
  key: "logEvent",
1539
1507
  value: function value(e, t) {
1540
1508
  this.batch.push({
@@ -1545,9 +1513,9 @@ var Ne,
1545
1513
  }, {
1546
1514
  key: "flush",
1547
1515
  value: function value() {
1548
- return Te(this, void 0, void 0, _e().mark(function e() {
1516
+ return Pe(this, void 0, void 0, fe().mark(function e() {
1549
1517
  var t;
1550
- return _e().wrap(function (e) {
1518
+ return fe().wrap(function (e) {
1551
1519
  for (;;) switch (e.prev = e.next) {
1552
1520
  case 0:
1553
1521
  if (this.batch.length) {
@@ -1579,26 +1547,26 @@ var Ne,
1579
1547
  }();
1580
1548
  !function (e) {
1581
1549
  e.LoginOrCreateEML = "login_or_create_eml", e.LoginOrCreateOTP = "login_or_create_otp", e.ResetPassword = "reset_password";
1582
- }(Ne || (Ne = {})), Promise.resolve({
1550
+ }(ze || (ze = {})), Promise.resolve({
1583
1551
  pkceRequiredForEmailMagicLinks: !1
1584
1552
  }), Promise.resolve({
1585
1553
  pkceRequiredForPasswordResets: !1
1586
1554
  });
1587
- var Ze = Promise.resolve({
1555
+ var Xe = Promise.resolve({
1588
1556
  pkceRequiredForEmailMagicLinks: !1
1589
1557
  }),
1590
- Qe = function () {
1558
+ Ze = function () {
1591
1559
  function e(t, r, n, i) {
1592
1560
  var o = this,
1593
- s = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : Ze,
1594
- a = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Je();
1595
- ge(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._passwordResetPKCEManager = i, this._config = s, this.dfpProtectedAuth = a, this.email = {
1561
+ s = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : Xe,
1562
+ a = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Ye();
1563
+ be(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._passwordResetPKCEManager = i, this._config = s, this.dfpProtectedAuth = a, this.email = {
1596
1564
  invite: function invite(e) {
1597
- return Te(o, void 0, void 0, _e().mark(function t() {
1598
- return _e().wrap(function (t) {
1565
+ return Pe(o, void 0, void 0, fe().mark(function t() {
1566
+ return fe().wrap(function (t) {
1599
1567
  for (;;) switch (t.prev = t.next) {
1600
1568
  case 0:
1601
- return Ve("stytch.magicLinks.email.loginOrSignup").isString("email_address", e.email_address).isOptionalString("invite_redirect_url", e.invite_redirect_url).isOptionalString("invite_template_id", e.invite_template_id).isOptionalString("name", e.name).isOptionalString("locale", e.locale).isOptionalStringArray("roles", e.roles), t.abrupt("return", this._networkClient.fetchSDK({
1569
+ return Ge("stytch.magicLinks.email.loginOrSignup").isString("email_address", e.email_address).isOptionalString("invite_redirect_url", e.invite_redirect_url).isOptionalString("invite_template_id", e.invite_template_id).isOptionalString("name", e.name).isOptionalString("locale", e.locale).isOptionalStringArray("roles", e.roles), t.abrupt("return", this._networkClient.fetchSDK({
1602
1570
  url: "/b2b/magic_links/email/invite",
1603
1571
  body: e,
1604
1572
  errorMessage: "Failed to send invite.",
@@ -1612,12 +1580,12 @@ var Ze = Promise.resolve({
1612
1580
  }));
1613
1581
  },
1614
1582
  loginOrSignup: function loginOrSignup(e) {
1615
- return Te(o, void 0, void 0, _e().mark(function t() {
1583
+ return Pe(o, void 0, void 0, fe().mark(function t() {
1616
1584
  var r, n;
1617
- return _e().wrap(function (t) {
1585
+ return fe().wrap(function (t) {
1618
1586
  for (;;) switch (t.prev = t.next) {
1619
1587
  case 0:
1620
- return Ve("stytch.magicLinks.email.loginOrSignup").isString("email_address", e.email_address).isString("organization_id", e.organization_id).isOptionalString("login_redirect_url", e.login_redirect_url).isOptionalString("login_template_id", e.login_template_id).isOptionalString("signup_redirect_url", e.signup_redirect_url).isOptionalString("signup_template_id", e.signup_template_id).isOptionalString("locale", e.locale), t.next = 3, this.getCodeChallenge();
1588
+ return Ge("stytch.magicLinks.email.loginOrSignup").isString("email_address", e.email_address).isString("organization_id", e.organization_id).isOptionalString("login_redirect_url", e.login_redirect_url).isOptionalString("login_template_id", e.login_template_id).isOptionalString("signup_redirect_url", e.signup_redirect_url).isOptionalString("signup_template_id", e.signup_template_id).isOptionalString("locale", e.locale), t.next = 3, this.getCodeChallenge();
1621
1589
  case 3:
1622
1590
  return r = t.sent, n = Object.assign(Object.assign({}, e), {
1623
1591
  pkce_code_challenge: r
@@ -1636,12 +1604,12 @@ var Ze = Promise.resolve({
1636
1604
  },
1637
1605
  discovery: {
1638
1606
  send: function send(e) {
1639
- return Te(o, void 0, void 0, _e().mark(function t() {
1607
+ return Pe(o, void 0, void 0, fe().mark(function t() {
1640
1608
  var r, n;
1641
- return _e().wrap(function (t) {
1609
+ return fe().wrap(function (t) {
1642
1610
  for (;;) switch (t.prev = t.next) {
1643
1611
  case 0:
1644
- return Ve("stytch.magicLinks.email.discovery.send").isString("email_address", e.email_address).isOptionalString("discovery_redirect_url", e.discovery_redirect_url).isOptionalString("login_template_id", e.login_template_id).isOptionalString("locale", e.locale), t.next = 3, this.getCodeChallenge();
1612
+ return Ge("stytch.magicLinks.email.discovery.send").isString("email_address", e.email_address).isOptionalString("discovery_redirect_url", e.discovery_redirect_url).isOptionalString("login_template_id", e.login_template_id).isOptionalString("locale", e.locale), t.next = 3, this.getCodeChallenge();
1645
1613
  case 3:
1646
1614
  return r = t.sent, n = Object.assign(Object.assign({}, e), {
1647
1615
  pkce_code_challenge: r
@@ -1660,12 +1628,12 @@ var Ze = Promise.resolve({
1660
1628
  }
1661
1629
  }
1662
1630
  }, this.authenticate = function (e) {
1663
- return Te(o, void 0, void 0, _e().mark(function t() {
1631
+ return Pe(o, void 0, void 0, fe().mark(function t() {
1664
1632
  var r, n;
1665
- return _e().wrap(function (t) {
1633
+ return fe().wrap(function (t) {
1666
1634
  for (;;) switch (t.prev = t.next) {
1667
1635
  case 0:
1668
- return Ve("stytch.magicLinks.authenticate").isString("magic_links_token", e.magic_links_token).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._passwordResetPKCEManager.getPKPair();
1636
+ return Ge("stytch.magicLinks.authenticate").isString("magic_links_token", e.magic_links_token).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._passwordResetPKCEManager.getPKPair();
1669
1637
  case 3:
1670
1638
  if (r = t.sent, n = null, !(null == r ? void 0 : r.code_verifier)) {
1671
1639
  t.next = 19;
@@ -1716,12 +1684,12 @@ var Ze = Promise.resolve({
1716
1684
  }));
1717
1685
  }, this.discovery = {
1718
1686
  authenticate: function authenticate(e) {
1719
- return Te(o, void 0, void 0, _e().mark(function t() {
1687
+ return Pe(o, void 0, void 0, fe().mark(function t() {
1720
1688
  var r, n, i, o, s, a;
1721
- return _e().wrap(function (t) {
1689
+ return fe().wrap(function (t) {
1722
1690
  for (;;) switch (t.prev = t.next) {
1723
1691
  case 0:
1724
- return Ve("stytch.magicLinks.discovery.authenticate").isString("discovery_magic_links_token", e.discovery_magic_links_token), t.next = 3, this._pkceManager.getPKPair();
1692
+ return Ge("stytch.magicLinks.discovery.authenticate").isString("discovery_magic_links_token", e.discovery_magic_links_token), t.next = 3, this._pkceManager.getPKPair();
1725
1693
  case 3:
1726
1694
  return r = t.sent, t.next = 6, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1727
1695
  case 6:
@@ -1752,12 +1720,12 @@ var Ze = Promise.resolve({
1752
1720
  }
1753
1721
  };
1754
1722
  }
1755
- return ve(e, [{
1723
+ return me(e, [{
1756
1724
  key: "getCodeChallenge",
1757
1725
  value: function value() {
1758
- return Te(this, void 0, void 0, _e().mark(function e() {
1726
+ return Pe(this, void 0, void 0, fe().mark(function e() {
1759
1727
  var t, r;
1760
- return _e().wrap(function (e) {
1728
+ return fe().wrap(function (e) {
1761
1729
  for (;;) switch (e.prev = e.next) {
1762
1730
  case 0:
1763
1731
  return e.next = 2, this._config;
@@ -1789,9 +1757,9 @@ var Ze = Promise.resolve({
1789
1757
  }, {
1790
1758
  key: "handlePKCEForAuthenticate",
1791
1759
  value: function value(e, t) {
1792
- return Te(this, void 0, void 0, _e().mark(function r() {
1760
+ return Pe(this, void 0, void 0, fe().mark(function r() {
1793
1761
  var n, i, o, s, a, c;
1794
- return _e().wrap(function (r) {
1762
+ return fe().wrap(function (r) {
1795
1763
  for (;;) switch (r.prev = r.next) {
1796
1764
  case 0:
1797
1765
  return r.next = 2, e.getPKPair();
@@ -1829,12 +1797,12 @@ var Ze = Promise.resolve({
1829
1797
  }
1830
1798
  }]), e;
1831
1799
  }(),
1832
- et = ve(function e(t, r) {
1800
+ Qe = me(function e(t, r) {
1833
1801
  var n = this;
1834
- ge(this, e), this._networkClient = t, this._subscriptionService = r, this.get = function () {
1835
- return Te(n, void 0, void 0, _e().mark(function e() {
1802
+ be(this, e), this._networkClient = t, this._subscriptionService = r, this.get = function () {
1803
+ return Pe(n, void 0, void 0, fe().mark(function e() {
1836
1804
  var t;
1837
- return _e().wrap(function (e) {
1805
+ return fe().wrap(function (e) {
1838
1806
  for (;;) switch (e.prev = e.next) {
1839
1807
  case 0:
1840
1808
  return e.next = 2, this._networkClient.fetchSDK({
@@ -1852,18 +1820,23 @@ var Ze = Promise.resolve({
1852
1820
  }));
1853
1821
  }, this.getSync = function () {
1854
1822
  return n._subscriptionService.getMember();
1823
+ }, this.getInfo = function () {
1824
+ return {
1825
+ member: n.getSync(),
1826
+ fromCache: n._subscriptionService.getFromCache()
1827
+ };
1855
1828
  }, this.onChange = function (e) {
1856
1829
  return n._subscriptionService.subscribeToState(function (t) {
1857
1830
  var r;
1858
1831
  return e(null !== (r = null == t ? void 0 : t.member) && void 0 !== r ? r : null);
1859
1832
  });
1860
1833
  }, this.update = function (e) {
1861
- return Te(n, void 0, void 0, _e().mark(function t() {
1834
+ return Pe(n, void 0, void 0, fe().mark(function t() {
1862
1835
  var r;
1863
- return _e().wrap(function (t) {
1836
+ return fe().wrap(function (t) {
1864
1837
  for (;;) switch (t.prev = t.next) {
1865
1838
  case 0:
1866
- return Ve("stytch.self.update").isOptionalString("name", e.name).isOptionalObject("untrusted_metadata", e.untrusted_metadata).isOptionalBoolean("mfa_enrolled", e.mfa_enrolled).isOptionalString("mfa_phone_number", e.mfa_phone_number).isOptionalString("default_mfa_method", e.default_mfa_method), t.next = 3, this._networkClient.fetchSDK({
1839
+ return Ge("stytch.self.update").isOptionalString("name", e.name).isOptionalObject("untrusted_metadata", e.untrusted_metadata).isOptionalBoolean("mfa_enrolled", e.mfa_enrolled).isOptionalString("mfa_phone_number", e.mfa_phone_number).isOptionalString("default_mfa_method", e.default_mfa_method), t.next = 3, this._networkClient.fetchSDK({
1867
1840
  url: "/b2b/organizations/members/update",
1868
1841
  body: e,
1869
1842
  errorMessage: "Failed to update member.",
@@ -1878,9 +1851,9 @@ var Ze = Promise.resolve({
1878
1851
  }, t, this);
1879
1852
  }));
1880
1853
  }, this.deleteMFAPhoneNumber = function () {
1881
- return Te(n, void 0, void 0, _e().mark(function e() {
1854
+ return Pe(n, void 0, void 0, fe().mark(function e() {
1882
1855
  var t;
1883
- return _e().wrap(function (e) {
1856
+ return fe().wrap(function (e) {
1884
1857
  for (;;) switch (e.prev = e.next) {
1885
1858
  case 0:
1886
1859
  return e.next = 2, this._networkClient.fetchSDK({
@@ -1897,9 +1870,9 @@ var Ze = Promise.resolve({
1897
1870
  }, e, this);
1898
1871
  }));
1899
1872
  }, this.deleteMFATOTP = function () {
1900
- return Te(n, void 0, void 0, _e().mark(function e() {
1873
+ return Pe(n, void 0, void 0, fe().mark(function e() {
1901
1874
  var t;
1902
- return _e().wrap(function (e) {
1875
+ return fe().wrap(function (e) {
1903
1876
  for (;;) switch (e.prev = e.next) {
1904
1877
  case 0:
1905
1878
  return e.next = 2, this._networkClient.fetchSDK({
@@ -1916,9 +1889,9 @@ var Ze = Promise.resolve({
1916
1889
  }, e, this);
1917
1890
  }));
1918
1891
  }, this.deletePassword = function (e) {
1919
- return Te(n, void 0, void 0, _e().mark(function t() {
1892
+ return Pe(n, void 0, void 0, fe().mark(function t() {
1920
1893
  var r;
1921
- return _e().wrap(function (t) {
1894
+ return fe().wrap(function (t) {
1922
1895
  for (;;) switch (t.prev = t.next) {
1923
1896
  case 0:
1924
1897
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1936,14 +1909,14 @@ var Ze = Promise.resolve({
1936
1909
  }));
1937
1910
  };
1938
1911
  }),
1939
- tt = function () {
1912
+ et = function () {
1940
1913
  function e(t, r, n, i, o) {
1941
1914
  var s = this,
1942
- a = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Je();
1943
- ge(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._dynamicConfig = i, this._config = o, this.dfpProtectedAuth = a, this.saml = {
1915
+ a = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Ye();
1916
+ be(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._dynamicConfig = i, this._config = o, this.dfpProtectedAuth = a, this.saml = {
1944
1917
  createConnection: function createConnection(e) {
1945
- return Te(s, void 0, void 0, _e().mark(function t() {
1946
- return _e().wrap(function (t) {
1918
+ return Pe(s, void 0, void 0, fe().mark(function t() {
1919
+ return fe().wrap(function (t) {
1947
1920
  for (;;) switch (t.prev = t.next) {
1948
1921
  case 0:
1949
1922
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1962,8 +1935,8 @@ var Ze = Promise.resolve({
1962
1935
  }));
1963
1936
  },
1964
1937
  updateConnection: function updateConnection(e) {
1965
- return Te(s, void 0, void 0, _e().mark(function t() {
1966
- return _e().wrap(function (t) {
1938
+ return Pe(s, void 0, void 0, fe().mark(function t() {
1939
+ return fe().wrap(function (t) {
1967
1940
  for (;;) switch (t.prev = t.next) {
1968
1941
  case 0:
1969
1942
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1982,8 +1955,8 @@ var Ze = Promise.resolve({
1982
1955
  }));
1983
1956
  },
1984
1957
  updateConnectionByURL: function updateConnectionByURL(e) {
1985
- return Te(s, void 0, void 0, _e().mark(function t() {
1986
- return _e().wrap(function (t) {
1958
+ return Pe(s, void 0, void 0, fe().mark(function t() {
1959
+ return fe().wrap(function (t) {
1987
1960
  for (;;) switch (t.prev = t.next) {
1988
1961
  case 0:
1989
1962
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2002,8 +1975,8 @@ var Ze = Promise.resolve({
2002
1975
  }));
2003
1976
  },
2004
1977
  deleteVerificationCertificate: function deleteVerificationCertificate(e) {
2005
- return Te(s, void 0, void 0, _e().mark(function t() {
2006
- return _e().wrap(function (t) {
1978
+ return Pe(s, void 0, void 0, fe().mark(function t() {
1979
+ return fe().wrap(function (t) {
2007
1980
  for (;;) switch (t.prev = t.next) {
2008
1981
  case 0:
2009
1982
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2022,8 +1995,8 @@ var Ze = Promise.resolve({
2022
1995
  }
2023
1996
  }, this.oidc = {
2024
1997
  createConnection: function createConnection(e) {
2025
- return Te(s, void 0, void 0, _e().mark(function t() {
2026
- return _e().wrap(function (t) {
1998
+ return Pe(s, void 0, void 0, fe().mark(function t() {
1999
+ return fe().wrap(function (t) {
2027
2000
  for (;;) switch (t.prev = t.next) {
2028
2001
  case 0:
2029
2002
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2042,8 +2015,8 @@ var Ze = Promise.resolve({
2042
2015
  }));
2043
2016
  },
2044
2017
  updateConnection: function updateConnection(e) {
2045
- return Te(s, void 0, void 0, _e().mark(function t() {
2046
- return _e().wrap(function (t) {
2018
+ return Pe(s, void 0, void 0, fe().mark(function t() {
2019
+ return fe().wrap(function (t) {
2047
2020
  for (;;) switch (t.prev = t.next) {
2048
2021
  case 0:
2049
2022
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2063,17 +2036,17 @@ var Ze = Promise.resolve({
2063
2036
  }
2064
2037
  };
2065
2038
  }
2066
- return ve(e, [{
2039
+ return me(e, [{
2067
2040
  key: "authenticate",
2068
2041
  value: function value(e) {
2069
- return Te(this, void 0, void 0, _e().mark(function t() {
2042
+ return Pe(this, void 0, void 0, fe().mark(function t() {
2070
2043
  var r, n, i, o, s;
2071
- return _e().wrap(function (t) {
2044
+ return fe().wrap(function (t) {
2072
2045
  for (;;) switch (t.prev = t.next) {
2073
2046
  case 0:
2074
- return Ve("stytch.sso.authenticate").isString("sso_token", e.sso_token).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._pkceManager.getPKPair();
2047
+ return Ge("stytch.sso.authenticate").isString("sso_token", e.sso_token).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._pkceManager.getPKPair();
2075
2048
  case 3:
2076
- return (r = t.sent) || qe("No code verifier found in local storage for SSO flow.\nConsider using stytch.sso.start() to add PKCE to your SSO flows for added security.\nSee https://stytch.com/docs/oauth#guides_pkce for more information."), t.next = 7, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2049
+ return (r = t.sent) || Ue("No code verifier found in local storage for SSO flow.\nConsider using stytch.sso.start() to add PKCE to your SSO flows for added security.\nSee https://stytch.com/docs/oauth#guides_pkce for more information."), t.next = 7, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2077
2050
  case 7:
2078
2051
  return n = t.sent, i = n.dfp_telemetry_id, o = n.captcha_token, t.t0 = this._networkClient, t.t1 = Object, t.t2 = Object.assign({
2079
2052
  pkce_code_verifier: null == r ? void 0 : r.code_verifier
@@ -2122,11 +2095,11 @@ var Ze = Promise.resolve({
2122
2095
  }, {
2123
2096
  key: "getBaseApiUrl",
2124
2097
  value: function value() {
2125
- return Te(this, void 0, void 0, _e().mark(function e() {
2126
- return _e().wrap(function (e) {
2098
+ return Pe(this, void 0, void 0, fe().mark(function e() {
2099
+ return fe().wrap(function (e) {
2127
2100
  for (;;) switch (e.prev = e.next) {
2128
2101
  case 0:
2129
- if (!Ge(this._config.publicToken)) {
2102
+ if (!He(this._config.publicToken)) {
2130
2103
  e.next = 2;
2131
2104
  break;
2132
2105
  }
@@ -2146,9 +2119,9 @@ var Ze = Promise.resolve({
2146
2119
  var t = e.connection_id,
2147
2120
  r = e.login_redirect_url,
2148
2121
  n = e.signup_redirect_url;
2149
- return Te(this, void 0, void 0, _e().mark(function e() {
2122
+ return Pe(this, void 0, void 0, fe().mark(function e() {
2150
2123
  var i, o, s, a, c;
2151
- return _e().wrap(function (e) {
2124
+ return fe().wrap(function (e) {
2152
2125
  for (;;) switch (e.prev = e.next) {
2153
2126
  case 0:
2154
2127
  return e.next = 2, this._dynamicConfig;
@@ -2177,8 +2150,8 @@ var Ze = Promise.resolve({
2177
2150
  }, {
2178
2151
  key: "getConnections",
2179
2152
  value: function value() {
2180
- return Te(this, void 0, void 0, _e().mark(function e() {
2181
- return _e().wrap(function (e) {
2153
+ return Pe(this, void 0, void 0, fe().mark(function e() {
2154
+ return fe().wrap(function (e) {
2182
2155
  for (;;) switch (e.prev = e.next) {
2183
2156
  case 0:
2184
2157
  return e.next = 2, this._networkClient.fetchSDK({
@@ -2198,8 +2171,8 @@ var Ze = Promise.resolve({
2198
2171
  }, {
2199
2172
  key: "deleteConnection",
2200
2173
  value: function value(e) {
2201
- return Te(this, void 0, void 0, _e().mark(function t() {
2202
- return _e().wrap(function (t) {
2174
+ return Pe(this, void 0, void 0, fe().mark(function t() {
2175
+ return fe().wrap(function (t) {
2203
2176
  for (;;) switch (t.prev = t.next) {
2204
2177
  case 0:
2205
2178
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2216,12 +2189,12 @@ var Ze = Promise.resolve({
2216
2189
  }
2217
2190
  }]), e;
2218
2191
  }(),
2219
- rt = ve(function e(t, r) {
2192
+ tt = me(function e(t, r) {
2220
2193
  var n = this;
2221
- ge(this, e), this._networkClient = t, this._subscriptionService = r, this.get = function () {
2222
- return Te(n, void 0, void 0, _e().mark(function e() {
2194
+ be(this, e), this._networkClient = t, this._subscriptionService = r, this.get = function () {
2195
+ return Pe(n, void 0, void 0, fe().mark(function e() {
2223
2196
  var t;
2224
- return _e().wrap(function (e) {
2197
+ return fe().wrap(function (e) {
2225
2198
  for (;;) switch (e.prev = e.next) {
2226
2199
  case 0:
2227
2200
  return e.next = 2, this._networkClient.fetchSDK({
@@ -2239,15 +2212,20 @@ var Ze = Promise.resolve({
2239
2212
  }));
2240
2213
  }, this.getSync = function () {
2241
2214
  return n._subscriptionService.getOrganization();
2215
+ }, this.getInfo = function () {
2216
+ return {
2217
+ organization: n.getSync(),
2218
+ fromCache: n._subscriptionService.getFromCache()
2219
+ };
2242
2220
  }, this.onChange = function (e) {
2243
2221
  return n._subscriptionService.subscribeToState(function (t) {
2244
2222
  var r;
2245
2223
  return e(null !== (r = null == t ? void 0 : t.organization) && void 0 !== r ? r : null);
2246
2224
  });
2247
2225
  }, this.update = function (e) {
2248
- return Te(n, void 0, void 0, _e().mark(function t() {
2226
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2249
2227
  var r;
2250
- return _e().wrap(function (t) {
2228
+ return fe().wrap(function (t) {
2251
2229
  for (;;) switch (t.prev = t.next) {
2252
2230
  case 0:
2253
2231
  return t.next = 2, this._networkClient.fetchSDK({
@@ -2265,9 +2243,9 @@ var Ze = Promise.resolve({
2265
2243
  }, t, this);
2266
2244
  }));
2267
2245
  }, this["delete"] = function () {
2268
- return Te(n, void 0, void 0, _e().mark(function e() {
2246
+ return Pe(n, void 0, void 0, fe().mark(function e() {
2269
2247
  var t;
2270
- return _e().wrap(function (e) {
2248
+ return fe().wrap(function (e) {
2271
2249
  for (;;) switch (e.prev = e.next) {
2272
2250
  case 0:
2273
2251
  return e.next = 2, this._networkClient.fetchSDK({
@@ -2285,8 +2263,8 @@ var Ze = Promise.resolve({
2285
2263
  }));
2286
2264
  }, this.members = {
2287
2265
  create: function create(e) {
2288
- return Te(n, void 0, void 0, _e().mark(function t() {
2289
- return _e().wrap(function (t) {
2266
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2267
+ return fe().wrap(function (t) {
2290
2268
  for (;;) switch (t.prev = t.next) {
2291
2269
  case 0:
2292
2270
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2303,8 +2281,8 @@ var Ze = Promise.resolve({
2303
2281
  }));
2304
2282
  },
2305
2283
  search: function search(e) {
2306
- return Te(n, void 0, void 0, _e().mark(function t() {
2307
- return _e().wrap(function (t) {
2284
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2285
+ return fe().wrap(function (t) {
2308
2286
  for (;;) switch (t.prev = t.next) {
2309
2287
  case 0:
2310
2288
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2321,8 +2299,8 @@ var Ze = Promise.resolve({
2321
2299
  }));
2322
2300
  },
2323
2301
  update: function update(e) {
2324
- return Te(n, void 0, void 0, _e().mark(function t() {
2325
- return _e().wrap(function (t) {
2302
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2303
+ return fe().wrap(function (t) {
2326
2304
  for (;;) switch (t.prev = t.next) {
2327
2305
  case 0:
2328
2306
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2339,8 +2317,8 @@ var Ze = Promise.resolve({
2339
2317
  }));
2340
2318
  },
2341
2319
  deletePassword: function deletePassword(e) {
2342
- return Te(n, void 0, void 0, _e().mark(function t() {
2343
- return _e().wrap(function (t) {
2320
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2321
+ return fe().wrap(function (t) {
2344
2322
  for (;;) switch (t.prev = t.next) {
2345
2323
  case 0:
2346
2324
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2356,8 +2334,8 @@ var Ze = Promise.resolve({
2356
2334
  }));
2357
2335
  },
2358
2336
  deleteMFAPhoneNumber: function deleteMFAPhoneNumber(e) {
2359
- return Te(n, void 0, void 0, _e().mark(function t() {
2360
- return _e().wrap(function (t) {
2337
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2338
+ return fe().wrap(function (t) {
2361
2339
  for (;;) switch (t.prev = t.next) {
2362
2340
  case 0:
2363
2341
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2373,8 +2351,8 @@ var Ze = Promise.resolve({
2373
2351
  }));
2374
2352
  },
2375
2353
  deleteMFATOTP: function deleteMFATOTP(e) {
2376
- return Te(n, void 0, void 0, _e().mark(function t() {
2377
- return _e().wrap(function (t) {
2354
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2355
+ return fe().wrap(function (t) {
2378
2356
  for (;;) switch (t.prev = t.next) {
2379
2357
  case 0:
2380
2358
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2390,8 +2368,8 @@ var Ze = Promise.resolve({
2390
2368
  }));
2391
2369
  },
2392
2370
  "delete": function _delete(e) {
2393
- return Te(n, void 0, void 0, _e().mark(function t() {
2394
- return _e().wrap(function (t) {
2371
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2372
+ return fe().wrap(function (t) {
2395
2373
  for (;;) switch (t.prev = t.next) {
2396
2374
  case 0:
2397
2375
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2407,8 +2385,8 @@ var Ze = Promise.resolve({
2407
2385
  }));
2408
2386
  },
2409
2387
  reactivate: function reactivate(e) {
2410
- return Te(n, void 0, void 0, _e().mark(function t() {
2411
- return _e().wrap(function (t) {
2388
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2389
+ return fe().wrap(function (t) {
2412
2390
  for (;;) switch (t.prev = t.next) {
2413
2391
  case 0:
2414
2392
  return t.abrupt("return", this._networkClient.fetchSDK({
@@ -2425,18 +2403,18 @@ var Ze = Promise.resolve({
2425
2403
  }
2426
2404
  };
2427
2405
  }),
2428
- nt = function () {
2406
+ rt = function () {
2429
2407
  function e(t, r, n, i, o) {
2430
2408
  var s = this,
2431
- a = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Je();
2432
- ge(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._dynamicConfig = i, this._config = o, this.dfpProtectedAuth = a, this.discovery = {
2409
+ a = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Ye();
2410
+ be(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._dynamicConfig = i, this._config = o, this.dfpProtectedAuth = a, this.discovery = {
2433
2411
  authenticate: function authenticate(e) {
2434
- return Te(s, void 0, void 0, _e().mark(function t() {
2412
+ return Pe(s, void 0, void 0, fe().mark(function t() {
2435
2413
  var r, n, i, o, s, a;
2436
- return _e().wrap(function (t) {
2414
+ return fe().wrap(function (t) {
2437
2415
  for (;;) switch (t.prev = t.next) {
2438
2416
  case 0:
2439
- return Ve("stytch.oauth.discovery.authenticate").isString("discovery_oauth_token", e.discovery_oauth_token), t.next = 3, this._pkceManager.getPKPair();
2417
+ return Ge("stytch.oauth.discovery.authenticate").isString("discovery_oauth_token", e.discovery_oauth_token), t.next = 3, this._pkceManager.getPKPair();
2440
2418
  case 3:
2441
2419
  return r = t.sent, t.next = 6, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2442
2420
  case 6:
@@ -2477,17 +2455,17 @@ var Ze = Promise.resolve({
2477
2455
  }
2478
2456
  };
2479
2457
  }
2480
- return ve(e, [{
2458
+ return me(e, [{
2481
2459
  key: "authenticate",
2482
2460
  value: function value(e) {
2483
- return Te(this, void 0, void 0, _e().mark(function t() {
2461
+ return Pe(this, void 0, void 0, fe().mark(function t() {
2484
2462
  var r, n, i, o, s;
2485
- return _e().wrap(function (t) {
2463
+ return fe().wrap(function (t) {
2486
2464
  for (;;) switch (t.prev = t.next) {
2487
2465
  case 0:
2488
- return Ve("stytch.oauth.authenticate").isString("oauth_token", e.oauth_token).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._pkceManager.getPKPair();
2466
+ return Ge("stytch.oauth.authenticate").isString("oauth_token", e.oauth_token).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._pkceManager.getPKPair();
2489
2467
  case 3:
2490
- return (r = t.sent) || qe("No code verifier found in local storage for OAuth flow.\nConsider using stytch.oauth.$provider.start() to add PKCE to your OAuth flows for added security.\nSee https://stytch.com/docs/oauth#guides_pkce for more information."), t.next = 7, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2468
+ return (r = t.sent) || Ue("No code verifier found in local storage for OAuth flow.\nConsider using stytch.oauth.$provider.start() to add PKCE to your OAuth flows for added security.\nSee https://stytch.com/docs/oauth#guides_pkce for more information."), t.next = 7, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2491
2469
  case 7:
2492
2470
  return n = t.sent, i = n.dfp_telemetry_id, o = n.captcha_token, t.t0 = this._networkClient, t.t1 = Object, t.t2 = null == r ? void 0 : r.code_verifier, t.t3 = i, t.t4 = o, t.next = 17, this._subscriptionService.getIntermediateSessionToken();
2493
2471
  case 17:
@@ -2535,9 +2513,9 @@ var Ze = Promise.resolve({
2535
2513
  }, {
2536
2514
  key: "getBaseApiUrl",
2537
2515
  value: function value() {
2538
- return Te(this, void 0, void 0, _e().mark(function e() {
2516
+ return Pe(this, void 0, void 0, fe().mark(function e() {
2539
2517
  var t, r;
2540
- return _e().wrap(function (e) {
2518
+ return fe().wrap(function (e) {
2541
2519
  for (;;) switch (e.prev = e.next) {
2542
2520
  case 0:
2543
2521
  return e.next = 2, this._dynamicConfig;
@@ -2548,7 +2526,7 @@ var Ze = Promise.resolve({
2548
2526
  }
2549
2527
  return e.abrupt("return", "https://".concat(r));
2550
2528
  case 6:
2551
- if (!Ge(this._config.publicToken)) {
2529
+ if (!He(this._config.publicToken)) {
2552
2530
  e.next = 8;
2553
2531
  break;
2554
2532
  }
@@ -2573,16 +2551,16 @@ var Ze = Promise.resolve({
2573
2551
  s = r.signup_redirect_url,
2574
2552
  a = r.custom_scopes,
2575
2553
  c = r.provider_params;
2576
- return Te(t, void 0, void 0, _e().mark(function t() {
2554
+ return Pe(t, void 0, void 0, fe().mark(function t() {
2577
2555
  var r, u, l, d, h, p;
2578
- return _e().wrap(function (t) {
2556
+ return fe().wrap(function (t) {
2579
2557
  for (;;) switch (t.prev = t.next) {
2580
2558
  case 0:
2581
2559
  return t.next = 2, this._dynamicConfig;
2582
2560
  case 2:
2583
2561
  return r = t.sent, u = r.pkceRequiredForOAuth, t.next = 6, this.getBaseApiUrl();
2584
2562
  case 6:
2585
- if (l = t.sent, (d = new URL("".concat(l, "/v1/b2b/public/oauth/").concat(e, "/start"))).searchParams.set("public_token", this._config.publicToken), n && "" != n && d.searchParams.set("organization_id", n), i && "" != i && d.searchParams.set("slug", i), a && (Ve("startOAuthFlow").isStringArray("custom_scopes", a), d.searchParams.set("custom_scopes", a.join(" "))), c) for (h in Ve("startOAuthFlow").isOptionalObject("provider_params", c), c) d.searchParams.set("provider_" + h, c[h]);
2563
+ if (l = t.sent, (d = new URL("".concat(l, "/v1/b2b/public/oauth/").concat(e, "/start"))).searchParams.set("public_token", this._config.publicToken), n && "" != n && d.searchParams.set("organization_id", n), i && "" != i && d.searchParams.set("slug", i), a && (Ge("startOAuthFlow").isStringArray("custom_scopes", a), d.searchParams.set("custom_scopes", a.join(" "))), c) for (h in Ge("startOAuthFlow").isOptionalObject("provider_params", c), c) d.searchParams.set("provider_" + h, c[h]);
2586
2564
  if (!u) {
2587
2565
  t.next = 20;
2588
2566
  break;
@@ -2611,16 +2589,16 @@ var Ze = Promise.resolve({
2611
2589
  var n = r.discovery_redirect_url,
2612
2590
  i = r.custom_scopes,
2613
2591
  o = r.provider_params;
2614
- return Te(t, void 0, void 0, _e().mark(function t() {
2592
+ return Pe(t, void 0, void 0, fe().mark(function t() {
2615
2593
  var r, s, a, c, u, l;
2616
- return _e().wrap(function (t) {
2594
+ return fe().wrap(function (t) {
2617
2595
  for (;;) switch (t.prev = t.next) {
2618
2596
  case 0:
2619
2597
  return t.next = 2, this._dynamicConfig;
2620
2598
  case 2:
2621
2599
  return r = t.sent, s = r.pkceRequiredForOAuth, t.next = 6, this.getBaseApiUrl();
2622
2600
  case 6:
2623
- if (a = t.sent, (c = new URL("".concat(a, "/v1/b2b/public/oauth/").concat(e, "/discovery/start"))).searchParams.set("public_token", this._config.publicToken), i && (Ve("startOAuthFlow").isStringArray("custom_scopes", i), c.searchParams.set("custom_scopes", i.join(" "))), o) for (u in Ve("startOAuthFlow").isOptionalObject("provider_params", o), o) c.searchParams.set("provider_" + u, o[u]);
2601
+ if (a = t.sent, (c = new URL("".concat(a, "/v1/b2b/public/oauth/").concat(e, "/discovery/start"))).searchParams.set("public_token", this._config.publicToken), i && (Ge("startOAuthFlow").isStringArray("custom_scopes", i), c.searchParams.set("custom_scopes", i.join(" "))), o) for (u in Ge("startOAuthFlow").isOptionalObject("provider_params", o), o) c.searchParams.set("provider_" + u, o[u]);
2624
2602
  if (!s) {
2625
2603
  t.next = 18;
2626
2604
  break;
@@ -2643,20 +2621,25 @@ var Ze = Promise.resolve({
2643
2621
  }
2644
2622
  }]), e;
2645
2623
  }(),
2646
- it = function () {
2624
+ nt = function () {
2647
2625
  function e(t, r) {
2648
2626
  var n = this;
2649
- ge(this, e), this._networkClient = t, this._subscriptionService = r, this.getSync = function () {
2627
+ be(this, e), this._networkClient = t, this._subscriptionService = r, this.getSync = function () {
2650
2628
  return n._subscriptionService.getSession();
2629
+ }, this.getInfo = function () {
2630
+ return {
2631
+ session: n.getSync(),
2632
+ fromCache: n._subscriptionService.getFromCache()
2633
+ };
2651
2634
  }, this.onChange = function (e) {
2652
2635
  return n._subscriptionService.subscribeToState(function (t) {
2653
2636
  var r;
2654
2637
  return e(null !== (r = null == t ? void 0 : t.session) && void 0 !== r ? r : null);
2655
2638
  });
2656
2639
  }, this.revoke = function (e) {
2657
- return Te(n, void 0, void 0, _e().mark(function t() {
2640
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2658
2641
  var r;
2659
- return _e().wrap(function (t) {
2642
+ return fe().wrap(function (t) {
2660
2643
  for (;;) switch (t.prev = t.next) {
2661
2644
  case 0:
2662
2645
  return t.prev = 0, t.next = 3, this._networkClient.fetchSDK({
@@ -2675,13 +2658,13 @@ var Ze = Promise.resolve({
2675
2658
  }, t, this, [[0, 8]]);
2676
2659
  }));
2677
2660
  }, this.authenticate = function (e) {
2678
- return Te(n, void 0, void 0, _e().mark(function t() {
2661
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2679
2662
  var r,
2680
2663
  n,
2681
2664
  i,
2682
2665
  o,
2683
2666
  s = this;
2684
- return _e().wrap(function (t) {
2667
+ return fe().wrap(function (t) {
2685
2668
  for (;;) switch (t.prev = t.next) {
2686
2669
  case 0:
2687
2670
  return r = this._subscriptionService.getSession(), n = function n() {
@@ -2727,12 +2710,12 @@ var Ze = Promise.resolve({
2727
2710
  }, t, this, [[2, 13]]);
2728
2711
  }));
2729
2712
  }, this.exchange = function (e) {
2730
- return Te(n, void 0, void 0, _e().mark(function t() {
2713
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2731
2714
  var r;
2732
- return _e().wrap(function (t) {
2715
+ return fe().wrap(function (t) {
2733
2716
  for (;;) switch (t.prev = t.next) {
2734
2717
  case 0:
2735
- return Ve("stytch.sessions.exchange").isString("organization_id", e.organization_id).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.prev = 1, t.next = 4, this._networkClient.fetchSDK({
2718
+ return Ge("stytch.sessions.exchange").isString("organization_id", e.organization_id).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.prev = 1, t.next = 4, this._networkClient.fetchSDK({
2736
2719
  url: "/b2b/sessions/exchange",
2737
2720
  body: e,
2738
2721
  errorMessage: "Failed to exchange session",
@@ -2764,7 +2747,7 @@ var Ze = Promise.resolve({
2764
2747
  }));
2765
2748
  };
2766
2749
  }
2767
- return ve(e, [{
2750
+ return me(e, [{
2768
2751
  key: "getTokens",
2769
2752
  value: function value() {
2770
2753
  return this._subscriptionService.getTokens();
@@ -2776,12 +2759,12 @@ var Ze = Promise.resolve({
2776
2759
  }
2777
2760
  }]), e;
2778
2761
  }(),
2779
- ot = ve(function e(t, r) {
2762
+ it = me(function e(t, r) {
2780
2763
  var n = this;
2781
- ge(this, e), this._networkClient = t, this._subscriptionService = r, this.organizations = {
2764
+ be(this, e), this._networkClient = t, this._subscriptionService = r, this.organizations = {
2782
2765
  list: function list() {
2783
- return Te(n, void 0, void 0, _e().mark(function e() {
2784
- return _e().wrap(function (e) {
2766
+ return Pe(n, void 0, void 0, fe().mark(function e() {
2767
+ return fe().wrap(function (e) {
2785
2768
  for (;;) switch (e.prev = e.next) {
2786
2769
  case 0:
2787
2770
  return e.t0 = this._networkClient, e.next = 3, this._subscriptionService.getIntermediateSessionToken();
@@ -2808,12 +2791,12 @@ var Ze = Promise.resolve({
2808
2791
  }));
2809
2792
  },
2810
2793
  create: function create(e) {
2811
- return Te(n, void 0, void 0, _e().mark(function t() {
2794
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2812
2795
  var r, n;
2813
- return _e().wrap(function (t) {
2796
+ return fe().wrap(function (t) {
2814
2797
  for (;;) switch (t.prev = t.next) {
2815
2798
  case 0:
2816
- return Ve("stytch.discovery.organizations.create").isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("organization_name", e.organization_name).isOptionalString("organization_slug", e.organization_slug).isOptionalString("organization_logo_url", e.organization_logo_url).isOptionalString("sso_jit_provisioning", e.sso_jit_provisioning).isOptionalStringArray("email_allowed_domains", e.email_allowed_domains).isOptionalString("email_invites", e.email_invites).isOptionalString("auth_methods", e.auth_methods).isOptionalStringArray("allowed_auth_methods", e.allowed_auth_methods).isOptionalString("mfa_policy", e.mfa_policy), t.t0 = Object, t.t1 = Object.assign({}, e), t.next = 5, this._subscriptionService.getIntermediateSessionToken();
2799
+ return Ge("stytch.discovery.organizations.create").isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("organization_name", e.organization_name).isOptionalString("organization_slug", e.organization_slug).isOptionalString("organization_logo_url", e.organization_logo_url).isOptionalString("sso_jit_provisioning", e.sso_jit_provisioning).isOptionalStringArray("email_allowed_domains", e.email_allowed_domains).isOptionalString("email_invites", e.email_invites).isOptionalString("auth_methods", e.auth_methods).isOptionalStringArray("allowed_auth_methods", e.allowed_auth_methods).isOptionalString("mfa_policy", e.mfa_policy), t.t0 = Object, t.t1 = Object.assign({}, e), t.next = 5, this._subscriptionService.getIntermediateSessionToken();
2817
2800
  case 5:
2818
2801
  if (t.t2 = t.sent, t.t2) {
2819
2802
  t.next = 8;
@@ -2854,12 +2837,12 @@ var Ze = Promise.resolve({
2854
2837
  }
2855
2838
  }, this.intermediateSessions = {
2856
2839
  exchange: function exchange(e) {
2857
- return Te(n, void 0, void 0, _e().mark(function t() {
2840
+ return Pe(n, void 0, void 0, fe().mark(function t() {
2858
2841
  var r, n;
2859
- return _e().wrap(function (t) {
2842
+ return fe().wrap(function (t) {
2860
2843
  for (;;) switch (t.prev = t.next) {
2861
2844
  case 0:
2862
- return Ve("stytch.discovery.intermediateSessions.exchange").isString("organization_id", e.organization_id).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.t0 = Object, t.t1 = Object.assign({}, e), t.next = 5, this._subscriptionService.getIntermediateSessionToken();
2845
+ return Ge("stytch.discovery.intermediateSessions.exchange").isString("organization_id", e.organization_id).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.t0 = Object, t.t1 = Object.assign({}, e), t.next = 5, this._subscriptionService.getIntermediateSessionToken();
2863
2846
  case 5:
2864
2847
  if (t.t2 = t.sent, t.t2) {
2865
2848
  t.next = 8;
@@ -2900,21 +2883,21 @@ var Ze = Promise.resolve({
2900
2883
  }
2901
2884
  };
2902
2885
  }),
2903
- st = Promise.resolve({
2886
+ ot = Promise.resolve({
2904
2887
  pkceRequiredForPasswordResets: !1
2905
2888
  }),
2906
- at = function () {
2889
+ st = function () {
2907
2890
  function e(t, r, n) {
2908
- var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : st,
2909
- o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : Je();
2910
- ge(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._config = i, this.dfpProtectedAuth = o;
2891
+ var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : ot,
2892
+ o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : Ye();
2893
+ be(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._config = i, this.dfpProtectedAuth = o;
2911
2894
  }
2912
- return ve(e, [{
2895
+ return me(e, [{
2913
2896
  key: "getCodeChallenge",
2914
2897
  value: function value() {
2915
- return Te(this, void 0, void 0, _e().mark(function e() {
2898
+ return Pe(this, void 0, void 0, fe().mark(function e() {
2916
2899
  var t, r;
2917
- return _e().wrap(function (e) {
2900
+ return fe().wrap(function (e) {
2918
2901
  for (;;) switch (e.prev = e.next) {
2919
2902
  case 0:
2920
2903
  return e.next = 2, this._config;
@@ -2946,12 +2929,12 @@ var Ze = Promise.resolve({
2946
2929
  }, {
2947
2930
  key: "authenticate",
2948
2931
  value: function value(e) {
2949
- return Te(this, void 0, void 0, _e().mark(function t() {
2932
+ return Pe(this, void 0, void 0, fe().mark(function t() {
2950
2933
  var r, n, i, o, s, a;
2951
- return _e().wrap(function (t) {
2934
+ return fe().wrap(function (t) {
2952
2935
  for (;;) switch (t.prev = t.next) {
2953
2936
  case 0:
2954
- return Ve("stytch.passwords.authenticate").isString("org_id", e.organization_id).isString("password", e.password).isString("email_address", e.email_address).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._pkceManager.getPKPair();
2937
+ return Ge("stytch.passwords.authenticate").isString("org_id", e.organization_id).isString("password", e.password).isString("email_address", e.email_address).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this._pkceManager.getPKPair();
2955
2938
  case 3:
2956
2939
  return r = t.sent, n = null == r ? void 0 : r.code_verifier, t.next = 7, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2957
2940
  case 7:
@@ -3006,12 +2989,12 @@ var Ze = Promise.resolve({
3006
2989
  }, {
3007
2990
  key: "resetByEmailStart",
3008
2991
  value: function value(e) {
3009
- return Te(this, void 0, void 0, _e().mark(function t() {
2992
+ return Pe(this, void 0, void 0, fe().mark(function t() {
3010
2993
  var r, n, i, o;
3011
- return _e().wrap(function (t) {
2994
+ return fe().wrap(function (t) {
3012
2995
  for (;;) switch (t.prev = t.next) {
3013
2996
  case 0:
3014
- return Ve("stytch.passwords.resetByEmailStart").isString("email", e.email_address).isOptionalString("login_redirect_url", e.login_redirect_url).isOptionalString("reset_password_redirect_url", e.reset_password_redirect_url).isOptionalString("reset_password_template_id", e.reset_password_template_id).isOptionalNumber("reset_password_expiration_minutes", e.reset_password_expiration_minutes), t.next = 3, this.getCodeChallenge();
2997
+ return Ge("stytch.passwords.resetByEmailStart").isString("email", e.email_address).isOptionalString("login_redirect_url", e.login_redirect_url).isOptionalString("reset_password_redirect_url", e.reset_password_redirect_url).isOptionalString("reset_password_template_id", e.reset_password_template_id).isOptionalNumber("reset_password_expiration_minutes", e.reset_password_expiration_minutes), t.next = 3, this.getCodeChallenge();
3015
2998
  case 3:
3016
2999
  return r = t.sent, t.next = 6, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3017
3000
  case 6:
@@ -3042,12 +3025,12 @@ var Ze = Promise.resolve({
3042
3025
  }, {
3043
3026
  key: "resetByEmail",
3044
3027
  value: function value(e) {
3045
- return Te(this, void 0, void 0, _e().mark(function t() {
3028
+ return Pe(this, void 0, void 0, fe().mark(function t() {
3046
3029
  var r, n, i, o, s, a;
3047
- return _e().wrap(function (t) {
3030
+ return fe().wrap(function (t) {
3048
3031
  for (;;) switch (t.prev = t.next) {
3049
3032
  case 0:
3050
- return Ve("stytch.passwords.resetByEmail").isString("password_reset_token", e.password_reset_token).isString("password", e.password).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3033
+ return Ge("stytch.passwords.resetByEmail").isString("password_reset_token", e.password_reset_token).isString("password", e.password).isNumber("session_duration_minutes", e.session_duration_minutes).isOptionalString("locale", e.locale), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3051
3034
  case 3:
3052
3035
  return r = t.sent, n = r.dfp_telemetry_id, i = r.captcha_token, t.next = 8, this._pkceManager.getPKPair();
3053
3036
  case 8:
@@ -3101,12 +3084,12 @@ var Ze = Promise.resolve({
3101
3084
  }, {
3102
3085
  key: "resetByExistingPassword",
3103
3086
  value: function value(e) {
3104
- return Te(this, void 0, void 0, _e().mark(function t() {
3087
+ return Pe(this, void 0, void 0, fe().mark(function t() {
3105
3088
  var r, n, i, o;
3106
- return _e().wrap(function (t) {
3089
+ return fe().wrap(function (t) {
3107
3090
  for (;;) switch (t.prev = t.next) {
3108
3091
  case 0:
3109
- return Ve("stytch.passwords.resetByExistingPassword").isString("email", e.email_address).isString("existing_password", e.existing_password).isString("new_password", e.new_password).isOptionalString("locale", e.locale), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3092
+ return Ge("stytch.passwords.resetByExistingPassword").isString("email", e.email_address).isString("existing_password", e.existing_password).isString("new_password", e.new_password).isOptionalString("locale", e.locale), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3110
3093
  case 3:
3111
3094
  return r = t.sent, n = r.dfp_telemetry_id, i = r.captcha_token, t.next = 8, this._networkClient.retriableFetchSDK({
3112
3095
  url: "/b2b/passwords/existing_password/reset",
@@ -3150,12 +3133,12 @@ var Ze = Promise.resolve({
3150
3133
  }, {
3151
3134
  key: "resetBySession",
3152
3135
  value: function value(e) {
3153
- return Te(this, void 0, void 0, _e().mark(function t() {
3136
+ return Pe(this, void 0, void 0, fe().mark(function t() {
3154
3137
  var r, n, i, o;
3155
- return _e().wrap(function (t) {
3138
+ return fe().wrap(function (t) {
3156
3139
  for (;;) switch (t.prev = t.next) {
3157
3140
  case 0:
3158
- return Ve("stytch.passwords.resetBySession").isString("password", e.password), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3141
+ return Ge("stytch.passwords.resetBySession").isString("password", e.password), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3159
3142
  case 3:
3160
3143
  return r = t.sent, n = r.dfp_telemetry_id, i = r.captcha_token, t.next = 8, this._networkClient.retriableFetchSDK({
3161
3144
  url: "/b2b/passwords/session/reset",
@@ -3189,11 +3172,11 @@ var Ze = Promise.resolve({
3189
3172
  }, {
3190
3173
  key: "strengthCheck",
3191
3174
  value: function value(e) {
3192
- return Te(this, void 0, void 0, _e().mark(function t() {
3193
- return _e().wrap(function (t) {
3175
+ return Pe(this, void 0, void 0, fe().mark(function t() {
3176
+ return fe().wrap(function (t) {
3194
3177
  for (;;) switch (t.prev = t.next) {
3195
3178
  case 0:
3196
- return Ve("stytch.passwords.strengthCheck").isOptionalString("email", e.email_address).isString("password", e.password), t.abrupt("return", this._networkClient.fetchSDK({
3179
+ return Ge("stytch.passwords.strengthCheck").isOptionalString("email", e.email_address).isString("password", e.password), t.abrupt("return", this._networkClient.fetchSDK({
3197
3180
  url: "/b2b/passwords/strength_check",
3198
3181
  method: "POST",
3199
3182
  errorMessage: "Failed to check password strength.",
@@ -3211,17 +3194,17 @@ var Ze = Promise.resolve({
3211
3194
  }
3212
3195
  }]), e;
3213
3196
  }(),
3214
- ct = ve(function e(t, r) {
3197
+ at = me(function e(t, r) {
3215
3198
  var n = this,
3216
- i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Je();
3217
- ge(this, e), this._networkClient = t, this._subscriptionService = r, this.dfpProtectedAuth = i, this.sms = {
3199
+ i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Ye();
3200
+ be(this, e), this._networkClient = t, this._subscriptionService = r, this.dfpProtectedAuth = i, this.sms = {
3218
3201
  send: function send(e) {
3219
- return Te(n, void 0, void 0, _e().mark(function t() {
3202
+ return Pe(n, void 0, void 0, fe().mark(function t() {
3220
3203
  var r, n, i;
3221
- return _e().wrap(function (t) {
3204
+ return fe().wrap(function (t) {
3222
3205
  for (;;) switch (t.prev = t.next) {
3223
3206
  case 0:
3224
- return Ve("stytch.otps.sms.send").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isOptionalString("mfa_phone_number", e.mfa_phone_number).isOptionalString("locale", e.locale), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3207
+ return Ge("stytch.otps.sms.send").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isOptionalString("mfa_phone_number", e.mfa_phone_number).isOptionalString("locale", e.locale), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3225
3208
  case 3:
3226
3209
  return r = t.sent, n = r.dfp_telemetry_id, i = r.captcha_token, t.t0 = this._networkClient, t.t1 = Object, t.t2 = Object.assign({}, e), t.t3 = n, t.t4 = i, t.next = 13, this._subscriptionService.getIntermediateSessionToken();
3227
3210
  case 13:
@@ -3250,12 +3233,12 @@ var Ze = Promise.resolve({
3250
3233
  }));
3251
3234
  },
3252
3235
  authenticate: function authenticate(e) {
3253
- return Te(n, void 0, void 0, _e().mark(function t() {
3236
+ return Pe(n, void 0, void 0, fe().mark(function t() {
3254
3237
  var r, n, i, o, s;
3255
- return _e().wrap(function (t) {
3238
+ return fe().wrap(function (t) {
3256
3239
  for (;;) switch (t.prev = t.next) {
3257
3240
  case 0:
3258
- return Ve("stytch.otps.sms.authenticate").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isString("code", e.code).isOptionalString("set_mfa_enrollment", e.set_mfa_enrollment), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3241
+ return Ge("stytch.otps.sms.authenticate").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isString("code", e.code).isOptionalString("set_mfa_enrollment", e.set_mfa_enrollment), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3259
3242
  case 3:
3260
3243
  return r = t.sent, n = r.dfp_telemetry_id, i = r.captcha_token, t.t0 = Object, t.t1 = Object.assign({}, e), t.t2 = n, t.t3 = i, t.next = 12, this._subscriptionService.getIntermediateSessionToken();
3261
3244
  case 12:
@@ -3296,20 +3279,20 @@ var Ze = Promise.resolve({
3296
3279
  }
3297
3280
  };
3298
3281
  }),
3299
- ut = function () {
3282
+ ct = function () {
3300
3283
  function e(t, r) {
3301
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Je();
3302
- ge(this, e), this._networkClient = t, this._subscriptionService = r, this.dfpProtectedAuth = n;
3284
+ var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Ye();
3285
+ be(this, e), this._networkClient = t, this._subscriptionService = r, this.dfpProtectedAuth = n;
3303
3286
  }
3304
- return ve(e, [{
3287
+ return me(e, [{
3305
3288
  key: "create",
3306
3289
  value: function value(e) {
3307
- return Te(this, void 0, void 0, _e().mark(function t() {
3290
+ return Pe(this, void 0, void 0, fe().mark(function t() {
3308
3291
  var r, n, i;
3309
- return _e().wrap(function (t) {
3292
+ return fe().wrap(function (t) {
3310
3293
  for (;;) switch (t.prev = t.next) {
3311
3294
  case 0:
3312
- return Ve("stytch.totp.create").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isOptionalNumber("expiration_minutes", e.expiration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3295
+ return Ge("stytch.totp.create").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isOptionalNumber("expiration_minutes", e.expiration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3313
3296
  case 3:
3314
3297
  return r = t.sent, n = r.dfp_telemetry_id, i = r.captcha_token, t.t0 = this._networkClient, t.t1 = Object, t.t2 = Object.assign({}, e), t.t3 = n, t.t4 = i, t.next = 13, this._subscriptionService.getIntermediateSessionToken();
3315
3298
  case 13:
@@ -3340,12 +3323,12 @@ var Ze = Promise.resolve({
3340
3323
  }, {
3341
3324
  key: "authenticate",
3342
3325
  value: function value(e) {
3343
- return Te(this, void 0, void 0, _e().mark(function t() {
3326
+ return Pe(this, void 0, void 0, fe().mark(function t() {
3344
3327
  var r, n, i, o, s;
3345
- return _e().wrap(function (t) {
3328
+ return fe().wrap(function (t) {
3346
3329
  for (;;) switch (t.prev = t.next) {
3347
3330
  case 0:
3348
- return Ve("stytch.totp.authenticate").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isString("code", e.code).isOptionalString("set_mfa_enrollment", e.set_mfa_enrollment).isOptionalBoolean("set_default_mfa", e.set_default_mfa), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3331
+ return Ge("stytch.totp.authenticate").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isString("code", e.code).isOptionalString("set_mfa_enrollment", e.set_mfa_enrollment).isOptionalBoolean("set_default_mfa", e.set_default_mfa), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3349
3332
  case 3:
3350
3333
  return r = t.sent, n = r.dfp_telemetry_id, i = r.captcha_token, t.t0 = Object, t.t1 = Object.assign({}, e), t.t2 = n, t.t3 = i, t.next = 12, this._subscriptionService.getIntermediateSessionToken();
3351
3334
  case 12:
@@ -3386,20 +3369,20 @@ var Ze = Promise.resolve({
3386
3369
  }
3387
3370
  }]), e;
3388
3371
  }(),
3389
- lt = function () {
3372
+ ut = function () {
3390
3373
  function e(t, r) {
3391
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Je();
3392
- ge(this, e), this._networkClient = t, this._subscriptionService = r, this.dfpProtectedAuth = n;
3374
+ var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Ye();
3375
+ be(this, e), this._networkClient = t, this._subscriptionService = r, this.dfpProtectedAuth = n;
3393
3376
  }
3394
- return ve(e, [{
3377
+ return me(e, [{
3395
3378
  key: "recover",
3396
3379
  value: function value(e) {
3397
- return Te(this, void 0, void 0, _e().mark(function t() {
3380
+ return Pe(this, void 0, void 0, fe().mark(function t() {
3398
3381
  var r, n, i, o, s;
3399
- return _e().wrap(function (t) {
3382
+ return fe().wrap(function (t) {
3400
3383
  for (;;) switch (t.prev = t.next) {
3401
3384
  case 0:
3402
- return Ve("stytch.recoveryCodes.recover").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isString("recovery_code", e.recovery_code), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3385
+ return Ge("stytch.recoveryCodes.recover").isString("organization_id", e.organization_id).isString("member_id", e.member_id).isString("recovery_code", e.recovery_code), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
3403
3386
  case 3:
3404
3387
  return r = t.sent, n = r.dfp_telemetry_id, i = r.captcha_token, t.t0 = Object, t.t1 = Object.assign({}, e), t.t2 = n, t.t3 = i, t.next = 12, this._subscriptionService.getIntermediateSessionToken();
3405
3388
  case 12:
@@ -3441,9 +3424,9 @@ var Ze = Promise.resolve({
3441
3424
  }, {
3442
3425
  key: "rotate",
3443
3426
  value: function value() {
3444
- return Te(this, void 0, void 0, _e().mark(function e() {
3427
+ return Pe(this, void 0, void 0, fe().mark(function e() {
3445
3428
  var t, r, n;
3446
- return _e().wrap(function (e) {
3429
+ return fe().wrap(function (e) {
3447
3430
  for (;;) switch (e.prev = e.next) {
3448
3431
  case 0:
3449
3432
  return e.next = 2, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -3468,8 +3451,8 @@ var Ze = Promise.resolve({
3468
3451
  }, {
3469
3452
  key: "get",
3470
3453
  value: function value() {
3471
- return Te(this, void 0, void 0, _e().mark(function e() {
3472
- return _e().wrap(function (e) {
3454
+ return Pe(this, void 0, void 0, fe().mark(function e() {
3455
+ return fe().wrap(function (e) {
3473
3456
  for (;;) switch (e.prev = e.next) {
3474
3457
  case 0:
3475
3458
  return e.abrupt("return", this._networkClient.fetchSDK({
@@ -3486,10 +3469,10 @@ var Ze = Promise.resolve({
3486
3469
  }
3487
3470
  }]), e;
3488
3471
  }(),
3489
- dt = function () {
3472
+ lt = function () {
3490
3473
  function e(t, r, n) {
3491
3474
  var i = this;
3492
- ge(this, e), this._subscriptionService = n, this.isAuthorizedSync = function (e, t) {
3475
+ be(this, e), this._subscriptionService = n, this.isAuthorizedSync = function (e, t) {
3493
3476
  var r;
3494
3477
  return !!(null === (r = i.cachedPolicy) || void 0 === r ? void 0 : r.callerIsAuthorized(i.roleIds(), e, t));
3495
3478
  }, this.isAuthorized = function (e, t) {
@@ -3497,10 +3480,10 @@ var Ze = Promise.resolve({
3497
3480
  return r.callerIsAuthorized(i.roleIds(), e, t);
3498
3481
  });
3499
3482
  }, this.cachedPolicy = t.rbacPolicy ? _t.fromJSON(t.rbacPolicy) : null, this.policyPromise = r.then(function (e) {
3500
- return e.rbacPolicy ? (i.cachedPolicy = _t.fromJSON(e.rbacPolicy), i.cachedPolicy) : (We("Unable to retrieve RBAC policy from servers. Assuming caller has no permissions."), new _t([], []));
3483
+ return e.rbacPolicy ? (i.cachedPolicy = _t.fromJSON(e.rbacPolicy), i.cachedPolicy) : (qe("Unable to retrieve RBAC policy from servers. Assuming caller has no permissions."), new _t([], []));
3501
3484
  });
3502
3485
  }
3503
- return ve(e, [{
3486
+ return me(e, [{
3504
3487
  key: "allPermissions",
3505
3488
  value: function value() {
3506
3489
  var e = this;
@@ -3517,15 +3500,15 @@ var Ze = Promise.resolve({
3517
3500
  }
3518
3501
  }]), e;
3519
3502
  }(),
3520
- ht = function () {
3503
+ dt = function () {
3521
3504
  function e(t) {
3522
- ge(this, e), this.iframeURL = t, this.createIframe();
3505
+ be(this, e), this.iframeURL = t, this.createIframe();
3523
3506
  }
3524
- return ve(e, [{
3507
+ return me(e, [{
3525
3508
  key: "createIframe",
3526
3509
  value: function value() {
3527
3510
  var e = document.querySelector('[src~="'.concat(this.iframeURL, '"]'));
3528
- e ? qe("It looks like you're creating multiple copies of the Stytch client. This behavior is unsupported, and unintended side effects may occur. Make sure you are creating the Stytch client at the global level, and not inside a component's render function.") : ((e = document.createElement("iframe")).src = this.iframeURL, e.style.position = "absolute", e.style.width = "0", e.style.height = "0", e.style.border = "0", document.body.appendChild(e)), "true" !== e.dataset.loaded ? this.frame = new Promise(function (t) {
3511
+ e ? Ue("It looks like you're creating multiple copies of the Stytch client. This behavior is unsupported, and unintended side effects may occur. Make sure you are creating the Stytch client at the global level, and not inside a component's render function.") : ((e = document.createElement("iframe")).src = this.iframeURL, e.style.position = "absolute", e.style.width = "0", e.style.height = "0", e.style.border = "0", document.body.appendChild(e)), "true" !== e.dataset.loaded ? this.frame = new Promise(function (t) {
3529
3512
  e.addEventListener("load", function () {
3530
3513
  e.dataset.loaded = "true", t(e);
3531
3514
  }, {
@@ -3536,11 +3519,11 @@ var Ze = Promise.resolve({
3536
3519
  }, {
3537
3520
  key: "call",
3538
3521
  value: function value(e, t) {
3539
- return Te(this, void 0, void 0, _e().mark(function r() {
3522
+ return Pe(this, void 0, void 0, fe().mark(function r() {
3540
3523
  var n,
3541
3524
  i,
3542
3525
  o = this;
3543
- return _e().wrap(function (r) {
3526
+ return fe().wrap(function (r) {
3544
3527
  for (;;) switch (r.prev = r.next) {
3545
3528
  case 0:
3546
3529
  return r.next = 2, this.frame;
@@ -3549,7 +3532,7 @@ var Ze = Promise.resolve({
3549
3532
  var a;
3550
3533
  i.port1.onmessage = function (e) {
3551
3534
  var t = e.data;
3552
- i.port1.close(), t.success ? r(t.payload) : s($e.unmarshall(t.error));
3535
+ i.port1.close(), t.success ? r(t.payload) : s(Je.unmarshall(t.error));
3553
3536
  };
3554
3537
  var c = {
3555
3538
  method: e,
@@ -3566,11 +3549,11 @@ var Ze = Promise.resolve({
3566
3549
  }
3567
3550
  }]), e;
3568
3551
  }(),
3569
- pt = function () {
3552
+ ht = function () {
3570
3553
  function e(t, r) {
3571
- ge(this, e), this._networkClient = t, this.dfpProtectedAuth = r;
3554
+ be(this, e), this._networkClient = t, this.dfpProtectedAuth = r;
3572
3555
  }
3573
- return ve(e, [{
3556
+ return me(e, [{
3574
3557
  key: "searchUser",
3575
3558
  value: function value(e) {
3576
3559
  var t = this;
@@ -3616,15 +3599,17 @@ var Ze = Promise.resolve({
3616
3599
  }
3617
3600
  }]), e;
3618
3601
  }(),
3619
- ft = function () {
3602
+ pt = function () {
3620
3603
  function e(t, r) {
3621
3604
  var n = this;
3622
- ge(this, e), this._subscriptionService = t, this._headlessSessionClient = r, this._onDataChange = function (e) {
3623
- (null == e ? void 0 : e.session) ? n.scheduleBackgroundRefresh() : n.cancelBackgroundRefresh();
3605
+ be(this, e), this._subscriptionService = t, this._headlessSessionClient = r, this._onDataChange = function (e) {
3606
+ !function (e) {
3607
+ return !!(null == e ? void 0 : e.session);
3608
+ }(e) ? n.cancelBackgroundRefresh() : n.scheduleBackgroundRefresh();
3624
3609
  }, this._reauthenticateWithBackoff = function () {
3625
- return Te(n, void 0, void 0, _e().mark(function t() {
3610
+ return Pe(n, void 0, void 0, fe().mark(function t() {
3626
3611
  var r;
3627
- return _e().wrap(function (t) {
3612
+ return fe().wrap(function (t) {
3628
3613
  for (;;) switch (t.prev = t.next) {
3629
3614
  case 0:
3630
3615
  r = 0;
@@ -3653,14 +3638,14 @@ var Ze = Promise.resolve({
3653
3638
  }));
3654
3639
  }, this.timeout = null, this._subscriptionService.subscribeToState(this._onDataChange);
3655
3640
  }
3656
- return ve(e, [{
3641
+ return me(e, [{
3657
3642
  key: "performBackgroundRefresh",
3658
3643
  value: function value() {
3659
3644
  var e = this;
3660
3645
  this._reauthenticateWithBackoff().then(function () {
3661
3646
  e.scheduleBackgroundRefresh();
3662
3647
  })["catch"](function (t) {
3663
- qe("Session background refresh failed. Signalling to app that user is logged out.", {
3648
+ Ue("Session background refresh failed. Signalling to app that user is logged out.", {
3664
3649
  error: t
3665
3650
  }), e._subscriptionService.destroySession();
3666
3651
  });
@@ -3690,48 +3675,56 @@ var Ze = Promise.resolve({
3690
3675
  }
3691
3676
  }]), e;
3692
3677
  }();
3693
- ft.REFRESH_INTERVAL_MS = 18e4;
3694
- var _t = function () {
3695
- function e(t, r) {
3678
+ pt.REFRESH_INTERVAL_MS = 18e4;
3679
+ var ft = me(function e(t, r) {
3696
3680
  var n = this;
3697
- ge(this, e), this.roles = t, this.resources = r, this.rolesByID = {}, t.forEach(function (e) {
3698
- return n.rolesByID[e.role_id] = e;
3699
- });
3700
- }
3701
- return ve(e, [{
3702
- key: "callerIsAuthorized",
3703
- value: function value(e, t, r) {
3681
+ be(this, e), this._subscriptionService = t, this.emptyState = r, this.onStateChange = function (e) {
3682
+ return n._subscriptionService.subscribeToState(function (t) {
3683
+ e(null != t ? t : n.emptyState);
3684
+ });
3685
+ };
3686
+ }),
3687
+ _t = function () {
3688
+ function e(t, r) {
3704
3689
  var n = this;
3705
- return !!e.map(function (e) {
3706
- return n.rolesByID[e];
3707
- }).filter(function (e) {
3708
- return e;
3709
- }).flatMap(function (e) {
3710
- return e.permissions;
3711
- }).filter(function (e) {
3712
- return e.resource_id === t;
3713
- }).find(function (e) {
3714
- return e.actions.includes(r) || e.actions.includes("*");
3690
+ be(this, e), this.roles = t, this.resources = r, this.rolesByID = {}, t.forEach(function (e) {
3691
+ return n.rolesByID[e.role_id] = e;
3715
3692
  });
3716
3693
  }
3717
- }, {
3718
- key: "allPermissionsForCaller",
3719
- value: function value(e) {
3720
- var t = this,
3721
- r = {};
3722
- return this.resources.forEach(function (n) {
3723
- r[n.resource_id] = {}, n.actions.forEach(function (i) {
3724
- r[n.resource_id][i] = t.callerIsAuthorized(e, n.resource_id, i);
3694
+ return me(e, [{
3695
+ key: "callerIsAuthorized",
3696
+ value: function value(e, t, r) {
3697
+ var n = this;
3698
+ return !!e.map(function (e) {
3699
+ return n.rolesByID[e];
3700
+ }).filter(function (e) {
3701
+ return e;
3702
+ }).flatMap(function (e) {
3703
+ return e.permissions;
3704
+ }).filter(function (e) {
3705
+ return e.resource_id === t;
3706
+ }).find(function (e) {
3707
+ return e.actions.includes(r) || e.actions.includes("*");
3725
3708
  });
3726
- }), r;
3727
- }
3728
- }], [{
3729
- key: "fromJSON",
3730
- value: function value(t) {
3731
- return new e(t.roles, t.resources);
3732
- }
3733
- }]), e;
3734
- }();
3709
+ }
3710
+ }, {
3711
+ key: "allPermissionsForCaller",
3712
+ value: function value(e) {
3713
+ var t = this,
3714
+ r = {};
3715
+ return this.resources.forEach(function (n) {
3716
+ r[n.resource_id] = {}, n.actions.forEach(function (i) {
3717
+ r[n.resource_id][i] = t.callerIsAuthorized(e, n.resource_id, i);
3718
+ });
3719
+ }), r;
3720
+ }
3721
+ }], [{
3722
+ key: "fromJSON",
3723
+ value: function value(t) {
3724
+ return new e(t.roles, t.resources);
3725
+ }
3726
+ }]), e;
3727
+ }();
3735
3728
  var mt = "bootstrap";
3736
3729
  var vt = /*#__PURE__*/function () {
3737
3730
  function vt(e, t, r) {
@@ -3744,7 +3737,7 @@ var vt = /*#__PURE__*/function () {
3744
3737
  }).then(vt.mapBootstrapData).then(function (e) {
3745
3738
  return _this._dataLayer.setItem(mt, JSON.stringify(e)), e;
3746
3739
  })["catch"](function (e) {
3747
- return We(e), {
3740
+ return qe(e), {
3748
3741
  displayWatermark: !1,
3749
3742
  cnameDomain: null,
3750
3743
  emailDomains: ["stytch.com"],
@@ -3911,7 +3904,7 @@ var gt = /*#__PURE__*/_createClass(function gt(e) {
3911
3904
  }
3912
3905
  _context2.t1 = !0;
3913
3906
  _context2.next = 4;
3914
- return t = e.captchaSettings.siteKey, Be("https://www.google.com/recaptcha/enterprise.js?render=".concat(t), function () {
3907
+ return t = e.captchaSettings.siteKey, Me("https://www.google.com/recaptcha/enterprise.js?render=".concat(t), function () {
3915
3908
  return window.grecaptcha.enterprise;
3916
3909
  });
3917
3910
  case 4:
@@ -3954,7 +3947,7 @@ var kt = /*#__PURE__*/function () {
3954
3947
  key: "frameClient",
3955
3948
  get: function get() {
3956
3949
  var e;
3957
- return this._frameClient = null !== (e = this._frameClient) && void 0 !== e ? e : new ht(this.iframeURL), this._frameClient;
3950
+ return this._frameClient = null !== (e = this._frameClient) && void 0 !== e ? e : new dt(this.iframeURL), this._frameClient;
3958
3951
  }
3959
3952
  }, {
3960
3953
  key: "call",
@@ -3969,7 +3962,7 @@ var yt = /*#__PURE__*/function () {
3969
3962
  _classCallCheck(this, yt);
3970
3963
  this._publicToken = e, this._subscriptionDataLayer = t, this.baseURL = r, this.additionalTelemetryDataFn = n, this.updateSessionToken = function () {
3971
3964
  return null;
3972
- }, this.eventLogger = new Xe({
3965
+ }, this.eventLogger = new $e({
3973
3966
  maxBatchSize: 15,
3974
3967
  intervalDurationMs: 800,
3975
3968
  logEventURL: this.buildSDKUrl("/events")
@@ -3995,9 +3988,9 @@ var yt = /*#__PURE__*/function () {
3995
3988
  key: "createTelemetryBlob",
3996
3989
  value: function createTelemetryBlob() {
3997
3990
  return Object.assign(Object.assign({
3998
- event_id: "event-id-".concat(Le()),
3999
- app_session_id: "app-session-id-".concat(Le()),
4000
- persistent_id: "persistent-id-".concat(Le()),
3991
+ event_id: "event-id-".concat(je()),
3992
+ app_session_id: "app-session-id-".concat(je()),
3993
+ persistent_id: "persistent-id-".concat(je()),
4001
3994
  client_sent_at: new Date().toISOString(),
4002
3995
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
4003
3996
  }, this.additionalTelemetryDataFn()), {
@@ -4006,7 +3999,7 @@ var yt = /*#__PURE__*/function () {
4006
3999
  },
4007
4000
  sdk: {
4008
4001
  identifier: "Stytch.js Javascript SDK",
4009
- version: "4.7.8"
4002
+ version: "4.9.0"
4010
4003
  }
4011
4004
  });
4012
4005
  }
@@ -4023,7 +4016,7 @@ var yt = /*#__PURE__*/function () {
4023
4016
  while (1) switch (_context3.prev = _context3.next) {
4024
4017
  case 0:
4025
4018
  i = this._subscriptionDataLayer.readSessionCookie().session_token, o = "Basic " + window.btoa(this._publicToken + ":" + (i || this._publicToken)), s = window.btoa(JSON.stringify(this.createTelemetryBlob())), a = window.location.origin;
4026
- return _context3.abrupt("return", Ae({
4019
+ return _context3.abrupt("return", xe({
4027
4020
  basicAuthHeader: o,
4028
4021
  body: t,
4029
4022
  errorMessage: r,
@@ -4062,9 +4055,9 @@ var yt = /*#__PURE__*/function () {
4062
4055
  s = e.xSDKParentHostHeader,
4063
4056
  a = e.body,
4064
4057
  c = e.retryCallback;
4065
- return Te(this, void 0, void 0, _e().mark(function e() {
4058
+ return Pe(this, void 0, void 0, fe().mark(function e() {
4066
4059
  var u;
4067
- return _e().wrap(function (e) {
4060
+ return fe().wrap(function (e) {
4068
4061
  for (;;) switch (e.prev = e.next) {
4069
4062
  case 0:
4070
4063
  return u = {
@@ -4075,18 +4068,18 @@ var yt = /*#__PURE__*/function () {
4075
4068
  xSDKClientHeader: o,
4076
4069
  xSDKParentHostHeader: s,
4077
4070
  body: a
4078
- }, e.prev = 1, e.next = 4, Ae(u);
4071
+ }, e.prev = 1, e.next = 4, xe(u);
4079
4072
  case 4:
4080
4073
  case 15:
4081
4074
  return e.abrupt("return", e.sent);
4082
4075
  case 7:
4083
- if (e.prev = 7, e.t0 = e["catch"](1), !(e.t0 instanceof xe)) {
4076
+ if (e.prev = 7, e.t0 = e["catch"](1), !(e.t0 instanceof Oe)) {
4084
4077
  e.next = 16;
4085
4078
  break;
4086
4079
  }
4087
4080
  return e.next = 12, c(e.t0, u);
4088
4081
  case 12:
4089
- return u = e.sent, e.next = 15, Ae(u);
4082
+ return u = e.sent, e.next = 15, xe(u);
4090
4083
  case 16:
4091
4084
  throw e.t0;
4092
4085
  case 17:
@@ -4161,7 +4154,7 @@ var St = /*#__PURE__*/function () {
4161
4154
  if (null !== e) try {
4162
4155
  return JSON.parse(e);
4163
4156
  } catch (e) {
4164
- return void qe("Found malformed Proof Key pair in localstorage.");
4157
+ return void Ue("Found malformed Proof Key pair in localstorage.");
4165
4158
  }
4166
4159
  }
4167
4160
  }, {
@@ -4199,7 +4192,7 @@ var St = /*#__PURE__*/function () {
4199
4192
  }]);
4200
4193
  return St;
4201
4194
  }();
4202
- var Pt = function Pt(e) {
4195
+ var Ct = function Ct(e) {
4203
4196
  return (document.cookie ? document.cookie.split("; ") : []).filter(function (t) {
4204
4197
  var _t$split = t.split("="),
4205
4198
  _t$split2 = _slicedToArray(_t$split, 1),
@@ -4208,7 +4201,7 @@ var Pt = function Pt(e) {
4208
4201
  }).length > 1;
4209
4202
  };
4210
4203
  /*! js-cookie v3.0.1 | MIT */
4211
- function Ct(e) {
4204
+ function Pt(e) {
4212
4205
  for (var t = 1; t < arguments.length; t++) {
4213
4206
  var r = arguments[t];
4214
4207
  for (var n in r) e[n] = r[n];
@@ -4218,7 +4211,7 @@ function Ct(e) {
4218
4211
  var Tt = function e(t, r) {
4219
4212
  function n(e, n, i) {
4220
4213
  if ("undefined" != typeof document) {
4221
- "number" == typeof (i = Ct({}, r, i)).expires && (i.expires = new Date(Date.now() + 864e5 * i.expires)), i.expires && (i.expires = i.expires.toUTCString()), e = encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
4214
+ "number" == typeof (i = Pt({}, r, i)).expires && (i.expires = new Date(Date.now() + 864e5 * i.expires)), i.expires && (i.expires = i.expires.toUTCString()), e = encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
4222
4215
  var o = "";
4223
4216
  for (var s in i) i[s] && (o += "; " + s, !0 !== i[s] && (o += "=" + i[s].split(";")[0]));
4224
4217
  return document.cookie = e + "=" + t.write(n, e) + o;
@@ -4240,15 +4233,15 @@ var Tt = function e(t, r) {
4240
4233
  }
4241
4234
  },
4242
4235
  remove: function remove(e, t) {
4243
- n(e, "", Ct({}, t, {
4236
+ n(e, "", Pt({}, t, {
4244
4237
  expires: -1
4245
4238
  }));
4246
4239
  },
4247
4240
  withAttributes: function withAttributes(t) {
4248
- return e(this.converter, Ct({}, this.attributes, t));
4241
+ return e(this.converter, Pt({}, this.attributes, t));
4249
4242
  },
4250
4243
  withConverter: function withConverter(t) {
4251
- return e(Ct({}, this.converter, t), this.attributes);
4244
+ return e(Pt({}, this.converter, t), this.attributes);
4252
4245
  }
4253
4246
  }, {
4254
4247
  attributes: {
@@ -4297,7 +4290,7 @@ var Dt = /*#__PURE__*/function () {
4297
4290
  removeItem: function removeItem(e) {
4298
4291
  return sessionStorage.removeItem(Ot(_this4.publicToken, e));
4299
4292
  }
4300
- }, this.publicToken = e, this.state = null, this.stateKeysUpdated = new Set(), this.subscriptions = {}, (null == t ? void 0 : t.cookieOptions) ? (Ve("SubscriptionDataLayer").isOptionalString("cookieOptions.opaqueTokenCookieName", t.cookieOptions.opaqueTokenCookieName).isOptionalString("cookieOptions.jwtCookieName", t.cookieOptions.jwtCookieName).isOptionalString("cookieOptions.istCookieName", t.cookieOptions.istCookieName).isOptionalString("cookieOptions.path", t.cookieOptions.path).isOptionalString("cookieOptions.domain", t.cookieOptions.domain), this._jwtCookieName = t.cookieOptions.jwtCookieName || null, this._opaqueTokenCookieName = t.cookieOptions.opaqueTokenCookieName || null, this._cookiePath = t.cookieOptions.path || null, this._domain = t.cookieOptions.domain || null, this._cookieAvailableToSubdomains = t.cookieOptions.availableToSubdomains || !1, this._istCookieName = t.cookieOptions.istCookieName || null) : (this._opaqueTokenCookieName = null, this._jwtCookieName = null, this._cookiePath = null, this._domain = null, this._cookieAvailableToSubdomains = !1, this._istCookieName = null);
4293
+ }, this.publicToken = e, this.state = null, this.stateKeysUpdated = new Set(), this.subscriptions = {}, (null == t ? void 0 : t.cookieOptions) ? (Ge("SubscriptionDataLayer").isOptionalString("cookieOptions.opaqueTokenCookieName", t.cookieOptions.opaqueTokenCookieName).isOptionalString("cookieOptions.jwtCookieName", t.cookieOptions.jwtCookieName).isOptionalString("cookieOptions.istCookieName", t.cookieOptions.istCookieName).isOptionalString("cookieOptions.path", t.cookieOptions.path).isOptionalString("cookieOptions.domain", t.cookieOptions.domain), this._jwtCookieName = t.cookieOptions.jwtCookieName || null, this._opaqueTokenCookieName = t.cookieOptions.opaqueTokenCookieName || null, this._cookiePath = t.cookieOptions.path || null, this._domain = t.cookieOptions.domain || null, this._cookieAvailableToSubdomains = t.cookieOptions.availableToSubdomains || !1, this._istCookieName = t.cookieOptions.istCookieName || null) : (this._opaqueTokenCookieName = null, this._jwtCookieName = null, this._cookiePath = null, this._domain = null, this._cookieAvailableToSubdomains = !1, this._istCookieName = null);
4301
4294
  var r = localStorage.getItem(Ot(this.publicToken));
4302
4295
  if (!r) return;
4303
4296
  var n;
@@ -4359,7 +4352,7 @@ var Dt = /*#__PURE__*/function () {
4359
4352
  path: this._cookiePath,
4360
4353
  domain: this._domain
4361
4354
  });
4362
- Pt(this.jwtCookieName) && Tt.remove(this.jwtCookieName, u), Pt(this.opaqueTokenCookieName) && Tt.remove(this.opaqueTokenCookieName, u), Pt(this.jwtCookieName) && qe("Could not remove extraneous JWT cookie. This might happen if the cookie has been set using multiple `path` settings, and may produce unwanted behavior."), Pt(this.opaqueTokenCookieName) && qe("Could not remove extraneous opaque token cookie.");
4355
+ Ct(this.jwtCookieName) && Tt.remove(this.jwtCookieName, u), Ct(this.opaqueTokenCookieName) && Tt.remove(this.opaqueTokenCookieName, u), Ct(this.jwtCookieName) && Ue("Could not remove extraneous JWT cookie. This might happen if the cookie has been set using multiple `path` settings, and may produce unwanted behavior."), Ct(this.opaqueTokenCookieName) && Ue("Could not remove extraneous opaque token cookie.");
4363
4356
  }
4364
4357
  }, {
4365
4358
  key: "writeIntermediateSessionTokenCookie",
@@ -4423,15 +4416,6 @@ var Dt = /*#__PURE__*/function () {
4423
4416
  value: function removeItem(e) {
4424
4417
  return localStorage.removeItem(Ot(this.publicToken, e));
4425
4418
  }
4426
- }, {
4427
- key: "markStateKeysUpdated",
4428
- value: function markStateKeysUpdated(e) {
4429
- var _this6 = this;
4430
- var t = this.stateKeysUpdated.size;
4431
- return e.forEach(function (e) {
4432
- return _this6.stateKeysUpdated.add(e);
4433
- }), t !== this.stateKeysUpdated.size;
4434
- }
4435
4419
  }], [{
4436
4420
  key: "generateCookieOpts",
4437
4421
  value: function generateCookieOpts(_ref4) {
@@ -4457,45 +4441,48 @@ var It = /*#__PURE__*/function (_Dt) {
4457
4441
  return _createClass(It);
4458
4442
  }(Dt);
4459
4443
  var Rt = Symbol["for"]("__stytch_b2b_DataLayer"),
4460
- jt = function jt(e, t) {
4444
+ Ft = function Ft(e, t) {
4461
4445
  var r = function () {
4462
4446
  var e = window;
4463
4447
  return e[Rt] || (e[Rt] = {}), e[Rt];
4464
4448
  }();
4465
4449
  return r[e] || (r[e] = new It(e, t)), r[e];
4466
4450
  },
4467
- Ft = function Ft(e, t) {
4451
+ jt = function jt(e, t) {
4468
4452
  Object.values(e).forEach(function (e) {
4469
4453
  return e(t);
4470
4454
  });
4471
4455
  },
4472
4456
  Lt = function () {
4473
- var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).KEYS_TO_EXCLUDE,
4474
- t = void 0 === e ? [] : e;
4475
- return function e(r, n) {
4476
- return fe(r) === fe(n) && (null === r || null === n ? r === n : "object" === fe(r) ? Object.keys(r).length === Object.keys(n).length && !Object.keys(r).some(function (e) {
4457
+ var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
4458
+ _ref5$KEYS_TO_EXCLUDE = _ref5.KEYS_TO_EXCLUDE,
4459
+ e = _ref5$KEYS_TO_EXCLUDE === void 0 ? [] : _ref5$KEYS_TO_EXCLUDE;
4460
+ var t = function t(r, n) {
4461
+ return _typeof(r) == _typeof(n) && (null === r || null === n ? r === n : "object" == _typeof(r) ? Object.keys(r).length === Object.keys(n).length && !Object.keys(r).some(function (e) {
4477
4462
  return !(e in n);
4478
- }) && Object.entries(r).filter(function (e) {
4479
- var r = de(e, 1)[0];
4480
- return !t.includes(r);
4481
- }).every(function (t) {
4482
- var r = de(t, 2),
4483
- i = r[0],
4484
- o = r[1];
4485
- return e(o, n[i]);
4463
+ }) && Object.entries(r).filter(function (_ref6) {
4464
+ var _ref7 = _slicedToArray(_ref6, 1),
4465
+ t = _ref7[0];
4466
+ return !e.includes(t);
4467
+ }).every(function (_ref8) {
4468
+ var _ref9 = _slicedToArray(_ref8, 2),
4469
+ e = _ref9[0],
4470
+ r = _ref9[1];
4471
+ return t(r, n[e]);
4486
4472
  }) : r === n);
4487
4473
  };
4474
+ return t;
4488
4475
  }({
4489
4476
  KEYS_TO_EXCLUDE: ["last_accessed_at"]
4490
4477
  });
4491
4478
  var Mt = /*#__PURE__*/function () {
4492
4479
  function Mt(e, t) {
4493
- var _this7 = this;
4480
+ var _this6 = this;
4494
4481
  _classCallCheck(this, Mt);
4495
- this._publicToken = e, this._datalayer = t, this._listen = function (e) {
4496
- if (e.key !== Ot(_this7._publicToken)) return;
4482
+ this._publicToken = e, this._datalayer = t, this.fromCache = !0, this._listen = function (e) {
4483
+ if (e.key !== Ot(_this6._publicToken)) return;
4497
4484
  var t = null === e.newValue || "null" === e.newValue ? null : JSON.parse(e.newValue);
4498
- _this7.updateState(t, !0);
4485
+ _this6.updateState(t, !0);
4499
4486
  }, window.addEventListener("storage", this._listen);
4500
4487
  var _this$_datalayer$read = this._datalayer.readSessionCookie(),
4501
4488
  r = _this$_datalayer$read.session_token;
@@ -4538,8 +4525,8 @@ var Mt = /*#__PURE__*/function () {
4538
4525
  var t = this._datalayer.state,
4539
4526
  r = null === e.state ? null : Object.assign(Object.assign({}, this._datalayer.state), e.state);
4540
4527
  this._datalayer.state = r;
4541
- var n = e.state ? Object.keys(e.state) : [];
4542
- !this._datalayer.markStateKeysUpdated(n) && Lt(t, r) || Ft(this._datalayer.subscriptions, r);
4528
+ var n = this.getFromCache();
4529
+ this.setCacheRefreshed(), !n && Lt(t, r) || jt(this._datalayer.subscriptions, r);
4543
4530
  }
4544
4531
  }, {
4545
4532
  key: "updateStateAndTokens",
@@ -4553,10 +4540,10 @@ var Mt = /*#__PURE__*/function () {
4553
4540
  var r = this._datalayer.state,
4554
4541
  n = null === e ? null : Object.assign(Object.assign({}, this._datalayer.state), e);
4555
4542
  this._datalayer.state = n;
4556
- var i = e ? Object.keys(e) : [],
4557
- o = this._datalayer.markStateKeysUpdated(i),
4558
- s = !Lt(r, n);
4559
- (o || s) && (Ft(this._datalayer.subscriptions, n), s && !t && this._datalayer.syncToLocalStorage());
4543
+ var i = this.getFromCache();
4544
+ this.setCacheRefreshed();
4545
+ var o = !Lt(r, n);
4546
+ (i || o) && (jt(this._datalayer.subscriptions, n), o && !t && this._datalayer.syncToLocalStorage());
4560
4547
  }
4561
4548
  }, {
4562
4549
  key: "updateTokens",
@@ -4595,44 +4582,54 @@ var Mt = /*#__PURE__*/function () {
4595
4582
  value: function syncFromDeviceStorage() {
4596
4583
  return null;
4597
4584
  }
4585
+ }, {
4586
+ key: "getFromCache",
4587
+ value: function getFromCache() {
4588
+ return this.fromCache;
4589
+ }
4590
+ }, {
4591
+ key: "setCacheRefreshed",
4592
+ value: function setCacheRefreshed() {
4593
+ this.fromCache = !1;
4594
+ }
4598
4595
  }]);
4599
4596
  return Mt;
4600
4597
  }();
4601
4598
  var Bt = /*#__PURE__*/function (_Mt) {
4602
4599
  _inherits(Bt, _Mt);
4603
4600
  function Bt() {
4604
- var _this8;
4601
+ var _this7;
4605
4602
  _classCallCheck(this, Bt);
4606
- _this8 = _callSuper(this, Bt, arguments), _this8.updateMember = function (e) {
4607
- return _this8.updateState({
4603
+ _this7 = _callSuper(this, Bt, arguments), _this7.updateMember = function (e) {
4604
+ return _this7.updateState({
4608
4605
  member: e
4609
4606
  });
4610
- }, _this8.getMember = function () {
4607
+ }, _this7.getMember = function () {
4611
4608
  var e, t;
4612
- return null !== (t = null === (e = _this8.getState()) || void 0 === e ? void 0 : e.member) && void 0 !== t ? t : null;
4613
- }, _this8.updateOrganization = function (e) {
4614
- return _this8.updateState({
4609
+ return null !== (t = null === (e = _this7.getState()) || void 0 === e ? void 0 : e.member) && void 0 !== t ? t : null;
4610
+ }, _this7.updateOrganization = function (e) {
4611
+ return _this7.updateState({
4615
4612
  organization: e
4616
4613
  });
4617
- }, _this8.getOrganization = function () {
4614
+ }, _this7.getOrganization = function () {
4618
4615
  var e, t;
4619
- return null !== (t = null === (e = _this8.getState()) || void 0 === e ? void 0 : e.organization) && void 0 !== t ? t : null;
4620
- }, _this8.getSession = function () {
4616
+ return null !== (t = null === (e = _this7.getState()) || void 0 === e ? void 0 : e.organization) && void 0 !== t ? t : null;
4617
+ }, _this7.getSession = function () {
4621
4618
  var e, t;
4622
- return null !== (t = null === (e = _this8.getState()) || void 0 === e ? void 0 : e.session) && void 0 !== t ? t : null;
4619
+ return null !== (t = null === (e = _this7.getState()) || void 0 === e ? void 0 : e.session) && void 0 !== t ? t : null;
4623
4620
  };
4624
- return _this8;
4621
+ return _this7;
4625
4622
  }
4626
4623
  return _createClass(Bt);
4627
4624
  }(Mt);
4628
4625
  var Kt = Symbol["for"]("stytch__internal_b2b");
4629
4626
  var zt = /*#__PURE__*/_createClass(function zt(e, t) {
4630
- var _this9 = this;
4627
+ var _this8 = this;
4631
4628
  _classCallCheck(this, zt);
4632
4629
  var r;
4633
4630
  !function (e) {
4634
4631
  if ("undefined" == typeof window) throw new Error("The ".concat(e, " is not compatible with server-side environments.\nIf using nextjs, use the create").concat(e, " method instead.\n```\n").concat("import { createStytchB2BHeadlessClient } from '@stytch/nextjs/b2b';\n \n const stytch = createStytchB2BHeadlessClient('public-token-...');\n ", "\n```\n"));
4635
- }("StytchB2BHeadlessClient"), "string" != typeof (r = e) ? qe("Public token is malformed. Expected a string, got ".concat(fe(r), ".").concat(He)) : "" === r ? qe('Public token is malformed. Expected "public-token-...", got an empty string.'.concat(He)) : r.startsWith("public-token-") || qe('Public token is malformed. Expected "public-token-...", got '.concat(r, ".").concat(He));
4632
+ }("StytchB2BHeadlessClient"), "string" != typeof (r = e) ? Ue("Public token is malformed. Expected a string, got ".concat(pe(r), ".").concat(We)) : "" === r ? Ue('Public token is malformed. Expected "public-token-...", got an empty string.'.concat(We)) : r.startsWith("public-token-") || Ue('Public token is malformed. Expected "public-token-...", got '.concat(r, ".").concat(We));
4636
4633
  var n = t,
4637
4634
  i = {
4638
4635
  cookieOptions: null == (o = n) ? void 0 : o.cookieOptions,
@@ -4645,29 +4642,32 @@ var zt = /*#__PURE__*/_createClass(function zt(e, t) {
4645
4642
  }
4646
4643
  };
4647
4644
  var o, s, a, c, u, l, d, h, p, f, _;
4648
- this._dataLayer = jt(e, n), this._subscriptionService = new Bt(e, this._dataLayer);
4645
+ this._dataLayer = Ft(e, n), this._subscriptionService = new Bt(e, this._dataLayer), this._stateChangeClient = new ft(this._subscriptionService, {}), this.onStateChange = function () {
4646
+ var _this8$_stateChangeCl;
4647
+ return (_this8$_stateChangeCl = _this8._stateChangeClient).onStateChange.apply(_this8$_stateChangeCl, arguments);
4648
+ };
4649
4649
  var m = new St(this._dataLayer, "passwords");
4650
4650
  this._networkClient = new yt(e, this._dataLayer, i.endpoints.sdkBackendURL, function () {
4651
4651
  var e, t, r, n;
4652
4652
  return {
4653
- stytch_member_id: null === (t = null === (e = _this9._dataLayer.state) || void 0 === e ? void 0 : e.member) || void 0 === t ? void 0 : t.member_id,
4654
- stytch_member_session_id: null === (n = null === (r = _this9._dataLayer.state) || void 0 === r ? void 0 : r.session) || void 0 === n ? void 0 : n.member_session_id
4653
+ stytch_member_id: null === (t = null === (e = _this8._dataLayer.state) || void 0 === e ? void 0 : e.member) || void 0 === t ? void 0 : t.member_id,
4654
+ stytch_member_session_id: null === (n = null === (r = _this8._dataLayer.state) || void 0 === r ? void 0 : r.session) || void 0 === n ? void 0 : n.member_session_id
4655
4655
  };
4656
4656
  });
4657
4657
  var v = new vt(e, this._networkClient, this._dataLayer),
4658
4658
  b = new gt(v.getAsync()),
4659
- g = new Ye(e, i.endpoints.dfpBackendURL, v.getAsync(), b.executeRecaptcha),
4659
+ g = new Ve(e, i.endpoints.dfpBackendURL, v.getAsync(), b.executeRecaptcha),
4660
4660
  k = new kt(i.endpoints.clientsideServicesIframeURL);
4661
- this.organization = new rt(this._networkClient, this._subscriptionService), this.member = new et(this._networkClient, this._subscriptionService), this.self = new et(this._networkClient, this._subscriptionService), this.session = new it(this._networkClient, this._subscriptionService), this.magicLinks = new Qe(this._networkClient, this._subscriptionService, new St(this._dataLayer, "magic_links"), m, v.getAsync(), g), this.oauth = new nt(this._networkClient, this._subscriptionService, new St(this._dataLayer, "oauth"), v.getAsync(), {
4661
+ this.organization = new tt(this._networkClient, this._subscriptionService), this.member = new Qe(this._networkClient, this._subscriptionService), this.self = new Qe(this._networkClient, this._subscriptionService), this.session = new nt(this._networkClient, this._subscriptionService), this.magicLinks = new Ze(this._networkClient, this._subscriptionService, new St(this._dataLayer, "magic_links"), m, v.getAsync(), g), this.oauth = new rt(this._networkClient, this._subscriptionService, new St(this._dataLayer, "oauth"), v.getAsync(), {
4662
4662
  publicToken: e,
4663
4663
  testAPIURL: i.endpoints.testAPIURL,
4664
4664
  liveAPIURL: i.endpoints.liveAPIURL
4665
- }, g), this.sso = new tt(this._networkClient, this._subscriptionService, new St(this._dataLayer, "sso"), v.getAsync(), {
4665
+ }, g), this.sso = new et(this._networkClient, this._subscriptionService, new St(this._dataLayer, "sso"), v.getAsync(), {
4666
4666
  publicToken: e,
4667
4667
  testAPIURL: i.endpoints.testAPIURL,
4668
4668
  liveAPIURL: i.endpoints.liveAPIURL
4669
- }), this.discovery = new ot(this._networkClient, this._subscriptionService), this.passwords = new at(this._networkClient, this._subscriptionService, m, v.getAsync(), g), this.otps = new ct(this._networkClient, this._subscriptionService, g), this.totp = new ut(this._networkClient, this._subscriptionService, g), this.recoveryCodes = new lt(this._networkClient, this._subscriptionService, g), this.rbac = new dt(v.getSync(), v.getAsync(), this._subscriptionService), this._sessionManager = new ft(this._subscriptionService, this.session);
4670
- var y = new pt(this._networkClient, g);
4669
+ }), this.discovery = new it(this._networkClient, this._subscriptionService), this.passwords = new st(this._networkClient, this._subscriptionService, m, v.getAsync(), g), this.otps = new at(this._networkClient, this._subscriptionService, g), this.totp = new ct(this._networkClient, this._subscriptionService, g), this.recoveryCodes = new ut(this._networkClient, this._subscriptionService, g), this.rbac = new lt(v.getSync(), v.getAsync(), this._subscriptionService), this._sessionManager = new pt(this._subscriptionService, this.session);
4670
+ var y = new ht(this._networkClient, g);
4671
4671
  this._dataLayer.readSessionCookie().session_token && this._sessionManager.performBackgroundRefresh(), this._networkClient.logEvent({
4672
4672
  name: "b2b_sdk_instance_instantiated",
4673
4673
  details: {
@@ -4687,4 +4687,4 @@ var zt = /*#__PURE__*/_createClass(function zt(e, t) {
4687
4687
  networkClient: this._networkClient
4688
4688
  });
4689
4689
  });
4690
- export { k as AuthFlowType, y as B2BMFAProducts, w as B2BOAuthProviders, g as B2BProducts, Q as BiometricsFailedError, L as BiometricsUnavailableError, Y as ChallengeSigningFailedError, U as DeviceCredentialsNotAllowedError, $ as FailedCodeChallengeError, Z as FailedToDecryptDataError, j as InternalError, G as InvalidAuthorizationCredentialError, ne as InvalidCredentialTypeError, te as InvalidRedirectSchemeError, ee as InvalidStartUrlError, oe as JSONDataNotConvertibleToStringError, M as KeyInvalidatedError, B as KeystoreUnavailableError, ie as MissingAttestationObjectError, H as MissingAuthorizationCredentialIDTokenError, q as MissingGoogleClientIDError, W as MissingPKCEError, V as MissingPublicKeyError, re as MissingUrlError, K as NoBiometricsEnrolledError, F as NoBiometricsRegistrationError, R as NoCurrentSessionError, p as OAuthProviders, m as OTPMethods, _ as OneTapPositions, ae as PasskeysInvalidEncoding, ce as PasskeysMisconfigured, X as PasskeysUnsupportedError, h as Products, b as RNUIProducts, se as RandomNumberGenerationFailed, S as SDKAPIUnreachableError, J as SDKNotConfiguredError, ue as SignInWithAppleMisconfigured, D as StytchAPIError, E as StytchAPISchemaError, A as StytchAPIUnreachableError, zt as StytchB2BHeadlessClient, x as StytchError, v as StytchEventType, T as StytchSDKAPIError, I as StytchSDKError, C as StytchSDKSchemaError, P as StytchSDKUsageError, O as UNRECOVERABLE_ERROR_TYPES, z as UserCancellationError, N as UserLockedOutError, f as Wallets, le as errorToStytchError };
4690
+ export { k as AuthFlowType, y as B2BMFAProducts, w as B2BOAuthProviders, g as B2BProducts, Q as BiometricsFailedError, L as BiometricsUnavailableError, Y as ChallengeSigningFailedError, U as DeviceCredentialsNotAllowedError, $ as FailedCodeChallengeError, Z as FailedToDecryptDataError, F as InternalError, G as InvalidAuthorizationCredentialError, ne as InvalidCredentialTypeError, te as InvalidRedirectSchemeError, ee as InvalidStartUrlError, oe as JSONDataNotConvertibleToStringError, M as KeyInvalidatedError, B as KeystoreUnavailableError, ie as MissingAttestationObjectError, H as MissingAuthorizationCredentialIDTokenError, q as MissingGoogleClientIDError, W as MissingPKCEError, V as MissingPublicKeyError, re as MissingUrlError, K as NoBiometricsEnrolledError, j as NoBiometricsRegistrationError, R as NoCurrentSessionError, p as OAuthProviders, m as OTPMethods, _ as OneTapPositions, ae as PasskeysInvalidEncoding, ce as PasskeysMisconfigured, X as PasskeysUnsupportedError, h as Products, b as RNUIProducts, se as RandomNumberGenerationFailed, S as SDKAPIUnreachableError, J as SDKNotConfiguredError, ue as SignInWithAppleMisconfigured, D as StytchAPIError, E as StytchAPISchemaError, A as StytchAPIUnreachableError, zt as StytchB2BHeadlessClient, x as StytchError, v as StytchEventType, T as StytchSDKAPIError, I as StytchSDKError, P as StytchSDKSchemaError, C as StytchSDKUsageError, O as UNRECOVERABLE_ERROR_TYPES, z as UserCancellationError, N as UserLockedOutError, f as Wallets, le as errorToStytchError };