@mintplayer/web-components 2.20.0 → 2.21.0

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.
@@ -6,31 +6,32 @@ import "./pagination-Bcz1TwlS.mjs";
6
6
  import { LitElement as s, nothing as c, render as l, unsafeCSS as u } from "lit";
7
7
  import { repeat as d } from "lit/directives/repeat.js";
8
8
  import { styleMap as f } from "lit/directives/style-map.js";
9
- import { live as p } from "lit/directives/live.js";
10
- import { classMap as m } from "lit/directives/class-map.js";
9
+ import { SupersedingRequest as p, isAbortError as m } from "@mintplayer/ui-core/async";
10
+ import { live as h } from "lit/directives/live.js";
11
+ import { classMap as g } from "lit/directives/class-map.js";
11
12
  //#region libs/mintplayer-web-components/datatable/src/types/labels.ts
12
- var h = {
13
+ var _ = {
13
14
  eq: "equals",
14
15
  neq: "does not equal",
15
16
  lt: "is less than",
16
17
  lte: "is at most",
17
18
  gt: "is greater than",
18
19
  gte: "is at least"
19
- }, g = {
20
+ }, v = {
20
21
  eq: "=",
21
22
  neq: "≠",
22
23
  lt: "<",
23
24
  lte: "≤",
24
25
  gt: ">",
25
26
  gte: "≥"
26
- }, _ = [
27
+ }, y = [
27
28
  "eq",
28
29
  "neq",
29
30
  "lt",
30
31
  "lte",
31
32
  "gt",
32
33
  "gte"
33
- ], v = {
34
+ ], b = {
34
35
  treeChevronColumn: "Expand or collapse",
35
36
  deselectAll: "Deselect all",
36
37
  selectAll: "Select all",
@@ -66,17 +67,17 @@ var h = {
66
67
  announceFilter: (e, t) => t === 0 ? `Filter cleared on ${e}` : t === 1 ? `1 value selected in ${e}` : `${t} values selected in ${e}`,
67
68
  filterOperator: "Comparison",
68
69
  filterOperand: "Value to compare with",
69
- filterOperatorLabel: (e) => h[e],
70
+ filterOperatorLabel: (e) => _[e],
70
71
  announceComparisonFilter: (e, t, n) => n === "" ? `Filter cleared on ${e}` : `${e} ${t} ${n}`,
71
72
  announceSorted: (e, t) => t === "none" ? `Sorting removed from ${e}` : `Sorted by ${e}, ${t}`,
72
73
  announcePage: (e, t) => `Page ${e} of ${t}`,
73
74
  announceSelection: (e) => e === 1 ? "1 row selected" : `${e} rows selected`,
74
75
  announceLoaded: (e) => e === 1 ? "Loaded 1 row" : `Loaded ${e} rows`,
75
76
  rangeIncomplete: "Range not selected: some rows in it have not loaded yet"
76
- }, y = u("@charset \"UTF-8\";\nmp-datatable {\n display: block;\n width: 100%;\n position: relative;\n --mp-datatable-border-color: var(--bs-border-color, rgba(0, 0, 0, 0.125));\n --mp-datatable-row-hover-bg: var(--bs-table-hover-bg, rgba(var(--bs-emphasis-color-rgb), 0.04));\n --mp-datatable-row-selected-bg: var(--bs-list-group-active-bg, var(--bs-primary, #0d6efd));\n --mp-datatable-row-selected-color: var(--bs-list-group-active-color, #fff);\n --mp-datatable-cut-opacity: 0.55;\n --mp-datatable-resize-handle-color: var(--bs-primary, #0d6efd);\n}\n\n[data-mps=datatable] {\n box-sizing: border-box;\n}\n\n.datatable-shell[data-mps=datatable] {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n}\n\n.datatable-scroll[data-mps=datatable] {\n overflow: auto;\n flex: 1 1 auto;\n}\n\n.datatable-scroll.datatable-virtual[data-mps=datatable] {\n max-height: var(--mp-datatable-virtual-max-height, 480px);\n}\n.datatable-scroll.datatable-virtual[data-mps=datatable] thead[data-mps=datatable] th[data-mps=datatable] {\n position: sticky;\n top: 0;\n z-index: 1;\n background-color: var(--bs-body-bg, #fff);\n}\n.datatable-scroll.datatable-virtual[data-mps=datatable] thead[data-mps=datatable] th[data-sortable=true]:hover[data-mps=datatable] {\n background-color: var(--bs-body-bg, #fff);\n background-image: linear-gradient(var(--mp-datatable-row-hover-bg), var(--mp-datatable-row-hover-bg));\n}\n.datatable-scroll.datatable-virtual[data-mps=datatable] thead[data-mps=datatable] tr.filter-row[data-mps=datatable] th[data-mps=datatable] {\n position: sticky;\n top: var(--mp-datatable-header-height, 0px);\n z-index: 1;\n background-color: var(--bs-body-bg, #fff);\n}\n\ntr.virtual-spacer[data-mps=datatable] {\n pointer-events: none;\n}\ntr.virtual-spacer[data-mps=datatable] > td {\n border-bottom: 0;\n}\n\ntable[data-mps=datatable] {\n width: 100%;\n border-collapse: collapse;\n margin: 0;\n table-layout: auto;\n}\n\ntable.measured[data-mps=datatable] {\n table-layout: fixed;\n}\ntbody[data-mps=datatable] > tr[data-mps=datatable] > td {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\nthead[data-mps=datatable] th[data-mps=datatable] {\n background-color: var(--bs-table-bg, transparent);\n border-bottom: 1px solid var(--mp-datatable-border-color);\n text-align: left;\n font-weight: 600;\n padding: 0.5rem 0.75rem;\n white-space: nowrap;\n position: relative;\n user-select: none;\n}\n\nthead[data-mps=datatable] th[data-sortable=true][data-mps=datatable] {\n cursor: pointer;\n padding: 0;\n}\nthead[data-mps=datatable] th[data-sortable=true][data-mps=datatable]::before, thead[data-mps=datatable] th[data-sortable=true][data-mps=datatable]::after {\n position: absolute;\n display: block;\n opacity: 0.3;\n bottom: 0.5em;\n pointer-events: none;\n}\nthead[data-mps=datatable] th[data-sortable=true][data-mps=datatable]::before {\n content: \"↑\";\n right: 1em;\n}\nthead[data-mps=datatable] th[data-sortable=true][data-mps=datatable]::after {\n content: \"↓\";\n right: 0.5em;\n}\nthead[data-mps=datatable] th[data-sortable=true][aria-sort=ascending][data-mps=datatable]::after {\n opacity: 1;\n}\nthead[data-mps=datatable] th[data-sortable=true][aria-sort=descending][data-mps=datatable]::before {\n opacity: 1;\n}\n\nthead[data-mps=datatable] th[data-sortable=true]:hover[data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg);\n}\n\n.header-cell[data-mps=datatable] {\n display: inline-flex;\n align-items: center;\n gap: 0.4rem;\n}\n\nbutton.header-sort[data-mps=datatable] {\n border: 0;\n margin: 0;\n background: none;\n font: inherit;\n color: inherit;\n text-align: inherit;\n cursor: pointer;\n display: flex;\n width: 100%;\n box-sizing: border-box;\n padding: 0.5rem 2rem 0.5rem 0.75rem;\n}\n\n.resize-handle:focus-visible[data-mps=datatable],\nbutton.header-sort:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--mp-datatable-resize-handle-color);\n outline-offset: 1px;\n}\n\ntbody[data-mps=datatable] tr:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--mp-datatable-resize-handle-color);\n outline-offset: -2px;\n}\n\n.sort-index[data-mps=datatable] {\n position: absolute;\n right: 0.1em;\n bottom: 0.3em;\n font-size: 0.65em;\n font-weight: bold;\n opacity: 0.7;\n}\n\n.resize-handle[data-mps=datatable] {\n position: absolute;\n right: 0;\n top: 0;\n width: 24px;\n max-width: 50%;\n height: 100%;\n cursor: col-resize;\n user-select: none;\n z-index: 2;\n touch-action: none;\n -webkit-touch-callout: none;\n}\n\n.resize-handle[data-mps=datatable]::before {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 3px;\n}\n\n.resize-handle:hover[data-mps=datatable]::before,\n.resize-handle.active[data-mps=datatable]::before {\n background-color: var(--mp-datatable-resize-handle-color);\n}\n\n@media (pointer: coarse) {\n .resize-handle[data-mps=datatable] {\n width: 40px;\n }\n .resize-handle[data-mps=datatable]::before {\n background-color: var(--mp-datatable-border-color);\n }\n}\ntbody[data-mps=datatable] > tr[data-mps=datatable] > td {\n padding: 0.5rem 0.75rem;\n border-bottom: 1px solid var(--mp-datatable-border-color);\n vertical-align: middle;\n}\ntbody[data-mps=datatable] > tr[data-mps=datatable] > td svg,\ntbody[data-mps=datatable] > tr[data-mps=datatable] > td img {\n max-width: var(--mp-datatable-cell-media-max-width, none);\n height: auto;\n vertical-align: middle;\n}\n\ntbody[data-mps=datatable] tr[data-mps=datatable] {\n cursor: default;\n}\n\ntbody[data-mps=datatable] tr[data-clickable=true][data-mps=datatable] {\n cursor: pointer;\n}\n\ntbody[data-mps=datatable] tr:hover[data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg);\n}\n\ntbody[data-mps=datatable] tr[data-selected=true][data-mps=datatable] {\n background-color: var(--mp-datatable-row-selected-bg);\n color: var(--mp-datatable-row-selected-color);\n}\n\ntbody[data-mps=datatable] tr[data-cut=true][data-mps=datatable] {\n opacity: var(--mp-datatable-cut-opacity);\n}\n\ntbody[data-mps=datatable] tr[data-focused=true][data-mps=datatable] {\n outline: 2px solid var(--bs-primary, #0d6efd);\n outline-offset: -2px;\n}\ntr[data-mps=datatable] > .checkbox-cell[data-mps=datatable] {\n width: 2.5rem;\n padding-inline: 0.5rem;\n text-align: center;\n text-overflow: clip;\n}\n\n.checkbox-cell.checkbox-cell-toggles[data-mps=datatable] {\n cursor: pointer;\n}\n\n.tree-chevron-cell[data-mps=datatable] {\n width: 2rem;\n padding-right: 0;\n white-space: nowrap;\n user-select: none;\n}\n\n.tree-chevron[data-mps=datatable] {\n appearance: none;\n background: transparent;\n border: 0;\n padding: 0;\n width: 1.5rem;\n height: 1.5rem;\n line-height: 1;\n cursor: pointer;\n color: var(--bs-body-color, inherit);\n font-size: 0.85em;\n border-radius: 0.25rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.tree-chevron:hover[data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg);\n}\n.tree-chevron:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--bs-primary, #0d6efd);\n outline-offset: 1px;\n}\n\ntbody[data-mps=datatable] tr[data-placeholder=true][data-mps=datatable] {\n cursor: default;\n opacity: 0.6;\n pointer-events: none;\n}\n\n.tree-placeholder-cell[data-mps=datatable] {\n color: var(--bs-secondary-color, #6c757d);\n font-style: italic;\n padding-left: 1.25rem;\n}\n\n.empty-state[data-mps=datatable],\n.loading-state[data-mps=datatable] {\n padding: 2rem 1rem;\n text-align: center;\n color: var(--bs-secondary-color, #6c757d);\n}\n\n.datatable-footer[data-mps=datatable] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.5rem 0;\n gap: 1rem;\n flex-wrap: wrap;\n flex: 0 0 auto;\n}\n\n.datatable-per-page[data-mps=datatable],\n.datatable-pagination[data-mps=datatable] {\n flex: 0 1 auto;\n}\n\ntr.filter-row[data-mps=datatable] th[data-mps=datatable] {\n padding: 0;\n border-bottom: 1px solid var(--mp-datatable-border-color);\n font-weight: 400;\n user-select: none;\n}\n\n.filter-trigger[data-mps=datatable] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n padding: 0.5rem;\n border-radius: 0;\n background: transparent;\n border: 1px solid transparent;\n color: inherit;\n cursor: pointer;\n line-height: 1;\n}\n\n.filter-trigger:hover[data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg, rgba(var(--bs-emphasis-color-rgb), 0.04));\n}\n\n.filter-trigger:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--bs-focus-ring-color, #0d6efd);\n outline-offset: 1px;\n}\n\n.filter-trigger[aria-expanded=true][data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg, rgba(var(--bs-emphasis-color-rgb), 0.04));\n border-color: var(--mp-datatable-border-color);\n}\n\n.filter-icon[data-mps=datatable] {\n width: 0.875rem;\n height: 0.875rem;\n fill: currentColor;\n flex: 0 0 auto;\n}\n\n.filter-trigger.active[data-mps=datatable] .filter-icon[data-mps=datatable] {\n fill: var(--bs-primary, #0d6efd);\n}\n\n.filter-trigger.active[data-mps=datatable]::after {\n content: \"\";\n width: 0.375rem;\n height: 0.375rem;\n margin-inline-start: 0.25rem;\n border-radius: 50%;\n background-color: var(--bs-primary, #0d6efd);\n flex: 0 0 auto;\n}\n\n.filter-panel[data-mps=datatable] {\n position: fixed;\n min-width: 12rem;\n max-width: min(22rem, 100vw - 2rem);\n padding: 0.5rem;\n background-color: var(--bs-body-bg, #fff);\n color: var(--bs-body-color, inherit);\n border: 1px solid var(--mp-datatable-border-color, var(--bs-border-color, rgba(0, 0, 0, 0.125)));\n border-radius: 0.375rem;\n box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);\n}\n\n.filter-panel-body[data-mps=datatable] {\n display: block;\n max-height: min(20rem, 60vh);\n overflow: auto;\n}\n\n.resize-panel[data-mps=datatable] {\n position: fixed;\n display: flex;\n flex-direction: column;\n gap: 0.375rem;\n min-width: 12rem;\n padding: 0.5rem;\n background-color: var(--bs-body-bg, #fff);\n color: var(--bs-body-color, inherit);\n border: 1px solid var(--mp-datatable-border-color, var(--bs-border-color, rgba(0, 0, 0, 0.125)));\n border-radius: 0.375rem;\n box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);\n}\n\n.resize-panel-steps[data-mps=datatable] {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n}\n\n.resize-panel-width[data-mps=datatable] {\n flex: 1 1 auto;\n text-align: center;\n font-variant-numeric: tabular-nums;\n}\n\n.resize-panel-step[data-mps=datatable],\n.resize-panel-action[data-mps=datatable] {\n min-height: 2.75rem;\n padding: 0.25rem 0.75rem;\n font: inherit;\n color: inherit;\n background: transparent;\n border: 1px solid var(--mp-datatable-border-color, var(--bs-border-color, rgba(0, 0, 0, 0.125)));\n border-radius: 0.25rem;\n cursor: pointer;\n}\n\n.resize-panel-step[data-mps=datatable] {\n flex: 0 0 2.75rem;\n font-size: 1.25rem;\n line-height: 1;\n}\n\n.resize-panel-step:hover[data-mps=datatable],\n.resize-panel-action:hover[data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg, rgba(var(--bs-emphasis-color-rgb), 0.04));\n}\n\n.resize-panel-step:focus-visible[data-mps=datatable],\n.resize-panel-action:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--mp-datatable-resize-handle-color, var(--bs-primary, #0d6efd));\n outline-offset: 1px;\n}\n\n.filter-clear[data-mps=datatable],\n.filter-invert[data-mps=datatable] {\n display: block;\n width: 100%;\n box-sizing: border-box;\n padding: 0.25rem 0.5rem;\n margin-bottom: 0.375rem;\n background: transparent;\n border: 1px solid var(--mp-datatable-border-color, var(--bs-border-color, rgba(0, 0, 0, 0.125)));\n border-radius: 0.25rem;\n color: inherit;\n cursor: pointer;\n text-align: start;\n line-height: 1.4;\n}\n\n.filter-clear:disabled[data-mps=datatable] {\n opacity: 0.5;\n cursor: default;\n}\n\n.filter-invert[aria-pressed=true][data-mps=datatable] {\n background-color: var(--bs-primary, #0d6efd);\n border-color: var(--bs-primary, #0d6efd);\n color: var(--bs-primary-bg-subtle, #fff);\n}\n\n.filter-search[data-mps=datatable],\n.filter-operand[data-mps=datatable],\n.filter-operator[data-mps=datatable] {\n box-sizing: border-box;\n padding: 0.25rem 0.5rem;\n background-color: var(--bs-body-bg, #fff);\n color: inherit;\n border: 1px solid var(--mp-datatable-border-color, var(--bs-border-color, rgba(0, 0, 0, 0.125)));\n border-radius: 0.25rem;\n font: inherit;\n line-height: 1.5;\n}\n\n.filter-operand[type=number][data-mps=datatable] {\n appearance: textfield;\n}\n\n.filter-operand[data-mps=datatable]::-webkit-outer-spin-button,\n.filter-operand[data-mps=datatable]::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n}\n\n.filter-search[data-mps=datatable] {\n display: block;\n width: 100%;\n margin-bottom: 0.375rem;\n}\n\n.filter-clear:focus-visible[data-mps=datatable],\n.filter-invert:focus-visible[data-mps=datatable],\n.filter-search:focus-visible[data-mps=datatable],\n.filter-option[data-mps=datatable] input:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--bs-focus-ring-color, #0d6efd);\n outline-offset: 1px;\n}\n\n.filter-comparison[data-mps=datatable] {\n display: flex;\n gap: 0.375rem;\n align-items: stretch;\n}\n\n.filter-operator[data-mps=datatable] {\n flex: 0 0 auto;\n max-width: 9rem;\n padding-inline: 0.375rem;\n}\n\n.filter-operand[data-mps=datatable] {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.filter-operator:focus-visible[data-mps=datatable],\n.filter-operand:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--bs-focus-ring-color, #0d6efd);\n outline-offset: 1px;\n}\n\n.filter-options[data-mps=datatable] {\n display: flex;\n flex-direction: column;\n gap: 0.125rem;\n}\n\n.filter-option[data-mps=datatable] {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n padding: 0.125rem 0.25rem;\n border-radius: 0.25rem;\n cursor: pointer;\n overflow-wrap: anywhere;\n}\n\n.filter-option:hover[data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg, rgba(var(--bs-emphasis-color-rgb), 0.04));\n}\n\n.filter-remaining[data-mps=datatable] {\n color: var(--bs-secondary-color, #6c757d);\n}\n\n.filter-loading[data-mps=datatable],\n.filter-no-values[data-mps=datatable],\n.filter-has-more[data-mps=datatable] {\n display: block;\n padding: 0.25rem;\n color: var(--bs-secondary-color, #6c757d);\n font-size: 0.875em;\n}\n\n.filter-summary[data-mps=datatable] {\n margin-inline-start: 0.25rem;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 0.875em;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .resize-handle[data-mps=datatable] {\n transition: none !important;\n }\n}");
77
+ }, x = u("@charset \"UTF-8\";\nmp-datatable {\n display: block;\n width: 100%;\n position: relative;\n --mp-datatable-border-color: var(--bs-border-color, rgba(0, 0, 0, 0.125));\n --mp-datatable-row-hover-bg: var(--bs-table-hover-bg, rgba(var(--bs-emphasis-color-rgb), 0.04));\n --mp-datatable-row-selected-bg: var(--bs-list-group-active-bg, var(--bs-primary, #0d6efd));\n --mp-datatable-row-selected-color: var(--bs-list-group-active-color, #fff);\n --mp-datatable-cut-opacity: 0.55;\n --mp-datatable-resize-handle-color: var(--bs-primary, #0d6efd);\n}\n\n[data-mps=datatable] {\n box-sizing: border-box;\n}\n\n.datatable-shell[data-mps=datatable] {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n}\n\n.datatable-scroll[data-mps=datatable] {\n overflow: auto;\n flex: 1 1 auto;\n}\n\n.datatable-scroll.datatable-virtual[data-mps=datatable] {\n max-height: var(--mp-datatable-virtual-max-height, 480px);\n}\n.datatable-scroll.datatable-virtual[data-mps=datatable] thead[data-mps=datatable] th[data-mps=datatable] {\n position: sticky;\n top: 0;\n z-index: 1;\n background-color: var(--bs-body-bg, #fff);\n}\n.datatable-scroll.datatable-virtual[data-mps=datatable] thead[data-mps=datatable] th[data-sortable=true]:hover[data-mps=datatable] {\n background-color: var(--bs-body-bg, #fff);\n background-image: linear-gradient(var(--mp-datatable-row-hover-bg), var(--mp-datatable-row-hover-bg));\n}\n.datatable-scroll.datatable-virtual[data-mps=datatable] thead[data-mps=datatable] tr.filter-row[data-mps=datatable] th[data-mps=datatable] {\n position: sticky;\n top: var(--mp-datatable-header-height, 0px);\n z-index: 1;\n background-color: var(--bs-body-bg, #fff);\n}\n\ntr.virtual-spacer[data-mps=datatable] {\n pointer-events: none;\n}\ntr.virtual-spacer[data-mps=datatable] > td {\n border-bottom: 0;\n}\n\ntable[data-mps=datatable] {\n width: 100%;\n border-collapse: collapse;\n margin: 0;\n table-layout: auto;\n}\n\ntable.measured[data-mps=datatable] {\n table-layout: fixed;\n}\ntbody[data-mps=datatable] > tr[data-mps=datatable] > td {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\nthead[data-mps=datatable] th[data-mps=datatable] {\n background-color: var(--bs-table-bg, transparent);\n border-bottom: 1px solid var(--mp-datatable-border-color);\n text-align: left;\n font-weight: 600;\n padding: 0.5rem 0.75rem;\n white-space: nowrap;\n position: relative;\n user-select: none;\n}\n\nthead[data-mps=datatable] th[data-sortable=true][data-mps=datatable] {\n cursor: pointer;\n padding: 0;\n}\nthead[data-mps=datatable] th[data-sortable=true][data-mps=datatable]::before, thead[data-mps=datatable] th[data-sortable=true][data-mps=datatable]::after {\n position: absolute;\n display: block;\n opacity: 0.3;\n bottom: 0.5em;\n pointer-events: none;\n}\nthead[data-mps=datatable] th[data-sortable=true][data-mps=datatable]::before {\n content: \"↑\";\n right: 1em;\n}\nthead[data-mps=datatable] th[data-sortable=true][data-mps=datatable]::after {\n content: \"↓\";\n right: 0.5em;\n}\nthead[data-mps=datatable] th[data-sortable=true][aria-sort=ascending][data-mps=datatable]::after {\n opacity: 1;\n}\nthead[data-mps=datatable] th[data-sortable=true][aria-sort=descending][data-mps=datatable]::before {\n opacity: 1;\n}\n\nthead[data-mps=datatable] th[data-sortable=true]:hover[data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg);\n}\n\n.header-cell[data-mps=datatable] {\n display: inline-flex;\n align-items: center;\n gap: 0.4rem;\n}\n\nbutton.header-sort[data-mps=datatable] {\n border: 0;\n margin: 0;\n background: none;\n font: inherit;\n color: inherit;\n text-align: inherit;\n cursor: pointer;\n display: flex;\n width: 100%;\n box-sizing: border-box;\n padding: 0.5rem 2rem 0.5rem 0.75rem;\n}\n\n.resize-handle:focus-visible[data-mps=datatable],\nbutton.header-sort:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--mp-datatable-resize-handle-color);\n outline-offset: 1px;\n}\n\ntbody[data-mps=datatable] tr:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--mp-datatable-resize-handle-color);\n outline-offset: -2px;\n}\n\n.sort-index[data-mps=datatable] {\n position: absolute;\n right: 0.1em;\n bottom: 0.3em;\n font-size: 0.65em;\n font-weight: bold;\n opacity: 0.7;\n}\n\n.resize-handle[data-mps=datatable] {\n position: absolute;\n right: 0;\n top: 0;\n width: 24px;\n max-width: 50%;\n height: 100%;\n cursor: col-resize;\n user-select: none;\n z-index: 2;\n touch-action: none;\n -webkit-touch-callout: none;\n}\n\n.resize-handle[data-mps=datatable]::before {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 3px;\n}\n\n.resize-handle:hover[data-mps=datatable]::before,\n.resize-handle.active[data-mps=datatable]::before {\n background-color: var(--mp-datatable-resize-handle-color);\n}\n\n@media (pointer: coarse) {\n .resize-handle[data-mps=datatable] {\n width: 40px;\n }\n .resize-handle[data-mps=datatable]::before {\n background-color: var(--mp-datatable-border-color);\n }\n}\ntbody[data-mps=datatable] > tr[data-mps=datatable] > td {\n padding: 0.5rem 0.75rem;\n border-bottom: 1px solid var(--mp-datatable-border-color);\n vertical-align: middle;\n}\ntbody[data-mps=datatable] > tr[data-mps=datatable] > td svg,\ntbody[data-mps=datatable] > tr[data-mps=datatable] > td img {\n max-width: var(--mp-datatable-cell-media-max-width, none);\n height: auto;\n vertical-align: middle;\n}\n\ntbody[data-mps=datatable] tr[data-mps=datatable] {\n cursor: default;\n}\n\ntbody[data-mps=datatable] tr[data-clickable=true][data-mps=datatable] {\n cursor: pointer;\n}\n\ntbody[data-mps=datatable] tr:hover[data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg);\n}\n\ntbody[data-mps=datatable] tr[data-selected=true][data-mps=datatable] {\n background-color: var(--mp-datatable-row-selected-bg);\n color: var(--mp-datatable-row-selected-color);\n}\n\ntbody[data-mps=datatable] tr[data-cut=true][data-mps=datatable] {\n opacity: var(--mp-datatable-cut-opacity);\n}\n\ntbody[data-mps=datatable] tr[data-focused=true][data-mps=datatable] {\n outline: 2px solid var(--bs-primary, #0d6efd);\n outline-offset: -2px;\n}\ntr[data-mps=datatable] > .checkbox-cell[data-mps=datatable] {\n width: 2.5rem;\n padding-inline: 0.5rem;\n text-align: center;\n text-overflow: clip;\n}\n\n.checkbox-cell.checkbox-cell-toggles[data-mps=datatable] {\n cursor: pointer;\n}\n\n.tree-chevron-cell[data-mps=datatable] {\n width: 2rem;\n padding-right: 0;\n white-space: nowrap;\n user-select: none;\n}\n\n.tree-chevron[data-mps=datatable] {\n appearance: none;\n background: transparent;\n border: 0;\n padding: 0;\n width: 1.5rem;\n height: 1.5rem;\n line-height: 1;\n cursor: pointer;\n color: var(--bs-body-color, inherit);\n font-size: 0.85em;\n border-radius: 0.25rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.tree-chevron:hover[data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg);\n}\n.tree-chevron:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--bs-primary, #0d6efd);\n outline-offset: 1px;\n}\n\ntbody[data-mps=datatable] tr[data-placeholder=true][data-mps=datatable] {\n cursor: default;\n opacity: 0.6;\n pointer-events: none;\n}\n\n.tree-placeholder-cell[data-mps=datatable] {\n color: var(--bs-secondary-color, #6c757d);\n font-style: italic;\n padding-left: 1.25rem;\n}\n\n.empty-state[data-mps=datatable],\n.loading-state[data-mps=datatable] {\n padding: 2rem 1rem;\n text-align: center;\n color: var(--bs-secondary-color, #6c757d);\n}\n\n.datatable-footer[data-mps=datatable] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.5rem 0;\n gap: 1rem;\n flex-wrap: wrap;\n flex: 0 0 auto;\n}\n\n.datatable-per-page[data-mps=datatable],\n.datatable-pagination[data-mps=datatable] {\n flex: 0 1 auto;\n}\n\ntr.filter-row[data-mps=datatable] th[data-mps=datatable] {\n padding: 0;\n border-bottom: 1px solid var(--mp-datatable-border-color);\n font-weight: 400;\n user-select: none;\n}\n\n.filter-trigger[data-mps=datatable] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n padding: 0.5rem;\n border-radius: 0;\n background: transparent;\n border: 1px solid transparent;\n color: inherit;\n cursor: pointer;\n line-height: 1;\n}\n\n.filter-trigger:hover[data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg, rgba(var(--bs-emphasis-color-rgb), 0.04));\n}\n\n.filter-trigger:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--bs-focus-ring-color, #0d6efd);\n outline-offset: 1px;\n}\n\n.filter-trigger[aria-expanded=true][data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg, rgba(var(--bs-emphasis-color-rgb), 0.04));\n border-color: var(--mp-datatable-border-color);\n}\n\n.filter-icon[data-mps=datatable] {\n width: 0.875rem;\n height: 0.875rem;\n fill: currentColor;\n flex: 0 0 auto;\n}\n\n.filter-trigger.active[data-mps=datatable] .filter-icon[data-mps=datatable] {\n fill: var(--bs-primary, #0d6efd);\n}\n\n.filter-trigger.active[data-mps=datatable]::after {\n content: \"\";\n width: 0.375rem;\n height: 0.375rem;\n margin-inline-start: 0.25rem;\n border-radius: 50%;\n background-color: var(--bs-primary, #0d6efd);\n flex: 0 0 auto;\n}\n\n.filter-panel[data-mps=datatable] {\n position: fixed;\n min-width: 12rem;\n max-width: min(22rem, 100vw - 2rem);\n padding: 0.5rem;\n background-color: var(--bs-body-bg, #fff);\n color: var(--bs-body-color, inherit);\n border: 1px solid var(--mp-datatable-border-color, var(--bs-border-color, rgba(0, 0, 0, 0.125)));\n border-radius: 0.375rem;\n box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);\n}\n\n.filter-panel-body[data-mps=datatable] {\n display: block;\n max-height: min(20rem, 60vh);\n overflow: auto;\n}\n\n.resize-panel[data-mps=datatable] {\n position: fixed;\n display: flex;\n flex-direction: column;\n gap: 0.375rem;\n min-width: 12rem;\n padding: 0.5rem;\n background-color: var(--bs-body-bg, #fff);\n color: var(--bs-body-color, inherit);\n border: 1px solid var(--mp-datatable-border-color, var(--bs-border-color, rgba(0, 0, 0, 0.125)));\n border-radius: 0.375rem;\n box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);\n}\n\n.resize-panel-steps[data-mps=datatable] {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n}\n\n.resize-panel-width[data-mps=datatable] {\n flex: 1 1 auto;\n text-align: center;\n font-variant-numeric: tabular-nums;\n}\n\n.resize-panel-step[data-mps=datatable],\n.resize-panel-action[data-mps=datatable] {\n min-height: 2.75rem;\n padding: 0.25rem 0.75rem;\n font: inherit;\n color: inherit;\n background: transparent;\n border: 1px solid var(--mp-datatable-border-color, var(--bs-border-color, rgba(0, 0, 0, 0.125)));\n border-radius: 0.25rem;\n cursor: pointer;\n}\n\n.resize-panel-step[data-mps=datatable] {\n flex: 0 0 2.75rem;\n font-size: 1.25rem;\n line-height: 1;\n}\n\n.resize-panel-step:hover[data-mps=datatable],\n.resize-panel-action:hover[data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg, rgba(var(--bs-emphasis-color-rgb), 0.04));\n}\n\n.resize-panel-step:focus-visible[data-mps=datatable],\n.resize-panel-action:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--mp-datatable-resize-handle-color, var(--bs-primary, #0d6efd));\n outline-offset: 1px;\n}\n\n.filter-clear[data-mps=datatable],\n.filter-invert[data-mps=datatable] {\n display: block;\n width: 100%;\n box-sizing: border-box;\n padding: 0.25rem 0.5rem;\n margin-bottom: 0.375rem;\n background: transparent;\n border: 1px solid var(--mp-datatable-border-color, var(--bs-border-color, rgba(0, 0, 0, 0.125)));\n border-radius: 0.25rem;\n color: inherit;\n cursor: pointer;\n text-align: start;\n line-height: 1.4;\n}\n\n.filter-clear:disabled[data-mps=datatable] {\n opacity: 0.5;\n cursor: default;\n}\n\n.filter-invert[aria-pressed=true][data-mps=datatable] {\n background-color: var(--bs-primary, #0d6efd);\n border-color: var(--bs-primary, #0d6efd);\n color: var(--bs-primary-bg-subtle, #fff);\n}\n\n.filter-search[data-mps=datatable],\n.filter-operand[data-mps=datatable],\n.filter-operator[data-mps=datatable] {\n box-sizing: border-box;\n padding: 0.25rem 0.5rem;\n background-color: var(--bs-body-bg, #fff);\n color: inherit;\n border: 1px solid var(--mp-datatable-border-color, var(--bs-border-color, rgba(0, 0, 0, 0.125)));\n border-radius: 0.25rem;\n font: inherit;\n line-height: 1.5;\n}\n\n.filter-operand[type=number][data-mps=datatable] {\n appearance: textfield;\n}\n\n.filter-operand[data-mps=datatable]::-webkit-outer-spin-button,\n.filter-operand[data-mps=datatable]::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n}\n\n.filter-search[data-mps=datatable] {\n display: block;\n width: 100%;\n margin-bottom: 0.375rem;\n}\n\n.filter-clear:focus-visible[data-mps=datatable],\n.filter-invert:focus-visible[data-mps=datatable],\n.filter-search:focus-visible[data-mps=datatable],\n.filter-option[data-mps=datatable] input:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--bs-focus-ring-color, #0d6efd);\n outline-offset: 1px;\n}\n\n.filter-comparison[data-mps=datatable] {\n display: flex;\n gap: 0.375rem;\n align-items: stretch;\n}\n\n.filter-operator[data-mps=datatable] {\n flex: 0 0 auto;\n max-width: 9rem;\n padding-inline: 0.375rem;\n}\n\n.filter-operand[data-mps=datatable] {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.filter-operator:focus-visible[data-mps=datatable],\n.filter-operand:focus-visible[data-mps=datatable] {\n outline: 2px solid var(--bs-focus-ring-color, #0d6efd);\n outline-offset: 1px;\n}\n\n.filter-options[data-mps=datatable] {\n display: flex;\n flex-direction: column;\n gap: 0.125rem;\n}\n\n.filter-option[data-mps=datatable] {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n padding: 0.125rem 0.25rem;\n border-radius: 0.25rem;\n cursor: pointer;\n overflow-wrap: anywhere;\n}\n\n.filter-option:hover[data-mps=datatable] {\n background-color: var(--mp-datatable-row-hover-bg, rgba(var(--bs-emphasis-color-rgb), 0.04));\n}\n\n.filter-remaining[data-mps=datatable] {\n color: var(--bs-secondary-color, #6c757d);\n}\n\n.filter-loading[data-mps=datatable],\n.filter-no-values[data-mps=datatable],\n.filter-has-more[data-mps=datatable] {\n display: block;\n padding: 0.25rem;\n color: var(--bs-secondary-color, #6c757d);\n font-size: 0.875em;\n}\n\n.filter-summary[data-mps=datatable] {\n margin-inline-start: 0.25rem;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 0.875em;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .resize-handle[data-mps=datatable] {\n transition: none !important;\n }\n}");
77
78
  //#endregion
78
79
  //#region libs/mintplayer-web-components/datatable/src/sort/compute-next-sort.ts
79
- function b(e, t, n) {
80
+ function S(e, t, n) {
80
81
  if (n) {
81
82
  let n = e.findIndex((e) => e.property === t);
82
83
  return n === -1 ? [...e, {
@@ -94,44 +95,44 @@ function b(e, t, n) {
94
95
  }
95
96
  //#endregion
96
97
  //#region libs/mintplayer-web-components/datatable/src/sort/sort-rows.ts
97
- function x(e, t) {
98
+ function C(e, t) {
98
99
  return t.length === 0 ? e.slice() : e.map((e, t) => ({
99
100
  row: e,
100
101
  index: t
101
102
  })).sort((e, n) => {
102
103
  for (let r of t) {
103
- let t = C(S(e.row, r.property), S(n.row, r.property));
104
+ let t = T(w(e.row, r.property), w(n.row, r.property));
104
105
  if (t !== 0) return r.direction === "ascending" ? t : -t;
105
106
  }
106
107
  return e.index - n.index;
107
108
  }).map(({ row: e }) => e);
108
109
  }
109
- function S(e, t) {
110
+ function w(e, t) {
110
111
  if (typeof e == "object" && e) return e[t];
111
112
  }
112
- function C(e, t) {
113
+ function T(e, t) {
113
114
  return e === t ? 0 : e == null ? 1 : t == null ? -1 : typeof e == "number" && typeof t == "number" ? e - t : e instanceof Date && t instanceof Date ? e.getTime() - t.getTime() : String(e).localeCompare(String(t));
114
115
  }
115
- function w(e, t) {
116
+ function E(e, t) {
116
117
  return Math.max(40, e + t);
117
118
  }
118
- var T = .75;
119
- function E(e) {
119
+ var D = .75;
120
+ function O(e) {
120
121
  let t = Math.max(0, ...e.filter((e) => Number.isFinite(e)));
121
122
  return t > 0 ? Math.max(40, Math.ceil(t)) : null;
122
123
  }
123
124
  //#endregion
124
125
  //#region libs/mintplayer-web-components/datatable/src/components/mp-datatable.ts
125
- var D = a("datatable");
126
- function O(e, t) {
126
+ var k = a("datatable");
127
+ function A(e, t) {
127
128
  return e === t || e !== e && t !== t;
128
129
  }
129
- function k(e, t) {
130
- return e.some((e) => O(e.value, t));
130
+ function j(e, t) {
131
+ return e.some((e) => A(e.value, t));
131
132
  }
132
- var A = 250, j = 0, M = class extends s {
133
+ var M = 200, N = 0, P = class extends s {
133
134
  constructor(...i) {
134
- super(...i), this.instanceId = `mp-datatable-${++j}`, this._caption = null, this._inputLabel = null, this.hostAria = new n(this, { referenceTarget: () => this.renderRoot?.querySelector("table") ?? null }), this._labels = void 0, this._columns = [], this._data = [], this._sortColumns = [], this._selectionMode = "none", this._selectedIds = /* @__PURE__ */ new Set(), this._selectedRowCache = /* @__PURE__ */ new Map(), this._cutIds = /* @__PURE__ */ new Set(), this._focusedRowKey = null, this.liveAnnouncer = new r(this), this.rowFocusRestore = new e(this, new t(() => this.renderRoot ?? null, {
135
+ super(...i), this.instanceId = `mp-datatable-${++N}`, this._caption = null, this._inputLabel = null, this.hostAria = new n(this, { referenceTarget: () => this.renderRoot?.querySelector("table") ?? null }), this._labels = void 0, this._columns = [], this._data = [], this._sortColumns = [], this._selectionMode = "none", this._selectedIds = /* @__PURE__ */ new Set(), this._selectedRowCache = /* @__PURE__ */ new Map(), this._cutIds = /* @__PURE__ */ new Set(), this._focusedRowKey = null, this.liveAnnouncer = new r(this), this.rowFocusRestore = new e(this, new t(() => this.renderRoot ?? null, {
135
136
  selector: "tbody tr[data-row-key]:not([data-placeholder=\"true\"])",
136
137
  keyOf: (e) => e.dataset.rowKey ?? null,
137
138
  container: () => this.renderRoot?.querySelector("table") ?? null
@@ -145,7 +146,7 @@ var A = 250, j = 0, M = class extends s {
145
146
  ], this._autoSort = !0, this._totalRecords = null, this._virtualScroll = !1, this._itemSize = 40, this._virtualBuffer = 10, this._virtualRange = {
146
147
  startIndex: 0,
147
148
  endIndex: 0
148
- }, this._scrollElement = null, this._resizeObserver = null, this._headerObserver = null, this._observedThead = null, this._scrollListener = null, this._viewportHeight = 0, this._openFilterColumn = null, this._mountedFilterColumn = null, this._consumerMountedFilter = !1, this._filterUid = `mp-dt-${Math.random().toString(36).slice(2, 9)}`, this._distincts = null, this._filterStates = /* @__PURE__ */ new Map(), this._tree = !1, this._idKey = null, this._childCountKey = null, this._treeIndent = 1.25, this._expandedIds = /* @__PURE__ */ new Set(), this._selectionStrategy = "flat", this._childCache = /* @__PURE__ */ new Map(), this._childTotals = /* @__PURE__ */ new Map(), this._pendingFetches = /* @__PURE__ */ new Set(), this._pageCache = /* @__PURE__ */ new Map(), this._pendingPageFetches = /* @__PURE__ */ new Set(), this._fetch = null, this._fetchGeneration = 0, this._initialFetchDone = !1, this._reloadScheduled = !1, this._lastReloadKey = null, this._cachedFlatList = null, this._cachedIndeterminateKeys = null, this._rowLabel = null, this._resizableColumns = !0, this.filterOverlay = new o(this, {
149
+ }, this._scrollElement = null, this._resizeObserver = null, this._headerObserver = null, this._observedThead = null, this._scrollListener = null, this._viewportHeight = 0, this._openFilterColumn = null, this._mountedFilterColumn = null, this._consumerMountedFilter = !1, this._filterUid = `mp-dt-${Math.random().toString(36).slice(2, 9)}`, this._distincts = null, this._filterStates = /* @__PURE__ */ new Map(), this._tree = !1, this._idKey = null, this._childCountKey = null, this._treeIndent = 1.25, this._expandedIds = /* @__PURE__ */ new Set(), this._selectionStrategy = "flat", this._childCache = /* @__PURE__ */ new Map(), this._childTotals = /* @__PURE__ */ new Map(), this._pendingFetches = /* @__PURE__ */ new Set(), this._pageCache = /* @__PURE__ */ new Map(), this._pendingPageFetches = /* @__PURE__ */ new Set(), this._fetch = null, this._fetchGeneration = 0, this._fetchAbort = new AbortController(), this._initialFetchDone = !1, this._reloadScheduled = !1, this._lastReloadKey = null, this._cachedFlatList = null, this._cachedIndeterminateKeys = null, this._rowLabel = null, this._resizableColumns = !0, this.filterOverlay = new o(this, {
149
150
  portal: !0,
150
151
  modal: !0,
151
152
  scrollStrategy: "reposition",
@@ -167,7 +168,7 @@ var A = 250, j = 0, M = class extends s {
167
168
  let t = this.resizeState;
168
169
  if (!t || e.pointerId !== t.pointerId) return;
169
170
  let n = e.clientX - t.startX;
170
- !t.dragging && Math.abs(n) <= 4 || (t.dragging = !0, this.setUserColumnWidth(t.column.name, w(t.startWidth, n)));
171
+ !t.dragging && Math.abs(n) <= 4 || (t.dragging = !0, this.setUserColumnWidth(t.column.name, E(t.startWidth, n)));
171
172
  }, this.onColumnResizeEnd = (e) => {
172
173
  let t = this.resizeState;
173
174
  if (t && e.pointerId === t.pointerId) {
@@ -227,7 +228,7 @@ var A = 250, j = 0, M = class extends s {
227
228
  }
228
229
  get mergedLabels() {
229
230
  return {
230
- ...v,
231
+ ...b,
231
232
  ...this.labels ?? {}
232
233
  };
233
234
  }
@@ -308,7 +309,7 @@ var A = 250, j = 0, M = class extends s {
308
309
  }
309
310
  assignFetch(e) {
310
311
  let t = typeof e == "function" ? e : null;
311
- return t !== this._fetch && (this._fetch = t, this._fetch ? (this._autoSort = !1, this._initialFetchDone = !1, this._lastReloadKey = null, !0) : (this._totalRecords = null, this._pageCache.clear(), this._pendingPageFetches.clear(), this._childCache.clear(), this._childTotals.clear(), this._pendingFetches.clear(), this._fetchGeneration++, this._initialFetchDone = !1, this._lastReloadKey = null, this.requestUpdate(), !1));
312
+ return t !== this._fetch && (this._fetch = t, this._fetch ? (this._autoSort = !1, this._initialFetchDone = !1, this._lastReloadKey = null, !0) : (this._totalRecords = null, this._pageCache.clear(), this._pendingPageFetches.clear(), this._childCache.clear(), this._childTotals.clear(), this._pendingFetches.clear(), this.invalidateFetches(), this._initialFetchDone = !1, this._lastReloadKey = null, this.requestUpdate(), !1));
312
313
  }
313
314
  get distincts() {
314
315
  return this._distincts;
@@ -580,7 +581,7 @@ var A = 250, j = 0, M = class extends s {
580
581
  if (this._frozenExtraWidth != null || !this._measuredFit || !this._scrollElement || !this.renderRoot) return;
581
582
  let e = [...this._measuredWidths].filter(([e]) => !this._userWidths.has(e));
582
583
  if (e.length === 0) return;
583
- let t = new Set(e.map(([e]) => e)), n = [...this.renderRoot.querySelectorAll("thead tr:first-child th")].filter((e) => !t.has(e.dataset.column ?? "")).reduce((e, t) => e + t.getBoundingClientRect().width, 0), r = e.reduce((e, [, t]) => e + t, 0), i = this._scrollElement.clientWidth - n, a = Math.min(1, Math.max(T, i / r)), o = new Map(this._columnWidths);
584
+ let t = new Set(e.map(([e]) => e)), n = [...this.renderRoot.querySelectorAll("thead tr:first-child th")].filter((e) => !t.has(e.dataset.column ?? "")).reduce((e, t) => e + t.getBoundingClientRect().width, 0), r = e.reduce((e, [, t]) => e + t, 0), i = this._scrollElement.clientWidth - n, a = Math.min(1, Math.max(D, i / r)), o = new Map(this._columnWidths);
584
585
  e.map(([e, t]) => {
585
586
  let n = Math.max(40, Math.floor(t * a)), r = o.get(e) !== n;
586
587
  return o.set(e, n), r;
@@ -624,7 +625,7 @@ var A = 250, j = 0, M = class extends s {
624
625
  }
625
626
  render() {
626
627
  let e = this.computeVisibleRows(), t = this._totalRecords ?? this._data.length, n = this.pagination && !this._tree ? Math.max(1, Math.ceil(t / this._perPage)) : 1, r = this.isMulti, i = this._columns.length + +!!r + +!!this._tree, a = this.getVirtualSpacerHeights(), o = this.hasFilterRow ? 2 : 1, s = (this._tree || this.isRootWindowed() ? this.getFlatList().length : this._data.length) + o;
627
- return D`
628
+ return k`
628
629
  ${this.liveAnnouncer.template()}
629
630
  <div class="datatable-shell">
630
631
  <div class="datatable-scroll ${this._virtualScroll ? "datatable-virtual" : ""}" role="presentation">
@@ -638,11 +639,11 @@ var A = 250, j = 0, M = class extends s {
638
639
  class=${this._hasMeasuredInitial ? "measured" : ""}
639
640
  style=${f(this._frozenExtraWidth == null ? {} : { width: `${this.frozenTableWidth()}px` })}
640
641
  >
641
- ${this._caption ? D`<caption>${this._caption}</caption>` : c}
642
+ ${this._caption ? k`<caption>${this._caption}</caption>` : c}
642
643
  <thead>
643
644
  <tr role="row" aria-rowindex="1">
644
- ${this._tree ? D`<th class="tree-chevron-cell" scope="col" aria-label=${this.mergedLabels.treeChevronColumn}></th>` : c}
645
- ${r ? D`<th class="checkbox-cell" scope="col">
645
+ ${this._tree ? k`<th class="tree-chevron-cell" scope="col" aria-label=${this.mergedLabels.treeChevronColumn}></th>` : c}
646
+ ${r ? k`<th class="checkbox-cell" scope="col">
646
647
  <mp-checkbox
647
648
  aria-label=${this.mergedLabels.deselectAll}
648
649
  aria-hidden=${this._selectedIds.size === 0 ? "true" : c}
@@ -657,14 +658,14 @@ var A = 250, j = 0, M = class extends s {
657
658
  ${this.hasFilterRow ? this.renderFilterRow(r) : c}
658
659
  </thead>
659
660
  <tbody>
660
- ${this._loading ? D`<tr><td colspan=${i} class="loading-state">Loading…</td></tr>` : e.length === 0 ? D`<tr><td colspan=${i} class="empty-state">${this._emptyMessage}</td></tr>` : D`
661
- ${a.top > 0 ? D`<tr class="virtual-spacer" aria-hidden="true"><td colspan=${i} style=${f({
661
+ ${this._loading ? k`<tr><td colspan=${i} class="loading-state">Loading…</td></tr>` : e.length === 0 ? k`<tr><td colspan=${i} class="empty-state">${this._emptyMessage}</td></tr>` : k`
662
+ ${a.top > 0 ? k`<tr class="virtual-spacer" aria-hidden="true"><td colspan=${i} style=${f({
662
663
  height: `${a.top}px`,
663
664
  padding: "0",
664
665
  border: "0"
665
666
  })}></td></tr>` : c}
666
667
  ${d(e, ({ key: e }) => e, ({ key: e, rowIndex: t, flat: n }) => this.renderRow(n, e, t, r))}
667
- ${a.bottom > 0 ? D`<tr class="virtual-spacer" aria-hidden="true"><td colspan=${i} style=${f({
668
+ ${a.bottom > 0 ? k`<tr class="virtual-spacer" aria-hidden="true"><td colspan=${i} style=${f({
668
669
  height: `${a.bottom}px`,
669
670
  padding: "0",
670
671
  border: "0"
@@ -714,9 +715,7 @@ var A = 250, j = 0, M = class extends s {
714
715
  term: "",
715
716
  operandText: e.filterSelection?.operand == null ? "" : String(e.filterSelection.operand),
716
717
  loading: !1,
717
- generation: 0,
718
- controller: null,
719
- debounce: null,
718
+ runner: new p({ debounceMs: M }),
720
719
  listeners: /* @__PURE__ */ new Set(),
721
720
  ctx: null
722
721
  };
@@ -741,7 +740,7 @@ var A = 250, j = 0, M = class extends s {
741
740
  e.listeners.forEach((e) => e()), this.requestUpdate();
742
741
  }
743
742
  abortFilterRequest(e) {
744
- e.controller?.abort(), e.controller = null, e.debounce != null && clearTimeout(e.debounce), e.debounce = null, e.loading = !1;
743
+ e.runner.cancel(), e.loading = !1;
745
744
  }
746
745
  applyFilter(e, t, n) {
747
746
  let r = this.filterState(e);
@@ -804,35 +803,30 @@ var A = 250, j = 0, M = class extends s {
804
803
  if (!n) return;
805
804
  n.term = t, this.rebucket(n), this.notifyFilterListeners(n);
806
805
  let r = n.loadedTerm ?? "";
807
- (n.loaded?.hasMore || !t.startsWith(r)) && (n.debounce != null && clearTimeout(n.debounce), n.debounce = setTimeout(() => {
808
- n.debounce = null, this.loadDistincts(e, t);
809
- }, A));
806
+ (n.loaded?.hasMore || !t.startsWith(r)) && this.loadDistincts(e, t, !0);
810
807
  }
811
- async loadDistincts(e, t) {
812
- let n = this.filterState(e);
813
- if (!n) return;
814
- let r = ++n.generation;
815
- if (n.controller?.abort(), this._distincts) {
816
- let i = new AbortController();
817
- n.controller = i, n.loading = !0, this.notifyFilterListeners(n);
818
- try {
819
- let a = await this._distincts({
808
+ async loadDistincts(e, t, n = !1) {
809
+ let r = this.filterState(e);
810
+ if (r) {
811
+ if (this._distincts) {
812
+ r.loading = !0, this.notifyFilterListeners(r);
813
+ let i = await r.runner.run(async ({ signal: n }) => ({ response: await this._distincts({
820
814
  column: e,
821
815
  search: t,
822
- signal: i.signal
823
- });
824
- if (r !== n.generation) return;
825
- if (n.loading = !1, n.controller = null, a) {
826
- n.loaded = a, n.loadedTerm = t, this.rebucket(n), this.notifyFilterListeners(n);
816
+ signal: n
817
+ }) }), { debounceMs: n ? void 0 : 0 });
818
+ if (i.aborted) return;
819
+ if (r.loading = !1, i.value === null) {
820
+ r.loaded = null, r.loadedTerm = t, this.notifyFilterListeners(r);
821
+ return;
822
+ }
823
+ if (i.value.response) {
824
+ r.loaded = i.value.response, r.loadedTerm = t, this.rebucket(r), this.notifyFilterListeners(r);
827
825
  return;
828
826
  }
829
- } catch {
830
- if (r !== n.generation) return;
831
- n.loading = !1, n.controller = null, n.loaded = null, n.loadedTerm = t, this.notifyFilterListeners(n);
832
- return;
833
827
  }
828
+ r.loaded = this.localDistincts(e), r.loadedTerm = "", r.fromLocal = !0, this.rebucket(r), this.notifyFilterListeners(r);
834
829
  }
835
- n.loaded = this.localDistincts(e), n.loadedTerm = "", n.fromLocal = !0, this.rebucket(n), this.notifyFilterListeners(n);
836
830
  }
837
831
  refreshLocalDistincts() {
838
832
  if (!this._openFilterColumn) return;
@@ -844,7 +838,7 @@ var A = 250, j = 0, M = class extends s {
844
838
  let t = this.mergedLabels, n = [];
845
839
  return this._data.forEach((r) => {
846
840
  let i = r?.[e];
847
- k(n, i) || n.push({
841
+ j(n, i) || n.push({
848
842
  value: i,
849
843
  label: t.filterValue(i)
850
844
  });
@@ -859,7 +853,7 @@ var A = 250, j = 0, M = class extends s {
859
853
  e.view = null;
860
854
  return;
861
855
  }
862
- let t = e.term.trim().toLowerCase(), n = (e) => t === "" || e.label.toLowerCase().includes(t), r = [...e.loaded.matching, ...e.loaded.remaining], i = e.snapshot ? e.snapshot.filter((e) => k(r, e.value)) : e.loaded.matching, a = e.snapshot ? e.snapshot.filter((e) => !k(r, e.value)) : e.loaded.remaining;
856
+ let t = e.term.trim().toLowerCase(), n = (e) => t === "" || e.label.toLowerCase().includes(t), r = [...e.loaded.matching, ...e.loaded.remaining], i = e.snapshot ? e.snapshot.filter((e) => j(r, e.value)) : e.loaded.matching, a = e.snapshot ? e.snapshot.filter((e) => !j(r, e.value)) : e.loaded.remaining;
863
857
  e.view = {
864
858
  matching: i.filter(n),
865
859
  remaining: a.filter(n),
@@ -882,7 +876,7 @@ var A = 250, j = 0, M = class extends s {
882
876
  let t = this._columns.find((e) => e.name === this._openFilterColumn);
883
877
  if (!t) return;
884
878
  let n = this.filterState(t.name);
885
- l(D`
879
+ l(k`
886
880
  <div
887
881
  class="filter-panel"
888
882
  id=${this.filterPanelId}
@@ -908,10 +902,10 @@ var A = 250, j = 0, M = class extends s {
908
902
  }
909
903
  let r = this.mergedLabels, i = this.columnLabel(e), a = t.view, o = t.selection.values, s = [
910
904
  ...o,
911
- ...(a?.matching ?? []).filter((e) => !k(o, e.value)),
912
- ...(a?.remaining ?? []).filter((e) => !k(o, e.value))
913
- ], u = (e) => !!a && k(a.remaining, e);
914
- l(D`
905
+ ...(a?.matching ?? []).filter((e) => !j(o, e.value)),
906
+ ...(a?.remaining ?? []).filter((e) => !j(o, e.value))
907
+ ], u = (e) => !!a && j(a.remaining, e);
908
+ l(k`
915
909
  <button
916
910
  type="button"
917
911
  class="filter-clear"
@@ -936,28 +930,28 @@ var A = 250, j = 0, M = class extends s {
936
930
  ${r.filterInvert}
937
931
  </button>
938
932
  <div class="filter-options" role="group" aria-label=${r.filterGroup(i)}>
939
- ${t.loading ? D`<span class="filter-loading">${r.loading}</span>` : c}
940
- ${d(s, (e) => e.value, (t) => D`
941
- <label class=${m({
933
+ ${t.loading ? k`<span class="filter-loading">${r.loading}</span>` : c}
934
+ ${d(s, (e) => e.value, (t) => k`
935
+ <label class=${g({
942
936
  "filter-option": !0,
943
937
  "filter-remaining": u(t.value)
944
938
  })}>
945
939
  <input
946
940
  type="checkbox"
947
- .checked=${k(o, t.value)}
941
+ .checked=${j(o, t.value)}
948
942
  @change=${(n) => this.onFilterToggle(e.name, t, n.target.checked)}
949
943
  />
950
944
  <span>${t.label}</span>
951
945
  </label>
952
946
  `)}
953
- ${s.length === 0 && !t.loading ? D`<span class="filter-no-values">${r.filterNoValues}</span>` : c}
947
+ ${s.length === 0 && !t.loading ? k`<span class="filter-no-values">${r.filterNoValues}</span>` : c}
954
948
  </div>
955
- ${a?.hasMore ? D`<span class="filter-has-more">${r.filterHasMore}</span>` : c}
949
+ ${a?.hasMore ? k`<span class="filter-has-more">${r.filterHasMore}</span>` : c}
956
950
  `, n);
957
951
  }
958
952
  renderComparisonFilterPanel(e, t, n) {
959
- let r = this.mergedLabels, i = this.columnLabel(e), a = e.filterOperators?.length ? e.filterOperators : _, o = t.selection.operator ?? a[0], s = t.selection.operand, c = e.filterInputType ?? "number", u = () => n.querySelector(".filter-operand")?.value ?? "", d = () => n.querySelector(".filter-operator")?.value ?? o;
960
- l(D`
953
+ let r = this.mergedLabels, i = this.columnLabel(e), a = e.filterOperators?.length ? e.filterOperators : y, o = t.selection.operator ?? a[0], s = t.selection.operand, c = e.filterInputType ?? "number", u = () => n.querySelector(".filter-operand")?.value ?? "", d = () => n.querySelector(".filter-operator")?.value ?? o;
954
+ l(k`
961
955
  <button
962
956
  type="button"
963
957
  class="filter-clear"
@@ -972,16 +966,16 @@ var A = 250, j = 0, M = class extends s {
972
966
  aria-label=${r.filterOperator}
973
967
  @change=${() => this.applyComparison(e.name, d(), u())}
974
968
  >
975
- ${a.map((e) => D`
969
+ ${a.map((e) => k`
976
970
  <option value=${e} ?selected=${e === o}>
977
- ${g[e]} ${r.filterOperatorLabel(e)}
971
+ ${v[e]} ${r.filterOperatorLabel(e)}
978
972
  </option>
979
973
  `)}
980
974
  </select>
981
975
  <input
982
976
  class="filter-operand"
983
977
  type=${c}
984
- .value=${p(t.operandText)}
978
+ .value=${h(t.operandText)}
985
979
  aria-label=${r.filterOperand}
986
980
  @input=${() => this.applyComparison(e.name, d(), u())}
987
981
  />
@@ -991,7 +985,7 @@ var A = 250, j = 0, M = class extends s {
991
985
  onFilterToggle(e, t, n) {
992
986
  let r = this.filterState(e);
993
987
  if (!r) return;
994
- let i = n ? [...r.selection.values, t] : r.selection.values.filter((e) => !O(e.value, t.value));
988
+ let i = n ? [...r.selection.values, t] : r.selection.values.filter((e) => !A(e.value, t.value));
995
989
  r.ctx.apply(i, r.selection.inverse);
996
990
  }
997
991
  onFilterClear(e) {
@@ -999,22 +993,22 @@ var A = 250, j = 0, M = class extends s {
999
993
  t && (t.ctx.clear(), this.filterOverlay.portalContainer?.querySelector(".filter-search, .filter-operand")?.focus({ preventScroll: !0 }));
1000
994
  }
1001
995
  renderFilterRow(e) {
1002
- return D`
996
+ return k`
1003
997
  <tr role="row" aria-rowindex="2" class="filter-row">
1004
- ${this._tree ? D`<th class="filter-cell tree-chevron-cell"></th>` : c}
1005
- ${e ? D`<th class="filter-cell checkbox-cell"></th>` : c}
998
+ ${this._tree ? k`<th class="filter-cell tree-chevron-cell"></th>` : c}
999
+ ${e ? k`<th class="filter-cell checkbox-cell"></th>` : c}
1006
1000
  ${this._columns.map((e) => this.renderFilterCell(e))}
1007
1001
  </tr>
1008
1002
  `;
1009
1003
  }
1010
1004
  renderFilterCell(e) {
1011
- if (!e.filterable) return D`<th class="filter-cell p-0" data-column=${e.name} scope="col"></th>`;
1005
+ if (!e.filterable) return k`<th class="filter-cell p-0" data-column=${e.name} scope="col"></th>`;
1012
1006
  let t = this._openFilterColumn === e.name, n = this.mergedLabels, r = this.columnLabel(e), i = e.filterActive ? n.filterColumnActive(r, e.filterSummary) : n.filterColumn(r);
1013
- return D`
1007
+ return k`
1014
1008
  <th class="filter-cell p-0" data-column=${e.name} scope="col">
1015
1009
  <button
1016
1010
  type="button"
1017
- class=${m({
1011
+ class=${g({
1018
1012
  "filter-trigger": !0,
1019
1013
  "p-2": !0,
1020
1014
  "rounded-0": !0,
@@ -1030,7 +1024,7 @@ var A = 250, j = 0, M = class extends s {
1030
1024
  <svg class="filter-icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false">
1031
1025
  <path d="M2 3h12l-4.5 5.25V13L6.5 11.5V8.25L2 3z" />
1032
1026
  </svg>
1033
- ${e.filterSummary ? D`<span class="filter-summary">${e.filterSummary}</span>` : c}
1027
+ ${e.filterSummary ? k`<span class="filter-summary">${e.filterSummary}</span>` : c}
1034
1028
  </button>
1035
1029
  </th>
1036
1030
  `;
@@ -1070,7 +1064,7 @@ var A = 250, j = 0, M = class extends s {
1070
1064
  let n = e.sortable ?? !0, r = this._sortColumns.findIndex((t) => t.property === e.name), i = r >= 0 ? this._sortColumns[r].direction : null, a = this._columnWidths.get(e.name) ?? e.width, o = e.headerRenderer ? e.headerRenderer(e) : e.label ?? e.name;
1071
1065
  this.deriveHeaderLabel(e, o);
1072
1066
  let s = {};
1073
- return typeof a == "number" && (s.width = `${a}px`, s.minWidth = `${a}px`), D`
1067
+ return typeof a == "number" && (s.width = `${a}px`, s.minWidth = `${a}px`), k`
1074
1068
  <th
1075
1069
  scope="col"
1076
1070
  data-column=${e.name}
@@ -1078,17 +1072,17 @@ var A = 250, j = 0, M = class extends s {
1078
1072
  aria-sort=${i ? i === "ascending" ? "ascending" : "descending" : "none"}
1079
1073
  style=${f(s)}
1080
1074
  >
1081
- ${n ? D`<button
1075
+ ${n ? k`<button
1082
1076
  type="button"
1083
1077
  class="header-cell header-sort"
1084
1078
  @click=${(t) => this.onHeaderClick(e, t)}
1085
1079
  >
1086
- <span>${L(o)}</span>
1087
- ${r >= 0 && this._sortColumns.length > 1 ? D`<span class="sort-index">${r + 1}</span>` : c}
1088
- </button>` : D`<span class="header-cell">
1089
- <span>${L(o)}</span>
1080
+ <span>${z(o)}</span>
1081
+ ${r >= 0 && this._sortColumns.length > 1 ? k`<span class="sort-index">${r + 1}</span>` : c}
1082
+ </button>` : k`<span class="header-cell">
1083
+ <span>${z(o)}</span>
1090
1084
  </span>`}
1091
- ${this.isColumnResizable(e) ? D`<span
1085
+ ${this.isColumnResizable(e) ? k`<span
1092
1086
  class="resize-handle"
1093
1087
  role="separator"
1094
1088
  tabindex="0"
@@ -1104,8 +1098,8 @@ var A = 250, j = 0, M = class extends s {
1104
1098
  `;
1105
1099
  }
1106
1100
  renderRow(e, t, n, r) {
1107
- let { row: i, depth: a, isExpanded: o, isPlaceholder: s } = e, l = !s && this._selectedIds.has(t), u = !s && this._cutIds.has(t), d = !s && this._focusedRowKey === t, p = s ? 0 : this.extractChildCount(i), h = this._tree && !s && p > 0, g = !s && i != null && this.isParentIndeterminate(i, t);
1108
- return D`
1101
+ let { row: i, depth: a, isExpanded: o, isPlaceholder: s } = e, l = !s && this._selectedIds.has(t), u = !s && this._cutIds.has(t), d = !s && this._focusedRowKey === t, p = s ? 0 : this.extractChildCount(i), m = this._tree && !s && p > 0, h = !s && i != null && this.isParentIndeterminate(i, t);
1102
+ return k`
1109
1103
  <tr
1110
1104
  role="row"
1111
1105
  aria-rowindex=${n + 1 + (this.hasFilterRow ? 2 : 1)}
@@ -1129,8 +1123,8 @@ var A = 250, j = 0, M = class extends s {
1129
1123
  @contextmenu=${s ? null : (e) => this.onRowContextMenu(i, t, n, e)}
1130
1124
  @keydown=${s ? null : (r) => this.onRowKeydown(i, t, n, e.parentId, a, o, p, r)}
1131
1125
  >
1132
- ${this._tree ? D`<td class="tree-chevron-cell" style=${f({ paddingInlineStart: `${a * this._treeIndent}rem` })}>
1133
- ${h ? D`<button
1126
+ ${this._tree ? k`<td class="tree-chevron-cell" style=${f({ paddingInlineStart: `${a * this._treeIndent}rem` })}>
1127
+ ${m ? k`<button
1134
1128
  type="button"
1135
1129
  class="tree-chevron"
1136
1130
  aria-label=${o ? this.mergedLabels.collapseRow : this.mergedLabels.expandRow}
@@ -1139,17 +1133,17 @@ var A = 250, j = 0, M = class extends s {
1139
1133
  @click=${(t) => this.toggleExpand(i, e.parentId, a, t)}
1140
1134
  >${o ? "▾" : "▸"}</button>` : c}
1141
1135
  </td>` : c}
1142
- ${r ? D`<td
1143
- class=${m({
1136
+ ${r ? k`<td
1137
+ class=${g({
1144
1138
  "checkbox-cell": !0,
1145
1139
  "checkbox-cell-toggles": this._selectionMode === "checkbox"
1146
1140
  })}
1147
1141
  @click=${s ? (e) => e.stopPropagation() : (e) => this.onCheckboxCellClick(i, t, e)}
1148
1142
  @dblclick=${(e) => e.stopPropagation()}
1149
1143
  >
1150
- ${s ? c : D`<mp-checkbox
1144
+ ${s ? c : k`<mp-checkbox
1151
1145
  .checked=${l}
1152
- .indeterminate=${g}
1146
+ .indeterminate=${h}
1153
1147
  @change=${() => this.onRowCheckboxToggle(i, t)}
1154
1148
  ></mp-checkbox>`}
1155
1149
  </td>` : c}
@@ -1157,7 +1151,7 @@ var A = 250, j = 0, M = class extends s {
1157
1151
  depth: a,
1158
1152
  isExpanded: o,
1159
1153
  isPlaceholder: s
1160
- }) : s ? D`<td colspan=${this._columns.length} class="tree-placeholder-cell" aria-label=${this.mergedLabels.loading}>…</td>` : this._columns.map((e) => this.renderCell(i, e, n))}
1154
+ }) : s ? k`<td colspan=${this._columns.length} class="tree-placeholder-cell" aria-label=${this.mergedLabels.loading}>…</td>` : this._columns.map((e) => this.renderCell(i, e, n))}
1161
1155
  </tr>
1162
1156
  `;
1163
1157
  }
@@ -1173,8 +1167,8 @@ var A = 250, j = 0, M = class extends s {
1173
1167
  }
1174
1168
  renderRowFromRenderer(e, t, n) {
1175
1169
  let r = this._rowRenderer(e, t, n);
1176
- if (r == null) return n.isPlaceholder ? D`<td colspan=${this._columns.length} class="tree-placeholder-cell" aria-label=${this.mergedLabels.loading}>…</td>` : this._columns.map((n) => this.renderCell(e, n, t));
1177
- if (Array.isArray(r) || I(r)) {
1170
+ if (r == null) return n.isPlaceholder ? k`<td colspan=${this._columns.length} class="tree-placeholder-cell" aria-label=${this.mergedLabels.loading}>…</td>` : this._columns.map((n) => this.renderCell(e, n, t));
1171
+ if (Array.isArray(r) || R(r)) {
1178
1172
  let e = [];
1179
1173
  for (let t of r) e.push(t);
1180
1174
  return e;
@@ -1182,12 +1176,12 @@ var A = 250, j = 0, M = class extends s {
1182
1176
  return r;
1183
1177
  }
1184
1178
  renderCell(e, t, n) {
1185
- let r = t.cellRenderer ? t.cellRenderer(e, t, n) : F(e, t);
1186
- return D`<td class=${t.cellClass ?? ""} data-column=${t.name}>${L(r)}</td>`;
1179
+ let r = t.cellRenderer ? t.cellRenderer(e, t, n) : L(e, t);
1180
+ return k`<td class=${t.cellClass ?? ""} data-column=${t.name}>${z(r)}</td>`;
1187
1181
  }
1188
1182
  renderFooter(e) {
1189
1183
  let t = Array.from({ length: e }, (e, t) => t + 1);
1190
- return D`
1184
+ return k`
1191
1185
  <div class="datatable-footer">
1192
1186
  <mp-pagination
1193
1187
  class="datatable-per-page"
@@ -1223,7 +1217,7 @@ var A = 250, j = 0, M = class extends s {
1223
1217
  getEffectiveData() {
1224
1218
  if (this._tree || this.isRootWindowed()) return this.getFlatList().map((e) => e.row);
1225
1219
  let e = this._data;
1226
- if (this._autoSort && this._sortColumns.length > 0 && (e = x(e, this._sortColumns)), this._pagination && !this.isExternallyPaged()) {
1220
+ if (this._autoSort && this._sortColumns.length > 0 && (e = C(e, this._sortColumns)), this._pagination && !this.isExternallyPaged()) {
1227
1221
  let t = (this._page - 1) * this._perPage;
1228
1222
  e = e.slice(t, t + this._perPage);
1229
1223
  }
@@ -1265,7 +1259,7 @@ var A = 250, j = 0, M = class extends s {
1265
1259
  isPlaceholder: !1
1266
1260
  }));
1267
1261
  }
1268
- let e = [], t = Math.max(1, this._perPage), n = (e) => this._autoSort && this._sortColumns.length > 0 ? x(e, this._sortColumns) : e, r = (t, i, a) => {
1262
+ let e = [], t = Math.max(1, this._perPage), n = (e) => this._autoSort && this._sortColumns.length > 0 ? C(e, this._sortColumns) : e, r = (t, i, a) => {
1269
1263
  let o = this.extractId(t), s = o != null && this._expandedIds.has(o), c = this.extractChildCount(t);
1270
1264
  if (e.push({
1271
1265
  row: t,
@@ -1311,13 +1305,13 @@ var A = 250, j = 0, M = class extends s {
1311
1305
  }) : r(o, 0, null);
1312
1306
  }
1313
1307
  } else {
1314
- let e = this._autoSort && this._sortColumns.length > 0 ? x(this._data, this._sortColumns) : this._data;
1308
+ let e = this._autoSort && this._sortColumns.length > 0 ? C(this._data, this._sortColumns) : this._data;
1315
1309
  for (let t of e) r(t, 0, null);
1316
1310
  }
1317
1311
  return this._cachedFlatList = e;
1318
1312
  }
1319
1313
  localSortedRows() {
1320
- return this._autoSort && this._sortColumns.length > 0 ? x(this._data, this._sortColumns) : this._data;
1314
+ return this._autoSort && this._sortColumns.length > 0 ? C(this._data, this._sortColumns) : this._data;
1321
1315
  }
1322
1316
  freshFlatList() {
1323
1317
  return this._cachedFlatList = null, this.getFlatList();
@@ -1425,6 +1419,9 @@ var A = 250, j = 0, M = class extends s {
1425
1419
  composed: !0
1426
1420
  }));
1427
1421
  }
1422
+ invalidateFetches() {
1423
+ this._fetchGeneration++, this._fetchAbort.abort(), this._fetchAbort = new AbortController();
1424
+ }
1428
1425
  async fetchWindowPage(e) {
1429
1426
  if (!this._fetch || e <= 1) return;
1430
1427
  this._pendingPageFetches.add(e);
@@ -1434,14 +1431,16 @@ var A = 250, j = 0, M = class extends s {
1434
1431
  parentId: null,
1435
1432
  page: e,
1436
1433
  perPage: this._perPage,
1437
- sortColumns: [...this._sortColumns]
1434
+ sortColumns: [...this._sortColumns],
1435
+ signal: this._fetchAbort.signal
1438
1436
  });
1439
1437
  if (t !== this._fetchGeneration || !this._fetch) return;
1440
1438
  this._pendingPageFetches.delete(e), this._pageCache.set(e, [...n?.data ?? []]);
1441
1439
  let r = n?.totalRecords == null ? null : Math.max(0, Math.floor(n.totalRecords));
1442
1440
  r != null && (this._totalRecords = r), this.requestUpdate();
1443
1441
  } catch (t) {
1444
- this._pendingPageFetches.delete(e), console.error("[mp-datatable] fetch failed for root page", e, t);
1442
+ if (this._pendingPageFetches.delete(e), m(t)) return;
1443
+ console.error("[mp-datatable] fetch failed for root page", e, t);
1445
1444
  }
1446
1445
  }
1447
1446
  async fetchChildren(e) {
@@ -1453,12 +1452,14 @@ var A = 250, j = 0, M = class extends s {
1453
1452
  parentId: e,
1454
1453
  page: 1,
1455
1454
  perPage: this._perPage,
1456
- sortColumns: [...this._sortColumns]
1455
+ sortColumns: [...this._sortColumns],
1456
+ signal: this._fetchAbort.signal
1457
1457
  });
1458
1458
  if (t !== this._fetchGeneration || !this._fetch) return;
1459
1459
  this._pendingFetches.delete(e), this._childCache.set(e, [...n?.data ?? []]), this._childTotals.set(e, n?.totalRecords ?? n?.data?.length ?? 0), this.requestUpdate();
1460
1460
  } catch (t) {
1461
- this._pendingFetches.delete(e), console.error("[mp-datatable] fetch failed for children of", e, t);
1461
+ if (this._pendingFetches.delete(e), m(t)) return;
1462
+ console.error("[mp-datatable] fetch failed for children of", e, t);
1462
1463
  }
1463
1464
  }
1464
1465
  async loadPage(e) {
@@ -1469,10 +1470,11 @@ var A = 250, j = 0, M = class extends s {
1469
1470
  parentId: null,
1470
1471
  page: e,
1471
1472
  perPage: this._perPage,
1472
- sortColumns: [...this._sortColumns]
1473
+ sortColumns: [...this._sortColumns],
1474
+ signal: this._fetchAbort.signal
1473
1475
  });
1474
1476
  } catch (t) {
1475
- console.error("[mp-datatable] fetch failed for page", e, t);
1477
+ m(t) || console.error("[mp-datatable] fetch failed for page", e, t);
1476
1478
  return;
1477
1479
  }
1478
1480
  if (t !== this._fetchGeneration || !this._fetch) return;
@@ -1488,7 +1490,7 @@ var A = 250, j = 0, M = class extends s {
1488
1490
  pp: this._perPage,
1489
1491
  p: this._virtualScroll ? 1 : this._page
1490
1492
  });
1491
- this._initialFetchDone && e === this._lastReloadKey || (this._lastReloadKey = e, this._fetchGeneration++, this._pageCache.clear(), this._pendingPageFetches.clear(), this._childCache.clear(), this._childTotals.clear(), this._pendingFetches.clear(), this.loadPage(this._virtualScroll ? 1 : this._page));
1493
+ this._initialFetchDone && e === this._lastReloadKey || (this._lastReloadKey = e, this.invalidateFetches(), this._pageCache.clear(), this._pendingPageFetches.clear(), this._childCache.clear(), this._childTotals.clear(), this._pendingFetches.clear(), this.loadPage(this._virtualScroll ? 1 : this._page));
1492
1494
  }));
1493
1495
  }
1494
1496
  onRowKeydown(e, t, n, r, i, a, o, s) {
@@ -1529,7 +1531,7 @@ var A = 250, j = 0, M = class extends s {
1529
1531
  return !0;
1530
1532
  }
1531
1533
  onHeaderClick(e, t) {
1532
- let n = b(this._sortColumns, e.name, t.shiftKey);
1534
+ let n = S(this._sortColumns, e.name, t.shiftKey);
1533
1535
  this._sortColumns = n, this._page = 1;
1534
1536
  let r = n.find((t) => t.property === e.name);
1535
1537
  this.liveAnnouncer.announce(this.mergedLabels.announceSorted(this.columnLabel(e), r ? r.direction === "ascending" ? "ascending" : "descending" : "none")), this.requestUpdate(), this.scheduleFetchReload(), this.dispatchEvent(new CustomEvent("mp-datatable-sort-change", {
@@ -1692,7 +1694,7 @@ var A = 250, j = 0, M = class extends s {
1692
1694
  this.isColumnResizable(e) && (t.key === "Enter" ? (t.preventDefault(), t.stopPropagation(), this.openResizePanel(e)) : (t.key === "ArrowLeft" || t.key === "ArrowRight") && (t.preventDefault(), t.stopPropagation(), this.stepColumnWidth(e, t.key === "ArrowRight" ? 10 : -10)));
1693
1695
  }
1694
1696
  stepColumnWidth(e, t) {
1695
- this.freezeColumnWidths(), this.setUserColumnWidth(e.name, w(this.currentColumnWidth(e), t));
1697
+ this.freezeColumnWidths(), this.setUserColumnWidth(e.name, E(this.currentColumnWidth(e), t));
1696
1698
  }
1697
1699
  onResizeHandleFocus() {
1698
1700
  this._resizeHintAnnounced || (this._resizeHintAnnounced = !0, this.liveAnnouncer.announce(this.mergedLabels.resizeColumnHint));
@@ -1719,7 +1721,7 @@ var A = 250, j = 0, M = class extends s {
1719
1721
  let t = this._columns.find((e) => e.name === this._openResizeColumn);
1720
1722
  if (!t) return;
1721
1723
  let n = this.mergedLabels, r = this.columnLabel(t), i = Math.round(this.currentColumnWidth(t));
1722
- l(D`
1724
+ l(k`
1723
1725
  <div class="resize-panel" role="dialog" aria-label=${n.resizeColumnOptions(r)}>
1724
1726
  <div class="resize-panel-steps">
1725
1727
  <button
@@ -1748,7 +1750,7 @@ var A = 250, j = 0, M = class extends s {
1748
1750
  fitColumnWidth(e) {
1749
1751
  let t = this.renderRoot;
1750
1752
  if (!t) return;
1751
- let n = this.headerCell(e.name), r = n?.querySelector(".header-cell > span") ?? null, i = n?.querySelector(".header-cell") ?? null, a = [...t.querySelectorAll(`tbody tr[data-row-key] > td[data-column="${e.name}"]`)], o = E([r && i && n ? N(r) + P(i) + P(n) : NaN, ...a.map((e) => N(e) + P(e))]);
1753
+ let n = this.headerCell(e.name), r = n?.querySelector(".header-cell > span") ?? null, i = n?.querySelector(".header-cell") ?? null, a = [...t.querySelectorAll(`tbody tr[data-row-key] > td[data-column="${e.name}"]`)], o = O([r && i && n ? F(r) + I(i) + I(n) : NaN, ...a.map((e) => F(e) + I(e))]);
1752
1754
  o != null && this.setUserColumnWidth(e.name, o);
1753
1755
  }
1754
1756
  resetColumnWidth(e) {
@@ -1760,27 +1762,27 @@ var A = 250, j = 0, M = class extends s {
1760
1762
  this._columnWidths = new Map(this._columnWidths), typeof t == "number" ? this._columnWidths.set(e.name, t) : this._columnWidths.delete(e.name), this.requestUpdate();
1761
1763
  }
1762
1764
  };
1763
- function N(e) {
1765
+ function F(e) {
1764
1766
  let t = e.ownerDocument;
1765
1767
  if (typeof t.createRange != "function") return NaN;
1766
1768
  let n = t.createRange();
1767
1769
  return n.selectNodeContents(e), typeof n.getBoundingClientRect == "function" ? n.getBoundingClientRect().width : NaN;
1768
1770
  }
1769
- function P(e) {
1771
+ function I(e) {
1770
1772
  let t = getComputedStyle(e);
1771
1773
  return (parseFloat(t.paddingLeft) || 0) + (parseFloat(t.paddingRight) || 0);
1772
1774
  }
1773
- function F(e, t) {
1775
+ function L(e, t) {
1774
1776
  if (typeof e != "object" || !e) return "";
1775
1777
  let n = e[t.name];
1776
1778
  return n == null ? "" : String(n);
1777
1779
  }
1778
- function I(e) {
1780
+ function R(e) {
1779
1781
  return e != null && typeof e != "string" && typeof e[Symbol.iterator] == "function";
1780
1782
  }
1781
- function L(e) {
1783
+ function z(e) {
1782
1784
  return e == null || e === !1 ? c : (e instanceof Node || typeof e == "object" && "_$litType$" in e, e);
1783
1785
  }
1784
- i("datatable", y), typeof customElements < "u" && !customElements.get("mp-datatable") && customElements.define("mp-datatable", M);
1786
+ i("datatable", x), typeof customElements < "u" && !customElements.get("mp-datatable") && customElements.define("mp-datatable", P);
1785
1787
  //#endregion
1786
- export { v as a, y as i, x as n, b as r, M as t };
1788
+ export { b as a, x as i, C as n, S as r, P as t };