@kong-ui-public/dashboard-renderer 7.3.3 → 7.3.4

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.
@@ -1,25 +1,25 @@
1
1
  var ni = Object.defineProperty;
2
- var _t = (u) => {
2
+ var bt = (u) => {
3
3
  throw TypeError(u);
4
4
  };
5
5
  var oi = (u, e, t) => e in u ? ni(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
6
- var bt = (u, e, t) => oi(u, typeof e != "symbol" ? e + "" : e, t), tt = (u, e, t) => e.has(u) || _t("Cannot " + t);
7
- var _ = (u, e, t) => (tt(u, e, "read from private field"), t ? t.call(u) : e.get(u)), F = (u, e, t) => e.has(u) ? _t("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(u) : e.set(u, t), O = (u, e, t, i) => (tt(u, e, "write to private field"), i ? i.call(u, t) : e.set(u, t), t), G = (u, e, t) => (tt(u, e, "access private method"), t);
6
+ var wt = (u, e, t) => oi(u, typeof e != "symbol" ? e + "" : e, t), tt = (u, e, t) => e.has(u) || bt("Cannot " + t);
7
+ var b = (u, e, t) => (tt(u, e, "read from private field"), t ? t.call(u) : e.get(u)), G = (u, e, t) => e.has(u) ? bt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(u) : e.set(u, t), O = (u, e, t, i) => (tt(u, e, "write to private field"), i ? i.call(u, t) : e.set(u, t), t), U = (u, e, t) => (tt(u, e, "access private method"), t);
8
8
  var Te = (u, e, t, i) => ({
9
9
  set _(s) {
10
10
  O(u, e, s, t);
11
11
  },
12
12
  get _() {
13
- return _(u, e, i);
13
+ return b(u, e, i);
14
14
  }
15
15
  });
16
- import { ref as I, watchEffect as Mt, inject as xe, provide as ai, onMounted as ot, computed as N, defineComponent as Q, onUnmounted as at, watch as lt, resolveComponent as fe, createBlock as M, renderSlot as ze, createCommentVNode as K, unref as k, openBlock as z, withCtx as P, createVNode as re, createTextVNode as De, toDisplayString as ie, useCssVars as Ye, createElementVNode as de, normalizeClass as Qe, mergeProps as It, createSlots as ht, createElementBlock as W, normalizeProps as li, guardReactiveProps as hi, defineAsyncComponent as qt, readonly as it, toRef as wt, nextTick as dt, resolveDynamicComponent as Pt, toHandlers as di, Fragment as $t, renderList as Ft, normalizeStyle as Et, mergeModels as xt, useModel as ui, getCurrentInstance as ci } from "vue";
17
- import { msToGranularity as st, getFieldDataSources as Gt, stripUnknownFilters as fi, Timeframe as gi, TimePeriods as Ut, TIMEFRAME_LOOKUP as mi, formatTime as Ct } from "@kong-ui-public/analytics-utilities";
16
+ import { ref as I, watchEffect as It, inject as Ce, provide as ai, onMounted as ot, computed as D, defineComponent as j, onUnmounted as at, watch as lt, resolveComponent as ge, createBlock as M, renderSlot as ze, createCommentVNode as V, unref as R, openBlock as k, withCtx as P, createVNode as ae, createTextVNode as De, toDisplayString as ne, useCssVars as Ye, createElementVNode as ue, normalizeClass as Qe, mergeProps as qt, createSlots as ht, createElementBlock as K, normalizeProps as li, guardReactiveProps as hi, defineAsyncComponent as Pt, readonly as it, toRef as Et, nextTick as dt, resolveDynamicComponent as $t, toHandlers as di, Fragment as Ft, renderList as Gt, normalizeStyle as xt, mergeModels as Ct, useModel as ui, getCurrentInstance as ci } from "vue";
17
+ import { msToGranularity as st, getFieldDataSources as Ut, stripUnknownFilters as fi, Timeframe as gi, TimePeriods as Bt, TIMEFRAME_LOOKUP as mi, formatTime as Rt } from "@kong-ui-public/analytics-utilities";
18
18
  import { SimpleChart as pi, AnalyticsChart as yi, TopNTable as vi, CsvExportModal as _i } from "@kong-ui-public/analytics-chart";
19
19
  import bi from "swrv";
20
20
  import "axios";
21
21
  import { createI18n as wi, i18nTComponent as Ei } from "@kong-ui-public/i18n";
22
- import { useAnalyticsConfigStore as Bt } from "@kong-ui-public/analytics-config-store";
22
+ import { useAnalyticsConfigStore as ut } from "@kong-ui-public/analytics-config-store";
23
23
  import { VisibilityOffIcon as xi, WarningIcon as Ci, EditIcon as Ri, MoreIcon as ki } from "@kong/icons";
24
24
  import { MetricsProvider as Ti, MetricsConsumer as zi } from "@kong-ui-public/analytics-metric-provider";
25
25
  var Wt = /* @__PURE__ */ ((u) => (u.VALIDATING = "VALIDATING", u.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", u.PENDING = "PENDING", u.SUCCESS = "SUCCESS", u.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", u.ERROR = "ERROR", u.STALE_IF_ERROR = "STALE_IF_ERROR", u))(Wt || {});
@@ -33,7 +33,7 @@ function Si(u = I({}), e, t, i = Di) {
33
33
  "PENDING"
34
34
  /* PENDING */
35
35
  );
36
- return Mt(() => {
36
+ return It(() => {
37
37
  const r = i(u.value);
38
38
  if (u.value && r && t.value) {
39
39
  s.value = "VALIDATING_HAS_DATA";
@@ -115,9 +115,9 @@ function Pi() {
115
115
  // Translation component <i18n-t>
116
116
  };
117
117
  }
118
- const je = 170, Kt = 6, me = "analytics-query-provider", Rt = "{entity-id}", $i = "{cp-id}", Fi = "{timeframe}", Gi = 30 * 1e3, Ui = 3e5, Bi = 36e5;
118
+ const je = 170, Kt = 6, pe = "analytics-query-provider", kt = "{entity-id}", $i = "{cp-id}", Fi = "{timeframe}", Gi = 30 * 1e3, Ui = 3e5, Bi = 36e5;
119
119
  function Wi() {
120
- const u = xe(me);
120
+ const u = Ce(pe);
121
121
  return {
122
122
  evaluateFeatureFlag: (t, i) => u ? u.evaluateFeatureFlagFn(t, i) : i
123
123
  };
@@ -165,7 +165,7 @@ var Vt = { exports: {} };
165
165
  }, n.prototype.emit = function(l, d, a, f, p, g) {
166
166
  var y = t ? t + l : l;
167
167
  if (!this._events[y]) return !1;
168
- var m = this._events[y], T = arguments.length, w, E;
168
+ var m = this._events[y], T = arguments.length, L, z;
169
169
  if (m.fn) {
170
170
  switch (m.once && this.removeListener(l, m.fn, void 0, !0), T) {
171
171
  case 1:
@@ -181,29 +181,29 @@ var Vt = { exports: {} };
181
181
  case 6:
182
182
  return m.fn.call(m.context, d, a, f, p, g), !0;
183
183
  }
184
- for (E = 1, w = new Array(T - 1); E < T; E++)
185
- w[E - 1] = arguments[E];
186
- m.fn.apply(m.context, w);
184
+ for (z = 1, L = new Array(T - 1); z < T; z++)
185
+ L[z - 1] = arguments[z];
186
+ m.fn.apply(m.context, L);
187
187
  } else {
188
- var L = m.length, C;
189
- for (E = 0; E < L; E++)
190
- switch (m[E].once && this.removeListener(l, m[E].fn, void 0, !0), T) {
188
+ var x = m.length, _;
189
+ for (z = 0; z < x; z++)
190
+ switch (m[z].once && this.removeListener(l, m[z].fn, void 0, !0), T) {
191
191
  case 1:
192
- m[E].fn.call(m[E].context);
192
+ m[z].fn.call(m[z].context);
193
193
  break;
194
194
  case 2:
195
- m[E].fn.call(m[E].context, d);
195
+ m[z].fn.call(m[z].context, d);
196
196
  break;
197
197
  case 3:
198
- m[E].fn.call(m[E].context, d, a);
198
+ m[z].fn.call(m[z].context, d, a);
199
199
  break;
200
200
  case 4:
201
- m[E].fn.call(m[E].context, d, a, f);
201
+ m[z].fn.call(m[z].context, d, a, f);
202
202
  break;
203
203
  default:
204
- if (!w) for (C = 1, w = new Array(T - 1); C < T; C++)
205
- w[C - 1] = arguments[C];
206
- m[E].fn.apply(m[E].context, w);
204
+ if (!L) for (_ = 1, L = new Array(T - 1); _ < T; _++)
205
+ L[_ - 1] = arguments[_];
206
+ m[z].fn.apply(m[z].context, L);
207
207
  }
208
208
  }
209
209
  return !0;
@@ -242,9 +242,9 @@ class Qi extends Error {
242
242
  super(), this.name = "AbortError", this.message = e;
243
243
  }
244
244
  }
245
- const kt = (u) => globalThis.DOMException === void 0 ? new Qi(u) : new DOMException(u), Tt = (u) => {
246
- const e = u.reason === void 0 ? kt("This operation was aborted.") : u.reason;
247
- return e instanceof Error ? e : kt(e);
245
+ const Tt = (u) => globalThis.DOMException === void 0 ? new Qi(u) : new DOMException(u), zt = (u) => {
246
+ const e = u.reason === void 0 ? Tt("This operation was aborted.") : u.reason;
247
+ return e instanceof Error ? e : Tt(e);
248
248
  };
249
249
  function ji(u, e) {
250
250
  const {
@@ -259,8 +259,8 @@ function ji(u, e) {
259
259
  throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);
260
260
  if (e.signal) {
261
261
  const { signal: p } = e;
262
- p.aborted && a(Tt(p)), n = () => {
263
- a(Tt(p));
262
+ p.aborted && a(zt(p)), n = () => {
263
+ a(zt(p));
264
264
  }, p.addEventListener("abort", n, { once: !0 });
265
265
  }
266
266
  if (t === Number.POSITIVE_INFINITY) {
@@ -301,10 +301,10 @@ function Xi(u, e, t) {
301
301
  }
302
302
  return i;
303
303
  }
304
- var X;
304
+ var Z;
305
305
  class Zi {
306
306
  constructor() {
307
- F(this, X, []);
307
+ G(this, Z, []);
308
308
  }
309
309
  enqueue(e, t) {
310
310
  t = {
@@ -316,62 +316,62 @@ class Zi {
316
316
  id: t.id,
317
317
  run: e
318
318
  };
319
- if (this.size === 0 || _(this, X)[this.size - 1].priority >= t.priority) {
320
- _(this, X).push(i);
319
+ if (this.size === 0 || b(this, Z)[this.size - 1].priority >= t.priority) {
320
+ b(this, Z).push(i);
321
321
  return;
322
322
  }
323
- const s = Xi(_(this, X), i, (r, o) => o.priority - r.priority);
324
- _(this, X).splice(s, 0, i);
323
+ const s = Xi(b(this, Z), i, (r, o) => o.priority - r.priority);
324
+ b(this, Z).splice(s, 0, i);
325
325
  }
326
326
  setPriority(e, t) {
327
- const i = _(this, X).findIndex((r) => r.id === e);
327
+ const i = b(this, Z).findIndex((r) => r.id === e);
328
328
  if (i === -1)
329
329
  throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);
330
- const [s] = _(this, X).splice(i, 1);
330
+ const [s] = b(this, Z).splice(i, 1);
331
331
  this.enqueue(s.run, { priority: t, id: e });
332
332
  }
333
333
  dequeue() {
334
- const e = _(this, X).shift();
334
+ const e = b(this, Z).shift();
335
335
  return e == null ? void 0 : e.run;
336
336
  }
337
337
  filter(e) {
338
- return _(this, X).filter((t) => t.priority === e.priority).map((t) => t.run);
338
+ return b(this, Z).filter((t) => t.priority === e.priority).map((t) => t.run);
339
339
  }
340
340
  get size() {
341
- return _(this, X).length;
341
+ return b(this, Z).length;
342
342
  }
343
343
  }
344
- X = new WeakMap();
345
- var ve, _e, ce, Le, be, Ae, Z, we, B, He, J, Ee, he, Oe, Ve, D, Qt, jt, Xt, Zt, Jt, Pe, rt, nt, $e, ei, Fe;
344
+ Z = new WeakMap();
345
+ var _e, be, fe, Le, we, Ae, J, Ee, W, He, ee, xe, de, Oe, Ve, S, Qt, jt, Xt, Zt, Jt, Pe, rt, nt, $e, ei, Fe;
346
346
  class Ji extends Yi {
347
347
  // TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
348
348
  constructor(t) {
349
349
  var i, s;
350
350
  super();
351
- F(this, D);
352
- F(this, ve);
353
- F(this, _e);
354
- F(this, ce, 0);
355
- F(this, Le);
356
- F(this, be);
357
- F(this, Ae, 0);
358
- F(this, Z);
359
- F(this, we);
360
- F(this, B);
361
- F(this, He);
362
- F(this, J, 0);
351
+ G(this, S);
352
+ G(this, _e);
353
+ G(this, be);
354
+ G(this, fe, 0);
355
+ G(this, Le);
356
+ G(this, we);
357
+ G(this, Ae, 0);
358
+ G(this, J);
359
+ G(this, Ee);
360
+ G(this, W);
361
+ G(this, He);
362
+ G(this, ee, 0);
363
363
  // The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
364
- F(this, Ee);
365
- F(this, he);
366
- F(this, Oe);
364
+ G(this, xe);
365
+ G(this, de);
366
+ G(this, Oe);
367
367
  // Use to assign a unique identifier to a promise function, if not explicitly specified
368
- F(this, Ve, 1n);
368
+ G(this, Ve, 1n);
369
369
  /**
370
370
  Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
371
371
 
372
372
  Applies to each future operation.
373
373
  */
374
- bt(this, "timeout");
374
+ wt(this, "timeout");
375
375
  if (t = {
376
376
  carryoverConcurrencyCount: !1,
377
377
  intervalCap: Number.POSITIVE_INFINITY,
@@ -384,15 +384,15 @@ class Ji extends Yi {
384
384
  throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${((i = t.intervalCap) == null ? void 0 : i.toString()) ?? ""}\` (${typeof t.intervalCap})`);
385
385
  if (t.interval === void 0 || !(Number.isFinite(t.interval) && t.interval >= 0))
386
386
  throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${((s = t.interval) == null ? void 0 : s.toString()) ?? ""}\` (${typeof t.interval})`);
387
- O(this, ve, t.carryoverConcurrencyCount), O(this, _e, t.intervalCap === Number.POSITIVE_INFINITY || t.interval === 0), O(this, Le, t.intervalCap), O(this, be, t.interval), O(this, B, new t.queueClass()), O(this, He, t.queueClass), this.concurrency = t.concurrency, this.timeout = t.timeout, O(this, Oe, t.throwOnTimeout === !0), O(this, he, t.autoStart === !1);
387
+ O(this, _e, t.carryoverConcurrencyCount), O(this, be, t.intervalCap === Number.POSITIVE_INFINITY || t.interval === 0), O(this, Le, t.intervalCap), O(this, we, t.interval), O(this, W, new t.queueClass()), O(this, He, t.queueClass), this.concurrency = t.concurrency, this.timeout = t.timeout, O(this, Oe, t.throwOnTimeout === !0), O(this, de, t.autoStart === !1);
388
388
  }
389
389
  get concurrency() {
390
- return _(this, Ee);
390
+ return b(this, xe);
391
391
  }
392
392
  set concurrency(t) {
393
393
  if (!(typeof t == "number" && t >= 1))
394
394
  throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);
395
- O(this, Ee, t), G(this, D, $e).call(this);
395
+ O(this, xe, t), U(this, S, $e).call(this);
396
396
  }
397
397
  /**
398
398
  Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
@@ -431,21 +431,21 @@ class Ji extends Yi {
431
431
  Here, the promise function with `id: '🦀'` executes last.
432
432
  */
433
433
  setPriority(t, i) {
434
- _(this, B).setPriority(t, i);
434
+ b(this, W).setPriority(t, i);
435
435
  }
436
436
  async add(t, i = {}) {
437
437
  return i.id ?? (i.id = (Te(this, Ve)._++).toString()), i = {
438
438
  timeout: this.timeout,
439
- throwOnTimeout: _(this, Oe),
439
+ throwOnTimeout: b(this, Oe),
440
440
  ...i
441
441
  }, new Promise((s, r) => {
442
- _(this, B).enqueue(async () => {
442
+ b(this, W).enqueue(async () => {
443
443
  var o;
444
- Te(this, J)._++, Te(this, ce)._++;
444
+ Te(this, ee)._++, Te(this, fe)._++;
445
445
  try {
446
446
  (o = i.signal) == null || o.throwIfAborted();
447
447
  let n = t({ signal: i.signal });
448
- i.timeout && (n = ji(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, G(this, D, ei).call(this, i.signal)]));
448
+ i.timeout && (n = ji(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, U(this, S, ei).call(this, i.signal)]));
449
449
  const h = await n;
450
450
  s(h), this.emit("completed", h);
451
451
  } catch (n) {
@@ -455,9 +455,9 @@ class Ji extends Yi {
455
455
  }
456
456
  r(n), this.emit("error", n);
457
457
  } finally {
458
- G(this, D, Xt).call(this);
458
+ U(this, S, Xt).call(this);
459
459
  }
460
- }, i), this.emit("add"), G(this, D, Pe).call(this);
460
+ }, i), this.emit("add"), U(this, S, Pe).call(this);
461
461
  });
462
462
  }
463
463
  async addAll(t, i) {
@@ -467,19 +467,19 @@ class Ji extends Yi {
467
467
  Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)
468
468
  */
469
469
  start() {
470
- return _(this, he) ? (O(this, he, !1), G(this, D, $e).call(this), this) : this;
470
+ return b(this, de) ? (O(this, de, !1), U(this, S, $e).call(this), this) : this;
471
471
  }
472
472
  /**
473
473
  Put queue execution on hold.
474
474
  */
475
475
  pause() {
476
- O(this, he, !0);
476
+ O(this, de, !0);
477
477
  }
478
478
  /**
479
479
  Clear the queue.
480
480
  */
481
481
  clear() {
482
- O(this, B, new (_(this, He))());
482
+ O(this, W, new (b(this, He))());
483
483
  }
484
484
  /**
485
485
  Can be called multiple times. Useful if you for example add additional items at a later time.
@@ -487,7 +487,7 @@ class Ji extends Yi {
487
487
  @returns A promise that settles when the queue becomes empty.
488
488
  */
489
489
  async onEmpty() {
490
- _(this, B).size !== 0 && await G(this, D, Fe).call(this, "empty");
490
+ b(this, W).size !== 0 && await U(this, S, Fe).call(this, "empty");
491
491
  }
492
492
  /**
493
493
  @returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
@@ -497,7 +497,7 @@ class Ji extends Yi {
497
497
  Note that this only limits the number of items waiting to start. There could still be up to `concurrency` jobs already running that this call does not include in its calculation.
498
498
  */
499
499
  async onSizeLessThan(t) {
500
- _(this, B).size < t || await G(this, D, Fe).call(this, "next", () => _(this, B).size < t);
500
+ b(this, W).size < t || await U(this, S, Fe).call(this, "next", () => b(this, W).size < t);
501
501
  }
502
502
  /**
503
503
  The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet.
@@ -505,13 +505,13 @@ class Ji extends Yi {
505
505
  @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
506
506
  */
507
507
  async onIdle() {
508
- _(this, J) === 0 && _(this, B).size === 0 || await G(this, D, Fe).call(this, "idle");
508
+ b(this, ee) === 0 && b(this, W).size === 0 || await U(this, S, Fe).call(this, "idle");
509
509
  }
510
510
  /**
511
511
  Size of the queue, the number of queued items waiting to run.
512
512
  */
513
513
  get size() {
514
- return _(this, B).size;
514
+ return b(this, W).size;
515
515
  }
516
516
  /**
517
517
  Size of the queue, filtered by the given options.
@@ -519,63 +519,63 @@ class Ji extends Yi {
519
519
  For example, this can be used to find the number of items remaining in the queue with a specific priority level.
520
520
  */
521
521
  sizeBy(t) {
522
- return _(this, B).filter(t).length;
522
+ return b(this, W).filter(t).length;
523
523
  }
524
524
  /**
525
525
  Number of running items (no longer in the queue).
526
526
  */
527
527
  get pending() {
528
- return _(this, J);
528
+ return b(this, ee);
529
529
  }
530
530
  /**
531
531
  Whether the queue is currently paused.
532
532
  */
533
533
  get isPaused() {
534
- return _(this, he);
534
+ return b(this, de);
535
535
  }
536
536
  }
537
- ve = new WeakMap(), _e = new WeakMap(), ce = new WeakMap(), Le = new WeakMap(), be = new WeakMap(), Ae = new WeakMap(), Z = new WeakMap(), we = new WeakMap(), B = new WeakMap(), He = new WeakMap(), J = new WeakMap(), Ee = new WeakMap(), he = new WeakMap(), Oe = new WeakMap(), Ve = new WeakMap(), D = new WeakSet(), Qt = function() {
538
- return _(this, _e) || _(this, ce) < _(this, Le);
537
+ _e = new WeakMap(), be = new WeakMap(), fe = new WeakMap(), Le = new WeakMap(), we = new WeakMap(), Ae = new WeakMap(), J = new WeakMap(), Ee = new WeakMap(), W = new WeakMap(), He = new WeakMap(), ee = new WeakMap(), xe = new WeakMap(), de = new WeakMap(), Oe = new WeakMap(), Ve = new WeakMap(), S = new WeakSet(), Qt = function() {
538
+ return b(this, be) || b(this, fe) < b(this, Le);
539
539
  }, jt = function() {
540
- return _(this, J) < _(this, Ee);
540
+ return b(this, ee) < b(this, xe);
541
541
  }, Xt = function() {
542
- Te(this, J)._--, G(this, D, Pe).call(this), this.emit("next");
542
+ Te(this, ee)._--, U(this, S, Pe).call(this), this.emit("next");
543
543
  }, Zt = function() {
544
- G(this, D, nt).call(this), G(this, D, rt).call(this), O(this, we, void 0);
544
+ U(this, S, nt).call(this), U(this, S, rt).call(this), O(this, Ee, void 0);
545
545
  }, Jt = function() {
546
546
  const t = Date.now();
547
- if (_(this, Z) === void 0) {
548
- const i = _(this, Ae) - t;
547
+ if (b(this, J) === void 0) {
548
+ const i = b(this, Ae) - t;
549
549
  if (i < 0)
550
- O(this, ce, _(this, ve) ? _(this, J) : 0);
550
+ O(this, fe, b(this, _e) ? b(this, ee) : 0);
551
551
  else
552
- return _(this, we) === void 0 && O(this, we, setTimeout(() => {
553
- G(this, D, Zt).call(this);
552
+ return b(this, Ee) === void 0 && O(this, Ee, setTimeout(() => {
553
+ U(this, S, Zt).call(this);
554
554
  }, i)), !0;
555
555
  }
556
556
  return !1;
557
557
  }, Pe = function() {
558
- if (_(this, B).size === 0)
559
- return _(this, Z) && clearInterval(_(this, Z)), O(this, Z, void 0), this.emit("empty"), _(this, J) === 0 && this.emit("idle"), !1;
560
- if (!_(this, he)) {
561
- const t = !_(this, D, Jt);
562
- if (_(this, D, Qt) && _(this, D, jt)) {
563
- const i = _(this, B).dequeue();
564
- return i ? (this.emit("active"), i(), t && G(this, D, rt).call(this), !0) : !1;
558
+ if (b(this, W).size === 0)
559
+ return b(this, J) && clearInterval(b(this, J)), O(this, J, void 0), this.emit("empty"), b(this, ee) === 0 && this.emit("idle"), !1;
560
+ if (!b(this, de)) {
561
+ const t = !b(this, S, Jt);
562
+ if (b(this, S, Qt) && b(this, S, jt)) {
563
+ const i = b(this, W).dequeue();
564
+ return i ? (this.emit("active"), i(), t && U(this, S, rt).call(this), !0) : !1;
565
565
  }
566
566
  }
567
567
  return !1;
568
568
  }, rt = function() {
569
- _(this, _e) || _(this, Z) !== void 0 || (O(this, Z, setInterval(() => {
570
- G(this, D, nt).call(this);
571
- }, _(this, be))), O(this, Ae, Date.now() + _(this, be)));
569
+ b(this, be) || b(this, J) !== void 0 || (O(this, J, setInterval(() => {
570
+ U(this, S, nt).call(this);
571
+ }, b(this, we))), O(this, Ae, Date.now() + b(this, we)));
572
572
  }, nt = function() {
573
- _(this, ce) === 0 && _(this, J) === 0 && _(this, Z) && (clearInterval(_(this, Z)), O(this, Z, void 0)), O(this, ce, _(this, ve) ? _(this, J) : 0), G(this, D, $e).call(this);
573
+ b(this, fe) === 0 && b(this, ee) === 0 && b(this, J) && (clearInterval(b(this, J)), O(this, J, void 0)), O(this, fe, b(this, _e) ? b(this, ee) : 0), U(this, S, $e).call(this);
574
574
  }, /**
575
575
  Executes all queued functions until it reaches the limit.
576
576
  */
577
577
  $e = function() {
578
- for (; G(this, D, Pe).call(this); )
578
+ for (; U(this, S, Pe).call(this); )
579
579
  ;
580
580
  }, ei = async function(t) {
581
581
  return new Promise((i, s) => {
@@ -592,7 +592,7 @@ $e = function() {
592
592
  });
593
593
  };
594
594
  const es = () => {
595
- const u = Bt(), e = xe(me);
595
+ const u = ut(), e = Ce(pe);
596
596
  if (!e)
597
597
  return;
598
598
  if (e.queryFnOverride) {
@@ -609,7 +609,7 @@ const es = () => {
609
609
  queryFnOverride: !0,
610
610
  queryFn: (s, r) => t.add(() => e.queryFn(s, r), { throwOnTimeout: !0 })
611
611
  };
612
- ai(me, i);
612
+ ai(pe, i);
613
613
  };
614
614
  function ts({
615
615
  queryBridge: u,
@@ -617,78 +617,78 @@ function ts({
617
617
  definition: t,
618
618
  chartData: i
619
619
  }) {
620
- const s = I(""), r = I("");
620
+ const s = I(""), r = I(""), o = ut();
621
621
  ot(async () => {
622
- var w, E;
623
- s.value = await ((w = u == null ? void 0 : u.exploreBaseUrl) == null ? void 0 : w.call(u)) ?? "", r.value = await ((E = u == null ? void 0 : u.requestsBaseUrl) == null ? void 0 : E.call(u)) ?? "";
622
+ var x, _;
623
+ s.value = await ((x = u == null ? void 0 : u.exploreBaseUrl) == null ? void 0 : x.call(u)) ?? "", r.value = await ((_ = u == null ? void 0 : u.requestsBaseUrl) == null ? void 0 : _.call(u)) ?? "";
624
624
  });
625
- const o = N(() => !["golden_signals", "top_n", "gauge"].includes(t.value.chart.type)), n = N(() => r.value && t.value.query && t.value.query.datasource !== "llm_usage"), h = N(() => s.value && t.value.query && ["basic", "api_usage", "llm_usage", void 0].includes(t.value.query.datasource)), l = N(() => i.value ? st(i.value.meta.granularity_ms) : void 0), d = N(() => {
626
- var L;
627
- const w = [...e.value.filters, ...t.value.query.filters ?? []], E = ((L = t.value.query) == null ? void 0 : L.datasource) ?? "api_usage";
628
- return w.filter((C) => Gt(C.field).some((ge) => E === ge));
629
- }), a = N(() => {
630
- if (!h.value || !o.value)
625
+ const n = D(() => o.analytics && o.percentiles), h = D(() => !["golden_signals", "top_n", "gauge"].includes(t.value.chart.type)), l = D(() => r.value && t.value.query && t.value.query.datasource !== "llm_usage" && n.value), d = D(() => s.value && t.value.query && ["basic", "api_usage", "llm_usage", void 0].includes(t.value.query.datasource) && n.value), a = D(() => i.value ? st(i.value.meta.granularity_ms) : void 0), f = D(() => {
626
+ var F;
627
+ const x = [...e.value.filters, ...t.value.query.filters ?? []], _ = ((F = t.value.query) == null ? void 0 : F.datasource) ?? "api_usage";
628
+ return x.filter((te) => Ut(te.field).some((me) => _ === me));
629
+ }), p = D(() => {
630
+ if (!d.value || !h.value)
631
631
  return "";
632
- const w = d.value, E = t.value.query.time_range || e.value.timeSpec, L = m(E, w);
633
- return T(L);
634
- }), f = N(() => {
635
- if (!n.value || !o.value)
632
+ const x = f.value, _ = t.value.query.time_range || e.value.timeSpec, F = L(_, x);
633
+ return z(F);
634
+ }), g = D(() => {
635
+ if (!l.value || !h.value)
636
636
  return "";
637
- const w = d.value, E = g(
637
+ const x = f.value, _ = m(
638
638
  t.value.query.time_range || e.value.timeSpec,
639
- w
639
+ x
640
640
  );
641
- return p(E);
642
- }), p = (w) => n.value ? `${r.value}?q=${JSON.stringify(w)}` : "", g = (w, E) => {
643
- var L, C;
641
+ return y(_);
642
+ }), y = (x) => l.value ? `${r.value}?q=${JSON.stringify(x)}` : "", m = (x, _) => {
643
+ var F, te;
644
644
  return {
645
- filter: E,
645
+ filter: _,
646
646
  timeframe: {
647
- timePeriodsKey: w.type === "relative" ? w.time_range : "custom",
648
- start: w.type === "absolute" ? (L = i.value) == null ? void 0 : L.meta.start_ms : void 0,
649
- end: w.type === "absolute" ? (C = i.value) == null ? void 0 : C.meta.end_ms : void 0
647
+ timePeriodsKey: x.type === "relative" ? x.time_range : "custom",
648
+ start: x.type === "absolute" ? (F = i.value) == null ? void 0 : F.meta.start_ms : void 0,
649
+ end: x.type === "absolute" ? (te = i.value) == null ? void 0 : te.meta.end_ms : void 0
650
650
  }
651
651
  };
652
- }, y = (w, E) => ({
653
- filter: E,
652
+ }, T = (x, _) => ({
653
+ filter: _,
654
654
  timeframe: {
655
- timePeriodsKey: w.type === "relative" ? w.time_range : "custom",
656
- start: w.type === "absolute" ? w.start : void 0,
657
- end: w.type === "absolute" ? w.end : void 0
655
+ timePeriodsKey: x.type === "relative" ? x.time_range : "custom",
656
+ start: x.type === "absolute" ? x.start : void 0,
657
+ end: x.type === "absolute" ? x.end : void 0
658
658
  }
659
- }), m = (w, E) => {
660
- const L = t.value.query.dimensions ?? [];
659
+ }), L = (x, _) => {
660
+ const F = t.value.query.dimensions ?? [];
661
661
  return {
662
- filters: E,
662
+ filters: _,
663
663
  metrics: t.value.query.metrics ?? [],
664
- dimensions: L,
665
- time_range: w,
666
- granularity: t.value.query.granularity || l.value
664
+ dimensions: F,
665
+ time_range: x,
666
+ granularity: t.value.query.granularity || a.value
667
667
  };
668
- }, T = (w) => {
669
- if (!h.value)
668
+ }, z = (x) => {
669
+ if (!d.value)
670
670
  return "";
671
- const E = ["api_usage", "llm_usage"].includes(t.value.query.datasource) ? t.value.query.datasource : "api_usage";
672
- return `${s.value}?q=${JSON.stringify(w)}&d=${E}&c=${t.value.chart.type}`;
671
+ const _ = ["api_usage", "llm_usage"].includes(t.value.query.datasource) ? t.value.query.datasource : "api_usage";
672
+ return `${s.value}?q=${JSON.stringify(x)}&d=${_}&c=${t.value.chart.type}`;
673
673
  };
674
674
  return {
675
- exploreLinkKebabMenu: a,
676
- requestsLinkKebabMenu: f,
677
- canShowKebabMenu: o,
678
- canGenerateRequestsLink: n,
679
- canGenerateExploreLink: h,
680
- buildExploreQuery: m,
681
- buildRequestsQueryZoomActions: y,
682
- buildExploreLink: T,
683
- buildRequestLink: p
675
+ exploreLinkKebabMenu: p,
676
+ requestsLinkKebabMenu: g,
677
+ canShowKebabMenu: h,
678
+ canGenerateRequestsLink: l,
679
+ canGenerateExploreLink: d,
680
+ buildExploreQuery: L,
681
+ buildRequestsQueryZoomActions: T,
682
+ buildExploreLink: z,
683
+ buildRequestLink: y
684
684
  };
685
685
  }
686
- const pe = {
686
+ const ye = {
687
687
  useI18n: Pi,
688
688
  useEvaluateFeatureFlag: Wi,
689
689
  useRequestQueue: es,
690
690
  useContextLinks: ts
691
- }, ut = /* @__PURE__ */ Q({
691
+ }, ct = /* @__PURE__ */ j({
692
692
  __name: "QueryDataProvider",
693
693
  props: {
694
694
  context: {},
@@ -698,53 +698,53 @@ const pe = {
698
698
  },
699
699
  emits: ["chart-data", "queryComplete"],
700
700
  setup(u, { emit: e }) {
701
- const t = u, i = e, { i18n: s } = pe.useI18n(), r = xe(me), o = () => t.queryReady && r ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, n = new AbortController();
701
+ const t = u, i = e, { i18n: s } = ye.useI18n(), r = Ce(pe), o = () => t.queryReady && r ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, n = new AbortController();
702
702
  at(() => {
703
703
  n.abort();
704
704
  });
705
- const h = (T, w, E) => {
706
- const L = [];
707
- return w && L.push(...w), L.push(...fi(T, E)), L;
705
+ const h = (T, L, z) => {
706
+ const x = [];
707
+ return L && x.push(...L), x.push(...fi(T, z)), x;
708
708
  }, { data: l, error: d, isValidating: a } = bi(o, async () => {
709
- var T, w, E, L;
709
+ var T, L, z, x;
710
710
  try {
711
711
  let {
712
- datasource: C,
713
- ...le
712
+ datasource: _,
713
+ ...F
714
714
  } = t.query;
715
- C || (C = "basic");
716
- const ge = h(C, t.query.filters, t.context.filters);
717
- let ne = t.query.time_range;
718
- ne ? ne.tz || (ne = {
719
- ...ne,
715
+ _ || (_ = "basic");
716
+ const te = h(_, t.query.filters, t.context.filters);
717
+ let ie = t.query.time_range;
718
+ ie ? ie.tz || (ie = {
719
+ ...ie,
720
720
  tz: t.context.tz
721
- }) : ne = {
721
+ }) : ie = {
722
722
  ...t.context.timeSpec,
723
723
  tz: t.context.tz
724
724
  };
725
- const Ce = {
726
- datasource: C,
725
+ const me = {
726
+ datasource: _,
727
727
  query: {
728
- ...le,
729
- time_range: ne,
730
- filters: ge
728
+ ...F,
729
+ time_range: ie,
730
+ filters: te
731
731
  }
732
- }, Re = await (r == null ? void 0 : r.queryFn(Ce, n));
732
+ }, Re = await (r == null ? void 0 : r.queryFn(me, n));
733
733
  return g.value = null, Re;
734
- } catch (C) {
735
- throw (C == null ? void 0 : C.status) === 403 ? g.value = {
734
+ } catch (_) {
735
+ throw (_ == null ? void 0 : _.status) === 403 ? g.value = {
736
736
  message: s.t("queryDataProvider.forbidden"),
737
737
  type: "forbidden"
738
- } : (C == null ? void 0 : C.status) === 408 ? g.value = {
738
+ } : (_ == null ? void 0 : _.status) === 408 ? g.value = {
739
739
  message: s.t("queryDataProvider.timeout"),
740
740
  type: "timeout"
741
- } : ((w = (T = C == null ? void 0 : C.response) == null ? void 0 : T.data) == null ? void 0 : w.message) === "Range not allowed for this tier" ? g.value = {
741
+ } : ((L = (T = _ == null ? void 0 : _.response) == null ? void 0 : T.data) == null ? void 0 : L.message) === "Range not allowed for this tier" ? g.value = {
742
742
  message: s.t("queryDataProvider.timeRangeExceeded"),
743
743
  type: "range_exceeded"
744
744
  } : g.value = {
745
- message: ((L = (E = C == null ? void 0 : C.response) == null ? void 0 : E.data) == null ? void 0 : L.message) || (C == null ? void 0 : C.message),
745
+ message: ((x = (z = _ == null ? void 0 : _.response) == null ? void 0 : z.data) == null ? void 0 : x.message) || (_ == null ? void 0 : _.message),
746
746
  type: "other"
747
- }, C;
747
+ }, _;
748
748
  } finally {
749
749
  i("queryComplete");
750
750
  }
@@ -752,48 +752,48 @@ const pe = {
752
752
  refreshInterval: t.context.refreshInterval,
753
753
  revalidateOnFocus: !1,
754
754
  shouldRetryOnError: !1
755
- }), { state: f, swrvState: p } = Si(l, d, a), g = I(null), y = N(() => f.value === p.ERROR || !!g.value), m = N(() => !t.queryReady || f.value === p.PENDING);
755
+ }), { state: f, swrvState: p } = Si(l, d, a), g = I(null), y = D(() => f.value === p.ERROR || !!g.value), m = D(() => !t.queryReady || f.value === p.PENDING);
756
756
  return lt(l, (T) => {
757
757
  T && i("chart-data", T);
758
- }), (T, w) => {
759
- var C;
760
- const E = fe("KSkeleton"), L = fe("KEmptyState");
761
- return m.value || !k(l) && !y.value ? (z(), M(E, {
758
+ }), (T, L) => {
759
+ var _;
760
+ const z = ge("KSkeleton"), x = ge("KEmptyState");
761
+ return m.value || !R(l) && !y.value ? (k(), M(z, {
762
762
  key: 0,
763
763
  class: "chart-skeleton",
764
764
  type: "table"
765
- })) : y.value && ((C = g.value) == null ? void 0 : C.type) === "forbidden" ? (z(), M(L, {
765
+ })) : y.value && ((_ = g.value) == null ? void 0 : _.type) === "forbidden" ? (k(), M(x, {
766
766
  key: 1,
767
767
  "action-button-visible": !1,
768
768
  "data-testid": "chart-forbidden-state"
769
769
  }, {
770
770
  default: P(() => [
771
- De(ie(g.value.message), 1)
771
+ De(ne(g.value.message), 1)
772
772
  ]),
773
773
  icon: P(() => [
774
- re(k(xi))
774
+ ae(R(xi))
775
775
  ]),
776
776
  _: 1
777
- })) : y.value ? (z(), M(L, {
777
+ })) : y.value ? (k(), M(x, {
778
778
  key: 2,
779
779
  "action-button-visible": !1,
780
780
  "data-testid": "chart-empty-state",
781
781
  "icon-variant": "error"
782
782
  }, {
783
783
  default: P(() => {
784
- var le;
784
+ var F;
785
785
  return [
786
- De(ie((le = g.value) == null ? void 0 : le.message), 1)
786
+ De(ne((F = g.value) == null ? void 0 : F.message), 1)
787
787
  ];
788
788
  }),
789
789
  _: 1
790
- })) : k(l) ? ze(T.$slots, "default", {
790
+ })) : R(l) ? ze(T.$slots, "default", {
791
791
  key: 3,
792
- data: k(l)
793
- }) : K("", !0);
792
+ data: R(l)
793
+ }) : V("", !0);
794
794
  };
795
795
  }
796
- }), is = /* @__PURE__ */ Q({
796
+ }), is = /* @__PURE__ */ j({
797
797
  __name: "SimpleChartRenderer",
798
798
  props: {
799
799
  query: {},
@@ -809,18 +809,18 @@ const pe = {
809
809
  Ye((i) => ({
810
810
  "088169ae": `${i.height}px`
811
811
  }));
812
- const e = u, t = N(() => e.chartOptions.type === "single_value");
813
- return (i, s) => (z(), M(ut, {
812
+ const e = u, t = D(() => e.chartOptions.type === "single_value");
813
+ return (i, s) => (k(), M(ct, {
814
814
  context: i.context,
815
815
  query: i.query,
816
816
  "query-ready": i.queryReady,
817
817
  "refresh-counter": i.refreshCounter
818
818
  }, {
819
819
  default: P(({ data: r }) => [
820
- de("div", {
820
+ ue("div", {
821
821
  class: Qe(["analytics-chart", { "single-value": t.value }])
822
822
  }, [
823
- re(k(pi), {
823
+ ae(R(pi), {
824
824
  "chart-data": r,
825
825
  "chart-options": i.chartOptions,
826
826
  "synthetics-data-key": t.value ? void 0 : i.chartOptions.synthetics_data_key
@@ -830,12 +830,12 @@ const pe = {
830
830
  _: 1
831
831
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
832
832
  }
833
- }), ye = (u, e) => {
833
+ }), ve = (u, e) => {
834
834
  const t = u.__vccOpts || u;
835
835
  for (const [i, s] of e)
836
836
  t[i] = s;
837
837
  return t;
838
- }, zt = /* @__PURE__ */ ye(is, [["__scopeId", "data-v-1e9ff912"]]), ss = { class: "analytics-chart" }, rs = /* @__PURE__ */ Q({
838
+ }, Dt = /* @__PURE__ */ ve(is, [["__scopeId", "data-v-1e9ff912"]]), ss = { class: "analytics-chart" }, rs = /* @__PURE__ */ j({
839
839
  __name: "BaseAnalyticsChartRenderer",
840
840
  props: {
841
841
  query: {},
@@ -850,19 +850,19 @@ const pe = {
850
850
  },
851
851
  emits: ["edit-tile", "chart-data", "zoom-time-range", "view-requests", "select-chart-range"],
852
852
  setup(u, { emit: e }) {
853
- const t = u, i = e, { i18n: s } = pe.useI18n(), { evaluateFeatureFlag: r } = pe.useEvaluateFeatureFlag(), o = r("ma-4135-allow-zooming-all-dashboard-tiles", !1), n = N(() => ({
853
+ const t = u, i = e, { i18n: s } = ye.useI18n(), { evaluateFeatureFlag: r } = ye.useEvaluateFeatureFlag(), o = r("ma-4135-allow-zooming-all-dashboard-tiles", !1), n = D(() => ({
854
854
  type: t.chartOptions.type,
855
855
  stacked: t.chartOptions.stacked ?? !1,
856
856
  chartDatasetColors: t.chartOptions.chart_dataset_colors,
857
857
  threshold: t.chartOptions.threshold
858
- })), h = N(() => o ? t.context.zoomable : t.context.zoomable && !t.query.time_range), l = () => {
858
+ })), h = D(() => o ? t.context.zoomable : t.context.zoomable && !t.query.time_range), l = () => {
859
859
  i("edit-tile");
860
860
  }, d = (a) => {
861
861
  i("chart-data", a);
862
862
  };
863
863
  return (a, f) => {
864
- const p = fe("KDropdownItem");
865
- return z(), M(ut, {
864
+ const p = ge("KDropdownItem");
865
+ return k(), M(ct, {
866
866
  context: a.context,
867
867
  query: a.query,
868
868
  "query-ready": a.queryReady,
@@ -870,8 +870,8 @@ const pe = {
870
870
  onChartData: d
871
871
  }, {
872
872
  default: P(({ data: g }) => [
873
- de("div", ss, [
874
- re(k(yi), It({
873
+ ue("div", ss, [
874
+ ae(R(yi), qt({
875
875
  "chart-data": g,
876
876
  "chart-options": n.value,
877
877
  "explore-link": a.exploreLink,
@@ -887,9 +887,9 @@ const pe = {
887
887
  a.context.editable ? {
888
888
  name: "menu-items",
889
889
  fn: P(() => [
890
- re(p, { onClick: l }, {
890
+ ae(p, { onClick: l }, {
891
891
  default: P(() => [
892
- De(ie(k(s).t("renderer.edit")), 1)
892
+ De(ne(R(s).t("renderer.edit")), 1)
893
893
  ]),
894
894
  _: 1
895
895
  })
@@ -903,7 +903,7 @@ const pe = {
903
903
  }, 8, ["context", "query", "query-ready", "refresh-counter"]);
904
904
  };
905
905
  }
906
- }), ct = /* @__PURE__ */ ye(rs, [["__scopeId", "data-v-965790dd"]]), Dt = /* @__PURE__ */ Q({
906
+ }), ft = /* @__PURE__ */ ve(rs, [["__scopeId", "data-v-965790dd"]]), St = /* @__PURE__ */ j({
907
907
  __name: "BarChartRenderer",
908
908
  props: {
909
909
  query: {},
@@ -916,7 +916,7 @@ const pe = {
916
916
  exploreLink: {}
917
917
  },
918
918
  setup(u) {
919
- return (e, t) => (z(), M(ct, {
919
+ return (e, t) => (k(), M(ft, {
920
920
  "chart-options": e.chartOptions,
921
921
  context: e.context,
922
922
  "extra-props": { showAnnotations: !1 },
@@ -926,7 +926,7 @@ const pe = {
926
926
  "refresh-counter": e.refreshCounter
927
927
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
928
928
  }
929
- }), St = /* @__PURE__ */ Q({
929
+ }), Nt = /* @__PURE__ */ j({
930
930
  __name: "TimeseriesChartRenderer",
931
931
  props: {
932
932
  query: {},
@@ -941,7 +941,7 @@ const pe = {
941
941
  emits: ["zoom-time-range", "select-chart-range"],
942
942
  setup(u, { emit: e }) {
943
943
  const t = e;
944
- return (i, s) => (z(), M(ct, {
944
+ return (i, s) => (k(), M(ft, {
945
945
  "chart-options": i.chartOptions,
946
946
  context: i.context,
947
947
  "explore-link": i.exploreLink,
@@ -954,7 +954,7 @@ const pe = {
954
954
  onZoomTimeRange: s[1] || (s[1] = (r) => t("zoom-time-range", r))
955
955
  }, null, 8, ["chart-options", "context", "explore-link", "height", "query", "query-ready", "refresh-counter", "requests-link"]));
956
956
  }
957
- }), ns = { class: "metric-card-tile-wrapper" }, os = /* @__PURE__ */ Q({
957
+ }), ns = { class: "metric-card-tile-wrapper" }, os = /* @__PURE__ */ j({
958
958
  __name: "GoldenSignalsRenderer",
959
959
  props: {
960
960
  query: {},
@@ -967,7 +967,7 @@ const pe = {
967
967
  exploreLink: {}
968
968
  },
969
969
  setup(u) {
970
- const e = u, t = N(() => {
970
+ const e = u, t = D(() => {
971
971
  const s = e.context.timeSpec;
972
972
  if (s.type === "absolute")
973
973
  return new gi({
@@ -982,11 +982,11 @@ const pe = {
982
982
  isRelative: !1,
983
983
  allowedTiers: ["free", "plus", "enterprise"]
984
984
  });
985
- const r = Ut.get(s.time_range);
985
+ const r = Bt.get(s.time_range);
986
986
  if (!r)
987
987
  throw new Error("Unknown time range");
988
988
  return r;
989
- }), i = N(() => {
989
+ }), i = D(() => {
990
990
  var r, o;
991
991
  const s = (r = e.query) == null ? void 0 : r.datasource;
992
992
  if (s && s !== "api_usage" && s !== "basic")
@@ -1004,27 +1004,27 @@ const pe = {
1004
1004
  refreshCounter: e.refreshCounter
1005
1005
  };
1006
1006
  });
1007
- return (s, r) => (z(), W("div", ns, [
1008
- re(k(Ti), li(hi(i.value)), {
1007
+ return (s, r) => (k(), K("div", ns, [
1008
+ ae(R(Ti), li(hi(i.value)), {
1009
1009
  default: P(() => [
1010
- re(k(zi))
1010
+ ae(R(zi))
1011
1011
  ]),
1012
1012
  _: 1
1013
1013
  }, 16)
1014
1014
  ]));
1015
1015
  }
1016
- }), as = /* @__PURE__ */ ye(os, [["__scopeId", "data-v-7e1b1cc1"]]), Nt = "#6c7489", ls = "12px", Lt = "20px", ti = "20px", hs = {
1016
+ }), as = /* @__PURE__ */ ve(os, [["__scopeId", "data-v-7e1b1cc1"]]), Lt = "#6c7489", ls = "12px", At = "20px", ti = "20px", hs = {
1017
1017
  class: "fallback-entity-link",
1018
1018
  "data-testid": "entity-link-parent"
1019
- }, At = /* @__PURE__ */ Q({
1019
+ }, Ht = /* @__PURE__ */ j({
1020
1020
  __name: "FallbackEntityLink",
1021
1021
  props: {
1022
1022
  entityLinkData: {}
1023
1023
  },
1024
1024
  setup(u) {
1025
- return (e, t) => (z(), W("div", hs, ie(e.entityLinkData.label), 1));
1025
+ return (e, t) => (k(), K("div", hs, ne(e.entityLinkData.label), 1));
1026
1026
  }
1027
- }), ds = /* @__PURE__ */ Q({
1027
+ }), ds = /* @__PURE__ */ j({
1028
1028
  __name: "TopNTableRenderer",
1029
1029
  props: {
1030
1030
  query: {},
@@ -1037,39 +1037,39 @@ const pe = {
1037
1037
  exploreLink: {}
1038
1038
  },
1039
1039
  setup(u) {
1040
- const e = u, t = xe(me), i = qt(async () => {
1040
+ const e = u, t = Ce(pe), i = Pt(async () => {
1041
1041
  if (t != null && t.fetchComponent)
1042
1042
  try {
1043
1043
  return await t.fetchComponent("EntityLink");
1044
1044
  } catch {
1045
- return At;
1045
+ return Ht;
1046
1046
  }
1047
- return At;
1047
+ return Ht;
1048
1048
  }), s = (r) => {
1049
1049
  var o;
1050
1050
  if ((o = e.chartOptions) != null && o.entity_link)
1051
1051
  if (r.id.includes(":")) {
1052
1052
  const [n, h] = r.id.split(":");
1053
- return e.chartOptions.entity_link.replace($i, n).replace(Rt, h);
1053
+ return e.chartOptions.entity_link.replace($i, n).replace(kt, h);
1054
1054
  } else
1055
- return e.chartOptions.entity_link.replace(Rt, r.id);
1055
+ return e.chartOptions.entity_link.replace(kt, r.id);
1056
1056
  return "";
1057
1057
  };
1058
- return (r, o) => (z(), M(ut, {
1058
+ return (r, o) => (k(), M(ct, {
1059
1059
  context: r.context,
1060
1060
  query: r.query,
1061
1061
  "query-ready": r.queryReady,
1062
1062
  "refresh-counter": r.refreshCounter
1063
1063
  }, {
1064
1064
  default: P(({ data: n }) => [
1065
- re(k(vi), {
1065
+ ae(R(vi), {
1066
1066
  data: n,
1067
1067
  "synthetics-data-key": r.chartOptions.synthetics_data_key
1068
1068
  }, ht({ _: 2 }, [
1069
1069
  e.chartOptions.entity_link ? {
1070
1070
  name: "name",
1071
1071
  fn: P(({ record: h }) => [
1072
- re(k(i), {
1072
+ ae(R(i), {
1073
1073
  "entity-link-data": {
1074
1074
  id: h.id,
1075
1075
  label: h.name,
@@ -1085,7 +1085,7 @@ const pe = {
1085
1085
  _: 1
1086
1086
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
1087
1087
  }
1088
- }), us = /* @__PURE__ */ Q({
1088
+ }), us = /* @__PURE__ */ j({
1089
1089
  __name: "DonutChartRenderer",
1090
1090
  props: {
1091
1091
  query: {},
@@ -1098,7 +1098,7 @@ const pe = {
1098
1098
  exploreLink: {}
1099
1099
  },
1100
1100
  setup(u) {
1101
- return (e, t) => (z(), M(ct, {
1101
+ return (e, t) => (k(), M(ft, {
1102
1102
  "chart-options": e.chartOptions,
1103
1103
  context: e.context,
1104
1104
  height: e.height,
@@ -1110,7 +1110,7 @@ const pe = {
1110
1110
  }), cs = ["data-testid"], fs = {
1111
1111
  key: 0,
1112
1112
  class: "tile-header"
1113
- }, gs = ["data-testid"], ms = { class: "badge-text" }, ps = ["data-testid"], ys = { class: "delete-option" }, vs = ["data-testid"], _s = ["data-testid"], bs = /* @__PURE__ */ Q({
1113
+ }, gs = ["data-testid"], ms = { class: "badge-text" }, ps = ["data-testid"], ys = { class: "delete-option" }, vs = ["data-testid"], _s = ["data-testid"], bs = /* @__PURE__ */ j({
1114
1114
  __name: "DashboardTile",
1115
1115
  props: {
1116
1116
  definition: {},
@@ -1126,46 +1126,46 @@ const pe = {
1126
1126
  Ye((v) => ({
1127
1127
  "35c8e872": `${v.height}px`
1128
1128
  }));
1129
- const t = parseInt(ti, 10), i = u, s = e, r = qt(() => import("./GeoMapRenderer-Ct-nayUL.js")), o = xe(me), n = o == null ? void 0 : o.evaluateFeatureFlagFn("analytics-chart-zoom-actions", !1), { i18n: h } = pe.useI18n(), l = I(), d = I(!1), a = I(), f = I(!1), p = I(void 0), g = I(void 0), y = I(!0), {
1129
+ const t = parseInt(ti, 10), i = u, s = e, r = Pt(() => import("./GeoMapRenderer-DYILqlnm.js")), o = Ce(pe), n = o == null ? void 0 : o.evaluateFeatureFlagFn("analytics-chart-zoom-actions", !1), { i18n: h } = ye.useI18n(), l = I(), d = I(!1), a = I(), f = I(!1), p = I(void 0), g = I(void 0), y = I(!0), {
1130
1130
  exploreLinkKebabMenu: m,
1131
1131
  requestsLinkKebabMenu: T,
1132
- canShowKebabMenu: w,
1133
- canGenerateRequestsLink: E,
1134
- canGenerateExploreLink: L,
1135
- buildExploreQuery: C,
1136
- buildExploreLink: le,
1137
- buildRequestLink: ge,
1138
- buildRequestsQueryZoomActions: ne
1139
- } = pe.useContextLinks({
1132
+ canShowKebabMenu: L,
1133
+ canGenerateRequestsLink: z,
1134
+ canGenerateExploreLink: x,
1135
+ buildExploreQuery: _,
1136
+ buildExploreLink: F,
1137
+ buildRequestLink: te,
1138
+ buildRequestsQueryZoomActions: ie
1139
+ } = ye.useContextLinks({
1140
1140
  queryBridge: o,
1141
1141
  chartData: it(l),
1142
- definition: it(wt(i, "definition")),
1143
- context: it(wt(i, "context"))
1142
+ definition: it(Et(i, "definition")),
1143
+ context: it(Et(i, "context"))
1144
1144
  });
1145
1145
  lt(() => i.definition, async () => {
1146
1146
  await dt(), a.value && (f.value = a.value.scrollWidth > a.value.clientWidth), y.value = !0;
1147
1147
  }, { immediate: !0, deep: !0 });
1148
- const Ce = N(() => h.t("csvExport.defaultFilename")), Re = N(() => w.value && (ee.value || i.context.editable) || !!A.value), ee = N(() => !!m.value || ("allow_csv_export" in i.definition.chart ? i.definition.chart.allow_csv_export : !0) || i.context.editable), Ze = {
1149
- timeseries_line: St,
1150
- timeseries_bar: St,
1151
- horizontal_bar: Dt,
1152
- vertical_bar: Dt,
1153
- gauge: zt,
1148
+ const me = D(() => h.t("csvExport.defaultFilename")), Re = D(() => L.value && (se.value || i.context.editable) || !!A.value), se = D(() => !!m.value || ("allow_csv_export" in i.definition.chart ? i.definition.chart.allow_csv_export : !0) || i.context.editable), Ze = {
1149
+ timeseries_line: Nt,
1150
+ timeseries_bar: Nt,
1151
+ horizontal_bar: St,
1152
+ vertical_bar: St,
1153
+ gauge: Dt,
1154
1154
  donut: us,
1155
1155
  golden_signals: as,
1156
1156
  top_n: ds,
1157
1157
  slottable: void 0,
1158
- single_value: zt,
1158
+ single_value: Dt,
1159
1159
  choropleth_map: r
1160
- }, R = N(() => {
1160
+ }, C = D(() => {
1161
1161
  var v, H;
1162
1162
  return {
1163
- ...(v = S.value) != null && v.rendererEvents.supportsRequests ? { "select-chart-range": ri } : {},
1164
- ...(H = S.value) != null && H.rendererEvents.supportsZoom ? { "zoom-time-range": si } : {}
1163
+ ...(v = N.value) != null && v.rendererEvents.supportsRequests ? { "select-chart-range": ri } : {},
1164
+ ...(H = N.value) != null && H.rendererEvents.supportsZoom ? { "zoom-time-range": si } : {}
1165
1165
  };
1166
- }), S = N(() => {
1167
- var j, V;
1168
- const v = Ze[i.definition.chart.type], H = !!((j = v == null ? void 0 : v.emits) != null && j.includes("select-chart-range")), q = !!((V = v == null ? void 0 : v.emits) != null && V.includes("zoom-time-range"));
1166
+ }), N = D(() => {
1167
+ var X, Y;
1168
+ const v = Ze[i.definition.chart.type], H = !!((X = v == null ? void 0 : v.emits) != null && X.includes("select-chart-range")), q = !!((Y = v == null ? void 0 : v.emits) != null && Y.includes("zoom-time-range"));
1169
1169
  return v && {
1170
1170
  component: v,
1171
1171
  rendererProps: {
@@ -1183,45 +1183,45 @@ const pe = {
1183
1183
  supportsZoom: q
1184
1184
  }
1185
1185
  };
1186
- }), A = N(() => {
1186
+ }), A = D(() => {
1187
1187
  var H;
1188
1188
  const v = (H = i.definition.query) == null ? void 0 : H.time_range;
1189
1189
  if ((v == null ? void 0 : v.type) === "relative") {
1190
- const q = Ut.get(mi[v.time_range]);
1190
+ const q = Bt.get(mi[v.time_range]);
1191
1191
  return q ? q.display : (console.warn("Did not recognize the given relative time range:", v.time_range), v.time_range);
1192
1192
  } else if ((v == null ? void 0 : v.type) === "absolute") {
1193
1193
  const q = v.tz || "Etc/UTC";
1194
- return `${Ct(v.start, { short: !0, tz: q })} - ${Ct(v.end, { short: !0, tz: q })}`;
1194
+ return `${Rt(v.start, { short: !0, tz: q })} - ${Rt(v.end, { short: !0, tz: q })}`;
1195
1195
  }
1196
1196
  return null;
1197
- }), $ = N(() => l.value ? st(l.value.meta.granularity_ms) : void 0), te = N(() => ["timeseries_line", "timeseries_bar"].includes(i.definition.chart.type)), ue = N(() => {
1197
+ }), $ = D(() => l.value ? st(l.value.meta.granularity_ms) : void 0), re = D(() => ["timeseries_line", "timeseries_bar"].includes(i.definition.chart.type)), ce = D(() => {
1198
1198
  var H, q;
1199
- if (!te.value || !i.queryReady || y.value)
1199
+ if (!re.value || !i.queryReady || y.value)
1200
1200
  return !1;
1201
1201
  const v = (q = (H = i.definition) == null ? void 0 : H.query) == null ? void 0 : q.granularity;
1202
1202
  return !v || !$.value ? !1 : v !== $.value;
1203
- }), Me = N(() => {
1204
- var q, j, V;
1205
- const v = st(((q = l.value) == null ? void 0 : q.meta.granularity_ms) ?? 0) ?? "unknown", H = ((V = (j = i.definition) == null ? void 0 : j.query) == null ? void 0 : V.granularity) ?? "unknown";
1203
+ }), Me = D(() => {
1204
+ var q, X, Y;
1205
+ const v = st(((q = l.value) == null ? void 0 : q.meta.granularity_ms) ?? 0) ?? "unknown", H = ((Y = (X = i.definition) == null ? void 0 : X.query) == null ? void 0 : Y.granularity) ?? "unknown";
1206
1206
  return h.t("query_aged_out_warning", {
1207
1207
  currentGranularity: h.t(`granularities.${v}`),
1208
1208
  savedGranularity: h.t(`granularities.${H}`)
1209
1209
  });
1210
- }), Ie = N(() => {
1211
- var q, j;
1212
- const v = [...i.context.filters, ...i.definition.query.filters ?? []], H = ((j = (q = i.definition) == null ? void 0 : q.query) == null ? void 0 : j.datasource) ?? "api_usage";
1213
- return v.filter((V) => Gt(V.field).some((vt) => H === vt));
1210
+ }), Ie = D(() => {
1211
+ var q, X;
1212
+ const v = [...i.context.filters, ...i.definition.query.filters ?? []], H = ((X = (q = i.definition) == null ? void 0 : q.query) == null ? void 0 : X.datasource) ?? "api_usage";
1213
+ return v.filter((Y) => Ut(Y.field).some((_t) => H === _t));
1214
1214
  }), ke = () => {
1215
1215
  s("edit-tile", i.definition);
1216
1216
  }, Je = () => {
1217
1217
  s("duplicate-tile", i.definition);
1218
- }, mt = () => {
1218
+ }, pt = () => {
1219
1219
  s("remove-tile", i.definition);
1220
1220
  }, et = (v) => {
1221
1221
  l.value = v, y.value = !1;
1222
1222
  }, qe = (v) => {
1223
1223
  d.value = v;
1224
- }, pt = () => {
1224
+ }, yt = () => {
1225
1225
  qe(!0);
1226
1226
  }, si = (v) => {
1227
1227
  const H = {
@@ -1230,148 +1230,148 @@ const pe = {
1230
1230
  };
1231
1231
  s("tile-time-range-zoom", H);
1232
1232
  }, ri = (v) => {
1233
- const H = Ie.value, q = ne(v, H), j = C(v, H);
1234
- p.value = E.value ? { href: ge(q) } : void 0, g.value = L.value ? { href: le(j) } : void 0;
1233
+ const H = Ie.value, q = ie(v, H), X = _(v, H);
1234
+ p.value = z.value ? { href: te(q) } : void 0, g.value = x.value ? { href: F(X) } : void 0;
1235
1235
  };
1236
1236
  return (v, H) => {
1237
- const q = fe("KTooltip"), j = fe("KBadge"), V = fe("KDropdownItem"), yt = fe("KDropdown");
1238
- return z(), W("div", {
1237
+ const q = ge("KTooltip"), X = ge("KBadge"), Y = ge("KDropdownItem"), vt = ge("KDropdown");
1238
+ return k(), K("div", {
1239
1239
  class: Qe(["tile-boundary", { editable: v.context.editable }]),
1240
1240
  "data-testid": `tile-${v.tileId}`
1241
1241
  }, [
1242
- v.definition.chart.type !== "slottable" ? (z(), W("div", fs, [
1243
- re(q, {
1242
+ v.definition.chart.type !== "slottable" ? (k(), K("div", fs, [
1243
+ ae(q, {
1244
1244
  class: "title-tooltip",
1245
1245
  disabled: !f.value,
1246
1246
  "max-width": "500",
1247
1247
  text: v.definition.chart.chart_title
1248
1248
  }, {
1249
1249
  default: P(() => [
1250
- de("div", {
1250
+ ue("div", {
1251
1251
  ref_key: "titleRef",
1252
1252
  ref: a,
1253
1253
  class: "title"
1254
- }, ie(v.definition.chart.chart_title), 513)
1254
+ }, ne(v.definition.chart.chart_title), 513)
1255
1255
  ]),
1256
1256
  _: 1
1257
1257
  }, 8, ["disabled", "text"]),
1258
- Re.value ? (z(), W("div", {
1258
+ Re.value ? (k(), K("div", {
1259
1259
  key: 0,
1260
1260
  class: "tile-actions",
1261
1261
  "data-testid": `tile-actions-${v.tileId}`
1262
1262
  }, [
1263
- A.value ? (z(), M(j, {
1263
+ A.value ? (k(), M(X, {
1264
1264
  key: 0,
1265
1265
  "data-testid": "time-range-badge",
1266
- tooltip: ue.value ? Me.value : void 0,
1266
+ tooltip: ce.value ? Me.value : void 0,
1267
1267
  "tooltip-attributes": { maxWidth: "320px" }
1268
1268
  }, ht({
1269
1269
  default: P(() => [
1270
- de("span", ms, ie(A.value), 1)
1270
+ ue("span", ms, ne(A.value), 1)
1271
1271
  ]),
1272
1272
  _: 2
1273
1273
  }, [
1274
- ue.value ? {
1274
+ ce.value ? {
1275
1275
  name: "icon",
1276
1276
  fn: P(() => [
1277
- re(k(Ci), { size: k(ls) }, null, 8, ["size"])
1277
+ ae(R(Ci), { size: R(ls) }, null, 8, ["size"])
1278
1278
  ]),
1279
1279
  key: "0"
1280
1280
  } : void 0
1281
- ]), 1032, ["tooltip"])) : K("", !0),
1282
- k(w) && v.context.editable && !v.isFullscreen ? (z(), M(k(Ri), {
1281
+ ]), 1032, ["tooltip"])) : V("", !0),
1282
+ R(L) && v.context.editable && !v.isFullscreen ? (k(), M(R(Ri), {
1283
1283
  key: 1,
1284
1284
  class: "edit-icon",
1285
- color: k(Nt),
1285
+ color: R(Lt),
1286
1286
  "data-testid": `edit-tile-${v.tileId}`,
1287
- size: k(Lt),
1287
+ size: R(At),
1288
1288
  onClick: ke
1289
- }, null, 8, ["color", "data-testid", "size"])) : K("", !0),
1290
- k(w) && ee.value && !v.isFullscreen ? (z(), M(yt, {
1289
+ }, null, 8, ["color", "data-testid", "size"])) : V("", !0),
1290
+ R(L) && se.value && !v.isFullscreen ? (k(), M(vt, {
1291
1291
  key: 2,
1292
1292
  class: "dropdown",
1293
1293
  "data-testid": `chart-action-menu-${v.tileId}`,
1294
1294
  "kpop-attributes": { placement: "bottom-end" }
1295
1295
  }, {
1296
1296
  items: P(() => [
1297
- k(m) ? (z(), M(V, {
1297
+ R(m) ? (k(), M(Y, {
1298
1298
  key: 0,
1299
1299
  "data-testid": `chart-jump-to-explore-${v.tileId}`,
1300
- item: { label: k(h).t("jumpToExplore"), to: k(m) }
1301
- }, null, 8, ["data-testid", "item"])) : K("", !0),
1302
- k(n) && k(T) ? (z(), M(V, {
1300
+ item: { label: R(h).t("jumpToExplore"), to: R(m) }
1301
+ }, null, 8, ["data-testid", "item"])) : V("", !0),
1302
+ R(n) && R(T) ? (k(), M(Y, {
1303
1303
  key: 1,
1304
1304
  "data-testid": `chart-jump-to-requests-${v.tileId}`,
1305
- item: { label: k(h).t("jumpToRequests"), to: k(T) }
1306
- }, null, 8, ["data-testid", "item"])) : K("", !0),
1307
- !("allow_csv_export" in v.definition.chart) || v.definition.chart.allow_csv_export ? (z(), M(V, {
1305
+ item: { label: R(h).t("jumpToRequests"), to: R(T) }
1306
+ }, null, 8, ["data-testid", "item"])) : V("", !0),
1307
+ !("allow_csv_export" in v.definition.chart) || v.definition.chart.allow_csv_export ? (k(), M(Y, {
1308
1308
  key: 2,
1309
1309
  class: "chart-export-button",
1310
1310
  "data-testid": `chart-csv-export-${v.tileId}`,
1311
- onClick: H[0] || (H[0] = (vt) => pt())
1311
+ onClick: H[0] || (H[0] = (_t) => yt())
1312
1312
  }, {
1313
1313
  default: P(() => [
1314
- de("span", {
1314
+ ue("span", {
1315
1315
  class: "chart-export-trigger",
1316
1316
  "data-testid": `csv-export-button-${v.tileId}`
1317
- }, ie(k(h).t("csvExport.exportAsCsv")), 9, ps)
1317
+ }, ne(R(h).t("csvExport.exportAsCsv")), 9, ps)
1318
1318
  ]),
1319
1319
  _: 1
1320
- }, 8, ["data-testid"])) : K("", !0),
1321
- v.context.editable ? (z(), M(V, {
1320
+ }, 8, ["data-testid"])) : V("", !0),
1321
+ v.context.editable ? (k(), M(Y, {
1322
1322
  key: 3,
1323
1323
  "data-testid": `duplicate-tile-${v.tileId}`,
1324
1324
  onClick: Je
1325
1325
  }, {
1326
1326
  default: P(() => [
1327
- De(ie(k(h).t("renderer.duplicateTile")), 1)
1327
+ De(ne(R(h).t("renderer.duplicateTile")), 1)
1328
1328
  ]),
1329
1329
  _: 1
1330
- }, 8, ["data-testid"])) : K("", !0),
1331
- v.context.editable ? (z(), M(V, {
1330
+ }, 8, ["data-testid"])) : V("", !0),
1331
+ v.context.editable ? (k(), M(Y, {
1332
1332
  key: 4,
1333
1333
  "data-testid": `remove-tile-${v.tileId}`,
1334
- onClick: mt
1334
+ onClick: pt
1335
1335
  }, {
1336
1336
  default: P(() => [
1337
- de("span", ys, ie(k(h).t("renderer.delete")), 1)
1337
+ ue("span", ys, ne(R(h).t("renderer.delete")), 1)
1338
1338
  ]),
1339
1339
  _: 1
1340
- }, 8, ["data-testid"])) : K("", !0)
1340
+ }, 8, ["data-testid"])) : V("", !0)
1341
1341
  ]),
1342
1342
  default: P(() => [
1343
- re(k(ki), {
1343
+ ae(R(ki), {
1344
1344
  class: "kebab-action-menu",
1345
- color: k(Nt),
1345
+ color: R(Lt),
1346
1346
  "data-testid": `kebab-action-menu-${v.tileId}`,
1347
- size: k(Lt)
1347
+ size: R(At)
1348
1348
  }, null, 8, ["color", "data-testid", "size"])
1349
1349
  ]),
1350
1350
  _: 1
1351
- }, 8, ["data-testid"])) : K("", !0)
1352
- ], 8, gs)) : "description" in v.definition.chart ? (z(), W("div", {
1351
+ }, 8, ["data-testid"])) : V("", !0)
1352
+ ], 8, gs)) : "description" in v.definition.chart ? (k(), K("div", {
1353
1353
  key: 1,
1354
1354
  class: "header-description",
1355
1355
  "data-testid": `tile-description-${v.tileId}`
1356
- }, ie(v.definition.chart.description), 9, vs)) : K("", !0),
1357
- d.value ? (z(), M(k(_i), {
1356
+ }, ne(v.definition.chart.description), 9, vs)) : V("", !0),
1357
+ d.value ? (k(), M(R(_i), {
1358
1358
  key: 2,
1359
1359
  "chart-data": l.value,
1360
1360
  "data-testid": `csv-export-modal-${v.tileId}`,
1361
- filename: Ce.value,
1361
+ filename: me.value,
1362
1362
  onToggleModal: qe
1363
- }, null, 8, ["chart-data", "data-testid", "filename"])) : K("", !0)
1364
- ])) : K("", !0),
1365
- de("div", {
1363
+ }, null, 8, ["chart-data", "data-testid", "filename"])) : V("", !0)
1364
+ ])) : V("", !0),
1365
+ ue("div", {
1366
1366
  class: "tile-content",
1367
1367
  "data-testid": `tile-content-${v.tileId}`
1368
1368
  }, [
1369
- S.value ? (z(), M(Pt(S.value.component), It({ key: 0 }, S.value.rendererProps, di(R.value), { onChartData: et }), null, 16)) : K("", !0)
1369
+ N.value ? (k(), M($t(N.value.component), qt({ key: 0 }, N.value.rendererProps, di(C.value), { onChartData: et }), null, 16)) : V("", !0)
1370
1370
  ], 8, _s)
1371
1371
  ], 10, cs);
1372
1372
  };
1373
1373
  }
1374
- }), ws = /* @__PURE__ */ ye(bs, [["__scopeId", "data-v-c9bc38c8"]]), Es = (u, e) => {
1374
+ }), ws = /* @__PURE__ */ ve(bs, [["__scopeId", "data-v-c9bc38c8"]]), Es = (u, e) => {
1375
1375
  let t = 0;
1376
1376
  const i = /* @__PURE__ */ new Map();
1377
1377
  e.forEach((r) => {
@@ -1382,7 +1382,7 @@ const pe = {
1382
1382
  for (let r = 0; r < t; r++)
1383
1383
  i.get(r) ? s.push("auto") : s.push(`${u}px`);
1384
1384
  return s;
1385
- }, xs = /* @__PURE__ */ Q({
1385
+ }, xs = /* @__PURE__ */ j({
1386
1386
  __name: "GridLayout",
1387
1387
  props: {
1388
1388
  tileHeight: {
@@ -1397,7 +1397,7 @@ const pe = {
1397
1397
  },
1398
1398
  setup(u) {
1399
1399
  Ye((n) => ({
1400
- "2a38e79e": k(Kt),
1400
+ "2a38e79e": R(Kt),
1401
1401
  "4cc71de6": r.value
1402
1402
  }));
1403
1403
  const e = u, t = I(null), i = I(0), s = new ResizeObserver((n) => {
@@ -1410,7 +1410,7 @@ const pe = {
1410
1410
  }), at(() => {
1411
1411
  t.value && s.unobserve(t.value);
1412
1412
  });
1413
- const r = N(() => Es(e.tileHeight, e.tiles).join(" ")), o = N(() => e.tiles.map((n, h) => ({
1413
+ const r = D(() => Es(e.tileHeight, e.tiles).join(" ")), o = D(() => e.tiles.map((n, h) => ({
1414
1414
  key: `tile-${h}`,
1415
1415
  tile: n,
1416
1416
  style: {
@@ -1420,26 +1420,26 @@ const pe = {
1420
1420
  "grid-row-end": n.layout.position.row + 1 + n.layout.size.rows
1421
1421
  }
1422
1422
  })));
1423
- return (n, h) => (z(), W("div", {
1423
+ return (n, h) => (k(), K("div", {
1424
1424
  ref_key: "gridContainer",
1425
1425
  ref: t,
1426
1426
  class: "kong-ui-public-grid-layout"
1427
1427
  }, [
1428
- (z(!0), W($t, null, Ft(o.value, (l) => (z(), W("div", {
1428
+ (k(!0), K(Ft, null, Gt(o.value, (l) => (k(), K("div", {
1429
1429
  key: l.key,
1430
1430
  class: Qe(["grid-cell", {
1431
1431
  "empty-cell": !l.tile
1432
1432
  }]),
1433
- style: Et(l.style)
1433
+ style: xt(l.style)
1434
1434
  }, [
1435
1435
  ze(n.$slots, "tile", {
1436
- style: Et(l.style),
1436
+ style: xt(l.style),
1437
1437
  tile: l.tile
1438
1438
  }, void 0, !0)
1439
1439
  ], 6))), 128))
1440
1440
  ], 512));
1441
1441
  }
1442
- }), Cs = /* @__PURE__ */ ye(xs, [["__scopeId", "data-v-354b7177"]]);
1442
+ }), Cs = /* @__PURE__ */ ve(xs, [["__scopeId", "data-v-354b7177"]]);
1443
1443
  function Rs(u, e, t, i, s) {
1444
1444
  const r = (...o) => (console.warn("gridstack.js: Function `" + t + "` is deprecated in " + s + " and has been replaced with `" + i + "`. It will be **removed** in a future release"), e.apply(u, o));
1445
1445
  return r.prototype = e.prototype, r;
@@ -1780,7 +1780,7 @@ class c {
1780
1780
  return !(!e || e.w === e.h || e.locked || e.noResize || (t = e.grid) != null && t.opts.disableResize || e.minW && e.minW === e.maxW || e.minH && e.minH === e.maxH);
1781
1781
  }
1782
1782
  }
1783
- class oe {
1783
+ class le {
1784
1784
  constructor(e = {}) {
1785
1785
  this.addedNodes = [], this.removedNodes = [], this.defaultColumn = 12, this.column = e.column || this.defaultColumn, this.column > this.defaultColumn && (this.defaultColumn = this.column), this.maxRow = e.maxRow, this._float = e.float, this.nodes = e.nodes || [], this.onChange = e.onChange;
1786
1786
  }
@@ -1958,7 +1958,7 @@ class oe {
1958
1958
  * @param resizing if out of bound, resize down or move into the grid to fit ?
1959
1959
  */
1960
1960
  prepareNode(e, t) {
1961
- e._id = e._id ?? oe._idSeq++;
1961
+ e._id = e._id ?? le._idSeq++;
1962
1962
  const i = e.id;
1963
1963
  if (i) {
1964
1964
  let r = 1;
@@ -2053,7 +2053,7 @@ class oe {
2053
2053
  if (t.pack = !0, !this.maxRow)
2054
2054
  return this.moveNode(e, t);
2055
2055
  let i;
2056
- const s = new oe({
2056
+ const s = new le({
2057
2057
  column: this.column,
2058
2058
  float: this.float,
2059
2059
  nodes: this.nodes.map((o) => o._id === e._id ? (i = { ...o }, i) : { ...o })
@@ -2075,7 +2075,7 @@ class oe {
2075
2075
  willItFit(e) {
2076
2076
  if (delete e._willFitPos, !this.maxRow)
2077
2077
  return !0;
2078
- const t = new oe({
2078
+ const t = new le({
2079
2079
  column: this.column,
2080
2080
  float: this.float,
2081
2081
  nodes: this.nodes.map((s) => ({ ...s }))
@@ -2211,7 +2211,7 @@ class oe {
2211
2211
  return e.forEach((r, o) => {
2212
2212
  if (r._id === void 0) {
2213
2213
  const n = r.id ? this.nodes.find((h) => h.id === r.id) : void 0;
2214
- r._id = (n == null ? void 0 : n._id) ?? oe._idSeq++;
2214
+ r._id = (n == null ? void 0 : n._id) ?? le._idSeq++;
2215
2215
  }
2216
2216
  s[o] = { x: r.x, y: r.y, w: r.w, _id: r._id };
2217
2217
  }), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = s, this;
@@ -2222,7 +2222,7 @@ class oe {
2222
2222
  * @param column corresponding column index to save it under
2223
2223
  */
2224
2224
  cacheOneLayout(e, t) {
2225
- e._id = e._id ?? oe._idSeq++;
2225
+ e._id = e._id ?? le._idSeq++;
2226
2226
  const i = { x: e.x, y: e.y, w: e.w, _id: e._id };
2227
2227
  (e.autoPosition || e.x === void 0) && (delete i.x, delete i.y, e.autoPosition && (i.autoPosition = !0)), this._layouts = this._layouts || [], this._layouts[t] = this._layouts[t] || [];
2228
2228
  const s = this.findCacheLayout(e, t);
@@ -2246,8 +2246,8 @@ class oe {
2246
2246
  return this;
2247
2247
  }
2248
2248
  }
2249
- oe._idSeq = 0;
2250
- const Y = {
2249
+ le._idSeq = 0;
2250
+ const Q = {
2251
2251
  alwaysShowResizeHandle: "mobile",
2252
2252
  animate: !0,
2253
2253
  auto: !0,
@@ -2277,10 +2277,10 @@ const Y = {
2277
2277
  // styleInHead: false,
2278
2278
  //removable
2279
2279
  };
2280
- class x {
2280
+ class E {
2281
2281
  }
2282
- const se = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
2283
- class ae {
2282
+ const oe = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
2283
+ class he {
2284
2284
  }
2285
2285
  function Ge(u, e) {
2286
2286
  u.touches.length > 1 || (u.cancelable && u.preventDefault(), c.simulateMouseEvent(u.changedTouches[0], e));
@@ -2289,27 +2289,27 @@ function ii(u, e) {
2289
2289
  u.cancelable && u.preventDefault(), c.simulateMouseEvent(u, e);
2290
2290
  }
2291
2291
  function Ue(u) {
2292
- ae.touchHandled || (ae.touchHandled = !0, Ge(u, "mousedown"));
2292
+ he.touchHandled || (he.touchHandled = !0, Ge(u, "mousedown"));
2293
2293
  }
2294
2294
  function Be(u) {
2295
- ae.touchHandled && Ge(u, "mousemove");
2295
+ he.touchHandled && Ge(u, "mousemove");
2296
2296
  }
2297
2297
  function We(u) {
2298
- if (!ae.touchHandled)
2298
+ if (!he.touchHandled)
2299
2299
  return;
2300
- ae.pointerLeaveTimeout && (window.clearTimeout(ae.pointerLeaveTimeout), delete ae.pointerLeaveTimeout);
2301
- const e = !!x.dragElement;
2302
- Ge(u, "mouseup"), e || Ge(u, "click"), ae.touchHandled = !1;
2300
+ he.pointerLeaveTimeout && (window.clearTimeout(he.pointerLeaveTimeout), delete he.pointerLeaveTimeout);
2301
+ const e = !!E.dragElement;
2302
+ Ge(u, "mouseup"), e || Ge(u, "click"), he.touchHandled = !1;
2303
2303
  }
2304
2304
  function Ke(u) {
2305
2305
  u.pointerType !== "mouse" && u.target.releasePointerCapture(u.pointerId);
2306
2306
  }
2307
- function Ht(u) {
2308
- x.dragElement && u.pointerType !== "mouse" && ii(u, "mouseenter");
2309
- }
2310
2307
  function Ot(u) {
2311
- x.dragElement && u.pointerType !== "mouse" && (ae.pointerLeaveTimeout = window.setTimeout(() => {
2312
- delete ae.pointerLeaveTimeout, ii(u, "mouseleave");
2308
+ E.dragElement && u.pointerType !== "mouse" && ii(u, "mouseenter");
2309
+ }
2310
+ function Mt(u) {
2311
+ E.dragElement && u.pointerType !== "mouse" && (he.pointerLeaveTimeout = window.setTimeout(() => {
2312
+ delete he.pointerLeaveTimeout, ii(u, "mouseleave");
2313
2313
  }, 10));
2314
2314
  }
2315
2315
  class Xe {
@@ -2319,15 +2319,15 @@ class Xe {
2319
2319
  /** @internal */
2320
2320
  _init() {
2321
2321
  const e = this.el = document.createElement("div");
2322
- return e.classList.add("ui-resizable-handle"), e.classList.add(`${Xe.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), se && (this.el.addEventListener("touchstart", Ue), this.el.addEventListener("pointerdown", Ke)), this;
2322
+ return e.classList.add("ui-resizable-handle"), e.classList.add(`${Xe.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), oe && (this.el.addEventListener("touchstart", Ue), this.el.addEventListener("pointerdown", Ke)), this;
2323
2323
  }
2324
2324
  /** call this when resize handle needs to be removed and cleaned up */
2325
2325
  destroy() {
2326
- return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), se && (this.el.removeEventListener("touchstart", Ue), this.el.removeEventListener("pointerdown", Ke)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
2326
+ return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), oe && (this.el.removeEventListener("touchstart", Ue), this.el.removeEventListener("pointerdown", Ke)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
2327
2327
  }
2328
2328
  /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
2329
2329
  _mouseDown(e) {
2330
- this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), se && (this.el.addEventListener("touchmove", Be), this.el.addEventListener("touchend", We)), e.stopPropagation(), e.preventDefault();
2330
+ this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), oe && (this.el.addEventListener("touchmove", Be), this.el.addEventListener("touchend", We)), e.stopPropagation(), e.preventDefault();
2331
2331
  }
2332
2332
  /** @internal */
2333
2333
  _mouseMove(e) {
@@ -2336,7 +2336,7 @@ class Xe {
2336
2336
  }
2337
2337
  /** @internal */
2338
2338
  _mouseUp(e) {
2339
- this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), se && (this.el.removeEventListener("touchmove", Be), this.el.removeEventListener("touchend", We)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2339
+ this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), oe && (this.el.removeEventListener("touchmove", Be), this.el.removeEventListener("touchend", We)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2340
2340
  }
2341
2341
  /** @internal call when keys are being pressed - use Esc to cancel */
2342
2342
  _keyEvent(e) {
@@ -2349,7 +2349,7 @@ class Xe {
2349
2349
  }
2350
2350
  }
2351
2351
  Xe.prefix = "ui-resizable-";
2352
- class ft {
2352
+ class gt {
2353
2353
  constructor() {
2354
2354
  this._eventRegister = {};
2355
2355
  }
@@ -2377,7 +2377,7 @@ class ft {
2377
2377
  return this._eventRegister[e](t);
2378
2378
  }
2379
2379
  }
2380
- class Se extends ft {
2380
+ class Se extends gt {
2381
2381
  // have to be public else complains for HTMLElementExtendOpt ?
2382
2382
  constructor(e, t = {}) {
2383
2383
  super(), this.el = e, this.option = t, this.rectScale = { x: 1, y: 1 }, this._ui = () => {
@@ -2433,17 +2433,17 @@ class Se extends ft {
2433
2433
  }
2434
2434
  /** @internal turns auto hide on/off */
2435
2435
  _setupAutoHide(e) {
2436
- return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), x.overResizeElement === this && delete x.overResizeElement), this;
2436
+ return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), E.overResizeElement === this && delete E.overResizeElement), this;
2437
2437
  }
2438
2438
  /** @internal */
2439
2439
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2440
2440
  _mouseOver(e) {
2441
- x.overResizeElement || x.dragElement || (x.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
2441
+ E.overResizeElement || E.dragElement || (E.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
2442
2442
  }
2443
2443
  /** @internal */
2444
2444
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2445
2445
  _mouseOut(e) {
2446
- x.overResizeElement === this && (delete x.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
2446
+ E.overResizeElement === this && (delete E.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
2447
2447
  }
2448
2448
  /** @internal */
2449
2449
  _setupHandlers() {
@@ -2528,7 +2528,7 @@ class Se extends ft {
2528
2528
  }
2529
2529
  Se._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
2530
2530
  const ks = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
2531
- class Ne extends ft {
2531
+ class Ne extends gt {
2532
2532
  constructor(e, t = {}) {
2533
2533
  var r;
2534
2534
  super(), this.el = e, this.option = t, this.dragTransform = {
@@ -2548,12 +2548,12 @@ class Ne extends ft {
2548
2548
  }
2549
2549
  enable() {
2550
2550
  this.disabled !== !1 && (super.enable(), this.dragEls.forEach((e) => {
2551
- e.addEventListener("mousedown", this._mouseDown), se && (e.addEventListener("touchstart", Ue), e.addEventListener("pointerdown", Ke));
2551
+ e.addEventListener("mousedown", this._mouseDown), oe && (e.addEventListener("touchstart", Ue), e.addEventListener("pointerdown", Ke));
2552
2552
  }), this.el.classList.remove("ui-draggable-disabled"));
2553
2553
  }
2554
2554
  disable(e = !1) {
2555
2555
  this.disabled !== !0 && (super.disable(), this.dragEls.forEach((t) => {
2556
- t.removeEventListener("mousedown", this._mouseDown), se && (t.removeEventListener("touchstart", Ue), t.removeEventListener("pointerdown", Ke));
2556
+ t.removeEventListener("mousedown", this._mouseDown), oe && (t.removeEventListener("touchstart", Ue), t.removeEventListener("pointerdown", Ke));
2557
2557
  }), e || this.el.classList.add("ui-draggable-disabled"));
2558
2558
  }
2559
2559
  destroy() {
@@ -2564,8 +2564,8 @@ class Ne extends ft {
2564
2564
  }
2565
2565
  /** @internal call when mouse goes down before a dragstart happens */
2566
2566
  _mouseDown(e) {
2567
- if (!x.mouseHandled)
2568
- return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(ks) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete x.dragElement, delete x.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), se && (e.currentTarget.addEventListener("touchmove", Be), e.currentTarget.addEventListener("touchend", We)), e.preventDefault(), document.activeElement && document.activeElement.blur(), x.mouseHandled = !0), !0;
2567
+ if (!E.mouseHandled)
2568
+ return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(ks) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete E.dragElement, delete E.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), oe && (e.currentTarget.addEventListener("touchmove", Be), e.currentTarget.addEventListener("touchend", We)), e.preventDefault(), document.activeElement && document.activeElement.blur(), E.mouseHandled = !0), !0;
2569
2569
  }
2570
2570
  /** @internal method to call actual drag event */
2571
2571
  _callDrag(e) {
@@ -2579,15 +2579,15 @@ class Ne extends ft {
2579
2579
  var i;
2580
2580
  const t = this.mouseDownEvent;
2581
2581
  if (this.lastDrag = e, this.dragging)
2582
- if (this._dragFollow(e), x.pauseDrag) {
2583
- const s = Number.isInteger(x.pauseDrag) ? x.pauseDrag : 100;
2582
+ if (this._dragFollow(e), E.pauseDrag) {
2583
+ const s = Number.isInteger(E.pauseDrag) ? E.pauseDrag : 100;
2584
2584
  this.dragTimeout && window.clearTimeout(this.dragTimeout), this.dragTimeout = window.setTimeout(() => this._callDrag(e), s);
2585
2585
  } else
2586
2586
  this._callDrag(e);
2587
2587
  else if (Math.abs(e.x - t.x) + Math.abs(e.y - t.y) > 3) {
2588
- this.dragging = !0, x.dragElement = this;
2588
+ this.dragging = !0, E.dragElement = this;
2589
2589
  const s = (i = this.el.gridstackNode) == null ? void 0 : i.grid;
2590
- s ? x.dropElement = s.el.ddElement.ddDroppable : delete x.dropElement, this.helper = this._createHelper(), this._setupHelperContainmentStyle(), this.dragTransform = c.getValuesFromTransformedElement(this.helperContainment), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment), this._setupHelperStyle(e);
2590
+ s ? E.dropElement = s.el.ddElement.ddDroppable : delete E.dropElement, this.helper = this._createHelper(), this._setupHelperContainmentStyle(), this.dragTransform = c.getValuesFromTransformedElement(this.helperContainment), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment), this._setupHelperStyle(e);
2591
2591
  const r = c.initEvent(e, { target: this.el, type: "dragstart" });
2592
2592
  this.option.start && this.option.start(r, this.ui()), this.triggerEvent("dragstart", r), document.addEventListener("keydown", this._keyEvent);
2593
2593
  }
@@ -2596,17 +2596,17 @@ class Ne extends ft {
2596
2596
  /** @internal call when the mouse gets released to drop the item at current location */
2597
2597
  _mouseUp(e) {
2598
2598
  var t, i;
2599
- if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), se && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", Be, !0), e.currentTarget.removeEventListener("touchend", We, !0)), this.dragging) {
2600
- delete this.dragging, (t = this.el.gridstackNode) == null || delete t._origRotate, document.removeEventListener("keydown", this._keyEvent), ((i = x.dropElement) == null ? void 0 : i.el) === this.el.parentElement && delete x.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
2599
+ if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), oe && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", Be, !0), e.currentTarget.removeEventListener("touchend", We, !0)), this.dragging) {
2600
+ delete this.dragging, (t = this.el.gridstackNode) == null || delete t._origRotate, document.removeEventListener("keydown", this._keyEvent), ((i = E.dropElement) == null ? void 0 : i.el) === this.el.parentElement && delete E.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
2601
2601
  const s = c.initEvent(e, { target: this.el, type: "dragstop" });
2602
- this.option.stop && this.option.stop(s), this.triggerEvent("dragstop", s), x.dropElement && x.dropElement.drop(e);
2602
+ this.option.stop && this.option.stop(s), this.triggerEvent("dragstop", s), E.dropElement && E.dropElement.drop(e);
2603
2603
  }
2604
- delete this.helper, delete this.mouseDownEvent, delete x.dragElement, delete x.dropElement, delete x.mouseHandled, e.preventDefault();
2604
+ delete this.helper, delete this.mouseDownEvent, delete E.dragElement, delete E.dropElement, delete E.mouseHandled, e.preventDefault();
2605
2605
  }
2606
2606
  /** @internal call when keys are being pressed - use Esc to cancel, R to rotate */
2607
2607
  _keyEvent(e) {
2608
2608
  var s, r;
2609
- const t = this.el.gridstackNode, i = (t == null ? void 0 : t.grid) || ((r = (s = x.dropElement) == null ? void 0 : s.el) == null ? void 0 : r.gridstack);
2609
+ const t = this.el.gridstackNode, i = (t == null ? void 0 : t.grid) || ((r = (s = E.dropElement) == null ? void 0 : s.el) == null ? void 0 : r.gridstack);
2610
2610
  if (e.key === "Escape")
2611
2611
  t && t._origRotate && (t._orig = t._origRotate, delete t._origRotate), i == null || i.cancelDrag(), this._mouseUp(this.mouseDownEvent);
2612
2612
  else if (t && i && (e.key === "r" || e.key === "R")) {
@@ -2678,7 +2678,7 @@ class Ne extends ft {
2678
2678
  }
2679
2679
  }
2680
2680
  Ne.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
2681
- class Ts extends ft {
2681
+ class Ts extends gt {
2682
2682
  constructor(e, t = {}) {
2683
2683
  super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
2684
2684
  }
@@ -2689,10 +2689,10 @@ class Ts extends ft {
2689
2689
  super.off(e);
2690
2690
  }
2691
2691
  enable() {
2692
- this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), se && (this.el.addEventListener("pointerenter", Ht), this.el.addEventListener("pointerleave", Ot)));
2692
+ this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), oe && (this.el.addEventListener("pointerenter", Ot), this.el.addEventListener("pointerleave", Mt)));
2693
2693
  }
2694
2694
  disable(e = !1) {
2695
- this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), se && (this.el.removeEventListener("pointerenter", Ht), this.el.removeEventListener("pointerleave", Ot)));
2695
+ this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), oe && (this.el.removeEventListener("pointerenter", Ot), this.el.removeEventListener("pointerleave", Mt)));
2696
2696
  }
2697
2697
  destroy() {
2698
2698
  this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
@@ -2702,20 +2702,20 @@ class Ts extends ft {
2702
2702
  }
2703
2703
  /** @internal called when the cursor enters our area - prepare for a possible drop and track leaving */
2704
2704
  _mouseEnter(e) {
2705
- if (!x.dragElement || !this._canDrop(x.dragElement.el))
2705
+ if (!E.dragElement || !this._canDrop(E.dragElement.el))
2706
2706
  return;
2707
- e.preventDefault(), e.stopPropagation(), x.dropElement && x.dropElement !== this && x.dropElement._mouseLeave(e, !0), x.dropElement = this;
2707
+ e.preventDefault(), e.stopPropagation(), E.dropElement && E.dropElement !== this && E.dropElement._mouseLeave(e, !0), E.dropElement = this;
2708
2708
  const t = c.initEvent(e, { target: this.el, type: "dropover" });
2709
- this.option.over && this.option.over(t, this._ui(x.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
2709
+ this.option.over && this.option.over(t, this._ui(E.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
2710
2710
  }
2711
2711
  /** @internal called when the item is leaving our area, stop tracking if we had moving item */
2712
2712
  _mouseLeave(e, t = !1) {
2713
2713
  var s;
2714
- if (!x.dragElement || x.dropElement !== this)
2714
+ if (!E.dragElement || E.dropElement !== this)
2715
2715
  return;
2716
2716
  e.preventDefault(), e.stopPropagation();
2717
2717
  const i = c.initEvent(e, { target: this.el, type: "dropout" });
2718
- if (this.option.out && this.option.out(i, this._ui(x.dragElement)), this.triggerEvent("dropout", i), x.dropElement === this && (delete x.dropElement, !t)) {
2718
+ if (this.option.out && this.option.out(i, this._ui(E.dragElement)), this.triggerEvent("dropout", i), E.dropElement === this && (delete E.dropElement, !t)) {
2719
2719
  let r, o = this.el.parentElement;
2720
2720
  for (; !r && o; )
2721
2721
  r = (s = o.ddElement) == null ? void 0 : s.ddDroppable, o = o.parentElement;
@@ -2726,7 +2726,7 @@ class Ts extends ft {
2726
2726
  drop(e) {
2727
2727
  e.preventDefault();
2728
2728
  const t = c.initEvent(e, { target: this.el, type: "drop" });
2729
- this.option.drop && this.option.drop(t, this._ui(x.dragElement)), this.triggerEvent("drop", t);
2729
+ this.option.drop && this.option.drop(t, this._ui(E.dragElement)), this.triggerEvent("drop", t);
2730
2730
  }
2731
2731
  /** @internal true if element matches the string/method accept option */
2732
2732
  _canDrop(e) {
@@ -2744,9 +2744,9 @@ class Ts extends ft {
2744
2744
  };
2745
2745
  }
2746
2746
  }
2747
- class gt {
2747
+ class mt {
2748
2748
  static init(e) {
2749
- return e.ddElement || (e.ddElement = new gt(e)), e.ddElement;
2749
+ return e.ddElement || (e.ddElement = new mt(e)), e.ddElement;
2750
2750
  }
2751
2751
  constructor(e) {
2752
2752
  this.el = e;
@@ -2846,7 +2846,7 @@ class zs {
2846
2846
  }
2847
2847
  on(e, t, i) {
2848
2848
  return this._getDDElements(e).forEach((s) => s.on(t, (r) => {
2849
- i(r, x.dragElement ? x.dragElement.el : r.target, x.dragElement ? x.dragElement.helper : null);
2849
+ i(r, E.dragElement ? E.dragElement.el : r.target, E.dragElement ? E.dragElement.helper : null);
2850
2850
  })), this;
2851
2851
  }
2852
2852
  off(e, t) {
@@ -2855,7 +2855,7 @@ class zs {
2855
2855
  /** @internal returns a list of DD elements, creating them on the fly by default unless option is to destroy or disable */
2856
2856
  _getDDElements(e, t) {
2857
2857
  const i = e.gridstack || t !== "destroy" && t !== "disable", s = c.getElements(e);
2858
- return s.length ? s.map((o) => o.ddElement || (i ? gt.init(o) : null)).filter((o) => o) : [];
2858
+ return s.length ? s.map((o) => o.ddElement || (i ? mt.init(o) : null)).filter((o) => o) : [];
2859
2859
  }
2860
2860
  }
2861
2861
  /*!
@@ -2865,8 +2865,8 @@ class zs {
2865
2865
  * Copyright (c) 2021-2024 Alain Dumesny
2866
2866
  * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
2867
2867
  */
2868
- const U = new zs();
2869
- class b {
2868
+ const B = new zs();
2869
+ class w {
2870
2870
  /**
2871
2871
  * initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
2872
2872
  * simply return the existing instance (ignore any passed options). There is also an initAll() version that support
@@ -2883,8 +2883,8 @@ class b {
2883
2883
  static init(e = {}, t = ".grid-stack") {
2884
2884
  if (typeof document > "u")
2885
2885
  return null;
2886
- const i = b.getGridElement(t);
2887
- return i ? (i.gridstack || (i.gridstack = new b(i, c.cloneDeep(e))), i.gridstack) : (console.error(typeof t == "string" ? 'GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
2886
+ const i = w.getGridElement(t);
2887
+ return i ? (i.gridstack || (i.gridstack = new w(i, c.cloneDeep(e))), i.gridstack) : (console.error(typeof t == "string" ? 'GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
2888
2888
  Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.` : "GridStack.init() no grid element was passed."), null);
2889
2889
  }
2890
2890
  /**
@@ -2898,8 +2898,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2898
2898
  */
2899
2899
  static initAll(e = {}, t = ".grid-stack") {
2900
2900
  const i = [];
2901
- return typeof document > "u" || (b.getGridElements(t).forEach((s) => {
2902
- s.gridstack || (s.gridstack = new b(s, c.cloneDeep(e))), i.push(s.gridstack);
2901
+ return typeof document > "u" || (w.getGridElements(t).forEach((s) => {
2902
+ s.gridstack || (s.gridstack = new w(s, c.cloneDeep(e))), i.push(s.gridstack);
2903
2903
  }), i.length === 0 && console.error('GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
2904
2904
  Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)), i;
2905
2905
  }
@@ -2918,19 +2918,19 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2918
2918
  const o = i.gridstack;
2919
2919
  return t && (o.opts = { ...o.opts, ...t }), t.children !== void 0 && o.load(t.children), o;
2920
2920
  }
2921
- return (!e.classList.contains("grid-stack") || b.addRemoveCB) && (b.addRemoveCB ? i = b.addRemoveCB(e, t, !0, !0) : i = c.createDiv(["grid-stack", t.class], e)), b.init(t, i);
2921
+ return (!e.classList.contains("grid-stack") || w.addRemoveCB) && (w.addRemoveCB ? i = w.addRemoveCB(e, t, !0, !0) : i = c.createDiv(["grid-stack", t.class], e)), w.init(t, i);
2922
2922
  }
2923
2923
  /** call this method to register your engine instead of the default one.
2924
2924
  * See instead `GridStackOptions.engineClass` if you only need to
2925
2925
  * replace just one instance.
2926
2926
  */
2927
2927
  static registerEngine(e) {
2928
- b.engineClass = e;
2928
+ w.engineClass = e;
2929
2929
  }
2930
2930
  /** @internal create placeholder DIV as needed */
2931
2931
  get placeholder() {
2932
2932
  if (!this._placeholder) {
2933
- this._placeholder = c.createDiv([this.opts.placeholderClass, Y.itemClass, this.opts.itemClass]);
2933
+ this._placeholder = c.createDiv([this.opts.placeholderClass, Q.itemClass, this.opts.itemClass]);
2934
2934
  const e = c.createDiv(["placeholder-content"], this._placeholder);
2935
2935
  this.opts.placeholderText && (e.textContent = this.opts.placeholderText);
2936
2936
  }
@@ -2957,24 +2957,24 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2957
2957
  const o = t.columnOpts;
2958
2958
  o && (!o.columnWidth && !((f = o.breakpoints) != null && f.length) ? (delete t.columnOpts, s = void 0) : o.columnMax = o.columnMax || 12), (s == null ? void 0 : s.length) > 1 && s.sort((g, y) => (y.w || 0) - (g.w || 0));
2959
2959
  const n = {
2960
- ...c.cloneDeep(Y),
2961
- column: c.toNumber(e.getAttribute("gs-column")) || Y.column,
2962
- minRow: i || c.toNumber(e.getAttribute("gs-min-row")) || Y.minRow,
2963
- maxRow: i || c.toNumber(e.getAttribute("gs-max-row")) || Y.maxRow,
2964
- staticGrid: c.toBool(e.getAttribute("gs-static")) || Y.staticGrid,
2960
+ ...c.cloneDeep(Q),
2961
+ column: c.toNumber(e.getAttribute("gs-column")) || Q.column,
2962
+ minRow: i || c.toNumber(e.getAttribute("gs-min-row")) || Q.minRow,
2963
+ maxRow: i || c.toNumber(e.getAttribute("gs-max-row")) || Q.maxRow,
2964
+ staticGrid: c.toBool(e.getAttribute("gs-static")) || Q.staticGrid,
2965
2965
  sizeToContent: c.toBool(e.getAttribute("gs-size-to-content")) || void 0,
2966
2966
  draggable: {
2967
- handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || Y.draggable.handle
2967
+ handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || Q.draggable.handle
2968
2968
  },
2969
2969
  removableOptions: {
2970
- accept: t.itemClass || Y.removableOptions.accept,
2971
- decline: Y.removableOptions.decline
2970
+ accept: t.itemClass || Q.removableOptions.accept,
2971
+ decline: Q.removableOptions.decline
2972
2972
  }
2973
2973
  };
2974
2974
  e.getAttribute("gs-animate") && (n.animate = c.toBool(e.getAttribute("gs-animate"))), t = c.defaults(t, n), this._initMargin(), this.checkDynamicColumn(), this.el.classList.add("gs-" + t.column), t.rtl === "auto" && (t.rtl = e.style.direction === "rtl"), t.rtl && this.el.classList.add("grid-stack-rtl");
2975
- const h = this.el.closest("." + Y.itemClass), l = h == null ? void 0 : h.gridstackNode;
2976
- l && (l.subGrid = this, this.parentGridNode = l, this.el.classList.add("grid-stack-nested"), l.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== Y.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = se), this._styleSheetClass = "gs-id-" + oe._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
2977
- const d = t.engineClass || b.engineClass || oe;
2975
+ const h = this.el.closest("." + Q.itemClass), l = h == null ? void 0 : h.gridstackNode;
2976
+ l && (l.subGrid = this, this.parentGridNode = l, this.el.classList.add("grid-stack-nested"), l.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== Q.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = oe), this._styleSheetClass = "gs-id-" + le._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
2977
+ const d = t.engineClass || w.engineClass || le;
2978
2978
  if (this.engine = new d({
2979
2979
  column: this.getColumn(),
2980
2980
  float: t.float,
@@ -2992,7 +2992,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2992
2992
  const g = t.children;
2993
2993
  delete t.children, g.length && this.load(g);
2994
2994
  }
2995
- this.setAnimation(), t.subGridDynamic && !x.pauseDrag && (x.pauseDrag = !0), ((p = t.draggable) == null ? void 0 : p.pause) !== void 0 && (x.pauseDrag = t.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
2995
+ this.setAnimation(), t.subGridDynamic && !E.pauseDrag && (E.pauseDrag = !0), ((p = t.draggable) == null ? void 0 : p.pause) !== void 0 && (E.pauseDrag = t.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
2996
2996
  }
2997
2997
  /**
2998
2998
  * add a new widget and returns it.
@@ -3015,7 +3015,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3015
3015
  if (e.ELEMENT_NODE)
3016
3016
  return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"), this.makeWidget(e);
3017
3017
  let t, i = e;
3018
- if (i.grid = this, i != null && i.el ? t = i.el : b.addRemoveCB ? t = b.addRemoveCB(this.el, e, !0, !1) : t = this.createWidgetDivs(i), !t)
3018
+ if (i.grid = this, i != null && i.el ? t = i.el : w.addRemoveCB ? t = w.addRemoveCB(this.el, e, !0, !1) : t = this.createWidgetDivs(i), !t)
3019
3019
  return;
3020
3020
  if (i = t.gridstackNode, i && t.parentElement === this.el && this.engine.nodes.find((r) => r._id === i._id))
3021
3021
  return t;
@@ -3027,11 +3027,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3027
3027
  const t = c.createDiv(["grid-stack-item", this.opts.itemClass]), i = c.createDiv(["grid-stack-item-content"], t);
3028
3028
  return c.lazyLoad(e) ? e.visibleObservable || (e.visibleObservable = new IntersectionObserver(([s]) => {
3029
3029
  var r, o;
3030
- s.isIntersecting && ((r = e.visibleObservable) == null || r.disconnect(), delete e.visibleObservable, b.renderCB(i, e), (o = e.grid) == null || o.prepareDragDrop(e.el));
3030
+ s.isIntersecting && ((r = e.visibleObservable) == null || r.disconnect(), delete e.visibleObservable, w.renderCB(i, e), (o = e.grid) == null || o.prepareDragDrop(e.el));
3031
3031
  }), window.setTimeout(() => {
3032
3032
  var s;
3033
3033
  return (s = e.visibleObservable) == null ? void 0 : s.observe(t);
3034
- })) : b.renderCB(i, e), t;
3034
+ })) : w.renderCB(i, e), t;
3035
3035
  }
3036
3036
  /**
3037
3037
  * Convert an existing gridItem element into a sub-grid with the given (optional) options, else inherit them
@@ -3065,11 +3065,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3065
3065
  let h;
3066
3066
  t.column === "auto" && (h = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), delete t.columnOpts);
3067
3067
  let l = r.el.querySelector(".grid-stack-item-content"), d, a;
3068
- if (s && (this._removeDD(r.el), a = { ...r, x: 0, y: 0 }, c.removeInternalForSave(a), delete a.subGridOpts, r.content && (a.content = r.content, delete r.content), b.addRemoveCB ? d = b.addRemoveCB(this.el, a, !0, !1) : (d = c.createDiv(["grid-stack-item"]), d.appendChild(l), l = c.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
3069
- const m = h ? t.column : r.w, T = r.h + i.h, w = r.el.style;
3070
- w.transition = "none", this.update(r.el, { w: m, h: T }), setTimeout(() => w.transition = null);
3068
+ if (s && (this._removeDD(r.el), a = { ...r, x: 0, y: 0 }, c.removeInternalForSave(a), delete a.subGridOpts, r.content && (a.content = r.content, delete r.content), w.addRemoveCB ? d = w.addRemoveCB(this.el, a, !0, !1) : (d = c.createDiv(["grid-stack-item"]), d.appendChild(l), l = c.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
3069
+ const m = h ? t.column : r.w, T = r.h + i.h, L = r.el.style;
3070
+ L.transition = "none", this.update(r.el, { w: m, h: T }), setTimeout(() => L.transition = null);
3071
3071
  }
3072
- const f = r.subGrid = b.addGrid(l, t);
3072
+ const f = r.subGrid = w.addGrid(l, t);
3073
3073
  return i != null && i._moving && (f._isTemp = !0), h && (f._autoColumn = !0), s && f.makeWidget(d, a), i && (i._moving ? window.setTimeout(() => c.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
3074
3074
  }
3075
3075
  /**
@@ -3092,7 +3092,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3092
3092
  * @param saveCB callback for each node -> widget, so application can insert additional data to be saved into the widget data structure.
3093
3093
  * @returns list of widgets or full grid option, including .children list of widgets
3094
3094
  */
3095
- save(e = !0, t = !1, i = b.saveCB) {
3095
+ save(e = !0, t = !1, i = w.saveCB) {
3096
3096
  const s = this.engine.save(e, i);
3097
3097
  if (s.forEach((r) => {
3098
3098
  var o;
@@ -3108,7 +3108,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3108
3108
  const r = c.cloneDeep(this.opts);
3109
3109
  r.marginBottom === r.marginTop && r.marginRight === r.marginLeft && r.marginTop === r.marginRight && (r.margin = r.marginTop, delete r.marginTop, delete r.marginRight, delete r.marginBottom, delete r.marginLeft), r.rtl === (this.el.style.direction === "rtl") && (r.rtl = "auto"), this._isAutoCellHeight && (r.cellHeight = "auto"), this._autoColumn && (r.column = "auto");
3110
3110
  const o = r._alwaysShowResizeHandle;
3111
- return delete r._alwaysShowResizeHandle, o !== void 0 ? r.alwaysShowResizeHandle = o : delete r.alwaysShowResizeHandle, c.removeInternalAndSame(r, Y), r.children = s, r;
3111
+ return delete r._alwaysShowResizeHandle, o !== void 0 ? r.alwaysShowResizeHandle = o : delete r.alwaysShowResizeHandle, c.removeInternalAndSame(r, Q), r.children = s, r;
3112
3112
  }
3113
3113
  return s;
3114
3114
  }
@@ -3122,7 +3122,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3122
3122
  * @example
3123
3123
  * see http://gridstackjs.com/demo/serialization.html
3124
3124
  */
3125
- load(e, t = b.addRemoveCB || !0) {
3125
+ load(e, t = w.addRemoveCB || !0) {
3126
3126
  var l;
3127
3127
  e = c.cloneDeep(e);
3128
3128
  const i = this.getColumn();
@@ -3133,15 +3133,15 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3133
3133
  e.forEach((d) => {
3134
3134
  s = Math.max(s, (d.x || 0) + d.w);
3135
3135
  }), s > this.engine.defaultColumn && (this.engine.defaultColumn = s), s > i && this.engine.cacheLayout(e, s, !0);
3136
- const r = b.addRemoveCB;
3137
- typeof t == "function" && (b.addRemoveCB = t);
3136
+ const r = w.addRemoveCB;
3137
+ typeof t == "function" && (w.addRemoveCB = t);
3138
3138
  const o = [];
3139
3139
  this.batchUpdate();
3140
3140
  const n = !this.engine.nodes.length;
3141
3141
  n && this.setAnimation(!1), !n && t && [...this.engine.nodes].forEach((a) => {
3142
3142
  if (!a.id)
3143
3143
  return;
3144
- c.find(e, a.id) || (b.addRemoveCB && b.addRemoveCB(this.el, a, !1, !1), o.push(a), this.removeWidget(a.el, !0, !1));
3144
+ c.find(e, a.id) || (w.addRemoveCB && w.addRemoveCB(this.el, a, !1, !1), o.push(a), this.removeWidget(a.el, !0, !1));
3145
3145
  }), this.engine._loading = !0;
3146
3146
  const h = [];
3147
3147
  return this.engine.nodes = this.engine.nodes.filter((d) => c.find(e, d.id) ? (h.push(d), !1) : !0), e.forEach((d) => {
@@ -3153,7 +3153,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3153
3153
  p && p.gridstack && p.gridstack.load(d.subGridOpts.children);
3154
3154
  }
3155
3155
  } else t && this.addWidget(d);
3156
- }), delete this.engine._loading, this.engine.removedNodes = o, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, r ? b.addRemoveCB = r : delete b.addRemoveCB, n && ((l = this.opts) != null && l.animate) && this.setAnimation(this.opts.animate, !0), this;
3156
+ }), delete this.engine._loading, this.engine.removedNodes = o, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, r ? w.addRemoveCB = r : delete w.addRemoveCB, n && ((l = this.opts) != null && l.animate) && this.setAnimation(this.opts.animate, !0), this;
3157
3157
  }
3158
3158
  /**
3159
3159
  * use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
@@ -3342,7 +3342,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3342
3342
  * grid.makeWidget('2', {w:2, content: 'hello'});
3343
3343
  */
3344
3344
  makeWidget(e, t) {
3345
- const i = b.getElement(e);
3345
+ const i = w.getElement(e);
3346
3346
  if (!i)
3347
3347
  return;
3348
3348
  i.parentElement || this.el.appendChild(i), this._prepareElement(i, !0, t);
@@ -3374,11 +3374,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3374
3374
  * @param triggerEvent if `false` (quiet mode) element will not be added to removed list and no 'removed' callbacks will be called (Default? true).
3375
3375
  */
3376
3376
  removeWidget(e, t = !0, i = !0) {
3377
- return e ? (b.getElements(e).forEach((s) => {
3377
+ return e ? (w.getElements(e).forEach((s) => {
3378
3378
  if (s.parentElement && s.parentElement !== this.el)
3379
3379
  return;
3380
3380
  let r = s.gridstackNode;
3381
- r || (r = this.engine.nodes.find((o) => s === o.el)), r && (t && b.addRemoveCB && b.addRemoveCB(this.el, r, !1, !1), delete s.gridstackNode, this._removeDD(s), this.engine.removeNode(r, t, i), t && s.parentElement && s.remove());
3381
+ r || (r = this.engine.nodes.find((o) => s === o.el)), r && (t && w.addRemoveCB && w.addRemoveCB(this.el, r, !1, !1), delete s.gridstackNode, this._removeDD(s), this.engine.removeNode(r, t, i), t && s.parentElement && s.remove());
3382
3382
  }), i && (this._triggerRemoveEvent(), this._triggerChangeEvent()), this) : (console.error("Error: GridStack.removeWidget(undefined) called"), this);
3383
3383
  }
3384
3384
  /**
@@ -3388,7 +3388,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3388
3388
  */
3389
3389
  removeAll(e = !0, t = !0) {
3390
3390
  return this.engine.nodes.forEach((i) => {
3391
- e && b.addRemoveCB && b.addRemoveCB(this.el, i, !1, !1), delete i.el.gridstackNode, this.opts.staticGrid || this._removeDD(i.el);
3391
+ e && w.addRemoveCB && w.addRemoveCB(this.el, i, !1, !1), delete i.el.gridstackNode, this.opts.staticGrid || this._removeDD(i.el);
3392
3392
  }), this.engine.removeAll(e, t), t && this._triggerRemoveEvent(), this;
3393
3393
  }
3394
3394
  /**
@@ -3433,7 +3433,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3433
3433
  * @param opt new widget options (x,y,w,h, etc..). Only those set will be updated.
3434
3434
  */
3435
3435
  update(e, t) {
3436
- return b.getElements(e).forEach((i) => {
3436
+ return w.getElements(e).forEach((i) => {
3437
3437
  var d;
3438
3438
  const s = i == null ? void 0 : i.gridstackNode;
3439
3439
  if (!s)
@@ -3446,7 +3446,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3446
3446
  n[a] = r[a] !== void 0 ? r[a] : s[a], delete r[a];
3447
3447
  })), !n && (r.minW || r.minH || r.maxW || r.maxH) && (n = {}), r.content !== void 0) {
3448
3448
  const a = i.querySelector(".grid-stack-item-content");
3449
- a && a.textContent !== r.content && (s.content = r.content, b.renderCB(a, r), (d = s.subGrid) != null && d.el && (a.appendChild(s.subGrid.el), s.subGrid.opts.styleInHead || s.subGrid._updateStyles(!0))), delete r.content;
3449
+ a && a.textContent !== r.content && (s.content = r.content, w.renderCB(a, r), (d = s.subGrid) != null && d.el && (a.appendChild(s.subGrid.el), s.subGrid.opts.styleInHead || s.subGrid._updateStyles(!0))), delete r.content;
3450
3450
  }
3451
3451
  let h = !1, l = !1;
3452
3452
  for (const a in r)
@@ -3482,7 +3482,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3482
3482
  if (!s)
3483
3483
  return;
3484
3484
  let r = t.h ? t.h * s : e.clientHeight, o;
3485
- if (t.resizeToContentParent && (o = e.querySelector(t.resizeToContentParent)), o || (o = e.querySelector(b.resizeToContentParent)), !o)
3485
+ if (t.resizeToContentParent && (o = e.querySelector(t.resizeToContentParent)), o || (o = e.querySelector(w.resizeToContentParent)), !o)
3486
3486
  return;
3487
3487
  const n = e.clientHeight - o.clientHeight, h = t.h ? t.h * s - n : o.clientHeight;
3488
3488
  let l;
@@ -3496,7 +3496,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3496
3496
  {
3497
3497
  const g = o.firstElementChild;
3498
3498
  if (!g) {
3499
- console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${b.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
3499
+ console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${w.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
3500
3500
  return;
3501
3501
  }
3502
3502
  l = g.getBoundingClientRect().height || h;
@@ -3511,14 +3511,14 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3511
3511
  }
3512
3512
  /** call the user resize (so they can do extra work) else our build in version */
3513
3513
  resizeToContentCBCheck(e) {
3514
- b.resizeToContentCB ? b.resizeToContentCB(e) : this.resizeToContent(e);
3514
+ w.resizeToContentCB ? w.resizeToContentCB(e) : this.resizeToContent(e);
3515
3515
  }
3516
3516
  /** rotate (by swapping w & h) the passed in node - called when user press 'r' during dragging
3517
3517
  * @param els widget or selector of objects to modify
3518
3518
  * @param relative optional pixel coord relative to upper/left corner to rotate around (will keep that cell under cursor)
3519
3519
  */
3520
3520
  rotate(e, t) {
3521
- return b.getElements(e).forEach((i) => {
3521
+ return w.getElements(e).forEach((i) => {
3522
3522
  const s = i.gridstackNode;
3523
3523
  if (!c.canBeRotated(s))
3524
3524
  return;
@@ -3659,7 +3659,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3659
3659
  }
3660
3660
  /** @internal */
3661
3661
  _prepareElement(e, t = !1, i) {
3662
- i = i || this._readAttr(e), e.gridstackNode = i, i.el = e, i.grid = this, i = this.engine.addNode(i, t), this._writeAttr(e, i), e.classList.add(Y.itemClass, this.opts.itemClass);
3662
+ i = i || this._readAttr(e), e.gridstackNode = i, i.el = e, i.grid = this, i = this.engine.addNode(i, t), this._writeAttr(e, i), e.classList.add(Q.itemClass, this.opts.itemClass);
3663
3663
  const s = c.shouldSizeToContent(i);
3664
3664
  return s ? e.classList.add("size-to-content") : e.classList.remove("size-to-content"), s && this.resizeToContentCheck(!1, i), c.lazyLoad(i) || this.prepareDragDrop(i.el), this;
3665
3665
  }
@@ -3747,7 +3747,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3747
3747
  }
3748
3748
  /** @internal */
3749
3749
  static getGridElement(e) {
3750
- return b.getElement(e);
3750
+ return w.getElement(e);
3751
3751
  }
3752
3752
  /** @internal */
3753
3753
  static getGridElements(e) {
@@ -3765,7 +3765,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3765
3765
  */
3766
3766
  /** get the global (but static to this code) DD implementation */
3767
3767
  static getDD() {
3768
- return U;
3768
+ return B;
3769
3769
  }
3770
3770
  /**
3771
3771
  * call to setup dragging in from the outside (say toolbar), by specifying the class selection and options.
@@ -3777,8 +3777,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3777
3777
  * @param root optional root which defaults to document (for shadow dom pass the parent HTMLDocument)
3778
3778
  */
3779
3779
  static setupDragIn(e, t, i, s = document) {
3780
- (t == null ? void 0 : t.pause) !== void 0 && (x.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? c.getElements(e, s) : e).forEach((o, n) => {
3781
- U.isDraggable(o) || U.dragIn(o, t), i != null && i[n] && (o.gridstackNode = i[n]);
3780
+ (t == null ? void 0 : t.pause) !== void 0 && (E.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? c.getElements(e, s) : e).forEach((o, n) => {
3781
+ B.isDraggable(o) || B.dragIn(o, t), i != null && i[n] && (o.gridstackNode = i[n]);
3782
3782
  });
3783
3783
  }
3784
3784
  /**
@@ -3788,7 +3788,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3788
3788
  * @param val if true widget will be draggable, assuming the parent grid isn't noMove or static.
3789
3789
  */
3790
3790
  movable(e, t) {
3791
- return this.opts.staticGrid ? this : (b.getElements(e).forEach((i) => {
3791
+ return this.opts.staticGrid ? this : (w.getElements(e).forEach((i) => {
3792
3792
  const s = i.gridstackNode;
3793
3793
  s && (t ? delete s.noMove : s.noMove = !0, this.prepareDragDrop(s.el));
3794
3794
  }), this);
@@ -3799,7 +3799,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3799
3799
  * @param val if true widget will be resizable, assuming the parent grid isn't noResize or static.
3800
3800
  */
3801
3801
  resizable(e, t) {
3802
- return this.opts.staticGrid ? this : (b.getElements(e).forEach((i) => {
3802
+ return this.opts.staticGrid ? this : (w.getElements(e).forEach((i) => {
3803
3803
  const s = i.gridstackNode;
3804
3804
  s && (t ? delete s.noResize : s.noResize = !0, this.prepareDragDrop(s.el));
3805
3805
  }), this);
@@ -3853,16 +3853,16 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3853
3853
  cancelDrag() {
3854
3854
  var t;
3855
3855
  const e = (t = this._placeholder) == null ? void 0 : t.gridstackNode;
3856
- e && (e._isExternal ? (e._isAboutToRemove = !0, this.engine.removeNode(e)) : e._isAboutToRemove && b._itemRemoving(e.el, !1), this.engine.restoreInitial());
3856
+ e && (e._isExternal ? (e._isAboutToRemove = !0, this.engine.removeNode(e)) : e._isAboutToRemove && w._itemRemoving(e.el, !1), this.engine.restoreInitial());
3857
3857
  }
3858
3858
  /** @internal removes any drag&drop present (called during destroy) */
3859
3859
  _removeDD(e) {
3860
- return U.draggable(e, "destroy").resizable(e, "destroy"), e.gridstackNode && delete e.gridstackNode._initDD, delete e.ddElement, this;
3860
+ return B.draggable(e, "destroy").resizable(e, "destroy"), e.gridstackNode && delete e.gridstackNode._initDD, delete e.ddElement, this;
3861
3861
  }
3862
3862
  /** @internal called to add drag over to support widgets being added externally */
3863
3863
  _setupAcceptWidget() {
3864
3864
  if (this.opts.staticGrid || !this.opts.acceptWidgets && !this.opts.removable)
3865
- return U.droppable(this.el, "destroy"), this;
3865
+ return B.droppable(this.el, "destroy"), this;
3866
3866
  let e, t;
3867
3867
  const i = (s, r, o) => {
3868
3868
  var f;
@@ -3887,7 +3887,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3887
3887
  if (n._temporaryRemoved) {
3888
3888
  if (n.x = Math.max(0, Math.round(l / t)), n.y = Math.max(0, Math.round(h / e)), delete n.autoPosition, this.engine.nodeBoundFix(n), !this.engine.willItFit(n)) {
3889
3889
  if (n.autoPosition = !0, !this.engine.willItFit(n)) {
3890
- U.off(r, "drag");
3890
+ B.off(r, "drag");
3891
3891
  return;
3892
3892
  }
3893
3893
  n._willFitPos && (c.copyPos(n, n._willFitPos), delete n._willFitPos);
@@ -3896,7 +3896,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3896
3896
  } else
3897
3897
  this._dragOrResize(o, s, a, n, t, e);
3898
3898
  };
3899
- return U.droppable(this.el, {
3899
+ return B.droppable(this.el, {
3900
3900
  accept: (s) => {
3901
3901
  const r = s.gridstackNode || this._readAttr(s, !1);
3902
3902
  if ((r == null ? void 0 : r.grid) === this)
@@ -3935,7 +3935,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3935
3935
  n.grid || (n.el || (n = { ...n }), n._isExternal = !0, o.gridstackNode = n);
3936
3936
  const h = n.w || Math.round(o.offsetWidth / t) || 1, l = n.h || Math.round(o.offsetHeight / e) || 1;
3937
3937
  return n.grid && n.grid !== this ? (r._gridstackNodeOrig || (r._gridstackNodeOrig = n), r.gridstackNode = n = { ...n, w: h, h: l, grid: this }, delete n.x, delete n.y, this.engine.cleanupNode(n).nodeBoundFix(n), n._initDD = n._isExternal = // DOM needs to be re-parented on a drop
3938
- n._temporaryRemoved = !0) : (n.w = h, n.h = l, n._temporaryRemoved = !0), b._itemRemoving(n.el, !1), U.on(r, "drag", i), i(s, r, o), !1;
3938
+ n._temporaryRemoved = !0) : (n.w = h, n.h = l, n._temporaryRemoved = !0), w._itemRemoving(n.el, !1), B.on(r, "drag", i), i(s, r, o), !1;
3939
3939
  }).on(this.el, "dropout", (s, r, o) => {
3940
3940
  const n = (o == null ? void 0 : o.gridstackNode) || r.gridstackNode;
3941
3941
  return n && (!n.grid || n.grid === this) && (this._leave(r, o), this._isTemp && this.removeAsSubGrid(n)), !1;
@@ -3953,10 +3953,10 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3953
3953
  const m = a.grid;
3954
3954
  m.engine.removeNodeFromLayoutCache(a), m.engine.removedNodes.push(a), m._triggerRemoveEvent()._triggerChangeEvent(), m.parentGridNode && !m.engine.nodes.length && m.opts.subGridDynamic && m.removeAsSubGrid();
3955
3955
  }
3956
- if (!n || (h && (this.engine.cleanupNode(n), n.grid = this), (p = n.grid) == null || delete p._isTemp, U.off(r, "drag"), o !== r ? (o.remove(), r = o) : r.remove(), this._removeDD(r), !h))
3956
+ if (!n || (h && (this.engine.cleanupNode(n), n.grid = this), (p = n.grid) == null || delete p._isTemp, B.off(r, "drag"), o !== r ? (o.remove(), r = o) : r.remove(), this._removeDD(r), !h))
3957
3957
  return !1;
3958
3958
  const f = (y = (g = n.subGrid) == null ? void 0 : g.el) == null ? void 0 : y.gridstack;
3959
- return c.copyPos(n, this._readAttr(this.placeholder)), c.removePositioningStyles(r), l && (n.content || n.subGridOpts || b.addRemoveCB) ? (delete n.el, r = this.addWidget(n)) : (this._prepareElement(r, !0, n), this.el.appendChild(r), this.resizeToContentCheck(!1, n), f && (f.parentGridNode = n, f.opts.styleInHead || f._updateStyles(!0)), this._updateContainerHeight()), this.engine.addedNodes.push(n), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, a && a.grid ? a : void 0, n), d && this.setAnimation(this.opts.animate, !0), !1;
3959
+ return c.copyPos(n, this._readAttr(this.placeholder)), c.removePositioningStyles(r), l && (n.content || n.subGridOpts || w.addRemoveCB) ? (delete n.el, r = this.addWidget(n)) : (this._prepareElement(r, !0, n), this.el.appendChild(r), this.resizeToContentCheck(!1, n), f && (f.parentGridNode = n, f.opts.styleInHead || f._updateStyles(!0)), this._updateContainerHeight()), this.engine.addedNodes.push(n), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, a && a.grid ? a : void 0, n), d && this.setAnimation(this.opts.animate, !0), !1;
3960
3960
  }), this;
3961
3961
  }
3962
3962
  /** @internal mark item for removal */
@@ -3971,7 +3971,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3971
3971
  if (typeof this.opts.removable != "string")
3972
3972
  return this;
3973
3973
  const e = document.querySelector(this.opts.removable);
3974
- return e ? (!this.opts.staticGrid && !U.isDroppable(e) && U.droppable(e, this.opts.removableOptions).on(e, "dropover", (t, i) => b._itemRemoving(i, !0)).on(e, "dropout", (t, i) => b._itemRemoving(i, !1)), this) : this;
3974
+ return e ? (!this.opts.staticGrid && !B.isDroppable(e) && B.droppable(e, this.opts.removableOptions).on(e, "dropover", (t, i) => w._itemRemoving(i, !0)).on(e, "dropout", (t, i) => w._itemRemoving(i, !1)), this) : this;
3975
3975
  }
3976
3976
  /**
3977
3977
  * prepares the element for drag&drop - this is normally called by makeWidget() unless are are delay loading
@@ -4003,7 +4003,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4003
4003
  this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), f.type === "resizestop" && (Number.isInteger(i.sizeToContent) && (i.sizeToContent = i.h), this.resizeToContentCheck(p, i));
4004
4004
  }
4005
4005
  };
4006
- U.draggable(e, {
4006
+ B.draggable(e, {
4007
4007
  start: l,
4008
4008
  stop: a,
4009
4009
  drag: d
@@ -4013,7 +4013,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4013
4013
  resize: d
4014
4014
  }), i._initDD = !0;
4015
4015
  }
4016
- return U.draggable(e, s ? "disable" : "enable").resizable(e, r ? "disable" : "enable"), this;
4016
+ return B.draggable(e, s ? "disable" : "enable").resizable(e, r ? "disable" : "enable"), this;
4017
4017
  }
4018
4018
  /** @internal handles actual drag/resize start */
4019
4019
  _onStartMoving(e, t, i, s, r, o) {
@@ -4032,7 +4032,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4032
4032
  };
4033
4033
  if (s.el = this.placeholder, s._lastUiPosition = i.position, s._prevYPix = i.position.top, s._moving = t.type === "dragstart", delete s._lastTried, t.type === "dropover" && s._temporaryRemoved && (this.engine.addNode(s), s._moving = !0), this.engine.cacheRects(r, o, this.opts.marginTop, this.opts.marginRight, this.opts.marginBottom, this.opts.marginLeft), t.type === "resizestart") {
4034
4034
  const h = this.getColumn() - s.x, l = (this.opts.maxRow || Number.MAX_SAFE_INTEGER) - s.y;
4035
- U.resizable(e, "option", "minWidth", r * Math.min(s.minW || 1, h)).resizable(e, "option", "minHeight", o * Math.min(s.minH || 1, l)).resizable(e, "option", "maxWidth", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, h)).resizable(e, "option", "maxWidthMoveLeft", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, s.x + s.w)).resizable(e, "option", "maxHeight", o * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, l)).resizable(e, "option", "maxHeightMoveUp", o * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, s.y + s.h));
4035
+ B.resizable(e, "option", "minWidth", r * Math.min(s.minW || 1, h)).resizable(e, "option", "minHeight", o * Math.min(s.minH || 1, l)).resizable(e, "option", "maxWidth", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, h)).resizable(e, "option", "maxWidthMoveLeft", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, s.x + s.w)).resizable(e, "option", "maxHeight", o * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, l)).resizable(e, "option", "maxHeightMoveUp", o * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, s.y + s.h));
4036
4036
  }
4037
4037
  }
4038
4038
  /** @internal handles actual drag/resize */
@@ -4045,16 +4045,16 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4045
4045
  return;
4046
4046
  const m = i.position.top - s._prevYPix;
4047
4047
  s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && c.updateScrollPosition(e, i.position, m);
4048
- const T = i.position.left + (i.position.left > s._lastUiPosition.left ? -d : l), w = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : a);
4049
- n.x = Math.round(T / r), n.y = Math.round(w / o);
4050
- const E = this._extraDragRow;
4048
+ const T = i.position.left + (i.position.left > s._lastUiPosition.left ? -d : l), L = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : a);
4049
+ n.x = Math.round(T / r), n.y = Math.round(L / o);
4050
+ const z = this._extraDragRow;
4051
4051
  if (this.engine.collide(s, n)) {
4052
- const L = this.getRow();
4053
- let C = Math.max(0, n.y + s.h - L);
4054
- this.opts.maxRow && L + C > this.opts.maxRow && (C = Math.max(0, this.opts.maxRow - L)), this._extraDragRow = C;
4052
+ const x = this.getRow();
4053
+ let _ = Math.max(0, n.y + s.h - x);
4054
+ this.opts.maxRow && x + _ > this.opts.maxRow && (_ = Math.max(0, this.opts.maxRow - x)), this._extraDragRow = _;
4055
4055
  } else
4056
4056
  this._extraDragRow = 0;
4057
- if (this._extraDragRow !== E && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
4057
+ if (this._extraDragRow !== z && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
4058
4058
  return;
4059
4059
  } else if (t.type === "resize") {
4060
4060
  if (n.x < 0 || (c.updateScrollResize(t, e, o), n.w = Math.round((i.size.width - l) / r), n.h = Math.round((i.size.height - a) / o), s.w === n.w && s.h === n.h) || s._lastTried && s._lastTried.w === n.w && s._lastTried.h === n.h)
@@ -4082,25 +4082,25 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4082
4082
  _leave(e, t) {
4083
4083
  t = t || e;
4084
4084
  const i = t.gridstackNode;
4085
- if (!i || (t.style.transform = t.style.transformOrigin = null, U.off(e, "drag"), i._temporaryRemoved))
4085
+ if (!i || (t.style.transform = t.style.transformOrigin = null, B.off(e, "drag"), i._temporaryRemoved))
4086
4086
  return;
4087
4087
  i._temporaryRemoved = !0, this.engine.removeNode(i), i.el = i._isExternal && t ? t : e;
4088
4088
  const s = i._sidebarOrig;
4089
- i._isExternal && this.engine.cleanupNode(i), i._sidebarOrig = s, this.opts.removable === !0 && b._itemRemoving(e, !0), e._gridstackNodeOrig ? (e.gridstackNode = e._gridstackNodeOrig, delete e._gridstackNodeOrig) : i._isExternal && this.engine.restoreInitial();
4089
+ i._isExternal && this.engine.cleanupNode(i), i._sidebarOrig = s, this.opts.removable === !0 && w._itemRemoving(e, !0), e._gridstackNodeOrig ? (e.gridstackNode = e._gridstackNodeOrig, delete e._gridstackNodeOrig) : i._isExternal && this.engine.restoreInitial();
4090
4090
  }
4091
4091
  // legacy method removed
4092
4092
  commit() {
4093
4093
  return Rs(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4094
4094
  }
4095
4095
  }
4096
- b.renderCB = (u, e) => {
4096
+ w.renderCB = (u, e) => {
4097
4097
  u && (e != null && e.content) && (u.textContent = e.content);
4098
4098
  };
4099
- b.resizeToContentParent = ".grid-stack-item-content";
4100
- b.Utils = c;
4101
- b.Engine = oe;
4102
- b.GDRev = "11.5.1";
4103
- const Ds = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Ss = { class: "grid-stack-item-content" }, Ns = /* @__PURE__ */ Q({
4099
+ w.resizeToContentParent = ".grid-stack-item-content";
4100
+ w.Utils = c;
4101
+ w.Engine = le;
4102
+ w.GDRev = "11.5.1";
4103
+ const Ds = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Ss = { class: "grid-stack-item-content" }, Ns = /* @__PURE__ */ j({
4104
4104
  __name: "DraggableGridLayout",
4105
4105
  props: {
4106
4106
  tiles: {},
@@ -4132,7 +4132,7 @@ const Ds = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Ss = { cl
4132
4132
  }), s("update-tiles", Array.from(o.value.values()));
4133
4133
  };
4134
4134
  ot(() => {
4135
- r.value && (n = b.init({
4135
+ r.value && (n = w.init({
4136
4136
  margin: 10,
4137
4137
  column: Kt,
4138
4138
  cellHeight: i.tileHeight,
@@ -4158,16 +4158,16 @@ const Ds = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Ss = { cl
4158
4158
  h: m.layout.size.rows
4159
4159
  });
4160
4160
  }
4161
- }), Mt(() => {
4161
+ }), It(() => {
4162
4162
  i.tiles.forEach((p) => {
4163
4163
  o.value.set(`${p.id}`, p);
4164
4164
  });
4165
- }), e({ removeWidget: f }), (p, g) => (z(), W("div", {
4165
+ }), e({ removeWidget: f }), (p, g) => (k(), K("div", {
4166
4166
  ref_key: "gridContainer",
4167
4167
  ref: r,
4168
4168
  class: "grid-stack"
4169
4169
  }, [
4170
- (z(!0), W($t, null, Ft(i.tiles, (y) => (z(), W("div", {
4170
+ (k(!0), K(Ft, null, Gt(i.tiles, (y) => (k(), K("div", {
4171
4171
  key: y.id,
4172
4172
  class: "grid-stack-item",
4173
4173
  "data-id": `${y.id}`,
@@ -4178,71 +4178,71 @@ const Ds = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Ss = { cl
4178
4178
  "gs-x": y.layout.position.col,
4179
4179
  "gs-y": y.layout.position.row
4180
4180
  }, [
4181
- de("div", Ss, [
4181
+ ue("div", Ss, [
4182
4182
  ze(p.$slots, "tile", { tile: y }, void 0, !0)
4183
4183
  ])
4184
4184
  ], 8, Ds))), 128))
4185
4185
  ], 512));
4186
4186
  }
4187
- }), Ls = /* @__PURE__ */ ye(Ns, [["__scopeId", "data-v-a68d6821"]]), As = {
4187
+ }), Ls = /* @__PURE__ */ ve(Ns, [["__scopeId", "data-v-a68d6821"]]), As = {
4188
4188
  key: 0,
4189
4189
  class: "fullscreen-header"
4190
4190
  }, Hs = {
4191
4191
  key: 0,
4192
4192
  class: "tile-container slottable-tile"
4193
- }, Os = /* @__PURE__ */ Q({
4193
+ }, Os = /* @__PURE__ */ j({
4194
4194
  __name: "DashboardRenderer",
4195
- props: /* @__PURE__ */ xt({
4195
+ props: /* @__PURE__ */ Ct({
4196
4196
  context: {}
4197
4197
  }, {
4198
4198
  modelValue: { required: !0 },
4199
4199
  modelModifiers: {}
4200
4200
  }),
4201
- emits: /* @__PURE__ */ xt(["edit-tile", "tile-time-range-zoom"], ["update:modelValue"]),
4201
+ emits: /* @__PURE__ */ Ct(["edit-tile", "tile-time-range-zoom"], ["update:modelValue"]),
4202
4202
  setup(u, { expose: e, emit: t }) {
4203
- Ye((R) => ({
4203
+ Ye((C) => ({
4204
4204
  "82baf22a": a.value
4205
4205
  }));
4206
- const i = u, s = t, r = ui(u, "modelValue"), { i18n: o } = pe.useI18n(), n = I(0), h = I(null), l = I(), d = I(), a = I("scale(1)"), f = xe(me);
4207
- f || (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements")), pe.useRequestQueue();
4208
- const p = Bt(), g = N(() => i.context.timeSpec ? i.context.timeSpec : {
4206
+ const i = u, s = t, r = ui(u, "modelValue"), { i18n: o } = ye.useI18n(), n = I(0), h = I(null), l = I(), d = I(), a = I("scale(1)"), f = Ce(pe);
4207
+ f || (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements")), ye.useRequestQueue();
4208
+ const p = ut(), g = D(() => i.context.timeSpec ? i.context.timeSpec : {
4209
4209
  type: "relative",
4210
4210
  time_range: p.defaultQueryTimeForOrg
4211
- }), y = N(() => !!i.context.timeSpec || !p.loading), m = (R, S) => {
4212
- const A = R.layout.position.row - S.layout.position.row;
4213
- return A !== 0 ? A : R.layout.position.col - S.layout.position.col;
4214
- }, T = N(() => r.value.tiles.map((R) => {
4211
+ }), y = D(() => !!i.context.timeSpec || !p.loading), m = (C, N) => {
4212
+ const A = C.layout.position.row - N.layout.position.row;
4213
+ return A !== 0 ? A : C.layout.position.col - N.layout.position.col;
4214
+ }, T = D(() => r.value.tiles.map((C) => {
4215
4215
  var A;
4216
- let S = R.definition;
4217
- if ("description" in S.chart) {
4218
- const $ = (A = S.chart.description) == null ? void 0 : A.replace(Fi, () => {
4219
- const ue = `renderer.trendRange.${g.value.type === "absolute" ? "custom" : g.value.time_range}`;
4220
- return o.te(ue) ? o.t(ue) : "";
4216
+ let N = C.definition;
4217
+ if ("description" in N.chart) {
4218
+ const $ = (A = N.chart.description) == null ? void 0 : A.replace(Fi, () => {
4219
+ const ce = `renderer.trendRange.${g.value.type === "absolute" ? "custom" : g.value.time_range}`;
4220
+ return o.te(ce) ? o.t(ce) : "";
4221
4221
  });
4222
- S = {
4223
- ...S,
4222
+ N = {
4223
+ ...N,
4224
4224
  chart: {
4225
- ...S.chart,
4225
+ ...N.chart,
4226
4226
  description: $
4227
4227
  }
4228
4228
  };
4229
4229
  }
4230
- return i.context.editable && !R.id && console.warn(
4230
+ return i.context.editable && !C.id && console.warn(
4231
4231
  "No id provided for tile. One will be generated automatically,",
4232
4232
  "however tracking changes to this tile may not work as expected.",
4233
- R
4233
+ C
4234
4234
  ), {
4235
- layout: R.layout,
4236
- meta: S,
4237
- type: R.type,
4235
+ layout: C.layout,
4236
+ meta: N,
4237
+ type: C.type,
4238
4238
  // Add a unique key to each tile internally.
4239
- id: R.id ?? crypto.randomUUID()
4239
+ id: C.id ?? crypto.randomUUID()
4240
4240
  };
4241
- })), w = N(() => {
4242
- var ue, Me, Ie;
4243
- let { tz: R, refreshInterval: S, editable: A } = i.context;
4241
+ })), L = D(() => {
4242
+ var ce, Me, Ie;
4243
+ let { tz: C, refreshInterval: N, editable: A } = i.context;
4244
4244
  const $ = [...i.context.filters ?? [], ...r.value.preset_filters ?? []];
4245
- if (R || (R = new Intl.DateTimeFormat().resolvedOptions().timeZone), S === void 0 && (S = Gi), ee.value) {
4245
+ if (C || (C = new Intl.DateTimeFormat().resolvedOptions().timeZone), N === void 0 && (N = Gi), se.value) {
4246
4246
  let ke = !1;
4247
4247
  if (g.value.type === "relative")
4248
4248
  ke = ["15m", "1h", "6h", "12h", "24h"].includes(g.value.time_range);
@@ -4251,115 +4251,115 @@ const Ds = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Ss = { cl
4251
4251
  ke = Math.abs(qe - et) <= 864e5;
4252
4252
  }
4253
4253
  const Je = (/* @__PURE__ */ new Date()).getTime();
4254
- g.value.type === "absolute" && g.value.end.getTime() < Je ? S = 0 : ke ? S = Ui : S = Bi;
4254
+ g.value.type === "absolute" && g.value.end.getTime() < Je ? N = 0 : ke ? N = Ui : N = Bi;
4255
4255
  }
4256
4256
  A === void 0 && (A = !1);
4257
- const te = !!((Ie = (Me = (ue = ci()) == null ? void 0 : ue.vnode) == null ? void 0 : Me.props) != null && Ie.onTileTimeRangeZoom);
4257
+ const re = !!((Ie = (Me = (ce = ci()) == null ? void 0 : ce.vnode) == null ? void 0 : Me.props) != null && Ie.onTileTimeRangeZoom);
4258
4258
  return {
4259
4259
  filters: $,
4260
- tz: R,
4260
+ tz: C,
4261
4261
  timeSpec: g.value,
4262
- refreshInterval: S,
4262
+ refreshInterval: N,
4263
4263
  editable: A,
4264
- zoomable: te
4264
+ zoomable: re
4265
4265
  };
4266
- }), E = (R) => {
4267
- s("edit-tile", R);
4268
- }, L = (R) => R.type === "slottable", C = (R) => {
4269
- const S = L(R.meta.chart) ? { ...R.meta.chart } : {
4270
- ...R.meta.chart,
4271
- chart_title: R.meta.chart.chart_title ? `Copy of ${R.meta.chart.chart_title}` : ""
4266
+ }), z = (C) => {
4267
+ s("edit-tile", C);
4268
+ }, x = (C) => C.type === "slottable", _ = (C) => {
4269
+ const N = x(C.meta.chart) ? { ...C.meta.chart } : {
4270
+ ...C.meta.chart,
4271
+ chart_title: C.meta.chart.chart_title ? `Copy of ${C.meta.chart.chart_title}` : ""
4272
4272
  }, A = {
4273
4273
  id: crypto.randomUUID(),
4274
4274
  type: "chart",
4275
4275
  definition: {
4276
- ...R.meta,
4277
- chart: S
4276
+ ...C.meta,
4277
+ chart: N
4278
4278
  },
4279
4279
  layout: {
4280
4280
  position: {
4281
4281
  col: 0,
4282
4282
  row: 0
4283
4283
  },
4284
- size: R.layout.size
4284
+ size: C.layout.size
4285
4285
  }
4286
4286
  };
4287
4287
  r.value.tiles.push(A);
4288
- }, le = (R) => {
4289
- h.value && h.value.removeWidget(R.id);
4290
- }, ge = () => {
4288
+ }, F = (C) => {
4289
+ h.value && h.value.removeWidget(C.id);
4290
+ }, te = () => {
4291
4291
  n.value++;
4292
- }, ne = (R) => {
4293
- const S = R.map((A) => ({
4292
+ }, ie = (C) => {
4293
+ const N = C.map((A) => ({
4294
4294
  id: A.id,
4295
4295
  type: A.type,
4296
4296
  layout: A.layout,
4297
4297
  definition: A.meta
4298
4298
  }));
4299
- r.value.tiles = S.sort(m);
4300
- }, Ce = async () => {
4299
+ r.value.tiles = N.sort(m);
4300
+ }, me = async () => {
4301
4301
  if (a.value = "scale(1)", await dt(), d.value) {
4302
- const { availWidth: R, availHeight: S } = window.screen, { width: A, height: $ } = d.value.getBoundingClientRect(), te = Math.min(S / $, R / A);
4303
- a.value = `scale(${te})`;
4302
+ const { availWidth: C, availHeight: N } = window.screen, { width: A, height: $ } = d.value.getBoundingClientRect(), re = Math.min(N / $, C / A);
4303
+ a.value = `scale(${re})`;
4304
4304
  }
4305
4305
  }, Re = () => {
4306
4306
  l.value && (document.fullscreenElement ? document.exitFullscreen() : l.value.requestFullscreen());
4307
- }, ee = I(!1), Ze = () => {
4308
- ee.value = document.fullscreenElement !== null, ee.value && Ce();
4307
+ }, se = I(!1), Ze = () => {
4308
+ se.value = document.fullscreenElement !== null, se.value && me();
4309
4309
  };
4310
4310
  return e({
4311
- refresh: ge,
4311
+ refresh: te,
4312
4312
  toggleFullscreen: Re
4313
- }), (R, S) => {
4314
- const A = fe("KAlert");
4315
- return z(), W("div", {
4313
+ }), (C, N) => {
4314
+ const A = ge("KAlert");
4315
+ return k(), K("div", {
4316
4316
  ref_key: "dashboardContainer",
4317
4317
  ref: l,
4318
- class: Qe(["kong-ui-public-dashboard-renderer", { "is-fullscreen": ee.value }]),
4318
+ class: Qe(["kong-ui-public-dashboard-renderer", { "is-fullscreen": se.value }]),
4319
4319
  onFullscreenchange: Ze
4320
4320
  }, [
4321
- de("div", {
4321
+ ue("div", {
4322
4322
  ref_key: "layoutContainer",
4323
4323
  ref: d,
4324
4324
  class: "layout"
4325
4325
  }, [
4326
- k(f) && ee.value ? (z(), W("div", As, [
4327
- ze(R.$slots, "fullscreenHeader", {}, void 0, !0)
4328
- ])) : K("", !0),
4329
- k(f) ? (z(), M(Pt(R.context.editable && !ee.value ? Ls : Cs), {
4326
+ R(f) && se.value ? (k(), K("div", As, [
4327
+ ze(C.$slots, "fullscreenHeader", {}, void 0, !0)
4328
+ ])) : V("", !0),
4329
+ R(f) ? (k(), M($t(C.context.editable && !se.value ? Ls : Cs), {
4330
4330
  key: 2,
4331
4331
  ref_key: "gridLayoutRef",
4332
4332
  ref: h,
4333
4333
  "tile-height": r.value.tile_height,
4334
4334
  tiles: T.value,
4335
- onUpdateTiles: ne
4335
+ onUpdateTiles: ie
4336
4336
  }, {
4337
4337
  tile: P(({ tile: $ }) => [
4338
- $.meta.chart.type === "slottable" ? (z(), W("div", Hs, [
4339
- ze(R.$slots, $.meta.chart.id, {}, void 0, !0)
4340
- ])) : (z(), M(ws, {
4341
- key: ee.value ? `${$.id}-tile` : `${$.id}-tile-fullscreen`,
4338
+ $.meta.chart.type === "slottable" ? (k(), K("div", Hs, [
4339
+ ze(C.$slots, $.meta.chart.id, {}, void 0, !0)
4340
+ ])) : (k(), M(ws, {
4341
+ key: se.value ? `${$.id}-tile` : `${$.id}-tile-fullscreen`,
4342
4342
  class: "tile-container",
4343
- context: w.value,
4343
+ context: L.value,
4344
4344
  definition: $.meta,
4345
- height: $.layout.size.rows * (r.value.tile_height || k(je)) + parseInt(k(ti), 10),
4346
- "is-fullscreen": ee.value,
4345
+ height: $.layout.size.rows * (r.value.tile_height || R(je)) + parseInt(R(ti), 10),
4346
+ "is-fullscreen": se.value,
4347
4347
  "query-ready": y.value,
4348
4348
  "refresh-counter": n.value,
4349
4349
  "tile-id": $.id,
4350
- onDuplicateTile: (te) => C($),
4351
- onEditTile: (te) => E($),
4352
- onRemoveTile: (te) => le($),
4353
- onTileTimeRangeZoom: S[0] || (S[0] = (te) => s("tile-time-range-zoom", te))
4350
+ onDuplicateTile: (re) => _($),
4351
+ onEditTile: (re) => z($),
4352
+ onRemoveTile: (re) => F($),
4353
+ onTileTimeRangeZoom: N[0] || (N[0] = (re) => s("tile-time-range-zoom", re))
4354
4354
  }, null, 8, ["context", "definition", "height", "is-fullscreen", "query-ready", "refresh-counter", "tile-id", "onDuplicateTile", "onEditTile", "onRemoveTile"]))
4355
4355
  ]),
4356
4356
  _: 3
4357
- }, 40, ["tile-height", "tiles"])) : (z(), M(A, {
4357
+ }, 40, ["tile-height", "tiles"])) : (k(), M(A, {
4358
4358
  key: 1,
4359
4359
  appearance: "danger"
4360
4360
  }, {
4361
4361
  default: P(() => [
4362
- De(ie(k(o).t("renderer.noQueryBridge")), 1)
4362
+ De(ne(R(o).t("renderer.noQueryBridge")), 1)
4363
4363
  ]),
4364
4364
  _: 1
4365
4365
  }))
@@ -4367,16 +4367,16 @@ const Ds = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Ss = { cl
4367
4367
  ], 34);
4368
4368
  };
4369
4369
  }
4370
- }), Ks = /* @__PURE__ */ ye(Os, [["__scopeId", "data-v-8d8a6181"]]);
4370
+ }), Ks = /* @__PURE__ */ ve(Os, [["__scopeId", "data-v-8d8a6181"]]);
4371
4371
  export {
4372
4372
  $i as C,
4373
4373
  Ks as D,
4374
- Rt as E,
4374
+ kt as E,
4375
4375
  Ui as F,
4376
4376
  Cs as G,
4377
- me as I,
4377
+ pe as I,
4378
4378
  Fi as T,
4379
- ut as _,
4379
+ ct as _,
4380
4380
  je as a,
4381
4381
  Kt as b,
4382
4382
  Gi as c,