argus-table 0.0.0-stage → 0.0.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/LICENSE +21 -0
- package/README.md +66 -2
- package/dist/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorate.js +8 -0
- package/dist/argus-table.js +492 -0
- package/dist/argus-table.js.map +1 -0
- package/dist/cdn/argus-table.js +4743 -0
- package/dist/cdn/argus-table.js.map +1 -0
- package/dist/controllers/resize-drag.js +44 -0
- package/dist/controllers/resize-drag.js.map +1 -0
- package/dist/controllers/table-controller.js +24 -0
- package/dist/controllers/table-controller.js.map +1 -0
- package/dist/controllers/virtual-controller.js +83 -0
- package/dist/controllers/virtual-controller.js.map +1 -0
- package/dist/core/src/columns/resolve-columns.js +62 -0
- package/dist/core/src/columns/resolve-columns.js.map +1 -0
- package/dist/core/src/state/controllable.js +31 -0
- package/dist/core/src/state/controllable.js.map +1 -0
- package/dist/core/src/table/create-table.js +185 -0
- package/dist/core/src/table/create-table.js.map +1 -0
- package/dist/core/src/virtual/row-pool.js +64 -0
- package/dist/core/src/virtual/row-pool.js.map +1 -0
- package/dist/custom-elements.json +1131 -0
- package/dist/events.js +22 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +236 -0
- package/dist/index.js +3 -0
- package/dist/render/body.js +49 -0
- package/dist/render/body.js.map +1 -0
- package/dist/render/cells.js +27 -0
- package/dist/render/cells.js.map +1 -0
- package/dist/render/content.js +35 -0
- package/dist/render/content.js.map +1 -0
- package/dist/render/header.js +62 -0
- package/dist/render/header.js.map +1 -0
- package/dist/styles/base.js +235 -0
- package/dist/styles/base.js.map +1 -0
- package/package.json +61 -3
|
@@ -0,0 +1,4743 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js
|
|
2
|
+
var e = globalThis, t = e.ShadowRoot && (e.ShadyCSS === void 0 || e.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, n = Symbol(), r = /* @__PURE__ */ new WeakMap(), i = class {
|
|
3
|
+
constructor(e, t, r) {
|
|
4
|
+
if (this._$cssResult$ = !0, r !== n) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
5
|
+
this.cssText = e, this.t = t;
|
|
6
|
+
}
|
|
7
|
+
get styleSheet() {
|
|
8
|
+
let e = this.o, n = this.t;
|
|
9
|
+
if (t && e === void 0) {
|
|
10
|
+
let t = n !== void 0 && n.length === 1;
|
|
11
|
+
t && (e = r.get(n)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), t && r.set(n, e));
|
|
12
|
+
}
|
|
13
|
+
return e;
|
|
14
|
+
}
|
|
15
|
+
toString() {
|
|
16
|
+
return this.cssText;
|
|
17
|
+
}
|
|
18
|
+
}, a = (e) => new i(typeof e == "string" ? e : e + "", void 0, n), o = (e, ...t) => new i(e.length === 1 ? e[0] : t.reduce((t, n, r) => t + ((e) => {
|
|
19
|
+
if (!0 === e._$cssResult$) return e.cssText;
|
|
20
|
+
if (typeof e == "number") return e;
|
|
21
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + e + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
22
|
+
})(n) + e[r + 1], e[0]), e, n), s = (n, r) => {
|
|
23
|
+
if (t) n.adoptedStyleSheets = r.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
24
|
+
else for (let t of r) {
|
|
25
|
+
let r = document.createElement("style"), i = e.litNonce;
|
|
26
|
+
i !== void 0 && r.setAttribute("nonce", i), r.textContent = t.cssText, n.appendChild(r);
|
|
27
|
+
}
|
|
28
|
+
}, c = t ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((e) => {
|
|
29
|
+
let t = "";
|
|
30
|
+
for (let n of e.cssRules) t += n.cssText;
|
|
31
|
+
return a(t);
|
|
32
|
+
})(e) : e, { is: l, defineProperty: u, getOwnPropertyDescriptor: d, getOwnPropertyNames: f, getOwnPropertySymbols: p, getPrototypeOf: m } = Object, h = globalThis, ee = h.trustedTypes, te = ee ? ee.emptyScript : "", g = h.reactiveElementPolyfillSupport, _ = (e, t) => e, v = {
|
|
33
|
+
toAttribute(e, t) {
|
|
34
|
+
switch (t) {
|
|
35
|
+
case Boolean:
|
|
36
|
+
e = e ? te : null;
|
|
37
|
+
break;
|
|
38
|
+
case Object:
|
|
39
|
+
case Array: e = e == null ? e : JSON.stringify(e);
|
|
40
|
+
}
|
|
41
|
+
return e;
|
|
42
|
+
},
|
|
43
|
+
fromAttribute(e, t) {
|
|
44
|
+
let n = e;
|
|
45
|
+
switch (t) {
|
|
46
|
+
case Boolean:
|
|
47
|
+
n = e !== null;
|
|
48
|
+
break;
|
|
49
|
+
case Number:
|
|
50
|
+
n = e === null ? null : Number(e);
|
|
51
|
+
break;
|
|
52
|
+
case Object:
|
|
53
|
+
case Array: try {
|
|
54
|
+
n = JSON.parse(e);
|
|
55
|
+
} catch {
|
|
56
|
+
n = null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return n;
|
|
60
|
+
}
|
|
61
|
+
}, y = (e, t) => !l(e, t), ne = {
|
|
62
|
+
attribute: !0,
|
|
63
|
+
type: String,
|
|
64
|
+
converter: v,
|
|
65
|
+
reflect: !1,
|
|
66
|
+
useDefault: !1,
|
|
67
|
+
hasChanged: y
|
|
68
|
+
};
|
|
69
|
+
Symbol.metadata ??= Symbol("metadata"), h.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
70
|
+
var b = class extends HTMLElement {
|
|
71
|
+
static addInitializer(e) {
|
|
72
|
+
this._$Ei(), (this.l ??= []).push(e);
|
|
73
|
+
}
|
|
74
|
+
static get observedAttributes() {
|
|
75
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
76
|
+
}
|
|
77
|
+
static createProperty(e, t = ne) {
|
|
78
|
+
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
79
|
+
let n = Symbol(), r = this.getPropertyDescriptor(e, n, t);
|
|
80
|
+
r !== void 0 && u(this.prototype, e, r);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
static getPropertyDescriptor(e, t, n) {
|
|
84
|
+
let { get: r, set: i } = d(this.prototype, e) ?? {
|
|
85
|
+
get() {
|
|
86
|
+
return this[t];
|
|
87
|
+
},
|
|
88
|
+
set(e) {
|
|
89
|
+
this[t] = e;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
return {
|
|
93
|
+
get: r,
|
|
94
|
+
set(t) {
|
|
95
|
+
let a = r?.call(this);
|
|
96
|
+
i?.call(this, t), this.requestUpdate(e, a, n);
|
|
97
|
+
},
|
|
98
|
+
configurable: !0,
|
|
99
|
+
enumerable: !0
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
static getPropertyOptions(e) {
|
|
103
|
+
return this.elementProperties.get(e) ?? ne;
|
|
104
|
+
}
|
|
105
|
+
static _$Ei() {
|
|
106
|
+
if (this.hasOwnProperty(_("elementProperties"))) return;
|
|
107
|
+
let e = m(this);
|
|
108
|
+
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
109
|
+
}
|
|
110
|
+
static finalize() {
|
|
111
|
+
if (this.hasOwnProperty(_("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(_("properties"))) {
|
|
113
|
+
let e = this.properties, t = [...f(e), ...p(e)];
|
|
114
|
+
for (let n of t) this.createProperty(n, e[n]);
|
|
115
|
+
}
|
|
116
|
+
let e = this[Symbol.metadata];
|
|
117
|
+
if (e !== null) {
|
|
118
|
+
let t = litPropertyMetadata.get(e);
|
|
119
|
+
if (t !== void 0) for (let [e, n] of t) this.elementProperties.set(e, n);
|
|
120
|
+
}
|
|
121
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
122
|
+
for (let [e, t] of this.elementProperties) {
|
|
123
|
+
let n = this._$Eu(e, t);
|
|
124
|
+
n !== void 0 && this._$Eh.set(n, e);
|
|
125
|
+
}
|
|
126
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
|
+
}
|
|
128
|
+
static finalizeStyles(e) {
|
|
129
|
+
let t = [];
|
|
130
|
+
if (Array.isArray(e)) {
|
|
131
|
+
let n = new Set(e.flat(1 / 0).reverse());
|
|
132
|
+
for (let e of n) t.unshift(c(e));
|
|
133
|
+
} else e !== void 0 && t.push(c(e));
|
|
134
|
+
return t;
|
|
135
|
+
}
|
|
136
|
+
static _$Eu(e, t) {
|
|
137
|
+
let n = t.attribute;
|
|
138
|
+
return !1 === n ? void 0 : typeof n == "string" ? n : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
139
|
+
}
|
|
140
|
+
constructor() {
|
|
141
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
142
|
+
}
|
|
143
|
+
_$Ev() {
|
|
144
|
+
this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((e) => e(this));
|
|
145
|
+
}
|
|
146
|
+
addController(e) {
|
|
147
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
|
|
148
|
+
}
|
|
149
|
+
removeController(e) {
|
|
150
|
+
this._$EO?.delete(e);
|
|
151
|
+
}
|
|
152
|
+
_$E_() {
|
|
153
|
+
let e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
|
|
154
|
+
for (let n of t.keys()) this.hasOwnProperty(n) && (e.set(n, this[n]), delete this[n]);
|
|
155
|
+
e.size > 0 && (this._$Ep = e);
|
|
156
|
+
}
|
|
157
|
+
createRenderRoot() {
|
|
158
|
+
let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
159
|
+
return s(e, this.constructor.elementStyles), e;
|
|
160
|
+
}
|
|
161
|
+
connectedCallback() {
|
|
162
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
|
|
163
|
+
}
|
|
164
|
+
enableUpdating(e) {}
|
|
165
|
+
disconnectedCallback() {
|
|
166
|
+
this._$EO?.forEach((e) => e.hostDisconnected?.());
|
|
167
|
+
}
|
|
168
|
+
attributeChangedCallback(e, t, n) {
|
|
169
|
+
this._$AK(e, n);
|
|
170
|
+
}
|
|
171
|
+
_$ET(e, t) {
|
|
172
|
+
let n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
|
|
173
|
+
if (r !== void 0 && !0 === n.reflect) {
|
|
174
|
+
let i = (n.converter?.toAttribute === void 0 ? v : n.converter).toAttribute(t, n.type);
|
|
175
|
+
this._$Em = e, i == null ? this.removeAttribute(r) : this.setAttribute(r, i), this._$Em = null;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
_$AK(e, t) {
|
|
179
|
+
let n = this.constructor, r = n._$Eh.get(e);
|
|
180
|
+
if (r !== void 0 && this._$Em !== r) {
|
|
181
|
+
let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ? v : e.converter;
|
|
182
|
+
this._$Em = r;
|
|
183
|
+
let a = i.fromAttribute(t, e.type);
|
|
184
|
+
this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
requestUpdate(e, t, n, r = !1, i) {
|
|
188
|
+
if (e !== void 0) {
|
|
189
|
+
let a = this.constructor;
|
|
190
|
+
if (!1 === r && (i = this[e]), n ??= a.getPropertyOptions(e), !((n.hasChanged ?? y)(i, t) || n.useDefault && n.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(a._$Eu(e, n)))) return;
|
|
191
|
+
this.C(e, t, n);
|
|
192
|
+
}
|
|
193
|
+
!1 === this.isUpdatePending && (this._$ES = this._$EP());
|
|
194
|
+
}
|
|
195
|
+
C(e, t, { useDefault: n, reflect: r, wrapped: i }, a) {
|
|
196
|
+
n && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, a ?? t ?? this[e]), !0 !== i || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || n || (t = void 0), this._$AL.set(e, t)), !0 === r && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
|
|
197
|
+
}
|
|
198
|
+
async _$EP() {
|
|
199
|
+
this.isUpdatePending = !0;
|
|
200
|
+
try {
|
|
201
|
+
await this._$ES;
|
|
202
|
+
} catch (e) {
|
|
203
|
+
Promise.reject(e);
|
|
204
|
+
}
|
|
205
|
+
let e = this.scheduleUpdate();
|
|
206
|
+
return e != null && await e, !this.isUpdatePending;
|
|
207
|
+
}
|
|
208
|
+
scheduleUpdate() {
|
|
209
|
+
return this.performUpdate();
|
|
210
|
+
}
|
|
211
|
+
performUpdate() {
|
|
212
|
+
if (!this.isUpdatePending) return;
|
|
213
|
+
if (!this.hasUpdated) {
|
|
214
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
215
|
+
for (let [e, t] of this._$Ep) this[e] = t;
|
|
216
|
+
this._$Ep = void 0;
|
|
217
|
+
}
|
|
218
|
+
let e = this.constructor.elementProperties;
|
|
219
|
+
if (e.size > 0) for (let [t, n] of e) {
|
|
220
|
+
let { wrapped: e } = n, r = this[t];
|
|
221
|
+
!0 !== e || this._$AL.has(t) || r === void 0 || this.C(t, void 0, n, r);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
let e = !1, t = this._$AL;
|
|
225
|
+
try {
|
|
226
|
+
e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach((e) => e.hostUpdate?.()), this.update(t)) : this._$EM();
|
|
227
|
+
} catch (t) {
|
|
228
|
+
throw e = !1, this._$EM(), t;
|
|
229
|
+
}
|
|
230
|
+
e && this._$AE(t);
|
|
231
|
+
}
|
|
232
|
+
willUpdate(e) {}
|
|
233
|
+
_$AE(e) {
|
|
234
|
+
this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
235
|
+
}
|
|
236
|
+
_$EM() {
|
|
237
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
238
|
+
}
|
|
239
|
+
get updateComplete() {
|
|
240
|
+
return this.getUpdateComplete();
|
|
241
|
+
}
|
|
242
|
+
getUpdateComplete() {
|
|
243
|
+
return this._$ES;
|
|
244
|
+
}
|
|
245
|
+
shouldUpdate(e) {
|
|
246
|
+
return !0;
|
|
247
|
+
}
|
|
248
|
+
update(e) {
|
|
249
|
+
this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM();
|
|
250
|
+
}
|
|
251
|
+
updated(e) {}
|
|
252
|
+
firstUpdated(e) {}
|
|
253
|
+
};
|
|
254
|
+
b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[_("elementProperties")] = /* @__PURE__ */ new Map(), b[_("finalized")] = /* @__PURE__ */ new Map(), g?.({ ReactiveElement: b }), (h.reactiveElementVersions ??= []).push("2.1.2");
|
|
255
|
+
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/lit-html.js
|
|
256
|
+
var re = globalThis, ie = (e) => e, ae = re.trustedTypes, oe = ae ? ae.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, se = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, ce = "?" + x, le = `<${ce}>`, S = document, C = () => S.createComment(""), ue = (e) => e === null || typeof e != "object" && typeof e != "function", de = Array.isArray, fe = (e) => de(e) || typeof e?.[Symbol.iterator] == "function", pe = "[ \n\f\r]", me = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, he = /-->/g, ge = />/g, w = RegExp(`>|${pe}(?:([^\\s"'>=/]+)(${pe}*=${pe}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), _e = /'/g, ve = /"/g, ye = /^(?:script|style|textarea|title)$/i, T = ((e) => (t, ...n) => ({
|
|
257
|
+
_$litType$: e,
|
|
258
|
+
strings: t,
|
|
259
|
+
values: n
|
|
260
|
+
}))(1), E = Symbol.for("lit-noChange"), D = Symbol.for("lit-nothing"), be = /* @__PURE__ */ new WeakMap(), O = S.createTreeWalker(S, 129);
|
|
261
|
+
function xe(e, t) {
|
|
262
|
+
if (!de(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
263
|
+
return oe === void 0 ? t : oe.createHTML(t);
|
|
264
|
+
}
|
|
265
|
+
var Se = (e, t) => {
|
|
266
|
+
let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = me;
|
|
267
|
+
for (let t = 0; t < n; t++) {
|
|
268
|
+
let n = e[t], s, c, l = -1, u = 0;
|
|
269
|
+
for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === me ? c[1] === "!--" ? o = he : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = w) : (ye.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = w) : o = ge : o === w ? c[0] === ">" ? (o = i ?? me, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? w : c[3] === "\"" ? ve : _e) : o === ve || o === _e ? o = w : o === he || o === ge ? o = me : (o = w, i = void 0);
|
|
270
|
+
let d = o === w && e[t + 1].startsWith("/>") ? " " : "";
|
|
271
|
+
a += o === me ? n + le : l >= 0 ? (r.push(s), n.slice(0, l) + se + n.slice(l) + x + d) : n + x + (l === -2 ? t : d);
|
|
272
|
+
}
|
|
273
|
+
return [xe(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
274
|
+
}, Ce = class e {
|
|
275
|
+
constructor({ strings: t, _$litType$: n }, r) {
|
|
276
|
+
let i;
|
|
277
|
+
this.parts = [];
|
|
278
|
+
let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = Se(t, n);
|
|
279
|
+
if (this.el = e.createElement(l, r), O.currentNode = this.el.content, n === 2 || n === 3) {
|
|
280
|
+
let e = this.el.content.firstChild;
|
|
281
|
+
e.replaceWith(...e.childNodes);
|
|
282
|
+
}
|
|
283
|
+
for (; (i = O.nextNode()) !== null && c.length < s;) {
|
|
284
|
+
if (i.nodeType === 1) {
|
|
285
|
+
if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith(se)) {
|
|
286
|
+
let t = u[o++], n = i.getAttribute(e).split(x), r = /([.?@])?(.*)/.exec(t);
|
|
287
|
+
c.push({
|
|
288
|
+
type: 1,
|
|
289
|
+
index: a,
|
|
290
|
+
name: r[2],
|
|
291
|
+
strings: n,
|
|
292
|
+
ctor: r[1] === "." ? Ee : r[1] === "?" ? De : r[1] === "@" ? Oe : A
|
|
293
|
+
}), i.removeAttribute(e);
|
|
294
|
+
} else e.startsWith(x) && (c.push({
|
|
295
|
+
type: 6,
|
|
296
|
+
index: a
|
|
297
|
+
}), i.removeAttribute(e));
|
|
298
|
+
if (ye.test(i.tagName)) {
|
|
299
|
+
let e = i.textContent.split(x), t = e.length - 1;
|
|
300
|
+
if (t > 0) {
|
|
301
|
+
i.textContent = ae ? ae.emptyScript : "";
|
|
302
|
+
for (let n = 0; n < t; n++) i.append(e[n], C()), O.nextNode(), c.push({
|
|
303
|
+
type: 2,
|
|
304
|
+
index: ++a
|
|
305
|
+
});
|
|
306
|
+
i.append(e[t], C());
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
} else if (i.nodeType === 8) {
|
|
310
|
+
if (i.data === ce) c.push({
|
|
311
|
+
type: 2,
|
|
312
|
+
index: a
|
|
313
|
+
});
|
|
314
|
+
else {
|
|
315
|
+
let e = -1;
|
|
316
|
+
for (; (e = i.data.indexOf(x, e + 1)) !== -1;) c.push({
|
|
317
|
+
type: 7,
|
|
318
|
+
index: a
|
|
319
|
+
}), e += x.length - 1;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
a++;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
static createElement(e, t) {
|
|
326
|
+
let n = S.createElement("template");
|
|
327
|
+
return n.innerHTML = e, n;
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
function k(e, t, n = e, r) {
|
|
331
|
+
if (t === E) return t;
|
|
332
|
+
let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = ue(t) ? void 0 : t._$litDirective$;
|
|
333
|
+
return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = k(e, i._$AS(e, t.values), i, r)), t;
|
|
334
|
+
}
|
|
335
|
+
var we = class {
|
|
336
|
+
constructor(e, t) {
|
|
337
|
+
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
338
|
+
}
|
|
339
|
+
get parentNode() {
|
|
340
|
+
return this._$AM.parentNode;
|
|
341
|
+
}
|
|
342
|
+
get _$AU() {
|
|
343
|
+
return this._$AM._$AU;
|
|
344
|
+
}
|
|
345
|
+
u(e) {
|
|
346
|
+
let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? S).importNode(t, !0);
|
|
347
|
+
O.currentNode = r;
|
|
348
|
+
let i = O.nextNode(), a = 0, o = 0, s = n[0];
|
|
349
|
+
for (; s !== void 0;) {
|
|
350
|
+
if (a === s.index) {
|
|
351
|
+
let t;
|
|
352
|
+
s.type === 2 ? t = new Te(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new ke(i, this, e)), this._$AV.push(t), s = n[++o];
|
|
353
|
+
}
|
|
354
|
+
a !== s?.index && (i = O.nextNode(), a++);
|
|
355
|
+
}
|
|
356
|
+
return O.currentNode = S, r;
|
|
357
|
+
}
|
|
358
|
+
p(e) {
|
|
359
|
+
let t = 0;
|
|
360
|
+
for (let n of this._$AV) n !== void 0 && (n.strings === void 0 ? n._$AI(e[t]) : (n._$AI(e, n, t), t += n.strings.length - 2)), t++;
|
|
361
|
+
}
|
|
362
|
+
}, Te = class e {
|
|
363
|
+
get _$AU() {
|
|
364
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
365
|
+
}
|
|
366
|
+
constructor(e, t, n, r) {
|
|
367
|
+
this.type = 2, this._$AH = D, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
|
|
368
|
+
}
|
|
369
|
+
get parentNode() {
|
|
370
|
+
let e = this._$AA.parentNode, t = this._$AM;
|
|
371
|
+
return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
|
|
372
|
+
}
|
|
373
|
+
get startNode() {
|
|
374
|
+
return this._$AA;
|
|
375
|
+
}
|
|
376
|
+
get endNode() {
|
|
377
|
+
return this._$AB;
|
|
378
|
+
}
|
|
379
|
+
_$AI(e, t = this) {
|
|
380
|
+
e = k(this, e, t), ue(e) ? e === D || e == null || e === "" ? (this._$AH !== D && this._$AR(), this._$AH = D) : e !== this._$AH && e !== E && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? fe(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
|
|
381
|
+
}
|
|
382
|
+
O(e) {
|
|
383
|
+
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
384
|
+
}
|
|
385
|
+
T(e) {
|
|
386
|
+
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
387
|
+
}
|
|
388
|
+
_(e) {
|
|
389
|
+
this._$AH !== D && ue(this._$AH) ? this._$AA.nextSibling.data = e : this.T(S.createTextNode(e)), this._$AH = e;
|
|
390
|
+
}
|
|
391
|
+
$(e) {
|
|
392
|
+
let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = Ce.createElement(xe(n.h, n.h[0]), this.options)), n);
|
|
393
|
+
if (this._$AH?._$AD === r) this._$AH.p(t);
|
|
394
|
+
else {
|
|
395
|
+
let e = new we(r, this), n = e.u(this.options);
|
|
396
|
+
e.p(t), this.T(n), this._$AH = e;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
_$AC(e) {
|
|
400
|
+
let t = be.get(e.strings);
|
|
401
|
+
return t === void 0 && be.set(e.strings, t = new Ce(e)), t;
|
|
402
|
+
}
|
|
403
|
+
k(t) {
|
|
404
|
+
de(this._$AH) || (this._$AH = [], this._$AR());
|
|
405
|
+
let n = this._$AH, r, i = 0;
|
|
406
|
+
for (let a of t) i === n.length ? n.push(r = new e(this.O(C()), this.O(C()), this, this.options)) : r = n[i], r._$AI(a), i++;
|
|
407
|
+
i < n.length && (this._$AR(r && r._$AB.nextSibling, i), n.length = i);
|
|
408
|
+
}
|
|
409
|
+
_$AR(e = this._$AA.nextSibling, t) {
|
|
410
|
+
for (this._$AP?.(!1, !0, t); e !== this._$AB;) {
|
|
411
|
+
let t = ie(e).nextSibling;
|
|
412
|
+
ie(e).remove(), e = t;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
setConnected(e) {
|
|
416
|
+
this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
|
|
417
|
+
}
|
|
418
|
+
}, A = class {
|
|
419
|
+
get tagName() {
|
|
420
|
+
return this.element.tagName;
|
|
421
|
+
}
|
|
422
|
+
get _$AU() {
|
|
423
|
+
return this._$AM._$AU;
|
|
424
|
+
}
|
|
425
|
+
constructor(e, t, n, r, i) {
|
|
426
|
+
this.type = 1, this._$AH = D, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = D;
|
|
427
|
+
}
|
|
428
|
+
_$AI(e, t = this, n, r) {
|
|
429
|
+
let i = this.strings, a = !1;
|
|
430
|
+
if (i === void 0) e = k(this, e, t, 0), a = !ue(e) || e !== this._$AH && e !== E, a && (this._$AH = e);
|
|
431
|
+
else {
|
|
432
|
+
let r = e, o, s;
|
|
433
|
+
for (e = i[0], o = 0; o < i.length - 1; o++) s = k(this, r[n + o], t, o), s === E && (s = this._$AH[o]), a ||= !ue(s) || s !== this._$AH[o], s === D ? e = D : e !== D && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
|
|
434
|
+
}
|
|
435
|
+
a && !r && this.j(e);
|
|
436
|
+
}
|
|
437
|
+
j(e) {
|
|
438
|
+
e === D ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
439
|
+
}
|
|
440
|
+
}, Ee = class extends A {
|
|
441
|
+
constructor() {
|
|
442
|
+
super(...arguments), this.type = 3;
|
|
443
|
+
}
|
|
444
|
+
j(e) {
|
|
445
|
+
this.element[this.name] = e === D ? void 0 : e;
|
|
446
|
+
}
|
|
447
|
+
}, De = class extends A {
|
|
448
|
+
constructor() {
|
|
449
|
+
super(...arguments), this.type = 4;
|
|
450
|
+
}
|
|
451
|
+
j(e) {
|
|
452
|
+
this.element.toggleAttribute(this.name, !!e && e !== D);
|
|
453
|
+
}
|
|
454
|
+
}, Oe = class extends A {
|
|
455
|
+
constructor(e, t, n, r, i) {
|
|
456
|
+
super(e, t, n, r, i), this.type = 5;
|
|
457
|
+
}
|
|
458
|
+
_$AI(e, t = this) {
|
|
459
|
+
if ((e = k(this, e, t, 0) ?? D) === E) return;
|
|
460
|
+
let n = this._$AH, r = e === D && n !== D || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== D && (n === D || r);
|
|
461
|
+
r && this.element.removeEventListener(this.name, this, n), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
462
|
+
}
|
|
463
|
+
handleEvent(e) {
|
|
464
|
+
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
|
|
465
|
+
}
|
|
466
|
+
}, ke = class {
|
|
467
|
+
constructor(e, t, n) {
|
|
468
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
|
|
469
|
+
}
|
|
470
|
+
get _$AU() {
|
|
471
|
+
return this._$AM._$AU;
|
|
472
|
+
}
|
|
473
|
+
_$AI(e) {
|
|
474
|
+
k(this, e);
|
|
475
|
+
}
|
|
476
|
+
}, Ae = {
|
|
477
|
+
M: se,
|
|
478
|
+
P: x,
|
|
479
|
+
A: ce,
|
|
480
|
+
C: 1,
|
|
481
|
+
L: Se,
|
|
482
|
+
R: we,
|
|
483
|
+
D: fe,
|
|
484
|
+
V: k,
|
|
485
|
+
I: Te,
|
|
486
|
+
H: A,
|
|
487
|
+
N: De,
|
|
488
|
+
U: Oe,
|
|
489
|
+
B: Ee,
|
|
490
|
+
F: ke
|
|
491
|
+
}, je = re.litHtmlPolyfillSupport;
|
|
492
|
+
je?.(Ce, Te), (re.litHtmlVersions ??= []).push("3.3.3");
|
|
493
|
+
var Me = (e, t, n) => {
|
|
494
|
+
let r = n?.renderBefore ?? t, i = r._$litPart$;
|
|
495
|
+
if (i === void 0) {
|
|
496
|
+
let e = n?.renderBefore ?? null;
|
|
497
|
+
r._$litPart$ = i = new Te(t.insertBefore(C(), e), e, void 0, n ?? {});
|
|
498
|
+
}
|
|
499
|
+
return i._$AI(e), i;
|
|
500
|
+
}, Ne = globalThis, j = class extends b {
|
|
501
|
+
constructor() {
|
|
502
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
503
|
+
}
|
|
504
|
+
createRenderRoot() {
|
|
505
|
+
let e = super.createRenderRoot();
|
|
506
|
+
return this.renderOptions.renderBefore ??= e.firstChild, e;
|
|
507
|
+
}
|
|
508
|
+
update(e) {
|
|
509
|
+
let t = this.render();
|
|
510
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Me(t, this.renderRoot, this.renderOptions);
|
|
511
|
+
}
|
|
512
|
+
connectedCallback() {
|
|
513
|
+
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
514
|
+
}
|
|
515
|
+
disconnectedCallback() {
|
|
516
|
+
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
517
|
+
}
|
|
518
|
+
render() {
|
|
519
|
+
return E;
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
j._$litElement$ = !0, j.finalized = !0, Ne.litElementHydrateSupport?.({ LitElement: j });
|
|
523
|
+
var Pe = Ne.litElementPolyfillSupport;
|
|
524
|
+
Pe?.({ LitElement: j }), (Ne.litElementVersions ??= []).push("4.2.2");
|
|
525
|
+
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js
|
|
526
|
+
var Fe = (e) => (t, n) => {
|
|
527
|
+
n === void 0 ? customElements.define(e, t) : n.addInitializer(() => {
|
|
528
|
+
customElements.define(e, t);
|
|
529
|
+
});
|
|
530
|
+
}, Ie = {
|
|
531
|
+
attribute: !0,
|
|
532
|
+
type: String,
|
|
533
|
+
converter: v,
|
|
534
|
+
reflect: !1,
|
|
535
|
+
hasChanged: y
|
|
536
|
+
}, Le = (e = Ie, t, n) => {
|
|
537
|
+
let { kind: r, metadata: i } = n, a = globalThis.litPropertyMetadata.get(i);
|
|
538
|
+
if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), a.set(n.name, e), r === "accessor") {
|
|
539
|
+
let { name: r } = n;
|
|
540
|
+
return {
|
|
541
|
+
set(n) {
|
|
542
|
+
let i = t.get.call(this);
|
|
543
|
+
t.set.call(this, n), this.requestUpdate(r, i, e, !0, n);
|
|
544
|
+
},
|
|
545
|
+
init(t) {
|
|
546
|
+
return t !== void 0 && this.C(r, void 0, e, t), t;
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
if (r === "setter") {
|
|
551
|
+
let { name: r } = n;
|
|
552
|
+
return function(n) {
|
|
553
|
+
let i = this[r];
|
|
554
|
+
t.call(this, n), this.requestUpdate(r, i, e, !0, n);
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
throw Error("Unsupported decorator location: " + r);
|
|
558
|
+
};
|
|
559
|
+
function M(e) {
|
|
560
|
+
return (t, n) => typeof n == "object" ? Le(e, t, n) : ((e, t, n) => {
|
|
561
|
+
let r = t.hasOwnProperty(n);
|
|
562
|
+
return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
|
|
563
|
+
})(e, t, n);
|
|
564
|
+
}
|
|
565
|
+
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directive.js
|
|
566
|
+
var Re = {
|
|
567
|
+
ATTRIBUTE: 1,
|
|
568
|
+
CHILD: 2,
|
|
569
|
+
PROPERTY: 3,
|
|
570
|
+
BOOLEAN_ATTRIBUTE: 4,
|
|
571
|
+
EVENT: 5,
|
|
572
|
+
ELEMENT: 6
|
|
573
|
+
}, ze = (e) => (...t) => ({
|
|
574
|
+
_$litDirective$: e,
|
|
575
|
+
values: t
|
|
576
|
+
}), Be = class {
|
|
577
|
+
constructor(e) {}
|
|
578
|
+
get _$AU() {
|
|
579
|
+
return this._$AM._$AU;
|
|
580
|
+
}
|
|
581
|
+
_$AT(e, t, n) {
|
|
582
|
+
this._$Ct = e, this._$AM = t, this._$Ci = n;
|
|
583
|
+
}
|
|
584
|
+
_$AS(e, t) {
|
|
585
|
+
return this.update(e, t);
|
|
586
|
+
}
|
|
587
|
+
update(e, t) {
|
|
588
|
+
return this.render(...t);
|
|
589
|
+
}
|
|
590
|
+
}, Ve = "important", He = " !" + Ve, Ue = ze(class extends Be {
|
|
591
|
+
constructor(e) {
|
|
592
|
+
if (super(e), e.type !== Re.ATTRIBUTE || e.name !== "style" || e.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
593
|
+
}
|
|
594
|
+
render(e) {
|
|
595
|
+
return Object.keys(e).reduce((t, n) => {
|
|
596
|
+
let r = e[n];
|
|
597
|
+
return r == null ? t : t + `${n = n.includes("-") ? n : n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${r};`;
|
|
598
|
+
}, "");
|
|
599
|
+
}
|
|
600
|
+
update(e, [t]) {
|
|
601
|
+
let { style: n } = e.element;
|
|
602
|
+
if (this.ft === void 0) return this.ft = new Set(Object.keys(t)), this.render(t);
|
|
603
|
+
for (let e of this.ft) t[e] ?? (this.ft.delete(e), e.includes("-") ? n.removeProperty(e) : n[e] = null);
|
|
604
|
+
for (let e in t) {
|
|
605
|
+
let r = t[e];
|
|
606
|
+
if (r != null) {
|
|
607
|
+
this.ft.add(e);
|
|
608
|
+
let t = typeof r == "string" && r.endsWith(He);
|
|
609
|
+
e.includes("-") || t ? n.setProperty(e, t ? r.slice(0, -11) : r, t ? Ve : "") : n[e] = r;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
return E;
|
|
613
|
+
}
|
|
614
|
+
}), We = /* @__PURE__ */ new Map();
|
|
615
|
+
function Ge(e, t) {
|
|
616
|
+
let n = We.get(t);
|
|
617
|
+
n || (n = t.split("."), We.set(t, n));
|
|
618
|
+
let r = e;
|
|
619
|
+
for (let e of n) {
|
|
620
|
+
if (r == null) return;
|
|
621
|
+
r = r[e];
|
|
622
|
+
}
|
|
623
|
+
return r;
|
|
624
|
+
}
|
|
625
|
+
function Ke(e) {
|
|
626
|
+
return e !== void 0 && Number.isFinite(e) ? e : void 0;
|
|
627
|
+
}
|
|
628
|
+
function qe(e) {
|
|
629
|
+
let t = /* @__PURE__ */ new Set();
|
|
630
|
+
return e.map((e, n) => {
|
|
631
|
+
if (typeof e.id != "string" || e.id === "") throw Error(`argus-table: column at index ${String(n)} needs a non-empty string id.`);
|
|
632
|
+
if (t.has(e.id)) throw Error(`argus-table: column id '${e.id}' is used more than once.`);
|
|
633
|
+
t.add(e.id);
|
|
634
|
+
let r = Math.max(0, Ke(e.minWidth) ?? 40), i = Math.max(r, Ke(e.maxWidth) ?? Infinity), a = (e) => Math.min(i, Math.max(r, e)), o = e.pin === "start" || e.pin === "end" ? e.pin : void 0, { width: s } = e, c = o === void 0 && typeof s == "object" && Number.isFinite(s.flex) && s.flex > 0 ? s.flex : void 0, l = c === void 0 ? a(Ke(s) ?? 150) : r, { accessor: u } = e, d = typeof u == "function" ? u : typeof u == "string" ? (e) => Ge(e, u) : () => void 0;
|
|
635
|
+
return {
|
|
636
|
+
id: e.id,
|
|
637
|
+
index: n,
|
|
638
|
+
header: e.header,
|
|
639
|
+
cell: e.cell,
|
|
640
|
+
getValue: d,
|
|
641
|
+
hasAccessor: u !== void 0,
|
|
642
|
+
width: l,
|
|
643
|
+
flex: c,
|
|
644
|
+
minWidth: r,
|
|
645
|
+
maxWidth: i,
|
|
646
|
+
pin: o,
|
|
647
|
+
sortable: e.sortable === !0,
|
|
648
|
+
resizable: e.resizable !== !1,
|
|
649
|
+
align: e.align ?? "start"
|
|
650
|
+
};
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/utils.js
|
|
654
|
+
function Je(e, t) {
|
|
655
|
+
return typeof e == "function" ? e(t) : e;
|
|
656
|
+
}
|
|
657
|
+
function N(e) {
|
|
658
|
+
if (Array.isArray(e)) return e.map(N);
|
|
659
|
+
if (e && typeof e == "object") {
|
|
660
|
+
let t = Object.getPrototypeOf(e);
|
|
661
|
+
if (t !== Object.prototype && t !== null) return e;
|
|
662
|
+
let n = t === null ? P() : {}, r = Object.keys(e);
|
|
663
|
+
for (let t = 0; t < r.length; t++) {
|
|
664
|
+
let i = r[t];
|
|
665
|
+
Object.defineProperty(n, i, {
|
|
666
|
+
configurable: !0,
|
|
667
|
+
enumerable: !0,
|
|
668
|
+
value: N(e[i]),
|
|
669
|
+
writable: !0
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
return n;
|
|
673
|
+
}
|
|
674
|
+
return e;
|
|
675
|
+
}
|
|
676
|
+
function Ye(e, t) {
|
|
677
|
+
let n = Object.keys(t), r = e;
|
|
678
|
+
for (let e = 0; e < n.length; e++) {
|
|
679
|
+
let i = n[e];
|
|
680
|
+
!i.startsWith("_memo_") && i !== "_cellsCache" && (r[i] = t[i]);
|
|
681
|
+
}
|
|
682
|
+
return e;
|
|
683
|
+
}
|
|
684
|
+
function P() {
|
|
685
|
+
return Object.create(null);
|
|
686
|
+
}
|
|
687
|
+
function Xe(e, t) {
|
|
688
|
+
return Object.prototype.hasOwnProperty.call(e, t);
|
|
689
|
+
}
|
|
690
|
+
function Ze(e, t) {
|
|
691
|
+
return (n) => {
|
|
692
|
+
(t.options.atoms?.[e] ?? t.baseAtoms[e]).set((e) => Je(n, e));
|
|
693
|
+
};
|
|
694
|
+
}
|
|
695
|
+
function Qe(e) {
|
|
696
|
+
if (typeof e != "object" || !e) return !1;
|
|
697
|
+
if (Array.isArray(e)) return !0;
|
|
698
|
+
let t = Object.getPrototypeOf(e);
|
|
699
|
+
return t === Object.prototype || t === null;
|
|
700
|
+
}
|
|
701
|
+
function $e(e) {
|
|
702
|
+
return Reflect.ownKeys(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
703
|
+
}
|
|
704
|
+
var et = 3;
|
|
705
|
+
function tt(e, t) {
|
|
706
|
+
return nt(e, t, et);
|
|
707
|
+
}
|
|
708
|
+
function nt(e, t, n) {
|
|
709
|
+
if (Object.is(e, t)) return !0;
|
|
710
|
+
if (n <= 0 || !Qe(e) || !Qe(t) || (Array.isArray(e) || Array.isArray(t)) && (!Array.isArray(e) || !Array.isArray(t) || e.length !== t.length)) return !1;
|
|
711
|
+
let r = $e(e), i = $e(t);
|
|
712
|
+
if (r.length !== i.length) return !1;
|
|
713
|
+
let a = e, o = t;
|
|
714
|
+
for (let e = 0; e < r.length; e++) {
|
|
715
|
+
let i = r[e];
|
|
716
|
+
if (!Object.prototype.propertyIsEnumerable.call(t, i) || !nt(a[i], o[i], n - 1)) return !1;
|
|
717
|
+
}
|
|
718
|
+
return !0;
|
|
719
|
+
}
|
|
720
|
+
function rt(e, t, n, r = tt) {
|
|
721
|
+
let i = `on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`, a = e.options[i];
|
|
722
|
+
a && a((e) => {
|
|
723
|
+
let t = Je(n, e);
|
|
724
|
+
return r(e, t) ? e : t;
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
function it(e) {
|
|
728
|
+
return e instanceof Function;
|
|
729
|
+
}
|
|
730
|
+
function at(e, t) {
|
|
731
|
+
let n = [], r = (e) => {
|
|
732
|
+
e.forEach((e) => {
|
|
733
|
+
n.push(e);
|
|
734
|
+
let i = t(e);
|
|
735
|
+
i.length && r(i);
|
|
736
|
+
});
|
|
737
|
+
};
|
|
738
|
+
return r(e), n;
|
|
739
|
+
}
|
|
740
|
+
var ot = ({ fn: e, memoDeps: t, onAfterCompare: n, onAfterUpdate: r, onBeforeCompare: i, onBeforeUpdate: a }) => {
|
|
741
|
+
let o = [], s;
|
|
742
|
+
return (c) => {
|
|
743
|
+
i?.();
|
|
744
|
+
let l = t?.(c), u = !l || l.length !== o?.length;
|
|
745
|
+
if (!u && l) {
|
|
746
|
+
for (let e = 0; e < l.length; e++) if (l[e] !== o[e]) {
|
|
747
|
+
u = !0;
|
|
748
|
+
break;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
return n?.(u), u && (o = l, a?.(), s = e(...l ?? []), r?.(s)), s;
|
|
752
|
+
};
|
|
753
|
+
};
|
|
754
|
+
function st(e) {
|
|
755
|
+
let t = !1;
|
|
756
|
+
return () => {
|
|
757
|
+
t ? e() : t = !0;
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
function ct({ feature: e, fnName: t, objectId: n, onAfterUpdate: r, table: i, ...a }) {
|
|
761
|
+
let o = { onAfterUpdate: r ? () => {
|
|
762
|
+
let { schedule: e, untrack: t } = i._reactivity;
|
|
763
|
+
e(() => t(() => r()));
|
|
764
|
+
} : void 0 };
|
|
765
|
+
return ot({
|
|
766
|
+
...a,
|
|
767
|
+
...o
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
function lt(e, t = "_") {
|
|
771
|
+
let [n, r] = e.replace(t, " ").split(" ");
|
|
772
|
+
return {
|
|
773
|
+
fnKey: r,
|
|
774
|
+
fnName: `${n}.${r}`,
|
|
775
|
+
parentName: n
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
function F(e, t, n) {
|
|
779
|
+
for (let [r, { fn: i, memoDeps: a }] of Object.entries(n)) {
|
|
780
|
+
let { fnKey: n, fnName: o } = lt(r);
|
|
781
|
+
t[n] = a ? ct({
|
|
782
|
+
memoDeps: a,
|
|
783
|
+
fn: i,
|
|
784
|
+
fnName: o,
|
|
785
|
+
table: t,
|
|
786
|
+
feature: e
|
|
787
|
+
}) : i;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
function I(e, t, n, r) {
|
|
791
|
+
for (let [i, { fn: a, memoDeps: o }] of Object.entries(r)) {
|
|
792
|
+
let { fnKey: r, fnName: s } = lt(i);
|
|
793
|
+
if (o) {
|
|
794
|
+
let i = `_memo_${r}`;
|
|
795
|
+
t[r] = function(...t) {
|
|
796
|
+
if (!this[i]) {
|
|
797
|
+
let t = this;
|
|
798
|
+
this[i] = ct({
|
|
799
|
+
memoDeps: (e) => o(t, e),
|
|
800
|
+
fn: (...e) => a(t, ...e),
|
|
801
|
+
fnName: s,
|
|
802
|
+
objectId: t.id,
|
|
803
|
+
table: n,
|
|
804
|
+
feature: e
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
return this[i](...t);
|
|
808
|
+
};
|
|
809
|
+
} else t[r] = function(...e) {
|
|
810
|
+
return a(this, ...e);
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
function L(e, t, n, ...r) {
|
|
815
|
+
return e[t]?.(...r) ?? n(e, ...r);
|
|
816
|
+
}
|
|
817
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.utils.js
|
|
818
|
+
function ut(e) {
|
|
819
|
+
return e.row.getValue(e.column.id);
|
|
820
|
+
}
|
|
821
|
+
function dt(e) {
|
|
822
|
+
return e.getValue() ?? e.table.options.renderFallbackValue;
|
|
823
|
+
}
|
|
824
|
+
function ft(e) {
|
|
825
|
+
return {
|
|
826
|
+
table: e.table,
|
|
827
|
+
column: e.column,
|
|
828
|
+
row: e.row,
|
|
829
|
+
cell: e,
|
|
830
|
+
getValue: () => e.getValue(),
|
|
831
|
+
renderValue: () => e.renderValue()
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.js
|
|
835
|
+
var pt = { assignCellPrototype: (e, t) => {
|
|
836
|
+
I("coreCellsFeature", e, t, {
|
|
837
|
+
cell_getValue: { fn: (e) => ut(e) },
|
|
838
|
+
cell_renderValue: { fn: (e) => dt(e) },
|
|
839
|
+
cell_getContext: {
|
|
840
|
+
fn: (e) => ft(e),
|
|
841
|
+
memoDeps: (e) => [e]
|
|
842
|
+
}
|
|
843
|
+
});
|
|
844
|
+
} };
|
|
845
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/columns/constructColumn.js
|
|
846
|
+
function mt(e) {
|
|
847
|
+
if (!e._columnPrototype) {
|
|
848
|
+
e._columnPrototype = { table: e };
|
|
849
|
+
let t = Object.values(e._features);
|
|
850
|
+
for (let n = 0; n < t.length; n++) t[n].assignColumnPrototype?.(e._columnPrototype, e);
|
|
851
|
+
}
|
|
852
|
+
return e._columnPrototype;
|
|
853
|
+
}
|
|
854
|
+
function ht(e, t, n, r) {
|
|
855
|
+
let i = {
|
|
856
|
+
...e.getDefaultColumnDef(),
|
|
857
|
+
...t
|
|
858
|
+
}, a = i.accessorKey, o = a === void 0 ? void 0 : String(a), s = i.id ?? o?.replaceAll(".", "_") ?? (typeof i.header == "string" ? i.header : void 0), c;
|
|
859
|
+
if (i.accessorFn) c = i.accessorFn;
|
|
860
|
+
else if (a !== void 0) {
|
|
861
|
+
if (typeof a == "string" && a.includes(".")) {
|
|
862
|
+
let e = a.split(".");
|
|
863
|
+
c = (t) => {
|
|
864
|
+
let n = t;
|
|
865
|
+
for (let t = 0; t < e.length; t++) {
|
|
866
|
+
let r = e[t];
|
|
867
|
+
n = n?.[r];
|
|
868
|
+
}
|
|
869
|
+
return n;
|
|
870
|
+
};
|
|
871
|
+
} else c = (e) => e[i.accessorKey];
|
|
872
|
+
}
|
|
873
|
+
if (!s) throw Error();
|
|
874
|
+
let l = mt(e), u = Object.create(l);
|
|
875
|
+
u.accessorFn = c, u.columnDef = i, u.columns = [], u.depth = n, u.id = `${String(s)}`, u.parent = r;
|
|
876
|
+
let d = e._columnInstanceInitFns;
|
|
877
|
+
for (let e = 0; e < d.length; e++) d[e](u);
|
|
878
|
+
return u;
|
|
879
|
+
}
|
|
880
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/featureStubs.js
|
|
881
|
+
function R(e) {
|
|
882
|
+
return e.getIsVisible?.() ?? !0;
|
|
883
|
+
}
|
|
884
|
+
function z(e) {
|
|
885
|
+
return e.getVisibleLeafColumns?.() ?? e.getAllLeafColumns();
|
|
886
|
+
}
|
|
887
|
+
function gt(e) {
|
|
888
|
+
return e.getVisibleCells?.() ?? e.getAllCells();
|
|
889
|
+
}
|
|
890
|
+
function _t(e) {
|
|
891
|
+
return e.getVisibleCellsByColumnId?.() ?? e.getAllCellsByColumnId();
|
|
892
|
+
}
|
|
893
|
+
function vt(e, t) {
|
|
894
|
+
let n = e, r = t;
|
|
895
|
+
return n.getOrderColumnsFn?.()(r) ?? n._orderGroupedColumns?.(r) ?? t;
|
|
896
|
+
}
|
|
897
|
+
function yt(e, t, n, r) {
|
|
898
|
+
return e._orderByColumnPinning?.(t, n, r) ?? t;
|
|
899
|
+
}
|
|
900
|
+
function B(e, t) {
|
|
901
|
+
return e.getPinnedVisibleLeafColumns?.(t) ?? (t && t !== "center" ? [] : z(e));
|
|
902
|
+
}
|
|
903
|
+
function bt(e, t) {
|
|
904
|
+
return e._expandRows?.(t) ?? t;
|
|
905
|
+
}
|
|
906
|
+
function xt(e) {
|
|
907
|
+
e.autoResetExpanded?.();
|
|
908
|
+
}
|
|
909
|
+
function St(e) {
|
|
910
|
+
e.autoResetPageIndex?.();
|
|
911
|
+
}
|
|
912
|
+
function Ct(e) {
|
|
913
|
+
e.autoResetSorting?.();
|
|
914
|
+
}
|
|
915
|
+
function wt(e) {
|
|
916
|
+
e.autoResetCellSelection?.();
|
|
917
|
+
}
|
|
918
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.utils.js
|
|
919
|
+
function Tt(e) {
|
|
920
|
+
return [e, ...e.columns.flatMap((e) => e.getFlatColumns())];
|
|
921
|
+
}
|
|
922
|
+
function Et(e) {
|
|
923
|
+
if (e.columns.length) {
|
|
924
|
+
let t = e.columns.flatMap((e) => e.getLeafColumns());
|
|
925
|
+
return vt(e.table, t);
|
|
926
|
+
}
|
|
927
|
+
return [e];
|
|
928
|
+
}
|
|
929
|
+
function Dt(e) {
|
|
930
|
+
return {
|
|
931
|
+
header: (e) => {
|
|
932
|
+
let t = e.header.column.columnDef;
|
|
933
|
+
return t.accessorKey ? t.accessorKey : t.accessorFn ? t.id : null;
|
|
934
|
+
},
|
|
935
|
+
cell: (e) => e.renderValue()?.toString?.() ?? null,
|
|
936
|
+
...Object.values(e._features).reduce((e, t) => Object.assign(e, t.getDefaultColumnDef?.()), {}),
|
|
937
|
+
...e.options.defaultColumn
|
|
938
|
+
};
|
|
939
|
+
}
|
|
940
|
+
function Ot(e, t, n, r = 0) {
|
|
941
|
+
let i = Array(t.length);
|
|
942
|
+
for (let a = 0; a < t.length; a++) {
|
|
943
|
+
if (!(a in t)) continue;
|
|
944
|
+
let o = t[a], s = ht(e, o, r, n), c = o;
|
|
945
|
+
s.columns = c.columns ? Ot(e, c.columns, s, r + 1) : [], i[a] = s;
|
|
946
|
+
}
|
|
947
|
+
return i;
|
|
948
|
+
}
|
|
949
|
+
function kt(e) {
|
|
950
|
+
return Ot(e, e.options.columns);
|
|
951
|
+
}
|
|
952
|
+
function At(e) {
|
|
953
|
+
return e.getAllColumns().flatMap((e) => e.getFlatColumns());
|
|
954
|
+
}
|
|
955
|
+
function jt(e) {
|
|
956
|
+
let t = P(), n = e.getAllFlatColumns();
|
|
957
|
+
for (let e = 0; e < n.length; e++) {
|
|
958
|
+
let r = n[e];
|
|
959
|
+
t[r.id] = r;
|
|
960
|
+
}
|
|
961
|
+
return t;
|
|
962
|
+
}
|
|
963
|
+
function Mt(e) {
|
|
964
|
+
return vt(e, e.getAllColumns().flatMap((e) => e.getLeafColumns()));
|
|
965
|
+
}
|
|
966
|
+
function Nt(e) {
|
|
967
|
+
let t = P(), n = e.getAllLeafColumns();
|
|
968
|
+
for (let e = 0; e < n.length; e++) {
|
|
969
|
+
let r = n[e];
|
|
970
|
+
t[r.id] = r;
|
|
971
|
+
}
|
|
972
|
+
return t;
|
|
973
|
+
}
|
|
974
|
+
function Pt(e, t) {
|
|
975
|
+
return e.getAllFlatColumnsById()[t];
|
|
976
|
+
}
|
|
977
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.js
|
|
978
|
+
var Ft = {
|
|
979
|
+
assignColumnPrototype: (e, t) => {
|
|
980
|
+
I("coreColumnsFeature", e, t, {
|
|
981
|
+
column_getFlatColumns: {
|
|
982
|
+
fn: (e) => Tt(e),
|
|
983
|
+
memoDeps: (e) => [e.table.options.columns]
|
|
984
|
+
},
|
|
985
|
+
column_getLeafColumns: {
|
|
986
|
+
fn: (e) => Et(e),
|
|
987
|
+
memoDeps: (e) => [
|
|
988
|
+
e.table.atoms.columnOrder?.get(),
|
|
989
|
+
e.table.atoms.grouping?.get(),
|
|
990
|
+
e.table.options.columns,
|
|
991
|
+
e.table.options.groupedColumnMode
|
|
992
|
+
]
|
|
993
|
+
}
|
|
994
|
+
});
|
|
995
|
+
},
|
|
996
|
+
constructTableAPIs: (e) => {
|
|
997
|
+
F("coreColumnsFeature", e, {
|
|
998
|
+
table_getDefaultColumnDef: {
|
|
999
|
+
fn: () => Dt(e),
|
|
1000
|
+
memoDeps: () => [e.options.defaultColumn]
|
|
1001
|
+
},
|
|
1002
|
+
table_getAllColumns: {
|
|
1003
|
+
fn: () => kt(e),
|
|
1004
|
+
memoDeps: () => [e.options.columns]
|
|
1005
|
+
},
|
|
1006
|
+
table_getAllFlatColumns: {
|
|
1007
|
+
fn: () => At(e),
|
|
1008
|
+
memoDeps: () => [e.options.columns]
|
|
1009
|
+
},
|
|
1010
|
+
table_getAllFlatColumnsById: {
|
|
1011
|
+
fn: () => jt(e),
|
|
1012
|
+
memoDeps: () => [e.options.columns]
|
|
1013
|
+
},
|
|
1014
|
+
table_getAllLeafColumns: {
|
|
1015
|
+
fn: () => Mt(e),
|
|
1016
|
+
memoDeps: () => [
|
|
1017
|
+
e.atoms.columnOrder?.get(),
|
|
1018
|
+
e.atoms.grouping?.get(),
|
|
1019
|
+
e.options.columns,
|
|
1020
|
+
e.options.groupedColumnMode
|
|
1021
|
+
]
|
|
1022
|
+
},
|
|
1023
|
+
table_getAllLeafColumnsById: {
|
|
1024
|
+
fn: () => Nt(e),
|
|
1025
|
+
memoDeps: () => [e.getAllLeafColumns()]
|
|
1026
|
+
},
|
|
1027
|
+
table_getColumn: { fn: (t) => Pt(e, t) }
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
1030
|
+
};
|
|
1031
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/headers/constructHeader.js
|
|
1032
|
+
function It(e) {
|
|
1033
|
+
if (!e._headerPrototype) {
|
|
1034
|
+
e._headerPrototype = { table: e };
|
|
1035
|
+
let t = Object.values(e._features);
|
|
1036
|
+
for (let n = 0; n < t.length; n++) t[n].assignHeaderPrototype?.(e._headerPrototype, e);
|
|
1037
|
+
}
|
|
1038
|
+
return e._headerPrototype;
|
|
1039
|
+
}
|
|
1040
|
+
function Lt(e, t, n) {
|
|
1041
|
+
let r = It(e), i = Object.create(r);
|
|
1042
|
+
i.colSpan = 0, i.column = t, i.depth = n.depth, i.headerGroup = null, i.id = n.id ?? t.id, i.index = n.index, i.isPlaceholder = !!n.isPlaceholder, i.placeholderId = n.placeholderId, i.rowSpan = 0, i.subHeaders = [];
|
|
1043
|
+
let a = e._headerInstanceInitFns;
|
|
1044
|
+
for (let e = 0; e < a.length; e++) a[e](i);
|
|
1045
|
+
return i;
|
|
1046
|
+
}
|
|
1047
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/headers/buildHeaderGroups.js
|
|
1048
|
+
function Rt(e, t = 1) {
|
|
1049
|
+
let n = t;
|
|
1050
|
+
for (let r = 0; r < e.length; r++) {
|
|
1051
|
+
let i = e[r];
|
|
1052
|
+
R(i) && i.columns.length && (n = Math.max(n, Rt(i.columns, t + 1)));
|
|
1053
|
+
}
|
|
1054
|
+
return n;
|
|
1055
|
+
}
|
|
1056
|
+
function zt(e, t) {
|
|
1057
|
+
return e ? `${e}_${t}` : String(t);
|
|
1058
|
+
}
|
|
1059
|
+
function Bt(e, t, n, r) {
|
|
1060
|
+
let i = e ?? "";
|
|
1061
|
+
return t && (i = i ? `${i}_${t}` : String(t)), n && (i = i ? `${i}_${n}` : n), r && (i = i ? `${i}_${r}` : r), i;
|
|
1062
|
+
}
|
|
1063
|
+
function Vt(e, t) {
|
|
1064
|
+
let n = 0;
|
|
1065
|
+
for (let r = 0; r < e.length; r++) e[r].column === t && n++;
|
|
1066
|
+
return n;
|
|
1067
|
+
}
|
|
1068
|
+
function Ht(e, t, n, r, i, a) {
|
|
1069
|
+
let o = {
|
|
1070
|
+
depth: t,
|
|
1071
|
+
id: zt(r, t),
|
|
1072
|
+
headers: []
|
|
1073
|
+
}, s = [];
|
|
1074
|
+
for (let i = 0; i < e.length; i++) {
|
|
1075
|
+
if (!(i in e)) continue;
|
|
1076
|
+
let a = e[i], c = s[s.length - 1], l = a.column.depth === o.depth, u, d = !1;
|
|
1077
|
+
if (l && a.column.parent ? u = a.column.parent : (u = a.column, d = !0), c && c.column === u) c.subHeaders.push(a);
|
|
1078
|
+
else {
|
|
1079
|
+
let e = Lt(n, u, {
|
|
1080
|
+
id: Bt(r, t, u.id, a.id),
|
|
1081
|
+
isPlaceholder: d,
|
|
1082
|
+
placeholderId: d ? String(Vt(s, u)) : void 0,
|
|
1083
|
+
depth: t,
|
|
1084
|
+
index: s.length
|
|
1085
|
+
});
|
|
1086
|
+
e.subHeaders.push(a), s.push(e);
|
|
1087
|
+
}
|
|
1088
|
+
o.headers.push(a), a.headerGroup = o;
|
|
1089
|
+
}
|
|
1090
|
+
for (let e = 0; e < a.length; e++) a[e](o);
|
|
1091
|
+
i.push(o), t > 0 && Ht(s, t - 1, n, r, i, a);
|
|
1092
|
+
}
|
|
1093
|
+
function Ut(e) {
|
|
1094
|
+
for (let t = 0; t < e.length; t++) {
|
|
1095
|
+
let n = e[t];
|
|
1096
|
+
if (!R(n.column)) continue;
|
|
1097
|
+
let r = 0;
|
|
1098
|
+
if (n.subHeaders.length) {
|
|
1099
|
+
Ut(n.subHeaders);
|
|
1100
|
+
for (let e = 0; e < n.subHeaders.length; e++) {
|
|
1101
|
+
let t = n.subHeaders[e];
|
|
1102
|
+
R(t.column) && (r += t.colSpan);
|
|
1103
|
+
}
|
|
1104
|
+
} else r = 1;
|
|
1105
|
+
if (n.colSpan = r, n.isPlaceholder && n.subHeaders.length === 1 && n.subHeaders[0].column === n.column) {
|
|
1106
|
+
let e = 1, t = n.subHeaders[0];
|
|
1107
|
+
for (; t;) t.rowSpan = 0, e++, t = t.subHeaders.length === 1 && t.subHeaders[0].column === n.column ? t.subHeaders[0] : void 0;
|
|
1108
|
+
n.rowSpan = e;
|
|
1109
|
+
} else n.rowSpan = 1;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
function Wt(e, t, n, r) {
|
|
1113
|
+
let i = Rt(e), a = [], o = n._headerGroupInstanceInitFns, s = Array(t.length);
|
|
1114
|
+
for (let e = 0; e < t.length; e++) e in t && (s[e] = Lt(n, t[e], {
|
|
1115
|
+
depth: i,
|
|
1116
|
+
index: e
|
|
1117
|
+
}));
|
|
1118
|
+
return Ht(s, i - 1, n, r, a, o), a.reverse(), Ut(a[0]?.headers ?? []), a;
|
|
1119
|
+
}
|
|
1120
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.utils.js
|
|
1121
|
+
function Gt(e, t) {
|
|
1122
|
+
for (let n = 0; n < e.subHeaders.length; n++) Gt(e.subHeaders[n], t);
|
|
1123
|
+
t.push(e);
|
|
1124
|
+
}
|
|
1125
|
+
function Kt(e) {
|
|
1126
|
+
let t = [];
|
|
1127
|
+
return Gt(e, t), t;
|
|
1128
|
+
}
|
|
1129
|
+
function qt(e) {
|
|
1130
|
+
return {
|
|
1131
|
+
column: e.column,
|
|
1132
|
+
header: e,
|
|
1133
|
+
table: e.column.table
|
|
1134
|
+
};
|
|
1135
|
+
}
|
|
1136
|
+
function Jt(e) {
|
|
1137
|
+
return Wt(e.getAllColumns(), yt(e, z(e), (e) => e.id), e);
|
|
1138
|
+
}
|
|
1139
|
+
function Yt(e) {
|
|
1140
|
+
return [...e.getHeaderGroups()].reverse();
|
|
1141
|
+
}
|
|
1142
|
+
function Xt(e) {
|
|
1143
|
+
let t = e.getHeaderGroups(), n = [];
|
|
1144
|
+
for (let e = 0; e < t.length; e++) {
|
|
1145
|
+
let r = t[e].headers;
|
|
1146
|
+
for (let e = 0; e < r.length; e++) n.push(r[e]);
|
|
1147
|
+
}
|
|
1148
|
+
return n;
|
|
1149
|
+
}
|
|
1150
|
+
function Zt(e) {
|
|
1151
|
+
let t = e.getHeaderGroups()[0]?.headers ?? [], n = [];
|
|
1152
|
+
for (let e = 0; e < t.length; e++) {
|
|
1153
|
+
let r = t[e].getLeafHeaders();
|
|
1154
|
+
for (let e = 0; e < r.length; e++) n.push(r[e]);
|
|
1155
|
+
}
|
|
1156
|
+
return n;
|
|
1157
|
+
}
|
|
1158
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.js
|
|
1159
|
+
var Qt = {
|
|
1160
|
+
assignHeaderPrototype: (e, t) => {
|
|
1161
|
+
I("coreHeadersFeature", e, t, {
|
|
1162
|
+
header_getLeafHeaders: {
|
|
1163
|
+
fn: (e) => Kt(e),
|
|
1164
|
+
memoDeps: (e) => [e.column.table.options.columns]
|
|
1165
|
+
},
|
|
1166
|
+
header_getContext: {
|
|
1167
|
+
fn: (e) => qt(e),
|
|
1168
|
+
memoDeps: (e) => [e.column.table.options.columns]
|
|
1169
|
+
}
|
|
1170
|
+
});
|
|
1171
|
+
},
|
|
1172
|
+
constructTableAPIs: (e) => {
|
|
1173
|
+
F("coreHeadersFeature", e, {
|
|
1174
|
+
table_getHeaderGroups: {
|
|
1175
|
+
fn: () => Jt(e),
|
|
1176
|
+
memoDeps: () => [
|
|
1177
|
+
e.options.columns,
|
|
1178
|
+
e.atoms.columnOrder?.get(),
|
|
1179
|
+
e.atoms.grouping?.get(),
|
|
1180
|
+
e.atoms.columnPinning?.get(),
|
|
1181
|
+
e.atoms.columnVisibility?.get(),
|
|
1182
|
+
e.options.groupedColumnMode
|
|
1183
|
+
]
|
|
1184
|
+
},
|
|
1185
|
+
table_getFooterGroups: {
|
|
1186
|
+
fn: () => Yt(e),
|
|
1187
|
+
memoDeps: () => [e.getHeaderGroups()]
|
|
1188
|
+
},
|
|
1189
|
+
table_getFlatHeaders: {
|
|
1190
|
+
fn: () => Xt(e),
|
|
1191
|
+
memoDeps: () => [e.getHeaderGroups()]
|
|
1192
|
+
},
|
|
1193
|
+
table_getLeafHeaders: {
|
|
1194
|
+
fn: () => Zt(e),
|
|
1195
|
+
memoDeps: () => [e.getHeaderGroups()]
|
|
1196
|
+
}
|
|
1197
|
+
});
|
|
1198
|
+
}
|
|
1199
|
+
};
|
|
1200
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/rows/constructRow.js
|
|
1201
|
+
function $t(e) {
|
|
1202
|
+
if (!e._rowPrototype) {
|
|
1203
|
+
e._rowPrototype = { table: e };
|
|
1204
|
+
let t = Object.values(e._features);
|
|
1205
|
+
for (let n = 0; n < t.length; n++) t[n].assignRowPrototype?.(e._rowPrototype, e);
|
|
1206
|
+
}
|
|
1207
|
+
return e._rowPrototype;
|
|
1208
|
+
}
|
|
1209
|
+
var en = (e, t, n, r, i, a, o) => {
|
|
1210
|
+
let s = $t(e), c = Object.create(s);
|
|
1211
|
+
c._displayIndexCache = -1, c._uniqueValuesCache = P(), c._valuesCache = P(), c.depth = i, c.id = t, c.index = r, c.original = n, c.parentId = o, c.subRows = a ?? [];
|
|
1212
|
+
let l = e._rowInstanceInitFns;
|
|
1213
|
+
for (let e = 0; e < l.length; e++) l[e](c);
|
|
1214
|
+
return c;
|
|
1215
|
+
};
|
|
1216
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/row-models/createCoreRowModel.js
|
|
1217
|
+
function tn() {
|
|
1218
|
+
return (e) => ct({
|
|
1219
|
+
feature: "coreRowModelsFeature",
|
|
1220
|
+
table: e,
|
|
1221
|
+
fnName: "table.getCoreRowModel",
|
|
1222
|
+
memoDeps: () => [e.options.data],
|
|
1223
|
+
fn: () => rn(e, e.options.data),
|
|
1224
|
+
onAfterUpdate: st(() => {
|
|
1225
|
+
xt(e), St(e), Ct(e), wt(e);
|
|
1226
|
+
})
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
function nn(e, t, n, r = 0, i) {
|
|
1230
|
+
let a = [];
|
|
1231
|
+
for (let o = 0; o < n.length; o++) {
|
|
1232
|
+
let s = n[o], c = en(e, e.getRowId(s, o, i), s, o, r, void 0, i?.id);
|
|
1233
|
+
t.flatRows.push(c), t.rowsById[c.id] = c, a.push(c), e.options.getSubRows && (c.originalSubRows = e.options.getSubRows(s, o), c.originalSubRows?.length && (c.subRows = nn(e, t, c.originalSubRows, r + 1, c)));
|
|
1234
|
+
}
|
|
1235
|
+
return a;
|
|
1236
|
+
}
|
|
1237
|
+
function rn(e, t) {
|
|
1238
|
+
let n = {
|
|
1239
|
+
rows: [],
|
|
1240
|
+
flatRows: [],
|
|
1241
|
+
rowsById: P()
|
|
1242
|
+
};
|
|
1243
|
+
return n.rows = nn(e, n, t), n;
|
|
1244
|
+
}
|
|
1245
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.utils.js
|
|
1246
|
+
function an(e) {
|
|
1247
|
+
return e._rowModels.coreRowModel || (e._rowModels.coreRowModel = e.options.features.coreRowModel?.(e) ?? tn()(e)), e._rowModels.coreRowModel();
|
|
1248
|
+
}
|
|
1249
|
+
function on(e) {
|
|
1250
|
+
return e.getCoreRowModel();
|
|
1251
|
+
}
|
|
1252
|
+
function sn(e) {
|
|
1253
|
+
return e._rowModels.filteredRowModel || (e._rowModels.filteredRowModel = e.options.features.filteredRowModel?.(e)), e.options.manualFiltering || !e._rowModels.filteredRowModel ? e.getPreFilteredRowModel() : e._rowModels.filteredRowModel();
|
|
1254
|
+
}
|
|
1255
|
+
function cn(e) {
|
|
1256
|
+
return e.getFilteredRowModel();
|
|
1257
|
+
}
|
|
1258
|
+
function ln(e) {
|
|
1259
|
+
return e._rowModels.groupedRowModel || (e._rowModels.groupedRowModel = e.options.features.groupedRowModel?.(e)), e.options.manualGrouping || !e._rowModels.groupedRowModel ? e.getPreGroupedRowModel() : e._rowModels.groupedRowModel();
|
|
1260
|
+
}
|
|
1261
|
+
function un(e) {
|
|
1262
|
+
return e.getGroupedRowModel();
|
|
1263
|
+
}
|
|
1264
|
+
function dn(e) {
|
|
1265
|
+
return e._rowModels.sortedRowModel || (e._rowModels.sortedRowModel = e.options.features.sortedRowModel?.(e)), e.options.manualSorting || !e._rowModels.sortedRowModel ? e.getPreSortedRowModel() : e._rowModels.sortedRowModel();
|
|
1266
|
+
}
|
|
1267
|
+
function fn(e) {
|
|
1268
|
+
return e.getSortedRowModel();
|
|
1269
|
+
}
|
|
1270
|
+
function pn(e) {
|
|
1271
|
+
return e._rowModels.expandedRowModel || (e._rowModels.expandedRowModel = e.options.features.expandedRowModel?.(e)), e.options.manualExpanding || !e._rowModels.expandedRowModel ? e.getPreExpandedRowModel() : e._rowModels.expandedRowModel();
|
|
1272
|
+
}
|
|
1273
|
+
function mn(e) {
|
|
1274
|
+
return e.getExpandedRowModel();
|
|
1275
|
+
}
|
|
1276
|
+
function hn(e) {
|
|
1277
|
+
return e._rowModels.paginatedRowModel || (e._rowModels.paginatedRowModel = e.options.features.paginatedRowModel?.(e)), e.options.manualPagination || !e._rowModels.paginatedRowModel ? e.getPrePaginatedRowModel() : e._rowModels.paginatedRowModel();
|
|
1278
|
+
}
|
|
1279
|
+
function gn(e) {
|
|
1280
|
+
return e.getPaginatedRowModel();
|
|
1281
|
+
}
|
|
1282
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.js
|
|
1283
|
+
var _n = { constructTableAPIs: (e) => {
|
|
1284
|
+
F("coreRowModelsFeature", e, {
|
|
1285
|
+
table_getCoreRowModel: { fn: () => an(e) },
|
|
1286
|
+
table_getPreFilteredRowModel: { fn: () => on(e) },
|
|
1287
|
+
table_getFilteredRowModel: { fn: () => sn(e) },
|
|
1288
|
+
table_getPreGroupedRowModel: { fn: () => cn(e) },
|
|
1289
|
+
table_getGroupedRowModel: { fn: () => ln(e) },
|
|
1290
|
+
table_getPreSortedRowModel: { fn: () => un(e) },
|
|
1291
|
+
table_getSortedRowModel: { fn: () => dn(e) },
|
|
1292
|
+
table_getPreExpandedRowModel: { fn: () => fn(e) },
|
|
1293
|
+
table_getExpandedRowModel: { fn: () => pn(e) },
|
|
1294
|
+
table_getPrePaginatedRowModel: { fn: () => mn(e) },
|
|
1295
|
+
table_getPaginatedRowModel: { fn: () => hn(e) },
|
|
1296
|
+
table_getRowModel: { fn: () => gn(e) }
|
|
1297
|
+
});
|
|
1298
|
+
} };
|
|
1299
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/cells/constructCell.js
|
|
1300
|
+
function vn(e) {
|
|
1301
|
+
if (!e._cellPrototype) {
|
|
1302
|
+
e._cellPrototype = { table: e };
|
|
1303
|
+
let t = Object.values(e._features);
|
|
1304
|
+
for (let n = 0; n < t.length; n++) t[n].assignCellPrototype?.(e._cellPrototype, e);
|
|
1305
|
+
}
|
|
1306
|
+
return e._cellPrototype;
|
|
1307
|
+
}
|
|
1308
|
+
function yn(e, t, n) {
|
|
1309
|
+
let r = vn(n), i = Object.create(r);
|
|
1310
|
+
i.column = e, i.id = `${t.id}_${e.id}`, i.row = t;
|
|
1311
|
+
let a = n._cellInstanceInitFns;
|
|
1312
|
+
for (let e = 0; e < a.length; e++) a[e](i);
|
|
1313
|
+
return i;
|
|
1314
|
+
}
|
|
1315
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.utils.js
|
|
1316
|
+
function bn(e) {
|
|
1317
|
+
let t = e.table.getRowsInDisplayOrder(), n = e._displayIndexCache;
|
|
1318
|
+
return t[n] === e ? n : -1;
|
|
1319
|
+
}
|
|
1320
|
+
function xn(e) {
|
|
1321
|
+
let t = e.getPrePaginatedRowModel(), n = e.options.paginateExpandedRows === !1 ? bt(e, t).rows : t.rows;
|
|
1322
|
+
for (let e = 0; e < n.length; e++) n[e]._displayIndexCache = e;
|
|
1323
|
+
return n;
|
|
1324
|
+
}
|
|
1325
|
+
function Sn(e, t) {
|
|
1326
|
+
if (Xe(e._valuesCache, t)) return e._valuesCache[t];
|
|
1327
|
+
let n = e.table.getColumn(t);
|
|
1328
|
+
if (n?.accessorFn) return e._valuesCache[t] = n.accessorFn(e.original, e.index), e._valuesCache[t];
|
|
1329
|
+
}
|
|
1330
|
+
function Cn(e, t) {
|
|
1331
|
+
if (Xe(e._uniqueValuesCache, t)) return e._uniqueValuesCache[t];
|
|
1332
|
+
let n = e.table.getColumn(t);
|
|
1333
|
+
if (n?.accessorFn) return n.columnDef.getUniqueValues ? (e._uniqueValuesCache[t] = n.columnDef.getUniqueValues(e.original, e.index), e._uniqueValuesCache[t]) : (e._uniqueValuesCache[t] = [e.getValue(t)], e._uniqueValuesCache[t]);
|
|
1334
|
+
}
|
|
1335
|
+
function wn(e, t) {
|
|
1336
|
+
return e.getValue(t) ?? e.table.options.renderFallbackValue;
|
|
1337
|
+
}
|
|
1338
|
+
function Tn(e) {
|
|
1339
|
+
return at(e.subRows, (e) => e.subRows);
|
|
1340
|
+
}
|
|
1341
|
+
function En(e) {
|
|
1342
|
+
let t = e.getCoreRowModel().flatRows, n = 0;
|
|
1343
|
+
for (let e = 0; e < t.length; e++) n = Math.max(n, t[e].depth);
|
|
1344
|
+
return n;
|
|
1345
|
+
}
|
|
1346
|
+
function Dn(e) {
|
|
1347
|
+
if (e.parentId) return e.table.getCoreRowModel().rowsById[e.parentId] ?? e.table.getRow(e.parentId, !0);
|
|
1348
|
+
}
|
|
1349
|
+
function On(e) {
|
|
1350
|
+
let t = [], n = e;
|
|
1351
|
+
for (;;) {
|
|
1352
|
+
let e = n.getParentRow();
|
|
1353
|
+
if (!e) break;
|
|
1354
|
+
t.push(e), n = e;
|
|
1355
|
+
}
|
|
1356
|
+
return t.reverse();
|
|
1357
|
+
}
|
|
1358
|
+
function kn(e) {
|
|
1359
|
+
let t = e.table.getAllLeafColumns(), n = e._cellsCache;
|
|
1360
|
+
n ||= e._cellsCache = /* @__PURE__ */ new WeakMap();
|
|
1361
|
+
let r = Array(t.length);
|
|
1362
|
+
for (let i = 0; i < t.length; i++) {
|
|
1363
|
+
let a = t[i], o = n.get(a);
|
|
1364
|
+
o || (o = yn(a, e, e.table), n.set(a, o)), r[i] = o;
|
|
1365
|
+
}
|
|
1366
|
+
return r;
|
|
1367
|
+
}
|
|
1368
|
+
function An(e) {
|
|
1369
|
+
let t = P(), n = e.getAllCells();
|
|
1370
|
+
for (let e = 0; e < n.length; e++) {
|
|
1371
|
+
let r = n[e];
|
|
1372
|
+
t[r.column.id] = r;
|
|
1373
|
+
}
|
|
1374
|
+
return t;
|
|
1375
|
+
}
|
|
1376
|
+
function jn(e, t, n, r) {
|
|
1377
|
+
return t.options.getRowId?.(e, n, r) ?? (r ? `${r.id}.${n}` : String(n));
|
|
1378
|
+
}
|
|
1379
|
+
function Mn(e, t, n) {
|
|
1380
|
+
let r = (n ? e.getPrePaginatedRowModel() : e.getRowModel()).rowsById[t];
|
|
1381
|
+
if (!r && (r = e.getCoreRowModel().rowsById[t], !r)) throw Error();
|
|
1382
|
+
return r;
|
|
1383
|
+
}
|
|
1384
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.js
|
|
1385
|
+
var Nn = {
|
|
1386
|
+
assignRowPrototype: (e, t) => {
|
|
1387
|
+
I("coreRowsFeature", e, t, {
|
|
1388
|
+
row_getDisplayIndex: { fn: (e) => bn(e) },
|
|
1389
|
+
row_getAllCellsByColumnId: {
|
|
1390
|
+
fn: (e) => An(e),
|
|
1391
|
+
memoDeps: (e) => [e.getAllCells()]
|
|
1392
|
+
},
|
|
1393
|
+
row_getAllCells: {
|
|
1394
|
+
fn: (e) => kn(e),
|
|
1395
|
+
memoDeps: (e) => [e.table.getAllLeafColumns()]
|
|
1396
|
+
},
|
|
1397
|
+
row_getLeafRows: {
|
|
1398
|
+
fn: (e) => Tn(e),
|
|
1399
|
+
memoDeps: (e) => [e.subRows]
|
|
1400
|
+
},
|
|
1401
|
+
row_getParentRow: { fn: (e) => Dn(e) },
|
|
1402
|
+
row_getParentRows: { fn: (e) => On(e) },
|
|
1403
|
+
row_getUniqueValues: { fn: (e, t) => Cn(e, t) },
|
|
1404
|
+
row_getValue: { fn: (e, t) => Sn(e, t) },
|
|
1405
|
+
row_renderValue: { fn: (e, t) => wn(e, t) }
|
|
1406
|
+
});
|
|
1407
|
+
},
|
|
1408
|
+
constructTableAPIs: (e) => {
|
|
1409
|
+
F("coreRowsFeature", e, {
|
|
1410
|
+
table_getRowsInDisplayOrder: {
|
|
1411
|
+
fn: () => xn(e),
|
|
1412
|
+
memoDeps: () => [
|
|
1413
|
+
e.getPrePaginatedRowModel().rows,
|
|
1414
|
+
e.options.paginateExpandedRows,
|
|
1415
|
+
e.options.paginateExpandedRows === !1 ? e.atoms.expanded?.get() : void 0
|
|
1416
|
+
]
|
|
1417
|
+
},
|
|
1418
|
+
table_getRowId: { fn: (t, n, r) => jn(t, e, n, r) },
|
|
1419
|
+
table_getRow: { fn: (t, n) => Mn(e, t, n) },
|
|
1420
|
+
table_getMaxSubRowDepth: {
|
|
1421
|
+
fn: () => En(e),
|
|
1422
|
+
memoDeps: () => [e.getCoreRowModel()]
|
|
1423
|
+
}
|
|
1424
|
+
});
|
|
1425
|
+
}
|
|
1426
|
+
};
|
|
1427
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/table/coreTablesFeature.utils.js
|
|
1428
|
+
function Pn(e, t, n = (e, t) => e === t) {
|
|
1429
|
+
let r = t === void 0 ? e.options.state : t;
|
|
1430
|
+
e._reactivity.batch(() => {
|
|
1431
|
+
if (r) for (let t in r) {
|
|
1432
|
+
let i = e.baseAtoms[t];
|
|
1433
|
+
if (!i) continue;
|
|
1434
|
+
let a = r[t], o = a === void 0 ? e.initialState[t] : a;
|
|
1435
|
+
n(e._reactivity.untrack(() => i.get()), o) || i.set(() => o);
|
|
1436
|
+
}
|
|
1437
|
+
});
|
|
1438
|
+
}
|
|
1439
|
+
function Fn(e, t, n = (e, t) => e === t) {
|
|
1440
|
+
e._reactivity.batch(() => {
|
|
1441
|
+
Pn(e, t, n), e._reactivity.commit?.();
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
function In(e) {
|
|
1445
|
+
let t = N(e.initialState);
|
|
1446
|
+
e._reactivity.batch(() => {
|
|
1447
|
+
let n = Object.keys(t);
|
|
1448
|
+
for (let r = 0; r < n.length; r++) {
|
|
1449
|
+
let i = n[r];
|
|
1450
|
+
e.baseAtoms[i].set(t[i]);
|
|
1451
|
+
}
|
|
1452
|
+
});
|
|
1453
|
+
let n = Object.values(e._features);
|
|
1454
|
+
for (let t = 0; t < n.length; t++) n[t].resetTableInstanceData?.(e);
|
|
1455
|
+
}
|
|
1456
|
+
function Ln(e, t) {
|
|
1457
|
+
let { features: n, atoms: r, initialState: i } = e.options;
|
|
1458
|
+
if (!e.options.mergeOptions) return {
|
|
1459
|
+
...e.options,
|
|
1460
|
+
...t,
|
|
1461
|
+
features: n,
|
|
1462
|
+
atoms: r,
|
|
1463
|
+
initialState: i
|
|
1464
|
+
};
|
|
1465
|
+
let a = e.options.mergeOptions(e.options, t), o = { ...Object.getOwnPropertyDescriptors(a) };
|
|
1466
|
+
return Object.defineProperties(Object.create(Object.getPrototypeOf(a)), {
|
|
1467
|
+
...o,
|
|
1468
|
+
features: {
|
|
1469
|
+
value: n,
|
|
1470
|
+
enumerable: !0,
|
|
1471
|
+
configurable: !0,
|
|
1472
|
+
writable: !0
|
|
1473
|
+
},
|
|
1474
|
+
atoms: {
|
|
1475
|
+
value: r,
|
|
1476
|
+
enumerable: !0,
|
|
1477
|
+
configurable: !0,
|
|
1478
|
+
writable: !0
|
|
1479
|
+
},
|
|
1480
|
+
initialState: {
|
|
1481
|
+
value: i,
|
|
1482
|
+
enumerable: !0,
|
|
1483
|
+
configurable: !0,
|
|
1484
|
+
writable: !0
|
|
1485
|
+
}
|
|
1486
|
+
});
|
|
1487
|
+
}
|
|
1488
|
+
function Rn(e, t, n) {
|
|
1489
|
+
let r = Ln(e, Je(t, e.options));
|
|
1490
|
+
e.optionsStore ? e.optionsStore.set(() => r) : e.options = r, n?.syncExternalState !== !1 && Fn(e, r.state ?? null);
|
|
1491
|
+
}
|
|
1492
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/coreFeatures.js
|
|
1493
|
+
var zn = {
|
|
1494
|
+
coreCellsFeature: pt,
|
|
1495
|
+
coreColumnsFeature: Ft,
|
|
1496
|
+
coreHeadersFeature: Qt,
|
|
1497
|
+
coreRowModelsFeature: _n,
|
|
1498
|
+
coreRowsFeature: Nn,
|
|
1499
|
+
coreTablesFeature: { constructTableAPIs: (e) => {
|
|
1500
|
+
F("coreTablesFeature", e, {
|
|
1501
|
+
table_reset: { fn: () => In(e) },
|
|
1502
|
+
table_setOptions: { fn: (t) => Rn(e, t) }
|
|
1503
|
+
});
|
|
1504
|
+
} }
|
|
1505
|
+
};
|
|
1506
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/helpers/tableFeatures.js
|
|
1507
|
+
function Bn(e) {
|
|
1508
|
+
return e;
|
|
1509
|
+
}
|
|
1510
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/reactivity/coreReactivityFeature.utils.js
|
|
1511
|
+
function Vn(e) {
|
|
1512
|
+
let t = e;
|
|
1513
|
+
return Object.defineProperty(e, "state", { get() {
|
|
1514
|
+
return e.get();
|
|
1515
|
+
} }), "set" in e && (t.setState = e.set.bind(e)), t;
|
|
1516
|
+
}
|
|
1517
|
+
// ../../node_modules/.pnpm/@tanstack+store@0.11.2/node_modules/@tanstack/store/dist/alien.js
|
|
1518
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1519
|
+
function Hn({ update: e, notify: t, unwatched: n }) {
|
|
1520
|
+
return {
|
|
1521
|
+
link: r,
|
|
1522
|
+
unlink: i,
|
|
1523
|
+
propagate: a,
|
|
1524
|
+
checkDirty: o,
|
|
1525
|
+
shallowPropagate: s
|
|
1526
|
+
};
|
|
1527
|
+
function r(e, t, n) {
|
|
1528
|
+
let r = t.depsTail;
|
|
1529
|
+
if (r !== void 0 && r.dep === e) return;
|
|
1530
|
+
let i = r === void 0 ? t.deps : r.nextDep;
|
|
1531
|
+
if (i !== void 0 && i.dep === e) {
|
|
1532
|
+
i.version = n, t.depsTail = i;
|
|
1533
|
+
return;
|
|
1534
|
+
}
|
|
1535
|
+
let a = e.subsTail;
|
|
1536
|
+
if (a !== void 0 && a.version === n && a.sub === t) return;
|
|
1537
|
+
let o = t.depsTail = e.subsTail = {
|
|
1538
|
+
version: n,
|
|
1539
|
+
dep: e,
|
|
1540
|
+
sub: t,
|
|
1541
|
+
prevDep: r,
|
|
1542
|
+
nextDep: i,
|
|
1543
|
+
prevSub: a,
|
|
1544
|
+
nextSub: void 0
|
|
1545
|
+
};
|
|
1546
|
+
i !== void 0 && (i.prevDep = o), r === void 0 ? t.deps = o : r.nextDep = o, a === void 0 ? e.subs = o : a.nextSub = o;
|
|
1547
|
+
}
|
|
1548
|
+
function i(e, t = e.sub) {
|
|
1549
|
+
let r = e.dep, i = e.prevDep, a = e.nextDep, o = e.nextSub, s = e.prevSub;
|
|
1550
|
+
return a === void 0 ? t.depsTail = i : a.prevDep = i, i === void 0 ? t.deps = a : i.nextDep = a, o === void 0 ? r.subsTail = s : o.prevSub = s, s === void 0 ? (r.subs = o) === void 0 && n(r) : s.nextSub = o, a;
|
|
1551
|
+
}
|
|
1552
|
+
function a(e) {
|
|
1553
|
+
let n = e.nextSub, r;
|
|
1554
|
+
top: do {
|
|
1555
|
+
let i = e.sub, a = i.flags;
|
|
1556
|
+
if (a & 60 ? a & 12 ? a & 4 ? !(a & 48) && c(e, i) ? (i.flags = a | 40, a &= 1) : a = 0 : i.flags = a & -9 | 32 : a = 0 : i.flags = a | 32, a & 2 && t(i), a & 1) {
|
|
1557
|
+
let t = i.subs;
|
|
1558
|
+
if (t !== void 0) {
|
|
1559
|
+
let i = (e = t).nextSub;
|
|
1560
|
+
i !== void 0 && (r = {
|
|
1561
|
+
value: n,
|
|
1562
|
+
prev: r
|
|
1563
|
+
}, n = i);
|
|
1564
|
+
continue;
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
if ((e = n) !== void 0) n = e.nextSub;
|
|
1568
|
+
else {
|
|
1569
|
+
for (; r !== void 0;) if (e = r.value, r = r.prev, e !== void 0) {
|
|
1570
|
+
n = e.nextSub;
|
|
1571
|
+
continue top;
|
|
1572
|
+
}
|
|
1573
|
+
break;
|
|
1574
|
+
}
|
|
1575
|
+
} while (1);
|
|
1576
|
+
}
|
|
1577
|
+
function o(t, n) {
|
|
1578
|
+
let r, i = 0, a = !1;
|
|
1579
|
+
top: do {
|
|
1580
|
+
let o = t.dep, c = o.flags;
|
|
1581
|
+
if (n.flags & 16) a = !0;
|
|
1582
|
+
else if ((c & 17) == 17) {
|
|
1583
|
+
if (e(o)) {
|
|
1584
|
+
let e = o.subs;
|
|
1585
|
+
e.nextSub !== void 0 && s(e), a = !0;
|
|
1586
|
+
}
|
|
1587
|
+
} else if ((c & 33) == 33) {
|
|
1588
|
+
(t.nextSub !== void 0 || t.prevSub !== void 0) && (r = {
|
|
1589
|
+
value: t,
|
|
1590
|
+
prev: r
|
|
1591
|
+
}), t = o.deps, n = o, ++i;
|
|
1592
|
+
continue;
|
|
1593
|
+
}
|
|
1594
|
+
if (!a) {
|
|
1595
|
+
let e = t.nextDep;
|
|
1596
|
+
if (e !== void 0) {
|
|
1597
|
+
t = e;
|
|
1598
|
+
continue;
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
for (; i--;) {
|
|
1602
|
+
let i = n.subs, o = i.nextSub !== void 0;
|
|
1603
|
+
if (o ? (t = r.value, r = r.prev) : t = i, a) {
|
|
1604
|
+
if (e(n)) {
|
|
1605
|
+
o && s(i), n = t.sub;
|
|
1606
|
+
continue;
|
|
1607
|
+
}
|
|
1608
|
+
a = !1;
|
|
1609
|
+
} else n.flags &= -33;
|
|
1610
|
+
n = t.sub;
|
|
1611
|
+
let c = t.nextDep;
|
|
1612
|
+
if (c !== void 0) {
|
|
1613
|
+
t = c;
|
|
1614
|
+
continue top;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
return a;
|
|
1618
|
+
} while (1);
|
|
1619
|
+
}
|
|
1620
|
+
function s(e) {
|
|
1621
|
+
do {
|
|
1622
|
+
let n = e.sub, r = n.flags;
|
|
1623
|
+
(r & 48) == 32 && (n.flags = r | 16, (r & 6) == 2 && t(n));
|
|
1624
|
+
} while ((e = e.nextSub) !== void 0);
|
|
1625
|
+
}
|
|
1626
|
+
function c(e, t) {
|
|
1627
|
+
let n = t.depsTail;
|
|
1628
|
+
for (; n !== void 0;) {
|
|
1629
|
+
if (n === e) return !0;
|
|
1630
|
+
n = n.prevDep;
|
|
1631
|
+
}
|
|
1632
|
+
return !1;
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
// ../../node_modules/.pnpm/@tanstack+store@0.11.2/node_modules/@tanstack/store/dist/atom.js
|
|
1636
|
+
function Un(e, t, n) {
|
|
1637
|
+
let r = typeof e == "object", i = r ? e : void 0;
|
|
1638
|
+
return {
|
|
1639
|
+
next: (r ? e.next : e)?.bind(i),
|
|
1640
|
+
error: (r ? e.error : t)?.bind(i),
|
|
1641
|
+
complete: (r ? e.complete : n)?.bind(i)
|
|
1642
|
+
};
|
|
1643
|
+
}
|
|
1644
|
+
var Wn = [], Gn = 0, { link: Kn, unlink: qn, propagate: Jn, checkDirty: Yn, shallowPropagate: Xn } = /* @__PURE__ */ Hn({
|
|
1645
|
+
update(e) {
|
|
1646
|
+
return e._update();
|
|
1647
|
+
},
|
|
1648
|
+
notify(e) {
|
|
1649
|
+
Wn[Qn++] = e, e.flags &= -3;
|
|
1650
|
+
},
|
|
1651
|
+
unwatched(e) {
|
|
1652
|
+
e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = 17, tr(e));
|
|
1653
|
+
}
|
|
1654
|
+
}), Zn = 0, Qn = 0, V, $n = 0;
|
|
1655
|
+
function er(e) {
|
|
1656
|
+
try {
|
|
1657
|
+
++$n, e();
|
|
1658
|
+
} finally {
|
|
1659
|
+
--$n || nr();
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
function tr(e) {
|
|
1663
|
+
let t = e.depsTail, n = t === void 0 ? e.deps : t.nextDep;
|
|
1664
|
+
for (; n !== void 0;) n = qn(n, e);
|
|
1665
|
+
}
|
|
1666
|
+
function nr() {
|
|
1667
|
+
if (!($n > 0)) {
|
|
1668
|
+
for (; Zn < Qn;) {
|
|
1669
|
+
let e = Wn[Zn];
|
|
1670
|
+
Wn[Zn++] = void 0, e.notify();
|
|
1671
|
+
}
|
|
1672
|
+
Zn = 0, Qn = 0;
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
function rr(e, t) {
|
|
1676
|
+
let n = typeof e == "function", r = e, i = {
|
|
1677
|
+
_snapshot: n ? void 0 : e,
|
|
1678
|
+
subs: void 0,
|
|
1679
|
+
subsTail: void 0,
|
|
1680
|
+
deps: void 0,
|
|
1681
|
+
depsTail: void 0,
|
|
1682
|
+
flags: +!n,
|
|
1683
|
+
get() {
|
|
1684
|
+
return V !== void 0 && Kn(i, V, Gn), i._snapshot;
|
|
1685
|
+
},
|
|
1686
|
+
subscribe(e) {
|
|
1687
|
+
let t = Un(e), n = { current: !1 }, r = ir(() => {
|
|
1688
|
+
i.get(), n.current ? (V = void 0, t.next?.(i._snapshot)) : n.current = !0;
|
|
1689
|
+
});
|
|
1690
|
+
return { unsubscribe: () => {
|
|
1691
|
+
r.stop();
|
|
1692
|
+
} };
|
|
1693
|
+
},
|
|
1694
|
+
_update(e) {
|
|
1695
|
+
let a = V, o = t?.compare ?? Object.is;
|
|
1696
|
+
if (n) V = i, ++Gn, i.depsTail = void 0;
|
|
1697
|
+
else if (e === void 0) return !1;
|
|
1698
|
+
n && (i.flags = 5);
|
|
1699
|
+
try {
|
|
1700
|
+
let t = i._snapshot, a = typeof e == "function" ? e(t) : e === void 0 && n ? r(t) : e;
|
|
1701
|
+
return t === void 0 || !o(t, a) ? (i._snapshot = a, !0) : !1;
|
|
1702
|
+
} finally {
|
|
1703
|
+
V = a, n && (i.flags &= -5), tr(i);
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
};
|
|
1707
|
+
return n ? (i.flags = 17, i.get = function() {
|
|
1708
|
+
let e = i.flags;
|
|
1709
|
+
if (e & 16 || e & 32 && Yn(i.deps, i)) {
|
|
1710
|
+
if (i._update()) {
|
|
1711
|
+
let e = i.subs;
|
|
1712
|
+
e !== void 0 && Xn(e);
|
|
1713
|
+
}
|
|
1714
|
+
} else e & 32 && (i.flags = e & -33);
|
|
1715
|
+
return V !== void 0 && Kn(i, V, Gn), i._snapshot;
|
|
1716
|
+
}) : i.set = function(e) {
|
|
1717
|
+
if (i._update(e)) {
|
|
1718
|
+
let e = i.subs;
|
|
1719
|
+
e !== void 0 && (Jn(e), Xn(e), nr());
|
|
1720
|
+
}
|
|
1721
|
+
}, i;
|
|
1722
|
+
}
|
|
1723
|
+
function ir(e) {
|
|
1724
|
+
let t = () => {
|
|
1725
|
+
let t = V;
|
|
1726
|
+
V = n, ++Gn, n.depsTail = void 0, n.flags = 6;
|
|
1727
|
+
try {
|
|
1728
|
+
return e();
|
|
1729
|
+
} finally {
|
|
1730
|
+
V = t, n.flags &= -5, tr(n);
|
|
1731
|
+
}
|
|
1732
|
+
}, n = {
|
|
1733
|
+
deps: void 0,
|
|
1734
|
+
depsTail: void 0,
|
|
1735
|
+
subs: void 0,
|
|
1736
|
+
subsTail: void 0,
|
|
1737
|
+
flags: 6,
|
|
1738
|
+
notify() {
|
|
1739
|
+
let e = this.flags;
|
|
1740
|
+
e & 16 || e & 32 && Yn(this.deps, this) ? t() : this.flags = 2;
|
|
1741
|
+
},
|
|
1742
|
+
stop() {
|
|
1743
|
+
this.flags = 0, this.depsTail = void 0, tr(this);
|
|
1744
|
+
}
|
|
1745
|
+
};
|
|
1746
|
+
return t(), n;
|
|
1747
|
+
}
|
|
1748
|
+
// ../../node_modules/.pnpm/@tanstack+store@0.11.2/node_modules/@tanstack/store/dist/shallow.js
|
|
1749
|
+
function ar(e, t) {
|
|
1750
|
+
if (Object.is(e, t)) return !0;
|
|
1751
|
+
if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
|
|
1752
|
+
if (e instanceof Map && t instanceof Map) {
|
|
1753
|
+
if (e.size !== t.size) return !1;
|
|
1754
|
+
for (let [n, r] of e) if (!t.has(n) || !Object.is(r, t.get(n))) return !1;
|
|
1755
|
+
return !0;
|
|
1756
|
+
}
|
|
1757
|
+
if (e instanceof Set && t instanceof Set) {
|
|
1758
|
+
if (e.size !== t.size) return !1;
|
|
1759
|
+
for (let n of e) if (!t.has(n)) return !1;
|
|
1760
|
+
return !0;
|
|
1761
|
+
}
|
|
1762
|
+
if (e instanceof Date && t instanceof Date) return e.getTime() === t.getTime();
|
|
1763
|
+
let n = or(e);
|
|
1764
|
+
if (n.length !== or(t).length) return !1;
|
|
1765
|
+
for (let r = 0; r < n.length; r++) if (!Object.prototype.hasOwnProperty.call(t, n[r]) || !Object.is(e[n[r]], t[n[r]])) return !1;
|
|
1766
|
+
return !0;
|
|
1767
|
+
}
|
|
1768
|
+
function or(e) {
|
|
1769
|
+
return Object.keys(e).concat(Object.getOwnPropertySymbols(e));
|
|
1770
|
+
}
|
|
1771
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/core/table/constructTable.js
|
|
1772
|
+
function sr(e, t = {}) {
|
|
1773
|
+
return Object.values(e).forEach((e) => {
|
|
1774
|
+
t = e.getInitialState?.(t) ?? t;
|
|
1775
|
+
}), N(t);
|
|
1776
|
+
}
|
|
1777
|
+
function cr(e) {
|
|
1778
|
+
let t = e.features.coreReactivityFeature, { aggregationFns: n, columnMeta: r, coreRowModel: i, expandedRowModel: a, facetedMinMaxValues: o, facetedRowModel: s, facetedUniqueValues: c, filterFns: l, filterMeta: u, filteredRowModel: d, groupedRowModel: f, paginatedRowModel: p, sortFns: m, sortedRowModel: h, tableMeta: ee, ...te } = e.features, g = {
|
|
1779
|
+
_cellInstanceInitFns: [],
|
|
1780
|
+
_columnInstanceInitFns: [],
|
|
1781
|
+
_features: {
|
|
1782
|
+
...zn,
|
|
1783
|
+
...te
|
|
1784
|
+
},
|
|
1785
|
+
_headerGroupInstanceInitFns: [],
|
|
1786
|
+
_headerInstanceInitFns: [],
|
|
1787
|
+
_reactivity: t,
|
|
1788
|
+
_rowInstanceInitFns: [],
|
|
1789
|
+
_rowModelFns: {
|
|
1790
|
+
aggregationFns: n,
|
|
1791
|
+
filterFns: l,
|
|
1792
|
+
sortFns: m
|
|
1793
|
+
},
|
|
1794
|
+
_rowModels: {},
|
|
1795
|
+
atoms: {},
|
|
1796
|
+
baseAtoms: {}
|
|
1797
|
+
}, _ = Object.values(g._features), v = {
|
|
1798
|
+
..._.reduce((e, t) => Object.assign(e, t.getDefaultTableOptions?.(g)), {}),
|
|
1799
|
+
...e
|
|
1800
|
+
};
|
|
1801
|
+
if (t.wrapExternalAtoms && v.atoms) for (let [e, n] of Object.entries(v.atoms)) {
|
|
1802
|
+
let r = n, i = t.createWritableAtom(r.get(), { debugName: `externalAtom/${e}` });
|
|
1803
|
+
v.atoms[e] = i;
|
|
1804
|
+
let a = !1, o = r.subscribe((e) => {
|
|
1805
|
+
a || i.set(e);
|
|
1806
|
+
}), s = i.subscribe((e) => {
|
|
1807
|
+
a = !0, r.set(e), a = !1;
|
|
1808
|
+
});
|
|
1809
|
+
t.addSubscription(o), t.addSubscription(s);
|
|
1810
|
+
}
|
|
1811
|
+
t.createOptionsStore ? (g.optionsStore = t.createWritableAtom(v, { debugName: "table/optionsStore" }), Object.defineProperty(g, "options", {
|
|
1812
|
+
configurable: !0,
|
|
1813
|
+
enumerable: !0,
|
|
1814
|
+
get() {
|
|
1815
|
+
return g.optionsStore.get();
|
|
1816
|
+
},
|
|
1817
|
+
set(e) {
|
|
1818
|
+
g.optionsStore.set(() => e);
|
|
1819
|
+
}
|
|
1820
|
+
})) : g.options = v, g.initialState = sr(g._features, g.options.initialState);
|
|
1821
|
+
let y = Object.keys(g.initialState);
|
|
1822
|
+
for (let e = 0; e < y.length; e++) {
|
|
1823
|
+
let n = y[e];
|
|
1824
|
+
g.baseAtoms[n] = t.createWritableAtom(g.initialState[n], { debugName: `table/baseAtoms/${n}` }), g.atoms[n] = t.createReadonlyAtom(() => {
|
|
1825
|
+
let e = g.options, t = e.atoms?.[n], r = t ? t.get() : g.baseAtoms[n].get();
|
|
1826
|
+
if (t) return r;
|
|
1827
|
+
let i = e.state;
|
|
1828
|
+
if (i && Xe(i, n)) {
|
|
1829
|
+
let e = i[n];
|
|
1830
|
+
return e === void 0 ? g.initialState[n] : e;
|
|
1831
|
+
}
|
|
1832
|
+
return r;
|
|
1833
|
+
}, { debugName: `table/atoms/${n}` });
|
|
1834
|
+
}
|
|
1835
|
+
Pn(g), g.store = Vn(t.createReadonlyAtom(() => {
|
|
1836
|
+
let e = {};
|
|
1837
|
+
for (let t = 0; t < y.length; t++) {
|
|
1838
|
+
let n = y[t];
|
|
1839
|
+
e[n] = g.atoms[n].get();
|
|
1840
|
+
}
|
|
1841
|
+
return e;
|
|
1842
|
+
}, {
|
|
1843
|
+
compare: ar,
|
|
1844
|
+
debugName: "table/store"
|
|
1845
|
+
}));
|
|
1846
|
+
for (let e = 0; e < _.length; e++) {
|
|
1847
|
+
let t = _[e];
|
|
1848
|
+
t.initTableInstanceData?.(g), t.initCellInstanceData && g._cellInstanceInitFns.push(t.initCellInstanceData.bind(t)), t.initColumnInstanceData && g._columnInstanceInitFns.push(t.initColumnInstanceData.bind(t)), t.initHeaderGroupInstanceData && g._headerGroupInstanceInitFns.push(t.initHeaderGroupInstanceData.bind(t)), t.initHeaderInstanceData && g._headerInstanceInitFns.push(t.initHeaderInstanceData.bind(t)), t.initRowInstanceData && g._rowInstanceInitFns.push(t.initRowInstanceData.bind(t)), t.constructTableAPIs?.(g);
|
|
1849
|
+
}
|
|
1850
|
+
return g;
|
|
1851
|
+
}
|
|
1852
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature.utils.js
|
|
1853
|
+
function H() {
|
|
1854
|
+
return {
|
|
1855
|
+
start: [],
|
|
1856
|
+
end: []
|
|
1857
|
+
};
|
|
1858
|
+
}
|
|
1859
|
+
function lr(e, t) {
|
|
1860
|
+
let n = e.getLeafColumns(), r = [];
|
|
1861
|
+
for (let e = 0; e < n.length; e++) {
|
|
1862
|
+
let t = n[e].id;
|
|
1863
|
+
t && r.push(t);
|
|
1864
|
+
}
|
|
1865
|
+
gr(e.table, (e) => t === "end" ? {
|
|
1866
|
+
start: e.start.filter((e) => !r.includes(e)),
|
|
1867
|
+
end: [...e.end.filter((e) => !r.includes(e)), ...r]
|
|
1868
|
+
} : t === "start" ? {
|
|
1869
|
+
start: [...e.start.filter((e) => !r.includes(e)), ...r],
|
|
1870
|
+
end: e.end.filter((e) => !r.includes(e))
|
|
1871
|
+
} : {
|
|
1872
|
+
start: e.start.filter((e) => !r.includes(e)),
|
|
1873
|
+
end: e.end.filter((e) => !r.includes(e))
|
|
1874
|
+
});
|
|
1875
|
+
}
|
|
1876
|
+
function ur(e) {
|
|
1877
|
+
return e.getLeafColumns().some((t) => (t.columnDef.enablePinning ?? !0) && (e.table.options.enableColumnPinning ?? !0));
|
|
1878
|
+
}
|
|
1879
|
+
function dr(e) {
|
|
1880
|
+
let t = e.getLeafColumns(), { start: n, end: r } = e.table.atoms.columnPinning?.get() ?? H();
|
|
1881
|
+
for (let e = 0; e < t.length; e++) if (n.includes(t[e].id)) return "start";
|
|
1882
|
+
for (let e = 0; e < t.length; e++) if (r.includes(t[e].id)) return "end";
|
|
1883
|
+
return !1;
|
|
1884
|
+
}
|
|
1885
|
+
function fr(e) {
|
|
1886
|
+
let t = dr(e);
|
|
1887
|
+
return t ? e.table.atoms.columnPinning?.get()?.[t].indexOf(e.id) ?? -1 : 0;
|
|
1888
|
+
}
|
|
1889
|
+
function pr(e) {
|
|
1890
|
+
let t = gt(e), { start: n, end: r } = e.table.atoms.columnPinning?.get() ?? H();
|
|
1891
|
+
if (!n.length && !r.length) return t;
|
|
1892
|
+
let i = [...n, ...r];
|
|
1893
|
+
return t.filter((e) => !i.includes(e.column.id));
|
|
1894
|
+
}
|
|
1895
|
+
function mr(e) {
|
|
1896
|
+
let { start: t } = e.table.atoms.columnPinning?.get() ?? H();
|
|
1897
|
+
if (!t.length) return [];
|
|
1898
|
+
let n = _t(e), r = [];
|
|
1899
|
+
for (let e = 0; e < t.length; e++) {
|
|
1900
|
+
let i = n[t[e]];
|
|
1901
|
+
i && (i.position = "start", r.push(i));
|
|
1902
|
+
}
|
|
1903
|
+
return r;
|
|
1904
|
+
}
|
|
1905
|
+
function hr(e) {
|
|
1906
|
+
let { end: t } = e.table.atoms.columnPinning?.get() ?? H();
|
|
1907
|
+
if (!t.length) return [];
|
|
1908
|
+
let n = _t(e), r = [];
|
|
1909
|
+
for (let e = 0; e < t.length; e++) {
|
|
1910
|
+
let i = n[t[e]];
|
|
1911
|
+
i && (i.position = "end", r.push(i));
|
|
1912
|
+
}
|
|
1913
|
+
return r;
|
|
1914
|
+
}
|
|
1915
|
+
function gr(e, t) {
|
|
1916
|
+
rt(e, "columnPinning", t);
|
|
1917
|
+
}
|
|
1918
|
+
function _r(e, t) {
|
|
1919
|
+
gr(e, t ? H() : N(e.initialState.columnPinning ?? H()));
|
|
1920
|
+
}
|
|
1921
|
+
function vr(e, t) {
|
|
1922
|
+
let n = e.atoms.columnPinning?.get();
|
|
1923
|
+
return t ? !!n?.[t].length : !!(n?.start.length || n?.end.length);
|
|
1924
|
+
}
|
|
1925
|
+
function U(e) {
|
|
1926
|
+
let t = e.getAllColumns(), n = e.getAllLeafColumnsById(), { start: r } = e.atoms.columnPinning?.get() ?? H(), i = [];
|
|
1927
|
+
for (let e = 0; e < r.length; e++) {
|
|
1928
|
+
let t = n[r[e]];
|
|
1929
|
+
t && R(t) && i.push(t);
|
|
1930
|
+
}
|
|
1931
|
+
return Wt(t, i, e, "start");
|
|
1932
|
+
}
|
|
1933
|
+
function W(e) {
|
|
1934
|
+
let t = e.getAllColumns(), n = e.getAllLeafColumnsById(), { end: r } = e.atoms.columnPinning?.get() ?? H(), i = [];
|
|
1935
|
+
for (let e = 0; e < r.length; e++) {
|
|
1936
|
+
let t = n[r[e]];
|
|
1937
|
+
t && R(t) && i.push(t);
|
|
1938
|
+
}
|
|
1939
|
+
return Wt(t, i, e, "end");
|
|
1940
|
+
}
|
|
1941
|
+
function G(e) {
|
|
1942
|
+
let t = e.getAllColumns(), n = z(e), { start: r, end: i } = e.atoms.columnPinning?.get() ?? H();
|
|
1943
|
+
if (r.length || i.length) {
|
|
1944
|
+
let e = [...r, ...i];
|
|
1945
|
+
n = n.filter((t) => !e.includes(t.id));
|
|
1946
|
+
}
|
|
1947
|
+
return Wt(t, n, e, "center");
|
|
1948
|
+
}
|
|
1949
|
+
function yr(e) {
|
|
1950
|
+
return [...L(e, "getStartHeaderGroups", U)].reverse();
|
|
1951
|
+
}
|
|
1952
|
+
function br(e) {
|
|
1953
|
+
return [...L(e, "getEndHeaderGroups", W)].reverse();
|
|
1954
|
+
}
|
|
1955
|
+
function xr(e) {
|
|
1956
|
+
return [...L(e, "getCenterHeaderGroups", G)].reverse();
|
|
1957
|
+
}
|
|
1958
|
+
function Sr(e) {
|
|
1959
|
+
let t = L(e, "getStartHeaderGroups", U), n = [];
|
|
1960
|
+
for (let e = 0; e < t.length; e++) {
|
|
1961
|
+
let r = t[e].headers;
|
|
1962
|
+
for (let e = 0; e < r.length; e++) n.push(r[e]);
|
|
1963
|
+
}
|
|
1964
|
+
return n;
|
|
1965
|
+
}
|
|
1966
|
+
function Cr(e) {
|
|
1967
|
+
let t = L(e, "getEndHeaderGroups", W), n = [];
|
|
1968
|
+
for (let e = 0; e < t.length; e++) {
|
|
1969
|
+
let r = t[e].headers;
|
|
1970
|
+
for (let e = 0; e < r.length; e++) n.push(r[e]);
|
|
1971
|
+
}
|
|
1972
|
+
return n;
|
|
1973
|
+
}
|
|
1974
|
+
function wr(e) {
|
|
1975
|
+
let t = L(e, "getCenterHeaderGroups", G), n = [];
|
|
1976
|
+
for (let e = 0; e < t.length; e++) {
|
|
1977
|
+
let r = t[e].headers;
|
|
1978
|
+
for (let e = 0; e < r.length; e++) n.push(r[e]);
|
|
1979
|
+
}
|
|
1980
|
+
return n;
|
|
1981
|
+
}
|
|
1982
|
+
function Tr(e) {
|
|
1983
|
+
return L(e, "getStartFlatHeaders", Sr).filter((e) => !e.subHeaders.length);
|
|
1984
|
+
}
|
|
1985
|
+
function Er(e) {
|
|
1986
|
+
return L(e, "getEndFlatHeaders", Cr).filter((e) => !e.subHeaders.length);
|
|
1987
|
+
}
|
|
1988
|
+
function Dr(e) {
|
|
1989
|
+
return L(e, "getCenterFlatHeaders", wr).filter((e) => !e.subHeaders.length);
|
|
1990
|
+
}
|
|
1991
|
+
function Or(e) {
|
|
1992
|
+
let { start: t } = e.atoms.columnPinning?.get() ?? H(), n = e.getAllLeafColumnsById(), r = [];
|
|
1993
|
+
for (let e = 0; e < t.length; e++) {
|
|
1994
|
+
let i = n[t[e]];
|
|
1995
|
+
i && r.push(i);
|
|
1996
|
+
}
|
|
1997
|
+
return r;
|
|
1998
|
+
}
|
|
1999
|
+
function kr(e) {
|
|
2000
|
+
let { end: t } = e.atoms.columnPinning?.get() ?? H(), n = e.getAllLeafColumnsById(), r = [];
|
|
2001
|
+
for (let e = 0; e < t.length; e++) {
|
|
2002
|
+
let i = n[t[e]];
|
|
2003
|
+
i && r.push(i);
|
|
2004
|
+
}
|
|
2005
|
+
return r;
|
|
2006
|
+
}
|
|
2007
|
+
function Ar(e) {
|
|
2008
|
+
let { start: t, end: n } = e.atoms.columnPinning?.get() ?? H();
|
|
2009
|
+
if (!t.length && !n.length) return e.getAllLeafColumns();
|
|
2010
|
+
let r = [...t, ...n];
|
|
2011
|
+
return e.getAllLeafColumns().filter((e) => !r.includes(e.id));
|
|
2012
|
+
}
|
|
2013
|
+
function jr(e, t) {
|
|
2014
|
+
return t ? t === "start" ? L(e, "getStartLeafColumns", Or) : t === "end" ? L(e, "getEndLeafColumns", kr) : L(e, "getCenterLeafColumns", Ar) : e.getAllLeafColumns();
|
|
2015
|
+
}
|
|
2016
|
+
function Mr(e) {
|
|
2017
|
+
return L(e, "getStartLeafColumns", Or).filter((e) => R(e));
|
|
2018
|
+
}
|
|
2019
|
+
function Nr(e) {
|
|
2020
|
+
return L(e, "getEndLeafColumns", kr).filter((e) => R(e));
|
|
2021
|
+
}
|
|
2022
|
+
function Pr(e) {
|
|
2023
|
+
return L(e, "getCenterLeafColumns", Ar).filter((e) => R(e));
|
|
2024
|
+
}
|
|
2025
|
+
function Fr(e, t) {
|
|
2026
|
+
return t ? t === "start" ? L(e, "getStartVisibleLeafColumns", Mr) : t === "end" ? L(e, "getEndVisibleLeafColumns", Nr) : L(e, "getCenterVisibleLeafColumns", Pr) : z(e);
|
|
2027
|
+
}
|
|
2028
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/features/column-pinning/orderByColumnPinning.js
|
|
2029
|
+
function Ir(e, t, n, r) {
|
|
2030
|
+
let i = e.atoms.columnPinning?.get();
|
|
2031
|
+
if (!i || !i.start.length && !i.end.length) return t;
|
|
2032
|
+
let { start: a, end: o } = i, s = r?.();
|
|
2033
|
+
if (!s) {
|
|
2034
|
+
s = P();
|
|
2035
|
+
for (let e = 0; e < t.length; e++) s[n(t[e])] = t[e];
|
|
2036
|
+
}
|
|
2037
|
+
let c = [];
|
|
2038
|
+
for (let e = 0; e < a.length; e++) {
|
|
2039
|
+
let t = s[a[e]];
|
|
2040
|
+
t && c.push(t);
|
|
2041
|
+
}
|
|
2042
|
+
for (let e = 0; e < t.length; e++) {
|
|
2043
|
+
let r = n(t[e]);
|
|
2044
|
+
!a.includes(r) && !o.includes(r) && c.push(t[e]);
|
|
2045
|
+
}
|
|
2046
|
+
for (let e = 0; e < o.length; e++) {
|
|
2047
|
+
let t = s[o[e]];
|
|
2048
|
+
t && c.push(t);
|
|
2049
|
+
}
|
|
2050
|
+
return c;
|
|
2051
|
+
}
|
|
2052
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature.js
|
|
2053
|
+
var Lr = {
|
|
2054
|
+
getInitialState: (e) => ({
|
|
2055
|
+
columnPinning: {
|
|
2056
|
+
...H(),
|
|
2057
|
+
...e.columnPinning
|
|
2058
|
+
},
|
|
2059
|
+
...e
|
|
2060
|
+
}),
|
|
2061
|
+
getDefaultTableOptions: (e) => ({ onColumnPinningChange: Ze("columnPinning", e) }),
|
|
2062
|
+
assignColumnPrototype: (e, t) => {
|
|
2063
|
+
I("columnPinningFeature", e, t, {
|
|
2064
|
+
column_pin: { fn: (e, t) => lr(e, t) },
|
|
2065
|
+
column_getCanPin: { fn: (e) => ur(e) },
|
|
2066
|
+
column_getPinnedIndex: { fn: (e) => fr(e) },
|
|
2067
|
+
column_getIsPinned: { fn: (e) => dr(e) }
|
|
2068
|
+
});
|
|
2069
|
+
},
|
|
2070
|
+
assignRowPrototype: (e, t) => {
|
|
2071
|
+
I("columnPinningFeature", e, t, {
|
|
2072
|
+
row_getCenterVisibleCells: {
|
|
2073
|
+
fn: (e) => pr(e),
|
|
2074
|
+
memoDeps: (e) => [
|
|
2075
|
+
e.getAllCells(),
|
|
2076
|
+
e.table.atoms.columnPinning?.get(),
|
|
2077
|
+
e.table.atoms.columnVisibility?.get()
|
|
2078
|
+
]
|
|
2079
|
+
},
|
|
2080
|
+
row_getStartVisibleCells: {
|
|
2081
|
+
fn: (e) => mr(e),
|
|
2082
|
+
memoDeps: (e) => [
|
|
2083
|
+
e.getAllCells(),
|
|
2084
|
+
e.table.atoms.columnPinning?.get()?.start,
|
|
2085
|
+
e.table.atoms.columnVisibility?.get()
|
|
2086
|
+
]
|
|
2087
|
+
},
|
|
2088
|
+
row_getEndVisibleCells: {
|
|
2089
|
+
fn: (e) => hr(e),
|
|
2090
|
+
memoDeps: (e) => [
|
|
2091
|
+
e.getAllCells(),
|
|
2092
|
+
e.table.atoms.columnPinning?.get()?.end,
|
|
2093
|
+
e.table.atoms.columnVisibility?.get()
|
|
2094
|
+
]
|
|
2095
|
+
}
|
|
2096
|
+
});
|
|
2097
|
+
},
|
|
2098
|
+
constructTableAPIs: (e) => {
|
|
2099
|
+
F("columnPinningFeature", e, {
|
|
2100
|
+
table_setColumnPinning: { fn: (t) => gr(e, t) },
|
|
2101
|
+
table_resetColumnPinning: { fn: (t) => _r(e, t) },
|
|
2102
|
+
table_getIsSomeColumnsPinned: { fn: (t) => vr(e, t) },
|
|
2103
|
+
table__orderByColumnPinning: { fn: (t, n, r) => Ir(e, t, n, r) },
|
|
2104
|
+
table_getStartHeaderGroups: {
|
|
2105
|
+
fn: () => U(e),
|
|
2106
|
+
memoDeps: () => [
|
|
2107
|
+
e.getAllColumns(),
|
|
2108
|
+
z(e),
|
|
2109
|
+
e.atoms.columnPinning?.get()?.start,
|
|
2110
|
+
e.atoms.columnOrder?.get()
|
|
2111
|
+
]
|
|
2112
|
+
},
|
|
2113
|
+
table_getCenterHeaderGroups: {
|
|
2114
|
+
fn: () => G(e),
|
|
2115
|
+
memoDeps: () => [
|
|
2116
|
+
e.getAllColumns(),
|
|
2117
|
+
z(e),
|
|
2118
|
+
e.atoms.columnPinning?.get(),
|
|
2119
|
+
e.atoms.columnOrder?.get()
|
|
2120
|
+
]
|
|
2121
|
+
},
|
|
2122
|
+
table_getEndHeaderGroups: {
|
|
2123
|
+
fn: () => W(e),
|
|
2124
|
+
memoDeps: () => [
|
|
2125
|
+
e.getAllColumns(),
|
|
2126
|
+
z(e),
|
|
2127
|
+
e.atoms.columnPinning?.get()?.end,
|
|
2128
|
+
e.atoms.columnOrder?.get()
|
|
2129
|
+
]
|
|
2130
|
+
},
|
|
2131
|
+
table_getStartFooterGroups: {
|
|
2132
|
+
fn: () => yr(e),
|
|
2133
|
+
memoDeps: () => [L(e, "getStartHeaderGroups", U)]
|
|
2134
|
+
},
|
|
2135
|
+
table_getCenterFooterGroups: {
|
|
2136
|
+
fn: () => xr(e),
|
|
2137
|
+
memoDeps: () => [L(e, "getCenterHeaderGroups", G)]
|
|
2138
|
+
},
|
|
2139
|
+
table_getEndFooterGroups: {
|
|
2140
|
+
fn: () => br(e),
|
|
2141
|
+
memoDeps: () => [L(e, "getEndHeaderGroups", W)]
|
|
2142
|
+
},
|
|
2143
|
+
table_getStartFlatHeaders: {
|
|
2144
|
+
fn: () => Sr(e),
|
|
2145
|
+
memoDeps: () => [L(e, "getStartHeaderGroups", U)]
|
|
2146
|
+
},
|
|
2147
|
+
table_getEndFlatHeaders: {
|
|
2148
|
+
fn: () => Cr(e),
|
|
2149
|
+
memoDeps: () => [L(e, "getEndHeaderGroups", W)]
|
|
2150
|
+
},
|
|
2151
|
+
table_getCenterFlatHeaders: {
|
|
2152
|
+
fn: () => wr(e),
|
|
2153
|
+
memoDeps: () => [L(e, "getCenterHeaderGroups", G)]
|
|
2154
|
+
},
|
|
2155
|
+
table_getStartLeafHeaders: {
|
|
2156
|
+
fn: () => Tr(e),
|
|
2157
|
+
memoDeps: () => [L(e, "getStartHeaderGroups", U)]
|
|
2158
|
+
},
|
|
2159
|
+
table_getEndLeafHeaders: {
|
|
2160
|
+
fn: () => Er(e),
|
|
2161
|
+
memoDeps: () => [L(e, "getEndHeaderGroups", W)]
|
|
2162
|
+
},
|
|
2163
|
+
table_getCenterLeafHeaders: {
|
|
2164
|
+
fn: () => Dr(e),
|
|
2165
|
+
memoDeps: () => [L(e, "getCenterHeaderGroups", G)]
|
|
2166
|
+
},
|
|
2167
|
+
table_getStartLeafColumns: {
|
|
2168
|
+
fn: () => Or(e),
|
|
2169
|
+
memoDeps: () => [
|
|
2170
|
+
e.options.columns,
|
|
2171
|
+
e.atoms.columnPinning?.get(),
|
|
2172
|
+
e.atoms.columnOrder?.get(),
|
|
2173
|
+
e.atoms.grouping?.get(),
|
|
2174
|
+
e.options.groupedColumnMode
|
|
2175
|
+
]
|
|
2176
|
+
},
|
|
2177
|
+
table_getEndLeafColumns: {
|
|
2178
|
+
fn: () => kr(e),
|
|
2179
|
+
memoDeps: () => [
|
|
2180
|
+
e.options.columns,
|
|
2181
|
+
e.atoms.columnPinning?.get(),
|
|
2182
|
+
e.atoms.columnOrder?.get(),
|
|
2183
|
+
e.atoms.grouping?.get(),
|
|
2184
|
+
e.options.groupedColumnMode
|
|
2185
|
+
]
|
|
2186
|
+
},
|
|
2187
|
+
table_getCenterLeafColumns: {
|
|
2188
|
+
fn: () => Ar(e),
|
|
2189
|
+
memoDeps: () => [
|
|
2190
|
+
e.options.columns,
|
|
2191
|
+
e.atoms.columnPinning?.get(),
|
|
2192
|
+
e.atoms.columnOrder?.get(),
|
|
2193
|
+
e.atoms.grouping?.get(),
|
|
2194
|
+
e.options.groupedColumnMode
|
|
2195
|
+
]
|
|
2196
|
+
},
|
|
2197
|
+
table_getPinnedLeafColumns: { fn: (t) => jr(e, t) },
|
|
2198
|
+
table_getStartVisibleLeafColumns: {
|
|
2199
|
+
fn: () => Mr(e),
|
|
2200
|
+
memoDeps: () => [
|
|
2201
|
+
e.options.columns,
|
|
2202
|
+
e.atoms.columnPinning?.get(),
|
|
2203
|
+
e.atoms.columnVisibility?.get(),
|
|
2204
|
+
e.atoms.columnOrder?.get(),
|
|
2205
|
+
e.atoms.grouping?.get(),
|
|
2206
|
+
e.options.groupedColumnMode
|
|
2207
|
+
]
|
|
2208
|
+
},
|
|
2209
|
+
table_getCenterVisibleLeafColumns: {
|
|
2210
|
+
fn: () => Pr(e),
|
|
2211
|
+
memoDeps: () => [
|
|
2212
|
+
e.options.columns,
|
|
2213
|
+
e.atoms.columnPinning?.get(),
|
|
2214
|
+
e.atoms.columnVisibility?.get(),
|
|
2215
|
+
e.atoms.columnOrder?.get(),
|
|
2216
|
+
e.atoms.grouping?.get(),
|
|
2217
|
+
e.options.groupedColumnMode
|
|
2218
|
+
]
|
|
2219
|
+
},
|
|
2220
|
+
table_getEndVisibleLeafColumns: {
|
|
2221
|
+
fn: () => Nr(e),
|
|
2222
|
+
memoDeps: () => [
|
|
2223
|
+
e.options.columns,
|
|
2224
|
+
e.atoms.columnPinning?.get(),
|
|
2225
|
+
e.atoms.columnVisibility?.get(),
|
|
2226
|
+
e.atoms.columnOrder?.get(),
|
|
2227
|
+
e.atoms.grouping?.get(),
|
|
2228
|
+
e.options.groupedColumnMode
|
|
2229
|
+
]
|
|
2230
|
+
},
|
|
2231
|
+
table_getPinnedVisibleLeafColumns: { fn: (t) => Fr(e, t) }
|
|
2232
|
+
});
|
|
2233
|
+
}
|
|
2234
|
+
};
|
|
2235
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/features/column-sizing/columnSizingFeature.utils.js
|
|
2236
|
+
function Rr() {
|
|
2237
|
+
return P();
|
|
2238
|
+
}
|
|
2239
|
+
function zr() {
|
|
2240
|
+
return {
|
|
2241
|
+
size: 150,
|
|
2242
|
+
minSize: 20,
|
|
2243
|
+
maxSize: 2 ** 53 - 1
|
|
2244
|
+
};
|
|
2245
|
+
}
|
|
2246
|
+
function Br(e) {
|
|
2247
|
+
let t = zr(), n = e.table.atoms.columnSizing?.get(), r = n && Xe(n, e.id) ? n[e.id] : void 0;
|
|
2248
|
+
return Math.min(Math.max(e.columnDef.minSize ?? t.minSize, r ?? e.columnDef.size ?? t.size), e.columnDef.maxSize ?? t.maxSize);
|
|
2249
|
+
}
|
|
2250
|
+
function Vr(e) {
|
|
2251
|
+
let t = P(), n = P(), r = Array(e.length), i = 0;
|
|
2252
|
+
for (let n = 0; n < e.length; n++) {
|
|
2253
|
+
let a = e[n], o = L(a, "getSize", Br);
|
|
2254
|
+
r[n] = o, t[a.id] = i, i += o;
|
|
2255
|
+
}
|
|
2256
|
+
let a = 0;
|
|
2257
|
+
for (let t = e.length - 1; t >= 0; t--) n[e[t].id] = a, a += r[t];
|
|
2258
|
+
return {
|
|
2259
|
+
starts: t,
|
|
2260
|
+
afters: n
|
|
2261
|
+
};
|
|
2262
|
+
}
|
|
2263
|
+
function Hr(e) {
|
|
2264
|
+
return {
|
|
2265
|
+
all: Vr(B(e)),
|
|
2266
|
+
center: Vr(B(e, "center")),
|
|
2267
|
+
start: Vr(B(e, "start")),
|
|
2268
|
+
end: Vr(B(e, "end"))
|
|
2269
|
+
};
|
|
2270
|
+
}
|
|
2271
|
+
function Ur(e) {
|
|
2272
|
+
return e === "start" ? "start" : e === "end" ? "end" : e === "center" ? "center" : "all";
|
|
2273
|
+
}
|
|
2274
|
+
function Wr(e, t) {
|
|
2275
|
+
return L(e.table, "getColumnOffsets", Hr)[Ur(t)].starts[e.id] ?? 0;
|
|
2276
|
+
}
|
|
2277
|
+
function Gr(e, t) {
|
|
2278
|
+
return L(e.table, "getColumnOffsets", Hr)[Ur(t)].afters[e.id] ?? 0;
|
|
2279
|
+
}
|
|
2280
|
+
function Kr(e) {
|
|
2281
|
+
Xr(e.table, (t) => {
|
|
2282
|
+
let n = P(), r = Object.keys(t);
|
|
2283
|
+
for (let i = 0; i < r.length; i++) {
|
|
2284
|
+
let a = r[i];
|
|
2285
|
+
a !== e.id && (n[a] = t[a]);
|
|
2286
|
+
}
|
|
2287
|
+
return n;
|
|
2288
|
+
});
|
|
2289
|
+
}
|
|
2290
|
+
function qr(e) {
|
|
2291
|
+
if (!e.subHeaders.length) return Br(e.column);
|
|
2292
|
+
let t = 0;
|
|
2293
|
+
for (let n = 0; n < e.subHeaders.length; n++) t += qr(e.subHeaders[n]);
|
|
2294
|
+
return t;
|
|
2295
|
+
}
|
|
2296
|
+
function Jr(e) {
|
|
2297
|
+
return qr(e);
|
|
2298
|
+
}
|
|
2299
|
+
function Yr(e) {
|
|
2300
|
+
if (e.index > 0) {
|
|
2301
|
+
let t = e.headerGroup?.headers[e.index - 1];
|
|
2302
|
+
if (t) return L(t, "getStart", Yr) + L(t, "getSize", Jr);
|
|
2303
|
+
}
|
|
2304
|
+
return 0;
|
|
2305
|
+
}
|
|
2306
|
+
function Xr(e, t) {
|
|
2307
|
+
e.options.onColumnSizingChange?.(t);
|
|
2308
|
+
}
|
|
2309
|
+
function Zr(e, t) {
|
|
2310
|
+
Xr(e, t ? P() : Object.assign(P(), N(e.initialState.columnSizing ?? {})));
|
|
2311
|
+
}
|
|
2312
|
+
function Qr(e) {
|
|
2313
|
+
let t = 0;
|
|
2314
|
+
for (let n = 0; n < e.length; n++) t += L(e[n], "getSize", Br);
|
|
2315
|
+
return t;
|
|
2316
|
+
}
|
|
2317
|
+
function $r(e) {
|
|
2318
|
+
return e.getHeaderGroups()[0]?.headers.reduce((e, t) => e + Jr(t), 0) ?? 0;
|
|
2319
|
+
}
|
|
2320
|
+
function ei(e) {
|
|
2321
|
+
return Qr(B(e, "start"));
|
|
2322
|
+
}
|
|
2323
|
+
function ti(e) {
|
|
2324
|
+
return Qr(B(e, "center"));
|
|
2325
|
+
}
|
|
2326
|
+
function ni(e) {
|
|
2327
|
+
return Qr(B(e, "end"));
|
|
2328
|
+
}
|
|
2329
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/features/column-sizing/columnSizingFeature.js
|
|
2330
|
+
var ri = {
|
|
2331
|
+
getInitialState: (e) => ({
|
|
2332
|
+
columnSizing: Rr(),
|
|
2333
|
+
...e
|
|
2334
|
+
}),
|
|
2335
|
+
getDefaultColumnDef: () => zr(),
|
|
2336
|
+
getDefaultTableOptions: (e) => ({ onColumnSizingChange: Ze("columnSizing", e) }),
|
|
2337
|
+
assignColumnPrototype: (e, t) => {
|
|
2338
|
+
I("columnSizingFeature", e, t, {
|
|
2339
|
+
column_getSize: {
|
|
2340
|
+
fn: (e) => Br(e),
|
|
2341
|
+
memoDeps: (e) => [t.options.columns, t.atoms.columnSizing?.get()?.[e.id]]
|
|
2342
|
+
},
|
|
2343
|
+
column_getStart: { fn: (e, t) => Wr(e, t) },
|
|
2344
|
+
column_getAfter: { fn: (e, t) => Gr(e, t) },
|
|
2345
|
+
column_resetSize: { fn: (e) => Kr(e) }
|
|
2346
|
+
});
|
|
2347
|
+
},
|
|
2348
|
+
assignHeaderPrototype: (e, t) => {
|
|
2349
|
+
I("columnSizingFeature", e, t, {
|
|
2350
|
+
header_getSize: {
|
|
2351
|
+
fn: (e) => Jr(e),
|
|
2352
|
+
memoDeps: (e) => [t.options.columns, e.column.columns.length > 0 ? t.atoms.columnSizing?.get() : t.atoms.columnSizing?.get()?.[e.column.id]]
|
|
2353
|
+
},
|
|
2354
|
+
header_getStart: {
|
|
2355
|
+
fn: (e) => Yr(e),
|
|
2356
|
+
memoDeps: () => [
|
|
2357
|
+
t.options.columns,
|
|
2358
|
+
t.atoms.columnSizing?.get(),
|
|
2359
|
+
t.atoms.columnOrder?.get(),
|
|
2360
|
+
t.atoms.columnPinning?.get(),
|
|
2361
|
+
t.atoms.columnVisibility?.get(),
|
|
2362
|
+
t.atoms.grouping?.get(),
|
|
2363
|
+
t.options.groupedColumnMode
|
|
2364
|
+
]
|
|
2365
|
+
}
|
|
2366
|
+
});
|
|
2367
|
+
},
|
|
2368
|
+
constructTableAPIs: (e) => {
|
|
2369
|
+
F("columnSizingFeature", e, {
|
|
2370
|
+
table_getColumnOffsets: {
|
|
2371
|
+
fn: () => Hr(e),
|
|
2372
|
+
memoDeps: () => [
|
|
2373
|
+
e.options.columns,
|
|
2374
|
+
e.atoms.columnSizing?.get(),
|
|
2375
|
+
e.atoms.columnOrder?.get(),
|
|
2376
|
+
e.atoms.columnPinning?.get(),
|
|
2377
|
+
e.atoms.columnVisibility?.get(),
|
|
2378
|
+
e.atoms.grouping?.get(),
|
|
2379
|
+
e.options.groupedColumnMode
|
|
2380
|
+
]
|
|
2381
|
+
},
|
|
2382
|
+
table_setColumnSizing: { fn: (t) => Xr(e, t) },
|
|
2383
|
+
table_resetColumnSizing: { fn: (t) => Zr(e, t) },
|
|
2384
|
+
table_getTotalSize: {
|
|
2385
|
+
fn: () => $r(e),
|
|
2386
|
+
memoDeps: () => [e.atoms.columnSizing?.get(), e.getHeaderGroups()]
|
|
2387
|
+
},
|
|
2388
|
+
table_getStartTotalSize: {
|
|
2389
|
+
fn: () => ei(e),
|
|
2390
|
+
memoDeps: () => [e.atoms.columnSizing?.get(), e.getHeaderGroups()]
|
|
2391
|
+
},
|
|
2392
|
+
table_getCenterTotalSize: {
|
|
2393
|
+
fn: () => ti(e),
|
|
2394
|
+
memoDeps: () => [e.atoms.columnSizing?.get(), e.getHeaderGroups()]
|
|
2395
|
+
},
|
|
2396
|
+
table_getEndTotalSize: {
|
|
2397
|
+
fn: () => ni(e),
|
|
2398
|
+
memoDeps: () => [e.atoms.columnSizing?.get(), e.getHeaderGroups()]
|
|
2399
|
+
}
|
|
2400
|
+
});
|
|
2401
|
+
}
|
|
2402
|
+
}, ii = /([0-9]+)/gm;
|
|
2403
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
2404
|
+
function ai(e) {
|
|
2405
|
+
let t = Object.assign((e, n, r) => {
|
|
2406
|
+
let i = e.getValue(r), a = n.getValue(r), o = t.resolveDataValue;
|
|
2407
|
+
return o && (i = o(i), a = o(a)), t.sort(i, a, e, n, r);
|
|
2408
|
+
}, e);
|
|
2409
|
+
return t;
|
|
2410
|
+
}
|
|
2411
|
+
var oi = /* @__PURE__ */ ai({
|
|
2412
|
+
resolveDataValue: (e) => fi(e).toLowerCase(),
|
|
2413
|
+
sort: (e, t) => pi(e, t)
|
|
2414
|
+
}), si = /* @__PURE__ */ ai({
|
|
2415
|
+
resolveDataValue: (e) => fi(e).toLowerCase(),
|
|
2416
|
+
sort: (e, t) => ui(e, t)
|
|
2417
|
+
}), ci = /* @__PURE__ */ ai({
|
|
2418
|
+
resolveDataValue: (e) => di(e),
|
|
2419
|
+
sort: (e, t) => e > t ? 1 : e < t ? -1 : 0
|
|
2420
|
+
}), li = /* @__PURE__ */ ai({ sort: (e, t) => ui(e, t) });
|
|
2421
|
+
function ui(e, t) {
|
|
2422
|
+
return e === t ? 0 : e > t ? 1 : -1;
|
|
2423
|
+
}
|
|
2424
|
+
function di(e) {
|
|
2425
|
+
return e instanceof Date ? e.getTime() : e;
|
|
2426
|
+
}
|
|
2427
|
+
function fi(e) {
|
|
2428
|
+
return typeof e == "number" ? isNaN(e) || e === Infinity || e === -Infinity ? "" : String(e) : typeof e == "string" ? e : "";
|
|
2429
|
+
}
|
|
2430
|
+
function pi(e, t) {
|
|
2431
|
+
let n = 0, r = 0, i = e.length, a = t.length;
|
|
2432
|
+
for (; n < i && r < a;) {
|
|
2433
|
+
let i = mi(e.charCodeAt(n)), a = mi(t.charCodeAt(r)), o = hi(e, n, i), s = hi(t, r, a);
|
|
2434
|
+
if (!i && !a) {
|
|
2435
|
+
let i = gi(e, n, o, t, r, s);
|
|
2436
|
+
if (i) return i;
|
|
2437
|
+
n = o, r = s;
|
|
2438
|
+
continue;
|
|
2439
|
+
}
|
|
2440
|
+
if (i !== a) return i ? 1 : -1;
|
|
2441
|
+
let c = _i(e, n, o, t, r, s);
|
|
2442
|
+
if (c) return c;
|
|
2443
|
+
n = o, r = s;
|
|
2444
|
+
}
|
|
2445
|
+
return yi(e, n) - yi(t, r);
|
|
2446
|
+
}
|
|
2447
|
+
function mi(e) {
|
|
2448
|
+
return e >= 48 && e <= 57;
|
|
2449
|
+
}
|
|
2450
|
+
function hi(e, t, n) {
|
|
2451
|
+
let r = t + 1;
|
|
2452
|
+
for (; r < e.length && mi(e.charCodeAt(r)) === n;) r++;
|
|
2453
|
+
return r;
|
|
2454
|
+
}
|
|
2455
|
+
function gi(e, t, n, r, i, a) {
|
|
2456
|
+
let o = n - t, s = a - i, c = o < s ? o : s;
|
|
2457
|
+
for (let n = 0; n < c; n++) {
|
|
2458
|
+
let a = e.charCodeAt(t + n), o = r.charCodeAt(i + n);
|
|
2459
|
+
if (a > o) return 1;
|
|
2460
|
+
if (o > a) return -1;
|
|
2461
|
+
}
|
|
2462
|
+
return o > s ? 1 : s > o ? -1 : 0;
|
|
2463
|
+
}
|
|
2464
|
+
function _i(e, t, n, r, i, a) {
|
|
2465
|
+
let o = t;
|
|
2466
|
+
for (; o < n && e.charCodeAt(o) === 48;) o++;
|
|
2467
|
+
let s = i;
|
|
2468
|
+
for (; s < a && r.charCodeAt(s) === 48;) s++;
|
|
2469
|
+
let c = n - o, l = a - s;
|
|
2470
|
+
if (c === 0 && l === 0) return 0;
|
|
2471
|
+
if (c <= 15 && l <= 15) {
|
|
2472
|
+
let t = vi(e, o, n), i = vi(r, s, a);
|
|
2473
|
+
return t > i ? 1 : i > t ? -1 : 0;
|
|
2474
|
+
}
|
|
2475
|
+
let u = parseInt(e.slice(t, n), 10), d = parseInt(r.slice(i, a), 10);
|
|
2476
|
+
return u > d ? 1 : d > u ? -1 : 0;
|
|
2477
|
+
}
|
|
2478
|
+
function vi(e, t, n) {
|
|
2479
|
+
let r = 0;
|
|
2480
|
+
for (let i = t; i < n; i++) r = r * 10 + e.charCodeAt(i) - 48;
|
|
2481
|
+
return r;
|
|
2482
|
+
}
|
|
2483
|
+
function yi(e, t) {
|
|
2484
|
+
let n = 0, r = t;
|
|
2485
|
+
for (; r < e.length;) n++, r = hi(e, r, mi(e.charCodeAt(r)));
|
|
2486
|
+
return n;
|
|
2487
|
+
}
|
|
2488
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.utils.js
|
|
2489
|
+
function bi() {
|
|
2490
|
+
return [];
|
|
2491
|
+
}
|
|
2492
|
+
function xi(e, t) {
|
|
2493
|
+
rt(e, "sorting", t);
|
|
2494
|
+
}
|
|
2495
|
+
function Si(e, t) {
|
|
2496
|
+
xi(e, t ? [] : N(e.initialState.sorting ?? []));
|
|
2497
|
+
}
|
|
2498
|
+
function Ci(e) {
|
|
2499
|
+
e.atoms.sorting && (e.options.autoResetAll ?? e.options.autoResetSorting ?? !1) && Si(e);
|
|
2500
|
+
}
|
|
2501
|
+
function wi(e) {
|
|
2502
|
+
let t = e.table._rowModelFns.sortFns, n = e.table.getFilteredRowModel().flatRows.slice(0, 10), r, i = !1;
|
|
2503
|
+
for (let t = 0; t < n.length; t++) {
|
|
2504
|
+
let a = n[t].getValue(e.id);
|
|
2505
|
+
if (Object.prototype.toString.call(a) === "[object Date]") {
|
|
2506
|
+
r = "datetime";
|
|
2507
|
+
break;
|
|
2508
|
+
}
|
|
2509
|
+
if (typeof a == "string" && (i = !0, a.split(ii).length > 1)) {
|
|
2510
|
+
r = "alphanumeric";
|
|
2511
|
+
break;
|
|
2512
|
+
}
|
|
2513
|
+
}
|
|
2514
|
+
if (!r && i && (r = "text"), r) {
|
|
2515
|
+
let e = t?.[r];
|
|
2516
|
+
if (e || r === "alphanumeric" && (e = t?.text), e) return e;
|
|
2517
|
+
}
|
|
2518
|
+
return li;
|
|
2519
|
+
}
|
|
2520
|
+
function Ti(e) {
|
|
2521
|
+
let t = e.table.getFilteredRowModel().flatRows.slice(0, 10);
|
|
2522
|
+
for (let n = 0; n < t.length; n++) {
|
|
2523
|
+
let r = t[n].getValue(e.id);
|
|
2524
|
+
if (r != null) return typeof r == "string" ? "asc" : "desc";
|
|
2525
|
+
}
|
|
2526
|
+
return "desc";
|
|
2527
|
+
}
|
|
2528
|
+
function Ei(e) {
|
|
2529
|
+
let t = e.table._rowModelFns.sortFns;
|
|
2530
|
+
return it(e.columnDef.sortFn) ? e.columnDef.sortFn : e.columnDef.sortFn === "auto" ? wi(e) : t?.[e.columnDef.sortFn] ?? li;
|
|
2531
|
+
}
|
|
2532
|
+
function Di(e, t, n) {
|
|
2533
|
+
let r = ki(e, n && ji(e)), i = t !== void 0;
|
|
2534
|
+
xi(e.table, (a) => {
|
|
2535
|
+
let o = a.findIndex((t) => t.id === e.id), s = o === -1 ? void 0 : a[o], c = [], l, u = i ? t : r === "desc", d = !!(a.length && ji(e) && n);
|
|
2536
|
+
return l = d ? s ? "toggle" : "add" : s ? "toggle" : "replace", l === "toggle" && (i || r || (l = "remove")), l === "add" ? (c = [...a, {
|
|
2537
|
+
id: e.id,
|
|
2538
|
+
desc: u
|
|
2539
|
+
}], c.splice(0, c.length - (e.table.options.maxMultiSortColCount ?? 2 ** 53 - 1))) : c = l === "toggle" ? d ? a.map((t) => t.id === e.id ? {
|
|
2540
|
+
...t,
|
|
2541
|
+
desc: u
|
|
2542
|
+
} : t) : [{
|
|
2543
|
+
id: e.id,
|
|
2544
|
+
desc: u
|
|
2545
|
+
}] : l === "remove" ? d ? a.filter((t) => t.id !== e.id) : [] : [{
|
|
2546
|
+
id: e.id,
|
|
2547
|
+
desc: u
|
|
2548
|
+
}], c;
|
|
2549
|
+
});
|
|
2550
|
+
}
|
|
2551
|
+
function Oi(e) {
|
|
2552
|
+
return e.columnDef.sortDescFirst ?? e.table.options.sortDescFirst ?? Ti(e) === "desc" ? "desc" : "asc";
|
|
2553
|
+
}
|
|
2554
|
+
function ki(e, t) {
|
|
2555
|
+
let n = Oi(e), r = Mi(e);
|
|
2556
|
+
return r ? r !== n && (e.table.options.enableSortingRemoval ?? !0) && (!t || (e.table.options.enableMultiRemove ?? !0)) ? !1 : r === "desc" ? "asc" : "desc" : n;
|
|
2557
|
+
}
|
|
2558
|
+
function Ai(e) {
|
|
2559
|
+
return (e.columnDef.enableSorting ?? !0) && (e.table.options.enableSorting ?? !0) && !!e.accessorFn;
|
|
2560
|
+
}
|
|
2561
|
+
function ji(e) {
|
|
2562
|
+
return e.columnDef.enableMultiSort ?? e.table.options.enableMultiSort ?? !!e.accessorFn;
|
|
2563
|
+
}
|
|
2564
|
+
function Mi(e) {
|
|
2565
|
+
let t = e.table.atoms.sorting?.get()?.find((t) => t.id === e.id);
|
|
2566
|
+
return t ? t.desc ? "desc" : "asc" : !1;
|
|
2567
|
+
}
|
|
2568
|
+
function Ni(e) {
|
|
2569
|
+
return e.table.atoms.sorting?.get()?.findIndex((t) => t.id === e.id) ?? -1;
|
|
2570
|
+
}
|
|
2571
|
+
function Pi(e) {
|
|
2572
|
+
xi(e.table, (t) => t.length ? t.filter((t) => t.id !== e.id) : []);
|
|
2573
|
+
}
|
|
2574
|
+
function Fi(e) {
|
|
2575
|
+
let t = Ai(e);
|
|
2576
|
+
return (n) => {
|
|
2577
|
+
t && Di(e, void 0, ji(e) ? e.table.options.isMultiSortEvent?.(n) : !1);
|
|
2578
|
+
};
|
|
2579
|
+
}
|
|
2580
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.js
|
|
2581
|
+
var Ii = {
|
|
2582
|
+
getInitialState(e) {
|
|
2583
|
+
return {
|
|
2584
|
+
sorting: bi(),
|
|
2585
|
+
...e
|
|
2586
|
+
};
|
|
2587
|
+
},
|
|
2588
|
+
getDefaultColumnDef() {
|
|
2589
|
+
return {
|
|
2590
|
+
sortFn: "auto",
|
|
2591
|
+
sortUndefined: 1
|
|
2592
|
+
};
|
|
2593
|
+
},
|
|
2594
|
+
getDefaultTableOptions(e) {
|
|
2595
|
+
return {
|
|
2596
|
+
autoResetSorting: !1,
|
|
2597
|
+
onSortingChange: Ze("sorting", e),
|
|
2598
|
+
isMultiSortEvent: (e) => e.shiftKey
|
|
2599
|
+
};
|
|
2600
|
+
},
|
|
2601
|
+
assignColumnPrototype(e, t) {
|
|
2602
|
+
I("rowSortingFeature", e, t, {
|
|
2603
|
+
column_getAutoSortFn: { fn: (e) => wi(e) },
|
|
2604
|
+
column_getAutoSortDir: { fn: (e) => Ti(e) },
|
|
2605
|
+
column_getSortFn: { fn: (e) => Ei(e) },
|
|
2606
|
+
column_toggleSorting: { fn: (e, t, n) => Di(e, t, n) },
|
|
2607
|
+
column_getFirstSortDir: { fn: (e) => Oi(e) },
|
|
2608
|
+
column_getNextSortingOrder: { fn: (e, t) => ki(e, t) },
|
|
2609
|
+
column_getCanSort: { fn: (e) => Ai(e) },
|
|
2610
|
+
column_getCanMultiSort: { fn: (e) => ji(e) },
|
|
2611
|
+
column_getIsSorted: { fn: (e) => Mi(e) },
|
|
2612
|
+
column_getSortIndex: { fn: (e) => Ni(e) },
|
|
2613
|
+
column_clearSorting: { fn: (e) => Pi(e) },
|
|
2614
|
+
column_getToggleSortingHandler: { fn: (e) => Fi(e) }
|
|
2615
|
+
});
|
|
2616
|
+
},
|
|
2617
|
+
constructTableAPIs(e) {
|
|
2618
|
+
F("rowSortingFeature", e, {
|
|
2619
|
+
table_autoResetSorting: { fn: () => Ci(e) },
|
|
2620
|
+
table_setSorting: { fn: (t) => xi(e, t) },
|
|
2621
|
+
table_resetSorting: { fn: (t) => Si(e, t) }
|
|
2622
|
+
});
|
|
2623
|
+
}
|
|
2624
|
+
};
|
|
2625
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/features/row-sorting/createSortedRowModel.js
|
|
2626
|
+
function Li() {
|
|
2627
|
+
return (e) => {
|
|
2628
|
+
let t = e;
|
|
2629
|
+
return ct({
|
|
2630
|
+
feature: "rowSortingFeature",
|
|
2631
|
+
table: t,
|
|
2632
|
+
fnName: "table.getSortedRowModel",
|
|
2633
|
+
memoDeps: () => [t.atoms.sorting?.get(), t.getPreSortedRowModel()],
|
|
2634
|
+
fn: () => Ri(t),
|
|
2635
|
+
onAfterUpdate: st(() => St(t))
|
|
2636
|
+
});
|
|
2637
|
+
};
|
|
2638
|
+
}
|
|
2639
|
+
function Ri(e) {
|
|
2640
|
+
let t = e.getPreSortedRowModel(), n = e.atoms.sorting?.get();
|
|
2641
|
+
if (!t.rows.length || !n?.length) return t;
|
|
2642
|
+
let r = [], i = n.filter((t) => {
|
|
2643
|
+
let n = e.getColumn(t.id);
|
|
2644
|
+
return n ? Ai(n) : !1;
|
|
2645
|
+
});
|
|
2646
|
+
if (!i.length) return t;
|
|
2647
|
+
let a = [];
|
|
2648
|
+
for (let t = 0; t < i.length; t++) {
|
|
2649
|
+
let n = i[t], r = e.getColumn(n.id);
|
|
2650
|
+
r && a.push({
|
|
2651
|
+
id: n.id,
|
|
2652
|
+
desc: n.desc,
|
|
2653
|
+
sortUndefined: r.columnDef.sortUndefined,
|
|
2654
|
+
invertSorting: r.columnDef.invertSorting,
|
|
2655
|
+
sortFn: Ei(r)
|
|
2656
|
+
});
|
|
2657
|
+
}
|
|
2658
|
+
let o = (e, t) => {
|
|
2659
|
+
for (let n = 0; n < a.length; n++) {
|
|
2660
|
+
let r = a[n], i = r.sortUndefined, o = r.desc, s = 0;
|
|
2661
|
+
if (i) {
|
|
2662
|
+
let n = e.getValue(r.id), a = t.getValue(r.id), o = n === void 0, c = a === void 0;
|
|
2663
|
+
if (o && c) continue;
|
|
2664
|
+
if (o || c) {
|
|
2665
|
+
if (i === "first") return o ? -1 : 1;
|
|
2666
|
+
if (i === "last") return o ? 1 : -1;
|
|
2667
|
+
s = o ? i : -i;
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2670
|
+
if (s === 0 && (s = r.sortFn(e, t, r.id)), s !== 0) return o && (s *= -1), r.invertSorting && (s *= -1), s;
|
|
2671
|
+
}
|
|
2672
|
+
return e.index - t.index;
|
|
2673
|
+
}, s = (e) => {
|
|
2674
|
+
let t = e.slice();
|
|
2675
|
+
t.sort(o);
|
|
2676
|
+
let n = !1;
|
|
2677
|
+
for (let i = 0; i < t.length; i++) {
|
|
2678
|
+
let a = t[i];
|
|
2679
|
+
a !== e[i] && (n = !0);
|
|
2680
|
+
let o = r.length;
|
|
2681
|
+
if (r.push(a), a.subRows.length) {
|
|
2682
|
+
let e = s(a.subRows);
|
|
2683
|
+
if (e.changed) {
|
|
2684
|
+
let s = Object.create(Object.getPrototypeOf(a));
|
|
2685
|
+
Ye(s, a), s.subRows = e.rows, t[i] = s, r[o] = s, n = !0;
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
return {
|
|
2690
|
+
rows: t,
|
|
2691
|
+
changed: n
|
|
2692
|
+
};
|
|
2693
|
+
};
|
|
2694
|
+
return {
|
|
2695
|
+
rows: s(t.rows).rows,
|
|
2696
|
+
flatRows: r,
|
|
2697
|
+
rowsById: t.rowsById
|
|
2698
|
+
};
|
|
2699
|
+
}
|
|
2700
|
+
// ../../node_modules/.pnpm/@tanstack+table-core@9.3.1/node_modules/@tanstack/table-core/dist/store-reactivity-bindings.js
|
|
2701
|
+
function zi() {
|
|
2702
|
+
return {
|
|
2703
|
+
createOptionsStore: !0,
|
|
2704
|
+
wrapExternalAtoms: !1,
|
|
2705
|
+
addSubscription: () => {
|
|
2706
|
+
throw Error("Feature not supported in current reactivity implementation");
|
|
2707
|
+
},
|
|
2708
|
+
unmount: () => {
|
|
2709
|
+
throw Error("Feature not supported in current reactivity implementation");
|
|
2710
|
+
},
|
|
2711
|
+
batch: er,
|
|
2712
|
+
schedule: (e) => queueMicrotask(e),
|
|
2713
|
+
untrack: (e) => e(),
|
|
2714
|
+
createReadonlyAtom: (e, t) => rr(() => e(), { compare: t?.compare }),
|
|
2715
|
+
createWritableAtom: (e, t) => rr(e, { compare: t?.compare })
|
|
2716
|
+
};
|
|
2717
|
+
}
|
|
2718
|
+
// ../core/src/table/create-table.ts
|
|
2719
|
+
var Bi = Bn({
|
|
2720
|
+
coreReactivityFeature: zi(),
|
|
2721
|
+
columnPinningFeature: Lr,
|
|
2722
|
+
columnSizingFeature: ri,
|
|
2723
|
+
rowSortingFeature: Ii,
|
|
2724
|
+
sortedRowModel: Li(),
|
|
2725
|
+
sortFns: {
|
|
2726
|
+
alphanumeric: oi,
|
|
2727
|
+
basic: li,
|
|
2728
|
+
datetime: ci,
|
|
2729
|
+
text: si
|
|
2730
|
+
}
|
|
2731
|
+
}), Vi = (e, t) => String(t);
|
|
2732
|
+
function Hi(e) {
|
|
2733
|
+
return {
|
|
2734
|
+
id: e.id,
|
|
2735
|
+
accessorFn: e.getValue,
|
|
2736
|
+
size: e.width,
|
|
2737
|
+
minSize: e.minWidth,
|
|
2738
|
+
maxSize: e.maxWidth,
|
|
2739
|
+
enableSorting: e.sortable,
|
|
2740
|
+
sortUndefined: "last"
|
|
2741
|
+
};
|
|
2742
|
+
}
|
|
2743
|
+
function Ui(e) {
|
|
2744
|
+
let t = e, n = qe(t.columns), r = new Map(n.map((e) => [e.id, e])), i = n.map(Hi), a, o = /* @__PURE__ */ new WeakMap(), s, c = () => ({
|
|
2745
|
+
features: Bi,
|
|
2746
|
+
columns: i,
|
|
2747
|
+
data: t.data,
|
|
2748
|
+
getRowId: t.getRowId ?? Vi,
|
|
2749
|
+
state: {
|
|
2750
|
+
sorting: t.sorting,
|
|
2751
|
+
columnSizing: t.columnSizing,
|
|
2752
|
+
columnPinning: {
|
|
2753
|
+
start: n.filter((e) => e.pin === "start").map((e) => e.id),
|
|
2754
|
+
end: n.filter((e) => e.pin === "end").map((e) => e.id)
|
|
2755
|
+
}
|
|
2756
|
+
},
|
|
2757
|
+
onSortingChange: () => void 0,
|
|
2758
|
+
onColumnSizingChange: () => void 0,
|
|
2759
|
+
onColumnPinningChange: () => void 0
|
|
2760
|
+
}), l = cr(c()), u = () => l.getRowModel().rows, d = () => {
|
|
2761
|
+
let e = l.getStartLeafColumns(), n = l.getCenterLeafColumns(), i = l.getEndLeafColumns(), a = t.sorting, o = (e, n, i, o) => {
|
|
2762
|
+
let s = r.get(e.id);
|
|
2763
|
+
if (!s) throw Error(`argus-table: unknown column '${e.id}'.`);
|
|
2764
|
+
let c = a.find((t) => t.id === e.id);
|
|
2765
|
+
return {
|
|
2766
|
+
id: s.id,
|
|
2767
|
+
colIndex: n,
|
|
2768
|
+
pin: s.pin,
|
|
2769
|
+
offset: i,
|
|
2770
|
+
pinEdge: o,
|
|
2771
|
+
width: e.getSize(),
|
|
2772
|
+
flex: t.columnSizing[s.id] === void 0 ? s.flex : void 0,
|
|
2773
|
+
minWidth: s.minWidth,
|
|
2774
|
+
maxWidth: s.maxWidth,
|
|
2775
|
+
sortable: s.sortable,
|
|
2776
|
+
resizable: s.resizable,
|
|
2777
|
+
align: s.align,
|
|
2778
|
+
sorted: c ? c.desc ? "desc" : "asc" : !1,
|
|
2779
|
+
header: s.header,
|
|
2780
|
+
cell: s.cell,
|
|
2781
|
+
hasAccessor: s.hasAccessor
|
|
2782
|
+
};
|
|
2783
|
+
};
|
|
2784
|
+
return [
|
|
2785
|
+
...e.map((t, n) => o(t, n + 1, t.getStart("start"), n === e.length - 1)),
|
|
2786
|
+
...n.map((t, n) => o(t, e.length + n + 1, t.getStart("center"), !1)),
|
|
2787
|
+
...i.map((t, r) => o(t, e.length + n.length + r + 1, t.getAfter("end"), r === 0))
|
|
2788
|
+
];
|
|
2789
|
+
};
|
|
2790
|
+
return {
|
|
2791
|
+
update(e) {
|
|
2792
|
+
let o = {
|
|
2793
|
+
...t,
|
|
2794
|
+
...e
|
|
2795
|
+
};
|
|
2796
|
+
Object.keys(e).some((n) => e[n] !== t[n]) && (e.columns && e.columns !== t.columns && (n = qe(e.columns), r = new Map(n.map((e) => [e.id, e])), i = n.map(Hi)), t = o, a = void 0, l.setOptions((e) => ({
|
|
2797
|
+
...e,
|
|
2798
|
+
...c()
|
|
2799
|
+
})));
|
|
2800
|
+
},
|
|
2801
|
+
get columns() {
|
|
2802
|
+
return a ??= d();
|
|
2803
|
+
},
|
|
2804
|
+
get rowCount() {
|
|
2805
|
+
return u().length;
|
|
2806
|
+
},
|
|
2807
|
+
get totalWidth() {
|
|
2808
|
+
return l.getTotalSize();
|
|
2809
|
+
},
|
|
2810
|
+
rowAt(e) {
|
|
2811
|
+
let t = u()[e];
|
|
2812
|
+
if (!t) return;
|
|
2813
|
+
let n = o.get(t);
|
|
2814
|
+
return n?.index !== e && (n = {
|
|
2815
|
+
id: t.id,
|
|
2816
|
+
index: e,
|
|
2817
|
+
original: t.original
|
|
2818
|
+
}, o.set(t, n)), n;
|
|
2819
|
+
},
|
|
2820
|
+
indexOf(e) {
|
|
2821
|
+
let t = u();
|
|
2822
|
+
return s?.rows !== t && (s = {
|
|
2823
|
+
rows: t,
|
|
2824
|
+
map: new Map(t.map((e, t) => [e.id, t]))
|
|
2825
|
+
}), s.map.get(e);
|
|
2826
|
+
},
|
|
2827
|
+
valueAt(e, t) {
|
|
2828
|
+
return u()[e]?.getValue(t);
|
|
2829
|
+
},
|
|
2830
|
+
cellContext(e, t) {
|
|
2831
|
+
let n = u()[e];
|
|
2832
|
+
if (n && r.has(t)) return {
|
|
2833
|
+
row: n.original,
|
|
2834
|
+
rowId: n.id,
|
|
2835
|
+
index: e,
|
|
2836
|
+
columnId: t,
|
|
2837
|
+
value: n.getValue(t)
|
|
2838
|
+
};
|
|
2839
|
+
},
|
|
2840
|
+
nextSorting(e) {
|
|
2841
|
+
if (r.get(e)?.sortable !== !0) return;
|
|
2842
|
+
let n = t.sorting.find((t) => t.id === e);
|
|
2843
|
+
return n ? n.desc ? [] : [{
|
|
2844
|
+
id: e,
|
|
2845
|
+
desc: !0
|
|
2846
|
+
}] : [{
|
|
2847
|
+
id: e,
|
|
2848
|
+
desc: !1
|
|
2849
|
+
}];
|
|
2850
|
+
},
|
|
2851
|
+
nextSizing(e, n) {
|
|
2852
|
+
let i = r.get(e);
|
|
2853
|
+
if (!i?.resizable || !Number.isFinite(n)) return;
|
|
2854
|
+
let a = Math.round(Math.min(i.maxWidth, Math.max(i.minWidth, n)));
|
|
2855
|
+
return {
|
|
2856
|
+
...t.columnSizing,
|
|
2857
|
+
[e]: a
|
|
2858
|
+
};
|
|
2859
|
+
}
|
|
2860
|
+
};
|
|
2861
|
+
}
|
|
2862
|
+
// ../core/src/state/controllable.ts
|
|
2863
|
+
function Wi(e) {
|
|
2864
|
+
let t = e, n = !1;
|
|
2865
|
+
return {
|
|
2866
|
+
get value() {
|
|
2867
|
+
return t;
|
|
2868
|
+
},
|
|
2869
|
+
get controlled() {
|
|
2870
|
+
return n;
|
|
2871
|
+
},
|
|
2872
|
+
set(e) {
|
|
2873
|
+
e === void 0 ? n = !1 : (n = !0, t = e);
|
|
2874
|
+
},
|
|
2875
|
+
request(e) {
|
|
2876
|
+
return n || (t = e), {
|
|
2877
|
+
value: e,
|
|
2878
|
+
applied: !n
|
|
2879
|
+
};
|
|
2880
|
+
}
|
|
2881
|
+
};
|
|
2882
|
+
}
|
|
2883
|
+
// ../core/src/virtual/row-pool.ts
|
|
2884
|
+
var Gi = class {
|
|
2885
|
+
#e = /* @__PURE__ */ new Map();
|
|
2886
|
+
#t = [];
|
|
2887
|
+
#n = 0;
|
|
2888
|
+
#r;
|
|
2889
|
+
get size() {
|
|
2890
|
+
return this.#n;
|
|
2891
|
+
}
|
|
2892
|
+
get pinned() {
|
|
2893
|
+
return this.#r;
|
|
2894
|
+
}
|
|
2895
|
+
pin(e) {
|
|
2896
|
+
this.#r = e;
|
|
2897
|
+
}
|
|
2898
|
+
slotOf(e) {
|
|
2899
|
+
return this.#e.get(e);
|
|
2900
|
+
}
|
|
2901
|
+
update(e) {
|
|
2902
|
+
let t = new Set(e);
|
|
2903
|
+
this.#r !== void 0 && t.add(this.#r);
|
|
2904
|
+
for (let [e, n] of this.#e) t.has(e) || (this.#e.delete(e), this.#t.push(n));
|
|
2905
|
+
for (let e of t) this.#e.has(e) || this.#e.set(e, this.#t.pop() ?? this.#n++);
|
|
2906
|
+
let n = [];
|
|
2907
|
+
for (let [e, t] of this.#e) n.push({
|
|
2908
|
+
id: e,
|
|
2909
|
+
slot: t
|
|
2910
|
+
});
|
|
2911
|
+
return n.sort((e, t) => e.slot - t.slot);
|
|
2912
|
+
}
|
|
2913
|
+
clear() {
|
|
2914
|
+
this.#e.clear(), this.#t = [], this.#n = 0, this.#r = void 0;
|
|
2915
|
+
}
|
|
2916
|
+
};
|
|
2917
|
+
// src/controllers/resize-drag.ts
|
|
2918
|
+
function Ki(e, t, n, r, i) {
|
|
2919
|
+
let a = t.clientX, o = 0, s, c = () => {
|
|
2920
|
+
o = 0, s !== void 0 && i(s), s = void 0;
|
|
2921
|
+
}, l = (e) => {
|
|
2922
|
+
s = n + (e.clientX - a) * r, o ||= requestAnimationFrame(c);
|
|
2923
|
+
}, u = (t) => {
|
|
2924
|
+
t.type === "pointerup" && l(t), o && cancelAnimationFrame(o), c(), e.removeAttribute("data-active"), e.removeEventListener("pointermove", l), e.removeEventListener("pointerup", u), e.removeEventListener("pointercancel", u), e.hasPointerCapture(t.pointerId) && e.releasePointerCapture(t.pointerId);
|
|
2925
|
+
};
|
|
2926
|
+
t.preventDefault();
|
|
2927
|
+
try {
|
|
2928
|
+
e.setPointerCapture(t.pointerId);
|
|
2929
|
+
} catch {}
|
|
2930
|
+
e.setAttribute("data-active", ""), e.addEventListener("pointermove", l), e.addEventListener("pointerup", u), e.addEventListener("pointercancel", u);
|
|
2931
|
+
}
|
|
2932
|
+
// src/controllers/table-controller.ts
|
|
2933
|
+
var qi = class {
|
|
2934
|
+
constructor() {
|
|
2935
|
+
this.model = Ui({
|
|
2936
|
+
columns: [],
|
|
2937
|
+
data: [],
|
|
2938
|
+
getRowId: void 0,
|
|
2939
|
+
sorting: [],
|
|
2940
|
+
columnSizing: {}
|
|
2941
|
+
});
|
|
2942
|
+
}
|
|
2943
|
+
update(e) {
|
|
2944
|
+
this.model.update(e);
|
|
2945
|
+
}
|
|
2946
|
+
};
|
|
2947
|
+
// ../../node_modules/.pnpm/@tanstack+virtual-core@3.19.11/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js
|
|
2948
|
+
function Ji(e) {
|
|
2949
|
+
return typeof e == "object" ? e.key : e;
|
|
2950
|
+
}
|
|
2951
|
+
function Yi(e, t) {
|
|
2952
|
+
let n = e.length;
|
|
2953
|
+
return new Proxy(e, { get(e, r, i) {
|
|
2954
|
+
if (typeof r == "string") {
|
|
2955
|
+
let i = r.charCodeAt(0);
|
|
2956
|
+
if (i >= 48 && i <= 57) {
|
|
2957
|
+
let i = +r;
|
|
2958
|
+
if (Number.isInteger(i) && i >= 0 && i < n) {
|
|
2959
|
+
let n = e[i];
|
|
2960
|
+
if (typeof n != "object") {
|
|
2961
|
+
let r = t[i * 2];
|
|
2962
|
+
n = e[i] = {
|
|
2963
|
+
index: i,
|
|
2964
|
+
key: n,
|
|
2965
|
+
start: r,
|
|
2966
|
+
size: t[i * 2 + 1],
|
|
2967
|
+
end: r + t[i * 2 + 1],
|
|
2968
|
+
lane: 0
|
|
2969
|
+
};
|
|
2970
|
+
}
|
|
2971
|
+
return n;
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
if (r === "length") return n;
|
|
2975
|
+
}
|
|
2976
|
+
return Reflect.get(e, r, i);
|
|
2977
|
+
} });
|
|
2978
|
+
}
|
|
2979
|
+
// ../../node_modules/.pnpm/@tanstack+virtual-core@3.19.11/node_modules/@tanstack/virtual-core/dist/esm/utils.js
|
|
2980
|
+
function K(e, t, n) {
|
|
2981
|
+
let r = n.initialDeps ?? [], i, a = !0;
|
|
2982
|
+
function o() {
|
|
2983
|
+
let o = e();
|
|
2984
|
+
return (o.length !== r.length || o.some((e, t) => r[t] !== e)) && (r = o, i = t(...o), n?.onChange && !(a && n.skipInitialOnChange) && n.onChange(i), a = !1), i;
|
|
2985
|
+
}
|
|
2986
|
+
return o.updateDeps = (e) => {
|
|
2987
|
+
r = e;
|
|
2988
|
+
}, o;
|
|
2989
|
+
}
|
|
2990
|
+
function Xi(e, t) {
|
|
2991
|
+
if (e === void 0) throw Error(`Unexpected undefined${t ? `: ${t}` : ""}`);
|
|
2992
|
+
return e;
|
|
2993
|
+
}
|
|
2994
|
+
var q = (e, t) => Math.abs(e - t) < 1.01, Zi = (e, t, n) => {
|
|
2995
|
+
let r;
|
|
2996
|
+
return Object.assign(function(...i) {
|
|
2997
|
+
e.clearTimeout(r), r = e.setTimeout(() => t.apply(this, i), n);
|
|
2998
|
+
}, { cancel: () => {
|
|
2999
|
+
e.clearTimeout(r);
|
|
3000
|
+
} });
|
|
3001
|
+
};
|
|
3002
|
+
// ../../node_modules/.pnpm/@tanstack+virtual-core@3.19.11/node_modules/@tanstack/virtual-core/dist/esm/scroll-classifier.js
|
|
3003
|
+
function Qi({ offset: e, isScrolling: t, elementMax: n, holdOffset: r, scrollOffset: i, pendingWrite: a, clampedMaxAtWrite: o }) {
|
|
3004
|
+
return t && a === null && e === i ? "spurious" : a !== null && Math.abs(e - a.target) < 1.5 ? "readBack" : a !== null && !a.smooth && n !== null && a.target > n + r + .5 && Math.abs(e - (n + r)) < 1.5 || a !== null && !a.smooth && a.lowMaxes?.some((t) => Math.abs(e - t) < 1.5) ? "clampedReadBack" : o !== null && Math.abs(e - o) < 1.5 ? "clampedEcho" : "external";
|
|
3005
|
+
}
|
|
3006
|
+
var $i = (e) => e === "smooth" || e === "smoothFinishing";
|
|
3007
|
+
function ea({ kind: e, offset: t, command: n, target: r }) {
|
|
3008
|
+
return e !== "spurious" && e !== "readBack" && e !== "clampedReadBack" && n?.index != null && n.phase !== "queued" && !$i(n.phase) && !q(t, n.lastTargetOffset) && !q(t, r()) && e !== "clampedEcho";
|
|
3009
|
+
}
|
|
3010
|
+
var ta = 40;
|
|
3011
|
+
function na(e) {
|
|
3012
|
+
let t = e[e.length - 1];
|
|
3013
|
+
if (t === void 0) return !1;
|
|
3014
|
+
let n = e.length - 2;
|
|
3015
|
+
for (; n >= 0 && t.t - e[n].t < ta;) n--;
|
|
3016
|
+
if (n < 0) return !1;
|
|
3017
|
+
let r = e[n], i = n - 1;
|
|
3018
|
+
for (; i >= 0 && r.t - e[i].t < ta;) i--;
|
|
3019
|
+
if (i < 0) return !1;
|
|
3020
|
+
let a = e[i], o = (t.offset - r.offset) / (t.t - r.t), s = (r.offset - a.offset) / (r.t - a.t);
|
|
3021
|
+
return o * s >= 0 && Math.abs(o) >= 2 * Math.abs(s) && Math.abs(o) - Math.abs(s) >= .8;
|
|
3022
|
+
}
|
|
3023
|
+
function ra(e) {
|
|
3024
|
+
let t = e[e.length - 1];
|
|
3025
|
+
if (t === void 0) return !1;
|
|
3026
|
+
let n = e.length - 2;
|
|
3027
|
+
for (; n >= 0 && t.t - e[n].t < ta;) n--;
|
|
3028
|
+
if (n < 0) return !1;
|
|
3029
|
+
let r = e[n];
|
|
3030
|
+
return Math.abs(t.offset - r.offset) / (t.t - r.t) >= .05;
|
|
3031
|
+
}
|
|
3032
|
+
// ../../node_modules/.pnpm/@tanstack+virtual-core@3.19.11/node_modules/@tanstack/virtual-core/dist/esm/ios-gesture.js
|
|
3033
|
+
var ia, aa = () => {
|
|
3034
|
+
if (ia !== void 0) return ia;
|
|
3035
|
+
if (typeof navigator > "u") return ia = !1;
|
|
3036
|
+
if (/iP(hone|od|ad)/.test(navigator.userAgent)) return ia = !0;
|
|
3037
|
+
let e = navigator.maxTouchPoints;
|
|
3038
|
+
return ia = navigator.platform === "MacIntel" && e !== void 0 && e > 0;
|
|
3039
|
+
}, oa, sa = () => oa === void 0 ? oa = aa() && typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("overflow-anchor: auto") : oa, ca = () => !aa() || sa(), J = {
|
|
3040
|
+
capture: !0,
|
|
3041
|
+
passive: !0
|
|
3042
|
+
}, la = class {
|
|
3043
|
+
constructor(e) {
|
|
3044
|
+
this.host = e, this._touch = null, this.inMotion = () => this._touch !== null && this._touch.phase !== "lateFling", this.dragging = () => this._touch?.phase === "down" && this._touch.moved, this.tail = () => this._touch?.phase === "tail" ? this._touch.moved ? "fling" : "tap" : null, this.onScroll = ({ isScrolling: e, ownReadBack: t, moved: n, external: r }) => (e && this._touch?.phase === "tail" ? this._openTail(this._touch.moved || !t, !1) : this._touch?.phase === "lateFling" && (this.host.now() > this._touch.until ? this._touch = null : r && e && n && this._openTail(!0, !1)), !t && e && n && this._touch?.phase === "down" ? (this._touch.moved = !0, !0) : !1), this.touchStart = () => {
|
|
3045
|
+
this.end(), this._touch = {
|
|
3046
|
+
phase: "down",
|
|
3047
|
+
moved: !1
|
|
3048
|
+
};
|
|
3049
|
+
}, this.touchEnd = () => {
|
|
3050
|
+
let e = this._touch?.phase === "down" && this._touch.moved;
|
|
3051
|
+
this.end(), this._openTail(e, e);
|
|
3052
|
+
}, this.end = () => {
|
|
3053
|
+
let e = this.host.getWindow();
|
|
3054
|
+
this._touch?.phase === "tail" && e != null && e.clearTimeout(this._touch.timerId), this._touch = null;
|
|
3055
|
+
}, this.listen = (e) => {
|
|
3056
|
+
let t = () => this.touchStart(), n = () => this.touchEnd();
|
|
3057
|
+
return e.addEventListener("touchstart", t, J), e.addEventListener("touchend", n, J), e.addEventListener("touchcancel", n, J), () => {
|
|
3058
|
+
e.removeEventListener("touchstart", t, J), e.removeEventListener("touchend", n, J), e.removeEventListener("touchcancel", n, J), this.end();
|
|
3059
|
+
};
|
|
3060
|
+
}, this._openTail = (e, t) => {
|
|
3061
|
+
let n = this.host.getWindow();
|
|
3062
|
+
if (n == null) return;
|
|
3063
|
+
this.end();
|
|
3064
|
+
let r = {
|
|
3065
|
+
phase: "tail",
|
|
3066
|
+
moved: e,
|
|
3067
|
+
awaitingFling: t,
|
|
3068
|
+
timerId: n.setTimeout(() => {
|
|
3069
|
+
this.host.tailStillMoving() ? this._openTail(r.moved, r.awaitingFling) : (this._touch = r.awaitingFling ? {
|
|
3070
|
+
phase: "lateFling",
|
|
3071
|
+
until: this.host.now() + 1e3
|
|
3072
|
+
} : null, this.host.onTailClosed());
|
|
3073
|
+
}, 150)
|
|
3074
|
+
};
|
|
3075
|
+
this._touch = r;
|
|
3076
|
+
};
|
|
3077
|
+
}
|
|
3078
|
+
get touch() {
|
|
3079
|
+
return this._touch;
|
|
3080
|
+
}
|
|
3081
|
+
}, ua = (e) => {
|
|
3082
|
+
let { clientWidth: t, clientHeight: n } = e;
|
|
3083
|
+
return {
|
|
3084
|
+
width: t,
|
|
3085
|
+
height: n
|
|
3086
|
+
};
|
|
3087
|
+
}, da = (e) => {
|
|
3088
|
+
let t = /* @__PURE__ */ new Set();
|
|
3089
|
+
return {
|
|
3090
|
+
schedule: (n) => {
|
|
3091
|
+
let r = e.requestAnimationFrame(() => {
|
|
3092
|
+
t.delete(r), n();
|
|
3093
|
+
});
|
|
3094
|
+
t.add(r);
|
|
3095
|
+
},
|
|
3096
|
+
cancel: () => {
|
|
3097
|
+
t.forEach((t) => e.cancelAnimationFrame(t)), t.clear();
|
|
3098
|
+
}
|
|
3099
|
+
};
|
|
3100
|
+
}, fa = (e) => e, pa = (e) => {
|
|
3101
|
+
let t = e.overscan * Math.max(e.lanes ?? 1, 1), n = Math.max(e.startIndex - t, 0), r = Math.min(e.endIndex + t, e.count - 1) - n + 1, i = Array(r);
|
|
3102
|
+
for (let e = 0; e < r; e++) i[e] = n + e;
|
|
3103
|
+
return i;
|
|
3104
|
+
}, ma = (e, t) => {
|
|
3105
|
+
let n = e.scrollElement;
|
|
3106
|
+
if (!n) return;
|
|
3107
|
+
let r = e.targetWindow;
|
|
3108
|
+
if (!r) return;
|
|
3109
|
+
let i = (e) => {
|
|
3110
|
+
let { width: n, height: r } = e;
|
|
3111
|
+
t({
|
|
3112
|
+
width: Math.round(n),
|
|
3113
|
+
height: Math.round(r)
|
|
3114
|
+
});
|
|
3115
|
+
};
|
|
3116
|
+
if (i(ua(n)), !r.ResizeObserver) return () => {};
|
|
3117
|
+
let a = da(r), o = new r.ResizeObserver(() => {
|
|
3118
|
+
let t = () => {
|
|
3119
|
+
i(ua(n));
|
|
3120
|
+
};
|
|
3121
|
+
e.options.useAnimationFrameWithResizeObserver ? a.schedule(t) : t();
|
|
3122
|
+
});
|
|
3123
|
+
return o.observe(n, { box: "content-box" }), () => {
|
|
3124
|
+
o.unobserve(n), a.cancel();
|
|
3125
|
+
};
|
|
3126
|
+
}, ha = { passive: !0 }, ga = typeof window > "u" || "onscrollend" in window, _a = (e, t, n) => {
|
|
3127
|
+
let r = e.scrollElement;
|
|
3128
|
+
if (!r) return;
|
|
3129
|
+
let i = e.targetWindow;
|
|
3130
|
+
if (!i) return;
|
|
3131
|
+
let a = e.options.useScrollendEvent && ga, o = 0, s = a ? null : Zi(i, () => t(n(r), !1), e.options.isScrollingResetDelay), c = (e) => () => {
|
|
3132
|
+
o = n(r), s?.(), t(o, e);
|
|
3133
|
+
}, l = c(!0), u = c(!1);
|
|
3134
|
+
return r.addEventListener("scroll", l, ha), a && r.addEventListener("scrollend", u, ha), () => {
|
|
3135
|
+
r.removeEventListener("scroll", l), a && r.removeEventListener("scrollend", u), s?.cancel();
|
|
3136
|
+
};
|
|
3137
|
+
}, va = (e, t) => _a(e, t, (t) => {
|
|
3138
|
+
let { horizontal: n, isRtl: r } = e.options;
|
|
3139
|
+
return n ? t.scrollLeft * (r && -1 || 1) : t.scrollTop;
|
|
3140
|
+
}), ya = (e, t, n) => {
|
|
3141
|
+
if (n.options.useCachedMeasurements) {
|
|
3142
|
+
let t = n.indexFromElement(e), r = n.options.getItemKey(t);
|
|
3143
|
+
return n.itemSizeCache.get(r) ?? n.options.estimateSize(t);
|
|
3144
|
+
}
|
|
3145
|
+
if (t?.borderBoxSize) {
|
|
3146
|
+
let e = t.borderBoxSize[0];
|
|
3147
|
+
if (e) return Math.round(e[n.options.horizontal ? "inlineSize" : "blockSize"]);
|
|
3148
|
+
}
|
|
3149
|
+
if (!t) {
|
|
3150
|
+
let t = n.indexFromElement(e), r = n.options.getItemKey(t), i = n.itemSizeCache.get(r);
|
|
3151
|
+
if (i !== void 0) return i;
|
|
3152
|
+
}
|
|
3153
|
+
return e[n.options.horizontal ? "offsetWidth" : "offsetHeight"];
|
|
3154
|
+
}, ba = (e, { adjustments: t = 0, behavior: n }, r) => {
|
|
3155
|
+
var i;
|
|
3156
|
+
let { scrollElement: a, options: o } = r, s = e + t, c = o.horizontal && o.isRtl && a !== null && "ownerDocument" in a;
|
|
3157
|
+
(i = a?.scrollTo) == null || i.call(a, {
|
|
3158
|
+
[o.horizontal ? "left" : "top"]: c ? -s : s,
|
|
3159
|
+
behavior: n
|
|
3160
|
+
});
|
|
3161
|
+
}, xa = (e, t) => e === "smooth" ? t ? "smoothLanded" : "smooth" : "instant", Sa = (e) => e?.phase === "smooth" || e?.phase === "smoothLanded";
|
|
3162
|
+
function Ca(e, t, n, r) {
|
|
3163
|
+
if (t === 0) return !1;
|
|
3164
|
+
let i = r(0), a = /* @__PURE__ */ new Set(), o = 0;
|
|
3165
|
+
for (; o < e;) {
|
|
3166
|
+
let e = n(o);
|
|
3167
|
+
if (e === i) break;
|
|
3168
|
+
a.add(e), o++;
|
|
3169
|
+
}
|
|
3170
|
+
let s = e - o;
|
|
3171
|
+
if (s === 0 || s >= t) return !1;
|
|
3172
|
+
for (let e = 0; e < s; e++) if (r(e) !== n(o + e)) return !1;
|
|
3173
|
+
for (let e = s; e < t; e++) if (a.has(r(e))) return !1;
|
|
3174
|
+
return !0;
|
|
3175
|
+
}
|
|
3176
|
+
var wa = class {
|
|
3177
|
+
constructor(e) {
|
|
3178
|
+
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollState = null, this.measurementsCache = [], this._singleLaneMeasurements = null, this.itemSizeCache = /* @__PURE__ */ new Map(), this.itemSizeCacheVersion = 0, this.laneAssignments = /* @__PURE__ */ new Map(), this.pendingMin = null, this.prevLanes = void 0, this.lanesChangedFlag = !1, this.lanesSettling = !1, this.pendingScrollAnchor = null, this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this._holdOffset = 0, this._reportedOverscroll = !1, this._iosGesture = new la({
|
|
3179
|
+
getWindow: () => this.targetWindow,
|
|
3180
|
+
now: () => this.now(),
|
|
3181
|
+
tailStillMoving: () => {
|
|
3182
|
+
let e = this.scrollState;
|
|
3183
|
+
if (e?.phase !== "queued" || this.pendingWrite !== null) return !1;
|
|
3184
|
+
let t = this._readElementOffset();
|
|
3185
|
+
return t === null || this._lastElementOffset === null || Math.abs(t - this._lastElementOffset) < 1 ? !1 : (this._lastElementOffset = t, e.samples = [...e.samples ?? [], {
|
|
3186
|
+
t: this.now(),
|
|
3187
|
+
offset: t
|
|
3188
|
+
}], !0);
|
|
3189
|
+
},
|
|
3190
|
+
onTailClosed: () => {
|
|
3191
|
+
let e = this.scrollState;
|
|
3192
|
+
e?.phase === "queued" && ra(e.samples ?? []) && (this.scrollState = null), this._flushHoldIfReady(!0), this._writeAwaitingCommand(), this._retryClampedAdjustment();
|
|
3193
|
+
}
|
|
3194
|
+
}), this._lastElementOffset = null, this.pendingWrite = null, this._clampedAdjustment = null, this.elementsCache = /* @__PURE__ */ new Map(), this._resizeBatch = null, this.now = () => {
|
|
3195
|
+
var e;
|
|
3196
|
+
return ((e = this.targetWindow?.performance)?.now)?.call(e) ?? Date.now();
|
|
3197
|
+
}, this.observer = /* @__PURE__ */ (() => {
|
|
3198
|
+
let e = null, t = null, n = !1, r = !1, i = /* @__PURE__ */ new Set(), a = () => {
|
|
3199
|
+
if (e) return e;
|
|
3200
|
+
let r = this.targetWindow;
|
|
3201
|
+
if (!r || !r.ResizeObserver) return null;
|
|
3202
|
+
let i = t = da(r);
|
|
3203
|
+
return e = new r.ResizeObserver((e) => {
|
|
3204
|
+
let t = () => {
|
|
3205
|
+
let t = { sync: !1 };
|
|
3206
|
+
this._resizeBatch = t;
|
|
3207
|
+
try {
|
|
3208
|
+
e.forEach(o);
|
|
3209
|
+
} finally {
|
|
3210
|
+
this._resizeBatch = null, t.notify && (this.notify(t.sync), this._noteClampMax(), this._flushHoldIfReady(!0), this._retryClampedAdjustment(), this.measureElement(null));
|
|
3211
|
+
}
|
|
3212
|
+
};
|
|
3213
|
+
if (this.options.useAnimationFrameWithResizeObserver) i.schedule(t);
|
|
3214
|
+
else {
|
|
3215
|
+
n = !0;
|
|
3216
|
+
try {
|
|
3217
|
+
t();
|
|
3218
|
+
} finally {
|
|
3219
|
+
n = !1;
|
|
3220
|
+
}
|
|
3221
|
+
}
|
|
3222
|
+
});
|
|
3223
|
+
}, o = (e) => {
|
|
3224
|
+
let t = e.target, n = this.indexFromElement(t);
|
|
3225
|
+
if (t.isConnected) this.isIndexInRange(n) && this.shouldMeasureDuringScroll(n) && this.resizeItem(n, this.options.measureElement(t, e, this));
|
|
3226
|
+
else {
|
|
3227
|
+
this.observer.unobserve(t);
|
|
3228
|
+
for (let [e, n] of this.elementsCache) if (n === t) {
|
|
3229
|
+
this.elementsCache.delete(e);
|
|
3230
|
+
break;
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3233
|
+
};
|
|
3234
|
+
return {
|
|
3235
|
+
disconnect: () => {
|
|
3236
|
+
var n;
|
|
3237
|
+
(n = a()) == null || n.disconnect(), t?.cancel(), i.clear(), r = !1, e = null, t = null;
|
|
3238
|
+
},
|
|
3239
|
+
observe: (o) => {
|
|
3240
|
+
let s = a();
|
|
3241
|
+
s && (n ? (i.add(o), r || (r = !0, t?.schedule(() => {
|
|
3242
|
+
r = !1, i.forEach((t) => {
|
|
3243
|
+
t.isConnected && e?.observe(t, { box: "border-box" });
|
|
3244
|
+
}), i.clear();
|
|
3245
|
+
}))) : s.observe(o, { box: "border-box" }));
|
|
3246
|
+
},
|
|
3247
|
+
unobserve: (e) => {
|
|
3248
|
+
var t;
|
|
3249
|
+
i.delete(e), (t = a()) == null || t.unobserve(e);
|
|
3250
|
+
}
|
|
3251
|
+
};
|
|
3252
|
+
})(), this.range = null, this.setOptions = (e) => {
|
|
3253
|
+
let t = {
|
|
3254
|
+
debug: !1,
|
|
3255
|
+
initialOffset: 0,
|
|
3256
|
+
overscan: 1,
|
|
3257
|
+
paddingStart: 0,
|
|
3258
|
+
paddingEnd: 0,
|
|
3259
|
+
scrollPaddingStart: 0,
|
|
3260
|
+
scrollPaddingEnd: 0,
|
|
3261
|
+
horizontal: !1,
|
|
3262
|
+
getItemKey: fa,
|
|
3263
|
+
rangeExtractor: pa,
|
|
3264
|
+
onChange: () => {},
|
|
3265
|
+
measureElement: ya,
|
|
3266
|
+
initialRect: {
|
|
3267
|
+
width: 0,
|
|
3268
|
+
height: 0
|
|
3269
|
+
},
|
|
3270
|
+
scrollMargin: 0,
|
|
3271
|
+
gap: 0,
|
|
3272
|
+
indexAttribute: "data-index",
|
|
3273
|
+
initialMeasurementsCache: [],
|
|
3274
|
+
lanes: 1,
|
|
3275
|
+
anchorTo: "start",
|
|
3276
|
+
followOnAppend: !1,
|
|
3277
|
+
scrollEndThreshold: 1,
|
|
3278
|
+
isScrollingResetDelay: 150,
|
|
3279
|
+
enabled: !0,
|
|
3280
|
+
isRtl: !1,
|
|
3281
|
+
useScrollendEvent: !1,
|
|
3282
|
+
useAnimationFrameWithResizeObserver: !1,
|
|
3283
|
+
laneAssignmentMode: "estimate",
|
|
3284
|
+
useCachedMeasurements: !1
|
|
3285
|
+
};
|
|
3286
|
+
for (let n in e) {
|
|
3287
|
+
let r = e[n];
|
|
3288
|
+
r !== void 0 && (t[n] = r);
|
|
3289
|
+
}
|
|
3290
|
+
let n = this.options, r = null, i = null, a = !1;
|
|
3291
|
+
if (n !== void 0 && n.enabled && t.enabled && t.anchorTo === "end" && this.scrollElement !== null) {
|
|
3292
|
+
let e = n.count, o = t.count, s = this.getMeasurements(), c = this._singleLaneMeasurements?.items ?? s, l = (e) => Ji(c[e]), u = e > 0 ? l(0) : null, d = e > 0 ? l(e - 1) : null;
|
|
3293
|
+
if (o !== e || e > 0 && o > 0 && (t.getItemKey(0) !== u || t.getItemKey(o - 1) !== d)) {
|
|
3294
|
+
a = !0;
|
|
3295
|
+
let c = e > 0 ? this.getVirtualItemForOffset(this.getScrollOffset()) ?? s[0] : null;
|
|
3296
|
+
c && (r = [c.key, this.getScrollOffset() - c.start]);
|
|
3297
|
+
let u = t.followOnAppend === !0 ? "auto" : t.followOnAppend || null;
|
|
3298
|
+
u && o > 0 && this.isAtEnd(n.scrollEndThreshold) && (e === 0 || t.getItemKey(o - 1) !== d) && (o > e || Ca(e, o, l, t.getItemKey)) && (i = u);
|
|
3299
|
+
}
|
|
3300
|
+
}
|
|
3301
|
+
this.options = t, a && (this.pendingMin = 0, this.itemSizeCacheVersion++);
|
|
3302
|
+
let o = null;
|
|
3303
|
+
if (r && this.scrollOffset !== null && !this._awaitingCommandReadBack()) {
|
|
3304
|
+
let [e, t] = r, n = this.getMeasurements(), { count: a, getItemKey: s } = this.options, c = 0;
|
|
3305
|
+
for (; c < a && s(c) !== e;) c++;
|
|
3306
|
+
if (c < a) {
|
|
3307
|
+
let e = n[c];
|
|
3308
|
+
if (e) {
|
|
3309
|
+
let n = Math.max(0, e.start + t);
|
|
3310
|
+
!i && n !== this.scrollOffset && (o = n - this.scrollOffset, this.scrollOffset = n);
|
|
3311
|
+
}
|
|
3312
|
+
}
|
|
3313
|
+
}
|
|
3314
|
+
i ? this.pendingScrollAnchor = {
|
|
3315
|
+
kind: "follow",
|
|
3316
|
+
behavior: i
|
|
3317
|
+
} : o !== null && (this._canWriteScroll() ? this.pendingScrollAnchor = {
|
|
3318
|
+
kind: "anchor",
|
|
3319
|
+
delta: o
|
|
3320
|
+
} : (this._holdOffset += o, this._followOffsetTarget(o)));
|
|
3321
|
+
}, this.notify = (e) => {
|
|
3322
|
+
var t, n;
|
|
3323
|
+
(n = (t = this.options).onChange) == null || n.call(t, this, e);
|
|
3324
|
+
}, this.maybeNotify = K(() => (this.calculateRange(), [
|
|
3325
|
+
this.isScrolling,
|
|
3326
|
+
this.range ? this.range.startIndex : null,
|
|
3327
|
+
this.range ? this.range.endIndex : null
|
|
3328
|
+
]), (e) => {
|
|
3329
|
+
this.notify(e);
|
|
3330
|
+
}, {
|
|
3331
|
+
key: !1,
|
|
3332
|
+
debug: () => this.options.debug,
|
|
3333
|
+
initialDeps: [
|
|
3334
|
+
this.isScrolling,
|
|
3335
|
+
this.range ? this.range.startIndex : null,
|
|
3336
|
+
this.range ? this.range.endIndex : null
|
|
3337
|
+
]
|
|
3338
|
+
}), this.cleanup = () => {
|
|
3339
|
+
var e;
|
|
3340
|
+
this.unsubs.filter(Boolean).forEach((e) => e()), this.unsubs = [], this.observer.disconnect(), this.rafId != null && this.targetWindow && (this.targetWindow.cancelAnimationFrame(this.rafId), this.rafId = null), this.scrollState = null, (e = this._momentumStop) == null || e.restore(), this._momentumStop = null, this.isScrolling = !1, this.scrollDirection = null, this._holdOffset = 0, this._reportedOverscroll = !1, this._clampedAdjustment = null, this.pendingWrite = null, this.scrollElement = null, this.targetWindow = null;
|
|
3341
|
+
}, this._didMount = () => () => {
|
|
3342
|
+
this.cleanup();
|
|
3343
|
+
}, this._willUpdate = () => {
|
|
3344
|
+
let e = this.options.enabled ? this.options.getScrollElement() : null;
|
|
3345
|
+
if (this.scrollElement !== e) {
|
|
3346
|
+
if (this.cleanup(), !e) {
|
|
3347
|
+
this.maybeNotify();
|
|
3348
|
+
return;
|
|
3349
|
+
}
|
|
3350
|
+
this.scrollElement = e, this.targetWindow = this.scrollElement && "ownerDocument" in this.scrollElement ? this.scrollElement.ownerDocument.defaultView : this.scrollElement?.window ?? null, this.elementsCache.forEach((e) => {
|
|
3351
|
+
this.observer.observe(e);
|
|
3352
|
+
}), this.unsubs.push(this.options.observeElementRect(this, (e) => {
|
|
3353
|
+
this.scrollRect = e, this.maybeNotify();
|
|
3354
|
+
})), this.unsubs.push(this.options.observeElementOffset(this, (e, t) => {
|
|
3355
|
+
let n = t ? this._elementMaxScrollOffset() : null, r = this._reportedOverscroll;
|
|
3356
|
+
this._reportedOverscroll = e < 0 || n !== null && e > n + 1;
|
|
3357
|
+
let i = e;
|
|
3358
|
+
this._lastElementOffset = i, e = this._toLayoutOffset(e);
|
|
3359
|
+
let a = this._classifyScrollEvent(e, t, n);
|
|
3360
|
+
if (a === "spurious") return;
|
|
3361
|
+
a === "readBack" ? e = this.pendingWrite.target : a === "clampedReadBack" && this.scrollState?.index != null && e < this.getMaxScrollOffset() - 1.5 ? this.scrollState.lastTargetOffset = e : ea({
|
|
3362
|
+
kind: a,
|
|
3363
|
+
offset: e,
|
|
3364
|
+
command: this.scrollState,
|
|
3365
|
+
target: () => this.getScrollStateTarget(this.scrollState)
|
|
3366
|
+
}) && (this.scrollState = null), this.pendingWrite = null, this._clampedAdjustment !== null && Math.abs(e - this._clampedAdjustment.maxAtWrite) >= 1.5 && (this._clampedAdjustment = null);
|
|
3367
|
+
let o = this.getScrollOffset(), s = this.scrollDirection;
|
|
3368
|
+
this.scrollDirection = t ? o === e ? this.scrollDirection : o < e ? "forward" : "backward" : null, this.scrollOffset = e, this.isScrolling = t;
|
|
3369
|
+
let c = this.scrollState;
|
|
3370
|
+
if (c?.phase === "queued" && a === "external" && t) {
|
|
3371
|
+
if (r || this._reportedOverscroll) c.samples = [];
|
|
3372
|
+
else {
|
|
3373
|
+
let e = this.now();
|
|
3374
|
+
c.samples = [...(c.samples ?? []).filter((t) => e - t.t <= 200), {
|
|
3375
|
+
t: e,
|
|
3376
|
+
offset: i
|
|
3377
|
+
}], (s !== null && this.scrollDirection !== s || na(c.samples)) && (this.scrollState = null);
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3380
|
+
this._iosGesture.onScroll({
|
|
3381
|
+
isScrolling: t,
|
|
3382
|
+
ownReadBack: a === "readBack",
|
|
3383
|
+
moved: e !== o,
|
|
3384
|
+
external: a === "external" && this.scrollState?.phase !== "smooth" && this.scrollState?.phase !== "smoothFinishing"
|
|
3385
|
+
}) && this.scrollState?.phase === "queued" && (this.scrollState = null), this._flushHoldIfReady(!0), this.scrollState && this.scheduleScrollReconcile(), this.maybeNotify();
|
|
3386
|
+
})), "addEventListener" in this.scrollElement && this.unsubs.push(this._iosGesture.listen(this.scrollElement)), this._scrollToOffset(this.getScrollOffset());
|
|
3387
|
+
}
|
|
3388
|
+
this._noteClampMax();
|
|
3389
|
+
let t = this.pendingScrollAnchor;
|
|
3390
|
+
this.pendingScrollAnchor = null, t && this.scrollElement && this.options.enabled && (t.kind === "anchor" ? this._canWriteScroll() ? Sa(this.scrollState) && !q(this.getScrollOffset() - t.delta, this.scrollState.lastTargetOffset) || (this._followOffsetTarget(t.delta), this._scrollToOffset(this.getScrollOffset())) : (this._holdOffset += t.delta, this._followOffsetTarget(t.delta), this.notify(!1)) : this.scrollToEnd({ behavior: t.behavior })), this._flushHoldIfReady(!1), this._retryClampedAdjustment();
|
|
3391
|
+
}, this._classifyScrollEvent = (e, t, n) => Qi({
|
|
3392
|
+
offset: e,
|
|
3393
|
+
isScrolling: t,
|
|
3394
|
+
elementMax: n,
|
|
3395
|
+
holdOffset: this._holdOffset,
|
|
3396
|
+
scrollOffset: this.scrollOffset,
|
|
3397
|
+
pendingWrite: this.pendingWrite,
|
|
3398
|
+
clampedMaxAtWrite: this._clampedAdjustment?.maxAtWrite ?? null
|
|
3399
|
+
}), this._retryClampedAdjustment = () => {
|
|
3400
|
+
if (this._clampedAdjustment === null || !this.scrollElement || !this.options.enabled || !this._canWriteScroll()) return;
|
|
3401
|
+
let { target: e, maxAtWrite: t } = this._clampedAdjustment, n = this.getMaxScrollOffset();
|
|
3402
|
+
n > t + .5 && (this._clampedAdjustment = e > n + .5 ? {
|
|
3403
|
+
target: e,
|
|
3404
|
+
maxAtWrite: n
|
|
3405
|
+
} : null, this._scrollToOffset(e));
|
|
3406
|
+
}, this._writeAwaitingCommand = () => {
|
|
3407
|
+
let e = this.scrollState;
|
|
3408
|
+
if (e === null || e.phase !== "queued") return;
|
|
3409
|
+
let { behavior: t } = e;
|
|
3410
|
+
this.getMeasurements();
|
|
3411
|
+
let n = this.getScrollStateTarget(e);
|
|
3412
|
+
e.lastTargetOffset = n, this._clampedAdjustment = null, e.phase = xa(t, e.index != null && q(n, this.getScrollOffset())), this._scrollToOffset(n, { behavior: t }), this.scheduleScrollReconcile();
|
|
3413
|
+
}, this._readElementOffset = () => {
|
|
3414
|
+
let e = this.scrollElement;
|
|
3415
|
+
if (e == null) return null;
|
|
3416
|
+
let { horizontal: t, isRtl: n } = this.options;
|
|
3417
|
+
return typeof e.scrollTop == "number" ? t ? e.scrollLeft * (n && -1 || 1) : e.scrollTop : typeof e.scrollY == "number" ? t ? e.scrollX : e.scrollY : null;
|
|
3418
|
+
}, this._canWriteScroll = () => !(aa() && this._iosGesture.inMotion()) && !this._reportedOverscroll, this._flushHoldIfReady = (e) => {
|
|
3419
|
+
if (this._holdOffset === 0 || !this.scrollElement || !this.options.enabled || !this._canWriteScroll() || this.scrollState?.phase === "smooth") return;
|
|
3420
|
+
this._holdOffset = 0, this.scrollOffset !== null && this.scrollOffset < 0 && (this.scrollOffset = 0), this.notify(e);
|
|
3421
|
+
let t = this.getCommandWrittenOffset() ?? this.getScrollOffset();
|
|
3422
|
+
this._clampedAdjustment = this._clampedBy(t), this._scrollToOffset(t);
|
|
3423
|
+
}, this.rafId = null, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getMeasurementOptions = K(() => [
|
|
3424
|
+
this.options.count,
|
|
3425
|
+
this.options.paddingStart,
|
|
3426
|
+
this.options.scrollMargin,
|
|
3427
|
+
this.options.getItemKey,
|
|
3428
|
+
this.options.enabled,
|
|
3429
|
+
this.options.lanes,
|
|
3430
|
+
this.options.laneAssignmentMode,
|
|
3431
|
+
this.options.gap
|
|
3432
|
+
], (e, t, n, r, i, a, o, s) => (this.prevLanes !== void 0 && this.prevLanes !== a && (this.lanesChangedFlag = !0), this.prevLanes = a, this.pendingMin = null, {
|
|
3433
|
+
count: e,
|
|
3434
|
+
paddingStart: t,
|
|
3435
|
+
scrollMargin: n,
|
|
3436
|
+
getItemKey: r,
|
|
3437
|
+
enabled: i,
|
|
3438
|
+
lanes: a,
|
|
3439
|
+
laneAssignmentMode: o,
|
|
3440
|
+
gap: s
|
|
3441
|
+
}), { key: !1 }), this.isIndexInRange = (e) => e >= 0 && e < this.options.count, this.getMeasurements = K(() => [this.getMeasurementOptions(), this.itemSizeCacheVersion], ({ count: e, paddingStart: t, scrollMargin: n, getItemKey: r, enabled: i, lanes: a, laneAssignmentMode: o, gap: s }, c) => {
|
|
3442
|
+
let l = this.itemSizeCache;
|
|
3443
|
+
if (!i) return this.measurementsCache = [], this._singleLaneMeasurements = null, this.itemSizeCache.clear(), this.laneAssignments.clear(), [];
|
|
3444
|
+
if (this.laneAssignments.size > e) for (let t of this.laneAssignments.keys()) t >= e && this.laneAssignments.delete(t);
|
|
3445
|
+
this.lanesChangedFlag && (this.lanesChangedFlag = !1, this.lanesSettling = !0, this.measurementsCache = [], this._singleLaneMeasurements = null, this.itemSizeCache.clear(), this.laneAssignments.clear(), this.pendingMin = null), this.measurementsCache.length === 0 && !this.lanesSettling && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((e) => {
|
|
3446
|
+
this.itemSizeCache.set(e.key, e.size);
|
|
3447
|
+
}));
|
|
3448
|
+
let u = this.lanesSettling ? 0 : this.pendingMin ?? 0;
|
|
3449
|
+
if (this.pendingMin = null, this.lanesSettling && this.measurementsCache.length === e && (this.lanesSettling = !1), a === 1) {
|
|
3450
|
+
let i = e * 2, a = this._singleLaneMeasurements?.flat;
|
|
3451
|
+
if (!a || a.length < i) {
|
|
3452
|
+
let e = new Float64Array(i);
|
|
3453
|
+
a && u > 0 && e.set(a.subarray(0, u * 2)), a = e;
|
|
3454
|
+
}
|
|
3455
|
+
let o = u === 0 ? Array(e) : this._singleLaneMeasurements.items.slice(), c;
|
|
3456
|
+
if (u === 0) c = t + n;
|
|
3457
|
+
else {
|
|
3458
|
+
let e = u - 1;
|
|
3459
|
+
c = a[e * 2] + a[e * 2 + 1] + s;
|
|
3460
|
+
}
|
|
3461
|
+
for (let t = u; t < e; t++) {
|
|
3462
|
+
let e = r(t);
|
|
3463
|
+
o[t] = e;
|
|
3464
|
+
let n = l.get(e), i = typeof n == "number" ? n : this.options.estimateSize(t);
|
|
3465
|
+
a[t * 2] = c, a[t * 2 + 1] = i, c += i + s;
|
|
3466
|
+
}
|
|
3467
|
+
this._singleLaneMeasurements = {
|
|
3468
|
+
flat: a,
|
|
3469
|
+
items: o
|
|
3470
|
+
};
|
|
3471
|
+
let d = Yi(o, a);
|
|
3472
|
+
return this.measurementsCache = d, d;
|
|
3473
|
+
}
|
|
3474
|
+
let d = this.measurementsCache.slice(0, u), f = Array(a).fill(void 0), p = new Float64Array(a), m = 0;
|
|
3475
|
+
for (let e = 0; e < u; e++) {
|
|
3476
|
+
let t = d[e];
|
|
3477
|
+
t && (f[t.lane] === void 0 && m++, f[t.lane] = e, p[t.lane] = t.end);
|
|
3478
|
+
}
|
|
3479
|
+
for (let i = u; i < e; i++) {
|
|
3480
|
+
let e = r(i), c = this.laneAssignments.get(i), u, h, ee = o === "estimate" || l.has(e);
|
|
3481
|
+
if (c !== void 0 && this.options.lanes > 1) {
|
|
3482
|
+
u = c;
|
|
3483
|
+
let e = f[u], r = e === void 0 ? void 0 : d[e];
|
|
3484
|
+
h = r ? r.end + s : t + n;
|
|
3485
|
+
} else if (m === a) {
|
|
3486
|
+
let e = 0, t = p[0], n = f[0];
|
|
3487
|
+
for (let r = 1; r < a; r++) {
|
|
3488
|
+
let i = p[r];
|
|
3489
|
+
(i < t || i === t && f[r] < n) && (e = r, t = i, n = f[r]);
|
|
3490
|
+
}
|
|
3491
|
+
u = e, h = t + s, ee && this.laneAssignments.set(i, u);
|
|
3492
|
+
} else u = i % this.options.lanes, h = t + n, ee && this.laneAssignments.set(i, u);
|
|
3493
|
+
let te = l.get(e), g = typeof te == "number" ? te : this.options.estimateSize(i), _ = h + g;
|
|
3494
|
+
d[i] = {
|
|
3495
|
+
index: i,
|
|
3496
|
+
start: h,
|
|
3497
|
+
size: g,
|
|
3498
|
+
end: _,
|
|
3499
|
+
key: e,
|
|
3500
|
+
lane: u
|
|
3501
|
+
}, f[u] === void 0 && m++, f[u] = i, p[u] = _;
|
|
3502
|
+
}
|
|
3503
|
+
return this.measurementsCache = d, d;
|
|
3504
|
+
}, {
|
|
3505
|
+
key: !1,
|
|
3506
|
+
debug: () => this.options.debug
|
|
3507
|
+
}), this.calculateRange = K(() => [
|
|
3508
|
+
this.getMeasurements(),
|
|
3509
|
+
this.getSize(),
|
|
3510
|
+
this.getScrollOffset(),
|
|
3511
|
+
this.options.lanes,
|
|
3512
|
+
this._getLayoutTotalSize() + this.options.scrollMargin
|
|
3513
|
+
], (e, t, n, r, i) => {
|
|
3514
|
+
if (e.length === 0 || t === 0) return this.range = null, null;
|
|
3515
|
+
let a = Math.max(i - t, 0);
|
|
3516
|
+
return this.range = Da(e, t, Math.min(n, a), r, r === 1 && this._singleLaneMeasurements !== null ? this._singleLaneMeasurements.flat : null), this.range;
|
|
3517
|
+
}, {
|
|
3518
|
+
key: !1,
|
|
3519
|
+
debug: () => this.options.debug
|
|
3520
|
+
}), this.getVirtualIndexes = K(() => {
|
|
3521
|
+
let e = null, t = null, n = this.calculateRange();
|
|
3522
|
+
return n && (e = n.startIndex, t = n.endIndex), this.maybeNotify.updateDeps([
|
|
3523
|
+
this.isScrolling,
|
|
3524
|
+
e,
|
|
3525
|
+
t
|
|
3526
|
+
]), [
|
|
3527
|
+
this.options.rangeExtractor,
|
|
3528
|
+
this.options.overscan,
|
|
3529
|
+
this.options.count,
|
|
3530
|
+
e,
|
|
3531
|
+
t,
|
|
3532
|
+
this.options.lanes
|
|
3533
|
+
];
|
|
3534
|
+
}, (e, t, n, r, i, a) => r === null || i === null ? [] : e({
|
|
3535
|
+
startIndex: r,
|
|
3536
|
+
endIndex: i,
|
|
3537
|
+
overscan: t,
|
|
3538
|
+
count: n,
|
|
3539
|
+
lanes: a
|
|
3540
|
+
}), {
|
|
3541
|
+
key: !1,
|
|
3542
|
+
debug: () => this.options.debug
|
|
3543
|
+
}), this.indexFromElement = (e) => {
|
|
3544
|
+
let t = this.options.indexAttribute, n = e.getAttribute(t);
|
|
3545
|
+
return n ? parseInt(n, 10) : (console.warn(`Missing attribute name '${t}={index}' on measured element.`), -1);
|
|
3546
|
+
}, this.shouldMeasureDuringScroll = (e) => {
|
|
3547
|
+
if (!Sa(this.scrollState)) return !0;
|
|
3548
|
+
let t = this.scrollState.index ?? this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;
|
|
3549
|
+
if (t !== void 0 && this.range) {
|
|
3550
|
+
let n = Math.max(this.options.overscan, Math.ceil((this.range.endIndex - this.range.startIndex) / 2)), r = Math.max(0, t - n), i = Math.min(this.options.count - 1, t + n);
|
|
3551
|
+
return e >= r && e <= i;
|
|
3552
|
+
}
|
|
3553
|
+
return !0;
|
|
3554
|
+
}, this.measureElement = (e) => {
|
|
3555
|
+
if (!e) {
|
|
3556
|
+
this.elementsCache.forEach((e, t) => {
|
|
3557
|
+
e.isConnected || (this.observer.unobserve(e), this.elementsCache.delete(t));
|
|
3558
|
+
});
|
|
3559
|
+
return;
|
|
3560
|
+
}
|
|
3561
|
+
let t = this.indexFromElement(e);
|
|
3562
|
+
if (!this.isIndexInRange(t)) return;
|
|
3563
|
+
let n = this.options.getItemKey(t), r = this.elementsCache.get(n);
|
|
3564
|
+
r !== e && (r && this.observer.unobserve(r), this.observer.observe(e), this.elementsCache.set(n, e)), e.isConnected && (!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(t) && this.resizeItem(t, this.options.measureElement(e, void 0, this));
|
|
3565
|
+
}, this.resizeItem = (e, t) => {
|
|
3566
|
+
var n;
|
|
3567
|
+
if (!this.isIndexInRange(e)) return;
|
|
3568
|
+
this._resizeBatch?.sync && this.getMeasurements();
|
|
3569
|
+
let r, i, a, o = this._singleLaneMeasurements?.flat;
|
|
3570
|
+
if (this.options.lanes === 1 && o != null) a = this.options.getItemKey(e), i = o[e * 2], r = o[e * 2 + 1];
|
|
3571
|
+
else {
|
|
3572
|
+
let t = this.measurementsCache[e];
|
|
3573
|
+
if (!t) return;
|
|
3574
|
+
a = t.key, i = t.start, r = t.size;
|
|
3575
|
+
}
|
|
3576
|
+
let s = this.itemSizeCache.get(a) ?? r, c = t - s;
|
|
3577
|
+
if (c !== 0) {
|
|
3578
|
+
let o = this.options.anchorTo === "end" && !Sa(this.scrollState) && this.getVirtualDistanceFromEnd() <= this.options.scrollEndThreshold, l = o ? this._getLayoutTotalSize() : 0, u = this.getScrollOffset(), d = this.itemSizeCache.has(a) ? i + s <= u && this.scrollDirection !== "backward" : i < u, f = !Sa(this.scrollState) && (this.shouldAdjustScrollPositionOnItemSizeChange === void 0 ? d : this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e] ?? {
|
|
3579
|
+
index: e,
|
|
3580
|
+
key: a,
|
|
3581
|
+
start: i,
|
|
3582
|
+
size: r,
|
|
3583
|
+
end: i + r,
|
|
3584
|
+
lane: 0
|
|
3585
|
+
}, c, this));
|
|
3586
|
+
(this.pendingMin === null || e < this.pendingMin) && (this.pendingMin = e), this.itemSizeCache.set(a, t), this.itemSizeCacheVersion++;
|
|
3587
|
+
let p = !1;
|
|
3588
|
+
if (this._awaitingCommandReadBack() || (o ? p = this.applyScrollAdjustment(this._getLayoutTotalSize() - l) : f && (p = this.applyScrollAdjustment(c))), this._resizeBatch) {
|
|
3589
|
+
this._resizeBatch.notify = !0, (n = this._resizeBatch).sync || (n.sync = p);
|
|
3590
|
+
return;
|
|
3591
|
+
}
|
|
3592
|
+
this.notify(p), this._noteClampMax(), this._flushHoldIfReady(!0), this._retryClampedAdjustment();
|
|
3593
|
+
}
|
|
3594
|
+
}, this.getVirtualItems = K(() => [
|
|
3595
|
+
this.getVirtualIndexes(),
|
|
3596
|
+
this.getMeasurements(),
|
|
3597
|
+
this._holdOffset
|
|
3598
|
+
], (e, t, n) => {
|
|
3599
|
+
let r = [];
|
|
3600
|
+
for (let i = 0, a = e.length; i < a; i++) {
|
|
3601
|
+
let a = t[e[i]];
|
|
3602
|
+
r.push(n === 0 ? a : {
|
|
3603
|
+
...a,
|
|
3604
|
+
start: a.start - n,
|
|
3605
|
+
end: a.end - n
|
|
3606
|
+
});
|
|
3607
|
+
}
|
|
3608
|
+
return r;
|
|
3609
|
+
}, {
|
|
3610
|
+
key: !1,
|
|
3611
|
+
debug: () => this.options.debug
|
|
3612
|
+
}), this.getVirtualItemForOffset = (e) => {
|
|
3613
|
+
let t = this.getMeasurements();
|
|
3614
|
+
if (t.length === 0) return;
|
|
3615
|
+
let n = this._singleLaneMeasurements?.flat, r = this.options.lanes === 1 && n != null;
|
|
3616
|
+
return Xi(t[Ta(0, t.length - 1, r ? (e) => n[e * 2] : (e) => Xi(t[e]).start, e)]);
|
|
3617
|
+
}, this._noteClampMax = () => {
|
|
3618
|
+
if (!this._awaitingCommandReadBack()) return;
|
|
3619
|
+
let e = this._elementMaxScrollOffset();
|
|
3620
|
+
if (e === null) return;
|
|
3621
|
+
let t = this.pendingWrite, n = Math.max(e, 0) + this._holdOffset;
|
|
3622
|
+
if (n >= t.target) return;
|
|
3623
|
+
let r = t.lowMaxes ??= [];
|
|
3624
|
+
r[r.length - 1] !== n && r.push(n);
|
|
3625
|
+
}, this.getMaxScrollOffset = () => (this._elementMaxScrollOffset() ?? 0) + this._holdOffset, this._toLayoutOffset = (e) => {
|
|
3626
|
+
let t = e + this._holdOffset;
|
|
3627
|
+
return this.pendingScrollAnchor?.kind === "anchor" && (t += this.pendingScrollAnchor.delta), t;
|
|
3628
|
+
}, this._elementMaxScrollOffset = () => {
|
|
3629
|
+
let e = this.scrollElement;
|
|
3630
|
+
if (e === null) return null;
|
|
3631
|
+
if ("scrollHeight" in e) return this.options.horizontal ? e.scrollWidth - e.clientWidth : e.scrollHeight - e.clientHeight;
|
|
3632
|
+
if ("document" in e) {
|
|
3633
|
+
let t = e.document.documentElement;
|
|
3634
|
+
return this.options.horizontal ? t.scrollWidth - e.innerWidth : t.scrollHeight - e.innerHeight;
|
|
3635
|
+
}
|
|
3636
|
+
return null;
|
|
3637
|
+
}, this._momentumStop = null, this._stopMomentum = (e) => {
|
|
3638
|
+
let t = this.scrollElement, n = this.targetWindow;
|
|
3639
|
+
if (t === null || n === null) return;
|
|
3640
|
+
let r = "document" in t ? t.document.scrollingElement : t;
|
|
3641
|
+
if (!r?.style) return;
|
|
3642
|
+
if (this._momentumStop) {
|
|
3643
|
+
this._momentumStop.done = e;
|
|
3644
|
+
return;
|
|
3645
|
+
}
|
|
3646
|
+
let { style: i } = r, a = this.options.horizontal ? "overflow-x" : "overflow-y", o = i.getPropertyValue(a), s = i.getPropertyPriority(a), c = () => this.options.horizontal ? r.clientHeight : r.clientWidth, l = c();
|
|
3647
|
+
if (i.setProperty(a, "hidden", "important"), c() !== l) {
|
|
3648
|
+
i.setProperty(a, o, s);
|
|
3649
|
+
return;
|
|
3650
|
+
}
|
|
3651
|
+
let u = {
|
|
3652
|
+
restore: () => i.getPropertyValue(a) !== "hidden" || i.getPropertyPriority(a) !== "important" ? !1 : (i.setProperty(a, o, s), !0),
|
|
3653
|
+
done: e
|
|
3654
|
+
};
|
|
3655
|
+
this._momentumStop = u, n.requestAnimationFrame(() => n.requestAnimationFrame(() => {
|
|
3656
|
+
this._momentumStop === u && (this._momentumStop = null, u.restore() && u.done());
|
|
3657
|
+
}));
|
|
3658
|
+
}, this._clampedBy = (e) => {
|
|
3659
|
+
let t = this._elementMaxScrollOffset();
|
|
3660
|
+
if (t === null) return null;
|
|
3661
|
+
let n = t + this._holdOffset;
|
|
3662
|
+
return e > n + .5 ? {
|
|
3663
|
+
target: e,
|
|
3664
|
+
maxAtWrite: n
|
|
3665
|
+
} : null;
|
|
3666
|
+
}, this.getVirtualDistanceFromEnd = () => Math.max(this._getLayoutTotalSize() + this.options.scrollMargin - this.getSize() - this.getScrollOffset(), 0), this.getDistanceFromEnd = () => Math.max(this.getMaxScrollOffset() - this.getScrollOffset(), 0), this.isAtEnd = (e = this.options.scrollEndThreshold) => this.getDistanceFromEnd() <= e, this.getOffsetForAlignment = (e, t, n = 0) => {
|
|
3667
|
+
if (!this.scrollElement) return 0;
|
|
3668
|
+
let r = this.getSize(), i = this.getScrollOffset();
|
|
3669
|
+
t === "auto" && (t = e >= i + r ? "end" : "start"), t === "center" ? e += (n - r) / 2 : t === "end" && (e -= r);
|
|
3670
|
+
let a = this.getMaxScrollOffset();
|
|
3671
|
+
return Math.max(Math.min(a, e), 0);
|
|
3672
|
+
}, this.getOffsetForIndex = (e, t = "auto") => {
|
|
3673
|
+
e = Math.max(0, Math.min(e, this.options.count - 1));
|
|
3674
|
+
let n = this.getSize(), r = this.getScrollOffset(), i = this.getMeasurements()[e];
|
|
3675
|
+
if (!i) return;
|
|
3676
|
+
if (t === "auto") {
|
|
3677
|
+
if (i.end >= r + n - this.options.scrollPaddingEnd) t = "end";
|
|
3678
|
+
else if (i.start <= r + this.options.scrollPaddingStart) t = "start";
|
|
3679
|
+
else return [r, t];
|
|
3680
|
+
}
|
|
3681
|
+
if (t === "end" && e === this.options.count - 1) {
|
|
3682
|
+
let e = this.getMaxScrollOffset(), n = e - this.options.paddingEnd + this.options.scrollPaddingEnd;
|
|
3683
|
+
return [Math.max(Math.min(n, e), 0), t];
|
|
3684
|
+
}
|
|
3685
|
+
let a = t === "end" ? i.end + this.options.scrollPaddingEnd : i.start - this.options.scrollPaddingStart;
|
|
3686
|
+
return [this.getOffsetForAlignment(a, t, i.size), t];
|
|
3687
|
+
}, this.scrollToOffset = (e, { align: t = "start", behavior: n = "auto" } = {}) => {
|
|
3688
|
+
this._startScroll({
|
|
3689
|
+
index: null,
|
|
3690
|
+
align: t
|
|
3691
|
+
}, this.getOffsetForAlignment(e, t), n, "absolute");
|
|
3692
|
+
}, this.scrollToIndex = (e, { align: t = "auto", behavior: n = "auto" } = {}) => {
|
|
3693
|
+
e = Math.max(0, Math.min(e, this.options.count - 1));
|
|
3694
|
+
let r = this.getOffsetForIndex(e, t);
|
|
3695
|
+
if (!r) return;
|
|
3696
|
+
let [i, a] = r;
|
|
3697
|
+
this._startScroll({
|
|
3698
|
+
index: e,
|
|
3699
|
+
align: a
|
|
3700
|
+
}, i, n, "absolute");
|
|
3701
|
+
}, this.scrollBy = (e, { behavior: t = "auto" } = {}) => {
|
|
3702
|
+
let n = this.getOffsetForAlignment((this.getCommandWrittenOffset() ?? this.getScrollOffset()) + e, "start");
|
|
3703
|
+
this._startScroll({
|
|
3704
|
+
index: null,
|
|
3705
|
+
align: "start"
|
|
3706
|
+
}, n, t, "relative");
|
|
3707
|
+
}, this.scrollToEnd = ({ behavior: e = "auto" } = {}) => {
|
|
3708
|
+
this.options.count > 0 ? this._startScroll({
|
|
3709
|
+
index: this.options.count - 1,
|
|
3710
|
+
align: "end",
|
|
3711
|
+
toEnd: !0
|
|
3712
|
+
}, Math.max(this.getMaxScrollOffset(), 0), e, "absolute") : this.scrollToOffset(Math.max(this.getTotalSize() - this.getSize(), 0), { behavior: e });
|
|
3713
|
+
}, this.cancelScroll = () => {
|
|
3714
|
+
this.rafId != null && this.targetWindow && (this.targetWindow.cancelAnimationFrame(this.rafId), this.rafId = null), this.scrollState = null;
|
|
3715
|
+
}, this.getTotalSize = () => Math.max(this._getLayoutTotalSize() - this._holdOffset, 0), this._getLayoutTotalSize = () => {
|
|
3716
|
+
let e = this.getMeasurements(), t;
|
|
3717
|
+
if (e.length === 0) t = this.options.paddingStart;
|
|
3718
|
+
else if (this.options.lanes === 1) {
|
|
3719
|
+
let n = e.length - 1, r = this._singleLaneMeasurements?.flat;
|
|
3720
|
+
t = r == null ? e[n]?.end ?? 0 : r[n * 2] + r[n * 2 + 1];
|
|
3721
|
+
} else {
|
|
3722
|
+
let n = Array(this.options.lanes).fill(null), r = e.length - 1;
|
|
3723
|
+
for (; r >= 0 && n.some((e) => e === null);) {
|
|
3724
|
+
let t = e[r];
|
|
3725
|
+
n[t.lane] === null && (n[t.lane] = t.end), r--;
|
|
3726
|
+
}
|
|
3727
|
+
t = Math.max(...n.filter((e) => e !== null));
|
|
3728
|
+
}
|
|
3729
|
+
return Math.max(t - this.options.scrollMargin + this.options.paddingEnd, 0);
|
|
3730
|
+
}, this.takeSnapshot = () => {
|
|
3731
|
+
let e = [];
|
|
3732
|
+
if (this.itemSizeCache.size === 0) return e;
|
|
3733
|
+
let t = this.getMeasurements();
|
|
3734
|
+
for (let n of t) n && this.itemSizeCache.has(n.key) && e.push({
|
|
3735
|
+
index: n.index,
|
|
3736
|
+
key: n.key,
|
|
3737
|
+
start: n.start,
|
|
3738
|
+
size: n.size,
|
|
3739
|
+
end: n.end,
|
|
3740
|
+
lane: n.lane
|
|
3741
|
+
});
|
|
3742
|
+
return e;
|
|
3743
|
+
}, this._scrollToOffset = (e, { adjustments: t, behavior: n } = {}) => {
|
|
3744
|
+
let r = {
|
|
3745
|
+
target: e + (t ?? 0),
|
|
3746
|
+
smooth: n === "smooth"
|
|
3747
|
+
};
|
|
3748
|
+
return this.pendingWrite = r, this.options.scrollToFn(e - this._holdOffset, {
|
|
3749
|
+
behavior: n,
|
|
3750
|
+
adjustments: t
|
|
3751
|
+
}, this), r;
|
|
3752
|
+
}, this.getCommandWrittenOffset = () => this.scrollState !== null && this.pendingWrite !== null && !this.pendingWrite.smooth ? this.pendingWrite.target : null, this._awaitingCommandReadBack = () => {
|
|
3753
|
+
let e = this.getCommandWrittenOffset();
|
|
3754
|
+
return !(aa() && this._iosGesture.dragging()) && e !== null && !q(e, this.getScrollOffset());
|
|
3755
|
+
}, this._followOffsetTarget = (e) => {
|
|
3756
|
+
this.scrollState !== null && this.scrollState.index == null && (this.scrollState.lastTargetOffset += e);
|
|
3757
|
+
}, this.measure = () => {
|
|
3758
|
+
this.pendingMin = null, this.itemSizeCache.clear(), this.laneAssignments.clear(), this.itemSizeCacheVersion++, this.notify(!1);
|
|
3759
|
+
}, this.setOptions(e);
|
|
3760
|
+
}
|
|
3761
|
+
get scrollAdjustments() {
|
|
3762
|
+
return 0;
|
|
3763
|
+
}
|
|
3764
|
+
applyScrollAdjustment(e, t) {
|
|
3765
|
+
if (e === 0) return !1;
|
|
3766
|
+
if (this._followOffsetTarget(e), this._canWriteScroll()) {
|
|
3767
|
+
let n = this.getScrollOffset();
|
|
3768
|
+
this._clampedAdjustment = this._clampedBy(n + e);
|
|
3769
|
+
let r = this._scrollToOffset(n, {
|
|
3770
|
+
adjustments: e,
|
|
3771
|
+
behavior: t
|
|
3772
|
+
});
|
|
3773
|
+
return this.scrollOffset !== null && (this.pendingWrite === r && (this.scrollOffset += e), this.scrollOffset < 0 && (this.scrollOffset = 0)), !0;
|
|
3774
|
+
}
|
|
3775
|
+
return this._holdOffset += e, this.scrollOffset !== null && (this.scrollOffset += e), !0;
|
|
3776
|
+
}
|
|
3777
|
+
scheduleScrollReconcile() {
|
|
3778
|
+
this.targetWindow ? this.rafId ??= this.targetWindow.requestAnimationFrame(() => {
|
|
3779
|
+
this.rafId = null, this.reconcileScroll();
|
|
3780
|
+
}) : this.scrollState = null;
|
|
3781
|
+
}
|
|
3782
|
+
getScrollStateTarget(e) {
|
|
3783
|
+
let t = e.toEnd ? [Math.max(this.getMaxScrollOffset(), 0)] : e.index == null ? void 0 : this.getOffsetForIndex(e.index, e.align);
|
|
3784
|
+
return t ? t[0] : e.lastTargetOffset;
|
|
3785
|
+
}
|
|
3786
|
+
reconcileScroll() {
|
|
3787
|
+
if (!this.scrollState || !this.scrollElement) return;
|
|
3788
|
+
if (this.now() - this.scrollState.startedAt > 5e3) {
|
|
3789
|
+
this.scrollState = null;
|
|
3790
|
+
return;
|
|
3791
|
+
}
|
|
3792
|
+
if (this.scrollState.phase === "queued") {
|
|
3793
|
+
this.scheduleScrollReconcile();
|
|
3794
|
+
return;
|
|
3795
|
+
}
|
|
3796
|
+
this.getMeasurements();
|
|
3797
|
+
let e = this.getScrollStateTarget(this.scrollState), t = this.scrollState.index == null ? 1 : this.options.useAnimationFrameWithResizeObserver ? 3 : 2, n = e !== this.scrollState.lastTargetOffset;
|
|
3798
|
+
if (!n && q(e, this.getScrollOffset())) {
|
|
3799
|
+
if (this.scrollState.phase === "smooth" ? this.scrollState.phase = "smoothLanded" : this.scrollState.phase === "smoothFinishing" && (this.scrollState.phase = "instant"), this.scrollState.stableFrames++, this.scrollState.stableFrames >= t) {
|
|
3800
|
+
this.getScrollOffset() !== e && this._scrollToOffset(e, { behavior: "auto" }), this.scrollState = null;
|
|
3801
|
+
return;
|
|
3802
|
+
}
|
|
3803
|
+
} else if (this.scrollState.stableFrames = 0, n) {
|
|
3804
|
+
let t = this.getSize() || 600, n = Math.abs(e - this.getScrollOffset()), r = Sa(this.scrollState) && n > t;
|
|
3805
|
+
this.scrollState.lastTargetOffset = e, r ? this.scrollState.phase = "smooth" : this.scrollState.phase === "smooth" ? this.scrollState.phase = "smoothFinishing" : this.scrollState.phase === "smoothLanded" && (this.scrollState.phase = "instant"), this._scrollToOffset(e, { behavior: r ? "smooth" : "auto" });
|
|
3806
|
+
}
|
|
3807
|
+
this.scheduleScrollReconcile();
|
|
3808
|
+
}
|
|
3809
|
+
_startScroll(e, t, n, r) {
|
|
3810
|
+
this.pendingScrollAnchor = null, this._clampedAdjustment = null;
|
|
3811
|
+
let i = this._iosGesture.tail();
|
|
3812
|
+
if (r === "absolute" && i !== null) {
|
|
3813
|
+
if (i === "fling" && ca()) {
|
|
3814
|
+
this._stopMomentum(() => {
|
|
3815
|
+
this.scrollState?.phase !== "queued" || this._iosGesture.tail() !== "fling" || this._reportedOverscroll || (this._iosGesture.end(), this._flushHoldIfReady(!0), this._writeAwaitingCommand());
|
|
3816
|
+
}), this.scrollState = {
|
|
3817
|
+
...e,
|
|
3818
|
+
startedAt: this.now(),
|
|
3819
|
+
lastTargetOffset: t,
|
|
3820
|
+
stableFrames: 0,
|
|
3821
|
+
phase: "queued",
|
|
3822
|
+
behavior: n,
|
|
3823
|
+
samples: []
|
|
3824
|
+
}, this.scheduleScrollReconcile();
|
|
3825
|
+
return;
|
|
3826
|
+
}
|
|
3827
|
+
this._iosGesture.end();
|
|
3828
|
+
}
|
|
3829
|
+
this.scrollState = {
|
|
3830
|
+
...e,
|
|
3831
|
+
startedAt: this.now(),
|
|
3832
|
+
lastTargetOffset: t,
|
|
3833
|
+
stableFrames: 0,
|
|
3834
|
+
behavior: n,
|
|
3835
|
+
phase: xa(n, e.index != null && q(t, this.getScrollOffset()))
|
|
3836
|
+
}, this._scrollToOffset(t, { behavior: n }), this.scheduleScrollReconcile();
|
|
3837
|
+
}
|
|
3838
|
+
}, Ta = (e, t, n, r) => {
|
|
3839
|
+
for (; e <= t;) {
|
|
3840
|
+
let i = (e + t) / 2 | 0, a = n(i);
|
|
3841
|
+
if (a < r) e = i + 1;
|
|
3842
|
+
else if (a > r) t = i - 1;
|
|
3843
|
+
else return i;
|
|
3844
|
+
}
|
|
3845
|
+
return e > 0 ? e - 1 : 0;
|
|
3846
|
+
};
|
|
3847
|
+
function Ea(e, t, n) {
|
|
3848
|
+
let r = 0;
|
|
3849
|
+
for (; r <= t;) {
|
|
3850
|
+
let i = (r + t) / 2 | 0, a = e[i * 2];
|
|
3851
|
+
if (a < n) r = i + 1;
|
|
3852
|
+
else if (a > n) t = i - 1;
|
|
3853
|
+
else return i;
|
|
3854
|
+
}
|
|
3855
|
+
return r > 0 ? r - 1 : 0;
|
|
3856
|
+
}
|
|
3857
|
+
function Da(e, t, n, r, i) {
|
|
3858
|
+
let a = e.length - 1;
|
|
3859
|
+
if (e.length <= r) return {
|
|
3860
|
+
startIndex: 0,
|
|
3861
|
+
endIndex: a
|
|
3862
|
+
};
|
|
3863
|
+
if (r === 1 && i !== null) {
|
|
3864
|
+
let e = Ea(i, a, n), r = e, o = n + t;
|
|
3865
|
+
for (; r < a && i[r * 2] + i[r * 2 + 1] < o;) r++;
|
|
3866
|
+
return {
|
|
3867
|
+
startIndex: e,
|
|
3868
|
+
endIndex: r
|
|
3869
|
+
};
|
|
3870
|
+
}
|
|
3871
|
+
let o = Ta(0, a, (t) => e[t].start, n), s = o;
|
|
3872
|
+
if (r === 1) for (; s < a && e[s].end < n + t;) s++;
|
|
3873
|
+
else if (r > 1) {
|
|
3874
|
+
let i = Array(r).fill(0);
|
|
3875
|
+
for (; s < a && i.some((e) => e < n + t);) {
|
|
3876
|
+
let t = e[s];
|
|
3877
|
+
i[t.lane] = t.end, s++;
|
|
3878
|
+
}
|
|
3879
|
+
let c = Array(r).fill(n + t);
|
|
3880
|
+
for (; o >= 0 && c.some((e) => e >= n);) {
|
|
3881
|
+
let t = e[o];
|
|
3882
|
+
c[t.lane] = t.start, o--;
|
|
3883
|
+
}
|
|
3884
|
+
o = Math.max(0, o - o % r), s = Math.min(a, s + (r - 1 - s % r));
|
|
3885
|
+
}
|
|
3886
|
+
return {
|
|
3887
|
+
startIndex: o,
|
|
3888
|
+
endIndex: s
|
|
3889
|
+
};
|
|
3890
|
+
}
|
|
3891
|
+
// ../../node_modules/.pnpm/@tanstack+lit-virtual@3.15.3_lit@3.3.3/node_modules/@tanstack/lit-virtual/dist/esm/index.js
|
|
3892
|
+
var Oa = class {
|
|
3893
|
+
constructor(e, t) {
|
|
3894
|
+
this.cleanup = () => {}, this.host = e, this.options = { ...t }, this.virtualizer = new wa(this.resolveOptions(this.options)), this.host.addController(this);
|
|
3895
|
+
}
|
|
3896
|
+
getVirtualizer() {
|
|
3897
|
+
return this.virtualizer;
|
|
3898
|
+
}
|
|
3899
|
+
setOptions(e) {
|
|
3900
|
+
this.applyOptions(e) && (this.virtualizer.setOptions(this.resolveOptions(this.options)), this.virtualizer._willUpdate(), this.host.requestUpdate());
|
|
3901
|
+
}
|
|
3902
|
+
hostConnected() {
|
|
3903
|
+
this.cleanup = this.virtualizer._didMount(), this.virtualizer._willUpdate(), this.host.requestUpdate();
|
|
3904
|
+
}
|
|
3905
|
+
hostUpdated() {
|
|
3906
|
+
this.virtualizer._willUpdate();
|
|
3907
|
+
}
|
|
3908
|
+
hostDisconnected() {
|
|
3909
|
+
this.cleanup();
|
|
3910
|
+
}
|
|
3911
|
+
applyOptions(e) {
|
|
3912
|
+
let t = { ...this.options }, n = !1;
|
|
3913
|
+
for (let r in e) {
|
|
3914
|
+
if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
|
|
3915
|
+
let i = e[r];
|
|
3916
|
+
i !== void 0 && (Object.is(t[r], i) || (n = !0, Object.assign(t, { [r]: i })));
|
|
3917
|
+
}
|
|
3918
|
+
return n && (this.options = t), n;
|
|
3919
|
+
}
|
|
3920
|
+
resolveOptions(e) {
|
|
3921
|
+
return {
|
|
3922
|
+
...e,
|
|
3923
|
+
onChange: (t, n) => {
|
|
3924
|
+
var r;
|
|
3925
|
+
this.host.updateComplete.then(() => this.host.requestUpdate()), (r = e.onChange) == null || r.call(e, t, n);
|
|
3926
|
+
}
|
|
3927
|
+
};
|
|
3928
|
+
}
|
|
3929
|
+
}, ka = class extends Oa {
|
|
3930
|
+
constructor(e, t) {
|
|
3931
|
+
super(e, {
|
|
3932
|
+
observeElementRect: ma,
|
|
3933
|
+
observeElementOffset: va,
|
|
3934
|
+
scrollToFn: ba,
|
|
3935
|
+
...t
|
|
3936
|
+
});
|
|
3937
|
+
}
|
|
3938
|
+
}, Aa = class {
|
|
3939
|
+
#e;
|
|
3940
|
+
#t = new Gi();
|
|
3941
|
+
#n = {
|
|
3942
|
+
count: 0,
|
|
3943
|
+
rowHeight: 40,
|
|
3944
|
+
overscan: 6,
|
|
3945
|
+
rowIdAt: String
|
|
3946
|
+
};
|
|
3947
|
+
constructor(e, t) {
|
|
3948
|
+
this.#e = new ka(e, {
|
|
3949
|
+
count: 0,
|
|
3950
|
+
getScrollElement: t,
|
|
3951
|
+
estimateSize: () => this.#n.rowHeight,
|
|
3952
|
+
overscan: this.#n.overscan
|
|
3953
|
+
});
|
|
3954
|
+
}
|
|
3955
|
+
configure(e) {
|
|
3956
|
+
let t = this.#n;
|
|
3957
|
+
this.#n = e, (e.count !== t.count || e.overscan !== t.overscan || e.rowHeight !== t.rowHeight) && (this.#e.setOptions({
|
|
3958
|
+
count: e.count,
|
|
3959
|
+
overscan: e.overscan
|
|
3960
|
+
}), e.rowHeight !== t.rowHeight && this.#e.getVirtualizer().measure());
|
|
3961
|
+
}
|
|
3962
|
+
computeWindow() {
|
|
3963
|
+
let e = this.#e.getVirtualizer(), t = e.getVirtualItems(), n = /* @__PURE__ */ new Map();
|
|
3964
|
+
for (let e of t) n.set(this.#n.rowIdAt(e.index), {
|
|
3965
|
+
index: e.index,
|
|
3966
|
+
start: e.start
|
|
3967
|
+
});
|
|
3968
|
+
let { keep: r } = this.#n;
|
|
3969
|
+
this.#t.pin(r?.id), r && !n.has(r.id) && n.set(r.id, {
|
|
3970
|
+
index: r.index,
|
|
3971
|
+
start: r.index * this.#n.rowHeight
|
|
3972
|
+
});
|
|
3973
|
+
let i = [];
|
|
3974
|
+
for (let { id: e, slot: t } of this.#t.update(n.keys())) {
|
|
3975
|
+
let r = n.get(e);
|
|
3976
|
+
r && i.push({
|
|
3977
|
+
slot: t,
|
|
3978
|
+
...r
|
|
3979
|
+
});
|
|
3980
|
+
}
|
|
3981
|
+
let a = e.range;
|
|
3982
|
+
return {
|
|
3983
|
+
rows: i,
|
|
3984
|
+
totalSize: e.getTotalSize(),
|
|
3985
|
+
range: a ? {
|
|
3986
|
+
start: a.startIndex,
|
|
3987
|
+
end: a.endIndex
|
|
3988
|
+
} : null
|
|
3989
|
+
};
|
|
3990
|
+
}
|
|
3991
|
+
get poolSize() {
|
|
3992
|
+
return this.#t.size;
|
|
3993
|
+
}
|
|
3994
|
+
scrollToIndex(e, t = "start") {
|
|
3995
|
+
this.#e.getVirtualizer().scrollToIndex(e, { align: t });
|
|
3996
|
+
}
|
|
3997
|
+
}, ja = "argus-range-change", Ma = "argus-sort-change", Na = "argus-column-resize", Pa = "argus-row-click", Fa = "argus-cell-click";
|
|
3998
|
+
function Y(e, t, n) {
|
|
3999
|
+
return e.dispatchEvent(new CustomEvent(t, {
|
|
4000
|
+
detail: n,
|
|
4001
|
+
bubbles: !0,
|
|
4002
|
+
composed: !0
|
|
4003
|
+
}));
|
|
4004
|
+
}
|
|
4005
|
+
// ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directive-helpers.js
|
|
4006
|
+
var { I: Ia } = Ae, La = (e) => e, Ra = () => document.createComment(""), za = (e, t, n) => {
|
|
4007
|
+
let r = e._$AA.parentNode, i = t === void 0 ? e._$AB : t._$AA;
|
|
4008
|
+
if (n === void 0) n = new Ia(r.insertBefore(Ra(), i), r.insertBefore(Ra(), i), e, e.options);
|
|
4009
|
+
else {
|
|
4010
|
+
let t = n._$AB.nextSibling, a = n._$AM, o = a !== e;
|
|
4011
|
+
if (o) {
|
|
4012
|
+
let t;
|
|
4013
|
+
n._$AQ?.(e), n._$AM = e, n._$AP !== void 0 && (t = e._$AU) !== a._$AU && n._$AP(t);
|
|
4014
|
+
}
|
|
4015
|
+
if (t !== i || o) {
|
|
4016
|
+
let e = n._$AA;
|
|
4017
|
+
for (; e !== t;) {
|
|
4018
|
+
let t = La(e).nextSibling;
|
|
4019
|
+
La(r).insertBefore(e, i), e = t;
|
|
4020
|
+
}
|
|
4021
|
+
}
|
|
4022
|
+
}
|
|
4023
|
+
return n;
|
|
4024
|
+
}, X = (e, t, n = e) => (e._$AI(t, n), e), Ba = {}, Va = (e, t = Ba) => e._$AH = t, Ha = (e) => e._$AH, Ua = (e) => {
|
|
4025
|
+
e._$AR(), e._$AA.remove();
|
|
4026
|
+
}, Wa = (e, t, n) => {
|
|
4027
|
+
let r = /* @__PURE__ */ new Map();
|
|
4028
|
+
for (let i = t; i <= n; i++) r.set(e[i], i);
|
|
4029
|
+
return r;
|
|
4030
|
+
}, Z = ze(class extends Be {
|
|
4031
|
+
constructor(e) {
|
|
4032
|
+
if (super(e), e.type !== Re.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
4033
|
+
}
|
|
4034
|
+
dt(e, t, n) {
|
|
4035
|
+
let r;
|
|
4036
|
+
n === void 0 ? n = t : t !== void 0 && (r = t);
|
|
4037
|
+
let i = [], a = [], o = 0;
|
|
4038
|
+
for (let t of e) i[o] = r ? r(t, o) : o, a[o] = n(t, o), o++;
|
|
4039
|
+
return {
|
|
4040
|
+
values: a,
|
|
4041
|
+
keys: i
|
|
4042
|
+
};
|
|
4043
|
+
}
|
|
4044
|
+
render(e, t, n) {
|
|
4045
|
+
return this.dt(e, t, n).values;
|
|
4046
|
+
}
|
|
4047
|
+
update(e, [t, n, r]) {
|
|
4048
|
+
let i = Ha(e), { values: a, keys: o } = this.dt(t, n, r);
|
|
4049
|
+
if (!Array.isArray(i)) return this.ut = o, a;
|
|
4050
|
+
let s = this.ut ??= [], c = [], l, u, d = 0, f = i.length - 1, p = 0, m = a.length - 1;
|
|
4051
|
+
for (; d <= f && p <= m;) if (i[d] === null) d++;
|
|
4052
|
+
else if (i[f] === null) f--;
|
|
4053
|
+
else if (s[d] === o[p]) c[p] = X(i[d], a[p]), d++, p++;
|
|
4054
|
+
else if (s[f] === o[m]) c[m] = X(i[f], a[m]), f--, m--;
|
|
4055
|
+
else if (s[d] === o[m]) c[m] = X(i[d], a[m]), za(e, c[m + 1], i[d]), d++, m--;
|
|
4056
|
+
else if (s[f] === o[p]) c[p] = X(i[f], a[p]), za(e, i[d], i[f]), f--, p++;
|
|
4057
|
+
else if (l === void 0 && (l = Wa(o, p, m), u = Wa(s, d, f)), l.has(s[d])) {
|
|
4058
|
+
if (l.has(s[f])) {
|
|
4059
|
+
let t = u.get(o[p]), n = t === void 0 ? null : i[t];
|
|
4060
|
+
if (n === null) {
|
|
4061
|
+
let t = za(e, i[d]);
|
|
4062
|
+
X(t, a[p]), c[p] = t;
|
|
4063
|
+
} else c[p] = X(n, a[p]), za(e, i[d], n), i[t] = null;
|
|
4064
|
+
p++;
|
|
4065
|
+
} else Ua(i[f]), f--;
|
|
4066
|
+
} else Ua(i[d]), d++;
|
|
4067
|
+
for (; p <= m;) {
|
|
4068
|
+
let t = za(e, c[m + 1]);
|
|
4069
|
+
X(t, a[p]), c[p++] = t;
|
|
4070
|
+
}
|
|
4071
|
+
for (; d <= f;) {
|
|
4072
|
+
let e = i[d++];
|
|
4073
|
+
e !== null && Ua(e);
|
|
4074
|
+
}
|
|
4075
|
+
return this.ut = o, Va(e, c), E;
|
|
4076
|
+
}
|
|
4077
|
+
});
|
|
4078
|
+
// src/render/content.ts
|
|
4079
|
+
function Ga(e) {
|
|
4080
|
+
return e == null ? D : typeof e == "number" ? String(e) : e;
|
|
4081
|
+
}
|
|
4082
|
+
function Ka(e) {
|
|
4083
|
+
return e == null ? "" : e instanceof Date ? e.toLocaleString() : typeof e == "object" ? JSON.stringify(e) : String(e);
|
|
4084
|
+
}
|
|
4085
|
+
var qa = (e, t) => `c-${String(e)}-${String(t)}`, Ja = (e) => `h-${String(e)}`;
|
|
4086
|
+
function Ya(e) {
|
|
4087
|
+
let t = "cell";
|
|
4088
|
+
return e.pin && (t += e.pinEdge ? " cell-pinned cell-pinned-edge" : " cell-pinned"), e.sorted && (t += " cell-sorted"), t;
|
|
4089
|
+
}
|
|
4090
|
+
function Xa(e) {
|
|
4091
|
+
if (e) return e === "asc" ? "ascending" : "descending";
|
|
4092
|
+
}
|
|
4093
|
+
function Za(e) {
|
|
4094
|
+
return e.pin ? `--_pin-offset: ${String(e.offset)}px` : void 0;
|
|
4095
|
+
}
|
|
4096
|
+
// src/render/body.ts
|
|
4097
|
+
function Qa(e, t, n, r) {
|
|
4098
|
+
return T`<div
|
|
4099
|
+
part="body"
|
|
4100
|
+
role="rowgroup"
|
|
4101
|
+
style=${Ue({ blockSize: `${String(n)}px` })}
|
|
4102
|
+
>
|
|
4103
|
+
${Z(e, (e) => e.slot, (e) => $a(e, t, e.index === r?.index ? r.col : void 0))}
|
|
4104
|
+
</div>`;
|
|
4105
|
+
}
|
|
4106
|
+
function $a(e, t, n) {
|
|
4107
|
+
return T`<div
|
|
4108
|
+
part=${e.index % 2 == 0 ? "row row-even" : "row row-odd"}
|
|
4109
|
+
class="row"
|
|
4110
|
+
role="row"
|
|
4111
|
+
aria-rowindex=${e.index + 2}
|
|
4112
|
+
style=${Ue({ transform: `translateY(${String(e.start)}px)` })}
|
|
4113
|
+
>
|
|
4114
|
+
${Z(t, (e) => e.id, (t) => T`<div
|
|
4115
|
+
part=${Ya(t)}
|
|
4116
|
+
role="gridcell"
|
|
4117
|
+
aria-colindex=${t.colIndex}
|
|
4118
|
+
tabindex=${t.id === n ? 0 : -1}
|
|
4119
|
+
data-col=${t.id}
|
|
4120
|
+
data-align=${t.align}
|
|
4121
|
+
data-pin=${t.pin ?? D}
|
|
4122
|
+
?data-pin-edge=${t.pinEdge}
|
|
4123
|
+
style=${Za(t) ?? D}
|
|
4124
|
+
>
|
|
4125
|
+
<slot name=${qa(e.slot, t.colIndex)}></slot>
|
|
4126
|
+
</div>`)}
|
|
4127
|
+
</div>`;
|
|
4128
|
+
}
|
|
4129
|
+
// src/render/cells.ts
|
|
4130
|
+
function eo(e, t, n) {
|
|
4131
|
+
let r = t.columns;
|
|
4132
|
+
Me(T`${Z(r, (e) => e.id, (e) => T`<div slot=${Ja(e.colIndex)}>${to(e)}</div>`)}${Z(n, (e) => e.slot, (e) => Z(r, (e) => e.id, (n) => T`<div slot=${qa(e.slot, n.colIndex)}>${no(t, e.index, n)}</div>`))}`, e, { host: e });
|
|
4133
|
+
}
|
|
4134
|
+
function to(e) {
|
|
4135
|
+
let { header: t } = e;
|
|
4136
|
+
return Ga(typeof t == "function" ? t() : t);
|
|
4137
|
+
}
|
|
4138
|
+
function no(e, t, n) {
|
|
4139
|
+
if (n.cell) {
|
|
4140
|
+
let r = e.cellContext(t, n.id);
|
|
4141
|
+
return r ? Ga(n.cell(r.row, r)) : "";
|
|
4142
|
+
}
|
|
4143
|
+
return n.hasAccessor ? Ka(e.valueAt(t, n.id)) : "";
|
|
4144
|
+
}
|
|
4145
|
+
// src/render/header.ts
|
|
4146
|
+
function ro(e, t, n) {
|
|
4147
|
+
return T`<div part="header" role="rowgroup">
|
|
4148
|
+
<div
|
|
4149
|
+
part="header-row"
|
|
4150
|
+
class="row"
|
|
4151
|
+
role="row"
|
|
4152
|
+
aria-rowindex="1"
|
|
4153
|
+
@click=${t.click}
|
|
4154
|
+
@pointerdown=${t.pointerdown}
|
|
4155
|
+
>
|
|
4156
|
+
${Z(e, (e) => e.id, (e) => T`<div
|
|
4157
|
+
part=${e.sorted ? "header-cell header-cell-sorted" : "header-cell"}
|
|
4158
|
+
role="columnheader"
|
|
4159
|
+
aria-colindex=${e.colIndex}
|
|
4160
|
+
aria-sort=${Xa(e.sorted) ?? D}
|
|
4161
|
+
data-col=${e.id}
|
|
4162
|
+
data-sort-col=${e.sortable ? e.id : D}
|
|
4163
|
+
tabindex=${e.id === n ? 0 : -1}
|
|
4164
|
+
data-align=${e.align}
|
|
4165
|
+
data-pin=${e.pin ?? D}
|
|
4166
|
+
?data-pin-edge=${e.pinEdge}
|
|
4167
|
+
style=${Za(e) ?? D}
|
|
4168
|
+
>
|
|
4169
|
+
<slot name=${Ja(e.colIndex)}></slot>
|
|
4170
|
+
${e.sortable ? T`<span class="sort-indicator" aria-hidden="true"></span>` : D}
|
|
4171
|
+
${e.resizable ? io(e) : D}
|
|
4172
|
+
</div>`)}
|
|
4173
|
+
</div>
|
|
4174
|
+
</div>`;
|
|
4175
|
+
}
|
|
4176
|
+
function io(e) {
|
|
4177
|
+
return T`<div
|
|
4178
|
+
part="resize-handle"
|
|
4179
|
+
role="separator"
|
|
4180
|
+
aria-orientation="vertical"
|
|
4181
|
+
aria-label="Resize column"
|
|
4182
|
+
aria-valuenow=${e.flex === void 0 ? Math.round(e.width) : D}
|
|
4183
|
+
aria-valuemin=${e.minWidth}
|
|
4184
|
+
aria-valuemax=${Number.isFinite(e.maxWidth) ? e.maxWidth : D}
|
|
4185
|
+
data-resize-col=${e.id}
|
|
4186
|
+
></div>`;
|
|
4187
|
+
}
|
|
4188
|
+
// src/styles/base.ts
|
|
4189
|
+
var ao = o`
|
|
4190
|
+
@layer argus-base {
|
|
4191
|
+
:host {
|
|
4192
|
+
display: block;
|
|
4193
|
+
/* A table that virtualizes needs a bounded height; set your own on the element. */
|
|
4194
|
+
block-size: 400px;
|
|
4195
|
+
box-sizing: border-box;
|
|
4196
|
+
contain: content;
|
|
4197
|
+
color-scheme: light dark;
|
|
4198
|
+
color: var(--argus-fg, CanvasText);
|
|
4199
|
+
background: var(--argus-bg, Canvas);
|
|
4200
|
+
font: var(--argus-font, inherit);
|
|
4201
|
+
--_row-height: var(--argus-row-height, 40px);
|
|
4202
|
+
--_pad: var(--argus-cell-padding-inline, 12px);
|
|
4203
|
+
--_border: var(--argus-border-width, 1px) solid
|
|
4204
|
+
var(--argus-border-color, light-dark(#e5e7eb, #374151));
|
|
4205
|
+
/* 1 in LTR, -1 in RTL: mirrors the pinned-edge shadow. */
|
|
4206
|
+
--_dir: 1;
|
|
4207
|
+
}
|
|
4208
|
+
:host(:dir(rtl)) {
|
|
4209
|
+
--_dir: -1;
|
|
4210
|
+
}
|
|
4211
|
+
:host([density='compact']) {
|
|
4212
|
+
--_row-height: var(--argus-row-height, 32px);
|
|
4213
|
+
--_pad: var(--argus-cell-padding-inline, 8px);
|
|
4214
|
+
}
|
|
4215
|
+
:host([density='spacious']) {
|
|
4216
|
+
--_row-height: var(--argus-row-height, 52px);
|
|
4217
|
+
--_pad: var(--argus-cell-padding-inline, 16px);
|
|
4218
|
+
}
|
|
4219
|
+
:host([hidden]) {
|
|
4220
|
+
display: none;
|
|
4221
|
+
}
|
|
4222
|
+
|
|
4223
|
+
[part~='table'] {
|
|
4224
|
+
position: relative;
|
|
4225
|
+
block-size: 100%;
|
|
4226
|
+
overflow: auto;
|
|
4227
|
+
overscroll-behavior: contain;
|
|
4228
|
+
/* A cell moved to by keyboard scrolls clear of the sticky header and pinned columns. */
|
|
4229
|
+
scroll-padding-block-start: var(--_row-height);
|
|
4230
|
+
scroll-padding-inline: var(--_pin-start, 0) var(--_pin-end, 0);
|
|
4231
|
+
}
|
|
4232
|
+
|
|
4233
|
+
.row {
|
|
4234
|
+
display: grid;
|
|
4235
|
+
grid-template-columns: var(--_cols);
|
|
4236
|
+
inline-size: var(--_width);
|
|
4237
|
+
min-inline-size: 100%;
|
|
4238
|
+
block-size: var(--_row-height);
|
|
4239
|
+
box-sizing: border-box;
|
|
4240
|
+
}
|
|
4241
|
+
|
|
4242
|
+
[part~='header'] {
|
|
4243
|
+
position: sticky;
|
|
4244
|
+
inset-block-start: 0;
|
|
4245
|
+
z-index: 2;
|
|
4246
|
+
}
|
|
4247
|
+
|
|
4248
|
+
[part~='body'] {
|
|
4249
|
+
position: relative;
|
|
4250
|
+
contain: layout;
|
|
4251
|
+
}
|
|
4252
|
+
[part~='row'] {
|
|
4253
|
+
position: absolute;
|
|
4254
|
+
inset-block-start: 0;
|
|
4255
|
+
inset-inline-start: 0;
|
|
4256
|
+
--_row-bg: var(--argus-bg, Canvas);
|
|
4257
|
+
--_row-surface: var(--_row-bg);
|
|
4258
|
+
background: var(--_row-surface);
|
|
4259
|
+
}
|
|
4260
|
+
[part~='row-odd'] {
|
|
4261
|
+
--_row-bg: var(--argus-row-stripe-bg, var(--argus-bg, Canvas));
|
|
4262
|
+
}
|
|
4263
|
+
[part~='row']:hover {
|
|
4264
|
+
--_row-surface: var(--argus-row-hover-bg, var(--_row-bg));
|
|
4265
|
+
}
|
|
4266
|
+
|
|
4267
|
+
[part~='cell'],
|
|
4268
|
+
[part~='header-cell'] {
|
|
4269
|
+
display: flex;
|
|
4270
|
+
align-items: center;
|
|
4271
|
+
min-inline-size: 0;
|
|
4272
|
+
box-sizing: border-box;
|
|
4273
|
+
padding-inline: var(--_pad);
|
|
4274
|
+
overflow: hidden;
|
|
4275
|
+
white-space: nowrap;
|
|
4276
|
+
border-block-end: var(--_border);
|
|
4277
|
+
}
|
|
4278
|
+
[part~='header-cell'] {
|
|
4279
|
+
background: var(--argus-header-bg, light-dark(#f9fafb, #111827));
|
|
4280
|
+
color: var(--argus-header-fg, inherit);
|
|
4281
|
+
font-weight: 600;
|
|
4282
|
+
}
|
|
4283
|
+
[part~='header-cell'] {
|
|
4284
|
+
position: relative;
|
|
4285
|
+
}
|
|
4286
|
+
[part~='resize-handle'] {
|
|
4287
|
+
position: absolute;
|
|
4288
|
+
inset-block: 0;
|
|
4289
|
+
inset-inline-end: 0;
|
|
4290
|
+
inline-size: 8px;
|
|
4291
|
+
z-index: 1;
|
|
4292
|
+
cursor: col-resize;
|
|
4293
|
+
touch-action: none;
|
|
4294
|
+
}
|
|
4295
|
+
[part~='resize-handle']::after {
|
|
4296
|
+
content: '';
|
|
4297
|
+
position: absolute;
|
|
4298
|
+
inset-block: 25%;
|
|
4299
|
+
inset-inline-end: 0;
|
|
4300
|
+
inline-size: 2px;
|
|
4301
|
+
background: var(--argus-resize-handle-color, light-dark(#9ca3af, #6b7280));
|
|
4302
|
+
opacity: 0;
|
|
4303
|
+
}
|
|
4304
|
+
[part~='header-cell']:hover [part~='resize-handle']::after,
|
|
4305
|
+
[part~='header-cell']:focus-visible [part~='resize-handle']::after,
|
|
4306
|
+
[part~='resize-handle'][data-active]::after {
|
|
4307
|
+
opacity: 1;
|
|
4308
|
+
}
|
|
4309
|
+
[data-sort-col] {
|
|
4310
|
+
cursor: pointer;
|
|
4311
|
+
user-select: none;
|
|
4312
|
+
}
|
|
4313
|
+
[part~='header-cell']:focus-visible,
|
|
4314
|
+
[part~='cell']:focus-visible {
|
|
4315
|
+
outline: var(--argus-focus-ring, 2px solid Highlight);
|
|
4316
|
+
outline-offset: -2px;
|
|
4317
|
+
}
|
|
4318
|
+
/* A small chevron after the header content; only the sorted column shows it. */
|
|
4319
|
+
.sort-indicator {
|
|
4320
|
+
flex: none;
|
|
4321
|
+
inline-size: 0.35em;
|
|
4322
|
+
block-size: 0.35em;
|
|
4323
|
+
margin-inline-start: 0.4em;
|
|
4324
|
+
/* Physical sides on purpose: the chevron is rotated, so it must not mirror in RTL. */
|
|
4325
|
+
border-right: 0.12em solid currentColor;
|
|
4326
|
+
border-bottom: 0.12em solid currentColor;
|
|
4327
|
+
visibility: hidden;
|
|
4328
|
+
}
|
|
4329
|
+
[aria-sort] .sort-indicator {
|
|
4330
|
+
visibility: visible;
|
|
4331
|
+
}
|
|
4332
|
+
[aria-sort='ascending'] .sort-indicator {
|
|
4333
|
+
transform: translateY(0.1em) rotate(-135deg);
|
|
4334
|
+
}
|
|
4335
|
+
[aria-sort='descending'] .sort-indicator {
|
|
4336
|
+
transform: translateY(-0.1em) rotate(45deg);
|
|
4337
|
+
}
|
|
4338
|
+
[data-align='end'] .sort-indicator {
|
|
4339
|
+
order: -1;
|
|
4340
|
+
margin-inline: 0 0.4em;
|
|
4341
|
+
}
|
|
4342
|
+
/*
|
|
4343
|
+
* Pinned columns: sticky inside the scroll container, with offsets from the
|
|
4344
|
+
* table model. Logical insets make RTL work without extra rules.
|
|
4345
|
+
*/
|
|
4346
|
+
[data-pin] {
|
|
4347
|
+
position: sticky;
|
|
4348
|
+
z-index: 1;
|
|
4349
|
+
/* Visible so the edge shadow isn't clipped; slotted content still clips itself. */
|
|
4350
|
+
overflow: visible;
|
|
4351
|
+
}
|
|
4352
|
+
[data-pin='start'] {
|
|
4353
|
+
inset-inline-start: var(--_pin-offset);
|
|
4354
|
+
}
|
|
4355
|
+
[data-pin='end'] {
|
|
4356
|
+
inset-inline-end: var(--_pin-offset);
|
|
4357
|
+
}
|
|
4358
|
+
[part~='cell-pinned'] {
|
|
4359
|
+
background: var(--_row-surface);
|
|
4360
|
+
}
|
|
4361
|
+
/*
|
|
4362
|
+
* The edge shadow. --argus-pinned-shadow is written for a shadow falling
|
|
4363
|
+
* toward the end side; the start edge in RTL and the end edge in LTR mirror it.
|
|
4364
|
+
*/
|
|
4365
|
+
[data-pin-edge]::after {
|
|
4366
|
+
content: '';
|
|
4367
|
+
position: absolute;
|
|
4368
|
+
inset: 0;
|
|
4369
|
+
pointer-events: none;
|
|
4370
|
+
box-shadow: var(
|
|
4371
|
+
--argus-pinned-shadow,
|
|
4372
|
+
4px 0 6px -4px light-dark(rgb(0 0 0 / 0.2), rgb(0 0 0 / 0.6))
|
|
4373
|
+
);
|
|
4374
|
+
transform: scaleX(var(--_dir));
|
|
4375
|
+
}
|
|
4376
|
+
[data-pin='end'][data-pin-edge]::after {
|
|
4377
|
+
transform: scaleX(calc(-1 * var(--_dir)));
|
|
4378
|
+
}
|
|
4379
|
+
|
|
4380
|
+
[data-align='center'] {
|
|
4381
|
+
justify-content: center;
|
|
4382
|
+
text-align: center;
|
|
4383
|
+
}
|
|
4384
|
+
[data-align='end'] {
|
|
4385
|
+
justify-content: flex-end;
|
|
4386
|
+
text-align: end;
|
|
4387
|
+
}
|
|
4388
|
+
::slotted(*) {
|
|
4389
|
+
min-inline-size: 0;
|
|
4390
|
+
overflow: hidden;
|
|
4391
|
+
text-overflow: ellipsis;
|
|
4392
|
+
}
|
|
4393
|
+
|
|
4394
|
+
[part~='empty'] {
|
|
4395
|
+
display: flex;
|
|
4396
|
+
align-items: center;
|
|
4397
|
+
justify-content: center;
|
|
4398
|
+
min-block-size: calc(100% - var(--_row-height));
|
|
4399
|
+
padding: var(--_pad);
|
|
4400
|
+
box-sizing: border-box;
|
|
4401
|
+
}
|
|
4402
|
+
|
|
4403
|
+
/* Measures the resolved row height in px for the virtualizer. */
|
|
4404
|
+
.probe {
|
|
4405
|
+
position: absolute;
|
|
4406
|
+
inset-block-start: 0;
|
|
4407
|
+
inline-size: 0;
|
|
4408
|
+
block-size: var(--_row-height);
|
|
4409
|
+
visibility: hidden;
|
|
4410
|
+
pointer-events: none;
|
|
4411
|
+
}
|
|
4412
|
+
}
|
|
4413
|
+
`;
|
|
4414
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/decorate.js
|
|
4415
|
+
function Q(e, t, n, r) {
|
|
4416
|
+
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
4417
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
4418
|
+
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
4419
|
+
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
4420
|
+
}
|
|
4421
|
+
// src/argus-table.ts
|
|
4422
|
+
function oo(e) {
|
|
4423
|
+
let t = e.attachInternals();
|
|
4424
|
+
return t.role = "grid", t;
|
|
4425
|
+
}
|
|
4426
|
+
function so(e) {
|
|
4427
|
+
for (let t of e.composedPath()) if (t instanceof HTMLElement) {
|
|
4428
|
+
if (t.dataset.resizeCol !== void 0) return;
|
|
4429
|
+
if (t.dataset.sortCol !== void 0) return t.dataset.sortCol;
|
|
4430
|
+
if (t.getAttribute("part") === "header-row") return;
|
|
4431
|
+
}
|
|
4432
|
+
}
|
|
4433
|
+
var co = 10;
|
|
4434
|
+
function lo(e) {
|
|
4435
|
+
if (!(e instanceof HTMLElement) || e.dataset.col === void 0) return;
|
|
4436
|
+
let t = e.getAttribute("role");
|
|
4437
|
+
return t === "gridcell" || t === "columnheader" ? e : void 0;
|
|
4438
|
+
}
|
|
4439
|
+
function uo(e) {
|
|
4440
|
+
return Number(e?.getAttribute("aria-rowindex") ?? 1) - 2;
|
|
4441
|
+
}
|
|
4442
|
+
function fo(e) {
|
|
4443
|
+
return e.flex === void 0 ? `${String(e.width)}px` : `minmax(${String(e.minWidth)}px, ${String(e.flex)}fr)`;
|
|
4444
|
+
}
|
|
4445
|
+
var $ = class extends j {
|
|
4446
|
+
constructor(...e) {
|
|
4447
|
+
super(...e), this.columns = [], this.data = [], this.density = "comfortable", this.overscan = 6, this.#e = Wi([]), this.#t = Wi({}), this.#i = oo(this), this.#a = new qi(), this.#o = new Aa(this, () => this.renderRoot.querySelector("[part~=\"table\"]")), this.#s = 40, this.#l = {
|
|
4448
|
+
rows: [],
|
|
4449
|
+
totalSize: 0,
|
|
4450
|
+
range: null
|
|
4451
|
+
}, this.#d = !1, this.#f = "", this.#p = {
|
|
4452
|
+
click: (e) => {
|
|
4453
|
+
let t = so(e);
|
|
4454
|
+
t !== void 0 && this.#w(t);
|
|
4455
|
+
},
|
|
4456
|
+
pointerdown: (e) => {
|
|
4457
|
+
if (e.button !== 0) return;
|
|
4458
|
+
let t = e.composedPath()[0];
|
|
4459
|
+
if (!(t instanceof HTMLElement)) return;
|
|
4460
|
+
let n = t.dataset.resizeCol, r = t.parentElement;
|
|
4461
|
+
n !== void 0 && r && Ki(t, e, r.getBoundingClientRect().width, this.#S(), (e) => {
|
|
4462
|
+
this.#C(n, e);
|
|
4463
|
+
});
|
|
4464
|
+
}
|
|
4465
|
+
}, this.#m = (e) => {
|
|
4466
|
+
let t = lo(e.composedPath()[0] ?? e.target ?? this), n = t?.dataset.col;
|
|
4467
|
+
if (!t || n === void 0) return;
|
|
4468
|
+
if (e.key === "Tab" && e.shiftKey) {
|
|
4469
|
+
let n = e.currentTarget;
|
|
4470
|
+
n.tabIndex = -1, t.addEventListener("focusout", () => {
|
|
4471
|
+
n.removeAttribute("tabindex");
|
|
4472
|
+
}, { once: !0 });
|
|
4473
|
+
return;
|
|
4474
|
+
}
|
|
4475
|
+
let r = t.getAttribute("role") === "columnheader", { key: i } = e;
|
|
4476
|
+
if (r && e.altKey && (i === "ArrowLeft" || i === "ArrowRight")) {
|
|
4477
|
+
e.preventDefault();
|
|
4478
|
+
let r = i === "ArrowRight" == (this.#S() === 1);
|
|
4479
|
+
this.#C(n, this.#x(n, t) + (r ? co : -10));
|
|
4480
|
+
return;
|
|
4481
|
+
}
|
|
4482
|
+
if (r && (i === "Enter" || i === " ") && t.dataset.sortCol !== void 0) {
|
|
4483
|
+
e.preventDefault(), this.#w(n);
|
|
4484
|
+
return;
|
|
4485
|
+
}
|
|
4486
|
+
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return;
|
|
4487
|
+
if (!r && i === "Enter") {
|
|
4488
|
+
e.preventDefault(), this.#_(e.composedPath());
|
|
4489
|
+
return;
|
|
4490
|
+
}
|
|
4491
|
+
let a = this.#a.model, o = a.columns, s = r ? -1 : uo(t.parentElement), c = o.findIndex((e) => e.id === n);
|
|
4492
|
+
switch (i) {
|
|
4493
|
+
case "ArrowDown":
|
|
4494
|
+
s = Math.min(s + 1, a.rowCount - 1);
|
|
4495
|
+
break;
|
|
4496
|
+
case "ArrowUp":
|
|
4497
|
+
s = Math.max(s - 1, -1);
|
|
4498
|
+
break;
|
|
4499
|
+
case "ArrowRight":
|
|
4500
|
+
c += this.#S();
|
|
4501
|
+
break;
|
|
4502
|
+
case "ArrowLeft":
|
|
4503
|
+
c -= this.#S();
|
|
4504
|
+
break;
|
|
4505
|
+
case "Home":
|
|
4506
|
+
c = 0;
|
|
4507
|
+
break;
|
|
4508
|
+
case "End":
|
|
4509
|
+
c = o.length - 1;
|
|
4510
|
+
break;
|
|
4511
|
+
default: return;
|
|
4512
|
+
}
|
|
4513
|
+
e.preventDefault();
|
|
4514
|
+
let l = o[Math.min(Math.max(c, 0), o.length - 1)];
|
|
4515
|
+
l && this.#v(s, l.id, a);
|
|
4516
|
+
}, this.#h = (e) => {
|
|
4517
|
+
let t = e.currentTarget;
|
|
4518
|
+
if (e.composedPath()[0] === t) {
|
|
4519
|
+
let n = e.relatedTarget;
|
|
4520
|
+
n instanceof Node && t.contains(n) || (this.#d = !0, this.requestUpdate());
|
|
4521
|
+
} else for (let t of e.composedPath()) {
|
|
4522
|
+
let n = lo(t);
|
|
4523
|
+
if (n?.dataset.col !== void 0) {
|
|
4524
|
+
let e = n.getAttribute("role") === "columnheader" ? -1 : uo(n.parentElement), { col: t } = n.dataset;
|
|
4525
|
+
(e !== this.#u?.index || t !== this.#u.col) && (this.#u = {
|
|
4526
|
+
index: e,
|
|
4527
|
+
rowId: this.#a.model.rowAt(e)?.id,
|
|
4528
|
+
col: t
|
|
4529
|
+
}, this.requestUpdate());
|
|
4530
|
+
return;
|
|
4531
|
+
}
|
|
4532
|
+
if (t === e.currentTarget) return;
|
|
4533
|
+
}
|
|
4534
|
+
}, this.#g = (e) => {
|
|
4535
|
+
this.#_(e.composedPath());
|
|
4536
|
+
};
|
|
4537
|
+
}
|
|
4538
|
+
static {
|
|
4539
|
+
this.styles = ao;
|
|
4540
|
+
}
|
|
4541
|
+
get sorting() {
|
|
4542
|
+
return this.#e.value;
|
|
4543
|
+
}
|
|
4544
|
+
set sorting(e) {
|
|
4545
|
+
this.#e.set(e);
|
|
4546
|
+
}
|
|
4547
|
+
get columnSizing() {
|
|
4548
|
+
return this.#t.value;
|
|
4549
|
+
}
|
|
4550
|
+
set columnSizing(e) {
|
|
4551
|
+
this.#t.set(e);
|
|
4552
|
+
}
|
|
4553
|
+
#e;
|
|
4554
|
+
#t;
|
|
4555
|
+
#n;
|
|
4556
|
+
#r;
|
|
4557
|
+
#i;
|
|
4558
|
+
#a;
|
|
4559
|
+
#o;
|
|
4560
|
+
#s;
|
|
4561
|
+
#c;
|
|
4562
|
+
#l;
|
|
4563
|
+
#u;
|
|
4564
|
+
#d;
|
|
4565
|
+
#f;
|
|
4566
|
+
connectedCallback() {
|
|
4567
|
+
super.connectedCallback(), this.hasAttribute("role") || this.setAttribute("role", "grid"), this.hasUpdated && this.#T();
|
|
4568
|
+
}
|
|
4569
|
+
disconnectedCallback() {
|
|
4570
|
+
super.disconnectedCallback(), this.#c?.disconnect();
|
|
4571
|
+
}
|
|
4572
|
+
async scrollToRow(e) {
|
|
4573
|
+
await this.updateComplete, this.#o.scrollToIndex(e), await this.updateComplete;
|
|
4574
|
+
}
|
|
4575
|
+
willUpdate(e) {
|
|
4576
|
+
(e.has("columns") || e.has("data") || e.has("getRowId") || e.has("sorting") || e.has("columnSizing")) && this.#a.update({
|
|
4577
|
+
columns: this.columns,
|
|
4578
|
+
data: this.data,
|
|
4579
|
+
getRowId: this.getRowId,
|
|
4580
|
+
sorting: this.#e.value,
|
|
4581
|
+
columnSizing: this.#t.value
|
|
4582
|
+
});
|
|
4583
|
+
let t = this.#a.model;
|
|
4584
|
+
this.#b(t);
|
|
4585
|
+
let n = this.#u;
|
|
4586
|
+
this.#i.ariaRowCount = String(t.rowCount + 1), this.#i.ariaColCount = String(t.columns.length), this.#o.configure({
|
|
4587
|
+
count: t.rowCount,
|
|
4588
|
+
rowHeight: this.#s,
|
|
4589
|
+
overscan: Math.max(0, this.overscan),
|
|
4590
|
+
rowIdAt: (e) => t.rowAt(e)?.id ?? String(e),
|
|
4591
|
+
keep: n?.rowId === void 0 ? void 0 : {
|
|
4592
|
+
id: n.rowId,
|
|
4593
|
+
index: n.index
|
|
4594
|
+
}
|
|
4595
|
+
});
|
|
4596
|
+
}
|
|
4597
|
+
render() {
|
|
4598
|
+
let e = this.#a.model, t = e.columns;
|
|
4599
|
+
this.#l = this.#o.computeWindow();
|
|
4600
|
+
let n = (e) => `${String(t.reduce((t, n) => n.pin === e ? t + n.width : t, 0))}px`, r = {
|
|
4601
|
+
"--_cols": t.map(fo).join(" "),
|
|
4602
|
+
"--_width": `${String(e.totalWidth)}px`,
|
|
4603
|
+
"--_pin-start": n("start"),
|
|
4604
|
+
"--_pin-end": n("end")
|
|
4605
|
+
}, i = this.#u, a = i && i.index >= 0 ? {
|
|
4606
|
+
index: i.index,
|
|
4607
|
+
col: i.col
|
|
4608
|
+
} : void 0;
|
|
4609
|
+
return this.rowHeight !== void 0 && this.rowHeight > 0 && (r["--_row-height"] = `${String(this.rowHeight)}px`), T`<div
|
|
4610
|
+
part="table"
|
|
4611
|
+
role="presentation"
|
|
4612
|
+
style=${Ue(r)}
|
|
4613
|
+
@keydown=${this.#m}
|
|
4614
|
+
@focusin=${this.#h}
|
|
4615
|
+
@click=${this.#g}
|
|
4616
|
+
>
|
|
4617
|
+
${ro(t, this.#p, i?.index === -1 ? i.col : void 0)}
|
|
4618
|
+
${e.rowCount === 0 ? T`<div part="empty"><slot name="empty">No rows</slot></div>` : Qa(this.#l.rows, t, this.#l.totalSize, a)}
|
|
4619
|
+
<div class="probe" aria-hidden="true"></div>
|
|
4620
|
+
</div>`;
|
|
4621
|
+
}
|
|
4622
|
+
firstUpdated() {
|
|
4623
|
+
this.#T(), this.#E();
|
|
4624
|
+
}
|
|
4625
|
+
updated(e) {
|
|
4626
|
+
if (eo(this, this.#a.model, this.#l.rows), this.#d && (this.#d = !1, this.#y()), (e.has("density") || e.has("rowHeight")) && this.#E(), this.#n) {
|
|
4627
|
+
let e = this.#n;
|
|
4628
|
+
this.#n = void 0, Y(this, Na, e);
|
|
4629
|
+
}
|
|
4630
|
+
if (this.#r) {
|
|
4631
|
+
let e = this.#r;
|
|
4632
|
+
this.#r = void 0, Y(this, Ma, { sorting: e });
|
|
4633
|
+
}
|
|
4634
|
+
let { range: t } = this.#l, n = t ? `${String(t.start)}:${String(t.end)}` : "";
|
|
4635
|
+
t && n !== this.#f && (this.#f = n, Y(this, ja, {
|
|
4636
|
+
start: t.start,
|
|
4637
|
+
end: t.end
|
|
4638
|
+
}));
|
|
4639
|
+
}
|
|
4640
|
+
#p;
|
|
4641
|
+
#m;
|
|
4642
|
+
#h;
|
|
4643
|
+
#g;
|
|
4644
|
+
#_(e) {
|
|
4645
|
+
let t;
|
|
4646
|
+
for (let n of e) {
|
|
4647
|
+
if (!(n instanceof HTMLElement)) continue;
|
|
4648
|
+
let e = n.getAttribute("role");
|
|
4649
|
+
if (e === "gridcell" && (t = n.dataset.col), e !== "row") continue;
|
|
4650
|
+
let r = this.#a.model, i = uo(n), a = i >= 0 ? r.rowAt(i) : void 0;
|
|
4651
|
+
if (!a) return;
|
|
4652
|
+
t !== void 0 && Y(this, Fa, {
|
|
4653
|
+
row: a.original,
|
|
4654
|
+
columnId: t,
|
|
4655
|
+
value: r.valueAt(i, t)
|
|
4656
|
+
}), Y(this, Pa, {
|
|
4657
|
+
row: a.original,
|
|
4658
|
+
rowId: a.id,
|
|
4659
|
+
index: i
|
|
4660
|
+
});
|
|
4661
|
+
return;
|
|
4662
|
+
}
|
|
4663
|
+
}
|
|
4664
|
+
#v(e, t, n) {
|
|
4665
|
+
this.#u = {
|
|
4666
|
+
index: e,
|
|
4667
|
+
rowId: e >= 0 ? n.rowAt(e)?.id : void 0,
|
|
4668
|
+
col: t
|
|
4669
|
+
}, this.#d = !0, this.requestUpdate();
|
|
4670
|
+
}
|
|
4671
|
+
#y() {
|
|
4672
|
+
let e = this.#u;
|
|
4673
|
+
if (!e) return;
|
|
4674
|
+
let t = CSS.escape(e.col), n = e.index === -1 ? `[part~='header-row'] > [data-col="${t}"]` : `[part~='body'] > [aria-rowindex="${String(e.index + 2)}"] > [data-col="${t}"]`, r = this.renderRoot.querySelector(n);
|
|
4675
|
+
r && (r.scrollIntoView({
|
|
4676
|
+
block: "nearest",
|
|
4677
|
+
inline: "nearest"
|
|
4678
|
+
}), r.focus({ preventScroll: !0 }));
|
|
4679
|
+
}
|
|
4680
|
+
#b(e) {
|
|
4681
|
+
let t = e.columns, n = t[0];
|
|
4682
|
+
if (!n) {
|
|
4683
|
+
this.#u = void 0;
|
|
4684
|
+
return;
|
|
4685
|
+
}
|
|
4686
|
+
let r = this.#u ?? {
|
|
4687
|
+
index: -1,
|
|
4688
|
+
rowId: void 0,
|
|
4689
|
+
col: n.id
|
|
4690
|
+
}, i = t.some((e) => e.id === r.col) ? r.col : n.id, { index: a, rowId: o } = r;
|
|
4691
|
+
if (o !== void 0) {
|
|
4692
|
+
let t = e.indexOf(o);
|
|
4693
|
+
t === void 0 ? (a = Math.min(a, e.rowCount - 1), o = e.rowAt(a)?.id, this.matches(":focus-within") && (this.#d = !0)) : a = t;
|
|
4694
|
+
}
|
|
4695
|
+
a === r.index && o === r.rowId && i === r.col && this.#u || (this.#u = {
|
|
4696
|
+
index: a,
|
|
4697
|
+
rowId: o,
|
|
4698
|
+
col: i
|
|
4699
|
+
});
|
|
4700
|
+
}
|
|
4701
|
+
#x(e, t) {
|
|
4702
|
+
let n = this.#t.value[e];
|
|
4703
|
+
if (n !== void 0) return n;
|
|
4704
|
+
let r = this.#a.model.columns.find((t) => t.id === e);
|
|
4705
|
+
return r && r.flex === void 0 ? r.width : t.getBoundingClientRect().width;
|
|
4706
|
+
}
|
|
4707
|
+
#S() {
|
|
4708
|
+
return getComputedStyle(this).direction === "rtl" ? -1 : 1;
|
|
4709
|
+
}
|
|
4710
|
+
#C(e, t) {
|
|
4711
|
+
let n = this.#a.model.nextSizing(e, t), r = n?.[e];
|
|
4712
|
+
if (!n || r === void 0 || r === this.#t.value[e]) return;
|
|
4713
|
+
let i = this.#t.value, { value: a, applied: o } = this.#t.request(n), s = {
|
|
4714
|
+
columnId: e,
|
|
4715
|
+
width: r,
|
|
4716
|
+
sizing: a
|
|
4717
|
+
};
|
|
4718
|
+
o ? (this.#n = s, this.requestUpdate("columnSizing", i)) : Y(this, Na, s);
|
|
4719
|
+
}
|
|
4720
|
+
#w(e) {
|
|
4721
|
+
let t = this.#a.model.nextSorting(e);
|
|
4722
|
+
if (!t) return;
|
|
4723
|
+
let n = this.#e.value, { value: r, applied: i } = this.#e.request(t);
|
|
4724
|
+
i ? (this.#r = r, this.requestUpdate("sorting", n)) : Y(this, Ma, { sorting: r });
|
|
4725
|
+
}
|
|
4726
|
+
#T() {
|
|
4727
|
+
let e = this.renderRoot.querySelector(".probe");
|
|
4728
|
+
e && (this.#c ??= new ResizeObserver(() => {
|
|
4729
|
+
this.#E();
|
|
4730
|
+
}), this.#c.observe(e));
|
|
4731
|
+
}
|
|
4732
|
+
#E() {
|
|
4733
|
+
let e = this.renderRoot.querySelector(".probe")?.getBoundingClientRect().height ?? 0;
|
|
4734
|
+
e > 0 && Math.abs(e - this.#s) > .01 && (this.#s = e, this.requestUpdate());
|
|
4735
|
+
}
|
|
4736
|
+
};
|
|
4737
|
+
Q([M({ attribute: !1 })], $.prototype, "columns", void 0), Q([M({ attribute: !1 })], $.prototype, "data", void 0), Q([M({ attribute: !1 })], $.prototype, "getRowId", void 0), Q([M({
|
|
4738
|
+
attribute: "row-height",
|
|
4739
|
+
type: Number
|
|
4740
|
+
})], $.prototype, "rowHeight", void 0), Q([M({ reflect: !0 })], $.prototype, "density", void 0), Q([M({ type: Number })], $.prototype, "overscan", void 0), Q([M({ attribute: !1 })], $.prototype, "sorting", null), Q([M({ attribute: !1 })], $.prototype, "columnSizing", null), $ = Q([Fe("argus-table")], $);
|
|
4741
|
+
export { $ as ArgusTable, Fa as CELL_CLICK, Na as COLUMN_RESIZE, ja as RANGE_CHANGE, Pa as ROW_CLICK, Ma as SORT_CHANGE };
|
|
4742
|
+
|
|
4743
|
+
//# sourceMappingURL=argus-table.js.map
|