@tanstack/svelte-table
Advanced tools
Comparing version 8.0.0-alpha.70 to 8.0.0-alpha.71
@@ -14,3 +14,3 @@ { | ||
"name": "table-core/build/esm/index.js", | ||
"uid": "fca1-173" | ||
"uid": "9906-173" | ||
}, | ||
@@ -21,11 +21,11 @@ { | ||
{ | ||
"uid": "fca1-175", | ||
"uid": "9906-175", | ||
"name": "placeholder.svelte" | ||
}, | ||
{ | ||
"uid": "fca1-177", | ||
"uid": "9906-177", | ||
"name": "render-component.ts" | ||
}, | ||
{ | ||
"uid": "fca1-179", | ||
"uid": "9906-179", | ||
"name": "index.ts" | ||
@@ -43,32 +43,32 @@ } | ||
"nodeParts": { | ||
"fca1-173": { | ||
"renderedLength": 142313, | ||
"gzipLength": 24348, | ||
"9906-173": { | ||
"renderedLength": 142389, | ||
"gzipLength": 24368, | ||
"brotliLength": 0, | ||
"mainUid": "fca1-172" | ||
"mainUid": "9906-172" | ||
}, | ||
"fca1-175": { | ||
"9906-175": { | ||
"renderedLength": 925, | ||
"gzipLength": 444, | ||
"brotliLength": 0, | ||
"mainUid": "fca1-174" | ||
"mainUid": "9906-174" | ||
}, | ||
"fca1-177": { | ||
"9906-177": { | ||
"renderedLength": 1365, | ||
"gzipLength": 519, | ||
"brotliLength": 0, | ||
"mainUid": "fca1-176" | ||
"mainUid": "9906-176" | ||
}, | ||
"fca1-179": { | ||
"9906-179": { | ||
"renderedLength": 1958, | ||
"gzipLength": 709, | ||
"brotliLength": 0, | ||
"mainUid": "fca1-178" | ||
"mainUid": "9906-178" | ||
} | ||
}, | ||
"nodeMetas": { | ||
"fca1-172": { | ||
"9906-172": { | ||
"id": "/packages/table-core/build/esm/index.js", | ||
"moduleParts": { | ||
"index.production.js": "fca1-173" | ||
"index.production.js": "9906-173" | ||
}, | ||
@@ -78,14 +78,14 @@ "imported": [], | ||
{ | ||
"uid": "fca1-178" | ||
"uid": "9906-178" | ||
} | ||
] | ||
}, | ||
"fca1-174": { | ||
"9906-174": { | ||
"id": "/packages/svelte-table/src/placeholder.svelte", | ||
"moduleParts": { | ||
"index.production.js": "fca1-175" | ||
"index.production.js": "9906-175" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "fca1-181" | ||
"uid": "9906-181" | ||
} | ||
@@ -95,14 +95,14 @@ ], | ||
{ | ||
"uid": "fca1-178" | ||
"uid": "9906-178" | ||
} | ||
] | ||
}, | ||
"fca1-176": { | ||
"9906-176": { | ||
"id": "/packages/svelte-table/src/render-component.ts", | ||
"moduleParts": { | ||
"index.production.js": "fca1-177" | ||
"index.production.js": "9906-177" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "fca1-181" | ||
"uid": "9906-181" | ||
} | ||
@@ -112,23 +112,23 @@ ], | ||
{ | ||
"uid": "fca1-178" | ||
"uid": "9906-178" | ||
} | ||
] | ||
}, | ||
"fca1-178": { | ||
"9906-178": { | ||
"id": "/packages/svelte-table/src/index.ts", | ||
"moduleParts": { | ||
"index.production.js": "fca1-179" | ||
"index.production.js": "9906-179" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "fca1-172" | ||
"uid": "9906-172" | ||
}, | ||
{ | ||
"uid": "fca1-174" | ||
"uid": "9906-174" | ||
}, | ||
{ | ||
"uid": "fca1-180" | ||
"uid": "9906-180" | ||
}, | ||
{ | ||
"uid": "fca1-176" | ||
"uid": "9906-176" | ||
} | ||
@@ -139,3 +139,3 @@ ], | ||
}, | ||
"fca1-180": { | ||
"9906-180": { | ||
"id": "svelte/store", | ||
@@ -146,3 +146,3 @@ "moduleParts": {}, | ||
{ | ||
"uid": "fca1-178" | ||
"uid": "9906-178" | ||
} | ||
@@ -152,3 +152,3 @@ ], | ||
}, | ||
"fca1-181": { | ||
"9906-181": { | ||
"id": "svelte/internal", | ||
@@ -159,6 +159,6 @@ "moduleParts": {}, | ||
{ | ||
"uid": "fca1-174" | ||
"uid": "9906-174" | ||
}, | ||
{ | ||
"uid": "fca1-176" | ||
"uid": "9906-176" | ||
} | ||
@@ -165,0 +165,0 @@ ], |
@@ -21,3 +21,3 @@ /** | ||
* @license MIT | ||
*/function l(e,t){return"function"==typeof e?e(t):e}function o(e,t){return n=>{t.setState((t=>({...t,[e]:l(n,t[e])})))}}function r(e){return e instanceof Function}function i(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 u(e,t,n){let l,o=[];return()=>{let r;n.key&&n.debug&&(r=Date.now());const i=e();if(!(i.length!==o.length||i.some(((e,t)=>o[t]!==e))))return l;let u;if(o=i,n.key&&n.debug&&(u=Date.now()),l=t(...i),null==n||null==n.onChange||n.onChange(l),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-r))/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}}const a={createInstance:e=>({getDefaultColumn:u((()=>[e.options.defaultColumn]),(t=>{var n;return t=null!=(n=t)?n:{},{header:e=>e.header.column.id,footer:e=>e.header.column.id,cell:e=>{var t,n,l;return null!=(t=null==(n=(l=e.getValue()).toString)?void 0:n.call(l))?t:null},...e._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumn?void 0:t.getDefaultColumn())),{}),...t}}),{debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns},key:!1}),getColumnDefs:()=>e.options.columns,createColumn:(t,n,l)=>{var o,r;const i=e.getDefaultColumn();let a,s=null!=(o=null!=(r=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={...i,...t,id:""+s,accessorFn:a,parent:l,depth:n,columnDef:t,columnDefType:t.columnDefType,columns:[],getFlatColumns:u((()=>[!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:u((()=>[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},getAllColumns:u((()=>[e.getColumnDefs()]),(t=>{const n=function(t,l,o){return void 0===o&&(o=0),t.map((t=>{const r=e.createColumn(t,o,l);return r.columns=t.columns?n(t.columns,r,o+1):[],r}))};return n(t)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllFlatColumns:u((()=>[e.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllFlatColumnsById:u((()=>[e.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllLeafColumns:u((()=>[e.getAllColumns(),e._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getColumn:t=>{const n=e.getAllFlatColumnsById()[t];if(!n)throw new Error;return n}})},s={createInstance:e=>({getRowId:(t,n,l)=>{var o;return null!=(o=null==e.options.getRowId?void 0:e.options.getRowId(t,n,l))?o:""+(l?[l.id,n].join("."):n)},createRow:(t,n,l,o,r)=>{let u={id:t,index:l,original:n,depth:o,valuesCache:{},getValue:t=>{if(u.valuesCache.hasOwnProperty(t))return u.valuesCache[t];const n=e.getColumn(t);if(!n.accessorFn)throw new Error;return u.valuesCache[t]=n.accessorFn(u.original,l),u.valuesCache[t]},subRows:null!=r?r:[],getLeafRows:()=>i(u.subRows,(e=>e.subRows))};for(let t=0;t<e._features.length;t++){const n=e._features[t];Object.assign(u,null==n||null==n.createRow?void 0:n.createRow(u,e))}return u},getCoreRowModel:()=>(e._getCoreRowModel||(e._getCoreRowModel=e.options.getCoreRowModel(e)),e._getCoreRowModel()),getRowModel:()=>e.getPaginationRowModel(),getRow:t=>{const n=e.getRowModel().rowsById[t];if(!n)throw new Error;return n}})},g={createRow:(e,t)=>({getAllCells:u((()=>[t.getAllLeafColumns()]),(n=>n.map((n=>t.createCell(e,n,n.id)))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getAllCellsByColumnId:u((()=>[e.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.columnId]=t,e)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>({createCell:(t,n,l)=>{const o={id:t.id+"_"+n.id,rowId:t.id,columnId:l,row:t,column:n,getValue:()=>t.getValue(l),renderCell:()=>n.cell?e.render(n.cell,{instance:e,column:n,row:t,cell:o,getValue:o.getValue}):null};return e._features.forEach((l=>{Object.assign(o,null==l.createCell?void 0:l.createCell(o,n,t,e))}),{}),o},getCell:(t,n)=>{const l=e.getRow(t);if(!l)throw new Error;const o=l.getAllCellsByColumnId()[n];if(!o)throw new Error;return o}})},d={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},c={getDefaultColumn:()=>d,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:o("columnSizing",e),onColumnSizingInfoChange:o("columnSizingInfo",e)}),createColumn:(e,t)=>({getSize:()=>{var n,l,o;const r=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.minSize)?n:d.minSize,null!=(l=null!=r?r:e.size)?l:d.size),null!=(o=e.maxSize)?o:d.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.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(),m(o)&&o.touches&&o.touches.length>1)return;const r=n.getSize(),i=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],u=m(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 r=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),i=Math.max(r/(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*i,0))/100})),{...e,deltaOffset:r,deltaPercentage:i}})),"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=!!f()&&{passive:!1};m(o)||(document.addEventListener("mousemove",s.moveHandler,g),document.addEventListener("mouseup",s.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:u,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,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.column.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.column.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.column.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.column.getSize()),0))?t:0}})};let p=null;function f(){if("boolean"==typeof p)return p;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 p=e,p}function m(e){return"touchstart"===e.type}const b={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:o("expanded",e),autoResetExpanded:!0,expandSubRows:!0,paginateExpandedRows:!0}),createInstance:e=>{let t=!1;return{_autoResetExpanded:()=>{t?!1!==e.options.autoResetAll&&(!0===e.options.autoResetAll||e.options.autoResetExpanded)&&e.resetExpanded():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:()=>!0===e.getState().expanded||!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.getGroupedRowModel(),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 r=!0===l||!(null==l||!l[e.id]);let i={};if(!0===l?Object.keys(t.getRowModel().rowsById).forEach((e=>{i[e]=!0})):i=l,n=null!=(o=n)?o:!r,!r&&n)return{...i,[e.id]:!0};if(r&&!n){const{[e.id]:t,...n}=i;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()}}})},w=(e,t,n)=>{const l=n.toLowerCase();return e.getValue(t).toLowerCase().includes(l)};w.autoRemove=e=>V(e);const C=(e,t,n)=>e.getValue(t).includes(n);C.autoRemove=e=>V(e);const v=(e,t,n)=>e.getValue(t).toLowerCase()===n.toLowerCase();v.autoRemove=e=>V(e);const h=(e,t,n)=>e.getValue(t).includes(n);h.autoRemove=e=>V(e)||!(null!=e&&e.length);const S=(e,t,n)=>!n.some((n=>!e.getValue(t).includes(n)));S.autoRemove=e=>V(e)||!(null!=e&&e.length);const R=(e,t,n)=>n.some((n=>e.getValue(t).includes(n)));R.autoRemove=e=>V(e)||!(null!=e&&e.length);const F=(e,t,n)=>e.getValue(t)===n;F.autoRemove=e=>V(e);const M=(e,t,n)=>e.getValue(t)==n;M.autoRemove=e=>V(e);const I=(e,t,n)=>{let[l,o]=n;const r=e.getValue(t);return r>=l&&r<=o};I.resolveFilterValue=e=>{let[t,n]=e,l="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,r=null===t||Number.isNaN(l)?-1/0:l,i=null===n||Number.isNaN(o)?1/0:o;if(r>i){const e=r;r=i,i=e}return[r,i]},I.autoRemove=e=>V(e)||V(e[0])&&V(e[1]);const y={includesString:w,includesStringSensitive:C,equalsString:v,arrIncludes:h,arrIncludesAll:S,arrIncludesSome:R,equals:F,weakEquals:M,inNumberRange:I};function V(e){return null==e||""===e}const x={getDefaultColumn:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:o("columnFilters",e),onGlobalFilterChange:o("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,t)=>({filterFn:e.filterFn,getAutoFilterFn:()=>{const n=t.getCoreRowModel().flatRows[0],l=null==n?void 0:n.getValue(e.id);return"string"==typeof l?y.includesString:"number"==typeof l?y.inNumberRange:null!==l&&"object"==typeof l?y.equals:Array.isArray(l)?y.arrIncludes:y.weakEquals},getFilterFn:()=>{var n;const l=t.options.filterFns;return r(e.filterFn)?e.filterFn:"auto"===e.filterFn?e.getAutoFilterFn():null!=(n=null==l?void 0:l[e.filterFn])?n:y[e.filterFn]},getCanFilter:()=>{var n,l,o;return(null==(n=e.enableColumnFilter)||n)&&(null==(l=t.options.enableColumnFilters)||l)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},getCanGlobalFilter:()=>{var n,l,o,r;return(null==(n=e.enableGlobalFilter)||n)&&(null==(l=t.options.enableGlobalFilter)||l)&&(null==(o=t.options.enableFilters)||o)&&(null==(r=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||r)&&!!e.accessorFn},getIsFiltered:()=>e.getFilterIndex()>-1,getFilterValue:()=>{var n,l;return null==(n=t.getState().columnFilters)||null==(l=n.find((t=>t.id===e.id)))?void 0:l.value},getFilterIndex:()=>{var n,l;return null!=(n=null==(l=t.getState().columnFilters)?void 0:l.findIndex((t=>t.id===e.id)))?n:-1},setFilterValue:n=>{t.setColumnFilters((t=>{const o=e.getFilterFn(),r=null==t?void 0:t.find((t=>t.id===e.id)),i=l(n,r?r.value:void 0);var u;if(A(o,i,e))return null!=(u=null==t?void 0:t.filter((t=>t.id!==e.id)))?u:[];const a={id:e.id,value:i};var s;return r?null!=(s=null==t?void 0:t.map((t=>t.id===e.id?a:t)))?s:[]:null!=t&&t.length?[...t,a]:[a]}))},_getFacetedRowModel:t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),getFacetedRowModel:()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),_getFacetedUniqueValues:t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),getFacetedUniqueValues:()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),getFacetedMinMaxValues:()=>e._getFacetedMinMaxValues?e._getFacetedMinMaxValues():[NaN,NaN]}),createRow:(e,t)=>({columnFilterMap:{},subRowsByFacetId:{}}),createInstance:e=>({getGlobalAutoFilterFn:()=>y.includesString,getGlobalFilterFn:()=>{var t;const{filterFns:n,globalFilterFn:l}=e.options;return r(l)?l:"auto"===l?e.getGlobalAutoFilterFn():null!=(t=null==n?void 0:n[l])?t:y[l]},setColumnFilters:t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=l(t,e))?void 0:o.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(A(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:()=>e._getGlobalFacetedMinMaxValues?e._getGlobalFacetedMinMaxValues():[NaN,NaN]})};function A(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const P={sum:function(e,t){return t().reduce(((e,t)=>e+("number"==typeof t?t:0)),0)},min:function(e,t){let n;for(const e of t())null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);return n},max:function(e,t){let n;for(const e of t())null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);return n},extent:function(e,t){let n,l;for(const e of t())null!=e&&(void 0===n?e>=e&&(n=l=e):(n>e&&(n=e),l<e&&(l=e)));return[n,l]},mean:function(e){let t=0,n=0;for(let l of e())null!=l&&(l=+l)>=l&&(++t,n+=l);return t?n/t:void 0},median:function(e){const t=e();if(!t.length)return;let n=0,l=0;return t.forEach((e=>{"number"==typeof e&&(n=Math.min(n,e),l=Math.max(l,e))})),(n+l)/2},unique:function(e){return Array.from(new Set(e()).values())},uniqueCount:function(e){return new Set(e()).size},count:function(e){return e().length}};const _={getDefaultColumn:()=>({aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:o("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,r;return null!=(n=null==(l=null!=(o=null==(r=e.enableGrouping)||r)?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()}},getColumnAutoAggregationFn:()=>{const n=t.getCoreRowModel().flatRows[0],l=null==n?void 0:n.getValue(e.id);return"number"==typeof l?P.sum:"[object Date]"===Object.prototype.toString.call(l)?P.extent:P.count},getColumnAggregationFn:()=>{var n;const l=t.options.aggregationFns;if(!e)throw new Error;return r(e.aggregationFn)?e.aggregationFn:"auto"===e.aggregationFn?e.getColumnAutoAggregationFn():null!=(n=null==l?void 0:l[e.aggregationFn])?n:P[e.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.getSortedRowModel(),getGroupedRowModel:()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())}),createRow:(e,t)=>({getIsGrouped:()=>!!e.groupingColumnId,groupingValuesCache:{}}),createCell:(e,t,n,l)=>({getIsGrouped:()=>t.getIsGrouped()&&t.id===n.groupingColumnId,getIsPlaceholder:()=>!e.getIsGrouped()&&t.getIsGrouped(),getIsAggregated:()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&(null==(t=n.subRows)?void 0:t.length)>1},renderAggregatedCell:()=>{var o;const r=null!=(o=t.aggregatedCell)?o:t.cell;return r?l.render(r,{instance:l,column:t,row:n,cell:e,getValue:e.getValue}):null}})};function E(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 G={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:o("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:u((()=>[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 E(o,t,n)}),{key:!1})})},H={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:o("pagination",e),autoResetPageIndex:!0}),createInstance:e=>{let t=!1;return{_autoResetPageIndex:()=>{t?!1!==e.options.autoResetAll&&(!0===e.options.autoResetAll||e.options.autoResetPageIndex)&&e.resetPageIndex():t=!0},setPagination:t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>l(t,e))),resetPagination:t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},setPageIndex:t=>{e.setPagination((e=>{let n=l(t,e.pageIndex);const o=e.pageCount&&e.pageCount>0?e.pageCount-1:Number.MAX_SAFE_INTEGER;return n=Math.min(Math.max(0,n),o),{...e,pageIndex:n}}))},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:t=>{e.setPagination((e=>{const n=Math.max(1,l(t,e.pageSize)),o=e.pageSize*e.pageIndex,r=Math.floor(o/n);return{...e,pageIndex:r,pageSize:n}}))},setPageCount:t=>e.setPagination((e=>{var n;let o=l(t,null!=(n=e.pageCount)?n:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...e,pageCount:o}})),getPageOptions:u((()=>[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:o("columnPinning",e)}),createColumn:(e,t)=>({pin:n=>{const l=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,r,i,u,a;return"right"===n?{left:(null!=(r=null==e?void 0:e.left)?r:[]).filter((e=>!(null!=l&&l.includes(e)))),right:[...(null!=(i=null==e?void 0:e.right)?i:[]).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.enablePinning)||n)&&(null==(l=t.options.enablePinning)||l)})),getIsPinned:()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:l,right:o}=t.getState().columnPinning,r=n.some((e=>null==l?void 0:l.includes(e))),i=n.some((e=>null==o?void 0:o.includes(e)));return r?"left":!!i&&"right"},getPinnedIndex:()=>{var n,l,o;const r=e.getIsPinned();return r?null!=(n=null==(l=t.getState().columnPinning)||null==(o=l[r])?void 0:o.indexOf(e.id))?n:-1:0}}),createRow:(e,t)=>({getCenterVisibleCells:u((()=>[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.columnId)))}),{key:"row.getCenterVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getLeftVisibleCells:u((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.columnId===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:u((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.columnId===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:()=>{const{left:t,right:n}=e.getState().columnPinning;return Boolean((null==t?void 0:t.length)||(null==n?void 0:n.length))},getLeftLeafColumns:u((()=>[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:u((()=>[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:u((()=>[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}})})},L={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:o("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=>{void 0!==t||e.getIsAllPageRowsSelected();const l={...n};return e.getRowModel().rows.forEach((n=>{O(l,n.id,t,e)})),l})),getPreSelectedRowModel:()=>e.getCoreRowModel(),getSelectedRowModel:u((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?k(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredSelectedRowModel:u((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?k(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getGroupedSelectedRowModel:u((()=>[e.getState().rowSelection,e.getGroupedRowModel()]),((t,n)=>Object.keys(t).length?k(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()&&!(null==t||!t.length)},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 r={...o};return O(r,e.id,n,t),r}))},getIsSelected:()=>{const{rowSelection:n}=t.getState();return!0===T(e,n)},getIsSomeSelected:()=>{const{rowSelection:n}=t.getState();return"some"===T(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)}}})},O=(e,t,n,l)=>{var o;const r=l.getRow(t);r.getIsGrouped(),n?e[t]=!0:delete e[t],null!=(o=r.subRows)&&o.length&&r.getCanSelectSubRows()&&r.subRows.forEach((t=>O(e,t.id,n,l)))};function k(e,t){const n=e.getState().rowSelection,l=[],o={},r=function(e,t){return void 0===t&&(t=0),e.map((e=>{var i;const u=!0===T(e,n);if(u&&(l.push(e),o[e.id]=e),null!=(i=e.subRows)&&i.length&&(e={...e,subRows:r(e.subRows,t+1)}),u)return e})).filter(Boolean)};return{rows:r(t.rows),flatRows:l,rowsById:o}}function T(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||(T(e,t)?l=!0:n=!1)})),!!n||!!l&&"some"}return!1}const D=/([0-9]+)/gm,B={alphanumeric:function(e,t,n){return j(q(e.getValue(n)).toLowerCase(),q(t.getValue(n)).toLowerCase())},alphanumericCaseSensitive:function(e,t,n){return j(q(e.getValue(n)),q(t.getValue(n)))},text:function(e,t,n){return N(q(e.getValue(n)).toLowerCase(),q(t.getValue(n)).toLowerCase())},textCaseSensitive:function(e,t,n){return N(q(e.getValue(n)),q(t.getValue(n)))},datetime:function(e,t,n){return N(e.getValue(n).getTime(),t.getValue(n).getTime())},basic:function(e,t,n){return N(e.getValue(n),t.getValue(n))}};function j(e,t){const n=e.split(D).filter(Boolean),l=t.split(D).filter(Boolean);for(;n.length&&l.length;){const e=n.shift(),t=l.shift(),o=parseInt(e,10),r=parseInt(t,10),i=[o,r].sort();if(isNaN(i[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(i[1]))return isNaN(o)?-1:1;if(o>r)return 1;if(r>o)return-1}}return n.length-l.length}function N(e,t){return e===t?0:e>t?1:-1}function q(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}const U={getInitialState:e=>({sorting:[],...e}),getDefaultColumn:()=>({sortingFn:"auto"}),getDefaultOptions:e=>({onSortingChange:o("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>({getAutoSortingFn:()=>{const n=t.getFilteredRowModel().flatRows.slice(100);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 B.datetime;if("string"==typeof n&&(l=!0,n.split(D).length>1))return B.alphanumeric}return l?B.text:B.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 l=t.options.sortingFns;if(!e)throw new Error;return r(e.sortingFn)?e.sortingFn:"auto"===e.sortingFn?e.getAutoSortingFn():null!=(n=null==l?void 0:l[e.sortingFn])?n:B[e.sortingFn]},toggleSorting:(n,l)=>{t.setSorting((o=>{var r,i,u,a;const s=null==o?void 0:o.find((t=>t.id===e.id)),g=null==o?void 0:o.findIndex((t=>t.id===e.id)),d=null!=n;let c,p=[];c=e.getCanMultiSort()&&l?s?"toggle":"add":null!=o&&o.length&&g!==o.length-1?"replace":s?"toggle":"replace";const f=null!=(r=null!=(i=e.sortDescFirst)?i:t.options.sortDescFirst)?r:"desc"===e.getAutoSortDir();if("toggle"!==c||null!=(u=t.options.enableSortingRemoval)&&!u||d||l&&null!=(a=t.options.enableMultiRemove)&&!a||(null!=s&&s.desc?f:!f)||(c="remove"),"replace"===c)p=[{id:e.id,desc:d?n:!!f}];else if("add"===c&&null!=o&&o.length){var m;p=[...o,{id:e.id,desc:d?n:!!f}],p.splice(0,p.length-(null!=(m=t.options.maxMultiSortColCount)?m:Number.MAX_SAFE_INTEGER))}else"toggle"===c&&null!=o&&o.length?p=o.map((t=>t.id===e.id?{...t,desc:d?n:!(null!=s&&s.desc)}:t)):"remove"===c&&null!=o&&o.length&&(p=o.filter((t=>t.id!==e.id)));return p}))},getCanSort:()=>{var n,l;return(null==(n=e.enableSorting)||n)&&(null==(l=t.options.enableSorting)||l)&&!!e.accessorFn},getCanMultiSort:()=>{var n,l;return null!=(n=null!=(l=e.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.getFilteredRowModel(),getSortedRowModel:()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())})},$={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:o("columnVisibility",e)}),getDefaultColumn:()=>({defaultIsVisible:!0}),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.enableHiding)||n)&&(null==(l=t.options.enableHiding)||l)},getToggleVisibilityHandler:()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}),createRow:(e,t)=>({_getAllVisibleCells:u((()=>[e.getAllCells().filter((e=>e.column.getIsVisible())).map((e=>e.id)).join("_")]),(t=>e.getAllCells().filter((e=>e.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:u((()=>[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)=>u((()=>[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={createInstance:e=>({createHeader:(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.header?e.render(t.header,{instance:e,header:o,column:t}):null,renderFooter:()=>t.footer?e.render(t.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},getHeaderGroups:u((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>{const r=n.filter((e=>null==l?void 0:l.includes(e.id))),i=n.filter((e=>null==o?void 0:o.includes(e.id)));return K(t,[...r,...n.filter((e=>!(null!=l&&l.includes(e.id)||null!=o&&o.includes(e.id)))),...i],e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterHeaderGroups:u((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>K(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:u((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,l)=>K(t,n=n.filter((e=>null==l?void 0:l.includes(e.id))),e,"left")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightHeaderGroups:u((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,l)=>K(t,n=n.filter((e=>null==l?void 0:l.includes(e.id))),e,"right")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFooterGroups:u((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFooterGroups:u((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFooterGroups:u((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFooterGroups:u((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFlatHeaders:u((()=>[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:u((()=>[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:u((()=>[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:u((()=>[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:u((()=>[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:u((()=>[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:u((()=>[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:u((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var l,o,r,i,u,a;return[...null!=(l=null==(o=e[0])?void 0:o.headers)?l:[],...null!=(r=null==(i=t[0])?void 0:i.headers)?r:[],...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}}),getHeader:t=>{const n=[...e.getFlatHeaders(),...e.getCenterFlatHeaders(),...e.getLeftFlatHeaders(),...e.getRightFlatHeaders()].find((e=>e.id===t));if(!n)throw new Error;return n}})};function K(e,t,n,l){var o,r;let i=0;const u=function(e,t){void 0===t&&(t=1),i=Math.max(i,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&u(e.columns,t+1)}),0)};u(e);let a=[];const s=(e,t)=>{const o={depth:t,id:[l,""+t].filter(Boolean).join("_"),headers:[]},r=[];e.forEach((e=>{const i=[...r].reverse()[0];let u,a=!1;if(e.column.depth===o.depth&&e.column.parent?u=e.column.parent:(u=e.column,a=!0),(null==i?void 0:i.column)===u)i.subHeaders.push(e);else{const o=n.createHeader(u,{id:[l,t,u.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:a,placeholderId:a?""+r.filter((e=>e.column===u)).length:void 0,depth:t,index:r.length});o.subHeaders.push(e),r.push(o)}o.headers.push(e),e.headerGroup=o})),a.push(o),t>0&&s(r,t-1)},g=t.map(((e,t)=>n.createHeader(e,{depth:i,index:t})));s(g,i-1),a.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,l=[0];e.subHeaders&&e.subHeaders.length?(l=[],d(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>0?t:void 0,e.rowSpan=n>0?n:void 0,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(r=a[0])?void 0:r.headers)?o:[]),a}function J(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let n={_features:[a,s,g,X,$,G,z,x,U,_,b,H,L,c]};const o=n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))),{});let r={...null!=(t=e.initialState)?t:{}};n._features.forEach((e=>{var t;r=null!=(t=null==e.getInitialState?void 0:e.getInitialState(r))?t:r}));const i=[];let u=!1;const d={...n,options:{...o,...e},initialState:r,queue:e=>{i.push(e),u||(u=!0,Promise.resolve().then((()=>{for(;i.length;)i.shift()();u=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{const t=l(e,n.options);n.options=(e=>n.options.mergeOptions?n.options.mergeOptions(o,e):{...o,...e})(t)},render:(e,t)=>"function"==typeof n.options.render?n.options.render(e,t):"function"==typeof e?e(t):e,getState:()=>n.options.state,setState:e=>{null==n.options.onStateChange||n.options.onStateChange(e)}};return n=Object.assign(n,d),n._features.forEach((e=>Object.assign(n,null==e.createInstance?void 0:e.createInstance(n)))),n}function Q(e){return()=>W(void 0,void 0,e)}function W(e,t,n){const l={generics:void 0,options:null!=n?n:{render:(()=>{throw new Error("")})()},setGenerics:()=>l,setRowType:()=>l,setTableMetaType:()=>l,setColumnMetaType:()=>l,setOptions:l=>W(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")}};return l}function Y(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){const l=[],o={};let r,i;const u=function(e,l){void 0===l&&(l=0);const a=[];for(let g=0;g<e.length;g++){var s;if(r=e[g],null!=(s=r.subRows)&&s.length){if(i=n.createRow(r.id,r.original,r.index,r.depth),i.columnFilterMap=r.columnFilterMap,i.subRows=u(r.subRows,l+1),!i.subRows.length)continue;r=i}t(r)&&(a.push(r),o[r.id]=r,o[g]=r)}return a};return{rows:u(e),flatRows:l,rowsById:o}}(e,t,n):function(e,t,n){const l=[],o={};let r,i,u;const a=function(e,s){void 0===s&&(s=0),r=[];for(let d=0;d<e.length;d++){i=e[d];var g;if(t(i))null!=(g=i.subRows)&&g.length&&(u=n.createRow(i.id,i.original,i.index,i.depth),u.subRows=a(i.subRows,s+1),i=u),r.push(i),l.push(i),o[i.id]=i}return r};return{rows:a(e),flatRows:l,rowsById:o}}(e,t,n)}function Z(e,t){const n=[],l=e=>{var o;n.push(e),t.options.expandSubRows&&null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(l)};return e.rows.forEach(l),{rows:n,flatRows:e.flatRows,rowsById:e.rowsById}}function ee(e){let n;return{c(){n=t.text(e[0])},m(e,l){t.insert(e,n,l)},p(e,[l]){1&l&&t.set_data(n,e[0])},i:t.noop,o:t.noop,d(e){e&&t.detach(n)}}}function te(e,t,n){let{content:l}=t;return e.$$set=e=>{"content"in e&&n(0,l=e.content)},[l]}class ne extends t.SvelteComponent{constructor(e){super(),t.init(this,e,te,ee,t.safe_not_equal,{content:0})}}const le="undefined"==typeof window?function(e,n){return t.create_ssr_component(((l,o,r,i)=>""+t.validate_component(e,"Comp").$$render(l,n,{},{})))}:function(e,n){return class extends t.SvelteComponent{constructor(l){super(),t.init(this,l,null,(l=>function(e,n,l){let o,r;return o=new n({props:l,$$inline:!0}),{c(){t.create_component(o.$$.fragment)},m(e,n){t.mount_component(o,e,n),r=!0},p:t.noop,i(e){r||(t.transition_in(o.$$.fragment,e),r=!0)},o(e){t.transition_out(o.$$.fragment,e),r=!1},d(e){t.destroy_component(o,e)}}}(0,e,n)),t.safe_not_equal,{},void 0)}}};function oe(e,t){if(!e)return null;if(e instanceof Function){return e(t)}return le(ne,{content:e})}const re=Q({render:oe});e.ColumnSizing=c,e.Expanding=b,e.Filters=x,e.Grouping=_,e.Headers=X,e.Ordering=G,e.Pagination=H,e.Pinning=z,e.RowSelection=L,e.Sorting=U,e.Visibility=$,e.buildHeaderGroups=K,e.createTable=re,e.createTableFactory=Q,e.createTableInstance=function(e,t){let l;l="subscribe"in t?t:n.readable(t);let o={...e.options,state:{},onStateChange:()=>{},render:oe,...n.get(l)},r=J(o),i=n.writable(r.initialState),u=n.derived([i,l],(e=>e));const a=n.readable(r,(function(e){const t=u.subscribe((t=>{let[n,l]=t;r.setOptions((e=>({...e,...l,state:{...n,...l.state},onStateChange:e=>{e instanceof Function?i.update(e):i.set(e),null==o.onStateChange||o.onStateChange(e)}}))),e(r)}));return function(){t()}}));return a},e.defaultColumnSizing=d,e.expandRows=Z,e.flattenBy=i,e.functionalUpdate=l,e.getCoreRowModel=function(){return e=>u((()=>[e.options.data]),(t=>{const n=[],l=[],o={},r=e.getAllLeafColumns(),i=function(t,n,u,a,s){void 0===u&&(u=0);const g=e.getRowId(t,n,s),d={};for(let e=0;e<r.length;e++){const l=r[e];l&&l.accessorFn&&(d[l.id]=l.accessorFn(t,n))}const c=e.createRow(g,t,n,u);if(a.push(c),l.push(c),o[g]=c,e.options.getSubRows){const l=e.options.getSubRows(t,n);if(null!=l&&l.length){c.originalSubRows=l;const e=[];for(let t=0;t<c.originalSubRows.length;t++)i(c.originalSubRows[t],t,u+1,e,c);c.subRows=e}}};for(let e=0;e<t.length;e++)i(t[e],e,0,n);return{rows:n,flatRows:l,rowsById:o}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e.queue((()=>{e._autoResetPageIndex()}))}})},e.getExpandedRowModel=function(){return e=>u((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((t,n,l)=>n.rows.length&&l&&(!0===t||Object.keys(null!=t?t:{}).length)?Z(n,e):n),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getFacetedMinMaxValues=function(){return(e,t)=>u((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{var n,l,o,r;let i=[null!=(n=null==(l=e.flatRows[0])?void 0:l.getValue(t))?n:null,null!=(o=null==(r=e.flatRows[0])?void 0:r.getValue(t))?o:null];for(let n=0;n<e.flatRows.length;n++){var u;const l=null==(u=e.flatRows[n])?void 0:u.getValue(t);l<i[0]?i[0]=l:l>i[1]&&(i[1]=l)}return i}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFacetedRowModel=function(){return(e,t)=>u((()=>[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 r=[...l.map((e=>e.id)).filter((e=>e!==t)),o?"__global__":void 0].filter(Boolean);return Y(n.rows,(e=>{for(let t=0;t<r.length;t++)if(!1===e.columnFilterMap[r[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)=>u((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{let n=new Map;for(let r=0;r<e.flatRows.length;r++){var l;const i=null==(l=e.flatRows[r])?void 0:l.getValue(t);var o;if(n.has(i))n.set(i,(null!=(o=n.get(i))?o:0)+1);else n.set(i,1)}return n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFilteredRowModel=function(){return e=>u((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,l)=>{if(!t.rows.length||(null==n||!n.length)&&!l)return t;const o=[],r=[];(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 i=n.map((e=>e.id)),u=e.getGlobalFilterFn(),a=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let s,g;l&&u&&a.length&&(i.push("__global__"),a.forEach((e=>{var t;r.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.columnFilterMap={},o.length)for(let e=0;e<o.length;e++)s=o[e],n.columnFilterMap[s.id]=s.filterFn(n,s.id,s.resolvedValue);if(r.length){for(let e=0;e<r.length;e++)if(g=r[e],g.filterFn(n,g.id,g.resolvedValue)){n.columnFilterMap.__global__=!0;break}!0!==n.columnFilterMap.__global__&&(n.columnFilterMap.__global__=!1)}}return Y(t.rows,(e=>{for(let t=0;t<i.length;t++)if(!1===e.columnFilterMap[i[t]])return!1;return!0}),e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e.queue((()=>{e._autoResetPageIndex()}))}})},e.getGroupedRowModel=function(){return e=>u((()=>[e.getState().grouping,e.getPreGroupedRowModel()]),((t,n)=>{if(!n.rows.length||!t.length)return n;const l=t.filter((t=>e.getColumn(t))),o=[],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?i(c,(e=>e.subRows)):c,b=e.createRow(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 o;if(c[0])b.valuesCache[t]=null!=(o=c[0].getValue(t))?o:void 0;return b.valuesCache[t]}if(b.groupingValuesCache.hasOwnProperty(t))return b.groupingValuesCache[t];const r=e.getColumn(t),i=r.getColumnAggregationFn();if(i)return b.groupingValuesCache[t]=i((()=>m.map((e=>{let l=e.getValue(t);return!n&&r.aggregateValue&&(l=r.aggregateValue(l)),l}))),(()=>c.map((e=>e.getValue(t))))),b.groupingValuesCache[t];if(r.aggregationFn)throw console.info({column:r}),new Error("")}}),f.forEach((e=>{o.push(e),r[e.id]=e})),b}));return d},a=u(n.rows,0,"");return a.forEach((e=>{o.push(e),r[e.id]=e})),{rows:a,flatRows:o,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=>u((()=>[e.getState().pagination,e.getPrePaginationRowModel()]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:l,pageIndex:o}=t;let{rows:r,flatRows:i,rowsById:u}=n;const a=l*o,s=a+l;return r=r.slice(a,s),e.options.paginateExpandedRows?{rows:r,flatRows:i,rowsById:u}:Z({rows:r,flatRows:i,rowsById:u},e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getSortedRowModel=function(){return e=>u((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const l=e.getState().sorting,o=[],r=l.filter((t=>e.getColumn(t.id).getCanSort())),i={};r.forEach((t=>{const n=e.getColumn(t.id);i[t.id]={sortUndefined:n.sortUndefined,invertSorting:n.invertSorting,sortingFn:n.getSortingFn()}}));const u=e=>{const t=e.slice();return t.sort(((e,t)=>{for(let l=0;l<r.length;l+=1){var n;const o=r[l],u=i[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.queue((()=>{e._autoResetPageIndex()}))}})},e.isFunction=r,e.isRowSelected=T,e.makeStateUpdater=o,e.memo=u,e.noop=function(){},e.orderColumns=E,e.passiveEventSupported=f,e.render=oe,e.renderComponent=le,e.selectRowsFn=k,e.shouldAutoRemoveFilter=A,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
*/function l(e,t){return"function"==typeof e?e(t):e}function o(e,t){return n=>{t.setState((t=>({...t,[e]:l(n,t[e])})))}}function r(e){return e instanceof Function}function i(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 u(e,t,n){let l,o=[];return()=>{let r;n.key&&n.debug&&(r=Date.now());const i=e();if(!(i.length!==o.length||i.some(((e,t)=>o[t]!==e))))return l;let u;if(o=i,n.key&&n.debug&&(u=Date.now()),l=t(...i),null==n||null==n.onChange||n.onChange(l),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-r))/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}}const a={createInstance:e=>({getDefaultColumn:u((()=>[e.options.defaultColumn]),(t=>{var n;return t=null!=(n=t)?n:{},{header:e=>e.header.column.id,footer:e=>e.header.column.id,cell:e=>{var t,n,l;return null!=(t=null==(n=(l=e.getValue()).toString)?void 0:n.call(l))?t:null},...e._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumn?void 0:t.getDefaultColumn())),{}),...t}}),{debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns},key:!1}),getColumnDefs:()=>e.options.columns,createColumn:(t,n,l)=>{var o,r;const i=e.getDefaultColumn();let a,s=null!=(o=null!=(r=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={...i,...t,id:""+s,accessorFn:a,parent:l,depth:n,columnDef:t,columnDefType:t.columnDefType,columns:[],getFlatColumns:u((()=>[!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:u((()=>[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},getAllColumns:u((()=>[e.getColumnDefs()]),(t=>{const n=function(t,l,o){return void 0===o&&(o=0),t.map((t=>{const r=e.createColumn(t,o,l);return r.columns=t.columns?n(t.columns,r,o+1):[],r}))};return n(t)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllFlatColumns:u((()=>[e.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllFlatColumnsById:u((()=>[e.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllLeafColumns:u((()=>[e.getAllColumns(),e._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getColumn:t=>{const n=e.getAllFlatColumnsById()[t];if(!n)throw new Error;return n}})},s={createInstance:e=>({getRowId:(t,n,l)=>{var o;return null!=(o=null==e.options.getRowId?void 0:e.options.getRowId(t,n,l))?o:""+(l?[l.id,n].join("."):n)},createRow:(t,n,l,o,r)=>{let u={id:t,index:l,original:n,depth:o,valuesCache:{},getValue:t=>{if(u.valuesCache.hasOwnProperty(t))return u.valuesCache[t];const n=e.getColumn(t);if(!n.accessorFn)throw new Error;return u.valuesCache[t]=n.accessorFn(u.original,l),u.valuesCache[t]},subRows:null!=r?r:[],getLeafRows:()=>i(u.subRows,(e=>e.subRows))};for(let t=0;t<e._features.length;t++){const n=e._features[t];Object.assign(u,null==n||null==n.createRow?void 0:n.createRow(u,e))}return u},getCoreRowModel:()=>(e._getCoreRowModel||(e._getCoreRowModel=e.options.getCoreRowModel(e)),e._getCoreRowModel()),getRowModel:()=>e.getPaginationRowModel(),getRow:t=>{const n=e.getRowModel().rowsById[t];if(!n)throw new Error;return n}})},g={createRow:(e,t)=>({getAllCells:u((()=>[t.getAllLeafColumns()]),(n=>n.map((n=>t.createCell(e,n,n.id)))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getAllCellsByColumnId:u((()=>[e.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.columnId]=t,e)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>({createCell:(t,n,l)=>{const o={id:t.id+"_"+n.id,rowId:t.id,columnId:l,row:t,column:n,getValue:()=>t.getValue(l),renderCell:()=>n.cell?e.render(n.cell,{instance:e,column:n,row:t,cell:o,getValue:o.getValue}):null};return e._features.forEach((l=>{Object.assign(o,null==l.createCell?void 0:l.createCell(o,n,t,e))}),{}),o},getCell:(t,n)=>{const l=e.getRow(t);if(!l)throw new Error;const o=l.getAllCellsByColumnId()[n];if(!o)throw new Error;return o}})},d={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},c={getDefaultColumn:()=>d,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:o("columnSizing",e),onColumnSizingInfoChange:o("columnSizingInfo",e)}),createColumn:(e,t)=>({getSize:()=>{var n,l,o;const r=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.minSize)?n:d.minSize,null!=(l=null!=r?r:e.size)?l:d.size),null!=(o=e.maxSize)?o:d.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.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(),m(o)&&o.touches&&o.touches.length>1)return;const r=n.getSize(),i=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],u=m(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 r=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),i=Math.max(r/(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*i,0))/100})),{...e,deltaOffset:r,deltaPercentage:i}})),"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=!!f()&&{passive:!1};m(o)||(document.addEventListener("mousemove",s.moveHandler,g),document.addEventListener("mouseup",s.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:u,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,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 p=null;function f(){if("boolean"==typeof p)return p;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 p=e,p}function m(e){return"touchstart"===e.type}const b={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:o("expanded",e),autoResetExpanded:!0,expandSubRows:!0,paginateExpandedRows:!0}),createInstance:e=>{let t=!1,n=!1;return{_autoResetExpanded:()=>{if(t){if(!1!==e.options.autoResetAll&&(!0===e.options.autoResetAll||e.options.autoResetExpanded)){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:()=>!0===e.getState().expanded||!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.getGroupedRowModel(),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 r=!0===l||!(null==l||!l[e.id]);let i={};if(!0===l?Object.keys(t.getRowModel().rowsById).forEach((e=>{i[e]=!0})):i=l,n=null!=(o=n)?o:!r,!r&&n)return{...i,[e.id]:!0};if(r&&!n){const{[e.id]:t,...n}=i;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()}}})},w=(e,t,n)=>{const l=n.toLowerCase();return e.getValue(t).toLowerCase().includes(l)};w.autoRemove=e=>V(e);const C=(e,t,n)=>e.getValue(t).includes(n);C.autoRemove=e=>V(e);const v=(e,t,n)=>e.getValue(t).toLowerCase()===n.toLowerCase();v.autoRemove=e=>V(e);const h=(e,t,n)=>e.getValue(t).includes(n);h.autoRemove=e=>V(e)||!(null!=e&&e.length);const S=(e,t,n)=>!n.some((n=>!e.getValue(t).includes(n)));S.autoRemove=e=>V(e)||!(null!=e&&e.length);const R=(e,t,n)=>n.some((n=>e.getValue(t).includes(n)));R.autoRemove=e=>V(e)||!(null!=e&&e.length);const F=(e,t,n)=>e.getValue(t)===n;F.autoRemove=e=>V(e);const M=(e,t,n)=>e.getValue(t)==n;M.autoRemove=e=>V(e);const I=(e,t,n)=>{let[l,o]=n;const r=e.getValue(t);return r>=l&&r<=o};I.resolveFilterValue=e=>{let[t,n]=e,l="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,r=null===t||Number.isNaN(l)?-1/0:l,i=null===n||Number.isNaN(o)?1/0:o;if(r>i){const e=r;r=i,i=e}return[r,i]},I.autoRemove=e=>V(e)||V(e[0])&&V(e[1]);const y={includesString:w,includesStringSensitive:C,equalsString:v,arrIncludes:h,arrIncludesAll:S,arrIncludesSome:R,equals:F,weakEquals:M,inNumberRange:I};function V(e){return null==e||""===e}const x={getDefaultColumn:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:o("columnFilters",e),onGlobalFilterChange:o("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,t)=>({filterFn:e.filterFn,getAutoFilterFn:()=>{const n=t.getCoreRowModel().flatRows[0],l=null==n?void 0:n.getValue(e.id);return"string"==typeof l?y.includesString:"number"==typeof l?y.inNumberRange:null!==l&&"object"==typeof l?y.equals:Array.isArray(l)?y.arrIncludes:y.weakEquals},getFilterFn:()=>{var n;const l=t.options.filterFns;return r(e.filterFn)?e.filterFn:"auto"===e.filterFn?e.getAutoFilterFn():null!=(n=null==l?void 0:l[e.filterFn])?n:y[e.filterFn]},getCanFilter:()=>{var n,l,o;return(null==(n=e.enableColumnFilter)||n)&&(null==(l=t.options.enableColumnFilters)||l)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},getCanGlobalFilter:()=>{var n,l,o,r;return(null==(n=e.enableGlobalFilter)||n)&&(null==(l=t.options.enableGlobalFilter)||l)&&(null==(o=t.options.enableFilters)||o)&&(null==(r=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||r)&&!!e.accessorFn},getIsFiltered:()=>e.getFilterIndex()>-1,getFilterValue:()=>{var n,l;return null==(n=t.getState().columnFilters)||null==(l=n.find((t=>t.id===e.id)))?void 0:l.value},getFilterIndex:()=>{var n,l;return null!=(n=null==(l=t.getState().columnFilters)?void 0:l.findIndex((t=>t.id===e.id)))?n:-1},setFilterValue:n=>{t.setColumnFilters((t=>{const o=e.getFilterFn(),r=null==t?void 0:t.find((t=>t.id===e.id)),i=l(n,r?r.value:void 0);var u;if(A(o,i,e))return null!=(u=null==t?void 0:t.filter((t=>t.id!==e.id)))?u:[];const a={id:e.id,value:i};var s;return r?null!=(s=null==t?void 0:t.map((t=>t.id===e.id?a:t)))?s:[]:null!=t&&t.length?[...t,a]:[a]}))},_getFacetedRowModel:t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),getFacetedRowModel:()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),_getFacetedUniqueValues:t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),getFacetedUniqueValues:()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),getFacetedMinMaxValues:()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}),createRow:(e,t)=>({columnFilterMap:{},subRowsByFacetId:{}}),createInstance:e=>({getGlobalAutoFilterFn:()=>y.includesString,getGlobalFilterFn:()=>{var t;const{filterFns:n,globalFilterFn:l}=e.options;return r(l)?l:"auto"===l?e.getGlobalAutoFilterFn():null!=(t=null==n?void 0:n[l])?t:y[l]},setColumnFilters:t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=l(t,e))?void 0:o.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(A(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 A(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const P={sum:function(e,t){return t().reduce(((e,t)=>e+("number"==typeof t?t:0)),0)},min:function(e,t){let n;for(const e of t())null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);return n},max:function(e,t){let n;for(const e of t())null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);return n},extent:function(e,t){let n,l;for(const e of t())null!=e&&(void 0===n?e>=e&&(n=l=e):(n>e&&(n=e),l<e&&(l=e)));return[n,l]},mean:function(e){let t=0,n=0;for(let l of e())null!=l&&(l=+l)>=l&&(++t,n+=l);return t?n/t:void 0},median:function(e){const t=e();if(!t.length)return;let n=0,l=0;return t.forEach((e=>{"number"==typeof e&&(n=Math.min(n,e),l=Math.max(l,e))})),(n+l)/2},unique:function(e){return Array.from(new Set(e()).values())},uniqueCount:function(e){return new Set(e()).size},count:function(e){return e().length}};const _={getDefaultColumn:()=>({aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:o("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,r;return null!=(n=null==(l=null!=(o=null==(r=e.enableGrouping)||r)?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()}},getColumnAutoAggregationFn:()=>{const n=t.getCoreRowModel().flatRows[0],l=null==n?void 0:n.getValue(e.id);return"number"==typeof l?P.sum:"[object Date]"===Object.prototype.toString.call(l)?P.extent:P.count},getColumnAggregationFn:()=>{var n;const l=t.options.aggregationFns;if(!e)throw new Error;return r(e.aggregationFn)?e.aggregationFn:"auto"===e.aggregationFn?e.getColumnAutoAggregationFn():null!=(n=null==l?void 0:l[e.aggregationFn])?n:P[e.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.getSortedRowModel(),getGroupedRowModel:()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())}),createRow:(e,t)=>({getIsGrouped:()=>!!e.groupingColumnId,groupingValuesCache:{}}),createCell:(e,t,n,l)=>({getIsGrouped:()=>t.getIsGrouped()&&t.id===n.groupingColumnId,getIsPlaceholder:()=>!e.getIsGrouped()&&t.getIsGrouped(),getIsAggregated:()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&(null==(t=n.subRows)?void 0:t.length)>1},renderAggregatedCell:()=>{var o;const r=null!=(o=t.aggregatedCell)?o:t.cell;return r?l.render(r,{instance:l,column:t,row:n,cell:e,getValue:e.getValue}):null}})};function E(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 G={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:o("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:u((()=>[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 E(o,t,n)}),{key:!1})})},H={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:o("pagination",e),autoResetPageIndex:!0}),createInstance:e=>{let t=!1,n=!1;return{_autoResetPageIndex:()=>{if(t){if(!1!==e.options.autoResetAll&&(!0===e.options.autoResetAll||e.options.autoResetPageIndex)){if(n)return;n=!0,e.queue((()=>{e.resetPageIndex(),n=!1}))}}else e.queue((()=>{t=!0}))},setPagination:t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>l(t,e))),resetPagination:t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},setPageIndex:t=>{e.setPagination((e=>{let n=l(t,e.pageIndex);const o=e.pageCount&&e.pageCount>0?e.pageCount-1:Number.MAX_SAFE_INTEGER;return n=Math.min(Math.max(0,n),o),{...e,pageIndex:n}}))},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:t=>{e.setPagination((e=>{const n=Math.max(1,l(t,e.pageSize)),o=e.pageSize*e.pageIndex,r=Math.floor(o/n);return{...e,pageIndex:r,pageSize:n}}))},setPageCount:t=>e.setPagination((e=>{var n;let o=l(t,null!=(n=e.pageCount)?n:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...e,pageCount:o}})),getPageOptions:u((()=>[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:o("columnPinning",e)}),createColumn:(e,t)=>({pin:n=>{const l=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,r,i,u,a;return"right"===n?{left:(null!=(r=null==e?void 0:e.left)?r:[]).filter((e=>!(null!=l&&l.includes(e)))),right:[...(null!=(i=null==e?void 0:e.right)?i:[]).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.enablePinning)||n)&&(null==(l=t.options.enablePinning)||l)})),getIsPinned:()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:l,right:o}=t.getState().columnPinning,r=n.some((e=>null==l?void 0:l.includes(e))),i=n.some((e=>null==o?void 0:o.includes(e)));return r?"left":!!i&&"right"},getPinnedIndex:()=>{var n,l,o;const r=e.getIsPinned();return r?null!=(n=null==(l=t.getState().columnPinning)||null==(o=l[r])?void 0:o.indexOf(e.id))?n:-1:0}}),createRow:(e,t)=>({getCenterVisibleCells:u((()=>[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.columnId)))}),{key:"row.getCenterVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getLeftVisibleCells:u((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.columnId===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:u((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.columnId===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:()=>{const{left:t,right:n}=e.getState().columnPinning;return Boolean((null==t?void 0:t.length)||(null==n?void 0:n.length))},getLeftLeafColumns:u((()=>[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:u((()=>[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:u((()=>[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}})})},L={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:o("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=>{void 0!==t||e.getIsAllPageRowsSelected();const l={...n};return e.getRowModel().rows.forEach((n=>{O(l,n.id,t,e)})),l})),getPreSelectedRowModel:()=>e.getCoreRowModel(),getSelectedRowModel:u((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?k(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredSelectedRowModel:u((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?k(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getGroupedSelectedRowModel:u((()=>[e.getState().rowSelection,e.getGroupedRowModel()]),((t,n)=>Object.keys(t).length?k(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()&&!(null==t||!t.length)},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 r={...o};return O(r,e.id,n,t),r}))},getIsSelected:()=>{const{rowSelection:n}=t.getState();return!0===T(e,n)},getIsSomeSelected:()=>{const{rowSelection:n}=t.getState();return"some"===T(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)}}})},O=(e,t,n,l)=>{var o;const r=l.getRow(t);r.getIsGrouped(),n?e[t]=!0:delete e[t],null!=(o=r.subRows)&&o.length&&r.getCanSelectSubRows()&&r.subRows.forEach((t=>O(e,t.id,n,l)))};function k(e,t){const n=e.getState().rowSelection,l=[],o={},r=function(e,t){return void 0===t&&(t=0),e.map((e=>{var i;const u=!0===T(e,n);if(u&&(l.push(e),o[e.id]=e),null!=(i=e.subRows)&&i.length&&(e={...e,subRows:r(e.subRows,t+1)}),u)return e})).filter(Boolean)};return{rows:r(t.rows),flatRows:l,rowsById:o}}function T(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||(T(e,t)?l=!0:n=!1)})),!!n||!!l&&"some"}return!1}const D=/([0-9]+)/gm,B={alphanumeric:function(e,t,n){return j(N(e.getValue(n)).toLowerCase(),N(t.getValue(n)).toLowerCase())},alphanumericCaseSensitive:function(e,t,n){return j(N(e.getValue(n)),N(t.getValue(n)))},text:function(e,t,n){return q(N(e.getValue(n)).toLowerCase(),N(t.getValue(n)).toLowerCase())},textCaseSensitive:function(e,t,n){return q(N(e.getValue(n)),N(t.getValue(n)))},datetime:function(e,t,n){return q(e.getValue(n).getTime(),t.getValue(n).getTime())},basic:function(e,t,n){return q(e.getValue(n),t.getValue(n))}};function j(e,t){const n=e.split(D).filter(Boolean),l=t.split(D).filter(Boolean);for(;n.length&&l.length;){const e=n.shift(),t=l.shift(),o=parseInt(e,10),r=parseInt(t,10),i=[o,r].sort();if(isNaN(i[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(i[1]))return isNaN(o)?-1:1;if(o>r)return 1;if(r>o)return-1}}return n.length-l.length}function q(e,t){return e===t?0:e>t?1:-1}function N(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}const U={getInitialState:e=>({sorting:[],...e}),getDefaultColumn:()=>({sortingFn:"auto"}),getDefaultOptions:e=>({onSortingChange:o("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>({getAutoSortingFn:()=>{const n=t.getFilteredRowModel().flatRows.slice(100);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 B.datetime;if("string"==typeof n&&(l=!0,n.split(D).length>1))return B.alphanumeric}return l?B.text:B.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 l=t.options.sortingFns;if(!e)throw new Error;return r(e.sortingFn)?e.sortingFn:"auto"===e.sortingFn?e.getAutoSortingFn():null!=(n=null==l?void 0:l[e.sortingFn])?n:B[e.sortingFn]},toggleSorting:(n,l)=>{t.setSorting((o=>{var r,i,u,a;const s=null==o?void 0:o.find((t=>t.id===e.id)),g=null==o?void 0:o.findIndex((t=>t.id===e.id)),d=null!=n;let c,p=[];c=e.getCanMultiSort()&&l?s?"toggle":"add":null!=o&&o.length&&g!==o.length-1?"replace":s?"toggle":"replace";const f=null!=(r=null!=(i=e.sortDescFirst)?i:t.options.sortDescFirst)?r:"desc"===e.getAutoSortDir();if("toggle"!==c||null!=(u=t.options.enableSortingRemoval)&&!u||d||l&&null!=(a=t.options.enableMultiRemove)&&!a||(null!=s&&s.desc?f:!f)||(c="remove"),"replace"===c)p=[{id:e.id,desc:d?n:!!f}];else if("add"===c&&null!=o&&o.length){var m;p=[...o,{id:e.id,desc:d?n:!!f}],p.splice(0,p.length-(null!=(m=t.options.maxMultiSortColCount)?m:Number.MAX_SAFE_INTEGER))}else"toggle"===c&&null!=o&&o.length?p=o.map((t=>t.id===e.id?{...t,desc:d?n:!(null!=s&&s.desc)}:t)):"remove"===c&&null!=o&&o.length&&(p=o.filter((t=>t.id!==e.id)));return p}))},getCanSort:()=>{var n,l;return(null==(n=e.enableSorting)||n)&&(null==(l=t.options.enableSorting)||l)&&!!e.accessorFn},getCanMultiSort:()=>{var n,l;return null!=(n=null!=(l=e.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.getFilteredRowModel(),getSortedRowModel:()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())})},$={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:o("columnVisibility",e)}),getDefaultColumn:()=>({defaultIsVisible:!0}),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.enableHiding)||n)&&(null==(l=t.options.enableHiding)||l)},getToggleVisibilityHandler:()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}),createRow:(e,t)=>({_getAllVisibleCells:u((()=>[e.getAllCells().filter((e=>e.column.getIsVisible())).map((e=>e.id)).join("_")]),(t=>e.getAllCells().filter((e=>e.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:u((()=>[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)=>u((()=>[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={createInstance:e=>({createHeader:(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.header?e.render(t.header,{instance:e,header:o,column:t}):null,renderFooter:()=>t.footer?e.render(t.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},getHeaderGroups:u((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>{const r=n.filter((e=>null==l?void 0:l.includes(e.id))),i=n.filter((e=>null==o?void 0:o.includes(e.id)));return K(t,[...r,...n.filter((e=>!(null!=l&&l.includes(e.id)||null!=o&&o.includes(e.id)))),...i],e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterHeaderGroups:u((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>K(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:u((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,l)=>K(t,n=n.filter((e=>null==l?void 0:l.includes(e.id))),e,"left")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightHeaderGroups:u((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,l)=>K(t,n=n.filter((e=>null==l?void 0:l.includes(e.id))),e,"right")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFooterGroups:u((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFooterGroups:u((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFooterGroups:u((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFooterGroups:u((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFlatHeaders:u((()=>[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:u((()=>[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:u((()=>[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:u((()=>[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:u((()=>[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:u((()=>[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:u((()=>[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:u((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var l,o,r,i,u,a;return[...null!=(l=null==(o=e[0])?void 0:o.headers)?l:[],...null!=(r=null==(i=t[0])?void 0:i.headers)?r:[],...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}}),getHeader:t=>{const n=[...e.getFlatHeaders(),...e.getCenterFlatHeaders(),...e.getLeftFlatHeaders(),...e.getRightFlatHeaders()].find((e=>e.id===t));if(!n)throw new Error;return n}})};function K(e,t,n,l){var o,r;let i=0;const u=function(e,t){void 0===t&&(t=1),i=Math.max(i,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&u(e.columns,t+1)}),0)};u(e);let a=[];const s=(e,t)=>{const o={depth:t,id:[l,""+t].filter(Boolean).join("_"),headers:[]},r=[];e.forEach((e=>{const i=[...r].reverse()[0];let u,a=!1;if(e.column.depth===o.depth&&e.column.parent?u=e.column.parent:(u=e.column,a=!0),(null==i?void 0:i.column)===u)i.subHeaders.push(e);else{const o=n.createHeader(u,{id:[l,t,u.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:a,placeholderId:a?""+r.filter((e=>e.column===u)).length:void 0,depth:t,index:r.length});o.subHeaders.push(e),r.push(o)}o.headers.push(e),e.headerGroup=o})),a.push(o),t>0&&s(r,t-1)},g=t.map(((e,t)=>n.createHeader(e,{depth:i,index:t})));s(g,i-1),a.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,l=[0];e.subHeaders&&e.subHeaders.length?(l=[],d(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>0?t:void 0,e.rowSpan=n>0?n:void 0,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(r=a[0])?void 0:r.headers)?o:[]),a}function J(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let n={_features:[a,s,g,X,$,G,z,x,U,_,b,H,L,c]};const o=n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))),{});let r={...null!=(t=e.initialState)?t:{}};n._features.forEach((e=>{var t;r=null!=(t=null==e.getInitialState?void 0:e.getInitialState(r))?t:r}));const i=[];let u=!1;const d={...n,options:{...o,...e},initialState:r,queue:e=>{i.push(e),u||(u=!0,Promise.resolve().then((()=>{for(;i.length;)i.shift()();u=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{const t=l(e,n.options);n.options=(e=>n.options.mergeOptions?n.options.mergeOptions(o,e):{...o,...e})(t)},render:(e,t)=>"function"==typeof n.options.render?n.options.render(e,t):"function"==typeof e?e(t):e,getState:()=>n.options.state,setState:e=>{null==n.options.onStateChange||n.options.onStateChange(e)}};return n=Object.assign(n,d),n._features.forEach((e=>Object.assign(n,null==e.createInstance?void 0:e.createInstance(n)))),n}function Q(e){return()=>W(void 0,void 0,e)}function W(e,t,n){const l={generics:void 0,options:null!=n?n:{render:(()=>{throw new Error("")})()},setGenerics:()=>l,setRowType:()=>l,setTableMetaType:()=>l,setColumnMetaType:()=>l,setOptions:l=>W(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")}};return l}function Y(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){const l=[],o={};let r,i;const u=function(e,l){void 0===l&&(l=0);const a=[];for(let g=0;g<e.length;g++){var s;if(r=e[g],null!=(s=r.subRows)&&s.length){if(i=n.createRow(r.id,r.original,r.index,r.depth),i.columnFilterMap=r.columnFilterMap,i.subRows=u(r.subRows,l+1),!i.subRows.length)continue;r=i}t(r)&&(a.push(r),o[r.id]=r,o[g]=r)}return a};return{rows:u(e),flatRows:l,rowsById:o}}(e,t,n):function(e,t,n){const l=[],o={};let r,i,u;const a=function(e,s){void 0===s&&(s=0),r=[];for(let d=0;d<e.length;d++){i=e[d];var g;if(t(i))null!=(g=i.subRows)&&g.length&&(u=n.createRow(i.id,i.original,i.index,i.depth),u.subRows=a(i.subRows,s+1),i=u),r.push(i),l.push(i),o[i.id]=i}return r};return{rows:a(e),flatRows:l,rowsById:o}}(e,t,n)}function Z(e,t){const n=[],l=e=>{var o;n.push(e),t.options.expandSubRows&&null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(l)};return e.rows.forEach(l),{rows:n,flatRows:e.flatRows,rowsById:e.rowsById}}function ee(e){let n;return{c(){n=t.text(e[0])},m(e,l){t.insert(e,n,l)},p(e,[l]){1&l&&t.set_data(n,e[0])},i:t.noop,o:t.noop,d(e){e&&t.detach(n)}}}function te(e,t,n){let{content:l}=t;return e.$$set=e=>{"content"in e&&n(0,l=e.content)},[l]}class ne extends t.SvelteComponent{constructor(e){super(),t.init(this,e,te,ee,t.safe_not_equal,{content:0})}}const le="undefined"==typeof window?function(e,n){return t.create_ssr_component(((l,o,r,i)=>""+t.validate_component(e,"Comp").$$render(l,n,{},{})))}:function(e,n){return class extends t.SvelteComponent{constructor(l){super(),t.init(this,l,null,(l=>function(e,n,l){let o,r;return o=new n({props:l,$$inline:!0}),{c(){t.create_component(o.$$.fragment)},m(e,n){t.mount_component(o,e,n),r=!0},p:t.noop,i(e){r||(t.transition_in(o.$$.fragment,e),r=!0)},o(e){t.transition_out(o.$$.fragment,e),r=!1},d(e){t.destroy_component(o,e)}}}(0,e,n)),t.safe_not_equal,{},void 0)}}};function oe(e,t){if(!e)return null;if(e instanceof Function){return e(t)}return le(ne,{content:e})}const re=Q({render:oe});e.ColumnSizing=c,e.Expanding=b,e.Filters=x,e.Grouping=_,e.Headers=X,e.Ordering=G,e.Pagination=H,e.Pinning=z,e.RowSelection=L,e.Sorting=U,e.Visibility=$,e.buildHeaderGroups=K,e.createTable=re,e.createTableFactory=Q,e.createTableInstance=function(e,t){let l;l="subscribe"in t?t:n.readable(t);let o={...e.options,state:{},onStateChange:()=>{},render:oe,...n.get(l)},r=J(o),i=n.writable(r.initialState),u=n.derived([i,l],(e=>e));const a=n.readable(r,(function(e){const t=u.subscribe((t=>{let[n,l]=t;r.setOptions((e=>({...e,...l,state:{...n,...l.state},onStateChange:e=>{e instanceof Function?i.update(e):i.set(e),null==o.onStateChange||o.onStateChange(e)}}))),e(r)}));return function(){t()}}));return a},e.defaultColumnSizing=d,e.expandRows=Z,e.flattenBy=i,e.functionalUpdate=l,e.getCoreRowModel=function(){return e=>u((()=>[e.options.data]),(t=>{const n=[],l=[],o={},r=e.getAllLeafColumns(),i=function(t,n,u,a,s){void 0===u&&(u=0);const g=e.getRowId(t,n,s),d={};for(let e=0;e<r.length;e++){const l=r[e];l&&l.accessorFn&&(d[l.id]=l.accessorFn(t,n))}const c=e.createRow(g,t,n,u);if(a.push(c),l.push(c),o[g]=c,e.options.getSubRows){const l=e.options.getSubRows(t,n);if(null!=l&&l.length){c.originalSubRows=l;const e=[];for(let t=0;t<c.originalSubRows.length;t++)i(c.originalSubRows[t],t,u+1,e,c);c.subRows=e}}};for(let e=0;e<t.length;e++)i(t[e],e,0,n);return{rows:n,flatRows:l,rowsById:o}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.getExpandedRowModel=function(){return e=>u((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((t,n,l)=>n.rows.length&&l&&(!0===t||Object.keys(null!=t?t:{}).length)?Z(n,e):n),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getFacetedMinMaxValues=function(){return(e,t)=>u((()=>[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 r;const l=null==(r=e.flatRows[n])?void 0:r.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)=>u((()=>[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 r=[...l.map((e=>e.id)).filter((e=>e!==t)),o?"__global__":void 0].filter(Boolean);return Y(n.rows,(e=>{for(let t=0;t<r.length;t++)if(!1===e.columnFilterMap[r[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)=>u((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{let n=new Map;for(let r=0;r<e.flatRows.length;r++){var l;const i=null==(l=e.flatRows[r])?void 0:l.getValue(t);var o;if(n.has(i))n.set(i,(null!=(o=n.get(i))?o:0)+1);else n.set(i,1)}return n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFilteredRowModel=function(){return e=>u((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,l)=>{if(!t.rows.length||(null==n||!n.length)&&!l)return t;const o=[],r=[];(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 i=n.map((e=>e.id)),u=e.getGlobalFilterFn(),a=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let s,g;l&&u&&a.length&&(i.push("__global__"),a.forEach((e=>{var t;r.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.columnFilterMap={},o.length)for(let e=0;e<o.length;e++)s=o[e],n.columnFilterMap[s.id]=s.filterFn(n,s.id,s.resolvedValue);if(r.length){for(let e=0;e<r.length;e++)if(g=r[e],g.filterFn(n,g.id,g.resolvedValue)){n.columnFilterMap.__global__=!0;break}!0!==n.columnFilterMap.__global__&&(n.columnFilterMap.__global__=!1)}}return Y(t.rows,(e=>{for(let t=0;t<i.length;t++)if(!1===e.columnFilterMap[i[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=>u((()=>[e.getState().grouping,e.getPreGroupedRowModel()]),((t,n)=>{if(!n.rows.length||!t.length)return n;const l=t.filter((t=>e.getColumn(t))),o=[],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?i(c,(e=>e.subRows)):c,b=e.createRow(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 o;if(c[0])b.valuesCache[t]=null!=(o=c[0].getValue(t))?o:void 0;return b.valuesCache[t]}if(b.groupingValuesCache.hasOwnProperty(t))return b.groupingValuesCache[t];const r=e.getColumn(t),i=r.getColumnAggregationFn();if(i)return b.groupingValuesCache[t]=i((()=>m.map((e=>{let l=e.getValue(t);return!n&&r.aggregateValue&&(l=r.aggregateValue(l)),l}))),(()=>c.map((e=>e.getValue(t))))),b.groupingValuesCache[t];if(r.aggregationFn)throw console.info({column:r}),new Error("")}}),f.forEach((e=>{o.push(e),r[e.id]=e})),b}));return d},a=u(n.rows,0,"");return a.forEach((e=>{o.push(e),r[e.id]=e})),{rows:a,flatRows:o,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=>u((()=>[e.getState().pagination,e.getPrePaginationRowModel()]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:l,pageIndex:o}=t;let{rows:r,flatRows:i,rowsById:u}=n;const a=l*o,s=a+l;return r=r.slice(a,s),e.options.paginateExpandedRows?{rows:r,flatRows:i,rowsById:u}:Z({rows:r,flatRows:i,rowsById:u},e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getSortedRowModel=function(){return e=>u((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const l=e.getState().sorting,o=[],r=l.filter((t=>e.getColumn(t.id).getCanSort())),i={};r.forEach((t=>{const n=e.getColumn(t.id);i[t.id]={sortUndefined:n.sortUndefined,invertSorting:n.invertSorting,sortingFn:n.getSortingFn()}}));const u=e=>{const t=e.slice();return t.sort(((e,t)=>{for(let l=0;l<r.length;l+=1){var n;const o=r[l],u=i[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=r,e.isRowSelected=T,e.makeStateUpdater=o,e.memo=u,e.noop=function(){},e.orderColumns=E,e.passiveEventSupported=f,e.render=oe,e.renderComponent=le,e.selectRowsFn=k,e.shouldAutoRemoveFilter=A,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.production.js.map |
{ | ||
"name": "@tanstack/svelte-table", | ||
"author": "Tanner Linsley", | ||
"version": "8.0.0-alpha.70", | ||
"version": "8.0.0-alpha.71", | ||
"description": "Composables for building lightweight, fast and extendable datagrids for Vue", | ||
@@ -37,3 +37,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@tanstack/table-core": "8.0.0-alpha.70" | ||
"@tanstack/table-core": "8.0.0-alpha.71" | ||
}, | ||
@@ -40,0 +40,0 @@ "peerDependencies": { |
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 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
1703027
11486
+ Added@tanstack/table-core@8.0.0-alpha.71(transitive)
- Removed@tanstack/table-core@8.0.0-alpha.70(transitive)