@streamlayer/sdk-web 1.5.6 → 1.6.1

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/lib/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { pino as bi } from "pino";
2
- import { QuestionType as C, QuestionStatus as Y, PromotionType as re, NotificationEnabled as Rr, SilenceSetting as vi } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
2
+ import { QuestionType as C, QuestionStatus as J, PromotionType as re, NotificationEnabled as Rr, SilenceSetting as vi } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
3
3
  import { PickHistoryStatus as ct } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
4
4
  import { SdkOverlayType as D } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
5
5
  import { InvitationCategory as Vr, InvitationFrom as $r } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
@@ -22,7 +22,7 @@ import { NotificationKind as pe, NotificationType as Gr } from "@streamlayer/sl-
22
22
  function Ii(t) {
23
23
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
24
24
  }
25
- var On = { exports: {} }, V = On.exports = {}, ae, ue;
25
+ var On = { exports: {} }, $ = On.exports = {}, ae, ue;
26
26
  function ir() {
27
27
  throw new Error("setTimeout has not been defined");
28
28
  }
@@ -87,7 +87,7 @@ function Cn() {
87
87
  _e = null, xe = !1, Ti(t);
88
88
  }
89
89
  }
90
- V.nextTick = function(t) {
90
+ $.nextTick = function(t) {
91
91
  var e = new Array(arguments.length - 1);
92
92
  if (arguments.length > 1)
93
93
  for (var r = 1; r < arguments.length; r++)
@@ -100,40 +100,40 @@ function Ln(t, e) {
100
100
  Ln.prototype.run = function() {
101
101
  this.fun.apply(null, this.array);
102
102
  };
103
- V.title = "browser";
104
- V.browser = !0;
105
- V.env = {};
106
- V.argv = [];
107
- V.version = "";
108
- V.versions = {};
103
+ $.title = "browser";
104
+ $.browser = !0;
105
+ $.env = {};
106
+ $.argv = [];
107
+ $.version = "";
108
+ $.versions = {};
109
109
  function ve() {
110
110
  }
111
- V.on = ve;
112
- V.addListener = ve;
113
- V.once = ve;
114
- V.off = ve;
115
- V.removeListener = ve;
116
- V.removeAllListeners = ve;
117
- V.emit = ve;
118
- V.prependListener = ve;
119
- V.prependOnceListener = ve;
120
- V.listeners = function(t) {
111
+ $.on = ve;
112
+ $.addListener = ve;
113
+ $.once = ve;
114
+ $.off = ve;
115
+ $.removeListener = ve;
116
+ $.removeAllListeners = ve;
117
+ $.emit = ve;
118
+ $.prependListener = ve;
119
+ $.prependOnceListener = ve;
120
+ $.listeners = function(t) {
121
121
  return [];
122
122
  };
123
- V.binding = function(t) {
123
+ $.binding = function(t) {
124
124
  throw new Error("process.binding is not supported");
125
125
  };
126
- V.cwd = function() {
126
+ $.cwd = function() {
127
127
  return "/";
128
128
  };
129
- V.chdir = function(t) {
129
+ $.chdir = function(t) {
130
130
  throw new Error("process.chdir is not supported");
131
131
  };
132
- V.umask = function() {
132
+ $.umask = function() {
133
133
  return 0;
134
134
  };
135
135
  var _i = On.exports;
136
- const A = /* @__PURE__ */ Ii(_i), Ci = bi({
136
+ const E = /* @__PURE__ */ Ii(_i), Ci = bi({
137
137
  level: "trace",
138
138
  enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
139
139
  browser: {
@@ -203,7 +203,7 @@ class Ce extends kt {
203
203
  subscribe = (...e) => this.getStore().subscribe(...e);
204
204
  unsubscribe = () => this.getStore().off();
205
205
  }
206
- const J = (t) => wi(t);
206
+ const W = (t) => wi(t);
207
207
  var ye;
208
208
  (function(t) {
209
209
  t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
@@ -226,7 +226,7 @@ class kn {
226
226
  listeners = /* @__PURE__ */ new Set();
227
227
  settingsKey;
228
228
  constructor({ settings: e, ...r }, n) {
229
- this.settingsKey = Di[r.type], this.status = Lt(Xe.Suspended), this.config = new Ce(J(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Ce(J(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Ce(J({}), `feature:settings:${this.settingsKey}`), this.source = n;
229
+ this.settingsKey = Di[r.type], this.status = Lt(Xe.Suspended), this.config = new Ce(W(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Ce(W(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Ce(W({}), `feature:settings:${this.settingsKey}`), this.source = n;
230
230
  }
231
231
  get featureConfig() {
232
232
  return this.config.getStore();
@@ -283,7 +283,7 @@ class X extends kt {
283
283
  return this.getStore().get();
284
284
  }
285
285
  }
286
- const U = (t) => Lt(t);
286
+ const j = (t) => Lt(t);
287
287
  class le extends kt {
288
288
  atomStore;
289
289
  constructor(e, r, n) {
@@ -438,13 +438,13 @@ class $i {
438
438
  ts: /* @__PURE__ */ new Date(),
439
439
  log: []
440
440
  };
441
- this.state = new Ce(J(o), `subscription:${i.name}:state`), this.options = {
441
+ this.state = new Ce(W(o), `subscription:${i.name}:state`), this.options = {
442
442
  ...i,
443
443
  reconnectDelay: i.reconnectDelay ?? 1e3,
444
444
  reconnectMaxDelay: i.reconnectMaxDelay ?? 3e4,
445
445
  reconnectMaxAttempts: i.reconnectMaxAttempts ?? 10,
446
446
  withStore: i.withStore ?? !1
447
- }, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new X(U(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
447
+ }, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new X(j(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
448
448
  this.state.getValue("status") === te.Connected && (this.addStateLog(`params updated, reconnect => ${JSON.stringify(s)}`), this.reconnect());
449
449
  })), this.updateState(te.Ready);
450
450
  }
@@ -580,7 +580,7 @@ class zr {
580
580
  subscriptions;
581
581
  opts;
582
582
  constructor(e, r) {
583
- this.host = e, this.opts = r, this.$headers = new Ce(J({
583
+ this.host = e, this.opts = r, this.$headers = new Ce(W({
584
584
  "sl-device-id": Bi(),
585
585
  "sl-device-os": Ui()
586
586
  }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
@@ -793,7 +793,7 @@ var me;
793
793
  t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
794
794
  })(me || (me = {}));
795
795
  const Ji = (t) => {
796
- const e = new Be(), r = new X(U(e.getExternalToken()), "userKey"), n = new X(U(e.getToken()), "userToken"), i = new le(Gi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, l) => {
796
+ const e = new Be(), r = new X(j(e.getExternalToken()), "userKey"), n = new X(j(e.getToken()), "userToken"), i = new le(Gi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, l) => {
797
797
  if (!a)
798
798
  return s?.data?.id ? s.data.id : u === !1 ? void 0 : l;
799
799
  }), o = new le(zi(n.getStore(), t), "userSettings");
@@ -804,7 +804,7 @@ const Ji = (t) => {
804
804
  userSettings: o
805
805
  };
806
806
  }, Xi = (t) => {
807
- const e = new X(U(void 0), "providerStreamId"), r = new le(qi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new le(xi(r.getAtomStore(), t), "streamSettings"), i = new le(Qi(r.getAtomStore(), t), "streamSettings");
807
+ const e = new X(j(void 0), "providerStreamId"), r = new le(qi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new le(xi(r.getAtomStore(), t), "streamSettings"), i = new le(Qi(r.getAtomStore(), t), "streamSettings");
808
808
  return r.getAtomStore().listen((o) => {
809
809
  (o === "" || o === void 0) && (n.getStore().mutate(void 0), i.getStore().mutate(void 0));
810
810
  }), {
@@ -814,7 +814,7 @@ const Ji = (t) => {
814
814
  streamSummary: i
815
815
  };
816
816
  }, Zi = (t) => {
817
- const e = new X(U(void 0), "enabled"), r = new X(U(me.DISABLED), "status"), n = new le(Hi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new le(Wi(n.getAtomStore(), t), "organizationAdvertising"), o = Ji(t), s = Xi(t);
817
+ const e = new X(j(void 0), "enabled"), r = new X(j(me.DISABLED), "status"), n = new le(Hi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new le(Wi(n.getAtomStore(), t), "organizationAdvertising"), o = Ji(t), s = Xi(t);
818
818
  return {
819
819
  enabled: e,
820
820
  status: r,
@@ -953,7 +953,7 @@ const to = (t, e, r) => {
953
953
  eventId: a,
954
954
  filter: {
955
955
  types: u === Le.ALLOWED ? [] : [C.FACTOID, C.PROMOTION, C.TWEET],
956
- statuses: [Y.ACTIVE, Y.RESOLVED]
956
+ statuses: [J.ACTIVE, J.RESOLVED]
957
957
  }
958
958
  })).data : [],
959
959
  dedupeTime: 0,
@@ -972,7 +972,7 @@ const to = (t, e, r) => {
972
972
  eventId: s,
973
973
  filter: {
974
974
  types: [C.PROMOTION],
975
- statuses: [Y.ACTIVE]
975
+ statuses: [J.ACTIVE]
976
976
  },
977
977
  pagination: {
978
978
  page: 0,
@@ -1058,39 +1058,41 @@ const yo = (t) => {
1058
1058
  return r + n.join("&");
1059
1059
  }, go = (t, e, r) => {
1060
1060
  let n = !1;
1061
- const i = r.transport, o = Se("advertisement"), s = new ho(), a = J({}), u = fo(t, i), l = () => {
1061
+ const i = r.transport, o = Se("advertisement"), s = new ho(), a = W({}), u = fo(t, i), l = () => {
1062
1062
  a.setKey("hasNotification", !1);
1063
- const g = a.get(), b = g.data?.question.id, S = g.data?.promotion?.type;
1064
- b && G.emit("advertisement", {
1063
+ const b = a.get(), g = b.data?.question.id, S = b.data?.promotion?.type;
1064
+ g && G.emit("advertisement", {
1065
1065
  action: "notification-opened",
1066
1066
  payload: {
1067
- id: b,
1067
+ id: g,
1068
1068
  type: S
1069
1069
  }
1070
1070
  });
1071
1071
  }, c = () => {
1072
- const g = a.get(), b = g.data?.question.id, S = g.data?.promotion?.type, O = a.get()?.isOpened;
1073
- b && !O && (o.debug({ id: b }, "markAsViewed: %o"), s.setShowed(b), a.setKey("isOpened", !0), G.emit("advertisement", {
1072
+ const b = a.get(), g = b.data?.question.id, S = b.data?.promotion?.type, R = a.get()?.isOpened;
1073
+ g && !R && (o.debug({ id: g }, "markAsViewed: %o"), s.setShowed(g), a.setKey("isOpened", !0), G.emit("advertisement", {
1074
1074
  action: "opened",
1075
1075
  payload: {
1076
- id: b,
1076
+ id: g,
1077
1077
  type: S
1078
1078
  }
1079
1079
  }));
1080
- }, f = (g, b) => {
1081
- b ? a.set({
1080
+ }, f = (b, g) => {
1081
+ g ? a.set({
1082
1082
  loading: !1,
1083
1083
  error: void 0,
1084
- data: b,
1085
- hasNotification: b?.notification?.enabled === Rr.NOTIFICATION_ENABLED,
1086
- close: () => p(b.question.id),
1087
- isViewed: !!s.isViewed(b.question.id)
1088
- }) : (a.setKey("loading", !0), Dn(g, i).then((S) => a.set({
1084
+ data: g,
1085
+ hasNotification: g?.notification?.enabled === Rr.NOTIFICATION_ENABLED,
1086
+ close: () => p(g.question.id),
1087
+ togglePause: (S) => v(g.question.id, S),
1088
+ isViewed: !!s.isViewed(g.question.id)
1089
+ }) : (a.setKey("loading", !0), Dn(b, i).then((S) => a.set({
1089
1090
  loading: !1,
1090
1091
  error: void 0,
1091
1092
  data: S,
1092
1093
  hasNotification: S?.notification?.enabled === Rr.NOTIFICATION_ENABLED,
1093
1094
  close: () => p(S?.question.id),
1095
+ togglePause: (R) => v(S?.question.id, R),
1094
1096
  isViewed: S && !!s.isViewed(S.question.id)
1095
1097
  })).catch((S) => a.set({
1096
1098
  loading: !1,
@@ -1098,48 +1100,52 @@ const yo = (t) => {
1098
1100
  data: void 0
1099
1101
  })));
1100
1102
  };
1101
- a.subscribe((g, b) => {
1102
- if (g.data?.promotion?.type === re.EXTERNAL_AD && !g?.externalAd && g.data.promotion.adCampaigns?.gamOptions && g.data.promotion.adCampaigns?.gamBaseUrl) {
1103
- const S = mo(g.data.promotion.adCampaigns);
1104
- a.setKey("externalAd", { type: "gam", url: S });
1105
- }
1106
- g.data?.promotion && !g.isOpened && G.emit("advertisement", {
1107
- action: "received",
1108
- payload: {
1109
- id: g.data.question.id,
1110
- type: g.data.promotion.type,
1111
- hasNotification: !!g.hasNotification,
1112
- isViewed: !!s.isViewed(g.data.question.id)
1113
- },
1114
- skipAnalytics: g.data.question.id === b?.data?.question.id
1115
- }), !g?.data && b?.data && G.emit("advertisement", {
1116
- action: "closed",
1117
- payload: {
1118
- id: b.data.question.id,
1119
- type: b.data.promotion?.type,
1120
- hasNotification: !!b.hasNotification,
1121
- isViewed: !!s.isViewed(b.data.question.id)
1103
+ a.subscribe((b, g) => {
1104
+ if (!(b.data?.id === g?.data?.id && b.isPaused !== g?.isPaused)) {
1105
+ if (b.data?.promotion?.type === re.EXTERNAL_AD && !b?.externalAd && b.data.promotion.adCampaigns?.gamOptions && b.data.promotion.adCampaigns?.gamBaseUrl) {
1106
+ const S = mo(b.data.promotion.adCampaigns);
1107
+ a.setKey("externalAd", { type: "gam", url: S });
1122
1108
  }
1123
- });
1109
+ b.data?.promotion && !b.isOpened && G.emit("advertisement", {
1110
+ action: "received",
1111
+ payload: {
1112
+ id: b.data.question.id,
1113
+ type: b.data.promotion.type,
1114
+ hasNotification: !!b.hasNotification,
1115
+ isViewed: !!s.isViewed(b.data.question.id)
1116
+ },
1117
+ skipAnalytics: b.data.question.id === g?.data?.question.id
1118
+ }), !b?.data && g?.data && G.emit("advertisement", {
1119
+ action: "closed",
1120
+ payload: {
1121
+ id: g.data.question.id,
1122
+ type: g.data.promotion?.type,
1123
+ hasNotification: !!g.hasNotification,
1124
+ isViewed: !!s.isViewed(g.data.question.id)
1125
+ }
1126
+ });
1127
+ }
1124
1128
  });
1125
- const p = (g) => {
1126
- (!g || a.get()?.data?.question.id === g) && a.set({});
1129
+ const p = (b) => {
1130
+ (!b || a.get()?.data?.question.id === b) && a.set({});
1131
+ }, v = (b, g) => {
1132
+ a.get()?.data?.question.id === b && a.setKey("isPaused", g);
1127
1133
  };
1128
1134
  return { connect: () => {
1129
- n || (n = !0, u.subscribe((g, b) => {
1130
- g.data && (!b?.data || g.data.id !== b.data.id) && f(g.data.question.id, g.data);
1131
- }), e.addListener("promotion", (g) => {
1132
- const b = yo(g);
1133
- if (b) {
1134
- if (b.question.status === Y.RESOLVED) {
1135
- p(b.question.id), o.debug({ promotion: b }, "resolved: %o");
1135
+ n || (n = !0, u.subscribe((b, g) => {
1136
+ b.data && (!g?.data || b.data.id !== g.data.id) && f(b.data.question.id, b.data);
1137
+ }), e.addListener("promotion", (b) => {
1138
+ const g = yo(b);
1139
+ if (g) {
1140
+ if (g.question.status === J.RESOLVED) {
1141
+ p(g.question.id), o.debug({ promotion: g }, "resolved: %o");
1136
1142
  return;
1137
1143
  }
1138
- if (b.question.status === Y.ACTIVE) {
1139
- o.debug({ promotion: b }, "active: %o"), f(b.question.id, b);
1144
+ if (g.question.status === J.ACTIVE) {
1145
+ o.debug({ promotion: g }, "active: %o"), f(g.question.id, g);
1140
1146
  return;
1141
1147
  }
1142
- o.debug({ promotion: b }, "skip: %o");
1148
+ o.debug({ promotion: g }, "skip: %o");
1143
1149
  }
1144
1150
  }));
1145
1151
  }, hide: p, show: f, open: l, markAsViewed: c, $store: a };
@@ -1181,14 +1187,14 @@ class bo {
1181
1187
  transport;
1182
1188
  cancels = /* @__PURE__ */ new Set();
1183
1189
  constructor(e) {
1184
- this.transport = e.transport, this.log = Se("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new X(U(void 0), "moderationId").getStore(), this.interactiveAllowed = new X(U(Le.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new X(U(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new le(io(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new le(lo(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = oo(this.slStreamId, e.transport), this.openedQuestion = po(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
1190
+ this.transport = e.transport, this.log = Se("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new X(j(void 0), "moderationId").getStore(), this.interactiveAllowed = new X(j(Le.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new X(j(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new le(io(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new le(lo(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = oo(this.slStreamId, e.transport), this.openedQuestion = po(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
1185
1191
  this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = uo(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
1186
1192
  this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
1187
1193
  }), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
1188
1194
  })), this.feedSubscription = ao(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
1189
1195
  const n = this.activeQuestionId.get().data?.question?.id, i = r.data?.attributes?.question;
1190
1196
  if (!(!i || i.type === C.PROMOTION)) {
1191
- if (i.status === Y.RESOLVED) {
1197
+ if (i.status === J.RESOLVED) {
1192
1198
  n === i.id && this.activeQuestionId.mutate(void 0);
1193
1199
  return;
1194
1200
  }
@@ -1267,7 +1273,7 @@ class vo {
1267
1273
  options;
1268
1274
  logger;
1269
1275
  constructor(e) {
1270
- this.options = e, this.logger = Se("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = U(/* @__PURE__ */ new Map());
1276
+ this.options = e, this.logger = Se("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = j(/* @__PURE__ */ new Map());
1271
1277
  }
1272
1278
  addToQueue = (e) => {
1273
1279
  if (this.store.has(e.id)) {
@@ -1464,36 +1470,36 @@ const Oo = {
1464
1470
  pageSize: 10
1465
1471
  }, _o = (t, e, r, n, i) => {
1466
1472
  let o = 0;
1467
- const s = U({ pageSize: Oo.pageSize, page: 0 }), a = J({
1473
+ const s = j({ pageSize: Oo.pageSize, page: 0 }), a = W({
1468
1474
  data: [],
1469
1475
  key: Date.now(),
1470
1476
  hasMore: !0,
1471
1477
  loading: void 0,
1472
1478
  error: void 0
1473
1479
  }), u = ro(t), l = async () => {
1474
- const p = e.get(), v = n.getStore().get().data?.map((g) => g.slId) || [];
1480
+ const p = e.get(), v = n.getStore().get().data?.map((w) => w.slId) || [];
1475
1481
  if (p && v?.length) {
1476
- const g = r.get();
1477
- g && v.push(g), a.setKey("loading", !0), a.setKey("data", []);
1478
- const S = await u({
1482
+ const w = r.get();
1483
+ w && v.push(w), a.setKey("loading", !0), a.setKey("data", []);
1484
+ const g = await u({
1479
1485
  eventId: p,
1480
1486
  usersIds: v
1481
1487
  });
1482
1488
  a.set({
1483
- data: S.data.map((O, $) => ({
1484
- ...O.attributes,
1485
- friendsRank: $ + 1
1489
+ data: g.data.map((S, R) => ({
1490
+ ...S.attributes,
1491
+ friendsRank: R + 1
1486
1492
  })),
1487
1493
  hasMore: !1,
1488
1494
  key: Date.now(),
1489
1495
  loading: !1
1490
- }), S.meta && (o = Math.round(S.meta.count / S.meta.pageSize));
1496
+ }), g.meta && (o = Math.round(g.meta.count / g.meta.pageSize));
1491
1497
  }
1492
1498
  }, c = () => {
1493
1499
  l();
1494
1500
  }, f = (p) => {
1495
- const v = s.get(), g = p || v.page + 1;
1496
- g <= o && s.set({ ...v, page: g });
1501
+ const v = s.get(), w = p || v.page + 1;
1502
+ w <= o && s.set({ ...v, page: w });
1497
1503
  };
1498
1504
  return br(a, () => {
1499
1505
  const p = e.listen(l), v = n.listen(l);
@@ -1564,7 +1570,7 @@ const Hr = "sldl", Pt = "sldl_uid", Vn = "sldl_eid", $n = "sldl_e_eid", Lo = /*
1564
1570
  ce.debug(a);
1565
1571
  }
1566
1572
  t.deepLink = {
1567
- $store: new Ce(J(o), "deep-link-context"),
1573
+ $store: new Ce(W(o), "deep-link-context"),
1568
1574
  getDeepLinkData: () => {
1569
1575
  const { data: a, used: u } = t.deepLink.$store.getValues();
1570
1576
  return { data: a, used: u };
@@ -1727,7 +1733,7 @@ const Je = new Be(), Ro = (t, e, r) => {
1727
1733
  [C.PREDICTION]: "prediction",
1728
1734
  [C.TWEET]: "tweet"
1729
1735
  }, Mo = (t, e, r) => {
1730
- t.sdk.uiState = J({}), t.ui = {
1736
+ t.sdk.uiState = W({}), t.ui = {
1731
1737
  enableAppNotification: function() {
1732
1738
  t.sdk.uiState.setKey("appNotification", !0);
1733
1739
  },
@@ -1829,7 +1835,7 @@ const Je = new Be(), Ro = (t, e, r) => {
1829
1835
  }), r();
1830
1836
  }, jo = (t, e, r) => {
1831
1837
  const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
1832
- t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.withAuth = !1, t.sdk.onMount = ({ name: s, clear: a }, u) => {
1838
+ t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.options = W(e), t.sdk.withAuth = !1, t.sdk.onMount = ({ name: s, clear: a }, u) => {
1833
1839
  if (i.has(s)) {
1834
1840
  const l = o.get(s);
1835
1841
  l && l(), i.delete(s), o.delete(s);
@@ -1884,7 +1890,7 @@ const Je = new Be(), Ro = (t, e, r) => {
1884
1890
  r.append(n, i);
1885
1891
  return r.toString();
1886
1892
  }, qo = (t, e, r, n) => {
1887
- const i = J({});
1893
+ const i = W({});
1888
1894
  return br(i, () => Bo(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
1889
1895
  const l = a === void 0 && u === !1 ? "https://streamlayer.io" : a?.url, c = n.get() || "", f = e.get() || "", p = r.get() || "", v = {
1890
1896
  [Pt]: c,
@@ -1893,13 +1899,13 @@ const Je = new Be(), Ro = (t, e, r) => {
1893
1899
  };
1894
1900
  if (!u && l) {
1895
1901
  i.setKey("loading", !0);
1896
- let g = window.location.search, b = window.location.hash;
1897
- g && b || b ? g = `?${Xr(g, v)}` : b = `#${Xr("", v)}`;
1898
- const S = window.location.origin + window.location.pathname + g + b;
1902
+ let w = window.location.search, b = window.location.hash;
1903
+ w && b || b ? w = `?${Xr(w, v)}` : b = `#${Xr("", v)}`;
1904
+ const g = window.location.origin + window.location.pathname + w + b;
1899
1905
  try {
1900
- const O = await Uo(t, { web: S, mobile: l });
1906
+ const S = await Uo(t, { web: g, mobile: l });
1901
1907
  i.set({
1902
- data: O.data?.link,
1908
+ data: S.data?.link,
1903
1909
  loading: !1
1904
1910
  });
1905
1911
  } catch {
@@ -1966,7 +1972,7 @@ const xo = (t, e, r, n) => {
1966
1972
  }
1967
1973
  }, Qo = (t, e, r, n) => {
1968
1974
  let i = !1;
1969
- const o = new Rn(), s = U(M.Unset);
1975
+ const o = new Rn(), s = j(M.Unset);
1970
1976
  s.subscribe((l) => {
1971
1977
  l !== M.Unset && (l === M.Optional || l === M.Required ? i === !1 && (xo(t, e, n, o), i = !0) : t.onboardingProcessed.set(!0), l === M.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
1972
1978
  userId: e.userId.get() || "",
@@ -1997,7 +2003,7 @@ const xo = (t, e, r, n) => {
1997
2003
  }
1998
2004
  } };
1999
2005
  }, Go = (t, e, r, n) => {
2000
- const i = J(void 0), o = Fn(n), s = async () => {
2006
+ const i = W(void 0), o = Fn(n), s = async () => {
2001
2007
  const u = t.get(), l = e.get(), c = r.getStore().get().data?.map((v) => v.slId);
2002
2008
  if (!c)
2003
2009
  return;
@@ -2051,6 +2057,7 @@ class Ho extends kn {
2051
2057
  openedQuestionId;
2052
2058
  advertisement;
2053
2059
  onboardingProcessed;
2060
+ friendsTabEnabled;
2054
2061
  notifications;
2055
2062
  transport;
2056
2063
  /** gamification background class, handle subscriptions and notifications for closed overlay */
@@ -2061,11 +2068,15 @@ class Ho extends kn {
2061
2068
  cancels = /* @__PURE__ */ new Set();
2062
2069
  onQuestionActivate;
2063
2070
  constructor(e, r, n) {
2064
- super(e, r), this.background = new bo(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Rn(), this.feedList = this.background.feedList, this.friends = new le(no(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = U(void 0), this.onboardingProcessed = U(!n.sdk.withAuth), this.leaderboardId = new X(U(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Qo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(D.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = qo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Go(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = _o(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
2071
+ super(e, r), this.background = new bo(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Rn(), this.feedList = this.background.feedList, this.friends = new le(no(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = j(void 0), this.onboardingProcessed = j(!n.sdk.withAuth), this.leaderboardId = new X(j(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Qo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(D.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = qo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Go(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = _o(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
2065
2072
  o?.summary && i?.summary && this.leaderboardList.invalidate();
2066
2073
  })), this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)), this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)), this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)), this.cancels.add(this.onboardingStatus.$store.listen((i, o) => {
2067
2074
  (o === void 0 || i !== M.Unset) && this.background.activeQuestionId.invalidate();
2068
- })), this.background.activeQuestionId.listen(this.showInApp), n.sdk.onMount({ name: "gamification", clear: !0 }, () => () => {
2075
+ })), this.background.activeQuestionId.listen(this.showInApp), this.friendsTabEnabled = j(!1), this.cancels.add(n.sdk.options.subscribe((i) => {
2076
+ i.friendsTab === "disabled" ? this.friendsTabEnabled.set(!1) : i.friendsTab === "enabled" && this.friendsTabEnabled.set(!0);
2077
+ })), this.cancels.add(this.settings.subscribe((i) => {
2078
+ n.sdk.options.get().friendsTab === "activatedGame" && this.friendsTabEnabled.set(!!i.inplayGame?.titleCard?.optIn);
2079
+ })), n.sdk.onMount({ name: "gamification", clear: !0 }, () => () => {
2069
2080
  for (const i of this.cancels)
2070
2081
  i(), this.cancels.delete(i);
2071
2082
  });
@@ -2087,47 +2098,47 @@ class Ho extends kn {
2087
2098
  if (!r || !n?.attributes)
2088
2099
  return;
2089
2100
  const { status: i, type: o, id: s, answers: a } = r;
2090
- if (i === Y.RESOLVED && o === C.PREDICTION) {
2101
+ if (i === J.RESOLVED && o === C.PREDICTION) {
2091
2102
  const u = this.background.getCurrentSessionId({
2092
2103
  prefix: `notification-id:${s}`
2093
2104
  }), l = [...this.feedList.getValues().data || []], c = l.findIndex((K) => K.id === s), f = l[c];
2094
2105
  let p = f?.attributes?.attributes?.value?.answerId;
2095
- const v = ar(s, this.transport), g = v.subscribe(() => {
2106
+ const v = ar(s, this.transport), w = v.subscribe(() => {
2096
2107
  });
2097
2108
  await v.get().promise;
2098
2109
  let b = v.get().data;
2099
- b || (b = await co(s, this.transport)), g(), window.requestAnimationFrame(() => {
2110
+ b || (b = await co(s, this.transport)), w(), window.requestAnimationFrame(() => {
2100
2111
  v.invalidate();
2101
2112
  }), p || (p = b?.answers.find(({ youVoted: K }) => K)?.id);
2102
- const S = a.find(({ correct: K }) => K), O = p ? a.find(({ id: K }) => K === p) : void 0, $ = !!O?.correct;
2113
+ const g = a.find(({ correct: K }) => K), S = p ? a.find(({ id: K }) => K === p) : void 0, R = !!S?.correct;
2103
2114
  if (f && l[c]?.attributes?.attributes.case === "question") {
2104
2115
  try {
2105
- l[c].attributes.attributes.value.answerId = p, l[c].attributes.attributes.value.openForVoting = !1, p && (l[c].attributes.attributes.value.status = $ ? ct.WON : ct.LOST);
2116
+ l[c].attributes.attributes.value.answerId = p, l[c].attributes.attributes.value.openForVoting = !1, p && (l[c].attributes.attributes.value.status = R ? ct.WON : ct.LOST);
2106
2117
  } catch {
2107
2118
  }
2108
2119
  this.feedList.getStore().mutate(l);
2109
2120
  }
2110
- if (!O || !S)
2121
+ if (!S || !g)
2111
2122
  return;
2112
2123
  this.openedQuestionId.get()?.questionId !== r.id && this.notifications.add({
2113
2124
  type: Ee.QUESTION_RESOLVED,
2114
2125
  action: () => this.openQuestion(r.id, n),
2115
2126
  close: () => this.closeQuestion(s),
2116
- autoHideDuration: $ ? 15e3 : 12e3,
2127
+ autoHideDuration: R ? 15e3 : 12e3,
2117
2128
  id: u,
2118
2129
  emitEvent: !1,
2119
2130
  data: {
2120
2131
  questionId: s,
2121
2132
  questionType: C.PREDICTION,
2122
2133
  question: {
2123
- title: $ ? `Congratulations! You answered correctly! You won ${S.points} pts!` : `Better luck next time! Correct: ${S?.text}!`,
2134
+ title: R ? `Congratulations! You answered correctly! You won ${g.points} pts!` : `Better luck next time! Correct: ${g?.text}!`,
2124
2135
  votedAnswer: {
2125
- title: O?.text,
2126
- points: O?.points
2136
+ title: S?.text,
2137
+ points: S?.points
2127
2138
  },
2128
- correctAnswerTitle: S?.text,
2129
- correct: !!$,
2130
- predictionResult: i === Y.RESOLVED,
2139
+ correctAnswerTitle: g?.text,
2140
+ correct: !!R,
2141
+ predictionResult: i === J.RESOLVED,
2131
2142
  questionTitle: r?.subject
2132
2143
  }
2133
2144
  }
@@ -2135,7 +2146,7 @@ class Ho extends kn {
2135
2146
  }
2136
2147
  })), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-questions-list", (e) => {
2137
2148
  const r = [...this.feedList.getStore().value?.data || []], n = e.data?.attributes?.feedItem, i = r.findIndex((o) => o.id === n?.id);
2138
- if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !== Y.ACTIVE && n.attributes.status !== Y.RESOLVED)) {
2149
+ if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !== J.ACTIVE && n.attributes.status !== J.RESOLVED)) {
2139
2150
  if (i !== -1)
2140
2151
  if (n.attributes.attributes.case === "question" && r[i].attributes?.attributes.case === "question") {
2141
2152
  const o = r[i];
@@ -2212,10 +2223,10 @@ class Ho extends kn {
2212
2223
  });
2213
2224
  const f = n.get().data;
2214
2225
  if (i(), f) {
2215
- const p = f.answers.find((S) => S.correct === !0), v = f.answers.findIndex((S) => S.id === r), g = f.answers[v], b = f.answers.every(({ percentageDecimal: S }, O) => S === o?.answers[O].percentageDecimal);
2216
- a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = g?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? ct.WON : ct.LOST), this.feedList.getStore().mutate([...a]), f.answers[v].correct = p?.id === r, f.answers[v].youVoted = !0, b && f.answers.forEach((S) => {
2217
- S.percentageDecimal = 0;
2218
- }), p?.id === r && (f.answers[v].pointsEarned = f.status === Y.RESOLVED ? 0 : p.points), n.mutate({ ...f });
2226
+ const p = f.answers.find((g) => g.correct === !0), v = f.answers.findIndex((g) => g.id === r), w = f.answers[v], b = f.answers.every(({ percentageDecimal: g }, S) => g === o?.answers[S].percentageDecimal);
2227
+ a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = w?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? ct.WON : ct.LOST), this.feedList.getStore().mutate([...a]), f.answers[v].correct = p?.id === r, f.answers[v].youVoted = !0, b && f.answers.forEach((g) => {
2228
+ g.percentageDecimal = 0;
2229
+ }), p?.id === r && (f.answers[v].pointsEarned = f.status === J.RESOLVED ? 0 : p.points), n.mutate({ ...f });
2219
2230
  }
2220
2231
  this.submitAnswerTimeout && clearTimeout(this.submitAnswerTimeout), this.submitAnswerTimeout = setTimeout(() => {
2221
2232
  this.userSummary.invalidate();
@@ -2294,9 +2305,9 @@ class Ho extends kn {
2294
2305
  */
2295
2306
  showInApp = (e) => {
2296
2307
  const r = this.onboardingStatus.$store.get();
2297
- if (e && e.data && r && r !== M.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== vi.ON && e.data.question.status === Y.ACTIVE && !e.data.question.marketClosed) {
2308
+ if (e && e.data && r && r !== M.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== vi.ON && e.data.question.status === J.ACTIVE && !e.data.question.marketClosed) {
2298
2309
  if (zo.has(e.data.question.type))
2299
- this.isInteractiveAllowed && this.notifications.add({
2310
+ this.isInteractiveAllowed && e.data.question.notification !== void 0 && this.notifications.add({
2300
2311
  type: Ee.QUESTION,
2301
2312
  action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
2302
2313
  close: () => this.closeQuestion(e.data?.question?.id),
@@ -2315,9 +2326,9 @@ class Ho extends kn {
2315
2326
  }
2316
2327
  });
2317
2328
  else if (e.data.question.type === C.FACTOID) {
2318
- const n = e.data.question.options?.options.value, i = {
2319
- heading: e.data.question.notification.title,
2320
- body: e.data.question.notification.body,
2329
+ const n = e.data.question.options?.options.value, i = e.data.question.notification?.title || e.data.question.subject || "", o = e.data.question.notification?.body || n.body, s = {
2330
+ heading: i,
2331
+ body: o,
2321
2332
  imageMode: n?.imageMode,
2322
2333
  image: n?.image,
2323
2334
  video: {
@@ -2340,10 +2351,10 @@ class Ho extends kn {
2340
2351
  data: {
2341
2352
  questionId: e.data.question.id,
2342
2353
  questionType: e.data.question.type,
2343
- insight: i
2354
+ insight: s
2344
2355
  }
2345
2356
  });
2346
- } else if (e.data.question.type === C.TWEET) {
2357
+ } else if (e.data.question.type === C.TWEET && e.data.question.notification !== void 0) {
2347
2358
  const n = e.data.question.options?.options.value, i = {
2348
2359
  title: e.data.question.notification?.title,
2349
2360
  body: e.data.question.notification?.body,
@@ -2379,7 +2390,7 @@ class Yo extends kn {
2379
2390
  }
2380
2391
  }
2381
2392
  const Jo = (t, e, r) => t.type === D.GAMES ? new Ho(t, e, r) : new Yo(t, e), Xo = (t, e, r) => {
2382
- t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new X(U(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new X(U(D.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (n) => t.features.get(n), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (n) => {
2393
+ t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new X(j(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new X(j(D.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (n) => t.features.get(n), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (n) => {
2383
2394
  t.activeFeature.setValue(n);
2384
2395
  }, t.sdk.closeFeature = (n = !1) => {
2385
2396
  const i = t.activeFeature.getValue();
@@ -2774,7 +2785,7 @@ class os {
2774
2785
  }
2775
2786
  const ss = ({ transport: t, $commonStore: e }) => {
2776
2787
  let r;
2777
- const n = U(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(Tn, {
2788
+ const n = j(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(Tn, {
2778
2789
  method: "send",
2779
2790
  params: [n]
2780
2791
  }), a = t.nanoquery.createFetcherStore(s, {
@@ -2823,7 +2834,7 @@ class as {
2823
2834
  listenersCancels;
2824
2835
  connected = !1;
2825
2836
  constructor(e) {
2826
- this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Ce(J({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = ss({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new is(this), this.polls = new os(this), this.invitation = new Zo(this), this.interactions = new es(this), this.advertisement = new rs(this);
2837
+ this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Ce(W({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = ss({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new is(this), this.polls = new os(this), this.invitation = new Zo(this), this.interactions = new es(this), this.advertisement = new rs(this);
2827
2838
  const { client: r } = e.analyticsTransport.createPromiseClient(Tn, {
2828
2839
  method: "send"
2829
2840
  });
@@ -2896,8 +2907,8 @@ function Mn(t, e, r) {
2896
2907
  throw new Error("fastqueue concurrency must be equal to or greater than 1");
2897
2908
  var n = fs(ps), i = null, o = null, s = 0, a = null, u = {
2898
2909
  push: b,
2899
- drain: W,
2900
- saturated: W,
2910
+ drain: Y,
2911
+ saturated: Y,
2901
2912
  pause: c,
2902
2913
  paused: !1,
2903
2914
  get concurrency() {
@@ -2908,16 +2919,16 @@ function Mn(t, e, r) {
2908
2919
  throw new Error("fastqueue concurrency must be equal to or greater than 1");
2909
2920
  if (r = P, !u.paused)
2910
2921
  for (; i && s < r; )
2911
- s++, O();
2922
+ s++, S();
2912
2923
  },
2913
2924
  running: l,
2914
2925
  resume: v,
2915
- idle: g,
2926
+ idle: w,
2916
2927
  length: f,
2917
2928
  getQueue: p,
2918
- unshift: S,
2919
- empty: W,
2920
- kill: $,
2929
+ unshift: g,
2930
+ empty: Y,
2931
+ kill: R,
2921
2932
  killAndDrain: K,
2922
2933
  error: ee
2923
2934
  };
@@ -2929,59 +2940,59 @@ function Mn(t, e, r) {
2929
2940
  u.paused = !0;
2930
2941
  }
2931
2942
  function f() {
2932
- for (var P = i, R = 0; P; )
2933
- P = P.next, R++;
2934
- return R;
2943
+ for (var P = i, V = 0; P; )
2944
+ P = P.next, V++;
2945
+ return V;
2935
2946
  }
2936
2947
  function p() {
2937
- for (var P = i, R = []; P; )
2938
- R.push(P.value), P = P.next;
2939
- return R;
2948
+ for (var P = i, V = []; P; )
2949
+ V.push(P.value), P = P.next;
2950
+ return V;
2940
2951
  }
2941
2952
  function v() {
2942
2953
  if (u.paused) {
2943
2954
  if (u.paused = !1, i === null) {
2944
- s++, O();
2955
+ s++, S();
2945
2956
  return;
2946
2957
  }
2947
2958
  for (; i && s < r; )
2948
- s++, O();
2959
+ s++, S();
2949
2960
  }
2950
2961
  }
2951
- function g() {
2962
+ function w() {
2952
2963
  return s === 0 && u.length() === 0;
2953
2964
  }
2954
- function b(P, R) {
2955
- var T = n.get();
2956
- T.context = t, T.release = O, T.value = P, T.callback = R || W, T.errorHandler = a, s >= r || u.paused ? o ? (o.next = T, o = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
2965
+ function b(P, V) {
2966
+ var O = n.get();
2967
+ O.context = t, O.release = S, O.value = P, O.callback = V || Y, O.errorHandler = a, s >= r || u.paused ? o ? (o.next = O, o = O) : (i = O, o = O, u.saturated()) : (s++, e.call(t, O.value, O.worked));
2957
2968
  }
2958
- function S(P, R) {
2959
- var T = n.get();
2960
- T.context = t, T.release = O, T.value = P, T.callback = R || W, T.errorHandler = a, s >= r || u.paused ? i ? (T.next = i, i = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
2969
+ function g(P, V) {
2970
+ var O = n.get();
2971
+ O.context = t, O.release = S, O.value = P, O.callback = V || Y, O.errorHandler = a, s >= r || u.paused ? i ? (O.next = i, i = O) : (i = O, o = O, u.saturated()) : (s++, e.call(t, O.value, O.worked));
2961
2972
  }
2962
- function O(P) {
2973
+ function S(P) {
2963
2974
  P && n.release(P);
2964
- var R = i;
2965
- R && s <= r ? u.paused ? s-- : (o === i && (o = null), i = R.next, R.next = null, e.call(t, R.value, R.worked), o === null && u.empty()) : --s === 0 && u.drain();
2975
+ var V = i;
2976
+ V && s <= r ? u.paused ? s-- : (o === i && (o = null), i = V.next, V.next = null, e.call(t, V.value, V.worked), o === null && u.empty()) : --s === 0 && u.drain();
2966
2977
  }
2967
- function $() {
2968
- i = null, o = null, u.drain = W;
2978
+ function R() {
2979
+ i = null, o = null, u.drain = Y;
2969
2980
  }
2970
2981
  function K() {
2971
- i = null, o = null, u.drain(), u.drain = W;
2982
+ i = null, o = null, u.drain(), u.drain = Y;
2972
2983
  }
2973
2984
  function ee(P) {
2974
2985
  a = P;
2975
2986
  }
2976
2987
  }
2977
- function W() {
2988
+ function Y() {
2978
2989
  }
2979
2990
  function ps() {
2980
- this.value = null, this.callback = W, this.next = null, this.release = W, this.context = null, this.errorHandler = null;
2991
+ this.value = null, this.callback = Y, this.next = null, this.release = Y, this.context = null, this.errorHandler = null;
2981
2992
  var t = this;
2982
2993
  this.worked = function(r, n) {
2983
2994
  var i = t.callback, o = t.errorHandler, s = t.value;
2984
- t.value = null, t.callback = W, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
2995
+ t.value = null, t.callback = Y, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
2985
2996
  };
2986
2997
  }
2987
2998
  function hs(t, e, r) {
@@ -2995,27 +3006,27 @@ function hs(t, e, r) {
2995
3006
  return i.push = a, i.unshift = u, i.drained = l, i;
2996
3007
  function a(c) {
2997
3008
  var f = new Promise(function(p, v) {
2998
- o(c, function(g, b) {
2999
- if (g) {
3000
- v(g);
3009
+ o(c, function(w, b) {
3010
+ if (w) {
3011
+ v(w);
3001
3012
  return;
3002
3013
  }
3003
3014
  p(b);
3004
3015
  });
3005
3016
  });
3006
- return f.catch(W), f;
3017
+ return f.catch(Y), f;
3007
3018
  }
3008
3019
  function u(c) {
3009
3020
  var f = new Promise(function(p, v) {
3010
- s(c, function(g, b) {
3011
- if (g) {
3012
- v(g);
3021
+ s(c, function(w, b) {
3022
+ if (w) {
3023
+ v(w);
3013
3024
  return;
3014
3025
  }
3015
3026
  p(b);
3016
3027
  });
3017
3028
  });
3018
- return f.catch(W), f;
3029
+ return f.catch(Y), f;
3019
3030
  }
3020
3031
  function l() {
3021
3032
  if (i.idle())
@@ -3325,7 +3336,7 @@ var Hn = Er.exports, Ft = {}, Wn = {}, Yn = function() {
3325
3336
  l.prototype = r.prototype, i.prototype = new l(), l.prototype = null;
3326
3337
  }
3327
3338
  return i;
3328
- }, Ms = $s, Ir = Function.prototype.bind || Ms, js = Function.prototype.call, Bs = Object.prototype.hasOwnProperty, Us = Ir, qs = Us.call(js, Bs), I, xs = As, Qs = Es, Gs = Is, Ks = Ts, Ke = Jn, Ge = Rt, zs = Os, Xn = Function, Ut = function(t) {
3339
+ }, Ms = $s, Ir = Function.prototype.bind || Ms, js = Function.prototype.call, Bs = Object.prototype.hasOwnProperty, Us = Ir, qs = Us.call(js, Bs), T, xs = As, Qs = Es, Gs = Is, Ks = Ts, Ke = Jn, Ge = Rt, zs = Os, Xn = Function, Ut = function(t) {
3329
3340
  try {
3330
3341
  return Xn('"use strict"; return (' + t + ").constructor;")();
3331
3342
  } catch {
@@ -3349,25 +3360,25 @@ var qt = function() {
3349
3360
  return qt;
3350
3361
  }
3351
3362
  }
3352
- }() : qt, $e = Cs(), Ws = ks(), j = Object.getPrototypeOf || (Ws ? function(t) {
3363
+ }() : qt, $e = Cs(), Ws = ks(), B = Object.getPrototypeOf || (Ws ? function(t) {
3353
3364
  return t.__proto__;
3354
- } : null), je = {}, Ys = typeof Uint8Array > "u" || !j ? I : j(Uint8Array), Pe = {
3365
+ } : null), je = {}, Ys = typeof Uint8Array > "u" || !B ? T : B(Uint8Array), Pe = {
3355
3366
  __proto__: null,
3356
- "%AggregateError%": typeof AggregateError > "u" ? I : AggregateError,
3367
+ "%AggregateError%": typeof AggregateError > "u" ? T : AggregateError,
3357
3368
  "%Array%": Array,
3358
- "%ArrayBuffer%": typeof ArrayBuffer > "u" ? I : ArrayBuffer,
3359
- "%ArrayIteratorPrototype%": $e && j ? j([][Symbol.iterator]()) : I,
3360
- "%AsyncFromSyncIteratorPrototype%": I,
3369
+ "%ArrayBuffer%": typeof ArrayBuffer > "u" ? T : ArrayBuffer,
3370
+ "%ArrayIteratorPrototype%": $e && B ? B([][Symbol.iterator]()) : T,
3371
+ "%AsyncFromSyncIteratorPrototype%": T,
3361
3372
  "%AsyncFunction%": je,
3362
3373
  "%AsyncGenerator%": je,
3363
3374
  "%AsyncGeneratorFunction%": je,
3364
3375
  "%AsyncIteratorPrototype%": je,
3365
- "%Atomics%": typeof Atomics > "u" ? I : Atomics,
3366
- "%BigInt%": typeof BigInt > "u" ? I : BigInt,
3367
- "%BigInt64Array%": typeof BigInt64Array > "u" ? I : BigInt64Array,
3368
- "%BigUint64Array%": typeof BigUint64Array > "u" ? I : BigUint64Array,
3376
+ "%Atomics%": typeof Atomics > "u" ? T : Atomics,
3377
+ "%BigInt%": typeof BigInt > "u" ? T : BigInt,
3378
+ "%BigInt64Array%": typeof BigInt64Array > "u" ? T : BigInt64Array,
3379
+ "%BigUint64Array%": typeof BigUint64Array > "u" ? T : BigUint64Array,
3369
3380
  "%Boolean%": Boolean,
3370
- "%DataView%": typeof DataView > "u" ? I : DataView,
3381
+ "%DataView%": typeof DataView > "u" ? T : DataView,
3371
3382
  "%Date%": Date,
3372
3383
  "%decodeURI%": decodeURI,
3373
3384
  "%decodeURIComponent%": decodeURIComponent,
@@ -3377,55 +3388,55 @@ var qt = function() {
3377
3388
  "%eval%": eval,
3378
3389
  // eslint-disable-line no-eval
3379
3390
  "%EvalError%": Qs,
3380
- "%Float32Array%": typeof Float32Array > "u" ? I : Float32Array,
3381
- "%Float64Array%": typeof Float64Array > "u" ? I : Float64Array,
3382
- "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? I : FinalizationRegistry,
3391
+ "%Float32Array%": typeof Float32Array > "u" ? T : Float32Array,
3392
+ "%Float64Array%": typeof Float64Array > "u" ? T : Float64Array,
3393
+ "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? T : FinalizationRegistry,
3383
3394
  "%Function%": Xn,
3384
3395
  "%GeneratorFunction%": je,
3385
- "%Int8Array%": typeof Int8Array > "u" ? I : Int8Array,
3386
- "%Int16Array%": typeof Int16Array > "u" ? I : Int16Array,
3387
- "%Int32Array%": typeof Int32Array > "u" ? I : Int32Array,
3396
+ "%Int8Array%": typeof Int8Array > "u" ? T : Int8Array,
3397
+ "%Int16Array%": typeof Int16Array > "u" ? T : Int16Array,
3398
+ "%Int32Array%": typeof Int32Array > "u" ? T : Int32Array,
3388
3399
  "%isFinite%": isFinite,
3389
3400
  "%isNaN%": isNaN,
3390
- "%IteratorPrototype%": $e && j ? j(j([][Symbol.iterator]())) : I,
3391
- "%JSON%": typeof JSON == "object" ? JSON : I,
3392
- "%Map%": typeof Map > "u" ? I : Map,
3393
- "%MapIteratorPrototype%": typeof Map > "u" || !$e || !j ? I : j((/* @__PURE__ */ new Map())[Symbol.iterator]()),
3401
+ "%IteratorPrototype%": $e && B ? B(B([][Symbol.iterator]())) : T,
3402
+ "%JSON%": typeof JSON == "object" ? JSON : T,
3403
+ "%Map%": typeof Map > "u" ? T : Map,
3404
+ "%MapIteratorPrototype%": typeof Map > "u" || !$e || !B ? T : B((/* @__PURE__ */ new Map())[Symbol.iterator]()),
3394
3405
  "%Math%": Math,
3395
3406
  "%Number%": Number,
3396
3407
  "%Object%": Object,
3397
3408
  "%parseFloat%": parseFloat,
3398
3409
  "%parseInt%": parseInt,
3399
- "%Promise%": typeof Promise > "u" ? I : Promise,
3400
- "%Proxy%": typeof Proxy > "u" ? I : Proxy,
3410
+ "%Promise%": typeof Promise > "u" ? T : Promise,
3411
+ "%Proxy%": typeof Proxy > "u" ? T : Proxy,
3401
3412
  "%RangeError%": Gs,
3402
3413
  "%ReferenceError%": Ks,
3403
- "%Reflect%": typeof Reflect > "u" ? I : Reflect,
3414
+ "%Reflect%": typeof Reflect > "u" ? T : Reflect,
3404
3415
  "%RegExp%": RegExp,
3405
- "%Set%": typeof Set > "u" ? I : Set,
3406
- "%SetIteratorPrototype%": typeof Set > "u" || !$e || !j ? I : j((/* @__PURE__ */ new Set())[Symbol.iterator]()),
3407
- "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? I : SharedArrayBuffer,
3416
+ "%Set%": typeof Set > "u" ? T : Set,
3417
+ "%SetIteratorPrototype%": typeof Set > "u" || !$e || !B ? T : B((/* @__PURE__ */ new Set())[Symbol.iterator]()),
3418
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? T : SharedArrayBuffer,
3408
3419
  "%String%": String,
3409
- "%StringIteratorPrototype%": $e && j ? j(""[Symbol.iterator]()) : I,
3410
- "%Symbol%": $e ? Symbol : I,
3420
+ "%StringIteratorPrototype%": $e && B ? B(""[Symbol.iterator]()) : T,
3421
+ "%Symbol%": $e ? Symbol : T,
3411
3422
  "%SyntaxError%": Ke,
3412
3423
  "%ThrowTypeError%": Hs,
3413
3424
  "%TypedArray%": Ys,
3414
3425
  "%TypeError%": Ge,
3415
- "%Uint8Array%": typeof Uint8Array > "u" ? I : Uint8Array,
3416
- "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? I : Uint8ClampedArray,
3417
- "%Uint16Array%": typeof Uint16Array > "u" ? I : Uint16Array,
3418
- "%Uint32Array%": typeof Uint32Array > "u" ? I : Uint32Array,
3426
+ "%Uint8Array%": typeof Uint8Array > "u" ? T : Uint8Array,
3427
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? T : Uint8ClampedArray,
3428
+ "%Uint16Array%": typeof Uint16Array > "u" ? T : Uint16Array,
3429
+ "%Uint32Array%": typeof Uint32Array > "u" ? T : Uint32Array,
3419
3430
  "%URIError%": zs,
3420
- "%WeakMap%": typeof WeakMap > "u" ? I : WeakMap,
3421
- "%WeakRef%": typeof WeakRef > "u" ? I : WeakRef,
3422
- "%WeakSet%": typeof WeakSet > "u" ? I : WeakSet
3431
+ "%WeakMap%": typeof WeakMap > "u" ? T : WeakMap,
3432
+ "%WeakRef%": typeof WeakRef > "u" ? T : WeakRef,
3433
+ "%WeakSet%": typeof WeakSet > "u" ? T : WeakSet
3423
3434
  };
3424
- if (j)
3435
+ if (B)
3425
3436
  try {
3426
3437
  null.error;
3427
3438
  } catch (t) {
3428
- var Js = j(j(t));
3439
+ var Js = B(B(t));
3429
3440
  Pe["%Error.prototype%"] = Js;
3430
3441
  }
3431
3442
  var Xs = function t(e) {
@@ -3441,7 +3452,7 @@ var Xs = function t(e) {
3441
3452
  n && (r = n.prototype);
3442
3453
  } else if (e === "%AsyncIteratorPrototype%") {
3443
3454
  var i = t("%AsyncGenerator%");
3444
- i && j && (r = j(i.prototype));
3455
+ i && B && (r = B(i.prototype));
3445
3456
  }
3446
3457
  return Pe[e] = r, r;
3447
3458
  }, nn = {
@@ -3530,8 +3541,8 @@ var Xs = function t(e) {
3530
3541
  var n = ia(e), i = n.length > 0 ? n[0] : "", o = oa("%" + i + "%", r), s = o.name, a = o.value, u = !1, l = o.alias;
3531
3542
  l && (i = l[0], ea(n, Zs([0, 1], l)));
3532
3543
  for (var c = 1, f = !0; c < n.length; c += 1) {
3533
- var p = n[c], v = Et(p, 0, 1), g = Et(p, -1);
3534
- if ((v === '"' || v === "'" || v === "`" || g === '"' || g === "'" || g === "`") && v !== g)
3544
+ var p = n[c], v = Et(p, 0, 1), w = Et(p, -1);
3545
+ if ((v === '"' || v === "'" || v === "`" || w === '"' || w === "'" || w === "`") && v !== w)
3535
3546
  throw new Ke("property names with quotes must have matching quotes");
3536
3547
  if ((p === "constructor" || !f) && (u = !0), i += "." + p, s = "%" + i + "%", At(Pe, s))
3537
3548
  a = Pe[s];
@@ -3897,7 +3908,7 @@ var Xa = function(e) {
3897
3908
  var p = o(BigInt.prototype.valueOf);
3898
3909
  if (a)
3899
3910
  var v = o(Symbol.prototype.valueOf);
3900
- function g(y, gi) {
3911
+ function w(y, gi) {
3901
3912
  if (typeof y != "object")
3902
3913
  return !1;
3903
3914
  try {
@@ -3911,18 +3922,18 @@ var Xa = function(e) {
3911
3922
  return typeof Promise < "u" && y instanceof Promise || y !== null && typeof y == "object" && typeof y.then == "function" && typeof y.catch == "function";
3912
3923
  }
3913
3924
  t.isPromise = b;
3914
- function S(y) {
3925
+ function g(y) {
3915
3926
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(y) : i(y) || h(y);
3916
3927
  }
3917
- t.isArrayBufferView = S;
3918
- function O(y) {
3928
+ t.isArrayBufferView = g;
3929
+ function S(y) {
3919
3930
  return n(y) === "Uint8Array";
3920
3931
  }
3921
- t.isUint8Array = O;
3922
- function $(y) {
3932
+ t.isUint8Array = S;
3933
+ function R(y) {
3923
3934
  return n(y) === "Uint8ClampedArray";
3924
3935
  }
3925
- t.isUint8ClampedArray = $;
3936
+ t.isUint8ClampedArray = R;
3926
3937
  function K(y) {
3927
3938
  return n(y) === "Uint16Array";
3928
3939
  }
@@ -3935,14 +3946,14 @@ var Xa = function(e) {
3935
3946
  return n(y) === "Int8Array";
3936
3947
  }
3937
3948
  t.isInt8Array = P;
3938
- function R(y) {
3949
+ function V(y) {
3939
3950
  return n(y) === "Int16Array";
3940
3951
  }
3941
- t.isInt16Array = R;
3942
- function T(y) {
3952
+ t.isInt16Array = V;
3953
+ function O(y) {
3943
3954
  return n(y) === "Int32Array";
3944
3955
  }
3945
- t.isInt32Array = T;
3956
+ t.isInt32Array = O;
3946
3957
  function ie(y) {
3947
3958
  return n(y) === "Float32Array";
3948
3959
  }
@@ -4008,21 +4019,21 @@ var Xa = function(e) {
4008
4019
  }
4009
4020
  t.isDataView = h;
4010
4021
  var m = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
4011
- function w(y) {
4022
+ function A(y) {
4012
4023
  return u(y) === "[object SharedArrayBuffer]";
4013
4024
  }
4014
4025
  function L(y) {
4015
- return typeof m > "u" ? !1 : (typeof w.working > "u" && (w.working = w(new m())), w.working ? w(y) : y instanceof m);
4026
+ return typeof m > "u" ? !1 : (typeof A.working > "u" && (A.working = A(new m())), A.working ? A(y) : y instanceof m);
4016
4027
  }
4017
4028
  t.isSharedArrayBuffer = L;
4018
4029
  function k(y) {
4019
4030
  return u(y) === "[object AsyncFunction]";
4020
4031
  }
4021
4032
  t.isAsyncFunction = k;
4022
- function E(y) {
4033
+ function I(y) {
4023
4034
  return u(y) === "[object Map Iterator]";
4024
4035
  }
4025
- t.isMapIterator = E;
4036
+ t.isMapIterator = I;
4026
4037
  function _(y) {
4027
4038
  return u(y) === "[object Set Iterator]";
4028
4039
  }
@@ -4036,23 +4047,23 @@ var Xa = function(e) {
4036
4047
  }
4037
4048
  t.isWebAssemblyCompiledModule = H;
4038
4049
  function Te(y) {
4039
- return g(y, l);
4050
+ return w(y, l);
4040
4051
  }
4041
4052
  t.isNumberObject = Te;
4042
4053
  function at(y) {
4043
- return g(y, c);
4054
+ return w(y, c);
4044
4055
  }
4045
4056
  t.isStringObject = at;
4046
4057
  function Ve(y) {
4047
- return g(y, f);
4058
+ return w(y, f);
4048
4059
  }
4049
4060
  t.isBooleanObject = Ve;
4050
4061
  function ut(y) {
4051
- return s && g(y, p);
4062
+ return s && w(y, p);
4052
4063
  }
4053
4064
  t.isBigIntObject = ut;
4054
4065
  function Dr(y) {
4055
- return a && g(y, v);
4066
+ return a && w(y, v);
4056
4067
  }
4057
4068
  t.isSymbolObject = Dr;
4058
4069
  function yi(y) {
@@ -4094,9 +4105,9 @@ typeof Object.create == "function" ? yr.exports = function(e, r) {
4094
4105
  var iu = yr.exports;
4095
4106
  (function(t) {
4096
4107
  var e = Object.getOwnPropertyDescriptors || function(h) {
4097
- for (var m = Object.keys(h), w = {}, L = 0; L < m.length; L++)
4098
- w[m[L]] = Object.getOwnPropertyDescriptor(h, m[L]);
4099
- return w;
4108
+ for (var m = Object.keys(h), A = {}, L = 0; L < m.length; L++)
4109
+ A[m[L]] = Object.getOwnPropertyDescriptor(h, m[L]);
4110
+ return A;
4100
4111
  }, r = /%[sdj%]/g;
4101
4112
  t.format = function(d) {
4102
4113
  if (!P(d)) {
@@ -4104,53 +4115,53 @@ var iu = yr.exports;
4104
4115
  h.push(s(arguments[m]));
4105
4116
  return h.join(" ");
4106
4117
  }
4107
- for (var m = 1, w = arguments, L = w.length, k = String(d).replace(r, function(_) {
4118
+ for (var m = 1, A = arguments, L = A.length, k = String(d).replace(r, function(_) {
4108
4119
  if (_ === "%%") return "%";
4109
4120
  if (m >= L) return _;
4110
4121
  switch (_) {
4111
4122
  case "%s":
4112
- return String(w[m++]);
4123
+ return String(A[m++]);
4113
4124
  case "%d":
4114
- return Number(w[m++]);
4125
+ return Number(A[m++]);
4115
4126
  case "%j":
4116
4127
  try {
4117
- return JSON.stringify(w[m++]);
4128
+ return JSON.stringify(A[m++]);
4118
4129
  } catch {
4119
4130
  return "[Circular]";
4120
4131
  }
4121
4132
  default:
4122
4133
  return _;
4123
4134
  }
4124
- }), E = w[m]; m < L; E = w[++m])
4125
- $(E) || !oe(E) ? k += " " + E : k += " " + s(E);
4135
+ }), I = A[m]; m < L; I = A[++m])
4136
+ R(I) || !oe(I) ? k += " " + I : k += " " + s(I);
4126
4137
  return k;
4127
4138
  }, t.deprecate = function(d, h) {
4128
- if (typeof A < "u" && A.noDeprecation === !0)
4139
+ if (typeof E < "u" && E.noDeprecation === !0)
4129
4140
  return d;
4130
- if (typeof A > "u")
4141
+ if (typeof E > "u")
4131
4142
  return function() {
4132
4143
  return t.deprecate(d, h).apply(this, arguments);
4133
4144
  };
4134
4145
  var m = !1;
4135
- function w() {
4146
+ function A() {
4136
4147
  if (!m) {
4137
- if (A.throwDeprecation)
4148
+ if (E.throwDeprecation)
4138
4149
  throw new Error(h);
4139
- A.traceDeprecation ? console.trace(h) : console.error(h), m = !0;
4150
+ E.traceDeprecation ? console.trace(h) : console.error(h), m = !0;
4140
4151
  }
4141
4152
  return d.apply(this, arguments);
4142
4153
  }
4143
- return w;
4154
+ return A;
4144
4155
  };
4145
4156
  var n = {}, i = /^$/;
4146
- if (A.env.NODE_DEBUG) {
4147
- var o = A.env.NODE_DEBUG;
4157
+ if (E.env.NODE_DEBUG) {
4158
+ var o = E.env.NODE_DEBUG;
4148
4159
  o = o.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), i = new RegExp("^" + o + "$", "i");
4149
4160
  }
4150
4161
  t.debuglog = function(d) {
4151
4162
  if (d = d.toUpperCase(), !n[d])
4152
4163
  if (i.test(d)) {
4153
- var h = A.pid;
4164
+ var h = E.pid;
4154
4165
  n[d] = function() {
4155
4166
  var m = t.format.apply(t, arguments);
4156
4167
  console.error("%s %d: %s", d, h, m);
@@ -4165,7 +4176,7 @@ var iu = yr.exports;
4165
4176
  seen: [],
4166
4177
  stylize: u
4167
4178
  };
4168
- return arguments.length >= 3 && (m.depth = arguments[2]), arguments.length >= 4 && (m.colors = arguments[3]), O(h) ? m.showHidden = h : h && t._extend(m, h), T(m.showHidden) && (m.showHidden = !1), T(m.depth) && (m.depth = 2), T(m.colors) && (m.colors = !1), T(m.customInspect) && (m.customInspect = !0), m.colors && (m.stylize = a), c(m, d, m.depth);
4179
+ return arguments.length >= 3 && (m.depth = arguments[2]), arguments.length >= 4 && (m.colors = arguments[3]), S(h) ? m.showHidden = h : h && t._extend(m, h), O(m.showHidden) && (m.showHidden = !1), O(m.depth) && (m.depth = 2), O(m.colors) && (m.colors = !1), O(m.customInspect) && (m.customInspect = !0), m.colors && (m.stylize = a), c(m, d, m.depth);
4169
4180
  }
4170
4181
  t.inspect = s, s.colors = {
4171
4182
  bold: [1, 22],
@@ -4201,7 +4212,7 @@ var iu = yr.exports;
4201
4212
  }
4202
4213
  function l(d) {
4203
4214
  var h = {};
4204
- return d.forEach(function(m, w) {
4215
+ return d.forEach(function(m, A) {
4205
4216
  h[m] = !0;
4206
4217
  }), h;
4207
4218
  }
@@ -4209,13 +4220,13 @@ var iu = yr.exports;
4209
4220
  if (d.customInspect && h && de(h.inspect) && // Filter out the util module, it's inspect function is special
4210
4221
  h.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
4211
4222
  !(h.constructor && h.constructor.prototype === h)) {
4212
- var w = h.inspect(m, d);
4213
- return P(w) || (w = c(d, w, m)), w;
4223
+ var A = h.inspect(m, d);
4224
+ return P(A) || (A = c(d, A, m)), A;
4214
4225
  }
4215
4226
  var L = f(d, h);
4216
4227
  if (L)
4217
4228
  return L;
4218
- var k = Object.keys(h), E = l(k);
4229
+ var k = Object.keys(h), I = l(k);
4219
4230
  if (d.showHidden && (k = Object.getOwnPropertyNames(h)), Ie(h) && (k.indexOf("message") >= 0 || k.indexOf("description") >= 0))
4220
4231
  return p(h);
4221
4232
  if (k.length === 0) {
@@ -4231,7 +4242,7 @@ var iu = yr.exports;
4231
4242
  return p(h);
4232
4243
  }
4233
4244
  var F = "", H = !1, Te = ["{", "}"];
4234
- if (S(h) && (H = !0, Te = ["[", "]"]), de(h)) {
4245
+ if (g(h) && (H = !0, Te = ["[", "]"]), de(h)) {
4235
4246
  var at = h.name ? ": " + h.name : "";
4236
4247
  F = " [Function" + at + "]";
4237
4248
  }
@@ -4241,12 +4252,12 @@ var iu = yr.exports;
4241
4252
  return ie(h) ? d.stylize(RegExp.prototype.toString.call(h), "regexp") : d.stylize("[Object]", "special");
4242
4253
  d.seen.push(h);
4243
4254
  var Ve;
4244
- return H ? Ve = v(d, h, m, E, k) : Ve = k.map(function(ut) {
4245
- return g(d, h, m, E, ut, H);
4255
+ return H ? Ve = v(d, h, m, I, k) : Ve = k.map(function(ut) {
4256
+ return w(d, h, m, I, ut, H);
4246
4257
  }), d.seen.pop(), b(Ve, F, Te);
4247
4258
  }
4248
4259
  function f(d, h) {
4249
- if (T(h))
4260
+ if (O(h))
4250
4261
  return d.stylize("undefined", "undefined");
4251
4262
  if (P(h)) {
4252
4263
  var m = "'" + JSON.stringify(h).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
@@ -4254,38 +4265,38 @@ var iu = yr.exports;
4254
4265
  }
4255
4266
  if (ee(h))
4256
4267
  return d.stylize("" + h, "number");
4257
- if (O(h))
4268
+ if (S(h))
4258
4269
  return d.stylize("" + h, "boolean");
4259
- if ($(h))
4270
+ if (R(h))
4260
4271
  return d.stylize("null", "null");
4261
4272
  }
4262
4273
  function p(d) {
4263
4274
  return "[" + Error.prototype.toString.call(d) + "]";
4264
4275
  }
4265
- function v(d, h, m, w, L) {
4266
- for (var k = [], E = 0, _ = h.length; E < _; ++E)
4267
- De(h, String(E)) ? k.push(g(
4276
+ function v(d, h, m, A, L) {
4277
+ for (var k = [], I = 0, _ = h.length; I < _; ++I)
4278
+ De(h, String(I)) ? k.push(w(
4268
4279
  d,
4269
4280
  h,
4270
4281
  m,
4271
- w,
4272
- String(E),
4282
+ A,
4283
+ String(I),
4273
4284
  !0
4274
4285
  )) : k.push("");
4275
4286
  return L.forEach(function(F) {
4276
- F.match(/^\d+$/) || k.push(g(
4287
+ F.match(/^\d+$/) || k.push(w(
4277
4288
  d,
4278
4289
  h,
4279
4290
  m,
4280
- w,
4291
+ A,
4281
4292
  F,
4282
4293
  !0
4283
4294
  ));
4284
4295
  }), k;
4285
4296
  }
4286
- function g(d, h, m, w, L, k) {
4287
- var E, _, F;
4288
- if (F = Object.getOwnPropertyDescriptor(h, L) || { value: h[L] }, F.get ? F.set ? _ = d.stylize("[Getter/Setter]", "special") : _ = d.stylize("[Getter]", "special") : F.set && (_ = d.stylize("[Setter]", "special")), De(w, L) || (E = "[" + L + "]"), _ || (d.seen.indexOf(F.value) < 0 ? ($(m) ? _ = c(d, F.value, null) : _ = c(d, F.value, m - 1), _.indexOf(`
4297
+ function w(d, h, m, A, L, k) {
4298
+ var I, _, F;
4299
+ if (F = Object.getOwnPropertyDescriptor(h, L) || { value: h[L] }, F.get ? F.set ? _ = d.stylize("[Getter/Setter]", "special") : _ = d.stylize("[Getter]", "special") : F.set && (_ = d.stylize("[Setter]", "special")), De(A, L) || (I = "[" + L + "]"), _ || (d.seen.indexOf(F.value) < 0 ? (R(m) ? _ = c(d, F.value, null) : _ = c(d, F.value, m - 1), _.indexOf(`
4289
4300
  `) > -1 && (k ? _ = _.split(`
4290
4301
  `).map(function(H) {
4291
4302
  return " " + H;
@@ -4295,35 +4306,35 @@ var iu = yr.exports;
4295
4306
  `).map(function(H) {
4296
4307
  return " " + H;
4297
4308
  }).join(`
4298
- `))) : _ = d.stylize("[Circular]", "special")), T(E)) {
4309
+ `))) : _ = d.stylize("[Circular]", "special")), O(I)) {
4299
4310
  if (k && L.match(/^\d+$/))
4300
4311
  return _;
4301
- E = JSON.stringify("" + L), E.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (E = E.slice(1, -1), E = d.stylize(E, "name")) : (E = E.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), E = d.stylize(E, "string"));
4312
+ I = JSON.stringify("" + L), I.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (I = I.slice(1, -1), I = d.stylize(I, "name")) : (I = I.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), I = d.stylize(I, "string"));
4302
4313
  }
4303
- return E + ": " + _;
4314
+ return I + ": " + _;
4304
4315
  }
4305
4316
  function b(d, h, m) {
4306
- var w = d.reduce(function(L, k) {
4317
+ var A = d.reduce(function(L, k) {
4307
4318
  return k.indexOf(`
4308
4319
  `) >= 0, L + k.replace(/\u001b\[\d\d?m/g, "").length + 1;
4309
4320
  }, 0);
4310
- return w > 60 ? m[0] + (h === "" ? "" : h + `
4321
+ return A > 60 ? m[0] + (h === "" ? "" : h + `
4311
4322
  `) + " " + d.join(`,
4312
4323
  `) + " " + m[1] : m[0] + h + " " + d.join(", ") + " " + m[1];
4313
4324
  }
4314
4325
  t.types = Wn;
4315
- function S(d) {
4326
+ function g(d) {
4316
4327
  return Array.isArray(d);
4317
4328
  }
4318
- t.isArray = S;
4319
- function O(d) {
4329
+ t.isArray = g;
4330
+ function S(d) {
4320
4331
  return typeof d == "boolean";
4321
4332
  }
4322
- t.isBoolean = O;
4323
- function $(d) {
4333
+ t.isBoolean = S;
4334
+ function R(d) {
4324
4335
  return d === null;
4325
4336
  }
4326
- t.isNull = $;
4337
+ t.isNull = R;
4327
4338
  function K(d) {
4328
4339
  return d == null;
4329
4340
  }
@@ -4336,14 +4347,14 @@ var iu = yr.exports;
4336
4347
  return typeof d == "string";
4337
4348
  }
4338
4349
  t.isString = P;
4339
- function R(d) {
4350
+ function V(d) {
4340
4351
  return typeof d == "symbol";
4341
4352
  }
4342
- t.isSymbol = R;
4343
- function T(d) {
4353
+ t.isSymbol = V;
4354
+ function O(d) {
4344
4355
  return d === void 0;
4345
4356
  }
4346
- t.isUndefined = T;
4357
+ t.isUndefined = O;
4347
4358
  function ie(d) {
4348
4359
  return oe(d) && we(d) === "[object RegExp]";
4349
4360
  }
@@ -4401,8 +4412,8 @@ var iu = yr.exports;
4401
4412
  console.log("%s - %s", jt(), t.format.apply(t, arguments));
4402
4413
  }, t.inherits = iu, t._extend = function(d, h) {
4403
4414
  if (!h || !oe(h)) return d;
4404
- for (var m = Object.keys(h), w = m.length; w--; )
4405
- d[m[w]] = h[m[w]];
4415
+ for (var m = Object.keys(h), A = m.length; A--; )
4416
+ d[m[A]] = h[m[A]];
4406
4417
  return d;
4407
4418
  };
4408
4419
  function De(d, h) {
@@ -4424,15 +4435,15 @@ var iu = yr.exports;
4424
4435
  }), m;
4425
4436
  }
4426
4437
  function m() {
4427
- for (var w, L, k = new Promise(function(F, H) {
4428
- w = F, L = H;
4429
- }), E = [], _ = 0; _ < arguments.length; _++)
4430
- E.push(arguments[_]);
4431
- E.push(function(F, H) {
4432
- F ? L(F) : w(H);
4438
+ for (var A, L, k = new Promise(function(F, H) {
4439
+ A = F, L = H;
4440
+ }), I = [], _ = 0; _ < arguments.length; _++)
4441
+ I.push(arguments[_]);
4442
+ I.push(function(F, H) {
4443
+ F ? L(F) : A(H);
4433
4444
  });
4434
4445
  try {
4435
- h.apply(this, E);
4446
+ h.apply(this, I);
4436
4447
  } catch (F) {
4437
4448
  L(F);
4438
4449
  }
@@ -4459,20 +4470,20 @@ var iu = yr.exports;
4459
4470
  if (typeof d != "function")
4460
4471
  throw new TypeError('The "original" argument must be of type Function');
4461
4472
  function h() {
4462
- for (var m = [], w = 0; w < arguments.length; w++)
4463
- m.push(arguments[w]);
4473
+ for (var m = [], A = 0; A < arguments.length; A++)
4474
+ m.push(arguments[A]);
4464
4475
  var L = m.pop();
4465
4476
  if (typeof L != "function")
4466
4477
  throw new TypeError("The last argument must be of type Function");
4467
- var k = this, E = function() {
4478
+ var k = this, I = function() {
4468
4479
  return L.apply(k, arguments);
4469
4480
  };
4470
4481
  d.apply(this, m).then(
4471
4482
  function(_) {
4472
- A.nextTick(E.bind(null, null, _));
4483
+ E.nextTick(I.bind(null, null, _));
4473
4484
  },
4474
4485
  function(_) {
4475
- A.nextTick(Re.bind(null, _, E));
4486
+ E.nextTick(Re.bind(null, _, I));
4476
4487
  }
4477
4488
  );
4478
4489
  }
@@ -4679,8 +4690,8 @@ function lu() {
4679
4690
  return f >= n ? l(c, f, n, "day") : f >= r ? l(c, f, r, "hour") : f >= e ? l(c, f, e, "minute") : f >= t ? l(c, f, t, "second") : c + " ms";
4680
4691
  }
4681
4692
  function l(c, f, p, v) {
4682
- var g = f >= p * 1.5;
4683
- return Math.round(c / p) + " " + v + (g ? "s" : "");
4693
+ var w = f >= p * 1.5;
4694
+ return Math.round(c / p) + " " + v + (w ? "s" : "");
4684
4695
  }
4685
4696
  return Xt;
4686
4697
  }
@@ -4696,31 +4707,31 @@ function du(t) {
4696
4707
  }
4697
4708
  r.selectColor = e;
4698
4709
  function r(c) {
4699
- let f, p = null, v, g;
4700
- function b(...S) {
4710
+ let f, p = null, v, w;
4711
+ function b(...g) {
4701
4712
  if (!b.enabled)
4702
4713
  return;
4703
- const O = b, $ = Number(/* @__PURE__ */ new Date()), K = $ - (f || $);
4704
- O.diff = K, O.prev = f, O.curr = $, f = $, S[0] = r.coerce(S[0]), typeof S[0] != "string" && S.unshift("%O");
4714
+ const S = b, R = Number(/* @__PURE__ */ new Date()), K = R - (f || R);
4715
+ S.diff = K, S.prev = f, S.curr = R, f = R, g[0] = r.coerce(g[0]), typeof g[0] != "string" && g.unshift("%O");
4705
4716
  let ee = 0;
4706
- S[0] = S[0].replace(/%([a-zA-Z%])/g, (R, T) => {
4707
- if (R === "%%")
4717
+ g[0] = g[0].replace(/%([a-zA-Z%])/g, (V, O) => {
4718
+ if (V === "%%")
4708
4719
  return "%";
4709
4720
  ee++;
4710
- const ie = r.formatters[T];
4721
+ const ie = r.formatters[O];
4711
4722
  if (typeof ie == "function") {
4712
- const oe = S[ee];
4713
- R = ie.call(O, oe), S.splice(ee, 1), ee--;
4723
+ const oe = g[ee];
4724
+ V = ie.call(S, oe), g.splice(ee, 1), ee--;
4714
4725
  }
4715
- return R;
4716
- }), r.formatArgs.call(O, S), (O.log || r.log).apply(O, S);
4726
+ return V;
4727
+ }), r.formatArgs.call(S, g), (S.log || r.log).apply(S, g);
4717
4728
  }
4718
4729
  return b.namespace = c, b.useColors = r.useColors(), b.color = r.selectColor(c), b.extend = n, b.destroy = r.destroy, Object.defineProperty(b, "enabled", {
4719
4730
  enumerable: !0,
4720
4731
  configurable: !1,
4721
- get: () => p !== null ? p : (v !== r.namespaces && (v = r.namespaces, g = r.enabled(c)), g),
4722
- set: (S) => {
4723
- p = S;
4732
+ get: () => p !== null ? p : (v !== r.namespaces && (v = r.namespaces, w = r.enabled(c)), w),
4733
+ set: (g) => {
4734
+ p = g;
4724
4735
  }
4725
4736
  }), typeof r.init == "function" && r.init(b), b;
4726
4737
  }
@@ -4881,7 +4892,7 @@ var fu = du;
4881
4892
  u = e.storage.getItem("debug");
4882
4893
  } catch {
4883
4894
  }
4884
- return !u && typeof A < "u" && "env" in A && (u = A.env.DEBUG), u;
4895
+ return !u && typeof E < "u" && "env" in E && (u = E.env.DEBUG), u;
4885
4896
  }
4886
4897
  function s() {
4887
4898
  try {
@@ -4900,7 +4911,7 @@ var fu = du;
4900
4911
  };
4901
4912
  })(mr, mr.exports);
4902
4913
  var fi = mr.exports;
4903
- const pu = jn, hu = Hn.EventEmitter, yu = Ft.inherits, B = fi("avvio"), { AVV_ERR_READY_TIMEOUT: mu } = di, Zt = Symbol.for("plugin-meta");
4914
+ const pu = jn, hu = Hn.EventEmitter, yu = Ft.inherits, U = fi("avvio"), { AVV_ERR_READY_TIMEOUT: mu } = di, Zt = Symbol.for("plugin-meta");
4904
4915
  function gu(t, e) {
4905
4916
  return t[Zt] && t[Zt].name ? t[Zt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
4906
4917
  `).slice(0, 2).map((r) => r.trim()).join(" -- ");
@@ -4920,7 +4931,7 @@ We.prototype.exec = function(t, e) {
4920
4931
  let n = !1;
4921
4932
  const i = this.name;
4922
4933
  if (this.parent._error && !this.isAfter) {
4923
- B("skipping loading of plugin as parent errored and it is not an after", i), A.nextTick(e);
4934
+ U("skipping loading of plugin as parent errored and it is not an after", i), E.nextTick(e);
4924
4935
  return;
4925
4936
  }
4926
4937
  if (this.isAfter)
@@ -4929,26 +4940,26 @@ We.prototype.exec = function(t, e) {
4929
4940
  try {
4930
4941
  this.server = this.parent.override(t, r, this.opts);
4931
4942
  } catch (u) {
4932
- return B("override errored", i), e(u);
4943
+ return U("override errored", i), e(u);
4933
4944
  }
4934
- this.opts = typeof this.opts == "function" ? this.opts(this.server) : this.opts, B("exec", i);
4945
+ this.opts = typeof this.opts == "function" ? this.opts(this.server) : this.opts, U("exec", i);
4935
4946
  let o;
4936
4947
  const s = (u) => {
4937
4948
  if (n) {
4938
- B("loading complete", i);
4949
+ U("loading complete", i);
4939
4950
  return;
4940
4951
  }
4941
- this._error = u, B(u ? "exec errored" : "exec completed", i), n = !0, o && clearTimeout(o), e(u);
4952
+ this._error = u, U(u ? "exec errored" : "exec completed", i), n = !0, o && clearTimeout(o), e(u);
4942
4953
  };
4943
- this.timeout > 0 && (B("setting up timeout", i, this.timeout), o = setTimeout(function() {
4944
- B("timed out", i), o = null;
4954
+ this.timeout > 0 && (U("setting up timeout", i, this.timeout), o = setTimeout(function() {
4955
+ U("timed out", i), o = null;
4945
4956
  const u = new mu(i);
4946
4957
  u.fn = r, s(u);
4947
4958
  }, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
4948
4959
  const a = r(this.server, this.opts, s);
4949
- a && typeof a.then == "function" && (B("exec: resolving promise", i), a.then(
4950
- () => A.nextTick(s),
4951
- (u) => A.nextTick(s, u)
4960
+ a && typeof a.then == "function" && (U("exec: resolving promise", i), a.then(
4961
+ () => E.nextTick(s),
4962
+ (u) => E.nextTick(s, u)
4952
4963
  ));
4953
4964
  };
4954
4965
  We.prototype.loadedSoFar = function() {
@@ -4956,43 +4967,43 @@ We.prototype.loadedSoFar = function() {
4956
4967
  return Promise.resolve();
4957
4968
  const t = () => {
4958
4969
  this.server.after((r, n) => {
4959
- this._error = r, this.q.pause(), r ? (B("rejecting promise", this.name, r), this._promise.reject(r)) : (B("resolving promise", this.name), this._promise.resolve()), this._promise = null, A.nextTick(n, r);
4970
+ this._error = r, this.q.pause(), r ? (U("rejecting promise", this.name, r), this._promise.reject(r)) : (U("resolving promise", this.name), this._promise.resolve()), this._promise = null, E.nextTick(n, r);
4960
4971
  }), this.q.resume();
4961
4972
  };
4962
4973
  let e;
4963
4974
  return this._promise ? e = Promise.resolve() : (this._promise = bu(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
4964
4975
  };
4965
4976
  We.prototype.enqueue = function(t, e) {
4966
- B("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
4977
+ U("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
4967
4978
  };
4968
4979
  We.prototype.finish = function(t, e) {
4969
- B("finish", this.name, t);
4980
+ U("finish", this.name, t);
4970
4981
  const r = () => {
4971
- this.loaded || (B("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
4982
+ this.loaded || (U("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
4972
4983
  };
4973
4984
  if (t) {
4974
4985
  this._promise && (this._promise.reject(t), this._promise = null), r();
4975
4986
  return;
4976
4987
  }
4977
4988
  const n = () => {
4978
- if (B("check", this.name, this.q.length(), this.q.running(), this._promise), this.q.length() === 0 && this.q.running() === 0)
4989
+ if (U("check", this.name, this.q.length(), this.q.running(), this._promise), this.q.length() === 0 && this.q.running() === 0)
4979
4990
  if (this._promise) {
4980
4991
  const i = () => {
4981
- B("wrap"), queueMicrotask(n);
4992
+ U("wrap"), queueMicrotask(n);
4982
4993
  };
4983
4994
  this._promise.resolve(), this._promise.promise.then(i, i), this._promise = null;
4984
4995
  } else
4985
4996
  r();
4986
4997
  else
4987
- B("delayed", this.name), this.q.drain = () => {
4988
- B("drain", this.name), this.q.drain = Su, queueMicrotask(n);
4998
+ U("delayed", this.name), this.q.drain = () => {
4999
+ U("drain", this.name), this.q.drain = Su, queueMicrotask(n);
4989
5000
  };
4990
5001
  };
4991
5002
  queueMicrotask(n), this.q.resume();
4992
5003
  };
4993
5004
  function vu(t, e) {
4994
5005
  const r = this;
4995
- A.nextTick(Fr.bind(r), t, e);
5006
+ E.nextTick(Fr.bind(r), t, e);
4996
5007
  }
4997
5008
  function Fr(t, e) {
4998
5009
  if (typeof t.func.then == "function") {
@@ -5080,7 +5091,7 @@ function Lu(t, e, r) {
5080
5091
  }
5081
5092
  Eu(q, Au);
5082
5093
  q.prototype.start = function() {
5083
- return this.started = !0, A.nextTick(this._doStart), this;
5094
+ return this.started = !0, E.nextTick(this._doStart), this;
5084
5095
  };
5085
5096
  q.prototype.override = function(t, e, r) {
5086
5097
  return t;
@@ -5096,7 +5107,7 @@ q.prototype.use = function(t, e) {
5096
5107
  };
5097
5108
  q.prototype._loadRegistered = function() {
5098
5109
  const t = this._current[0];
5099
- return !this.started && !this.booted && A.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
5110
+ return !this.started && !this.booted && E.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
5100
5111
  };
5101
5112
  Object.defineProperty(q.prototype, "then", { get: pi });
5102
5113
  q.prototype._addPlugin = function(t, e, r) {
@@ -5146,7 +5157,7 @@ q.prototype.close = function(t) {
5146
5157
  };
5147
5158
  });
5148
5159
  return this.ready(() => {
5149
- this._error = null, this._closeQ.push(t), A.nextTick(this._closeQ.resume.bind(this._closeQ));
5160
+ this._error = null, this._closeQ.push(t), E.nextTick(this._closeQ.resume.bind(this._closeQ));
5150
5161
  }), e;
5151
5162
  };
5152
5163
  q.prototype.ready = function(t) {
@@ -5160,7 +5171,7 @@ q.prototype.ready = function(t) {
5160
5171
  this._readyQ.push(i), this.start();
5161
5172
  const n = this._current[0].server;
5162
5173
  function i(o, s, a) {
5163
- o ? r(o) : e(n), A.nextTick(a);
5174
+ o ? r(o) : e(n), E.nextTick(a);
5164
5175
  }
5165
5176
  });
5166
5177
  };
@@ -5187,9 +5198,9 @@ function hi(t, e) {
5187
5198
  const r = this._server, n = this._error;
5188
5199
  let i;
5189
5200
  if (this._error = null, t.length === 0)
5190
- this._error = n, i = t(), i && !i[Ct] && typeof i.then == "function" ? i.then(() => A.nextTick(e), (o) => A.nextTick(e, o)) : A.nextTick(e);
5201
+ this._error = n, i = t(), i && !i[Ct] && typeof i.then == "function" ? i.then(() => E.nextTick(e), (o) => E.nextTick(e, o)) : E.nextTick(e);
5191
5202
  else if (t.length === 1)
5192
- i = t(n), i && !i[Ct] && typeof i.then == "function" ? i.then(() => A.nextTick(e), (o) => A.nextTick(e, o)) : A.nextTick(e);
5203
+ i = t(n), i && !i[Ct] && typeof i.then == "function" ? i.then(() => E.nextTick(e), (o) => E.nextTick(e, o)) : E.nextTick(e);
5193
5204
  else if (this._timeout === 0) {
5194
5205
  const o = (s) => {
5195
5206
  this._error = s, e(this._error);
@@ -5216,9 +5227,9 @@ function Nu(t, e) {
5216
5227
  if (t.length === 0 || t.length === 1) {
5217
5228
  let i;
5218
5229
  n ? i = t(r) : i = t(this._error), i && typeof i.then == "function" ? (ze("resolving close/onClose promise"), i.then(
5219
- () => A.nextTick(e),
5220
- (o) => A.nextTick(e, o)
5221
- )) : A.nextTick(e);
5230
+ () => E.nextTick(e),
5231
+ (o) => E.nextTick(e, o)
5232
+ )) : E.nextTick(e);
5222
5233
  } else t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
5223
5234
  }
5224
5235
  function Fu(t, e) {
@@ -5226,10 +5237,10 @@ function Fu(t, e) {
5226
5237
  function r(n, i) {
5227
5238
  let o;
5228
5239
  t.length === 0 ? (o = t(), o && o.then ? o.then(function() {
5229
- A.nextTick(i);
5230
- }, i) : A.nextTick(i)) : t.length === 1 ? (o = t(this), o && o.then ? o.then(function() {
5231
- A.nextTick(i);
5232
- }, i) : A.nextTick(i)) : t(this, i);
5240
+ E.nextTick(i);
5241
+ }, i) : E.nextTick(i)) : t.length === 1 ? (o = t(this), o && o.then ? o.then(function() {
5242
+ E.nextTick(i);
5243
+ }, i) : E.nextTick(i)) : t(this, i);
5233
5244
  }
5234
5245
  }
5235
5246
  function rr(t, e) {
@@ -5237,10 +5248,10 @@ function rr(t, e) {
5237
5248
  function r(n, i) {
5238
5249
  let o;
5239
5250
  t ? t.length === 0 ? (o = t(), o && o.then ? o.then(function() {
5240
- A.nextTick(i, n);
5241
- }, i) : A.nextTick(i, n)) : t.length === 1 ? (o = t(n), o && o.then ? o.then(function() {
5242
- A.nextTick(i);
5243
- }, i) : A.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : A.nextTick(i);
5251
+ E.nextTick(i, n);
5252
+ }, i) : E.nextTick(i, n)) : t.length === 1 ? (o = t(n), o && o.then ? o.then(function() {
5253
+ E.nextTick(i);
5254
+ }, i) : E.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : E.nextTick(i);
5244
5255
  }
5245
5256
  }
5246
5257
  wr.exports = q;
@@ -5270,9 +5281,9 @@ const Ru = /* @__PURE__ */ cs(Du);
5270
5281
  }, window.cancelAnimationFrame = clearTimeout;
5271
5282
  }
5272
5283
  })();
5273
- function oc(t, e = !0, r = !0, n) {
5284
+ function oc(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
5274
5285
  const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s = Ru(/* @__PURE__ */ Object.create({}), { autostart: !1 });
5275
- return s.use(jo), s.use(No, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(Vo, { videoPlayerController: n?.videoPlayerController }), s.use(Mo, {
5286
+ return s.use(jo, { friendsTab: n.friendsTab }), s.use(No, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(Vo, { videoPlayerController: n?.videoPlayerController }), s.use(Mo, {
5276
5287
  onContentActivate: n?.onContentActivate,
5277
5288
  withAd: n?.withAd,
5278
5289
  withAdNotification: n?.withAdNotification