buzzcasting-storage 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buzzcasting-storage.d.ts +32 -26
- package/dist/buzzcasting-storage.esm.js +117 -128
- package/package.json +1 -1
|
@@ -49,7 +49,7 @@ export declare const CLOUD = "cloud";
|
|
|
49
49
|
|
|
50
50
|
export declare const CLOUD_CSS = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;";
|
|
51
51
|
|
|
52
|
-
declare interface
|
|
52
|
+
declare interface CloudIndicators {
|
|
53
53
|
total: number;
|
|
54
54
|
positive: number;
|
|
55
55
|
negative: number;
|
|
@@ -59,7 +59,7 @@ declare interface Current {
|
|
|
59
59
|
velocity: number;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
declare interface Dynamics {
|
|
62
|
+
export declare interface Dynamics {
|
|
63
63
|
engagement?: number;
|
|
64
64
|
semrush_visits?: number;
|
|
65
65
|
potential_reach?: number;
|
|
@@ -86,7 +86,10 @@ export declare const GET_DATA = "color:black;background-color:lime;padding:0 4px
|
|
|
86
86
|
|
|
87
87
|
export declare const HIDE_CSS = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;";
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Cloud
|
|
91
|
+
*/
|
|
92
|
+
export declare interface ICloud {
|
|
90
93
|
labels: Label[];
|
|
91
94
|
current: any[];
|
|
92
95
|
previous: any[];
|
|
@@ -96,7 +99,7 @@ declare interface ICloud {
|
|
|
96
99
|
previous_total: number;
|
|
97
100
|
}
|
|
98
101
|
|
|
99
|
-
declare interface IMessages {
|
|
102
|
+
export declare interface IMessages {
|
|
100
103
|
success?: boolean;
|
|
101
104
|
message?: string;
|
|
102
105
|
data?: Message[];
|
|
@@ -114,6 +117,9 @@ declare interface Indicators {
|
|
|
114
117
|
value: number;
|
|
115
118
|
}
|
|
116
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Query
|
|
122
|
+
*/
|
|
117
123
|
export declare interface IQuery {
|
|
118
124
|
[x: string]: any;
|
|
119
125
|
topics?: string;
|
|
@@ -135,14 +141,20 @@ export declare interface IQuery {
|
|
|
135
141
|
hash?: string;
|
|
136
142
|
}
|
|
137
143
|
|
|
138
|
-
|
|
144
|
+
/**
|
|
145
|
+
* API Response
|
|
146
|
+
*/
|
|
147
|
+
export declare interface IResponse {
|
|
139
148
|
data: IMessagesData | ISeries | ICloud | null;
|
|
140
149
|
message: string;
|
|
141
150
|
success: boolean;
|
|
142
151
|
query?: IQuery;
|
|
143
152
|
}
|
|
144
153
|
|
|
145
|
-
|
|
154
|
+
/**
|
|
155
|
+
* Series Data
|
|
156
|
+
*/
|
|
157
|
+
export declare interface ISeries {
|
|
146
158
|
topic: string;
|
|
147
159
|
title: string;
|
|
148
160
|
series: Series[];
|
|
@@ -152,11 +164,14 @@ declare interface ISeries {
|
|
|
152
164
|
timestamp: number;
|
|
153
165
|
}
|
|
154
166
|
|
|
167
|
+
/**
|
|
168
|
+
* Storage Options
|
|
169
|
+
*/
|
|
155
170
|
export declare interface IStorageOptions {
|
|
156
171
|
app: string;
|
|
157
172
|
version: string;
|
|
158
173
|
storage: string;
|
|
159
|
-
slide
|
|
174
|
+
slide?: string;
|
|
160
175
|
presentation?: string;
|
|
161
176
|
token?: string;
|
|
162
177
|
bearer?: string;
|
|
@@ -168,22 +183,22 @@ export declare interface IStorageOptions {
|
|
|
168
183
|
retention?: number;
|
|
169
184
|
}
|
|
170
185
|
|
|
171
|
-
declare interface Label {
|
|
186
|
+
export declare interface Label {
|
|
172
187
|
label: string;
|
|
173
188
|
count: number;
|
|
174
189
|
info: string;
|
|
175
|
-
current:
|
|
176
|
-
previous:
|
|
190
|
+
current: CloudIndicators;
|
|
191
|
+
previous: CloudIndicators;
|
|
177
192
|
}
|
|
178
193
|
|
|
179
|
-
declare interface Medium {
|
|
194
|
+
export declare interface Medium {
|
|
180
195
|
type: string;
|
|
181
196
|
url: string;
|
|
182
197
|
width: number;
|
|
183
198
|
height: number;
|
|
184
199
|
}
|
|
185
200
|
|
|
186
|
-
declare interface Message {
|
|
201
|
+
export declare interface Message {
|
|
187
202
|
id: string;
|
|
188
203
|
published: string;
|
|
189
204
|
harvested: string;
|
|
@@ -223,17 +238,10 @@ export declare const NONE = "color:transparent;background-color:transparent;";
|
|
|
223
238
|
|
|
224
239
|
export declare const PRESENTATION_CSS = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;";
|
|
225
240
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
neutral: number;
|
|
231
|
-
engagement: number;
|
|
232
|
-
reach: number;
|
|
233
|
-
velocity: number;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
declare interface Sender {
|
|
241
|
+
/**
|
|
242
|
+
* Messages
|
|
243
|
+
*/
|
|
244
|
+
export declare interface Sender {
|
|
237
245
|
id: string;
|
|
238
246
|
title: string;
|
|
239
247
|
name: string;
|
|
@@ -251,7 +259,7 @@ declare interface Sender {
|
|
|
251
259
|
|
|
252
260
|
export declare const SERIES = "series";
|
|
253
261
|
|
|
254
|
-
declare interface Series {
|
|
262
|
+
export declare interface Series {
|
|
255
263
|
name: string;
|
|
256
264
|
label: string;
|
|
257
265
|
current: number[];
|
|
@@ -282,8 +290,6 @@ export declare const SUBSCRIBE = "subscribe";
|
|
|
282
290
|
|
|
283
291
|
export declare const SUBSCRIBE_CSS = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;";
|
|
284
292
|
|
|
285
|
-
export declare function sum(o: any): string | any[];
|
|
286
|
-
|
|
287
293
|
declare interface Topic {
|
|
288
294
|
topic: string;
|
|
289
295
|
engagement: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Bi = Object.defineProperty;
|
|
2
2
|
var Ii = (T, o, m) => o in T ? Bi(T, o, { enumerable: !0, configurable: !0, writable: !0, value: m }) : T[o] = m;
|
|
3
3
|
var j = (T, o, m) => (Ii(T, typeof o != "symbol" ? o + "" : o, m), m);
|
|
4
|
-
const Ri = "2.
|
|
5
|
-
class
|
|
4
|
+
const Ri = "2.3.1";
|
|
5
|
+
class Ni {
|
|
6
6
|
constructor(o) {
|
|
7
7
|
j(this, "options");
|
|
8
8
|
j(this, "url");
|
|
@@ -59,10 +59,10 @@ class Ui {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
var Rr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
62
|
-
function
|
|
62
|
+
function Fi(T) {
|
|
63
63
|
return T && T.__esModule && Object.prototype.hasOwnProperty.call(T, "default") ? T.default : T;
|
|
64
64
|
}
|
|
65
|
-
var
|
|
65
|
+
var Fr = { exports: {} };
|
|
66
66
|
(function(T, o) {
|
|
67
67
|
(function(m, v) {
|
|
68
68
|
T.exports = v();
|
|
@@ -3227,16 +3227,16 @@ var Ur = { exports: {} };
|
|
|
3227
3227
|
} }), t);
|
|
3228
3228
|
}, ar(me), v(Se, Object.freeze({ __proto__: null, Dexie: Se, liveQuery: Br, Entity: pr, cmp: W, default: Se, RangeSet: ae, mergeRanges: wt, rangesOverlap: Yt }), { default: Se }), Se;
|
|
3229
3229
|
});
|
|
3230
|
-
})(
|
|
3231
|
-
var
|
|
3232
|
-
const Qn = /* @__PURE__ */
|
|
3230
|
+
})(Fr);
|
|
3231
|
+
var $i = Fr.exports;
|
|
3232
|
+
const Qn = /* @__PURE__ */ Fi($i), Nr = Symbol.for("Dexie"), Xn = globalThis[Nr] || (globalThis[Nr] = Qn);
|
|
3233
3233
|
if (Qn.semVer !== Xn.semVer)
|
|
3234
3234
|
throw new Error(`Two different versions of Dexie loaded in the same app: ${Qn.semVer} and ${Xn.semVer}`);
|
|
3235
3235
|
function X(T) {
|
|
3236
3236
|
let o = `${T.type}.${T.topics}`;
|
|
3237
3237
|
return T.order && (o += `.${T.order}`), T.period && (o += `.${T.period}`), o;
|
|
3238
3238
|
}
|
|
3239
|
-
function
|
|
3239
|
+
function kt(T, o) {
|
|
3240
3240
|
var z;
|
|
3241
3241
|
let m, v, S, M, D;
|
|
3242
3242
|
switch (T.moderation) {
|
|
@@ -3254,7 +3254,7 @@ function St(T, o) {
|
|
|
3254
3254
|
}
|
|
3255
3255
|
return o;
|
|
3256
3256
|
}
|
|
3257
|
-
class
|
|
3257
|
+
class $r {
|
|
3258
3258
|
constructor(o) {
|
|
3259
3259
|
j(this, "db");
|
|
3260
3260
|
j(this, "subscribers", []);
|
|
@@ -3269,7 +3269,7 @@ class Vr {
|
|
|
3269
3269
|
"%capi%C %ccloud",
|
|
3270
3270
|
H,
|
|
3271
3271
|
q,
|
|
3272
|
-
|
|
3272
|
+
Yi,
|
|
3273
3273
|
o.slide,
|
|
3274
3274
|
o.widget
|
|
3275
3275
|
), { data: null, message: "Series Data error", success: !1 }));
|
|
@@ -3285,7 +3285,7 @@ class Vr {
|
|
|
3285
3285
|
"%capi%c %cseries",
|
|
3286
3286
|
H,
|
|
3287
3287
|
q,
|
|
3288
|
-
|
|
3288
|
+
Qi,
|
|
3289
3289
|
o.slide,
|
|
3290
3290
|
o.widget
|
|
3291
3291
|
), { data: null, message: "Series Data error", success: !1 }));
|
|
@@ -3303,7 +3303,7 @@ class Vr {
|
|
|
3303
3303
|
"%capi%c %cmessages",
|
|
3304
3304
|
H,
|
|
3305
3305
|
q,
|
|
3306
|
-
|
|
3306
|
+
Hi,
|
|
3307
3307
|
o.slide,
|
|
3308
3308
|
o.widget
|
|
3309
3309
|
), { data: null, message: "Messages Data error", success: !1 })), D = M[0] ? M[0].title : "No title", z = M.map(
|
|
@@ -3365,7 +3365,7 @@ class Vr {
|
|
|
3365
3365
|
try {
|
|
3366
3366
|
return m.data.messages.forEach(async (S) => {
|
|
3367
3367
|
var M, D, z;
|
|
3368
|
-
await this.db.table(ie).put({ id: S.id, utc: S.utc, data: S }), await this.db.table(
|
|
3368
|
+
await this.db.table(ie).put({ id: S.id, utc: S.utc, data: S }), await this.db.table(Vi).put({
|
|
3369
3369
|
widget_id: o.widget,
|
|
3370
3370
|
message_id: S.id,
|
|
3371
3371
|
dashboard_id: o.dashboard,
|
|
@@ -3396,11 +3396,11 @@ class Vr {
|
|
|
3396
3396
|
* @param query IQuery
|
|
3397
3397
|
* @returns number
|
|
3398
3398
|
*/
|
|
3399
|
-
j(this, "setWidget", async (o) => await this.db.table(
|
|
3399
|
+
j(this, "setWidget", async (o) => await this.db.table(Gi).put({
|
|
3400
3400
|
id: o.widget,
|
|
3401
3401
|
dashboard_id: o.dashboard,
|
|
3402
3402
|
type: o.type
|
|
3403
|
-
}).then(() => 201).catch((m) => (console.error("%cstorage", V,
|
|
3403
|
+
}).then(() => 201).catch((m) => (console.error("%cstorage", V, xt, o, m), 400)));
|
|
3404
3404
|
/**
|
|
3405
3405
|
* Add component subscriber
|
|
3406
3406
|
* @param query IQuery
|
|
@@ -3414,11 +3414,11 @@ class Vr {
|
|
|
3414
3414
|
}
|
|
3415
3415
|
return this.subscribers.filter(
|
|
3416
3416
|
(S) => S.widget === o.widget
|
|
3417
|
-
).length > 0 || (o.type === ie && (o =
|
|
3417
|
+
).length > 0 || (o.type === ie && (o = kt(this.options, o)), console.debug(
|
|
3418
3418
|
"%cstorage%c %csubscribe",
|
|
3419
3419
|
V,
|
|
3420
3420
|
q,
|
|
3421
|
-
|
|
3421
|
+
St,
|
|
3422
3422
|
o.slide,
|
|
3423
3423
|
o.widget
|
|
3424
3424
|
), this.subscribers.push(o)), null;
|
|
@@ -3447,55 +3447,37 @@ function Jn(T) {
|
|
|
3447
3447
|
T.oncomplete = T.onsuccess = () => o(T.result), T.onabort = T.onerror = () => m(T.error);
|
|
3448
3448
|
});
|
|
3449
3449
|
}
|
|
3450
|
-
function
|
|
3450
|
+
function zi(T, o) {
|
|
3451
3451
|
const m = indexedDB.open(T);
|
|
3452
3452
|
m.onupgradeneeded = () => m.result.createObjectStore(o);
|
|
3453
3453
|
const v = Jn(m);
|
|
3454
3454
|
return (S, M) => v.then((D) => M(D.transaction(o, S).objectStore(o)));
|
|
3455
3455
|
}
|
|
3456
|
-
let
|
|
3457
|
-
function
|
|
3458
|
-
return
|
|
3456
|
+
let Wn;
|
|
3457
|
+
function zr() {
|
|
3458
|
+
return Wn || (Wn = zi("keyval-store", "keyval")), Wn;
|
|
3459
3459
|
}
|
|
3460
|
-
function
|
|
3460
|
+
function Un(T, o = zr()) {
|
|
3461
3461
|
return o("readonly", (m) => Jn(m.get(T)));
|
|
3462
3462
|
}
|
|
3463
|
-
function en(T, o, m =
|
|
3463
|
+
function en(T, o, m = zr()) {
|
|
3464
3464
|
return m("readwrite", (v) => (v.put(o, T), Jn(v.transaction)));
|
|
3465
3465
|
}
|
|
3466
|
-
class
|
|
3466
|
+
class Lr {
|
|
3467
3467
|
constructor(o) {
|
|
3468
3468
|
j(this, "subscribers", []);
|
|
3469
3469
|
j(this, "options");
|
|
3470
3470
|
j(this, "getCloud", async (o) => {
|
|
3471
3471
|
const m = X(o);
|
|
3472
|
-
return await
|
|
3473
|
-
"%capi",
|
|
3474
|
-
H,
|
|
3475
|
-
de,
|
|
3476
|
-
o.slide,
|
|
3477
|
-
o.widget
|
|
3478
|
-
), { data: null, message: "Cloud Data error", success: !1 }));
|
|
3472
|
+
return await Un(m).then((v) => v).catch(() => (console.warn("%capi", H, de, o.slide, o.widget), { data: null, message: "Cloud Data error", success: !1 }));
|
|
3479
3473
|
});
|
|
3480
3474
|
j(this, "getSeries", async (o) => {
|
|
3481
3475
|
const m = X(o);
|
|
3482
|
-
return await
|
|
3483
|
-
"%capi",
|
|
3484
|
-
H,
|
|
3485
|
-
he,
|
|
3486
|
-
o.slide,
|
|
3487
|
-
o.widget
|
|
3488
|
-
), { data: null, message: "Series Data error", success: !1 }));
|
|
3476
|
+
return await Un(m).then((v) => v).catch(() => (console.warn("%capi", H, he, o.slide, o.widget), { data: null, message: "Series Data error", success: !1 }));
|
|
3489
3477
|
});
|
|
3490
3478
|
j(this, "getMessages", async (o) => {
|
|
3491
3479
|
const m = X(o);
|
|
3492
|
-
return await
|
|
3493
|
-
"%capi",
|
|
3494
|
-
H,
|
|
3495
|
-
ie,
|
|
3496
|
-
o.slide,
|
|
3497
|
-
o.widget
|
|
3498
|
-
), { data: null, message: "Messages Data error", success: !1 }));
|
|
3480
|
+
return await Un(m).then((v) => v).catch(() => (console.warn("%capi", H, ie, o.slide, o.widget), { data: null, message: "Messages Data error", success: !1 }));
|
|
3499
3481
|
});
|
|
3500
3482
|
/**
|
|
3501
3483
|
* Update Cloud
|
|
@@ -3545,7 +3527,7 @@ class Yr {
|
|
|
3545
3527
|
dashboard_id: o.dashboard,
|
|
3546
3528
|
type: o.type
|
|
3547
3529
|
};
|
|
3548
|
-
return await en(m, v).then(() => 201).catch((S) => (console.error("%cstorage", V,
|
|
3530
|
+
return await en(m, v).then(() => 201).catch((S) => (console.error("%cstorage", V, xt, o, S), 400));
|
|
3549
3531
|
});
|
|
3550
3532
|
/**
|
|
3551
3533
|
* Add component subscriber
|
|
@@ -3558,9 +3540,16 @@ class Yr {
|
|
|
3558
3540
|
const S = (v = o.topics) == null ? void 0 : v.split("-");
|
|
3559
3541
|
o.dashboard = S ? S[0] : "", o.widget = S ? S[1] : "";
|
|
3560
3542
|
}
|
|
3561
|
-
return o.type === ie && (o =
|
|
3543
|
+
return o.type === ie && (o = kt(this.options, o)), this.subscribers.filter(
|
|
3562
3544
|
(S) => S.widget === o.widget
|
|
3563
|
-
).length > 0 || (console.debug(
|
|
3545
|
+
).length > 0 || (console.debug(
|
|
3546
|
+
"%cstorage%c %csubscribe",
|
|
3547
|
+
V,
|
|
3548
|
+
q,
|
|
3549
|
+
St,
|
|
3550
|
+
o.slide,
|
|
3551
|
+
o.widget
|
|
3552
|
+
), this.subscribers.push(o)), null;
|
|
3564
3553
|
});
|
|
3565
3554
|
/**
|
|
3566
3555
|
* Get current subscribers
|
|
@@ -3570,7 +3559,7 @@ class Yr {
|
|
|
3570
3559
|
this.options = o;
|
|
3571
3560
|
}
|
|
3572
3561
|
}
|
|
3573
|
-
class
|
|
3562
|
+
class Wr {
|
|
3574
3563
|
constructor(o) {
|
|
3575
3564
|
j(this, "subscribers", []);
|
|
3576
3565
|
j(this, "options");
|
|
@@ -3648,7 +3637,7 @@ class Hr {
|
|
|
3648
3637
|
try {
|
|
3649
3638
|
return localStorage.setObject(m, o), 201;
|
|
3650
3639
|
} catch (v) {
|
|
3651
|
-
return console.error("%cstorage", V,
|
|
3640
|
+
return console.error("%cstorage", V, xt, o, v), 400;
|
|
3652
3641
|
}
|
|
3653
3642
|
});
|
|
3654
3643
|
/**
|
|
@@ -3662,13 +3651,13 @@ class Hr {
|
|
|
3662
3651
|
const S = (v = o.topics) == null ? void 0 : v.split("-");
|
|
3663
3652
|
o.dashboard = S ? S[0] : "", o.widget = S ? S[1] : "";
|
|
3664
3653
|
}
|
|
3665
|
-
return o.type === ie && (o =
|
|
3654
|
+
return o.type === ie && (o = kt(this.options, o)), this.subscribers.filter(
|
|
3666
3655
|
(S) => S.widget === o.widget
|
|
3667
3656
|
).length || (console.debug(
|
|
3668
3657
|
"%cstorage%c %csubscribe",
|
|
3669
3658
|
V,
|
|
3670
3659
|
q,
|
|
3671
|
-
|
|
3660
|
+
St,
|
|
3672
3661
|
o.slide,
|
|
3673
3662
|
o.widget
|
|
3674
3663
|
), this.subscribers.push(o)), null;
|
|
@@ -3686,7 +3675,7 @@ class Hr {
|
|
|
3686
3675
|
};
|
|
3687
3676
|
}
|
|
3688
3677
|
}
|
|
3689
|
-
class
|
|
3678
|
+
class Ur {
|
|
3690
3679
|
constructor(o) {
|
|
3691
3680
|
j(this, "subscribers", []);
|
|
3692
3681
|
j(this, "options");
|
|
@@ -3764,7 +3753,7 @@ class Qr {
|
|
|
3764
3753
|
try {
|
|
3765
3754
|
return sessionStorage.setObject(m, o), 201;
|
|
3766
3755
|
} catch (v) {
|
|
3767
|
-
return console.error("%cstorage", V,
|
|
3756
|
+
return console.error("%cstorage", V, xt, o, v), 400;
|
|
3768
3757
|
}
|
|
3769
3758
|
});
|
|
3770
3759
|
/**
|
|
@@ -3778,13 +3767,13 @@ class Qr {
|
|
|
3778
3767
|
const S = (v = o.topics) == null ? void 0 : v.split("-");
|
|
3779
3768
|
o.dashboard = S ? S[0] : "", o.widget = S ? S[1] : "";
|
|
3780
3769
|
}
|
|
3781
|
-
return o.type === ie && (o =
|
|
3770
|
+
return o.type === ie && (o = kt(this.options, o)), this.subscribers.filter(
|
|
3782
3771
|
(S) => S.widget === o.widget
|
|
3783
3772
|
).length || (console.debug(
|
|
3784
3773
|
"%cstorage%c %csubscribe",
|
|
3785
3774
|
V,
|
|
3786
3775
|
q,
|
|
3787
|
-
|
|
3776
|
+
St,
|
|
3788
3777
|
o.slide,
|
|
3789
3778
|
o.widget
|
|
3790
3779
|
), this.subscribers.push(o)), null;
|
|
@@ -3802,7 +3791,7 @@ class Qr {
|
|
|
3802
3791
|
};
|
|
3803
3792
|
}
|
|
3804
3793
|
}
|
|
3805
|
-
class
|
|
3794
|
+
class Vr {
|
|
3806
3795
|
constructor(o) {
|
|
3807
3796
|
j(this, "subscribers", []);
|
|
3808
3797
|
j(this, "options");
|
|
@@ -3880,7 +3869,7 @@ class Xr {
|
|
|
3880
3869
|
try {
|
|
3881
3870
|
return window.BuzzCasting.WidgetData[m] = o, 201;
|
|
3882
3871
|
} catch (v) {
|
|
3883
|
-
return console.error("%cstorage", V,
|
|
3872
|
+
return console.error("%cstorage", V, xt, o, v), 400;
|
|
3884
3873
|
}
|
|
3885
3874
|
});
|
|
3886
3875
|
/**
|
|
@@ -3894,13 +3883,13 @@ class Xr {
|
|
|
3894
3883
|
const S = (v = o.topics) == null ? void 0 : v.split("-");
|
|
3895
3884
|
o.dashboard = S ? S[0] : "", o.widget = S ? S[1] : "";
|
|
3896
3885
|
}
|
|
3897
|
-
return o.type === ie && (o =
|
|
3886
|
+
return o.type === ie && (o = kt(this.options, o)), this.subscribers.filter(
|
|
3898
3887
|
(S) => S.widget === o.widget
|
|
3899
3888
|
).length || (console.debug(
|
|
3900
3889
|
"%cstorage%c %csubscribe",
|
|
3901
3890
|
V,
|
|
3902
3891
|
q,
|
|
3903
|
-
|
|
3892
|
+
St,
|
|
3904
3893
|
o.slide,
|
|
3905
3894
|
o.widget
|
|
3906
3895
|
), this.subscribers.push(o)), null;
|
|
@@ -3913,7 +3902,7 @@ class Xr {
|
|
|
3913
3902
|
this.options = o, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
|
|
3914
3903
|
}
|
|
3915
3904
|
}
|
|
3916
|
-
function
|
|
3905
|
+
function Li(T, o) {
|
|
3917
3906
|
for (; T.length < o; )
|
|
3918
3907
|
T = `0${T}`;
|
|
3919
3908
|
return T;
|
|
@@ -3926,14 +3915,14 @@ function Ee(T, o) {
|
|
|
3926
3915
|
v = o.charCodeAt(m), T = (T << 5) - T + v, T |= 0;
|
|
3927
3916
|
return T < 0 ? T * -2 : T;
|
|
3928
3917
|
}
|
|
3929
|
-
function
|
|
3918
|
+
function Wi(T, o, m) {
|
|
3930
3919
|
return Object.keys(o).sort().reduce(v, T);
|
|
3931
3920
|
function v(S, M) {
|
|
3932
|
-
return
|
|
3921
|
+
return Gr(S, o[M], M, m);
|
|
3933
3922
|
}
|
|
3934
3923
|
}
|
|
3935
|
-
function
|
|
3936
|
-
const S = Ee(Ee(Ee(T, m),
|
|
3924
|
+
function Gr(T, o, m, v) {
|
|
3925
|
+
const S = Ee(Ee(Ee(T, m), Ui(o)), typeof o);
|
|
3937
3926
|
if (o === null)
|
|
3938
3927
|
return Ee(S, "null");
|
|
3939
3928
|
if (o === void 0)
|
|
@@ -3942,7 +3931,7 @@ function Jr(T, o, m, v) {
|
|
|
3942
3931
|
if (v.includes(o))
|
|
3943
3932
|
return Ee(S, `[Circular]${m}`);
|
|
3944
3933
|
v.push(o);
|
|
3945
|
-
const M =
|
|
3934
|
+
const M = Wi(S, o, v);
|
|
3946
3935
|
if (!("valueOf" in o) || typeof o.valueOf != "function")
|
|
3947
3936
|
return M;
|
|
3948
3937
|
try {
|
|
@@ -3953,13 +3942,13 @@ function Jr(T, o, m, v) {
|
|
|
3953
3942
|
}
|
|
3954
3943
|
return Ee(S, o.toString());
|
|
3955
3944
|
}
|
|
3956
|
-
function
|
|
3945
|
+
function Ui(T) {
|
|
3957
3946
|
return Object.prototype.toString.call(T);
|
|
3958
3947
|
}
|
|
3959
|
-
function
|
|
3960
|
-
return
|
|
3948
|
+
function Vn(T) {
|
|
3949
|
+
return Li(Gr(0, T, "", []).toString(16), 8);
|
|
3961
3950
|
}
|
|
3962
|
-
class
|
|
3951
|
+
class Zi {
|
|
3963
3952
|
constructor(o) {
|
|
3964
3953
|
j(this, "sm");
|
|
3965
3954
|
j(this, "api");
|
|
@@ -3988,12 +3977,12 @@ class no {
|
|
|
3988
3977
|
let J = "";
|
|
3989
3978
|
switch (D.query.type) {
|
|
3990
3979
|
case ie:
|
|
3991
|
-
if (J =
|
|
3980
|
+
if (J = Vn(D.data.messages), z.hash === J)
|
|
3992
3981
|
return console.debug(
|
|
3993
3982
|
"%capi%c %cno updates",
|
|
3994
3983
|
H,
|
|
3995
3984
|
q,
|
|
3996
|
-
|
|
3985
|
+
Yn,
|
|
3997
3986
|
ie,
|
|
3998
3987
|
D.query.slide,
|
|
3999
3988
|
D.query.widget
|
|
@@ -4001,22 +3990,22 @@ class no {
|
|
|
4001
3990
|
z.hash = J, M = await this.sm.setMessages(D.query, D);
|
|
4002
3991
|
break;
|
|
4003
3992
|
case de:
|
|
4004
|
-
J =
|
|
3993
|
+
J = Vn(D.data), z.hash === J ? (console.debug(
|
|
4005
3994
|
"%capi%c %cno updates",
|
|
4006
3995
|
H,
|
|
4007
3996
|
q,
|
|
4008
|
-
|
|
3997
|
+
Yn,
|
|
4009
3998
|
de,
|
|
4010
3999
|
D.query.slide,
|
|
4011
4000
|
D.query.widget
|
|
4012
4001
|
), M = 204) : (z.hash = J, M = await this.sm.setCloud(D.query, D));
|
|
4013
4002
|
break;
|
|
4014
4003
|
case he:
|
|
4015
|
-
J =
|
|
4004
|
+
J = Vn(D.data), z.hash === J ? (console.debug(
|
|
4016
4005
|
"%capi%c %cno updates",
|
|
4017
4006
|
H,
|
|
4018
4007
|
q,
|
|
4019
|
-
|
|
4008
|
+
Yn,
|
|
4020
4009
|
he,
|
|
4021
4010
|
D.query.slide,
|
|
4022
4011
|
D.query.widget
|
|
@@ -4040,7 +4029,7 @@ class no {
|
|
|
4040
4029
|
"%capp%c %cbroadcast",
|
|
4041
4030
|
H,
|
|
4042
4031
|
q,
|
|
4043
|
-
|
|
4032
|
+
Gn,
|
|
4044
4033
|
D.query.slide,
|
|
4045
4034
|
D.data.title ?? D.query.widget
|
|
4046
4035
|
), this.bc.postMessage({ event: "widget-update", data: D.query });
|
|
@@ -4050,7 +4039,7 @@ class no {
|
|
|
4050
4039
|
"%capp%c %cbroadcast",
|
|
4051
4040
|
H,
|
|
4052
4041
|
q,
|
|
4053
|
-
|
|
4042
|
+
Gn,
|
|
4054
4043
|
D.query.slide,
|
|
4055
4044
|
D.data.title ?? D.query.widget
|
|
4056
4045
|
);
|
|
@@ -4105,7 +4094,7 @@ class no {
|
|
|
4105
4094
|
"%cstorage%c %cslide",
|
|
4106
4095
|
V,
|
|
4107
4096
|
q,
|
|
4108
|
-
|
|
4097
|
+
Xi,
|
|
4109
4098
|
o.slide,
|
|
4110
4099
|
"version",
|
|
4111
4100
|
Ri
|
|
@@ -4115,31 +4104,31 @@ class no {
|
|
|
4115
4104
|
"%capi%c %cbroadcast",
|
|
4116
4105
|
H,
|
|
4117
4106
|
q,
|
|
4118
|
-
|
|
4107
|
+
Gn,
|
|
4119
4108
|
"channel",
|
|
4120
4109
|
m
|
|
4121
4110
|
), this.bc.onmessage = (v) => {
|
|
4122
4111
|
this.actions(v);
|
|
4123
|
-
}, this.bc.postMessage({ event: "sm-init", data: {} }), this.api = new
|
|
4124
|
-
case
|
|
4125
|
-
this.sm = new
|
|
4112
|
+
}, this.bc.postMessage({ event: "sm-init", data: {} }), this.api = new Ni(o), o.storage) {
|
|
4113
|
+
case Xr:
|
|
4114
|
+
this.sm = new $r(o);
|
|
4126
4115
|
break;
|
|
4127
|
-
case
|
|
4128
|
-
this.sm = new
|
|
4116
|
+
case Hr:
|
|
4117
|
+
this.sm = new Ur(o);
|
|
4129
4118
|
break;
|
|
4130
|
-
case
|
|
4131
|
-
this.sm = new
|
|
4119
|
+
case Qr:
|
|
4120
|
+
this.sm = new Wr(o);
|
|
4132
4121
|
break;
|
|
4133
|
-
case
|
|
4134
|
-
this.sm = new
|
|
4122
|
+
case Yr:
|
|
4123
|
+
this.sm = new Lr(o);
|
|
4135
4124
|
break;
|
|
4136
|
-
case
|
|
4137
|
-
this.sm = new
|
|
4125
|
+
case Jr:
|
|
4126
|
+
this.sm = new Vr(o);
|
|
4138
4127
|
break;
|
|
4139
4128
|
}
|
|
4140
4129
|
}
|
|
4141
4130
|
}
|
|
4142
|
-
class
|
|
4131
|
+
class qi {
|
|
4143
4132
|
constructor(o) {
|
|
4144
4133
|
j(this, "sm");
|
|
4145
4134
|
/**
|
|
@@ -4151,7 +4140,7 @@ class ro {
|
|
|
4151
4140
|
var m;
|
|
4152
4141
|
return o.type !== de ? (console.warn(
|
|
4153
4142
|
"%capp%c %get",
|
|
4154
|
-
|
|
4143
|
+
Hn,
|
|
4155
4144
|
q,
|
|
4156
4145
|
_t,
|
|
4157
4146
|
o.widget,
|
|
@@ -4172,7 +4161,7 @@ class ro {
|
|
|
4172
4161
|
var m;
|
|
4173
4162
|
return o.type !== ie ? (console.warn(
|
|
4174
4163
|
"%capp%c %get",
|
|
4175
|
-
|
|
4164
|
+
Hn,
|
|
4176
4165
|
q,
|
|
4177
4166
|
_t,
|
|
4178
4167
|
o.widget,
|
|
@@ -4193,7 +4182,7 @@ class ro {
|
|
|
4193
4182
|
var m;
|
|
4194
4183
|
return o.type !== he ? (console.warn(
|
|
4195
4184
|
"%capp%c %get",
|
|
4196
|
-
|
|
4185
|
+
Hn,
|
|
4197
4186
|
q,
|
|
4198
4187
|
_t,
|
|
4199
4188
|
o.widget,
|
|
@@ -4206,53 +4195,53 @@ class ro {
|
|
|
4206
4195
|
}) : await ((m = this.sm) == null ? void 0 : m.getMessages(o));
|
|
4207
4196
|
});
|
|
4208
4197
|
switch (this.sm = null, o.storage) {
|
|
4209
|
-
case
|
|
4210
|
-
this.sm = new
|
|
4198
|
+
case Xr:
|
|
4199
|
+
this.sm = new $r(o);
|
|
4211
4200
|
break;
|
|
4212
|
-
case
|
|
4213
|
-
this.sm = new
|
|
4201
|
+
case Hr:
|
|
4202
|
+
this.sm = new Ur(o);
|
|
4214
4203
|
break;
|
|
4215
|
-
case
|
|
4216
|
-
this.sm = new
|
|
4204
|
+
case Qr:
|
|
4205
|
+
this.sm = new Wr(o);
|
|
4217
4206
|
break;
|
|
4218
|
-
case
|
|
4219
|
-
this.sm = new
|
|
4207
|
+
case Yr:
|
|
4208
|
+
this.sm = new Lr(o);
|
|
4220
4209
|
break;
|
|
4221
|
-
case
|
|
4222
|
-
this.sm = new
|
|
4210
|
+
case Jr:
|
|
4211
|
+
this.sm = new Vr(o);
|
|
4223
4212
|
break;
|
|
4224
4213
|
}
|
|
4225
4214
|
}
|
|
4226
4215
|
}
|
|
4216
|
+
const ie = "messages", de = "cloud", he = "series", Vi = "topics", xt = "widget", Gi = "widgets", eo = "subscribe", Yr = "keyval", Hr = "local", Qr = "session", Xr = "dexie", Jr = "window", ce = "padding:0 4px 0 4px;border-radius:5px;", V = `color:black;background-color:cyan;${ce}`, Gn = `color:white;background-color:orange;${ce}`, H = `color:white;background-color:grey;${ce}`, _t = `color:black;background-color:lime;${ce}`, Yn = `color:grey;border:1px solid grey;${ce}`, q = "color:transparent;background-color:transparent;", Yi = `color:grey;background-color:mistyrose;${ce}`, Hi = `color:grey;background-color:tan;${ce}`, Qi = `color:grey;background-color:thistle;${ce}`, to = `color:white;background-color:red;${ce}`, Hn = `color:white;background-color:navy;${ce}`, no = `color:white;background-color:green;${ce}`, St = `color:white;background-color:dodgerblue;${ce}`, Xi = `color:black;background-color:yellow;${ce}`, ro = `color:white;background-color:darkred;${ce}`;
|
|
4227
4217
|
export {
|
|
4228
4218
|
H as API_CSS,
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4219
|
+
Hn as APP_CSS,
|
|
4220
|
+
Gn as BROADCAST_CSS,
|
|
4221
|
+
Zi as BuzzcastingStorageManager,
|
|
4222
|
+
qi as BuzzcastingStorageReader,
|
|
4233
4223
|
de as CLOUD,
|
|
4234
|
-
|
|
4224
|
+
Yi as CLOUD_CSS,
|
|
4235
4225
|
_t as GET_DATA,
|
|
4236
|
-
|
|
4226
|
+
to as HIDE_CSS,
|
|
4237
4227
|
ie as MESSAGES,
|
|
4238
|
-
|
|
4228
|
+
Hi as MESSAGES_CSS,
|
|
4239
4229
|
q as NONE,
|
|
4240
|
-
|
|
4241
|
-
|
|
4230
|
+
Yn as NO_UPDATES,
|
|
4231
|
+
ro as PRESENTATION_CSS,
|
|
4242
4232
|
he as SERIES,
|
|
4243
|
-
|
|
4244
|
-
|
|
4233
|
+
Qi as SERIES_CSS,
|
|
4234
|
+
Xi as SLIDE_CSS,
|
|
4245
4235
|
V as STORAGE_CSS,
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
Hn as sum
|
|
4236
|
+
Xr as STORAGE_DEXIE,
|
|
4237
|
+
Yr as STORAGE_KEYVAL,
|
|
4238
|
+
Hr as STORAGE_LOCAL,
|
|
4239
|
+
Qr as STORAGE_SESSION,
|
|
4240
|
+
Jr as STORAGE_WINDOW,
|
|
4241
|
+
eo as SUBSCRIBE,
|
|
4242
|
+
St as SUBSCRIBE_CSS,
|
|
4243
|
+
Vi as TOPICS,
|
|
4244
|
+
xt as WIDGET,
|
|
4245
|
+
Gi as WIDGETS,
|
|
4246
|
+
no as WS_CSS
|
|
4258
4247
|
};
|