@banou/stub 0.0.41 → 0.0.43

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.
Files changed (42) hide show
  1. package/build/assets/account-Dqz2amwB.js +1 -0
  2. package/build/assets/account-uIgK7-D5.js +1 -0
  3. package/build/assets/api-Dp-2AT3u-DnXkochq.js +3 -0
  4. package/build/assets/api-rrvhokeg.js +1 -0
  5. package/build/assets/build-mcPaLDi_.js +1 -0
  6. package/build/assets/embed-Dq58Zgjw.js +1609 -0
  7. package/build/assets/index-C09RPTYO.js +2485 -0
  8. package/build/assets/lib-account-BsgOxvGV.js +2 -0
  9. package/build/assets/lib-account-DgN_bHrt.js +51 -0
  10. package/build/assets/{lib-api-CtiKFcK3-lXOtBAbs.js → lib-api-Dp-2AT3u-5287Hymh.js} +576 -555
  11. package/build/assets/lib-api-kFj1W6Gv.js +2 -0
  12. package/build/assets/{lib-worker-B4OHmX_j.js → lib-worker-CWFsPxSd.js} +2046 -1785
  13. package/build/assets/lib-worker-RTWfVDSm.js +2 -0
  14. package/build/assets/lib-worker-index-QCwdkNNi.js +2485 -0
  15. package/build/assets/login-window-BippQvfb.js +71 -0
  16. package/build/assets/main-BCLTvBoB.js +4253 -0
  17. package/build/assets/remote-BwnfCi4M.js +1 -0
  18. package/build/assets/{remote-CVVOdyaq.js → remote-CAlKhZLk.js} +1 -1
  19. package/build/assets/worker-BuIMw0JP.js +1 -0
  20. package/build/assets/worker-DOci0z8U.js +1 -0
  21. package/build/embed.html +6 -6
  22. package/build/index.html +7 -7
  23. package/build/index.js +6163 -5672
  24. package/fkn.json +1 -1
  25. package/package.json +4 -3
  26. package/build/assets/account-BgpTCUUd.js +0 -1
  27. package/build/assets/account-wP7U-PeH.js +0 -1
  28. package/build/assets/api-Bh_MpFDA.js +0 -1
  29. package/build/assets/api-CtiKFcK3-DDpRQueA.js +0 -3
  30. package/build/assets/build-CQLpK1BK.js +0 -1
  31. package/build/assets/embed-RgFLu0KO.js +0 -1609
  32. package/build/assets/index-BUq6NMlf.js +0 -2452
  33. package/build/assets/lib-account-CF0gclnF.js +0 -2
  34. package/build/assets/lib-account-CnUKCNw7.js +0 -41
  35. package/build/assets/lib-api-BdPC6S5P.js +0 -2
  36. package/build/assets/lib-worker-BnZbDGep.js +0 -2
  37. package/build/assets/lib-worker-index-AIemqYnG.js +0 -2452
  38. package/build/assets/login-window-DvC5E0QJ.js +0 -71
  39. package/build/assets/main-zzGENRmk.js +0 -4204
  40. package/build/assets/remote-VQoP8ehb.js +0 -1
  41. package/build/assets/worker-BssCNlEj.js +0 -1
  42. package/build/assets/worker-sQ3j5_iL.js +0 -1
@@ -0,0 +1,2 @@
1
+ import { n as e } from "./lib-account-DgN_bHrt.js";
2
+ export { e as onChange };
@@ -0,0 +1,51 @@
1
+ import { c as e, o as t, t as n, u as r } from "./lib-api-Dp-2AT3u-5287Hymh.js";
2
+ //#region node_modules/@fkn/lib/rolldown-runtime-Dy4uBu1J.js
3
+ var i = Object.defineProperty, a = (e, t) => {
4
+ let n = {};
5
+ for (var r in e) i(n, r, {
6
+ get: e[r],
7
+ enumerable: !0
8
+ });
9
+ return t || i(n, Symbol.toStringTag, { value: "Module" }), n;
10
+ }, o = 0, s = /* @__PURE__ */ new Set(), c = 2e3, l = null, u = (e) => {
11
+ e?.switched !== !1 && (o += 1, l &&= (clearTimeout(l.timer), null));
12
+ for (let e of [...s]) try {
13
+ e();
14
+ } catch {}
15
+ }, d = !1, f = 0, p = () => {
16
+ let e = t();
17
+ e && f !== e.epoch && (f = e.epoch, Promise.resolve(e.remote.account.onChange(u)).catch(() => {
18
+ f === e.epoch && (f = 0);
19
+ }));
20
+ }, m = () => {
21
+ !d && r && (d = !0, n(p));
22
+ }, h = () => o, g = (e) => (s.add(e), m(), () => {
23
+ s.delete(e);
24
+ }), _ = (e) => {
25
+ if (e !== o || l?.generation === e) return;
26
+ let t = setTimeout(() => {
27
+ l?.timer === t && (l = null, o === e && u({ switched: !0 }));
28
+ }, c);
29
+ l = {
30
+ generation: e,
31
+ timer: t
32
+ };
33
+ }, v = /* @__PURE__ */ a({
34
+ info: () => x,
35
+ login: () => y,
36
+ logout: () => b,
37
+ onChange: () => S
38
+ }), y = async () => typeof window > "u" ? !1 : (await e).account.login(location.origin).catch(() => !1), b = async () => {
39
+ typeof window < "u" && await (await e).account.logout().catch(() => {});
40
+ }, x = async () => {
41
+ if (typeof window > "u") return null;
42
+ let t = await e.then((e) => e.account.info()).catch(() => null);
43
+ return t ? {
44
+ name: t.name,
45
+ image: t.image,
46
+ premium: t.premium,
47
+ premiumUntil: t.premiumUntil ? Date.parse(t.premiumUntil) : null
48
+ } : null;
49
+ }, S = async (e) => r ? g(e) : () => {};
50
+ //#endregion
51
+ export { x as a, _ as c, b as i, a as l, S as n, m as o, v as r, h as s, y as t };