buzzcasting-utils 1.10.0 → 1.11.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.
@@ -202,6 +202,7 @@ export declare enum EVENTS {
202
202
  SLIDE_UPDATED = "slideUpdated",
203
203
  START_TRANSITIONER = "startTransitioner",
204
204
  STORAGE_INIT = "storageInit",
205
+ STREAM = "stream",
205
206
  SUBSCRIBE = "subscribe",
206
207
  SUSPEND_ACCOUNT = "suspendAccount",
207
208
  SWITCH_PRESENTATION = "switchPresentation",
@@ -224,7 +225,7 @@ export declare function filterAttributes(attributes: NamedNodeMap): IFilteredAtt
224
225
 
225
226
  export declare const flatten: (obj: any, res?: {}, parentKey?: string) => {};
226
227
 
227
- export declare function formatContent(message: IMessage, titleCss?: string): string;
228
+ export declare function formatContent(message: IMessage, headingCss?: string): string;
228
229
 
229
230
  export declare interface GeoCountries {
230
231
  type: string;
@@ -507,6 +508,7 @@ export declare interface ICssCard {
507
508
  dynamics?: string;
508
509
  globe?: string;
509
510
  handle?: string;
511
+ heading?: string;
510
512
  host?: string;
511
513
  image?: string;
512
514
  kpi?: string;
@@ -562,6 +564,7 @@ export declare interface ICssSeries {
562
564
  down: string;
563
565
  host: string;
564
566
  label: string;
567
+ table: string;
565
568
  title: string;
566
569
  up: string;
567
570
  widget: string;
@@ -1,4 +1,4 @@
1
- var D = /* @__PURE__ */ ((e) => (e.CARDS = "cards", 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))(D || {}), g = /* @__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:black;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))(g || {}), I = /* @__PURE__ */ ((e) => (e.ADD_SLIDE = "addSlide", e.APP_READY = "appReady", e.API_UPDATE = "apiUpdate", e.BACKGROUND_UPDATE = "backgroundUpdate", e.BUILDER_PREVIEW = "builderPreview", e.COMPONENT_UPDATE = "componentUpdate", 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.COLOR_UPDATE = "colorUpdate", e.COMPONENT_INDEX = "componentIndex", e.CSS_SET = "setCss", e.CSS_STORE = "storeCss", e.DASHBOARD_LOAD = "loadDashboard", e.DASHBOARD_STORE = "storeDashboard", e.DASHBOARD_UPDATED = "dashboardUpdated", e.ERROR = "error", e.HIDE_MESSAGE = "hideMessage", e.HIDE_LABELS = "hideLabels", e.IMAGE_GET = "getImage", e.IMAGE_SET = "setImage", e.IMAGE_STORED = "imageStored", e.LAUPPUT_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.PREFERENCE_UPDATED = "preferenceUpdated", e.PAUSE_PRESENTATION = "pausePresentation", e.PRESENTATION_READY = "presentationReady", e.PRESENTATION_LOAD = "loadPresentation", e.PRESENTATION_STORE = "storePresentation", e.PRESENTATION_UPDATED = "presentationUpdated", e.ROW_COL_UPDATE = "rowcolupdate", e.SCREENSHOT_TAKE = "takeScreenshot", e.SCREENSHOT_STORE = "storeScreenshot", e.SECTION_UPDATE = "sectionUpdate", 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_SAVED = "slideSaved", e.SLIDE_SET = "setSlide", e.SLIDE_STORE = "storeSlide", e.SLIDE_STORED = "slideStored", e.SLIDE_TRANSITIONER = "slideTransitioner", e.SLIDE_UPDATED = "slideUpdated", 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.UPLOAD_COMPLETED = "uploadCompleted", e.VERSION = "version", e.WIDGETS_CLEAR = "widgetsClear", e.WIDGET_DID_LOAD = "widgetDidLoad", e.WIDGET_DID_UPDATE = "widgetDidUpdate", e.WIDGET_LOAD = "widgetLoad", e.WIDGET_STORE = "widgetStore", e.WIDGET_UPDATE = "widgetUpdate", e.WS_API_REQUEST = "wsApiRequest", e.WS_API_RESPONSE = "wsApiResponse", e.WS_API_UPDATE = "wsApiRUpdate", e))(I || {}), A = /* @__PURE__ */ ((e) => (e.APPROVED = "approved", e.BEFORE = "before", e.DELAYED = "delayed", e.NONE = "none", e.REALTIME = "realtime", e))(A || {}), v = /* @__PURE__ */ ((e) => (e.KEYVAL = "keyval", e.LOCAL = "local", e.SESSION = "session", e.DEXIE = "dexie", e.WINDOW = "window", e))(v || {});
1
+ var D = /* @__PURE__ */ ((e) => (e.CARDS = "cards", 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))(D || {}), g = /* @__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:black;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))(g || {}), L = /* @__PURE__ */ ((e) => (e.ADD_SLIDE = "addSlide", e.APP_READY = "appReady", e.API_UPDATE = "apiUpdate", e.BACKGROUND_UPDATE = "backgroundUpdate", e.BUILDER_PREVIEW = "builderPreview", e.COMPONENT_UPDATE = "componentUpdate", 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.COLOR_UPDATE = "colorUpdate", e.COMPONENT_INDEX = "componentIndex", e.CSS_SET = "setCss", e.CSS_STORE = "storeCss", e.DASHBOARD_LOAD = "loadDashboard", e.DASHBOARD_STORE = "storeDashboard", e.DASHBOARD_UPDATED = "dashboardUpdated", e.ERROR = "error", e.HIDE_MESSAGE = "hideMessage", e.HIDE_LABELS = "hideLabels", e.IMAGE_GET = "getImage", e.IMAGE_SET = "setImage", e.IMAGE_STORED = "imageStored", e.LAUPPUT_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.PREFERENCE_UPDATED = "preferenceUpdated", e.PAUSE_PRESENTATION = "pausePresentation", e.PRESENTATION_READY = "presentationReady", e.PRESENTATION_LOAD = "loadPresentation", e.PRESENTATION_STORE = "storePresentation", e.PRESENTATION_UPDATED = "presentationUpdated", e.ROW_COL_UPDATE = "rowcolupdate", e.SCREENSHOT_TAKE = "takeScreenshot", e.SCREENSHOT_STORE = "storeScreenshot", e.SECTION_UPDATE = "sectionUpdate", 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_SAVED = "slideSaved", e.SLIDE_SET = "setSlide", e.SLIDE_STORE = "storeSlide", e.SLIDE_STORED = "slideStored", e.SLIDE_TRANSITIONER = "slideTransitioner", e.SLIDE_UPDATED = "slideUpdated", e.START_TRANSITIONER = "startTransitioner", e.STORAGE_INIT = "storageInit", e.STREAM = "stream", e.SUBSCRIBE = "subscribe", e.SUSPEND_ACCOUNT = "suspendAccount", e.SWITCH_PRESENTATION = "switchPresentation", e.REMOVE_CLOUD = "removeCloud", e.UPDATE = "update", e.UPLOAD_COMPLETED = "uploadCompleted", e.VERSION = "version", e.WIDGETS_CLEAR = "widgetsClear", e.WIDGET_DID_LOAD = "widgetDidLoad", e.WIDGET_DID_UPDATE = "widgetDidUpdate", e.WIDGET_LOAD = "widgetLoad", e.WIDGET_STORE = "widgetStore", e.WIDGET_UPDATE = "widgetUpdate", e.WS_API_REQUEST = "wsApiRequest", e.WS_API_RESPONSE = "wsApiResponse", e.WS_API_UPDATE = "wsApiRUpdate", e))(L || {}), A = /* @__PURE__ */ ((e) => (e.APPROVED = "approved", e.BEFORE = "before", e.DELAYED = "delayed", e.NONE = "none", e.REALTIME = "realtime", e))(A || {}), I = /* @__PURE__ */ ((e) => (e.KEYVAL = "keyval", e.LOCAL = "local", e.SESSION = "session", e.DEXIE = "dexie", e.WINDOW = "window", e))(I || {});
2
2
  function q(e) {
3
3
  const t = e.toUpperCase().split(/[\s_-]+/);
4
4
  return t.length > 0 ? (t.forEach((r, n) => {
@@ -39,7 +39,7 @@ function te(e) {
39
39
  const t = {};
40
40
  for (let r = 0; r < e.length; r++) {
41
41
  const n = e[r];
42
- n.name !== "class" && (t[n.name] = E(n.value));
42
+ n.name !== "class" && (t[n.name] = y(n.value));
43
43
  }
44
44
  return t;
45
45
  }
@@ -98,7 +98,7 @@ function ne(e, t) {
98
98
  function oe(e) {
99
99
  return e.replace(/^\w|[A-Z]|\b\w/g, (t, r) => r === 0 ? t.toLowerCase() : t.toUpperCase()).replace(/\s+/g, "");
100
100
  }
101
- function E(e) {
101
+ function y(e) {
102
102
  return e.toLowerCase().split("-").reduce((t, r) => t + (r.charAt(0).toUpperCase() + r.slice(1)));
103
103
  }
104
104
  const ae = (e) => e.replace(/([A-Z])/g, "-$1").toLowerCase(), ie = (e) => e.charAt(0).toUpperCase() + e.slice(1);
@@ -120,12 +120,12 @@ const le = () => Math.floor(Math.random() * 16777215).toString(16), ce = () => {
120
120
  let r = e.split(",");
121
121
  return r = r.map((n) => parseFloat(n.trim()).toString()), e = "background-color: rgba(" + parseInt(r[0]) + "," + parseInt(r[1]) + "," + parseInt(r[2]) + "," + t + ");", e;
122
122
  };
123
- function y(e) {
123
+ function E(e) {
124
124
  e.reduce(
125
125
  (t, r) => Object.keys(r).reduce(
126
126
  (n, o) => ({
127
127
  ...n,
128
- [o]: o in t && typeof t[o] == "object" && t[o] !== null && typeof r[o] == "object" && r[o] !== null ? y([t[o], r[o]]) : r[o]
128
+ [o]: o in t && typeof t[o] == "object" && t[o] !== null && typeof r[o] == "object" && r[o] !== null ? E([t[o], r[o]]) : r[o]
129
129
  }),
130
130
  t
131
131
  ),
@@ -134,7 +134,7 @@ function y(e) {
134
134
  }
135
135
  const fe = (e) => [...new Set(e)], ge = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
136
136
  function be(e, t = "font-bold") {
137
- return `${e?.title !== null ? `<div class="${t}">${e.title}</div>` : ""}${e?.content ? e.content.replace(/\n\n/g, `
137
+ return `${e?.title !== null ? `<div title="heading" class="${t}">${e.title}</div>` : ""}${e?.content ? e.content.replace(/\n\n/g, `
138
138
  `).replace(/\n/g, "<br/>") : ""}`;
139
139
  }
140
140
  const M = (e, t = {}, r = "") => {
@@ -165,10 +165,10 @@ function p(e, t) {
165
165
  function $(e, t, r) {
166
166
  return Object.keys(t).sort().reduce(n, e);
167
167
  function n(o, a) {
168
- return L(o, t[a], a, r);
168
+ return v(o, t[a], a, r);
169
169
  }
170
170
  }
171
- function L(e, t, r, n) {
171
+ function v(e, t, r, n) {
172
172
  const o = p(p(p(e, r), C(t)), typeof t);
173
173
  if (t === null)
174
174
  return p(o, "null");
@@ -193,7 +193,7 @@ function C(e) {
193
193
  return Object.prototype.toString.call(e);
194
194
  }
195
195
  function he(e) {
196
- return k(L(0, e, "", []).toString(16), 8);
196
+ return k(v(0, e, "", []).toString(16), 8);
197
197
  }
198
198
  const De = (e) => {
199
199
  let t = "";
@@ -218,10 +218,10 @@ const De = (e) => {
218
218
  const r = b("html,head,body,title"), n = { link: "head", base: "head" };
219
219
  t ? t = t.ownerDocument || t.getOwnerDocument && t.getOwnerDocument() || t : typeof t < "u" ? t = new Document() : typeof document < "u" && document.implementation && document.implementation.createDocument && (t = document.implementation.createDocument("", "", null));
220
220
  const o = [];
221
- if (!(t.documentElement || t.getDocumentElement && t.getDocumentElement()) && t.createElement && function() {
221
+ if (!(t.documentElement || t.getDocumentElement && t.getDocumentElement()) && t.createElement && (function() {
222
222
  const i = t.createElement("html"), u = t.createElement("head");
223
223
  u.appendChild(t.createElement("title")), i.appendChild(u), i.appendChild(t.createElement("body")), t.appendChild(i);
224
- }(), t.getElementsByTagName)
224
+ })(), t.getElementsByTagName)
225
225
  for (let i in r) r[i] = t.getElementsByTagName(i)[0];
226
226
  let l = r.body;
227
227
  return O(e, {
@@ -250,9 +250,9 @@ const De = (e) => {
250
250
  return t;
251
251
  }, R = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, P = /^<\/([-A-Za-z0-9_]+)[^>]*>/, U = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, S = b(
252
252
  "area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"
253
- ), B = b(
254
- "a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"
255
253
  ), G = b(
254
+ "a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"
255
+ ), B = b(
256
256
  "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"
257
257
  ), T = b("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), H = b(
258
258
  "checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"
@@ -293,8 +293,8 @@ const De = (e) => {
293
293
  }
294
294
  i();
295
295
  function u(c, s, d, f) {
296
- if (s = s.toLowerCase(), B[s])
297
- for (; a.at(-1) && G[a.at(-1)]; )
296
+ if (s = s.toLowerCase(), G[s])
297
+ for (; a.at(-1) && B[a.at(-1)]; )
298
298
  i("", a.at(-1));
299
299
  if (T[s] && a.at(-1) == s && i("", s), f = S[s] || !!f, f || a.push(s), t.start) {
300
300
  const _ = [];
@@ -313,11 +313,11 @@ const De = (e) => {
313
313
  function F(e) {
314
314
  return `"${e}"`;
315
315
  }
316
- function K(e) {
316
+ function Y(e) {
317
317
  return e.replace(/<\?xml.*\?>\n/, "").replace(/<!doctype.*\>\n/, "").replace(/<!DOCTYPE.*\>\n/, "");
318
318
  }
319
319
  const xe = (e) => {
320
- e = K(e);
320
+ e = Y(e);
321
321
  const t = [], r = {
322
322
  node: "root",
323
323
  child: []
@@ -368,7 +368,7 @@ const xe = (e) => {
368
368
  a.child === void 0 && (a.child = []), a.child.push(o);
369
369
  }
370
370
  }), r;
371
- }, Y = (e) => {
371
+ }, Z = (e) => {
372
372
  const t = [
373
373
  "area",
374
374
  "base",
@@ -387,7 +387,7 @@ const xe = (e) => {
387
387
  ];
388
388
  let r = "";
389
389
  e.child && (r = e.child.map(function(o) {
390
- return Y(o);
390
+ return Z(o);
391
391
  }).join(""));
392
392
  let n = "";
393
393
  if (e.attr && (n = Object.keys(e.attr).map(function(o) {
@@ -420,12 +420,14 @@ const xe = (e) => {
420
420
  return (Math.round(e * 100) / 100).toFixed(t);
421
421
  e = e.toString().replace(/[^0-9.]/g, "");
422
422
  let o = [
423
- { v: 1e3, s: "K" },
423
+ { v: 1e3, s: "k" },
424
424
  { v: 1e6, s: "M" },
425
- { v: 1e9, s: "B" },
425
+ { v: 1e9, s: "G" },
426
426
  { v: 1e12, s: "T" },
427
427
  { v: 1e15, s: "P" },
428
- { v: 1e18, s: "E" }
428
+ { v: 1e18, s: "E" },
429
+ { v: 1e21, s: "Z" },
430
+ { v: 1e24, s: "Y" }
429
431
  ], a;
430
432
  for (a = o.length - 1; a > 0 && !(e >= o[a].v); a--)
431
433
  ;
@@ -440,20 +442,22 @@ const xe = (e) => {
440
442
  action: "list",
441
443
  message: ["%capp%c %clogging", g.APP, g.NONE, g.OK]
442
444
  })
443
- }, Le = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""), Ie = (e) => e.replace(/\>\</g, `>
444
- <`), ve = (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, "!"), Ee = (e) => e.replace(/\,/g, ", ").replace(/\{/g, ` {
445
+ }, ve = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""), Le = (e) => e.replace(/\>\</g, `>
446
+ <`), Ie = (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, "!"), ye = (e) => e.replace(/\,/g, ", ").replace(/\{/g, ` {
445
447
  `).replace(/\}/g, `}
446
448
  `).replace(/\;/g, `;
447
449
  `);
448
- function ye(e, t) {
450
+ function Ee(e, t) {
449
451
  const r = [
450
452
  { value: 1, symbol: "" },
451
- { value: 1e3, symbol: "K" },
453
+ { value: 1e3, symbol: "k" },
452
454
  { value: 1e6, symbol: "M" },
453
- { value: 1e9, symbol: "MM" },
455
+ { value: 1e9, symbol: "G" },
454
456
  { value: 1e12, symbol: "T" },
455
457
  { value: 1e15, symbol: "P" },
456
- { value: 1e18, symbol: "E" }
458
+ { value: 1e18, symbol: "E" },
459
+ { value: 1e21, symbol: "Z" },
460
+ { value: 1e24, symbol: "Y" }
457
461
  ], n = /\.0+$|(\.\d*[1-9])0+$/;
458
462
  let o;
459
463
  for (o = r.length - 1; o > 0 && !(e >= r[o].value); o--)
@@ -472,15 +476,10 @@ function $e(e) {
472
476
  return e[Math.floor(Math.random() * e.length)];
473
477
  }
474
478
  function Ce(e) {
475
- switch (e.language) {
476
- case "ar":
477
- return {
478
- direction: "rtl",
479
- textAlign: "right"
480
- };
481
- default:
482
- return {};
483
- }
479
+ return e.language === "ar" ? {
480
+ direction: "rtl",
481
+ textAlign: "right"
482
+ } : {};
484
483
  }
485
484
  function Ue(e) {
486
485
  const t = e.filter(
@@ -530,7 +529,7 @@ function Se(e, t, r, n) {
530
529
  props: { data: r, options: n }
531
530
  });
532
531
  }
533
- function Be(e) {
532
+ function Ge(e) {
534
533
  const t = [...e];
535
534
  for (let r = t.length - 1; r > 0; r--) {
536
535
  const n = Math.floor(Math.random() * (r + 1));
@@ -538,7 +537,7 @@ function Be(e) {
538
537
  }
539
538
  return t;
540
539
  }
541
- function Ge() {
540
+ function Be() {
542
541
  let e = "";
543
542
  const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
544
543
  for (let r = 0; r < 7; r++) e += t.charAt(Math.floor(Math.random() * t.length));
@@ -555,12 +554,12 @@ const Te = (e) => {
555
554
  default:
556
555
  return g.NO_UPDATES;
557
556
  }
558
- }, Z = (e = 6) => Math.random().toString(36).substring(2, e + 2), X = (e, t = []) => !t.find(function(n) {
557
+ }, K = (e = 6) => Math.random().toString(36).substring(2, e + 2), X = (e, t = []) => !t.find(function(n) {
559
558
  return n === e;
560
559
  }), He = (e, t = []) => {
561
560
  let n = 0, o = "";
562
561
  for (; o == "" && n < 100; )
563
- o = Z(e), X(o, t) || (o = "", n++);
562
+ o = K(e), X(o, t) || (o = "", n++);
564
563
  return o;
565
564
  }, We = (e) => {
566
565
  switch (!0) {
@@ -572,18 +571,18 @@ const Te = (e) => {
572
571
  return "text-white text-xs";
573
572
  }
574
573
  }, Fe = (e, t, r) => Promise.race([e, Q(t, r)]), Q = (e, t) => new Promise((r, n) => setTimeout(() => t === void 0 ? r("ok") : n(t), e));
575
- function Ke(e) {
574
+ function Ye(e) {
576
575
  let t = `${e.type}.${e.topics}`;
577
576
  return e.order && (t += `.${e.order}`), e.period && (t += `.${e.period}`), t;
578
577
  }
579
- function Ye(e) {
578
+ function Ze(e) {
580
579
  if (e.widget === void 0) {
581
580
  const t = e.topics?.split("-");
582
581
  t && t.length > 1 ? (e.dashboard = t ? t[0] : "", e.widget = t ? t[1] : "") : (e.widget = e.topics, e.dashboard = e.slide);
583
582
  }
584
583
  return e;
585
584
  }
586
- function Ze(e, t) {
585
+ function Ke(e, t) {
587
586
  let r, n, o, a, l;
588
587
  switch (e.moderation) {
589
588
  case A.BEFORE:
@@ -604,33 +603,33 @@ var J = /* @__PURE__ */ ((e) => (e.MultiPolygon = "MultiPolygon", e.Polygon = "P
604
603
  export {
605
604
  D as API,
606
605
  g as CSS,
607
- I as EVENTS,
606
+ L as EVENTS,
608
607
  J as GeoType,
609
608
  O as HTMLParser,
610
609
  Ae as HTMLtoDOM,
611
610
  De as HTMLtoXML,
612
611
  A as MODERATION,
613
612
  pe as RGBAchangeA,
614
- v as STORAGE,
613
+ I as STORAGE,
615
614
  j as ShapeType,
616
615
  q as anonymize,
617
616
  N as attachedMedia,
618
617
  V as attrs,
619
618
  re as awaitElement,
620
619
  ne as brandLogo,
621
- E as camelCase,
620
+ y as camelCase,
622
621
  te as camelCasedProps,
623
622
  ae as camelToHyphen,
624
623
  oe as camelize,
625
624
  ie as capitalizeFirstLetter,
626
625
  se as clearContents,
627
- y as deepMerge,
626
+ E as deepMerge,
628
627
  ge as escape,
629
628
  ee as filterAttributes,
630
629
  M as flatten,
631
630
  be as formatContent,
632
631
  me as getGuid,
633
- Ke as getKey,
632
+ Ye as getKey,
634
633
  Me as getParameterByName,
635
634
  ke as getQueryParam,
636
635
  Oe as hasHWA,
@@ -638,15 +637,15 @@ export {
638
637
  xe as html2json,
639
638
  _e as intToString,
640
639
  we as isEmpty,
641
- Y as json2html,
640
+ Z as json2html,
642
641
  Re as log,
643
642
  Pe as logging,
644
- Ee as maxifyCss,
645
- Ie as maxifyHtml,
646
- ve as minifyCss,
647
- Le as minifyHtml,
648
- Ze as moderation,
649
- ye as numberFormatter,
643
+ ye as maxifyCss,
644
+ Le as maxifyHtml,
645
+ Ie as minifyCss,
646
+ ve as minifyHtml,
647
+ Ke as moderation,
648
+ Ee as numberFormatter,
650
649
  le as randomColor,
651
650
  ue as randomRGB,
652
651
  de as randomRGBA,
@@ -655,12 +654,12 @@ export {
655
654
  Ce as rtl,
656
655
  Ue as sanitize,
657
656
  Se as showModal,
658
- Be as shuffleMessages,
659
- Ge as stringGen,
657
+ Ge as shuffleMessages,
658
+ Be as stringGen,
660
659
  Te as typeCss,
661
660
  He as uniq,
662
661
  fe as unique,
663
662
  We as upDownColor,
664
- Ye as widgetParams,
663
+ Ze as widgetParams,
665
664
  Fe as wrapPromise
666
665
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-utils",
3
3
  "type": "module",
4
- "version": "1.10.0",
4
+ "version": "1.11.0",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",
@@ -31,19 +31,19 @@
31
31
  },
32
32
  "dependencies": {},
33
33
  "devDependencies": {
34
- "@antfu/eslint-config": "^6.0.0",
35
- "@commitlint/cli": "^20.1.0",
36
- "@commitlint/config-conventional": "^20.0.0",
37
- "@types/node": "^22.18.12",
38
- "@typescript-eslint/eslint-plugin": "^8.46.2",
39
- "@typescript-eslint/parser": "^8.46.2",
34
+ "@antfu/eslint-config": "^6.7.3",
35
+ "@commitlint/cli": "^20.3.0",
36
+ "@commitlint/config-conventional": "^20.3.0",
37
+ "@types/node": "^24.10.4",
38
+ "@typescript-eslint/eslint-plugin": "^8.51.0",
39
+ "@typescript-eslint/parser": "^8.51.0",
40
40
  "@vitest/coverage-v8": "^4.0.1",
41
- "camelcase": "^8.0.0",
41
+ "camelcase": "^9.0.0",
42
42
  "changelogen": "^0.6.2",
43
- "eslint": "^9.38.0",
44
- "lint-staged": "^16.2.6",
43
+ "eslint": "^9.39.2",
44
+ "lint-staged": "^16.2.7",
45
45
  "typescript": "^5.9.3",
46
- "vite": "^7.1.11",
46
+ "vite": "^7.3.0",
47
47
  "vite-plugin-dts": "^4.5.4",
48
48
  "vitest": "^4.0.1"
49
49
  },