buzzcasting-utils 1.9.6 → 1.10.2

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",
@@ -562,6 +563,7 @@ export declare interface ICssSeries {
562
563
  down: string;
563
564
  host: string;
564
565
  label: string;
566
+ table: string;
565
567
  title: string;
566
568
  up: string;
567
569
  widget: string;
@@ -1361,6 +1363,13 @@ export declare interface LandGeometry {
1361
1363
  */
1362
1364
  export declare const log: (level: number | string | undefined, message: any[]) => Promise<void>;
1363
1365
 
1366
+ export declare const logging: {
1367
+ add: (level: number | string) => void;
1368
+ clear: () => void;
1369
+ delete: (level: number | string) => void;
1370
+ list: () => void;
1371
+ };
1372
+
1364
1373
  export declare const maxifyCss: (css: string) => string;
1365
1374
 
1366
1375
  export declare const maxifyHtml: (html: string) => string;
@@ -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: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))(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 || {});
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] = v(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 v(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);
@@ -115,46 +115,46 @@ const le = () => Math.floor(Math.random() * 16777215).toString(16), ce = () => {
115
115
  }, ue = () => {
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
- }, fe = (e, t) => {
118
+ }, pe = (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;
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
  ),
132
132
  {}
133
133
  );
134
134
  }
135
- const pe = (e) => [...new Set(e)], ge = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
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
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 E = (e, t = {}, r = "") => {
140
+ const M = (e, t = {}, r = "") => {
141
141
  for (let n in e) {
142
142
  let o = r ? `${r}-${n}` : n;
143
- typeof e[n] == "object" && !Array.isArray(e[n]) ? E(e[n], t, o) : e[n] !== "" && (t[o] = e[n]);
143
+ typeof e[n] == "object" && !Array.isArray(e[n]) ? M(e[n], t, o) : e[n] !== "" && (t[o] = e[n]);
144
144
  }
145
145
  return t;
146
- }, me = () => [b(2), b(1), b(1), b(1), b(3)].join("-"), b = (e) => {
146
+ }, me = () => [m(2), m(1), m(1), m(1), m(3)].join("-"), m = (e) => {
147
147
  let t = "";
148
148
  for (let r = 0; r < e; r++)
149
149
  t += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
150
150
  return t;
151
151
  };
152
- function M(e, t) {
152
+ function k(e, t) {
153
153
  for (; e.length < t; )
154
154
  e = `0${e}`;
155
155
  return e;
156
156
  }
157
- function f(e, t) {
157
+ function p(e, t) {
158
158
  let r, n, o;
159
159
  if (t.length === 0)
160
160
  return e;
@@ -162,42 +162,42 @@ function f(e, t) {
162
162
  n = t.charCodeAt(r), e = (e << 5) - e + n, e |= 0;
163
163
  return e < 0 ? e * -2 : e;
164
164
  }
165
- function k(e, t, r) {
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) {
172
- const o = f(f(f(e, r), $(t)), typeof t);
171
+ function v(e, t, r, n) {
172
+ const o = p(p(p(e, r), C(t)), typeof t);
173
173
  if (t === null)
174
- return f(o, "null");
174
+ return p(o, "null");
175
175
  if (t === void 0)
176
- return f(o, "undefined");
176
+ return p(o, "undefined");
177
177
  if (typeof t == "object" || typeof t == "function") {
178
178
  if (n.includes(t))
179
- return f(o, `[Circular]${r}`);
179
+ return p(o, `[Circular]${r}`);
180
180
  n.push(t);
181
- const a = k(o, t, n);
181
+ const a = $(o, t, n);
182
182
  if (!("valueOf" in t) || typeof t.valueOf != "function")
183
183
  return a;
184
184
  try {
185
- return f(a, String(t.valueOf()));
185
+ return p(a, String(t.valueOf()));
186
186
  } catch (l) {
187
- return f(a, `[valueOf exception]${l.stack || l.message}`);
187
+ return p(a, `[valueOf exception]${l.stack || l.message}`);
188
188
  }
189
189
  }
190
- return f(o, t.toString());
190
+ return p(o, t.toString());
191
191
  }
192
- function $(e) {
192
+ function C(e) {
193
193
  return Object.prototype.toString.call(e);
194
194
  }
195
195
  function he(e) {
196
- return M(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 = "";
200
- return x(e, {
200
+ return O(e, {
201
201
  start: function(r, n, o) {
202
202
  t += "<" + r;
203
203
  for (let a = 0; a < n.length; a++)
@@ -215,7 +215,7 @@ const De = (e) => {
215
215
  }
216
216
  }), t;
217
217
  }, Ae = (e, t) => {
218
- const r = g("html,head,body,title"), n = { link: "head", base: "head" };
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
221
  if (!(t.documentElement || t.getDocumentElement && t.getDocumentElement()) && t.createElement && function() {
@@ -224,7 +224,7 @@ const De = (e) => {
224
224
  }(), t.getElementsByTagName)
225
225
  for (let i in r) r[i] = t.getElementsByTagName(i)[0];
226
226
  let l = r.body;
227
- return x(e, {
227
+ return O(e, {
228
228
  start: function(i, u, c) {
229
229
  if (r[i]) {
230
230
  l = r[i], c || o.push(l);
@@ -244,19 +244,19 @@ const De = (e) => {
244
244
  comment: function(i) {
245
245
  }
246
246
  }), t;
247
- }, g = (e) => {
247
+ }, b = (e) => {
248
248
  let t = {}, r = e.split(",");
249
249
  for (let n = 0; n < r.length; n++) t[r[n]] = !0;
250
250
  return t;
251
- }, w = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, R = /^<\/([-A-Za-z0-9_]+)[^>]*>/, C = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, U = g(
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
- ), S = g(
253
+ ), G = b(
254
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 = g(
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
- ), G = g("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), T = g(
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"
259
- ), H = g("script,style"), x = (e, t) => {
259
+ ), W = b("script,style"), O = (e, t) => {
260
260
  let r, n, o, a = [], l = e;
261
261
  const i = (c, s) => {
262
262
  let d;
@@ -265,14 +265,14 @@ const De = (e) => {
265
265
  for (d = a.length - 1; d >= 0 && a[d] != s; d--)
266
266
  ;
267
267
  if (d >= 0) {
268
- for (let p = a.length - 1; p >= d; p--)
269
- t.end && t.end(a[p]);
268
+ for (let f = a.length - 1; f >= d; f--)
269
+ t.end && t.end(a[f]);
270
270
  a.length = d;
271
271
  }
272
272
  };
273
273
  for (; e; ) {
274
- if (n = !0, !a.at(-1) || !H[a.at(-1)]) {
275
- if (e.indexOf("<!--") == 0 ? (r = e.indexOf("-->"), r >= 0 && (t.comment && t.comment(e.substring(4, r)), e = e.substring(r + 3), n = !1)) : e.indexOf("</") == 0 ? (o = e.match(R), o && (e = e.substring(o[0].length), o[0].replace(R, i), n = !1)) : e.indexOf("<") == 0 && (o = e.match(w), o && (e = e.substring(o[0].length), o[0].replace(w, u), n = !1)), n) {
274
+ if (n = !0, !a.at(-1) || !W[a.at(-1)]) {
275
+ if (e.indexOf("<!--") == 0 ? (r = e.indexOf("-->"), r >= 0 && (t.comment && t.comment(e.substring(4, r)), e = e.substring(r + 3), n = !1)) : e.indexOf("</") == 0 ? (o = e.match(P), o && (e = e.substring(o[0].length), o[0].replace(P, i), n = !1)) : e.indexOf("<") == 0 && (o = e.match(R), o && (e = e.substring(o[0].length), o[0].replace(R, u), n = !1)), n) {
276
276
  r = e.indexOf("<");
277
277
  let c = r < 0 ? e : e.substring(0, r);
278
278
  e = r < 0 ? "" : e.substring(r), t.chars && t.chars(c);
@@ -292,37 +292,37 @@ const De = (e) => {
292
292
  l = e;
293
293
  }
294
294
  i();
295
- function u(c, s, d, p) {
296
- if (s = s.toLowerCase(), S[s])
295
+ function u(c, s, d, f) {
296
+ if (s = s.toLowerCase(), G[s])
297
297
  for (; a.at(-1) && B[a.at(-1)]; )
298
298
  i("", a.at(-1));
299
- if (G[s] && a.at(-1) == s && i("", s), p = U[s] || !!p, p || a.push(s), t.start) {
300
- const O = [];
301
- d.replace(C, function(z, A) {
302
- let _ = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : T[A] ? A : "";
303
- O.push({
304
- name: A,
305
- value: _,
306
- escaped: _.replace(/(^|[^\\])"/g, '$1\\"')
299
+ if (T[s] && a.at(-1) == s && i("", s), f = S[s] || !!f, f || a.push(s), t.start) {
300
+ const _ = [];
301
+ d.replace(U, function(z, x) {
302
+ let w = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : H[x] ? x : "";
303
+ _.push({
304
+ name: x,
305
+ value: w,
306
+ escaped: w.replace(/(^|[^\\])"/g, '$1\\"')
307
307
  //"
308
308
  });
309
- }), t.start && t.start(s, O, p);
309
+ }), t.start && t.start(s, _, f);
310
310
  }
311
311
  }
312
312
  };
313
- function W(e) {
313
+ function F(e) {
314
314
  return `"${e}"`;
315
315
  }
316
- function F(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 = F(e);
320
+ e = Y(e);
321
321
  const t = [], r = {
322
322
  node: "root",
323
323
  child: []
324
324
  };
325
- return x(e, {
325
+ return O(e, {
326
326
  start: function(n, o, a) {
327
327
  let l = {
328
328
  node: "element",
@@ -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
- }, K = (e) => {
371
+ }, Z = (e) => {
372
372
  const t = [
373
373
  "area",
374
374
  "base",
@@ -387,12 +387,12 @@ const xe = (e) => {
387
387
  ];
388
388
  let r = "";
389
389
  e.child && (r = e.child.map(function(o) {
390
- return K(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) {
394
394
  let a = e.attr[o];
395
- return Array.isArray(a) && (a = a.join(" ")), `${o}=${W(a)}`;
395
+ return Array.isArray(a) && (a = a.join(" ")), `${o}=${F(a)}`;
396
396
  }).join(" "), n !== "" && (n = ` ${n}`)), e.node === "element") {
397
397
  let o = e.tag;
398
398
  if (t.indexOf(o) > -1)
@@ -420,50 +420,62 @@ 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
  ;
432
434
  return (e / o[a].v).toFixed(t).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, "$1") + o[a].s;
433
- }, we = (e) => Object.keys(e).length === 0, Y = new BroadcastChannel("logging"), Re = async (e = 0, t) => {
434
- Y.postMessage({ action: "log", level: e, message: t });
435
- }, Le = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""), Ie = (e) => e.replace(/\>\</g, `>
436
- <`), Pe = (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, "!"), ve = (e) => e.replace(/\,/g, ", ").replace(/\{/g, ` {
435
+ }, we = (e) => Object.keys(e).length === 0, h = new BroadcastChannel("logging"), Re = async (e = 0, t) => {
436
+ h.postMessage({ action: "log", level: e, message: t });
437
+ }, Pe = {
438
+ add: (e) => h.postMessage({ action: "add", level: e }),
439
+ clear: () => h.postMessage({ action: "delete" }),
440
+ delete: (e) => h.postMessage({ action: "delete", level: e }),
441
+ list: () => h.postMessage({
442
+ action: "list",
443
+ message: ["%capp%c %clogging", g.APP, g.NONE, g.OK]
444
+ })
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, ` {
437
447
  `).replace(/\}/g, `}
438
448
  `).replace(/\;/g, `;
439
449
  `);
440
- function ye(e, t) {
450
+ function Ee(e, t) {
441
451
  const r = [
442
452
  { value: 1, symbol: "" },
443
- { value: 1e3, symbol: "K" },
453
+ { value: 1e3, symbol: "k" },
444
454
  { value: 1e6, symbol: "M" },
445
- { value: 1e9, symbol: "MM" },
455
+ { value: 1e9, symbol: "G" },
446
456
  { value: 1e12, symbol: "T" },
447
457
  { value: 1e15, symbol: "P" },
448
- { value: 1e18, symbol: "E" }
458
+ { value: 1e18, symbol: "E" },
459
+ { value: 1e21, symbol: "Z" },
460
+ { value: 1e24, symbol: "Y" }
449
461
  ], n = /\.0+$|(\.\d*[1-9])0+$/;
450
462
  let o;
451
463
  for (o = r.length - 1; o > 0 && !(e >= r[o].value); o--)
452
464
  ;
453
465
  return (e / r[o].value).toFixed(t).replace(n, "$1") + r[o].symbol;
454
466
  }
455
- function Ee(e) {
467
+ function Me(e) {
456
468
  const t = RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);
457
469
  return t && decodeURIComponent(t[1].replace(/\+/g, " ")) || null;
458
470
  }
459
- const Me = (e) => new Proxy(new URLSearchParams(window.location.search), {
471
+ const ke = (e) => new Proxy(new URLSearchParams(window.location.search), {
460
472
  // @ts-ignore
461
473
  get: (r, n) => r.get(n)
462
474
  })[e];
463
- function ke(e) {
475
+ function $e(e) {
464
476
  return e[Math.floor(Math.random() * e.length)];
465
477
  }
466
- function $e(e) {
478
+ function Ce(e) {
467
479
  switch (e.language) {
468
480
  case "ar":
469
481
  return {
@@ -474,7 +486,7 @@ function $e(e) {
474
486
  return {};
475
487
  }
476
488
  }
477
- function Ce(e) {
489
+ function Ue(e) {
478
490
  const t = e.filter(
479
491
  (r) => r !== void 0
480
492
  );
@@ -516,13 +528,13 @@ function Ce(e) {
516
528
  }
517
529
  }), t;
518
530
  }
519
- function Ue(e, t, r, n) {
531
+ function Se(e, t, r, n) {
520
532
  e.stopPropagation(), t.showModal({
521
533
  showComponent: "card-modal",
522
534
  props: { data: r, options: n }
523
535
  });
524
536
  }
525
- function Se(e) {
537
+ function Ge(e) {
526
538
  const t = [...e];
527
539
  for (let r = t.length - 1; r > 0; r--) {
528
540
  const n = Math.floor(Math.random() * (r + 1));
@@ -536,25 +548,25 @@ function Be() {
536
548
  for (let r = 0; r < 7; r++) e += t.charAt(Math.floor(Math.random() * t.length));
537
549
  return e;
538
550
  }
539
- const Ge = (e) => {
551
+ const Te = (e) => {
540
552
  switch (e?.type) {
541
- case h.MESSAGES:
542
- return m.MESSAGES;
543
- case h.SERIES:
544
- return m.SERIES;
545
- case h.CLOUD:
546
- return m.CLOUD;
553
+ case D.MESSAGES:
554
+ return g.MESSAGES;
555
+ case D.SERIES:
556
+ return g.SERIES;
557
+ case D.CLOUD:
558
+ return g.CLOUD;
547
559
  default:
548
- return m.NO_UPDATES;
560
+ return g.NO_UPDATES;
549
561
  }
550
- }, Z = (e = 6) => Math.random().toString(36).substring(2, e + 2), X = (e, t = []) => !t.find(function(n) {
562
+ }, K = (e = 6) => Math.random().toString(36).substring(2, e + 2), X = (e, t = []) => !t.find(function(n) {
551
563
  return n === e;
552
- }), Te = (e, t = []) => {
564
+ }), He = (e, t = []) => {
553
565
  let n = 0, o = "";
554
566
  for (; o == "" && n < 100; )
555
- o = Z(e), X(o, t) || (o = "", n++);
567
+ o = K(e), X(o, t) || (o = "", n++);
556
568
  return o;
557
- }, He = (e) => {
569
+ }, We = (e) => {
558
570
  switch (!0) {
559
571
  case e < 0:
560
572
  return "text-down text-xs";
@@ -563,28 +575,28 @@ const Ge = (e) => {
563
575
  default:
564
576
  return "text-white text-xs";
565
577
  }
566
- }, We = (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));
567
- function Fe(e) {
578
+ }, 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));
579
+ function Ye(e) {
568
580
  let t = `${e.type}.${e.topics}`;
569
581
  return e.order && (t += `.${e.order}`), e.period && (t += `.${e.period}`), t;
570
582
  }
571
- function Ke(e) {
583
+ function Ze(e) {
572
584
  if (e.widget === void 0) {
573
585
  const t = e.topics?.split("-");
574
586
  t && t.length > 1 ? (e.dashboard = t ? t[0] : "", e.widget = t ? t[1] : "") : (e.widget = e.topics, e.dashboard = e.slide);
575
587
  }
576
588
  return e;
577
589
  }
578
- function Ye(e, t) {
590
+ function Ke(e, t) {
579
591
  let r, n, o, a, l;
580
592
  switch (e.moderation) {
581
- case D.BEFORE:
593
+ case A.BEFORE:
582
594
  r = /* @__PURE__ */ new Date(), n = e.beforeTime?.split(":"), o = Number.parseInt(n ? n[0] : "00"), a = Number.parseInt(n ? n[1] : "00"), l = Number.parseInt(n ? n[2] : "00"), t.before = r.setHours(o, a, l, 0) / 1e3, t.period || (t.period = r.getDay() === 1 ? 72 : 24);
583
595
  break;
584
- case D.DELAYED:
596
+ case A.DELAYED:
585
597
  e.delay && e.delay > 0 && (t.delay = `${e.delay}`);
586
598
  break;
587
- case D.APPROVED:
599
+ case A.APPROVED:
588
600
  t.approved = "1";
589
601
  break;
590
602
  default:
@@ -594,64 +606,65 @@ function Ye(e, t) {
594
606
  }
595
607
  var J = /* @__PURE__ */ ((e) => (e.MultiPolygon = "MultiPolygon", e.Polygon = "Polygon", e))(J || {}), j = /* @__PURE__ */ ((e) => (e.MultiPolygon = "MultiPolygon", e.Polygon = "Polygon", e))(j || {});
596
608
  export {
597
- h as API,
598
- m as CSS,
599
- I as EVENTS,
609
+ D as API,
610
+ g as CSS,
611
+ L as EVENTS,
600
612
  J as GeoType,
601
- x as HTMLParser,
613
+ O as HTMLParser,
602
614
  Ae as HTMLtoDOM,
603
615
  De as HTMLtoXML,
604
- D as MODERATION,
605
- fe as RGBAchangeA,
606
- P as STORAGE,
616
+ A as MODERATION,
617
+ pe as RGBAchangeA,
618
+ I as STORAGE,
607
619
  j as ShapeType,
608
620
  q as anonymize,
609
621
  N as attachedMedia,
610
622
  V as attrs,
611
623
  re as awaitElement,
612
624
  ne as brandLogo,
613
- v as camelCase,
625
+ y as camelCase,
614
626
  te as camelCasedProps,
615
627
  ae as camelToHyphen,
616
628
  oe as camelize,
617
629
  ie as capitalizeFirstLetter,
618
630
  se as clearContents,
619
- y as deepMerge,
631
+ E as deepMerge,
620
632
  ge as escape,
621
633
  ee as filterAttributes,
622
- E as flatten,
634
+ M as flatten,
623
635
  be as formatContent,
624
636
  me as getGuid,
625
- Fe as getKey,
626
- Ee as getParameterByName,
627
- Me as getQueryParam,
637
+ Ye as getKey,
638
+ Me as getParameterByName,
639
+ ke as getQueryParam,
628
640
  Oe as hasHWA,
629
641
  he as hashSum,
630
642
  xe as html2json,
631
643
  _e as intToString,
632
644
  we as isEmpty,
633
- K as json2html,
645
+ Z as json2html,
634
646
  Re as log,
635
- ve as maxifyCss,
636
- Ie as maxifyHtml,
637
- Pe as minifyCss,
638
- Le as minifyHtml,
639
- Ye as moderation,
640
- ye as numberFormatter,
647
+ Pe as logging,
648
+ ye as maxifyCss,
649
+ Le as maxifyHtml,
650
+ Ie as minifyCss,
651
+ ve as minifyHtml,
652
+ Ke as moderation,
653
+ Ee as numberFormatter,
641
654
  le as randomColor,
642
655
  ue as randomRGB,
643
656
  de as randomRGBA,
644
657
  ce as randomRGBAfull,
645
- ke as randomValue,
646
- $e as rtl,
647
- Ce as sanitize,
648
- Ue as showModal,
649
- Se as shuffleMessages,
658
+ $e as randomValue,
659
+ Ce as rtl,
660
+ Ue as sanitize,
661
+ Se as showModal,
662
+ Ge as shuffleMessages,
650
663
  Be as stringGen,
651
- Ge as typeCss,
652
- Te as uniq,
653
- pe as unique,
654
- He as upDownColor,
655
- Ke as widgetParams,
656
- We as wrapPromise
664
+ Te as typeCss,
665
+ He as uniq,
666
+ fe as unique,
667
+ We as upDownColor,
668
+ Ze as widgetParams,
669
+ Fe as wrapPromise
657
670
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-utils",
3
3
  "type": "module",
4
- "version": "1.9.6",
4
+ "version": "1.10.2",
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.5.1",
35
+ "@commitlint/cli": "^20.2.0",
36
+ "@commitlint/config-conventional": "^20.2.0",
37
+ "@types/node": "^24.10.2",
38
+ "@typescript-eslint/eslint-plugin": "^8.49.0",
39
+ "@typescript-eslint/parser": "^8.49.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.1",
44
+ "lint-staged": "^16.2.7",
45
45
  "typescript": "^5.9.3",
46
- "vite": "^7.1.11",
46
+ "vite": "^7.2.7",
47
47
  "vite-plugin-dts": "^4.5.4",
48
48
  "vitest": "^4.0.1"
49
49
  },