@toolbox-web/grid 1.14.0 → 1.14.1

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.
package/index.js CHANGED
@@ -345,10 +345,10 @@ class Tt {
345
345
  const e = (this.#o.columns?.length ?? 0) > 0;
346
346
  if (!this.#f && e)
347
347
  return;
348
- const i = this.#k();
349
- this.#f = !1, this.#a = i, Object.freeze(this.#a), this.#a.columns && Object.freeze(this.#a.columns), this.#o = this.#T(this.#a), this.#m();
348
+ const i = this.#N();
349
+ this.#f = !1, this.#a = i, Object.freeze(this.#a), this.#a.columns && Object.freeze(this.#a.columns), this.#o = this.#x(this.#a), this.#m();
350
350
  }
351
- #T(e) {
351
+ #x(e) {
352
352
  const i = { ...e };
353
353
  return e.columns && (i.columns = e.columns.map((o) => ({ ...o }))), e.shell && (i.shell = {
354
354
  ...e.shell,
@@ -374,7 +374,7 @@ class Tt {
374
374
  n && (!o.renderer && !o.viewRenderer && n.renderer && (o.renderer = n.renderer), !o.format && n.format && (o.format = n.format), !o.editor && n.editor && (o.editor = n.editor), !o.editorParams && n.editorParams && (o.editorParams = n.editorParams));
375
375
  }
376
376
  }
377
- #k() {
377
+ #N() {
378
378
  const e = this.#l ? { ...this.#l } : {}, i = Array.isArray(e.columns) ? [...e.columns] : [], o = (this.#d ?? []).map((s) => ({
379
379
  ...s
380
380
  }));
@@ -462,7 +462,7 @@ class Tt {
462
462
  l.applyColumnState(a.field, a);
463
463
  }
464
464
  resetState(e) {
465
- this.#C = void 0, this.#r.setSortState(null), this.#o = this.#T(this.#a), this.#m();
465
+ this.#C = void 0, this.#r.setSortState(null), this.#o = this.#x(this.#a), this.#m();
466
466
  for (const i of e)
467
467
  if (i.applyColumnState)
468
468
  for (const o of this.columns)
@@ -707,7 +707,10 @@ function zt(t, e, i, o, n) {
707
707
  h.__epoch = o, h.__rowDataRef = p, h.parentNode !== s && s.appendChild(h);
708
708
  continue;
709
709
  }
710
- const w = h.__epoch, C = h.__rowDataRef, m = h.children.length, S = w === o && m === a, A = C !== p;
710
+ const w = h.__epoch, C = h.__rowDataRef;
711
+ let m = h.children.length;
712
+ m > a && h.lastElementChild?.classList.contains("tbw-row-loading-overlay") && m--;
713
+ const S = w === o && m === a, A = C !== p;
711
714
  let v = !1;
712
715
  if (S && A) {
713
716
  for (let R = 0; R < a; R++)
@@ -865,7 +868,7 @@ function le(t, e, i, o) {
865
868
  }
866
869
  }
867
870
  function V(t, e, i, o) {
868
- e.innerHTML = "";
871
+ e.classList.remove("tbw-row-loading"), e.removeAttribute("aria-busy"), e.innerHTML = "";
869
872
  const n = t._visibleColumns, r = n.length, s = t._focusRow, l = t._focusCol, a = t, c = t._hasAfterCellRenderHook?.() ?? !1, d = document.createDocumentFragment();
870
873
  for (let f = 0; f < r; f++) {
871
874
  const u = n[f], g = Lt();
@@ -1306,7 +1309,15 @@ function jt(t) {
1306
1309
  t?.remove();
1307
1310
  }
1308
1311
  function Kt(t, e) {
1309
- e ? (t.classList.add("tbw-row-loading"), t.setAttribute("aria-busy", "true")) : (t.classList.remove("tbw-row-loading"), t.removeAttribute("aria-busy"));
1312
+ if (e) {
1313
+ if (t.classList.add("tbw-row-loading"), t.setAttribute("aria-busy", "true"), !t.querySelector(".tbw-row-loading-overlay")) {
1314
+ const i = document.createElement("div");
1315
+ i.className = "tbw-row-loading-overlay", i.setAttribute("aria-hidden", "true");
1316
+ const o = document.createElement("div");
1317
+ o.className = "tbw-row-loading-spinner", i.appendChild(o), t.appendChild(i);
1318
+ }
1319
+ } else
1320
+ t.classList.remove("tbw-row-loading"), t.removeAttribute("aria-busy"), t.querySelector(".tbw-row-loading-overlay")?.remove();
1310
1321
  }
1311
1322
  function Qt(t, e) {
1312
1323
  e ? (t.classList.add("tbw-cell-loading"), t.setAttribute("aria-busy", "true")) : (t.classList.remove("tbw-cell-loading"), t.removeAttribute("aria-busy"));
@@ -2695,7 +2706,7 @@ class oe {
2695
2706
  return e.sort((i, o) => (i.content.order ?? 0) - (o.content.order ?? 0));
2696
2707
  }
2697
2708
  }
2698
- const Ui = "@layer tbw-base{tbw-grid{.tbw-expanding{animation:tbw-expand var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}.tbw-collapsing{animation:tbw-collapse var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}&[data-animation-mode=off]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}tbw-grid .data-grid-row[data-animating=change]{animation:tbw-row-change var(--tbw-row-change-duration) ease-out}tbw-grid .data-grid-row[data-animating=insert]{animation:tbw-row-insert var(--tbw-row-insert-duration) ease-out;will-change:max-height,opacity}tbw-grid .data-grid-row[data-animating=remove]{animation:tbw-row-remove var(--tbw-row-remove-duration) ease-out forwards;will-change:max-height,opacity,transform;pointer-events:none}}@keyframes tbw-expand{0%{opacity:0;max-height:0;transform:translateY(-8px)}to{opacity:1;max-height:500px;transform:translateY(0)}}@keyframes tbw-collapse{0%{opacity:1;max-height:500px;transform:translateY(0)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-row-change{0%{background-color:transparent}20%{background-color:var(--tbw-row-change-color)}to{background-color:transparent}}@keyframes tbw-row-insert{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:var(--tbw-row-height, 28px);overflow:hidden}}@keyframes tbw-row-remove{0%{opacity:1;transform:translateY(0);max-height:var(--tbw-row-height, 28px)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-spin{to{transform:rotate(360deg)}}@keyframes tbw-fade-in{0%{opacity:0}to{opacity:1}}", Vi = '@layer tbw-base{tbw-grid{color-scheme:inherit;position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);font-feature-settings:"tnum","lnum";background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none;&,*{box-sizing:border-box}.tbw-grid-root{position:relative;display:flex;flex-direction:column;height:100%;&.has-shell{display:flex;flex-direction:column;height:100%}&:has(.selected){user-select:none}}.rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}.rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}.rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}.rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip;.rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}}.faux-vscroll{position:sticky;inset-inline-end:0;flex-shrink:0;width:auto;overflow-y:auto;overflow-x:hidden;z-index:var(--tbw-z-layer-header, 30)}.faux-vscroll-spacer{width:1px}&[data-has-focus]{.cell-focus,.row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}}.sticky-left,.sticky-right{position:sticky;z-index:25}.sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}.sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}}}', Bi = '@layer tbw-base{tbw-grid{.header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}.header-group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-header-bg);z-index:var(--tbw-z-layer-header, 30)}.header-group-cell{display:flex;align-items:center;justify-content:flex-start;padding:var(--tbw-cell-padding-header, 2px 8px);color:var(--tbw-color-header-group-fg, var(--tbw-color-header-fg));font-weight:var(--tbw-font-weight-header-group, var(--tbw-font-weight-header));justify-content:var(--tbw-align-header-group, var(--tbw-align-header, flex-start));&:not(:last-child){border-right:2px solid var(--tbw-color-border)}}.header-row{display:grid;grid-template-columns:var(--tbw-column-template);color:var(--tbw-color-header-fg);font-size:var(--tbw-font-size-header);min-height:var(--tbw-header-height);border-bottom:var(--tbw-border-header);z-index:var(--tbw-z-layer-header, 30);text-transform:var(--tbw-header-text-transform);letter-spacing:var(--tbw-header-letter-spacing);>.cell{display:flex;align-items:center;gap:4px;padding:var(--tbw-cell-padding-header, 2px 8px);background-color:var(--tbw-color-header-bg);font-weight:var(--tbw-font-weight-header);border-right:1px solid var(--tbw-color-border-cell);overflow:visible;min-width:0;>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:inherit}>span[part~=sort-indicator]{flex-shrink:0;opacity:.6;color:var(--tbw-sort-indicator-color);display:var(--tbw-sort-indicator-display, inline-flex);visibility:var(--tbw-sort-indicator-visibility, visible);transition:opacity .15s,visibility 0s,display 0s allow-discrete;transition-behavior:allow-discrete}&:hover>span[part~=sort-indicator]{display:inline-flex;visibility:visible}&[aria-sort=ascending]>span[part~=sort-indicator],&[aria-sort=descending]>span[part~=sort-indicator]{display:inline-flex;visibility:visible;opacity:1;color:var(--tbw-sort-indicator-active-color)}&:last-child{border-right:0;.resize-handle{right:0;width:calc(var(--tbw-resize-handle-width) / 2)}}&.grouped.group-end:not(:last-child){border-right:2px solid var(--tbw-color-border)}&.resizable{position:relative}&.sticky-left,&.sticky-right{background:var(--tbw-color-header-bg);z-index:35}}}.sortable{cursor:pointer;user-select:none}.resize-handle{position:absolute;top:0;right:calc(var(--tbw-resize-handle-width) / -2);width:var(--tbw-resize-handle-width);height:100%;cursor:e-resize;user-select:none;touch-action:none;z-index:20;background:var(--tbw-resize-handle-color);transition:background .12s ease;border-radius:var(--tbw-resize-handle-border-radius);&:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);width:var(--tbw-resize-indicator-width, 2px);height:0;background:var(--tbw-resize-indicator-color, var(--tbw-color-accent));opacity:0;pointer-events:none;transition:opacity .12s ease,height 0s .12s;z-index:1000}&:hover{background:var(--tbw-resize-handle-color-hover);&:after{height:100vh;opacity:var(--tbw-resize-indicator-opacity, .6);transition:opacity .12s ease,height 0s}}}}}', Gi = '@layer tbw-base{.tbw-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:1000;pointer-events:all;animation:tbw-fade-in .15s ease-out}.tbw-spinner{--tbw-spinner-size: 48px;--tbw-spinner-border-width: 3px;--tbw-spinner-color: var(--tbw-color-accent);--tbw-spinner-track-color: var(--tbw-color-border);width:var(--tbw-spinner-size);height:var(--tbw-spinner-size);border:var(--tbw-spinner-border-width) solid var(--tbw-spinner-track-color);border-top-color:var(--tbw-spinner-color);border-radius:50%;animation:tbw-spin .8s linear infinite}.tbw-spinner--large{--tbw-spinner-size: min(48px, calc(100% - 16px) )}.tbw-spinner--small{--tbw-spinner-size: calc(var(--tbw-row-height, 28px) * .6);--tbw-spinner-border-width: 2px}.data-grid-row.tbw-row-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:10;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .6);content:"";position:absolute;left:var(--tbw-spacing-md);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:11}}.cell.tbw-cell-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:10;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .5);content:"";position:absolute;left:var(--tbw-spacing-sm);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:11}}}', Xi = "@layer tbw-base{@media(forced-colors:active){tbw-grid{--tbw-color-border: CanvasText;--tbw-color-border-strong: CanvasText;--tbw-color-border-cell: CanvasText;--tbw-color-border-header: CanvasText;--tbw-color-fg: CanvasText;--tbw-color-bg: Canvas;--tbw-color-panel-bg: Canvas;--tbw-color-header-bg: Canvas;--tbw-color-header-fg: CanvasText;--tbw-color-accent: Highlight;--tbw-color-accent-fg: HighlightText;--tbw-color-selection: Highlight;--tbw-color-row-hover: Highlight;--tbw-focus-outline: 2px solid Highlight;--tbw-range-border-color: Highlight;.cell:focus,.cell.active-cell{outline:2px solid Highlight!important;outline-offset:-2px}.data-grid-row[aria-selected=true]{background:Highlight!important;color:HighlightText!important}}}@media(prefers-reduced-motion:reduce){tbw-grid[data-animation-mode=reduced-motion]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}}", Yi = "@layer tbw-base{tbw-grid{.data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style;&:nth-child(2n){background:var(--tbw-color-row-alt)}&:hover{background:var(--tbw-color-row-hover)}>.cell{display:block;padding:var(--tbw-cell-padding, 2px 8px);border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height);align-content:center;border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0;white-space:var(--tbw-cell-white-space, nowrap);text-overflow:ellipsis;>*{overflow:hidden;text-overflow:ellipsis;white-space:inherit;min-width:0}&:last-child{border-right:0}&[data-type=boolean]{text-align:center;input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size);vertical-align:middle}}&.selected:focus-visible,&:focus-visible:not(.cell-focus){outline:none}&.sticky-left,&.sticky-right{background:var(--tbw-color-panel-bg)}}}.selecting .data-grid-row>.cell{user-select:none}}}", ji = "@layer tbw-base{tbw-grid{.tbw-shell-header{display:flex;align-items:center;gap:8px;min-height:var(--tbw-shell-header-height);padding:0 8px;background:var(--tbw-shell-header-bg);border-bottom:1px solid var(--tbw-shell-header-border);flex-shrink:0}.tbw-shell-title{font-size:var(--tbw-shell-title-font-size);font-weight:var(--tbw-shell-title-font-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}.tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}.tbw-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toolbar-button-size);height:var(--tbw-toolbar-button-size);padding:0;border:1px solid transparent;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg);cursor:pointer;font-size:16px;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease),border-color var(--tbw-transition-duration) var(--tbw-transition-ease);&:hover{background:var(--tbw-color-row-hover)}&:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}&.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}&:disabled{opacity:.5;cursor:not-allowed}}.tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}.tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}.tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}.tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden;overflow-anchor:none}}}", Ki = "@layer tbw-base{tbw-grid{.tbw-tool-panel{position:absolute;top:0;bottom:0;right:0;width:0;overflow:hidden;background:var(--tbw-tool-panel-bg);border-left:1px solid var(--tbw-tool-panel-border);transition:width var(--tbw-tool-panel-transition);display:flex;flex-direction:column;z-index:30;box-shadow:-2px 0 8px var(--tbw-color-shadow);&[data-position=left]{right:auto;left:0;border-left:none;border-right:1px solid var(--tbw-tool-panel-border);box-shadow:2px 0 8px var(--tbw-color-shadow)}&.open{width:var(--tbw-tool-panel-width)}}.tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease);&[data-handle-position=left]{left:0}&[data-handle-position=right]{right:0}&:hover,&.resizing{background:var(--tbw-color-accent)}}.tbw-tool-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:var(--tbw-tool-panel-header-height);padding:0 12px;border-bottom:1px solid var(--tbw-tool-panel-border);flex-shrink:0}.tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-tool-panel-close{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg-muted);cursor:pointer;font-size:14px;&:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}}.tbw-tool-panel-content{flex:1;overflow:auto}.tbw-accordion{display:flex;flex-direction:column;gap:0}.tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border);&:last-child{border-bottom:none}&.single .tbw-accordion-header{cursor:default;&:hover{background:transparent}}&.expanded{.tbw-accordion-chevron{transform:rotate(90deg)}.tbw-accordion-content{display:block}}}.tbw-accordion-header{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:none;background:transparent;color:var(--tbw-color-fg);font-size:13px;font-weight:600;text-align:start;cursor:pointer;user-select:none;&:hover{background:var(--tbw-color-row-hover)}}.tbw-accordion-chevron{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:10px;color:var(--tbw-color-fg-muted);transition:transform .15s ease;flex-shrink:0}.tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}.tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tbw-accordion-content{display:none}}}", Qi = "@layer tbw-base{tbw-grid{--tbw-base-icon-size: 1em;--tbw-base-radius: .25em;--tbw-font-size: 1em;--tbw-font-size-sm: .9285em;--tbw-font-size-xs: .7857em;--tbw-font-size-2xs: .7142em;--tbw-spacing-xs: .25em;--tbw-spacing-sm: .375em;--tbw-spacing-md: .5em;--tbw-spacing-lg: .75em;--tbw-spacing-xl: 1em;--tbw-icon-size: var(--tbw-base-icon-size);--tbw-icon-size-sm: .875em;--tbw-checkbox-size: var(--tbw-base-icon-size);--tbw-toggle-size: 1.25em;--tbw-border-radius: var(--tbw-base-radius);--tbw-color-bg: transparent;--tbw-color-panel-bg: light-dark(#eeeeee, #222222);--tbw-color-fg: light-dark(#222222, #eeeeee);--tbw-color-fg-muted: light-dark(#555555, #aaaaaa);--tbw-color-accent: light-dark(#3b82f6, #3b82f6);--tbw-color-accent-fg: light-dark(#ffffff, #000000);--tbw-color-success: light-dark(hsl(122, 39%, 40%), hsl(122, 39%, 49%));--tbw-color-warning: light-dark(hsl(38, 92%, 50%), hsl(38, 92%, 50%));--tbw-color-error: light-dark(hsl(0, 65%, 51%), hsl(0, 65%, 55%));--tbw-color-danger: var(--tbw-color-error);--tbw-color-selection: light-dark(#fff7d6, #333333);--tbw-color-row-alt: var(--tbw-color-bg);--tbw-color-row-hover: light-dark(#f0f6ff, #1c1c1c);--tbw-color-header-bg: color-mix(in hsl, var(--tbw-color-panel-bg) 85%, var(--tbw-color-fg));--tbw-color-header-fg: color-mix(in hsl, var(--tbw-color-fg) 75%, var(--tbw-color-panel-bg));--tbw-color-border: light-dark(#d0d0d4, #454545);--tbw-color-border-strong: light-dark(#777777, #666666);--tbw-color-border-cell: var(--tbw-color-border);--tbw-color-border-header: var(--tbw-color-border);--tbw-color-shadow: light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3));--tbw-font-family: inherit;--tbw-font-size-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding-v: var(--tbw-spacing-xs);--tbw-cell-padding-h: var(--tbw-spacing-md);--tbw-cell-padding: var(--tbw-cell-padding-v) var(--tbw-cell-padding-h);--tbw-cell-padding-input: var(--tbw-spacing-xs) var(--tbw-spacing-sm);--tbw-row-height: 1.75em;--tbw-header-height: 1.875em;--tbw-cell-white-space: nowrap;--tbw-border-width: 1px;--tbw-border-style: solid;--tbw-border-input: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-strong);--tbw-border-header: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-header);--tbw-row-divider: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-cell);--tbw-row-hover-outline: 0;--tbw-color-active-row-bg: var(--tbw-color-selection);--tbw-active-row-outline: 0;--tbw-focus-outline-width: 2px;--tbw-focus-outline: var(--tbw-focus-outline-width) var(--tbw-border-style) var(--tbw-color-accent);--tbw-focus-outline-offset: -2px;--tbw-focus-background: rgba(from var(--tbw-color-accent) r g b / 12%);--tbw-range-border-color: var(--tbw-color-accent);--tbw-range-selection-bg: rgba(from var(--tbw-range-border-color) r g b / 12%);--tbw-resize-handle-width: var(--tbw-spacing-sm);--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-resize-indicator-width: 2px;--tbw-resize-indicator-color: var(--tbw-color-accent);--tbw-resize-indicator-opacity: .6;--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-animation-duration: .2s;--tbw-animation-easing: ease-out;--tbw-animation-enabled: 1;--tbw-row-change-duration: .5s;--tbw-row-insert-duration: .3s;--tbw-row-remove-duration: .2s;--tbw-row-change-color: rgba(from var(--tbw-color-accent) r g b / 25%);--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-sort-indicator-display: inline-flex;--tbw-sort-indicator-visibility: visible;--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-density-scale: 1;--tbw-shell-header-height: 2.75em;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: var(--tbw-font-size);--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 17.5em;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 2.5em;--tbw-tool-panel-transition: var(--tbw-animation-duration) var(--tbw-animation-easing);--tbw-toolbar-button-size: 2em;--tbw-toolbar-button-gap: var(--tbw-spacing-xs);--tbw-panel-padding: var(--tbw-spacing-lg);--tbw-panel-gap: var(--tbw-spacing-md);--tbw-menu-item-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-menu-item-gap: var(--tbw-spacing-md);--tbw-menu-min-width: 10rem;--tbw-button-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-button-padding-sm: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-input-height: var(--tbw-row-height);--tbw-input-padding: 0 var(--tbw-spacing-md);--tbw-detail-padding: var(--tbw-spacing-xl);--tbw-detail-max-height: 31.25rem;--tbw-indicator-size: var(--tbw-spacing-sm)}}", Zi = `/**
2709
+ const Ui = "@layer tbw-base{tbw-grid{.tbw-expanding{animation:tbw-expand var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}.tbw-collapsing{animation:tbw-collapse var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}&[data-animation-mode=off]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}tbw-grid .data-grid-row[data-animating=change]{animation:tbw-row-change var(--tbw-row-change-duration) ease-out}tbw-grid .data-grid-row[data-animating=insert]{animation:tbw-row-insert var(--tbw-row-insert-duration) ease-out;will-change:max-height,opacity}tbw-grid .data-grid-row[data-animating=remove]{animation:tbw-row-remove var(--tbw-row-remove-duration) ease-out forwards;will-change:max-height,opacity,transform;pointer-events:none}}@keyframes tbw-expand{0%{opacity:0;max-height:0;transform:translateY(-8px)}to{opacity:1;max-height:500px;transform:translateY(0)}}@keyframes tbw-collapse{0%{opacity:1;max-height:500px;transform:translateY(0)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-row-change{0%{background-color:transparent}20%{background-color:var(--tbw-row-change-color)}to{background-color:transparent}}@keyframes tbw-row-insert{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:var(--tbw-row-height, 28px);overflow:hidden}}@keyframes tbw-row-remove{0%{opacity:1;transform:translateY(0);max-height:var(--tbw-row-height, 28px)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-spin{to{transform:rotate(360deg)}}@keyframes tbw-fade-in{0%{opacity:0}to{opacity:1}}", Vi = '@layer tbw-base{tbw-grid{color-scheme:inherit;position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);font-feature-settings:"tnum","lnum";background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none;&,*{box-sizing:border-box}.tbw-grid-root{position:relative;display:flex;flex-direction:column;height:100%;&.has-shell{display:flex;flex-direction:column;height:100%}&:has(.selected){user-select:none}}.rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}.rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}.rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}.rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip;.rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}}.faux-vscroll{position:sticky;inset-inline-end:0;flex-shrink:0;width:auto;overflow-y:auto;overflow-x:hidden;z-index:var(--tbw-z-layer-header, 30)}.faux-vscroll-spacer{width:1px}&[data-has-focus]{.cell-focus,.row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}}.sticky-left,.sticky-right{position:sticky;z-index:25}.sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}.sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}}}', Bi = '@layer tbw-base{tbw-grid{.header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}.header-group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-header-bg);z-index:var(--tbw-z-layer-header, 30)}.header-group-cell{display:flex;align-items:center;justify-content:flex-start;padding:var(--tbw-cell-padding-header, 2px 8px);color:var(--tbw-color-header-group-fg, var(--tbw-color-header-fg));font-weight:var(--tbw-font-weight-header-group, var(--tbw-font-weight-header));justify-content:var(--tbw-align-header-group, var(--tbw-align-header, flex-start));&:not(:last-child){border-right:2px solid var(--tbw-color-border)}}.header-row{display:grid;grid-template-columns:var(--tbw-column-template);color:var(--tbw-color-header-fg);font-size:var(--tbw-font-size-header);min-height:var(--tbw-header-height);border-bottom:var(--tbw-border-header);z-index:var(--tbw-z-layer-header, 30);text-transform:var(--tbw-header-text-transform);letter-spacing:var(--tbw-header-letter-spacing);>.cell{display:flex;align-items:center;gap:4px;padding:var(--tbw-cell-padding-header, 2px 8px);background-color:var(--tbw-color-header-bg);font-weight:var(--tbw-font-weight-header);border-right:1px solid var(--tbw-color-border-cell);overflow:visible;min-width:0;>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:inherit}>span[part~=sort-indicator]{flex-shrink:0;opacity:.6;color:var(--tbw-sort-indicator-color);display:var(--tbw-sort-indicator-display, inline-flex);visibility:var(--tbw-sort-indicator-visibility, visible);transition:opacity .15s,visibility 0s,display 0s allow-discrete;transition-behavior:allow-discrete}&:hover>span[part~=sort-indicator]{display:inline-flex;visibility:visible}&[aria-sort=ascending]>span[part~=sort-indicator],&[aria-sort=descending]>span[part~=sort-indicator]{display:inline-flex;visibility:visible;opacity:1;color:var(--tbw-sort-indicator-active-color)}&:last-child{border-right:0;.resize-handle{right:0;width:calc(var(--tbw-resize-handle-width) / 2)}}&.grouped.group-end:not(:last-child){border-right:2px solid var(--tbw-color-border)}&.resizable{position:relative}&.sticky-left,&.sticky-right{background:var(--tbw-color-header-bg);z-index:35}}}.sortable{cursor:pointer;user-select:none}.resize-handle{position:absolute;top:0;right:calc(var(--tbw-resize-handle-width) / -2);width:var(--tbw-resize-handle-width);height:100%;cursor:e-resize;user-select:none;touch-action:none;z-index:20;background:var(--tbw-resize-handle-color);transition:background .12s ease;border-radius:var(--tbw-resize-handle-border-radius);&:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);width:var(--tbw-resize-indicator-width, 2px);height:0;background:var(--tbw-resize-indicator-color, var(--tbw-color-accent));opacity:0;pointer-events:none;transition:opacity .12s ease,height 0s .12s;z-index:1000}&:hover{background:var(--tbw-resize-handle-color-hover);&:after{height:100vh;opacity:var(--tbw-resize-indicator-opacity, .6);transition:opacity .12s ease,height 0s}}}}}', Gi = '@layer tbw-base{.tbw-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:1000;pointer-events:all;animation:tbw-fade-in .15s ease-out}.tbw-spinner{--tbw-spinner-size: 48px;--tbw-spinner-border-width: 3px;--tbw-spinner-color: var(--tbw-color-accent);--tbw-spinner-track-color: var(--tbw-color-border);width:var(--tbw-spinner-size);height:var(--tbw-spinner-size);border:var(--tbw-spinner-border-width) solid var(--tbw-spinner-track-color);border-top-color:var(--tbw-spinner-color);border-radius:50%;animation:tbw-spin .8s linear infinite}.tbw-spinner--large{--tbw-spinner-size: min(48px, calc(100% - 16px) )}.tbw-spinner--small{--tbw-spinner-size: calc(var(--tbw-row-height, 28px) * .6);--tbw-spinner-border-width: 2px}.data-grid-row.tbw-row-loading{position:relative;pointer-events:none}.tbw-row-loading-overlay{position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:26;animation:tbw-fade-in .15s ease-out;pointer-events:none;display:flex;align-items:center}.tbw-row-loading-spinner{--_spinner-size: calc(var(--tbw-row-height, 28px) * .6);margin-left:var(--tbw-spacing-md);width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite}.cell.tbw-cell-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:26;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .5);content:"";position:absolute;left:var(--tbw-spacing-sm);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:27}}}', Xi = "@layer tbw-base{@media(forced-colors:active){tbw-grid{--tbw-color-border: CanvasText;--tbw-color-border-strong: CanvasText;--tbw-color-border-cell: CanvasText;--tbw-color-border-header: CanvasText;--tbw-color-fg: CanvasText;--tbw-color-bg: Canvas;--tbw-color-panel-bg: Canvas;--tbw-color-header-bg: Canvas;--tbw-color-header-fg: CanvasText;--tbw-color-accent: Highlight;--tbw-color-accent-fg: HighlightText;--tbw-color-selection: Highlight;--tbw-color-row-hover: Highlight;--tbw-focus-outline: 2px solid Highlight;--tbw-range-border-color: Highlight;.cell:focus,.cell.active-cell{outline:2px solid Highlight!important;outline-offset:-2px}.data-grid-row[aria-selected=true]{background:Highlight!important;color:HighlightText!important}}}@media(prefers-reduced-motion:reduce){tbw-grid[data-animation-mode=reduced-motion]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}}", Yi = "@layer tbw-base{tbw-grid{.data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style;&:nth-child(2n){background:var(--tbw-color-row-alt)}&:hover{background:var(--tbw-color-row-hover)}>.cell{display:block;padding:var(--tbw-cell-padding, 2px 8px);border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height);align-content:center;border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0;white-space:var(--tbw-cell-white-space, nowrap);text-overflow:ellipsis;>*{overflow:hidden;text-overflow:ellipsis;white-space:inherit;min-width:0}&:last-child{border-right:0}&[data-type=boolean]{text-align:center;input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size);vertical-align:middle}}&.selected:focus-visible,&:focus-visible:not(.cell-focus){outline:none}&.sticky-left,&.sticky-right{background:var(--tbw-color-panel-bg)}}}.selecting .data-grid-row>.cell{user-select:none}}}", ji = "@layer tbw-base{tbw-grid{.tbw-shell-header{display:flex;align-items:center;gap:8px;min-height:var(--tbw-shell-header-height);padding:0 8px;background:var(--tbw-shell-header-bg);border-bottom:1px solid var(--tbw-shell-header-border);flex-shrink:0}.tbw-shell-title{font-size:var(--tbw-shell-title-font-size);font-weight:var(--tbw-shell-title-font-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}.tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}.tbw-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toolbar-button-size);height:var(--tbw-toolbar-button-size);padding:0;border:1px solid transparent;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg);cursor:pointer;font-size:16px;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease),border-color var(--tbw-transition-duration) var(--tbw-transition-ease);&:hover{background:var(--tbw-color-row-hover)}&:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}&.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}&:disabled{opacity:.5;cursor:not-allowed}}.tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}.tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}.tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}.tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden;overflow-anchor:none}}}", Ki = "@layer tbw-base{tbw-grid{.tbw-tool-panel{position:absolute;top:0;bottom:0;right:0;width:0;overflow:hidden;background:var(--tbw-tool-panel-bg);border-left:1px solid var(--tbw-tool-panel-border);transition:width var(--tbw-tool-panel-transition);display:flex;flex-direction:column;z-index:30;box-shadow:-2px 0 8px var(--tbw-color-shadow);&[data-position=left]{right:auto;left:0;border-left:none;border-right:1px solid var(--tbw-tool-panel-border);box-shadow:2px 0 8px var(--tbw-color-shadow)}&.open{width:var(--tbw-tool-panel-width)}}.tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease);&[data-handle-position=left]{left:0}&[data-handle-position=right]{right:0}&:hover,&.resizing{background:var(--tbw-color-accent)}}.tbw-tool-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:var(--tbw-tool-panel-header-height);padding:0 12px;border-bottom:1px solid var(--tbw-tool-panel-border);flex-shrink:0}.tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-tool-panel-close{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg-muted);cursor:pointer;font-size:14px;&:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}}.tbw-tool-panel-content{flex:1;overflow:auto}.tbw-accordion{display:flex;flex-direction:column;gap:0}.tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border);&:last-child{border-bottom:none}&.single .tbw-accordion-header{cursor:default;&:hover{background:transparent}}&.expanded{.tbw-accordion-chevron{transform:rotate(90deg)}.tbw-accordion-content{display:block}}}.tbw-accordion-header{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:none;background:transparent;color:var(--tbw-color-fg);font-size:13px;font-weight:600;text-align:start;cursor:pointer;user-select:none;&:hover{background:var(--tbw-color-row-hover)}}.tbw-accordion-chevron{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:10px;color:var(--tbw-color-fg-muted);transition:transform .15s ease;flex-shrink:0}.tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}.tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tbw-accordion-content{display:none}}}", Qi = "@layer tbw-base{tbw-grid{--tbw-base-icon-size: 1em;--tbw-base-radius: .25em;--tbw-font-size: 1em;--tbw-font-size-sm: .9285em;--tbw-font-size-xs: .7857em;--tbw-font-size-2xs: .7142em;--tbw-spacing-xs: .25em;--tbw-spacing-sm: .375em;--tbw-spacing-md: .5em;--tbw-spacing-lg: .75em;--tbw-spacing-xl: 1em;--tbw-icon-size: var(--tbw-base-icon-size);--tbw-icon-size-sm: .875em;--tbw-checkbox-size: var(--tbw-base-icon-size);--tbw-toggle-size: 1.25em;--tbw-border-radius: var(--tbw-base-radius);--tbw-color-bg: transparent;--tbw-color-panel-bg: light-dark(#eeeeee, #222222);--tbw-color-fg: light-dark(#222222, #eeeeee);--tbw-color-fg-muted: light-dark(#555555, #aaaaaa);--tbw-color-accent: light-dark(#3b82f6, #3b82f6);--tbw-color-accent-fg: light-dark(#ffffff, #000000);--tbw-color-success: light-dark(hsl(122, 39%, 40%), hsl(122, 39%, 49%));--tbw-color-warning: light-dark(hsl(38, 92%, 50%), hsl(38, 92%, 50%));--tbw-color-error: light-dark(hsl(0, 65%, 51%), hsl(0, 65%, 55%));--tbw-color-danger: var(--tbw-color-error);--tbw-color-selection: light-dark(#fff7d6, #333333);--tbw-color-row-alt: var(--tbw-color-bg);--tbw-color-row-hover: light-dark(#f0f6ff, #1c1c1c);--tbw-color-header-bg: color-mix(in hsl, var(--tbw-color-panel-bg) 85%, var(--tbw-color-fg));--tbw-color-header-fg: color-mix(in hsl, var(--tbw-color-fg) 75%, var(--tbw-color-panel-bg));--tbw-color-border: light-dark(#d0d0d4, #454545);--tbw-color-border-strong: light-dark(#777777, #666666);--tbw-color-border-cell: var(--tbw-color-border);--tbw-color-border-header: var(--tbw-color-border);--tbw-color-shadow: light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3));--tbw-font-family: inherit;--tbw-font-size-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding-v: var(--tbw-spacing-xs);--tbw-cell-padding-h: var(--tbw-spacing-md);--tbw-cell-padding: var(--tbw-cell-padding-v) var(--tbw-cell-padding-h);--tbw-cell-padding-input: var(--tbw-spacing-xs) var(--tbw-spacing-sm);--tbw-row-height: 1.75em;--tbw-header-height: 1.875em;--tbw-cell-white-space: nowrap;--tbw-border-width: 1px;--tbw-border-style: solid;--tbw-border-input: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-strong);--tbw-border-header: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-header);--tbw-row-divider: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-cell);--tbw-row-hover-outline: 0;--tbw-color-active-row-bg: var(--tbw-color-selection);--tbw-active-row-outline: 0;--tbw-focus-outline-width: 2px;--tbw-focus-outline: var(--tbw-focus-outline-width) var(--tbw-border-style) var(--tbw-color-accent);--tbw-focus-outline-offset: -2px;--tbw-focus-background: rgba(from var(--tbw-color-accent) r g b / 12%);--tbw-range-border-color: var(--tbw-color-accent);--tbw-range-selection-bg: rgba(from var(--tbw-range-border-color) r g b / 12%);--tbw-resize-handle-width: var(--tbw-spacing-sm);--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-resize-indicator-width: 2px;--tbw-resize-indicator-color: var(--tbw-color-accent);--tbw-resize-indicator-opacity: .6;--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-animation-duration: .2s;--tbw-animation-easing: ease-out;--tbw-animation-enabled: 1;--tbw-row-change-duration: .5s;--tbw-row-insert-duration: .3s;--tbw-row-remove-duration: .2s;--tbw-row-change-color: rgba(from var(--tbw-color-accent) r g b / 25%);--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-sort-indicator-display: inline-flex;--tbw-sort-indicator-visibility: visible;--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-density-scale: 1;--tbw-shell-header-height: 2.75em;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: var(--tbw-font-size);--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 17.5em;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 2.5em;--tbw-tool-panel-transition: var(--tbw-animation-duration) var(--tbw-animation-easing);--tbw-toolbar-button-size: 2em;--tbw-toolbar-button-gap: var(--tbw-spacing-xs);--tbw-panel-padding: var(--tbw-spacing-lg);--tbw-panel-gap: var(--tbw-spacing-md);--tbw-menu-item-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-menu-item-gap: var(--tbw-spacing-md);--tbw-menu-min-width: 10rem;--tbw-button-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-button-padding-sm: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-input-height: var(--tbw-row-height);--tbw-input-padding: 0 var(--tbw-spacing-md);--tbw-detail-padding: var(--tbw-spacing-xl);--tbw-detail-max-height: 31.25rem;--tbw-indicator-size: var(--tbw-spacing-sm)}}", Zi = `/**
2699
2710
  * tbw-grid Light DOM Styles
2700
2711
  *
2701
2712
  * This stylesheet uses CSS nesting to scope all styles to the tbw-grid element.
@@ -2726,7 +2737,7 @@ ${Xi}
2726
2737
  `;
2727
2738
  class k extends HTMLElement {
2728
2739
  static tagName = "tbw-grid";
2729
- static version = "1.14.0";
2740
+ static version = "1.14.1";
2730
2741
  static #l = 0;
2731
2742
  static adapters = [];
2732
2743
  static registerAdapter(e) {
@@ -2763,15 +2774,15 @@ class k extends HTMLElement {
2763
2774
  #C = 0;
2764
2775
  #r = null;
2765
2776
  #g = !1;
2766
- #T = !1;
2777
+ #x = !1;
2767
2778
  #m = 0;
2768
2779
  #z;
2769
- #k = yi();
2780
+ #N = yi();
2770
2781
  #b;
2771
2782
  #y;
2772
2783
  #p;
2773
- #E;
2774
- #Z = {
2784
+ #S;
2785
+ #J = {
2775
2786
  scrollTop: 0,
2776
2787
  scrollLeft: 0,
2777
2788
  scrollHeight: 0,
@@ -2781,19 +2792,19 @@ class k extends HTMLElement {
2781
2792
  };
2782
2793
  #e;
2783
2794
  #_;
2784
- #N = !1;
2795
+ #I = !1;
2785
2796
  #D;
2786
2797
  #V;
2787
2798
  #O;
2788
2799
  #t;
2789
2800
  #i = ai();
2790
2801
  #c;
2791
- #I;
2792
- #q = !1;
2793
- #x = /* @__PURE__ */ new Set();
2802
+ #q;
2803
+ #M = !1;
2804
+ #E = /* @__PURE__ */ new Set();
2794
2805
  #H = /* @__PURE__ */ new Map();
2795
2806
  #$;
2796
- #S = /* @__PURE__ */ new Map();
2807
+ #R = /* @__PURE__ */ new Map();
2797
2808
  _rows = [];
2798
2809
  #B = [];
2799
2810
  get _columns() {
@@ -2885,35 +2896,35 @@ class k extends HTMLElement {
2885
2896
  this.#t?.setFitMode(e), i !== e && this.#U("fitMode");
2886
2897
  }
2887
2898
  get loading() {
2888
- return this.#q;
2899
+ return this.#M;
2889
2900
  }
2890
2901
  set loading(e) {
2891
- const i = this.#q;
2892
- this.#q = e, e ? this.setAttribute("loading", "") : this.removeAttribute("loading"), i !== e && this.#Pe();
2902
+ const i = this.#M;
2903
+ this.#M = e, e ? this.setAttribute("loading", "") : this.removeAttribute("loading"), i !== e && this.#he();
2893
2904
  }
2894
2905
  setRowLoading(e, i) {
2895
- const o = this.#x.has(e);
2896
- i ? this.#x.add(e) : this.#x.delete(e), o !== i && this.#de(e, i);
2906
+ const o = this.#E.has(e);
2907
+ i ? this.#E.add(e) : this.#E.delete(e), o !== i && this.#j(e, i);
2897
2908
  }
2898
2909
  setCellLoading(e, i, o) {
2899
2910
  let n = this.#H.get(e);
2900
2911
  const r = n?.has(i) ?? !1;
2901
- o ? (n || (n = /* @__PURE__ */ new Set(), this.#H.set(e, n)), n.add(i)) : (n?.delete(i), n?.size === 0 && this.#H.delete(e)), r !== o && this.#he(e, i, o);
2912
+ o ? (n || (n = /* @__PURE__ */ new Set(), this.#H.set(e, n)), n.add(i)) : (n?.delete(i), n?.size === 0 && this.#H.delete(e)), r !== o && this.#ue(e, i, o);
2902
2913
  }
2903
2914
  isRowLoading(e) {
2904
- return this.#x.has(e);
2915
+ return this.#E.has(e);
2905
2916
  }
2906
2917
  isCellLoading(e, i) {
2907
2918
  return this.#H.get(e)?.has(i) ?? !1;
2908
2919
  }
2909
2920
  clearAllLoading() {
2910
2921
  this.loading = !1;
2911
- for (const e of this.#x)
2912
- this.#de(e, !1);
2913
- this.#x.clear();
2922
+ for (const e of this.#E)
2923
+ this.#j(e, !1);
2924
+ this.#E.clear();
2914
2925
  for (const [e, i] of this.#H)
2915
2926
  for (const o of i)
2916
- this.#he(e, o, !1);
2927
+ this.#ue(e, o, !1);
2917
2928
  this.#H.clear();
2918
2929
  }
2919
2930
  get effectiveConfig() {
@@ -2923,25 +2934,25 @@ class k extends HTMLElement {
2923
2934
  return this.#b || (this.#b = new AbortController()), this.#b.signal;
2924
2935
  }
2925
2936
  constructor() {
2926
- super(), this.#we(), this.#d = new Promise((e) => this.#h = e), this.#s = new Zt({
2937
+ super(), this.#be(), this.#d = new Promise((e) => this.#h = e), this.#s = new Zt({
2927
2938
  mergeConfig: () => {
2928
- this.#t.parseLightDomColumns(this), this.#t.merge(), this.#ee(), Pi(this.#o, this.#e?.getPlugins() ?? []), zi(this.#e?.getPlugins() ?? []), Oi(this.#e?.getPlugins() ?? []), this.#Le(), this.#B = [...this._columns];
2939
+ this.#t.parseLightDomColumns(this), this.#t.merge(), this.#te(), Pi(this.#o, this.#e?.getPlugins() ?? []), zi(this.#e?.getPlugins() ?? []), Oi(this.#e?.getPlugins() ?? []), this.#Pe(), this.#B = [...this._columns];
2929
2940
  },
2930
- processColumns: () => this.#Te(),
2931
- processRows: () => this.#xe(),
2941
+ processColumns: () => this.#xe(),
2942
+ processRows: () => this.#He(),
2932
2943
  renderHeader: () => ie(this),
2933
2944
  updateTemplate: () => U(this),
2934
2945
  renderVirtualWindow: () => this.refreshVirtualWindow(!0, !0),
2935
2946
  afterRender: () => {
2936
2947
  this.#e?.afterRender(), this._virtualization.enabled && this._virtualization.totalHeightEl && queueMicrotask(() => {
2937
2948
  if (!this._virtualization.totalHeightEl) return;
2938
- const i = this.#A(this._rows.length);
2949
+ const i = this.#T(this._rows.length);
2939
2950
  this._virtualization.totalHeightEl.style.height = `${i}px`;
2940
- }), this.#o.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, Se(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, q(this)), this._virtualization.enabled && !this.#F && this.#ve(), this.#T && (this.#T = !1, requestAnimationFrame(() => {
2951
+ }), this.#o.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, Se(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, q(this)), this._virtualization.enabled && !this.#F && this.#Ce(), this.#x && (this.#x = !1, requestAnimationFrame(() => {
2941
2952
  requestAnimationFrame(() => {
2942
- this.#me();
2953
+ this.#ve();
2943
2954
  });
2944
- }));
2955
+ })), this.#M && this.#he();
2945
2956
  },
2946
2957
  isConnected: () => this.isConnected && this.#f
2947
2958
  }), this.#s.setInitialReadyResolver(() => this.#h?.()), this.#c = gi(this.#i, {
@@ -2974,7 +2985,7 @@ class k extends HTMLElement {
2974
2985
  setRowHeight: (e) => {
2975
2986
  this._virtualization.rowHeight = e;
2976
2987
  },
2977
- applyAnimationConfig: (e) => this.#He(e),
2988
+ applyAnimationConfig: (e) => this.#Le(e),
2978
2989
  getShellLightDomTitle: () => this.#i.lightDomTitle,
2979
2990
  getShellToolPanels: () => this.#i.toolPanels,
2980
2991
  getShellHeaderContents: () => this.#i.headerContents,
@@ -2983,7 +2994,7 @@ class k extends HTMLElement {
2983
2994
  getShellHasToolButtonsContainer: () => this.#i.hasToolButtonsContainer
2984
2995
  });
2985
2996
  }
2986
- async #we() {
2997
+ async #be() {
2987
2998
  await Ci(Zi);
2988
2999
  }
2989
3000
  getPlugin(e) {
@@ -3007,7 +3018,7 @@ class k extends HTMLElement {
3007
3018
  requestAfterRender() {
3008
3019
  this.#s.requestPhase(x.STYLE, "plugin:requestAfterRender");
3009
3020
  }
3010
- #J() {
3021
+ #ee() {
3011
3022
  this.#e = new oe(this);
3012
3023
  const e = this.#o?.plugins, i = Array.isArray(e) ? e : [];
3013
3024
  this.#e.attachAll(i);
@@ -3016,7 +3027,7 @@ class k extends HTMLElement {
3016
3027
  const e = this.#e?.getPluginStyles() ?? [];
3017
3028
  mi(e);
3018
3029
  }
3019
- #ee() {
3030
+ #te() {
3020
3031
  const e = this.#o?.plugins, i = Array.isArray(e) ? e : [];
3021
3032
  if (this.#_ === i)
3022
3033
  return;
@@ -3036,17 +3047,17 @@ class k extends HTMLElement {
3036
3047
  const r = this.#i.headerContentCleanups.get(n);
3037
3048
  r && (r(), this.#i.headerContentCleanups.delete(n)), this.#i.headerContents.delete(n);
3038
3049
  }
3039
- this.#J(), this.#W(), this.#_ = i, this.#ne(), this.#te();
3050
+ this.#ee(), this.#W(), this.#_ = i, this.#re(), this.#ie();
3040
3051
  const o = this.#g;
3041
3052
  if (this.#g = this.#e?.getAll().some((n) => n.onScroll) ?? !1, !o && this.#g) {
3042
3053
  const r = this.#n.querySelector(".tbw-grid-content") ?? this.#n.querySelector(".tbw-grid-root");
3043
3054
  this.#G(r);
3044
3055
  }
3045
3056
  }
3046
- #be() {
3057
+ #me() {
3047
3058
  this.#e?.detachAll();
3048
3059
  }
3049
- #te() {
3060
+ #ie() {
3050
3061
  if (!this.#e) return;
3051
3062
  const e = this.#e.getToolPanels();
3052
3063
  for (const { panel: o } of e)
@@ -3055,7 +3066,7 @@ class k extends HTMLElement {
3055
3066
  for (const { content: o } of i)
3056
3067
  this.#i.headerContents.has(o.id) || this.#i.headerContents.set(o.id, o);
3057
3068
  }
3058
- #ie() {
3069
+ #oe() {
3059
3070
  const e = k.getAdapters();
3060
3071
  if (e.length === 0 && !this.__frameworkAdapter) return;
3061
3072
  const i = this.__frameworkAdapter;
@@ -3072,9 +3083,9 @@ class k extends HTMLElement {
3072
3083
  };
3073
3084
  }
3074
3085
  connectedCallback() {
3075
- this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", k.version), this.id || (this.id = `tbw-grid-${++k.#l}`), this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#b && (this.#b.abort(), this.#N = !1), this.#b = new AbortController(), this.#E && (ze(this.#E), this.#E = void 0), this.#M(), this.#t.parseLightDomColumns(this), this.#t.merge(), this.#J();
3086
+ this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", k.version), this.id || (this.id = `tbw-grid-${++k.#l}`), this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#b && (this.#b.abort(), this.#I = !1), this.#b = new AbortController(), this.#S && (ze(this.#S), this.#S = void 0), this.#k(), this.#t.parseLightDomColumns(this), this.#t.merge(), this.#ee();
3076
3087
  const e = this.#o?.plugins;
3077
- this.#_ = Array.isArray(e) ? e : [], this.#te(), this.#u || (this.#Q(), this.#W(), this.#u = !0), this.#oe(), this.#E = Vt(
3088
+ this.#_ = Array.isArray(e) ? e : [], this.#ie(), this.#u || (this.#Z(), this.#W(), this.#u = !0), this.#ne(), this.#S = Vt(
3078
3089
  () => {
3079
3090
  this.#Me();
3080
3091
  },
@@ -3082,7 +3093,7 @@ class k extends HTMLElement {
3082
3093
  );
3083
3094
  }
3084
3095
  disconnectedCallback() {
3085
- this.#E && (ze(this.#E), this.#E = void 0), this.#m && (clearTimeout(this.#m), this.#m = 0), this.#be(), fi(this.#i), this.#c.setInitialized(!1), this.#I?.(), this.#I = void 0, rt(this.#k), this.#b && (this.#b.abort(), this.#b = void 0), this.#D?.abort(), this.#D = void 0, this.#N = !1, this._resizeController && this._resizeController.dispose(), this.#y && (this.#y.disconnect(), this.#y = void 0), this.#p && (this.#p.disconnect(), this.#p = void 0, this.#F = !1), X(this), this.#R.clear(), this.#_ = void 0;
3096
+ this.#S && (ze(this.#S), this.#S = void 0), this.#m && (clearTimeout(this.#m), this.#m = 0), this.#me(), fi(this.#i), this.#c.setInitialized(!1), this.#q?.(), this.#q = void 0, rt(this.#N), this.#b && (this.#b.abort(), this.#b = void 0), this.#D?.abort(), this.#D = void 0, this.#I = !1, this._resizeController && this._resizeController.dispose(), this.#y && (this.#y.disconnect(), this.#y = void 0), this.#p && (this.#p.disconnect(), this.#p = void 0, this.#F = !1), X(this), this.#A.clear(), this.#_ = void 0;
3086
3097
  for (const e of this._rowPool)
3087
3098
  e.remove();
3088
3099
  this._rowPool.length = 0, this.__rowsBodyEl = null, this.#f = !1;
@@ -3103,24 +3114,24 @@ class k extends HTMLElement {
3103
3114
  }
3104
3115
  else e === "fit-mode" && (this.fitMode = o);
3105
3116
  }
3106
- #oe() {
3117
+ #ne() {
3107
3118
  const i = this.#n.querySelector(".tbw-grid-content") ?? this.#n.querySelector(".tbw-grid-root");
3108
3119
  if (this._headerRowEl = i?.querySelector(".header-row"), this._virtualization.totalHeightEl = i?.querySelector(".faux-vscroll-spacer"), this._virtualization.viewportEl = i?.querySelector(".rows-viewport"), this._bodyEl = i?.querySelector(".rows"), this.__rowsBodyEl = i?.querySelector(".rows-body"), this.#c.isInitialized) {
3109
3120
  fe(this.#n, this.#i), ce(this.#n, this.#o?.shell, this.#i);
3110
3121
  const n = this.#o?.shell?.toolPanel?.defaultOpen;
3111
3122
  n && this.#i.toolPanels.has(n) && (this.openToolPanel(), this.#i.expandedSections.add(n));
3112
3123
  }
3113
- if (this.setAttribute("data-upgraded", ""), this.#f = !0, this._resizeController = De(this), this.#P(), this.#G(i), this.#N)
3124
+ if (this.setAttribute("data-upgraded", ""), this.#f = !0, this._resizeController = De(this), this.#P(), this.#G(i), this.#I)
3114
3125
  return;
3115
- this.#N = !0;
3126
+ this.#I = !0;
3116
3127
  const o = this.disconnectSignal;
3117
- qt(this, this, this.#n, o), this.#ne(), queueMicrotask(() => this.#Ce()), this.#s.requestPhase(x.FULL, "afterConnect");
3128
+ qt(this, this, this.#n, o), this.#re(), queueMicrotask(() => this.#ye()), this.#s.requestPhase(x.FULL, "afterConnect");
3118
3129
  }
3119
- #ne() {
3130
+ #re() {
3120
3131
  const e = this.#o.rowHeight, i = this.#e.hasRowHeightPlugin();
3121
- typeof e == "function" || i ? this._virtualization.variableHeights || (this._virtualization.variableHeights = !0, this._virtualization.rowHeight = typeof e == "number" && e > 0 ? e : this._virtualization.rowHeight || 28, this.#K(), typeof e != "function" && (this.#T = !0)) : !i && typeof e != "function" && this._virtualization.variableHeights ? (this._virtualization.variableHeights = !1, this._virtualization.positionCache = null) : typeof e == "number" && e > 0 ? (this._virtualization.rowHeight = e, this._virtualization.variableHeights = !1) : requestAnimationFrame(() => this.#re());
3132
+ typeof e == "function" || i ? this._virtualization.variableHeights || (this._virtualization.variableHeights = !0, this._virtualization.rowHeight = typeof e == "number" && e > 0 ? e : this._virtualization.rowHeight || 28, this.#Q(), typeof e != "function" && (this.#x = !0)) : !i && typeof e != "function" && this._virtualization.variableHeights ? (this._virtualization.variableHeights = !1, this._virtualization.positionCache = null) : typeof e == "number" && e > 0 ? (this._virtualization.rowHeight = e, this._virtualization.variableHeights = !1) : requestAnimationFrame(() => this.#se());
3122
3133
  }
3123
- #re() {
3134
+ #se() {
3124
3135
  if (this.#e.hasExtraHeight())
3125
3136
  return;
3126
3137
  const e = this._bodyEl?.querySelector(".data-grid-row");
@@ -3134,7 +3145,7 @@ class k extends HTMLElement {
3134
3145
  const n = e.getBoundingClientRect(), r = Math.max(n.height, o);
3135
3146
  r > 0 && Math.abs(r - this._virtualization.rowHeight) > 1 && (this._virtualization.rowHeight = r, this.#s.requestPhase(x.VIRTUALIZATION, "measureRowHeight"));
3136
3147
  }
3137
- #me() {
3148
+ #ve() {
3138
3149
  const e = this._bodyEl?.querySelector(".data-grid-row");
3139
3150
  if (!e) return;
3140
3151
  const i = e.querySelectorAll(".cell");
@@ -3144,8 +3155,8 @@ class k extends HTMLElement {
3144
3155
  l > o && (o = l);
3145
3156
  });
3146
3157
  const n = e.getBoundingClientRect(), r = Math.max(n.height, o);
3147
- if (r > 0 && (Math.abs(r - this._virtualization.rowHeight) > 1 && (this._virtualization.rowHeight = r), this.#K(), this._virtualization.totalHeightEl)) {
3148
- const l = this.#A(this._rows.length);
3158
+ if (r > 0 && (Math.abs(r - this._virtualization.rowHeight) > 1 && (this._virtualization.rowHeight = r), this.#Q(), this._virtualization.totalHeightEl)) {
3159
+ const l = this.#T(this._rows.length);
3149
3160
  this._virtualization.totalHeightEl.style.height = `${l}px`;
3150
3161
  }
3151
3162
  }
@@ -3182,7 +3193,7 @@ class k extends HTMLElement {
3182
3193
  this.#V = r, this._virtualization.scrollAreaEl = r, r && this.#g && r.addEventListener(
3183
3194
  "scroll",
3184
3195
  () => {
3185
- const a = this.#Z;
3196
+ const a = this.#J;
3186
3197
  a.scrollTop = o.scrollTop, a.scrollLeft = r.scrollLeft, a.scrollHeight = o.scrollHeight, a.scrollWidth = r.scrollWidth, a.clientHeight = o.clientHeight, a.clientWidth = r.clientWidth, this.#e?.onScroll(a);
3187
3198
  },
3188
3199
  { passive: !0, signal: i }
@@ -3203,7 +3214,7 @@ class k extends HTMLElement {
3203
3214
  { passive: !1, signal: i }
3204
3215
  ), Ti(
3205
3216
  s,
3206
- this.#k,
3217
+ this.#N,
3207
3218
  { fauxScrollbar: o, scrollArea: l },
3208
3219
  i
3209
3220
  ));
@@ -3226,11 +3237,11 @@ class k extends HTMLElement {
3226
3237
  );
3227
3238
  }
3228
3239
  #F = !1;
3229
- #ve() {
3240
+ #Ce() {
3230
3241
  if (this.#F) return;
3231
3242
  const e = this._bodyEl?.querySelector(".data-grid-row");
3232
3243
  e && (this.#F = !0, this.#p?.disconnect(), this.#p = new ResizeObserver(() => {
3233
- this.#re();
3244
+ this.#se();
3234
3245
  }), this.#p.observe(e));
3235
3246
  }
3236
3247
  addEventListener(e, i, o) {
@@ -3242,7 +3253,7 @@ class k extends HTMLElement {
3242
3253
  #L(e, i) {
3243
3254
  this.dispatchEvent(new CustomEvent(e, { detail: i, bubbles: !0, composed: !0 }));
3244
3255
  }
3245
- #Ce() {
3256
+ #ye() {
3246
3257
  this._bodyEl?.querySelectorAll(".data-grid-row")?.forEach((i, o) => {
3247
3258
  const n = o === this._focusRow;
3248
3259
  i.setAttribute("aria-selected", String(n)), i.querySelectorAll(".cell").forEach((r, s) => {
@@ -3251,9 +3262,9 @@ class k extends HTMLElement {
3251
3262
  });
3252
3263
  }
3253
3264
  #U(e) {
3254
- this.#v[e] = !0, !this.#w && (this.#w = !0, queueMicrotask(() => this.#ye()));
3265
+ this.#v[e] = !0, !this.#w && (this.#w = !0, queueMicrotask(() => this.#_e()));
3255
3266
  }
3256
- #ye() {
3267
+ #_e() {
3257
3268
  if (!this.#w || !this.#f) {
3258
3269
  this.#w = !1;
3259
3270
  return;
@@ -3265,64 +3276,64 @@ class k extends HTMLElement {
3265
3276
  gridConfig: !1,
3266
3277
  fitMode: !1
3267
3278
  }, e.gridConfig) {
3268
- this.#Re(), e.rows && this.#se();
3279
+ this.#Ae(), e.rows && this.#le();
3269
3280
  return;
3270
3281
  }
3271
- e.columns && this.#Ee(), e.rows && this.#se(), e.fitMode && this.#Se();
3282
+ e.columns && this.#Se(), e.rows && this.#le(), e.fitMode && this.#Re();
3272
3283
  }
3273
- #se() {
3284
+ #le() {
3274
3285
  this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#X(), this.#s.requestPhase(x.ROWS, "applyRowsUpdate");
3275
3286
  }
3276
3287
  #X() {
3277
- this.#S.clear();
3288
+ this.#R.clear();
3278
3289
  const e = this.#o.getRowId;
3279
3290
  this._rows.forEach((i, o) => {
3280
- const n = this.#le(i, e);
3281
- n !== void 0 && this.#S.set(n, { row: i, index: o });
3291
+ const n = this.#ae(i, e);
3292
+ n !== void 0 && this.#R.set(n, { row: i, index: o });
3282
3293
  });
3283
3294
  }
3284
- #le(e, i) {
3295
+ #ae(e, i) {
3285
3296
  if (i)
3286
3297
  return i(e);
3287
3298
  const o = e;
3288
3299
  if ("id" in o && o.id != null) return String(o.id);
3289
3300
  if ("_id" in o && o._id != null) return String(o._id);
3290
3301
  }
3291
- #_e(e, i) {
3292
- const o = this.#le(e, i);
3302
+ #Ee(e, i) {
3303
+ const o = this.#ae(e, i);
3293
3304
  if (o === void 0)
3294
3305
  throw new Error(
3295
3306
  '[tbw-grid] Cannot determine row ID. Configure getRowId in gridConfig or ensure rows have an "id" property.'
3296
3307
  );
3297
3308
  return o;
3298
3309
  }
3299
- #Ee() {
3310
+ #Se() {
3300
3311
  X(this), this.#t.merge(), this.#P();
3301
3312
  }
3302
- #Se() {
3313
+ #Re() {
3303
3314
  this.#t.merge(), this.#o.fitMode === "fixed" ? (this.__didInitialAutoSize = !1, Se(this)) : (this._columns.forEach((i) => {
3304
3315
  !i.__userResized && i.__autoSized && delete i.width;
3305
3316
  }), U(this));
3306
3317
  }
3307
- #Re() {
3318
+ #Ae() {
3308
3319
  Me(this, this.#i), ke(this, this.#i);
3309
3320
  const e = !!this.#n.querySelector(".has-shell"), i = !!this.#n.querySelector(".tbw-tool-panel"), o = this.#n.querySelectorAll(".tbw-accordion-section").length;
3310
- this.#t.parseLightDomColumns(this), this.#t.merge(), this.#ee(), Ne(this, this.#i, this.#ie()), this.#t.markSourcesChanged(), this.#t.merge();
3321
+ this.#t.parseLightDomColumns(this), this.#t.merge(), this.#te(), Ne(this, this.#i, this.#oe()), this.#t.markSourcesChanged(), this.#t.merge();
3311
3322
  const n = nt(this.#o?.shell), r = (this.#o?.shell?.toolPanels?.length ?? 0) > 0, s = this.#o?.shell?.toolPanels?.length ?? 0;
3312
3323
  if (e !== n || !i && r || i && s !== o) {
3313
- de(this.#i), this.#Q(), this.#W(), this.#oe(), this.#X();
3324
+ de(this.#i), this.#Z(), this.#W(), this.#ne(), this.#X();
3314
3325
  return;
3315
3326
  }
3316
- e && this.#Ae(), this.#X(), this.#s.requestPhase(x.COLUMNS, "applyGridConfigUpdate");
3327
+ e && this.#Te(), this.#X(), this.#s.requestPhase(x.COLUMNS, "applyGridConfigUpdate");
3317
3328
  }
3318
- #Ae() {
3329
+ #Te() {
3319
3330
  const e = this.#n.querySelector(".tbw-shell-header");
3320
3331
  if (!e) return;
3321
3332
  const i = this.#o.shell?.header?.title ?? this.#i.lightDomTitle;
3322
3333
  let o = e.querySelector(".tbw-shell-title");
3323
3334
  i ? (o || (o = document.createElement("h2"), o.className = "tbw-shell-title", o.setAttribute("part", "shell-title"), e.insertBefore(o, e.firstChild)), o.textContent = i) : o && o.remove();
3324
3335
  }
3325
- #Te() {
3336
+ #xe() {
3326
3337
  if (this.#e) {
3327
3338
  const e = this.#B.length > 0 ? this.#B : this._columns, i = e.filter((r) => !r.hidden), o = e.filter((r) => r.hidden), n = this.#e.processColumns([...i]);
3328
3339
  if (n !== i) {
@@ -3332,12 +3343,12 @@ class k extends HTMLElement {
3332
3343
  this._columns = [...e];
3333
3344
  }
3334
3345
  }
3335
- #xe() {
3346
+ #He() {
3336
3347
  X(this);
3337
3348
  const e = Array.isArray(this.#a) ? [...this.#a] : [], i = this.#e?.processRows(e) ?? e;
3338
- this._rows = i, this._virtualization.variableHeights && this.#K();
3349
+ this._rows = i, this._virtualization.variableHeights && this.#Q();
3339
3350
  }
3340
- #He(e) {
3351
+ #Le(e) {
3341
3352
  const i = {
3342
3353
  ...ht,
3343
3354
  ...e.animation
@@ -3346,27 +3357,29 @@ class k extends HTMLElement {
3346
3357
  o === !1 || o === "off" ? n = 0 : (o === !0 || o === "on") && (n = 1), this.style.setProperty("--tbw-animation-duration", `${i.duration}ms`), this.style.setProperty("--tbw-animation-easing", i.easing ?? "ease-out"), this.style.setProperty("--tbw-animation-enabled", String(n)), this.dataset.animationMode = typeof o == "boolean" ? o ? "on" : "off" : o;
3347
3358
  }
3348
3359
  #Y(e, i, o = this.__rowRenderEpoch) {
3349
- this.#z || (this.#z = (n, r, s) => this.#e?.renderRow(n, r, s) ?? !1), zt(this, e, i, o, this.#z);
3350
- }
3351
- #ae = lt();
3352
- #ce(e, i) {
3353
- at(this.#ae, this.__rowsBodyEl, this._bodyEl, e, i);
3360
+ if (this.#z || (this.#z = (n, r, s) => this.#e?.renderRow(n, r, s) ?? !1), zt(this, e, i, o, this.#z), this.#E.size > 0)
3361
+ for (const n of this.#E)
3362
+ this.#j(n, !0);
3354
3363
  }
3355
- #Le() {
3356
- dt(this.#ae, this.__rowsBodyEl, this.#o, this.#i);
3364
+ #ce = lt();
3365
+ #de(e, i) {
3366
+ at(this.#ce, this.__rowsBodyEl, this._bodyEl, e, i);
3357
3367
  }
3358
3368
  #Pe() {
3369
+ dt(this.#ce, this.__rowsBodyEl, this.#o, this.#i);
3370
+ }
3371
+ #he() {
3359
3372
  const e = this.querySelector(".tbw-grid-root");
3360
- e && (this.#q ? (this.#$ || (this.#$ = Xt(this.#o?.loadingRenderer)), Yt(e, this.#$)) : jt(this.#$));
3373
+ e && (this.#M ? (this.#$ || (this.#$ = Xt(this.#o?.loadingRenderer)), Yt(e, this.#$)) : jt(this.#$));
3361
3374
  }
3362
- #de(e, i) {
3363
- const o = this.#S.get(e);
3375
+ #j(e, i) {
3376
+ const o = this.#R.get(e);
3364
3377
  if (!o) return;
3365
3378
  const n = this.findRenderedRowElement?.(o.index);
3366
3379
  n && Kt(n, i);
3367
3380
  }
3368
- #he(e, i, o) {
3369
- const n = this.#S.get(e);
3381
+ #ue(e, i, o) {
3382
+ const n = this.#R.get(e);
3370
3383
  if (!n) return;
3371
3384
  const r = this.findRenderedRowElement?.(n.index);
3372
3385
  if (!r) return;
@@ -3393,9 +3406,9 @@ class k extends HTMLElement {
3393
3406
  i = c?.scrollLeft ?? 0, o = a?.scrollHeight ?? 0, n = c?.scrollWidth ?? 0, r = a?.clientHeight ?? 0, s = c?.clientWidth ?? 0;
3394
3407
  }
3395
3408
  if (this.refreshVirtualWindow(!1) && this.#e?.onScrollRender(), this._virtualization.variableHeights && (this.#m && clearTimeout(this.#m), this.#m = window.setTimeout(() => {
3396
- this.#m = 0, this.#ge(this._virtualization.start, this._virtualization.end);
3409
+ this.#m = 0, this.#pe(this._virtualization.start, this._virtualization.end);
3397
3410
  }, 100)), this.#g) {
3398
- const a = this.#Z;
3411
+ const a = this.#J;
3399
3412
  a.scrollTop = e, a.scrollLeft = i, a.scrollHeight = o, a.scrollWidth = n, a.clientHeight = r, a.clientWidth = s, this.#e?.onScroll(a);
3400
3413
  }
3401
3414
  }
@@ -3504,13 +3517,13 @@ class k extends HTMLElement {
3504
3517
  return Object.freeze({ ...this.#o || {} });
3505
3518
  }
3506
3519
  getRowId(e) {
3507
- return this.#_e(e, this.#o.getRowId);
3520
+ return this.#Ee(e, this.#o.getRowId);
3508
3521
  }
3509
3522
  getRow(e) {
3510
- return this.#S.get(e)?.row;
3523
+ return this.#R.get(e)?.row;
3511
3524
  }
3512
3525
  updateRow(e, i, o = "api") {
3513
- const n = this.#S.get(e);
3526
+ const n = this.#R.get(e);
3514
3527
  if (!n)
3515
3528
  throw new Error(
3516
3529
  `[tbw-grid] Row with ID "${e}" not found. Ensure the row exists and getRowId is correctly configured.`
@@ -3536,7 +3549,7 @@ class k extends HTMLElement {
3536
3549
  updateRows(e, i = "api") {
3537
3550
  let o = !1;
3538
3551
  for (const { id: n, changes: r } of e) {
3539
- const s = this.#S.get(n);
3552
+ const s = this.#R.get(n);
3540
3553
  if (!s)
3541
3554
  throw new Error(
3542
3555
  `[tbw-grid] Row with ID "${n}" not found. Ensure the row exists and getRowId is correctly configured.`
@@ -3661,10 +3674,10 @@ class k extends HTMLElement {
3661
3674
  unregisterToolbarContent(e) {
3662
3675
  this.#c.unregisterToolbarContent(e);
3663
3676
  }
3664
- #j = !1;
3677
+ #K = !1;
3665
3678
  refreshShellHeader() {
3666
- this.#j || (this.#j = !0, queueMicrotask(() => {
3667
- this.#j = !1, this.isConnected && (this.#M(), this.#t.markSourcesChanged(), this.#t.merge(), de(this.#i), this.#Q(), this.#W(), this.#Oe());
3679
+ this.#K || (this.#K = !0, queueMicrotask(() => {
3680
+ this.#K = !1, this.isConnected && (this.#k(), this.#t.markSourcesChanged(), this.#t.merge(), de(this.#i), this.#Z(), this.#W(), this.#Oe());
3668
3681
  }));
3669
3682
  }
3670
3683
  #Oe() {
@@ -3676,27 +3689,27 @@ class k extends HTMLElement {
3676
3689
  }
3677
3690
  this._resizeController = De(this), this.#G(i), this.#s.requestPhase(x.COLUMNS, "shellRefresh");
3678
3691
  }
3679
- #R = /* @__PURE__ */ new Map();
3692
+ #A = /* @__PURE__ */ new Map();
3680
3693
  registerStyles(e, i) {
3681
- let o = this.#R.get(e);
3682
- o || (o = new CSSStyleSheet(), this.#R.set(e, o)), o.replaceSync(i), this.#ue();
3694
+ let o = this.#A.get(e);
3695
+ o || (o = new CSSStyleSheet(), this.#A.set(e, o)), o.replaceSync(i), this.#fe();
3683
3696
  }
3684
3697
  unregisterStyles(e) {
3685
- this.#R.delete(e) && this.#ue();
3698
+ this.#A.delete(e) && this.#fe();
3686
3699
  }
3687
3700
  getRegisteredStyles() {
3688
- return Array.from(this.#R.keys());
3701
+ return Array.from(this.#A.keys());
3689
3702
  }
3690
- #ue() {
3691
- const e = Array.from(this.#R.values()), i = document.adoptedStyleSheets.filter(
3692
- (o) => !Array.from(this.#R.values()).includes(o)
3703
+ #fe() {
3704
+ const e = Array.from(this.#A.values()), i = document.adoptedStyleSheets.filter(
3705
+ (o) => !Array.from(this.#A.values()).includes(o)
3693
3706
  );
3694
3707
  document.adoptedStyleSheets = [...i, ...e];
3695
3708
  }
3696
- #M() {
3697
- Me(this, this.#i), ke(this, this.#i), Ne(this, this.#i, this.#ie());
3709
+ #k() {
3710
+ Me(this, this.#i), ke(this, this.#i), Ne(this, this.#i, this.#oe());
3698
3711
  }
3699
- #fe() {
3712
+ #ge() {
3700
3713
  const e = this.#n.querySelector(".tbw-shell-header");
3701
3714
  if (!e) return;
3702
3715
  de(this.#i);
@@ -3707,14 +3720,14 @@ class k extends HTMLElement {
3707
3720
  ), o = document.createElement("div");
3708
3721
  o.innerHTML = i;
3709
3722
  const n = o.firstElementChild;
3710
- n && (e.replaceWith(n), this.#pe(), ce(this.#n, this.#o?.shell, this.#i));
3723
+ n && (e.replaceWith(n), this.#we(), ce(this.#n, this.#o?.shell, this.#i));
3711
3724
  }
3712
3725
  #Me() {
3713
3726
  const e = () => {
3714
3727
  const o = this.#i.lightDomTitle, n = this.#i.hasToolButtonsContainer;
3715
- this.#M();
3728
+ this.#k();
3716
3729
  const r = this.#i.lightDomTitle, s = this.#i.hasToolButtonsContainer;
3717
- (r && !o || s && !n) && (this.#t.markSourcesChanged(), this.#t.merge(), this.#fe());
3730
+ (r && !o || s && !n) && (this.#t.markSourcesChanged(), this.#t.merge(), this.#ge());
3718
3731
  }, i = () => {
3719
3732
  this.__lightDomColumnsCache = void 0, this.#P();
3720
3733
  };
@@ -3723,9 +3736,9 @@ class k extends HTMLElement {
3723
3736
  refreshColumns() {
3724
3737
  this.__lightDomColumnsCache = void 0, X(this), this.#t.parseLightDomColumns(this);
3725
3738
  const e = this.#i.lightDomTitle, i = this.#i.hasToolButtonsContainer;
3726
- this.#M();
3739
+ this.#k();
3727
3740
  const o = this.#i.lightDomTitle, n = this.#i.hasToolButtonsContainer;
3728
- (o && !e || n && !i) && (this.#t.markSourcesChanged(), this.#t.merge(), this.#fe()), this.#s.requestPhase(x.COLUMNS, "refreshColumns");
3741
+ (o && !e || n && !i) && (this.#t.markSourcesChanged(), this.#t.merge(), this.#ge()), this.#s.requestPhase(x.COLUMNS, "refreshColumns");
3729
3742
  }
3730
3743
  #ke() {
3731
3744
  const e = this._virtualization.container, i = this._virtualization.viewportEl ?? e;
@@ -3733,7 +3746,7 @@ class k extends HTMLElement {
3733
3746
  const o = this._virtualization.scrollAreaEl;
3734
3747
  o && (this._virtualization.cachedScrollAreaHeight = o.clientHeight);
3735
3748
  }
3736
- #A(e, i = !1) {
3749
+ #T(e, i = !1) {
3737
3750
  const o = this._virtualization;
3738
3751
  let n, r, s;
3739
3752
  if (i) {
@@ -3745,7 +3758,7 @@ class k extends HTMLElement {
3745
3758
  let c, d = 0;
3746
3759
  return o.variableHeights && o.positionCache ? c = Ii(o.positionCache) : (c = e * o.rowHeight, d = this.#e?.getExtraHeight() ?? 0), c + l + d + a;
3747
3760
  }
3748
- #K() {
3761
+ #Q() {
3749
3762
  if (!this._virtualization.variableHeights) return;
3750
3763
  const e = this._rows, i = this._virtualization.rowHeight || 28, o = this.#o.rowHeight, n = this.#o.getRowId, r = n ? (l) => n(l) : void 0;
3751
3764
  this._virtualization.positionCache = Ni(
@@ -3777,11 +3790,11 @@ class k extends HTMLElement {
3777
3790
  r === void 0 && (r = this.#e?.getRowHeight?.(n, e)), r === void 0 && (r = this._virtualization.rowHeight);
3778
3791
  const s = o[e];
3779
3792
  if (!(!s || Math.abs(s.height - r) < 1) && (be(o, e, r), this._virtualization.totalHeightEl)) {
3780
- const l = this.#A(this._rows.length);
3793
+ const l = this.#T(this._rows.length);
3781
3794
  this._virtualization.totalHeightEl.style.height = `${l}px`;
3782
3795
  }
3783
3796
  }
3784
- #ge(e, i) {
3797
+ #pe(e, i) {
3785
3798
  if (!this._virtualization.variableHeights || !this._virtualization.positionCache || !this._bodyEl) return;
3786
3799
  const o = this._bodyEl.querySelectorAll(".data-grid-row"), n = this.#o.getRowId, r = Wi(
3787
3800
  {
@@ -3797,7 +3810,7 @@ class k extends HTMLElement {
3797
3810
  o
3798
3811
  );
3799
3812
  if (r.hasChanges && (this._virtualization.measuredCount = r.measuredCount, this._virtualization.averageHeight = r.averageHeight, this._virtualization.totalHeightEl)) {
3800
- const s = this.#A(this._rows.length);
3813
+ const s = this.#T(this._rows.length);
3801
3814
  this._virtualization.totalHeightEl.style.height = `${s}px`;
3802
3815
  }
3803
3816
  }
@@ -3807,7 +3820,7 @@ class k extends HTMLElement {
3807
3820
  if (!this._virtualization.enabled)
3808
3821
  return this.#Y(0, o), i || this.#e?.afterRender(), !0;
3809
3822
  if (this._rows.length <= this._virtualization.bypassThreshold)
3810
- return this._virtualization.start = 0, this._virtualization.end = o, e && (this._bodyEl.style.transform = "translateY(0px)"), this.#Y(0, o, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), e && this._virtualization.totalHeightEl && (this._virtualization.totalHeightEl.style.height = `${this.#A(o, !0)}px`), this.#ce(o, this._visibleColumns.length), i || this.#e?.afterRender(), !0;
3823
+ return this._virtualization.start = 0, this._virtualization.end = o, e && (this._bodyEl.style.transform = "translateY(0px)"), this.#Y(0, o, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), e && this._virtualization.totalHeightEl && (this._virtualization.totalHeightEl.style.height = `${this.#T(o, !0)}px`), this.#de(o, this._visibleColumns.length), i || this.#e?.afterRender(), !0;
3811
3824
  const n = this._virtualization.container ?? this, r = this._virtualization.viewportEl ?? n, s = e ? this._virtualization.cachedViewportHeight = r.clientHeight : this._virtualization.cachedViewportHeight || (this._virtualization.cachedViewportHeight = r.clientHeight), l = this._virtualization.rowHeight, a = n.scrollTop;
3812
3825
  let c;
3813
3826
  const d = this._virtualization.positionCache;
@@ -3851,7 +3864,7 @@ class k extends HTMLElement {
3851
3864
  if (h === 0 && s > 0)
3852
3865
  return this.#s.requestPhase(x.VIRTUALIZATION, "stale-refs-retry"), !1;
3853
3866
  if (e && this._virtualization.totalHeightEl) {
3854
- const m = this.#A(o);
3867
+ const m = this.#T(o);
3855
3868
  this._virtualization.totalHeightEl.style.height = `${m}px`;
3856
3869
  }
3857
3870
  let w;
@@ -3862,27 +3875,27 @@ class k extends HTMLElement {
3862
3875
  w = c * l + m;
3863
3876
  }
3864
3877
  const C = -(a - w);
3865
- return this._bodyEl.style.transform = `translateY(${C}px)`, this.#Y(c, u, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), e && this._virtualization.variableHeights && this.#ge(c, u), this.#ce(o, this._visibleColumns.length), e && !i && (this.#e?.afterRender(), queueMicrotask(() => {
3878
+ return this._bodyEl.style.transform = `translateY(${C}px)`, this.#Y(c, u, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), e && this._virtualization.variableHeights && this.#pe(c, u), this.#de(o, this._visibleColumns.length), e && !i && (this.#e?.afterRender(), queueMicrotask(() => {
3866
3879
  if (!this._virtualization.totalHeightEl) return;
3867
- const m = this.#A(o);
3880
+ const m = this.#T(o);
3868
3881
  this._virtualization.cachedFauxHeight === 0 && this._virtualization.cachedViewportHeight > 0 || (this._virtualization.totalHeightEl.style.height = `${m}px`);
3869
3882
  })), !0;
3870
3883
  }
3871
- #Q() {
3872
- this.#M(), this.#t.markSourcesChanged(), this.#t.merge();
3884
+ #Z() {
3885
+ this.#k(), this.#t.markSourcesChanged(), this.#t.merge();
3873
3886
  const e = this.#o?.shell;
3874
3887
  wi(
3875
3888
  this.#n,
3876
3889
  e,
3877
3890
  { isPanelOpen: this.#i.isPanelOpen, expandedSections: this.#i.expandedSections },
3878
3891
  this.#o?.icons
3879
- ) && (this.#pe(), this.#c.setInitialized(!0));
3892
+ ) && (this.#we(), this.#c.setInitialized(!0));
3880
3893
  }
3881
- #pe() {
3894
+ #we() {
3882
3895
  di(this.#n, this.#o?.shell, this.#i, {
3883
3896
  onPanelToggle: () => this.toggleToolPanel(),
3884
3897
  onSectionToggle: (e) => this.toggleToolPanelSection(e)
3885
- }), this.#I?.(), this.#I = hi(this.#n, this.#o?.shell, (e) => {
3898
+ }), this.#q?.(), this.#q = hi(this.#n, this.#o?.shell, (e) => {
3886
3899
  this.style.setProperty("--tbw-tool-panel-width", `${e}px`);
3887
3900
  });
3888
3901
  }
@@ -3896,7 +3909,7 @@ const oo = {
3896
3909
  class no {
3897
3910
  static dependencies;
3898
3911
  static manifest;
3899
- version = "1.14.0";
3912
+ version = "1.14.1";
3900
3913
  styles;
3901
3914
  cellRenderers;
3902
3915
  headerRenderers;