buzzcasting-utils 1.8.5 → 1.8.7

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.
@@ -48,6 +48,8 @@ export declare function camelCasedProps(attributes: NamedNodeMap): IFilteredAttr
48
48
  */
49
49
  export declare function camelize(str: string): string;
50
50
 
51
+ export declare const camelToHyphen: (str: string) => string;
52
+
51
53
  export declare const capitalizeFirstLetter: (prop: string) => string;
52
54
 
53
55
  /**
@@ -315,7 +317,7 @@ export declare interface ICardOptions {
315
317
  animation?: IAnimation;
316
318
  brand?: IBrand;
317
319
  css?: ICss;
318
- d3?: ID3;
320
+ globe?: IGlobe;
319
321
  dateformat?: IDateFormat;
320
322
  show?: IShow;
321
323
  debug?: boolean;
@@ -523,6 +525,7 @@ export declare interface ICss {
523
525
  brand?: string;
524
526
  card?: string;
525
527
  container?: string;
528
+ dark?: boolean;
526
529
  date?: string;
527
530
  dynamics?: string;
528
531
  handle?: string;
@@ -531,29 +534,11 @@ export declare interface ICss {
531
534
  kpi?: string;
532
535
  label?: string;
533
536
  name?: string;
537
+ play?: string;
534
538
  sender?: string;
535
539
  title?: string;
536
540
  video?: string;
537
541
  widget?: string;
538
- dark?: boolean;
539
- }
540
-
541
- export declare interface ID3 {
542
- globe: {
543
- colors: {
544
- arc: string;
545
- border: string;
546
- country: string;
547
- land: string;
548
- sphere: string;
549
- };
550
- settings?: {
551
- canvas?: string;
552
- card?: string;
553
- width?: number;
554
- height?: number;
555
- };
556
- };
557
542
  }
558
543
 
559
544
  export declare interface ID3Bubbles {
@@ -646,6 +631,7 @@ export declare interface IDynamics {
646
631
  semrush_visits?: number;
647
632
  potential_reach?: number;
648
633
  facebook_engagement?: number;
634
+ facebook_followers?: number;
649
635
  facebook_insights_reach?: number;
650
636
  facebook_insights_impressions?: number;
651
637
  facebook_insights_link_clicks?: number;
@@ -690,6 +676,18 @@ export declare interface IGeo {
690
676
  country: string;
691
677
  }
692
678
 
679
+ export declare interface IGlobe {
680
+ arc: string;
681
+ border: string;
682
+ country: string;
683
+ land: string;
684
+ sphere: string;
685
+ canvas?: string;
686
+ card?: string;
687
+ width?: number;
688
+ height?: number;
689
+ }
690
+
693
691
  export declare interface IImage {
694
692
  basename: string;
695
693
  name: string;
@@ -1110,7 +1108,10 @@ export declare interface IShow {
1110
1108
  brand?: boolean;
1111
1109
  date?: boolean;
1112
1110
  dynamics?: boolean;
1111
+ handle?: boolean;
1113
1112
  kpi?: boolean;
1113
+ name?: boolean;
1114
+ play?: boolean;
1114
1115
  sender?: boolean;
1115
1116
  star?: boolean;
1116
1117
  visible?: boolean;
@@ -1,4 +1,4 @@
1
- var h = /* @__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))(h || {}), m = /* @__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))(m || {}), 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.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 || {}), D = /* @__PURE__ */ ((e) => (e.APPROVED = "approved", e.BEFORE = "before", e.DELAYED = "delayed", e.NONE = "none", e.REALTIME = "realtime", e))(D || {}), P = /* @__PURE__ */ ((e) => (e.KEYVAL = "keyval", e.LOCAL = "local", e.SESSION = "session", e.DEXIE = "dexie", e.WINDOW = "window", e))(P || {});
1
+ var h = /* @__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))(h || {}), m = /* @__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))(m || {}), 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 || {}), D = /* @__PURE__ */ ((e) => (e.APPROVED = "approved", e.BEFORE = "before", e.DELAYED = "delayed", e.NONE = "none", e.REALTIME = "realtime", e))(D || {}), P = /* @__PURE__ */ ((e) => (e.KEYVAL = "keyval", e.LOCAL = "local", e.SESSION = "session", e.DEXIE = "dexie", e.WINDOW = "window", e))(P || {});
2
2
  function J(e) {
3
3
  const t = e.toUpperCase().split(/[\s_-]+/);
4
4
  return t.length > 0 ? (t.forEach((r, n) => {
@@ -101,21 +101,21 @@ function re(e) {
101
101
  function v(e) {
102
102
  return e.toLowerCase().split("-").reduce((t, r) => t + (r.charAt(0).toUpperCase() + r.slice(1)));
103
103
  }
104
- const ne = (e) => e.charAt(0).toUpperCase() + e.slice(1);
105
- function oe(e) {
104
+ const ne = (e) => e.replace(/([A-Z])/g, "-$1").toLowerCase(), oe = (e) => e.charAt(0).toUpperCase() + e.slice(1);
105
+ function ae(e) {
106
106
  const t = document.createRange();
107
107
  t.selectNodeContents(e), t.deleteContents();
108
108
  }
109
- const ae = () => Math.floor(Math.random() * 16777215).toString(16), ie = () => {
109
+ const ie = () => Math.floor(Math.random() * 16777215).toString(16), se = () => {
110
110
  var e = Math.round, t = Math.random, r = 255;
111
111
  return "rgba(" + e(t() * r) + "," + e(t() * r) + "," + e(t() * r) + "," + t().toFixed(1) + ")";
112
- }, se = () => {
112
+ }, le = () => {
113
113
  var e = Math.round, t = Math.random, r = 255;
114
114
  return "rgba(" + e(t() * r) + "," + e(t() * r) + "," + e(t() * r) + ", 0)";
115
- }, le = () => {
115
+ }, ce = () => {
116
116
  var e = Math.round, t = Math.random, r = 255;
117
117
  return "rgba(" + e(t() * r) + "," + e(t() * r) + "," + e(t() * r) + ")";
118
- }, ce = (e, t) => {
118
+ }, de = (e, t) => {
119
119
  e = e.substring(e.indexOf("(") + 1, e.indexOf(")"));
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;
@@ -132,12 +132,12 @@ function E(e) {
132
132
  {}
133
133
  );
134
134
  }
135
- const de = (e) => [...new Set(e)], ue = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
135
+ const ue = (e) => [...new Set(e)], pe = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
136
136
  function fe(e, t = "font-bold") {
137
137
  return `${e?.title !== null ? `<div class="${t}">${e.title}</div>` : ""}${e?.content ? e.content.replace(/\n\n/g, `
138
138
  `).replace(/\n/g, "<br/>") : ""}`;
139
139
  }
140
- const pe = () => [b(2), b(1), b(1), b(1), b(3)].join("-"), b = (e) => {
140
+ const ge = () => [b(2), b(1), b(1), b(1), b(3)].join("-"), b = (e) => {
141
141
  let t = "";
142
142
  for (let r = 0; r < e; r++)
143
143
  t += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
@@ -148,7 +148,7 @@ function k(e, t) {
148
148
  e = `0${e}`;
149
149
  return e;
150
150
  }
151
- function f(e, t) {
151
+ function p(e, t) {
152
152
  let r, n, o;
153
153
  if (t.length === 0)
154
154
  return e;
@@ -159,37 +159,37 @@ function f(e, t) {
159
159
  function y(e, t, r) {
160
160
  return Object.keys(t).sort().reduce(n, e);
161
161
  function n(o, a) {
162
- return I(o, t[a], a, r);
162
+ return L(o, t[a], a, r);
163
163
  }
164
164
  }
165
- function I(e, t, r, n) {
166
- const o = f(f(f(e, r), M(t)), typeof t);
165
+ function L(e, t, r, n) {
166
+ const o = p(p(p(e, r), M(t)), typeof t);
167
167
  if (t === null)
168
- return f(o, "null");
168
+ return p(o, "null");
169
169
  if (t === void 0)
170
- return f(o, "undefined");
170
+ return p(o, "undefined");
171
171
  if (typeof t == "object" || typeof t == "function") {
172
172
  if (n.includes(t))
173
- return f(o, `[Circular]${r}`);
173
+ return p(o, `[Circular]${r}`);
174
174
  n.push(t);
175
175
  const a = y(o, t, n);
176
176
  if (!("valueOf" in t) || typeof t.valueOf != "function")
177
177
  return a;
178
178
  try {
179
- return f(a, String(t.valueOf()));
179
+ return p(a, String(t.valueOf()));
180
180
  } catch (l) {
181
- return f(a, `[valueOf exception]${l.stack || l.message}`);
181
+ return p(a, `[valueOf exception]${l.stack || l.message}`);
182
182
  }
183
183
  }
184
- return f(o, t.toString());
184
+ return p(o, t.toString());
185
185
  }
186
186
  function M(e) {
187
187
  return Object.prototype.toString.call(e);
188
188
  }
189
- function ge(e) {
190
- return k(I(0, e, "", []).toString(16), 8);
189
+ function be(e) {
190
+ return k(L(0, e, "", []).toString(16), 8);
191
191
  }
192
- const be = (e) => {
192
+ const me = (e) => {
193
193
  let t = "";
194
194
  return x(e, {
195
195
  start: function(r, n, o) {
@@ -208,7 +208,7 @@ const be = (e) => {
208
208
  t += `<!-- ${r} -->`;
209
209
  }
210
210
  }), t;
211
- }, me = (e, t) => {
211
+ }, he = (e, t) => {
212
212
  const r = g("html,head,body,title"), n = { link: "head", base: "head" };
213
213
  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));
214
214
  const o = [];
@@ -259,8 +259,8 @@ const be = (e) => {
259
259
  for (d = a.length - 1; d >= 0 && a[d] != s; d--)
260
260
  ;
261
261
  if (d >= 0) {
262
- for (let p = a.length - 1; p >= d; p--)
263
- t.end && t.end(a[p]);
262
+ for (let f = a.length - 1; f >= d; f--)
263
+ t.end && t.end(a[f]);
264
264
  a.length = d;
265
265
  }
266
266
  };
@@ -286,11 +286,11 @@ const be = (e) => {
286
286
  l = e;
287
287
  }
288
288
  i();
289
- function u(c, s, d, p) {
289
+ function u(c, s, d, f) {
290
290
  if (s = s.toLowerCase(), C[s])
291
291
  for (; a.at(-1) && S[a.at(-1)]; )
292
292
  i("", a.at(-1));
293
- if (G[s] && a.at(-1) == s && i("", s), p = $[s] || !!p, p || a.push(s), t.start) {
293
+ if (G[s] && a.at(-1) == s && i("", s), f = $[s] || !!f, f || a.push(s), t.start) {
294
294
  const O = [];
295
295
  d.replace(U, function(Q, A) {
296
296
  let _ = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : B[A] ? A : "";
@@ -300,7 +300,7 @@ const be = (e) => {
300
300
  escaped: _.replace(/(^|[^\\])"/g, '$1\\"')
301
301
  //"
302
302
  });
303
- }), t.start && t.start(s, O, p);
303
+ }), t.start && t.start(s, O, f);
304
304
  }
305
305
  }
306
306
  };
@@ -310,7 +310,7 @@ function H(e) {
310
310
  function W(e) {
311
311
  return e.replace(/<\?xml.*\?>\n/, "").replace(/<!doctype.*\>\n/, "").replace(/<!DOCTYPE.*\>\n/, "");
312
312
  }
313
- const he = (e) => {
313
+ const De = (e) => {
314
314
  e = W(e);
315
315
  const t = [], r = {
316
316
  node: "root",
@@ -400,18 +400,18 @@ const he = (e) => {
400
400
  return `<!-- ${e.text} -->`;
401
401
  if (e.node === "root")
402
402
  return r;
403
- }, De = () => {
403
+ }, Ae = () => {
404
404
  const e = (t = !1) => {
405
405
  const n = document.createElement("canvas").getContext("2d", { willReadFrequently: t });
406
406
  return n !== null ? (n.moveTo(0, 0), n.lineTo(120, 121), n.stroke(), n.getImageData(0, 0, 200, 200).data.join()) : null;
407
407
  };
408
408
  return e(!0) !== e(!1);
409
- }, Ae = (e, t = 0, r = !0, n = "en") => {
409
+ }, xe = (e, t = 0, r = !0, n = "en") => {
410
410
  if (e === void 0) return "";
411
411
  if (e = typeof e == "string" || e instanceof String ? parseFloat(e.replace(/[^0-9.]/g, "")) : e, r === !1)
412
412
  return e.toLocaleString(n);
413
413
  if (e < 1e3)
414
- return e = ("" + e).replace(/[^0-9.]/g, "");
414
+ return (Math.round(e * 100) / 100).toFixed(t);
415
415
  e = e.toString().replace(/[^0-9.]/g, "");
416
416
  let o = [
417
417
  { v: 1e3, s: "K" },
@@ -424,7 +424,7 @@ const he = (e) => {
424
424
  for (a = o.length - 1; a > 0 && !(e >= o[a].v); a--)
425
425
  ;
426
426
  return (e / o[a].v).toFixed(t).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, "$1") + o[a].s;
427
- }, xe = (e) => Object.keys(e).length === 0, Oe = (e = 0, t) => {
427
+ }, Oe = (e) => Object.keys(e).length === 0, _e = (e = 0, t) => {
428
428
  switch (!0) {
429
429
  case e > 3:
430
430
  console.debug(...t);
@@ -439,12 +439,12 @@ const he = (e) => {
439
439
  console.error(...t);
440
440
  break;
441
441
  }
442
- }, _e = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""), we = (e) => e.replace(/\>\</g, `>
443
- <`), Re = (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, "!"), Ie = (e) => e.replace(/\,/g, ", ").replace(/\{/g, ` {
442
+ }, we = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""), Re = (e) => e.replace(/\>\</g, `>
443
+ <`), Le = (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, "!"), Ie = (e) => e.replace(/\,/g, ", ").replace(/\{/g, ` {
444
444
  `).replace(/\}/g, `}
445
445
  `).replace(/\;/g, `;
446
446
  `);
447
- function Le(e, t) {
447
+ function Pe(e, t) {
448
448
  const r = [
449
449
  { value: 1, symbol: "" },
450
450
  { value: 1e3, symbol: "K" },
@@ -459,18 +459,18 @@ function Le(e, t) {
459
459
  ;
460
460
  return (e / r[o].value).toFixed(t).replace(n, "$1") + r[o].symbol;
461
461
  }
462
- function Pe(e) {
462
+ function ve(e) {
463
463
  const t = RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);
464
464
  return t && decodeURIComponent(t[1].replace(/\+/g, " ")) || null;
465
465
  }
466
- const ve = (e) => new Proxy(new URLSearchParams(window.location.search), {
466
+ const Ee = (e) => new Proxy(new URLSearchParams(window.location.search), {
467
467
  // @ts-ignore
468
468
  get: (r, n) => r.get(n)
469
469
  })[e];
470
- function Ee(e) {
470
+ function ke(e) {
471
471
  return e[Math.floor(Math.random() * e.length)];
472
472
  }
473
- function ke(e) {
473
+ function ye(e) {
474
474
  switch (e.language) {
475
475
  case "ar":
476
476
  return {
@@ -481,7 +481,7 @@ function ke(e) {
481
481
  return {};
482
482
  }
483
483
  }
484
- function ye(e) {
484
+ function Me(e) {
485
485
  const t = e.filter(
486
486
  (r) => r !== void 0
487
487
  );
@@ -523,13 +523,13 @@ function ye(e) {
523
523
  }
524
524
  }), t;
525
525
  }
526
- function Me(e, t, r, n) {
526
+ function Ue(e, t, r, n) {
527
527
  e.stopPropagation(), t.showModal({
528
528
  showComponent: "card-modal",
529
529
  props: { data: r, options: n }
530
530
  });
531
531
  }
532
- function Ue(e) {
532
+ function $e(e) {
533
533
  const t = [...e];
534
534
  for (let r = t.length - 1; r > 0; r--) {
535
535
  const n = Math.floor(Math.random() * (r + 1));
@@ -537,13 +537,13 @@ function Ue(e) {
537
537
  }
538
538
  return t;
539
539
  }
540
- function $e() {
540
+ function Ce() {
541
541
  let e = "";
542
542
  const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
543
543
  for (let r = 0; r < 7; r++) e += t.charAt(Math.floor(Math.random() * t.length));
544
544
  return e;
545
545
  }
546
- const Ce = (e) => {
546
+ const Se = (e) => {
547
547
  switch (e?.type) {
548
548
  case h.MESSAGES:
549
549
  return m.MESSAGES;
@@ -556,12 +556,12 @@ const Ce = (e) => {
556
556
  }
557
557
  }, K = (e = 6) => Math.random().toString(36).substring(2, e + 2), Y = (e, t = []) => !t.find(function(n) {
558
558
  return n === e;
559
- }), Se = (e, t = []) => {
559
+ }), Ge = (e, t = []) => {
560
560
  let n = 0, o = "";
561
561
  for (; o == "" && n < 100; )
562
562
  o = K(e), Y(o, t) || (o = "", n++);
563
563
  return o;
564
- }, Ge = (e) => {
564
+ }, Be = (e) => {
565
565
  switch (!0) {
566
566
  case e < 0:
567
567
  return "text-down text-xs";
@@ -570,19 +570,19 @@ const Ce = (e) => {
570
570
  default:
571
571
  return "text-white text-xs";
572
572
  }
573
- }, Be = (e, t, r) => Promise.race([e, Z(t, r)]), Z = (e, t) => new Promise((r, n) => setTimeout(() => t === void 0 ? r("ok") : n(t), e));
574
- function Te(e) {
573
+ }, Te = (e, t, r) => Promise.race([e, Z(t, r)]), Z = (e, t) => new Promise((r, n) => setTimeout(() => t === void 0 ? r("ok") : n(t), e));
574
+ function He(e) {
575
575
  let t = `${e.type}.${e.topics}`;
576
576
  return e.order && (t += `.${e.order}`), e.period && (t += `.${e.period}`), t;
577
577
  }
578
- function He(e) {
578
+ function We(e) {
579
579
  if (e.widget === void 0) {
580
580
  const t = e.topics?.split("-");
581
581
  t && t.length > 1 ? (e.dashboard = t ? t[0] : "", e.widget = t ? t[1] : "") : (e.widget = e.topics, e.dashboard = e.slide);
582
582
  }
583
583
  return e;
584
584
  }
585
- function We(e, t) {
585
+ function Fe(e, t) {
586
586
  let r, n, o, a, l;
587
587
  switch (e.moderation) {
588
588
  case D.BEFORE:
@@ -603,12 +603,12 @@ var X = /* @__PURE__ */ ((e) => (e.MultiPolygon = "MultiPolygon", e.Polygon = "P
603
603
  export {
604
604
  h as API,
605
605
  m as CSS,
606
- L as EVENTS,
606
+ I as EVENTS,
607
607
  x as HTMLParser,
608
- me as HTMLtoDOM,
609
- be as HTMLtoXML,
608
+ he as HTMLtoDOM,
609
+ me as HTMLtoXML,
610
610
  D as MODERATION,
611
- ce as RGBAchangeA,
611
+ de as RGBAchangeA,
612
612
  P as STORAGE,
613
613
  j as ShapeType,
614
614
  X as Type,
@@ -619,44 +619,45 @@ export {
619
619
  te as brandLogo,
620
620
  v as camelCase,
621
621
  V as camelCasedProps,
622
+ ne as camelToHyphen,
622
623
  re as camelize,
623
- ne as capitalizeFirstLetter,
624
- oe as clearContents,
624
+ oe as capitalizeFirstLetter,
625
+ ae as clearContents,
625
626
  E as deepMerge,
626
- ue as escape,
627
+ pe as escape,
627
628
  N as filterAttributes,
628
629
  fe as formatContent,
629
- pe as getGuid,
630
- Te as getKey,
631
- Pe as getParameterByName,
632
- ve as getQueryParam,
633
- De as hasHWA,
634
- ge as hashSum,
635
- he as html2json,
636
- Ae as intToString,
637
- xe as isEmpty,
630
+ ge as getGuid,
631
+ He as getKey,
632
+ ve as getParameterByName,
633
+ Ee as getQueryParam,
634
+ Ae as hasHWA,
635
+ be as hashSum,
636
+ De as html2json,
637
+ xe as intToString,
638
+ Oe as isEmpty,
638
639
  F as json2html,
639
- Oe as log,
640
+ _e as log,
640
641
  Ie as maxifyCss,
641
- we as maxifyHtml,
642
- Re as minifyCss,
643
- _e as minifyHtml,
644
- We as moderation,
645
- Le as numberFormatter,
646
- ae as randomColor,
647
- le as randomRGB,
648
- se as randomRGBA,
649
- ie as randomRGBAfull,
650
- Ee as randomValue,
651
- ke as rtl,
652
- ye as sanitize,
653
- Me as showModal,
654
- Ue as shuffleMessages,
655
- $e as stringGen,
656
- Ce as typeCss,
657
- Se as uniq,
658
- de as unique,
659
- Ge as upDownColor,
660
- He as widgetParams,
661
- Be as wrapPromise
642
+ Re as maxifyHtml,
643
+ Le as minifyCss,
644
+ we as minifyHtml,
645
+ Fe as moderation,
646
+ Pe as numberFormatter,
647
+ ie as randomColor,
648
+ ce as randomRGB,
649
+ le as randomRGBA,
650
+ se as randomRGBAfull,
651
+ ke as randomValue,
652
+ ye as rtl,
653
+ Me as sanitize,
654
+ Ue as showModal,
655
+ $e as shuffleMessages,
656
+ Ce as stringGen,
657
+ Se as typeCss,
658
+ Ge as uniq,
659
+ ue as unique,
660
+ Be as upDownColor,
661
+ We as widgetParams,
662
+ Te as wrapPromise
662
663
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-utils",
3
3
  "type": "module",
4
- "version": "1.8.5",
4
+ "version": "1.8.7",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",
@@ -29,19 +29,19 @@
29
29
  },
30
30
  "dependencies": {},
31
31
  "devDependencies": {
32
- "@antfu/eslint-config": "^5.2.1",
33
- "@commitlint/cli": "^19.8.1",
34
- "@commitlint/config-conventional": "^19.8.1",
35
- "@types/node": "^22.17.2",
36
- "@typescript-eslint/eslint-plugin": "^8.40.0",
37
- "@typescript-eslint/parser": "^8.40.0",
32
+ "@antfu/eslint-config": "^5.4.1",
33
+ "@commitlint/cli": "^20.1.0",
34
+ "@commitlint/config-conventional": "^20.0.0",
35
+ "@types/node": "^22.18.8",
36
+ "@typescript-eslint/eslint-plugin": "^8.45.0",
37
+ "@typescript-eslint/parser": "^8.45.0",
38
38
  "@vitest/coverage-v8": "^3.2.4",
39
39
  "camelcase": "^8.0.0",
40
40
  "changelogen": "^0.6.2",
41
- "eslint": "^9.33.0",
42
- "lint-staged": "^16.1.5",
43
- "typescript": "^5.9.2",
44
- "vite": "^7.1.3",
41
+ "eslint": "^9.36.0",
42
+ "lint-staged": "^16.2.3",
43
+ "typescript": "^5.9.3",
44
+ "vite": "^7.1.7",
45
45
  "vite-plugin-dts": "^4.5.4",
46
46
  "vitest": "^3.2.4"
47
47
  },