@stytch/vanilla-js 4.4.3 → 4.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/b2b/index.esm.js +2617 -2709
- package/dist/b2b/index.headless.esm.js +302 -392
- package/dist/b2b/index.headless.js +299 -389
- package/dist/b2b/index.js +2617 -2709
- package/dist/index.esm.js +3119 -3211
- package/dist/index.headless.esm.js +331 -421
- package/dist/index.headless.js +323 -413
- package/dist/index.js +3114 -3206
- package/package.json +1 -1
|
@@ -15,16 +15,16 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
15
15
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
16
16
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
17
17
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
-
function _toPropertyKey(
|
|
19
|
-
function _toPrimitive(
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
20
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
-
function
|
|
22
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
21
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
23
22
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
24
23
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
25
|
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
26
|
-
function _construct(
|
|
27
|
-
function _isNativeReflectConstruct() {
|
|
26
|
+
function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; }
|
|
27
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
28
28
|
function _isNativeFunction(fn) { try { return Function.toString.call(fn).indexOf("[native code]") !== -1; } catch (e) { return typeof fn === "function"; } }
|
|
29
29
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
30
30
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
@@ -36,31 +36,45 @@ function e(t) {
|
|
|
36
36
|
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
37
37
|
}, e(t);
|
|
38
38
|
}
|
|
39
|
-
function t(
|
|
40
|
-
for (var
|
|
41
|
-
var i = r
|
|
42
|
-
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(
|
|
43
|
-
if ("object" !== e(t) || null === t) return t;
|
|
44
|
-
var n = t[Symbol.toPrimitive];
|
|
45
|
-
if (void 0 !== n) {
|
|
46
|
-
var i = n.call(t, r || "default");
|
|
47
|
-
if ("object" !== e(i)) return i;
|
|
48
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
49
|
-
}
|
|
50
|
-
return ("string" === r ? String : Number)(t);
|
|
51
|
-
}(o, "string"), "symbol" === e(s) ? s : String(s)), i);
|
|
39
|
+
function t(e, t) {
|
|
40
|
+
for (var r = 0; r < t.length; r++) {
|
|
41
|
+
var i = t[r];
|
|
42
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, n(i.key), i);
|
|
52
43
|
}
|
|
53
|
-
var o, s;
|
|
54
44
|
}
|
|
55
45
|
function r(e, r, n) {
|
|
56
46
|
return r && t(e.prototype, r), n && t(e, n), Object.defineProperty(e, "prototype", {
|
|
57
47
|
writable: !1
|
|
58
48
|
}), e;
|
|
59
49
|
}
|
|
60
|
-
function n(
|
|
61
|
-
|
|
50
|
+
function n(t) {
|
|
51
|
+
var r = function (t, r) {
|
|
52
|
+
if ("object" != e(t) || !t) return t;
|
|
53
|
+
var n = t[Symbol.toPrimitive];
|
|
54
|
+
if (void 0 !== n) {
|
|
55
|
+
var i = n.call(t, r || "default");
|
|
56
|
+
if ("object" != e(i)) return i;
|
|
57
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
58
|
+
}
|
|
59
|
+
return ("string" === r ? String : Number)(t);
|
|
60
|
+
}(t, "string");
|
|
61
|
+
return "symbol" == e(r) ? r : String(r);
|
|
62
62
|
}
|
|
63
63
|
function i(e, t) {
|
|
64
|
+
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
65
|
+
}
|
|
66
|
+
function o(t, r, n) {
|
|
67
|
+
return r = d(r), function (t, r) {
|
|
68
|
+
if (r && ("object" === e(r) || "function" == typeof r)) return r;
|
|
69
|
+
if (void 0 !== r) throw new TypeError("Derived constructors may only return object or undefined");
|
|
70
|
+
return s(t);
|
|
71
|
+
}(t, u() ? Reflect.construct(r, n || [], d(t).constructor) : r.apply(t, n));
|
|
72
|
+
}
|
|
73
|
+
function s(e) {
|
|
74
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
75
|
+
return e;
|
|
76
|
+
}
|
|
77
|
+
function a(e, t) {
|
|
64
78
|
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
|
65
79
|
e.prototype = Object.create(t && t.prototype, {
|
|
66
80
|
constructor: {
|
|
@@ -72,29 +86,9 @@ function i(e, t) {
|
|
|
72
86
|
writable: !1
|
|
73
87
|
}), t && l(e, t);
|
|
74
88
|
}
|
|
75
|
-
function
|
|
76
|
-
var r = u();
|
|
77
|
-
return function () {
|
|
78
|
-
var n,
|
|
79
|
-
i = d(t);
|
|
80
|
-
if (r) {
|
|
81
|
-
var o = d(this).constructor;
|
|
82
|
-
n = Reflect.construct(i, arguments, o);
|
|
83
|
-
} else n = i.apply(this, arguments);
|
|
84
|
-
return function (t, r) {
|
|
85
|
-
if (r && ("object" === e(r) || "function" == typeof r)) return r;
|
|
86
|
-
if (void 0 !== r) throw new TypeError("Derived constructors may only return object or undefined");
|
|
87
|
-
return s(t);
|
|
88
|
-
}(this, n);
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
function s(e) {
|
|
92
|
-
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
93
|
-
return e;
|
|
94
|
-
}
|
|
95
|
-
function a(e) {
|
|
89
|
+
function c(e) {
|
|
96
90
|
var t = "function" == typeof Map ? new Map() : void 0;
|
|
97
|
-
return
|
|
91
|
+
return c = function c(e) {
|
|
98
92
|
if (null === e || !function (e) {
|
|
99
93
|
try {
|
|
100
94
|
return -1 !== Function.toString.call(e).indexOf("[native code]");
|
|
@@ -108,7 +102,13 @@ function a(e) {
|
|
|
108
102
|
t.set(e, r);
|
|
109
103
|
}
|
|
110
104
|
function r() {
|
|
111
|
-
return
|
|
105
|
+
return function (e, t, r) {
|
|
106
|
+
if (u()) return Reflect.construct.apply(null, arguments);
|
|
107
|
+
var n = [null];
|
|
108
|
+
n.push.apply(n, t);
|
|
109
|
+
var i = new (e.bind.apply(e, n))();
|
|
110
|
+
return r && l(i, r.prototype), i;
|
|
111
|
+
}(e, arguments, d(this).constructor);
|
|
112
112
|
}
|
|
113
113
|
return r.prototype = Object.create(e.prototype, {
|
|
114
114
|
constructor: {
|
|
@@ -118,25 +118,15 @@ function a(e) {
|
|
|
118
118
|
configurable: !0
|
|
119
119
|
}
|
|
120
120
|
}), l(r, e);
|
|
121
|
-
},
|
|
122
|
-
}
|
|
123
|
-
function c(e, t, r) {
|
|
124
|
-
return c = u() ? Reflect.construct.bind() : function (e, t, r) {
|
|
125
|
-
var n = [null];
|
|
126
|
-
n.push.apply(n, t);
|
|
127
|
-
var i = new (Function.bind.apply(e, n))();
|
|
128
|
-
return r && l(i, r.prototype), i;
|
|
129
|
-
}, c.apply(null, arguments);
|
|
121
|
+
}, c(e);
|
|
130
122
|
}
|
|
131
123
|
function u() {
|
|
132
|
-
if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
|
|
133
|
-
if (Reflect.construct.sham) return !1;
|
|
134
|
-
if ("function" == typeof Proxy) return !0;
|
|
135
124
|
try {
|
|
136
|
-
|
|
137
|
-
} catch (e) {
|
|
138
|
-
|
|
139
|
-
|
|
125
|
+
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
126
|
+
} catch (e) {}
|
|
127
|
+
return (u = function u() {
|
|
128
|
+
return !!e;
|
|
129
|
+
})();
|
|
140
130
|
}
|
|
141
131
|
function l(e, t) {
|
|
142
132
|
return l = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
|
|
@@ -164,338 +154,262 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
164
154
|
e.MagicLinkLoginOrCreateEvent = "MAGIC_LINK_LOGIN_OR_CREATE", e.OTPsLoginOrCreateEvent = "OTP_LOGIN_OR_CREATE", e.OTPsAuthenticate = "OTP_AUTHENTICATE", e.CryptoWalletAuthenticateStart = "CRYPTO_WALLET_AUTHENTICATE_START", e.CryptoWalletAuthenticate = "CRYPTO_WALLET_AUTHENTICATE", e.PasswordCreate = "PASSWORD_CREATE", e.PasswordAuthenticate = "PASSWORD_AUTHENTICATE", e.PasswordResetByEmailStart = "PASSWORD_RESET_BY_EMAIL_START", e.PasswordResetByEmail = "PASSWORD_RESET_BY_EMAIL", e.PasskeyRegister = "PASSKEY_REGISTER", e.PasskeyAuthenticate = "PASSKEY_AUTHENTICATE", e.PasskeySkip = "PASSKEY_SKIP", e.PasskeyDone = "PASSKEY_DONE", e.B2BMagicLinkEmailLoginOrSignup = "B2B_MAGIC_LINK_EMAIL_LOGIN_OR_SIGNUP", e.B2BMagicLinkAuthenticate = "B2B_MAGIC_LINK_AUTHENTICATE", e.B2BMagicLinkEmailDiscoverySend = "B2B_MAGIC_LINK_EMAIL_DISCOVERY_SEND", e.B2BMagicLinkDiscoveryAuthenticate = "B2B_MAGIC_LINK_DISCOVERY_AUTHENTICATE", e.B2BSSOStart = "B2B_SSO_START", e.B2BSSOAuthenticate = "B2B_SSO_AUTHENTICATE", e.B2BOAuthAuthenticate = "B2B_OAUTH_AUTHENTICATE", e.B2BOAuthDiscoveryAuthenticate = "B2B_OAUTH_DISCOVERY_AUTHENTICATE", e.B2BDiscoveryOrganizationsCreate = "B2B_DISCOVERY_ORGANIZATIONS_CREATE", e.B2BDiscoveryIntermediateSessionExchange = "B2B_DISCOVERY_INTERMEDIATE_SESSION_EXCHANGE", e.B2BPasswordAuthenticate = "B2B_PASSWORD_AUTHENTICATE", e.B2BPasswordResetByEmailStart = "B2B_PASSWORD_RESET_BY_EMAIL_START", e.B2BPasswordResetByEmail = "B2B_PASSWORD_RESET_BY_EMAIL", e.B2BPasswordResetBySession = "B2B_PASSWORD_RESET_BY_SESSION";
|
|
165
155
|
}(exports.StytchEventType || (exports.StytchEventType = {}));
|
|
166
156
|
var h = function (e) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
var i;
|
|
171
|
-
return n(this, c), (i = t.call(this, e + "\n" + r)).message = e + "\n" + r, i.name = "SDKAPIUnreachableError", i.details = r, Object.setPrototypeOf(s(i), c.prototype), i;
|
|
157
|
+
function t(e, r) {
|
|
158
|
+
var n;
|
|
159
|
+
return i(this, t), (n = o(this, t, [e + "\n" + r])).message = e + "\n" + r, n.name = "SDKAPIUnreachableError", n.details = r, Object.setPrototypeOf(s(n), t.prototype), n;
|
|
172
160
|
}
|
|
173
|
-
return
|
|
161
|
+
return a(t, c(Error)), r(t);
|
|
174
162
|
}(),
|
|
175
163
|
p = function (e) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
var i;
|
|
180
|
-
return n(this, s), (i = t.call(this)).name = "StytchSDKUsageError", i.message = "Invalid call to ".concat(e, "\n") + r, i;
|
|
164
|
+
function t(e, r) {
|
|
165
|
+
var n;
|
|
166
|
+
return i(this, t), (n = o(this, t)).name = "StytchSDKUsageError", n.message = "Invalid call to ".concat(e, "\n") + r, n;
|
|
181
167
|
}
|
|
182
|
-
return r(
|
|
168
|
+
return a(t, c(Error)), r(t);
|
|
183
169
|
}(),
|
|
184
170
|
_ = function (e) {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
var
|
|
189
|
-
n(this, s), (r = t.call(this)).name = "StytchSDKSchemaError";
|
|
190
|
-
var o = null === (i = e.body) || void 0 === i ? void 0 : i.map(function (e) {
|
|
171
|
+
function t(e) {
|
|
172
|
+
var r, n;
|
|
173
|
+
i(this, t), (r = o(this, t)).name = "StytchSDKSchemaError";
|
|
174
|
+
var s = null === (n = e.body) || void 0 === n ? void 0 : n.map(function (e) {
|
|
191
175
|
return "".concat(e.dataPath, ": ").concat(e.message);
|
|
192
176
|
}).join("\n");
|
|
193
|
-
return r.message = "[400] Request does not match expected schema\n".concat(
|
|
177
|
+
return r.message = "[400] Request does not match expected schema\n".concat(s), r;
|
|
194
178
|
}
|
|
195
|
-
return r(
|
|
179
|
+
return a(t, c(Error)), r(t);
|
|
196
180
|
}(),
|
|
197
181
|
f = function (e) {
|
|
198
|
-
|
|
199
|
-
var t = o(s);
|
|
200
|
-
function s(e) {
|
|
182
|
+
function t(e) {
|
|
201
183
|
var r;
|
|
202
|
-
|
|
203
|
-
var
|
|
204
|
-
|
|
184
|
+
i(this, t), (r = o(this, t)).name = "StytchSDKAPIError";
|
|
185
|
+
var n = e.status_code,
|
|
186
|
+
s = e.error_type,
|
|
205
187
|
a = e.error_message,
|
|
206
188
|
c = e.error_url,
|
|
207
189
|
u = e.request_id;
|
|
208
|
-
return r.error_type =
|
|
190
|
+
return r.error_type = s, r.error_message = a, r.error_url = c, r.request_id = u, r.status_code = n, r.message = "[".concat(n, "] ").concat(s, "\n") + "".concat(a, "\n") + "See ".concat(c, " for more information.\n") + (u ? "request_id: ".concat(u, "\n") : ""), r;
|
|
209
191
|
}
|
|
210
|
-
return r(
|
|
192
|
+
return a(t, c(Error)), r(t);
|
|
211
193
|
}(),
|
|
212
194
|
m = ["unauthorized_credentials", "user_unauthenticated", "invalid_secret_authentication", "session_not_found"],
|
|
213
195
|
v = function (e) {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
var i;
|
|
218
|
-
return n(this, s), (i = t.call(this, r)).name = e, i;
|
|
196
|
+
function t(e, r) {
|
|
197
|
+
var n;
|
|
198
|
+
return i(this, t), (n = o(this, t, [r])).name = e, n;
|
|
219
199
|
}
|
|
220
|
-
return r(
|
|
200
|
+
return a(t, c(Error)), r(t);
|
|
221
201
|
}(),
|
|
222
202
|
b = function (e) {
|
|
223
|
-
|
|
224
|
-
var t = o(a);
|
|
225
|
-
function a(e) {
|
|
203
|
+
function t(e) {
|
|
226
204
|
var r;
|
|
227
|
-
return
|
|
205
|
+
return i(this, t), r = o(this, t, ["StytchAPIUnreachableError", e]), Object.setPrototypeOf(s(r), t.prototype), r;
|
|
228
206
|
}
|
|
229
|
-
return r(
|
|
207
|
+
return a(t, v), r(t);
|
|
230
208
|
}(),
|
|
231
209
|
g = function (e) {
|
|
232
|
-
|
|
233
|
-
var t = o(s);
|
|
234
|
-
function s(e) {
|
|
210
|
+
function t(e) {
|
|
235
211
|
var r;
|
|
236
|
-
|
|
237
|
-
var
|
|
212
|
+
i(this, t);
|
|
213
|
+
var n = null === (r = e.body) || void 0 === r ? void 0 : r.map(function (e) {
|
|
238
214
|
return "".concat(e.dataPath, ": ").concat(e.message);
|
|
239
215
|
}).join("\n");
|
|
240
|
-
return
|
|
216
|
+
return o(this, t, ["StytchAPISchemaError", "Request does not match expected schema\n".concat(n)]);
|
|
241
217
|
}
|
|
242
|
-
return r(
|
|
218
|
+
return a(t, v), r(t);
|
|
243
219
|
}(),
|
|
244
220
|
y = function (e) {
|
|
245
|
-
|
|
246
|
-
var t = o(s);
|
|
247
|
-
function s(e) {
|
|
221
|
+
function t(e) {
|
|
248
222
|
var r;
|
|
249
|
-
|
|
250
|
-
var
|
|
251
|
-
|
|
223
|
+
i(this, t);
|
|
224
|
+
var n = e.status_code,
|
|
225
|
+
s = e.error_type,
|
|
252
226
|
a = e.error_message,
|
|
253
227
|
c = e.error_url,
|
|
254
228
|
u = e.request_id;
|
|
255
|
-
return (r =
|
|
229
|
+
return (r = o(this, t, ["StytchAPIError", "[".concat(n, "] ").concat(s, "\n") + "".concat(a, "\n") + "See ".concat(c, " for more information.\n") + (u ? "request_id: ".concat(u, "\n") : "")])).error_type = s, r.error_message = a, r.error_url = c, r.request_id = u, r.status_code = n, r;
|
|
256
230
|
}
|
|
257
|
-
return r(
|
|
231
|
+
return a(t, v), r(t);
|
|
258
232
|
}(),
|
|
259
233
|
k = function (e) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
var o;
|
|
264
|
-
return n(this, s), (o = t.call(this, e, r)).options = i, o;
|
|
234
|
+
function t(e, r, n) {
|
|
235
|
+
var s;
|
|
236
|
+
return i(this, t), (s = o(this, t, [e, r])).options = n, s;
|
|
265
237
|
}
|
|
266
|
-
return r(
|
|
238
|
+
return a(t, v), r(t);
|
|
267
239
|
}(),
|
|
268
240
|
w = function (e) {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
function s() {
|
|
272
|
-
return n(this, s), t.call(this, "NoCurrentSessionError", "There is no session currently available. Make sure the user is authenticated with a valid session.");
|
|
241
|
+
function t() {
|
|
242
|
+
return i(this, t), o(this, t, ["NoCurrentSessionError", "There is no session currently available. Make sure the user is authenticated with a valid session."]);
|
|
273
243
|
}
|
|
274
|
-
return r(
|
|
244
|
+
return a(t, k), r(t);
|
|
275
245
|
}(),
|
|
276
246
|
S = function (e) {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
function s(e) {
|
|
280
|
-
return n(this, s), t.call(this, "InternalError", e || "An internal error has occurred. Please contact Stytch if this occurs.");
|
|
247
|
+
function t(e) {
|
|
248
|
+
return i(this, t), o(this, t, ["InternalError", e || "An internal error has occurred. Please contact Stytch if this occurs."]);
|
|
281
249
|
}
|
|
282
|
-
return r(
|
|
250
|
+
return a(t, k), r(t);
|
|
283
251
|
}(),
|
|
284
252
|
P = function (e) {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
function s() {
|
|
288
|
-
return n(this, s), t.call(this, "NoBiometricsRegistrationError", "There is no biometric registration available. Authenticate with another method and add a new biometric registration first.");
|
|
253
|
+
function t() {
|
|
254
|
+
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."]);
|
|
289
255
|
}
|
|
290
|
-
return r(
|
|
256
|
+
return a(t, k), r(t);
|
|
291
257
|
}(),
|
|
292
258
|
A = function (e) {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
function s() {
|
|
296
|
-
return n(this, s), t.call(this, "BiometricsUnavailableError", "Biometrics is not available on the device.");
|
|
259
|
+
function t() {
|
|
260
|
+
return i(this, t), o(this, t, ["BiometricsUnavailableError", "Biometrics is not available on the device."]);
|
|
297
261
|
}
|
|
298
|
-
return r(
|
|
262
|
+
return a(t, k), r(t);
|
|
299
263
|
}(),
|
|
300
264
|
C = function (e) {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
function s() {
|
|
304
|
-
return n(this, s), t.call(this, "KeyInvalidatedError", "The biometrics enrollment on the device has changed.");
|
|
265
|
+
function t() {
|
|
266
|
+
return i(this, t), o(this, t, ["KeyInvalidatedError", "The biometrics enrollment on the device has changed."]);
|
|
305
267
|
}
|
|
306
|
-
return r(
|
|
268
|
+
return a(t, k), r(t);
|
|
307
269
|
}(),
|
|
308
270
|
E = function (e) {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
function s() {
|
|
312
|
-
return n(this, s), t.call(this, "KeystoreUnavailableError", "The Android keystore is unavailable on the device. Consider setting allowFallbackToCleartext to true.");
|
|
271
|
+
function t() {
|
|
272
|
+
return i(this, t), o(this, t, ["KeystoreUnavailableError", "The Android keystore is unavailable on the device. Consider setting allowFallbackToCleartext to true."]);
|
|
313
273
|
}
|
|
314
|
-
return r(
|
|
274
|
+
return a(t, k), r(t);
|
|
315
275
|
}(),
|
|
316
276
|
T = function (e) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
function s() {
|
|
320
|
-
return n(this, s), t.call(this, "NoBiometricsEnrolledError", "There is no biometric factor enrolled on the device. Add a biometric factor in the device settings.");
|
|
277
|
+
function t() {
|
|
278
|
+
return i(this, t), o(this, t, ["NoBiometricsEnrolledError", "There is no biometric factor enrolled on the device. Add a biometric factor in the device settings."]);
|
|
321
279
|
}
|
|
322
|
-
return r(
|
|
280
|
+
return a(t, k), r(t);
|
|
323
281
|
}(),
|
|
324
282
|
O = function (e) {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
function s() {
|
|
328
|
-
return n(this, s), t.call(this, "UserCancellationError", "The user canceled the prompt. Ask the user to try again.");
|
|
283
|
+
function t() {
|
|
284
|
+
return i(this, t), o(this, t, ["UserCancellationError", "The user canceled the prompt. Ask the user to try again."]);
|
|
329
285
|
}
|
|
330
|
-
return r(
|
|
286
|
+
return a(t, k), r(t);
|
|
331
287
|
}(),
|
|
332
288
|
x = function (e) {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
function s() {
|
|
336
|
-
return n(this, s), t.call(this, "UserLockedOutError", "The user has been locked out due to too many failed attempts. Ask the user to try again later.");
|
|
289
|
+
function t() {
|
|
290
|
+
return i(this, t), o(this, t, ["UserLockedOutError", "The user has been locked out due to too many failed attempts. Ask the user to try again later."]);
|
|
337
291
|
}
|
|
338
|
-
return r(
|
|
292
|
+
return a(t, k), r(t);
|
|
339
293
|
}(),
|
|
340
294
|
D = function (e) {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
function s() {
|
|
344
|
-
return n(this, s), t.call(this, "DeviceCredentialsNotAllowedError", "The device credentials allowment is mismatched. Change the allowDeviceCredentials parameter to be the same in both the register and authenticate methods.");
|
|
295
|
+
function t() {
|
|
296
|
+
return i(this, t), o(this, t, ["DeviceCredentialsNotAllowedError", "The device credentials allowment is mismatched. Change the allowDeviceCredentials parameter to be the same in both the register and authenticate methods."]);
|
|
345
297
|
}
|
|
346
|
-
return r(
|
|
298
|
+
return a(t, k), r(t);
|
|
347
299
|
}(),
|
|
348
300
|
I = function (e) {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
function s() {
|
|
352
|
-
return n(this, s), t.call(this, "MissingGoogleClientIDError", "No Google client ID was found in the project.");
|
|
301
|
+
function t() {
|
|
302
|
+
return i(this, t), o(this, t, ["MissingGoogleClientIDError", "No Google client ID was found in the project."]);
|
|
353
303
|
}
|
|
354
|
-
return r(
|
|
304
|
+
return a(t, k), r(t);
|
|
355
305
|
}(),
|
|
356
306
|
B = function (e) {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
function s() {
|
|
360
|
-
return n(this, s), t.call(this, "MissingPKCEError", "Make sure this flow is completed on the same device on which it was started.");
|
|
307
|
+
function t() {
|
|
308
|
+
return i(this, t), o(this, t, ["MissingPKCEError", "Make sure this flow is completed on the same device on which it was started."]);
|
|
361
309
|
}
|
|
362
|
-
return r(
|
|
310
|
+
return a(t, k), r(t);
|
|
363
311
|
}(),
|
|
364
312
|
R = function (e) {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
function s() {
|
|
368
|
-
return n(this, s), t.call(this, "MissingAuthorizationCredentialIDTokenError", "The authorization credential is missing an ID token.");
|
|
313
|
+
function t() {
|
|
314
|
+
return i(this, t), o(this, t, ["MissingAuthorizationCredentialIDTokenError", "The authorization credential is missing an ID token."]);
|
|
369
315
|
}
|
|
370
|
-
return r(
|
|
316
|
+
return a(t, k), r(t);
|
|
371
317
|
}(),
|
|
372
318
|
L = function (e) {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
function s() {
|
|
376
|
-
return n(this, s), t.call(this, "InvalidAuthorizationCredentialError", "The authorization credential is invalid. Verify that OAuth is set up correctly in the developer console, and call the start flow method.");
|
|
319
|
+
function t() {
|
|
320
|
+
return i(this, t), o(this, t, ["InvalidAuthorizationCredentialError", "The authorization credential is invalid. Verify that OAuth is set up correctly in the developer console, and call the start flow method."]);
|
|
377
321
|
}
|
|
378
|
-
return r(
|
|
322
|
+
return a(t, k), r(t);
|
|
379
323
|
}(),
|
|
380
324
|
M = function (e) {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
function s() {
|
|
384
|
-
return n(this, s), t.call(this, "MissingPublicKeyError", "Failed to retrieve the public key. Add a new biometric registration.");
|
|
325
|
+
function t() {
|
|
326
|
+
return i(this, t), o(this, t, ["MissingPublicKeyError", "Failed to retrieve the public key. Add a new biometric registration."]);
|
|
385
327
|
}
|
|
386
|
-
return r(
|
|
328
|
+
return a(t, k), r(t);
|
|
387
329
|
}(),
|
|
388
330
|
F = function (e) {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
function s() {
|
|
392
|
-
return n(this, s), t.call(this, "ChallengeSigningFailedError", "Failed to sign the challenge with the key.");
|
|
331
|
+
function t() {
|
|
332
|
+
return i(this, t), o(this, t, ["ChallengeSigningFailedError", "Failed to sign the challenge with the key."]);
|
|
393
333
|
}
|
|
394
|
-
return r(
|
|
334
|
+
return a(t, k), r(t);
|
|
395
335
|
}(),
|
|
396
336
|
j = function (e) {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
function s() {
|
|
400
|
-
return n(this, s), t.call(this, "SDKNotConfiguredError", "Stytch client is not confiured. You must call the configure method before using the SDK");
|
|
337
|
+
function t() {
|
|
338
|
+
return i(this, t), o(this, t, ["SDKNotConfiguredError", "Stytch client is not confiured. You must call the configure method before using the SDK"]);
|
|
401
339
|
}
|
|
402
|
-
return r(
|
|
340
|
+
return a(t, k), r(t);
|
|
403
341
|
}(),
|
|
404
342
|
K = function (e) {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
function s() {
|
|
408
|
-
return n(this, s), t.call(this, "FailedCodeChallengeError", "Failed to create a code challenge");
|
|
343
|
+
function t() {
|
|
344
|
+
return i(this, t), o(this, t, ["FailedCodeChallengeError", "Failed to create a code challenge"]);
|
|
409
345
|
}
|
|
410
|
-
return r(
|
|
346
|
+
return a(t, k), r(t);
|
|
411
347
|
}(),
|
|
412
348
|
N = function (e) {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
function s() {
|
|
416
|
-
return n(this, s), t.call(this, "PasskeysUnsupportedError", "Passkeys are not supported on this device");
|
|
349
|
+
function t() {
|
|
350
|
+
return i(this, t), o(this, t, ["PasskeysUnsupportedError", "Passkeys are not supported on this device"]);
|
|
417
351
|
}
|
|
418
|
-
return r(
|
|
352
|
+
return a(t, k), r(t);
|
|
419
353
|
}(),
|
|
420
354
|
z = function (e) {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
function s() {
|
|
424
|
-
return n(this, s), t.call(this, "FailedToDecryptDataError", "Failed to decrypt user data");
|
|
355
|
+
function t() {
|
|
356
|
+
return i(this, t), o(this, t, ["FailedToDecryptDataError", "Failed to decrypt user data"]);
|
|
425
357
|
}
|
|
426
|
-
return r(
|
|
358
|
+
return a(t, k), r(t);
|
|
427
359
|
}(),
|
|
428
360
|
U = function (e) {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
function s() {
|
|
432
|
-
return n(this, s), t.call(this, "BiometricsFailedError", "Biometric authentication failed");
|
|
361
|
+
function t() {
|
|
362
|
+
return i(this, t), o(this, t, ["BiometricsFailedError", "Biometric authentication failed"]);
|
|
433
363
|
}
|
|
434
|
-
return r(
|
|
364
|
+
return a(t, k), r(t);
|
|
435
365
|
}(),
|
|
436
366
|
q = function (e) {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
function s() {
|
|
440
|
-
return n(this, s), t.call(this, "InvalidStartUrlError", "The start URL was invalid or improperly formatted.");
|
|
367
|
+
function t() {
|
|
368
|
+
return i(this, t), o(this, t, ["InvalidStartUrlError", "The start URL was invalid or improperly formatted."]);
|
|
441
369
|
}
|
|
442
|
-
return r(
|
|
370
|
+
return a(t, k), r(t);
|
|
443
371
|
}(),
|
|
444
372
|
W = function (e) {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
function s() {
|
|
448
|
-
return n(this, s), t.call(this, "InvalidRedirectSchemeError", "The scheme from the given redirect urls was invalid. Possible reasons include: nil scheme, non-custom scheme (using http or https), or differing schemes for login/signup urls.");
|
|
373
|
+
function t() {
|
|
374
|
+
return i(this, t), o(this, t, ["InvalidRedirectSchemeError", "The scheme from the given redirect urls was invalid. Possible reasons include: nil scheme, non-custom scheme (using http or https), or differing schemes for login/signup urls."]);
|
|
449
375
|
}
|
|
450
|
-
return r(
|
|
376
|
+
return a(t, k), r(t);
|
|
451
377
|
}(),
|
|
452
378
|
G = function (e) {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
function s() {
|
|
456
|
-
return n(this, s), t.call(this, "MissingUrlError", "The underlying web authentication service failed to return a URL.");
|
|
379
|
+
function t() {
|
|
380
|
+
return i(this, t), o(this, t, ["MissingUrlError", "The underlying web authentication service failed to return a URL."]);
|
|
457
381
|
}
|
|
458
|
-
return r(
|
|
382
|
+
return a(t, k), r(t);
|
|
459
383
|
}(),
|
|
460
384
|
H = function (e) {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
function s() {
|
|
464
|
-
return n(this, s), t.call(this, "InvalidCredentialTypeError", "The public key credential type was not of the expected type.");
|
|
385
|
+
function t() {
|
|
386
|
+
return i(this, t), o(this, t, ["InvalidCredentialTypeError", "The public key credential type was not of the expected type."]);
|
|
465
387
|
}
|
|
466
|
-
return r(
|
|
388
|
+
return a(t, k), r(t);
|
|
467
389
|
}(),
|
|
468
390
|
Y = function (e) {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
function s() {
|
|
472
|
-
return n(this, s), t.call(this, "MissingAttestationObjectError", "The public key credential is missing the attestation object.");
|
|
391
|
+
function t() {
|
|
392
|
+
return i(this, t), o(this, t, ["MissingAttestationObjectError", "The public key credential is missing the attestation object."]);
|
|
473
393
|
}
|
|
474
|
-
return r(
|
|
394
|
+
return a(t, k), r(t);
|
|
475
395
|
}(),
|
|
476
396
|
V = function (e) {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
function s() {
|
|
480
|
-
return n(this, s), t.call(this, "JSONDataNotConvertibleToStringError", "JSON data unable to be converted to String type.");
|
|
397
|
+
function t() {
|
|
398
|
+
return i(this, t), o(this, t, ["JSONDataNotConvertibleToStringError", "JSON data unable to be converted to String type."]);
|
|
481
399
|
}
|
|
482
|
-
return r(
|
|
400
|
+
return a(t, k), r(t);
|
|
483
401
|
}(),
|
|
484
402
|
J = function (e) {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
function s() {
|
|
488
|
-
return n(this, s), t.call(this, "RandomNumberGenerationFailed", "Random number generation failed");
|
|
403
|
+
function t() {
|
|
404
|
+
return i(this, t), o(this, t, ["RandomNumberGenerationFailed", "Random number generation failed"]);
|
|
489
405
|
}
|
|
490
|
-
return r(
|
|
406
|
+
return a(t, k), r(t);
|
|
491
407
|
}(),
|
|
492
408
|
$ = function (e) {
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
function s() {
|
|
496
|
-
return n(this, s), t.call(this, "PasskeysInvalidEncoding", "Invalid passkey encoding");
|
|
409
|
+
function t() {
|
|
410
|
+
return i(this, t), o(this, t, ["PasskeysInvalidEncoding", "Invalid passkey encoding"]);
|
|
497
411
|
}
|
|
498
|
-
return r(
|
|
412
|
+
return a(t, k), r(t);
|
|
499
413
|
}();
|
|
500
414
|
function X(e, t) {
|
|
501
415
|
return function (e) {
|
|
@@ -854,49 +768,43 @@ function te() {
|
|
|
854
768
|
function re(e, t) {
|
|
855
769
|
for (var r = 0; r < t.length; r++) {
|
|
856
770
|
var n = t[r];
|
|
857
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, (
|
|
858
|
-
if ("object" !== ee(e) || null === e) return e;
|
|
859
|
-
var r = e[Symbol.toPrimitive];
|
|
860
|
-
if (void 0 !== r) {
|
|
861
|
-
var n = r.call(e, t || "default");
|
|
862
|
-
if ("object" !== ee(n)) return n;
|
|
863
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
864
|
-
}
|
|
865
|
-
return ("string" === t ? String : Number)(e);
|
|
866
|
-
}(i, "string"), "symbol" === ee(o) ? o : String(o)), n);
|
|
771
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, ie(n.key), n);
|
|
867
772
|
}
|
|
868
|
-
var i, o;
|
|
869
773
|
}
|
|
870
774
|
function ne(e, t, r) {
|
|
871
775
|
return t && re(e.prototype, t), r && re(e, r), Object.defineProperty(e, "prototype", {
|
|
872
776
|
writable: !1
|
|
873
777
|
}), e;
|
|
874
778
|
}
|
|
875
|
-
function ie(e
|
|
779
|
+
function ie(e) {
|
|
780
|
+
var t = function (e, t) {
|
|
781
|
+
if ("object" != ee(e) || !e) return e;
|
|
782
|
+
var r = e[Symbol.toPrimitive];
|
|
783
|
+
if (void 0 !== r) {
|
|
784
|
+
var n = r.call(e, t || "default");
|
|
785
|
+
if ("object" != ee(n)) return n;
|
|
786
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
787
|
+
}
|
|
788
|
+
return ("string" === t ? String : Number)(e);
|
|
789
|
+
}(e, "string");
|
|
790
|
+
return "symbol" == ee(t) ? t : String(t);
|
|
791
|
+
}
|
|
792
|
+
function oe(e, t) {
|
|
876
793
|
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
877
794
|
}
|
|
878
|
-
function
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
return function (e, t) {
|
|
888
|
-
if (t && ("object" === ee(t) || "function" == typeof t)) return t;
|
|
889
|
-
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
890
|
-
return function (e) {
|
|
891
|
-
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
892
|
-
return e;
|
|
893
|
-
}(e);
|
|
894
|
-
}(this, r);
|
|
895
|
-
};
|
|
795
|
+
function se(e, t, r) {
|
|
796
|
+
return t = le(t), function (e, t) {
|
|
797
|
+
if (t && ("object" === ee(t) || "function" == typeof t)) return t;
|
|
798
|
+
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
799
|
+
return function (e) {
|
|
800
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
801
|
+
return e;
|
|
802
|
+
}(e);
|
|
803
|
+
}(e, ce() ? Reflect.construct(t, r || [], le(e).constructor) : t.apply(e, r));
|
|
896
804
|
}
|
|
897
|
-
function
|
|
805
|
+
function ae(e) {
|
|
898
806
|
var t = "function" == typeof Map ? new Map() : void 0;
|
|
899
|
-
return
|
|
807
|
+
return ae = function ae(e) {
|
|
900
808
|
if (null === e || !function (e) {
|
|
901
809
|
try {
|
|
902
810
|
return -1 !== Function.toString.call(e).indexOf("[native code]");
|
|
@@ -910,7 +818,13 @@ function se(e) {
|
|
|
910
818
|
t.set(e, r);
|
|
911
819
|
}
|
|
912
820
|
function r() {
|
|
913
|
-
return
|
|
821
|
+
return function (e, t, r) {
|
|
822
|
+
if (ce()) return Reflect.construct.apply(null, arguments);
|
|
823
|
+
var n = [null];
|
|
824
|
+
n.push.apply(n, t);
|
|
825
|
+
var i = new (e.bind.apply(e, n))();
|
|
826
|
+
return r && ue(i, r.prototype), i;
|
|
827
|
+
}(e, arguments, le(this).constructor);
|
|
914
828
|
}
|
|
915
829
|
return r.prototype = Object.create(e.prototype, {
|
|
916
830
|
constructor: {
|
|
@@ -920,25 +834,15 @@ function se(e) {
|
|
|
920
834
|
configurable: !0
|
|
921
835
|
}
|
|
922
836
|
}), ue(r, e);
|
|
923
|
-
},
|
|
924
|
-
}
|
|
925
|
-
function ae(e, t, r) {
|
|
926
|
-
return ae = ce() ? Reflect.construct.bind() : function (e, t, r) {
|
|
927
|
-
var n = [null];
|
|
928
|
-
n.push.apply(n, t);
|
|
929
|
-
var i = new (Function.bind.apply(e, n))();
|
|
930
|
-
return r && ue(i, r.prototype), i;
|
|
931
|
-
}, ae.apply(null, arguments);
|
|
837
|
+
}, ae(e);
|
|
932
838
|
}
|
|
933
839
|
function ce() {
|
|
934
|
-
if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
|
|
935
|
-
if (Reflect.construct.sham) return !1;
|
|
936
|
-
if ("function" == typeof Proxy) return !0;
|
|
937
840
|
try {
|
|
938
|
-
|
|
939
|
-
} catch (e) {
|
|
940
|
-
|
|
941
|
-
|
|
841
|
+
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
842
|
+
} catch (e) {}
|
|
843
|
+
return (ce = function ce() {
|
|
844
|
+
return !!e;
|
|
845
|
+
})();
|
|
942
846
|
}
|
|
943
847
|
function ue(e, t) {
|
|
944
848
|
return ue = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
|
|
@@ -986,7 +890,11 @@ function he(e, t, r, n) {
|
|
|
986
890
|
"function" == typeof SuppressedError && SuppressedError, (de || (de = {})).RequiredCatcha = "Catcha Required";
|
|
987
891
|
var pe,
|
|
988
892
|
_e = function (e) {
|
|
989
|
-
|
|
893
|
+
function t(e) {
|
|
894
|
+
var r;
|
|
895
|
+
return oe(this, t), (r = se(this, t, [e])).type = e, r;
|
|
896
|
+
}
|
|
897
|
+
return function (e, t) {
|
|
990
898
|
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
|
991
899
|
e.prototype = Object.create(t && t.prototype, {
|
|
992
900
|
constructor: {
|
|
@@ -997,13 +905,7 @@ var pe,
|
|
|
997
905
|
}), Object.defineProperty(e, "prototype", {
|
|
998
906
|
writable: !1
|
|
999
907
|
}), t && ue(e, t);
|
|
1000
|
-
}(
|
|
1001
|
-
var t = oe(r);
|
|
1002
|
-
function r(e) {
|
|
1003
|
-
var n;
|
|
1004
|
-
return ie(this, r), (n = t.call(this, e)).type = e, n;
|
|
1005
|
-
}
|
|
1006
|
-
return ne(r);
|
|
908
|
+
}(t, ae(Error)), ne(t);
|
|
1007
909
|
}();
|
|
1008
910
|
function fe(e) {
|
|
1009
911
|
var t,
|
|
@@ -1281,7 +1183,7 @@ var Ee,
|
|
|
1281
1183
|
o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : function () {
|
|
1282
1184
|
return Promise.resolve(void 0);
|
|
1283
1185
|
};
|
|
1284
|
-
|
|
1186
|
+
oe(this, e), this.bootstrapPromise = n, this.isEnabled = function () {
|
|
1285
1187
|
return he(i, void 0, void 0, te().mark(function e() {
|
|
1286
1188
|
return te().wrap(function (e) {
|
|
1287
1189
|
for (;;) switch (e.prev = e.next) {
|
|
@@ -1492,7 +1394,7 @@ var Ee,
|
|
|
1492
1394
|
},
|
|
1493
1395
|
Me = function () {
|
|
1494
1396
|
function e(t) {
|
|
1495
|
-
|
|
1397
|
+
oe(this, e), this.maxBatchSize = t.maxBatchSize, this.logEventURL = t.logEventURL, setInterval(this.flush.bind(this), t.intervalDurationMs), this.batch = [];
|
|
1496
1398
|
}
|
|
1497
1399
|
return ne(e, [{
|
|
1498
1400
|
key: "logEvent",
|
|
@@ -1552,7 +1454,7 @@ var Fe = Promise.resolve({
|
|
|
1552
1454
|
var o = this,
|
|
1553
1455
|
s = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : Fe,
|
|
1554
1456
|
a = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Le();
|
|
1555
|
-
|
|
1457
|
+
oe(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._passwordResetPKCEManager = i, this._config = s, this.dfpProtectedAuth = a, this.email = {
|
|
1556
1458
|
invite: function invite(e) {
|
|
1557
1459
|
return he(o, void 0, void 0, te().mark(function t() {
|
|
1558
1460
|
return te().wrap(function (t) {
|
|
@@ -1782,7 +1684,7 @@ var Fe = Promise.resolve({
|
|
|
1782
1684
|
}(),
|
|
1783
1685
|
Ke = ne(function e(t, r) {
|
|
1784
1686
|
var n = this;
|
|
1785
|
-
|
|
1687
|
+
oe(this, e), this._networkClient = t, this._subscriptionService = r, this.get = function () {
|
|
1786
1688
|
return he(n, void 0, void 0, te().mark(function e() {
|
|
1787
1689
|
var t;
|
|
1788
1690
|
return te().wrap(function (e) {
|
|
@@ -1891,7 +1793,7 @@ var Fe = Promise.resolve({
|
|
|
1891
1793
|
function e(t, r, n, i, o) {
|
|
1892
1794
|
var s = this,
|
|
1893
1795
|
a = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Le();
|
|
1894
|
-
|
|
1796
|
+
oe(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._dynamicConfig = i, this._config = o, this.dfpProtectedAuth = a, this.saml = {
|
|
1895
1797
|
createConnection: function createConnection(e) {
|
|
1896
1798
|
return he(s, void 0, void 0, te().mark(function t() {
|
|
1897
1799
|
return te().wrap(function (t) {
|
|
@@ -2160,7 +2062,7 @@ var Fe = Promise.resolve({
|
|
|
2160
2062
|
}(),
|
|
2161
2063
|
ze = ne(function e(t, r) {
|
|
2162
2064
|
var n = this;
|
|
2163
|
-
|
|
2065
|
+
oe(this, e), this._networkClient = t, this._subscriptionService = r, this.get = function () {
|
|
2164
2066
|
return he(n, void 0, void 0, te().mark(function e() {
|
|
2165
2067
|
var t;
|
|
2166
2068
|
return te().wrap(function (e) {
|
|
@@ -2371,7 +2273,7 @@ var Fe = Promise.resolve({
|
|
|
2371
2273
|
function e(t, r, n, i, o) {
|
|
2372
2274
|
var s = this,
|
|
2373
2275
|
a = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : Le();
|
|
2374
|
-
|
|
2276
|
+
oe(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._dynamicConfig = i, this._config = o, this.dfpProtectedAuth = a, this.discovery = {
|
|
2375
2277
|
authenticate: function authenticate(e) {
|
|
2376
2278
|
return he(s, void 0, void 0, te().mark(function t() {
|
|
2377
2279
|
var r, n, i, o, s, a;
|
|
@@ -2579,7 +2481,7 @@ var Fe = Promise.resolve({
|
|
|
2579
2481
|
qe = function () {
|
|
2580
2482
|
function e(t, r) {
|
|
2581
2483
|
var n = this;
|
|
2582
|
-
|
|
2484
|
+
oe(this, e), this._networkClient = t, this._subscriptionService = r, this.getSync = function () {
|
|
2583
2485
|
return n._subscriptionService.getSession();
|
|
2584
2486
|
}, this.onChange = function (e) {
|
|
2585
2487
|
return n._subscriptionService.subscribeToState(function (t) {
|
|
@@ -2706,7 +2608,7 @@ var Fe = Promise.resolve({
|
|
|
2706
2608
|
}(),
|
|
2707
2609
|
We = ne(function e(t, r) {
|
|
2708
2610
|
var n = this;
|
|
2709
|
-
|
|
2611
|
+
oe(this, e), this._networkClient = t, this._subscriptionService = r, this.organizations = {
|
|
2710
2612
|
list: function list() {
|
|
2711
2613
|
return he(n, void 0, void 0, te().mark(function e() {
|
|
2712
2614
|
return te().wrap(function (e) {
|
|
@@ -2834,7 +2736,7 @@ Promise.resolve({
|
|
|
2834
2736
|
var Ge = ne(function e(t, r) {
|
|
2835
2737
|
var n = this,
|
|
2836
2738
|
i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Le();
|
|
2837
|
-
|
|
2739
|
+
oe(this, e), this._networkClient = t, this._subscriptionService = r, this.dfpProtectedAuth = i, this.sms = {
|
|
2838
2740
|
send: function send(e) {
|
|
2839
2741
|
return he(n, void 0, void 0, te().mark(function t() {
|
|
2840
2742
|
var r, n, i;
|
|
@@ -2919,7 +2821,7 @@ var Ge = ne(function e(t, r) {
|
|
|
2919
2821
|
He = function () {
|
|
2920
2822
|
function e(t, r) {
|
|
2921
2823
|
var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Le();
|
|
2922
|
-
|
|
2824
|
+
oe(this, e), this._networkClient = t, this._subscriptionService = r, this.dfpProtectedAuth = n;
|
|
2923
2825
|
}
|
|
2924
2826
|
return ne(e, [{
|
|
2925
2827
|
key: "create",
|
|
@@ -3009,7 +2911,7 @@ var Ge = ne(function e(t, r) {
|
|
|
3009
2911
|
Ye = function () {
|
|
3010
2912
|
function e(t, r) {
|
|
3011
2913
|
var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Le();
|
|
3012
|
-
|
|
2914
|
+
oe(this, e), this._networkClient = t, this._subscriptionService = r, this.dfpProtectedAuth = n;
|
|
3013
2915
|
}
|
|
3014
2916
|
return ne(e, [{
|
|
3015
2917
|
key: "recover",
|
|
@@ -3109,7 +3011,7 @@ var Ge = ne(function e(t, r) {
|
|
|
3109
3011
|
Ve = function () {
|
|
3110
3012
|
function e(t, r, n) {
|
|
3111
3013
|
var i = this;
|
|
3112
|
-
|
|
3014
|
+
oe(this, e), this._subscriptionService = n, this.isAuthorizedSync = function (e, t) {
|
|
3113
3015
|
var r;
|
|
3114
3016
|
return !!(null === (r = i.cachedPolicy) || void 0 === r ? void 0 : r.callerIsAuthorized(i.roleIds(), e, t));
|
|
3115
3017
|
}, this.isAuthorized = function (e, t) {
|
|
@@ -3140,7 +3042,7 @@ var Ge = ne(function e(t, r) {
|
|
|
3140
3042
|
Je = function () {
|
|
3141
3043
|
function e(t, r) {
|
|
3142
3044
|
var n = this;
|
|
3143
|
-
|
|
3045
|
+
oe(this, e), this._subscriptionService = t, this._headlessSessionClient = r, this._onDataChange = function (e) {
|
|
3144
3046
|
(null == e ? void 0 : e.session) ? n.scheduleBackgroundRefresh() : n.cancelBackgroundRefresh();
|
|
3145
3047
|
}, this._reauthenticateWithBackoff = function () {
|
|
3146
3048
|
return he(n, void 0, void 0, te().mark(function t() {
|
|
@@ -3225,7 +3127,7 @@ var $e,
|
|
|
3225
3127
|
st = function () {
|
|
3226
3128
|
function e(t, r) {
|
|
3227
3129
|
var n = this;
|
|
3228
|
-
|
|
3130
|
+
oe(this, e), this.roles = t, this.resources = r, this.rolesByID = {}, t.forEach(function (e) {
|
|
3229
3131
|
return n.rolesByID[e.role_id] = e;
|
|
3230
3132
|
});
|
|
3231
3133
|
}
|
|
@@ -3303,11 +3205,10 @@ function at(e, t, r, n) {
|
|
|
3303
3205
|
}(tt || (tt = {}));
|
|
3304
3206
|
var ct = /*#__PURE__*/function (_Error) {
|
|
3305
3207
|
_inherits(ct, _Error);
|
|
3306
|
-
var _super = _createSuper(ct);
|
|
3307
3208
|
function ct(e, t) {
|
|
3308
3209
|
var _this;
|
|
3309
3210
|
_classCallCheck(this, ct);
|
|
3310
|
-
_this =
|
|
3211
|
+
_this = _callSuper(this, ct), _this.name = "StytchSDKUsageError", _this.message = "Invalid call to ".concat(e, "\n") + t;
|
|
3311
3212
|
return _this;
|
|
3312
3213
|
}
|
|
3313
3214
|
return _createClass(ct);
|
|
@@ -4030,7 +3931,7 @@ var vt = /*#__PURE__*/function () {
|
|
|
4030
3931
|
},
|
|
4031
3932
|
sdk: {
|
|
4032
3933
|
identifier: "Stytch.js Javascript SDK",
|
|
4033
|
-
version: "4.4.
|
|
3934
|
+
version: "4.4.4"
|
|
4034
3935
|
}
|
|
4035
3936
|
});
|
|
4036
3937
|
}
|
|
@@ -4338,13 +4239,24 @@ var St = function e(t, r) {
|
|
|
4338
4239
|
path: "/"
|
|
4339
4240
|
});
|
|
4340
4241
|
var Pt = function Pt(e) {
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
}
|
|
4344
|
-
|
|
4345
|
-
function
|
|
4242
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
4243
|
+
return "stytch_sdk_state_".concat(e).concat(t ? "::".concat(t) : "");
|
|
4244
|
+
},
|
|
4245
|
+
At = new Map(),
|
|
4246
|
+
Ct = function Ct(e) {
|
|
4247
|
+
clearTimeout(At.get(e));
|
|
4248
|
+
},
|
|
4249
|
+
Et = function Et(e, t, r) {
|
|
4250
|
+
Ct(e);
|
|
4251
|
+
var n = setTimeout(function () {
|
|
4252
|
+
void 0 === St.get(e) && St.set(e, t, r);
|
|
4253
|
+
}, 10);
|
|
4254
|
+
return At.set(e, n), St.set(e, t, r);
|
|
4255
|
+
};
|
|
4256
|
+
var Tt = /*#__PURE__*/function () {
|
|
4257
|
+
function Tt(e, t) {
|
|
4346
4258
|
var _this4 = this;
|
|
4347
|
-
_classCallCheck(this,
|
|
4259
|
+
_classCallCheck(this, Tt);
|
|
4348
4260
|
this.browserSessionStorage = {
|
|
4349
4261
|
getItem: function getItem(e) {
|
|
4350
4262
|
return sessionStorage.getItem(Pt(_this4.publicToken, e));
|
|
@@ -4366,7 +4278,7 @@ var At = /*#__PURE__*/function () {
|
|
|
4366
4278
|
}
|
|
4367
4279
|
this.state = n;
|
|
4368
4280
|
}
|
|
4369
|
-
_createClass(
|
|
4281
|
+
_createClass(Tt, [{
|
|
4370
4282
|
key: "opaqueTokenCookieName",
|
|
4371
4283
|
get: function get() {
|
|
4372
4284
|
var e;
|
|
@@ -4404,14 +4316,14 @@ var At = /*#__PURE__*/function () {
|
|
|
4404
4316
|
var o = e.state,
|
|
4405
4317
|
s = e.session_token,
|
|
4406
4318
|
a = e.session_jwt,
|
|
4407
|
-
c =
|
|
4319
|
+
c = Tt.generateCookieOpts({
|
|
4408
4320
|
expiresAt: null !== (r = null === (t = null == o ? void 0 : o.session) || void 0 === t ? void 0 : t.expires_at) && void 0 !== r ? r : "",
|
|
4409
4321
|
availableToSubdomains: this._cookieAvailableToSubdomains,
|
|
4410
4322
|
path: this._cookiePath,
|
|
4411
4323
|
domain: this._domain
|
|
4412
4324
|
});
|
|
4413
|
-
|
|
4414
|
-
var u =
|
|
4325
|
+
Et(this.opaqueTokenCookieName, s, c), Et(this.jwtCookieName, a, c);
|
|
4326
|
+
var u = Tt.generateCookieOpts({
|
|
4415
4327
|
expiresAt: null !== (i = null === (n = null == o ? void 0 : o.session) || void 0 === n ? void 0 : n.expires_at) && void 0 !== i ? i : "",
|
|
4416
4328
|
availableToSubdomains: !this._cookieAvailableToSubdomains,
|
|
4417
4329
|
path: this._cookiePath,
|
|
@@ -4423,13 +4335,13 @@ var At = /*#__PURE__*/function () {
|
|
|
4423
4335
|
key: "writeIntermediateSessionTokenCookie",
|
|
4424
4336
|
value: function writeIntermediateSessionTokenCookie(e) {
|
|
4425
4337
|
var t = new Date(Date.now() + 6e5),
|
|
4426
|
-
r =
|
|
4338
|
+
r = Tt.generateCookieOpts({
|
|
4427
4339
|
expiresAt: t.toString(),
|
|
4428
4340
|
availableToSubdomains: this._cookieAvailableToSubdomains,
|
|
4429
4341
|
path: this._cookiePath,
|
|
4430
4342
|
domain: this._domain
|
|
4431
4343
|
});
|
|
4432
|
-
|
|
4344
|
+
Et(this.istCookieName, e, r);
|
|
4433
4345
|
}
|
|
4434
4346
|
}, {
|
|
4435
4347
|
key: "removeSessionCookie",
|
|
@@ -4448,7 +4360,7 @@ var At = /*#__PURE__*/function () {
|
|
|
4448
4360
|
[!0, !1].forEach(function (t) {
|
|
4449
4361
|
[_this5._cookiePath, null].forEach(function (r) {
|
|
4450
4362
|
[_this5._domain, null].forEach(function (n) {
|
|
4451
|
-
var i =
|
|
4363
|
+
var i = Tt.generateCookieOpts({
|
|
4452
4364
|
expiresAt: new Date(0).toString(),
|
|
4453
4365
|
availableToSubdomains: t,
|
|
4454
4366
|
path: r,
|
|
@@ -4459,7 +4371,7 @@ var At = /*#__PURE__*/function () {
|
|
|
4459
4371
|
});
|
|
4460
4372
|
});
|
|
4461
4373
|
});
|
|
4462
|
-
});
|
|
4374
|
+
}), e.forEach(Ct);
|
|
4463
4375
|
}
|
|
4464
4376
|
}, {
|
|
4465
4377
|
key: "syncToLocalStorage",
|
|
@@ -4504,31 +4416,30 @@ var At = /*#__PURE__*/function () {
|
|
|
4504
4416
|
return e && (i.path = e), Boolean("localhost" === window.location.hostname || "[::1]" === window.location.hostname || window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)) ? i.secure = !1 : (r && (i.domain = t || window.location.host), i.secure = !0), i;
|
|
4505
4417
|
}
|
|
4506
4418
|
}]);
|
|
4507
|
-
return
|
|
4419
|
+
return Tt;
|
|
4508
4420
|
}();
|
|
4509
|
-
var
|
|
4510
|
-
_inherits(
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
return _super2.apply(this, arguments);
|
|
4421
|
+
var Ot = /*#__PURE__*/function (_Tt) {
|
|
4422
|
+
_inherits(Ot, _Tt);
|
|
4423
|
+
function Ot() {
|
|
4424
|
+
_classCallCheck(this, Ot);
|
|
4425
|
+
return _callSuper(this, Ot, arguments);
|
|
4515
4426
|
}
|
|
4516
|
-
return _createClass(
|
|
4517
|
-
}(
|
|
4518
|
-
var
|
|
4519
|
-
|
|
4427
|
+
return _createClass(Ot);
|
|
4428
|
+
}(Tt);
|
|
4429
|
+
var xt = Symbol["for"]("__stytch_b2b_DataLayer"),
|
|
4430
|
+
Dt = function Dt(e, t) {
|
|
4520
4431
|
var r = function () {
|
|
4521
4432
|
var e = window;
|
|
4522
|
-
return e[
|
|
4433
|
+
return e[xt] || (e[xt] = {}), e[xt];
|
|
4523
4434
|
}();
|
|
4524
|
-
return r[e] || (r[e] = new
|
|
4435
|
+
return r[e] || (r[e] = new Ot(e, t)), r[e];
|
|
4525
4436
|
},
|
|
4526
|
-
|
|
4437
|
+
It = function It(e, t) {
|
|
4527
4438
|
Object.values(e).forEach(function (e) {
|
|
4528
4439
|
return e(t);
|
|
4529
4440
|
});
|
|
4530
4441
|
},
|
|
4531
|
-
|
|
4442
|
+
Bt = function () {
|
|
4532
4443
|
var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).KEYS_TO_EXCLUDE,
|
|
4533
4444
|
t = void 0 === e ? [] : e;
|
|
4534
4445
|
return function e(r, n) {
|
|
@@ -4547,10 +4458,10 @@ var Et = Symbol["for"]("__stytch_b2b_DataLayer"),
|
|
|
4547
4458
|
}({
|
|
4548
4459
|
KEYS_TO_EXCLUDE: ["last_accessed_at"]
|
|
4549
4460
|
});
|
|
4550
|
-
var
|
|
4551
|
-
function
|
|
4461
|
+
var Rt = /*#__PURE__*/function () {
|
|
4462
|
+
function Rt(e, t) {
|
|
4552
4463
|
var _this7 = this;
|
|
4553
|
-
_classCallCheck(this,
|
|
4464
|
+
_classCallCheck(this, Rt);
|
|
4554
4465
|
this._publicToken = e, this._datalayer = t, this._listen = function (e) {
|
|
4555
4466
|
if (e.key !== Pt(_this7._publicToken)) return;
|
|
4556
4467
|
var t = null === e.newValue || "null" === e.newValue ? null : JSON.parse(e.newValue);
|
|
@@ -4560,7 +4471,7 @@ var Dt = /*#__PURE__*/function () {
|
|
|
4560
4471
|
r = _this$_datalayer$read.session_token;
|
|
4561
4472
|
r || this.destroySession();
|
|
4562
4473
|
}
|
|
4563
|
-
_createClass(
|
|
4474
|
+
_createClass(Rt, [{
|
|
4564
4475
|
key: "getTokens",
|
|
4565
4476
|
value: function getTokens() {
|
|
4566
4477
|
var _this$_datalayer$read2 = this._datalayer.readSessionCookie(),
|
|
@@ -4598,7 +4509,7 @@ var Dt = /*#__PURE__*/function () {
|
|
|
4598
4509
|
r = null === e.state ? null : Object.assign(Object.assign({}, this._datalayer.state), e.state);
|
|
4599
4510
|
this._datalayer.state = r;
|
|
4600
4511
|
var n = e.state ? Object.keys(e.state) : [];
|
|
4601
|
-
!this._datalayer.markStateKeysUpdated(n) &&
|
|
4512
|
+
!this._datalayer.markStateKeysUpdated(n) && Bt(t, r) || It(this._datalayer.subscriptions, r);
|
|
4602
4513
|
}
|
|
4603
4514
|
}, {
|
|
4604
4515
|
key: "updateStateAndTokens",
|
|
@@ -4613,8 +4524,8 @@ var Dt = /*#__PURE__*/function () {
|
|
|
4613
4524
|
this._datalayer.state = r;
|
|
4614
4525
|
var n = e ? Object.keys(e) : [],
|
|
4615
4526
|
i = this._datalayer.markStateKeysUpdated(n),
|
|
4616
|
-
o = !
|
|
4617
|
-
(i || o) && (
|
|
4527
|
+
o = !Bt(t, r);
|
|
4528
|
+
(i || o) && (It(this._datalayer.subscriptions, r), o && this._datalayer.syncToLocalStorage());
|
|
4618
4529
|
}
|
|
4619
4530
|
}, {
|
|
4620
4531
|
key: "updateTokens",
|
|
@@ -4654,15 +4565,14 @@ var Dt = /*#__PURE__*/function () {
|
|
|
4654
4565
|
return null;
|
|
4655
4566
|
}
|
|
4656
4567
|
}]);
|
|
4657
|
-
return
|
|
4568
|
+
return Rt;
|
|
4658
4569
|
}();
|
|
4659
|
-
var
|
|
4660
|
-
_inherits(
|
|
4661
|
-
|
|
4662
|
-
function It() {
|
|
4570
|
+
var Lt = /*#__PURE__*/function (_Rt) {
|
|
4571
|
+
_inherits(Lt, _Rt);
|
|
4572
|
+
function Lt() {
|
|
4663
4573
|
var _this8;
|
|
4664
|
-
_classCallCheck(this,
|
|
4665
|
-
_this8 =
|
|
4574
|
+
_classCallCheck(this, Lt);
|
|
4575
|
+
_this8 = _callSuper(this, Lt, arguments), _this8.updateMember = function (e) {
|
|
4666
4576
|
return _this8.updateState({
|
|
4667
4577
|
member: e
|
|
4668
4578
|
});
|
|
@@ -4682,9 +4592,9 @@ var It = /*#__PURE__*/function (_Dt) {
|
|
|
4682
4592
|
};
|
|
4683
4593
|
return _this8;
|
|
4684
4594
|
}
|
|
4685
|
-
return _createClass(
|
|
4686
|
-
}(
|
|
4687
|
-
var
|
|
4595
|
+
return _createClass(Lt);
|
|
4596
|
+
}(Rt);
|
|
4597
|
+
var Mt = Symbol["for"]("stytch__internal_b2b");
|
|
4688
4598
|
exports.BiometricsFailedError = U, exports.BiometricsUnavailableError = A, exports.ChallengeSigningFailedError = F, exports.DeviceCredentialsNotAllowedError = D, exports.FailedCodeChallengeError = K, exports.FailedToDecryptDataError = z, exports.InternalError = S, exports.InvalidAuthorizationCredentialError = L, exports.InvalidCredentialTypeError = H, exports.InvalidRedirectSchemeError = W, exports.InvalidStartUrlError = q, exports.JSONDataNotConvertibleToStringError = V, exports.KeyInvalidatedError = C, exports.KeystoreUnavailableError = E, exports.MissingAttestationObjectError = Y, exports.MissingAuthorizationCredentialIDTokenError = R, exports.MissingGoogleClientIDError = I, exports.MissingPKCEError = B, exports.MissingPublicKeyError = M, exports.MissingUrlError = G, exports.NoBiometricsEnrolledError = T, exports.NoBiometricsRegistrationError = P, exports.NoCurrentSessionError = w, exports.PasskeysInvalidEncoding = $, exports.PasskeysUnsupportedError = N, exports.RandomNumberGenerationFailed = J, exports.SDKAPIUnreachableError = h, exports.SDKNotConfiguredError = j, exports.StytchAPIError = y, exports.StytchAPISchemaError = g, exports.StytchAPIUnreachableError = b, exports.StytchB2BHeadlessClient = /*#__PURE__*/function () {
|
|
4689
4599
|
function _class(e, t) {
|
|
4690
4600
|
var _this9 = this;
|
|
@@ -4705,7 +4615,7 @@ exports.BiometricsFailedError = U, exports.BiometricsUnavailableError = A, expor
|
|
|
4705
4615
|
}
|
|
4706
4616
|
};
|
|
4707
4617
|
var o, s, a, c, u, l, d, h, p, _, f;
|
|
4708
|
-
this._dataLayer =
|
|
4618
|
+
this._dataLayer = Dt(e, n), this._subscriptionService = new Lt(e, this._dataLayer);
|
|
4709
4619
|
var m = new gt(this._dataLayer, "passwords");
|
|
4710
4620
|
this._networkClient = new vt(e, this._dataLayer, i.endpoints.sdkBackendURL, function () {
|
|
4711
4621
|
var e, t, r, n;
|
|
@@ -4736,7 +4646,7 @@ exports.BiometricsFailedError = U, exports.BiometricsUnavailableError = A, expor
|
|
|
4736
4646
|
}
|
|
4737
4647
|
});
|
|
4738
4648
|
(function (e, t) {
|
|
4739
|
-
Object.assign(e, _defineProperty({},
|
|
4649
|
+
Object.assign(e, _defineProperty({}, Mt, t));
|
|
4740
4650
|
})(this, {
|
|
4741
4651
|
bootstrap: v,
|
|
4742
4652
|
publicToken: e,
|