@bigcapitalhq/blueprintjs-react-table 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -202,6 +202,87 @@ TanStack's `table.getSelectedRowModel()`. Selecting a subset of rows with a
202
202
  predicate is a regular table option: `enableRowSelection: (row) => …` disables
203
203
  the checkbox of non-selectable rows.
204
204
 
205
+ ### Cell clicks and attributes
206
+
207
+ Use `getCellProps` to set HTML attributes on the data cell. This example opens
208
+ account details from any cell, styles every cell of an inactive account, and
209
+ places the account’s test ID on its account-number cell.
210
+
211
+ ```tsx
212
+ <BP_Table
213
+ data={accounts}
214
+ columns={columns}
215
+ getCellProps={({ row, column }) => ({
216
+ className: row.original.active ? undefined : 'account-inactive',
217
+ 'data-testid': column.id === 'id' ? `account-row-${row.original.id}` : undefined,
218
+ onClick: () => openAccountDetails(row.original),
219
+ })}
220
+ />
221
+ ```
222
+
223
+ Cell classes are merged with the column’s `meta.bodyCellClassName`. The table
224
+ controls each cell’s position and dimensions.
225
+
226
+ ### Expandable rows
227
+
228
+ Pass `renderRowDetail` to show additional content beneath a row. The disclosure
229
+ button appears in the first visible data column and supports Enter and Space.
230
+ `rowDetailHeight` sets the panel height in pixels (default 100). Longer content
231
+ scrolls inside the panel. With frozen columns, the panel spans the scrollable
232
+ columns, or the frozen columns if all columns are frozen. The example below
233
+ uses a person record with an optional `bio` field.
234
+
235
+ ```tsx
236
+ <BP_Table
237
+ data={data}
238
+ columns={columns}
239
+ getRowId={(person) => String(person.id)}
240
+ getRowCanExpand={(row) => Boolean(row.original.bio)}
241
+ renderRowDetail={(row) => <p>{row.original.bio}</p>}
242
+ initialExpandedRows={{ '1': true }}
243
+ rowDetailHeight={80}
244
+ rowExpanderIconProps={{ size: 16 }}
245
+ rowExpanderButtonProps={(row) => ({
246
+ title: `${row.getIsExpanded() ? 'Hide' : 'Read'} biography for ${row.original.name}`,
247
+ })}
248
+ />
249
+ ```
250
+
251
+ The button shows `caret-right` when collapsed and `caret-down` when expanded.
252
+ `rowExpanderIconProps` accepts Blueprint `Icon` props, including `icon`,
253
+ `size`, and `color`. `rowExpanderButtonProps` accepts native button props.
254
+ Both accept a props object or a function of the TanStack row. A custom
255
+ `onClick` runs before the row toggles. Call `event.preventDefault()` to
256
+ cancel the toggle.
257
+
258
+ For a tree with the same columns at every level, supply
259
+ `getSubRows={(record) => record.children}`. Parents get a disclosure button,
260
+ and expanded children appear in the row model. Use stable row IDs for both
261
+ trees and detail panels.
262
+
263
+ Expansion is uncontrolled by default. Pass `initialExpandedRows` to choose
264
+ which rows start open. Pass `expandedRows` to control expansion from a parent.
265
+
266
+ ```tsx
267
+ const [expandedRows, setExpandedRows] = useState<BP_ExpandedRowsState>({});
268
+
269
+ <BP_Table
270
+ data={data}
271
+ columns={columns}
272
+ getRowId={(person) => String(person.id)}
273
+ renderRowDetail={(row) => <p>{row.original.bio}</p>}
274
+ expandedRows={expandedRows}
275
+ onExpandedRowsChange={setExpandedRows}
276
+ />;
277
+ ```
278
+
279
+ `onExpandedRowsChange` receives the next expansion value in either mode.
280
+ Use a row-ID map to expand specific rows, `{}` to collapse all rows, or
281
+ `true` to expand every eligible row. The standard TanStack `state.expanded`,
282
+ `initialState.expanded`, and `onExpandedChange` options are also supported.
283
+ The dedicated value and initial-value props take precedence over their
284
+ corresponding state options.
285
+
205
286
  Right-click context menus are customized with a renderer that receives the
206
287
  Blueprint-style `BP_MenuContext` (the equivalent of Blueprint's `MenuContext`)
207
288
  and returns the menu to show:
@@ -319,6 +400,7 @@ navigation are owned by the caller.
319
400
  | Prop | Type | Default | Description |
320
401
  | --- | --- | --- | --- |
321
402
  | `data` / `columns` | TanStack `TableOptions` | — | Table data and column definitions (full TanStack option set is forwarded). |
403
+ | `getCellProps` | `(cell) => props` | — | HTML attributes and event handlers for each rendered data cell. |
322
404
  | `rowHeight` | `number` | `20` | Height of each body row, in pixels. |
323
405
  | `rowHeaderWidth` | `number` | `30` | Width of the frozen row-header column, in pixels. |
324
406
  | `enableRowHeader` | `boolean` | `true` | Render the row-number column; when `false`, the row headers and the corner menu are hidden (the checkbox column and frozen columns are unaffected). |
@@ -393,6 +475,10 @@ Things worth knowing:
393
475
  | Story | What it demos |
394
476
  | --- | --- |
395
477
  | `Basic` | Minimal table with column reordering. |
478
+ | `AccountCellClicks` | Open account details from any data cell and style inactive rows. |
479
+ | `RowDetails` | Expand a person to read their biography. |
480
+ | `ControlledRowDetails` | Control row details with the carets and expand-all or collapse-all buttons. |
481
+ | `ExpandingSubRows` | Expand a parent to see its child rows. |
396
482
  | `ColumnGroups` | Nested column definitions on a second header row. |
397
483
  | `Loading` | Skeleton placeholders in cells, column headers, and row headers. |
398
484
  | `GhostCells` | Empty ghost cells fill leftover space when the table is smaller than its viewport. |
@@ -1,6 +1,6 @@
1
- "use strict";var It=Object.defineProperty;var Mt=(e,t,n)=>t in e?It(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var re=(e,t,n)=>Mt(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),f=require("react"),Y=require("@tanstack/react-table"),Ot=require("@tanstack/react-virtual"),k=require("@blueprintjs/core"),jt=require("@blueprintjs/icons");var ge=(e=>(e.CELLS="cells",e.COLUMN_HEADERS="column-header",e.ROW_HEADERS="row-header",e))(ge||{});function ve(e,t){return e.indexOf(t)!==-1}const Ne=Y.tableFeatures({columnSizingFeature:Y.columnSizingFeature,columnResizingFeature:Y.columnResizingFeature,columnOrderingFeature:Y.columnOrderingFeature,columnVisibilityFeature:Y.columnVisibilityFeature,columnPinningFeature:Y.columnPinningFeature,rowPinningFeature:Y.rowPinningFeature,rowSelectionFeature:Y.rowSelectionFeature,cellSelectionFeature:Y.cellSelectionFeature,rowSortingFeature:Y.rowSortingFeature,sortedRowModel:Y.createSortedRowModel(),sortFns:Y.sortFns}),Bt=e=>Y.useTable({...e,initialState:e.initialState??{},features:e.features??Ne,columnResizeMode:e.columnResizeMode??"onEnd"});function yt({table:e,numFrozenColumns:t,numFrozenRows:n}){const s=e.getVisibleLeafColumns(),o=e.getRowModel().rows;f.useLayoutEffect(()=>{var c;if(e.setColumnPinning==null)return;const l=s.slice(0,Math.max(0,t)).map(u=>u.id),r=((c=e.state.columnPinning)==null?void 0:c.start)??[];be(r,l)||e.setColumnPinning(u=>({...u,start:l}))},[t,e,s]),f.useLayoutEffect(()=>{var c;if(e.setRowPinning==null)return;const l=o.slice(0,Math.max(0,n)).map(u=>u.id),r=((c=e.state.rowPinning)==null?void 0:c.top)??[];be(r,l)||e.setRowPinning(u=>({...u,top:l}))},[n,o,e])}function be(e,t){return e.length===t.length&&e.every((n,s)=>n===t[s])}const qe=5;function Dt({table:e,columnHeaderHeight:t,frozenRowCount:n,frozenRowsHeight:s,getRowHeight:o,scrollContainerRef:l,enableRowVirtualization:r,overscanRowCount:c}){const u=Math.max(0,e.getRowModel().rows.length-n),a=Ot.useVirtualizer({count:u,getScrollElement:()=>l.current,estimateSize:m=>o(n+m),overscan:c,scrollMargin:t+s,enabled:r});return f.useLayoutEffect(()=>{a.measure()},[n,o,a]),r?a:void 0}function bt({value:e,initialValue:t,finalValue:n,onChange:s=()=>{}}){const[o,l]=f.useState(t!==void 0?t:n),r=c=>{l(c),s==null||s(c)};return e!==void 0?[e,s,!0]:[o,r,!1]}const Pt=20,$t=30,Ke=30,Ft=30,Pe=150,Ut=50,zt=200;function Ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ze={exports:{}};/*!
1
+ "use strict";var Be=Object.defineProperty;var De=(t,e,n)=>e in t?Be(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ht=(t,e,n)=>De(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),K=require("@tanstack/react-table"),$e=require("@tanstack/react-virtual"),W=require("@blueprintjs/core"),Fe=require("@blueprintjs/icons");var Ct=(t=>(t.CELLS="cells",t.COLUMN_HEADERS="column-header",t.ROW_HEADERS="row-header",t))(Ct||{});function At(t,e){return t.indexOf(e)!==-1}const Nt=K.tableFeatures({columnSizingFeature:K.columnSizingFeature,columnResizingFeature:K.columnResizingFeature,columnOrderingFeature:K.columnOrderingFeature,columnVisibilityFeature:K.columnVisibilityFeature,columnPinningFeature:K.columnPinningFeature,rowExpandingFeature:K.rowExpandingFeature,rowPinningFeature:K.rowPinningFeature,rowSelectionFeature:K.rowSelectionFeature,cellSelectionFeature:K.cellSelectionFeature,rowSortingFeature:K.rowSortingFeature,expandedRowModel:K.createExpandedRowModel(),sortedRowModel:K.createSortedRowModel(),sortFns:K.sortFns}),be=t=>K.useTable({...t,initialState:t.initialState??{},features:t.features??Nt,columnResizeMode:t.columnResizeMode??"onEnd"});function Ue({table:t,numFrozenColumns:e,numFrozenRows:n}){const o=t.getVisibleLeafColumns(),l=t.getRowModel().rows;d.useLayoutEffect(()=>{var c;if(t.setColumnPinning==null)return;const s=o.slice(0,Math.max(0,e)).map(i=>i.id),r=((c=t.state.columnPinning)==null?void 0:c.start)??[];Ut(r,s)||t.setColumnPinning(i=>({...i,start:s}))},[e,t,o]),d.useLayoutEffect(()=>{var c;if(t.setRowPinning==null)return;const s=l.slice(0,Math.max(0,n)).map(i=>i.id),r=((c=t.state.rowPinning)==null?void 0:c.top)??[];Ut(r,s)||t.setRowPinning(i=>({...i,top:s}))},[n,l,t])}function Ut(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}const te=5;function He({table:t,columnHeaderHeight:e,frozenRowCount:n,frozenRowsHeight:o,getRowHeight:l,scrollContainerRef:s,enableRowVirtualization:r,overscanRowCount:c}){const i=Math.max(0,t.getRowModel().rows.length-n),u=$e.useVirtualizer({count:i,getScrollElement:()=>s.current,estimateSize:h=>l(n+h),overscan:c,scrollMargin:e+o,enabled:r});return d.useLayoutEffect(()=>{u.measure()},[n,l,u]),r?u:void 0}function Ht({value:t,initialValue:e,finalValue:n,onChange:o}){const[l,s]=d.useState(e!==void 0?e:n),r=d.useRef(l);return[t!==void 0?t:l,i=>{const u=t!==void 0?t:r.current,h=typeof i=="function"?i(u):i;t===void 0&&(r.current=h,s(()=>h)),o==null||o(h)},t!==void 0]}const ke=20,ze=30,ee=30,Ge=30,kt=150,Pe=50,We=200,jt=d.createContext(void 0);function Ve(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ne={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var l="",r=0;r<arguments.length;r++){var c=arguments[r];c&&(l=o(l,s(c)))}return l}function s(l){if(typeof l=="string"||typeof l=="number")return l;if(typeof l!="object")return"";if(Array.isArray(l))return n.apply(null,l);if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]"))return l.toString();var r="";for(var c in l)t.call(l,c)&&l[c]&&(r=o(r,c));return r}function o(l,r){return r?l?l+" "+r:l+r:l}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ze);var kt=Ze.exports;const P=Ht(kt),h=k.Classes.getClassNamespace(),Gt=`${h}-table-body-cells`,Wt=`${h}-table-body-virtual-client`,$e=`${h}-table-bottom-container`,Je=`${h}-table-cell`,Vt=`${h}-table-cell-client`,Yt=`${h}-table-cell-ghost`,et=`${h}-table-cell-ledger-even`,tt=`${h}-table-cell-ledger-odd`,Xt=`${h}-table-column-header-tr`,Qt=`${h}-table-column-headers`,Ie=`${h}-table-column-header-cell`,nt=`${h}-table-column-name`,st=`${h}-table-column-name-text`,qt=`${h}-table-container`,Le=`${h}-table-dragging`,lt=`${h}-table-focus-region`,Kt=`${h}-table-has-reorder-handle`,ce=`${h}-table-header`,Zt=`${h}-table-header-active`,ot=`${h}-table-header-content`,Jt=`${h}-table-horizontal-guide`,Me=`${h}-table-last-in-column`,rt=`${h}-table-last-in-row`,en=`${h}-table-menu`,tn=`${h}-table-no-horizontal-scroll`,nn=`${h}-table-no-vertical-scroll`,ct=`${h}-table-no-wrap-text`,xe=`${h}-table-overlay`,Oe=`${h}-table-overlay-layer`,sn=`${h}-table-pagination-bar`,Fe=`${h}-table-pagination-bar-controls`,_e=`${h}-table-pagination-bar-text`,ln=`${h}-table-pagination-layout`,on=`${h}-table-quadrant`,rn=`${h}-table-quadrant-body-container`,cn=`${h}-table-quadrant-left`,un=`${h}-table-quadrant-main`,an=`${h}-table-quadrant-scroll-container`,dn=`${h}-table-quadrant-stack`,fn=`${h}-table-quadrant-top`,mn=`${h}-table-quadrant-top-left`,hn=`${h}-table-region`,En=`${h}-table-reorder-handle`,wn=`${h}-table-reorder-handle-target`,it=`${h}-table-resize-guides`,ut=`${h}-table-resize-handle`,at=`${h}-table-resize-handle-target`,gn=`${h}-table-resize-horizontal`,Ln=`${h}-table-resize-vertical`,Tn=`${h}-table-row-headers`,Ue=`${h}-table-row-headers-cells-container`,dt=`${h}-table-row-name`,ft=`${h}-table-row-name-text`,je=`${h}-table-row-selected`,mt=`${h}-table-row-selection-cell`,ht=`${h}-table-row-selection-checkbox`,Cn=`${h}-table-row-selection-header-cell`,pn=`${h}-table-selection-enabled`,Et=`${h}-table-selection-region`,An=`${h}-table-th-menu`,vn=`${h}-table-th-menu-container`,xn=`${h}-table-th-menu-container-background`,Nn=`${h}-table-th-menu-open`,Sn=`${h}-table-thead`,_n=`${h}-table-top-container`,wt=`${h}-table-truncated-cell`,gt=`${h}-table-truncated-text`,Lt=`${h}-table-vertical-guide`;function Tt(e,t){return typeof t=="number"?`${e}${t}`:t.indexOf(e)===0?t:`${e}${t}`}function Be(e){return Tt(`${h}-table-cell-col-`,e)}function de(e){return Tt(`${h}-table-cell-row-`,e)}var J=(e=>(e.CELLS="cells",e.FULL_ROWS="full-rows",e.FULL_COLUMNS="full-columns",e.FULL_TABLE="full-table",e))(J||{}),ye=(e=>(e.CELL="cell",e))(ye||{}),Ct=(e=>(e.UP="up",e.DOWN="down",e.LEFT="left",e.RIGHT="right",e))(Ct||{});class v{static getRegionCardinality(t){return t.cols!=null&&t.rows!=null?"cells":t.cols!=null?"full-columns":t.rows!=null?"full-rows":"full-table"}static cell(t,n,s,o){return{cols:v.normalizeInterval(n,o),rows:v.normalizeInterval(t,s)}}static row(t,n){return{rows:v.normalizeInterval(t,n)}}static column(t,n){return{cols:v.normalizeInterval(t,n)}}static table(){return{}}static copy(t){const n=v.getRegionCardinality(t);return n==="cells"?v.cell(t.rows[0],t.cols[0],t.rows[1],t.cols[1]):n==="full-columns"?v.column(t.cols[0],t.cols[1]):n==="full-rows"?v.row(t.rows[0],t.rows[1]):v.table()}static update(t,n,s){const o=t.slice();return s!=null?o.splice(s,1,n):(o.pop(),o.push(n)),o}static clampRegion(t,n,s){const o=v.copy(t);return t.rows!=null&&(o.rows[0]=v.clamp(t.rows[0],0,n),o.rows[1]=v.clamp(t.rows[1],0,n)),t.cols!=null&&(o.cols[0]=v.clamp(t.cols[0],0,s),o.cols[1]=v.clamp(t.cols[1],0,s)),o}static expandRegion(t,n){const s=v.getRegionCardinality(t),o=v.getRegionCardinality(n);if(o!==s)return n;switch(o){case"full-rows":return v.row(Math.min(t.rows[0],n.rows[0]),Math.max(t.rows[1],n.rows[1]));case"full-columns":return v.column(Math.min(t.cols[0],n.cols[0]),Math.max(t.cols[1],n.cols[1]));case"cells":return v.cell(Math.min(t.rows[0],n.rows[0]),Math.min(t.cols[0],n.cols[0]),Math.max(t.rows[1],n.rows[1]),Math.max(t.cols[1],n.cols[1]));default:return v.table()}}static getRegionFromFocusedRegion(t){return v.cell(t.row,t.col)}static getCellRegionFromRegion(t,n,s){switch(v.getRegionCardinality(t)){case"full-table":return v.cell(0,0,n-1,s-1);case"full-columns":return v.cell(0,t.cols[0],n-1,t.cols[1]);case"full-rows":return v.cell(t.rows[0],0,t.rows[1],s-1);default:return v.cell(t.rows[0],t.cols[0],t.rows[1],t.cols[1])}}static getFocusCellCoordinatesFromRegion(t){switch(v.getRegionCardinality(t)){case"full-table":return{col:0,row:0};case"full-columns":return{col:t.cols[0],row:0};case"full-rows":return{col:0,row:t.rows[0]};default:return{col:t.cols[0],row:t.rows[0]}}}static regionsEqual(t,n){return v.intervalsEqual(t.rows,n.rows)&&v.intervalsEqual(t.cols,n.cols)}static findContainingRegion(t,n){if(t==null)return-1;for(let s=0;s<t.length;s++)if(v.regionContains(t[s],n))return s;return-1}static containsRegion(t,n){return v.overlapsRegion(t,n,!1)}static overlapsRegion(t,n,s=!1){const o=s?v.intervalOverlaps:v.intervalContains;if(t==null||n==null)return!1;for(const l of t)switch(v.getRegionCardinality(l)){case"full-table":return!0;case"full-columns":if(o(l.cols,n.cols))return!0;continue;case"full-rows":if(o(l.rows,n.rows))return!0;continue;case"cells":if(o(l.cols,n.cols)&&o(l.rows,n.rows))return!0;continue}return!1}static enumerateUniqueCells(t,n,s){if(t==null||t.length===0)return[];const o=new Set,l=[];for(const r of t)v.eachCellInRegion(r,n,s,(c,u)=>{const a=`${c}-${u}`;o.has(a)||(o.add(a),l.push({col:u,row:c}))});return l.sort((r,c)=>r.row-c.row||r.col-c.col),l}static joinStyledRegionGroups(t,n){const s=[];return t!=null&&t.length>0&&s.push({className:Et,regions:t}),n!=null&&s.push({className:lt,regions:[v.getRegionFromFocusedRegion(n)]}),s}static regionContains(t,n){return v.overlapsRegion([t],n,!1)}static intervalContains(t,n){return t==null||n==null?!1:t[0]<=n[0]&&n[1]<=t[1]}static intervalOverlaps(t,n){return t==null||n==null?!1:t[0]<=n[1]&&n[0]<=t[1]}static eachCellInRegion(t,n,s,o){switch(v.getRegionCardinality(t)){case"full-table":for(let l=0;l<n;l++)for(let r=0;r<s;r++)o(l,r);break;case"full-columns":for(let l=0;l<n;l++)for(let r=t.cols[0];r<=t.cols[1];r++)o(l,r);break;case"full-rows":for(let l=t.rows[0];l<=t.rows[1];l++)for(let r=0;r<s;r++)o(l,r);break;case"cells":for(let l=t.rows[0];l<=t.rows[1];l++)for(let r=t.cols[0];r<=t.cols[1];r++)o(l,r);break}}static clamp(t,n,s){return Math.max(n,Math.min(s,t))}static intervalsEqual(t,n){return t==null?n==null:n==null?!1:t[0]===n[0]&&t[1]===n[1]}static normalizeInterval(t,n){return(n==null?[t,t]:[t,n]).sort((o,l)=>o-l)}}function pt(e){switch(e){case"up":return{rows:-1,cols:0};case"down":return{rows:1,cols:0};case"left":return{rows:0,cols:-1};case"right":return{rows:0,cols:1}}}function Rn(e,t){switch(t){case"up":return{...e,focusSelectionIndex:0,row:e.row-1};case"down":return{...e,focusSelectionIndex:0,row:e.row+1};case"left":return{...e,col:e.col-1,focusSelectionIndex:0};case"right":return{...e,col:e.col+1,focusSelectionIndex:0}}}function In(e,t,n){if(v.getRegionCardinality(e)==="full-table")return e;const s=v.copy(e);let o=0,l=0;if(n!=null){const c=s.rows!=null&&n.row===s.rows[0],u=s.rows!=null&&n.row===s.rows[1],a=s.cols!=null&&n.col===s.cols[0],m=s.cols!=null&&n.col===s.cols[1];t==="up"?o=c&&!u?1:0:t==="down"?o=u&&!c?0:1:t==="left"?l=a&&!m?1:0:l=m&&!a?0:1}else o=t==="down"?1:0,l=t==="right"?1:0;const r=pt(t);return s.rows!=null&&(s.rows[o]+=r.rows),s.cols!=null&&(s.cols[l]+=r.cols),s}function At(e){return e.getStartVisibleLeafColumns().length}function se(e){return e.getTopRows().length}function ie(e){return e.getStartTotalSize()}function Te(e,t){return t==="start"?e.getStartVisibleLeafColumns():e.getCenterVisibleLeafColumns()}function fe(e,t){return t==="start"?e.getStartTotalSize():e.getCenterTotalSize()}function Mn(e,t,n){return t.getIsPinned()==="start"?t.getStart("start"):ie(e)+t.getStart("center")-n}function Se(e,t){return On(0,se(e),t)}function On(e,t,n){let s=0;for(let o=e;o<t;o++)s+=n(o);return s}function ze(e,t,n){if(n<0)return;let s=0;const o=Te(e,t);let l=o.length-1;for(;s<=l;){const r=s+l>>1,c=o[r],u=c.getStart(t);if(n<u){l=r-1;continue}if(n>=u+c.getSize()){s=r+1;continue}return c.getIndex()}}function He(e,t,n,s,o){const l=se(e),r=e.getRowModel().rows.length,c=t==="top"?0:l,u=t==="top"?l:r;if(n<0||c>=u)return;const a=s(c);let m=c,d=u-1;for(;m<=d;){const E=m+d>>1,T=s(E)-a;if(n<T){d=E-1;continue}if(n>=T+o(E)){m=E+1;continue}return E}}function jn({table:e,scrollContainerRef:t,rowHeaderWidth:n,columnHeaderHeight:s,getRowTop:o,getRowHeight:l},r,c){const u=t.current;if(u==null)return;const a=u.getBoundingClientRect(),m=r-a.left,d=c-a.top,E=ie(e),T=Se(e,l),C=m-n,g=C-E+u.scrollLeft,x=d-s,L=x-T+u.scrollTop,R=C>=0&&C<E?ze(e,"start",C):ze(e,"center",g),p=x>=0&&x<T?He(e,"top",x,o,l):He(e,"center",L,o,l);if(!(R==null||p==null))return{col:R,row:p}}class Bn{constructor({table:t,target:n,selectedRegions:s,numRows:o,numCols:l}){re(this,"target");re(this,"regions");re(this,"selectedRegions");re(this,"numRows");re(this,"numCols");re(this,"targetRow");re(this,"targetCell");var r;this.target=n,this.selectedRegions=s,this.numRows=o,this.numCols=l,this.regions=v.overlapsRegion(s,n)?s:[n],this.targetRow=t.getRowModel().rows[n.rows[0]],this.targetCell=(r=this.targetRow)==null?void 0:r.getVisibleCells()[n.cols[0]]}getTarget(){return this.target}getRegions(){return this.regions}getSelectedRegions(){return this.selectedRegions}getUniqueCells(){return v.enumerateUniqueCells(this.regions,this.numRows,this.numCols)}getTargetRow(){return this.targetRow}getTargetCell(){return this.targetCell}}function yn(e){var a,m;const t=e.getVisibleLeafColumns(),n=e.state.columnPinning;if(n==null||(((a=n.start)==null?void 0:a.length)??0)+(((m=n.end)==null?void 0:m.length)??0)===0)return t;const s=new Map(t.map(d=>[d.id,d])),o=(n.start??[]).map(d=>s.get(d)).filter(d=>d!=null),l=(n.end??[]).map(d=>s.get(d)).filter(d=>d!=null),r=new Set(o.map(d=>d.id)),c=new Set(l.map(d=>d.id)),u=t.filter(d=>!r.has(d.id)&&!c.has(d.id));return[...o,...u,...l]}function Dn(e,t,n){if(e.length===0)return null;const s=Math.max(0,Math.min(t,e.length-1)),o=Math.max(0,Math.min(n,e.length-1));let l=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(let c=s;c<=o;c++){const u=e[c];u<l&&(l=u),u>r&&(r=u)}return[l,r]}function bn(e,t,n){if(e.length===0)return null;let s=0,o=e.length-1,l=-1;for(;s<=o;){const c=s+o>>1;e[c].getDisplayIndex()>=t?(l=c,o=c-1):s=c+1}if(l<0||e[l].getDisplayIndex()>n)return null;s=l,o=e.length-1;let r=l;for(;s<=o;){const c=s+o>>1;e[c].getDisplayIndex()<=n?(r=c,s=c+1):o=c-1}return[l,r]}function Pn(e,t,n,s){const o=e[0]===0&&e[1]===n-1,l=t[0]===0&&t[1]===s-1;return o&&l?v.table():l?v.row(e[0],e[1]):o?v.column(t[0],t[1]):v.cell(e[0],t[0],e[1],t[1])}function ke(e){const t=e.getCellSelectionBounds();if(t.length===0)return[];const n=e.getRowModel().rows,o=yn(e).map(r=>r.getIndex()),l=[];for(const r of t){const c=bn(n,r.minRowIndex,r.maxRowIndex),u=Dn(o,r.minColumnIndex,r.maxColumnIndex);c==null||u==null||l.push(Pn(c,u,n.length,o.length))}return l}function $n(e,t){if(t==null||t.length===0)return[];const n=e.getRowModel().rows,s=e.getVisibleLeafColumns();if(n.length===0||s.length===0)return[];const o=[];for(const l of t){let r,c;switch(v.getRegionCardinality(l)){case J.FULL_TABLE:r=[0,n.length-1],c=[0,s.length-1];break;case J.FULL_COLUMNS:r=[0,n.length-1],c=l.cols;break;case J.FULL_ROWS:r=l.rows,c=[0,s.length-1];break;default:r=l.rows,c=l.cols;break}r[0]<0||r[1]>=n.length||c[0]<0||c[1]>=s.length||o.push({anchorRowId:n[r[0]].id,anchorColumnId:s[c[0]].id,focusRowId:n[r[1]].id,focusColumnId:s[c[1]].id})}return o}function Ge(e){const t=e.getFocusedCell();if(t==null)return;const n=e.getRowModel().rows.indexOf(t.row);if(!(n<0))return{row:n,col:t.column.getIndex()}}function Fn(e,t){const n=e.getRowModel().rows[t.row],s=e.getVisibleLeafColumns()[t.col];if(!(n==null||s==null))return n.getAllCellsByColumnId()[s.id]}function We(e){return JSON.stringify(e.map(t=>({rows:t.rows??null,cols:t.cols??null})))}function Un({table:e,getRowTop:t,getRowHeight:n,scrollContainerRef:s,rowHeaderWidth:o,columnHeaderHeight:l,bodyContextMenuRenderer:r,enableBodyContextMenu:c,enableFocusedCell:u=!1,onFocusedCell:a,onFocusedRegion:m,selectedRegions:d,onSelection:E,selectionModes:T}){const C=d!=null,g=c??r!=null,x=f.useRef(!1),L=f.useRef(void 0),R=f.useCallback(w=>T==null?!0:T.includes(w),[T]),p=e.state.cellSelection,y=e.state.columnPinning,B=e.getRowModel().rows,U=e.getVisibleLeafColumns(),M=f.useMemo(()=>ke(e),[p,y,B,e,U]),A=f.useMemo(()=>u?Ge(e):void 0,[p,u,B,e]),$=f.useMemo(()=>{const w=[];return M.length>0&&w.push({className:Et,regions:M}),A!=null&&w.push({className:lt,regions:[v.cell(A.row,A.col)]}),w},[A,M]);f.useEffect(()=>{if(!C)return;const w=We(d??[]);L.current!==w&&(L.current=w,e.setCellSelection($n(e,d)))},[d,C,e]);const F=f.useRef(null),N=f.useRef(!1);f.useEffect(()=>{const w=We(M);if(F.current!==w){if(F.current=w,!N.current){N.current=!0;return}C&&L.current===w||E==null||E(M)}},[C,E,M]);const I=f.useRef(null);f.useEffect(()=>{if(!u)return;const w=A!=null?`${A.row}-${A.col}`:null;I.current!==w&&(I.current=w,A!=null&&(a==null||a(A),m==null||m({type:ye.CELL,row:A.row,col:A.col,focusSelectionIndex:0})))},[u,A,a,m]);const O=f.useCallback(()=>{var w;u&&((w=s.current)==null||w.focus())},[u,s]),_=f.useCallback(()=>{const w=Ge(e);if(w==null)return;const j=s.current;if(j==null)return;const b=e.getVisibleLeafColumns()[w.col];if(b==null)return;const K=At(e),Z=ie(e),te=se(e),H=Se(e,n),G=b.getStart(),ne=G+b.getSize(),oe=t(w.row),pe=oe+n(w.row),he=j.clientWidth-o-Z,De=j.clientHeight-l-H;let ue=j.scrollLeft,ae=j.scrollTop;if(w.col>=K){const Ee=G-Z,we=ne-Z;Ee<ue?ue=Math.max(0,Ee):we>ue+he&&(ue=we-he)}if(w.row>=te){const Ee=oe-H,we=pe-H;Ee<ae?ae=Math.max(0,Ee):we>ae+De&&(ae=we-De)}ue!==j.scrollLeft&&(j.scrollLeft=ue),ae!==j.scrollTop&&(j.scrollTop=ae)},[l,n,t,o,s,e]);f.useEffect(()=>{x.current&&(x.current=!1,_())},[p,_,e]);const S=f.useCallback(w=>{const j=w.metaKey||w.ctrlKey,D=w.key;let b;if(D==="ArrowUp"?b="up":D==="ArrowDown"?b="down":D==="ArrowLeft"?b="left":D==="ArrowRight"&&(b="right"),b!=null){w.preventDefault(),w.stopPropagation(),w.shiftKey?e.extendCellSelection(b):u&&(x.current=!0,e.moveCellSelection(b));return}if(D==="Tab"&&u){w.preventDefault(),w.stopPropagation(),x.current=!0,e.moveCellSelection(w.shiftKey?"left":"right");return}if(D==="Escape"){w.preventDefault(),w.stopPropagation(),e.resetCellSelection(!0);return}j&&D.toLowerCase()==="a"&&(w.preventDefault(),w.stopPropagation(),e.selectAllCells())},[u,e]),z=f.useCallback((w,j)=>jn({table:e,scrollContainerRef:s,rowHeaderWidth:o,columnHeaderHeight:l,getRowTop:t,getRowHeight:n},w,j),[l,n,t,o,s,e]),V=f.useCallback(w=>{w.button===0&&O()},[O]),X=f.useCallback(w=>{if(!g)return;const j=z(w.clientX,w.clientY);if(j==null)return;const D=Fn(e,j);D!=null&&(D.getIsSelected()||R(J.CELLS)&&e.setCellSelection([{anchorRowId:D.row.id,anchorColumnId:D.column.id,focusRowId:D.row.id,focusColumnId:D.column.id}]))},[z,g,R,e]),Q=f.useCallback(w=>{if(!g||r==null)return;const j=z(w.clientX,w.clientY);if(j==null)return;const D=new Bn({table:e,target:v.cell(j.row,j.col),selectedRegions:ke(e),numRows:e.getRowModel().rows.length,numCols:e.getVisibleLeafColumns().length});return r(D)??void 0},[r,z,g,e]),q=f.useCallback((w,j)=>{if(!R(J.FULL_COLUMNS)){e.resetCellSelection(!0),O();return}j.preventDefault(),j.stopPropagation();const D=e.getRowModel().rows,b=e.getVisibleLeafColumns()[w];b==null||D.length===0||(j.shiftKey?e.setCellSelection(K=>{const Z=K[K.length-1];return Z==null?[{anchorRowId:D[0].id,anchorColumnId:b.id,focusRowId:D[D.length-1].id,focusColumnId:b.id}]:[...K.slice(0,-1),{...Z,focusColumnId:b.id}]}):e.setCellSelection([{anchorRowId:D[0].id,anchorColumnId:b.id,focusRowId:D[D.length-1].id,focusColumnId:b.id}]),O())},[O,R,e]),ee=f.useCallback((w,j)=>{if(!R(J.FULL_ROWS)){e.resetCellSelection(!0),O();return}j.preventDefault(),j.stopPropagation();const D=e.getRowModel().rows,b=e.getVisibleLeafColumns(),K=D[w];K==null||b.length===0||(j.shiftKey?e.setCellSelection(Z=>{const te=Z[Z.length-1];return te==null?[{anchorRowId:K.id,anchorColumnId:b[0].id,focusRowId:K.id,focusColumnId:b[b.length-1].id}]:[...Z.slice(0,-1),{...te,focusRowId:K.id}]}):e.setCellSelection([{anchorRowId:K.id,anchorColumnId:b[0].id,focusRowId:K.id,focusColumnId:b[b.length-1].id}]),O())},[O,R,e]),le=f.useCallback(w=>{if(!R(J.FULL_TABLE)){e.resetCellSelection(!0),O();return}w.preventDefault(),w.stopPropagation(),e.selectAllCells(),O()},[O,R,e]);return{regionGroups:$,handleBodyContextMenu:X,handleBodyPointerDown:V,handleColumnHeaderMouseDown:q,handleKeyDown:S,handleMenuMouseDown:le,handleRowHeaderMouseDown:ee,isBodyContextMenuEnabled:g,isSelectionModeEnabled:R,renderBodyContextMenu:Q}}function zn({minHeight:e,headerRowCount:t}){const n=f.useRef(null),[s,o]=f.useState(null);f.useLayoutEffect(()=>{const r=n.current;if(r==null)return;const c=()=>{const a=r.getBoundingClientRect().height;a>0&&o(m=>m===a?m:a)};c();const u=new ResizeObserver(c);return u.observe(r),()=>u.disconnect()},[]);const l=Math.max(0,t)*Ke;return{ref:n,height:Math.max(e,l,s??0)}}function Hn({enableGhostCells:e,rowHeight:t,rowHeaderWidth:n,columnHeaderHeight:s,totalWidth:o,totalHeight:l,scrollContainerRef:r}){const[c,u]=f.useState(null);if(f.useLayoutEffect(()=>{const T=r.current;if(T==null)return;const C=()=>{u({width:T.clientWidth,height:T.clientHeight})};C();const g=new ResizeObserver(C);return g.observe(T),()=>g.disconnect()},[r]),!e||c==null)return;const a=c.width-n-o,m=c.height-s-l,d=a>0?Math.min(Math.ceil(a/Pe),Ut):0,E=m>0?Math.min(Math.ceil(m/t),zt):0;if(!(d===0&&E===0))return{columnCount:d,rowCount:E,columnWidth:Pe,rowHeight:t}}function vt(e,t){return t==null?e:e+t.columnCount*t.columnWidth}const kn=6,Gn=100;function Wn({rowHeight:e,rowCount:t,rowHeights:n,defaultRowHeights:s,enableRowResizing:o=!1,minRowHeight:l=kn,maxRowHeight:r=Gn,onRowHeightChanged:c}){const u=n!=null,[a,m]=f.useState(s??[]),[d,E]=f.useState(null),[T,C]=f.useState(null),g=f.useRef(null),x=f.useCallback(_=>u?n[_]??e:a[_]??(s==null?void 0:s[_])??e,[s,a,u,e,n]),{rowTops:L,totalHeight:R}=f.useMemo(()=>{const _=new Array(t);let S=0;for(let z=0;z<t;z++)_[z]=S,S+=x(z);return{rowTops:_,totalHeight:S}},[x,t]),p=f.useCallback(_=>L[_]??0,[L]),y=f.useRef(x);y.current=x;const B=f.useRef(L);B.current=L;const U=f.useRef(o);U.current=o;const M=f.useRef(u);M.current=u;const A=f.useRef(l);A.current=l;const $=f.useRef(r);$.current=r;const F=f.useRef(c);F.current=c;const N=f.useCallback(_=>{var X,Q;const S=g.current;if(S==null)return;const z="touches"in _?(X=_.touches[0])==null?void 0:X.clientY:_.clientY;if(z==null)return;const V=Math.min(S.max,Math.max(S.min,S.startHeight+(z-S.startY)));M.current||m(q=>{const ee=q.slice();return ee[S.index]=V,ee}),(Q=F.current)==null||Q.call(F,S.index,V),C(S.rowTop+V)},[]),I=f.useCallback(()=>{g.current=null,E(null),C(null),window.removeEventListener("mousemove",N),window.removeEventListener("mouseup",I),window.removeEventListener("touchmove",N),window.removeEventListener("touchend",I),window.removeEventListener("touchcancel",I)},[N]),O=f.useCallback((_,S)=>{var Q;if(!U.current)return;S.preventDefault(),S.stopPropagation();const z="touches"in S?(Q=S.touches[0])==null?void 0:Q.clientY:S.clientY;if(z==null)return;const V=B.current[_]??0,X=y.current(_);g.current={index:_,startY:z,startHeight:X,rowTop:V,min:A.current,max:$.current},E(_),C(V+X),window.addEventListener("mousemove",N),window.addEventListener("mouseup",I),window.addEventListener("touchmove",N),window.addEventListener("touchend",I),window.addEventListener("touchcancel",I)},[N,I]);return f.useEffect(()=>()=>{window.removeEventListener("mousemove",N),window.removeEventListener("mouseup",I),window.removeEventListener("touchmove",N),window.removeEventListener("touchend",I),window.removeEventListener("touchcancel",I)},[N,I]),{enabled:o,getRowHeight:x,getRowTop:p,totalHeight:R,resizingRowIndex:d,resizingGuideTop:T,startRowResize:O}}const xt=f.createContext(null);function Ce(){return f.useContext(xt)}const Nt=f.createContext(null);function Vn(){return f.useContext(Nt)}function Yn(e,t){return t<e?t:e<=t&&t<e+1?e:Math.max(0,t-1)}function Xn(e,t,n,s,o){const[l,r]=f.useState(null),[c,u]=f.useState(null),a=f.useRef(null),m=f.useCallback(x=>{var U,M;const L=((U=n.current)==null?void 0:U.getBoundingClientRect().left)??0,R=((M=s.current)==null?void 0:M.scrollLeft)??0,p=ie(e),y=x-L-o;if(y<p){let A=0;for(const $ of Te(e,"start"))if($.getStart("start")+$.getSize()/2<y)A++;else break;return A}let B=At(e);for(const A of Te(e,"center"))if(p+A.getStart("center")-R+A.getSize()/2<y)B++;else break;return B},[n,o,s,e]),d=f.useCallback(x=>{var U;const L=a.current;if(a.current=null,r(null),u(null),L==null)return;const R=e.getVisibleLeafColumns(),p=(U=R[L.oldIndex])==null?void 0:U.id;if(p==null)return;const y=Yn(L.oldIndex,m(x)),B=R.map(M=>M.id).filter(M=>M!==p);B.splice(y,0,p),e.setColumnOrder(B)},[m,e]),E=f.useCallback(x=>{a.current!=null&&u(m(x.clientX))},[m]),T=f.useCallback(x=>{d(x.clientX)},[d]),C=f.useCallback((x,L)=>{t&&(L.preventDefault(),a.current={oldIndex:x.getIndex()},r(x.id),u(m(L.clientX)),window.addEventListener("pointermove",E),window.addEventListener("pointerup",T),window.addEventListener("pointercancel",T))},[t,m,E,T]);return f.useEffect(()=>()=>{window.removeEventListener("pointermove",E),window.removeEventListener("pointerup",T),window.removeEventListener("pointercancel",T)},[E,T]),{contextValue:f.useMemo(()=>({enableColumnReordering:t,reorderingColumnId:l,startReorder:C}),[t,l,C]),guideIndex:c,reorderingColumnId:l}}function Qn({table:e,reorderingColumnId:t,guideIndex:n,rowHeaderWidth:s,scrollLeft:o}){if(t==null||n==null)return null;const l=e.getVisibleLeafColumns(),r=e.getStartVisibleLeafColumns().length,c=l[n],u=ie(e);let a;return n<=r?a=n<r&&c!=null?c.getStart("start"):u:c!=null?a=u+c.getStart("center")-o:a=u+fe(e,"center")-o,i.jsx("div",{className:P(it,Oe),children:i.jsx("div",{className:P(xe,Lt),style:{left:s+a}})})}function qn({table:e,rowHeaderWidth:t,columnHeaderHeight:n,scrollLeft:s,scrollTop:o,frozenRowCount:l,resizingGuideTop:r=null,resizingRowIndex:c=null}){const u=e.state.columnResizing,a=u==null?void 0:u.isResizingColumn,m=a!=null&&a!==!1?e.getColumn(a):void 0,d=m!=null?t+Mn(e,m,s)+m.getSize()+((u==null?void 0:u.deltaOffset)??0):null,E=r!=null&&c!=null?n+r-(c<l?0:o):null;return d==null&&E==null?null:i.jsxs("div",{className:P(it,Oe),children:[d!=null&&i.jsx("div",{className:P(xe,Lt),style:{left:d}}),E!=null&&i.jsx("div",{className:P(xe,Jt),style:{top:E}})]})}function me({loading:e,variableLength:t=!1,children:n}){if(e){const s=t?75-Math.floor(Math.random()*11)*5:100;return i.jsx("div",{className:k.Classes.SKELETON,style:{width:`${s}%`}})}return i.jsx(i.Fragment,{children:n})}function Kn({table:e,cell:t,rowIndex:n,rowTop:s,columnRegion:o,rowHeight:l,loading:r,isLastInRow:c,isLastInColumn:u}){var E;const a=t.column.getSize(),m=t.column.getStart(o),d=(E=t.column.columnDef.meta)==null?void 0:E.bodyCellClassName;return i.jsx("div",{className:P(Je,wt,de(n),Be(t.column.getIndex()),n%2===0?et:tt,{[rt]:c,[Me]:u,[k.Classes.LOADING]:r,[je]:t.row.getIsSelected()},d),style:{height:l,left:m,position:"absolute",top:s,width:a},onMouseDown:T=>{T.button===0&&t.getSelectionStartHandler()(T)},onMouseEnter:t.getSelectionExtendHandler(),children:i.jsx("div",{className:P(gt,ct),children:i.jsx(me,{loading:r,variableLength:!0,children:i.jsx(e.FlexRender,{cell:t})})})})}function Re({columnIndex:e,rowIndex:t,left:n,top:s,width:o,height:l,loading:r}){return i.jsx("div",{className:P(Je,Yt,wt,de(t),Be(e),t%2===0?et:tt,{[k.Classes.LOADING]:r}),style:{height:l,left:n,position:"absolute",top:s,width:o},children:i.jsx("div",{className:P(gt,ct),children:i.jsx(me,{loading:r,variableLength:!0})})})}function Zn({table:e,ghosts:t,loading:n,columnRegion:s,rowRegion:o,rowIndices:l,regionTop:r,regionHeight:c,getRowTop:u,getRowHeight:a}){const m=e.getRowModel().rows,d=e.getVisibleLeafColumns().length,E=fe(e,s),T=Te(e,s),C=s==="center",g=o==="center";return i.jsxs(i.Fragment,{children:[C&&l.map(x=>{var L;return i.jsx(f.Fragment,{children:Array.from({length:t.columnCount}).map((R,p)=>i.jsx(Re,{columnIndex:d+p,rowIndex:x,left:E+p*t.columnWidth,top:u(x)-r,width:t.columnWidth,height:a(x),loading:n},`ghost-column-cell-${x}-${p}`))},`ghost-column-cells-${((L=m[x])==null?void 0:L.id)??x}`)}),g&&Array.from({length:t.rowCount}).map((x,L)=>{const R=m.length+L,p=c+L*t.rowHeight;return i.jsxs(f.Fragment,{children:[T.map(y=>i.jsx(Re,{columnIndex:y.getIndex(),rowIndex:R,left:y.getStart(s),top:p,width:y.getSize(),height:t.rowHeight,loading:n},`ghost-row-cell-${L}-${y.id}`)),C&&Array.from({length:t.columnCount}).map((y,B)=>i.jsx(Re,{columnIndex:d+B,rowIndex:R,left:E+B*t.columnWidth,top:p,width:t.columnWidth,height:t.rowHeight,loading:n},`ghost-corner-cell-${L}-${B}`))]},`ghost-row-cells-${L}`)})]})}function Ve(e,t,n){let s=null,o=0;for(const l of Te(e,t)){const r=l.getIndex();r<n[0]||r>n[1]||(s==null&&(s=l.getStart(t)),o+=l.getSize())}return s==null?null:{offset:s,size:o}}function Ye(e,t,n,s,o){const l=se(e),r=e.getRowModel().rows.length,c=Math.max(n[0],t==="top"?0:l),u=Math.min(n[1],t==="top"?l-1:r-1);if(c>u)return null;const a=t==="center"?Jn(e,t,s):0;return{offset:s(c)-a,size:s(u)+o(u)-s(c)}}function Jn(e,t,n){return t==="center"?n(se(e)):0}function es(e,t,n,s,o,l){const r=v.getRegionCardinality(t),c={offset:0,size:fe(e,n)},u=se(e),a=e.getRowModel().rows.length,m={offset:0,size:(s==="top"?u:a-u)===0?0:o(s==="top"?u-1:a-1)+l(s==="top"?u-1:a-1)-o(s==="top"?0:u)};let d,E;switch(r){case J.CELLS:d=Ve(e,n,t.cols),E=Ye(e,s,t.rows,o,l);break;case J.FULL_COLUMNS:d=Ve(e,n,t.cols),E=m;break;case J.FULL_ROWS:d=c,E=Ye(e,s,t.rows,o,l);break;default:d=c,E=m;break}return d==null||E==null||d.size<=0||E.size<=0?null:{height:E.size,left:d.offset,top:E.offset,width:d.size}}function ts({table:e,regionGroups:t,columnRegion:n,rowRegion:s,getRowTop:o,getRowHeight:l}){return i.jsx("div",{className:Oe,"aria-hidden":!0,children:t.map((r,c)=>r.regions.map((u,a)=>{const m=es(e,u,n,s,o,l);return m==null?null:i.jsx("div",{className:P(xe,hn,r.className),style:m},`${c}-${a}`)}))})}function ns({table:e,columnRegion:t,rowRegion:n,offsetTop:s=0,offsetLeft:o=0,areCellsLoading:l,rowVirtualizer:r,rowResizing:c,ghosts:u,className:a,...m}){const d=Ce(),E=d!=null&&d.isBodyContextMenuEnabled,T=e.getRowModel().rows,C=se(e),g=n==="top",x=g?C:T.length-C,L=g?0:c.getRowTop(C),R=g?c.getRowTop(C):c.totalHeight-c.getRowTop(C),p=fe(e,t),B=!g&&r!=null?r.getVirtualItems():void 0,U=B!=null?B.map(A=>C+A.index):Array.from({length:x},(A,$)=>g?$:C+$),M=g?C-1:T.length-1;return i.jsx("div",{...m,className:P(rn,a),style:{paddingLeft:o,paddingTop:s},children:i.jsx("div",{children:i.jsxs(k.ContextMenu,{className:P(Wt,Vt),style:{height:R,width:p},onPointerDown:d==null?void 0:d.handleBodyPointerDown,disabled:!E,onContextMenu:E?d==null?void 0:d.handleBodyContextMenu:void 0,content:({mouseEvent:A})=>A==null||d==null?void 0:d.renderBodyContextMenu(A),children:[i.jsxs("div",{className:Gt,children:[U.map(A=>{const $=T[A];if($==null)return null;const F=t==="start"?$.getStartVisibleCells():$.getCenterVisibleCells(),N=c.getRowTop(A)-L,I=c.getRowHeight(A);return F.map((O,_)=>i.jsx(Kn,{table:e,cell:O,rowIndex:A,rowTop:N,columnRegion:t,rowHeight:I,loading:l,isLastInRow:_===F.length-1,isLastInColumn:A===M},O.id))}),u!=null&&i.jsx(Zn,{table:e,ghosts:u,loading:l,columnRegion:t,rowRegion:n,rowIndices:U,regionTop:L,regionHeight:R,getRowTop:c.getRowTop,getRowHeight:c.getRowHeight})]}),d!=null&&d.regionGroups.length>0&&i.jsx(ts,{table:e,regionGroups:d.regionGroups,columnRegion:t,rowRegion:n,getRowTop:c.getRowTop,getRowHeight:c.getRowHeight})]})})})}function ss({row:e,rowIndex:t,rowHeight:n,loading:s,isLastInColumn:o,isResizing:l=!1,onResizeStart:r,className:c,...u}){const a=Ce();return i.jsxs("div",{...u,className:P(ce,de(t),{[Me]:o,[k.Classes.LOADING]:s,[je]:(e==null?void 0:e.getIsSelected())??!1},c),style:{flexBasis:n,height:n,minHeight:0},onMouseDown:m=>a==null?void 0:a.handleRowHeaderMouseDown(t,m),children:[i.jsx("div",{className:dt,children:i.jsx("div",{className:ft,children:i.jsx(me,{loading:s,children:i.jsx("span",{children:t+1})})})}),!s&&r!=null&&i.jsx("div",{className:P(at,gn,{[Le]:l}),onMouseDown:r,onTouchStart:r,children:i.jsx("div",{className:P(ut,{[Le]:l})})})]})}function ls({row:e,rowIndex:t,rowHeight:n,loading:s,isLastInColumn:o}){const l=(e==null?void 0:e.getIsSelected())??!1;return i.jsx("div",{className:P(ce,mt,de(t),{[Me]:o,[k.Classes.LOADING]:s,[je]:l}),style:{height:n},children:!s&&e!=null&&i.jsx("div",{className:ht,children:i.jsx(k.Checkbox,{"aria-label":`Select row ${t+1}`,checked:l,disabled:!e.getCanSelect(),onChange:r=>e.getToggleSelectedHandler()(r)})})})}function Xe({table:e,rowRegion:t,rowHeaderWidth:n,enableRowHeader:s=!0,selectionColumnWidth:o=0,areRowHeadersLoading:l,rowVirtualizer:r,rowResizing:c,ghosts:u,className:a,...m}){if(!s&&o===0)return null;const d=e.getRowModel().rows,E=s?n:0,T=se(e),C=t==="top",g=C?0:T,x=C?T:d.length-T,L=C?c.getRowTop(T):c.totalHeight-c.getRowTop(T),p=!C&&r!=null?r.getVirtualItems():void 0,y=(r==null?void 0:r.options.scrollMargin)??0,B=p!=null&&p.length>0?p[0].start-y:0,U=p!=null&&p.length>0?L-(p[p.length-1].end-y):0,M=p!=null?p.map(N=>T+N.index):Array.from({length:x},(N,I)=>g+I),A=C?T-1:d.length-1,$={height:L,transform:"translateY(0px)",paddingTop:B,paddingBottom:U},F=u!=null&&!C?Array.from({length:u.rowCount},(N,I)=>d.length+I):[];return i.jsx("div",{...m,className:P(Tn,a),style:{width:E+o},children:i.jsxs("div",{style:{display:"flex",height:L},children:[s&&i.jsx("div",{style:{flex:"0 0 auto",width:n},children:i.jsxs("div",{className:Ue,style:$,children:[M.map(N=>{var I;return i.jsx(ss,{row:d[N],rowIndex:N,rowHeight:c.getRowHeight(N),loading:l,isLastInColumn:N===A,isResizing:c.resizingRowIndex===N,onResizeStart:c.enabled?O=>c.startRowResize(N,O):void 0},((I=d[N])==null?void 0:I.id)??N)}),F.map((N,I)=>i.jsx("div",{className:P(ce,de(N),{[k.Classes.LOADING]:l}),style:{flexBasis:u==null?void 0:u.rowHeight,height:u==null?void 0:u.rowHeight,minHeight:0},children:i.jsx("div",{className:dt,children:i.jsx("div",{className:ft,children:i.jsx(me,{loading:l})})})},`ghost-row-header-${I}`))]})}),o>0&&i.jsx("div",{style:{flex:"0 0 auto",width:o},children:i.jsxs("div",{className:Ue,style:$,children:[M.map(N=>{var I;return i.jsx(ls,{row:d[N],rowIndex:N,rowHeight:c.getRowHeight(N),loading:l,isLastInColumn:N===A},((I=d[N])==null?void 0:I.id)??N)}),F.map((N,I)=>i.jsx("div",{className:P(ce,mt,de(N),{[k.Classes.LOADING]:l}),style:{height:u==null?void 0:u.rowHeight}},`ghost-row-selection-${I}`))]})})]})})}function os({header:e,isOpen:t,onOpenChange:n}){const s=e.column.getIsSorted(),o=r=>{e.column.toggleSorting(r),n(!1)},l=()=>{e.column.clearSorting(),n(!1)};return i.jsxs("div",{className:P(vn,{[Nn]:t}),children:[i.jsx("div",{className:xn}),i.jsx(k.PopoverNext,{className:An,content:i.jsxs(k.Menu,{children:[i.jsx(k.MenuItem,{icon:"sort-asc",text:"Sort Asc",onClick:()=>o(!1)}),i.jsx(k.MenuItem,{icon:"sort-desc",text:"Sort Desc",onClick:()=>o(!0)}),s&&i.jsx(k.MenuItem,{icon:"sort",text:"Clear Sort",onClick:l})]}),isOpen:t,onInteraction:n,placement:"bottom",rootBoundary:"viewport",children:i.jsx(k.Icon,{icon:"chevron-down"})})]})}function rs({table:e,header:t,isLastInRow:n,enableSorting:s=!1,loading:o}){var R;const l=t.getSize(),r=t.column.getIsResizing(),c=t.getResizeHandler(),u=typeof t.column.columnDef.header=="string"?t.column.columnDef.header:void 0,a=Vn(),m=Ce(),d=(a==null?void 0:a.enableColumnReordering)??!1,E=(a==null?void 0:a.reorderingColumnId)===t.column.id,T=s&&t.column.getCanSort(),C=(R=t.column.columnDef.meta)==null?void 0:R.headCellClassName,[g,x]=f.useState(!1),L=t.column.getIndex();return i.jsxs("div",{className:P(ce,Be(L),Ie,{[rt]:n},{[Kt]:d},{[Zt]:g},{[k.Classes.LOADING]:o},C),style:{flexBasis:l,minWidth:0,width:l},onMouseDown:p=>m==null?void 0:m.handleColumnHeaderMouseDown(L,p),children:[i.jsxs("div",{className:nt,title:u,children:[d&&i.jsx("div",{className:P(wn,{[Le]:E}),onPointerDown:p=>a==null?void 0:a.startReorder(t.column,p),children:i.jsx("div",{className:En,children:i.jsx(jt.DragHandleVerticalIcon,{title:"Press down to drag"})})}),T&&!o&&i.jsx(os,{table:e,header:t,isOpen:g,onOpenChange:x}),i.jsx("div",{className:st,children:i.jsx(me,{loading:o,variableLength:!0,children:i.jsx(e.FlexRender,{header:t})})})]}),i.jsx("div",{className:ot}),!o&&i.jsx("div",{className:P(at,Ln,{[Le]:r}),onMouseDown:c,onTouchStart:c,children:i.jsx("div",{className:P(ut,{[Le]:r})})})]})}function cs({table:e,headerGroup:t,columnRegion:n,enableSorting:s=!1,areColumnHeadersLoading:o,ghosts:l}){var u;const r=(u=t.headers[t.headers.length-1])==null?void 0:u.id,c=vt(fe(e,n),l);return i.jsxs("div",{className:P(Sn,Xt),style:{transform:"translateX(0px)",width:c},children:[t.headers.map(a=>i.jsx(rs,{table:e,header:a,isLastInRow:a.id===r,enableSorting:s,loading:o},a.id)),l!=null&&Array.from({length:l.columnCount}).map((a,m)=>i.jsxs("div",{className:P(ce,Ie,{[k.Classes.LOADING]:o}),style:{flexBasis:l.columnWidth,minWidth:0,width:l.columnWidth},children:[i.jsx("div",{className:nt,children:i.jsx("div",{className:st,children:i.jsx(me,{loading:o,variableLength:!0})})}),i.jsx("div",{className:ot})]},`ghost-column-header-${m}`))]})}function is({table:e,columnRegion:t,enableSorting:n=!1,areColumnHeadersLoading:s,ghosts:o,className:l,...r}){const c=t==="start"?e.getStartHeaderGroups():e.getCenterHeaderGroups(),u=t==="center"?o:void 0,a=vt(fe(e,t),u);return i.jsx("div",{...r,className:P(Qt,l),children:i.jsx("div",{style:{width:a},children:c.map(m=>i.jsx(cs,{table:e,headerGroup:m,columnRegion:t,enableSorting:n,areColumnHeadersLoading:s,ghosts:u},m.id))})})}function us({width:e,height:t,className:n,...s}){const o=Ce();return i.jsx("div",{...s,className:P(en,n),style:{width:e,height:t},onMouseDown:o==null?void 0:o.handleMenuMouseDown})}function as({table:e,width:t,height:n,loading:s=!1}){const o=e.getIsAllRowsSelected(),l=e.getIsSomeRowsSelected();return i.jsx("div",{className:P(ce,Ie,Cn),style:{flex:"0 0 auto",height:n,width:t},children:!s&&i.jsx("div",{className:ht,children:i.jsx(k.Checkbox,{"aria-label":"Select all rows",checked:o,indeterminate:!o&&l,onChange:r=>e.getToggleAllRowsSelectedHandler()(r)})})})}var W=(e=>(e.MAIN="main",e.TOP="top",e.LEFT="left",e.TOP_LEFT="top-left",e))(W||{});function ds(e){switch(e){case W.MAIN:return un;case W.TOP:return fn;case W.LEFT:return cn;case W.TOP_LEFT:return mn;default:return}}function Ae({quadrantType:e,table:t,rowHeaderWidth:n,enableRowHeader:s=!0,columnHeaderHeight:o,columnHeaderMeasureRef:l,enableSorting:r=!1,areCellsLoading:c,areColumnHeadersLoading:u,areRowHeadersLoading:a,rowResizing:m,rowVirtualizer:d,ghosts:E,scrollContainerRef:T,onScroll:C,onWheel:g,style:x,selectionColumnWidth:L=0}){const R=e===W.MAIN,p=e===W.TOP||e===W.TOP_LEFT,B=e===W.LEFT||e===W.TOP_LEFT?"start":"center",U=p?"top":"center",M=e===W.TOP||e===W.TOP_LEFT,A=e===W.TOP_LEFT,$=Ce(),F=ie(t),N=Se(t,m.getRowHeight),I=s?n:0,O=(z,V)=>i.jsx(ns,{table:t,columnRegion:B,rowRegion:U,offsetTop:z,offsetLeft:V,areCellsLoading:c,rowVirtualizer:d,rowResizing:m,ghosts:E}),_=M?i.jsxs("div",{ref:e===W.TOP?l:void 0,className:_n,style:B==="center"?{paddingLeft:F}:void 0,children:[A&&i.jsxs(i.Fragment,{children:[s&&i.jsx(us,{width:n,height:o}),L>0&&i.jsx(as,{table:t,width:L,height:o,loading:a})]}),i.jsx(is,{table:t,columnRegion:B,enableSorting:r,areColumnHeadersLoading:u,ghosts:E})]}):void 0;let S;switch(e){case W.MAIN:S=O(o+N,I+L+F);break;case W.TOP:S=i.jsxs(i.Fragment,{children:[_,O(0,F)]});break;case W.LEFT:S=i.jsx("div",{style:{paddingTop:N},children:i.jsxs("div",{className:$e,style:{width:I+L+F},children:[i.jsx(Xe,{table:t,rowRegion:"center",rowHeaderWidth:n,enableRowHeader:s,selectionColumnWidth:L,areRowHeadersLoading:a,rowVirtualizer:d,rowResizing:m,ghosts:E}),O(0,0)]})});break;case W.TOP_LEFT:S=i.jsxs(i.Fragment,{children:[_,i.jsxs("div",{className:$e,style:{width:I+L+F},children:[i.jsx(Xe,{table:t,rowRegion:"top",rowHeaderWidth:n,enableRowHeader:s,selectionColumnWidth:L,areRowHeadersLoading:a,rowVirtualizer:d,rowResizing:m,ghosts:E}),O(0,0)]})]});break;default:S=void 0}return i.jsx("div",{className:P(on,ds(e)),style:x,children:i.jsx("div",{ref:T,className:an,tabIndex:R&&$!=null?0:void 0,onKeyDown:R?$==null?void 0:$.handleKeyDown:void 0,onScroll:C,onWheel:g,children:S})})}function fs({table:e,rowHeaderWidth:t,enableRowHeader:n=!0,columnHeaderHeight:s,columnHeaderMeasureRef:o,enableColumnReordering:l=!1,enableSorting:r=!1,areCellsLoading:c,areColumnHeadersLoading:u,areRowHeadersLoading:a,selection:m,rowResizing:d,ghosts:E,enableRowVirtualization:T,overscanRowCount:C,scrollContainerRef:g,selectionColumnWidth:x=0}){const L=f.useRef(null),R=f.useRef(null),p=f.useRef(null),y=f.useRef(null),B=ie(e),U=se(e),M=Se(e,d.getRowHeight),A=(n?t:0)+x,$=Dt({table:e,columnHeaderHeight:s,frozenRowCount:U,frozenRowsHeight:M,getRowHeight:d.getRowHeight,scrollContainerRef:g,enableRowVirtualization:T??!1,overscanRowCount:C??qe}),{contextValue:F,guideIndex:N,reorderingColumnId:I}=Xn(e,l,L,g,A),[O,_]=f.useState({left:0,top:0}),S=e.state.columnResizing,z=(S==null?void 0:S.isResizingColumn)!=null&&S.isResizingColumn!==!1,V=d.resizingGuideTop!=null,X=I!=null,Q=f.useRef(!1);Q.current=z||V||X;const[q,ee]=f.useState({vertical:0,horizontal:0}),le=f.useCallback(()=>{const H=g.current;H!=null&&(R.current!=null&&(R.current.scrollLeft=H.scrollLeft),p.current!=null&&(p.current.scrollTop=H.scrollTop),y.current!=null&&(y.current.scrollLeft=0,y.current.scrollTop=0))},[g]),w=f.useCallback(()=>{if(le(),Q.current){const H=g.current;H!=null&&_({left:H.scrollLeft,top:H.scrollTop})}},[g,le]),j=f.useCallback(()=>{const H=g.current;if(H==null)return;const G=Math.max(0,H.offsetWidth-H.clientWidth),ne=Math.max(0,H.offsetHeight-H.clientHeight);ee(oe=>oe.vertical===G&&oe.horizontal===ne?oe:{vertical:G,horizontal:ne})},[g]),D=e.getTotalSize();f.useLayoutEffect(()=>{const H=g.current;if(H==null)return;j();const G=new ResizeObserver(j);return G.observe(H),()=>G.disconnect()},[j,g]),f.useLayoutEffect(()=>{j()},[s,B,M,j,d.totalHeight,D]),f.useLayoutEffect(()=>{le()},[s,B,M,le]),f.useLayoutEffect(()=>{if(!Q.current)return;const H=g.current;if(H==null)return;const G=H.scrollLeft,ne=H.scrollTop;(G!==O.left||ne!==O.top)&&_({left:G,top:ne})},[z,X,V,g,O.left,O.top]);const b=f.useCallback(H=>{const G=g.current;if(G==null)return;const ne=Math.max(0,G.scrollWidth-G.clientWidth),oe=Math.max(0,G.scrollHeight-G.clientHeight),pe=Qe(G.scrollLeft+H.deltaX,0,ne),he=Qe(G.scrollTop+H.deltaY,0,oe);pe!==G.scrollLeft&&(G.scrollLeft=pe),he!==G.scrollTop&&(G.scrollTop=he)},[g]),K=s+M,Z=A+B,te={table:e,rowHeaderWidth:t,enableRowHeader:n,selectionColumnWidth:x,columnHeaderHeight:s,enableSorting:r,areCellsLoading:c,areColumnHeadersLoading:u,areRowHeadersLoading:a,rowResizing:d,rowVirtualizer:$,ghosts:E};return i.jsx("div",{ref:L,className:dn,children:i.jsx(Nt.Provider,{value:F,children:i.jsxs(xt.Provider,{value:m,children:[i.jsx(Ae,{...te,quadrantType:W.MAIN,scrollContainerRef:g,onScroll:w}),i.jsx(Ae,{...te,quadrantType:W.TOP,columnHeaderMeasureRef:o,scrollContainerRef:R,onWheel:b,style:{height:K,left:A,right:q.vertical}}),i.jsx(Ae,{...te,quadrantType:W.LEFT,scrollContainerRef:p,onWheel:b,style:{bottom:q.horizontal,top:s,width:Z}}),i.jsx(Ae,{...te,quadrantType:W.TOP_LEFT,scrollContainerRef:y,onWheel:b,style:{height:K,width:Z}}),i.jsx(qn,{table:e,rowHeaderWidth:A,columnHeaderHeight:s,scrollLeft:O.left,scrollTop:O.top,frozenRowCount:U,resizingGuideTop:d.resizingGuideTop,resizingRowIndex:d.resizingRowIndex}),i.jsx(Qn,{table:e,reorderingColumnId:I,guideIndex:N,rowHeaderWidth:A,scrollLeft:O.left})]})})})}function Qe(e,t,n){return Math.max(t,Math.min(n,e))}function ms({table:e,rowHeight:t,rowHeaderWidth:n,enableRowHeader:s=!0,columnHeaderHeight:o,enableColumnReordering:l=!1,enableSorting:r=!1,areCellsLoading:c,areColumnHeadersLoading:u,areRowHeadersLoading:a,enableFocusedCell:m=!1,enableGhostCells:d=!1,bodyContextMenuRenderer:E,enableBodyContextMenu:T,onFocusedCell:C,onFocusedRegion:g,selectedRegions:x,onSelection:L,selectionModes:R,enableRowVirtualization:p,overscanRowCount:y,enableRowResizing:B=!1,rowHeights:U,defaultRowHeights:M,onRowHeightChanged:A,minRowHeight:$,maxRowHeight:F,selectionColumnWidth:N=0,className:I,...O}){const _=f.useRef(null),S=(s?n:0)+N,{ref:z,height:V}=zn({minHeight:o,headerRowCount:e.getHeaderGroups().length}),X=Wn({rowHeight:t,rowCount:e.getRowModel().rows.length,rowHeights:U,defaultRowHeights:M,enableRowResizing:B,minRowHeight:$,maxRowHeight:F,onRowHeightChanged:A}),Q=Un({table:e,getRowTop:X.getRowTop,getRowHeight:X.getRowHeight,scrollContainerRef:_,rowHeaderWidth:S,columnHeaderHeight:V,bodyContextMenuRenderer:E,enableBodyContextMenu:T,enableFocusedCell:m,onFocusedCell:C,onFocusedRegion:g,selectedRegions:x,onSelection:L,selectionModes:R}),q=Hn({enableGhostCells:d,rowHeight:t,rowHeaderWidth:S,columnHeaderHeight:V,totalWidth:e.getTotalSize(),totalHeight:X.totalHeight,scrollContainerRef:_}),ee=Q.isSelectionModeEnabled(J.CELLS)?pn:void 0;return i.jsx("div",{...O,className:P(qt,ee,{[tn]:q!=null&&q.columnCount>0,[nn]:q!=null&&q.rowCount>0},I),children:i.jsx(fs,{table:e,rowHeaderWidth:n,enableRowHeader:s,columnHeaderHeight:V,columnHeaderMeasureRef:z,enableColumnReordering:l,enableSorting:r,areCellsLoading:c,areColumnHeadersLoading:u,areRowHeadersLoading:a,selection:Q,rowResizing:X,ghosts:q,enableRowVirtualization:p,overscanRowCount:y,scrollContainerRef:_,selectionColumnWidth:N})})}function hs({htmlProps:e,rowHeight:t=Pt,showRowSelectionCheckboxes:n=!1,rowSelectionColumnWidth:s=Ft,rowHeaderWidth:o=$t,enableRowHeader:l=!0,columnHeaderHeight:r=Ke,enableColumnReordering:c=!1,enableSorting:u=!1,loadingOptions:a=[],enableFocusedCell:m=!1,enableGhostCells:d=!1,bodyContextMenuRenderer:E,enableBodyContextMenu:T,onFocusedCell:C,onFocusedRegion:g,selectedRegions:x,onSelection:L,selectionModes:R,enableRowVirtualization:p=!1,numFrozenColumns:y=0,numFrozenRows:B=0,overscanRowCount:U=qe,columnVisibility:M,enableRowResizing:A=!1,rowHeights:$,defaultRowHeights:F,onRowHeightChanged:N,minRowHeight:I,maxRowHeight:O,rowSelection:_,defaultRowSelection:S,...z}){var j,D;const[V,X]=bt({value:_??((j=z.state)==null?void 0:j.rowSelection),initialValue:S??((D=z.initialState)==null?void 0:D.rowSelection),finalValue:{},onChange:z.onRowSelectionChange}),Q=f.useCallback(b=>{X(Y.functionalUpdate(b,V))},[V,X]),q=Bt({...z,enableSorting:u,state:{...z.state,...M!==void 0?{columnVisibility:M}:{},rowSelection:V},onRowSelectionChange:Q});yt({table:q,numFrozenColumns:y,numFrozenRows:B});const ee=ve(a,ge.CELLS),le=ve(a,ge.COLUMN_HEADERS),w=ve(a,ge.ROW_HEADERS);return i.jsx(ms,{table:q,rowHeight:t,rowHeaderWidth:o,enableRowHeader:l,columnHeaderHeight:r,enableColumnReordering:c,enableSorting:u,areCellsLoading:ee,areColumnHeadersLoading:le,areRowHeadersLoading:w,enableFocusedCell:m,enableGhostCells:d,bodyContextMenuRenderer:E,enableBodyContextMenu:T,onFocusedCell:C,onFocusedRegion:g,selectedRegions:x,onSelection:L,selectionModes:R,enableRowVirtualization:p,overscanRowCount:U,enableRowResizing:A,rowHeights:$,defaultRowHeights:F,onRowHeightChanged:N,minRowHeight:I,maxRowHeight:O,selectionColumnWidth:n?s:0,...e})}const St=10,_t=[10,20,50,100];function Rt({pageIndex:e,pageSize:t,pageCount:n,rowCount:s,pageSizeOptions:o=_t,onPageIndexChange:l,onPageSizeChange:r,className:c}){const u=n!=null&&n>=0?n:void 0,a=e>0,m=u===void 0?!0:e<u-1,d=s===void 0||s===0?0:e*t+1,E=s===void 0?void 0:Math.min((e+1)*t,s),T=o.includes(t)?o:[...o,t].sort((C,g)=>C-g);return i.jsxs("div",{className:P(sn,c),children:[i.jsxs("div",{className:Fe,children:[i.jsx("span",{className:_e,children:"Rows per page:"}),i.jsx(k.HTMLSelect,{"aria-label":"Rows per page",onChange:C=>r(Number(C.currentTarget.value)),options:T,value:t}),s!==void 0&&i.jsxs("span",{className:_e,children:[d===0?0:`${d}–${E}`," of ",s]})]}),i.jsxs("div",{className:Fe,children:[i.jsxs("span",{className:_e,children:["Page ",e+1,u!==void 0?` of ${u}`:""]}),i.jsxs(k.ButtonGroup,{children:[i.jsx(k.Button,{"aria-label":"First page",disabled:!a,icon:"double-chevron-left",onClick:()=>l(0)}),i.jsx(k.Button,{"aria-label":"Previous page",disabled:!a,icon:"chevron-left",onClick:()=>l(e-1)}),i.jsx(k.Button,{"aria-label":"Next page",disabled:!m,icon:"chevron-right",onClick:()=>l(e+1)}),i.jsx(k.Button,{"aria-label":"Last page",disabled:u===void 0||!m,icon:"double-chevron-right",onClick:()=>{u!==void 0&&l(u-1)}})]})]})]})}const Es=Y.tableFeatures({...Ne,rowPaginationFeature:Y.rowPaginationFeature,paginatedRowModel:Y.createPaginatedRowModel()});function ws(e){function t({data:s,initialState:o,state:l,features:r,onPaginationChange:c,manualPagination:u,pageCount:a,rowCount:m,initialPageIndex:d=0,initialPageSize:E=St,pageSizeOptions:T,showPaginationBar:C=!0,paginationBarClassName:g,...x}){const[L,R]=f.useState(()=>{var _,S;return{pageIndex:((_=o==null?void 0:o.pagination)==null?void 0:_.pageIndex)??d,pageSize:((S=o==null?void 0:o.pagination)==null?void 0:S.pageSize)??E}}),p=l==null?void 0:l.pagination,y=p??L,{pageIndex:B,pageSize:U}=y,M=f.useCallback(_=>{c==null||c(_),p===void 0&&R(S=>Y.functionalUpdate(_,S))},[p,c]),A=u===!0,$=A?m:s.length,F=f.useMemo(()=>A?a!=null&&a>=0?a:m!=null?Math.ceil(m/U):void 0:Math.max(1,Math.ceil(s.length/U)),[s.length,A,a,U,m]);f.useEffect(()=>{if(F===void 0)return;const _=Math.max(0,F-1);B>_&&M(S=>({...S,pageIndex:_}))},[M,F,B]);const N=f.useMemo(()=>r==null?Es:Y.tableFeatures({...Ne,...r,rowPaginationFeature:Y.rowPaginationFeature,paginatedRowModel:Y.createPaginatedRowModel()}),[r]),I=f.useCallback(_=>{M(S=>({...S,pageIndex:Math.max(0,_)}))},[M]),O=f.useCallback(_=>{M(S=>({...S,pageIndex:0,pageSize:_}))},[M]);return i.jsxs("div",{className:ln,children:[i.jsx(e,{...x,data:s,initialState:o,state:{...l,pagination:y},features:N,onPaginationChange:M,manualPagination:u,pageCount:a,rowCount:m}),C&&i.jsx(Rt,{className:g,onPageIndexChange:I,onPageSizeChange:O,pageCount:F,pageIndex:B,pageSize:U,pageSizeOptions:T,rowCount:$})]})}const n=e.displayName??e.name??"Table";return t.displayName=`withPagination(${n})`,t}exports.BP_Table=hs;exports.DEFAULT_BP_TABLE_FEATURES=Ne;exports.DEFAULT_PAGE_SIZE=St;exports.DEFAULT_PAGE_SIZE_OPTIONS=_t;exports.Direction=Ct;exports.FocusMode=ye;exports.RegionCardinality=J;exports.Regions=v;exports.TableLoadingOption=ge;exports.TablePaginationBar=Rt;exports.directionToDelta=pt;exports.hasLoadingOption=ve;exports.moveFocusedCell=Rn;exports.resizeRegion=In;exports.withPagination=ws;
5
+ */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",r=0;r<arguments.length;r++){var c=arguments[r];c&&(s=l(s,o(c)))}return s}function o(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var r="";for(var c in s)e.call(s,c)&&s[c]&&(r=l(r,c));return r}function l(s,r){return r?s?s+" "+r:s+r:s}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(ne);var Ye=ne.exports;const k=Ve(Ye),m=W.Classes.getClassNamespace(),Xe=`${m}-table-body-cells`,Ke=`${m}-table-body-virtual-client`,zt=`${m}-table-bottom-container`,se=`${m}-table-cell`,Qe=`${m}-table-cell-client`,qe=`${m}-table-cell-ghost`,oe=`${m}-table-cell-ledger-even`,le=`${m}-table-cell-ledger-odd`,Ze=`${m}-table-column-header-tr`,Je=`${m}-table-column-headers`,yt=`${m}-table-column-header-cell`,re=`${m}-table-column-name`,ce=`${m}-table-column-name-text`,tn=`${m}-table-container`,Tt=`${m}-table-dragging`,ie=`${m}-table-focus-region`,en=`${m}-table-has-reorder-handle`,mt=`${m}-table-header`,nn=`${m}-table-header-active`,ae=`${m}-table-header-content`,sn=`${m}-table-horizontal-guide`,Ot=`${m}-table-last-in-column`,ue=`${m}-table-last-in-row`,on=`${m}-table-menu`,ln=`${m}-table-no-horizontal-scroll`,rn=`${m}-table-no-vertical-scroll`,de=`${m}-table-no-wrap-text`,St=`${m}-table-overlay`,Bt=`${m}-table-overlay-layer`,cn=`${m}-table-pagination-bar`,Gt=`${m}-table-pagination-bar-controls`,Mt=`${m}-table-pagination-bar-text`,an=`${m}-table-pagination-layout`,un=`${m}-table-quadrant`,dn=`${m}-table-quadrant-body-container`,fn=`${m}-table-quadrant-left`,hn=`${m}-table-quadrant-main`,mn=`${m}-table-quadrant-scroll-container`,En=`${m}-table-quadrant-stack`,gn=`${m}-table-quadrant-top`,wn=`${m}-table-quadrant-top-left`,Ln=`${m}-table-region`,Cn=`${m}-table-reorder-handle`,Tn=`${m}-table-reorder-handle-target`,fe=`${m}-table-resize-guides`,he=`${m}-table-resize-handle`,me=`${m}-table-resize-handle-target`,xn=`${m}-table-resize-horizontal`,vn=`${m}-table-resize-vertical`,pn=`${m}-table-row-headers`,Pt=`${m}-table-row-headers-cells-container`,Ee=`${m}-table-row-name`,ge=`${m}-table-row-name-text`,An=`${m}-table-cell-with-expander`,Sn=`${m}-table-row-expander`,Nn=`${m}-table-row-detail`,Dt=`${m}-table-row-selected`,we=`${m}-table-row-selection-cell`,Le=`${m}-table-row-selection-checkbox`,_n=`${m}-table-row-selection-header-cell`,Rn=`${m}-table-selection-enabled`,Ce=`${m}-table-selection-region`,Mn=`${m}-table-th-menu`,In=`${m}-table-th-menu-container`,jn=`${m}-table-th-menu-container-background`,yn=`${m}-table-th-menu-open`,On=`${m}-table-thead`,Bn=`${m}-table-top-container`,Te=`${m}-table-truncated-cell`,xe=`${m}-table-truncated-text`,ve=`${m}-table-vertical-guide`;function pe(t,e){return typeof e=="number"?`${t}${e}`:e.indexOf(t)===0?e:`${t}${e}`}function $t(t){return pe(`${m}-table-cell-col-`,t)}function gt(t){return pe(`${m}-table-cell-row-`,t)}var ot=(t=>(t.CELLS="cells",t.FULL_ROWS="full-rows",t.FULL_COLUMNS="full-columns",t.FULL_TABLE="full-table",t))(ot||{}),Ft=(t=>(t.CELL="cell",t))(Ft||{}),Ae=(t=>(t.UP="up",t.DOWN="down",t.LEFT="left",t.RIGHT="right",t))(Ae||{});class p{static getRegionCardinality(e){return e.cols!=null&&e.rows!=null?"cells":e.cols!=null?"full-columns":e.rows!=null?"full-rows":"full-table"}static cell(e,n,o,l){return{cols:p.normalizeInterval(n,l),rows:p.normalizeInterval(e,o)}}static row(e,n){return{rows:p.normalizeInterval(e,n)}}static column(e,n){return{cols:p.normalizeInterval(e,n)}}static table(){return{}}static copy(e){const n=p.getRegionCardinality(e);return n==="cells"?p.cell(e.rows[0],e.cols[0],e.rows[1],e.cols[1]):n==="full-columns"?p.column(e.cols[0],e.cols[1]):n==="full-rows"?p.row(e.rows[0],e.rows[1]):p.table()}static update(e,n,o){const l=e.slice();return o!=null?l.splice(o,1,n):(l.pop(),l.push(n)),l}static clampRegion(e,n,o){const l=p.copy(e);return e.rows!=null&&(l.rows[0]=p.clamp(e.rows[0],0,n),l.rows[1]=p.clamp(e.rows[1],0,n)),e.cols!=null&&(l.cols[0]=p.clamp(e.cols[0],0,o),l.cols[1]=p.clamp(e.cols[1],0,o)),l}static expandRegion(e,n){const o=p.getRegionCardinality(e),l=p.getRegionCardinality(n);if(l!==o)return n;switch(l){case"full-rows":return p.row(Math.min(e.rows[0],n.rows[0]),Math.max(e.rows[1],n.rows[1]));case"full-columns":return p.column(Math.min(e.cols[0],n.cols[0]),Math.max(e.cols[1],n.cols[1]));case"cells":return p.cell(Math.min(e.rows[0],n.rows[0]),Math.min(e.cols[0],n.cols[0]),Math.max(e.rows[1],n.rows[1]),Math.max(e.cols[1],n.cols[1]));default:return p.table()}}static getRegionFromFocusedRegion(e){return p.cell(e.row,e.col)}static getCellRegionFromRegion(e,n,o){switch(p.getRegionCardinality(e)){case"full-table":return p.cell(0,0,n-1,o-1);case"full-columns":return p.cell(0,e.cols[0],n-1,e.cols[1]);case"full-rows":return p.cell(e.rows[0],0,e.rows[1],o-1);default:return p.cell(e.rows[0],e.cols[0],e.rows[1],e.cols[1])}}static getFocusCellCoordinatesFromRegion(e){switch(p.getRegionCardinality(e)){case"full-table":return{col:0,row:0};case"full-columns":return{col:e.cols[0],row:0};case"full-rows":return{col:0,row:e.rows[0]};default:return{col:e.cols[0],row:e.rows[0]}}}static regionsEqual(e,n){return p.intervalsEqual(e.rows,n.rows)&&p.intervalsEqual(e.cols,n.cols)}static findContainingRegion(e,n){if(e==null)return-1;for(let o=0;o<e.length;o++)if(p.regionContains(e[o],n))return o;return-1}static containsRegion(e,n){return p.overlapsRegion(e,n,!1)}static overlapsRegion(e,n,o=!1){const l=o?p.intervalOverlaps:p.intervalContains;if(e==null||n==null)return!1;for(const s of e)switch(p.getRegionCardinality(s)){case"full-table":return!0;case"full-columns":if(l(s.cols,n.cols))return!0;continue;case"full-rows":if(l(s.rows,n.rows))return!0;continue;case"cells":if(l(s.cols,n.cols)&&l(s.rows,n.rows))return!0;continue}return!1}static enumerateUniqueCells(e,n,o){if(e==null||e.length===0)return[];const l=new Set,s=[];for(const r of e)p.eachCellInRegion(r,n,o,(c,i)=>{const u=`${c}-${i}`;l.has(u)||(l.add(u),s.push({col:i,row:c}))});return s.sort((r,c)=>r.row-c.row||r.col-c.col),s}static joinStyledRegionGroups(e,n){const o=[];return e!=null&&e.length>0&&o.push({className:Ce,regions:e}),n!=null&&o.push({className:ie,regions:[p.getRegionFromFocusedRegion(n)]}),o}static regionContains(e,n){return p.overlapsRegion([e],n,!1)}static intervalContains(e,n){return e==null||n==null?!1:e[0]<=n[0]&&n[1]<=e[1]}static intervalOverlaps(e,n){return e==null||n==null?!1:e[0]<=n[1]&&n[0]<=e[1]}static eachCellInRegion(e,n,o,l){switch(p.getRegionCardinality(e)){case"full-table":for(let s=0;s<n;s++)for(let r=0;r<o;r++)l(s,r);break;case"full-columns":for(let s=0;s<n;s++)for(let r=e.cols[0];r<=e.cols[1];r++)l(s,r);break;case"full-rows":for(let s=e.rows[0];s<=e.rows[1];s++)for(let r=0;r<o;r++)l(s,r);break;case"cells":for(let s=e.rows[0];s<=e.rows[1];s++)for(let r=e.cols[0];r<=e.cols[1];r++)l(s,r);break}}static clamp(e,n,o){return Math.max(n,Math.min(o,e))}static intervalsEqual(e,n){return e==null?n==null:n==null?!1:e[0]===n[0]&&e[1]===n[1]}static normalizeInterval(e,n){return(n==null?[e,e]:[e,n]).sort((l,s)=>l-s)}}function Se(t){switch(t){case"up":return{rows:-1,cols:0};case"down":return{rows:1,cols:0};case"left":return{rows:0,cols:-1};case"right":return{rows:0,cols:1}}}function Dn(t,e){switch(e){case"up":return{...t,focusSelectionIndex:0,row:t.row-1};case"down":return{...t,focusSelectionIndex:0,row:t.row+1};case"left":return{...t,col:t.col-1,focusSelectionIndex:0};case"right":return{...t,col:t.col+1,focusSelectionIndex:0}}}function $n(t,e,n){if(p.getRegionCardinality(t)==="full-table")return t;const o=p.copy(t);let l=0,s=0;if(n!=null){const c=o.rows!=null&&n.row===o.rows[0],i=o.rows!=null&&n.row===o.rows[1],u=o.cols!=null&&n.col===o.cols[0],h=o.cols!=null&&n.col===o.cols[1];e==="up"?l=c&&!i?1:0:e==="down"?l=i&&!c?0:1:e==="left"?s=u&&!h?1:0:s=h&&!u?0:1}else l=e==="down"?1:0,s=e==="right"?1:0;const r=Se(e);return o.rows!=null&&(o.rows[l]+=r.rows),o.cols!=null&&(o.cols[s]+=r.cols),o}function Ne(t){return t.getStartVisibleLeafColumns().length}function dt(t){return t.getTopRows().length}function Et(t){return t.getStartTotalSize()}function xt(t,e){return e==="start"?t.getStartVisibleLeafColumns():t.getCenterVisibleLeafColumns()}function wt(t,e){return e==="start"?t.getStartTotalSize():t.getCenterTotalSize()}function Fn(t,e,n){return e.getIsPinned()==="start"?e.getStart("start"):Et(t)+e.getStart("center")-n}function _t(t,e){return e(dt(t))}function Wt(t,e,n){if(n<0)return;let o=0;const l=xt(t,e);let s=l.length-1;for(;o<=s;){const r=o+s>>1,c=l[r],i=c.getStart(e);if(n<i){s=r-1;continue}if(n>=i+c.getSize()){o=r+1;continue}return c.getIndex()}}function Vt(t,e,n,o,l){const s=dt(t),r=t.getRowModel().rows.length,c=e==="top"?0:s,i=e==="top"?s:r;if(n<0||c>=i)return;const u=o(c);let h=c,f=i-1;for(;h<=f;){const w=h+f>>1,v=o(w)-u;if(n<v){f=w-1;continue}if(n>=v+l(w)){h=w+1;continue}return w}}function bn({table:t,scrollContainerRef:e,rowHeaderWidth:n,columnHeaderHeight:o,getRowTop:l,getRowHeight:s},r,c){const i=e.current;if(i==null)return;const u=i.getBoundingClientRect(),h=r-u.left,f=c-u.top,w=Et(t),v=_t(t,l),S=h-n,L=S-w+i.scrollLeft,C=f-o,T=C-v+i.scrollTop,x=S>=0&&S<w?Wt(t,"start",S):Wt(t,"center",L),E=C>=0&&C<v?Vt(t,"top",C,l,s):Vt(t,"center",T,l,s);if(!(x==null||E==null))return{col:x,row:E}}class Un{constructor({table:e,target:n,selectedRegions:o,numRows:l,numCols:s}){ht(this,"target");ht(this,"regions");ht(this,"selectedRegions");ht(this,"numRows");ht(this,"numCols");ht(this,"targetRow");ht(this,"targetCell");var r;this.target=n,this.selectedRegions=o,this.numRows=l,this.numCols=s,this.regions=p.overlapsRegion(o,n)?o:[n],this.targetRow=e.getRowModel().rows[n.rows[0]],this.targetCell=(r=this.targetRow)==null?void 0:r.getVisibleCells()[n.cols[0]]}getTarget(){return this.target}getRegions(){return this.regions}getSelectedRegions(){return this.selectedRegions}getUniqueCells(){return p.enumerateUniqueCells(this.regions,this.numRows,this.numCols)}getTargetRow(){return this.targetRow}getTargetCell(){return this.targetCell}}function Hn(t){var u,h;const e=t.getVisibleLeafColumns(),n=t.state.columnPinning;if(n==null||(((u=n.start)==null?void 0:u.length)??0)+(((h=n.end)==null?void 0:h.length)??0)===0)return e;const o=new Map(e.map(f=>[f.id,f])),l=(n.start??[]).map(f=>o.get(f)).filter(f=>f!=null),s=(n.end??[]).map(f=>o.get(f)).filter(f=>f!=null),r=new Set(l.map(f=>f.id)),c=new Set(s.map(f=>f.id)),i=e.filter(f=>!r.has(f.id)&&!c.has(f.id));return[...l,...i,...s]}function kn(t,e,n){if(t.length===0)return null;const o=Math.max(0,Math.min(e,t.length-1)),l=Math.max(0,Math.min(n,t.length-1));let s=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(let c=o;c<=l;c++){const i=t[c];i<s&&(s=i),i>r&&(r=i)}return[s,r]}function zn(t,e,n){if(t.length===0)return null;let o=0,l=t.length-1,s=-1;for(;o<=l;){const c=o+l>>1;t[c].getDisplayIndex()>=e?(s=c,l=c-1):o=c+1}if(s<0||t[s].getDisplayIndex()>n)return null;o=s,l=t.length-1;let r=s;for(;o<=l;){const c=o+l>>1;t[c].getDisplayIndex()<=n?(r=c,o=c+1):l=c-1}return[s,r]}function Gn(t,e,n,o){const l=t[0]===0&&t[1]===n-1,s=e[0]===0&&e[1]===o-1;return l&&s?p.table():s?p.row(t[0],t[1]):l?p.column(e[0],e[1]):p.cell(t[0],e[0],t[1],e[1])}function Yt(t){const e=t.getCellSelectionBounds();if(e.length===0)return[];const n=t.getRowModel().rows,l=Hn(t).map(r=>r.getIndex()),s=[];for(const r of e){const c=zn(n,r.minRowIndex,r.maxRowIndex),i=kn(l,r.minColumnIndex,r.maxColumnIndex);c==null||i==null||s.push(Gn(c,i,n.length,l.length))}return s}function Pn(t,e){if(e==null||e.length===0)return[];const n=t.getRowModel().rows,o=t.getVisibleLeafColumns();if(n.length===0||o.length===0)return[];const l=[];for(const s of e){let r,c;switch(p.getRegionCardinality(s)){case ot.FULL_TABLE:r=[0,n.length-1],c=[0,o.length-1];break;case ot.FULL_COLUMNS:r=[0,n.length-1],c=s.cols;break;case ot.FULL_ROWS:r=s.rows,c=[0,o.length-1];break;default:r=s.rows,c=s.cols;break}r[0]<0||r[1]>=n.length||c[0]<0||c[1]>=o.length||l.push({anchorRowId:n[r[0]].id,anchorColumnId:o[c[0]].id,focusRowId:n[r[1]].id,focusColumnId:o[c[1]].id})}return l}function Xt(t){const e=t.getFocusedCell();if(e==null)return;const n=t.getRowModel().rows.indexOf(e.row);if(!(n<0))return{row:n,col:e.column.getIndex()}}function Wn(t,e){const n=t.getRowModel().rows[e.row],o=t.getVisibleLeafColumns()[e.col];if(!(n==null||o==null))return n.getAllCellsByColumnId()[o.id]}function Kt(t){return JSON.stringify(t.map(e=>({rows:e.rows??null,cols:e.cols??null})))}function Vn({table:t,getRowTop:e,getRowHeight:n,scrollContainerRef:o,rowHeaderWidth:l,columnHeaderHeight:s,bodyContextMenuRenderer:r,enableBodyContextMenu:c,enableFocusedCell:i=!1,onFocusedCell:u,onFocusedRegion:h,selectedRegions:f,onSelection:w,selectionModes:v}){const S=f!=null,L=c??r!=null,C=d.useRef(!1),T=d.useRef(void 0),x=d.useCallback(g=>v==null?!0:v.includes(g),[v]),E=t.state.cellSelection,b=t.state.columnPinning,y=t.getRowModel().rows,U=t.getVisibleLeafColumns(),_=d.useMemo(()=>Yt(t),[E,b,y,t,U]),R=d.useMemo(()=>i?Xt(t):void 0,[E,i,y,t]),z=d.useMemo(()=>{const g=[];return _.length>0&&g.push({className:Ce,regions:_}),R!=null&&g.push({className:ie,regions:[p.cell(R.row,R.col)]}),g},[R,_]);d.useEffect(()=>{if(!S)return;const g=Kt(f??[]);T.current!==g&&(T.current=g,t.setCellSelection(Pn(t,f)))},[f,S,t]);const q=d.useRef(null),N=d.useRef(!1);d.useEffect(()=>{const g=Kt(_);if(q.current!==g){if(q.current=g,!N.current){N.current=!0;return}S&&T.current===g||w==null||w(_)}},[S,w,_]);const O=d.useRef(null);d.useEffect(()=>{if(!i)return;const g=R!=null?`${R.row}-${R.col}`:null;O.current!==g&&(O.current=g,R!=null&&(u==null||u(R),h==null||h({type:Ft.CELL,row:R.row,col:R.col,focusSelectionIndex:0})))},[i,R,u,h]);const F=d.useCallback(()=>{var g;i&&((g=o.current)==null||g.focus())},[i,o]),M=d.useCallback(()=>{const g=Xt(t);if(g==null)return;const A=o.current;if(A==null)return;const $=t.getVisibleLeafColumns()[g.col];if($==null)return;const X=Ne(t),Z=Et(t),ct=dt(t),nt=_t(t,e),tt=$.getStart(),it=tt+$.getSize(),ut=e(g.row),P=ut+n(g.row),V=A.clientWidth-l-Z,st=A.clientHeight-s-nt;let et=A.scrollLeft,rt=A.scrollTop;if(g.col>=X){const at=tt-Z,ft=it-Z;at<et?et=Math.max(0,at):ft>et+V&&(et=ft-V)}if(g.row>=ct){const at=ut-nt,ft=P-nt;at<rt?rt=Math.max(0,at):ft>rt+st&&(rt=ft-st)}et!==A.scrollLeft&&(A.scrollLeft=et),rt!==A.scrollTop&&(A.scrollTop=rt)},[s,n,e,l,o,t]);d.useEffect(()=>{C.current&&(C.current=!1,M())},[E,M,t]);const Y=d.useCallback(g=>{const A=g.metaKey||g.ctrlKey,H=g.key;let $;if(H==="ArrowUp"?$="up":H==="ArrowDown"?$="down":H==="ArrowLeft"?$="left":H==="ArrowRight"&&($="right"),$!=null){g.preventDefault(),g.stopPropagation(),g.shiftKey?t.extendCellSelection($):i&&(C.current=!0,t.moveCellSelection($));return}if(H==="Tab"&&i){g.preventDefault(),g.stopPropagation(),C.current=!0,t.moveCellSelection(g.shiftKey?"left":"right");return}if(H==="Escape"){g.preventDefault(),g.stopPropagation(),t.resetCellSelection(!0);return}A&&H.toLowerCase()==="a"&&(g.preventDefault(),g.stopPropagation(),t.selectAllCells())},[i,t]),I=d.useCallback((g,A)=>bn({table:t,scrollContainerRef:o,rowHeaderWidth:l,columnHeaderHeight:s,getRowTop:e,getRowHeight:n},g,A),[s,n,e,l,o,t]),j=d.useCallback(g=>{g.button===0&&F()},[F]),B=d.useCallback(g=>{if(!L)return;const A=I(g.clientX,g.clientY);if(A==null)return;const H=Wn(t,A);H!=null&&(H.getIsSelected()||x(ot.CELLS)&&t.setCellSelection([{anchorRowId:H.row.id,anchorColumnId:H.column.id,focusRowId:H.row.id,focusColumnId:H.column.id}]))},[I,L,x,t]),D=d.useCallback(g=>{if(!L||r==null)return;const A=I(g.clientX,g.clientY);if(A==null)return;const H=new Un({table:t,target:p.cell(A.row,A.col),selectedRegions:Yt(t),numRows:t.getRowModel().rows.length,numCols:t.getVisibleLeafColumns().length});return r(H)??void 0},[r,I,L,t]),G=d.useCallback((g,A)=>{if(!x(ot.FULL_COLUMNS)){t.resetCellSelection(!0),F();return}A.preventDefault(),A.stopPropagation();const H=t.getRowModel().rows,$=t.getVisibleLeafColumns()[g];$==null||H.length===0||(A.shiftKey?t.setCellSelection(X=>{const Z=X[X.length-1];return Z==null?[{anchorRowId:H[0].id,anchorColumnId:$.id,focusRowId:H[H.length-1].id,focusColumnId:$.id}]:[...X.slice(0,-1),{...Z,focusColumnId:$.id}]}):t.setCellSelection([{anchorRowId:H[0].id,anchorColumnId:$.id,focusRowId:H[H.length-1].id,focusColumnId:$.id}]),F())},[F,x,t]),J=d.useCallback((g,A)=>{if(!x(ot.FULL_ROWS)){t.resetCellSelection(!0),F();return}A.preventDefault(),A.stopPropagation();const H=t.getRowModel().rows,$=t.getVisibleLeafColumns(),X=H[g];X==null||$.length===0||(A.shiftKey?t.setCellSelection(Z=>{const ct=Z[Z.length-1];return ct==null?[{anchorRowId:X.id,anchorColumnId:$[0].id,focusRowId:X.id,focusColumnId:$[$.length-1].id}]:[...Z.slice(0,-1),{...ct,focusRowId:X.id}]}):t.setCellSelection([{anchorRowId:X.id,anchorColumnId:$[0].id,focusRowId:X.id,focusColumnId:$[$.length-1].id}]),F())},[F,x,t]),lt=d.useCallback(g=>{if(!x(ot.FULL_TABLE)){t.resetCellSelection(!0),F();return}g.preventDefault(),g.stopPropagation(),t.selectAllCells(),F()},[F,x,t]);return{regionGroups:z,handleBodyContextMenu:B,handleBodyPointerDown:j,handleColumnHeaderMouseDown:G,handleKeyDown:Y,handleMenuMouseDown:lt,handleRowHeaderMouseDown:J,isBodyContextMenuEnabled:L,isSelectionModeEnabled:x,renderBodyContextMenu:D}}function Yn({minHeight:t,headerRowCount:e}){const n=d.useRef(null),[o,l]=d.useState(null);d.useLayoutEffect(()=>{const r=n.current;if(r==null)return;const c=()=>{const u=r.getBoundingClientRect().height;u>0&&l(h=>h===u?h:u)};c();const i=new ResizeObserver(c);return i.observe(r),()=>i.disconnect()},[]);const s=Math.max(0,e)*ee;return{ref:n,height:Math.max(t,s,o??0)}}function Xn({enableGhostCells:t,rowHeight:e,rowHeaderWidth:n,columnHeaderHeight:o,totalWidth:l,totalHeight:s,scrollContainerRef:r}){const[c,i]=d.useState(null);if(d.useLayoutEffect(()=>{const v=r.current;if(v==null)return;const S=()=>{i({width:v.clientWidth,height:v.clientHeight})};S();const L=new ResizeObserver(S);return L.observe(v),()=>L.disconnect()},[r]),!t||c==null)return;const u=c.width-n-l,h=c.height-o-s,f=u>0?Math.min(Math.ceil(u/kt),Pe):0,w=h>0?Math.min(Math.ceil(h/e),We):0;if(!(f===0&&w===0))return{columnCount:f,rowCount:w,columnWidth:kt,rowHeight:e}}function _e(t,e){return e==null?t:t+e.columnCount*e.columnWidth}const Kn=6,Qn=100;function qn({rowHeight:t,rowCount:e,getDetailHeight:n,rowHeights:o,defaultRowHeights:l,enableRowResizing:s=!1,minRowHeight:r=Kn,maxRowHeight:c=Qn,onRowHeightChanged:i}){const u=o!=null,[h,f]=d.useState(l??[]),[w,v]=d.useState(null),[S,L]=d.useState(null),C=d.useRef(null),T=d.useCallback(I=>u?o[I]??t:h[I]??(l==null?void 0:l[I])??t,[l,h,u,t,o]),{rowTops:x,totalHeight:E}=d.useMemo(()=>{const I=new Array(e+1);let j=0;for(let B=0;B<e;B++)I[B]=j,j+=T(B)+((n==null?void 0:n(B))??0);return I[e]=j,{rowTops:I,totalHeight:j}},[n,T,e]),b=d.useCallback(I=>x[I]??0,[x]),y=d.useCallback(I=>x[I+1]-x[I],[x]),U=d.useRef(T);U.current=T;const _=d.useRef(x);_.current=x;const R=d.useRef(s);R.current=s;const z=d.useRef(u);z.current=u;const q=d.useRef(r);q.current=r;const N=d.useRef(c);N.current=c;const O=d.useRef(i);O.current=i;const F=d.useCallback(I=>{var G,J;const j=C.current;if(j==null)return;const B="touches"in I?(G=I.touches[0])==null?void 0:G.clientY:I.clientY;if(B==null)return;const D=Math.min(j.max,Math.max(j.min,j.startHeight+(B-j.startY)));z.current||f(lt=>{const g=lt.slice();return g[j.index]=D,g}),(J=O.current)==null||J.call(O,j.index,D),L(j.rowTop+D)},[]),M=d.useCallback(()=>{C.current=null,v(null),L(null),window.removeEventListener("mousemove",F),window.removeEventListener("mouseup",M),window.removeEventListener("touchmove",F),window.removeEventListener("touchend",M),window.removeEventListener("touchcancel",M)},[F]),Y=d.useCallback((I,j)=>{var J;if(!R.current)return;j.preventDefault(),j.stopPropagation();const B="touches"in j?(J=j.touches[0])==null?void 0:J.clientY:j.clientY;if(B==null)return;const D=_.current[I]??0,G=U.current(I);C.current={index:I,startY:B,startHeight:G,rowTop:D,min:q.current,max:N.current},v(I),L(D+G),window.addEventListener("mousemove",F),window.addEventListener("mouseup",M),window.addEventListener("touchmove",F),window.addEventListener("touchend",M),window.addEventListener("touchcancel",M)},[F,M]);return d.useEffect(()=>()=>{window.removeEventListener("mousemove",F),window.removeEventListener("mouseup",M),window.removeEventListener("touchmove",F),window.removeEventListener("touchend",M),window.removeEventListener("touchcancel",M)},[F,M]),{enabled:s,getRowHeight:T,getRowSpanHeight:y,getRowTop:b,totalHeight:E,resizingRowIndex:w,resizingGuideTop:S,startRowResize:Y}}const Re=d.createContext(null);function vt(){return d.useContext(Re)}const Me=d.createContext(null);function Zn(){return d.useContext(Me)}function Jn(t,e){return e<t?e:t<=e&&e<t+1?t:Math.max(0,e-1)}function ts(t,e,n,o,l){const[s,r]=d.useState(null),[c,i]=d.useState(null),u=d.useRef(null),h=d.useCallback(C=>{var U,_;const T=((U=n.current)==null?void 0:U.getBoundingClientRect().left)??0,x=((_=o.current)==null?void 0:_.scrollLeft)??0,E=Et(t),b=C-T-l;if(b<E){let R=0;for(const z of xt(t,"start"))if(z.getStart("start")+z.getSize()/2<b)R++;else break;return R}let y=Ne(t);for(const R of xt(t,"center"))if(E+R.getStart("center")-x+R.getSize()/2<b)y++;else break;return y},[n,l,o,t]),f=d.useCallback(C=>{var U;const T=u.current;if(u.current=null,r(null),i(null),T==null)return;const x=t.getVisibleLeafColumns(),E=(U=x[T.oldIndex])==null?void 0:U.id;if(E==null)return;const b=Jn(T.oldIndex,h(C)),y=x.map(_=>_.id).filter(_=>_!==E);y.splice(b,0,E),t.setColumnOrder(y)},[h,t]),w=d.useCallback(C=>{u.current!=null&&i(h(C.clientX))},[h]),v=d.useCallback(C=>{f(C.clientX)},[f]),S=d.useCallback((C,T)=>{e&&(T.preventDefault(),u.current={oldIndex:C.getIndex()},r(C.id),i(h(T.clientX)),window.addEventListener("pointermove",w),window.addEventListener("pointerup",v),window.addEventListener("pointercancel",v))},[e,h,w,v]);return d.useEffect(()=>()=>{window.removeEventListener("pointermove",w),window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v)},[w,v]),{contextValue:d.useMemo(()=>({enableColumnReordering:e,reorderingColumnId:s,startReorder:S}),[e,s,S]),guideIndex:c,reorderingColumnId:s}}function es({table:t,reorderingColumnId:e,guideIndex:n,rowHeaderWidth:o,scrollLeft:l}){if(e==null||n==null)return null;const s=t.getVisibleLeafColumns(),r=t.getStartVisibleLeafColumns().length,c=s[n],i=Et(t);let u;return n<=r?u=n<r&&c!=null?c.getStart("start"):i:c!=null?u=i+c.getStart("center")-l:u=i+wt(t,"center")-l,a.jsx("div",{className:k(fe,Bt),children:a.jsx("div",{className:k(St,ve),style:{left:o+u}})})}function ns({table:t,rowHeaderWidth:e,columnHeaderHeight:n,scrollLeft:o,scrollTop:l,frozenRowCount:s,resizingGuideTop:r=null,resizingRowIndex:c=null}){const i=t.state.columnResizing,u=i==null?void 0:i.isResizingColumn,h=u!=null&&u!==!1?t.getColumn(u):void 0,f=h!=null?e+Fn(t,h,o)+h.getSize()+((i==null?void 0:i.deltaOffset)??0):null,w=r!=null&&c!=null?n+r-(c<s?0:l):null;return f==null&&w==null?null:a.jsxs("div",{className:k(fe,Bt),children:[f!=null&&a.jsx("div",{className:k(St,ve),style:{left:f}}),w!=null&&a.jsx("div",{className:k(St,sn),style:{top:w}})]})}function ss({row:t,rowIndex:e,rowExpanderButtonProps:n,rowExpanderIconProps:o}){const l=t.getIsExpanded(),s=typeof n=="function"?n(t):n,r=typeof o=="function"?o(t):o;return a.jsx("button",{type:"button","aria-expanded":l,"aria-label":`${l?"Collapse":"Expand"} row ${e+1}`,...s,className:k(Sn,s==null?void 0:s.className),onMouseDown:c=>{var i;c.stopPropagation(),(i=s==null?void 0:s.onMouseDown)==null||i.call(s,c)},onPointerDown:c=>{var i;c.stopPropagation(),(i=s==null?void 0:s.onPointerDown)==null||i.call(s,c)},onKeyDown:c=>{var i;c.stopPropagation(),(i=s==null?void 0:s.onKeyDown)==null||i.call(s,c)},onClick:c=>{var i;(i=s==null?void 0:s.onClick)==null||i.call(s,c),c.defaultPrevented||t.toggleExpanded()},children:a.jsx(W.Icon,{icon:l?"caret-down":"caret-right",size:14,...r})})}function Lt({loading:t,variableLength:e=!1,children:n}){if(t){const o=e?75-Math.floor(Math.random()*11)*5:100;return a.jsx("div",{className:W.Classes.SKELETON,style:{width:`${o}%`}})}return a.jsx(a.Fragment,{children:n})}function os({table:t,cell:e,cellProps:n,rowIndex:o,rowTop:l,columnRegion:s,rowHeight:r,loading:c,isExpansionCell:i,rowExpanderButtonProps:u,rowExpanderIconProps:h,isLastInRow:f,isLastInColumn:w}){var b,y,U;const v=e.column.getSize(),S=e.column.getStart(s),L=i&&((y=(b=e.row).getCanExpand)==null?void 0:y.call(b)),C=(U=e.column.columnDef.meta)==null?void 0:U.bodyCellClassName,T=L&&!c,x=i&&e.row.depth>0?{paddingInlineStart:e.row.depth*16}:void 0,E=a.jsx("div",{className:k(xe,de),style:T?void 0:x,children:a.jsx(Lt,{loading:c,variableLength:!0,children:a.jsx(t.FlexRender,{cell:e})})});return a.jsx("div",{...n,className:k(se,Te,gt(o),$t(e.column.getIndex()),o%2===0?oe:le,{[ue]:f,[Ot]:w,[W.Classes.LOADING]:c,[Dt]:e.row.getIsSelected()},C,n==null?void 0:n.className),style:{...n==null?void 0:n.style,height:r,left:S,position:"absolute",top:l,width:v},onMouseDown:_=>{var R;(R=n==null?void 0:n.onMouseDown)==null||R.call(n,_),!_.defaultPrevented&&_.button===0&&e.getSelectionStartHandler()(_)},onMouseEnter:_=>{var R;(R=n==null?void 0:n.onMouseEnter)==null||R.call(n,_),_.defaultPrevented||e.getSelectionExtendHandler()(_)},children:T?a.jsxs("div",{className:An,style:x,children:[a.jsx(ss,{row:e.row,rowIndex:o,rowExpanderButtonProps:u,rowExpanderIconProps:h}),E]}):E})}function It({columnIndex:t,rowIndex:e,left:n,top:o,width:l,height:s,loading:r}){return a.jsx("div",{className:k(se,qe,Te,gt(e),$t(t),e%2===0?oe:le,{[W.Classes.LOADING]:r}),style:{height:s,left:n,position:"absolute",top:o,width:l},children:a.jsx("div",{className:k(xe,de),children:a.jsx(Lt,{loading:r,variableLength:!0})})})}function ls({table:t,ghosts:e,loading:n,columnRegion:o,rowRegion:l,rowIndices:s,regionTop:r,regionHeight:c,getRowTop:i,getRowHeight:u}){const h=t.getRowModel().rows,f=t.getVisibleLeafColumns().length,w=wt(t,o),v=xt(t,o),S=o==="center",L=l==="center";return a.jsxs(a.Fragment,{children:[S&&s.map(C=>{var T;return a.jsx(d.Fragment,{children:Array.from({length:e.columnCount}).map((x,E)=>a.jsx(It,{columnIndex:f+E,rowIndex:C,left:w+E*e.columnWidth,top:i(C)-r,width:e.columnWidth,height:u(C),loading:n},`ghost-column-cell-${C}-${E}`))},`ghost-column-cells-${((T=h[C])==null?void 0:T.id)??C}`)}),L&&Array.from({length:e.rowCount}).map((C,T)=>{const x=h.length+T,E=c+T*e.rowHeight;return a.jsxs(d.Fragment,{children:[v.map(b=>a.jsx(It,{columnIndex:b.getIndex(),rowIndex:x,left:b.getStart(o),top:E,width:b.getSize(),height:e.rowHeight,loading:n},`ghost-row-cell-${T}-${b.id}`)),S&&Array.from({length:e.columnCount}).map((b,y)=>a.jsx(It,{columnIndex:f+y,rowIndex:x,left:w+y*e.columnWidth,top:E,width:e.columnWidth,height:e.rowHeight,loading:n},`ghost-corner-cell-${T}-${y}`))]},`ghost-row-cells-${T}`)})]})}function Qt(t,e,n){let o=null,l=0;for(const s of xt(t,e)){const r=s.getIndex();r<n[0]||r>n[1]||(o==null&&(o=s.getStart(e)),l+=s.getSize())}return o==null?null:{offset:o,size:l}}function qt(t,e,n,o,l){const s=dt(t),r=t.getRowModel().rows.length,c=Math.max(n[0],e==="top"?0:s),i=Math.min(n[1],e==="top"?s-1:r-1);if(c>i)return null;const u=e==="center"?rs(t,e,o):0;return{offset:o(c)-u,size:o(i)+l(i)-o(c)}}function rs(t,e,n){return e==="center"?n(dt(t)):0}function cs(t,e,n,o,l,s){const r=p.getRegionCardinality(e),c={offset:0,size:wt(t,n)},i=dt(t),u=t.getRowModel().rows.length,h={offset:0,size:(o==="top"?i:u-i)===0?0:l(o==="top"?i-1:u-1)+s(o==="top"?i-1:u-1)-l(o==="top"?0:i)};let f,w;switch(r){case ot.CELLS:f=Qt(t,n,e.cols),w=qt(t,o,e.rows,l,s);break;case ot.FULL_COLUMNS:f=Qt(t,n,e.cols),w=h;break;case ot.FULL_ROWS:f=c,w=qt(t,o,e.rows,l,s);break;default:f=c,w=h;break}return f==null||w==null||f.size<=0||w.size<=0?null:{height:w.size,left:f.offset,top:w.offset,width:f.size}}function is({table:t,regionGroups:e,columnRegion:n,rowRegion:o,getRowTop:l,getRowHeight:s}){return a.jsx("div",{className:Bt,"aria-hidden":!0,children:e.map((r,c)=>r.regions.map((i,u)=>{const h=cs(t,i,n,o,l,s);return h==null?null:a.jsx("div",{className:k(St,Ln,r.className),style:h},`${c}-${u}`)}))})}function as({table:t,renderRowDetail:e,getCellProps:n,rowExpanderButtonProps:o,rowExpanderIconProps:l,columnRegion:s,rowRegion:r,offsetTop:c=0,offsetLeft:i=0,areCellsLoading:u,rowVirtualizer:h,rowResizing:f,ghosts:w,className:v,...S}){const L=vt(),C=L!=null&&L.isBodyContextMenuEnabled,T=t.getRowModel().rows,x=dt(t),E=r==="top",b=E?x:T.length-x,y=E?0:f.getRowTop(x),U=E?f.getRowTop(x):f.totalHeight-f.getRowTop(x),_=wt(t,s),R=t.getStartVisibleLeafColumns().length>0?"start":"center",z=t.getCenterVisibleLeafColumns().length>0?"center":"start",N=!E&&h!=null?h.getVirtualItems():void 0,O=N!=null?N.map(M=>x+M.index):Array.from({length:b},(M,Y)=>E?Y:x+Y),F=E?x-1:T.length-1;return a.jsx("div",{...S,className:k(dn,v),style:{paddingLeft:i,paddingTop:c},children:a.jsx("div",{children:a.jsxs(W.ContextMenu,{className:k(Ke,Qe),style:{height:U,width:_},onPointerDown:L==null?void 0:L.handleBodyPointerDown,disabled:!C,onContextMenu:C?L==null?void 0:L.handleBodyContextMenu:void 0,content:({mouseEvent:M})=>M==null||L==null?void 0:L.renderBodyContextMenu(M),children:[a.jsxs("div",{className:Xe,children:[O.map(M=>{const Y=T[M];if(Y==null)return null;const I=s==="start"?Y.getStartVisibleCells():Y.getCenterVisibleCells(),j=f.getRowTop(M)-y,B=f.getRowHeight(M),D=f.getRowSpanHeight(M)-B;return a.jsxs(d.Fragment,{children:[I.map((G,J)=>a.jsx(os,{table:t,cell:G,cellProps:n==null?void 0:n(G),rowExpanderButtonProps:o,rowExpanderIconProps:l,isExpansionCell:s===R&&J===0,rowIndex:M,rowTop:j,columnRegion:s,rowHeight:B,loading:u,isLastInRow:J===I.length-1,isLastInColumn:M===F},G.id)),D>0&&s===z&&a.jsx("div",{className:Nn,style:{top:j+B,height:D,width:_},onPointerDown:G=>G.stopPropagation(),onKeyDown:G=>G.stopPropagation(),onContextMenu:G=>G.stopPropagation(),children:e==null?void 0:e(Y)})]},Y.id)}),w!=null&&a.jsx(ls,{table:t,ghosts:w,loading:u,columnRegion:s,rowRegion:r,rowIndices:O,regionTop:y,regionHeight:U,getRowTop:f.getRowTop,getRowHeight:f.getRowHeight})]}),L!=null&&L.regionGroups.length>0&&a.jsx(is,{table:t,regionGroups:L.regionGroups,columnRegion:s,rowRegion:r,getRowTop:f.getRowTop,getRowHeight:f.getRowHeight})]})})})}function us({row:t,rowIndex:e,rowHeight:n,detailHeight:o,loading:l,isLastInColumn:s,isResizing:r=!1,onResizeStart:c,className:i,...u}){const h=vt();return a.jsxs("div",{...u,className:k(mt,gt(e),{[Ot]:s,[W.Classes.LOADING]:l,[Dt]:(t==null?void 0:t.getIsSelected())??!1},i),style:{marginBottom:o,flexBasis:n,height:n,minHeight:0},onMouseDown:f=>h==null?void 0:h.handleRowHeaderMouseDown(e,f),children:[a.jsx("div",{className:Ee,children:a.jsx("div",{className:ge,children:a.jsx(Lt,{loading:l,children:a.jsx("span",{children:e+1})})})}),!l&&c!=null&&a.jsx("div",{className:k(me,xn,{[Tt]:r}),onMouseDown:c,onTouchStart:c,children:a.jsx("div",{className:k(he,{[Tt]:r})})})]})}function ds({row:t,rowIndex:e,rowHeight:n,detailHeight:o,loading:l,isLastInColumn:s}){const r=(t==null?void 0:t.getIsSelected())??!1;return a.jsx("div",{className:k(mt,we,gt(e),{[Ot]:s,[W.Classes.LOADING]:l,[Dt]:r}),style:{marginBottom:o,height:n},children:!l&&t!=null&&a.jsx("div",{className:Le,children:a.jsx(W.Checkbox,{"aria-label":`Select row ${e+1}`,checked:r,disabled:!t.getCanSelect(),onChange:c=>t.getToggleSelectedHandler()(c)})})})}function Zt({table:t,rowRegion:e,rowHeaderWidth:n,enableRowHeader:o=!0,selectionColumnWidth:l=0,areRowHeadersLoading:s,rowVirtualizer:r,rowResizing:c,ghosts:i,className:u,...h}){if(!o&&l===0)return null;const f=t.getRowModel().rows,w=o?n:0,v=dt(t),S=e==="top",L=S?0:v,C=S?v:f.length-v,T=S?c.getRowTop(v):c.totalHeight-c.getRowTop(v),E=!S&&r!=null?r.getVirtualItems():void 0,b=(r==null?void 0:r.options.scrollMargin)??0,y=E!=null&&E.length>0?E[0].start-b:0,U=E!=null&&E.length>0?T-(E[E.length-1].end-b):0,_=E!=null?E.map(N=>v+N.index):Array.from({length:C},(N,O)=>L+O),R=S?v-1:f.length-1,z={height:T,transform:"translateY(0px)",paddingTop:y,paddingBottom:U},q=i!=null&&!S?Array.from({length:i.rowCount},(N,O)=>f.length+O):[];return a.jsx("div",{...h,className:k(pn,u),style:{width:w+l},children:a.jsxs("div",{style:{display:"flex",height:T},children:[o&&a.jsx("div",{style:{flex:"0 0 auto",width:n},children:a.jsxs("div",{className:Pt,style:z,children:[_.map(N=>{var O;return a.jsx(us,{row:f[N],rowIndex:N,rowHeight:c.getRowHeight(N),detailHeight:c.getRowSpanHeight(N)-c.getRowHeight(N),loading:s,isLastInColumn:N===R,isResizing:c.resizingRowIndex===N,onResizeStart:c.enabled?F=>c.startRowResize(N,F):void 0},((O=f[N])==null?void 0:O.id)??N)}),q.map((N,O)=>a.jsx("div",{className:k(mt,gt(N),{[W.Classes.LOADING]:s}),style:{flexBasis:i==null?void 0:i.rowHeight,height:i==null?void 0:i.rowHeight,minHeight:0},children:a.jsx("div",{className:Ee,children:a.jsx("div",{className:ge,children:a.jsx(Lt,{loading:s})})})},`ghost-row-header-${O}`))]})}),l>0&&a.jsx("div",{style:{flex:"0 0 auto",width:l},children:a.jsxs("div",{className:Pt,style:z,children:[_.map(N=>{var O;return a.jsx(ds,{row:f[N],rowIndex:N,rowHeight:c.getRowHeight(N),detailHeight:c.getRowSpanHeight(N)-c.getRowHeight(N),loading:s,isLastInColumn:N===R},((O=f[N])==null?void 0:O.id)??N)}),q.map((N,O)=>a.jsx("div",{className:k(mt,we,gt(N),{[W.Classes.LOADING]:s}),style:{height:i==null?void 0:i.rowHeight}},`ghost-row-selection-${O}`))]})})]})})}function fs({header:t,isOpen:e,onOpenChange:n}){const o=t.column.getIsSorted(),l=r=>{t.column.toggleSorting(r),n(!1)},s=()=>{t.column.clearSorting(),n(!1)};return a.jsxs("div",{className:k(In,{[yn]:e}),children:[a.jsx("div",{className:jn}),a.jsx(W.PopoverNext,{className:Mn,content:a.jsxs(W.Menu,{children:[a.jsx(W.MenuItem,{icon:"sort-asc",text:"Sort Asc",onClick:()=>l(!1)}),a.jsx(W.MenuItem,{icon:"sort-desc",text:"Sort Desc",onClick:()=>l(!0)}),o&&a.jsx(W.MenuItem,{icon:"sort",text:"Clear Sort",onClick:s})]}),isOpen:e,onInteraction:n,placement:"bottom",rootBoundary:"viewport",children:a.jsx(W.Icon,{icon:"chevron-down"})})]})}function hs({table:t,header:e,isLastInRow:n,enableSorting:o=!1,loading:l}){var x;const s=e.getSize(),r=e.column.getIsResizing(),c=e.getResizeHandler(),i=typeof e.column.columnDef.header=="string"?e.column.columnDef.header:void 0,u=Zn(),h=vt(),f=(u==null?void 0:u.enableColumnReordering)??!1,w=(u==null?void 0:u.reorderingColumnId)===e.column.id,v=o&&e.column.getCanSort(),S=(x=e.column.columnDef.meta)==null?void 0:x.headCellClassName,[L,C]=d.useState(!1),T=e.column.getIndex();return a.jsxs("div",{className:k(mt,$t(T),yt,{[ue]:n},{[en]:f},{[nn]:L},{[W.Classes.LOADING]:l},S),style:{flexBasis:s,minWidth:0,width:s},onMouseDown:E=>h==null?void 0:h.handleColumnHeaderMouseDown(T,E),children:[a.jsxs("div",{className:re,title:i,children:[f&&a.jsx("div",{className:k(Tn,{[Tt]:w}),onPointerDown:E=>u==null?void 0:u.startReorder(e.column,E),children:a.jsx("div",{className:Cn,children:a.jsx(Fe.DragHandleVerticalIcon,{title:"Press down to drag"})})}),v&&!l&&a.jsx(fs,{table:t,header:e,isOpen:L,onOpenChange:C}),a.jsx("div",{className:ce,children:a.jsx(Lt,{loading:l,variableLength:!0,children:a.jsx(t.FlexRender,{header:e})})})]}),a.jsx("div",{className:ae}),!l&&a.jsx("div",{className:k(me,vn,{[Tt]:r}),onMouseDown:c,onTouchStart:c,children:a.jsx("div",{className:k(he,{[Tt]:r})})})]})}function ms({table:t,headerGroup:e,columnRegion:n,enableSorting:o=!1,areColumnHeadersLoading:l,ghosts:s}){var i;const r=(i=e.headers[e.headers.length-1])==null?void 0:i.id,c=_e(wt(t,n),s);return a.jsxs("div",{className:k(On,Ze),style:{transform:"translateX(0px)",width:c},children:[e.headers.map(u=>a.jsx(hs,{table:t,header:u,isLastInRow:u.id===r,enableSorting:o,loading:l},u.id)),s!=null&&Array.from({length:s.columnCount}).map((u,h)=>a.jsxs("div",{className:k(mt,yt,{[W.Classes.LOADING]:l}),style:{flexBasis:s.columnWidth,minWidth:0,width:s.columnWidth},children:[a.jsx("div",{className:re,children:a.jsx("div",{className:ce,children:a.jsx(Lt,{loading:l,variableLength:!0})})}),a.jsx("div",{className:ae})]},`ghost-column-header-${h}`))]})}function Es({table:t,columnRegion:e,enableSorting:n=!1,areColumnHeadersLoading:o,ghosts:l,className:s,...r}){const c=e==="start"?t.getStartHeaderGroups():t.getCenterHeaderGroups(),i=e==="center"?l:void 0,u=_e(wt(t,e),i);return a.jsx("div",{...r,className:k(Je,s),children:a.jsx("div",{style:{width:u},children:c.map(h=>a.jsx(ms,{table:t,headerGroup:h,columnRegion:e,enableSorting:n,areColumnHeadersLoading:o,ghosts:i},h.id))})})}function gs({width:t,height:e,className:n,...o}){const l=vt();return a.jsx("div",{...o,className:k(on,n),style:{width:t,height:e},onMouseDown:l==null?void 0:l.handleMenuMouseDown})}function ws({table:t,width:e,height:n,loading:o=!1}){const l=t.getIsAllRowsSelected(),s=t.getIsSomeRowsSelected();return a.jsx("div",{className:k(mt,yt,_n),style:{flex:"0 0 auto",height:n,width:e},children:!o&&a.jsx("div",{className:Le,children:a.jsx(W.Checkbox,{"aria-label":"Select all rows",checked:l,indeterminate:!l&&s,onChange:r=>t.getToggleAllRowsSelectedHandler()(r)})})})}var Q=(t=>(t.MAIN="main",t.TOP="top",t.LEFT="left",t.TOP_LEFT="top-left",t))(Q||{});function Ls(t){switch(t){case Q.MAIN:return hn;case Q.TOP:return gn;case Q.LEFT:return fn;case Q.TOP_LEFT:return wn;default:return}}function pt({quadrantType:t,table:e,renderRowDetail:n,getCellProps:o,rowExpanderButtonProps:l,rowExpanderIconProps:s,rowHeaderWidth:r,enableRowHeader:c=!0,columnHeaderHeight:i,columnHeaderMeasureRef:u,enableSorting:h=!1,areCellsLoading:f,areColumnHeadersLoading:w,areRowHeadersLoading:v,rowResizing:S,rowVirtualizer:L,ghosts:C,scrollContainerRef:T,onScroll:x,onWheel:E,style:b,selectionColumnWidth:y=0}){const U=t===Q.MAIN,_=t===Q.TOP||t===Q.TOP_LEFT,z=t===Q.LEFT||t===Q.TOP_LEFT?"start":"center",q=_?"top":"center",N=t===Q.TOP||t===Q.TOP_LEFT,O=t===Q.TOP_LEFT,F=vt(),M=Et(e),Y=_t(e,S.getRowTop),I=c?r:0,j=(G,J)=>a.jsx(as,{table:e,renderRowDetail:n,getCellProps:o,rowExpanderButtonProps:l,rowExpanderIconProps:s,columnRegion:z,rowRegion:q,offsetTop:G,offsetLeft:J,areCellsLoading:f,rowVirtualizer:L,rowResizing:S,ghosts:C}),B=N?a.jsxs("div",{ref:t===Q.TOP?u:void 0,className:Bn,style:z==="center"?{paddingLeft:M}:void 0,children:[O&&a.jsxs(a.Fragment,{children:[c&&a.jsx(gs,{width:r,height:i}),y>0&&a.jsx(ws,{table:e,width:y,height:i,loading:v})]}),a.jsx(Es,{table:e,columnRegion:z,enableSorting:h,areColumnHeadersLoading:w,ghosts:C})]}):void 0;let D;switch(t){case Q.MAIN:D=j(i+Y,I+y+M);break;case Q.TOP:D=a.jsxs(a.Fragment,{children:[B,j(0,M)]});break;case Q.LEFT:D=a.jsx("div",{style:{paddingTop:Y},children:a.jsxs("div",{className:zt,style:{width:I+y+M},children:[a.jsx(Zt,{table:e,rowRegion:"center",rowHeaderWidth:r,enableRowHeader:c,selectionColumnWidth:y,areRowHeadersLoading:v,rowVirtualizer:L,rowResizing:S,ghosts:C}),j(0,0)]})});break;case Q.TOP_LEFT:D=a.jsxs(a.Fragment,{children:[B,a.jsxs("div",{className:zt,style:{width:I+y+M},children:[a.jsx(Zt,{table:e,rowRegion:"top",rowHeaderWidth:r,enableRowHeader:c,selectionColumnWidth:y,areRowHeadersLoading:v,rowVirtualizer:L,rowResizing:S,ghosts:C}),j(0,0)]})]});break;default:D=void 0}return a.jsx("div",{className:k(un,Ls(t)),style:b,children:a.jsx("div",{ref:T,className:mn,tabIndex:U&&F!=null?0:void 0,onKeyDown:U?F==null?void 0:F.handleKeyDown:void 0,onScroll:x,onWheel:E,children:D})})}function Cs({table:t,renderRowDetail:e,getCellProps:n,rowExpanderButtonProps:o,rowExpanderIconProps:l,rowHeaderWidth:s,enableRowHeader:r=!0,columnHeaderHeight:c,columnHeaderMeasureRef:i,enableColumnReordering:u=!1,enableSorting:h=!1,areCellsLoading:f,areColumnHeadersLoading:w,areRowHeadersLoading:v,selection:S,rowResizing:L,ghosts:C,enableRowVirtualization:T,overscanRowCount:x,scrollContainerRef:E,selectionColumnWidth:b=0}){const y=d.useRef(null),U=d.useRef(null),_=d.useRef(null),R=d.useRef(null),z=Et(t),q=dt(t),N=_t(t,L.getRowTop),O=(r?s:0)+b,F=He({table:t,columnHeaderHeight:c,frozenRowCount:q,frozenRowsHeight:N,getRowHeight:L.getRowSpanHeight,scrollContainerRef:E,enableRowVirtualization:T??!1,overscanRowCount:x??te}),{contextValue:M,guideIndex:Y,reorderingColumnId:I}=ts(t,u,y,E,O),[j,B]=d.useState({left:0,top:0}),D=t.state.columnResizing,G=(D==null?void 0:D.isResizingColumn)!=null&&D.isResizingColumn!==!1,J=L.resizingGuideTop!=null,lt=I!=null,g=d.useRef(!1);g.current=G||J||lt;const[A,H]=d.useState({vertical:0,horizontal:0}),$=d.useCallback(()=>{const P=E.current;P!=null&&(U.current!=null&&(U.current.scrollLeft=P.scrollLeft),_.current!=null&&(_.current.scrollTop=P.scrollTop),R.current!=null&&(R.current.scrollLeft=0,R.current.scrollTop=0))},[E]),X=d.useCallback(()=>{if($(),g.current){const P=E.current;P!=null&&B({left:P.scrollLeft,top:P.scrollTop})}},[E,$]),Z=d.useCallback(()=>{const P=E.current;if(P==null)return;const V=Math.max(0,P.offsetWidth-P.clientWidth),st=Math.max(0,P.offsetHeight-P.clientHeight);H(et=>et.vertical===V&&et.horizontal===st?et:{vertical:V,horizontal:st})},[E]),ct=t.getTotalSize();d.useLayoutEffect(()=>{const P=E.current;if(P==null)return;Z();const V=new ResizeObserver(Z);return V.observe(P),()=>V.disconnect()},[Z,E]),d.useLayoutEffect(()=>{Z()},[c,z,N,Z,L.totalHeight,ct]),d.useLayoutEffect(()=>{$()},[c,z,N,$]),d.useLayoutEffect(()=>{if(!g.current)return;const P=E.current;if(P==null)return;const V=P.scrollLeft,st=P.scrollTop;(V!==j.left||st!==j.top)&&B({left:V,top:st})},[G,lt,J,E,j.left,j.top]);const nt=d.useCallback(P=>{const V=E.current;if(V==null)return;const st=Math.max(0,V.scrollWidth-V.clientWidth),et=Math.max(0,V.scrollHeight-V.clientHeight),rt=Jt(V.scrollLeft+P.deltaX,0,st),at=Jt(V.scrollTop+P.deltaY,0,et);rt!==V.scrollLeft&&(V.scrollLeft=rt),at!==V.scrollTop&&(V.scrollTop=at)},[E]),tt=c+N,it=O+z,ut={table:t,renderRowDetail:e,getCellProps:n,rowExpanderButtonProps:o,rowExpanderIconProps:l,rowHeaderWidth:s,enableRowHeader:r,selectionColumnWidth:b,columnHeaderHeight:c,enableSorting:h,areCellsLoading:f,areColumnHeadersLoading:w,areRowHeadersLoading:v,rowResizing:L,rowVirtualizer:F,ghosts:C};return a.jsx("div",{ref:y,className:En,children:a.jsx(Me.Provider,{value:M,children:a.jsxs(Re.Provider,{value:S,children:[a.jsx(pt,{...ut,quadrantType:Q.MAIN,scrollContainerRef:E,onScroll:X}),a.jsx(pt,{...ut,quadrantType:Q.TOP,columnHeaderMeasureRef:i,scrollContainerRef:U,onWheel:nt,style:{height:tt,left:O,right:A.vertical}}),a.jsx(pt,{...ut,quadrantType:Q.LEFT,scrollContainerRef:_,onWheel:nt,style:{bottom:A.horizontal,top:c,width:it}}),a.jsx(pt,{...ut,quadrantType:Q.TOP_LEFT,scrollContainerRef:R,onWheel:nt,style:{height:tt,width:it}}),a.jsx(ns,{table:t,rowHeaderWidth:O,columnHeaderHeight:c,scrollLeft:j.left,scrollTop:j.top,frozenRowCount:q,resizingGuideTop:L.resizingGuideTop,resizingRowIndex:L.resizingRowIndex}),a.jsx(es,{table:t,reorderingColumnId:I,guideIndex:Y,rowHeaderWidth:O,scrollLeft:j.left})]})})})}function Jt(t,e,n){return Math.max(e,Math.min(n,t))}function Ts({table:t,renderRowDetail:e,getCellProps:n,rowExpanderButtonProps:o,rowExpanderIconProps:l,rowDetailHeight:s,rowHeight:r,rowHeaderWidth:c,enableRowHeader:i=!0,columnHeaderHeight:u,enableColumnReordering:h=!1,enableSorting:f=!1,areCellsLoading:w,areColumnHeadersLoading:v,areRowHeadersLoading:S,enableFocusedCell:L=!1,enableGhostCells:C=!1,bodyContextMenuRenderer:T,enableBodyContextMenu:x,onFocusedCell:E,onFocusedRegion:b,selectedRegions:y,onSelection:U,selectionModes:_,enableRowVirtualization:R,overscanRowCount:z,enableRowResizing:q=!1,rowHeights:N,defaultRowHeights:O,onRowHeightChanged:F,minRowHeight:M,maxRowHeight:Y,selectionColumnWidth:I=0,className:j,...B}){const D=d.useRef(null),G=(i?c:0)+I,{ref:J,height:lt}=Yn({minHeight:u,headerRowCount:t.getHeaderGroups().length}),g=d.useMemo(()=>{var ct;if(!e||!t.options.getIsRowExpanded&&!((ct=t.getIsSomeRowsExpanded)!=null&&ct.call(t)))return;const Z=t.getRowModel().rows;return nt=>{var it;const tt=Z[nt];return(it=tt.getIsExpanded)!=null&&it.call(tt)&&tt.getCanExpand()?Math.max(0,s):0}},[e,s,t]),A=qn({rowHeight:r,rowCount:t.getRowModel().rows.length,getDetailHeight:g,rowHeights:N,defaultRowHeights:O,enableRowResizing:q,minRowHeight:M,maxRowHeight:Y,onRowHeightChanged:F}),H=Vn({table:t,getRowTop:A.getRowTop,getRowHeight:A.getRowHeight,scrollContainerRef:D,rowHeaderWidth:G,columnHeaderHeight:lt,bodyContextMenuRenderer:T,enableBodyContextMenu:x,enableFocusedCell:L,onFocusedCell:E,onFocusedRegion:b,selectedRegions:y,onSelection:U,selectionModes:_}),$=Xn({enableGhostCells:C,rowHeight:r,rowHeaderWidth:G,columnHeaderHeight:lt,totalWidth:t.getTotalSize(),totalHeight:A.totalHeight,scrollContainerRef:D}),X=H.isSelectionModeEnabled(ot.CELLS)?Rn:void 0;return a.jsx("div",{...B,className:k(tn,X,{[ln]:$!=null&&$.columnCount>0,[rn]:$!=null&&$.rowCount>0},j),children:a.jsx(Cs,{table:t,renderRowDetail:e,getCellProps:n,rowExpanderButtonProps:o,rowExpanderIconProps:l,rowHeaderWidth:c,enableRowHeader:i,columnHeaderHeight:lt,columnHeaderMeasureRef:J,enableColumnReordering:h,enableSorting:f,areCellsLoading:w,areColumnHeadersLoading:v,areRowHeadersLoading:S,selection:H,rowResizing:A,ghosts:$,enableRowVirtualization:R,overscanRowCount:z,scrollContainerRef:D,selectionColumnWidth:I})})}const xs=()=>!0;function vs({htmlProps:t,rowHeight:e=ke,expandedRows:n,initialExpandedRows:o,onExpandedRowsChange:l,renderRowDetail:s,getCellProps:r,rowExpanderButtonProps:c,rowExpanderIconProps:i,rowDetailHeight:u=100,showRowSelectionCheckboxes:h=!1,rowSelectionColumnWidth:f=Ge,rowHeaderWidth:w=ze,enableRowHeader:v=!0,columnHeaderHeight:S=ee,enableColumnReordering:L=!1,enableSorting:C=!1,loadingOptions:T=[],enableFocusedCell:x=!1,enableGhostCells:E=!1,bodyContextMenuRenderer:b,enableBodyContextMenu:y,onFocusedCell:U,onFocusedRegion:_,selectedRegions:R,onSelection:z,selectionModes:q,enableRowVirtualization:N=!1,numFrozenColumns:O=0,numFrozenRows:F=0,overscanRowCount:M=te,columnVisibility:Y,enableRowResizing:I=!1,rowHeights:j,defaultRowHeights:B,onRowHeightChanged:D,minRowHeight:G,maxRowHeight:J,rowSelection:lt,defaultRowSelection:g,...A}){var et,rt,at,ft,bt;const[H,$]=Ht({value:lt??((et=A.state)==null?void 0:et.rowSelection),initialValue:g??((rt=A.initialState)==null?void 0:rt.rowSelection),finalValue:{},onChange:A.onRowSelectionChange}),X=(at=A.atoms)==null?void 0:at.expanded,[Z,ct]=Ht({value:(X==null?void 0:X.get())??n??((ft=A.state)==null?void 0:ft.expanded),initialValue:o??((bt=A.initialState)==null?void 0:bt.expanded),finalValue:{},onChange:l}),nt=be({...A,initialState:o===void 0?A.initialState:{...A.initialState,expanded:o},getRowCanExpand:A.getRowCanExpand??(s!=null&&A.enableExpanding!==!1?xs:void 0),enableSorting:C,state:{...A.state,...Y!==void 0?{columnVisibility:Y}:{},rowSelection:H,expanded:Z},onRowSelectionChange:$,onExpandedChange:Rt=>{ct(Rt),A.onExpandedChange?A.onExpandedChange(Rt):X==null||X.set(Oe=>K.functionalUpdate(Rt,Oe))}}),tt=d.useContext(jt),it=tt?nt.getPrePaginatedRowModel().rows.length:void 0;d.useLayoutEffect(()=>{it!==void 0&&(tt==null||tt(it))},[it,tt]),Ue({table:nt,numFrozenColumns:O,numFrozenRows:F});const ut=At(T,Ct.CELLS),P=At(T,Ct.COLUMN_HEADERS),V=At(T,Ct.ROW_HEADERS),st=a.jsx(Ts,{table:nt,rowHeight:e,renderRowDetail:s,getCellProps:r,rowExpanderButtonProps:c,rowExpanderIconProps:i,rowDetailHeight:u,rowHeaderWidth:w,enableRowHeader:v,columnHeaderHeight:S,enableColumnReordering:L,enableSorting:C,areCellsLoading:ut,areColumnHeadersLoading:P,areRowHeadersLoading:V,enableFocusedCell:x,enableGhostCells:E,bodyContextMenuRenderer:b,enableBodyContextMenu:y,onFocusedCell:U,onFocusedRegion:_,selectedRegions:R,onSelection:z,selectionModes:q,enableRowVirtualization:N,overscanRowCount:M,enableRowResizing:I,rowHeights:j,defaultRowHeights:B,onRowHeightChanged:D,minRowHeight:G,maxRowHeight:J,selectionColumnWidth:h?f:0,...t});return tt?a.jsx(jt.Provider,{value:void 0,children:st}):st}const Ie=10,je=[10,20,50,100];function ye({pageIndex:t,pageSize:e,pageCount:n,rowCount:o,pageSizeOptions:l=je,onPageIndexChange:s,onPageSizeChange:r,className:c}){const i=n!=null&&n>=0?n:void 0,u=t>0,h=i===void 0?!0:t<i-1,f=o===void 0||o===0?0:t*e+1,w=o===void 0?void 0:Math.min((t+1)*e,o),v=l.includes(e)?l:[...l,e].sort((S,L)=>S-L);return a.jsxs("div",{className:k(cn,c),children:[a.jsxs("div",{className:Gt,children:[a.jsx("span",{className:Mt,children:"Rows per page:"}),a.jsx(W.HTMLSelect,{"aria-label":"Rows per page",onChange:S=>r(Number(S.currentTarget.value)),options:v,value:e}),o!==void 0&&a.jsxs("span",{className:Mt,children:[f===0?0:`${f}–${w}`," of ",o]})]}),a.jsxs("div",{className:Gt,children:[a.jsxs("span",{className:Mt,children:["Page ",t+1,i!==void 0?` of ${i}`:""]}),a.jsxs(W.ButtonGroup,{children:[a.jsx(W.Button,{"aria-label":"First page",disabled:!u,icon:"double-chevron-left",onClick:()=>s(0)}),a.jsx(W.Button,{"aria-label":"Previous page",disabled:!u,icon:"chevron-left",onClick:()=>s(t-1)}),a.jsx(W.Button,{"aria-label":"Next page",disabled:!h,icon:"chevron-right",onClick:()=>s(t+1)}),a.jsx(W.Button,{"aria-label":"Last page",disabled:i===void 0||!h,icon:"double-chevron-right",onClick:()=>{i!==void 0&&s(i-1)}})]})]})]})}const ps=K.tableFeatures({...Nt,rowPaginationFeature:K.rowPaginationFeature,paginatedRowModel:K.createPaginatedRowModel()});function As(t){function e({data:o,initialState:l,state:s,features:r,onPaginationChange:c,manualPagination:i,pageCount:u,rowCount:h,initialPageIndex:f=0,initialPageSize:w=Ie,pageSizeOptions:v,showPaginationBar:S=!0,paginationBarClassName:L,...C}){const[T,x]=d.useState(()=>{var B,D;return{pageIndex:((B=l==null?void 0:l.pagination)==null?void 0:B.pageIndex)??f,pageSize:((D=l==null?void 0:l.pagination)==null?void 0:D.pageSize)??w}}),E=s==null?void 0:s.pagination,b=E??T,{pageIndex:y,pageSize:U}=b,_=d.useCallback(B=>{c==null||c(B),E===void 0&&x(D=>K.functionalUpdate(B,D))},[E,c]),R=i===!0,[z,q]=d.useState(),N=!R&&C.getSubRows!=null&&C.paginateExpandedRows!==!1,O=N?z:o.length,F=R?h:O,M=d.useMemo(()=>R?u!=null&&u>=0?u:h!=null?Math.ceil(h/U):void 0:O===void 0?void 0:Math.max(1,Math.ceil(O/U)),[O,R,u,U,h]);d.useEffect(()=>{if(M===void 0)return;const B=Math.max(0,M-1);y>B&&_(D=>({...D,pageIndex:B}))},[_,M,y]);const Y=d.useMemo(()=>r==null?ps:K.tableFeatures({...Nt,...r,rowPaginationFeature:K.rowPaginationFeature,paginatedRowModel:K.createPaginatedRowModel()}),[r]),I=d.useCallback(B=>{_(D=>({...D,pageIndex:Math.max(0,B)}))},[_]),j=d.useCallback(B=>{_(D=>({...D,pageIndex:0,pageSize:B}))},[_]);return a.jsxs("div",{className:an,children:[a.jsx(jt.Provider,{value:N?q:void 0,children:a.jsx(t,{...C,data:o,initialState:l,state:{...s,pagination:b},features:Y,onPaginationChange:_,manualPagination:i,pageCount:u,rowCount:h})}),S&&a.jsx(ye,{className:L,onPageIndexChange:I,onPageSizeChange:j,pageCount:M,pageIndex:y,pageSize:U,pageSizeOptions:v,rowCount:F})]})}const n=t.displayName??t.name??"Table";return e.displayName=`withPagination(${n})`,e}exports.BP_Table=vs;exports.DEFAULT_BP_TABLE_FEATURES=Nt;exports.DEFAULT_PAGE_SIZE=Ie;exports.DEFAULT_PAGE_SIZE_OPTIONS=je;exports.Direction=Ae;exports.FocusMode=Ft;exports.RegionCardinality=ot;exports.Regions=p;exports.TableLoadingOption=Ct;exports.TablePaginationBar=ye;exports.directionToDelta=Se;exports.hasLoadingOption=At;exports.moveFocusedCell=Dn;exports.resizeRegion=$n;exports.withPagination=As;
6
6
  //# sourceMappingURL=blueprintjs-react-table.cjs.map