buzzcasting-utils 1.4.0 → 1.5.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-utils.d.ts +16 -1
- package/dist/buzzcasting-utils.esm.js +22 -22
- package/package.json +1 -1
|
@@ -175,9 +175,11 @@ export declare enum EVENTS {
|
|
|
175
175
|
SHOW_BUILDER_MODAL = "showBuilderModal",
|
|
176
176
|
SHOW_MODAL = "showModal",
|
|
177
177
|
SLIDE_DID_LOAD = "slideDidLoad",
|
|
178
|
+
SLIDE_GET = "getSlide",
|
|
178
179
|
SLIDE_GOTO = "slideGoto",
|
|
179
|
-
SLIDE_READY = "slideReady",
|
|
180
180
|
SLIDE_LOAD = "loadSlide",
|
|
181
|
+
SLIDE_READY = "slideReady",
|
|
182
|
+
SLIDE_SET = "setSlide",
|
|
181
183
|
SLIDE_STORE = "storeSlide",
|
|
182
184
|
SLIDE_TRANSITIONER = "slideTransitioner",
|
|
183
185
|
START_TRANSITIONER = "startTransitioner",
|
|
@@ -651,6 +653,19 @@ export declare interface IGeo {
|
|
|
651
653
|
country: string;
|
|
652
654
|
}
|
|
653
655
|
|
|
656
|
+
export declare interface IImage {
|
|
657
|
+
basename: string;
|
|
658
|
+
name: string;
|
|
659
|
+
extension: "png" | "webp" | "gif" | "jpg" | "jpeg";
|
|
660
|
+
size: number;
|
|
661
|
+
type: "image/png" | "image/webp" | "image/gif" | "image/jpg" | "image/jpeg";
|
|
662
|
+
url: URL;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export declare interface IImages {
|
|
666
|
+
images: IImage[];
|
|
667
|
+
}
|
|
668
|
+
|
|
654
669
|
export declare interface IIndicators {
|
|
655
670
|
value: number;
|
|
656
671
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var m = /* @__PURE__ */ ((e) => (e.CLOUD = "cloud", e.DASHBOARD = "dashboard", e.DASHBOARDS = "dashboards", e.IMAGES = "images", e.MESSAGES = "messages", e.PREFERENCE = "preference", e.PREFERENCES = "preferences", e.PRESENTATION = "presentation", e.PRESENTATIONS = "presentations", e.SERIES = "series", e.SLIDE = "slide", e.SLIDES = "slides", e.TOPICS = "topics", e.WIDGET = "widget", e.WIDGETS = "widgets", e))(m || {}), h = /* @__PURE__ */ ((e) => (e.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", e.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", e.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", e.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", e.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", e.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", e.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", e.NONE = "color:transparent;background-color:transparent;", e.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", e.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", e.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", e.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", e.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", e.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", e.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", e))(h || {}), E = /* @__PURE__ */ ((e) => (e.ADD_SLIDE = "addSlide", e.APP_READY = "appReady", e.API_UPDATE = "apiUpdate", e.WS_API_REQUEST = "wsApiRequest", e.WS_API_RESPONSE = "wsApiResponse", e.WS_API_UPDATE = "wsApiRUpdate", e.APPROVE_MESSAGE = "approveMessage", e.CHANNEL = "channel", e.CLEAN_MESSAGES = "cleanMessages", e.CLOSE_BUILDER_DIALOG = "closeBuilderDialog", e.CLOSE_BUILDER_MODAL = "closeBuilderModal", e.CLOSE_MODAL = "closeModal", e.CSS_SET = "setCss", e.CSS_STORE = "storeCss", e.DASHBOARD_LOAD = "loadDashboard", e.DASHBOARD_STORE = "storeDashboard", e.ERROR = "error", e.HIDE_MESSAGE = "hideMessage", e.HIDE_LABELS = "hideLabels", e.MAUPPUT_UPDATE = "layoutUpdate", e.PREV_SLIDE = "prevSlide", e.RELOAD_PRESENTATION = "reloadPresentation", e.STAR_MESSAGE = "starMessage", e.GOTO_SLIDE = "gotoSlide", e.NEXT_SLIDE = "nextSlide", e.PREFERENCE_LOAD = "loadPreference", e.PREFERENCE_STORE = "storePreference", e.PAUSE_PRESENTATION = "pausePresentation", e.PRESENTATION_READY = "presentationReady", e.PRESENTATION_LOAD = "loadPresentation", e.PRESENTATION_STORE = "storePresentation", e.SHOW_BUILDER_DIALOG = "showBuilderDialog", e.SHOW_BUILDER_MODAL = "showBuilderModal", e.SHOW_MODAL = "showModal", e.SLIDE_DID_LOAD = "slideDidLoad", e.SLIDE_GOTO = "slideGoto", e.SLIDE_READY = "slideReady", e.
|
|
1
|
+
var m = /* @__PURE__ */ ((e) => (e.CLOUD = "cloud", e.DASHBOARD = "dashboard", e.DASHBOARDS = "dashboards", e.IMAGES = "images", e.MESSAGES = "messages", e.PREFERENCE = "preference", e.PREFERENCES = "preferences", e.PRESENTATION = "presentation", e.PRESENTATIONS = "presentations", e.SERIES = "series", e.SLIDE = "slide", e.SLIDES = "slides", e.TOPICS = "topics", e.WIDGET = "widget", e.WIDGETS = "widgets", e))(m || {}), h = /* @__PURE__ */ ((e) => (e.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", e.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", e.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", e.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", e.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", e.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", e.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", e.NONE = "color:transparent;background-color:transparent;", e.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", e.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", e.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", e.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", e.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", e.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", e.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", e))(h || {}), E = /* @__PURE__ */ ((e) => (e.ADD_SLIDE = "addSlide", e.APP_READY = "appReady", e.API_UPDATE = "apiUpdate", e.WS_API_REQUEST = "wsApiRequest", e.WS_API_RESPONSE = "wsApiResponse", e.WS_API_UPDATE = "wsApiRUpdate", e.APPROVE_MESSAGE = "approveMessage", e.CHANNEL = "channel", e.CLEAN_MESSAGES = "cleanMessages", e.CLOSE_BUILDER_DIALOG = "closeBuilderDialog", e.CLOSE_BUILDER_MODAL = "closeBuilderModal", e.CLOSE_MODAL = "closeModal", e.CSS_SET = "setCss", e.CSS_STORE = "storeCss", e.DASHBOARD_LOAD = "loadDashboard", e.DASHBOARD_STORE = "storeDashboard", e.ERROR = "error", e.HIDE_MESSAGE = "hideMessage", e.HIDE_LABELS = "hideLabels", e.MAUPPUT_UPDATE = "layoutUpdate", e.PREV_SLIDE = "prevSlide", e.RELOAD_PRESENTATION = "reloadPresentation", e.STAR_MESSAGE = "starMessage", e.GOTO_SLIDE = "gotoSlide", e.NEXT_SLIDE = "nextSlide", e.PREFERENCE_LOAD = "loadPreference", e.PREFERENCE_STORE = "storePreference", e.PAUSE_PRESENTATION = "pausePresentation", e.PRESENTATION_READY = "presentationReady", e.PRESENTATION_LOAD = "loadPresentation", e.PRESENTATION_STORE = "storePresentation", e.SHOW_BUILDER_DIALOG = "showBuilderDialog", e.SHOW_BUILDER_MODAL = "showBuilderModal", e.SHOW_MODAL = "showModal", e.SLIDE_DID_LOAD = "slideDidLoad", e.SLIDE_GET = "getSlide", e.SLIDE_GOTO = "slideGoto", e.SLIDE_LOAD = "loadSlide", e.SLIDE_READY = "slideReady", e.SLIDE_SET = "setSlide", e.SLIDE_STORE = "storeSlide", e.SLIDE_TRANSITIONER = "slideTransitioner", e.START_TRANSITIONER = "startTransitioner", e.STORAGE_INIT = "storageInit", e.SUBSCRIBE = "subscribe", e.SUSPEND_ACCOUNT = "suspendAccount", e.SWITCH_PRESENTATION = "switchPresentation", e.REMOVE_CLOUD = "removeCloud", e.UPDATE = "update", e.VERSION = "version", e.WIDGETS_CLEAR = "widgetsClear", e.WIDGET_LOAD = "widgetLoad", e.WIDGET_STORE = "widgetStore", e.WIDGET_UPDATE = "widgetUpdate", e))(E || {}), x = /* @__PURE__ */ ((e) => (e.APPROVED = "approved", e.BEFORE = "before", e.DELAYED = "delayed", e.NONE = "none", e.REALTIME = "realtime", e))(x || {}), v = /* @__PURE__ */ ((e) => (e.KEYVAL = "keyval", e.LOCAL = "local", e.SESSION = "session", e.DEXIE = "dexie", e.WINDOW = "window", e))(v || {});
|
|
2
2
|
function J(e) {
|
|
3
3
|
const t = e.toUpperCase().split(/[\s_-]+/);
|
|
4
4
|
return t.length > 0 ? (t.forEach((r, n) => {
|
|
@@ -112,12 +112,12 @@ const oe = () => Math.floor(Math.random() * 16777215).toString(16), ae = () => {
|
|
|
112
112
|
let r = e.split(",");
|
|
113
113
|
return r = r.map((n) => parseFloat(n.trim()).toString()), e = "background-color: rgba(" + parseInt(r[0]) + "," + parseInt(r[1]) + "," + parseInt(r[2]) + "," + t + ");", e;
|
|
114
114
|
};
|
|
115
|
-
function
|
|
115
|
+
function I(e) {
|
|
116
116
|
e.reduce(
|
|
117
117
|
(t, r) => Object.keys(r).reduce(
|
|
118
118
|
(n, o) => ({
|
|
119
119
|
...n,
|
|
120
|
-
[o]: o in t && typeof t[o] == "object" && t[o] !== null && typeof r[o] == "object" && r[o] !== null ?
|
|
120
|
+
[o]: o in t && typeof t[o] == "object" && t[o] !== null && typeof r[o] == "object" && r[o] !== null ? I([t[o], r[o]]) : r[o]
|
|
121
121
|
}),
|
|
122
122
|
t
|
|
123
123
|
),
|
|
@@ -135,7 +135,7 @@ const ue = () => [b(2), b(1), b(1), b(1), b(3)].join("-"), b = (e) => {
|
|
|
135
135
|
t += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
136
136
|
return t;
|
|
137
137
|
};
|
|
138
|
-
function
|
|
138
|
+
function P(e, t) {
|
|
139
139
|
for (; e.length < t; )
|
|
140
140
|
e = `0${e}`;
|
|
141
141
|
return e;
|
|
@@ -179,11 +179,11 @@ function M(e) {
|
|
|
179
179
|
return Object.prototype.toString.call(e);
|
|
180
180
|
}
|
|
181
181
|
function fe(e) {
|
|
182
|
-
return
|
|
182
|
+
return P(L(0, e, "", []).toString(16), 8);
|
|
183
183
|
}
|
|
184
184
|
const pe = (e) => {
|
|
185
185
|
let t = "";
|
|
186
|
-
return
|
|
186
|
+
return A(e, {
|
|
187
187
|
start: function(r, n, o) {
|
|
188
188
|
t += "<" + r;
|
|
189
189
|
for (let a = 0; a < n.length; a++)
|
|
@@ -210,7 +210,7 @@ const pe = (e) => {
|
|
|
210
210
|
}(), t.getElementsByTagName)
|
|
211
211
|
for (let i in r) r[i] = t.getElementsByTagName(i)[0];
|
|
212
212
|
let l = r.body;
|
|
213
|
-
return
|
|
213
|
+
return A(e, {
|
|
214
214
|
start: function(i, u, c) {
|
|
215
215
|
if (r[i]) {
|
|
216
216
|
l = r[i], c || o.push(l);
|
|
@@ -242,7 +242,7 @@ const pe = (e) => {
|
|
|
242
242
|
"abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"
|
|
243
243
|
), B = g("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), G = g(
|
|
244
244
|
"checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"
|
|
245
|
-
), T = g("script,style"),
|
|
245
|
+
), T = g("script,style"), A = (e, t) => {
|
|
246
246
|
let r, n, o, a = [], l = e;
|
|
247
247
|
const i = (c, s) => {
|
|
248
248
|
let d;
|
|
@@ -284,10 +284,10 @@ const pe = (e) => {
|
|
|
284
284
|
i("", a.at(-1));
|
|
285
285
|
if (B[s] && a.at(-1) == s && i("", s), p = S[s] || !!p, p || a.push(s), t.start) {
|
|
286
286
|
const w = [];
|
|
287
|
-
d.replace(y, function(j,
|
|
288
|
-
let O = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : G[
|
|
287
|
+
d.replace(y, function(j, D) {
|
|
288
|
+
let O = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : G[D] ? D : "";
|
|
289
289
|
w.push({
|
|
290
|
-
name:
|
|
290
|
+
name: D,
|
|
291
291
|
value: O,
|
|
292
292
|
escaped: O.replace(/(^|[^\\])"/g, '$1\\"')
|
|
293
293
|
//"
|
|
@@ -308,7 +308,7 @@ const be = (e) => {
|
|
|
308
308
|
node: "root",
|
|
309
309
|
child: []
|
|
310
310
|
};
|
|
311
|
-
return
|
|
311
|
+
return A(e, {
|
|
312
312
|
start: function(n, o, a) {
|
|
313
313
|
let l = {
|
|
314
314
|
node: "element",
|
|
@@ -424,8 +424,8 @@ const be = (e) => {
|
|
|
424
424
|
console.error(...t);
|
|
425
425
|
break;
|
|
426
426
|
}
|
|
427
|
-
}, xe = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""),
|
|
428
|
-
<`),
|
|
427
|
+
}, xe = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""), De = (e) => e.replace(/\>\</g, `>
|
|
428
|
+
<`), Ae = (e) => e.replace(/\/\*.*\*\/|\/\*[\s\S]*?\*\/|\n|\t|\v|\s{2,}/g, "").replace(/\s*\{\s*/g, "{").replace(/\s*\}\s*/g, "}").replace(/\s*\:\s*/g, ":").replace(/\s*\;\s*/g, ";").replace(/\s*\,\s*/g, ",").replace(/\s*\~\s*/g, "~").replace(/\s*\>\s*/g, ">").replace(/\s*\+\s*/g, "+").replace(/\s*\!\s*/g, "!"), we = (e) => e.replace(/\,/g, ", ").replace(/\{/g, ` {
|
|
429
429
|
`).replace(/\}/g, `}
|
|
430
430
|
`).replace(/\;/g, `;
|
|
431
431
|
`);
|
|
@@ -513,7 +513,7 @@ function ke(e, t, r, n) {
|
|
|
513
513
|
props: { data: r, options: n }
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function Ie(e) {
|
|
517
517
|
const t = [...e];
|
|
518
518
|
for (let r = t.length - 1; r > 0; r--) {
|
|
519
519
|
const n = Math.floor(Math.random() * (r + 1));
|
|
@@ -521,7 +521,7 @@ function Pe(e) {
|
|
|
521
521
|
}
|
|
522
522
|
return t;
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function Pe() {
|
|
525
525
|
let e = "";
|
|
526
526
|
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
527
527
|
for (let r = 0; r < 7; r++) e += t.charAt(Math.floor(Math.random() * t.length));
|
|
@@ -590,7 +590,7 @@ export {
|
|
|
590
590
|
m as API,
|
|
591
591
|
h as CSS,
|
|
592
592
|
E as EVENTS,
|
|
593
|
-
|
|
593
|
+
A as HTMLParser,
|
|
594
594
|
ge as HTMLtoDOM,
|
|
595
595
|
pe as HTMLtoXML,
|
|
596
596
|
x as MODERATION,
|
|
@@ -607,7 +607,7 @@ export {
|
|
|
607
607
|
te as camelize,
|
|
608
608
|
re as capitalizeFirstLetter,
|
|
609
609
|
ne as clearContents,
|
|
610
|
-
|
|
610
|
+
I as deepMerge,
|
|
611
611
|
ce as escape,
|
|
612
612
|
N as filterAttributes,
|
|
613
613
|
de as formatContent,
|
|
@@ -621,8 +621,8 @@ export {
|
|
|
621
621
|
F as json2html,
|
|
622
622
|
me as log,
|
|
623
623
|
we as maxifyCss,
|
|
624
|
-
|
|
625
|
-
|
|
624
|
+
De as maxifyHtml,
|
|
625
|
+
Ae as minifyCss,
|
|
626
626
|
xe as minifyHtml,
|
|
627
627
|
Be as moderation,
|
|
628
628
|
Oe as numberFormatter,
|
|
@@ -634,8 +634,8 @@ export {
|
|
|
634
634
|
Ee as rtl,
|
|
635
635
|
ve as sanitize,
|
|
636
636
|
ke as showModal,
|
|
637
|
-
|
|
638
|
-
|
|
637
|
+
Ie as shuffleMessages,
|
|
638
|
+
Pe as stringGen,
|
|
639
639
|
$e as typeCss,
|
|
640
640
|
Me as uniq,
|
|
641
641
|
ye as upDownColor,
|