@tanstack/table-core
Advanced tools
Comparing version 8.0.0-beta.7 to 8.0.0-beta.8
@@ -80,3 +80,3 @@ /** | ||
let pageIndex = utils.functionalUpdate(updater, old.pageIndex); | ||
const maxPageIndex = typeof old.pageCount !== 'undefined' ? old.pageCount - 1 : Number.MAX_SAFE_INTEGER; | ||
const maxPageIndex = typeof instance.options.pageCount !== 'undefined' ? instance.options.pageCount - 1 : Number.MAX_SAFE_INTEGER; | ||
pageIndex = Math.min(Math.max(0, pageIndex), maxPageIndex); | ||
@@ -110,5 +110,5 @@ return { ...old, | ||
setPageCount: updater => instance.setPagination(old => { | ||
var _old$pageCount; | ||
var _instance$options$pag; | ||
let newPageCount = utils.functionalUpdate(updater, (_old$pageCount = old.pageCount) != null ? _old$pageCount : -1); | ||
let newPageCount = utils.functionalUpdate(updater, (_instance$options$pag = instance.options.pageCount) != null ? _instance$options$pag : -1); | ||
@@ -123,3 +123,3 @@ if (typeof newPageCount === 'number') { | ||
}), | ||
getPageOptions: utils.memo(() => [instance.getState().pagination.pageSize, instance.getState().pagination.pageCount], (pageSize, pageCount) => { | ||
getPageOptions: utils.memo(() => [instance.getPageCount()], pageCount => { | ||
let pageOptions = []; | ||
@@ -178,11 +178,5 @@ | ||
getPageCount: () => { | ||
const { | ||
pageCount | ||
} = instance.getState().pagination; | ||
var _instance$options$pag2; | ||
if (typeof pageCount !== 'undefined') { | ||
return pageCount; | ||
} | ||
return Math.ceil(instance.getPrePaginationRowModel().rows.length / instance.getState().pagination.pageSize); | ||
return (_instance$options$pag2 = instance.options.pageCount) != null ? _instance$options$pag2 : Math.ceil(instance.getPrePaginationRowModel().rows.length / instance.getState().pagination.pageSize); | ||
} | ||
@@ -189,0 +183,0 @@ }; |
@@ -13,3 +13,3 @@ { | ||
{ | ||
"uid": "779a-64", | ||
"uid": "6e21-64", | ||
"name": "utils.ts" | ||
@@ -21,19 +21,19 @@ }, | ||
{ | ||
"uid": "779a-66", | ||
"uid": "6e21-66", | ||
"name": "column.ts" | ||
}, | ||
{ | ||
"uid": "779a-68", | ||
"uid": "6e21-68", | ||
"name": "headers.ts" | ||
}, | ||
{ | ||
"uid": "779a-96", | ||
"uid": "6e21-96", | ||
"name": "instance.ts" | ||
}, | ||
{ | ||
"uid": "779a-100", | ||
"uid": "6e21-100", | ||
"name": "cell.ts" | ||
}, | ||
{ | ||
"uid": "779a-102", | ||
"uid": "6e21-102", | ||
"name": "row.ts" | ||
@@ -47,39 +47,39 @@ } | ||
{ | ||
"uid": "779a-70", | ||
"uid": "6e21-70", | ||
"name": "ColumnSizing.ts" | ||
}, | ||
{ | ||
"uid": "779a-72", | ||
"uid": "6e21-72", | ||
"name": "Expanding.ts" | ||
}, | ||
{ | ||
"uid": "779a-76", | ||
"uid": "6e21-76", | ||
"name": "Filters.ts" | ||
}, | ||
{ | ||
"uid": "779a-80", | ||
"uid": "6e21-80", | ||
"name": "Grouping.ts" | ||
}, | ||
{ | ||
"uid": "779a-82", | ||
"uid": "6e21-82", | ||
"name": "Ordering.ts" | ||
}, | ||
{ | ||
"uid": "779a-84", | ||
"uid": "6e21-84", | ||
"name": "Pagination.ts" | ||
}, | ||
{ | ||
"uid": "779a-86", | ||
"uid": "6e21-86", | ||
"name": "Pinning.ts" | ||
}, | ||
{ | ||
"uid": "779a-88", | ||
"uid": "6e21-88", | ||
"name": "RowSelection.ts" | ||
}, | ||
{ | ||
"uid": "779a-92", | ||
"uid": "6e21-92", | ||
"name": "Sorting.ts" | ||
}, | ||
{ | ||
"uid": "779a-94", | ||
"uid": "6e21-94", | ||
"name": "Visibility.ts" | ||
@@ -90,15 +90,15 @@ } | ||
{ | ||
"uid": "779a-74", | ||
"uid": "6e21-74", | ||
"name": "filterFns.ts" | ||
}, | ||
{ | ||
"uid": "779a-78", | ||
"uid": "6e21-78", | ||
"name": "aggregationFns.ts" | ||
}, | ||
{ | ||
"uid": "779a-90", | ||
"uid": "6e21-90", | ||
"name": "sortingFns.ts" | ||
}, | ||
{ | ||
"uid": "779a-98", | ||
"uid": "6e21-98", | ||
"name": "createTable.ts" | ||
@@ -110,39 +110,39 @@ }, | ||
{ | ||
"uid": "779a-104", | ||
"uid": "6e21-104", | ||
"name": "getCoreRowModel.ts" | ||
}, | ||
{ | ||
"uid": "779a-106", | ||
"uid": "6e21-106", | ||
"name": "filterRowsUtils.ts" | ||
}, | ||
{ | ||
"uid": "779a-108", | ||
"uid": "6e21-108", | ||
"name": "getFilteredRowModel.ts" | ||
}, | ||
{ | ||
"uid": "779a-110", | ||
"uid": "6e21-110", | ||
"name": "getFacetedRowModel.ts" | ||
}, | ||
{ | ||
"uid": "779a-112", | ||
"uid": "6e21-112", | ||
"name": "getFacetedUniqueValues.ts" | ||
}, | ||
{ | ||
"uid": "779a-114", | ||
"uid": "6e21-114", | ||
"name": "getFacetedMinMaxValues.ts" | ||
}, | ||
{ | ||
"uid": "779a-116", | ||
"uid": "6e21-116", | ||
"name": "getSortedRowModel.ts" | ||
}, | ||
{ | ||
"uid": "779a-118", | ||
"uid": "6e21-118", | ||
"name": "getGroupedRowModel.ts" | ||
}, | ||
{ | ||
"uid": "779a-120", | ||
"uid": "6e21-120", | ||
"name": "getExpandedRowModel.ts" | ||
}, | ||
{ | ||
"uid": "779a-122", | ||
"uid": "6e21-122", | ||
"name": "getPaginationRowModel.ts" | ||
@@ -153,3 +153,3 @@ } | ||
{ | ||
"uid": "779a-124", | ||
"uid": "6e21-124", | ||
"name": "index.ts" | ||
@@ -165,194 +165,194 @@ } | ||
"nodeParts": { | ||
"779a-64": { | ||
"6e21-64": { | ||
"renderedLength": 2201, | ||
"gzipLength": 800, | ||
"brotliLength": 0, | ||
"mainUid": "779a-63" | ||
"mainUid": "6e21-63" | ||
}, | ||
"779a-66": { | ||
"6e21-66": { | ||
"renderedLength": 2254, | ||
"gzipLength": 739, | ||
"brotliLength": 0, | ||
"mainUid": "779a-65" | ||
"mainUid": "6e21-65" | ||
}, | ||
"779a-68": { | ||
"6e21-68": { | ||
"renderedLength": 15972, | ||
"gzipLength": 2637, | ||
"brotliLength": 0, | ||
"mainUid": "779a-67" | ||
"mainUid": "6e21-67" | ||
}, | ||
"779a-70": { | ||
"6e21-70": { | ||
"renderedLength": 10056, | ||
"gzipLength": 2221, | ||
"brotliLength": 0, | ||
"mainUid": "779a-69" | ||
"mainUid": "6e21-69" | ||
}, | ||
"779a-72": { | ||
"6e21-72": { | ||
"renderedLength": 5796, | ||
"gzipLength": 1345, | ||
"brotliLength": 0, | ||
"mainUid": "779a-71" | ||
"mainUid": "6e21-71" | ||
}, | ||
"779a-74": { | ||
"6e21-74": { | ||
"renderedLength": 2743, | ||
"gzipLength": 666, | ||
"brotliLength": 0, | ||
"mainUid": "779a-73" | ||
"mainUid": "6e21-73" | ||
}, | ||
"779a-76": { | ||
"6e21-76": { | ||
"renderedLength": 10357, | ||
"gzipLength": 1901, | ||
"brotliLength": 0, | ||
"mainUid": "779a-75" | ||
"mainUid": "6e21-75" | ||
}, | ||
"779a-78": { | ||
"6e21-78": { | ||
"renderedLength": 2366, | ||
"gzipLength": 652, | ||
"brotliLength": 0, | ||
"mainUid": "779a-77" | ||
"mainUid": "6e21-77" | ||
}, | ||
"779a-80": { | ||
"6e21-80": { | ||
"renderedLength": 5727, | ||
"gzipLength": 1457, | ||
"brotliLength": 0, | ||
"mainUid": "779a-79" | ||
"mainUid": "6e21-79" | ||
}, | ||
"779a-82": { | ||
"6e21-82": { | ||
"renderedLength": 2231, | ||
"gzipLength": 767, | ||
"brotliLength": 0, | ||
"mainUid": "779a-81" | ||
"mainUid": "6e21-81" | ||
}, | ||
"779a-84": { | ||
"renderedLength": 6265, | ||
"gzipLength": 1382, | ||
"6e21-84": { | ||
"renderedLength": 6203, | ||
"gzipLength": 1367, | ||
"brotliLength": 0, | ||
"mainUid": "779a-83" | ||
"mainUid": "6e21-83" | ||
}, | ||
"779a-86": { | ||
"6e21-86": { | ||
"renderedLength": 8249, | ||
"gzipLength": 1442, | ||
"brotliLength": 0, | ||
"mainUid": "779a-85" | ||
"mainUid": "6e21-85" | ||
}, | ||
"779a-88": { | ||
"6e21-88": { | ||
"renderedLength": 12875, | ||
"gzipLength": 2462, | ||
"brotliLength": 0, | ||
"mainUid": "779a-87" | ||
"mainUid": "6e21-87" | ||
}, | ||
"779a-90": { | ||
"6e21-90": { | ||
"renderedLength": 2749, | ||
"gzipLength": 841, | ||
"brotliLength": 0, | ||
"mainUid": "779a-89" | ||
"mainUid": "6e21-89" | ||
}, | ||
"779a-92": { | ||
"6e21-92": { | ||
"renderedLength": 9126, | ||
"gzipLength": 2134, | ||
"brotliLength": 0, | ||
"mainUid": "779a-91" | ||
"mainUid": "6e21-91" | ||
}, | ||
"779a-94": { | ||
"6e21-94": { | ||
"renderedLength": 4940, | ||
"gzipLength": 1096, | ||
"brotliLength": 0, | ||
"mainUid": "779a-93" | ||
"mainUid": "6e21-93" | ||
}, | ||
"779a-96": { | ||
"6e21-96": { | ||
"renderedLength": 7512, | ||
"gzipLength": 1782, | ||
"brotliLength": 0, | ||
"mainUid": "779a-95" | ||
"mainUid": "6e21-95" | ||
}, | ||
"779a-98": { | ||
"6e21-98": { | ||
"renderedLength": 1546, | ||
"gzipLength": 551, | ||
"brotliLength": 0, | ||
"mainUid": "779a-97" | ||
"mainUid": "6e21-97" | ||
}, | ||
"779a-100": { | ||
"6e21-100": { | ||
"renderedLength": 809, | ||
"gzipLength": 354, | ||
"brotliLength": 0, | ||
"mainUid": "779a-99" | ||
"mainUid": "6e21-99" | ||
}, | ||
"779a-102": { | ||
"6e21-102": { | ||
"renderedLength": 1887, | ||
"gzipLength": 636, | ||
"brotliLength": 0, | ||
"mainUid": "779a-101" | ||
"mainUid": "6e21-101" | ||
}, | ||
"779a-104": { | ||
"6e21-104": { | ||
"renderedLength": 1940, | ||
"gzipLength": 756, | ||
"brotliLength": 0, | ||
"mainUid": "779a-103" | ||
"mainUid": "6e21-103" | ||
}, | ||
"779a-106": { | ||
"6e21-106": { | ||
"renderedLength": 2624, | ||
"gzipLength": 635, | ||
"brotliLength": 0, | ||
"mainUid": "779a-105" | ||
"mainUid": "6e21-105" | ||
}, | ||
"779a-108": { | ||
"6e21-108": { | ||
"renderedLength": 4104, | ||
"gzipLength": 1090, | ||
"brotliLength": 0, | ||
"mainUid": "779a-107" | ||
"mainUid": "6e21-107" | ||
}, | ||
"779a-110": { | ||
"6e21-110": { | ||
"renderedLength": 1207, | ||
"gzipLength": 503, | ||
"brotliLength": 0, | ||
"mainUid": "779a-109" | ||
"mainUid": "6e21-109" | ||
}, | ||
"779a-112": { | ||
"6e21-112": { | ||
"renderedLength": 1068, | ||
"gzipLength": 422, | ||
"brotliLength": 0, | ||
"mainUid": "779a-111" | ||
"mainUid": "6e21-111" | ||
}, | ||
"779a-114": { | ||
"6e21-114": { | ||
"renderedLength": 1238, | ||
"gzipLength": 443, | ||
"brotliLength": 0, | ||
"mainUid": "779a-113" | ||
"mainUid": "6e21-113" | ||
}, | ||
"779a-116": { | ||
"6e21-116": { | ||
"renderedLength": 3118, | ||
"gzipLength": 1011, | ||
"brotliLength": 0, | ||
"mainUid": "779a-115" | ||
"mainUid": "6e21-115" | ||
}, | ||
"779a-118": { | ||
"6e21-118": { | ||
"renderedLength": 4938, | ||
"gzipLength": 1384, | ||
"brotliLength": 0, | ||
"mainUid": "779a-117" | ||
"mainUid": "6e21-117" | ||
}, | ||
"779a-120": { | ||
"6e21-120": { | ||
"renderedLength": 1221, | ||
"gzipLength": 488, | ||
"brotliLength": 0, | ||
"mainUid": "779a-119" | ||
"mainUid": "6e21-119" | ||
}, | ||
"779a-122": { | ||
"6e21-122": { | ||
"renderedLength": 1397, | ||
"gzipLength": 482, | ||
"brotliLength": 0, | ||
"mainUid": "779a-121" | ||
"mainUid": "6e21-121" | ||
}, | ||
"779a-124": { | ||
"6e21-124": { | ||
"renderedLength": 0, | ||
"gzipLength": 0, | ||
"brotliLength": 0, | ||
"mainUid": "779a-123" | ||
"mainUid": "6e21-123" | ||
} | ||
}, | ||
"nodeMetas": { | ||
"779a-63": { | ||
"6e21-63": { | ||
"id": "/packages/table-core/src/utils.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-64" | ||
"index.production.js": "6e21-64" | ||
}, | ||
@@ -362,83 +362,83 @@ "imported": [], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
}, | ||
{ | ||
"uid": "779a-65" | ||
"uid": "6e21-65" | ||
}, | ||
{ | ||
"uid": "779a-67" | ||
"uid": "6e21-67" | ||
}, | ||
{ | ||
"uid": "779a-101" | ||
"uid": "6e21-101" | ||
}, | ||
{ | ||
"uid": "779a-69" | ||
"uid": "6e21-69" | ||
}, | ||
{ | ||
"uid": "779a-71" | ||
"uid": "6e21-71" | ||
}, | ||
{ | ||
"uid": "779a-75" | ||
"uid": "6e21-75" | ||
}, | ||
{ | ||
"uid": "779a-79" | ||
"uid": "6e21-79" | ||
}, | ||
{ | ||
"uid": "779a-81" | ||
"uid": "6e21-81" | ||
}, | ||
{ | ||
"uid": "779a-83" | ||
"uid": "6e21-83" | ||
}, | ||
{ | ||
"uid": "779a-85" | ||
"uid": "6e21-85" | ||
}, | ||
{ | ||
"uid": "779a-87" | ||
"uid": "6e21-87" | ||
}, | ||
{ | ||
"uid": "779a-91" | ||
"uid": "6e21-91" | ||
}, | ||
{ | ||
"uid": "779a-93" | ||
"uid": "6e21-93" | ||
}, | ||
{ | ||
"uid": "779a-103" | ||
"uid": "6e21-103" | ||
}, | ||
{ | ||
"uid": "779a-107" | ||
"uid": "6e21-107" | ||
}, | ||
{ | ||
"uid": "779a-109" | ||
"uid": "6e21-109" | ||
}, | ||
{ | ||
"uid": "779a-111" | ||
"uid": "6e21-111" | ||
}, | ||
{ | ||
"uid": "779a-113" | ||
"uid": "6e21-113" | ||
}, | ||
{ | ||
"uid": "779a-115" | ||
"uid": "6e21-115" | ||
}, | ||
{ | ||
"uid": "779a-117" | ||
"uid": "6e21-117" | ||
}, | ||
{ | ||
"uid": "779a-119" | ||
"uid": "6e21-119" | ||
}, | ||
{ | ||
"uid": "779a-121" | ||
"uid": "6e21-121" | ||
} | ||
] | ||
}, | ||
"779a-65": { | ||
"6e21-65": { | ||
"id": "/packages/table-core/src/core/column.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-66" | ||
"index.production.js": "6e21-66" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -448,17 +448,17 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
} | ||
] | ||
}, | ||
"779a-67": { | ||
"6e21-67": { | ||
"id": "/packages/table-core/src/core/headers.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-68" | ||
"index.production.js": "6e21-68" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -468,17 +468,17 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
} | ||
] | ||
}, | ||
"779a-69": { | ||
"6e21-69": { | ||
"id": "/packages/table-core/src/features/ColumnSizing.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-70" | ||
"index.production.js": "6e21-70" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -488,17 +488,17 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
} | ||
] | ||
}, | ||
"779a-71": { | ||
"6e21-71": { | ||
"id": "/packages/table-core/src/features/Expanding.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-72" | ||
"index.production.js": "6e21-72" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -508,13 +508,13 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
} | ||
] | ||
}, | ||
"779a-73": { | ||
"6e21-73": { | ||
"id": "/packages/table-core/src/filterFns.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-74" | ||
"index.production.js": "6e21-74" | ||
}, | ||
@@ -524,20 +524,20 @@ "imported": [], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-75" | ||
"uid": "6e21-75" | ||
} | ||
] | ||
}, | ||
"779a-75": { | ||
"6e21-75": { | ||
"id": "/packages/table-core/src/features/Filters.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-76" | ||
"index.production.js": "6e21-76" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-73" | ||
"uid": "6e21-73" | ||
}, | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -547,13 +547,13 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
} | ||
] | ||
}, | ||
"779a-77": { | ||
"6e21-77": { | ||
"id": "/packages/table-core/src/aggregationFns.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-78" | ||
"index.production.js": "6e21-78" | ||
}, | ||
@@ -563,20 +563,20 @@ "imported": [], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-79" | ||
"uid": "6e21-79" | ||
} | ||
] | ||
}, | ||
"779a-79": { | ||
"6e21-79": { | ||
"id": "/packages/table-core/src/features/Grouping.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-80" | ||
"index.production.js": "6e21-80" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-77" | ||
"uid": "6e21-77" | ||
}, | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -586,23 +586,23 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
}, | ||
{ | ||
"uid": "779a-81" | ||
"uid": "6e21-81" | ||
} | ||
] | ||
}, | ||
"779a-81": { | ||
"6e21-81": { | ||
"id": "/packages/table-core/src/features/Ordering.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-82" | ||
"index.production.js": "6e21-82" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
}, | ||
{ | ||
"uid": "779a-79" | ||
"uid": "6e21-79" | ||
} | ||
@@ -612,17 +612,17 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
} | ||
] | ||
}, | ||
"779a-83": { | ||
"6e21-83": { | ||
"id": "/packages/table-core/src/features/Pagination.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-84" | ||
"index.production.js": "6e21-84" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -632,17 +632,17 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
} | ||
] | ||
}, | ||
"779a-85": { | ||
"6e21-85": { | ||
"id": "/packages/table-core/src/features/Pinning.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-86" | ||
"index.production.js": "6e21-86" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -652,17 +652,17 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
} | ||
] | ||
}, | ||
"779a-87": { | ||
"6e21-87": { | ||
"id": "/packages/table-core/src/features/RowSelection.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-88" | ||
"index.production.js": "6e21-88" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -672,13 +672,13 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
} | ||
] | ||
}, | ||
"779a-89": { | ||
"6e21-89": { | ||
"id": "/packages/table-core/src/sortingFns.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-90" | ||
"index.production.js": "6e21-90" | ||
}, | ||
@@ -688,20 +688,20 @@ "imported": [], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-91" | ||
"uid": "6e21-91" | ||
} | ||
] | ||
}, | ||
"779a-91": { | ||
"6e21-91": { | ||
"id": "/packages/table-core/src/features/Sorting.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-92" | ||
"index.production.js": "6e21-92" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-89" | ||
"uid": "6e21-89" | ||
}, | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -711,17 +711,17 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
} | ||
] | ||
}, | ||
"779a-93": { | ||
"6e21-93": { | ||
"id": "/packages/table-core/src/features/Visibility.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-94" | ||
"index.production.js": "6e21-94" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -731,53 +731,53 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
} | ||
] | ||
}, | ||
"779a-95": { | ||
"6e21-95": { | ||
"id": "/packages/table-core/src/core/instance.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-96" | ||
"index.production.js": "6e21-96" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
}, | ||
{ | ||
"uid": "779a-65" | ||
"uid": "6e21-65" | ||
}, | ||
{ | ||
"uid": "779a-67" | ||
"uid": "6e21-67" | ||
}, | ||
{ | ||
"uid": "779a-69" | ||
"uid": "6e21-69" | ||
}, | ||
{ | ||
"uid": "779a-71" | ||
"uid": "6e21-71" | ||
}, | ||
{ | ||
"uid": "779a-75" | ||
"uid": "6e21-75" | ||
}, | ||
{ | ||
"uid": "779a-79" | ||
"uid": "6e21-79" | ||
}, | ||
{ | ||
"uid": "779a-81" | ||
"uid": "6e21-81" | ||
}, | ||
{ | ||
"uid": "779a-83" | ||
"uid": "6e21-83" | ||
}, | ||
{ | ||
"uid": "779a-85" | ||
"uid": "6e21-85" | ||
}, | ||
{ | ||
"uid": "779a-87" | ||
"uid": "6e21-87" | ||
}, | ||
{ | ||
"uid": "779a-91" | ||
"uid": "6e21-91" | ||
}, | ||
{ | ||
"uid": "779a-93" | ||
"uid": "6e21-93" | ||
} | ||
@@ -787,10 +787,10 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
} | ||
] | ||
}, | ||
"779a-97": { | ||
"6e21-97": { | ||
"id": "/packages/table-core/src/createTable.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-98" | ||
"index.production.js": "6e21-98" | ||
}, | ||
@@ -800,10 +800,10 @@ "imported": [], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
} | ||
] | ||
}, | ||
"779a-99": { | ||
"6e21-99": { | ||
"id": "/packages/table-core/src/core/cell.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-100" | ||
"index.production.js": "6e21-100" | ||
}, | ||
@@ -813,17 +813,17 @@ "imported": [], | ||
{ | ||
"uid": "779a-101" | ||
"uid": "6e21-101" | ||
} | ||
] | ||
}, | ||
"779a-101": { | ||
"6e21-101": { | ||
"id": "/packages/table-core/src/core/row.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-102" | ||
"index.production.js": "6e21-102" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
}, | ||
{ | ||
"uid": "779a-99" | ||
"uid": "6e21-99" | ||
} | ||
@@ -833,26 +833,26 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-103" | ||
"uid": "6e21-103" | ||
}, | ||
{ | ||
"uid": "779a-117" | ||
"uid": "6e21-117" | ||
}, | ||
{ | ||
"uid": "779a-105" | ||
"uid": "6e21-105" | ||
} | ||
] | ||
}, | ||
"779a-103": { | ||
"6e21-103": { | ||
"id": "/packages/table-core/src/utils/getCoreRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-104" | ||
"index.production.js": "6e21-104" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-101" | ||
"uid": "6e21-101" | ||
}, | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -862,14 +862,14 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
} | ||
] | ||
}, | ||
"779a-105": { | ||
"6e21-105": { | ||
"id": "/packages/table-core/src/utils/filterRowsUtils.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-106" | ||
"index.production.js": "6e21-106" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-101" | ||
"uid": "6e21-101" | ||
} | ||
@@ -879,20 +879,20 @@ ], | ||
{ | ||
"uid": "779a-107" | ||
"uid": "6e21-107" | ||
}, | ||
{ | ||
"uid": "779a-109" | ||
"uid": "6e21-109" | ||
} | ||
] | ||
}, | ||
"779a-107": { | ||
"6e21-107": { | ||
"id": "/packages/table-core/src/utils/getFilteredRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-108" | ||
"index.production.js": "6e21-108" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
}, | ||
{ | ||
"uid": "779a-105" | ||
"uid": "6e21-105" | ||
} | ||
@@ -902,17 +902,17 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
} | ||
] | ||
}, | ||
"779a-109": { | ||
"6e21-109": { | ||
"id": "/packages/table-core/src/utils/getFacetedRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-110" | ||
"index.production.js": "6e21-110" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
}, | ||
{ | ||
"uid": "779a-105" | ||
"uid": "6e21-105" | ||
} | ||
@@ -922,14 +922,14 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
} | ||
] | ||
}, | ||
"779a-111": { | ||
"6e21-111": { | ||
"id": "/packages/table-core/src/utils/getFacetedUniqueValues.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-112" | ||
"index.production.js": "6e21-112" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -939,14 +939,14 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
} | ||
] | ||
}, | ||
"779a-113": { | ||
"6e21-113": { | ||
"id": "/packages/table-core/src/utils/getFacetedMinMaxValues.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-114" | ||
"index.production.js": "6e21-114" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -956,14 +956,14 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
} | ||
] | ||
}, | ||
"779a-115": { | ||
"6e21-115": { | ||
"id": "/packages/table-core/src/utils/getSortedRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-116" | ||
"index.production.js": "6e21-116" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -973,17 +973,17 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
} | ||
] | ||
}, | ||
"779a-117": { | ||
"6e21-117": { | ||
"id": "/packages/table-core/src/utils/getGroupedRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-118" | ||
"index.production.js": "6e21-118" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-101" | ||
"uid": "6e21-101" | ||
}, | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -993,14 +993,14 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
} | ||
] | ||
}, | ||
"779a-119": { | ||
"6e21-119": { | ||
"id": "/packages/table-core/src/utils/getExpandedRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-120" | ||
"index.production.js": "6e21-120" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
} | ||
@@ -1010,20 +1010,20 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
}, | ||
{ | ||
"uid": "779a-121" | ||
"uid": "6e21-121" | ||
} | ||
] | ||
}, | ||
"779a-121": { | ||
"6e21-121": { | ||
"id": "/packages/table-core/src/utils/getPaginationRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-122" | ||
"index.production.js": "6e21-122" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
}, | ||
{ | ||
"uid": "779a-119" | ||
"uid": "6e21-119" | ||
} | ||
@@ -1033,98 +1033,98 @@ ], | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
} | ||
] | ||
}, | ||
"779a-123": { | ||
"6e21-123": { | ||
"id": "/packages/table-core/src/index.ts", | ||
"moduleParts": { | ||
"index.production.js": "779a-124" | ||
"index.production.js": "6e21-124" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "779a-95" | ||
"uid": "6e21-95" | ||
}, | ||
{ | ||
"uid": "779a-125" | ||
"uid": "6e21-125" | ||
}, | ||
{ | ||
"uid": "779a-97" | ||
"uid": "6e21-97" | ||
}, | ||
{ | ||
"uid": "779a-65" | ||
"uid": "6e21-65" | ||
}, | ||
{ | ||
"uid": "779a-67" | ||
"uid": "6e21-67" | ||
}, | ||
{ | ||
"uid": "779a-101" | ||
"uid": "6e21-101" | ||
}, | ||
{ | ||
"uid": "779a-69" | ||
"uid": "6e21-69" | ||
}, | ||
{ | ||
"uid": "779a-71" | ||
"uid": "6e21-71" | ||
}, | ||
{ | ||
"uid": "779a-75" | ||
"uid": "6e21-75" | ||
}, | ||
{ | ||
"uid": "779a-79" | ||
"uid": "6e21-79" | ||
}, | ||
{ | ||
"uid": "779a-81" | ||
"uid": "6e21-81" | ||
}, | ||
{ | ||
"uid": "779a-83" | ||
"uid": "6e21-83" | ||
}, | ||
{ | ||
"uid": "779a-85" | ||
"uid": "6e21-85" | ||
}, | ||
{ | ||
"uid": "779a-87" | ||
"uid": "6e21-87" | ||
}, | ||
{ | ||
"uid": "779a-91" | ||
"uid": "6e21-91" | ||
}, | ||
{ | ||
"uid": "779a-93" | ||
"uid": "6e21-93" | ||
}, | ||
{ | ||
"uid": "779a-73" | ||
"uid": "6e21-73" | ||
}, | ||
{ | ||
"uid": "779a-89" | ||
"uid": "6e21-89" | ||
}, | ||
{ | ||
"uid": "779a-77" | ||
"uid": "6e21-77" | ||
}, | ||
{ | ||
"uid": "779a-63" | ||
"uid": "6e21-63" | ||
}, | ||
{ | ||
"uid": "779a-103" | ||
"uid": "6e21-103" | ||
}, | ||
{ | ||
"uid": "779a-107" | ||
"uid": "6e21-107" | ||
}, | ||
{ | ||
"uid": "779a-109" | ||
"uid": "6e21-109" | ||
}, | ||
{ | ||
"uid": "779a-111" | ||
"uid": "6e21-111" | ||
}, | ||
{ | ||
"uid": "779a-113" | ||
"uid": "6e21-113" | ||
}, | ||
{ | ||
"uid": "779a-115" | ||
"uid": "6e21-115" | ||
}, | ||
{ | ||
"uid": "779a-117" | ||
"uid": "6e21-117" | ||
}, | ||
{ | ||
"uid": "779a-119" | ||
"uid": "6e21-119" | ||
}, | ||
{ | ||
"uid": "779a-121" | ||
"uid": "6e21-121" | ||
} | ||
@@ -1135,3 +1135,3 @@ ], | ||
}, | ||
"779a-125": { | ||
"6e21-125": { | ||
"id": "/packages/table-core/src/types.ts", | ||
@@ -1142,3 +1142,3 @@ "moduleParts": {}, | ||
{ | ||
"uid": "779a-123" | ||
"uid": "6e21-123" | ||
} | ||
@@ -1145,0 +1145,0 @@ ] |
@@ -6,3 +6,2 @@ import { TableFeature } from '../core/instance'; | ||
pageSize: number; | ||
pageCount?: number; | ||
}; | ||
@@ -16,2 +15,3 @@ export declare type PaginationTableState = { | ||
export declare type PaginationOptions<TGenerics extends TableGenerics> = { | ||
pageCount?: number; | ||
manualPagination?: boolean; | ||
@@ -18,0 +18,0 @@ onPaginationChange?: OnChangeFn<PaginationState>; |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TableCore={})}(this,(function(e){"use strict";function t(e,t){return"function"==typeof e?e(t):e}function n(e,n){return l=>{n.setState((n=>({...n,[e]:t(l,n[e])})))}}function l(e){return e instanceof Function}function o(e,t){const n=[],l=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&l(o)}))};return l(e),n}function i(e,t,n){let l,o=[];return()=>{let i;n.key&&n.debug&&(i=Date.now());const r=e();if(!(r.length!==o.length||r.some(((e,t)=>o[t]!==e))))return l;let u;if(o=r,n.key&&n.debug&&(u=Date.now()),l=t(...r),null==n||null==n.onChange||n.onChange(l),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-i))/100,t=Math.round(100*(Date.now()-u))/100,l=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info("%c⏱ "+o(t,5)+" /"+o(e,5)+" ms","\n font-size: .6rem;\n font-weight: bold;\n color: hsl("+Math.max(0,Math.min(120-120*l,120))+"deg 100% 31%);",null==n?void 0:n.key)}return l}}function r(e,t,n,l){var o,r;const u=e._getDefaultColumnDef();let a,s=null!=(o=null!=(r=(t={...u,...t}).id)?r:t.accessorKey)?o:"string"==typeof t.header?t.header:void 0;if(t.accessorFn?a=t.accessorFn:t.accessorKey&&(a=e=>e[t.accessorKey]),!s)throw new Error;let g={id:""+s,accessorFn:a,parent:l,depth:n,columnDef:t,columnDefType:t.columnDefType,columns:[],getFlatColumns:i((()=>[!0]),(()=>{var e;return[g,...null==(e=g.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:i((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=g.columns)&&t.length){let t=g.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[g]}),{key:"column.getLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return g=e._features.reduce(((t,n)=>Object.assign(t,null==n.createColumn?void 0:n.createColumn(g,e))),g),g}function u(e,t,n){var l;let o={id:null!=(l=n.id)?l:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},renderHeader:()=>t.columnDef.header?e._render(t.columnDef.header,{instance:e,header:o,column:t}):null,renderFooter:()=>t.columnDef.footer?e._render(t.columnDef.footer,{instance:e,header:o,column:t}):null};return e._features.forEach((t=>{Object.assign(o,null==t.createHeader?void 0:t.createHeader(o,e))})),o}const a={createInstance:e=>({getHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>{var i,r;const u=null!=(i=null==l?void 0:l.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],a=null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[];return s(t,[...u,...n.filter((e=>!(null!=l&&l.includes(e.id)||null!=o&&o.includes(e.id)))),...a],e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>s(t,n=n.filter((e=>!(null!=l&&l.includes(e.id)||null!=o&&o.includes(e.id)))),e,"center")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,l)=>{var o;return s(t,null!=(o=null==l?void 0:l.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"left")}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,l)=>{var o;return s(t,null!=(o=null==l?void 0:l.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"right")}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFooterGroups:i((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFooterGroups:i((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFooterGroups:i((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFooterGroups:i((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFlatHeaders:i((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFlatHeaders:i((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFlatHeaders:i((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFlatHeaders:i((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterLeafHeaders:i((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftLeafHeaders:i((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightLeafHeaders:i((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeafHeaders:i((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var l,o,i,r,u,a;return[...null!=(l=null==(o=e[0])?void 0:o.headers)?l:[],...null!=(i=null==(r=t[0])?void 0:r.headers)?i:[],...null!=(u=null==(a=n[0])?void 0:a.headers)?u:[]].map((e=>e.getLeafHeaders())).flat()}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}})})};function s(e,t,n,l){var o,i;let r=0;const a=function(e,t){void 0===t&&(t=1),r=Math.max(r,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&a(e.columns,t+1)}),0)};a(e);let s=[];const g=(e,t)=>{const o={depth:t,id:[l,""+t].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const r=[...i].reverse()[0];let a,s=!1;if(e.column.depth===o.depth&&e.column.parent?a=e.column.parent:(a=e.column,s=!0),(null==r?void 0:r.column)===a)r.subHeaders.push(e);else{const o=u(n,a,{id:[l,t,a.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:s,placeholderId:s?""+i.filter((e=>e.column===a)).length:void 0,depth:t,index:i.length});o.subHeaders.push(e),i.push(o)}o.headers.push(e),e.headerGroup=o})),s.push(o),t>0&&g(i,t-1)},d=t.map(((e,t)=>u(n,e,{depth:r,index:t})));g(d,r-1),s.reverse();const c=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,l=[0];e.subHeaders&&e.subHeaders.length?(l=[],c(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,l.push(o)}))):t=1;return n+=Math.min(...l),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return c(null!=(o=null==(i=s[0])?void 0:i.headers)?o:[]),s}const g={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},d={getDefaultColumnDef:()=>g,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:n("columnSizing",e),onColumnSizingInfoChange:n("columnSizingInfo",e)}),createColumn:(e,t)=>({getSize:()=>{var n,l,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:g.minSize,null!=(l=null!=i?i:e.columnDef.size)?l:g.size),null!=(o=e.columnDef.maxSize)?o:g.maxSize)},getStart:n=>{const l=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),o=l.findIndex((t=>t.id===e.id));if(o>0){const e=l[o-1];return e.getStart(n)+e.getSize()}return 0},resetSize:()=>{t.setColumnSizing((t=>{let{[e.id]:n,...l}=t;return l}))},getCanResize:()=>{var n,l;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(l=t.options.enableColumnResizing)||l)},getIsResizing:()=>t.getState().columnSizingInfo.isResizingColumn===e.id}),createHeader:(e,t)=>({getSize:()=>{let t=0;const n=e=>{var l;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(l=e.column.getSize())?l:0};return n(e),t},getStart:()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},getResizeHandler:()=>{const n=t.getColumn(e.column.id),l=n.getCanResize();return o=>{if(!l)return;if(null==o.persist||o.persist(),f(o)&&o.touches&&o.touches.length>1)return;const i=e.getSize(),r=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],u=f(o)?Math.round(o.touches[0].clientX):o.clientX,a=(e,n)=>{if("number"!=typeof n)return;let l={};t.setColumnSizingInfo((e=>{var t,o;const i=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),r=Math.max(i/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;l[t]=Math.round(100*Math.max(n+n*r,0))/100})),{...e,deltaOffset:i,deltaPercentage:r}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...l})))},s={moveHandler:e=>{return t=e.clientX,a("move",t);var t},upHandler:e=>{var n;document.removeEventListener("mousemove",s.moveHandler),document.removeEventListener("mouseup",s.upHandler),n=e.clientX,a("end",n),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))}},g=!!p()&&{passive:!1};f(o)||(document.addEventListener("mousemove",s.moveHandler,g),document.addEventListener("mouseup",s.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:u,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:r,isResizingColumn:n.id})))}}}),createInstance:e=>({setColumnSizing:t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),setColumnSizingInfo:t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),resetColumnSizing:t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},resetHeaderSizeInfo:t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},getTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getLeftTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getCenterTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getRightTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}})};let c=null;function p(){if("boolean"==typeof c)return c;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return c=e,c}function f(e){return"touchstart"===e.type}const m={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:n("expanded",e),paginateExpandedRows:!0}),createInstance:e=>{let t=!1,n=!1;return{_autoResetExpanded:()=>{var l,o;if(t){if(null!=(l=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?l:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},setExpanded:t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),toggleAllRowsExpanded:t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},resetExpanded:t=>{var n,l;e.setExpanded(t?{}:null!=(n=null==(l=e.initialState)?void 0:l.expanded)?n:{})},getCanSomeRowsExpand:()=>e.getRowModel().flatRows.some((e=>e.getCanExpand())),getToggleAllRowsExpandedHandler:()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},getIsSomeRowsExpanded:()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},getIsAllRowsExpanded:()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((e=>e.getIsExpanded()))},getExpandedDepth:()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},getPreExpandedRowModel:()=>e.getSortedRowModel(),getExpandedRowModel:()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())}},createRow:(e,t)=>({toggleExpanded:n=>{t.setExpanded((l=>{var o;const i=!0===l||!(null==l||!l[e.id]);let r={};if(!0===l?Object.keys(t.getRowModel().rowsById).forEach((e=>{r[e]=!0})):r=l,n=null!=(o=n)?o:!i,!i&&n)return{...r,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=r;return n}return l}))},getIsExpanded:()=>{var n;const l=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===l||(null==l?void 0:l[e.id]))},getCanExpand:()=>{var n,l,o;return(null==(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))||n)&&(null==(l=t.options.enableExpanding)||l)&&!(null==(o=e.subRows)||!o.length)},getToggleExpandedHandler:()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}})},b=(e,t,n)=>{const l=n.toLowerCase();return e.getValue(t).toLowerCase().includes(l)};b.autoRemove=e=>y(e);const w=(e,t,n)=>e.getValue(t).includes(n);w.autoRemove=e=>y(e);const v=(e,t,n)=>e.getValue(t).toLowerCase()===n.toLowerCase();v.autoRemove=e=>y(e);const h=(e,t,n)=>e.getValue(t).includes(n);h.autoRemove=e=>y(e)||!(null!=e&&e.length);const C=(e,t,n)=>!n.some((n=>!e.getValue(t).includes(n)));C.autoRemove=e=>y(e)||!(null!=e&&e.length);const S=(e,t,n)=>n.some((n=>e.getValue(t).includes(n)));S.autoRemove=e=>y(e)||!(null!=e&&e.length);const R=(e,t,n)=>e.getValue(t)===n;R.autoRemove=e=>y(e);const F=(e,t,n)=>e.getValue(t)==n;F.autoRemove=e=>y(e);const M=(e,t,n)=>{let[l,o]=n;const i=e.getValue(t);return i>=l&&i<=o};M.resolveFilterValue=e=>{let[t,n]=e,l="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(l)?-1/0:l,r=null===n||Number.isNaN(o)?1/0:o;if(i>r){const e=i;i=r,r=e}return[i,r]},M.autoRemove=e=>y(e)||y(e[0])&&y(e[1]);const I={includesString:b,includesStringSensitive:w,equalsString:v,arrIncludes:h,arrIncludesAll:C,arrIncludesSome:S,equals:R,weakEquals:F,inNumberRange:M};function y(e){return null==e||""===e}const V={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:n("columnFilters",e),onGlobalFilterChange:n("globalFilter",e),filterFromLeafRows:!1,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n,l;return"string"==typeof(null==(n=e.getCoreRowModel().flatRows[0])||null==(l=n._getAllCellsByColumnId()[t.id])?void 0:l.getValue())}}),createColumn:(e,n)=>({getAutoFilterFn:()=>{const t=n.getCoreRowModel().flatRows[0],l=null==t?void 0:t.getValue(e.id);return"string"==typeof l?I.includesString:"number"==typeof l?I.inNumberRange:"boolean"==typeof l||null!==l&&"object"==typeof l?I.equals:Array.isArray(l)?I.arrIncludes:I.weakEquals},getFilterFn:()=>{var t;const o=n.options.filterFns;return l(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(t=null==o?void 0:o[e.columnDef.filterFn])?t:I[e.columnDef.filterFn]},getCanFilter:()=>{var t,l,o;return(null==(t=e.columnDef.enableColumnFilter)||t)&&(null==(l=n.options.enableColumnFilters)||l)&&(null==(o=n.options.enableFilters)||o)&&!!e.accessorFn},getCanGlobalFilter:()=>{var t,l,o,i;return(null==(t=e.columnDef.enableGlobalFilter)||t)&&(null==(l=n.options.enableGlobalFilter)||l)&&(null==(o=n.options.enableFilters)||o)&&(null==(i=null==n.options.getColumnCanGlobalFilter?void 0:n.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn},getIsFiltered:()=>e.getFilterIndex()>-1,getFilterValue:()=>{var t,l;return null==(t=n.getState().columnFilters)||null==(l=t.find((t=>t.id===e.id)))?void 0:l.value},getFilterIndex:()=>{var t,l;return null!=(t=null==(l=n.getState().columnFilters)?void 0:l.findIndex((t=>t.id===e.id)))?t:-1},setFilterValue:l=>{n.setColumnFilters((n=>{const o=e.getFilterFn(),i=null==n?void 0:n.find((t=>t.id===e.id)),r=t(l,i?i.value:void 0);var u;if(x(o,r,e))return null!=(u=null==n?void 0:n.filter((t=>t.id!==e.id)))?u:[];const a={id:e.id,value:r};var s;return i?null!=(s=null==n?void 0:n.map((t=>t.id===e.id?a:t)))?s:[]:null!=n&&n.length?[...n,a]:[a]}))},_getFacetedRowModel:n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),getFacetedRowModel:()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),_getFacetedUniqueValues:n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),getFacetedUniqueValues:()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),getFacetedMinMaxValues:()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}),createRow:(e,t)=>({columnFilters:{},columnFiltersMeta:{}}),createInstance:e=>({getGlobalAutoFilterFn:()=>I.includesString,getGlobalFilterFn:()=>{var t;const{filterFns:n,globalFilterFn:o}=e.options;return l(o)?o:"auto"===o?e.getGlobalAutoFilterFn():null!=(t=null==n?void 0:n[o])?t:I[o]},setColumnFilters:n=>{const l=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=t(n,e))?void 0:o.filter((e=>{const t=l.find((t=>t.id===e.id));if(t){if(x(t.getFilterFn(),e.value,t))return!1}return!0}))}))},setGlobalFilter:t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},resetGlobalFilter:t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},resetColumnFilters:t=>{var n,l;e.setColumnFilters(t?[]:null!=(n=null==(l=e.initialState)?void 0:l.columnFilters)?n:[])},getPreFilteredRowModel:()=>e.getCoreRowModel(),_getFilteredRowModel:e.options.getFilteredRowModel&&e.options.getFilteredRowModel(e),getFilteredRowModel:()=>e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel(),_getGlobalFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),getGlobalFacetedRowModel:()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),_getGlobalFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),getGlobalFacetedUniqueValues:()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,_getGlobalFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),getGlobalFacetedMinMaxValues:()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}})};function x(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const _={sum:(e,t,n)=>n.reduce(((e,t)=>e+("number"==typeof t?t:0)),0),min:(e,t,n)=>{let l;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(l>n||void 0===l&&n>=n)&&(l=n)})),l},max:(e,t,n)=>{let l;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(l<n||void 0===l&&n>=n)&&(l=n)})),l},extent:(e,t,n)=>{let l,o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===l?n>=n&&(l=o=n):(l>n&&(l=n),o<n&&(o=n)))})),[l,o]},mean:(e,t)=>{let n=0,l=0;if(t.forEach((t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,l+=o)})),n)return l/n},median:(e,t)=>{if(!t.length)return;let n=0,l=0;return t.forEach((t=>{let o=t.getValue(e);"number"==typeof o&&(n=Math.min(n,o),l=Math.max(l,o))})),(n+l)/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},A={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:n("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>({toggleGrouping:()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...null!=t?t:[],e.id]))},getCanGroup:()=>{var n,l,o,i;return null!=(n=null==(l=null!=(o=null==(i=e.columnDef.enableGrouping)||i)?o:t.options.enableGrouping)||l)?n:!!e.accessorFn},getIsGrouped:()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},getGroupedIndex:()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},getToggleGroupingHandler:()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},getAutoAggregationFn:()=>{const n=t.getCoreRowModel().flatRows[0],l=null==n?void 0:n.getValue(e.id);return"number"==typeof l?_.sum:"[object Date]"===Object.prototype.toString.call(l)?_.extent:void 0},getAggregationFn:()=>{var n;const o=t.options.aggregationFns;if(!e)throw new Error;return l(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==o?void 0:o[e.columnDef.aggregationFn])?n:_[e.columnDef.aggregationFn]}}),createInstance:e=>({setGrouping:t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),resetGrouping:t=>{var n,l;e.setGrouping(t?[]:null!=(n=null==(l=e.initialState)?void 0:l.grouping)?n:[])},getPreGroupedRowModel:()=>e.getFilteredRowModel(),getGroupedRowModel:()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())}),createRow:e=>({getIsGrouped:()=>!!e.groupingColumnId,_groupingValuesCache:{}}),createCell:(e,t,n,l)=>{const o=()=>{var t;return null!=(t=e.getValue())?t:l.options.renderFallbackValue};return{getIsGrouped:()=>t.getIsGrouped()&&t.id===n.groupingColumnId,getIsPlaceholder:()=>!e.getIsGrouped()&&t.getIsGrouped(),getIsAggregated:()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)},renderAggregatedCell:()=>{const i=t.columnDef.aggregatedCell||t.columnDef.cell;return i?l._render(i,{instance:l,column:t,row:n,cell:e,getValue:o}):null}}}};function P(e,t,n){if(null==t||!t.length||!n)return e;const l=e.filter((e=>!t.includes(e.id)));if("remove"===n)return l;return[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...l]}const E={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:n("columnOrder",e)}),createInstance:e=>({setColumnOrder:t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),resetColumnOrder:t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},_getOrderColumnsFn:i((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>l=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...l];for(;n.length&&t.length;){const e=t.shift(),l=n.findIndex((t=>t.id===e));l>-1&&o.push(n.splice(l,1)[0])}o=[...o,...n]}else o=l;return P(o,t,n)}),{key:!1})})},G={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:n("pagination",e)}),createInstance:e=>{let n=!1,l=!1;return{_autoResetPageIndex:()=>{var t,o;if(n){if(null!=(t=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?t:!e.options.manualPagination){if(l)return;l=!0,e._queue((()=>{e.resetPageIndex(),l=!1}))}}else e._queue((()=>{n=!0}))},setPagination:n=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>t(n,e))),resetPagination:t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},setPageIndex:n=>{e.setPagination((e=>{let l=t(n,e.pageIndex);const o=void 0!==e.pageCount?e.pageCount-1:Number.MAX_SAFE_INTEGER;return l=Math.min(Math.max(0,l),o),{...e,pageIndex:l}}))},resetPageIndex:t=>{var n,l,o;e.setPageIndex(t?0:null!=(n=null==(l=e.initialState)||null==(o=l.pagination)?void 0:o.pageIndex)?n:0)},resetPageSize:t=>{var n,l,o;e.setPageSize(t?10:null!=(n=null==(l=e.initialState)||null==(o=l.pagination)?void 0:o.pageSize)?n:10)},setPageSize:n=>{e.setPagination((e=>{const l=Math.max(1,t(n,e.pageSize)),o=e.pageSize*e.pageIndex,i=Math.floor(o/l);return{...e,pageIndex:i,pageSize:l}}))},setPageCount:n=>e.setPagination((e=>{var l;let o=t(n,null!=(l=e.pageCount)?l:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...e,pageCount:o}})),getPageOptions:i((()=>[e.getState().pagination.pageSize,e.getState().pagination.pageCount]),((e,t)=>{let n=[];return t&&t>0&&(n=[...new Array(t)].fill(null).map(((e,t)=>t))),n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getCanPreviousPage:()=>e.getState().pagination.pageIndex>0,getCanNextPage:()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},previousPage:()=>e.setPageIndex((e=>e-1)),nextPage:()=>e.setPageIndex((e=>e+1)),getPrePaginationRowModel:()=>e.getExpandedRowModel(),getPaginationRowModel:()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),getPageCount:()=>{const{pageCount:t}=e.getState().pagination;return void 0!==t?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}}},z={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:n("columnPinning",e)}),createColumn:(e,t)=>({pin:n=>{const l=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,i,r,u,a;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=l&&l.includes(e)))),right:[...(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=l&&l.includes(e)))),...l]}:"left"===n?{left:[...(null!=(u=null==e?void 0:e.left)?u:[]).filter((e=>!(null!=l&&l.includes(e)))),...l],right:(null!=(a=null==e?void 0:e.right)?a:[]).filter((e=>!(null!=l&&l.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=l&&l.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=l&&l.includes(e))))}}))},getCanPin:()=>e.getLeafColumns().some((e=>{var n,l;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(l=t.options.enablePinning)||l)})),getIsPinned:()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:l,right:o}=t.getState().columnPinning,i=n.some((e=>null==l?void 0:l.includes(e))),r=n.some((e=>null==o?void 0:o.includes(e)));return i?"left":!!r&&"right"},getPinnedIndex:()=>{var n,l,o;const i=e.getIsPinned();return i?null!=(n=null==(l=t.getState().columnPinning)||null==(o=l[i])?void 0:o.indexOf(e.id))?n:-1:0}}),createRow:(e,t)=>({getCenterVisibleCells:i((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const l=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!l.includes(e.column.id)))}),{key:"row.getCenterVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getLeftVisibleCells:i((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"row.getLeftVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getRightVisibleCells:i((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"row.getRightVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>({setColumnPinning:t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),resetColumnPinning:t=>{var n,l;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(l=e.initialState)?void 0:l.columnPinning)?n:{left:[],right:[]})},getIsSomeColumnsPinned:t=>{var n;const l=e.getState().columnPinning;var o,i;return t?Boolean(null==(n=l[t])?void 0:n.length):Boolean((null==(o=l.left)?void 0:o.length)||(null==(i=l.right)?void 0:i.length))},getLeftLeafColumns:i((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getRightLeafColumns:i((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getCenterLeafColumns:i((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const l=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!l.includes(e.id)))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})})},H={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:n("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createInstance:e=>({setRowSelection:t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),resetRowSelection:t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},toggleAllRowsSelected:t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const l={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{l[e.id]=!0})):o.forEach((e=>{delete l[e.id]})),l}))},toggleAllPageRowsSelected:t=>e.setRowSelection((n=>{const l=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach((t=>{D(o,t.id,l,e)})),o})),getPreSelectedRowModel:()=>e.getCoreRowModel(),getSelectedRowModel:i((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?L(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredSelectedRowModel:i((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?L(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getGroupedSelectedRowModel:i((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?L(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getGroupedSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getIsAllRowsSelected:()=>{const t=e.getPreFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let l=Boolean(t.length&&Object.keys(n).length);return l&&t.some((e=>!n[e.id]))&&(l=!1),l},getIsAllPageRowsSelected:()=>{const t=e.getPaginationRowModel().flatRows,{rowSelection:n}=e.getState();let l=!!t.length;return l&&t.some((e=>!n[e.id]))&&(l=!1),l},getIsSomeRowsSelected:()=>{var t;return!e.getIsAllRowsSelected()&&!!Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length},getIsSomePageRowsSelected:()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.some((e=>e.getIsSelected()||e.getIsSomeSelected()))},getToggleAllRowsSelectedHandler:()=>t=>{e.toggleAllRowsSelected(t.target.checked)},getToggleAllPageRowsSelectedHandler:()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}}),createRow:(e,t)=>({toggleSelected:n=>{const l=e.getIsSelected();t.setRowSelection((o=>{if(l===(n=void 0!==n?n:!l))return o;const i={...o};return D(i,e.id,n,t),i}))},getIsSelected:()=>{const{rowSelection:n}=t.getState();return!0===O(e,n)},getIsSomeSelected:()=>{const{rowSelection:n}=t.getState();return"some"===O(e,n)},getCanSelect:()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},getCanSelectSubRows:()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},getCanMultiSelect:()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},getToggleSelectedHandler:()=>{const t=e.getCanSelect();return n=>{var l;t&&e.toggleSelected(null==(l=n.target)?void 0:l.checked)}}})},D=(e,t,n,l)=>{var o;const i=l.getRow(t);i.getIsGrouped(),n?e[t]=!0:delete e[t],null!=(o=i.subRows)&&o.length&&i.getCanSelectSubRows()&&i.subRows.forEach((t=>D(e,t.id,n,l)))};function L(e,t){const n=e.getState().rowSelection,l=[],o={},i=function(e,t){return void 0===t&&(t=0),e.map((e=>{var r;const u=!0===O(e,n);if(u&&(l.push(e),o[e.id]=e),null!=(r=e.subRows)&&r.length&&(e={...e,subRows:i(e.subRows,t+1)}),u)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:l,rowsById:o}}function O(e,t,n){if(t[e.id])return!0;if(e.subRows&&e.subRows.length){let n=!0,l=!1;return e.subRows.forEach((e=>{l&&!n||(O(e,t)?l=!0:n=!1)})),!!n||!!l&&"some"}return!1}const k=/([0-9]+)/gm;function T(e,t){return e===t?0:e>t?1:-1}function B(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function j(e,t){const n=e.split(k).filter(Boolean),l=t.split(k).filter(Boolean);for(;n.length&&l.length;){const e=n.shift(),t=l.shift(),o=parseInt(e,10),i=parseInt(t,10),r=[o,i].sort();if(isNaN(r[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(r[1]))return isNaN(o)?-1:1;if(o>i)return 1;if(i>o)return-1}}return n.length-l.length}const q={alphanumeric:(e,t,n)=>j(B(e.getValue(n)).toLowerCase(),B(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>j(B(e.getValue(n)),B(t.getValue(n))),text:(e,t,n)=>T(B(e.getValue(n)).toLowerCase(),B(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>T(B(e.getValue(n)),B(t.getValue(n))),datetime:(e,t,n)=>T(e.getValue(n).getTime(),t.getValue(n).getTime()),basic:(e,t,n)=>T(e.getValue(n),t.getValue(n))},N={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto"}),getDefaultOptions:e=>({onSortingChange:n("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>({getAutoSortingFn:()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let l=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return q.datetime;if("string"==typeof n&&(l=!0,n.split(k).length>1))return q.alphanumeric}return l?q.text:q.basic},getAutoSortDir:()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},getSortingFn:()=>{var n;const o=t.options.sortingFns;if(!e)throw new Error;return l(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==o?void 0:o[e.columnDef.sortingFn])?n:q[e.columnDef.sortingFn]},toggleSorting:(n,l)=>{const o=e.getNextSortingOrder();t.setSorting((i=>{var r,u;const a=null==i?void 0:i.find((t=>t.id===e.id)),s=null==i?void 0:i.findIndex((t=>t.id===e.id)),g=null!=n;let d,c=[];if(d=e.getCanMultiSort()&&l?a?"toggle":"add":null!=i&&i.length&&s!==i.length-1?"replace":a?"toggle":"replace","toggle"!==d||null!=(r=t.options.enableSortingRemoval)&&!r||g||l&&null!=(u=t.options.enableMultiRemove)&&!u||o||(d="remove"),"replace"===d)c=[{id:e.id,desc:g?n:"desc"===o}];else if("add"===d&&null!=i&&i.length){var p;c=[...i,{id:e.id,desc:g?n:"desc"===o}],c.splice(0,c.length-(null!=(p=t.options.maxMultiSortColCount)?p:Number.MAX_SAFE_INTEGER))}else"toggle"===d&&null!=i&&i.length?c=i.map((t=>t.id===e.id?{...t,desc:g?n:"desc"===o}:t)):"remove"===d&&null!=i&&i.length&&(c=i.filter((t=>t.id!==e.id)));return c}))},getNextSortingOrder:()=>{var n,l;const o=(null!=(n=null!=(l=e.columnDef.sortDescFirst)?l:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc",i=e.getIsSorted();return i?i===o&&("desc"===i?"asc":"desc"):o},getCanSort:()=>{var n,l;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(l=t.options.enableSorting)||l)&&!!e.accessorFn},getCanMultiSort:()=>{var n,l;return null!=(n=null!=(l=e.columnDef.enableMultiSort)?l:t.options.enableMultiSort)?n:!!e.accessorFn},getIsSorted:()=>{var n;const l=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!l&&(l.desc?"desc":"asc")},getSortIndex:()=>{var n,l;return null!=(n=null==(l=t.getState().sorting)?void 0:l.findIndex((t=>t.id===e.id)))?n:-1},clearSorting:()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},getToggleSortingHandler:()=>{const n=e.getCanSort();return l=>{n&&(null==l.persist||l.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(l))))}}}),createInstance:e=>({setSorting:t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),resetSorting:t=>{var n,l;e.setSorting(t?[]:null!=(n=null==(l=e.initialState)?void 0:l.sorting)?n:[])},getPreSortedRowModel:()=>e.getGroupedRowModel(),getSortedRowModel:()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())})},U={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:n("columnVisibility",e)}),createColumn:(e,t)=>({toggleVisibility:n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()})))},getIsVisible:()=>{var n,l;return null==(n=null==(l=t.getState().columnVisibility)?void 0:l[e.id])||n},getCanHide:()=>{var n,l;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(l=t.options.enableHiding)||l)},getToggleVisibilityHandler:()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}),createRow:(e,t)=>({_getAllVisibleCells:i((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:i((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>{const t=(t,n)=>i((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),{key:t,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}});return{getVisibleFlatColumns:t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),getVisibleLeafColumns:t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),getLeftVisibleLeafColumns:t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),getRightVisibleLeafColumns:t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),getCenterVisibleLeafColumns:t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),setColumnVisibility:t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),resetColumnVisibility:t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},toggleAllColumnsVisible:t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},getIsAllColumnsVisible:()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),getIsSomeColumnsVisible:()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),getToggleAllColumnsVisibilityHandler:()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}}},X=[a,U,E,z,V,N,A,m,G,H,d];function K(e,t,n){const l={generics:void 0,options:null!=n?n:{render:(()=>{throw new Error("")})()},setRowType:()=>l,setTableMetaType:()=>l,setColumnMetaType:()=>l,setFilterMetaType:()=>l,setOptions:l=>K(e,t,{...n,...l}),createDisplayColumn:e=>({...e,columnDefType:"display"}),createGroup:e=>({...e,columnDefType:"group"}),createDataColumn:(e,t)=>{var n;if(t={...t,columnDefType:"data",id:t.id},"string"==typeof e)return{...t,id:null!=(n=t.id)?n:e,accessorKey:e};if("function"==typeof e)return{...t,accessorFn:e};throw new Error("Invalid accessor")},createOptions:e=>e};return l}const J=(e,t,n,l,r,u)=>{let a={id:t,index:l,original:n,depth:r,_valuesCache:{},getValue:t=>{if(a._valuesCache.hasOwnProperty(t))return a._valuesCache[t];const n=e.getColumn(t);return n.accessorFn?(a._valuesCache[t]=n.accessorFn(a.original,l),a._valuesCache[t]):void 0},subRows:null!=u?u:[],getLeafRows:()=>o(a.subRows,(e=>e.subRows)),getAllCells:i((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,l){const o=()=>{var t;return null!=(t=i.getValue())?t:e.options.renderFallbackValue},i={id:t.id+"_"+n.id,row:t,column:n,getValue:()=>t.getValue(l),renderCell:()=>n.columnDef.cell?e._render(n.columnDef.cell,{instance:e,column:n,row:t,cell:i,getValue:o}):null};return e._features.forEach((l=>{Object.assign(i,null==l.createCell?void 0:l.createCell(i,n,t,e))}),{}),i}(e,a,t,t.id)))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:i((()=>[a.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})};for(let t=0;t<e._features.length;t++){const n=e._features[t];Object.assign(a,null==n||null==n.createRow?void 0:n.createRow(a,e))}return a};function Q(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){const l=[],o={};let i,r;const u=function(e,l){void 0===l&&(l=0);const a=[];for(let g=0;g<e.length;g++){var s;if(i=e[g],null!=(s=i.subRows)&&s.length){if(r=J(n,i.id,i.original,i.index,i.depth),r.columnFilters=i.columnFilters,r.subRows=u(i.subRows,l+1),!r.subRows.length)continue;i=r}t(i)&&(a.push(i),o[i.id]=i,o[g]=i)}return a};return{rows:u(e),flatRows:l,rowsById:o}}(e,t,n):function(e,t,n){const l=[],o={};let i,r,u;const a=function(e,s){void 0===s&&(s=0),i=[];for(let d=0;d<e.length;d++){r=e[d];var g;if(t(r))null!=(g=r.subRows)&&g.length&&(u=J(n,r.id,r.original,r.index,r.depth),u.subRows=a(r.subRows,s+1),r=u),i.push(r),l.push(r),o[r.id]=r}return i};return{rows:a(e),flatRows:l,rowsById:o}}(e,t,n)}function W(e,t){const n=[],l=e=>{var t;n.push(e),null!=(t=e.subRows)&&t.length&&e.getIsExpanded()&&e.subRows.forEach(l)};return e.rows.forEach(l),{rows:n,flatRows:e.flatRows,rowsById:e.rowsById}}e.ColumnSizing=d,e.Expanding=m,e.Filters=V,e.Grouping=A,e.Headers=a,e.Ordering=E,e.Pagination=G,e.Pinning=z,e.RowSelection=H,e.Sorting=N,e.Visibility=U,e.aggregationFns=_,e.buildHeaderGroups=s,e.createColumn=r,e.createRow=J,e.createTableFactory=function(e){return()=>K(void 0,void 0,e)},e.createTableInstance=function(e){var n;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let l={_features:X};const o=l._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(l))),{});let u={...null!=(n=e.initialState)?n:{}};l._features.forEach((e=>{var t;u=null!=(t=null==e.getInitialState?void 0:e.getInitialState(u))?t:u}));const a=[];let s=!1;const g={_features:X,options:{...o,...e},initialState:u,_queue:e=>{a.push(e),s||(s=!0,Promise.resolve().then((()=>{for(;a.length;)a.shift()();s=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{l.setState(l.initialState)},setOptions:e=>{const n=t(e,l.options);l.options=(e=>l.options.mergeOptions?l.options.mergeOptions(o,e):{...o,...e})(n)},_render:(e,t)=>"function"==typeof l.options.render?l.options.render(e,t):"function"==typeof e?e(t):e,getState:()=>l.options.state,setState:e=>{null==l.options.onStateChange||l.options.onStateChange(e)},_getRowId:(e,t,n)=>{var o;return null!=(o=null==l.options.getRowId?void 0:l.options.getRowId(e,t,n))?o:""+(n?[n.id,t].join("."):t)},getCoreRowModel:()=>(l._getCoreRowModel||(l._getCoreRowModel=l.options.getCoreRowModel(l)),l._getCoreRowModel()),getRowModel:()=>l.getPaginationRowModel(),getRow:e=>{const t=l.getRowModel().rowsById[e];if(!t)throw new Error;return t},_getDefaultColumnDef:i((()=>[l.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>e.header.column.id,footer:e=>e.header.column.id,cell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},...l._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),{debug:()=>{var e;return null!=(e=l.options.debugAll)?e:l.options.debugColumns},key:!1}),_getColumnDefs:()=>l.options.columns,getAllColumns:i((()=>[l._getColumnDefs()]),(e=>{const t=function(e,n,o){return void 0===o&&(o=0),e.map((e=>{const i=r(l,e,o,n);return i.columns=e.columns?t(e.columns,i,o+1):[],i}))};return t(e)}),{key:!1,debug:()=>{var e;return null!=(e=l.options.debugAll)?e:l.options.debugColumns}}),getAllFlatColumns:i((()=>[l.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:!1,debug:()=>{var e;return null!=(e=l.options.debugAll)?e:l.options.debugColumns}}),_getAllFlatColumnsById:i((()=>[l.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:!1,debug:()=>{var e;return null!=(e=l.options.debugAll)?e:l.options.debugColumns}}),getAllLeafColumns:i((()=>[l.getAllColumns(),l._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:!1,debug:()=>{var e;return null!=(e=l.options.debugAll)?e:l.options.debugColumns}}),getColumn:e=>{const t=l._getAllFlatColumnsById()[e];if(!t)throw new Error;return t}};return Object.assign(l,g),l._features.forEach((e=>Object.assign(l,null==e.createInstance?void 0:e.createInstance(l)))),l},e.defaultColumnSizing=g,e.expandRows=W,e.filterFns=I,e.flattenBy=o,e.functionalUpdate=t,e.getCoreRowModel=function(){return e=>i((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},l=function(t,o,i){void 0===o&&(o=0);const r=[];for(let a=0;a<t.length;a++){const s=J(e,e._getRowId(t[a],a,i),t[a],a,o);var u;if(n.flatRows.push(s),n.rowsById[s.id]=s,r.push(s),e.options.getSubRows)s.originalSubRows=e.options.getSubRows(t[a],a),null!=(u=s.originalSubRows)&&u.length&&(s.subRows=l(s.originalSubRows,o+1,s))}return r};return n.rows=l(t),n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.getExpandedRowModel=function(){return e=>i((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&n&&(!0===e||Object.keys(null!=e?e:{}).length)?W(t):t),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getFacetedMinMaxValues=function(){return(e,t)=>i((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{var n;const l=null==(n=e.flatRows[0])?void 0:n.getValue(t);if(void 0===l)return;let o=[l,l];for(let n=0;n<e.flatRows.length;n++){var i;const l=null==(i=e.flatRows[n])?void 0:i.getValue(t);l<o[0]?o[0]=l:l>o[1]&&(o[1]=l)}return o}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFacetedRowModel=function(){return(e,t)=>i((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()]),((n,l,o)=>{if(!n.rows.length||(null==l||!l.length)&&!o)return n;const i=[...l.map((e=>e.id)).filter((e=>e!==t)),o?"__global__":void 0].filter(Boolean);return Q(n.rows,(e=>{for(let t=0;t<i.length;t++)if(!1===e.columnFilters[i[t]])return!1;return!0}),e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFacetedUniqueValues=function(){return(e,t)=>i((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{let n=new Map;for(let i=0;i<e.flatRows.length;i++){var l;const r=null==(l=e.flatRows[i])?void 0:l.getValue(t);var o;if(n.has(r))n.set(r,(null!=(o=n.get(r))?o:0)+1);else n.set(r,1)}return n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFilteredRowModel=function(){return e=>i((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,l)=>{if(!t.rows.length||(null==n||!n.length)&&!l){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const o=[],i=[];(null!=n?n:[]).forEach((t=>{var n;const l=e.getColumn(t.id).getFilterFn();l&&o.push({id:t.id,filterFn:l,resolvedValue:null!=(n=null==l.resolveFilterValue?void 0:l.resolveFilterValue(t.value))?n:t.value})}));const r=n.map((e=>e.id)),u=e.getGlobalFilterFn(),a=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let s,g;l&&u&&a.length&&(r.push("__global__"),a.forEach((e=>{var t;i.push({id:e.id,filterFn:u,resolvedValue:null!=(t=null==u.resolveFilterValue?void 0:u.resolveFilterValue(l))?t:l})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},o.length)for(let e=0;e<o.length;e++){s=o[e];const t=s.id;n.columnFilters[t]=s.filterFn(n,t,s.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){g=i[e];const t=g.id;if(g.filterFn(n,t,g.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return Q(t.rows,(e=>{for(let t=0;t<r.length;t++)if(!1===e.columnFilters[r[t]])return!1;return!0}),e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.getGroupedRowModel=function(){return e=>i((()=>[e.getState().grouping,e.getPreGroupedRowModel()]),((t,n)=>{if(!n.rows.length||!t.length)return n;const l=t.filter((t=>e.getColumn(t))),i=[],r={},u=function(t,n,a){if(void 0===n&&(n=0),n===l.length)return t;const s=l[n],g=function(e,t){const n=new Map;return e.reduce(((e,n)=>{const l=""+n.getValue(t),o=e.get(l);return o?e.set(l,[...o,n]):e.set(l,[n]),e}),n)}(t,s),d=Array.from(g.entries()).map(((t,g)=>{let[d,c]=t,p=s+":"+d;p=a?a+">"+p:p;const f=u(c,n+1,p),m=n?o(c,(e=>e.subRows)):c,b=J(e,p,void 0,g,n);return Object.assign(b,{groupingColumnId:s,groupingValue:d,subRows:f,leafRows:m,getValue:t=>{if(l.includes(t)){if(b._valuesCache.hasOwnProperty(t))return b._valuesCache[t];var n;if(c[0])b._valuesCache[t]=null!=(n=c[0].getValue(t))?n:void 0;return b._valuesCache[t]}if(b._groupingValuesCache.hasOwnProperty(t))return b._groupingValuesCache[t];const o=e.getColumn(t).getAggregationFn();return o?(b._groupingValuesCache[t]=o(t,m,c),b._groupingValuesCache[t]):void 0}}),f.forEach((e=>{i.push(e),r[e.id]=e})),b}));return d},a=u(n.rows,0,"");return a.forEach((e=>{i.push(e),r[e.id]=e})),{rows:a,flatRows:i,rowsById:r}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})},e.getPaginationRowModel=function(e){return e=>i((()=>[e.getState().pagination,e.getPrePaginationRowModel()]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:l,pageIndex:o}=t;let{rows:i,flatRows:r,rowsById:u}=n;const a=l*o,s=a+l;let g;i=i.slice(a,s),g=e.options.paginateExpandedRows?{rows:i,flatRows:r,rowsById:u}:W({rows:i,flatRows:r,rowsById:u}),g.flatRows=[];const d=e=>{g.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return g.rows.forEach(d),g}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getSortedRowModel=function(){return e=>i((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const l=e.getState().sorting,o=[],i=l.filter((t=>e.getColumn(t.id).getCanSort())),r={};i.forEach((t=>{const n=e.getColumn(t.id);r[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()}}));const u=e=>{const t=e.slice();return t.sort(((e,t)=>{for(let l=0;l<i.length;l+=1){var n;const o=i[l],u=r[o.id],a=null!=(n=null==o?void 0:o.desc)&&n;if(u.sortUndefined){const n=void 0===e.getValue(o.id),l=void 0===t.getValue(o.id);if(n||l)return n&&l?0:n?u.sortUndefined:-u.sortUndefined}let s=u.sortingFn(e,t,o.id);if(0!==s)return a&&(s*=-1),u.invertSorting&&(s*=-1),s}return e.index-t.index})),t.forEach((e=>{o.push(e),!e.subRows||e.subRows.length<=1||(e.subRows=u(e.subRows))})),t};return{rows:u(n.rows),flatRows:o,rowsById:n.rowsById}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.isFunction=l,e.isRowSelected=O,e.makeStateUpdater=n,e.memo=i,e.noop=function(){},e.orderColumns=P,e.passiveEventSupported=p,e.reSplitAlphaNumeric=k,e.selectRowsFn=L,e.shouldAutoRemoveFilter=x,e.sortingFns=q,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TableCore={})}(this,(function(e){"use strict";function t(e,t){return"function"==typeof e?e(t):e}function n(e,n){return l=>{n.setState((n=>({...n,[e]:t(l,n[e])})))}}function l(e){return e instanceof Function}function o(e,t){const n=[],l=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&l(o)}))};return l(e),n}function i(e,t,n){let l,o=[];return()=>{let i;n.key&&n.debug&&(i=Date.now());const r=e();if(!(r.length!==o.length||r.some(((e,t)=>o[t]!==e))))return l;let u;if(o=r,n.key&&n.debug&&(u=Date.now()),l=t(...r),null==n||null==n.onChange||n.onChange(l),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-i))/100,t=Math.round(100*(Date.now()-u))/100,l=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info("%c⏱ "+o(t,5)+" /"+o(e,5)+" ms","\n font-size: .6rem;\n font-weight: bold;\n color: hsl("+Math.max(0,Math.min(120-120*l,120))+"deg 100% 31%);",null==n?void 0:n.key)}return l}}function r(e,t,n,l){var o,r;const u=e._getDefaultColumnDef();let a,s=null!=(o=null!=(r=(t={...u,...t}).id)?r:t.accessorKey)?o:"string"==typeof t.header?t.header:void 0;if(t.accessorFn?a=t.accessorFn:t.accessorKey&&(a=e=>e[t.accessorKey]),!s)throw new Error;let g={id:""+s,accessorFn:a,parent:l,depth:n,columnDef:t,columnDefType:t.columnDefType,columns:[],getFlatColumns:i((()=>[!0]),(()=>{var e;return[g,...null==(e=g.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:i((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=g.columns)&&t.length){let t=g.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[g]}),{key:"column.getLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return g=e._features.reduce(((t,n)=>Object.assign(t,null==n.createColumn?void 0:n.createColumn(g,e))),g),g}function u(e,t,n){var l;let o={id:null!=(l=n.id)?l:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},renderHeader:()=>t.columnDef.header?e._render(t.columnDef.header,{instance:e,header:o,column:t}):null,renderFooter:()=>t.columnDef.footer?e._render(t.columnDef.footer,{instance:e,header:o,column:t}):null};return e._features.forEach((t=>{Object.assign(o,null==t.createHeader?void 0:t.createHeader(o,e))})),o}const a={createInstance:e=>({getHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>{var i,r;const u=null!=(i=null==l?void 0:l.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],a=null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[];return s(t,[...u,...n.filter((e=>!(null!=l&&l.includes(e.id)||null!=o&&o.includes(e.id)))),...a],e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>s(t,n=n.filter((e=>!(null!=l&&l.includes(e.id)||null!=o&&o.includes(e.id)))),e,"center")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,l)=>{var o;return s(t,null!=(o=null==l?void 0:l.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"left")}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,l)=>{var o;return s(t,null!=(o=null==l?void 0:l.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"right")}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFooterGroups:i((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFooterGroups:i((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFooterGroups:i((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFooterGroups:i((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFlatHeaders:i((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFlatHeaders:i((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFlatHeaders:i((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFlatHeaders:i((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterLeafHeaders:i((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftLeafHeaders:i((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightLeafHeaders:i((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeafHeaders:i((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var l,o,i,r,u,a;return[...null!=(l=null==(o=e[0])?void 0:o.headers)?l:[],...null!=(i=null==(r=t[0])?void 0:r.headers)?i:[],...null!=(u=null==(a=n[0])?void 0:a.headers)?u:[]].map((e=>e.getLeafHeaders())).flat()}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}})})};function s(e,t,n,l){var o,i;let r=0;const a=function(e,t){void 0===t&&(t=1),r=Math.max(r,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&a(e.columns,t+1)}),0)};a(e);let s=[];const g=(e,t)=>{const o={depth:t,id:[l,""+t].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const r=[...i].reverse()[0];let a,s=!1;if(e.column.depth===o.depth&&e.column.parent?a=e.column.parent:(a=e.column,s=!0),(null==r?void 0:r.column)===a)r.subHeaders.push(e);else{const o=u(n,a,{id:[l,t,a.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:s,placeholderId:s?""+i.filter((e=>e.column===a)).length:void 0,depth:t,index:i.length});o.subHeaders.push(e),i.push(o)}o.headers.push(e),e.headerGroup=o})),s.push(o),t>0&&g(i,t-1)},d=t.map(((e,t)=>u(n,e,{depth:r,index:t})));g(d,r-1),s.reverse();const c=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,l=[0];e.subHeaders&&e.subHeaders.length?(l=[],c(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,l.push(o)}))):t=1;return n+=Math.min(...l),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return c(null!=(o=null==(i=s[0])?void 0:i.headers)?o:[]),s}const g={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},d={getDefaultColumnDef:()=>g,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:n("columnSizing",e),onColumnSizingInfoChange:n("columnSizingInfo",e)}),createColumn:(e,t)=>({getSize:()=>{var n,l,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:g.minSize,null!=(l=null!=i?i:e.columnDef.size)?l:g.size),null!=(o=e.columnDef.maxSize)?o:g.maxSize)},getStart:n=>{const l=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),o=l.findIndex((t=>t.id===e.id));if(o>0){const e=l[o-1];return e.getStart(n)+e.getSize()}return 0},resetSize:()=>{t.setColumnSizing((t=>{let{[e.id]:n,...l}=t;return l}))},getCanResize:()=>{var n,l;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(l=t.options.enableColumnResizing)||l)},getIsResizing:()=>t.getState().columnSizingInfo.isResizingColumn===e.id}),createHeader:(e,t)=>({getSize:()=>{let t=0;const n=e=>{var l;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(l=e.column.getSize())?l:0};return n(e),t},getStart:()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},getResizeHandler:()=>{const n=t.getColumn(e.column.id),l=n.getCanResize();return o=>{if(!l)return;if(null==o.persist||o.persist(),f(o)&&o.touches&&o.touches.length>1)return;const i=e.getSize(),r=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],u=f(o)?Math.round(o.touches[0].clientX):o.clientX,a=(e,n)=>{if("number"!=typeof n)return;let l={};t.setColumnSizingInfo((e=>{var t,o;const i=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),r=Math.max(i/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;l[t]=Math.round(100*Math.max(n+n*r,0))/100})),{...e,deltaOffset:i,deltaPercentage:r}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...l})))},s={moveHandler:e=>{return t=e.clientX,a("move",t);var t},upHandler:e=>{var n;document.removeEventListener("mousemove",s.moveHandler),document.removeEventListener("mouseup",s.upHandler),n=e.clientX,a("end",n),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))}},g=!!p()&&{passive:!1};f(o)||(document.addEventListener("mousemove",s.moveHandler,g),document.addEventListener("mouseup",s.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:u,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:r,isResizingColumn:n.id})))}}}),createInstance:e=>({setColumnSizing:t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),setColumnSizingInfo:t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),resetColumnSizing:t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},resetHeaderSizeInfo:t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},getTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getLeftTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getCenterTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getRightTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}})};let c=null;function p(){if("boolean"==typeof c)return c;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return c=e,c}function f(e){return"touchstart"===e.type}const m={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:n("expanded",e),paginateExpandedRows:!0}),createInstance:e=>{let t=!1,n=!1;return{_autoResetExpanded:()=>{var l,o;if(t){if(null!=(l=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?l:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},setExpanded:t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),toggleAllRowsExpanded:t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},resetExpanded:t=>{var n,l;e.setExpanded(t?{}:null!=(n=null==(l=e.initialState)?void 0:l.expanded)?n:{})},getCanSomeRowsExpand:()=>e.getRowModel().flatRows.some((e=>e.getCanExpand())),getToggleAllRowsExpandedHandler:()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},getIsSomeRowsExpanded:()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},getIsAllRowsExpanded:()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((e=>e.getIsExpanded()))},getExpandedDepth:()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},getPreExpandedRowModel:()=>e.getSortedRowModel(),getExpandedRowModel:()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())}},createRow:(e,t)=>({toggleExpanded:n=>{t.setExpanded((l=>{var o;const i=!0===l||!(null==l||!l[e.id]);let r={};if(!0===l?Object.keys(t.getRowModel().rowsById).forEach((e=>{r[e]=!0})):r=l,n=null!=(o=n)?o:!i,!i&&n)return{...r,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=r;return n}return l}))},getIsExpanded:()=>{var n;const l=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===l||(null==l?void 0:l[e.id]))},getCanExpand:()=>{var n,l,o;return(null==(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))||n)&&(null==(l=t.options.enableExpanding)||l)&&!(null==(o=e.subRows)||!o.length)},getToggleExpandedHandler:()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}})},b=(e,t,n)=>{const l=n.toLowerCase();return e.getValue(t).toLowerCase().includes(l)};b.autoRemove=e=>y(e);const w=(e,t,n)=>e.getValue(t).includes(n);w.autoRemove=e=>y(e);const v=(e,t,n)=>e.getValue(t).toLowerCase()===n.toLowerCase();v.autoRemove=e=>y(e);const h=(e,t,n)=>e.getValue(t).includes(n);h.autoRemove=e=>y(e)||!(null!=e&&e.length);const C=(e,t,n)=>!n.some((n=>!e.getValue(t).includes(n)));C.autoRemove=e=>y(e)||!(null!=e&&e.length);const S=(e,t,n)=>n.some((n=>e.getValue(t).includes(n)));S.autoRemove=e=>y(e)||!(null!=e&&e.length);const R=(e,t,n)=>e.getValue(t)===n;R.autoRemove=e=>y(e);const F=(e,t,n)=>e.getValue(t)==n;F.autoRemove=e=>y(e);const M=(e,t,n)=>{let[l,o]=n;const i=e.getValue(t);return i>=l&&i<=o};M.resolveFilterValue=e=>{let[t,n]=e,l="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(l)?-1/0:l,r=null===n||Number.isNaN(o)?1/0:o;if(i>r){const e=i;i=r,r=e}return[i,r]},M.autoRemove=e=>y(e)||y(e[0])&&y(e[1]);const I={includesString:b,includesStringSensitive:w,equalsString:v,arrIncludes:h,arrIncludesAll:C,arrIncludesSome:S,equals:R,weakEquals:F,inNumberRange:M};function y(e){return null==e||""===e}const V={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:n("columnFilters",e),onGlobalFilterChange:n("globalFilter",e),filterFromLeafRows:!1,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n,l;return"string"==typeof(null==(n=e.getCoreRowModel().flatRows[0])||null==(l=n._getAllCellsByColumnId()[t.id])?void 0:l.getValue())}}),createColumn:(e,n)=>({getAutoFilterFn:()=>{const t=n.getCoreRowModel().flatRows[0],l=null==t?void 0:t.getValue(e.id);return"string"==typeof l?I.includesString:"number"==typeof l?I.inNumberRange:"boolean"==typeof l||null!==l&&"object"==typeof l?I.equals:Array.isArray(l)?I.arrIncludes:I.weakEquals},getFilterFn:()=>{var t;const o=n.options.filterFns;return l(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(t=null==o?void 0:o[e.columnDef.filterFn])?t:I[e.columnDef.filterFn]},getCanFilter:()=>{var t,l,o;return(null==(t=e.columnDef.enableColumnFilter)||t)&&(null==(l=n.options.enableColumnFilters)||l)&&(null==(o=n.options.enableFilters)||o)&&!!e.accessorFn},getCanGlobalFilter:()=>{var t,l,o,i;return(null==(t=e.columnDef.enableGlobalFilter)||t)&&(null==(l=n.options.enableGlobalFilter)||l)&&(null==(o=n.options.enableFilters)||o)&&(null==(i=null==n.options.getColumnCanGlobalFilter?void 0:n.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn},getIsFiltered:()=>e.getFilterIndex()>-1,getFilterValue:()=>{var t,l;return null==(t=n.getState().columnFilters)||null==(l=t.find((t=>t.id===e.id)))?void 0:l.value},getFilterIndex:()=>{var t,l;return null!=(t=null==(l=n.getState().columnFilters)?void 0:l.findIndex((t=>t.id===e.id)))?t:-1},setFilterValue:l=>{n.setColumnFilters((n=>{const o=e.getFilterFn(),i=null==n?void 0:n.find((t=>t.id===e.id)),r=t(l,i?i.value:void 0);var u;if(x(o,r,e))return null!=(u=null==n?void 0:n.filter((t=>t.id!==e.id)))?u:[];const a={id:e.id,value:r};var s;return i?null!=(s=null==n?void 0:n.map((t=>t.id===e.id?a:t)))?s:[]:null!=n&&n.length?[...n,a]:[a]}))},_getFacetedRowModel:n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),getFacetedRowModel:()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),_getFacetedUniqueValues:n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),getFacetedUniqueValues:()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),getFacetedMinMaxValues:()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}),createRow:(e,t)=>({columnFilters:{},columnFiltersMeta:{}}),createInstance:e=>({getGlobalAutoFilterFn:()=>I.includesString,getGlobalFilterFn:()=>{var t;const{filterFns:n,globalFilterFn:o}=e.options;return l(o)?o:"auto"===o?e.getGlobalAutoFilterFn():null!=(t=null==n?void 0:n[o])?t:I[o]},setColumnFilters:n=>{const l=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=t(n,e))?void 0:o.filter((e=>{const t=l.find((t=>t.id===e.id));if(t){if(x(t.getFilterFn(),e.value,t))return!1}return!0}))}))},setGlobalFilter:t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},resetGlobalFilter:t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},resetColumnFilters:t=>{var n,l;e.setColumnFilters(t?[]:null!=(n=null==(l=e.initialState)?void 0:l.columnFilters)?n:[])},getPreFilteredRowModel:()=>e.getCoreRowModel(),_getFilteredRowModel:e.options.getFilteredRowModel&&e.options.getFilteredRowModel(e),getFilteredRowModel:()=>e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel(),_getGlobalFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),getGlobalFacetedRowModel:()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),_getGlobalFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),getGlobalFacetedUniqueValues:()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,_getGlobalFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),getGlobalFacetedMinMaxValues:()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}})};function x(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const _={sum:(e,t,n)=>n.reduce(((e,t)=>e+("number"==typeof t?t:0)),0),min:(e,t,n)=>{let l;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(l>n||void 0===l&&n>=n)&&(l=n)})),l},max:(e,t,n)=>{let l;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(l<n||void 0===l&&n>=n)&&(l=n)})),l},extent:(e,t,n)=>{let l,o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===l?n>=n&&(l=o=n):(l>n&&(l=n),o<n&&(o=n)))})),[l,o]},mean:(e,t)=>{let n=0,l=0;if(t.forEach((t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,l+=o)})),n)return l/n},median:(e,t)=>{if(!t.length)return;let n=0,l=0;return t.forEach((t=>{let o=t.getValue(e);"number"==typeof o&&(n=Math.min(n,o),l=Math.max(l,o))})),(n+l)/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},A={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:n("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>({toggleGrouping:()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...null!=t?t:[],e.id]))},getCanGroup:()=>{var n,l,o,i;return null!=(n=null==(l=null!=(o=null==(i=e.columnDef.enableGrouping)||i)?o:t.options.enableGrouping)||l)?n:!!e.accessorFn},getIsGrouped:()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},getGroupedIndex:()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},getToggleGroupingHandler:()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},getAutoAggregationFn:()=>{const n=t.getCoreRowModel().flatRows[0],l=null==n?void 0:n.getValue(e.id);return"number"==typeof l?_.sum:"[object Date]"===Object.prototype.toString.call(l)?_.extent:void 0},getAggregationFn:()=>{var n;const o=t.options.aggregationFns;if(!e)throw new Error;return l(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==o?void 0:o[e.columnDef.aggregationFn])?n:_[e.columnDef.aggregationFn]}}),createInstance:e=>({setGrouping:t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),resetGrouping:t=>{var n,l;e.setGrouping(t?[]:null!=(n=null==(l=e.initialState)?void 0:l.grouping)?n:[])},getPreGroupedRowModel:()=>e.getFilteredRowModel(),getGroupedRowModel:()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())}),createRow:e=>({getIsGrouped:()=>!!e.groupingColumnId,_groupingValuesCache:{}}),createCell:(e,t,n,l)=>{const o=()=>{var t;return null!=(t=e.getValue())?t:l.options.renderFallbackValue};return{getIsGrouped:()=>t.getIsGrouped()&&t.id===n.groupingColumnId,getIsPlaceholder:()=>!e.getIsGrouped()&&t.getIsGrouped(),getIsAggregated:()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)},renderAggregatedCell:()=>{const i=t.columnDef.aggregatedCell||t.columnDef.cell;return i?l._render(i,{instance:l,column:t,row:n,cell:e,getValue:o}):null}}}};function P(e,t,n){if(null==t||!t.length||!n)return e;const l=e.filter((e=>!t.includes(e.id)));if("remove"===n)return l;return[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...l]}const E={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:n("columnOrder",e)}),createInstance:e=>({setColumnOrder:t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),resetColumnOrder:t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},_getOrderColumnsFn:i((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>l=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...l];for(;n.length&&t.length;){const e=t.shift(),l=n.findIndex((t=>t.id===e));l>-1&&o.push(n.splice(l,1)[0])}o=[...o,...n]}else o=l;return P(o,t,n)}),{key:!1})})},G={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:n("pagination",e)}),createInstance:e=>{let n=!1,l=!1;return{_autoResetPageIndex:()=>{var t,o;if(n){if(null!=(t=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?t:!e.options.manualPagination){if(l)return;l=!0,e._queue((()=>{e.resetPageIndex(),l=!1}))}}else e._queue((()=>{n=!0}))},setPagination:n=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>t(n,e))),resetPagination:t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},setPageIndex:n=>{e.setPagination((l=>{let o=t(n,l.pageIndex);const i=void 0!==e.options.pageCount?e.options.pageCount-1:Number.MAX_SAFE_INTEGER;return o=Math.min(Math.max(0,o),i),{...l,pageIndex:o}}))},resetPageIndex:t=>{var n,l,o;e.setPageIndex(t?0:null!=(n=null==(l=e.initialState)||null==(o=l.pagination)?void 0:o.pageIndex)?n:0)},resetPageSize:t=>{var n,l,o;e.setPageSize(t?10:null!=(n=null==(l=e.initialState)||null==(o=l.pagination)?void 0:o.pageSize)?n:10)},setPageSize:n=>{e.setPagination((e=>{const l=Math.max(1,t(n,e.pageSize)),o=e.pageSize*e.pageIndex,i=Math.floor(o/l);return{...e,pageIndex:i,pageSize:l}}))},setPageCount:n=>e.setPagination((l=>{var o;let i=t(n,null!=(o=e.options.pageCount)?o:-1);return"number"==typeof i&&(i=Math.max(-1,i)),{...l,pageCount:i}})),getPageOptions:i((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getCanPreviousPage:()=>e.getState().pagination.pageIndex>0,getCanNextPage:()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},previousPage:()=>e.setPageIndex((e=>e-1)),nextPage:()=>e.setPageIndex((e=>e+1)),getPrePaginationRowModel:()=>e.getExpandedRowModel(),getPaginationRowModel:()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),getPageCount:()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}}},z={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:n("columnPinning",e)}),createColumn:(e,t)=>({pin:n=>{const l=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,i,r,u,a;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=l&&l.includes(e)))),right:[...(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=l&&l.includes(e)))),...l]}:"left"===n?{left:[...(null!=(u=null==e?void 0:e.left)?u:[]).filter((e=>!(null!=l&&l.includes(e)))),...l],right:(null!=(a=null==e?void 0:e.right)?a:[]).filter((e=>!(null!=l&&l.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=l&&l.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=l&&l.includes(e))))}}))},getCanPin:()=>e.getLeafColumns().some((e=>{var n,l;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(l=t.options.enablePinning)||l)})),getIsPinned:()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:l,right:o}=t.getState().columnPinning,i=n.some((e=>null==l?void 0:l.includes(e))),r=n.some((e=>null==o?void 0:o.includes(e)));return i?"left":!!r&&"right"},getPinnedIndex:()=>{var n,l,o;const i=e.getIsPinned();return i?null!=(n=null==(l=t.getState().columnPinning)||null==(o=l[i])?void 0:o.indexOf(e.id))?n:-1:0}}),createRow:(e,t)=>({getCenterVisibleCells:i((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const l=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!l.includes(e.column.id)))}),{key:"row.getCenterVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getLeftVisibleCells:i((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"row.getLeftVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getRightVisibleCells:i((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"row.getRightVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>({setColumnPinning:t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),resetColumnPinning:t=>{var n,l;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(l=e.initialState)?void 0:l.columnPinning)?n:{left:[],right:[]})},getIsSomeColumnsPinned:t=>{var n;const l=e.getState().columnPinning;var o,i;return t?Boolean(null==(n=l[t])?void 0:n.length):Boolean((null==(o=l.left)?void 0:o.length)||(null==(i=l.right)?void 0:i.length))},getLeftLeafColumns:i((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getRightLeafColumns:i((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getCenterLeafColumns:i((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const l=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!l.includes(e.id)))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})})},H={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:n("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createInstance:e=>({setRowSelection:t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),resetRowSelection:t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},toggleAllRowsSelected:t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const l={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{l[e.id]=!0})):o.forEach((e=>{delete l[e.id]})),l}))},toggleAllPageRowsSelected:t=>e.setRowSelection((n=>{const l=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach((t=>{D(o,t.id,l,e)})),o})),getPreSelectedRowModel:()=>e.getCoreRowModel(),getSelectedRowModel:i((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?L(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredSelectedRowModel:i((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?L(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getGroupedSelectedRowModel:i((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?L(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getGroupedSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getIsAllRowsSelected:()=>{const t=e.getPreFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let l=Boolean(t.length&&Object.keys(n).length);return l&&t.some((e=>!n[e.id]))&&(l=!1),l},getIsAllPageRowsSelected:()=>{const t=e.getPaginationRowModel().flatRows,{rowSelection:n}=e.getState();let l=!!t.length;return l&&t.some((e=>!n[e.id]))&&(l=!1),l},getIsSomeRowsSelected:()=>{var t;return!e.getIsAllRowsSelected()&&!!Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length},getIsSomePageRowsSelected:()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.some((e=>e.getIsSelected()||e.getIsSomeSelected()))},getToggleAllRowsSelectedHandler:()=>t=>{e.toggleAllRowsSelected(t.target.checked)},getToggleAllPageRowsSelectedHandler:()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}}),createRow:(e,t)=>({toggleSelected:n=>{const l=e.getIsSelected();t.setRowSelection((o=>{if(l===(n=void 0!==n?n:!l))return o;const i={...o};return D(i,e.id,n,t),i}))},getIsSelected:()=>{const{rowSelection:n}=t.getState();return!0===O(e,n)},getIsSomeSelected:()=>{const{rowSelection:n}=t.getState();return"some"===O(e,n)},getCanSelect:()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},getCanSelectSubRows:()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},getCanMultiSelect:()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},getToggleSelectedHandler:()=>{const t=e.getCanSelect();return n=>{var l;t&&e.toggleSelected(null==(l=n.target)?void 0:l.checked)}}})},D=(e,t,n,l)=>{var o;const i=l.getRow(t);i.getIsGrouped(),n?e[t]=!0:delete e[t],null!=(o=i.subRows)&&o.length&&i.getCanSelectSubRows()&&i.subRows.forEach((t=>D(e,t.id,n,l)))};function L(e,t){const n=e.getState().rowSelection,l=[],o={},i=function(e,t){return void 0===t&&(t=0),e.map((e=>{var r;const u=!0===O(e,n);if(u&&(l.push(e),o[e.id]=e),null!=(r=e.subRows)&&r.length&&(e={...e,subRows:i(e.subRows,t+1)}),u)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:l,rowsById:o}}function O(e,t,n){if(t[e.id])return!0;if(e.subRows&&e.subRows.length){let n=!0,l=!1;return e.subRows.forEach((e=>{l&&!n||(O(e,t)?l=!0:n=!1)})),!!n||!!l&&"some"}return!1}const k=/([0-9]+)/gm;function T(e,t){return e===t?0:e>t?1:-1}function B(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function j(e,t){const n=e.split(k).filter(Boolean),l=t.split(k).filter(Boolean);for(;n.length&&l.length;){const e=n.shift(),t=l.shift(),o=parseInt(e,10),i=parseInt(t,10),r=[o,i].sort();if(isNaN(r[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(r[1]))return isNaN(o)?-1:1;if(o>i)return 1;if(i>o)return-1}}return n.length-l.length}const q={alphanumeric:(e,t,n)=>j(B(e.getValue(n)).toLowerCase(),B(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>j(B(e.getValue(n)),B(t.getValue(n))),text:(e,t,n)=>T(B(e.getValue(n)).toLowerCase(),B(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>T(B(e.getValue(n)),B(t.getValue(n))),datetime:(e,t,n)=>T(e.getValue(n).getTime(),t.getValue(n).getTime()),basic:(e,t,n)=>T(e.getValue(n),t.getValue(n))},N={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto"}),getDefaultOptions:e=>({onSortingChange:n("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>({getAutoSortingFn:()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let l=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return q.datetime;if("string"==typeof n&&(l=!0,n.split(k).length>1))return q.alphanumeric}return l?q.text:q.basic},getAutoSortDir:()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},getSortingFn:()=>{var n;const o=t.options.sortingFns;if(!e)throw new Error;return l(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==o?void 0:o[e.columnDef.sortingFn])?n:q[e.columnDef.sortingFn]},toggleSorting:(n,l)=>{const o=e.getNextSortingOrder();t.setSorting((i=>{var r,u;const a=null==i?void 0:i.find((t=>t.id===e.id)),s=null==i?void 0:i.findIndex((t=>t.id===e.id)),g=null!=n;let d,c=[];if(d=e.getCanMultiSort()&&l?a?"toggle":"add":null!=i&&i.length&&s!==i.length-1?"replace":a?"toggle":"replace","toggle"!==d||null!=(r=t.options.enableSortingRemoval)&&!r||g||l&&null!=(u=t.options.enableMultiRemove)&&!u||o||(d="remove"),"replace"===d)c=[{id:e.id,desc:g?n:"desc"===o}];else if("add"===d&&null!=i&&i.length){var p;c=[...i,{id:e.id,desc:g?n:"desc"===o}],c.splice(0,c.length-(null!=(p=t.options.maxMultiSortColCount)?p:Number.MAX_SAFE_INTEGER))}else"toggle"===d&&null!=i&&i.length?c=i.map((t=>t.id===e.id?{...t,desc:g?n:"desc"===o}:t)):"remove"===d&&null!=i&&i.length&&(c=i.filter((t=>t.id!==e.id)));return c}))},getNextSortingOrder:()=>{var n,l;const o=(null!=(n=null!=(l=e.columnDef.sortDescFirst)?l:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc",i=e.getIsSorted();return i?i===o&&("desc"===i?"asc":"desc"):o},getCanSort:()=>{var n,l;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(l=t.options.enableSorting)||l)&&!!e.accessorFn},getCanMultiSort:()=>{var n,l;return null!=(n=null!=(l=e.columnDef.enableMultiSort)?l:t.options.enableMultiSort)?n:!!e.accessorFn},getIsSorted:()=>{var n;const l=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!l&&(l.desc?"desc":"asc")},getSortIndex:()=>{var n,l;return null!=(n=null==(l=t.getState().sorting)?void 0:l.findIndex((t=>t.id===e.id)))?n:-1},clearSorting:()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},getToggleSortingHandler:()=>{const n=e.getCanSort();return l=>{n&&(null==l.persist||l.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(l))))}}}),createInstance:e=>({setSorting:t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),resetSorting:t=>{var n,l;e.setSorting(t?[]:null!=(n=null==(l=e.initialState)?void 0:l.sorting)?n:[])},getPreSortedRowModel:()=>e.getGroupedRowModel(),getSortedRowModel:()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())})},U={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:n("columnVisibility",e)}),createColumn:(e,t)=>({toggleVisibility:n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()})))},getIsVisible:()=>{var n,l;return null==(n=null==(l=t.getState().columnVisibility)?void 0:l[e.id])||n},getCanHide:()=>{var n,l;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(l=t.options.enableHiding)||l)},getToggleVisibilityHandler:()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}),createRow:(e,t)=>({_getAllVisibleCells:i((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:i((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>{const t=(t,n)=>i((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),{key:t,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}});return{getVisibleFlatColumns:t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),getVisibleLeafColumns:t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),getLeftVisibleLeafColumns:t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),getRightVisibleLeafColumns:t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),getCenterVisibleLeafColumns:t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),setColumnVisibility:t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),resetColumnVisibility:t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},toggleAllColumnsVisible:t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},getIsAllColumnsVisible:()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),getIsSomeColumnsVisible:()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),getToggleAllColumnsVisibilityHandler:()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}}},X=[a,U,E,z,V,N,A,m,G,H,d];function K(e,t,n){const l={generics:void 0,options:null!=n?n:{render:(()=>{throw new Error("")})()},setRowType:()=>l,setTableMetaType:()=>l,setColumnMetaType:()=>l,setFilterMetaType:()=>l,setOptions:l=>K(e,t,{...n,...l}),createDisplayColumn:e=>({...e,columnDefType:"display"}),createGroup:e=>({...e,columnDefType:"group"}),createDataColumn:(e,t)=>{var n;if(t={...t,columnDefType:"data",id:t.id},"string"==typeof e)return{...t,id:null!=(n=t.id)?n:e,accessorKey:e};if("function"==typeof e)return{...t,accessorFn:e};throw new Error("Invalid accessor")},createOptions:e=>e};return l}const J=(e,t,n,l,r,u)=>{let a={id:t,index:l,original:n,depth:r,_valuesCache:{},getValue:t=>{if(a._valuesCache.hasOwnProperty(t))return a._valuesCache[t];const n=e.getColumn(t);return n.accessorFn?(a._valuesCache[t]=n.accessorFn(a.original,l),a._valuesCache[t]):void 0},subRows:null!=u?u:[],getLeafRows:()=>o(a.subRows,(e=>e.subRows)),getAllCells:i((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,l){const o=()=>{var t;return null!=(t=i.getValue())?t:e.options.renderFallbackValue},i={id:t.id+"_"+n.id,row:t,column:n,getValue:()=>t.getValue(l),renderCell:()=>n.columnDef.cell?e._render(n.columnDef.cell,{instance:e,column:n,row:t,cell:i,getValue:o}):null};return e._features.forEach((l=>{Object.assign(i,null==l.createCell?void 0:l.createCell(i,n,t,e))}),{}),i}(e,a,t,t.id)))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:i((()=>[a.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})};for(let t=0;t<e._features.length;t++){const n=e._features[t];Object.assign(a,null==n||null==n.createRow?void 0:n.createRow(a,e))}return a};function Q(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){const l=[],o={};let i,r;const u=function(e,l){void 0===l&&(l=0);const a=[];for(let g=0;g<e.length;g++){var s;if(i=e[g],null!=(s=i.subRows)&&s.length){if(r=J(n,i.id,i.original,i.index,i.depth),r.columnFilters=i.columnFilters,r.subRows=u(i.subRows,l+1),!r.subRows.length)continue;i=r}t(i)&&(a.push(i),o[i.id]=i,o[g]=i)}return a};return{rows:u(e),flatRows:l,rowsById:o}}(e,t,n):function(e,t,n){const l=[],o={};let i,r,u;const a=function(e,s){void 0===s&&(s=0),i=[];for(let d=0;d<e.length;d++){r=e[d];var g;if(t(r))null!=(g=r.subRows)&&g.length&&(u=J(n,r.id,r.original,r.index,r.depth),u.subRows=a(r.subRows,s+1),r=u),i.push(r),l.push(r),o[r.id]=r}return i};return{rows:a(e),flatRows:l,rowsById:o}}(e,t,n)}function W(e,t){const n=[],l=e=>{var t;n.push(e),null!=(t=e.subRows)&&t.length&&e.getIsExpanded()&&e.subRows.forEach(l)};return e.rows.forEach(l),{rows:n,flatRows:e.flatRows,rowsById:e.rowsById}}e.ColumnSizing=d,e.Expanding=m,e.Filters=V,e.Grouping=A,e.Headers=a,e.Ordering=E,e.Pagination=G,e.Pinning=z,e.RowSelection=H,e.Sorting=N,e.Visibility=U,e.aggregationFns=_,e.buildHeaderGroups=s,e.createColumn=r,e.createRow=J,e.createTableFactory=function(e){return()=>K(void 0,void 0,e)},e.createTableInstance=function(e){var n;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let l={_features:X};const o=l._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(l))),{});let u={...null!=(n=e.initialState)?n:{}};l._features.forEach((e=>{var t;u=null!=(t=null==e.getInitialState?void 0:e.getInitialState(u))?t:u}));const a=[];let s=!1;const g={_features:X,options:{...o,...e},initialState:u,_queue:e=>{a.push(e),s||(s=!0,Promise.resolve().then((()=>{for(;a.length;)a.shift()();s=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{l.setState(l.initialState)},setOptions:e=>{const n=t(e,l.options);l.options=(e=>l.options.mergeOptions?l.options.mergeOptions(o,e):{...o,...e})(n)},_render:(e,t)=>"function"==typeof l.options.render?l.options.render(e,t):"function"==typeof e?e(t):e,getState:()=>l.options.state,setState:e=>{null==l.options.onStateChange||l.options.onStateChange(e)},_getRowId:(e,t,n)=>{var o;return null!=(o=null==l.options.getRowId?void 0:l.options.getRowId(e,t,n))?o:""+(n?[n.id,t].join("."):t)},getCoreRowModel:()=>(l._getCoreRowModel||(l._getCoreRowModel=l.options.getCoreRowModel(l)),l._getCoreRowModel()),getRowModel:()=>l.getPaginationRowModel(),getRow:e=>{const t=l.getRowModel().rowsById[e];if(!t)throw new Error;return t},_getDefaultColumnDef:i((()=>[l.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>e.header.column.id,footer:e=>e.header.column.id,cell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},...l._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),{debug:()=>{var e;return null!=(e=l.options.debugAll)?e:l.options.debugColumns},key:!1}),_getColumnDefs:()=>l.options.columns,getAllColumns:i((()=>[l._getColumnDefs()]),(e=>{const t=function(e,n,o){return void 0===o&&(o=0),e.map((e=>{const i=r(l,e,o,n);return i.columns=e.columns?t(e.columns,i,o+1):[],i}))};return t(e)}),{key:!1,debug:()=>{var e;return null!=(e=l.options.debugAll)?e:l.options.debugColumns}}),getAllFlatColumns:i((()=>[l.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:!1,debug:()=>{var e;return null!=(e=l.options.debugAll)?e:l.options.debugColumns}}),_getAllFlatColumnsById:i((()=>[l.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:!1,debug:()=>{var e;return null!=(e=l.options.debugAll)?e:l.options.debugColumns}}),getAllLeafColumns:i((()=>[l.getAllColumns(),l._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:!1,debug:()=>{var e;return null!=(e=l.options.debugAll)?e:l.options.debugColumns}}),getColumn:e=>{const t=l._getAllFlatColumnsById()[e];if(!t)throw new Error;return t}};return Object.assign(l,g),l._features.forEach((e=>Object.assign(l,null==e.createInstance?void 0:e.createInstance(l)))),l},e.defaultColumnSizing=g,e.expandRows=W,e.filterFns=I,e.flattenBy=o,e.functionalUpdate=t,e.getCoreRowModel=function(){return e=>i((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},l=function(t,o,i){void 0===o&&(o=0);const r=[];for(let a=0;a<t.length;a++){const s=J(e,e._getRowId(t[a],a,i),t[a],a,o);var u;if(n.flatRows.push(s),n.rowsById[s.id]=s,r.push(s),e.options.getSubRows)s.originalSubRows=e.options.getSubRows(t[a],a),null!=(u=s.originalSubRows)&&u.length&&(s.subRows=l(s.originalSubRows,o+1,s))}return r};return n.rows=l(t),n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.getExpandedRowModel=function(){return e=>i((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&n&&(!0===e||Object.keys(null!=e?e:{}).length)?W(t):t),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getFacetedMinMaxValues=function(){return(e,t)=>i((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{var n;const l=null==(n=e.flatRows[0])?void 0:n.getValue(t);if(void 0===l)return;let o=[l,l];for(let n=0;n<e.flatRows.length;n++){var i;const l=null==(i=e.flatRows[n])?void 0:i.getValue(t);l<o[0]?o[0]=l:l>o[1]&&(o[1]=l)}return o}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFacetedRowModel=function(){return(e,t)=>i((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()]),((n,l,o)=>{if(!n.rows.length||(null==l||!l.length)&&!o)return n;const i=[...l.map((e=>e.id)).filter((e=>e!==t)),o?"__global__":void 0].filter(Boolean);return Q(n.rows,(e=>{for(let t=0;t<i.length;t++)if(!1===e.columnFilters[i[t]])return!1;return!0}),e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFacetedUniqueValues=function(){return(e,t)=>i((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{let n=new Map;for(let i=0;i<e.flatRows.length;i++){var l;const r=null==(l=e.flatRows[i])?void 0:l.getValue(t);var o;if(n.has(r))n.set(r,(null!=(o=n.get(r))?o:0)+1);else n.set(r,1)}return n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFilteredRowModel=function(){return e=>i((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,l)=>{if(!t.rows.length||(null==n||!n.length)&&!l){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const o=[],i=[];(null!=n?n:[]).forEach((t=>{var n;const l=e.getColumn(t.id).getFilterFn();l&&o.push({id:t.id,filterFn:l,resolvedValue:null!=(n=null==l.resolveFilterValue?void 0:l.resolveFilterValue(t.value))?n:t.value})}));const r=n.map((e=>e.id)),u=e.getGlobalFilterFn(),a=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let s,g;l&&u&&a.length&&(r.push("__global__"),a.forEach((e=>{var t;i.push({id:e.id,filterFn:u,resolvedValue:null!=(t=null==u.resolveFilterValue?void 0:u.resolveFilterValue(l))?t:l})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},o.length)for(let e=0;e<o.length;e++){s=o[e];const t=s.id;n.columnFilters[t]=s.filterFn(n,t,s.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){g=i[e];const t=g.id;if(g.filterFn(n,t,g.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return Q(t.rows,(e=>{for(let t=0;t<r.length;t++)if(!1===e.columnFilters[r[t]])return!1;return!0}),e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.getGroupedRowModel=function(){return e=>i((()=>[e.getState().grouping,e.getPreGroupedRowModel()]),((t,n)=>{if(!n.rows.length||!t.length)return n;const l=t.filter((t=>e.getColumn(t))),i=[],r={},u=function(t,n,a){if(void 0===n&&(n=0),n===l.length)return t;const s=l[n],g=function(e,t){const n=new Map;return e.reduce(((e,n)=>{const l=""+n.getValue(t),o=e.get(l);return o?e.set(l,[...o,n]):e.set(l,[n]),e}),n)}(t,s),d=Array.from(g.entries()).map(((t,g)=>{let[d,c]=t,p=s+":"+d;p=a?a+">"+p:p;const f=u(c,n+1,p),m=n?o(c,(e=>e.subRows)):c,b=J(e,p,void 0,g,n);return Object.assign(b,{groupingColumnId:s,groupingValue:d,subRows:f,leafRows:m,getValue:t=>{if(l.includes(t)){if(b._valuesCache.hasOwnProperty(t))return b._valuesCache[t];var n;if(c[0])b._valuesCache[t]=null!=(n=c[0].getValue(t))?n:void 0;return b._valuesCache[t]}if(b._groupingValuesCache.hasOwnProperty(t))return b._groupingValuesCache[t];const o=e.getColumn(t).getAggregationFn();return o?(b._groupingValuesCache[t]=o(t,m,c),b._groupingValuesCache[t]):void 0}}),f.forEach((e=>{i.push(e),r[e.id]=e})),b}));return d},a=u(n.rows,0,"");return a.forEach((e=>{i.push(e),r[e.id]=e})),{rows:a,flatRows:i,rowsById:r}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})},e.getPaginationRowModel=function(e){return e=>i((()=>[e.getState().pagination,e.getPrePaginationRowModel()]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:l,pageIndex:o}=t;let{rows:i,flatRows:r,rowsById:u}=n;const a=l*o,s=a+l;let g;i=i.slice(a,s),g=e.options.paginateExpandedRows?{rows:i,flatRows:r,rowsById:u}:W({rows:i,flatRows:r,rowsById:u}),g.flatRows=[];const d=e=>{g.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return g.rows.forEach(d),g}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getSortedRowModel=function(){return e=>i((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const l=e.getState().sorting,o=[],i=l.filter((t=>e.getColumn(t.id).getCanSort())),r={};i.forEach((t=>{const n=e.getColumn(t.id);r[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()}}));const u=e=>{const t=e.slice();return t.sort(((e,t)=>{for(let l=0;l<i.length;l+=1){var n;const o=i[l],u=r[o.id],a=null!=(n=null==o?void 0:o.desc)&&n;if(u.sortUndefined){const n=void 0===e.getValue(o.id),l=void 0===t.getValue(o.id);if(n||l)return n&&l?0:n?u.sortUndefined:-u.sortUndefined}let s=u.sortingFn(e,t,o.id);if(0!==s)return a&&(s*=-1),u.invertSorting&&(s*=-1),s}return e.index-t.index})),t.forEach((e=>{o.push(e),!e.subRows||e.subRows.length<=1||(e.subRows=u(e.subRows))})),t};return{rows:u(n.rows),flatRows:o,rowsById:n.rowsById}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.isFunction=l,e.isRowSelected=O,e.makeStateUpdater=n,e.memo=i,e.noop=function(){},e.orderColumns=P,e.passiveEventSupported=p,e.reSplitAlphaNumeric=k,e.selectRowsFn=L,e.shouldAutoRemoveFilter=x,e.sortingFns=q,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.production.js.map |
{ | ||
"name": "@tanstack/table-core", | ||
"author": "Tanner Linsley", | ||
"version": "8.0.0-beta.7", | ||
"version": "8.0.0-beta.8", | ||
"description": "Headless UI for building powerful tables & datagrids for TS/JS.", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -14,3 +14,2 @@ import { TableFeature } from '../core/instance' | ||
pageSize: number | ||
pageCount?: number | ||
} | ||
@@ -27,2 +26,3 @@ | ||
export type PaginationOptions<TGenerics extends TableGenerics> = { | ||
pageCount?: number | ||
manualPagination?: boolean | ||
@@ -136,4 +136,4 @@ onPaginationChange?: OnChangeFn<PaginationState> | ||
const maxPageIndex = | ||
typeof old.pageCount !== 'undefined' | ||
? old.pageCount - 1 | ||
typeof instance.options.pageCount !== 'undefined' | ||
? instance.options.pageCount - 1 | ||
: Number.MAX_SAFE_INTEGER | ||
@@ -178,3 +178,6 @@ | ||
instance.setPagination(old => { | ||
let newPageCount = functionalUpdate(updater, old.pageCount ?? -1) | ||
let newPageCount = functionalUpdate( | ||
updater, | ||
instance.options.pageCount ?? -1 | ||
) | ||
@@ -192,7 +195,4 @@ if (typeof newPageCount === 'number') { | ||
getPageOptions: memo( | ||
() => [ | ||
instance.getState().pagination.pageSize, | ||
instance.getState().pagination.pageCount, | ||
], | ||
(pageSize, pageCount) => { | ||
() => [instance.getPageCount()], | ||
pageCount => { | ||
let pageOptions: number[] = [] | ||
@@ -259,11 +259,8 @@ if (pageCount && pageCount > 0) { | ||
getPageCount: () => { | ||
const { pageCount } = instance.getState().pagination | ||
if (typeof pageCount !== 'undefined') { | ||
return pageCount | ||
} | ||
return Math.ceil( | ||
instance.getPrePaginationRowModel().rows.length / | ||
instance.getState().pagination.pageSize | ||
return ( | ||
instance.options.pageCount ?? | ||
Math.ceil( | ||
instance.getPrePaginationRowModel().rows.length / | ||
instance.getState().pagination.pageSize | ||
) | ||
) | ||
@@ -270,0 +267,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2121424
18108