@kong-ui-public/dashboard-renderer 8.12.23 → 8.12.25

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,10 +1,10 @@
1
- var Ii = Object.defineProperty;
1
+ var qi = Object.defineProperty;
2
2
  var Lt = (o) => {
3
3
  throw TypeError(o);
4
4
  };
5
- var qi = (o, e, t) => e in o ? Ii(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
6
- var At = (o, e, t) => qi(o, typeof e != "symbol" ? e + "" : e, t), ht = (o, e, t) => e.has(o) || Lt("Cannot " + t);
7
- var _ = (o, e, t) => (ht(o, e, "read from private field"), t ? t.call(o) : e.get(o)), U = (o, e, t) => e.has(o) ? Lt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(o) : e.set(o, t), $ = (o, e, t, i) => (ht(o, e, "write to private field"), i ? i.call(o, t) : e.set(o, t), t), K = (o, e, t) => (ht(o, e, "access private method"), t);
5
+ var Mi = (o, e, t) => e in o ? qi(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
6
+ var At = (o, e, t) => Mi(o, typeof e != "symbol" ? e + "" : e, t), dt = (o, e, t) => e.has(o) || Lt("Cannot " + t);
7
+ var _ = (o, e, t) => (dt(o, e, "read from private field"), t ? t.call(o) : e.get(o)), U = (o, e, t) => e.has(o) ? Lt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(o) : e.set(o, t), $ = (o, e, t, i) => (dt(o, e, "write to private field"), i ? i.call(o, t) : e.set(o, t), t), Q = (o, e, t) => (dt(o, e, "access private method"), t);
8
8
  var Le = (o, e, t, i) => ({
9
9
  set _(s) {
10
10
  $(o, e, s, t);
@@ -13,24 +13,24 @@ var Le = (o, e, t, i) => ({
13
13
  return _(o, e, i);
14
14
  }
15
15
  });
16
- import { ref as H, watchEffect as Jt, inject as ge, provide as Mi, toRaw as Pi, computed as w, isRef as $i, isReactive as Bi, toRef as Ae, hasInjectionContext as Ot, onMounted as st, watch as Oe, onUnmounted as Fe, getCurrentInstance as Fi, defineComponent as ee, resolveComponent as ue, unref as E, openBlock as C, createBlock as O, createSlots as rt, withCtx as M, createElementVNode as te, toDisplayString as J, renderSlot as He, createCommentVNode as X, normalizeStyle as Ye, normalizeClass as ze, createVNode as fe, mergeProps as ei, createTextVNode as gt, createElementBlock as B, normalizeProps as Gi, guardReactiveProps as Ui, defineAsyncComponent as ti, Fragment as mt, useCssVars as pt, useModel as ii, readonly as Ht, nextTick as yt, resolveDynamicComponent as si, toHandlers as Wi, mergeModels as je, renderList as ri, useTemplateRef as It } from "vue";
17
- import { msToGranularity as dt, TimePeriods as Ki, TIMEFRAME_LOOKUP as Qi, formatTime as qt, EXPORT_RECORD_LIMIT as Vi } from "@kong-ui-public/analytics-utilities";
18
- import { handleQueryError as Yi, SimpleChart as ji, AnalyticsChart as Xi, TopNTable as Zi, CsvExportModal as Ji } from "@kong-ui-public/analytics-chart";
19
- import es from "swrv";
16
+ import { ref as A, watchEffect as Jt, inject as me, provide as Pi, toRaw as $i, computed as w, isRef as Bi, isReactive as Fi, toRef as Ae, hasInjectionContext as Ot, onMounted as nt, watch as Oe, onUnmounted as Ge, getCurrentInstance as Gi, defineComponent as ee, resolveComponent as he, unref as C, openBlock as x, createBlock as O, createSlots as ot, withCtx as M, createElementVNode as se, toDisplayString as J, renderSlot as He, createCommentVNode as X, normalizeStyle as Xe, normalizeClass as ze, createVNode as ge, mergeProps as ei, createTextVNode as mt, createElementBlock as B, normalizeProps as Ui, guardReactiveProps as Wi, defineAsyncComponent as ti, Fragment as pt, useCssVars as yt, useModel as ii, readonly as Ht, nextTick as vt, resolveDynamicComponent as si, toHandlers as Ki, mergeModels as Ze, renderList as ri, useTemplateRef as It } from "vue";
17
+ import { msToGranularity as ct, TimePeriods as Qi, TIMEFRAME_LOOKUP as Vi, formatTime as qt, EXPORT_RECORD_LIMIT as Yi } from "@kong-ui-public/analytics-utilities";
18
+ import { handleQueryError as ji, SimpleChart as Xi, AnalyticsChart as Zi, TopNTable as Ji, CsvExportModal as es } from "@kong-ui-public/analytics-chart";
19
+ import ts from "swrv";
20
20
  import "axios";
21
- import { createI18n as ts, i18nTComponent as is } from "@kong-ui-public/i18n";
22
- import { useAnalyticsConfigStore as vt, useDatasourceConfigStore as nt } from "@kong-ui-public/analytics-config-store";
23
- import { VisibilityOffIcon as ss, WarningOutlineIcon as rs, WarningIcon as ns, ProgressIcon as os, RefreshIcon as as, EditIcon as ls, MoreIcon as us } from "@kong/icons";
24
- import { MetricsProvider as hs, MetricsConsumer as ds } from "@kong-ui-public/analytics-metric-provider";
25
- import { TableDataGrid as cs } from "@kong-ui-public/table-data-grid";
21
+ import { createI18n as is, i18nTComponent as ss } from "@kong-ui-public/i18n";
22
+ import { useAnalyticsConfigStore as _t, useDatasourceConfigStore as Ue } from "@kong-ui-public/analytics-config-store";
23
+ import { VisibilityOffIcon as rs, WarningOutlineIcon as ns, WarningIcon as os, ProgressIcon as as, RefreshIcon as ls, EditIcon as us, MoreIcon as hs } from "@kong/icons";
24
+ import { MetricsProvider as ds, MetricsConsumer as cs } from "@kong-ui-public/analytics-metric-provider";
25
+ import { TableDataGrid as fs } from "@kong-ui-public/table-data-grid";
26
26
  var ni = /* @__PURE__ */ ((o) => (o.VALIDATING = "VALIDATING", o.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", o.PENDING = "PENDING", o.SUCCESS = "SUCCESS", o.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", o.ERROR = "ERROR", o.STALE_IF_ERROR = "STALE_IF_ERROR", o))(ni || {});
27
- const fs = (o) => {
27
+ const gs = (o) => {
28
28
  var e, t, i, s, r;
29
29
  return o ? !!// TODO: revisit: currently only the first check ever matters?
30
30
  ((e = Object.keys(o)) != null && e.length || (t = o.data) != null && t.length || (s = (i = o.data) == null ? void 0 : i.data) != null && s.length || !((r = o.data) != null && r.data) && typeof o.data == "object" && Object.keys(o == null ? void 0 : o.data).length) : !1;
31
31
  };
32
- function gs(o = H({}), e, t, i = fs) {
33
- const s = H(
32
+ function ms(o = A({}), e, t, i = gs) {
33
+ const s = A(
34
34
  "PENDING"
35
35
  /* PENDING */
36
36
  );
@@ -66,7 +66,7 @@ function gs(o = H({}), e, t, i = fs) {
66
66
  swrvState: ni
67
67
  };
68
68
  }
69
- const ms = {
69
+ const ps = {
70
70
  not_configured: {
71
71
  title: "Chart is not fully configured",
72
72
  description: "Begin by choosing at least one metric"
@@ -85,10 +85,10 @@ const ms = {
85
85
  remove: "Remove",
86
86
  delete: "Delete",
87
87
  as_of_today: "As of today"
88
- }, ps = {
88
+ }, ys = {
89
89
  defaultFilename: "Chart export",
90
90
  exportAsCsv: "Export as CSV"
91
- }, ys = {
91
+ }, vs = {
92
92
  control_plane: "Control plane",
93
93
  data_plane_node_version: "Data plane node version",
94
94
  env: "Environment",
@@ -103,7 +103,7 @@ const ms = {
103
103
  status_code: "Status code",
104
104
  team: "Team",
105
105
  name: "Name"
106
- }, vs = "Explore", _s = "View requests", bs = "This tile was configured with {savedGranularity} granularity, which is no longer available. It now shows {currentGranularity} data, the closest available granularity.", ws = {
106
+ }, _s = "Explore", bs = "View requests", ws = "This tile was configured with {savedGranularity} granularity, which is no longer available. It now shows {currentGranularity} data, the closest available granularity.", Es = {
107
107
  daily: "1 day",
108
108
  fiveMinutely: "5 minutes",
109
109
  hourly: "1 hour",
@@ -116,31 +116,31 @@ const ms = {
116
116
  twoHourly: "2 hours",
117
117
  weekly: "1 week",
118
118
  unknown: "Unknown"
119
- }, Es = {
120
- renderer: ms,
121
- csvExport: ps,
122
- chartLabels: ys,
123
- jumpToExplore: vs,
124
- jumpToRequests: _s,
125
- query_aged_out_warning: bs,
126
- granularities: ws
119
+ }, xs = {
120
+ renderer: ps,
121
+ csvExport: ys,
122
+ chartLabels: vs,
123
+ jumpToExplore: _s,
124
+ jumpToRequests: bs,
125
+ query_aged_out_warning: ws,
126
+ granularities: Es
127
127
  };
128
- function xs() {
129
- const o = ts("en-us", Es);
128
+ function Cs() {
129
+ const o = is("en-us", xs);
130
130
  return {
131
131
  i18n: o,
132
- i18nT: is(o)
132
+ i18nT: ss(o)
133
133
  // Translation component <i18n-t>
134
134
  };
135
135
  }
136
- const Ge = 170, _t = 6, ye = "analytics-query-provider", Mt = "{entity-id}", Cs = "{cp-id}", Rs = "{timeframe}", ks = 30 * 1e3, Ts = 3e5, Ss = 36e5;
137
- function Ds() {
138
- const o = ge(ye);
136
+ const We = 170, bt = 6, _e = "analytics-query-provider", Mt = "{entity-id}", Rs = "{cp-id}", ks = "{timeframe}", Ts = 30 * 1e3, Ss = 3e5, Ds = 36e5;
137
+ function zs() {
138
+ const o = me(_e);
139
139
  return {
140
140
  evaluateFeatureFlag: (t, i) => o ? o.evaluateFeatureFlagFn(t, i) : i
141
141
  };
142
142
  }
143
- function zs(o) {
143
+ function Ns(o) {
144
144
  return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
145
145
  }
146
146
  var oi = { exports: {} };
@@ -149,122 +149,122 @@ var oi = { exports: {} };
149
149
  function i() {
150
150
  }
151
151
  Object.create && (i.prototype = /* @__PURE__ */ Object.create(null), new i().__proto__ || (t = !1));
152
- function s(d, l, h) {
153
- this.fn = d, this.context = l, this.once = h || !1;
152
+ function s(d, u, h) {
153
+ this.fn = d, this.context = u, this.once = h || !1;
154
154
  }
155
- function r(d, l, h, u, f) {
155
+ function r(d, u, h, l, f) {
156
156
  if (typeof h != "function")
157
157
  throw new TypeError("The listener must be a function");
158
- var m = new s(h, u || d, f), p = t ? t + l : l;
159
- return d._events[p] ? d._events[p].fn ? d._events[p] = [d._events[p], m] : d._events[p].push(m) : (d._events[p] = m, d._eventsCount++), d;
158
+ var g = new s(h, l || d, f), p = t ? t + u : u;
159
+ return d._events[p] ? d._events[p].fn ? d._events[p] = [d._events[p], g] : d._events[p].push(g) : (d._events[p] = g, d._eventsCount++), d;
160
160
  }
161
- function a(d, l) {
162
- --d._eventsCount === 0 ? d._events = new i() : delete d._events[l];
161
+ function a(d, u) {
162
+ --d._eventsCount === 0 ? d._events = new i() : delete d._events[u];
163
163
  }
164
164
  function n() {
165
165
  this._events = new i(), this._eventsCount = 0;
166
166
  }
167
167
  n.prototype.eventNames = function() {
168
- var l = [], h, u;
169
- if (this._eventsCount === 0) return l;
170
- for (u in h = this._events)
171
- e.call(h, u) && l.push(t ? u.slice(1) : u);
172
- return Object.getOwnPropertySymbols ? l.concat(Object.getOwnPropertySymbols(h)) : l;
173
- }, n.prototype.listeners = function(l) {
174
- var h = t ? t + l : l, u = this._events[h];
175
- if (!u) return [];
176
- if (u.fn) return [u.fn];
177
- for (var f = 0, m = u.length, p = new Array(m); f < m; f++)
178
- p[f] = u[f].fn;
168
+ var u = [], h, l;
169
+ if (this._eventsCount === 0) return u;
170
+ for (l in h = this._events)
171
+ e.call(h, l) && u.push(t ? l.slice(1) : l);
172
+ return Object.getOwnPropertySymbols ? u.concat(Object.getOwnPropertySymbols(h)) : u;
173
+ }, n.prototype.listeners = function(u) {
174
+ var h = t ? t + u : u, l = this._events[h];
175
+ if (!l) return [];
176
+ if (l.fn) return [l.fn];
177
+ for (var f = 0, g = l.length, p = new Array(g); f < g; f++)
178
+ p[f] = l[f].fn;
179
179
  return p;
180
- }, n.prototype.listenerCount = function(l) {
181
- var h = t ? t + l : l, u = this._events[h];
182
- return u ? u.fn ? 1 : u.length : 0;
183
- }, n.prototype.emit = function(l, h, u, f, m, p) {
184
- var y = t ? t + l : l;
180
+ }, n.prototype.listenerCount = function(u) {
181
+ var h = t ? t + u : u, l = this._events[h];
182
+ return l ? l.fn ? 1 : l.length : 0;
183
+ }, n.prototype.emit = function(u, h, l, f, g, p) {
184
+ var y = t ? t + u : u;
185
185
  if (!this._events[y]) return !1;
186
- var g = this._events[y], k = arguments.length, z, v;
187
- if (g.fn) {
188
- switch (g.once && this.removeListener(l, g.fn, void 0, !0), k) {
186
+ var m = this._events[y], T = arguments.length, R, v;
187
+ if (m.fn) {
188
+ switch (m.once && this.removeListener(u, m.fn, void 0, !0), T) {
189
189
  case 1:
190
- return g.fn.call(g.context), !0;
190
+ return m.fn.call(m.context), !0;
191
191
  case 2:
192
- return g.fn.call(g.context, h), !0;
192
+ return m.fn.call(m.context, h), !0;
193
193
  case 3:
194
- return g.fn.call(g.context, h, u), !0;
194
+ return m.fn.call(m.context, h, l), !0;
195
195
  case 4:
196
- return g.fn.call(g.context, h, u, f), !0;
196
+ return m.fn.call(m.context, h, l, f), !0;
197
197
  case 5:
198
- return g.fn.call(g.context, h, u, f, m), !0;
198
+ return m.fn.call(m.context, h, l, f, g), !0;
199
199
  case 6:
200
- return g.fn.call(g.context, h, u, f, m, p), !0;
200
+ return m.fn.call(m.context, h, l, f, g, p), !0;
201
201
  }
202
- for (v = 1, z = new Array(k - 1); v < k; v++)
203
- z[v - 1] = arguments[v];
204
- g.fn.apply(g.context, z);
202
+ for (v = 1, R = new Array(T - 1); v < T; v++)
203
+ R[v - 1] = arguments[v];
204
+ m.fn.apply(m.context, R);
205
205
  } else {
206
- var q = g.length, A;
207
- for (v = 0; v < q; v++)
208
- switch (g[v].once && this.removeListener(l, g[v].fn, void 0, !0), k) {
206
+ var I = m.length, q;
207
+ for (v = 0; v < I; v++)
208
+ switch (m[v].once && this.removeListener(u, m[v].fn, void 0, !0), T) {
209
209
  case 1:
210
- g[v].fn.call(g[v].context);
210
+ m[v].fn.call(m[v].context);
211
211
  break;
212
212
  case 2:
213
- g[v].fn.call(g[v].context, h);
213
+ m[v].fn.call(m[v].context, h);
214
214
  break;
215
215
  case 3:
216
- g[v].fn.call(g[v].context, h, u);
216
+ m[v].fn.call(m[v].context, h, l);
217
217
  break;
218
218
  case 4:
219
- g[v].fn.call(g[v].context, h, u, f);
219
+ m[v].fn.call(m[v].context, h, l, f);
220
220
  break;
221
221
  default:
222
- if (!z) for (A = 1, z = new Array(k - 1); A < k; A++)
223
- z[A - 1] = arguments[A];
224
- g[v].fn.apply(g[v].context, z);
222
+ if (!R) for (q = 1, R = new Array(T - 1); q < T; q++)
223
+ R[q - 1] = arguments[q];
224
+ m[v].fn.apply(m[v].context, R);
225
225
  }
226
226
  }
227
227
  return !0;
228
- }, n.prototype.on = function(l, h, u) {
229
- return r(this, l, h, u, !1);
230
- }, n.prototype.once = function(l, h, u) {
231
- return r(this, l, h, u, !0);
232
- }, n.prototype.removeListener = function(l, h, u, f) {
233
- var m = t ? t + l : l;
234
- if (!this._events[m]) return this;
228
+ }, n.prototype.on = function(u, h, l) {
229
+ return r(this, u, h, l, !1);
230
+ }, n.prototype.once = function(u, h, l) {
231
+ return r(this, u, h, l, !0);
232
+ }, n.prototype.removeListener = function(u, h, l, f) {
233
+ var g = t ? t + u : u;
234
+ if (!this._events[g]) return this;
235
235
  if (!h)
236
- return a(this, m), this;
237
- var p = this._events[m];
236
+ return a(this, g), this;
237
+ var p = this._events[g];
238
238
  if (p.fn)
239
- p.fn === h && (!f || p.once) && (!u || p.context === u) && a(this, m);
239
+ p.fn === h && (!f || p.once) && (!l || p.context === l) && a(this, g);
240
240
  else {
241
- for (var y = 0, g = [], k = p.length; y < k; y++)
242
- (p[y].fn !== h || f && !p[y].once || u && p[y].context !== u) && g.push(p[y]);
243
- g.length ? this._events[m] = g.length === 1 ? g[0] : g : a(this, m);
241
+ for (var y = 0, m = [], T = p.length; y < T; y++)
242
+ (p[y].fn !== h || f && !p[y].once || l && p[y].context !== l) && m.push(p[y]);
243
+ m.length ? this._events[g] = m.length === 1 ? m[0] : m : a(this, g);
244
244
  }
245
245
  return this;
246
- }, n.prototype.removeAllListeners = function(l) {
246
+ }, n.prototype.removeAllListeners = function(u) {
247
247
  var h;
248
- return l ? (h = t ? t + l : l, this._events[h] && a(this, h)) : (this._events = new i(), this._eventsCount = 0), this;
248
+ return u ? (h = t ? t + u : u, this._events[h] && a(this, h)) : (this._events = new i(), this._eventsCount = 0), this;
249
249
  }, n.prototype.off = n.prototype.removeListener, n.prototype.addListener = n.prototype.on, n.prefixed = t, n.EventEmitter = n, o.exports = n;
250
250
  })(oi);
251
- var Ns = oi.exports;
252
- const Ls = /* @__PURE__ */ zs(Ns);
251
+ var Ls = oi.exports;
252
+ const As = /* @__PURE__ */ Ns(Ls);
253
253
  class ai extends Error {
254
254
  constructor(e) {
255
255
  super(e), this.name = "TimeoutError";
256
256
  }
257
257
  }
258
- class As extends Error {
258
+ class Os extends Error {
259
259
  constructor(e) {
260
260
  super(), this.name = "AbortError", this.message = e;
261
261
  }
262
262
  }
263
- const Pt = (o) => globalThis.DOMException === void 0 ? new As(o) : new DOMException(o), $t = (o) => {
263
+ const Pt = (o) => globalThis.DOMException === void 0 ? new Os(o) : new DOMException(o), $t = (o) => {
264
264
  const e = o.reason === void 0 ? Pt("This operation was aborted.") : o.reason;
265
265
  return e instanceof Error ? e : Pt(e);
266
266
  };
267
- function Os(o, e) {
267
+ function Hs(o, e) {
268
268
  const {
269
269
  milliseconds: t,
270
270
  fallback: i,
@@ -272,17 +272,17 @@ function Os(o, e) {
272
272
  customTimers: r = { setTimeout, clearTimeout }
273
273
  } = e;
274
274
  let a, n;
275
- const l = new Promise((h, u) => {
275
+ const u = new Promise((h, l) => {
276
276
  if (typeof t != "number" || Math.sign(t) !== 1)
277
277
  throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);
278
278
  if (e.signal) {
279
- const { signal: m } = e;
280
- m.aborted && u($t(m)), n = () => {
281
- u($t(m));
282
- }, m.addEventListener("abort", n, { once: !0 });
279
+ const { signal: g } = e;
280
+ g.aborted && l($t(g)), n = () => {
281
+ l($t(g));
282
+ }, g.addEventListener("abort", n, { once: !0 });
283
283
  }
284
284
  if (t === Number.POSITIVE_INFINITY) {
285
- o.then(h, u);
285
+ o.then(h, l);
286
286
  return;
287
287
  }
288
288
  const f = new ai();
@@ -290,27 +290,27 @@ function Os(o, e) {
290
290
  if (i) {
291
291
  try {
292
292
  h(i());
293
- } catch (m) {
294
- u(m);
293
+ } catch (g) {
294
+ l(g);
295
295
  }
296
296
  return;
297
297
  }
298
- typeof o.cancel == "function" && o.cancel(), s === !1 ? h() : s instanceof Error ? u(s) : (f.message = s ?? `Promise timed out after ${t} milliseconds`, u(f));
298
+ typeof o.cancel == "function" && o.cancel(), s === !1 ? h() : s instanceof Error ? l(s) : (f.message = s ?? `Promise timed out after ${t} milliseconds`, l(f));
299
299
  }, t), (async () => {
300
300
  try {
301
301
  h(await o);
302
- } catch (m) {
303
- u(m);
302
+ } catch (g) {
303
+ l(g);
304
304
  }
305
305
  })();
306
306
  }).finally(() => {
307
- l.clear(), n && e.signal && e.signal.removeEventListener("abort", n);
307
+ u.clear(), n && e.signal && e.signal.removeEventListener("abort", n);
308
308
  });
309
- return l.clear = () => {
309
+ return u.clear = () => {
310
310
  r.clearTimeout.call(void 0, a), a = void 0;
311
- }, l;
311
+ }, u;
312
312
  }
313
- function Hs(o, e, t) {
313
+ function Is(o, e, t) {
314
314
  let i = 0, s = o.length;
315
315
  for (; s > 0; ) {
316
316
  const r = Math.trunc(s / 2);
@@ -319,10 +319,10 @@ function Hs(o, e, t) {
319
319
  }
320
320
  return i;
321
321
  }
322
- var se;
323
- class Is {
322
+ var ne;
323
+ class qs {
324
324
  constructor() {
325
- U(this, se, []);
325
+ U(this, ne, []);
326
326
  }
327
327
  enqueue(e, t) {
328
328
  t = {
@@ -334,34 +334,34 @@ class Is {
334
334
  id: t.id,
335
335
  run: e
336
336
  };
337
- if (this.size === 0 || _(this, se)[this.size - 1].priority >= t.priority) {
338
- _(this, se).push(i);
337
+ if (this.size === 0 || _(this, ne)[this.size - 1].priority >= t.priority) {
338
+ _(this, ne).push(i);
339
339
  return;
340
340
  }
341
- const s = Hs(_(this, se), i, (r, a) => a.priority - r.priority);
342
- _(this, se).splice(s, 0, i);
341
+ const s = Is(_(this, ne), i, (r, a) => a.priority - r.priority);
342
+ _(this, ne).splice(s, 0, i);
343
343
  }
344
344
  setPriority(e, t) {
345
- const i = _(this, se).findIndex((r) => r.id === e);
345
+ const i = _(this, ne).findIndex((r) => r.id === e);
346
346
  if (i === -1)
347
347
  throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);
348
- const [s] = _(this, se).splice(i, 1);
348
+ const [s] = _(this, ne).splice(i, 1);
349
349
  this.enqueue(s.run, { priority: t, id: e });
350
350
  }
351
351
  dequeue() {
352
- const e = _(this, se).shift();
352
+ const e = _(this, ne).shift();
353
353
  return e == null ? void 0 : e.run;
354
354
  }
355
355
  filter(e) {
356
- return _(this, se).filter((t) => t.priority === e.priority).map((t) => t.run);
356
+ return _(this, ne).filter((t) => t.priority === e.priority).map((t) => t.run);
357
357
  }
358
358
  get size() {
359
- return _(this, se).length;
359
+ return _(this, ne).length;
360
360
  }
361
361
  }
362
- se = new WeakMap();
363
- var Re, ke, _e, Me, Te, Pe, re, Se, Z, $e, ne, De, pe, Be, it, L, li, ui, hi, di, ci, Ke, ct, ft, Qe, fi, Ve;
364
- class qs extends Ls {
362
+ ne = new WeakMap();
363
+ var Re, ke, be, Pe, Te, $e, oe, Se, Z, Be, ae, De, ve, Fe, rt, L, li, ui, hi, di, ci, Ve, ft, gt, Ye, fi, je;
364
+ class Ms extends As {
365
365
  // TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
366
366
  constructor(t) {
367
367
  var i, s;
@@ -369,21 +369,21 @@ class qs extends Ls {
369
369
  U(this, L);
370
370
  U(this, Re);
371
371
  U(this, ke);
372
- U(this, _e, 0);
373
- U(this, Me);
372
+ U(this, be, 0);
373
+ U(this, Pe);
374
374
  U(this, Te);
375
- U(this, Pe, 0);
376
- U(this, re);
375
+ U(this, $e, 0);
376
+ U(this, oe);
377
377
  U(this, Se);
378
378
  U(this, Z);
379
- U(this, $e);
380
- U(this, ne, 0);
379
+ U(this, Be);
380
+ U(this, ae, 0);
381
381
  // The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
382
382
  U(this, De);
383
- U(this, pe);
384
- U(this, Be);
383
+ U(this, ve);
384
+ U(this, Fe);
385
385
  // Use to assign a unique identifier to a promise function, if not explicitly specified
386
- U(this, it, 1n);
386
+ U(this, rt, 1n);
387
387
  /**
388
388
  Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
389
389
 
@@ -396,13 +396,13 @@ class qs extends Ls {
396
396
  interval: 0,
397
397
  concurrency: Number.POSITIVE_INFINITY,
398
398
  autoStart: !0,
399
- queueClass: Is,
399
+ queueClass: qs,
400
400
  ...t
401
401
  }, !(typeof t.intervalCap == "number" && t.intervalCap >= 1))
402
402
  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})`);
403
403
  if (t.interval === void 0 || !(Number.isFinite(t.interval) && t.interval >= 0))
404
404
  throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${((s = t.interval) == null ? void 0 : s.toString()) ?? ""}\` (${typeof t.interval})`);
405
- $(this, Re, t.carryoverConcurrencyCount), $(this, ke, t.intervalCap === Number.POSITIVE_INFINITY || t.interval === 0), $(this, Me, t.intervalCap), $(this, Te, t.interval), $(this, Z, new t.queueClass()), $(this, $e, t.queueClass), this.concurrency = t.concurrency, this.timeout = t.timeout, $(this, Be, t.throwOnTimeout === !0), $(this, pe, t.autoStart === !1);
405
+ $(this, Re, t.carryoverConcurrencyCount), $(this, ke, t.intervalCap === Number.POSITIVE_INFINITY || t.interval === 0), $(this, Pe, t.intervalCap), $(this, Te, t.interval), $(this, Z, new t.queueClass()), $(this, Be, t.queueClass), this.concurrency = t.concurrency, this.timeout = t.timeout, $(this, Fe, t.throwOnTimeout === !0), $(this, ve, t.autoStart === !1);
406
406
  }
407
407
  get concurrency() {
408
408
  return _(this, De);
@@ -410,7 +410,7 @@ class qs extends Ls {
410
410
  set concurrency(t) {
411
411
  if (!(typeof t == "number" && t >= 1))
412
412
  throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);
413
- $(this, De, t), K(this, L, Qe).call(this);
413
+ $(this, De, t), Q(this, L, Ye).call(this);
414
414
  }
415
415
  /**
416
416
  Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
@@ -452,18 +452,18 @@ class qs extends Ls {
452
452
  _(this, Z).setPriority(t, i);
453
453
  }
454
454
  async add(t, i = {}) {
455
- return i.id ?? (i.id = (Le(this, it)._++).toString()), i = {
455
+ return i.id ?? (i.id = (Le(this, rt)._++).toString()), i = {
456
456
  timeout: this.timeout,
457
- throwOnTimeout: _(this, Be),
457
+ throwOnTimeout: _(this, Fe),
458
458
  ...i
459
459
  }, new Promise((s, r) => {
460
460
  _(this, Z).enqueue(async () => {
461
461
  var a;
462
- Le(this, ne)._++;
462
+ Le(this, ae)._++;
463
463
  try {
464
- (a = i.signal) == null || a.throwIfAborted(), Le(this, _e)._++;
464
+ (a = i.signal) == null || a.throwIfAborted(), Le(this, be)._++;
465
465
  let n = t({ signal: i.signal });
466
- i.timeout && (n = Os(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, K(this, L, fi).call(this, i.signal)]));
466
+ i.timeout && (n = Hs(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, Q(this, L, fi).call(this, i.signal)]));
467
467
  const d = await n;
468
468
  s(d), this.emit("completed", d);
469
469
  } catch (n) {
@@ -473,9 +473,9 @@ class qs extends Ls {
473
473
  }
474
474
  r(n), this.emit("error", n);
475
475
  } finally {
476
- K(this, L, hi).call(this);
476
+ Q(this, L, hi).call(this);
477
477
  }
478
- }, i), this.emit("add"), K(this, L, Ke).call(this);
478
+ }, i), this.emit("add"), Q(this, L, Ve).call(this);
479
479
  });
480
480
  }
481
481
  async addAll(t, i) {
@@ -485,19 +485,19 @@ class qs extends Ls {
485
485
  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.)
486
486
  */
487
487
  start() {
488
- return _(this, pe) ? ($(this, pe, !1), K(this, L, Qe).call(this), this) : this;
488
+ return _(this, ve) ? ($(this, ve, !1), Q(this, L, Ye).call(this), this) : this;
489
489
  }
490
490
  /**
491
491
  Put queue execution on hold.
492
492
  */
493
493
  pause() {
494
- $(this, pe, !0);
494
+ $(this, ve, !0);
495
495
  }
496
496
  /**
497
497
  Clear the queue.
498
498
  */
499
499
  clear() {
500
- $(this, Z, new (_(this, $e))());
500
+ $(this, Z, new (_(this, Be))());
501
501
  }
502
502
  /**
503
503
  Can be called multiple times. Useful if you for example add additional items at a later time.
@@ -505,7 +505,7 @@ class qs extends Ls {
505
505
  @returns A promise that settles when the queue becomes empty.
506
506
  */
507
507
  async onEmpty() {
508
- _(this, Z).size !== 0 && await K(this, L, Ve).call(this, "empty");
508
+ _(this, Z).size !== 0 && await Q(this, L, je).call(this, "empty");
509
509
  }
510
510
  /**
511
511
  @returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
@@ -515,7 +515,7 @@ class qs extends Ls {
515
515
  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.
516
516
  */
517
517
  async onSizeLessThan(t) {
518
- _(this, Z).size < t || await K(this, L, Ve).call(this, "next", () => _(this, Z).size < t);
518
+ _(this, Z).size < t || await Q(this, L, je).call(this, "next", () => _(this, Z).size < t);
519
519
  }
520
520
  /**
521
521
  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.
@@ -523,7 +523,7 @@ class qs extends Ls {
523
523
  @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
524
524
  */
525
525
  async onIdle() {
526
- _(this, ne) === 0 && _(this, Z).size === 0 || await K(this, L, Ve).call(this, "idle");
526
+ _(this, ae) === 0 && _(this, Z).size === 0 || await Q(this, L, je).call(this, "idle");
527
527
  }
528
528
  /**
529
529
  Size of the queue, the number of queued items waiting to run.
@@ -543,57 +543,57 @@ class qs extends Ls {
543
543
  Number of running items (no longer in the queue).
544
544
  */
545
545
  get pending() {
546
- return _(this, ne);
546
+ return _(this, ae);
547
547
  }
548
548
  /**
549
549
  Whether the queue is currently paused.
550
550
  */
551
551
  get isPaused() {
552
- return _(this, pe);
552
+ return _(this, ve);
553
553
  }
554
554
  }
555
- Re = new WeakMap(), ke = new WeakMap(), _e = new WeakMap(), Me = new WeakMap(), Te = new WeakMap(), Pe = new WeakMap(), re = new WeakMap(), Se = new WeakMap(), Z = new WeakMap(), $e = new WeakMap(), ne = new WeakMap(), De = new WeakMap(), pe = new WeakMap(), Be = new WeakMap(), it = new WeakMap(), L = new WeakSet(), li = function() {
556
- return _(this, ke) || _(this, _e) < _(this, Me);
555
+ Re = new WeakMap(), ke = new WeakMap(), be = new WeakMap(), Pe = new WeakMap(), Te = new WeakMap(), $e = new WeakMap(), oe = new WeakMap(), Se = new WeakMap(), Z = new WeakMap(), Be = new WeakMap(), ae = new WeakMap(), De = new WeakMap(), ve = new WeakMap(), Fe = new WeakMap(), rt = new WeakMap(), L = new WeakSet(), li = function() {
556
+ return _(this, ke) || _(this, be) < _(this, Pe);
557
557
  }, ui = function() {
558
- return _(this, ne) < _(this, De);
558
+ return _(this, ae) < _(this, De);
559
559
  }, hi = function() {
560
- Le(this, ne)._--, K(this, L, Ke).call(this), this.emit("next");
560
+ Le(this, ae)._--, Q(this, L, Ve).call(this), this.emit("next");
561
561
  }, di = function() {
562
- K(this, L, ft).call(this), K(this, L, ct).call(this), $(this, Se, void 0);
562
+ Q(this, L, gt).call(this), Q(this, L, ft).call(this), $(this, Se, void 0);
563
563
  }, ci = function() {
564
564
  const t = Date.now();
565
- if (_(this, re) === void 0) {
566
- const i = _(this, Pe) - t;
565
+ if (_(this, oe) === void 0) {
566
+ const i = _(this, $e) - t;
567
567
  if (i < 0)
568
- $(this, _e, _(this, Re) ? _(this, ne) : 0);
568
+ $(this, be, _(this, Re) ? _(this, ae) : 0);
569
569
  else
570
570
  return _(this, Se) === void 0 && $(this, Se, setTimeout(() => {
571
- K(this, L, di).call(this);
571
+ Q(this, L, di).call(this);
572
572
  }, i)), !0;
573
573
  }
574
574
  return !1;
575
- }, Ke = function() {
575
+ }, Ve = function() {
576
576
  if (_(this, Z).size === 0)
577
- return _(this, re) && clearInterval(_(this, re)), $(this, re, void 0), this.emit("empty"), _(this, ne) === 0 && this.emit("idle"), !1;
578
- if (!_(this, pe)) {
577
+ return _(this, oe) && clearInterval(_(this, oe)), $(this, oe, void 0), this.emit("empty"), _(this, ae) === 0 && this.emit("idle"), !1;
578
+ if (!_(this, ve)) {
579
579
  const t = !_(this, L, ci);
580
580
  if (_(this, L, li) && _(this, L, ui)) {
581
581
  const i = _(this, Z).dequeue();
582
- return i ? (this.emit("active"), i(), t && K(this, L, ct).call(this), !0) : !1;
582
+ return i ? (this.emit("active"), i(), t && Q(this, L, ft).call(this), !0) : !1;
583
583
  }
584
584
  }
585
585
  return !1;
586
- }, ct = function() {
587
- _(this, ke) || _(this, re) !== void 0 || ($(this, re, setInterval(() => {
588
- K(this, L, ft).call(this);
589
- }, _(this, Te))), $(this, Pe, Date.now() + _(this, Te)));
590
586
  }, ft = function() {
591
- _(this, _e) === 0 && _(this, ne) === 0 && _(this, re) && (clearInterval(_(this, re)), $(this, re, void 0)), $(this, _e, _(this, Re) ? _(this, ne) : 0), K(this, L, Qe).call(this);
587
+ _(this, ke) || _(this, oe) !== void 0 || ($(this, oe, setInterval(() => {
588
+ Q(this, L, gt).call(this);
589
+ }, _(this, Te))), $(this, $e, Date.now() + _(this, Te)));
590
+ }, gt = function() {
591
+ _(this, be) === 0 && _(this, ae) === 0 && _(this, oe) && (clearInterval(_(this, oe)), $(this, oe, void 0)), $(this, be, _(this, Re) ? _(this, ae) : 0), Q(this, L, Ye).call(this);
592
592
  }, /**
593
593
  Executes all queued functions until it reaches the limit.
594
594
  */
595
- Qe = function() {
596
- for (; K(this, L, Ke).call(this); )
595
+ Ye = function() {
596
+ for (; Q(this, L, Ve).call(this); )
597
597
  ;
598
598
  }, fi = async function(t) {
599
599
  return new Promise((i, s) => {
@@ -601,7 +601,7 @@ Qe = function() {
601
601
  s(t.reason);
602
602
  }, { once: !0 });
603
603
  });
604
- }, Ve = async function(t, i) {
604
+ }, je = async function(t, i) {
605
605
  return new Promise((s) => {
606
606
  const r = () => {
607
607
  i && !i() || (this.off(t, r), s());
@@ -609,15 +609,15 @@ Qe = function() {
609
609
  this.on(t, r);
610
610
  });
611
611
  };
612
- const Ms = () => {
613
- const o = vt(), e = ge(ye);
612
+ const Ps = () => {
613
+ const o = _t(), e = me(_e);
614
614
  if (!e)
615
615
  return;
616
616
  if (e.queryFnOverride) {
617
617
  console.warn("Detected incorrect use of useRequestQueue. This composable should not be used in nested components. Please discuss with team-data or report an issue if you feel you have a use case.");
618
618
  return;
619
619
  }
620
- const t = new qs({
620
+ const t = new Ms({
621
621
  carryoverConcurrencyCount: !0,
622
622
  concurrency: o.maxParallelRequests,
623
623
  interval: o.requestInterval,
@@ -627,14 +627,14 @@ const Ms = () => {
627
627
  queryFnOverride: !0,
628
628
  queryFn: (s, r) => t.add(() => e.queryFn(s, r), { throwOnTimeout: !0 })
629
629
  };
630
- Mi(ye, i);
630
+ Pi(_e, i);
631
631
  };
632
632
  /*!
633
633
  * pinia v3.0.4
634
634
  * (c) 2025 Eduardo San Martin Morote
635
635
  * @license MIT
636
636
  */
637
- const Ps = typeof window < "u";
637
+ const $s = typeof window < "u";
638
638
  let Bt;
639
639
  process.env.NODE_ENV;
640
640
  const Ft = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
@@ -649,8 +649,8 @@ process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
649
649
  /* istanbul ignore next */
650
650
  Symbol()
651
651
  );
652
- function bt(o) {
653
- const e = Pi(o), t = {};
652
+ function Ie(o) {
653
+ const e = $i(o), t = {};
654
654
  for (const i in e) {
655
655
  const s = e[i];
656
656
  s.effect ? t[i] = // ...
@@ -659,204 +659,207 @@ function bt(o) {
659
659
  set(r) {
660
660
  o[i] = r;
661
661
  }
662
- }) : ($i(s) || Bi(s)) && (t[i] = // ---
662
+ }) : (Bi(s) || Fi(s)) && (t[i] = // ---
663
663
  Ae(o, i));
664
664
  }
665
665
  return t;
666
666
  }
667
- const oe = (o) => (o == null ? void 0 : o.chart.type) === "table", $s = [
667
+ const le = (o) => (o == null ? void 0 : o.chart.type) === "table", Bs = [
668
668
  "basic",
669
669
  "api_usage",
670
670
  "llm_usage",
671
671
  "agentic_usage",
672
672
  "platform",
673
673
  void 0
674
- ], Bs = (o) => $s.includes(o);
675
- function Fs({
674
+ ], Fs = (o) => Bs.includes(o);
675
+ function Gs({
676
676
  queryBridge: o,
677
677
  context: e,
678
678
  definition: t,
679
679
  chartData: i
680
680
  }) {
681
- const s = H(""), r = H(""), a = H(void 0), n = H(void 0), d = vt(), l = nt(), { stripUnknownFilters: h, loading: u } = bt(l), f = w(() => oe(t.value));
682
- st(async () => {
683
- var S, I;
684
- s.value = await ((S = o == null ? void 0 : o.exploreBaseUrl) == null ? void 0 : S.call(o)) ?? "", r.value = await ((I = o == null ? void 0 : o.requestsBaseUrl) == null ? void 0 : I.call(o)) ?? "";
681
+ const s = A(""), r = A(""), a = A(void 0), n = A(void 0), d = _t(), u = Ue(), { stripUnknownFilters: h, loading: l } = Ie(u), f = w(() => le(t.value));
682
+ nt(async () => {
683
+ var D, H;
684
+ s.value = await ((D = o == null ? void 0 : o.exploreBaseUrl) == null ? void 0 : D.call(o)) ?? "", r.value = await ((H = o == null ? void 0 : o.requestsBaseUrl) == null ? void 0 : H.call(o)) ?? "";
685
685
  });
686
- const m = w(() => d.analytics && d.percentiles), p = w(() => {
687
- const S = t.value.chart.type;
688
- return ["golden_signals", "gauge"].includes(S) ? !1 : S === "top_n" ? e.value.editable || e.value.showTileActions : !0;
689
- }), y = w(() => r.value && t.value.query && !f.value && t.value.query.datasource !== "llm_usage" && t.value.query.datasource !== "platform" && m.value && !u.value), g = w(() => s.value && t.value.query && Bs(t.value.query.datasource) && m.value && !u.value), k = w(() => i.value ? dt(i.value.meta.granularity_ms) : void 0), z = w(() => {
686
+ const g = w(() => d.analytics && d.percentiles), p = w(() => {
687
+ const D = t.value.chart.type;
688
+ return ["golden_signals", "gauge"].includes(D) ? !1 : D === "top_n" ? e.value.editable || e.value.showTileActions : !0;
689
+ }), y = w(() => r.value && t.value.query && !f.value && t.value.query.datasource !== "llm_usage" && t.value.query.datasource !== "platform" && g.value && !l.value), m = w(() => s.value && t.value.query && Fs(t.value.query.datasource) && g.value && !l.value), T = w(() => i.value ? ct(i.value.meta.granularity_ms) : void 0), R = w(() => {
690
690
  var N;
691
- const S = t.value, I = [...e.value.filters, ...S.query.filters ?? []], Q = "metrics" in S.query ? S.query.metrics : void 0, D = ((N = S.query) == null ? void 0 : N.datasource) ?? "api_usage";
691
+ const D = t.value, H = [...e.value.filters, ...D.query.filters ?? []], V = "metrics" in D.query ? D.query.metrics : void 0, z = ((N = D.query) == null ? void 0 : N.datasource) ?? "api_usage";
692
692
  return h.value({
693
- datasource: D,
694
- filters: I,
695
- queryFields: Q
693
+ datasource: z,
694
+ filters: H,
695
+ queryFields: V
696
696
  });
697
697
  }), v = w(() => {
698
- if (!g.value || !p.value)
698
+ if (!m.value || !p.value)
699
699
  return "";
700
- const S = t.value;
701
- if (oe(S))
702
- return ve({
703
- ...S.query,
704
- filters: z.value
700
+ const D = t.value;
701
+ if (le(D))
702
+ return pe({
703
+ ...D.query,
704
+ filters: R.value
705
705
  });
706
- const I = S.query.time_range || e.value.timeSpec, Q = Y(I, z.value);
707
- return ve(Q);
708
- }), q = w(() => {
706
+ const H = D.query.time_range || e.value.timeSpec, V = W(H, R.value);
707
+ return pe(V);
708
+ }), I = w(() => {
709
709
  if (!y.value || !p.value)
710
710
  return "";
711
- const S = z.value, I = t.value;
712
- if (oe(I))
711
+ const D = R.value, H = t.value;
712
+ if (le(H))
713
713
  return "";
714
- const Q = le(
715
- I.query.time_range || e.value.timeSpec,
716
- S
714
+ const V = te(
715
+ H.query.time_range || e.value.timeSpec,
716
+ D
717
717
  );
718
- return A(Q);
719
- }), A = (S) => y.value ? `${r.value}?q=${JSON.stringify(S)}` : "", le = (S, I) => {
720
- var N, F, P, V;
721
- const Q = (F = (N = i.value) == null ? void 0 : N.meta) != null && F.start ? new Date(i.value.meta.start) : void 0, D = (V = (P = i.value) == null ? void 0 : P.meta) != null && V.end ? new Date(i.value.meta.end) : void 0;
718
+ return q(V);
719
+ }), q = (D) => y.value ? `${r.value}?q=${JSON.stringify(D)}` : "", te = (D, H) => {
720
+ var N, F, P, Y;
721
+ const V = (F = (N = i.value) == null ? void 0 : N.meta) != null && F.start ? new Date(i.value.meta.start) : void 0, z = (Y = (P = i.value) == null ? void 0 : P.meta) != null && Y.end ? new Date(i.value.meta.end) : void 0;
722
722
  return {
723
- filter: I,
723
+ filter: H,
724
724
  timeframe: {
725
- timePeriodsKey: S.type === "relative" ? S.time_range : "custom",
726
- start: S.type === "absolute" ? Q : void 0,
727
- end: S.type === "absolute" ? D : void 0
725
+ timePeriodsKey: D.type === "relative" ? D.time_range : "custom",
726
+ start: D.type === "absolute" ? V : void 0,
727
+ end: D.type === "absolute" ? z : void 0
728
728
  }
729
729
  };
730
- }, xe = (S, I) => ({
731
- filter: I,
730
+ }, ie = (D, H) => ({
731
+ filter: H,
732
732
  timeframe: {
733
- timePeriodsKey: S.type === "relative" ? S.time_range : "custom",
734
- start: S.type === "absolute" ? S.start : void 0,
735
- end: S.type === "absolute" ? S.end : void 0
733
+ timePeriodsKey: D.type === "relative" ? D.time_range : "custom",
734
+ start: D.type === "absolute" ? D.start : void 0,
735
+ end: D.type === "absolute" ? D.end : void 0
736
736
  }
737
- }), Y = (S, I) => {
738
- const Q = t.value;
739
- if (oe(Q))
737
+ }), W = (D, H) => {
738
+ const V = t.value;
739
+ if (le(V))
740
740
  throw new Error("Cannot build a chart explore query for table chart definitions");
741
- const D = [...Q.query.dimensions ?? []], N = [...Q.query.metrics ?? []];
741
+ const z = [...V.query.dimensions ?? []], N = [...V.query.metrics ?? []];
742
742
  return {
743
- filters: I,
743
+ filters: H,
744
744
  metrics: N,
745
- dimensions: D,
746
- time_range: S,
747
- granularity: Q.query.granularity || k.value || void 0
745
+ dimensions: z,
746
+ time_range: D,
747
+ granularity: V.query.granularity || T.value || void 0
748
748
  };
749
- }, ve = (S) => {
750
- if (!g.value)
749
+ }, pe = (D) => {
750
+ if (!m.value)
751
751
  return "";
752
- const I = t.value.query.datasource && t.value.query.datasource !== "basic" ? t.value.query.datasource : "api_usage";
753
- return `${s.value}?q=${JSON.stringify(S)}&d=${I}&c=${t.value.chart.type}`;
752
+ const H = t.value.query.datasource && t.value.query.datasource !== "basic" ? t.value.query.datasource : "api_usage";
753
+ return `${s.value}?q=${JSON.stringify(D)}&d=${H}&c=${t.value.chart.type}`;
754
754
  };
755
- return Oe([y, g], ([S, I]) => {
756
- S && (a.value = { href: "" }), I && (n.value = { href: "" });
755
+ return Oe([y, m], ([D, H]) => {
756
+ D && (a.value = { href: "" }), H && (n.value = { href: "" });
757
757
  }), {
758
758
  exploreLinkKebabMenu: v,
759
- requestsLinkKebabMenu: q,
759
+ requestsLinkKebabMenu: I,
760
760
  canShowKebabMenu: p,
761
761
  canGenerateRequestsLink: y,
762
- canGenerateExploreLink: g,
762
+ canGenerateExploreLink: m,
763
763
  requestsLinkZoomActions: a,
764
764
  exploreLinkZoomActions: n,
765
- buildExploreQuery: Y,
766
- buildRequestsQueryZoomActions: xe,
767
- buildExploreLink: ve,
768
- buildRequestLink: A
765
+ buildExploreQuery: W,
766
+ buildRequestsQueryZoomActions: ie,
767
+ buildExploreLink: pe,
768
+ buildRequestLink: q
769
769
  };
770
770
  }
771
- function Gs() {
772
- const o = ge(ye), e = nt(), { stripUnknownFilters: t } = bt(e), i = new AbortController();
773
- return Fe(() => {
774
- i.abort();
771
+ function Us() {
772
+ const o = me(_e), e = Ue(), { stripUnknownFilters: t } = Ie(e);
773
+ let i = null;
774
+ return Ge(() => {
775
+ i == null || i.abort();
775
776
  }), { issueQuery: async (r, a, n) => {
776
777
  if (!o)
777
778
  throw new Error("Query bridge is not defined");
778
- await e.isReady();
779
+ i == null || i.abort();
780
+ const d = new AbortController();
781
+ i = d, await e.isReady();
779
782
  const {
780
- datasource: d,
781
- limit: l,
782
- ...h
783
- } = r, u = d || "basic", f = t.value({
784
783
  datasource: u,
784
+ limit: h,
785
+ ...l
786
+ } = r, f = u || "basic", g = t.value({
787
+ datasource: f,
785
788
  filters: [
786
789
  ...r.filters ?? [],
787
790
  ...a.filters
788
791
  ],
789
792
  queryFields: r.metrics
790
793
  });
791
- let m = r.time_range;
792
- m ? m.tz || (m = {
793
- ...m,
794
+ let p = r.time_range;
795
+ p ? p.tz || (p = {
796
+ ...p,
794
797
  tz: a.tz
795
- }) : m = {
798
+ }) : p = {
796
799
  ...a.timeSpec,
797
800
  tz: a.tz
798
801
  };
799
- const p = {
800
- datasource: u,
802
+ const y = {
803
+ datasource: f,
801
804
  query: {
802
- ...h,
803
- time_range: m,
804
- filters: f,
805
- limit: n ?? l
805
+ ...l,
806
+ time_range: p,
807
+ filters: g,
808
+ limit: n ?? h
806
809
  }
807
810
  };
808
- return o.queryFn(p, i);
811
+ return o.queryFn(y, d);
809
812
  } };
810
813
  }
811
- function Us({
814
+ function Ws({
812
815
  context: o,
813
- globalFilters: e = H([]),
814
- isFullscreen: t = H(!1),
815
- preview: i = H(!1)
816
+ globalFilters: e = A([]),
817
+ isFullscreen: t = A(!1),
818
+ preview: i = A(!1)
816
819
  }) {
817
- const s = vt(), r = w(() => o.value.timeSpec ? o.value.timeSpec : {
820
+ const s = _t(), r = Ue(), { loading: a } = Ie(s), { loading: n } = Ie(r), d = w(() => o.value.timeSpec ? o.value.timeSpec : {
818
821
  type: "relative",
819
822
  time_range: s.defaultQueryTimeForOrg
820
- }), a = w(() => {
821
- var p, y, g;
822
- let { tz: d, refreshInterval: l, editable: h, showTileActions: u } = o.value;
823
- const f = [...o.value.filters ?? [], ...e.value];
824
- if (d || (d = new Intl.DateTimeFormat().resolvedOptions().timeZone), l === void 0 && (l = ks), t.value) {
825
- let k = !1;
826
- if (r.value.type === "relative")
827
- k = ["15m", "1h", "6h", "12h", "24h"].includes(r.value.time_range);
823
+ }), u = w(() => {
824
+ var T, R, v;
825
+ let { tz: l, refreshInterval: f, editable: g, showTileActions: p } = o.value;
826
+ const y = [...o.value.filters ?? [], ...e.value];
827
+ if (l || (l = new Intl.DateTimeFormat().resolvedOptions().timeZone), f === void 0 && (f = Ts), t.value) {
828
+ let I = !1;
829
+ if (d.value.type === "relative")
830
+ I = ["15m", "1h", "6h", "12h", "24h"].includes(d.value.time_range);
828
831
  else {
829
- const q = r.value.start.getTime(), A = r.value.end.getTime();
830
- k = Math.abs(A - q) <= 864e5;
832
+ const ie = d.value.start.getTime(), W = d.value.end.getTime();
833
+ I = Math.abs(W - ie) <= 864e5;
831
834
  }
832
- const z = (/* @__PURE__ */ new Date()).getTime();
833
- r.value.type === "absolute" && r.value.end.getTime() < z || r.value.type === "relative" && ["previous_week", "previous_month"].includes(r.value.time_range) ? l = 0 : k ? l = Ts : l = Ss;
835
+ const q = (/* @__PURE__ */ new Date()).getTime();
836
+ d.value.type === "absolute" && d.value.end.getTime() < q || d.value.type === "relative" && ["previous_week", "previous_month"].includes(d.value.time_range) ? f = 0 : I ? f = Ss : f = Ds;
834
837
  }
835
- (h === void 0 || i.value) && (h = !1), u === void 0 && (u = !0);
836
- const m = !i.value && !!((g = (y = (p = Fi()) == null ? void 0 : p.vnode) == null ? void 0 : y.props) != null && g.onTileTimeRangeZoom);
838
+ (g === void 0 || i.value) && (g = !1), p === void 0 && (p = !0);
839
+ const m = !i.value && !!((v = (R = (T = Gi()) == null ? void 0 : T.vnode) == null ? void 0 : R.props) != null && v.onTileTimeRangeZoom);
837
840
  return {
838
- filters: f,
839
- tz: d,
840
- timeSpec: r.value,
841
- refreshInterval: l,
842
- editable: h,
843
- showTileActions: u && !i.value,
841
+ filters: y,
842
+ tz: l,
843
+ timeSpec: d.value,
844
+ refreshInterval: f,
845
+ editable: g,
846
+ showTileActions: p && !i.value,
844
847
  showTileZoomActions: !i.value,
845
848
  zoomable: m
846
849
  };
847
- }), n = w(() => !!o.value.timeSpec || !s.loading);
850
+ }), h = w(() => !!o.value.timeSpec || !a.value && !n.value);
848
851
  return {
849
- internalContext: a,
850
- queryReady: n
852
+ internalContext: u,
853
+ queryReady: h
851
854
  };
852
855
  }
853
- const ae = {
854
- useContextLinks: Fs,
855
- useDashboardInternalContext: Us,
856
- useEvaluateFeatureFlag: Ds,
857
- useI18n: xs,
858
- useIssueQuery: Gs,
859
- useRequestQueue: Ms
856
+ const ue = {
857
+ useContextLinks: Gs,
858
+ useDashboardInternalContext: Ws,
859
+ useEvaluateFeatureFlag: zs,
860
+ useI18n: Cs,
861
+ useIssueQuery: Us,
862
+ useRequestQueue: Ps
860
863
  }, wt = /* @__PURE__ */ ee({
861
864
  __name: "QueryDataProvider",
862
865
  props: {
@@ -866,64 +869,67 @@ const ae = {
866
869
  queryReady: { type: Boolean },
867
870
  refreshCounter: {}
868
871
  },
869
- emits: ["chart-data", "queryComplete"],
872
+ emits: ["chart-data", "query-complete"],
870
873
  setup(o, { emit: e }) {
871
- const t = o, i = e, { i18n: s } = ae.useI18n(), { issueQuery: r } = ae.useIssueQuery(), a = ge(ye), n = () => t.queryReady && a ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, { data: d, error: l, isValidating: h } = es(n, async () => {
874
+ const t = o, i = e, { i18n: s } = ue.useI18n(), { issueQuery: r } = ue.useIssueQuery(), a = me(_e), n = () => t.queryReady && a ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, { data: d, error: u, isValidating: h } = ts(n, async () => {
875
+ const R = n();
872
876
  try {
873
- const g = await r(t.query, t.context, t.limitOverride);
874
- return m.value = null, g;
875
- } catch (g) {
876
- throw m.value = Yi(g), g;
877
+ const v = await r(t.query, t.context, t.limitOverride);
878
+ return n() !== R ? void 0 : (g.value = null, v);
879
+ } catch (v) {
880
+ if (n() !== R)
881
+ return;
882
+ throw g.value = ji(v), v;
877
883
  } finally {
878
- i("queryComplete");
884
+ n() === R && i("query-complete");
879
885
  }
880
886
  }, {
881
887
  refreshInterval: t.context.refreshInterval,
882
888
  revalidateOnFocus: !1,
883
889
  shouldRetryOnError: !1
884
- }), { state: u, swrvState: f } = gs(d, l, h), m = H(null), p = w(() => u.value === f.ERROR || !!m.value), y = w(() => !t.queryReady || u.value === f.PENDING);
885
- return Oe([() => d.value, () => u.value], ([g, k]) => {
886
- g && (k === "SUCCESS_HAS_DATA" || k === "SUCCESS") && i("chart-data", g);
887
- }), (g, k) => {
888
- var q;
889
- const z = ue("KSkeleton"), v = ue("KEmptyState");
890
- return y.value || !E(d) && !p.value ? (C(), O(z, {
890
+ }), { state: l, swrvState: f } = ms(d, u, h), g = A(null), p = w(() => l.value === f.ERROR || !!g.value), y = w(() => !t.queryReady || l.value === f.PENDING), m = A(), T = w(() => d.value ?? (t.queryReady && l.value === f.PENDING ? m.value : void 0));
891
+ return Oe([() => d.value, () => l.value], ([R, v]) => {
892
+ R && (v === "SUCCESS_HAS_DATA" || v === "SUCCESS") && R !== m.value && (m.value = R, i("chart-data", R));
893
+ }), (R, v) => {
894
+ var te;
895
+ const I = he("KSkeleton"), q = he("KEmptyState");
896
+ return (y.value || !C(d) && !p.value) && !T.value ? (x(), O(I, {
891
897
  key: 0,
892
898
  class: "chart-skeleton",
893
899
  type: "table"
894
- })) : p.value ? (C(), O(v, {
900
+ })) : p.value && !y.value ? (x(), O(q, {
895
901
  key: 1,
896
902
  "action-button-visible": !1,
897
903
  "data-testid": "chart-empty-state"
898
- }, rt({
904
+ }, ot({
899
905
  icon: M(() => {
900
- var A;
906
+ var ie;
901
907
  return [
902
- ((A = m.value) == null ? void 0 : A.type) === "forbidden" ? (C(), O(E(ss), { key: 0 })) : (C(), O(E(rs), { key: 1 }))
908
+ ((ie = g.value) == null ? void 0 : ie.type) === "forbidden" ? (x(), O(C(rs), { key: 0 })) : (x(), O(C(ns), { key: 1 }))
903
909
  ];
904
910
  }),
905
911
  title: M(() => {
906
- var A;
912
+ var ie;
907
913
  return [
908
- te("p", null, J(((A = m.value) == null ? void 0 : A.message) || E(s).t("renderer.unexpectedError")), 1)
914
+ se("p", null, J(((ie = g.value) == null ? void 0 : ie.message) || C(s).t("renderer.unexpectedError")), 1)
909
915
  ];
910
916
  }),
911
917
  _: 2
912
918
  }, [
913
- (q = m.value) != null && q.details ? {
919
+ (te = g.value) != null && te.details ? {
914
920
  name: "default",
915
921
  fn: M(() => [
916
- te("p", null, J(m.value.details), 1)
922
+ se("p", null, J(g.value.details), 1)
917
923
  ]),
918
924
  key: "0"
919
925
  } : void 0
920
- ]), 1024)) : E(d) ? He(g.$slots, "default", {
926
+ ]), 1024)) : T.value ? He(R.$slots, "default", {
921
927
  key: 2,
922
- data: E(d)
928
+ data: T.value
923
929
  }) : X("", !0);
924
930
  };
925
931
  }
926
- }), Ws = /* @__PURE__ */ ee({
932
+ }), Ks = /* @__PURE__ */ ee({
927
933
  __name: "SimpleChartRenderer",
928
934
  props: {
929
935
  query: {},
@@ -937,18 +943,18 @@ const ae = {
937
943
  },
938
944
  setup(o) {
939
945
  const e = o, t = w(() => e.chartOptions.type === "single_value");
940
- return (i, s) => (C(), O(wt, {
946
+ return (i, s) => (x(), O(wt, {
941
947
  context: o.context,
942
948
  query: o.query,
943
949
  "query-ready": o.queryReady,
944
950
  "refresh-counter": o.refreshCounter
945
951
  }, {
946
952
  default: M(({ data: r }) => [
947
- te("div", {
953
+ se("div", {
948
954
  class: ze(["analytics-chart", { "single-value": t.value }]),
949
- style: Ye(t.value ? void 0 : { height: `${o.height}px` })
955
+ style: Xe(t.value ? void 0 : { height: `${o.height}px` })
950
956
  }, [
951
- fe(E(ji), {
957
+ ge(C(Xi), {
952
958
  "chart-data": r,
953
959
  "chart-options": o.chartOptions,
954
960
  "synthetics-data-key": t.value ? void 0 : o.chartOptions.synthetics_data_key
@@ -958,12 +964,12 @@ const ae = {
958
964
  _: 1
959
965
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
960
966
  }
961
- }), be = (o, e) => {
967
+ }), we = (o, e) => {
962
968
  const t = o.__vccOpts || o;
963
969
  for (const [i, s] of e)
964
970
  t[i] = s;
965
971
  return t;
966
- }, Ut = /* @__PURE__ */ be(Ws, [["__scopeId", "data-v-2cbfac70"]]), Ks = { class: "analytics-chart" }, Qs = /* @__PURE__ */ ee({
972
+ }, Ut = /* @__PURE__ */ we(Ks, [["__scopeId", "data-v-2cbfac70"]]), Qs = { class: "analytics-chart" }, Vs = /* @__PURE__ */ ee({
967
973
  __name: "BaseAnalyticsChartRenderer",
968
974
  props: {
969
975
  query: {},
@@ -978,7 +984,7 @@ const ae = {
978
984
  },
979
985
  emits: ["edit-tile", "chart-data", "zoom-time-range", "view-requests", "select-chart-range"],
980
986
  setup(o, { emit: e }) {
981
- const t = o, i = e, { i18n: s } = ae.useI18n(), r = w(() => ({
987
+ const t = o, i = e, { i18n: s } = ue.useI18n(), r = w(() => ({
982
988
  type: t.chartOptions.type,
983
989
  stacked: t.chartOptions.stacked ?? !1,
984
990
  chartDatasetColors: t.chartOptions.chart_dataset_colors,
@@ -986,12 +992,12 @@ const ae = {
986
992
  hideTruncationWarning: t.query.limit !== void 0 && t.query.limit > 0
987
993
  })), a = w(() => t.context.zoomable), n = () => {
988
994
  i("edit-tile");
989
- }, d = (l) => {
990
- i("chart-data", l);
995
+ }, d = (u) => {
996
+ i("chart-data", u);
991
997
  };
992
- return (l, h) => {
993
- const u = ue("KDropdownItem");
994
- return C(), O(wt, {
998
+ return (u, h) => {
999
+ const l = he("KDropdownItem");
1000
+ return x(), O(wt, {
995
1001
  context: o.context,
996
1002
  query: o.query,
997
1003
  "query-ready": o.queryReady,
@@ -999,8 +1005,8 @@ const ae = {
999
1005
  onChartData: d
1000
1006
  }, {
1001
1007
  default: M(({ data: f }) => [
1002
- te("div", Ks, [
1003
- fe(E(Xi), ei({
1008
+ se("div", Qs, [
1009
+ ge(C(Zi), ei({
1004
1010
  "chart-data": f,
1005
1011
  "chart-options": r.value,
1006
1012
  "explore-link": o.exploreLink,
@@ -1010,15 +1016,15 @@ const ae = {
1010
1016
  "timeseries-zoom": a.value,
1011
1017
  "tooltip-title": ""
1012
1018
  }, o.extraProps, {
1013
- onSelectChartRange: h[0] || (h[0] = (m) => i("select-chart-range", m)),
1014
- onZoomTimeRange: h[1] || (h[1] = (m) => i("zoom-time-range", m))
1015
- }), rt({ _: 2 }, [
1019
+ onSelectChartRange: h[0] || (h[0] = (g) => i("select-chart-range", g)),
1020
+ onZoomTimeRange: h[1] || (h[1] = (g) => i("zoom-time-range", g))
1021
+ }), ot({ _: 2 }, [
1016
1022
  o.context.editable ? {
1017
1023
  name: "menu-items",
1018
1024
  fn: M(() => [
1019
- fe(u, { onClick: n }, {
1025
+ ge(l, { onClick: n }, {
1020
1026
  default: M(() => [
1021
- gt(J(E(s).t("renderer.edit")), 1)
1027
+ mt(J(C(s).t("renderer.edit")), 1)
1022
1028
  ]),
1023
1029
  _: 1
1024
1030
  })
@@ -1032,7 +1038,7 @@ const ae = {
1032
1038
  }, 8, ["context", "query", "query-ready", "refresh-counter"]);
1033
1039
  };
1034
1040
  }
1035
- }), Et = /* @__PURE__ */ be(Qs, [["__scopeId", "data-v-e1e7f610"]]), Wt = /* @__PURE__ */ ee({
1041
+ }), Et = /* @__PURE__ */ we(Vs, [["__scopeId", "data-v-e1e7f610"]]), Wt = /* @__PURE__ */ ee({
1036
1042
  __name: "BarChartRenderer",
1037
1043
  props: {
1038
1044
  query: {},
@@ -1045,7 +1051,7 @@ const ae = {
1045
1051
  exploreLink: {}
1046
1052
  },
1047
1053
  setup(o) {
1048
- return (e, t) => (C(), O(Et, {
1054
+ return (e, t) => (x(), O(Et, {
1049
1055
  "chart-options": o.chartOptions,
1050
1056
  context: o.context,
1051
1057
  "extra-props": { showAnnotations: !1 },
@@ -1070,7 +1076,7 @@ const ae = {
1070
1076
  emits: ["zoom-time-range", "select-chart-range"],
1071
1077
  setup(o, { emit: e }) {
1072
1078
  const t = e;
1073
- return (i, s) => (C(), O(Et, {
1079
+ return (i, s) => (x(), O(Et, {
1074
1080
  "chart-options": o.chartOptions,
1075
1081
  context: o.context,
1076
1082
  "explore-link": o.exploreLink,
@@ -1083,7 +1089,7 @@ const ae = {
1083
1089
  onZoomTimeRange: s[1] || (s[1] = (r) => t("zoom-time-range", r))
1084
1090
  }, null, 8, ["chart-options", "context", "explore-link", "height", "query", "query-ready", "refresh-counter", "requests-link"]));
1085
1091
  }
1086
- }), Vs = /* @__PURE__ */ ee({
1092
+ }), Ys = /* @__PURE__ */ ee({
1087
1093
  __name: "GoldenSignalsRenderer",
1088
1094
  props: {
1089
1095
  query: {},
@@ -1113,18 +1119,18 @@ const ae = {
1113
1119
  refreshCounter: e.refreshCounter
1114
1120
  };
1115
1121
  });
1116
- return (i, s) => (C(), B("div", {
1122
+ return (i, s) => (x(), B("div", {
1117
1123
  class: ze(["metric-card-tile-wrapper", { titled: !!e.chartOptions.chart_title }])
1118
1124
  }, [
1119
- fe(E(hs), Gi(Ui(t.value)), {
1125
+ ge(C(ds), Ui(Wi(t.value)), {
1120
1126
  default: M(() => [
1121
- fe(E(ds))
1127
+ ge(C(cs))
1122
1128
  ]),
1123
1129
  _: 1
1124
1130
  }, 16)
1125
1131
  ], 2));
1126
1132
  }
1127
- }), Ys = /* @__PURE__ */ be(Vs, [["__scopeId", "data-v-b77f52b8"]]), js = {
1133
+ }), js = /* @__PURE__ */ we(Ys, [["__scopeId", "data-v-b77f52b8"]]), Xs = {
1128
1134
  class: "fallback-entity-link",
1129
1135
  "data-testid": "entity-link-parent"
1130
1136
  }, Qt = /* @__PURE__ */ ee({
@@ -1133,9 +1139,9 @@ const ae = {
1133
1139
  entityLinkData: {}
1134
1140
  },
1135
1141
  setup(o) {
1136
- return (e, t) => (C(), B("div", js, J(o.entityLinkData.label), 1));
1142
+ return (e, t) => (x(), B("div", Xs, J(o.entityLinkData.label), 1));
1137
1143
  }
1138
- }), Xs = { key: 0 }, Zs = { key: 1 }, Js = /* @__PURE__ */ ee({
1144
+ }), Zs = { key: 0 }, Js = { key: 1 }, er = /* @__PURE__ */ ee({
1139
1145
  __name: "TopNTableRenderer",
1140
1146
  props: {
1141
1147
  query: {},
@@ -1148,7 +1154,7 @@ const ae = {
1148
1154
  exploreLink: {}
1149
1155
  },
1150
1156
  setup(o) {
1151
- const e = o, t = ge(ye), i = ti(async () => {
1157
+ const e = o, t = me(_e), i = ti(async () => {
1152
1158
  if (t != null && t.fetchComponent)
1153
1159
  try {
1154
1160
  return await t.fetchComponent("EntityLink");
@@ -1156,39 +1162,39 @@ const ae = {
1156
1162
  return Qt;
1157
1163
  }
1158
1164
  return Qt;
1159
- }), s = w(() => !!e.chartOptions.entity_link || !!Object.keys(e.chartOptions.entity_links || {}).length), r = (l) => {
1160
- var u;
1165
+ }), s = w(() => !!e.chartOptions.entity_link || !!Object.keys(e.chartOptions.entity_links || {}).length), r = (u) => {
1166
+ var l;
1161
1167
  const h = e.chartOptions.entity_links;
1162
- return h && (h[l] || ((u = Object.entries(h).find(([f]) => f.toLowerCase() === l.toLowerCase())) == null ? void 0 : u[1])) || "";
1163
- }, a = (l) => {
1164
- var u, f;
1165
- const h = (f = (u = l.dimensions) == null ? void 0 : u[0]) == null ? void 0 : f.dimension;
1166
- return !h || h === l.dimension;
1167
- }, n = (l) => r(l.dimension) || a(l) && e.chartOptions.entity_link || "", d = (l) => {
1168
- const h = n(l);
1168
+ return h && (h[u] || ((l = Object.entries(h).find(([f]) => f.toLowerCase() === u.toLowerCase())) == null ? void 0 : l[1])) || "";
1169
+ }, a = (u) => {
1170
+ var l, f;
1171
+ const h = (f = (l = u.dimensions) == null ? void 0 : l[0]) == null ? void 0 : f.dimension;
1172
+ return !h || h === u.dimension;
1173
+ }, n = (u) => r(u.dimension) || a(u) && e.chartOptions.entity_link || "", d = (u) => {
1174
+ const h = n(u);
1169
1175
  if (h)
1170
- if (l.id.includes(":")) {
1171
- const [u, f] = l.id.split(":");
1172
- return h.replace(Cs, u).replace(Mt, f);
1176
+ if (u.id.includes(":")) {
1177
+ const [l, f] = u.id.split(":");
1178
+ return h.replace(Rs, l).replace(Mt, f);
1173
1179
  } else
1174
- return h.replace(Mt, l.id);
1180
+ return h.replace(Mt, u.id);
1175
1181
  return "";
1176
1182
  };
1177
- return (l, h) => (C(), O(wt, {
1183
+ return (u, h) => (x(), O(wt, {
1178
1184
  context: o.context,
1179
1185
  query: o.query,
1180
1186
  "query-ready": o.queryReady,
1181
1187
  "refresh-counter": o.refreshCounter
1182
1188
  }, {
1183
- default: M(({ data: u }) => [
1184
- fe(E(Zi), {
1185
- data: u,
1189
+ default: M(({ data: l }) => [
1190
+ ge(C(Ji), {
1191
+ data: l,
1186
1192
  "synthetics-data-key": o.chartOptions.synthetics_data_key
1187
- }, rt({ _: 2 }, [
1193
+ }, ot({ _: 2 }, [
1188
1194
  s.value ? {
1189
1195
  name: "name",
1190
1196
  fn: M(({ record: f }) => [
1191
- !f.isEmpty && n(f) ? (C(), O(E(i), {
1197
+ !f.isEmpty && n(f) ? (x(), O(C(i), {
1192
1198
  key: 0,
1193
1199
  "entity-link-data": {
1194
1200
  id: f.id,
@@ -1196,8 +1202,8 @@ const ae = {
1196
1202
  deleted: f.deleted
1197
1203
  },
1198
1204
  "external-link": d(f)
1199
- }, null, 8, ["entity-link-data", "external-link"])) : (C(), B(mt, { key: 1 }, [
1200
- f.name === "empty" ? (C(), B("i", Xs, J(f.name), 1)) : (C(), B("span", Zs, J(f.name), 1))
1205
+ }, null, 8, ["entity-link-data", "external-link"])) : (x(), B(pt, { key: 1 }, [
1206
+ f.name === "empty" ? (x(), B("i", Zs, J(f.name), 1)) : (x(), B("span", Js, J(f.name), 1))
1201
1207
  ], 64))
1202
1208
  ]),
1203
1209
  key: "0"
@@ -1207,7 +1213,7 @@ const ae = {
1207
1213
  _: 1
1208
1214
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
1209
1215
  }
1210
- }), er = (o) => o.records.map((e) => {
1216
+ }), tr = (o) => o.records.map((e) => {
1211
1217
  const t = { ...e };
1212
1218
  return Object.entries(e).forEach(([i, s]) => {
1213
1219
  var a, n, d;
@@ -1216,7 +1222,7 @@ const ae = {
1216
1222
  const r = (d = (n = (a = o.meta.display) == null ? void 0 : a[i]) == null ? void 0 : n[String(s)]) == null ? void 0 : d.name;
1217
1223
  r && (t[i] = r);
1218
1224
  }), t;
1219
- }), tr = {
1225
+ }), ir = {
1220
1226
  /**
1221
1227
  * Builds platform table headers from configured or response-provided column names.
1222
1228
  * Known chart label translations are reused for user-facing labels, with the raw column as fallback.
@@ -1238,7 +1244,7 @@ const ae = {
1238
1244
  label: o(s) ? t(s) : i
1239
1245
  };
1240
1246
  })
1241
- }, ir = {
1247
+ }, sr = {
1242
1248
  /**
1243
1249
  * Fetches one page of platform tabular rows, applying dashboard context filters and
1244
1250
  * forwarding the datasource-aware query to AnalyticsBridge.tabularQueryFn.
@@ -1264,10 +1270,10 @@ const ae = {
1264
1270
  stripUnknownFilters: a,
1265
1271
  tabularQueryFn: n
1266
1272
  }) => {
1267
- var u;
1273
+ var l;
1268
1274
  if (!n)
1269
1275
  throw new Error("AnalyticsBridge.tabularQueryFn is not defined");
1270
- const d = s.query, l = a({
1276
+ const d = s.query, u = a({
1271
1277
  datasource: "platform",
1272
1278
  filters: [
1273
1279
  ...d.filters ?? [],
@@ -1280,17 +1286,17 @@ const ae = {
1280
1286
  columns: d.columns,
1281
1287
  cursor: t === void 0 ? d.cursor : String(t),
1282
1288
  entity: d.entity,
1283
- filters: l,
1289
+ filters: u,
1284
1290
  page_size: i
1285
1291
  }
1286
1292
  }, o);
1287
- return (u = h.meta.columns) != null && u.length && (r == null || r(h.meta.columns)), {
1288
- data: er(h),
1293
+ return (l = h.meta.columns) != null && l.length && (r == null || r(h.meta.columns)), {
1294
+ data: tr(h),
1289
1295
  cursor: h.meta.cursor,
1290
1296
  hasMore: !!h.meta.cursor
1291
1297
  };
1292
1298
  }
1293
- }, sr = /* @__PURE__ */ ee({
1299
+ }, rr = /* @__PURE__ */ ee({
1294
1300
  __name: "TableDataGridRenderer",
1295
1301
  props: {
1296
1302
  query: {},
@@ -1301,7 +1307,7 @@ const ae = {
1301
1307
  },
1302
1308
  emits: ["loading-change"],
1303
1309
  setup(o, { emit: e }) {
1304
- const t = o, i = e, s = ge(ye), r = nt(), { i18n: a } = ae.useI18n(), n = new AbortController(), d = H([]), l = H(!1), h = w(() => t.height === void 0 ? void 0 : { height: `${t.height}px` }), u = w(() => ({
1310
+ const t = o, i = e, s = me(_e), r = Ue(), { i18n: a } = ue.useI18n(), n = new AbortController(), d = A([]), u = A(!1), h = w(() => t.height === void 0 ? void 0 : { height: `${t.height}px` }), l = w(() => ({
1305
1311
  datasource: t.query.datasource,
1306
1312
  query: {
1307
1313
  columns: t.query.columns,
@@ -1325,58 +1331,58 @@ const ae = {
1325
1331
  tz: t.context.tz
1326
1332
  }
1327
1333
  }));
1328
- Fe(() => {
1334
+ Ge(() => {
1329
1335
  n.abort();
1330
1336
  });
1331
- const m = w(() => {
1332
- var g;
1333
- return tr[t.query.datasource]({
1337
+ const g = w(() => {
1338
+ var m;
1339
+ return ir[t.query.datasource]({
1334
1340
  // query.columns are optional in the API. If not provided, backend will return default columns.
1335
1341
  // If query columns are not provided, fallback to using columns from the response metadata for header configuration.
1336
- columns: (g = t.query.columns) != null && g.length ? t.query.columns : d.value,
1337
- translate: (k) => a.t(k),
1338
- canTranslate: (k) => a.te(k)
1342
+ columns: (m = t.query.columns) != null && m.length ? t.query.columns : d.value,
1343
+ translate: (T) => a.t(T),
1344
+ canTranslate: (T) => a.te(T)
1339
1345
  });
1340
- }), p = w(() => async ({ cursor: g, pageSize: k }) => {
1346
+ }), p = w(() => async ({ cursor: m, pageSize: T }) => {
1341
1347
  try {
1342
1348
  await r.isReady();
1343
- const z = ir[u.value.datasource];
1344
- if (!z)
1345
- throw new Error(`No table data grid fetcher found for datasource: ${u.value.datasource}`);
1346
- const v = await z({
1349
+ const R = sr[l.value.datasource];
1350
+ if (!R)
1351
+ throw new Error(`No table data grid fetcher found for datasource: ${l.value.datasource}`);
1352
+ const v = await R({
1347
1353
  abortController: n,
1348
1354
  context: t.context,
1349
- cursor: g,
1350
- pageSize: k,
1351
- query: u.value,
1352
- onResponseColumns: (q) => {
1353
- d.value = q;
1355
+ cursor: m,
1356
+ pageSize: T,
1357
+ query: l.value,
1358
+ onResponseColumns: (I) => {
1359
+ d.value = I;
1354
1360
  },
1355
1361
  stripUnknownFilters: r.stripUnknownFilters,
1356
1362
  tabularQueryFn: s == null ? void 0 : s.tabularQueryFn
1357
1363
  });
1358
- return l.value = !1, v;
1359
- } catch (z) {
1360
- throw l.value = !0, z;
1364
+ return u.value = !1, v;
1365
+ } catch (R) {
1366
+ throw u.value = !0, R;
1361
1367
  }
1362
- }), y = (g) => {
1363
- g.state === "error" && (l.value = !0), i("loading-change", g.state === "loading");
1368
+ }), y = (m) => {
1369
+ m.state === "error" && (u.value = !0), i("loading-change", m.state === "loading");
1364
1370
  };
1365
- return (g, k) => {
1366
- const z = ue("KSkeleton");
1367
- return C(), B("div", {
1371
+ return (m, T) => {
1372
+ const R = he("KSkeleton");
1373
+ return x(), B("div", {
1368
1374
  class: "table-data-grid-renderer",
1369
- style: Ye(h.value)
1375
+ style: Xe(h.value)
1370
1376
  }, [
1371
- o.queryReady ? (C(), O(E(cs), {
1377
+ o.queryReady ? (x(), O(C(fs), {
1372
1378
  key: 1,
1373
- error: l.value,
1379
+ error: u.value,
1374
1380
  fetcher: p.value,
1375
- headers: m.value,
1381
+ headers: g.value,
1376
1382
  "page-size": o.query.page_size,
1377
1383
  "refresh-key": f.value,
1378
1384
  onState: y
1379
- }, null, 8, ["error", "fetcher", "headers", "page-size", "refresh-key"])) : (C(), O(z, {
1385
+ }, null, 8, ["error", "fetcher", "headers", "page-size", "refresh-key"])) : (x(), O(R, {
1380
1386
  key: 0,
1381
1387
  "data-testid": "table-skeleton",
1382
1388
  type: "table"
@@ -1384,7 +1390,7 @@ const ae = {
1384
1390
  ], 4);
1385
1391
  };
1386
1392
  }
1387
- }), rr = /* @__PURE__ */ be(sr, [["__scopeId", "data-v-c49ff2eb"]]), Vt = "#6c7489", nr = "12px", Yt = "20px", jt = "32px", gi = "20px", or = /* @__PURE__ */ ee({
1393
+ }), nr = /* @__PURE__ */ we(rr, [["__scopeId", "data-v-c49ff2eb"]]), Vt = "#6c7489", or = "12px", Yt = "20px", jt = "32px", gi = "20px", ar = /* @__PURE__ */ ee({
1388
1394
  __name: "DonutChartRenderer",
1389
1395
  props: {
1390
1396
  query: {},
@@ -1397,7 +1403,7 @@ const ae = {
1397
1403
  exploreLink: {}
1398
1404
  },
1399
1405
  setup(o) {
1400
- return (e, t) => (C(), O(Et, {
1406
+ return (e, t) => (x(), O(Et, {
1401
1407
  "chart-options": o.chartOptions,
1402
1408
  context: o.context,
1403
1409
  height: o.height,
@@ -1406,15 +1412,15 @@ const ae = {
1406
1412
  "refresh-counter": o.refreshCounter
1407
1413
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
1408
1414
  }
1409
- }), ar = ["data-testid"], lr = {
1415
+ }), lr = ["data-testid"], ur = {
1410
1416
  key: 0,
1411
1417
  class: "tile-header"
1412
- }, ur = { class: "badge-container" }, hr = { class: "badge-text" }, dr = { key: 0 }, cr = ["data-testid"], fr = ["data-testid"], gr = { class: "delete-option" }, mr = ["data-testid"], pr = ["data-testid"], yr = /* @__PURE__ */ ee({
1418
+ }, hr = { class: "badge-container" }, dr = { class: "badge-text" }, cr = { key: 0 }, fr = ["data-testid"], gr = ["data-testid"], mr = { class: "delete-option" }, pr = ["data-testid"], yr = ["data-testid"], vr = /* @__PURE__ */ ee({
1413
1419
  __name: "DashboardTile",
1414
- props: /* @__PURE__ */ je({
1420
+ props: /* @__PURE__ */ Ze({
1415
1421
  context: {},
1416
1422
  definition: {},
1417
- height: { default: Ge },
1423
+ height: { default: We },
1418
1424
  isFullscreen: { type: Boolean },
1419
1425
  hideActions: { type: Boolean, default: !1 },
1420
1426
  hideZoomActions: { type: Boolean, default: !1 },
@@ -1426,123 +1432,123 @@ const ae = {
1426
1432
  refreshCounter: { default: 0 },
1427
1433
  refreshCounterModifiers: {}
1428
1434
  }),
1429
- emits: /* @__PURE__ */ je(["chart-data", "edit-tile", "duplicate-tile", "remove-tile", "tile-time-range-zoom", "tile-bounds-change"], ["update:refreshCounter"]),
1435
+ emits: /* @__PURE__ */ Ze(["chart-data", "edit-tile", "duplicate-tile", "remove-tile", "tile-time-range-zoom", "tile-bounds-change"], ["update:refreshCounter"]),
1430
1436
  setup(o, { expose: e, emit: t }) {
1431
- pt((x) => ({
1432
- v55ee0ccc: `${x.height}px`
1437
+ yt((E) => ({
1438
+ v4adce2d4: `${E.height}px`
1433
1439
  }));
1434
1440
  const i = parseInt(gi, 10), s = o, r = ii(o, "refreshCounter"), a = () => {
1435
- z.value = !0, r.value++;
1436
- }, n = t, d = ti(() => import("./GeoMapRenderer-BSBPCCw4.js")), l = ge(ye), h = nt(), { stripUnknownFilters: u } = bt(h), { i18n: f } = ae.useI18n(), m = H(), p = H({ status: "loading" }), y = H(!1), g = H(), k = H(!1), z = H(!0), v = w(() => s.definition.chart), q = w(() => "chart_title" in v.value ? v.value.chart_title : void 0), A = w(() => "description" in v.value ? v.value.description : void 0), le = w(() => v.value.type === "slottable"), xe = w(() => oe(s.definition) ? !1 : !("allow_csv_export" in v.value) || v.value.allow_csv_export !== !1), {
1437
- exploreLinkKebabMenu: Y,
1438
- requestsLinkKebabMenu: ve,
1439
- canShowKebabMenu: S,
1440
- canGenerateRequestsLink: I,
1441
- canGenerateExploreLink: Q,
1442
- requestsLinkZoomActions: D,
1441
+ R.value = !0, r.value++;
1442
+ }, n = t, d = ti(() => import("./GeoMapRenderer-xglakGvT.js")), u = me(_e), h = Ue(), { stripUnknownFilters: l } = Ie(h), { i18n: f } = ue.useI18n(), g = A(), p = A({ status: "loading" }), y = A(!1), m = A(), T = A(!1), R = A(!0), v = w(() => s.definition.chart), I = w(() => "chart_title" in v.value ? v.value.chart_title : void 0), q = w(() => "description" in v.value ? v.value.description : void 0), te = w(() => v.value.type === "slottable"), ie = w(() => le(s.definition) ? !1 : !("allow_csv_export" in v.value) || v.value.allow_csv_export !== !1), {
1443
+ exploreLinkKebabMenu: W,
1444
+ requestsLinkKebabMenu: pe,
1445
+ canShowKebabMenu: D,
1446
+ canGenerateRequestsLink: H,
1447
+ canGenerateExploreLink: V,
1448
+ requestsLinkZoomActions: z,
1443
1449
  exploreLinkZoomActions: N,
1444
1450
  buildExploreQuery: F,
1445
1451
  buildExploreLink: P,
1446
- buildRequestLink: V,
1447
- buildRequestsQueryZoomActions: at
1448
- } = ae.useContextLinks({
1449
- queryBridge: l,
1450
- chartData: Ht(m),
1452
+ buildRequestLink: Y,
1453
+ buildRequestsQueryZoomActions: lt
1454
+ } = ue.useContextLinks({
1455
+ queryBridge: u,
1456
+ chartData: Ht(g),
1451
1457
  definition: Ae(s, "definition"),
1452
1458
  context: Ht(Ae(s, "context"))
1453
- }), { issueQuery: lt } = ae.useIssueQuery();
1454
- Oe(() => s.definition, async (x, T) => {
1455
- await yt(), g.value && (k.value = g.value.scrollWidth > g.value.clientWidth);
1459
+ }), { issueQuery: ut } = ue.useIssueQuery();
1460
+ Oe(() => s.definition, async (E, S) => {
1461
+ await vt(), m.value && (T.value = m.value.scrollWidth > m.value.clientWidth);
1456
1462
  try {
1457
- JSON.stringify(x == null ? void 0 : x.query) !== JSON.stringify(T == null ? void 0 : T.query) && (z.value = !0);
1463
+ JSON.stringify(E == null ? void 0 : E.query) !== JSON.stringify(S == null ? void 0 : S.query) && (R.value = !0);
1458
1464
  } catch {
1459
1465
  }
1460
1466
  }, { immediate: !0, deep: !0 });
1461
- const Ue = w(() => f.t("csvExport.defaultFilename")), We = w(() => !!Y.value || xe.value || s.context.editable), we = w(() => !s.hideActions && S.value && We.value), yi = w(() => we.value && We.value && !s.isFullscreen), vi = w(() => v.value.type === "golden_signals" && !!A.value), _i = {
1467
+ const Ke = w(() => f.t("csvExport.defaultFilename")), Qe = w(() => !!W.value || ie.value || s.context.editable), Ee = w(() => !s.hideActions && D.value && Qe.value), yi = w(() => Ee.value && Qe.value && !s.isFullscreen), vi = w(() => v.value.type === "golden_signals" && !!q.value), _i = {
1462
1468
  timeseries_line: Kt,
1463
1469
  timeseries_bar: Kt,
1464
1470
  horizontal_bar: Wt,
1465
1471
  vertical_bar: Wt,
1466
1472
  gauge: Ut,
1467
- donut: or,
1468
- golden_signals: Ys,
1469
- top_n: Js,
1470
- table: rr,
1473
+ donut: ar,
1474
+ golden_signals: js,
1475
+ top_n: er,
1476
+ table: nr,
1471
1477
  slottable: void 0,
1472
1478
  single_value: Ut,
1473
1479
  choropleth_map: d
1474
1480
  }, bi = w(() => {
1475
- var x, T, G, W;
1481
+ var E, S, G, K;
1476
1482
  return {
1477
- ...(x = Ee.value) != null && x.rendererEvents.supportsRequests ? { "select-chart-range": Ai } : {},
1478
- ...(T = Ee.value) != null && T.rendererEvents.supportsZoom ? { "zoom-time-range": Ni } : {},
1479
- ...(G = Ee.value) != null && G.rendererEvents.supportsBounds ? { "bounds-change": Li } : {},
1480
- ...(W = Ee.value) != null && W.rendererEvents.supportsLoadingChange ? { "loading-change": Si } : {}
1483
+ ...(E = xe.value) != null && E.rendererEvents.supportsRequests ? { "select-chart-range": Oi } : {},
1484
+ ...(S = xe.value) != null && S.rendererEvents.supportsZoom ? { "zoom-time-range": Li } : {},
1485
+ ...(G = xe.value) != null && G.rendererEvents.supportsBounds ? { "bounds-change": Ai } : {},
1486
+ ...(K = xe.value) != null && K.rendererEvents.supportsLoadingChange ? { "loading-change": Di } : {}
1481
1487
  };
1482
- }), Ee = w(() => {
1488
+ }), xe = w(() => {
1483
1489
  var Dt, zt, Nt;
1484
- const x = s.definition, T = _i[x.chart.type], G = oe(x), W = !!((Dt = T == null ? void 0 : T.emits) != null && Dt.includes("select-chart-range")), Ne = !!((zt = T == null ? void 0 : T.emits) != null && zt.includes("zoom-time-range")), me = x.chart.type === "choropleth_map", Ce = !!((Nt = T == null ? void 0 : T.emits) != null && Nt.includes("loading-change")), Oi = {
1485
- query: x.query,
1490
+ const E = s.definition, S = _i[E.chart.type], G = le(E), K = !!((Dt = S == null ? void 0 : S.emits) != null && Dt.includes("select-chart-range")), Ne = !!((zt = S == null ? void 0 : S.emits) != null && zt.includes("zoom-time-range")), ye = E.chart.type === "choropleth_map", Ce = !!((Nt = S == null ? void 0 : S.emits) != null && Nt.includes("loading-change")), Hi = {
1491
+ query: E.query,
1486
1492
  context: s.context,
1487
1493
  queryReady: s.queryReady,
1488
1494
  height: s.height - i * 2,
1489
1495
  refreshCounter: r.value
1490
- }, Hi = {
1491
- chartOptions: x.chart,
1492
- requestsLink: s.hideZoomActions ? void 0 : D.value,
1496
+ }, Ii = {
1497
+ chartOptions: E.chart,
1498
+ requestsLink: s.hideZoomActions ? void 0 : z.value,
1493
1499
  exploreLink: s.hideZoomActions ? void 0 : N.value
1494
1500
  };
1495
- return T && {
1496
- component: T,
1501
+ return S && {
1502
+ component: S,
1497
1503
  rendererProps: {
1498
- ...Oi,
1499
- ...G ? {} : Hi
1504
+ ...Hi,
1505
+ ...G ? {} : Ii
1500
1506
  },
1501
1507
  rendererEvents: {
1502
- supportsRequests: W,
1508
+ supportsRequests: K,
1503
1509
  supportsZoom: Ne,
1504
- supportsBounds: me,
1510
+ supportsBounds: ye,
1505
1511
  supportsLoadingChange: Ce
1506
1512
  }
1507
1513
  };
1508
- }), ut = w(() => {
1514
+ }), ht = w(() => {
1509
1515
  var G;
1510
- if (oe(s.definition))
1516
+ if (le(s.definition))
1511
1517
  return null;
1512
- const x = s.definition.query, T = x == null ? void 0 : x.time_range;
1513
- if ((x == null ? void 0 : x.datasource) === "platform" && !((G = x.dimensions) != null && G.includes("time")))
1518
+ const E = s.definition.query, S = E == null ? void 0 : E.time_range;
1519
+ if ((E == null ? void 0 : E.datasource) === "platform" && !((G = E.dimensions) != null && G.includes("time")))
1514
1520
  return f.t("renderer.as_of_today");
1515
- if ((T == null ? void 0 : T.type) === "relative") {
1516
- const W = Ki.get(Qi[T.time_range]);
1517
- return W ? W.display : (console.warn("Did not recognize the given relative time range:", T.time_range), T.time_range);
1518
- } else if ((T == null ? void 0 : T.type) === "absolute") {
1519
- const W = T.tz || "Etc/UTC";
1520
- return `${qt(T.start, { short: !0, tz: W })} - ${qt(T.end, { short: !0, tz: W })}`;
1521
+ if ((S == null ? void 0 : S.type) === "relative") {
1522
+ const K = Qi.get(Vi[S.time_range]);
1523
+ return K ? K.display : (console.warn("Did not recognize the given relative time range:", S.time_range), S.time_range);
1524
+ } else if ((S == null ? void 0 : S.type) === "absolute") {
1525
+ const K = S.tz || "Etc/UTC";
1526
+ return `${qt(S.start, { short: !0, tz: K })} - ${qt(S.end, { short: !0, tz: K })}`;
1521
1527
  }
1522
1528
  return null;
1523
- }), Rt = w(() => le.value ? !1 : [
1524
- !!q.value,
1529
+ }), Rt = w(() => te.value ? !1 : [
1530
+ !!I.value,
1525
1531
  yi.value,
1526
- !!ut.value,
1532
+ !!ht.value,
1527
1533
  vi.value,
1528
1534
  s.showRefresh
1529
- ].some(Boolean)), kt = w(() => m.value ? dt(m.value.meta.granularity_ms) : void 0), wi = w(() => ["timeseries_line", "timeseries_bar"].includes(v.value.type)), Tt = w(() => {
1530
- if (oe(s.definition) || !wi.value || !s.queryReady || z.value)
1535
+ ].some(Boolean)), kt = w(() => g.value ? ct(g.value.meta.granularity_ms) : void 0), wi = w(() => ["timeseries_line", "timeseries_bar"].includes(v.value.type)), Tt = w(() => {
1536
+ if (le(s.definition) || !wi.value || !s.queryReady || R.value)
1531
1537
  return !1;
1532
- const x = s.definition.query.granularity;
1533
- return !x || !kt.value ? !1 : x !== kt.value;
1538
+ const E = s.definition.query.granularity;
1539
+ return !E || !kt.value ? !1 : E !== kt.value;
1534
1540
  }), Ei = w(() => {
1535
1541
  var G;
1536
- const x = dt(((G = m.value) == null ? void 0 : G.meta.granularity_ms) ?? 0) ?? "unknown", T = oe(s.definition) ? "unknown" : s.definition.query.granularity ?? "unknown";
1542
+ const E = ct(((G = g.value) == null ? void 0 : G.meta.granularity_ms) ?? 0) ?? "unknown", S = le(s.definition) ? "unknown" : s.definition.query.granularity ?? "unknown";
1537
1543
  return f.t("query_aged_out_warning", {
1538
- currentGranularity: f.t(`granularities.${x}`),
1539
- savedGranularity: f.t(`granularities.${T}`)
1544
+ currentGranularity: f.t(`granularities.${E}`),
1545
+ savedGranularity: f.t(`granularities.${S}`)
1540
1546
  });
1541
1547
  }), xi = w(() => {
1542
- const x = s.definition, T = [...s.context.filters, ...x.query.filters ?? []], G = "metrics" in x.query ? x.query.metrics : void 0, W = x.query.datasource ?? "api_usage";
1543
- return u.value({
1544
- datasource: W,
1545
- filters: T,
1548
+ const E = s.definition, S = [...s.context.filters, ...E.query.filters ?? []], G = "metrics" in E.query ? E.query.metrics : void 0, K = E.query.datasource ?? "api_usage";
1549
+ return l.value({
1550
+ datasource: K,
1551
+ filters: S,
1546
1552
  queryFields: G
1547
1553
  });
1548
1554
  }), Ci = () => {
@@ -1551,216 +1557,221 @@ const ae = {
1551
1557
  n("duplicate-tile", s.definition);
1552
1558
  }, ki = () => {
1553
1559
  n("remove-tile", s.definition);
1554
- }, Ti = (x) => {
1555
- m.value = x, z.value = !1, n("chart-data", x);
1556
- }, Si = (x) => {
1557
- z.value = x;
1558
- }, Di = () => {
1560
+ }, Ti = (E) => {
1561
+ g.value = E, R.value = !1, n("chart-data", E);
1562
+ }, Si = () => {
1563
+ R.value = !1;
1564
+ }, Di = (E) => {
1565
+ R.value = E;
1566
+ }, zi = () => {
1559
1567
  y.value = !1;
1560
1568
  }, St = () => {
1561
- var G, W;
1562
- const x = (G = s.definition.query.datasource) == null ? void 0 : G.startsWith("goap");
1563
- return ((W = l == null ? void 0 : l.staticConfig) == null ? void 0 : W.increaseCsvExportLimit) !== !1 && !x ? lt(s.definition.query, s.context, Vi) : m.value ? Promise.resolve(m.value) : new Promise((Ne) => {
1564
- const me = Oe(m, (Ce) => {
1565
- Ce && (Ne(Ce), me());
1569
+ var G, K;
1570
+ const E = (G = s.definition.query.datasource) == null ? void 0 : G.startsWith("goap");
1571
+ return ((K = u == null ? void 0 : u.staticConfig) == null ? void 0 : K.increaseCsvExportLimit) !== !1 && !E ? ut(s.definition.query, s.context, Yi) : g.value ? Promise.resolve(g.value) : new Promise((Ne) => {
1572
+ const ye = Oe(g, (Ce) => {
1573
+ Ce && (Ne(Ce), ye());
1566
1574
  });
1567
1575
  });
1568
- }, zi = async () => {
1576
+ }, Ni = async () => {
1569
1577
  y.value = !0, p.value = { status: "loading" };
1570
1578
  try {
1571
- const x = await St();
1572
- p.value = { status: "success", chartData: x };
1573
- } catch (x) {
1574
- p.value = { status: "error", error: x };
1579
+ const E = await St();
1580
+ p.value = { status: "success", chartData: E };
1581
+ } catch (E) {
1582
+ p.value = { status: "error", error: E };
1575
1583
  }
1576
- }, Ni = (x) => {
1577
- const T = {
1584
+ }, Li = (E) => {
1585
+ const S = {
1578
1586
  tileId: s.tileId.toString(),
1579
- timeRange: x
1587
+ timeRange: E
1580
1588
  };
1581
- n("tile-time-range-zoom", T);
1582
- }, Li = (x) => {
1583
- const T = {
1589
+ n("tile-time-range-zoom", S);
1590
+ }, Ai = (E) => {
1591
+ const S = {
1584
1592
  tileId: s.tileId.toString(),
1585
- bounds: x
1593
+ bounds: E
1586
1594
  };
1587
- n("tile-bounds-change", T);
1588
- }, Ai = (x) => {
1589
- const T = xi.value, G = F(x, T);
1590
- N.value = Q.value ? { href: P(G) } : void 0, D.value = I.value ? { href: V(at(x, T)) } : void 0;
1595
+ n("tile-bounds-change", S);
1596
+ }, Oi = (E) => {
1597
+ const S = xi.value, G = F(E, S);
1598
+ N.value = V.value ? { href: P(G) } : void 0, z.value = H.value ? { href: Y(lt(E, S)) } : void 0;
1591
1599
  };
1592
- return e({ getExportData: St }), (x, T) => {
1593
- const G = ue("KTooltip"), W = ue("KBadge"), Ne = ue("KButton"), me = ue("KDropdownItem"), Ce = ue("KDropdown");
1594
- return C(), B("div", {
1600
+ return e({ getExportData: St }), (E, S) => {
1601
+ const G = he("KTooltip"), K = he("KBadge"), Ne = he("KButton"), ye = he("KDropdownItem"), Ce = he("KDropdown");
1602
+ return x(), B("div", {
1595
1603
  class: ze(["tile-boundary", {
1596
1604
  editable: o.context.editable,
1597
1605
  headless: !Rt.value
1598
1606
  }]),
1599
1607
  "data-testid": `tile-${o.tileId}`
1600
1608
  }, [
1601
- Rt.value && !le.value ? (C(), B("div", lr, [
1602
- fe(G, {
1609
+ Rt.value && !te.value ? (x(), B("div", ur, [
1610
+ ge(G, {
1603
1611
  class: "title-tooltip",
1604
- disabled: !k.value,
1612
+ disabled: !T.value,
1605
1613
  "max-width": "500",
1606
- text: q.value
1614
+ text: I.value
1607
1615
  }, {
1608
1616
  default: M(() => [
1609
- te("div", {
1617
+ se("div", {
1610
1618
  ref_key: "titleRef",
1611
- ref: g,
1619
+ ref: m,
1612
1620
  class: "title"
1613
- }, J(q.value), 513)
1621
+ }, J(I.value), 513)
1614
1622
  ]),
1615
1623
  _: 1
1616
1624
  }, 8, ["disabled", "text"]),
1617
- te("div", ur, [
1618
- ut.value ? (C(), O(W, {
1625
+ se("div", hr, [
1626
+ ht.value ? (x(), O(K, {
1619
1627
  key: 0,
1620
1628
  "data-testid": "time-range-badge",
1621
1629
  tooltip: Tt.value ? Ei.value : void 0,
1622
1630
  "tooltip-attributes": { maxWidth: "320px" }
1623
- }, rt({
1631
+ }, ot({
1624
1632
  default: M(() => [
1625
- te("span", hr, J(ut.value), 1)
1633
+ se("span", dr, J(ht.value), 1)
1626
1634
  ]),
1627
1635
  _: 2
1628
1636
  }, [
1629
1637
  Tt.value ? {
1630
1638
  name: "icon",
1631
1639
  fn: M(() => [
1632
- fe(E(ns), {
1633
- size: `var(--kui-icon-size-20, ${E(nr)})`
1640
+ ge(C(os), {
1641
+ size: `var(--kui-icon-size-20, ${C(or)})`
1634
1642
  }, null, 8, ["size"])
1635
1643
  ]),
1636
1644
  key: "0"
1637
1645
  } : void 0
1638
1646
  ]), 1032, ["tooltip"])) : X("", !0)
1639
1647
  ]),
1640
- o.showRefresh ? (C(), B("div", dr, [
1641
- fe(Ne, {
1648
+ o.showRefresh ? (x(), B("div", cr, [
1649
+ ge(Ne, {
1642
1650
  appearance: "secondary",
1643
1651
  class: "refresh-button",
1644
1652
  "data-testid": `tile-refresh-button-${o.tileId}`,
1645
- disabled: z.value,
1653
+ disabled: R.value,
1646
1654
  icon: "",
1647
1655
  size: "small",
1648
1656
  onClick: a
1649
1657
  }, {
1650
1658
  default: M(() => [
1651
- z.value ? (C(), O(E(os), {
1659
+ R.value ? (x(), O(C(as), {
1652
1660
  key: 0,
1653
1661
  role: "button",
1654
- size: `var(--kui-icon-size-60, ${E(jt)})`,
1662
+ size: `var(--kui-icon-size-60, ${C(jt)})`,
1655
1663
  tabindex: "0"
1656
- }, null, 8, ["size"])) : (C(), O(E(as), {
1664
+ }, null, 8, ["size"])) : (x(), O(C(ls), {
1657
1665
  key: 1,
1658
1666
  role: "button",
1659
- size: `var(--kui-icon-size-60, ${E(jt)})`,
1667
+ size: `var(--kui-icon-size-60, ${C(jt)})`,
1660
1668
  tabindex: "0"
1661
1669
  }, null, 8, ["size"]))
1662
1670
  ]),
1663
1671
  _: 1
1664
1672
  }, 8, ["data-testid", "disabled"])
1665
1673
  ])) : X("", !0),
1666
- we.value ? (C(), B("div", {
1674
+ Ee.value ? (x(), B("div", {
1667
1675
  key: 1,
1668
1676
  class: "tile-actions",
1669
1677
  "data-testid": `tile-actions-${o.tileId}`
1670
1678
  }, [
1671
- we.value && o.context.editable && !o.isFullscreen ? (C(), O(E(ls), {
1679
+ Ee.value && o.context.editable && !o.isFullscreen ? (x(), O(C(us), {
1672
1680
  key: 0,
1673
1681
  class: "edit-icon",
1674
- color: `var(--kui-color-text-neutral, ${E(Vt)})`,
1682
+ color: `var(--kui-color-text-neutral, ${C(Vt)})`,
1675
1683
  "data-testid": `edit-tile-${o.tileId}`,
1676
- size: `var(--kui-icon-size-40, ${E(Yt)})`,
1684
+ size: `var(--kui-icon-size-40, ${C(Yt)})`,
1677
1685
  onClick: Ci
1678
1686
  }, null, 8, ["color", "data-testid", "size"])) : X("", !0),
1679
- we.value && We.value && !o.isFullscreen ? (C(), O(Ce, {
1687
+ Ee.value && Qe.value && !o.isFullscreen ? (x(), O(Ce, {
1680
1688
  key: 1,
1681
1689
  class: "dropdown",
1682
1690
  "data-testid": `chart-action-menu-${o.tileId}`,
1683
1691
  "kpop-attributes": { placement: "bottom-end" }
1684
1692
  }, {
1685
1693
  items: M(() => [
1686
- E(Y) ? (C(), O(me, {
1694
+ C(W) ? (x(), O(ye, {
1687
1695
  key: 0,
1688
1696
  "data-testid": `chart-jump-to-explore-${o.tileId}`,
1689
- item: { label: E(f).t("jumpToExplore"), to: E(Y) }
1697
+ item: { label: C(f).t("jumpToExplore"), to: C(W) }
1690
1698
  }, null, 8, ["data-testid", "item"])) : X("", !0),
1691
- !E(oe)(o.definition) && E(ve) ? (C(), O(me, {
1699
+ !C(le)(o.definition) && C(pe) ? (x(), O(ye, {
1692
1700
  key: 1,
1693
1701
  "data-testid": `chart-jump-to-requests-${o.tileId}`,
1694
- item: { label: E(f).t("jumpToRequests"), to: E(ve) }
1702
+ item: { label: C(f).t("jumpToRequests"), to: C(pe) }
1695
1703
  }, null, 8, ["data-testid", "item"])) : X("", !0),
1696
- xe.value ? (C(), O(me, {
1704
+ ie.value ? (x(), O(ye, {
1697
1705
  key: 2,
1698
1706
  class: "chart-export-button",
1699
1707
  "data-testid": `chart-csv-export-${o.tileId}`,
1700
- onClick: zi
1708
+ onClick: Ni
1701
1709
  }, {
1702
1710
  default: M(() => [
1703
- te("span", {
1711
+ se("span", {
1704
1712
  class: "chart-export-trigger",
1705
1713
  "data-testid": `csv-export-button-${o.tileId}`
1706
- }, J(E(f).t("csvExport.exportAsCsv")), 9, fr)
1714
+ }, J(C(f).t("csvExport.exportAsCsv")), 9, gr)
1707
1715
  ]),
1708
1716
  _: 1
1709
1717
  }, 8, ["data-testid"])) : X("", !0),
1710
- o.context.editable ? (C(), O(me, {
1718
+ o.context.editable ? (x(), O(ye, {
1711
1719
  key: 3,
1712
1720
  "data-testid": `duplicate-tile-${o.tileId}`,
1713
1721
  onClick: Ri
1714
1722
  }, {
1715
1723
  default: M(() => [
1716
- gt(J(E(f).t("renderer.duplicateTile")), 1)
1724
+ mt(J(C(f).t("renderer.duplicateTile")), 1)
1717
1725
  ]),
1718
1726
  _: 1
1719
1727
  }, 8, ["data-testid"])) : X("", !0),
1720
- o.context.editable ? (C(), O(me, {
1728
+ o.context.editable ? (x(), O(ye, {
1721
1729
  key: 4,
1722
1730
  "data-testid": `remove-tile-${o.tileId}`,
1723
1731
  onClick: ki
1724
1732
  }, {
1725
1733
  default: M(() => [
1726
- te("span", gr, J(E(f).t("renderer.delete")), 1)
1734
+ se("span", mr, J(C(f).t("renderer.delete")), 1)
1727
1735
  ]),
1728
1736
  _: 1
1729
1737
  }, 8, ["data-testid"])) : X("", !0)
1730
1738
  ]),
1731
1739
  default: M(() => [
1732
- fe(E(us), {
1740
+ ge(C(hs), {
1733
1741
  class: "kebab-action-menu",
1734
- color: `var(--kui-color-text-neutral, ${E(Vt)})`,
1742
+ color: `var(--kui-color-text-neutral, ${C(Vt)})`,
1735
1743
  "data-testid": `kebab-action-menu-${o.tileId}`,
1736
- size: `var(--kui-icon-size-40, ${E(Yt)})`
1744
+ size: `var(--kui-icon-size-40, ${C(Yt)})`
1737
1745
  }, null, 8, ["color", "data-testid", "size"])
1738
1746
  ]),
1739
1747
  _: 1
1740
1748
  }, 8, ["data-testid"])) : X("", !0)
1741
- ], 8, cr)) : A.value ? (C(), B("div", {
1749
+ ], 8, fr)) : q.value ? (x(), B("div", {
1742
1750
  key: 2,
1743
1751
  class: "header-description",
1744
1752
  "data-testid": `tile-description-${o.tileId}`
1745
- }, J(A.value), 9, mr)) : X("", !0),
1746
- y.value ? (C(), O(E(Ji), {
1753
+ }, J(q.value), 9, pr)) : X("", !0),
1754
+ y.value ? (x(), O(C(es), {
1747
1755
  key: 3,
1748
1756
  "data-testid": `csv-export-modal-${o.tileId}`,
1749
1757
  "export-state": p.value,
1750
- filename: Ue.value,
1751
- onCloseModal: Di
1758
+ filename: Ke.value,
1759
+ onCloseModal: zi
1752
1760
  }, null, 8, ["data-testid", "export-state", "filename"])) : X("", !0)
1753
1761
  ])) : X("", !0),
1754
- te("div", {
1762
+ se("div", {
1755
1763
  class: ze(["tile-content", `type-${o.tileType}-${v.value.type}`]),
1756
1764
  "data-testid": `tile-content-${o.tileId}`
1757
1765
  }, [
1758
- Ee.value ? (C(), O(si(Ee.value.component), ei({ key: 0 }, Ee.value.rendererProps, Wi(bi.value), { onChartData: Ti }), null, 16)) : X("", !0)
1759
- ], 10, pr)
1760
- ], 10, ar);
1766
+ xe.value ? (x(), O(si(xe.value.component), ei({ key: 0 }, xe.value.rendererProps, Ki(bi.value), {
1767
+ onChartData: Ti,
1768
+ onQueryComplete: Si
1769
+ }), null, 16)) : X("", !0)
1770
+ ], 10, yr)
1771
+ ], 10, lr);
1761
1772
  };
1762
1773
  }
1763
- }), mi = /* @__PURE__ */ be(yr, [["__scopeId", "data-v-ca900eba"]]), vr = (o, e) => {
1774
+ }), mi = /* @__PURE__ */ we(vr, [["__scopeId", "data-v-8217fef4"]]), _r = (o, e) => {
1764
1775
  let t = 0;
1765
1776
  const i = /* @__PURE__ */ new Map();
1766
1777
  e.forEach((r) => {
@@ -1771,18 +1782,18 @@ const ae = {
1771
1782
  for (let r = 0; r < t; r++)
1772
1783
  i.get(r) ? s.push("auto") : s.push(`${o}px`);
1773
1784
  return s;
1774
- }, _r = /* @__PURE__ */ ee({
1785
+ }, br = /* @__PURE__ */ ee({
1775
1786
  __name: "GridLayout",
1776
1787
  props: {
1777
1788
  tileHeight: {
1778
1789
  type: Number,
1779
1790
  required: !1,
1780
- default: () => Ge
1791
+ default: () => We
1781
1792
  },
1782
1793
  columns: {
1783
1794
  type: Number,
1784
1795
  required: !1,
1785
- default: () => _t
1796
+ default: () => bt
1786
1797
  },
1787
1798
  tiles: {
1788
1799
  type: Array,
@@ -1790,21 +1801,21 @@ const ae = {
1790
1801
  }
1791
1802
  },
1792
1803
  setup(o) {
1793
- pt((n) => ({
1804
+ yt((n) => ({
1794
1805
  v821fda82: e.columns,
1795
1806
  v0870d42d: r.value
1796
1807
  }));
1797
- const e = o, t = H(null), i = H(0), s = new ResizeObserver((n) => {
1808
+ const e = o, t = A(null), i = A(0), s = new ResizeObserver((n) => {
1798
1809
  window.requestAnimationFrame(() => {
1799
1810
  !Array.isArray(n) || !n.length || (i.value = n[0].contentRect.width);
1800
1811
  });
1801
1812
  });
1802
- st(() => {
1813
+ nt(() => {
1803
1814
  t.value && s.observe(t.value);
1804
- }), Fe(() => {
1815
+ }), Ge(() => {
1805
1816
  t.value && s.unobserve(t.value);
1806
1817
  });
1807
- const r = w(() => vr(e.tileHeight, e.tiles).join(" ")), a = w(() => e.tiles.map((n, d) => ({
1818
+ const r = w(() => _r(e.tileHeight, e.tiles).join(" ")), a = w(() => e.tiles.map((n, d) => ({
1808
1819
  key: `tile-${d}`,
1809
1820
  tile: n,
1810
1821
  style: {
@@ -1814,27 +1825,27 @@ const ae = {
1814
1825
  "grid-row-end": n.layout.position.row + 1 + n.layout.size.rows
1815
1826
  }
1816
1827
  })));
1817
- return (n, d) => (C(), B("div", {
1828
+ return (n, d) => (x(), B("div", {
1818
1829
  ref_key: "gridContainer",
1819
1830
  ref: t,
1820
1831
  class: "kong-ui-public-grid-layout"
1821
1832
  }, [
1822
- (C(!0), B(mt, null, ri(a.value, (l) => (C(), B("div", {
1823
- key: l.key,
1833
+ (x(!0), B(pt, null, ri(a.value, (u) => (x(), B("div", {
1834
+ key: u.key,
1824
1835
  class: ze(["grid-cell", {
1825
- "empty-cell": !l.tile
1836
+ "empty-cell": !u.tile
1826
1837
  }]),
1827
- style: Ye(l.style)
1838
+ style: Xe(u.style)
1828
1839
  }, [
1829
1840
  He(n.$slots, "tile", {
1830
- style: Ye(l.style),
1831
- tile: l.tile
1841
+ style: Xe(u.style),
1842
+ tile: u.tile
1832
1843
  }, void 0, !0)
1833
1844
  ], 6))), 128))
1834
1845
  ], 512));
1835
1846
  }
1836
- }), br = /* @__PURE__ */ be(_r, [["__scopeId", "data-v-0271a8b9"]]);
1837
- function wr(o, e, t, i, s) {
1847
+ }), wr = /* @__PURE__ */ we(br, [["__scopeId", "data-v-0271a8b9"]]);
1848
+ function Er(o, e, t, i, s) {
1838
1849
  const r = (...a) => (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(o, a));
1839
1850
  return r.prototype = e.prototype, r;
1840
1851
  }
@@ -2043,8 +2054,8 @@ class c {
2043
2054
  if (s.top < 0 || s.bottom > r) {
2044
2055
  const a = s.bottom - r, n = s.top, d = this.getScrollElement(e);
2045
2056
  if (d !== null) {
2046
- const l = d.scrollTop;
2047
- s.top < 0 && i < 0 ? e.offsetHeight > r ? d.scrollTop += i : d.scrollTop += Math.abs(n) > Math.abs(i) ? i : n : i > 0 && (e.offsetHeight > r ? d.scrollTop += i : d.scrollTop += a > i ? i : a), t.top += d.scrollTop - l;
2057
+ const u = d.scrollTop;
2058
+ s.top < 0 && i < 0 ? e.offsetHeight > r ? d.scrollTop += i : d.scrollTop += Math.abs(n) > Math.abs(i) ? i : n : i > 0 && (e.offsetHeight > r ? d.scrollTop += i : d.scrollTop += a > i ? i : a), t.top += d.scrollTop - u;
2048
2059
  }
2049
2060
  }
2050
2061
  }
@@ -2056,8 +2067,8 @@ class c {
2056
2067
  * @param distance Distance from the V edges to start scrolling
2057
2068
  */
2058
2069
  static updateScrollResize(e, t, i) {
2059
- const s = this.getScrollElement(t), r = s.clientHeight, a = s === this.getScrollElement() ? 0 : s.getBoundingClientRect().top, n = e.clientY - a, d = n < i, l = n > r - i;
2060
- d ? s.scrollBy({ behavior: "smooth", top: n - i }) : l && s.scrollBy({ behavior: "smooth", top: i - (r - n) });
2070
+ const s = this.getScrollElement(t), r = s.clientHeight, a = s === this.getScrollElement() ? 0 : s.getBoundingClientRect().top, n = e.clientY - a, d = n < i, u = n > r - i;
2071
+ d ? s.scrollBy({ behavior: "smooth", top: n - i }) : u && s.scrollBy({ behavior: "smooth", top: i - (r - n) });
2061
2072
  }
2062
2073
  /** single level clone, returning a new object with same top fields. This will share sub objects and arrays */
2063
2074
  static clone(e) {
@@ -2174,7 +2185,7 @@ class c {
2174
2185
  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);
2175
2186
  }
2176
2187
  }
2177
- class de {
2188
+ class ce {
2178
2189
  constructor(e = {}) {
2179
2190
  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;
2180
2191
  }
@@ -2200,15 +2211,15 @@ class de {
2200
2211
  for (; i = i || this.collide(e, r, s.skip); ) {
2201
2212
  if (d++ > this.nodes.length * 2)
2202
2213
  throw new Error("Infinite collide check");
2203
- let l;
2214
+ let u;
2204
2215
  if (i.locked || this._loading || e._moving && !e._skipDown && t.y > e.y && !this.float && // can take space we had, or before where we're going
2205
2216
  (!this.collide(i, { ...i, y: e.y }, e) || !this.collide(i, { ...i, y: t.y - i.h }, e))) {
2206
2217
  e._skipDown = e._skipDown || t.y > e.y;
2207
2218
  const h = { ...t, y: i.y + i.h, ...n };
2208
- l = this._loading && c.samePos(e, h) ? !0 : this.moveNode(e, h), (i.locked || this._loading) && l ? c.copyPos(t, e) : !i.locked && l && s.pack && (this._packNodes(), t.y = i.y + i.h, c.copyPos(e, t)), a = a || l;
2219
+ u = this._loading && c.samePos(e, h) ? !0 : this.moveNode(e, h), (i.locked || this._loading) && u ? c.copyPos(t, e) : !i.locked && u && s.pack && (this._packNodes(), t.y = i.y + i.h, c.copyPos(e, t)), a = a || u;
2209
2220
  } else
2210
- l = this.moveNode(i, { ...i, y: t.y + t.h, skip: e, ...n });
2211
- if (!l)
2221
+ u = this.moveNode(i, { ...i, y: t.y + t.h, skip: e, ...n });
2222
+ if (!u)
2212
2223
  return a;
2213
2224
  i = void 0;
2214
2225
  }
@@ -2233,10 +2244,10 @@ class de {
2233
2244
  for (let d of i) {
2234
2245
  if (d.locked || !d._rect)
2235
2246
  break;
2236
- const l = d._rect;
2237
- let h = Number.MAX_VALUE, u = Number.MAX_VALUE;
2238
- s.y < l.y ? h = (r.y + r.h - l.y) / l.h : s.y + s.h > l.y + l.h && (h = (l.y + l.h - r.y) / l.h), s.x < l.x ? u = (r.x + r.w - l.x) / l.w : s.x + s.w > l.x + l.w && (u = (l.x + l.w - r.x) / l.w);
2239
- const f = Math.min(u, h);
2247
+ const u = d._rect;
2248
+ let h = Number.MAX_VALUE, l = Number.MAX_VALUE;
2249
+ s.y < u.y ? h = (r.y + r.h - u.y) / u.h : s.y + s.h > u.y + u.h && (h = (u.y + u.h - r.y) / u.h), s.x < u.x ? l = (r.x + r.w - u.x) / u.w : s.x + s.w > u.x + u.w && (l = (u.x + u.w - r.x) / u.w);
2250
+ const f = Math.min(l, h);
2240
2251
  f > n && (n = f, a = d);
2241
2252
  }
2242
2253
  return t.collide = a, a;
@@ -2312,8 +2323,8 @@ class de {
2312
2323
  s || (this._inColumnResize = !0);
2313
2324
  const r = this.nodes;
2314
2325
  return this.nodes = [], r.forEach((a, n, d) => {
2315
- let l;
2316
- a.locked || (a.autoPosition = !0, e === "list" && n && (l = d[n - 1])), this.addNode(a, !1, l);
2326
+ let u;
2327
+ a.locked || (a.autoPosition = !0, e === "list" && n && (u = d[n - 1])), this.addNode(a, !1, u);
2317
2328
  }), s || delete this._inColumnResize, i || this.batchUpdate(!1), this;
2318
2329
  }
2319
2330
  /** enable/disable floating widgets (default: `false`) See [example](http://gridstackjs.com/demo/float.html) */
@@ -2352,7 +2363,7 @@ class de {
2352
2363
  * @param resizing if out of bound, resize down or move into the grid to fit ?
2353
2364
  */
2354
2365
  prepareNode(e, t) {
2355
- e._id = e._id ?? de._idSeq++;
2366
+ e._id = e._id ?? ce._idSeq++;
2356
2367
  const i = e.id;
2357
2368
  if (i) {
2358
2369
  let r = 1;
@@ -2411,11 +2422,11 @@ class de {
2411
2422
  const r = s ? s.y * i + (s.x + s.w) : 0;
2412
2423
  let a = !1;
2413
2424
  for (let n = r; !a; ++n) {
2414
- const d = n % i, l = Math.floor(n / i);
2425
+ const d = n % i, u = Math.floor(n / i);
2415
2426
  if (d + e.w > i)
2416
2427
  continue;
2417
- const h = { x: d, y: l, w: e.w, h: e.h };
2418
- t.find((u) => c.isIntercepted(h, u)) || ((e.x !== d || e.y !== l) && (e._dirty = !0), e.x = d, e.y = l, delete e.autoPosition, a = !0);
2428
+ const h = { x: d, y: u, w: e.w, h: e.h };
2429
+ t.find((l) => c.isIntercepted(h, l)) || ((e.x !== d || e.y !== u) && (e._dirty = !0), e.x = d, e.y = u, delete e.autoPosition, a = !0);
2419
2430
  }
2420
2431
  return a;
2421
2432
  }
@@ -2447,7 +2458,7 @@ class de {
2447
2458
  if (t.pack = !0, !this.maxRow)
2448
2459
  return this.moveNode(e, t);
2449
2460
  let i;
2450
- const s = new de({
2461
+ const s = new ce({
2451
2462
  column: this.column,
2452
2463
  float: this.float,
2453
2464
  nodes: this.nodes.map((a) => a._id === e._id ? (i = { ...a }, i) : { ...a })
@@ -2469,7 +2480,7 @@ class de {
2469
2480
  willItFit(e) {
2470
2481
  if (delete e._willFitPos, !this.maxRow)
2471
2482
  return !0;
2472
- const t = new de({
2483
+ const t = new ce({
2473
2484
  column: this.column,
2474
2485
  float: this.float,
2475
2486
  nodes: this.nodes.map((s) => ({ ...s }))
@@ -2482,7 +2493,7 @@ class de {
2482
2493
  }
2483
2494
  /** return true if the passed in node was actually moved (checks for no-op and locked) */
2484
2495
  moveNode(e, t) {
2485
- var l, h;
2496
+ var u, h;
2486
2497
  if (!e || /*node.locked ||*/
2487
2498
  !t)
2488
2499
  return !1;
@@ -2494,11 +2505,11 @@ class de {
2494
2505
  const a = c.copyPos({}, e), n = this.collideAll(e, r, t.skip);
2495
2506
  let d = !0;
2496
2507
  if (n.length) {
2497
- const u = e._moving && !t.nested;
2498
- let f = u ? this.directionCollideCoverage(e, t, n) : n[0];
2499
- if (u && f && ((h = (l = e.grid) == null ? void 0 : l.opts) != null && h.subGridDynamic) && !e.grid._isTemp) {
2500
- const m = c.areaIntercept(t.rect, f._rect), p = c.area(t.rect), y = c.area(f._rect);
2501
- m / (p < y ? p : y) > 0.8 && (f.grid.makeSubGrid(f.el, void 0, e), f = void 0);
2508
+ const l = e._moving && !t.nested;
2509
+ let f = l ? this.directionCollideCoverage(e, t, n) : n[0];
2510
+ if (l && f && ((h = (u = e.grid) == null ? void 0 : u.opts) != null && h.subGridDynamic) && !e.grid._isTemp) {
2511
+ const g = c.areaIntercept(t.rect, f._rect), p = c.area(t.rect), y = c.area(f._rect);
2512
+ g / (p < y ? p : y) > 0.8 && (f.grid.makeSubGrid(f.el, void 0, e), f = void 0);
2502
2513
  }
2503
2514
  f ? d = !this._fixCollisions(e, r, f, t) : (d = !1, i && delete t.pack);
2504
2515
  }
@@ -2520,8 +2531,8 @@ class de {
2520
2531
  var a;
2521
2532
  const i = (a = this._layouts) == null ? void 0 : a.length, s = i && this.column !== i - 1 ? this._layouts[i - 1] : null, r = [];
2522
2533
  return this.sortNodes(), this.nodes.forEach((n) => {
2523
- const d = s == null ? void 0 : s.find((h) => h._id === n._id), l = { ...n, ...d || {} };
2524
- c.removeInternalForSave(l, !e), t && t(n, l), r.push(l);
2534
+ const d = s == null ? void 0 : s.find((h) => h._id === n._id), u = { ...n, ...d || {} };
2535
+ c.removeInternalForSave(u, !e), t && t(n, u), r.push(u);
2525
2536
  }), r;
2526
2537
  }
2527
2538
  /** @internal called whenever a node is added or moved - updates the cached layouts */
@@ -2560,19 +2571,19 @@ class de {
2560
2571
  s && this.sortNodes(1), t < e && this.cacheLayout(this.nodes, e), this.batchUpdate();
2561
2572
  let r = [], a = s ? this.nodes : c.sort(this.nodes, -1);
2562
2573
  if (t > e && this._layouts) {
2563
- const d = this._layouts[t] || [], l = this._layouts.length - 1;
2564
- !d.length && e !== l && ((n = this._layouts[l]) != null && n.length) && (e = l, this._layouts[l].forEach((h) => {
2565
- const u = a.find((f) => f._id === h._id);
2566
- u && (!s && !h.autoPosition && (u.x = h.x ?? u.x, u.y = h.y ?? u.y), u.w = h.w ?? u.w, (h.x == null || h.y === void 0) && (u.autoPosition = !0));
2574
+ const d = this._layouts[t] || [], u = this._layouts.length - 1;
2575
+ !d.length && e !== u && ((n = this._layouts[u]) != null && n.length) && (e = u, this._layouts[u].forEach((h) => {
2576
+ const l = a.find((f) => f._id === h._id);
2577
+ l && (!s && !h.autoPosition && (l.x = h.x ?? l.x, l.y = h.y ?? l.y), l.w = h.w ?? l.w, (h.x == null || h.y === void 0) && (l.autoPosition = !0));
2567
2578
  })), d.forEach((h) => {
2568
- const u = a.findIndex((f) => f._id === h._id);
2569
- if (u !== -1) {
2570
- const f = a[u];
2579
+ const l = a.findIndex((f) => f._id === h._id);
2580
+ if (l !== -1) {
2581
+ const f = a[l];
2571
2582
  if (s) {
2572
2583
  f.w = h.w;
2573
2584
  return;
2574
2585
  }
2575
- (h.autoPosition || isNaN(h.x) || isNaN(h.y)) && this.findEmptyPosition(h, r), h.autoPosition || (f.x = h.x ?? f.x, f.y = h.y ?? f.y, f.w = h.w ?? f.w, r.push(f)), a.splice(u, 1);
2586
+ (h.autoPosition || isNaN(h.x) || isNaN(h.y)) && this.findEmptyPosition(h, r), h.autoPosition || (f.x = h.x ?? f.x, f.y = h.y ?? f.y, f.w = h.w ?? f.w, r.push(f)), a.splice(l, 1);
2576
2587
  }
2577
2588
  });
2578
2589
  }
@@ -2583,9 +2594,9 @@ class de {
2583
2594
  if (typeof i == "function")
2584
2595
  i(t, e, r, a);
2585
2596
  else {
2586
- const d = s || i === "none" ? 1 : t / e, l = i === "move" || i === "moveScale", h = i === "scale" || i === "moveScale";
2587
- a.forEach((u) => {
2588
- u.x = t === 1 ? 0 : l ? Math.round(u.x * d) : Math.min(u.x, t - 1), u.w = t === 1 || e === 1 ? 1 : h ? Math.round(u.w * d) || 1 : Math.min(u.w, t), r.push(u);
2597
+ const d = s || i === "none" ? 1 : t / e, u = i === "move" || i === "moveScale", h = i === "scale" || i === "moveScale";
2598
+ a.forEach((l) => {
2599
+ l.x = t === 1 ? 0 : u ? Math.round(l.x * d) : Math.min(l.x, t - 1), l.w = t === 1 || e === 1 ? 1 : h ? Math.round(l.w * d) || 1 : Math.min(l.w, t), r.push(l);
2589
2600
  }), a = [];
2590
2601
  }
2591
2602
  r = c.sort(r, -1), this._inColumnResize = !0, this.nodes = [], r.forEach((d) => {
@@ -2605,7 +2616,7 @@ class de {
2605
2616
  return e.forEach((r, a) => {
2606
2617
  if (r._id === void 0) {
2607
2618
  const n = r.id ? this.nodes.find((d) => d.id === r.id) : void 0;
2608
- r._id = (n == null ? void 0 : n._id) ?? de._idSeq++;
2619
+ r._id = (n == null ? void 0 : n._id) ?? ce._idSeq++;
2609
2620
  }
2610
2621
  s[a] = { x: r.x, y: r.y, w: r.w, _id: r._id };
2611
2622
  }), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = s, this;
@@ -2616,7 +2627,7 @@ class de {
2616
2627
  * @param column corresponding column index to save it under
2617
2628
  */
2618
2629
  cacheOneLayout(e, t) {
2619
- e._id = e._id ?? de._idSeq++;
2630
+ e._id = e._id ?? ce._idSeq++;
2620
2631
  const i = { x: e.x, y: e.y, w: e.w, _id: e._id };
2621
2632
  (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] || [];
2622
2633
  const s = this.findCacheLayout(e, t);
@@ -2640,8 +2651,8 @@ class de {
2640
2651
  return this;
2641
2652
  }
2642
2653
  }
2643
- de._idSeq = 0;
2644
- const ie = {
2654
+ ce._idSeq = 0;
2655
+ const re = {
2645
2656
  alwaysShowResizeHandle: "mobile",
2646
2657
  animate: !0,
2647
2658
  auto: !0,
@@ -2671,57 +2682,57 @@ const ie = {
2671
2682
  // styleInHead: false,
2672
2683
  //removable
2673
2684
  };
2674
- class R {
2685
+ class k {
2675
2686
  }
2676
- const he = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
2677
- class ce {
2687
+ const de = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
2688
+ class fe {
2678
2689
  }
2679
- function Xe(o, e) {
2690
+ function Je(o, e) {
2680
2691
  o.touches.length > 1 || (o.cancelable && o.preventDefault(), c.simulateMouseEvent(o.changedTouches[0], e));
2681
2692
  }
2682
2693
  function pi(o, e) {
2683
2694
  o.cancelable && o.preventDefault(), c.simulateMouseEvent(o, e);
2684
2695
  }
2685
- function Ze(o) {
2686
- ce.touchHandled || (ce.touchHandled = !0, Xe(o, "mousedown"));
2696
+ function et(o) {
2697
+ fe.touchHandled || (fe.touchHandled = !0, Je(o, "mousedown"));
2687
2698
  }
2688
- function Je(o) {
2689
- ce.touchHandled && Xe(o, "mousemove");
2699
+ function tt(o) {
2700
+ fe.touchHandled && Je(o, "mousemove");
2690
2701
  }
2691
- function et(o) {
2692
- if (!ce.touchHandled)
2702
+ function it(o) {
2703
+ if (!fe.touchHandled)
2693
2704
  return;
2694
- ce.pointerLeaveTimeout && (window.clearTimeout(ce.pointerLeaveTimeout), delete ce.pointerLeaveTimeout);
2695
- const e = !!R.dragElement;
2696
- Xe(o, "mouseup"), e || Xe(o, "click"), ce.touchHandled = !1;
2705
+ fe.pointerLeaveTimeout && (window.clearTimeout(fe.pointerLeaveTimeout), delete fe.pointerLeaveTimeout);
2706
+ const e = !!k.dragElement;
2707
+ Je(o, "mouseup"), e || Je(o, "click"), fe.touchHandled = !1;
2697
2708
  }
2698
- function tt(o) {
2709
+ function st(o) {
2699
2710
  o.pointerType !== "mouse" && o.target.releasePointerCapture(o.pointerId);
2700
2711
  }
2701
2712
  function Xt(o) {
2702
- R.dragElement && o.pointerType !== "mouse" && pi(o, "mouseenter");
2713
+ k.dragElement && o.pointerType !== "mouse" && pi(o, "mouseenter");
2703
2714
  }
2704
2715
  function Zt(o) {
2705
- R.dragElement && o.pointerType !== "mouse" && (ce.pointerLeaveTimeout = window.setTimeout(() => {
2706
- delete ce.pointerLeaveTimeout, pi(o, "mouseleave");
2716
+ k.dragElement && o.pointerType !== "mouse" && (fe.pointerLeaveTimeout = window.setTimeout(() => {
2717
+ delete fe.pointerLeaveTimeout, pi(o, "mouseleave");
2707
2718
  }, 10));
2708
2719
  }
2709
- class ot {
2720
+ class at {
2710
2721
  constructor(e, t, i) {
2711
2722
  this.host = e, this.dir = t, this.option = i, this.moving = !1, this._mouseDown = this._mouseDown.bind(this), this._mouseMove = this._mouseMove.bind(this), this._mouseUp = this._mouseUp.bind(this), this._keyEvent = this._keyEvent.bind(this), this._init();
2712
2723
  }
2713
2724
  /** @internal */
2714
2725
  _init() {
2715
2726
  const e = this.el = document.createElement("div");
2716
- return e.classList.add("ui-resizable-handle"), e.classList.add(`${ot.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), he && (this.el.addEventListener("touchstart", Ze), this.el.addEventListener("pointerdown", tt)), this;
2727
+ return e.classList.add("ui-resizable-handle"), e.classList.add(`${at.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), de && (this.el.addEventListener("touchstart", et), this.el.addEventListener("pointerdown", st)), this;
2717
2728
  }
2718
2729
  /** call this when resize handle needs to be removed and cleaned up */
2719
2730
  destroy() {
2720
- return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), he && (this.el.removeEventListener("touchstart", Ze), this.el.removeEventListener("pointerdown", tt)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
2731
+ return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), de && (this.el.removeEventListener("touchstart", et), this.el.removeEventListener("pointerdown", st)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
2721
2732
  }
2722
2733
  /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
2723
2734
  _mouseDown(e) {
2724
- this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), he && (this.el.addEventListener("touchmove", Je), this.el.addEventListener("touchend", et)), e.stopPropagation(), e.preventDefault();
2735
+ this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), de && (this.el.addEventListener("touchmove", tt), this.el.addEventListener("touchend", it)), e.stopPropagation(), e.preventDefault();
2725
2736
  }
2726
2737
  /** @internal */
2727
2738
  _mouseMove(e) {
@@ -2730,7 +2741,7 @@ class ot {
2730
2741
  }
2731
2742
  /** @internal */
2732
2743
  _mouseUp(e) {
2733
- this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), he && (this.el.removeEventListener("touchmove", Je), this.el.removeEventListener("touchend", et)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2744
+ this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), de && (this.el.removeEventListener("touchmove", tt), this.el.removeEventListener("touchend", it)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2734
2745
  }
2735
2746
  /** @internal call when keys are being pressed - use Esc to cancel */
2736
2747
  _keyEvent(e) {
@@ -2742,7 +2753,7 @@ class ot {
2742
2753
  return this.option[e] && this.option[e](t), this;
2743
2754
  }
2744
2755
  }
2745
- ot.prefix = "ui-resizable-";
2756
+ at.prefix = "ui-resizable-";
2746
2757
  class xt {
2747
2758
  constructor() {
2748
2759
  this._eventRegister = {};
@@ -2771,7 +2782,7 @@ class xt {
2771
2782
  return this._eventRegister[e](t);
2772
2783
  }
2773
2784
  }
2774
- class Ie extends xt {
2785
+ class qe extends xt {
2775
2786
  // have to be public else complains for HTMLElementExtendOpt ?
2776
2787
  constructor(e, t = {}) {
2777
2788
  super(), this.el = e, this.option = t, this.rectScale = { x: 1, y: 1 }, this._ui = () => {
@@ -2827,21 +2838,21 @@ class Ie extends xt {
2827
2838
  }
2828
2839
  /** @internal turns auto hide on/off */
2829
2840
  _setupAutoHide(e) {
2830
- 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), R.overResizeElement === this && delete R.overResizeElement), this;
2841
+ 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), k.overResizeElement === this && delete k.overResizeElement), this;
2831
2842
  }
2832
2843
  /** @internal */
2833
2844
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2834
2845
  _mouseOver(e) {
2835
- R.overResizeElement || R.dragElement || (R.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
2846
+ k.overResizeElement || k.dragElement || (k.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
2836
2847
  }
2837
2848
  /** @internal */
2838
2849
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2839
2850
  _mouseOut(e) {
2840
- R.overResizeElement === this && (delete R.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
2851
+ k.overResizeElement === this && (delete k.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
2841
2852
  }
2842
2853
  /** @internal */
2843
2854
  _setupHandlers() {
2844
- return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new ot(this.el, e, {
2855
+ return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new at(this.el, e, {
2845
2856
  start: (t) => {
2846
2857
  this._resizeStart(t);
2847
2858
  },
@@ -2872,7 +2883,7 @@ class Ie extends xt {
2872
2883
  }
2873
2884
  /** @internal */
2874
2885
  _setupHelper() {
2875
- this.elOriginStyleVal = Ie._originStyleProp.map((i) => this.el.style[i]), this.parentOriginStylePosition = this.el.parentElement.style.position;
2886
+ this.elOriginStyleVal = qe._originStyleProp.map((i) => this.el.style[i]), this.parentOriginStylePosition = this.el.parentElement.style.position;
2876
2887
  const e = this.el.parentElement, t = c.getValuesFromTransformedElement(e);
2877
2888
  return this.rectScale = {
2878
2889
  x: t.xScale,
@@ -2881,7 +2892,7 @@ class Ie extends xt {
2881
2892
  }
2882
2893
  /** @internal */
2883
2894
  _cleanHelper() {
2884
- return Ie._originStyleProp.forEach((e, t) => {
2895
+ return qe._originStyleProp.forEach((e, t) => {
2885
2896
  this.el.style[e] = this.elOriginStyleVal[t] || null;
2886
2897
  }), this.el.parentElement.style.position = this.parentOriginStylePosition || null, this;
2887
2898
  }
@@ -2895,13 +2906,13 @@ class Ie extends xt {
2895
2906
  }, r = e.clientX - i.clientX, a = this.sizeToContent ? 0 : e.clientY - i.clientY;
2896
2907
  let n, d;
2897
2908
  t.indexOf("e") > -1 ? s.width += r : t.indexOf("w") > -1 && (s.width -= r, s.left += r, n = !0), t.indexOf("s") > -1 ? s.height += a : t.indexOf("n") > -1 && (s.height -= a, s.top += a, d = !0);
2898
- const l = this._constrainSize(s.width, s.height, n, d);
2899
- return Math.round(s.width) !== Math.round(l.width) && (t.indexOf("w") > -1 && (s.left += s.width - l.width), s.width = l.width), Math.round(s.height) !== Math.round(l.height) && (t.indexOf("n") > -1 && (s.top += s.height - l.height), s.height = l.height), s;
2909
+ const u = this._constrainSize(s.width, s.height, n, d);
2910
+ return Math.round(s.width) !== Math.round(u.width) && (t.indexOf("w") > -1 && (s.left += s.width - u.width), s.width = u.width), Math.round(s.height) !== Math.round(u.height) && (t.indexOf("n") > -1 && (s.top += s.height - u.height), s.height = u.height), s;
2900
2911
  }
2901
2912
  /** @internal constrain the size to the set min/max values */
2902
2913
  _constrainSize(e, t, i, s) {
2903
- const r = this.option, a = (i ? r.maxWidthMoveLeft : r.maxWidth) || Number.MAX_SAFE_INTEGER, n = r.minWidth / this.rectScale.x || e, d = (s ? r.maxHeightMoveUp : r.maxHeight) || Number.MAX_SAFE_INTEGER, l = r.minHeight / this.rectScale.y || t, h = Math.min(a, Math.max(n, e)), u = Math.min(d, Math.max(l, t));
2904
- return { width: h, height: u };
2914
+ const r = this.option, a = (i ? r.maxWidthMoveLeft : r.maxWidth) || Number.MAX_SAFE_INTEGER, n = r.minWidth / this.rectScale.x || e, d = (s ? r.maxHeightMoveUp : r.maxHeight) || Number.MAX_SAFE_INTEGER, u = r.minHeight / this.rectScale.y || t, h = Math.min(a, Math.max(n, e)), l = Math.min(d, Math.max(u, t));
2915
+ return { width: h, height: l };
2905
2916
  }
2906
2917
  /** @internal */
2907
2918
  _applyChange() {
@@ -2920,9 +2931,9 @@ class Ie extends xt {
2920
2931
  return this.handlers.forEach((e) => e.destroy()), delete this.handlers, this;
2921
2932
  }
2922
2933
  }
2923
- Ie._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
2924
- const Er = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
2925
- class qe extends xt {
2934
+ qe._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
2935
+ const xr = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
2936
+ class Me extends xt {
2926
2937
  constructor(e, t = {}) {
2927
2938
  var r;
2928
2939
  super(), this.el = e, this.option = t, this.dragTransform = {
@@ -2942,12 +2953,12 @@ class qe extends xt {
2942
2953
  }
2943
2954
  enable() {
2944
2955
  this.disabled !== !1 && (super.enable(), this.dragEls.forEach((e) => {
2945
- e.addEventListener("mousedown", this._mouseDown), he && (e.addEventListener("touchstart", Ze), e.addEventListener("pointerdown", tt));
2956
+ e.addEventListener("mousedown", this._mouseDown), de && (e.addEventListener("touchstart", et), e.addEventListener("pointerdown", st));
2946
2957
  }), this.el.classList.remove("ui-draggable-disabled"));
2947
2958
  }
2948
2959
  disable(e = !1) {
2949
2960
  this.disabled !== !0 && (super.disable(), this.dragEls.forEach((t) => {
2950
- t.removeEventListener("mousedown", this._mouseDown), he && (t.removeEventListener("touchstart", Ze), t.removeEventListener("pointerdown", tt));
2961
+ t.removeEventListener("mousedown", this._mouseDown), de && (t.removeEventListener("touchstart", et), t.removeEventListener("pointerdown", st));
2951
2962
  }), e || this.el.classList.add("ui-draggable-disabled"));
2952
2963
  }
2953
2964
  destroy() {
@@ -2958,8 +2969,8 @@ class qe extends xt {
2958
2969
  }
2959
2970
  /** @internal call when mouse goes down before a dragstart happens */
2960
2971
  _mouseDown(e) {
2961
- if (!R.mouseHandled)
2962
- return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Er) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete R.dragElement, delete R.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), he && (e.currentTarget.addEventListener("touchmove", Je), e.currentTarget.addEventListener("touchend", et)), e.preventDefault(), document.activeElement && document.activeElement.blur(), R.mouseHandled = !0), !0;
2972
+ if (!k.mouseHandled)
2973
+ return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(xr) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete k.dragElement, delete k.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), de && (e.currentTarget.addEventListener("touchmove", tt), e.currentTarget.addEventListener("touchend", it)), e.preventDefault(), document.activeElement && document.activeElement.blur(), k.mouseHandled = !0), !0;
2963
2974
  }
2964
2975
  /** @internal method to call actual drag event */
2965
2976
  _callDrag(e) {
@@ -2973,15 +2984,15 @@ class qe extends xt {
2973
2984
  var i;
2974
2985
  const t = this.mouseDownEvent;
2975
2986
  if (this.lastDrag = e, this.dragging)
2976
- if (this._dragFollow(e), R.pauseDrag) {
2977
- const s = Number.isInteger(R.pauseDrag) ? R.pauseDrag : 100;
2987
+ if (this._dragFollow(e), k.pauseDrag) {
2988
+ const s = Number.isInteger(k.pauseDrag) ? k.pauseDrag : 100;
2978
2989
  this.dragTimeout && window.clearTimeout(this.dragTimeout), this.dragTimeout = window.setTimeout(() => this._callDrag(e), s);
2979
2990
  } else
2980
2991
  this._callDrag(e);
2981
2992
  else if (Math.abs(e.x - t.x) + Math.abs(e.y - t.y) > 3) {
2982
- this.dragging = !0, R.dragElement = this;
2993
+ this.dragging = !0, k.dragElement = this;
2983
2994
  const s = (i = this.el.gridstackNode) == null ? void 0 : i.grid;
2984
- s ? R.dropElement = s.el.ddElement.ddDroppable : delete R.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);
2995
+ s ? k.dropElement = s.el.ddElement.ddDroppable : delete k.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);
2985
2996
  const r = c.initEvent(e, { target: this.el, type: "dragstart" });
2986
2997
  this.option.start && this.option.start(r, this.ui()), this.triggerEvent("dragstart", r), document.addEventListener("keydown", this._keyEvent);
2987
2998
  }
@@ -2990,17 +3001,17 @@ class qe extends xt {
2990
3001
  /** @internal call when the mouse gets released to drop the item at current location */
2991
3002
  _mouseUp(e) {
2992
3003
  var t, i;
2993
- if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), he && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", Je, !0), e.currentTarget.removeEventListener("touchend", et, !0)), this.dragging) {
2994
- delete this.dragging, (t = this.el.gridstackNode) == null || delete t._origRotate, document.removeEventListener("keydown", this._keyEvent), ((i = R.dropElement) == null ? void 0 : i.el) === this.el.parentElement && delete R.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
3004
+ if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), de && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", tt, !0), e.currentTarget.removeEventListener("touchend", it, !0)), this.dragging) {
3005
+ delete this.dragging, (t = this.el.gridstackNode) == null || delete t._origRotate, document.removeEventListener("keydown", this._keyEvent), ((i = k.dropElement) == null ? void 0 : i.el) === this.el.parentElement && delete k.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
2995
3006
  const s = c.initEvent(e, { target: this.el, type: "dragstop" });
2996
- this.option.stop && this.option.stop(s), this.triggerEvent("dragstop", s), R.dropElement && R.dropElement.drop(e);
3007
+ this.option.stop && this.option.stop(s), this.triggerEvent("dragstop", s), k.dropElement && k.dropElement.drop(e);
2997
3008
  }
2998
- delete this.helper, delete this.mouseDownEvent, delete R.dragElement, delete R.dropElement, delete R.mouseHandled, e.preventDefault();
3009
+ delete this.helper, delete this.mouseDownEvent, delete k.dragElement, delete k.dropElement, delete k.mouseHandled, e.preventDefault();
2999
3010
  }
3000
3011
  /** @internal call when keys are being pressed - use Esc to cancel, R to rotate */
3001
3012
  _keyEvent(e) {
3002
3013
  var s, r;
3003
- const t = this.el.gridstackNode, i = (t == null ? void 0 : t.grid) || ((r = (s = R.dropElement) == null ? void 0 : s.el) == null ? void 0 : r.gridstack);
3014
+ const t = this.el.gridstackNode, i = (t == null ? void 0 : t.grid) || ((r = (s = k.dropElement) == null ? void 0 : s.el) == null ? void 0 : r.gridstack);
3004
3015
  if (e.key === "Escape")
3005
3016
  t && t._origRotate && (t._orig = t._origRotate, delete t._origRotate), i == null || i.cancelDrag(), this._mouseUp(this.mouseDownEvent);
3006
3017
  else if (t && i && (e.key === "r" || e.key === "R")) {
@@ -3012,7 +3023,7 @@ class qe extends xt {
3012
3023
  /** @internal create a clone copy (or user defined method) of the original drag item if set */
3013
3024
  _createHelper() {
3014
3025
  let e = this.el;
3015
- return typeof this.option.helper == "function" ? e = this.option.helper(this.el) : this.option.helper === "clone" && (e = c.cloneNode(this.el)), e.parentElement || c.appendTo(e, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), this.dragElementOriginStyle = qe.originStyleProp.map((t) => this.el.style[t]), e;
3026
+ return typeof this.option.helper == "function" ? e = this.option.helper(this.el) : this.option.helper === "clone" && (e = c.cloneNode(this.el)), e.parentElement || c.appendTo(e, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), this.dragElementOriginStyle = Me.originStyleProp.map((t) => this.el.style[t]), e;
3016
3027
  }
3017
3028
  /** @internal set the fix position of the dragged item */
3018
3029
  _setupHelperStyle(e) {
@@ -3029,7 +3040,7 @@ class qe extends xt {
3029
3040
  const e = (t = this.helper) == null ? void 0 : t.gridstackNode;
3030
3041
  if (!(e != null && e._isAboutToRemove) && this.dragElementOriginStyle) {
3031
3042
  const i = this.helper, s = this.dragElementOriginStyle.transition || null;
3032
- i.style.transition = this.dragElementOriginStyle.transition = "none", qe.originStyleProp.forEach((r) => i.style[r] = this.dragElementOriginStyle[r] || null), setTimeout(() => i.style.transition = s, 50);
3043
+ i.style.transition = this.dragElementOriginStyle.transition = "none", Me.originStyleProp.forEach((r) => i.style[r] = this.dragElementOriginStyle[r] || null), setTimeout(() => i.style.transition = s, 50);
3033
3044
  }
3034
3045
  return delete this.dragElementOriginStyle, this;
3035
3046
  }
@@ -3071,8 +3082,8 @@ class qe extends xt {
3071
3082
  };
3072
3083
  }
3073
3084
  }
3074
- qe.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
3075
- class xr extends xt {
3085
+ Me.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
3086
+ class Cr extends xt {
3076
3087
  constructor(e, t = {}) {
3077
3088
  super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
3078
3089
  }
@@ -3083,10 +3094,10 @@ class xr extends xt {
3083
3094
  super.off(e);
3084
3095
  }
3085
3096
  enable() {
3086
- 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), he && (this.el.addEventListener("pointerenter", Xt), this.el.addEventListener("pointerleave", Zt)));
3097
+ 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), de && (this.el.addEventListener("pointerenter", Xt), this.el.addEventListener("pointerleave", Zt)));
3087
3098
  }
3088
3099
  disable(e = !1) {
3089
- 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), he && (this.el.removeEventListener("pointerenter", Xt), this.el.removeEventListener("pointerleave", Zt)));
3100
+ 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), de && (this.el.removeEventListener("pointerenter", Xt), this.el.removeEventListener("pointerleave", Zt)));
3090
3101
  }
3091
3102
  destroy() {
3092
3103
  this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
@@ -3096,20 +3107,20 @@ class xr extends xt {
3096
3107
  }
3097
3108
  /** @internal called when the cursor enters our area - prepare for a possible drop and track leaving */
3098
3109
  _mouseEnter(e) {
3099
- if (!R.dragElement || !this._canDrop(R.dragElement.el))
3110
+ if (!k.dragElement || !this._canDrop(k.dragElement.el))
3100
3111
  return;
3101
- e.preventDefault(), e.stopPropagation(), R.dropElement && R.dropElement !== this && R.dropElement._mouseLeave(e, !0), R.dropElement = this;
3112
+ e.preventDefault(), e.stopPropagation(), k.dropElement && k.dropElement !== this && k.dropElement._mouseLeave(e, !0), k.dropElement = this;
3102
3113
  const t = c.initEvent(e, { target: this.el, type: "dropover" });
3103
- this.option.over && this.option.over(t, this._ui(R.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
3114
+ this.option.over && this.option.over(t, this._ui(k.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
3104
3115
  }
3105
3116
  /** @internal called when the item is leaving our area, stop tracking if we had moving item */
3106
3117
  _mouseLeave(e, t = !1) {
3107
3118
  var s;
3108
- if (!R.dragElement || R.dropElement !== this)
3119
+ if (!k.dragElement || k.dropElement !== this)
3109
3120
  return;
3110
3121
  e.preventDefault(), e.stopPropagation();
3111
3122
  const i = c.initEvent(e, { target: this.el, type: "dropout" });
3112
- if (this.option.out && this.option.out(i, this._ui(R.dragElement)), this.triggerEvent("dropout", i), R.dropElement === this && (delete R.dropElement, !t)) {
3123
+ if (this.option.out && this.option.out(i, this._ui(k.dragElement)), this.triggerEvent("dropout", i), k.dropElement === this && (delete k.dropElement, !t)) {
3113
3124
  let r, a = this.el.parentElement;
3114
3125
  for (; !r && a; )
3115
3126
  r = (s = a.ddElement) == null ? void 0 : s.ddDroppable, a = a.parentElement;
@@ -3120,7 +3131,7 @@ class xr extends xt {
3120
3131
  drop(e) {
3121
3132
  e.preventDefault();
3122
3133
  const t = c.initEvent(e, { target: this.el, type: "drop" });
3123
- this.option.drop && this.option.drop(t, this._ui(R.dragElement)), this.triggerEvent("drop", t);
3134
+ this.option.drop && this.option.drop(t, this._ui(k.dragElement)), this.triggerEvent("drop", t);
3124
3135
  }
3125
3136
  /** @internal true if element matches the string/method accept option */
3126
3137
  _canDrop(e) {
@@ -3152,25 +3163,25 @@ class Ct {
3152
3163
  return this.ddDraggable && ["drag", "dragstart", "dragstop"].indexOf(e) > -1 ? this.ddDraggable.off(e) : this.ddDroppable && ["drop", "dropover", "dropout"].indexOf(e) > -1 ? this.ddDroppable.off(e) : this.ddResizable && ["resizestart", "resize", "resizestop"].indexOf(e) > -1 && this.ddResizable.off(e), this;
3153
3164
  }
3154
3165
  setupDraggable(e) {
3155
- return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new qe(this.el, e), this;
3166
+ return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new Me(this.el, e), this;
3156
3167
  }
3157
3168
  cleanDraggable() {
3158
3169
  return this.ddDraggable && (this.ddDraggable.destroy(), delete this.ddDraggable), this;
3159
3170
  }
3160
3171
  setupResizable(e) {
3161
- return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new Ie(this.el, e), this;
3172
+ return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new qe(this.el, e), this;
3162
3173
  }
3163
3174
  cleanResizable() {
3164
3175
  return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
3165
3176
  }
3166
3177
  setupDroppable(e) {
3167
- return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new xr(this.el, e), this;
3178
+ return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new Cr(this.el, e), this;
3168
3179
  }
3169
3180
  cleanDroppable() {
3170
3181
  return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
3171
3182
  }
3172
3183
  }
3173
- class Cr {
3184
+ class Rr {
3174
3185
  resizable(e, t, i, s) {
3175
3186
  return this._getDDElements(e, t).forEach((r) => {
3176
3187
  if (t === "disable" || t === "enable")
@@ -3183,11 +3194,11 @@ class Cr {
3183
3194
  const n = r.el.gridstackNode.grid;
3184
3195
  let d = r.el.getAttribute("gs-resize-handles") || n.opts.resizable.handles || "e,s,se";
3185
3196
  d === "all" && (d = "n,e,s,w,se,sw,ne,nw");
3186
- const l = !n.opts.alwaysShowResizeHandle;
3197
+ const u = !n.opts.alwaysShowResizeHandle;
3187
3198
  r.setupResizable({
3188
3199
  ...n.opts.resizable,
3189
3200
  handles: d,
3190
- autoHide: l,
3201
+ autoHide: u,
3191
3202
  start: t.start,
3192
3203
  stop: t.stop,
3193
3204
  resize: t.resize
@@ -3240,7 +3251,7 @@ class Cr {
3240
3251
  }
3241
3252
  on(e, t, i) {
3242
3253
  return this._getDDElements(e).forEach((s) => s.on(t, (r) => {
3243
- i(r, R.dragElement ? R.dragElement.el : r.target, R.dragElement ? R.dragElement.helper : null);
3254
+ i(r, k.dragElement ? k.dragElement.el : r.target, k.dragElement ? k.dragElement.helper : null);
3244
3255
  })), this;
3245
3256
  }
3246
3257
  off(e, t) {
@@ -3259,7 +3270,7 @@ class Cr {
3259
3270
  * Copyright (c) 2021-2024 Alain Dumesny
3260
3271
  * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
3261
3272
  */
3262
- const j = new Cr();
3273
+ const j = new Rr();
3263
3274
  class b {
3264
3275
  /**
3265
3276
  * initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
@@ -3324,7 +3335,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3324
3335
  /** @internal create placeholder DIV as needed */
3325
3336
  get placeholder() {
3326
3337
  if (!this._placeholder) {
3327
- this._placeholder = c.createDiv([this.opts.placeholderClass, ie.itemClass, this.opts.itemClass]);
3338
+ this._placeholder = c.createDiv([this.opts.placeholderClass, re.itemClass, this.opts.itemClass]);
3328
3339
  const e = c.createDiv(["placeholder-content"], this._placeholder);
3329
3340
  this.opts.placeholderText && (e.textContent = this.opts.placeholderText);
3330
3341
  }
@@ -3336,57 +3347,57 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3336
3347
  * @param opts grid options - public for classes to access, but use methods to modify!
3337
3348
  */
3338
3349
  constructor(e, t = {}) {
3339
- var u, f, m;
3350
+ var l, f, g;
3340
3351
  this.el = e, this.opts = t, this.animationDelay = 310, this._gsEventHandler = {}, this._extraDragRow = 0, this.dragTransform = { xScale: 1, yScale: 1, xOffset: 0, yOffset: 0 }, e.gridstack = this, this.opts = t = t || {}, e.classList.contains("grid-stack") || this.el.classList.add("grid-stack"), t.row && (t.minRow = t.maxRow = t.row, delete t.row);
3341
3352
  const i = c.toNumber(e.getAttribute("gs-row"));
3342
3353
  t.column === "auto" && delete t.column, t.alwaysShowResizeHandle !== void 0 && (t._alwaysShowResizeHandle = t.alwaysShowResizeHandle);
3343
- let s = (u = t.columnOpts) == null ? void 0 : u.breakpoints;
3354
+ let s = (l = t.columnOpts) == null ? void 0 : l.breakpoints;
3344
3355
  const r = t;
3345
3356
  if (r.oneColumnModeDomSort && (delete r.oneColumnModeDomSort, console.log("warning: Gridstack oneColumnModeDomSort no longer supported. Use GridStackOptions.columnOpts instead.")), r.oneColumnSize || r.disableOneColumnMode === !1) {
3346
3357
  const p = r.oneColumnSize || 768;
3347
3358
  delete r.oneColumnSize, delete r.disableOneColumnMode, t.columnOpts = t.columnOpts || {}, s = t.columnOpts.breakpoints = t.columnOpts.breakpoints || [];
3348
- let y = s.find((g) => g.c === 1);
3359
+ let y = s.find((m) => m.c === 1);
3349
3360
  y ? y.w = p : (y = { c: 1, w: p }, s.push(y, { c: 12, w: p + 1 }));
3350
3361
  }
3351
3362
  const a = t.columnOpts;
3352
3363
  a && (!a.columnWidth && !((f = a.breakpoints) != null && f.length) ? (delete t.columnOpts, s = void 0) : a.columnMax = a.columnMax || 12), (s == null ? void 0 : s.length) > 1 && s.sort((p, y) => (y.w || 0) - (p.w || 0));
3353
3364
  const n = {
3354
- ...c.cloneDeep(ie),
3355
- column: c.toNumber(e.getAttribute("gs-column")) || ie.column,
3356
- minRow: i || c.toNumber(e.getAttribute("gs-min-row")) || ie.minRow,
3357
- maxRow: i || c.toNumber(e.getAttribute("gs-max-row")) || ie.maxRow,
3358
- staticGrid: c.toBool(e.getAttribute("gs-static")) || ie.staticGrid,
3365
+ ...c.cloneDeep(re),
3366
+ column: c.toNumber(e.getAttribute("gs-column")) || re.column,
3367
+ minRow: i || c.toNumber(e.getAttribute("gs-min-row")) || re.minRow,
3368
+ maxRow: i || c.toNumber(e.getAttribute("gs-max-row")) || re.maxRow,
3369
+ staticGrid: c.toBool(e.getAttribute("gs-static")) || re.staticGrid,
3359
3370
  sizeToContent: c.toBool(e.getAttribute("gs-size-to-content")) || void 0,
3360
3371
  draggable: {
3361
- handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || ie.draggable.handle
3372
+ handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || re.draggable.handle
3362
3373
  },
3363
3374
  removableOptions: {
3364
- accept: t.itemClass || ie.removableOptions.accept,
3365
- decline: ie.removableOptions.decline
3375
+ accept: t.itemClass || re.removableOptions.accept,
3376
+ decline: re.removableOptions.decline
3366
3377
  }
3367
3378
  };
3368
3379
  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");
3369
- const d = this.el.closest("." + ie.itemClass), l = d == null ? void 0 : d.gridstackNode;
3370
- 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 !== ie.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = he), this._styleSheetClass = "gs-id-" + de._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
3371
- const h = t.engineClass || b.engineClass || de;
3380
+ const d = this.el.closest("." + re.itemClass), u = d == null ? void 0 : d.gridstackNode;
3381
+ u && (u.subGrid = this, this.parentGridNode = u, this.el.classList.add("grid-stack-nested"), u.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 !== re.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = de), this._styleSheetClass = "gs-id-" + ce._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
3382
+ const h = t.engineClass || b.engineClass || ce;
3372
3383
  if (this.engine = new h({
3373
3384
  column: this.getColumn(),
3374
3385
  float: t.float,
3375
3386
  maxRow: t.maxRow,
3376
3387
  onChange: (p) => {
3377
3388
  let y = 0;
3378
- this.engine.nodes.forEach((g) => {
3379
- y = Math.max(y, g.y + g.h);
3380
- }), p.forEach((g) => {
3381
- const k = g.el;
3382
- k && (g._removeDOM ? (k && k.remove(), delete g._removeDOM) : this._writePosAttr(k, g));
3389
+ this.engine.nodes.forEach((m) => {
3390
+ y = Math.max(y, m.y + m.h);
3391
+ }), p.forEach((m) => {
3392
+ const T = m.el;
3393
+ T && (m._removeDOM ? (T && T.remove(), delete m._removeDOM) : this._writePosAttr(T, m));
3383
3394
  }), this._updateStyles(!1, y);
3384
3395
  }
3385
3396
  }), this._updateStyles(!1, 0), t.auto && (this.batchUpdate(), this.engine._loading = !0, this.getGridItems().forEach((p) => this._prepareElement(p)), delete this.engine._loading, this.batchUpdate(!1)), t.children) {
3386
3397
  const p = t.children;
3387
3398
  delete t.children, p.length && this.load(p);
3388
3399
  }
3389
- this.setAnimation(), t.subGridDynamic && !R.pauseDrag && (R.pauseDrag = !0), ((m = t.draggable) == null ? void 0 : m.pause) !== void 0 && (R.pauseDrag = t.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
3400
+ this.setAnimation(), t.subGridDynamic && !k.pauseDrag && (k.pauseDrag = !0), ((g = t.draggable) == null ? void 0 : g.pause) !== void 0 && (k.pauseDrag = t.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
3390
3401
  }
3391
3402
  /**
3392
3403
  * add a new widget and returns it.
@@ -3437,9 +3448,9 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3437
3448
  * @returns newly created grid
3438
3449
  */
3439
3450
  makeSubGrid(e, t, i, s = !0) {
3440
- var m, p, y;
3451
+ var g, p, y;
3441
3452
  let r = e.gridstackNode;
3442
- if (r || (r = this.makeWidget(e).gridstackNode), (m = r.subGrid) != null && m.el)
3453
+ if (r || (r = this.makeWidget(e).gridstackNode), (g = r.subGrid) != null && g.el)
3443
3454
  return r.subGrid;
3444
3455
  let a, n = this;
3445
3456
  for (; n && !a; )
@@ -3458,13 +3469,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3458
3469
  }), r.subGridOpts = t;
3459
3470
  let d;
3460
3471
  t.column === "auto" && (d = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), delete t.columnOpts);
3461
- let l = r.el.querySelector(".grid-stack-item-content"), h, u;
3462
- if (s && (this._removeDD(r.el), u = { ...r, x: 0, y: 0 }, c.removeInternalForSave(u), delete u.subGridOpts, r.content && (u.content = r.content, delete r.content), b.addRemoveCB ? h = b.addRemoveCB(this.el, u, !0, !1) : (h = c.createDiv(["grid-stack-item"]), h.appendChild(l), l = c.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
3463
- const g = d ? t.column : r.w, k = r.h + i.h, z = r.el.style;
3464
- z.transition = "none", this.update(r.el, { w: g, h: k }), setTimeout(() => z.transition = null);
3472
+ let u = r.el.querySelector(".grid-stack-item-content"), h, l;
3473
+ if (s && (this._removeDD(r.el), l = { ...r, x: 0, y: 0 }, c.removeInternalForSave(l), delete l.subGridOpts, r.content && (l.content = r.content, delete r.content), b.addRemoveCB ? h = b.addRemoveCB(this.el, l, !0, !1) : (h = c.createDiv(["grid-stack-item"]), h.appendChild(u), u = c.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
3474
+ const m = d ? t.column : r.w, T = r.h + i.h, R = r.el.style;
3475
+ R.transition = "none", this.update(r.el, { w: m, h: T }), setTimeout(() => R.transition = null);
3465
3476
  }
3466
- const f = r.subGrid = b.addGrid(l, t);
3467
- return i != null && i._moving && (f._isTemp = !0), d && (f._autoColumn = !0), s && f.makeWidget(h, u), i && (i._moving ? window.setTimeout(() => c.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
3477
+ const f = r.subGrid = b.addGrid(u, t);
3478
+ return i != null && i._moving && (f._isTemp = !0), d && (f._autoColumn = !0), s && f.makeWidget(h, l), i && (i._moving ? window.setTimeout(() => c.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
3468
3479
  }
3469
3480
  /**
3470
3481
  * called when an item was converted into a nested grid to accommodate a dragged over item, but then item leaves - return back
@@ -3502,7 +3513,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3502
3513
  const r = c.cloneDeep(this.opts);
3503
3514
  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");
3504
3515
  const a = r._alwaysShowResizeHandle;
3505
- return delete r._alwaysShowResizeHandle, a !== void 0 ? r.alwaysShowResizeHandle = a : delete r.alwaysShowResizeHandle, c.removeInternalAndSame(r, ie), r.children = s, r;
3516
+ return delete r._alwaysShowResizeHandle, a !== void 0 ? r.alwaysShowResizeHandle = a : delete r.alwaysShowResizeHandle, c.removeInternalAndSame(r, re), r.children = s, r;
3506
3517
  }
3507
3518
  return s;
3508
3519
  }
@@ -3517,7 +3528,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3517
3528
  * see http://gridstackjs.com/demo/serialization.html
3518
3529
  */
3519
3530
  load(e, t = b.addRemoveCB || !0) {
3520
- var l;
3531
+ var u;
3521
3532
  e = c.cloneDeep(e);
3522
3533
  const i = this.getColumn();
3523
3534
  e.forEach((h) => {
@@ -3532,22 +3543,22 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3532
3543
  const a = [];
3533
3544
  this.batchUpdate();
3534
3545
  const n = !this.engine.nodes.length;
3535
- n && this.setAnimation(!1), !n && t && [...this.engine.nodes].forEach((u) => {
3536
- if (!u.id)
3546
+ n && this.setAnimation(!1), !n && t && [...this.engine.nodes].forEach((l) => {
3547
+ if (!l.id)
3537
3548
  return;
3538
- c.find(e, u.id) || (b.addRemoveCB && b.addRemoveCB(this.el, u, !1, !1), a.push(u), this.removeWidget(u.el, !0, !1));
3549
+ c.find(e, l.id) || (b.addRemoveCB && b.addRemoveCB(this.el, l, !1, !1), a.push(l), this.removeWidget(l.el, !0, !1));
3539
3550
  }), this.engine._loading = !0;
3540
3551
  const d = [];
3541
3552
  return this.engine.nodes = this.engine.nodes.filter((h) => c.find(e, h.id) ? (d.push(h), !1) : !0), e.forEach((h) => {
3542
3553
  var f;
3543
- const u = c.find(d, h.id);
3544
- if (u) {
3545
- if (c.shouldSizeToContent(u) && (h.h = u.h), this.engine.nodeBoundFix(h), (h.autoPosition || h.x === void 0 || h.y === void 0) && (h.w = h.w || u.w, h.h = h.h || u.h, this.engine.findEmptyPosition(h)), this.engine.nodes.push(u), c.samePos(u, h) && this.engine.nodes.length > 1 && (this.moveNode(u, { ...h, forceCollide: !0 }), c.copyPos(h, u)), this.update(u.el, h), (f = h.subGridOpts) != null && f.children) {
3546
- const m = u.el.querySelector(".grid-stack");
3547
- m && m.gridstack && m.gridstack.load(h.subGridOpts.children);
3554
+ const l = c.find(d, h.id);
3555
+ if (l) {
3556
+ if (c.shouldSizeToContent(l) && (h.h = l.h), this.engine.nodeBoundFix(h), (h.autoPosition || h.x === void 0 || h.y === void 0) && (h.w = h.w || l.w, h.h = h.h || l.h, this.engine.findEmptyPosition(h)), this.engine.nodes.push(l), c.samePos(l, h) && this.engine.nodes.length > 1 && (this.moveNode(l, { ...h, forceCollide: !0 }), c.copyPos(h, l)), this.update(l.el, h), (f = h.subGridOpts) != null && f.children) {
3557
+ const g = l.el.querySelector(".grid-stack");
3558
+ g && g.gridstack && g.gridstack.load(h.subGridOpts.children);
3548
3559
  }
3549
3560
  } else t && this.addWidget(h);
3550
- }), delete this.engine._loading, this.engine.removedNodes = a, 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;
3561
+ }), delete this.engine._loading, this.engine.removedNodes = a, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, r ? b.addRemoveCB = r : delete b.addRemoveCB, n && ((u = this.opts) != null && u.animate) && this.setAnimation(this.opts.animate, !0), this;
3551
3562
  }
3552
3563
  /**
3553
3564
  * use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
@@ -3836,20 +3847,20 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3836
3847
  this.engine.nodeBoundFix(r), delete r.autoPosition;
3837
3848
  const a = ["x", "y", "w", "h"];
3838
3849
  let n;
3839
- if (a.some((u) => r[u] !== void 0 && r[u] !== s[u]) && (n = {}, a.forEach((u) => {
3840
- n[u] = r[u] !== void 0 ? r[u] : s[u], delete r[u];
3850
+ if (a.some((l) => r[l] !== void 0 && r[l] !== s[l]) && (n = {}, a.forEach((l) => {
3851
+ n[l] = r[l] !== void 0 ? r[l] : s[l], delete r[l];
3841
3852
  })), !n && (r.minW || r.minH || r.maxW || r.maxH) && (n = {}), r.content !== void 0) {
3842
- const u = i.querySelector(".grid-stack-item-content");
3843
- u && u.textContent !== r.content && (s.content = r.content, b.renderCB(u, r), (h = s.subGrid) != null && h.el && (u.appendChild(s.subGrid.el), s.subGrid.opts.styleInHead || s.subGrid._updateStyles(!0))), delete r.content;
3853
+ const l = i.querySelector(".grid-stack-item-content");
3854
+ l && l.textContent !== r.content && (s.content = r.content, b.renderCB(l, r), (h = s.subGrid) != null && h.el && (l.appendChild(s.subGrid.el), s.subGrid.opts.styleInHead || s.subGrid._updateStyles(!0))), delete r.content;
3844
3855
  }
3845
- let d = !1, l = !1;
3846
- for (const u in r)
3847
- u[0] !== "_" && s[u] !== r[u] && (s[u] = r[u], d = !0, l = l || !this.opts.staticGrid && (u === "noResize" || u === "noMove" || u === "locked"));
3856
+ let d = !1, u = !1;
3857
+ for (const l in r)
3858
+ l[0] !== "_" && s[l] !== r[l] && (s[l] = r[l], d = !0, u = u || !this.opts.staticGrid && (l === "noResize" || l === "noMove" || l === "locked"));
3848
3859
  if (c.sanitizeMinMax(s), n) {
3849
- const u = n.w !== void 0 && n.w !== s.w;
3850
- this.moveNode(s, n), u && s.subGrid ? s.subGrid.onResize(this.hasAnimationCSS() ? s.w : void 0) : this.resizeToContentCheck(u, s), delete s._orig;
3860
+ const l = n.w !== void 0 && n.w !== s.w;
3861
+ this.moveNode(s, n), l && s.subGrid ? s.subGrid.onResize(this.hasAnimationCSS() ? s.w : void 0) : this.resizeToContentCheck(l, s), delete s._orig;
3851
3862
  }
3852
- (n || d) && this._writeAttr(i, s), l && this.prepareDragDrop(s.el);
3863
+ (n || d) && this._writeAttr(i, s), u && this.prepareDragDrop(s.el);
3853
3864
  }), this;
3854
3865
  }
3855
3866
  moveNode(e, t) {
@@ -3863,7 +3874,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3863
3874
  * @param useNodeH set to true if GridStackNode.h should be used instead of actual container height when we don't need to wait for animation to finish to get actual DOM heights
3864
3875
  */
3865
3876
  resizeToContent(e) {
3866
- var f, m;
3877
+ var f, g;
3867
3878
  if (!e || (e.classList.remove("size-to-content-max"), !e.clientHeight))
3868
3879
  return;
3869
3880
  const t = e.gridstackNode;
@@ -3879,13 +3890,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3879
3890
  if (t.resizeToContentParent && (a = e.querySelector(t.resizeToContentParent)), a || (a = e.querySelector(b.resizeToContentParent)), !a)
3880
3891
  return;
3881
3892
  const n = e.clientHeight - a.clientHeight, d = t.h ? t.h * s - n : a.clientHeight;
3882
- let l;
3893
+ let u;
3883
3894
  if (t.subGrid) {
3884
- l = t.subGrid.getRow() * t.subGrid.getCellHeight(!0);
3895
+ u = t.subGrid.getRow() * t.subGrid.getCellHeight(!0);
3885
3896
  const p = t.subGrid.el.getBoundingClientRect(), y = t.subGrid.el.parentElement.getBoundingClientRect();
3886
- l += p.top - y.top;
3897
+ u += p.top - y.top;
3887
3898
  } else {
3888
- if ((m = (f = t.subGridOpts) == null ? void 0 : f.children) != null && m.length)
3899
+ if ((g = (f = t.subGridOpts) == null ? void 0 : f.children) != null && g.length)
3889
3900
  return;
3890
3901
  {
3891
3902
  const p = a.firstElementChild;
@@ -3893,15 +3904,15 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3893
3904
  console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${b.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
3894
3905
  return;
3895
3906
  }
3896
- l = p.getBoundingClientRect().height || d;
3907
+ u = p.getBoundingClientRect().height || d;
3897
3908
  }
3898
3909
  }
3899
- if (d === l)
3910
+ if (d === u)
3900
3911
  return;
3901
- r += l - d;
3912
+ r += u - d;
3902
3913
  let h = Math.ceil(r / s);
3903
- const u = Number.isInteger(t.sizeToContent) ? t.sizeToContent : 0;
3904
- u && h > u && (h = u, e.classList.add("size-to-content-max")), t.minH && h < t.minH ? h = t.minH : t.maxH && h > t.maxH && (h = t.maxH), h !== t.h && (i._ignoreLayoutsNodeChange = !0, i.moveNode(t, { h }), delete i._ignoreLayoutsNodeChange);
3914
+ const l = Number.isInteger(t.sizeToContent) ? t.sizeToContent : 0;
3915
+ l && h > l && (h = l, e.classList.add("size-to-content-max")), t.minH && h < t.minH ? h = t.minH : t.maxH && h > t.maxH && (h = t.maxH), h !== t.h && (i._ignoreLayoutsNodeChange = !0, i.moveNode(t, { h }), delete i._ignoreLayoutsNodeChange);
3905
3916
  }
3906
3917
  /** call the user resize (so they can do extra work) else our build in version */
3907
3918
  resizeToContentCBCheck(e) {
@@ -4022,8 +4033,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4022
4033
  }), !this._styles)
4023
4034
  return this;
4024
4035
  this._styles._max = 0, c.addCSSRule(this._styles, r, `height: ${i}${s}`);
4025
- const n = this.opts.marginTop + this.opts.marginUnit, d = this.opts.marginBottom + this.opts.marginUnit, l = this.opts.marginRight + this.opts.marginUnit, h = this.opts.marginLeft + this.opts.marginUnit, u = `${r} > .grid-stack-item-content`, f = `.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;
4026
- c.addCSSRule(this._styles, u, `top: ${n}; right: ${l}; bottom: ${d}; left: ${h};`), c.addCSSRule(this._styles, f, `top: ${n}; right: ${l}; bottom: ${d}; left: ${h};`), c.addCSSRule(this._styles, `${r} > .ui-resizable-n`, `top: ${n};`), c.addCSSRule(this._styles, `${r} > .ui-resizable-s`, `bottom: ${d}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-ne`, `right: ${l}; top: ${n}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-e`, `right: ${l}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-se`, `right: ${l}; bottom: ${d}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-nw`, `left: ${h}; top: ${n}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-w`, `left: ${h}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-sw`, `left: ${h}; bottom: ${d}`);
4036
+ const n = this.opts.marginTop + this.opts.marginUnit, d = this.opts.marginBottom + this.opts.marginUnit, u = this.opts.marginRight + this.opts.marginUnit, h = this.opts.marginLeft + this.opts.marginUnit, l = `${r} > .grid-stack-item-content`, f = `.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;
4037
+ c.addCSSRule(this._styles, l, `top: ${n}; right: ${u}; bottom: ${d}; left: ${h};`), c.addCSSRule(this._styles, f, `top: ${n}; right: ${u}; bottom: ${d}; left: ${h};`), c.addCSSRule(this._styles, `${r} > .ui-resizable-n`, `top: ${n};`), c.addCSSRule(this._styles, `${r} > .ui-resizable-s`, `bottom: ${d}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-ne`, `right: ${u}; top: ${n}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-e`, `right: ${u}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-se`, `right: ${u}; bottom: ${d}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-nw`, `left: ${h}; top: ${n}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-w`, `left: ${h}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-sw`, `left: ${h}; bottom: ${d}`);
4027
4038
  }
4028
4039
  if (t = t || this._styles._max, t > this._styles._max) {
4029
4040
  const a = (n) => i * n + s;
@@ -4053,7 +4064,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4053
4064
  }
4054
4065
  /** @internal */
4055
4066
  _prepareElement(e, t = !1, i) {
4056
- 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(ie.itemClass, this.opts.itemClass);
4067
+ 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(re.itemClass, this.opts.itemClass);
4057
4068
  const s = c.shouldSizeToContent(i);
4058
4069
  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;
4059
4070
  }
@@ -4171,7 +4182,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4171
4182
  * @param root optional root which defaults to document (for shadow dom pass the parent HTMLDocument)
4172
4183
  */
4173
4184
  static setupDragIn(e, t, i, s = document) {
4174
- (t == null ? void 0 : t.pause) !== void 0 && (R.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? c.getElements(e, s) : e).forEach((a, n) => {
4185
+ (t == null ? void 0 : t.pause) !== void 0 && (k.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? c.getElements(e, s) : e).forEach((a, n) => {
4175
4186
  j.isDraggable(a) || j.dragIn(a, t), i != null && i[n] && (a.gridstackNode = i[n]);
4176
4187
  });
4177
4188
  }
@@ -4266,29 +4277,29 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4266
4277
  return;
4267
4278
  if (!((f = n.grid) != null && f.el)) {
4268
4279
  a.style.transform = `scale(${1 / this.dragTransform.xScale},${1 / this.dragTransform.yScale})`;
4269
- const m = a.getBoundingClientRect();
4270
- a.style.left = m.x + (this.dragTransform.xScale - 1) * (s.clientX - m.x) / this.dragTransform.xScale + "px", a.style.top = m.y + (this.dragTransform.yScale - 1) * (s.clientY - m.y) / this.dragTransform.yScale + "px", a.style.transformOrigin = "0px 0px";
4280
+ const g = a.getBoundingClientRect();
4281
+ a.style.left = g.x + (this.dragTransform.xScale - 1) * (s.clientX - g.x) / this.dragTransform.xScale + "px", a.style.top = g.y + (this.dragTransform.yScale - 1) * (s.clientY - g.y) / this.dragTransform.yScale + "px", a.style.transformOrigin = "0px 0px";
4271
4282
  }
4272
- let { top: d, left: l } = a.getBoundingClientRect();
4283
+ let { top: d, left: u } = a.getBoundingClientRect();
4273
4284
  const h = this.el.getBoundingClientRect();
4274
- l -= h.left, d -= h.top;
4275
- const u = {
4285
+ u -= h.left, d -= h.top;
4286
+ const l = {
4276
4287
  position: {
4277
4288
  top: d * this.dragTransform.xScale,
4278
- left: l * this.dragTransform.yScale
4289
+ left: u * this.dragTransform.yScale
4279
4290
  }
4280
4291
  };
4281
4292
  if (n._temporaryRemoved) {
4282
- if (n.x = Math.max(0, Math.round(l / t)), n.y = Math.max(0, Math.round(d / e)), delete n.autoPosition, this.engine.nodeBoundFix(n), !this.engine.willItFit(n)) {
4293
+ if (n.x = Math.max(0, Math.round(u / t)), n.y = Math.max(0, Math.round(d / e)), delete n.autoPosition, this.engine.nodeBoundFix(n), !this.engine.willItFit(n)) {
4283
4294
  if (n.autoPosition = !0, !this.engine.willItFit(n)) {
4284
4295
  j.off(r, "drag");
4285
4296
  return;
4286
4297
  }
4287
4298
  n._willFitPos && (c.copyPos(n, n._willFitPos), delete n._willFitPos);
4288
4299
  }
4289
- this._onStartMoving(a, s, u, n, t, e);
4300
+ this._onStartMoving(a, s, l, n, t, e);
4290
4301
  } else
4291
- this._dragOrResize(a, s, u, n, t, e);
4302
+ this._dragOrResize(a, s, l, n, t, e);
4292
4303
  };
4293
4304
  return j.droppable(this.el, {
4294
4305
  accept: (s) => {
@@ -4327,30 +4338,30 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4327
4338
  n || (n = this._readAttr(a)), n._sidebarOrig = { w: n.w, h: n.h };
4328
4339
  }
4329
4340
  n.grid || (n.el || (n = { ...n }), n._isExternal = !0, a.gridstackNode = n);
4330
- const d = n.w || Math.round(a.offsetWidth / t) || 1, l = n.h || Math.round(a.offsetHeight / e) || 1;
4331
- return n.grid && n.grid !== this ? (r._gridstackNodeOrig || (r._gridstackNodeOrig = n), r.gridstackNode = n = { ...n, w: d, 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
4332
- n._temporaryRemoved = !0) : (n.w = d, n.h = l, n._temporaryRemoved = !0), b._itemRemoving(n.el, !1), j.on(r, "drag", i), i(s, r, a), !1;
4341
+ const d = n.w || Math.round(a.offsetWidth / t) || 1, u = n.h || Math.round(a.offsetHeight / e) || 1;
4342
+ return n.grid && n.grid !== this ? (r._gridstackNodeOrig || (r._gridstackNodeOrig = n), r.gridstackNode = n = { ...n, w: d, h: u, 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
4343
+ n._temporaryRemoved = !0) : (n.w = d, n.h = u, n._temporaryRemoved = !0), b._itemRemoving(n.el, !1), j.on(r, "drag", i), i(s, r, a), !1;
4333
4344
  }).on(this.el, "dropout", (s, r, a) => {
4334
4345
  const n = (a == null ? void 0 : a.gridstackNode) || r.gridstackNode;
4335
4346
  return n && (!n.grid || n.grid === this) && (this._leave(r, a), this._isTemp && this.removeAsSubGrid(n)), !1;
4336
4347
  }).on(this.el, "drop", (s, r, a) => {
4337
- var m, p, y;
4348
+ var g, p, y;
4338
4349
  const n = (a == null ? void 0 : a.gridstackNode) || r.gridstackNode;
4339
4350
  if ((n == null ? void 0 : n.grid) === this && !n._isExternal)
4340
4351
  return !1;
4341
- const d = !!this.placeholder.parentElement, l = r !== a;
4352
+ const d = !!this.placeholder.parentElement, u = r !== a;
4342
4353
  this.placeholder.remove(), delete this.placeholder.gridstackNode;
4343
4354
  const h = d && this.opts.animate;
4344
4355
  h && this.setAnimation(!1);
4345
- const u = r._gridstackNodeOrig;
4346
- if (delete r._gridstackNodeOrig, d && (u != null && u.grid) && u.grid !== this) {
4347
- const g = u.grid;
4348
- g.engine.removeNodeFromLayoutCache(u), g.engine.removedNodes.push(u), g._triggerRemoveEvent()._triggerChangeEvent(), g.parentGridNode && !g.engine.nodes.length && g.opts.subGridDynamic && g.removeAsSubGrid();
4356
+ const l = r._gridstackNodeOrig;
4357
+ if (delete r._gridstackNodeOrig, d && (l != null && l.grid) && l.grid !== this) {
4358
+ const m = l.grid;
4359
+ m.engine.removeNodeFromLayoutCache(l), m.engine.removedNodes.push(l), m._triggerRemoveEvent()._triggerChangeEvent(), m.parentGridNode && !m.engine.nodes.length && m.opts.subGridDynamic && m.removeAsSubGrid();
4349
4360
  }
4350
- if (!n || (d && (this.engine.cleanupNode(n), n.grid = this), (m = n.grid) == null || delete m._isTemp, j.off(r, "drag"), a !== r ? (a.remove(), r = a) : r.remove(), this._removeDD(r), !d))
4361
+ if (!n || (d && (this.engine.cleanupNode(n), n.grid = this), (g = n.grid) == null || delete g._isTemp, j.off(r, "drag"), a !== r ? (a.remove(), r = a) : r.remove(), this._removeDD(r), !d))
4351
4362
  return !1;
4352
4363
  const f = (y = (p = n.subGrid) == null ? void 0 : p.el) == null ? void 0 : y.gridstack;
4353
- 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" }, u && u.grid ? u : void 0, n), h && this.setAnimation(this.opts.animate, !0), !1;
4364
+ return c.copyPos(n, this._readAttr(this.placeholder)), c.removePositioningStyles(r), u && (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" }, l && l.grid ? l : void 0, n), h && this.setAnimation(this.opts.animate, !0), !1;
4354
4365
  }), this;
4355
4366
  }
4356
4367
  /** @internal mark item for removal */
@@ -4381,29 +4392,29 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4381
4392
  return this;
4382
4393
  if (!i._initDD) {
4383
4394
  let n, d;
4384
- const l = (f, m) => {
4385
- this._gsEventHandler[f.type] && this._gsEventHandler[f.type](f, f.target), n = this.cellWidth(), d = this.getCellHeight(!0), this._onStartMoving(e, f, m, i, n, d);
4386
- }, h = (f, m) => {
4387
- this._dragOrResize(e, f, m, i, n, d);
4388
- }, u = (f) => {
4395
+ const u = (f, g) => {
4396
+ this._gsEventHandler[f.type] && this._gsEventHandler[f.type](f, f.target), n = this.cellWidth(), d = this.getCellHeight(!0), this._onStartMoving(e, f, g, i, n, d);
4397
+ }, h = (f, g) => {
4398
+ this._dragOrResize(e, f, g, i, n, d);
4399
+ }, l = (f) => {
4389
4400
  this.placeholder.remove(), delete this.placeholder.gridstackNode, delete i._moving, delete i._event, delete i._lastTried;
4390
- const m = i.w !== i._orig.w, p = f.target;
4401
+ const g = i.w !== i._orig.w, p = f.target;
4391
4402
  if (!(!p.gridstackNode || p.gridstackNode.grid !== this)) {
4392
4403
  if (i.el = p, i._isAboutToRemove) {
4393
4404
  const y = e.gridstackNode.grid;
4394
4405
  y._gsEventHandler[f.type] && y._gsEventHandler[f.type](f, p), y.engine.nodes.push(i), y.removeWidget(e, !0, !0);
4395
4406
  } else
4396
4407
  c.removePositioningStyles(p), i._temporaryRemoved ? (c.copyPos(i, i._orig), this._writePosAttr(p, i), this.engine.addNode(i)) : this._writePosAttr(p, i), this._gsEventHandler[f.type] && this._gsEventHandler[f.type](f, p);
4397
- this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), f.type === "resizestop" && (Number.isInteger(i.sizeToContent) && (i.sizeToContent = i.h), this.resizeToContentCheck(m, i));
4408
+ this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), f.type === "resizestop" && (Number.isInteger(i.sizeToContent) && (i.sizeToContent = i.h), this.resizeToContentCheck(g, i));
4398
4409
  }
4399
4410
  };
4400
4411
  j.draggable(e, {
4401
- start: l,
4402
- stop: u,
4412
+ start: u,
4413
+ stop: l,
4403
4414
  drag: h
4404
4415
  }).resizable(e, {
4405
- start: l,
4406
- stop: u,
4416
+ start: u,
4417
+ stop: l,
4407
4418
  resize: h
4408
4419
  }), i._initDD = !0;
4409
4420
  }
@@ -4425,48 +4436,48 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4425
4436
  yOffset: 0
4426
4437
  };
4427
4438
  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, a, this.opts.marginTop, this.opts.marginRight, this.opts.marginBottom, this.opts.marginLeft), t.type === "resizestart") {
4428
- const d = this.getColumn() - s.x, l = (this.opts.maxRow || Number.MAX_SAFE_INTEGER) - s.y;
4429
- j.resizable(e, "option", "minWidth", r * Math.min(s.minW || 1, d)).resizable(e, "option", "minHeight", a * Math.min(s.minH || 1, l)).resizable(e, "option", "maxWidth", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, d)).resizable(e, "option", "maxWidthMoveLeft", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, s.x + s.w)).resizable(e, "option", "maxHeight", a * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, l)).resizable(e, "option", "maxHeightMoveUp", a * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, s.y + s.h));
4439
+ const d = this.getColumn() - s.x, u = (this.opts.maxRow || Number.MAX_SAFE_INTEGER) - s.y;
4440
+ j.resizable(e, "option", "minWidth", r * Math.min(s.minW || 1, d)).resizable(e, "option", "minHeight", a * Math.min(s.minH || 1, u)).resizable(e, "option", "maxWidth", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, d)).resizable(e, "option", "maxWidthMoveLeft", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, s.x + s.w)).resizable(e, "option", "maxHeight", a * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, u)).resizable(e, "option", "maxHeightMoveUp", a * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, s.y + s.h));
4430
4441
  }
4431
4442
  }
4432
4443
  /** @internal handles actual drag/resize */
4433
4444
  _dragOrResize(e, t, i, s, r, a) {
4434
4445
  const n = { ...s._orig };
4435
- let d, l = this.opts.marginLeft, h = this.opts.marginRight, u = this.opts.marginTop, f = this.opts.marginBottom;
4436
- const m = Math.round(a * 0.1), p = Math.round(r * 0.1);
4437
- if (l = Math.min(l, p), h = Math.min(h, p), u = Math.min(u, m), f = Math.min(f, m), t.type === "drag") {
4446
+ let d, u = this.opts.marginLeft, h = this.opts.marginRight, l = this.opts.marginTop, f = this.opts.marginBottom;
4447
+ const g = Math.round(a * 0.1), p = Math.round(r * 0.1);
4448
+ if (u = Math.min(u, p), h = Math.min(h, p), l = Math.min(l, g), f = Math.min(f, g), t.type === "drag") {
4438
4449
  if (s._temporaryRemoved)
4439
4450
  return;
4440
- const g = i.position.top - s._prevYPix;
4441
- s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && c.updateScrollPosition(e, i.position, g);
4442
- const k = i.position.left + (i.position.left > s._lastUiPosition.left ? -h : l), z = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : u);
4443
- n.x = Math.round(k / r), n.y = Math.round(z / a);
4451
+ const m = i.position.top - s._prevYPix;
4452
+ s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && c.updateScrollPosition(e, i.position, m);
4453
+ const T = i.position.left + (i.position.left > s._lastUiPosition.left ? -h : u), R = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : l);
4454
+ n.x = Math.round(T / r), n.y = Math.round(R / a);
4444
4455
  const v = this._extraDragRow;
4445
4456
  if (this.engine.collide(s, n)) {
4446
- const q = this.getRow();
4447
- let A = Math.max(0, n.y + s.h - q);
4448
- this.opts.maxRow && q + A > this.opts.maxRow && (A = Math.max(0, this.opts.maxRow - q)), this._extraDragRow = A;
4457
+ const I = this.getRow();
4458
+ let q = Math.max(0, n.y + s.h - I);
4459
+ this.opts.maxRow && I + q > this.opts.maxRow && (q = Math.max(0, this.opts.maxRow - I)), this._extraDragRow = q;
4449
4460
  } else
4450
4461
  this._extraDragRow = 0;
4451
4462
  if (this._extraDragRow !== v && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
4452
4463
  return;
4453
4464
  } else if (t.type === "resize") {
4454
- if (n.x < 0 || (c.updateScrollResize(t, e, a), n.w = Math.round((i.size.width - l) / r), n.h = Math.round((i.size.height - u) / a), s.w === n.w && s.h === n.h) || s._lastTried && s._lastTried.w === n.w && s._lastTried.h === n.h)
4465
+ if (n.x < 0 || (c.updateScrollResize(t, e, a), n.w = Math.round((i.size.width - u) / r), n.h = Math.round((i.size.height - l) / a), s.w === n.w && s.h === n.h) || s._lastTried && s._lastTried.w === n.w && s._lastTried.h === n.h)
4455
4466
  return;
4456
- const g = i.position.left + l, k = i.position.top + u;
4457
- n.x = Math.round(g / r), n.y = Math.round(k / a), d = !0;
4467
+ const m = i.position.left + u, T = i.position.top + l;
4468
+ n.x = Math.round(m / r), n.y = Math.round(T / a), d = !0;
4458
4469
  }
4459
4470
  s._event = t, s._lastTried = n;
4460
4471
  const y = {
4461
- x: i.position.left + l,
4462
- y: i.position.top + u,
4463
- w: (i.size ? i.size.width : s.w * r) - l - h,
4464
- h: (i.size ? i.size.height : s.h * a) - u - f
4472
+ x: i.position.left + u,
4473
+ y: i.position.top + l,
4474
+ w: (i.size ? i.size.width : s.w * r) - u - h,
4475
+ h: (i.size ? i.size.height : s.h * a) - l - f
4465
4476
  };
4466
4477
  if (this.engine.moveNodeCheck(s, { ...n, cellWidth: r, cellHeight: a, rect: y, resizing: d })) {
4467
- s._lastUiPosition = i.position, this.engine.cacheRects(r, a, u, h, f, l), delete s._skipDown, d && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
4468
- const g = t.target;
4469
- s._sidebarOrig || this._writePosAttr(g, s), this._gsEventHandler[t.type] && this._gsEventHandler[t.type](t, g);
4478
+ s._lastUiPosition = i.position, this.engine.cacheRects(r, a, l, h, f, u), delete s._skipDown, d && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
4479
+ const m = t.target;
4480
+ s._sidebarOrig || this._writePosAttr(m, s), this._gsEventHandler[t.type] && this._gsEventHandler[t.type](t, m);
4470
4481
  }
4471
4482
  }
4472
4483
  /** @internal called when item leaving our area by either cursor dropout event
@@ -4484,7 +4495,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4484
4495
  }
4485
4496
  // legacy method removed
4486
4497
  commit() {
4487
- return wr(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4498
+ return Er(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4488
4499
  }
4489
4500
  }
4490
4501
  b.renderCB = (o, e) => {
@@ -4492,22 +4503,22 @@ b.renderCB = (o, e) => {
4492
4503
  };
4493
4504
  b.resizeToContentParent = ".grid-stack-item-content";
4494
4505
  b.Utils = c;
4495
- b.Engine = de;
4506
+ b.Engine = ce;
4496
4507
  b.GDRev = "11.5.1";
4497
- const Rr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], kr = { class: "grid-stack-item-content" }, Tr = /* @__PURE__ */ ee({
4508
+ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { class: "grid-stack-item-content" }, Sr = /* @__PURE__ */ ee({
4498
4509
  __name: "DraggableGridLayout",
4499
4510
  props: {
4500
4511
  tiles: {},
4501
- tileHeight: { default: Ge },
4502
- columns: { default: _t }
4512
+ tileHeight: { default: We },
4513
+ columns: { default: bt }
4503
4514
  },
4504
4515
  emits: ["update-tiles"],
4505
4516
  setup(o, { expose: e, emit: t }) {
4506
- const i = o, s = t, r = H(null), a = H(new Map(i.tiles.map((m) => [`${m.id}`, m])));
4517
+ const i = o, s = t, r = A(null), a = A(new Map(i.tiles.map((g) => [`${g.id}`, g])));
4507
4518
  let n = null;
4508
- const d = (m) => `[data-id="${m}"]`, l = (m) => m.map((p) => {
4509
- var g;
4510
- const y = a.value.get(`${(g = p.el) == null ? void 0 : g.getAttribute("data-id")}`);
4519
+ const d = (g) => `[data-id="${g}"]`, u = (g) => g.map((p) => {
4520
+ var m;
4521
+ const y = a.value.get(`${(m = p.el) == null ? void 0 : m.getAttribute("data-id")}`);
4511
4522
  if (y)
4512
4523
  return {
4513
4524
  ...y,
@@ -4516,53 +4527,53 @@ const Rr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], kr = { cl
4516
4527
  size: { cols: Number(p.w), rows: Number(p.h) }
4517
4528
  }
4518
4529
  };
4519
- }).filter((p) => p !== void 0), h = (m, p) => {
4520
- n && (l(p).forEach((g) => {
4521
- a.value.set(`${g.id}`, g);
4530
+ }).filter((p) => p !== void 0), h = (g, p) => {
4531
+ n && (u(p).forEach((m) => {
4532
+ a.value.set(`${m.id}`, m);
4522
4533
  }), s("update-tiles", Array.from(a.value.values())));
4523
- }, u = (m, p) => {
4534
+ }, l = (g, p) => {
4524
4535
  p.forEach((y) => {
4525
- var g;
4526
- a.value.delete(`${(g = y.el) == null ? void 0 : g.getAttribute("data-id")}`);
4536
+ var m;
4537
+ a.value.delete(`${(m = y.el) == null ? void 0 : m.getAttribute("data-id")}`);
4527
4538
  }), s("update-tiles", Array.from(a.value.values()));
4528
4539
  };
4529
- st(() => {
4540
+ nt(() => {
4530
4541
  r.value && (n = b.init({
4531
4542
  margin: 10,
4532
4543
  column: i.columns,
4533
4544
  cellHeight: i.tileHeight,
4534
4545
  resizable: { handles: "se, sw" },
4535
4546
  handle: ".tile-header"
4536
- }, r.value), n.on("change", h), n.on("added", h), n.on("removed", u));
4537
- }), Fe(() => {
4547
+ }, r.value), n.on("change", h), n.on("added", h), n.on("removed", l));
4548
+ }), Ge(() => {
4538
4549
  n && n.destroy(!1);
4539
4550
  });
4540
- const f = (m) => {
4551
+ const f = (g) => {
4541
4552
  if (n && r.value) {
4542
- const p = r.value.querySelector(d(m));
4553
+ const p = r.value.querySelector(d(g));
4543
4554
  p && n.removeWidget(p);
4544
4555
  }
4545
4556
  };
4546
- return Oe(() => i.tiles.length, async (m, p) => {
4547
- if (m > p && n) {
4557
+ return Oe(() => i.tiles.length, async (g, p) => {
4558
+ if (g > p && n) {
4548
4559
  const y = i.tiles.slice(p);
4549
- for (const g of y)
4550
- a.value.set(`${g.id}`, g), await yt(), n.makeWidget(d(g.id), {
4560
+ for (const m of y)
4561
+ a.value.set(`${m.id}`, m), await vt(), n.makeWidget(d(m.id), {
4551
4562
  autoPosition: !0,
4552
- w: g.layout.size.cols,
4553
- h: g.layout.size.rows
4563
+ w: m.layout.size.cols,
4564
+ h: m.layout.size.rows
4554
4565
  });
4555
4566
  }
4556
4567
  }), Jt(() => {
4557
- i.tiles.forEach((m) => {
4558
- a.value.set(`${m.id}`, m);
4568
+ i.tiles.forEach((g) => {
4569
+ a.value.set(`${g.id}`, g);
4559
4570
  });
4560
- }), e({ removeWidget: f }), (m, p) => (C(), B("div", {
4571
+ }), e({ removeWidget: f }), (g, p) => (x(), B("div", {
4561
4572
  ref_key: "gridContainer",
4562
4573
  ref: r,
4563
4574
  class: "grid-stack"
4564
4575
  }, [
4565
- (C(!0), B(mt, null, ri(i.tiles, (y) => (C(), B("div", {
4576
+ (x(!0), B(pt, null, ri(i.tiles, (y) => (x(), B("div", {
4566
4577
  key: y.id,
4567
4578
  class: "grid-stack-item",
4568
4579
  "data-id": `${y.id}`,
@@ -4573,13 +4584,13 @@ const Rr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], kr = { cl
4573
4584
  "gs-x": y.layout.position.col,
4574
4585
  "gs-y": y.layout.position.row
4575
4586
  }, [
4576
- te("div", kr, [
4577
- He(m.$slots, "tile", { tile: y }, void 0, !0)
4587
+ se("div", Tr, [
4588
+ He(g.$slots, "tile", { tile: y }, void 0, !0)
4578
4589
  ])
4579
- ], 8, Rr))), 128))
4590
+ ], 8, kr))), 128))
4580
4591
  ], 512));
4581
4592
  }
4582
- }), Sr = /* @__PURE__ */ be(Tr, [["__scopeId", "data-v-1fdec94c"]]), Dr = (o) => {
4593
+ }), Dr = /* @__PURE__ */ we(Sr, [["__scopeId", "data-v-1fdec94c"]]), zr = (o) => {
4583
4594
  const e = {
4584
4595
  ...o.meta,
4585
4596
  chart: { ...o.meta.chart }
@@ -4596,156 +4607,156 @@ const Rr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], kr = { cl
4596
4607
  size: o.layout.size
4597
4608
  }
4598
4609
  };
4599
- }, zr = {
4610
+ }, Nr = {
4600
4611
  key: 0,
4601
4612
  class: "fullscreen-header"
4602
- }, Nr = {
4613
+ }, Lr = {
4603
4614
  key: 0,
4604
4615
  class: "tile-container slottable-tile"
4605
- }, Lr = /* @__PURE__ */ ee({
4616
+ }, Ar = /* @__PURE__ */ ee({
4606
4617
  __name: "DashboardRenderer",
4607
- props: /* @__PURE__ */ je({
4618
+ props: /* @__PURE__ */ Ze({
4608
4619
  context: {},
4609
4620
  preview: { type: Boolean, default: !1 }
4610
4621
  }, {
4611
4622
  modelValue: { required: !0 },
4612
4623
  modelModifiers: {}
4613
4624
  }),
4614
- emits: /* @__PURE__ */ je(["edit-tile", "tile-time-range-zoom"], ["update:modelValue"]),
4625
+ emits: /* @__PURE__ */ Ze(["edit-tile", "tile-time-range-zoom"], ["update:modelValue"]),
4615
4626
  setup(o, { expose: e, emit: t }) {
4616
- pt((D) => ({
4627
+ yt((z) => ({
4617
4628
  v39442668: h.value
4618
4629
  }));
4619
- const i = t, s = ii(o, "modelValue"), { i18n: r } = ae.useI18n(), a = H(0), n = H(null), d = H(), l = H(), h = H("scale(1)"), u = ge(ye);
4620
- u || (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")), ae.useRequestQueue();
4621
- const f = (D, N) => {
4622
- const F = D.layout.position.row - N.layout.position.row;
4623
- return F !== 0 ? F : D.layout.position.col - N.layout.position.col;
4624
- }, m = w(() => s.value.tiles.map((D) => {
4625
- var V;
4626
- let N = D.definition;
4627
- const F = D.type ?? "chart", P = N.chart;
4630
+ const i = t, s = ii(o, "modelValue"), { i18n: r } = ue.useI18n(), a = A(0), n = A(null), d = A(), u = A(), h = A("scale(1)"), l = me(_e);
4631
+ l || (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")), ue.useRequestQueue();
4632
+ const f = (z, N) => {
4633
+ const F = z.layout.position.row - N.layout.position.row;
4634
+ return F !== 0 ? F : z.layout.position.col - N.layout.position.col;
4635
+ }, g = w(() => s.value.tiles.map((z) => {
4636
+ var Y;
4637
+ let N = z.definition;
4638
+ const F = z.type ?? "chart", P = N.chart;
4628
4639
  if (F === "chart" && "description" in P) {
4629
- const at = N, lt = (V = P.description) == null ? void 0 : V.replace(Rs, () => {
4630
- const { timeSpec: Ue } = I.value, we = `renderer.trendRange.${Ue.type === "absolute" ? "custom" : Ue.time_range}`;
4631
- return r.te(we) ? r.t(we) : "";
4640
+ const lt = N, ut = (Y = P.description) == null ? void 0 : Y.replace(ks, () => {
4641
+ const { timeSpec: Ke } = H.value, Ee = `renderer.trendRange.${Ke.type === "absolute" ? "custom" : Ke.time_range}`;
4642
+ return r.te(Ee) ? r.t(Ee) : "";
4632
4643
  });
4633
4644
  N = {
4634
- ...at,
4645
+ ...lt,
4635
4646
  chart: {
4636
4647
  ...P,
4637
- description: lt
4648
+ description: ut
4638
4649
  }
4639
4650
  };
4640
4651
  }
4641
- return I.value.editable && !D.id && console.warn(
4652
+ return H.value.editable && !z.id && console.warn(
4642
4653
  "No id provided for tile. One will be generated automatically,",
4643
4654
  "however tracking changes to this tile may not work as expected.",
4644
- D
4655
+ z
4645
4656
  ), {
4646
- layout: D.layout,
4657
+ layout: z.layout,
4647
4658
  meta: N,
4648
4659
  type: F,
4649
4660
  // Add a unique key to each tile internally.
4650
- id: D.id ?? crypto.randomUUID()
4661
+ id: z.id ?? crypto.randomUUID()
4651
4662
  };
4652
- })), p = (D) => {
4653
- i("edit-tile", D);
4654
- }, y = (D) => D.type === "chart" && D.meta.chart.type === "slottable", g = (D) => D.type === "slottable", k = (D) => {
4655
- const N = D.meta.chart;
4656
- return g(N) ? N.id : void 0;
4657
- }, z = (D) => {
4663
+ })), p = (z) => {
4664
+ i("edit-tile", z);
4665
+ }, y = (z) => z.type === "chart" && z.meta.chart.type === "slottable", m = (z) => z.type === "slottable", T = (z) => {
4666
+ const N = z.meta.chart;
4667
+ return m(N) ? N.id : void 0;
4668
+ }, R = (z) => {
4658
4669
  try {
4659
- const N = Dr(D);
4670
+ const N = zr(z);
4660
4671
  s.value.tiles.push(JSON.parse(JSON.stringify(N)));
4661
4672
  } catch (N) {
4662
4673
  console.warn(N);
4663
4674
  }
4664
- }, v = (D) => {
4665
- n.value && n.value.removeWidget(D.id);
4666
- }, q = () => {
4675
+ }, v = (z) => {
4676
+ n.value && n.value.removeWidget(z.id);
4677
+ }, I = () => {
4667
4678
  a.value++;
4668
- }, A = (D) => {
4669
- const N = D.map((F) => ({
4679
+ }, q = (z) => {
4680
+ const N = z.map((F) => ({
4670
4681
  id: F.id,
4671
4682
  type: F.type,
4672
4683
  layout: F.layout,
4673
4684
  definition: F.meta
4674
4685
  }));
4675
4686
  s.value.tiles = N.sort(f);
4676
- }, le = async () => {
4677
- if (h.value = "scale(1)", await yt(), l.value) {
4678
- const { availWidth: D, availHeight: N } = window.screen, { width: F, height: P } = l.value.getBoundingClientRect(), V = Math.min(N / P, D / F);
4679
- h.value = `scale(${V})`;
4687
+ }, te = async () => {
4688
+ if (h.value = "scale(1)", await vt(), u.value) {
4689
+ const { availWidth: z, availHeight: N } = window.screen, { width: F, height: P } = u.value.getBoundingClientRect(), Y = Math.min(N / P, z / F);
4690
+ h.value = `scale(${Y})`;
4680
4691
  }
4681
- }, xe = () => {
4692
+ }, ie = () => {
4682
4693
  d.value && (document.fullscreenElement ? document.exitFullscreen() : d.value.requestFullscreen());
4683
- }, Y = H(!1), ve = () => {
4684
- Y.value = document.fullscreenElement !== null, Y.value && le();
4685
- }, S = w(() => s.value.preset_filters ?? []), { internalContext: I, queryReady: Q } = ae.useDashboardInternalContext({
4686
- globalFilters: S,
4694
+ }, W = A(!1), pe = () => {
4695
+ W.value = document.fullscreenElement !== null, W.value && te();
4696
+ }, D = w(() => s.value.preset_filters ?? []), { internalContext: H, queryReady: V } = ue.useDashboardInternalContext({
4697
+ globalFilters: D,
4687
4698
  context: w(() => o.context),
4688
- isFullscreen: Y,
4699
+ isFullscreen: W,
4689
4700
  preview: w(() => o.preview)
4690
4701
  });
4691
4702
  return e({
4692
- refresh: q,
4693
- toggleFullscreen: xe
4694
- }), (D, N) => {
4695
- const F = ue("KAlert");
4696
- return C(), B("div", {
4703
+ refresh: I,
4704
+ toggleFullscreen: ie
4705
+ }), (z, N) => {
4706
+ const F = he("KAlert");
4707
+ return x(), B("div", {
4697
4708
  ref_key: "dashboardContainer",
4698
4709
  ref: d,
4699
- class: ze(["kong-ui-public-dashboard-renderer", { "is-fullscreen": Y.value }]),
4700
- onFullscreenchange: ve
4710
+ class: ze(["kong-ui-public-dashboard-renderer", { "is-fullscreen": W.value }]),
4711
+ onFullscreenchange: pe
4701
4712
  }, [
4702
- te("div", {
4713
+ se("div", {
4703
4714
  ref_key: "layoutContainer",
4704
- ref: l,
4715
+ ref: u,
4705
4716
  class: "layout"
4706
4717
  }, [
4707
- E(u) && Y.value ? (C(), B("div", zr, [
4708
- He(D.$slots, "fullscreenHeader", {}, void 0, !0)
4718
+ C(l) && W.value ? (x(), B("div", Nr, [
4719
+ He(z.$slots, "fullscreenHeader", {}, void 0, !0)
4709
4720
  ])) : X("", !0),
4710
- E(u) ? (C(), O(si(E(I).editable && !Y.value ? Sr : br), {
4721
+ C(l) ? (x(), O(si(C(H).editable && !W.value ? Dr : wr), {
4711
4722
  key: 2,
4712
4723
  ref_key: "gridLayoutRef",
4713
4724
  ref: n,
4714
4725
  columns: s.value.columns,
4715
4726
  "tile-height": s.value.tile_height,
4716
- tiles: m.value,
4717
- onUpdateTiles: A
4727
+ tiles: g.value,
4728
+ onUpdateTiles: q
4718
4729
  }, {
4719
4730
  tile: M(({ tile: P }) => [
4720
- y(P) ? (C(), B("div", Nr, [
4721
- He(D.$slots, k(P), {}, void 0, !0)
4722
- ])) : (C(), O(mi, {
4723
- key: Y.value ? `${P.id}-tile` : `${P.id}-tile-fullscreen`,
4731
+ y(P) ? (x(), B("div", Lr, [
4732
+ He(z.$slots, T(P), {}, void 0, !0)
4733
+ ])) : (x(), O(mi, {
4734
+ key: W.value ? `${P.id}-tile` : `${P.id}-tile-fullscreen`,
4724
4735
  "refresh-counter": a.value,
4725
- "onUpdate:refreshCounter": N[0] || (N[0] = (V) => a.value = V),
4736
+ "onUpdate:refreshCounter": N[0] || (N[0] = (Y) => a.value = Y),
4726
4737
  class: "tile-container",
4727
- context: E(I),
4738
+ context: C(H),
4728
4739
  definition: P.meta,
4729
- height: P.layout.size.rows * (s.value.tile_height || E(Ge)) + parseInt(E(gi), 10),
4730
- "hide-actions": !E(I).showTileActions,
4731
- "hide-zoom-actions": !E(I).showTileZoomActions,
4732
- "is-fullscreen": Y.value,
4733
- "query-ready": E(Q),
4740
+ height: P.layout.size.rows * (s.value.tile_height || C(We)) + parseInt(C(gi), 10),
4741
+ "hide-actions": !C(H).showTileActions,
4742
+ "hide-zoom-actions": !C(H).showTileZoomActions,
4743
+ "is-fullscreen": W.value,
4744
+ "query-ready": C(V),
4734
4745
  "tile-id": P.id,
4735
4746
  "tile-type": P.type,
4736
- onDuplicateTile: (V) => z(P),
4737
- onEditTile: (V) => p(P),
4738
- onRemoveTile: (V) => v(P),
4739
- onTileTimeRangeZoom: N[1] || (N[1] = (V) => i("tile-time-range-zoom", V))
4747
+ onDuplicateTile: (Y) => R(P),
4748
+ onEditTile: (Y) => p(P),
4749
+ onRemoveTile: (Y) => v(P),
4750
+ onTileTimeRangeZoom: N[1] || (N[1] = (Y) => i("tile-time-range-zoom", Y))
4740
4751
  }, null, 8, ["refresh-counter", "context", "definition", "height", "hide-actions", "hide-zoom-actions", "is-fullscreen", "query-ready", "tile-id", "tile-type", "onDuplicateTile", "onEditTile", "onRemoveTile"]))
4741
4752
  ]),
4742
4753
  _: 3
4743
- }, 40, ["columns", "tile-height", "tiles"])) : (C(), O(F, {
4754
+ }, 40, ["columns", "tile-height", "tiles"])) : (x(), O(F, {
4744
4755
  key: 1,
4745
4756
  appearance: "danger"
4746
4757
  }, {
4747
4758
  default: M(() => [
4748
- gt(J(E(r).t("renderer.noQueryBridge")), 1)
4759
+ mt(J(C(r).t("renderer.noQueryBridge")), 1)
4749
4760
  ]),
4750
4761
  _: 1
4751
4762
  }))
@@ -4753,7 +4764,7 @@ const Rr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], kr = { cl
4753
4764
  ], 34);
4754
4765
  };
4755
4766
  }
4756
- }), Qr = /* @__PURE__ */ be(Lr, [["__scopeId", "data-v-33404a87"]]), Vr = /* @__PURE__ */ ee({
4767
+ }), Vr = /* @__PURE__ */ we(Ar, [["__scopeId", "data-v-33404a87"]]), Yr = /* @__PURE__ */ ee({
4757
4768
  __name: "DashboardTilePreview",
4758
4769
  props: {
4759
4770
  context: {},
@@ -4767,76 +4778,76 @@ const Rr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], kr = { cl
4767
4778
  a("tile-time-range-zoom", v);
4768
4779
  }, d = (v) => {
4769
4780
  a("chart-data", v);
4770
- }, l = (v) => {
4781
+ }, u = (v) => {
4771
4782
  a("tile-bounds-change", v);
4772
- }, { i18n: h } = ae.useI18n(), { internalContext: u, queryReady: f } = ae.useDashboardInternalContext({
4783
+ }, { i18n: h } = ue.useI18n(), { internalContext: l, queryReady: f } = ue.useDashboardInternalContext({
4773
4784
  globalFilters: Ae(() => o.globalFilters),
4774
4785
  context: Ae(() => o.context),
4775
4786
  preview: w(() => o.preview)
4776
- }), m = w(() => oe(o.definition)), p = w(() => {
4787
+ }), g = w(() => le(o.definition)), p = w(() => {
4777
4788
  var v;
4778
- return m.value ? "columns" in o.definition.query && !((v = o.definition.query.columns) != null && v.length) : !("metrics" in o.definition.query) || !o.definition.query.metrics || o.definition.query.metrics.length === 0;
4779
- }), y = H(Ge);
4780
- let g;
4781
- st(() => {
4782
- var q;
4783
- const v = (q = i.value) == null ? void 0 : q.parentElement;
4784
- v && (y.value = v.getBoundingClientRect().height, g = new ResizeObserver(([A]) => {
4785
- const { height: le } = A.contentRect;
4786
- y.value = le;
4787
- }), g.observe(v));
4788
- }), Fe(() => g == null ? void 0 : g.disconnect());
4789
- const k = H(0);
4789
+ return g.value ? "columns" in o.definition.query && !((v = o.definition.query.columns) != null && v.length) : !("metrics" in o.definition.query) || !o.definition.query.metrics || o.definition.query.metrics.length === 0;
4790
+ }), y = A(We);
4791
+ let m;
4792
+ nt(() => {
4793
+ var I;
4794
+ const v = (I = i.value) == null ? void 0 : I.parentElement;
4795
+ v && (y.value = v.getBoundingClientRect().height, m = new ResizeObserver(([q]) => {
4796
+ const { height: te } = q.contentRect;
4797
+ y.value = te;
4798
+ }), m.observe(v));
4799
+ }), Ge(() => m == null ? void 0 : m.disconnect());
4800
+ const T = A(0);
4790
4801
  return e({
4791
4802
  refresh: () => {
4792
- k.value++;
4803
+ T.value++;
4793
4804
  },
4794
4805
  getExportData: () => {
4795
4806
  var v;
4796
4807
  return (v = s.value) == null ? void 0 : v.getExportData();
4797
4808
  }
4798
- }), (v, q) => {
4799
- const A = ue("KEmptyState");
4800
- return C(), B("div", {
4809
+ }), (v, I) => {
4810
+ const q = he("KEmptyState");
4811
+ return x(), B("div", {
4801
4812
  ref_key: "root",
4802
4813
  ref: i,
4803
4814
  "data-testid": "dashboard-tile-preview-root"
4804
4815
  }, [
4805
- p.value ? (C(), O(A, {
4816
+ p.value ? (x(), O(q, {
4806
4817
  key: 0,
4807
4818
  "action-button-visible": !1,
4808
4819
  "data-testid": "chart-not-configured-empty-state"
4809
4820
  }, {
4810
4821
  title: M(() => [
4811
- te("p", null, J(E(h).t("renderer.not_configured.title")), 1)
4822
+ se("p", null, J(C(h).t("renderer.not_configured.title")), 1)
4812
4823
  ]),
4813
4824
  default: M(() => [
4814
- te("p", null, J(E(h).t("renderer.not_configured.description")), 1)
4825
+ se("p", null, J(C(h).t("renderer.not_configured.description")), 1)
4815
4826
  ]),
4816
4827
  _: 1
4817
- })) : (C(), O(mi, {
4828
+ })) : (x(), O(mi, {
4818
4829
  key: 1,
4819
4830
  ref: "dashboard-tile",
4820
- "refresh-counter": k.value,
4821
- "onUpdate:refreshCounter": q[0] || (q[0] = (le) => k.value = le),
4831
+ "refresh-counter": T.value,
4832
+ "onUpdate:refreshCounter": I[0] || (I[0] = (te) => T.value = te),
4822
4833
  context: {
4823
- ...E(u),
4834
+ ...C(l),
4824
4835
  editable: !1
4825
4836
  },
4826
4837
  definition: o.definition,
4827
4838
  height: y.value,
4828
4839
  "hide-actions": "",
4829
- "query-ready": E(f),
4840
+ "query-ready": C(f),
4830
4841
  "show-refresh": "",
4831
- "tile-id": E(r),
4842
+ "tile-id": C(r),
4832
4843
  onChartData: d,
4833
- onTileBoundsChange: l,
4844
+ onTileBoundsChange: u,
4834
4845
  onTileTimeRangeZoom: n
4835
4846
  }, null, 8, ["refresh-counter", "context", "definition", "height", "query-ready", "tile-id"]))
4836
4847
  ], 512);
4837
4848
  };
4838
4849
  }
4839
- }), Ar = (o) => {
4850
+ }), Or = (o) => {
4840
4851
  var t;
4841
4852
  const e = (t = o.definition) == null ? void 0 : t.query;
4842
4853
  if (!e)
@@ -4846,9 +4857,9 @@ const Rr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], kr = { cl
4846
4857
  return;
4847
4858
  }
4848
4859
  return o;
4849
- }, Or = (o) => {
4860
+ }, Hr = (o) => {
4850
4861
  var i;
4851
- if (oe(o.definition))
4862
+ if (le(o.definition))
4852
4863
  return o;
4853
4864
  const e = (i = o.definition) == null ? void 0 : i.query;
4854
4865
  if (!e)
@@ -4864,56 +4875,56 @@ const Rr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], kr = { cl
4864
4875
  query: t
4865
4876
  }
4866
4877
  };
4867
- }, Hr = (o, e = _t) => {
4868
- var a, n, d, l, h;
4878
+ }, Ir = (o, e = bt) => {
4879
+ var a, n, d, u, h;
4869
4880
  if (!o.length)
4870
4881
  return [];
4871
4882
  let t = 0, i = 0, s = 0;
4872
4883
  const r = [];
4873
- for (const u of o) {
4874
- const f = ((n = (a = u.layout) == null ? void 0 : a.size) == null ? void 0 : n.cols) ?? 1, m = ((l = (d = u.layout) == null ? void 0 : d.size) == null ? void 0 : l.rows) ?? 1;
4884
+ for (const l of o) {
4885
+ const f = ((n = (a = l.layout) == null ? void 0 : a.size) == null ? void 0 : n.cols) ?? 1, g = ((u = (d = l.layout) == null ? void 0 : d.size) == null ? void 0 : u.rows) ?? 1;
4875
4886
  i + f > e && (t += s, i = 0, s = 0);
4876
4887
  const p = {
4877
- ...u,
4888
+ ...l,
4878
4889
  layout: {
4879
- ...u.layout,
4890
+ ...l.layout,
4880
4891
  position: {
4881
- ...((h = u.layout) == null ? void 0 : h.position) ?? {},
4892
+ ...((h = l.layout) == null ? void 0 : h.position) ?? {},
4882
4893
  col: i,
4883
4894
  row: t
4884
4895
  }
4885
4896
  }
4886
4897
  };
4887
- r.push(p), i += f, s = Math.max(s, m);
4898
+ r.push(p), i += f, s = Math.max(s, g);
4888
4899
  }
4889
4900
  return r;
4890
- }, Yr = (o, e) => {
4901
+ }, jr = (o, e) => {
4891
4902
  if (e) {
4892
- const s = o.tiles.map(Or);
4903
+ const s = o.tiles.map(Hr);
4893
4904
  return {
4894
4905
  ...o,
4895
4906
  tiles: s
4896
4907
  };
4897
4908
  }
4898
- const t = o.tiles.map(Ar).filter((s) => s !== void 0), i = Hr(t, o.columns);
4909
+ const t = o.tiles.map(Or).filter((s) => s !== void 0), i = Ir(t, o.columns);
4899
4910
  return {
4900
4911
  ...o,
4901
4912
  tiles: i
4902
4913
  };
4903
4914
  };
4904
4915
  export {
4905
- Cs as C,
4906
- _t as D,
4916
+ Rs as C,
4917
+ bt as D,
4907
4918
  Mt as E,
4908
- Ss as F,
4909
- br as G,
4910
- ye as I,
4911
- Rs as T,
4919
+ Ds as F,
4920
+ wr as G,
4921
+ _e as I,
4922
+ ks as T,
4912
4923
  wt as _,
4913
- Ge as a,
4914
- ks as b,
4915
- Qr as c,
4916
- Vr as d,
4917
- Ts as e,
4918
- Yr as f
4924
+ We as a,
4925
+ Ts as b,
4926
+ Vr as c,
4927
+ Yr as d,
4928
+ Ss as e,
4929
+ jr as f
4919
4930
  };