@sesamy/sesamy-js 1.4.1 → 1.4.3

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.
@@ -401,8 +401,8 @@ async function Cr(t, e) {
401
401
  try {
402
402
  S = await xr(u, h, d, w, I, y, c), E = null;
403
403
  break;
404
- } catch ($) {
405
- E = $;
404
+ } catch (C) {
405
+ E = C;
406
406
  }
407
407
  if (E)
408
408
  throw E;
@@ -1001,7 +1001,7 @@ async function Xr(t) {
1001
1001
  const Rn = "sesamy.com", Fr = "https://logs.sesamy.com/events";
1002
1002
  var pe = /* @__PURE__ */ ((t) => (t.READY = "sesamyJsReady", t.AUTHENTICATED = "sesamyJsAuthenticated", t.LOGOUT = "sesamyJsLogout", t.SOFT_PAYWALL = "sesamyJsSoftPaywall", t))(pe || {});
1003
1003
  let V;
1004
- const Pt = "sesamyAccessToken", jt = "sesamyExpiresAt";
1004
+ const Pt = "sesamyAccessToken", jt = "sesamyExpires";
1005
1005
  function xt() {
1006
1006
  const t = localStorage.getItem(jt);
1007
1007
  if (!(!t || parseInt(t, 10) < (/* @__PURE__ */ new Date()).getTime()))
@@ -1017,7 +1017,7 @@ async function Hr(t) {
1017
1017
  const e = await V.getUser();
1018
1018
  nt(pe.AUTHENTICATED, e);
1019
1019
  const n = new URL(location.href), r = n.searchParams;
1020
- r.delete("code"), n.search = r.toString(), window.history.replaceState({}, document.title, n.toString());
1020
+ r.delete("code"), r.delete("state"), n.search = r.toString(), window.history.replaceState({}, document.title, n.toString());
1021
1021
  } catch {
1022
1022
  }
1023
1023
  }
@@ -1370,12 +1370,12 @@ oe.errorType = ci;
1370
1370
  oe.polyfills = si;
1371
1371
  oe.WretchError = Kn;
1372
1372
  function hi(t) {
1373
- const e = t.endpoint || `https://api2.${Rn}`, n = (k = !0) => (_) => async ($, D) => {
1373
+ const e = t.endpoint || `https://api2.${Rn}`, n = (k = !0) => (_) => async (C, D) => {
1374
1374
  let R = null;
1375
1375
  if (R = await Br(k), !R) {
1376
1376
  if (k)
1377
1377
  throw new Error("No access token available");
1378
- return _($, D);
1378
+ return _(C, D);
1379
1379
  }
1380
1380
  const L = {
1381
1381
  ...D,
@@ -1384,12 +1384,14 @@ function hi(t) {
1384
1384
  ...R ? { Authorization: `Bearer ${R}` } : {}
1385
1385
  }
1386
1386
  };
1387
- return _($, L);
1388
- }, r = (k) => (_, $) => {
1387
+ return _(C, L);
1388
+ }, r = (k) => (_, C) => {
1389
+ if (C.headers.Authorization)
1390
+ return k(_, C);
1389
1391
  const D = localStorage.getItem("__anon_id"), R = btoa(`${D}:`), L = {
1390
- ...$,
1392
+ ...C,
1391
1393
  headers: {
1392
- ...$.headers,
1394
+ ...C.headers,
1393
1395
  Authorization: `Basic ${R}`
1394
1396
  }
1395
1397
  };
@@ -1421,21 +1423,21 @@ function hi(t) {
1421
1423
  }
1422
1424
  async function s(k) {
1423
1425
  const _ = await i.get("/entitlements").json();
1424
- return _ == null ? void 0 : _.find(($) => $.id === k);
1426
+ return _ == null ? void 0 : _.find((C) => C.id === k);
1425
1427
  }
1426
1428
  async function p() {
1427
1429
  return i.get("/contracts").json();
1428
1430
  }
1429
1431
  async function f(k) {
1430
1432
  const _ = await i.get("/contracts").json();
1431
- return _ == null ? void 0 : _.find(($) => $.id === k);
1433
+ return _ == null ? void 0 : _.find((C) => C.id === k);
1432
1434
  }
1433
1435
  async function u() {
1434
1436
  return i.get("/bills").json();
1435
1437
  }
1436
1438
  async function c(k) {
1437
1439
  const _ = await i.get("/bills").json();
1438
- return _ == null ? void 0 : _.find(($) => $.id === k);
1440
+ return _ == null ? void 0 : _.find((C) => C.id === k);
1439
1441
  }
1440
1442
  async function h(k, _) {
1441
1443
  return await i.url(`/user-metadata/${k}`).put(_).json();
@@ -1447,7 +1449,7 @@ function hi(t) {
1447
1449
  return (await i.url(`/user-metadata/${k}`).get().json())[k];
1448
1450
  }
1449
1451
  async function I() {
1450
- return i.url("/user-metadata").get().json();
1452
+ return await i.url("/user-metadata").get().json();
1451
1453
  }
1452
1454
  async function y() {
1453
1455
  return await i.url("/tags").get().json();
@@ -1977,16 +1979,16 @@ var ft = function(t) {
1977
1979
  return function(E, v, l) {
1978
1980
  var b = v.config, j = v.name, k = j + "." + E.type;
1979
1981
  l && (k = l.event);
1980
- var _ = E.type.match(_e) ? /* @__PURE__ */ function($, D, R, L, F) {
1982
+ var _ = E.type.match(_e) ? /* @__PURE__ */ function(C, D, R, L, F) {
1981
1983
  return function(W, x) {
1982
- var K = L ? L.name : $, J = x && Ze(x) ? x : R;
1983
- if (L && (!(J = x && Ze(x) ? x : [$]).includes($) || J.length !== 1))
1984
- throw new Error("Method " + D + " can only abort " + $ + " plugin. " + JSON.stringify(J) + " input valid");
1984
+ var K = L ? L.name : C, J = x && Ze(x) ? x : R;
1985
+ if (L && (!(J = x && Ze(x) ? x : [C]).includes(C) || J.length !== 1))
1986
+ throw new Error("Method " + D + " can only abort " + C + " plugin. " + JSON.stringify(J) + " input valid");
1985
1987
  return P({}, F, { abort: { reason: W, plugins: J, caller: D, _: K } });
1986
1988
  };
1987
- }(j, k, S, l, E) : /* @__PURE__ */ function($, D) {
1989
+ }(j, k, S, l, E) : /* @__PURE__ */ function(C, D) {
1988
1990
  return function() {
1989
- throw new Error($.type + " action not cancellable. Remove abort in " + D);
1991
+ throw new Error(C.type + " action not cancellable. Remove abort in " + D);
1990
1992
  };
1991
1993
  }(E, k);
1992
1994
  return { payload: Ui(E), instance: y, config: b || {}, abort: _ };
@@ -2004,7 +2006,7 @@ var ft = function(t) {
2004
2006
  }
2005
2007
  var j = function() {
2006
2008
  if (e.namespaced && e.namespaced[v])
2007
- return Promise.resolve(e.namespaced[v].reduce(function(k, _, $) {
2009
+ return Promise.resolve(e.namespaced[v].reduce(function(k, _, C) {
2008
2010
  try {
2009
2011
  return Promise.resolve(k).then(function(D) {
2010
2012
  return _.method && G(_.method) ? (function(W, x) {
@@ -2047,8 +2049,8 @@ var ft = function(t) {
2047
2049
  return l && pt({ data: k, method: c, instance: r, store: s }), Promise.resolve(k);
2048
2050
  if (I.hasOwnProperty(b) && I[b] === !0)
2049
2051
  return s.dispatch({ type: "queue", plugin: b, payload: _, _: { called: "queue", from: "queueMechanism" } }), Promise.resolve(k);
2050
- var $ = w(y[b], o[b]);
2051
- return Promise.resolve(j[c]({ abort: $.abort, payload: _, instance: r, config: ln(b, f, o), plugins: f })).then(function(D) {
2052
+ var C = w(y[b], o[b]);
2053
+ return Promise.resolve(j[c]({ abort: C.abort, payload: _, instance: r, config: ln(b, f, o), plugins: f })).then(function(D) {
2052
2054
  var R = X(D) ? D : {}, L = P({}, k, R), F = y[b];
2053
2055
  if (mt(F, b))
2054
2056
  pt({ data: F, method: c, instance: r, pluginName: b, store: s });
@@ -2144,8 +2146,8 @@ function Li(t, e, n) {
2144
2146
  return qn(l, function() {
2145
2147
  return b({ config: k });
2146
2148
  }, 1e4).then(function(_) {
2147
- return r[j] || (i.dispatch({ type: T.pluginReadyType(j), name: j, events: Object.keys(l).filter(function($) {
2148
- return !_t.includes($);
2149
+ return r[j] || (i.dispatch({ type: T.pluginReadyType(j), name: j, events: Object.keys(l).filter(function(C) {
2150
+ return !_t.includes(C);
2149
2151
  }) }), r[j] = !0), I = I.concat(j), l;
2150
2152
  }).catch(function(_) {
2151
2153
  if (_ instanceof Error)
@@ -2166,10 +2168,10 @@ function Li(t, e, n) {
2166
2168
  return Qn(i, e, t);
2167
2169
  }, 0), Promise.resolve(function(l, b, j, k, _) {
2168
2170
  try {
2169
- var $ = G(b) ? b() : b, D = l.type, R = D.replace(_e, "");
2171
+ var C = G(b) ? b() : b, D = l.type, R = D.replace(_e, "");
2170
2172
  if (l._ && l._.called)
2171
2173
  return Promise.resolve(l);
2172
- var L = j.getState(), F = (K = $, (J = L.plugins) === void 0 && (J = {}), (Ce = l.options) === void 0 && (Ce = {}), Object.keys(K).filter(function(m) {
2174
+ var L = j.getState(), F = (K = C, (J = L.plugins) === void 0 && (J = {}), (Ce = l.options) === void 0 && (Ce = {}), Object.keys(K).filter(function(m) {
2173
2175
  var g = Ce.plugins || {};
2174
2176
  return wi(g[m]) ? g[m] : g.all !== !1 && (!J[m] || J[m].enabled !== !1);
2175
2177
  }).map(function(m) {
@@ -2179,43 +2181,43 @@ function Li(t, e, n) {
2179
2181
  var g = L.plugins[m];
2180
2182
  return l.plugins.includes(m) && !g.initialized;
2181
2183
  }).map(function(m) {
2182
- return $[m];
2184
+ return C[m];
2183
2185
  }));
2184
2186
  var W = F.map(function(m) {
2185
2187
  return m.name;
2186
2188
  }), x = function(m, g, O) {
2187
- var C = hn(m).map(function(A) {
2188
- return dn(A, g);
2189
+ var A = hn(m).map(function($) {
2190
+ return dn($, g);
2189
2191
  });
2190
- return g.reduce(function(A, z) {
2192
+ return g.reduce(function($, z) {
2191
2193
  var M = z.name, U = hn(m, M).map(function(Ae) {
2192
2194
  return dn(Ae, g);
2193
2195
  }), Z = U[0], N = U[1], q = U[2];
2194
- return Z.length && (A.beforeNS[M] = Z), N.length && (A.duringNS[M] = N), q.length && (A.afterNS[M] = q), A;
2195
- }, { before: C[0], beforeNS: {}, during: C[1], duringNS: {}, after: C[2], afterNS: {} });
2196
+ return Z.length && ($.beforeNS[M] = Z), N.length && ($.duringNS[M] = N), q.length && ($.afterNS[M] = q), $;
2197
+ }, { before: A[0], beforeNS: {}, during: A[1], duringNS: {}, after: A[2], afterNS: {} });
2196
2198
  }(D, F);
2197
- return Promise.resolve(ft({ action: l, data: { exact: x.before, namespaced: x.beforeNS }, state: L, allPlugins: $, allMatches: x, instance: j, store: k, EVENTS: _ })).then(function(m) {
2199
+ return Promise.resolve(ft({ action: l, data: { exact: x.before, namespaced: x.beforeNS }, state: L, allPlugins: C, allMatches: x, instance: j, store: k, EVENTS: _ })).then(function(m) {
2198
2200
  function g() {
2199
- var A = function() {
2201
+ var $ = function() {
2200
2202
  if (D.match(_e))
2201
- return Promise.resolve(ft({ action: P({}, O, { type: R + "End" }), data: { exact: x.after, namespaced: x.afterNS }, state: L, allPlugins: $, allMatches: x, instance: j, store: k, EVENTS: _ })).then(function(z) {
2203
+ return Promise.resolve(ft({ action: P({}, O, { type: R + "End" }), data: { exact: x.after, namespaced: x.afterNS }, state: L, allPlugins: C, allMatches: x, instance: j, store: k, EVENTS: _ })).then(function(z) {
2202
2204
  z.meta && z.meta.hasCallback && sn(z.meta.rid, { payload: z });
2203
2205
  });
2204
2206
  }();
2205
- return A && A.then ? A.then(function() {
2207
+ return $ && $.then ? $.then(function() {
2206
2208
  return m;
2207
2209
  }) : m;
2208
2210
  }
2209
2211
  if (er(m, W.length))
2210
2212
  return m;
2211
- var O, C = function() {
2213
+ var O, A = function() {
2212
2214
  if (D !== R)
2213
- return Promise.resolve(ft({ action: P({}, m, { type: R }), data: { exact: x.during, namespaced: x.duringNS }, state: L, allPlugins: $, allMatches: x, instance: j, store: k, EVENTS: _ })).then(function(A) {
2214
- O = A;
2215
+ return Promise.resolve(ft({ action: P({}, m, { type: R }), data: { exact: x.during, namespaced: x.duringNS }, state: L, allPlugins: C, allMatches: x, instance: j, store: k, EVENTS: _ })).then(function($) {
2216
+ O = $;
2215
2217
  });
2216
2218
  O = m;
2217
2219
  }();
2218
- return C && C.then ? C.then(g) : g();
2220
+ return A && A.then ? A.then(g) : g();
2219
2221
  });
2220
2222
  } catch (m) {
2221
2223
  return Promise.reject(m);
@@ -2458,15 +2460,15 @@ function eo(t) {
2458
2460
  return N[N.length] = b, U.apply({ instance: b }, N);
2459
2461
  }), z;
2460
2462
  }, {}), delete g.methods);
2461
- var C = Object.keys(g).concat(O), A = new Set(m.events.concat(C));
2462
- if (m.events = Array.from(A), m.pluginsArray = m.pluginsArray.concat(g), m.plugins[g.name])
2463
+ var A = Object.keys(g).concat(O), $ = new Set(m.events.concat(A));
2464
+ if (m.events = Array.from($), m.pluginsArray = m.pluginsArray.concat(g), m.plugins[g.name])
2463
2465
  throw new Error(g.name + "AlreadyLoaded");
2464
2466
  return m.plugins[g.name] = g, m.plugins[g.name].loaded || (m.plugins[g.name].loaded = function() {
2465
2467
  return !0;
2466
2468
  }), m;
2467
2469
  }, { plugins: {}, pluginEnabled: {}, methods: {}, pluginsArray: [], middlewares: [], events: [] }), i = t.storage ? t.storage : { getItem: ge, setItem: ye, removeItem: je }, o = /* @__PURE__ */ function(m) {
2468
- return function(g, O, C) {
2469
- return O.getState("user")[g] || (C && X(C) && C[g] ? C[g] : an(m)[g] || ge(St(g)) || null);
2470
+ return function(g, O, A) {
2471
+ return O.getState("user")[g] || (A && X(A) && A[g] ? A[g] : an(m)[g] || ge(St(g)) || null);
2470
2472
  };
2471
2473
  }(i), a = r.plugins, s = r.events.filter(function(m) {
2472
2474
  return !_t.includes(m);
@@ -2486,34 +2488,34 @@ function eo(t) {
2486
2488
  return new Promise(function(O) {
2487
2489
  x.dispatch({ type: T.disablePlugin, plugins: gt(m), _: { originalAction: T.disablePlugin } }, O, [g]);
2488
2490
  });
2489
- } }, r.methods), l = !1, b = { identify: function(m, g, O, C) {
2491
+ } }, r.methods), l = !1, b = { identify: function(m, g, O, A) {
2490
2492
  try {
2491
- var A = re(m) ? m : null, z = X(m) ? m : g, M = O || {}, U = b.user();
2492
- ye(St(te), A);
2493
- var Z = A || z.userId || o(te, b, z);
2493
+ var $ = re(m) ? m : null, z = X(m) ? m : g, M = O || {}, U = b.user();
2494
+ ye(St(te), $);
2495
+ var Z = $ || z.userId || o(te, b, z);
2494
2496
  return Promise.resolve(new Promise(function(N) {
2495
- x.dispatch(P({ type: T.identifyStart, userId: Z, traits: z || {}, options: M, anonymousId: U.anonymousId }, U.id && U.id !== A && { previousId: U.id }), N, [g, O, C]);
2497
+ x.dispatch(P({ type: T.identifyStart, userId: Z, traits: z || {}, options: M, anonymousId: U.anonymousId }, U.id && U.id !== $ && { previousId: U.id }), N, [g, O, A]);
2496
2498
  }));
2497
2499
  } catch (N) {
2498
2500
  return Promise.reject(N);
2499
2501
  }
2500
- }, track: function(m, g, O, C) {
2502
+ }, track: function(m, g, O, A) {
2501
2503
  try {
2502
- var A = X(m) ? m.event : m;
2503
- if (!A || !re(A))
2504
+ var $ = X(m) ? m.event : m;
2505
+ if (!$ || !re($))
2504
2506
  throw new Error("EventMissing");
2505
2507
  var z = X(m) ? m : g || {}, M = X(O) ? O : {};
2506
2508
  return Promise.resolve(new Promise(function(U) {
2507
- x.dispatch({ type: T.trackStart, event: A, properties: z, options: M, userId: o(te, b, g), anonymousId: o(ke, b, g) }, U, [g, O, C]);
2509
+ x.dispatch({ type: T.trackStart, event: $, properties: z, options: M, userId: o(te, b, g), anonymousId: o(ke, b, g) }, U, [g, O, A]);
2508
2510
  }));
2509
2511
  } catch (U) {
2510
2512
  return Promise.reject(U);
2511
2513
  }
2512
2514
  }, page: function(m, g, O) {
2513
2515
  try {
2514
- var C = X(m) ? m : {}, A = X(g) ? g : {};
2516
+ var A = X(m) ? m : {}, $ = X(g) ? g : {};
2515
2517
  return Promise.resolve(new Promise(function(z) {
2516
- x.dispatch({ type: T.pageStart, properties: Hi(C), options: A, userId: o(te, b, C), anonymousId: o(ke, b, C) }, z, [m, g, O]);
2518
+ x.dispatch({ type: T.pageStart, properties: Hi(A), options: $, userId: o(te, b, A), anonymousId: o(ke, b, A) }, z, [m, g, O]);
2517
2519
  }));
2518
2520
  } catch (z) {
2519
2521
  return Promise.reject(z);
@@ -2540,21 +2542,21 @@ function eo(t) {
2540
2542
  throw new Error(".on disabled for " + m);
2541
2543
  var O = /Start$|Start:/;
2542
2544
  if (m === "*") {
2543
- var C = function(U) {
2545
+ var A = function(U) {
2544
2546
  return function(Z) {
2545
2547
  return function(N) {
2546
2548
  return N.type.match(O) && g({ payload: N, instance: b, plugins: a }), Z(N);
2547
2549
  };
2548
2550
  };
2549
- }, A = function(U) {
2551
+ }, $ = function(U) {
2550
2552
  return function(Z) {
2551
2553
  return function(N) {
2552
2554
  return N.type.match(O) || g({ payload: N, instance: b, plugins: a }), Z(N);
2553
2555
  };
2554
2556
  };
2555
2557
  };
2556
- return h(C, He), h(A, Ve), function() {
2557
- d(C, He), d(A, Ve);
2558
+ return h(A, He), h($, Ve), function() {
2559
+ d(A, He), d($, Ve);
2558
2560
  };
2559
2561
  }
2560
2562
  var z = m.match(O) ? He : Ve, M = function(U) {
@@ -2572,8 +2574,8 @@ function eo(t) {
2572
2574
  return !1;
2573
2575
  if (m === T.bootstrap)
2574
2576
  throw new Error(".once disabled for " + m);
2575
- var O = b.on(m, function(C) {
2576
- g({ payload: C.payload, instance: b, plugins: a, abort: I }), O();
2577
+ var O = b.on(m, function(A) {
2578
+ g({ payload: A.payload, instance: b, plugins: a, abort: I }), O();
2577
2579
  });
2578
2580
  return O;
2579
2581
  }, getState: function(m) {
@@ -2597,10 +2599,10 @@ function eo(t) {
2597
2599
  return O.meta || (O.meta = wn()), g(O);
2598
2600
  };
2599
2601
  };
2600
- }, w(He), Li(b, u, { all: f, plugins: s }), Ri(i), $i(b), Ni(b), w(Ve)]), k = { context: Gi, user: zi(i), page: Yi, track: Ki, plugins: Wi(u), queue: Xi }, _ = Pe, $ = Pe;
2602
+ }, w(He), Li(b, u, { all: f, plugins: s }), Ri(i), $i(b), Ni(b), w(Ve)]), k = { context: Gi, user: zi(i), page: Yi, track: Ki, plugins: Wi(u), queue: Xi }, _ = Pe, C = Pe;
2601
2603
  if (Y && t.debug) {
2602
2604
  var D = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
2603
- D && (_ = D({ trace: !0, traceLimit: 25 })), $ = function() {
2605
+ D && (_ = D({ trace: !0, traceLimit: 25 })), C = function() {
2604
2606
  return arguments.length === 0 ? sr() : X(typeof arguments[0]) ? vn() : vn().apply(null, arguments);
2605
2607
  };
2606
2608
  }
@@ -2609,12 +2611,12 @@ function eo(t) {
2609
2611
  return Bi.includes(O) || (g[O] = m[O]), g;
2610
2612
  }, {});
2611
2613
  }(t), F = r.pluginsArray.reduce(function(m, g) {
2612
- var O = g.name, C = g.config, A = g.loaded, z = r.pluginEnabled[O];
2613
- return m[O] = { enabled: z, initialized: !!z && !g.initialize, loaded: !!A({ config: C }), config: C }, m;
2614
+ var O = g.name, A = g.config, $ = g.loaded, z = r.pluginEnabled[O];
2615
+ return m[O] = { enabled: z, initialized: !!z && !g.initialize, loaded: !!$({ config: A }), config: A }, m;
2614
2616
  }, {}), W = { context: L, user: E, plugins: F }, x = Bn(function(m) {
2615
- for (var g = Object.keys(m), O = {}, C = 0; C < g.length; C++) {
2616
- var A = g[C];
2617
- typeof m[A] === ne && (O[A] = m[A]);
2617
+ for (var g = Object.keys(m), O = {}, A = 0; A < g.length; A++) {
2618
+ var $ = g[A];
2619
+ typeof m[$] === ne && (O[$] = m[$]);
2618
2620
  }
2619
2621
  var z, M = Object.keys(O);
2620
2622
  try {
@@ -2641,10 +2643,10 @@ function eo(t) {
2641
2643
  }
2642
2644
  return N ? q : U;
2643
2645
  };
2644
- }(P({}, k, e)), W, $(_(Ai.apply(void 0, j))));
2646
+ }(P({}, k, e)), W, C(_(Ai.apply(void 0, j))));
2645
2647
  x.dispatch = (R = x.dispatch, function(m, g, O) {
2646
- var C = P({}, m, { meta: wn(m.meta, g, gt(O)) });
2647
- return R.apply(null, [C]);
2648
+ var A = P({}, m, { meta: wn(m.meta, g, gt(O)) });
2649
+ return R.apply(null, [A]);
2648
2650
  });
2649
2651
  var K = Object.keys(a);
2650
2652
  x.dispatch({ type: T.bootstrap, plugins: K, config: L, params: y, user: E, initialUser: n, persistedUser: S });
@@ -2654,8 +2656,8 @@ function eo(t) {
2654
2656
  return !r.pluginEnabled[m];
2655
2657
  });
2656
2658
  return x.dispatch({ type: T.registerPlugins, plugins: K, enabled: r.pluginEnabled }), r.pluginsArray.map(function(m, g) {
2657
- var O = m.bootstrap, C = m.config, A = m.name;
2658
- O && G(O) && O({ instance: b, config: C, payload: m }), x.dispatch({ type: T.registerPluginType(A), name: A, enabled: r.pluginEnabled[A], plugin: m }), r.pluginsArray.length === g + 1 && x.dispatch({ type: T.initializeStart, plugins: J, disabled: Ce });
2659
+ var O = m.bootstrap, A = m.config, $ = m.name;
2660
+ O && G(O) && O({ instance: b, config: A, payload: m }), x.dispatch({ type: T.registerPluginType($), name: $, enabled: r.pluginEnabled[$], plugin: m }), r.pluginsArray.length === g + 1 && x.dispatch({ type: T.initializeStart, plugins: J, disabled: Ce });
2659
2661
  }), Qi(function(m) {
2660
2662
  x.dispatch({ type: m ? T.offline : T.online });
2661
2663
  }), function(m, g, O) {
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "registry": "https://registry.npmjs.org/",
7
7
  "tag": "latest"
8
8
  },
9
- "version": "1.4.1",
9
+ "version": "1.4.3",
10
10
  "main": "dist/sesamy-js.cjs",
11
11
  "module": "dist/sesamy-js.mjs",
12
12
  "types": "dist/sesamy-js.d.ts",