simple-table-core 2.4.3 → 2.4.5

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.
Files changed (55) hide show
  1. package/dist/{Animate-167eaf0d.js → Animate-3535d295.js} +2 -2
  2. package/dist/Animate-3535d295.js.map +1 -0
  3. package/dist/{DatePicker-b003d0e6.js → DatePicker-5c93fbcb.js} +2 -2
  4. package/dist/DatePicker-5c93fbcb.js.map +1 -0
  5. package/dist/cjs/{Animate-7ca2a47a.js → Animate-9fd2c7db.js} +2 -2
  6. package/dist/cjs/Animate-9fd2c7db.js.map +1 -0
  7. package/dist/cjs/{DatePicker-53f14590.js → DatePicker-18ce31ec.js} +2 -2
  8. package/dist/cjs/DatePicker-18ce31ec.js.map +1 -0
  9. package/dist/cjs/components/scroll-sync/ScrollSyncPane.d.ts +2 -2
  10. package/dist/cjs/components/simple-table/TableHeaderCell.d.ts +2 -1
  11. package/dist/cjs/components/simple-table/table-column-editor/columnEditorUtils.d.ts +1 -0
  12. package/dist/cjs/context/TableContext.d.ts +1 -0
  13. package/dist/cjs/hooks/useDragHandler.d.ts +9 -1
  14. package/dist/cjs/hooks/useScrollbarVisibility.d.ts +2 -2
  15. package/dist/cjs/index-26e3b588.js +2 -0
  16. package/dist/cjs/index-26e3b588.js.map +1 -0
  17. package/dist/cjs/index.js +1 -1
  18. package/dist/cjs/styles.css +1 -1
  19. package/dist/cjs/types/HandleResizeStartProps.d.ts +1 -0
  20. package/dist/cjs/types/SharedTableProps.d.ts +7 -7
  21. package/dist/cjs/types/SimpleTableProps.d.ts +1 -0
  22. package/dist/cjs/types/TableHeaderSectionProps.d.ts +1 -2
  23. package/dist/cjs/types/Theme.d.ts +1 -1
  24. package/dist/cjs/utils/headerWidthUtils.d.ts +14 -0
  25. package/dist/cjs/utils/resizeUtils.d.ts +1 -1
  26. package/dist/components/scroll-sync/ScrollSyncPane.d.ts +2 -2
  27. package/dist/components/simple-table/TableHeaderCell.d.ts +2 -1
  28. package/dist/components/simple-table/table-column-editor/columnEditorUtils.d.ts +1 -0
  29. package/dist/context/TableContext.d.ts +1 -0
  30. package/dist/hooks/useDragHandler.d.ts +9 -1
  31. package/dist/hooks/useScrollbarVisibility.d.ts +2 -2
  32. package/dist/index-8220459f.js +2 -0
  33. package/dist/index-8220459f.js.map +1 -0
  34. package/dist/index.es.js +1 -1
  35. package/dist/styles.css +1 -1
  36. package/dist/types/HandleResizeStartProps.d.ts +1 -0
  37. package/dist/types/SharedTableProps.d.ts +7 -7
  38. package/dist/types/SimpleTableProps.d.ts +1 -0
  39. package/dist/types/TableHeaderSectionProps.d.ts +1 -2
  40. package/dist/types/Theme.d.ts +1 -1
  41. package/dist/utils/headerWidthUtils.d.ts +14 -0
  42. package/dist/utils/resizeUtils.d.ts +1 -1
  43. package/package.json +1 -1
  44. package/src/styles/all-themes.css +2 -0
  45. package/src/styles/base.css +6 -5
  46. package/src/styles/themes/modern-dark.css +285 -0
  47. package/src/styles/themes/modern-light.css +275 -0
  48. package/dist/Animate-167eaf0d.js.map +0 -1
  49. package/dist/DatePicker-b003d0e6.js.map +0 -1
  50. package/dist/cjs/Animate-7ca2a47a.js.map +0 -1
  51. package/dist/cjs/DatePicker-53f14590.js.map +0 -1
  52. package/dist/cjs/index-f301a9e9.js +0 -2
  53. package/dist/cjs/index-f301a9e9.js.map +0 -1
  54. package/dist/index-4950c0c9.js +0 -2
  55. package/dist/index-4950c0c9.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{jsx as e,Fragment as n,jsxs as r}from"react/jsx-runtime";import t,{useEffect as o,useState as i,useRef as a,useMemo as u,useCallback as l,createContext as c,useContext as s,lazy as d,Suspense as f,Fragment as v,cloneElement as h,forwardRef as p,useImperativeHandle as w,isValidElement as m,useLayoutEffect as g,useReducer as b}from"react";var x=function(){return x=Object.assign||function(e){for(var n,r=1,t=arguments.length;t>r;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},x.apply(this,arguments)};function y(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&0>n.indexOf(t)&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);t.length>o;o++)0>n.indexOf(t[o])&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]])}return r}function I(e,n,r,t){return new(r||(r=Promise))(function(o,i){function a(e){try{l(t.next(e))}catch(e){i(e)}}function u(e){try{l(t.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?o(e.value):(n=e.value,n instanceof r?n:new r(function(e){e(n)})).then(a,u)}l((t=t.apply(e,n||[])).next())})}function C(e,n){var r,t,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(l){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,t&&(o=2&u[0]?t.return:u[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,u[1])).done)return o;switch(t=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,t=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&o[3]>u[1])){i.label=u[1];break}if(6===u[0]&&o[1]>i.label){i.label=o[1],o=u;break}if(o&&o[2]>i.label){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=n.call(e,i)}catch(e){u=[6,e],t=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,l])}}}function R(e,n,r){if(r||2===arguments.length)for(var t,o=0,i=n.length;i>o;o++)!t&&o in n||(t||(t=Array.prototype.slice.call(n,0,o)),t[o]=n[o]);return e.concat(t||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var S=1,M=function(e){return Math.ceil(800/(e+1))},N=29.5,H=30,E=function(e){return 480>e?.3:768>e?.4:.8},k="parentExpanded",T=function(e,n){if(!e.children||0===e.children.length)return[n];var r=[],t=function(e,n){if(!e.children||0===e.children.length)return r.push(n),n+1;for(var o=n,i=0,a=e.children;a.length>i;i++)o=t(a[i],o);return o};return t(e,n),r},P=function(e){return e.flatMap(function(e){var n=[e];return e.children&&e.children.length>0&&n.push.apply(n,P(e.children)),n})},A=function(e){return void 0===e&&(e=0),e?e+1:0},D=function(e){var n=e.accessor;return"".concat(e.rowId,"-").concat(n)},F=function(e){var n=e.header,r=e.pinned,t=e.headers,o=e.collapsedHeaders;return n.hide||n.excludeFromRender||(r||n.pinned)&&n.pinned!==r?null:!(t&&o&&function(e,n,r){var t=function(e,n){for(var r=0,t=P(e);t.length>r;r++){var o=t[r];if(o.children&&o.children.length>0&&o.children.some(function(e){return e.accessor===n}))return o}return null}(n,e.accessor);if(t){var o=r.has(t.accessor),i=e.showWhen||k;return o?"parentExpanded"===i:"parentCollapsed"===i}return!1}(n,t,o))||null},O=function(e){var n=e.accessor;return"".concat(e.rowId,"-").concat(n)},L=function(e){var n=e.customTheme;return Math.min(e.headerHeight+n.rowSeparatorWidth+e.childRowCount*(e.rowHeight+n.rowSeparatorWidth)+n.nestedGridPaddingTop+n.nestedGridPaddingBottom+n.nestedGridBorderWidth,n.nestedGridMaxHeight+n.nestedGridPaddingTop+n.nestedGridPaddingBottom+n.nestedGridBorderWidth)},W=function(e){var n=e.calculatedHeight,r=e.customHeight,t=e.customTheme;return r?("string"==typeof r?parseFloat(r):r)+t.nestedGridPaddingTop+t.nestedGridPaddingBottom:n},B=function(e){var n=e.match(/^(.+?)\[(\d+)\]$/);return n?{key:n[1],index:parseInt(n[2],10)}:{key:e,index:null}},z=function(e,n){var r=n+"";return r.includes(".")||r.includes("[")?r.split(".").reduce(function(e,n){if(null!=e){var r=B(n),t=r.index,o=e[r.key];return null!==t&&Array.isArray(o)&&(o=o[t]),o}},e):e[n]},q=function(e,n,r){var t=n+"";if(t.includes(".")||t.includes("[")){for(var o=t.split("."),i=e,a=0;o.length-1>a;a++){var u=B(o[a]),l=u.key,c=u.index;if(null==i[l]){var s=B(o[a+1]);i[l]=null!==s.index?[]:{}}if(i=i[l],null!==c){if(!Array.isArray(i))throw Error("Expected array at ".concat(o.slice(0,a+1).join("."),", but found ").concat(typeof i));for(;c>=i.length;)i.push(null);null==i[c]&&(i[c]={}),i=i[c]}}var d=B(o[o.length-1]),f=d.key,v=d.index;if(null!==v){for(Array.isArray(i[f])||(i[f]=[]);v>=i[f].length;)i[f].push(null);i[f][v]=r}else i[f]=r}else e[n]=r},G=function(e){return Array.isArray(e)&&e.length>0&&"object"==typeof e[0]&&null!==e[0]},V=function(e){var n=e.getRowId,r=R([],e.rowPath,!0);if(n){var t=n({row:e.row,depth:e.depth,index:e.index,rowPath:e.rowPath,rowIndexPath:e.rowIndexPath,groupingKey:e.groupingKey});r.push(t)}return r},j=function(e){return e.join("-")},K=function(e,n){var r=e[n];return G(r)?r:[]},U=function(e,n,r,t,o){var i=e+"",a=t.has(i)&&t.get(i)===n,u=o.has(i)&&o.get(i)===n;return r.has(n)?!u:a},_=function(e){var n=e.depth,r=e.expandedDepths,t=e.expandedRows,o=e.collapsedRows,i=e.rowGrouping,a=void 0===i?[]:i,u=e.getRowId,l=e.displayPositionOffset,c=void 0===l?0:l,s=e.rowStateMap,d=e.hasLoadingRenderer,f=void 0!==d&&d,v=e.hasErrorRenderer,h=void 0!==v&&v,p=e.hasEmptyRenderer,w=void 0!==p&&p,m=e.headers,g=void 0===m?[]:m,b=e.rowHeight,x=e.headerHeight,y=e.customTheme,I=[],C=function(e,n,i,l,d,v,p){void 0===i&&(i=0),void 0===l&&(l=c),void 0===d&&(d=[]),void 0===v&&(v=[]),void 0===p&&(p=[]);var m=i,S=l;return e.forEach(function(i,l){var c,M,N=a[n],H=R(R([],d,!0),[l],!1),E=R(R([],v,!0),[l],!1),k=V({row:i,getRowId:u,depth:n,index:l,rowPath:H,rowIndexPath:E,groupingKey:N}),T=I.length,P={row:i,depth:n,displayPosition:S,groupingKey:N,position:m,isLastGroupRow:0===n&&l===e.length-1,rowId:k,rowPath:H,rowIndexPath:E,absoluteRowIndex:m,parentIndices:p.length>0?R([],p,!0):void 0};I.push(P),m++,S++;var A=j(k);if(U(A,n,r,t,o)&&a.length>n){var D=null==s?void 0:s.get(A),F=K(i,N),O=g.find(function(e){return e.expandable&&e.nestedTable});if((null==O?void 0:O.nestedTable)&&F.length>0){var B=(null===(c=O.nestedTable.customTheme)||void 0===c?void 0:c.rowHeight)||b,z=(null===(M=O.nestedTable.customTheme)||void 0===M?void 0:M.headerHeight)||x,q=L({childRowCount:F.length,rowHeight:B,headerHeight:z,customTheme:y}),G=W({calculatedHeight:q,customHeight:O.nestedTable.height,customTheme:y}),_=R(R([],H,!0),[N],!1);I.push({row:{},depth:n+1,displayPosition:S,groupingKey:N,position:m,isLastGroupRow:!1,rowId:_,rowPath:_,rowIndexPath:E,nestedTable:{parentRow:i,expandableHeader:O,childAccessor:N,calculatedHeight:G},absoluteRowIndex:m}),m++,S++}else if(D&&(D.loading||D.error||D.isEmpty)){if(D.loading&&f||D.error&&h||D.isEmpty&&w){var J=R(R([],H,!0),[N],!1);I.push({row:{},depth:n+1,displayPosition:S,groupingKey:N,position:m,isLastGroupRow:!1,rowId:J,rowPath:J,rowIndexPath:E,stateIndicator:{parentRowId:A,parentRow:i,state:D},absoluteRowIndex:m,parentIndices:R(R([],p,!0),[T],!1)}),m++,S++}else if(D.loading&&!f){var Y=R(R([],H,!0),[N,"loading-skeleton"],!1);I.push({row:{},depth:n+1,displayPosition:S,groupingKey:N,position:m,isLastGroupRow:!1,rowId:Y,rowPath:Y,rowIndexPath:E,isLoadingSkeleton:!0,absoluteRowIndex:m,parentIndices:R(R([],p,!0),[T],!1)}),m++,S++}}else if(F.length>0){var X=R(R([],H,!0),[N],!1),$=R([],E,!0);m=C(F,n+1,m,S,X,$,R(R([],p,!0),[T],!1))}}}),m};return C(e.rows,void 0===n?0:n,0,c,[],[],[]),I},J=function(e,n){return e.hide?[]:e.children&&0!==e.children.length?n&&n.has(e.accessor)?e.children.filter(function(e){var n=e.showWhen||k;return"parentCollapsed"===n||"always"===n}).flatMap(function(e){return J(e,n)}):e.children.filter(function(e){var n=e.showWhen||k;return"parentExpanded"===n||"always"===n}).flatMap(function(e){return J(e,n)}):[e]},Y=function(e){if(e.hide)return 0;if("number"==typeof e.width)return e.width;if("string"==typeof e.width&&e.width.endsWith("px"))return parseFloat(e.width);var n=document.getElementById(D({accessor:e.accessor,rowId:"header"}));return(null==n?void 0:n.offsetWidth)||150},X=function(e){var n,r=e.width;"string"==typeof r&&r.includes("fr")&&(e.width=(null===(n=document.getElementById(D({accessor:e.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.length>0&&e.children.forEach(function(e){X(e)})},$=function(e){return"number"==typeof e.minWidth?e.minWidth:40},Q=function(e,n){var r=[];return e.forEach(function(e){e.hide||r.push.apply(r,J(e,n))}),r},Z=function(e,n){var r=n.rowTopPositions;if(0===r.length)return 0;if(0>=e)return 0;if(e>=n.totalHeight)return r.length-1;for(var t=0,o=r.length-1;o>t;){var i=Math.floor((t+o+1)/2);r[i]>e?o=i-1:t=i}return t},ee=function(e,n){if(!n||0===n.length)return 0;for(var r=0,t=0,o=n.length;o>t;){var i=Math.floor((t+o)/2);e>n[i][0]?t=i+1:o=i}for(var a=0;t>a;a++)r+=n[a][1];return r},ne=function(e){var n=e.bufferRowCount,r=e.contentHeight,t=e.scrollTop,o=e.tableRows,i=e.scrollDirection,a=void 0===i?"none":i,u=e.heightMap,l=e.rowHeight+1;if(!u){var c=n*l,s=c,d=c;"down"===a?(s=Math.max(l,.1*c),d=.9*c):"up"===a&&(s=.9*c,d=Math.max(l,.1*c));var f=t+r+d,v=Math.max(0,Math.floor(Math.max(0,t-s)/l)),h=Math.min(o.length,Math.ceil(f/l)),p=t+r,w=Math.max(0,Math.ceil(t/l)),m=Math.min(o.length,Math.floor(p/l)),g=t+r,b=Math.max(0,Math.floor(t/l)),x=Math.min(o.length,Math.ceil(g/l));return{rendered:{startIndex:v,endIndex:h,rows:o.slice(v,h)},fullyVisible:{startIndex:w,endIndex:m,rows:o.slice(w,m)},partiallyVisible:{startIndex:b,endIndex:x,rows:o.slice(b,x)}}}var y=u.rowTopPositions,I=n*l,C=I,R=I;"down"===a?(C=Math.max(l,.1*I),R=.9*I):"up"===a&&(C=.9*I,R=Math.max(l,.1*I));var S=t+r+R,M=Z(Math.max(0,t-C),u),N=Z(S,u)+1;N=Math.min(o.length,N);var H=t,E=t+r,k=Z(H,u);H>y[k]&&(k=Math.min(k+1,o.length));var T=Z(E,u);T=Math.min(o.length,T);var P=t+r,A=Z(t,u),D=Z(P,u)+1;return D=Math.min(o.length,D),{rendered:{startIndex:M,endIndex:N,rows:o.slice(M,N)},fullyVisible:{startIndex:k,endIndex:T,rows:o.slice(k,T)},partiallyVisible:{startIndex:A,endIndex:D,rows:o.slice(A,D)}}},re=function(e){var n=e.position;return n*(e.rowHeight+e.customTheme.rowSeparatorWidth)+ee(n,e.heightOffsets)},te=function(e,n){var r,t,o=e.position,i=n[o+1];return null!==(t=null===(r=null==i?void 0:i.parentIndices)||void 0===r?void 0:r.includes(o))&&void 0!==t&&t},oe=function(e){var n=e.allTableRows,r=e.renderedRows,t=e.fullyVisibleRows,o=e.partiallyVisibleRows,i=e.partiallyVisibleRowIndex,a=e.recursionDepth,u=e.stickyParents,l=e.rowGrouping,c=o[i];if(!c||a>10)return{stickyParents:u,regularRows:r};var s=0;if(c.parentIndices&&c.parentIndices.length>0){for(var d=function(e){var r=n[e];if(r){var o=t.some(function(e){return e.position===r.position});if(c.rowIndexPath&&c.rowIndexPath.length>0){var i=n[c.parentIndices[c.parentIndices.length-1]],a=i.row[l[i.depth]];if(u.length>=(Array.isArray(a)?a:[]).length-c.rowIndexPath[c.rowIndexPath.length-1])return"break"}o||u.some(function(e){return j(e.rowId)===j(r.rowId)})||(u.push(r),s++)}},f=0,v=c.parentIndices;v.length>f&&"break"!==d(v[f]);f++);if(u.length>0){te(c,n)&&(u.push(c),s++);var h=o[i+=s];h&&(c=h)}}else if(te(c,n))return u.push(c),i++,oe({allTableRows:n,renderedRows:r,fullyVisibleRows:t,partiallyVisibleRows:o,partiallyVisibleRowIndex:i,recursionDepth:a+1,stickyParents:u,rowGrouping:l});return te(c,n)?oe({allTableRows:n,renderedRows:r,fullyVisibleRows:t,partiallyVisibleRows:o,partiallyVisibleRowIndex:i,recursionDepth:a+1,stickyParents:u,rowGrouping:l}):{stickyParents:u,regularRows:r}},ie=function(e,n,r){var t=e.getBoundingClientRect(),o=n.getBoundingClientRect(),i=10;if(o.top+i>t.top?n.scrollTop-=o.top-t.top+i:t.bottom>o.bottom-i&&(n.scrollTop+=t.bottom-o.bottom+i),r){var a=r.getBoundingClientRect();a.left+i>t.left?r.scrollLeft-=a.left-t.left+i:t.right>a.right-i&&(r.scrollLeft+=t.right-a.right+i)}},ae=function(e,n,r,t){var o=document.querySelector(".st-body-container"),i=document.querySelector(".st-body-main");if(o){var a=n+r.rowSeparatorWidth,u=document.querySelector('.st-cell[data-row-index="'.concat(e.rowIndex,'"][data-col-index="').concat(e.colIndex,'"][data-row-id="').concat(e.rowId,'"]'));if(u&&t){var l=function(e,n,r,t){var o=ne({bufferRowCount:0,contentHeight:n.clientHeight,rowHeight:r,scrollTop:n.scrollTop,tableRows:t,scrollDirection:"none"}).fullyVisible;return e>=o.startIndex&&o.endIndex>e}(e.rowIndex,o,n,t);if(l)return void ie(u,o,i)}if(!u)return o.scrollTop=Math.max(0,e.rowIndex*a-o.clientHeight/3),void setTimeout(function(){var n=document.querySelector('.st-cell[data-row-index="'.concat(e.rowIndex,'"][data-col-index="').concat(e.colIndex,'"][data-row-id="').concat(e.rowId,'"]'));n&&ie(n,o,i)},100);ie(u,o,i)}},ue=function(e){var n=e.colIndex,r=e.rowId;return"".concat(e.rowIndex,"-").concat(n,"-").concat(r)},le=c(void 0),ce=function(n){return e(le.Provider,x({value:n.value},{children:n.children}))},se=function(){var e=s(le);if(void 0===e)throw Error("useTableContext must be used within a TableProvider");return e},de=function(t){var o=t.currentPage,a=t.footerRenderer,u=t.hideFooter,l=t.onPageChange,c=t.onNextPage,s=t.onUserPageChange,d=t.rowsPerPage,f=t.shouldPaginate,v=t.totalPages,h=t.totalRows,p=se().icons,w=i(!0),m=w[0],g=w[1],b=o>1,y=v>o,R=o===v,S=Math.min((o-1)*d+1,h),M=Math.min(o*d,h),N=!b,H=!y&&!c||!m&&R,E=function(){return I(void 0,void 0,void 0,function(){var e;return C(this,function(n){switch(n.label){case 0:return 1>(e=o-1)?[3,2]:(l(e),s?[4,s(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})},k=function(){return I(void 0,void 0,void 0,function(){var e,n;return C(this,function(r){switch(r.label){case 0:return e=o===v,n=o+1,c&&e?[4,c(o)]:[3,2];case 1:if(!r.sent())return g(!1),[2];r.label=2;case 2:return n>v&&!c?[3,4]:(l(n),s?[4,s(n)]:[3,4]);case 3:r.sent(),r.label=4;case 4:return[2]}})})},T=function(e){return I(void 0,void 0,void 0,function(){return C(this,function(n){switch(n.label){case 0:return 1>e||e>v?[3,2]:(l(e),s?[4,s(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})};if(u||!f)return null;if(a)return e(n,{children:a({currentPage:o,totalPages:v,rowsPerPage:d,totalRows:h,startRow:S,endRow:M,onPageChange:T,onNextPage:k,onPrevPage:E,hasNextPage:!H,hasPrevPage:!N,nextIcon:p.next,prevIcon:p.prev})});var P=function(){if(15>=v)return Array.from({length:v},function(e,n){return n+1});var e,n,r=[];o>8?v-7>o?(e=o-7,n=o+7):(e=Math.max(1,v-15+1),n=v):(e=1,n=14),e>2?(r.push(1),r.push(-1)):2===e&&r.push(1);for(var t=e;n>=t;t++)r.push(t);return v-1>n?(r.push(-2),r.push(v)):n===v-1&&r.push(v),r}();return r("div",x({className:"st-footer"},{children:[e("div",x({className:"st-footer-info"},{children:r("span",x({className:"st-footer-results-text"},{children:["Showing ",S," to ",M," of ",h.toLocaleString()," results"]}))})),r("div",x({className:"st-footer-pagination"},{children:[P.map(function(n,r){return 0>n?e("span",x({className:"st-page-ellipsis"},{children:"..."}),r):e("button",x({onClick:function(){return T(n)},className:"st-page-btn ".concat(o===n?"active":""),"aria-label":"Go to page ".concat(n),"aria-current":o===n?"page":void 0},{children:n}),r)}),e("button",x({className:"st-next-prev-btn ".concat(N?"disabled":""),onClick:E,disabled:N,"aria-label":"Go to previous page"},{children:p.prev})),e("button",x({className:"st-next-prev-btn ".concat(H?"disabled":""),onClick:k,disabled:H,"aria-label":"Go to next page"},{children:p.next}))]}))]}))},fe=function(n){return e("svg",x({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},ve=function(n){return e("svg",x({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},he=function(n){return e("svg",x({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},pe=function(n){return e("svg",x({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},we=function(n){return e("svg",x({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:n.className,style:{height:"1em"}},{children:e("path",{d:"M298 177.5c3.8-8.8 2-19-4.6-26l-116-144C172.9 2.7 166.6 0 160 0s-12.9 2.7-17.4 7.5l-116 144c-6.6 7-8.4 17.2-4.6 26S34.4 192 44 192l72 0 0 288c0 17.7 14.3 32 32 32l24 0c17.7 0 32-14.3 32-32l0-288 72 0c9.6 0 18.2-5.7 22-14.5z"})}))},me=function(n){return e("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:n.className,style:x({height:"10px"},n.style)},{children:e("path",{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})}))},ge=function(n){return e("svg",x({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:n.className,style:{height:"1em"}},{children:e("path",{d:"M22 334.5c-3.8 8.8-2 19 4.6 26l116 144c4.5 4.8 10.8 7.5 17.4 7.5s12.9-2.7 17.4-7.5l116-144c6.6-7 8.4-17.2 4.6-26s-12.5-14.5-22-14.5l-72 0 0-288c0-17.7-14.3-32-32-32L148 0C130.3 0 116 14.3 116 32l0 288-72 0c-9.6 0-18.2 5.7-22 14.5z"})}))},be=function(n){return r("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 10",className:n.className,style:x({height:"10px",width:"16px"},n.style)},{children:[e("circle",{cx:"3",cy:"3",r:"1.5",fill:"currentColor"}),e("circle",{cx:"8",cy:"3",r:"1.5",fill:"currentColor"}),e("circle",{cx:"13",cy:"3",r:"1.5",fill:"currentColor"}),e("circle",{cx:"3",cy:"7",r:"1.5",fill:"currentColor"}),e("circle",{cx:"8",cy:"7",r:"1.5",fill:"currentColor"}),e("circle",{cx:"13",cy:"7",r:"1.5",fill:"currentColor"})]}))},xe=function(n){return e("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:n.className,style:x({height:"1em"},n.style)},{children:e("path",{d:"M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"})}))},ye=function(){return e("svg",x({className:"st-custom-select-arrow",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},Ie=function(e){var n=e.headerContainerRef,r=e.mainSectionRef,t=e.scrollbarWidth,a=i(!1),u=a[0],l=a[1];return o(function(){var e=null==n?void 0:n.current;if(u&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(t,"px")),function(){e.classList.remove("st-header-scroll-padding")}},[n,u,t]),o(function(){var e=null==r?void 0:r.current;if(e&&(null==n?void 0:n.current)){var t=function(){e&&l(e.scrollHeight>e.clientHeight)};t();var o=new ResizeObserver(function(){t()});return o.observe(e),function(){e&&o.unobserve(e)}}},[n,r]),{isMainSectionScrollable:u}},Ce=function(n){var r=n.children,t=n.onClose,u=n.open,l=n.overflow,c=void 0===l?"auto":l,s=n.setOpen,d=n.width,f=n.containerRef,v=n.positioning,h=void 0===v?"fixed":v,p=se().mainBodyRef,w=a(null),m=a(null),g=i("bottom-left"),b=g[0],y=g[1],I=i({}),C=I[0],R=I[1],S=i(!1),M=S[0],N=S[1];return o(function(){u&&w.current?(N(!1),!m.current&&w.current.parentElement&&(m.current=w.current.parentElement),requestAnimationFrame(function(){if(w.current&&m.current){var e,n=w.current,r=m.current.getBoundingClientRect(),t=n.offsetHeight,o=d||n.offsetWidth,i=(e=(null==f?void 0:f.current)?f.current.getBoundingClientRect():(null==p?void 0:p.current)?p.current.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0,width:window.innerWidth,height:window.innerHeight,x:0,y:0,toJSON:function(){}}).bottom-r.bottom,a=r.top-e.top,u="bottom",l={};(t>i&&a>=t||t>i&&a>i)&&(u="top");var c="left";o>e.right-r.right+r.width&&(c="right"),"fixed"===h?("bottom"===u?l.top=r.bottom+4:l.bottom=window.innerHeight-r.top+4,"left"===c?l.left=r.left:l.right=window.innerWidth-r.right):("bottom"===u?l.top=r.height+4:l.bottom=r.height+4,"left"===c?l.left=0:l.right=0),y("".concat(u,"-").concat(c)),R(l),N(!0)}})):u||N(!1)},[u,d,f,p,h]),o(function(){var e=function(e){u&&w.current&&w.current&&!w.current.contains(e.target)&&(s(!1),null==t||t())};return u&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}},[u,t,s]),o(function(){var e=function(e){if(w.current&&!w.current.contains(e.target)){var n=w.current.parentElement;n&&!n.contains(e.target)&&(s(!1),null==t||t())}},n=function(n){"Enter"===n.key&&e(n)};return u&&(document.addEventListener("mousedown",e,!0),document.addEventListener("keydown",n,!0)),function(){document.removeEventListener("mousedown",e,!0),document.removeEventListener("keydown",n,!0)}},[t,u,s]),o(function(){var e=function(e){"Escape"===e.key&&u&&(s(!1),null==t||t())};return u&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[t,u,s]),u?e("div",x({ref:w,className:"st-dropdown-content st-dropdown-".concat(b),onClick:function(e){return e.stopPropagation()},onMouseDown:function(e){return e.stopPropagation()},onTouchStart:function(e){return e.stopPropagation()},style:x(x({position:h,width:d?"".concat(d,"px"):"auto",visibility:M?"visible":"hidden"},C),{overflow:c})},{children:r})):null},Re=function(n){var r=n.children,t=n.onClick,o=n.isSelected,i=void 0!==o&&o,a=n.disabled,u=void 0!==a&&a,l=n.className,c=void 0===l?"":l;return e("div",x({className:"st-dropdown-item ".concat(i?"selected":""," ").concat(u?"disabled":""," ").concat(c),onClick:function(){!u&&t&&t()},role:"option","aria-selected":i,"aria-disabled":u},{children:r}))},Se=function(n){var t=n.onBlur,o=n.onChange,a=n.open,u=n.setOpen,l=i(n.value),c=l[0],s=l[1],d=function(e){s(e),o(e),u(!1),t()};return r(Ce,x({open:a,onClose:function(){t()},setOpen:u,width:120},{children:[e(Re,x({isSelected:!0===c,onClick:function(){return d(!0)}},{children:"True"})),e(Re,x({isSelected:!1===c,onClick:function(){return d(!1)}},{children:"False"}))]}))},Me=function(n){var r=n.defaultValue,t=n.onBlur,o=n.onChange,i=a(null);return e("input",{className:"editable-cell-input",ref:i,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:t,onChange:function(e){o(e.target.value)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||t()},onMouseDown:function(e){e.stopPropagation()}})},Ne=function(n){var r=n.defaultValue,t=n.onBlur,o=n.onChange,i=a(null);return e("input",{className:"editable-cell-input",ref:i,autoFocus:!0,defaultValue:""+r,onBlur:t,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&o(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||t()},onMouseDown:function(e){e.stopPropagation()}})},He=d(function(){return import("./Animate-3535d295.js")}),Ee=d(function(){return import("./DatePicker-5c93fbcb.js")}),ke=d(function(){return Promise.resolve().then(function(){return Sr})}),Te=d(function(){return Promise.resolve().then(function(){return Nr})}),Pe=function(n){var r=y(n,["parentRef","tableRow"]);return e(f,x({fallback:e("div",x({},r))},{children:e(He,x({},n))}))},Ae=function(n){return e(f,x({fallback:e("div",x({style:{padding:"20px",textAlign:"center"}},{children:"Loading..."}))},{children:e(Ee,x({},n))}))},De=function(n){var r=n.width,t=n.height;return e(f,x({fallback:e("div",{style:{width:void 0===r?100:r,height:void 0===t?30:t,background:"#f3f4f6"}})},{children:e(ke,x({},n))}))},Fe=function(n){var r=n.width,t=n.height;return e(f,x({fallback:e("div",{style:{width:void 0===r?100:r,height:void 0===t?30:t,background:"#f3f4f6"}})},{children:e(Te,x({},n))}))},Oe=function(e){if(!e)return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){var n=e.split("-").map(Number);return new Date(n[0],n[1]-1,n[2],12,0,0)}var r=new Date(e);return isNaN(r.getTime())?new Date:new Date(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0)},Le=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0)},We=function(e){if(!e)return new Date;if("string"==typeof e)return Oe(e);if("number"==typeof e){var n=new Date(e);return isNaN(n.getTime())?new Date:Le(n)}return e instanceof Date?Le(e):new Date},Be=function(e){return e?Oe(""+e):new Date},ze=function(n){var r=n.onBlur,t=n.onChange,i=n.open,a=n.setOpen,u=n.value;o(function(){var e=setTimeout(function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()},0);return function(){return clearTimeout(e)}},[]);var l=function(){r()};return e(Ce,x({open:i,onClose:l,setOpen:a,overflow:"hidden",width:240},{children:e(Ae,{value:Be(u),onChange:function(e){var n=e.toISOString().split("T")[0];t(n),a(!1),r()},onClose:l})}))},qe=function(n){var r=n.onBlur,t=n.onChange,o=n.open,a=n.options,u=n.setOpen,l=i(n.value||""),c=l[0],s=l[1];return e(Ce,x({open:o,onClose:function(){r()},setOpen:u,width:150},{children:e("div",x({className:"st-enum-dropdown-content"},{children:a.map(function(n){return e(Re,x({isSelected:c===n.value,onClick:function(){return s(e=n.value),t(e),u(!1),void r();var e}},{children:n.label}),n.value)})}))}))},Ge=function(n){var r=n.enumOptions,t=void 0===r?[]:r,o=n.onChange,i=n.setIsEditing,a=n.type,u=void 0===a?"string":a,l=n.value,c=function(){i(!1)};return"boolean"===u&&"boolean"==typeof l?e(Se,{onBlur:c,onChange:function(e){return o(e)},open:!0,setOpen:i,value:l}):"date"===u?e(ze,{onBlur:c,onChange:o,open:!0,setOpen:i,value:l}):"enum"===u?e(qe,{onBlur:c,onChange:o,open:!0,options:t,setOpen:i,value:"string"==typeof l?l:""}):"number"===u&&"number"==typeof l?e(Ne,{defaultValue:l,onBlur:c,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}}):e(Me,{defaultValue:null==l?"":l+"",onBlur:c,onChange:o})},Ve=0,je=function(){return function(e){var n=e.callback,r=e.callbackProps,t=e.limit,o=Date.now();0!==Ve&&t>o-Ve||(Ve=o,n(r))}},Ke=function(e){var n=a(e);return o(function(){JSON.stringify(n.current)!==JSON.stringify(e)&&(n.current=e)},[e]),n.current},Ue=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Ue);var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Ue(e[r]));return n},_e=function(e,n){return e.filter(function(e){return e.pinned===n}).some(function(e){return!e.hide})},Je=Date.now(),Ye={screenX:0,screenY:0},Xe=function(e,n,r){void 0===r&&(r=[]);for(var t=0;e.length>t;t++){var o=e[t];if(o.accessor===n)return R(R([],r,!0),[t],!1);if(o.children&&o.children.length>0){var i=Xe(o.children,n,R(R([],r,!0),[t],!1));if(i)return i}}return null},$e=function(e,n){for(var r=e,t=0;n.length-1>t;t++)r=r[n[t]].children;return r},Qe=function(e,n,r){if(1===n.length)return r;for(var t=e,o=0;n.length-2>o;o++)t=t[n[o]].children;return t[n[n.length-2]].children=r,e},Ze=function(e){return"left"===e.pinned?"left":"right"===e.pinned?"right":"main"};function en(e){var n,r,t=e.draggedHeader,o=e.hoveredHeader,i=Ue(e.headers),a=!1;try{var u=Ze(o),l=i.findIndex(function(e){return e.accessor===t.accessor}),c=i.findIndex(function(e){return e.accessor===o.accessor});if(-1===l||-1===c)return{newHeaders:i,emergencyBreak:a=!0};var s=i.splice(l,1)[0],d=(n=u,r=x({},s),"left"===n?r.pinned="left":"right"===n?r.pinned="right":delete r.pinned,r);i.splice(c,0,d)}catch(e){console.error("Error in insertHeaderAcrossSections:",e),a=!0}return{newHeaders:i,emergencyBreak:a}}var nn=function(e){var n=e.draggedHeaderRef,r=e.headers,t=e.hoveredHeaderRef,o=e.onColumnOrderChange,i=e.onTableHeaderDragEnd,a=se().setHeaders,u=Ke(r);return{handleDragStart:function(e){n.current=e,Je=Date.now()},handleDragOver:function(e){var o=e.event,a=e.hoveredHeader;if(o.preventDefault(),r&&n.current){var l=o.currentTarget.getAnimations().some(function(e){return"running"===e.playState}),c=o.screenX,s=o.screenY,d=Math.sqrt(Math.pow(c-Ye.screenX,2)+Math.pow(s-Ye.screenY,2));t.current=a;var f,v,h,p=n.current,w=!1;if(Ze(p)!==Ze(a))f=(R=en({headers:r,draggedHeader:p,hoveredHeader:a})).newHeaders,w=R.emergencyBreak;else{var m=r,g=Xe(m,p.accessor),b=Xe(m,a.accessor);if(!g||!b)return;var x=g.length,y=b.length,I=b;if(x!==y){var C=y-x;C>0&&(I=b.slice(0,-C))}if((v=g).length!==(h=I).length||1!==v.length&&!v.slice(0,-1).every(function(e,n){return e===h[n]}))return;var R=function(e,n,r){var t=Ue(e),o=!1;function i(e,n){for(var r=e,t=0;n.length-1>t;t++)r=r[n[t]].children;return r[n[n.length-1]]}function a(e,n,r){for(var t=e,i=0;n.length-1>i;i++){if(!t[n[i]].children){o=!0;break}t=t[n[i]].children}t[n[n.length-1]]=r}var u=i(t,n);return a(t,n,i(t,r)),a(t,r,u),{newHeaders:t,emergencyBreak:o}}(m,g,I);f=R.newHeaders,w=R.emergencyBreak}if(!(l||a.accessor===p.accessor||10>d||JSON.stringify(f)===JSON.stringify(r)||w)){var S=Date.now();JSON.stringify(f)===JSON.stringify(u)&&(1500>S-Je||40>d)||(Je=S,Ye={screenX:c,screenY:s},i(f))}}},handleDragEnd:function(){n.current=null,t.current=null,setTimeout(function(){a(function(e){return R([],e,!0)}),null==o||o(r)},10)}}},rn=function(n){var t=n.checked,o=void 0!==t&&t,i=n.children,a=n.onChange;return r("label",x({className:"st-checkbox-label"},{children:[e("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},onKeyDown:function(e){" "===e.key&&e.stopPropagation()},type:"checkbox","aria-label":n.ariaLabel,"aria-checked":o}),e("span",x({className:"st-checkbox-custom ".concat(o?"st-checked":""),"aria-hidden":"true"},{children:o&&e(me,{className:"st-checkbox-checkmark"})})),i]}))},tn=function(n){var r,t=n.content,o=n.header;return o.valueFormatter?o.valueFormatter({accessor:o.accessor,colIndex:n.colIndex,row:n.row,rowIndex:n.rowIndex,value:t}):"lineAreaChart"===o.type&&Array.isArray(t)?(r=t.filter(function(e){return"number"==typeof e})).length>0?e(De,x({data:r},o.chartOptions)):null:"barChart"===o.type&&Array.isArray(t)?(r=t.filter(function(e){return"number"==typeof e})).length>0?e(Fe,x({data:r},o.chartOptions)):null:"boolean"==typeof t?t?"True":"False":Array.isArray(t)?0===t.length?"[]":t.map(function(e){return"object"==typeof e&&null!==e?JSON.stringify(e):e+""}).join(", "):"date"===o.type&&null!==t&&("string"==typeof t||"number"==typeof t||"object"==typeof t&&t instanceof Date)?We(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):t},on=t.memo(function(t){var c=t.borderClass,s=t.colIndex,d=t.displayRowNumber,f=t.header,v=t.isHighlighted,h=t.isInitialFocused,p=t.nestedIndex,w=t.parentHeader,m=t.rowIndex,g=t.tableRow,b=se(),y=b.canExpandRowGroup,I=b.cellRegistry,C=b.cellUpdateFlash,R=b.collapsedRows,S=b.columnBorders,M=b.draggedHeaderRef,N=b.enableRowSelection,H=b.expandedDepths,E=b.expandedRows,k=b.handleMouseDown,T=b.handleMouseOver,P=b.handleRowSelect,A=b.headers,F=b.hoveredHeaderRef,L=b.icons,W=b.isCopyFlashing,B=b.isLoading,V=b.isRowSelected,K=b.isWarningFlashing,_=b.onCellEdit,J=b.onCellClick,Y=b.onRowGroupExpand,X=b.onTableHeaderDragEnd,$=b.rowButtons,Q=b.rowGrouping,Z=b.setCollapsedRows,ee=b.setExpandedRows,ne=b.setRowStateMap,re=b.rowsWithSelectedCells,te=b.selectedColumns,oe=b.tableBodyContainerRef,ie=b.theme,ae=b.useOddColumnBackground,ue=g.depth,le=g.row,ce=g.rowPath,de=g.rowIndexPath,fe=g.absoluteRowIndex,ve=g.rowId,he=i(z(le,f.accessor)),pe=he[0],we=he[1],me=i(!1),ge=me[0],be=me[1],xe=i(!1),ye=xe[0],Ie=xe[1],Ce=i(!1),Re=Ce[0],Se=Ce[1],Me=a(null),Ne=j(ve),He=Q&&Q[ue],Ee=!!He&&function(e,n){return!!n&&G(e[n])}(le,He),ke=Q&&Q.length>ue,Te=!y||y(le),Ae=!!f.nestedTable,De=U(Ne,ue,H,E,R),Fe=W({rowIndex:m,colIndex:s,rowId:Ne}),Oe=K({rowIndex:m,colIndex:s,rowId:Ne}),Le=u(function(){var e,n,r;if(!S)return!1;var t=A.filter(function(e){return"left"===e.pinned}),o=A.filter(function(e){return!e.pinned}),i=A.filter(function(e){return"right"===e.pinned});return"left"===f.pinned?(null===(e=t[t.length-1])||void 0===e?void 0:e.accessor)===f.accessor:"right"===f.pinned?(null===(n=i[i.length-1])||void 0===n?void 0:n.accessor)===f.accessor:(null===(r=o[o.length-1])||void 0===r?void 0:r.accessor)===f.accessor},[S,A,f.accessor,f.pinned]),We=nn({draggedHeaderRef:M,headers:A,hoveredHeaderRef:F,onTableHeaderDragEnd:X}).handleDragOver,Be=je(),ze=D({accessor:f.accessor,rowId:Ne}),qe=O({rowId:Ne,accessor:f.accessor}),Ve=f.isSelectionColumn&&N;o(function(){if(I){var e="".concat(Ne,"-").concat(f.accessor);return I.set(e,{updateContent:function(e){pe!==e?(we(e),C&&(Ie(!0),Me.current&&clearTimeout(Me.current),Me.current=setTimeout(function(){Ie(!1)},800))):we(e)}}),function(){I.delete(e),Me.current&&clearTimeout(Me.current)}}},[I,C,Ne,f.accessor,pe]),o(function(){if(ye){var e=setTimeout(function(){Ie(!1)},850);return function(){return clearTimeout(e)}}},[ye]),o(function(){we(z(le,f.accessor))},[le,f.accessor]);var Ke="boolean"===f.type||"date"===f.type||"enum"===f.type,Ue=!!(null==f?void 0:f.isEditable),_e=te.has(s),Je=v&&!_e,Ye=u(function(){return!!Ve&&re.has(Ne+"")},[Ve,re,Ne]),Xe=null==w?void 0:w.singleRowChildren,$e="st-cell ".concat(ue>0&&f.expandable?"st-cell-depth-".concat(ue):""," ").concat(Je?h?"st-cell-selected-first ".concat(c):"st-cell-selected ".concat(c):""," ").concat(_e?h?"st-cell-column-selected-first":"st-cell-column-selected":""," ").concat(Ue?"clickable":""," ").concat(ye?h?"st-cell-updating-first":"st-cell-updating":""," ").concat(Fe?h?"st-cell-copy-flash-first":"st-cell-copy-flash":""," ").concat(Oe?h?"st-cell-warning-flash-first":"st-cell-warning-flash":""," ").concat(ae?p%2==0?"even-column":"odd-column":""," ").concat(Ve?"st-selection-cell":""," ").concat(Ye?"st-selection-has-highlighted-cell":""," ").concat(Le?"st-last-column":""," ").concat(Xe?"st-sub-cell":""," ").concat(Re?"hovered":""),Qe=l(function(e){null==e&&(e="number"===f.type?0:"boolean"!==f.type&&""),we(e),q(le,f.accessor,e),null==_||_({accessor:f.accessor,newValue:e,row:le,rowIndex:m})},[f.accessor,f.type,_,le,m]),Ze=l(function(e){e.stopPropagation();var n=U(Ne,ue,H,E,R),r=Ne+"";if(n?(Z(function(e){var n=new Map(e);return n.set(r,ue),n}),ee(function(e){var n=new Map(e);return n.delete(r),n})):(ee(function(e){var n=new Map(e);return n.set(r,ue),n}),Z(function(e){var n=new Map(e);return n.delete(r),n})),n&&ne(function(e){var n=new Map(e);return n.delete(Ne),n}),Y){var t=f.pinned;Y({depth:ue,event:e,groupingKey:He,groupingKeys:Q||[],isExpanded:!n,row:le,rowIndexPath:de||[],rowIdPath:ce,setEmpty:function(e,n){ne(function(r){var o=new Map(r),i=o.get(Ne)||{};return o.set(Ne,x(x({},i),{isEmpty:e,emptyMessage:n,loading:!1,error:null,triggerSection:t})),o})},setError:function(e){ne(function(n){var r=new Map(n),o=r.get(Ne)||{};return r.set(Ne,x(x({},o),{error:e,loading:!1,isEmpty:!1,triggerSection:t})),r})},setLoading:function(e){e?ne(function(e){var n=new Map(e),r=n.get(Ne)||{};return n.set(Ne,x(x({},r),{loading:!0,error:null,isEmpty:!1,triggerSection:t})),n}):setTimeout(function(){ne(function(e){var n=new Map(e),r=n.get(Ne)||{};return n.set(Ne,x(x({},r),{loading:!1,error:null,isEmpty:!1,triggerSection:t})),n})},0)}})}},[R,He,ue,H,E,f.pinned,Y,le,Q,Ne,de,ce,Z,ee,ne]);return B||g.isLoadingSkeleton?e("div",x({className:$e},{children:e("span",x({className:"st-cell-content ".concat("right"===f.align?"right-aligned":"center"===f.align?"center-aligned":"left-aligned")},{children:e("div",{className:"st-loading-skeleton"})}))})):!ge||Ke||Ve?r(Pe,x({className:$e,"data-accessor":f.accessor,"data-col-index":s,"data-row-id":Ne,"data-row-index":m,role:"gridcell","aria-colindex":s+1,id:ze,onClick:function(){J&&!Ve&&J({accessor:f.accessor,colIndex:s,row:le,rowIndex:m,value:pe})},onDoubleClick:function(){return f.isEditable&&!Ve&&be(!0)},onDragOver:function(e){Ve||Be({callback:We,callbackProps:{event:e,hoveredHeader:f},limit:50})},onKeyDown:function(e){ge||Ve||"F2"!==e.key&&"Enter"!==e.key||!f.isEditable||ge||(e.preventDefault(),be(!0))},onMouseDown:function(){ge||Ve||k({rowIndex:m,colIndex:s,rowId:Ne})},onMouseEnter:function(){Se(!0)},onMouseLeave:function(){Se(!1)},onMouseOver:function(){ge||Ve||T({rowIndex:m,colIndex:s,rowId:Ne})},parentRef:oe,tableRow:g},{children:[f.expandable&&ke?e("div",x({className:"st-icon-container st-expand-icon-container ".concat(Te&&(Ee||Y||Ae)?De?"expanded":"collapsed":"placeholder"),onClick:Te&&(Ee||Y||Ae)?function(e){return Ze(e)}:void 0,role:Te&&(Ee||Y||Ae)?"button":"presentation",tabIndex:Te&&(Ee||Y||Ae)?0:-1,"aria-label":Te&&(Ee||Y||Ae)?"".concat(De?"Collapse":"Expand"," row group"):void 0,"aria-expanded":Te&&(Ee||Y||Ae)?De:void 0,"aria-hidden":!(Te&&(Ee||Y||Ae)),onKeyDown:Te&&(Ee||Y||Ae)?function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),Ze(e))}:void 0},{children:L.expand})):null,e("span",x({className:"st-cell-content ".concat("right"===f.align?"right-aligned":"center"===f.align?"center-aligned":"left-aligned")},{children:B||g.isLoadingSkeleton?e("div",{className:"st-loading-skeleton"}):e(n,{children:Ve?r("div",x({className:"st-selection-cell-content"},{children:[e("div",x({className:"st-selection-control"},{children:Re||V&&V(Ne+"")?e(rn,{checked:!!V&&V(Ne+""),onChange:function(e){P&&P(Ne+"",e)},ariaLabel:"Select row ".concat(d+1)}):e("span",x({className:"st-row-number"},{children:d+1}))})),function(){if(!$||!Ve||0===$.length)return null;if(!(Re||V&&V(Ne+"")))return null;var n={row:le,rowIndex:d};return e("div",x({className:"st-row-buttons",role:"group","aria-label":"Actions for row ".concat(d+1)},{children:$.map(function(r,t){return e("span",x({className:"st-row-button"},{children:r(n)}),t)})}))}()]})):f.cellRenderer?function(){var e;return f.cellRenderer({accessor:f.accessor,colIndex:s,row:le,rowIndex:fe,rowPath:ce,theme:ie,value:pe,formattedValue:null===(e=null==f?void 0:f.valueFormatter)||void 0===e?void 0:e.call(f,{accessor:f.accessor,colIndex:s,row:le,rowIndex:m,value:pe})})}():tn({content:pe,header:f,colIndex:s,row:le,rowIndex:m})})})),!B&&!g.isLoadingSkeleton&&ge&&Ke&&!Ve&&e(Ge,{enumOptions:f.enumOptions,onChange:Qe,setIsEditing:be,type:f.type,value:pe})]}),qe):e("div",x({className:"st-cell-editing",id:D({accessor:f.accessor,rowId:Ne}),onMouseDown:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()}},{children:e(Ge,{enumOptions:f.enumOptions,onChange:Qe,setIsEditing:be,type:f.type,value:pe})}))},function(e,n){if(e.rowIndex!==n.rowIndex||e.colIndex!==n.colIndex||e.isHighlighted!==n.isHighlighted||e.isInitialFocused!==n.isInitialFocused||e.borderClass!==n.borderClass)return!1;if(e.tableRow!==n.tableRow){if(e.tableRow.row!==n.tableRow.row)return!1;if(e.tableRow.position!==n.tableRow.position||e.tableRow.displayPosition!==n.tableRow.displayPosition)return!1}return(e.header===n.header||e.header.accessor===n.header.accessor&&e.header.isEditable===n.header.isEditable&&e.header.type===n.header.type&&e.header.cellRenderer===n.header.cellRenderer&&e.header.valueFormatter===n.header.valueFormatter)&&e.parentHeader===n.parentHeader&&e.displayRowNumber===n.displayRowNumber&&e.nestedIndex===n.nestedIndex}),an=function(n){var t=n.columnIndices,o=n.displayRowNumber,i=n.header,a=n.headers,u=n.nestedIndex,l=n.parentHeader,c=n.pinned,s=n.rowIndex,d=n.rowIndices,f=n.tableRow,h=t[i.accessor],p=se(),w=p.getBorderClass,m=p.isSelected,g=p.isInitialFocusedCell,b=p.collapsedHeaders,x=j(f.rowId);if(i.children&&i.children.length>0){var y=i.children.filter(function(e){return F({header:e,pinned:c,headers:a,collapsedHeaders:b})});if(i.singleRowChildren){var I={rowIndex:s,colIndex:h,rowId:x},C=w(I),R=m(I),S=g(I),M=D({accessor:i.accessor,rowId:x});return r(v,{children:[e(on,{borderClass:C,colIndex:h,displayRowNumber:o,header:i,isHighlighted:R,isInitialFocused:S,nestedIndex:u,parentHeader:l,rowIndex:s,tableRow:f},M),y.map(function(n){var r=D({accessor:n.accessor,rowId:x});return e(an,{columnIndices:t,displayRowNumber:o,header:n,headers:a,nestedIndex:u,parentHeader:i,pinned:c,rowIndex:s,rowIndices:d,tableRow:f},r)})]})}return e(v,{children:y.map(function(n){var r=D({accessor:n.accessor,rowId:x});return e(an,{columnIndices:t,displayRowNumber:o,header:n,headers:a,nestedIndex:u,parentHeader:i,pinned:c,rowIndex:s,rowIndices:d,tableRow:f},r)})})}var N={rowIndex:s,colIndex:h,rowId:x},H=w(N),E=m(N),k=g(N),T=D({accessor:i.accessor,rowId:x});return e(on,{borderClass:H,colIndex:h,displayRowNumber:o,header:i,isHighlighted:E,isInitialFocused:k,nestedIndex:u,parentHeader:l,rowIndex:s,tableRow:f},T)},un=t.memo(function(r){var t=r.columnIndexStart,o=r.columnIndices,i=r.headers,a=r.pinned,u=r.rowIndex,l=r.displayRowNumber,c=r.rowIndices,s=r.tableRow,d=se().collapsedHeaders,f=i.filter(function(e){return F({header:e,pinned:a,headers:i,collapsedHeaders:d})});return e(n,{children:f.map(function(n,r){var d=j(s.rowId),f=D({accessor:n.accessor,rowId:d});return e(an,{columnIndices:o,displayRowNumber:l,header:n,headers:i,nestedIndex:r+(null!=t?t:0),pinned:a,rowIndex:u,rowIndices:c,tableRow:s},f)})})},function(e,n){return e.rowIndex===n.rowIndex&&e.displayRowNumber===n.displayRowNumber&&e.columnIndexStart===n.columnIndexStart&&(e.tableRow===n.tableRow||e.tableRow.row===n.tableRow.row)&&e.pinned===n.pinned&&e.headers===n.headers&&e.columnIndices===n.columnIndices&&e.rowIndices===n.rowIndices}),ln=function(n){var r=n.rowState,t=n.loadingStateRenderer,o=n.errorStateRenderer,i=n.emptyStateRenderer,a=null;return r.loading&&t?a=t:r.error&&o?a=o:r.isEmpty&&i&&(a=i),a?e("div",x({className:"st-cell st-state-row-cell",style:{gridColumn:"1 / -1",padding:0}},{children:a})):null},cn=function(n){var r=n.calculatedHeight,t=n.childAccessor,o=n.depth,i=n.expandableHeader,a=n.index,u=n.parentRow,l=n.position,c=se(),s=c.theme,d=c.rowGrouping,f=c.rowHeight,v=c.heightOffsets,h=c.customTheme,p=c.loadingStateRenderer,w=c.errorStateRenderer,m=c.emptyStateRenderer,g=c.icons,b=i.nestedTable;if(!b)return null;var y=z(u,t),I=Array.isArray(y)?y:[],C=d&&d[o+1]?null==d?void 0:d.slice(o+1):void 0,R=b.customTheme?x(x({},h),b.customTheme):h,S=function(e){var n=e.calculatedHeight,r=e.customHeight,t=e.customTheme;return r?"string"==typeof r?r:"".concat(r,"px"):"".concat(n-t.nestedGridPaddingTop-t.nestedGridPaddingBottom,"px")}({calculatedHeight:r,customHeight:b.height,customTheme:h}),M=W({calculatedHeight:r,customHeight:b.height,customTheme:h});return e("div",x({className:"st-row st-nested-grid-row","data-index":a,style:{transform:"translate3d(0, ".concat(re({position:l,rowHeight:f,heightOffsets:v,customTheme:h}),"px, 0)"),height:"".concat(M,"px"),paddingTop:"".concat(h.nestedGridPaddingTop,"px"),paddingBottom:"".concat(h.nestedGridPaddingBottom,"px")}},{children:e(Ir,x({},b,{rows:I,theme:s,customTheme:R,height:S,rowGrouping:C,loadingStateRenderer:p,errorStateRenderer:w,emptyStateRenderer:m,icons:g}))}))},sn=t.memo(function(n){var r=n.columnIndices,t=n.columnIndexStart,o=n.gridTemplateColumns,i=n.headers,a=n.index,u=n.pinned,l=n.rowHeight,c=n.rowIndices,s=n.setHoveredIndex,d=n.tableRow,f=n.isSticky,v=void 0!==f&&f,h=n.stickyIndex,p=void 0===h?0:h,w=n.stickyOffset,m=void 0===w?0:w,g=n.stickyZIndex,b=se(),y=b.customTheme,I=b.emptyStateRenderer,C=b.errorStateRenderer,R=b.heightOffsets,S=b.isAnimating,M=b.isRowSelected,N=b.loadingStateRenderer,H=b.maxHeaderDepth,E=b.useHoverRowBackground,k=b.useOddEvenRowBackground,T=d.position,P=d.displayPosition,A=d.stateIndicator,D=d.nestedTable;if(D)return u?e("div",{className:"st-row st-nested-grid-spacer","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(re({position:T,rowHeight:l,heightOffsets:R,customTheme:y}),"px, 0)"),height:"".concat(D.calculatedHeight,"px")}}):e(cn,{calculatedHeight:D.calculatedHeight,childAccessor:D.childAccessor,depth:d.depth-1,expandableHeader:D.expandableHeader,index:a,parentRow:D.parentRow,position:T});if(A)return e("div",A.state.triggerSection===u&&(A.state.loading&&N||A.state.error&&C||A.state.isEmpty&&I)?x({className:"st-row st-state-row","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(re({position:T,rowHeight:l,heightOffsets:R,customTheme:y}),"px, 0)"),height:"".concat(l,"px")}},{children:e(ln,{parentRow:A.parentRow,rowState:A.state,gridTemplateColumns:o,loadingStateRenderer:N,errorStateRenderer:C,emptyStateRenderer:I})}):{className:"st-row st-state-row-spacer","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(re({position:T,rowHeight:l,heightOffsets:R,customTheme:y}),"px, 0)"),height:"".concat(l,"px")}});var F=T%2==0,O=j(d.rowId),L=!!M&&M(O),W=v?{gridTemplateColumns:o,transform:"translateY(".concat(p*(l+1)+m,"px)"),height:"".concat(l,"px"),position:"absolute",top:0,left:0,zIndex:g}:{gridTemplateColumns:o,top:re({position:T,rowHeight:l,heightOffsets:R,customTheme:y}),height:"".concat(l,"px")};return e("div",x({className:"st-row ".concat(v?"st-sticky-parent":""," ").concat(k?F?"even":"odd":""," ").concat(L?"selected":""),"data-index":T,role:"row","aria-rowindex":T+H+1,onMouseEnter:function(){!S&&E&&s(T)},style:W},{children:e(un,{columnIndexStart:t,columnIndices:r,displayRowNumber:P,headers:i,pinned:u,rowIndex:T,rowIndices:c,tableRow:d},O)}))},function(e,n){return e.index===n.index&&e.tableRow.position===n.tableRow.position&&e.tableRow.displayPosition===n.tableRow.displayPosition&&e.tableRow.row===n.tableRow.row&&e.tableRow.stateIndicator===n.tableRow.stateIndicator&&e.rowHeight===n.rowHeight&&e.gridTemplateColumns===n.gridTemplateColumns&&e.pinned===n.pinned&&e.headers===n.headers&&e.columnIndices===n.columnIndices&&e.rowIndices===n.rowIndices&&e.columnIndexStart===n.columnIndexStart}),dn=function(n){var r=n.displayStrongBorder,t=n.position,o=n.rowHeight,i=n.templateColumns,u=n.isSticky,l=void 0!==u&&u,c=se(),s=c.heightOffsets,d=c.customTheme,f=a(null),v=l?t:function(e){var n=e.position,r=e.customTheme;return n*(e.rowHeight+r.rowSeparatorWidth)-r.rowSeparatorWidth+ee(n,e.heightOffsets)}({position:t,rowHeight:o,heightOffsets:s,customTheme:d}),h=l?{position:"absolute",top:0,left:0,transform:"translateY(".concat(v,"px)")}:{transform:"translate3d(0, ".concat(v,"px, 0)")};return e("div",x({className:"st-row-separator ".concat(r?"st-last-group-row":""),onMouseDown:function(e){var n=e.currentTarget,r=n.style.pointerEvents;n.style.pointerEvents="none";var t=document.elementFromPoint(e.clientX,e.clientY);if(n.style.pointerEvents=r,t){var o=t.closest(".st-cell");if(o instanceof HTMLElement){f.current=o;var i=o.getBoundingClientRect(),a=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:e.clientX,clientY:i.top+i.height/2});o.dispatchEvent(a)}}},onMouseUp:function(e){if(f.current){var n=f.current.getBoundingClientRect(),r=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:e.clientX,clientY:n.top+n.height/2});f.current.dispatchEvent(r),f.current=null}},style:x({gridTemplateColumns:i},h)},{children:e("div",{style:{gridColumn:"1 / -1"}})}))},fn=c(void 0),vn=function(e){var n=e.childRef,r=e.children,t=e.group,i=void 0===t?"default":t,a=function(){var e=s(fn);if(!e)throw Error("useScrollSyncContext must be used within a ScrollSyncProvider");return e}(),u=a.registerPane,l=a.unregisterPane;return o(function(){var e=[i];return n.current&&u(n.current,e),function(){n.current&&l(n.current,e)}},[n,u,l,i]),h(r,{ref:function(e){n.current=e}})},hn=p(function(n,t){var o=n.columnIndexStart,i=n.columnIndices,l=n.headers,c=n.pinned,s=n.rowHeight,d=n.rowIndices,f=n.setHoveredIndex,h=n.templateColumns,p=n.totalHeight,m=n.width,g=n.regularRows,b=c?"st-body-pinned-".concat(c):"st-body-main",y=a(null);return w(t,function(){return y.current},[]),u(function(){return _e(l,c)},[l,c])?e(vn,x({childRef:y,group:c?"pinned-".concat(c):"default"},{children:e("div",x({className:b,ref:y,style:x({position:"relative",height:"".concat(p,"px"),width:m},!c&&{flexGrow:1})},{children:g.map(function(n,t){var a=n.stateIndicator?"state-".concat(n.stateIndicator.parentRowId,"-").concat(n.position):j(n.rowId);return r(v,{children:[0!==t&&e(dn,{displayStrongBorder:n.isLastGroupRow,position:n.position,rowHeight:s,templateColumns:h}),e(sn,{columnIndexStart:o,columnIndices:i,gridTemplateColumns:h,headers:l,index:t,pinned:c,rowHeight:s,rowIndices:d,setHoveredIndex:f,tableRow:n})]},a)})}))})):null});function pn(e){var n=e.headers,r=e.pinnedLeftColumns,t=e.pinnedRightColumns,o=e.collapsedHeaders,i={},a=0,u=R(R(R([],r,!0),n,!0),t,!0),l=function(e,n){void 0===n&&(n=!1),n||a++,i[e.accessor]=a,e.children&&e.children.length>0&&e.children.filter(function(e){return F({header:e,headers:u,collapsedHeaders:o})}).forEach(function(n,r){l(n,!e.singleRowChildren&&0===r)})};return r.forEach(function(e,n){l(e,0===n)}),n.filter(function(e){return!e.pinned&&F({header:e,headers:u,collapsedHeaders:o})}).forEach(function(e,n){l(e,0===n&&0===r.length)}),t.forEach(function(e){l(e,!1)}),i}hn.displayName="TableSection";var wn=function(n){var t=n.calculatedHeaderHeight,o=n.stickyParents,i=n.mainTemplateColumns,l=n.pinnedLeftColumns,c=n.pinnedLeftTemplateColumns,s=n.pinnedLeftWidth,d=n.pinnedRightColumns,f=n.pinnedRightTemplateColumns,h=n.pinnedRightWidth,p=n.setHoveredIndex,w=n.rowIndices,m=n.scrollbarWidth,g=n.scrollTop,b=n.heightMap,y=n.partiallyVisibleRows,I=se(),C=I.collapsedHeaders,R=I.customTheme,S=I.editColumns,M=I.headers,H=I.rowHeight,E=a(null),k=a(null),T=a(null),P=u(function(){var e,n;if(0===o.length)return{treeTransitionOffset:0,offsetStartIndex:-1};var r,t=y[0];if((null==t?void 0:t.parentIndices)&&t.parentIndices.length>0)for(var i=function(e){var n=t.parentIndices[e];if(o.some(function(e){return e.position===n}))return r=n,"break"},a=t.parentIndices.length-1;a>=0&&"break"!==i(a);a--);var u=void 0!==r?o.findIndex(function(e){return e.position===r}):-1,l=-1,c=function(e){var n=o[e],r=o[e+1];return r?r.depth===n.depth?(l=e,"break"):n.depth>r.depth?(l=o.findIndex(function(e){return e.depth===n.depth}),"break"):void 0:"break"};for(a=0;o.length>a&&"break"!==c(a);a++);if(-1===l)return{treeTransitionOffset:0,offsetStartIndex:u};var s=null===(e=o[l])||void 0===e?void 0:e.position;if(void 0===s)return{treeTransitionOffset:0,offsetStartIndex:u};for(var d=0,f=0,v=y;v.length>f&&(null===(n=v[f].parentIndices)||void 0===n?void 0:n.includes(s));f++)d++;if(0===d)return{treeTransitionOffset:0,offsetStartIndex:u};var h=y[0];return{treeTransitionOffset:-((l+1-d)*H+Math.max(0,g-(b?b.rowTopPositions[h.position]:h.position*(H+R.rowSeparatorWidth)))),offsetStartIndex:u}},[R,b,y,H,g,o]),A=P.treeTransitionOffset,D=P.offsetStartIndex,F=u(function(){return pn({headers:M,pinnedLeftColumns:l,pinnedRightColumns:d,collapsedHeaders:C})},[M,l,d,C]),O=o.length>0?o.length*(H+1)+A:0;if(0===o.length)return null;var L=function(n,t,i,a,u,l){return void 0===u&&(u=0),e("div",x({className:i?"st-sticky-section-".concat(i):"st-sticky-section-main",ref:l,style:{position:"relative",height:"".concat(O,"px"),width:i?"".concat(a,"px"):void 0,flexGrow:i?0:1,flexShrink:i?0:void 0}},{children:o.map(function(a,l){var c=a.stateIndicator?"sticky-state-".concat(a.stateIndicator.parentRowId,"-").concat(a.position):"sticky-".concat(j(a.rowId)),s=-1!==D&&l>=D,d=s?A:0,f=(l+1)*(H+1)-1+d;return r(v,{children:[e(sn,{columnIndexStart:u,columnIndices:F,gridTemplateColumns:n,headers:t,index:a.position,pinned:i,rowHeight:H,rowIndices:w,setHoveredIndex:p,tableRow:a,isSticky:!0,stickyIndex:l,stickyOffset:d,stickyZIndex:s?l:o.length-l}),e(dn,{displayStrongBorder:!1,position:f,rowHeight:H,templateColumns:n,isSticky:!0})]},c)})}))},W=M.filter(function(e){return!e.pinned}),B="calc(100% - ".concat(m,"px - ").concat(S?"".concat(N,"px"):"0px",")");return r("div",x({className:"st-sticky-top",style:{height:"".concat(O,"px"),width:B,top:"".concat(t,"px")}},{children:[l.length>0&&e(vn,x({childRef:E,group:"pinned-left"},{children:L(c,l,"left",s,0,E)})),e(vn,x({childRef:k,group:"default"},{children:L(i,W,void 0,void 0,l.length,k)})),d.length>0&&e(vn,x({childRef:T,group:"pinned-right"},{children:L(f,d,"right",h,l.length+W.length,T)}))]}))},mn=function(t){var c=t.calculatedHeaderHeight,s=t.mainTemplateColumns,d=t.pinnedLeftColumns,f=t.pinnedLeftTemplateColumns,v=t.pinnedLeftWidth,h=t.pinnedRightColumns,p=t.pinnedRightTemplateColumns,w=t.pinnedRightWidth,m=t.rowsToRender,g=t.setScrollTop,b=t.setScrollDirection,y=t.shouldShowEmptyState,I=t.tableRows,C=t.stickyParents,R=t.regularRows,S=t.partiallyVisibleRows,M=t.heightMap,N=se(),H=N.collapsedHeaders,E=N.headerContainerRef,k=N.headers,T=N.heightOffsets,P=N.isAnimating,A=N.mainBodyRef,D=N.onLoadMore,F=N.rowHeight,O=N.scrollbarWidth,L=N.setIsScrolling,W=N.shouldPaginate,B=N.tableBodyContainerRef,z=N.tableEmptyStateRenderer,q=N.customTheme,G=i(!1),V=G[0],K=G[1],U=i(0),_=U[0],J=U[1],Y=a(new Set),X=l(function(e){if(document.querySelectorAll(".st-row.hovered").forEach(function(e){e.classList.remove("hovered")}),Y.current.clear(),null!==e&&B.current){var n=B.current,r='.st-row[data-index="'.concat(e,'"]:not(.st-nested-grid-row)');n.querySelectorAll(r).forEach(function(e){var r=e;r.closest(".st-body-container")===n&&(r.classList.add("hovered"),Y.current.add(r))});var t=n.previousElementSibling;t&&t.classList.contains("st-sticky-top")&&t.querySelectorAll(r).forEach(function(e){var n=e;n.classList.add("hovered"),Y.current.add(n)})}},[B]);o(function(){P&&X(null)},[P,X]),Ie({headerContainerRef:E,mainSectionRef:B,scrollbarWidth:O}),o(function(){return function(){Q.current&&clearTimeout(Q.current)}},[]);var $=a(null),Q=a(null),Z=a(0),ee=function(e){return e.length}(I),ne=u(function(){return function(e,n,r,t){return e*(n+t.rowSeparatorWidth)-t.rowSeparatorWidth+((null==r?void 0:r.reduce(function(e,n){return e+n[1]},0))||0)}(ee,F,T,q)},[ee,F,T,q]),re=u(function(){return pn({headers:k,pinnedLeftColumns:d,pinnedRightColumns:h,collapsedHeaders:H})},[k,d,h,H]),te=u(function(){var e={};return m.forEach(function(n,r){var t=j(n.rowId);e[t]=r}),e},[m]),oe=l(function(e,n){!D||W||V||200>=e.scrollHeight-(n+e.clientHeight)&&n>Z.current&&(K(!0),D(),setTimeout(function(){K(!1)},1e3))},[D,W,V]),ie={columnIndices:re,headerContainerRef:E,headers:k,rowHeight:F,rowIndices:te,rowsToRender:m,setHoveredIndex:X,regularRows:R};return r(n,{children:[!y&&e(wn,{calculatedHeaderHeight:c,heightMap:M,mainTemplateColumns:s,partiallyVisibleRows:S,pinnedLeftColumns:d,pinnedLeftTemplateColumns:f,pinnedLeftWidth:v,pinnedRightColumns:h,pinnedRightTemplateColumns:p,pinnedRightWidth:w,rowIndices:te,scrollTop:_,scrollbarWidth:O,setHoveredIndex:X,stickyParents:C}),e("div",x({className:"st-body-container",onMouseLeave:function(){return X(null)},onScroll:function(e){var n=e.currentTarget,r=n.scrollTop;L(!0),Q.current&&clearTimeout(Q.current),Q.current=setTimeout(function(){L(!1)},150),$.current&&cancelAnimationFrame($.current),$.current=requestAnimationFrame(function(){var e=Z.current,t=r>e?"down":e>r?"up":"none";g(r),b(t),J(r),oe(n,r),Z.current=r})},ref:B},{children:y?e("div",x({className:"st-empty-state-wrapper"},{children:z})):r(n,{children:[e(hn,x({},ie,{pinned:"left",templateColumns:f,totalHeight:ne,width:v})),e(hn,x({},ie,{columnIndexStart:d.length,ref:A,templateColumns:s,totalHeight:ne})),e(hn,x({},ie,{columnIndexStart:d.length+s.length,pinned:"right",templateColumns:p,totalHeight:ne,width:w}))]})}))]})},gn=function(e){var n=e.event,r=e.header,t=e.headers,o=e.setHeaders,i=e.setIsResizing,a=e.tableBodyContainerRef,u=e.startWidth,l=e.collapsedHeaders,c=e.autoExpandColumns,s=void 0!==c&&c,d=e.reverse,f=void 0!==d&&d,v=e.onColumnWidthChange;n.preventDefault();var h="clientX"in n?n.clientX:n.touches[0].clientX,p="touches"in n;if(r&&!r.hide){i(!0);var w,m=$(r);if(r.children&&r.children.length>0){var g=J(r,l);w=g.length>0?g:[r]}else w=[r];var b=new Map,x=0;if(s){var y=t.filter(function(e){return e.pinned===r.pinned});if(Q(y,l).forEach(function(e){var n="number"==typeof e.width?e.width:"string"==typeof e.width&&e.width.endsWith("px")?parseFloat(e.width):100;b.set(e.accessor,n)}),a.current){var I=a.current.clientWidth,C=xn({headers:t,containerWidth:I,collapsedHeaders:l}),S=C.leftWidth,M=C.rightWidth;x="left"===r.pinned?S:"right"===r.pinned?M:Math.max(0,I-S-M)}}var N=function(e){var n="right"===r.pinned?h-e:e-h;if(s){var i=t.filter(function(e){return e.pinned===r.pinned});In({delta:n,startWidth:u,resizedHeader:w.length>0?w[0]:r,sectionHeaders:i,reverse:f,collapsedHeaders:l,initialWidthsMap:b,sectionWidth:x,isParentResize:w.length>1,childrenToResize:w})}else{var a=function(e){var n=e.header,r=e.headers,t=e.collapsedHeaders,o=document.querySelector(".st-body-container");if(!o||0===o.clientWidth)return 1e3;var i=o.clientWidth,a=E(window.innerWidth);if(!n.pinned)return 1/0;var u=i*a-r.filter(function(e){return e.pinned===n.pinned&&e.accessor!==n.accessor}).reduce(function(e,n){return n.hide?e:e+J(n,t).reduce(function(e,n){return e+Y(n)},0)},0),l=$(n);return l>u?(console.warn("Header ".concat(n.accessor," exceeds pinned section width limit")),l):u}({header:r,headers:t,collapsedHeaders:l});w.length>1?bn({delta:n,leafHeaders:w,minWidth:m,startWidth:u,maxWidth:a}):w[0].width=Math.max(Math.min(u+n,a),m),t.forEach(function(e){X(e)})}var c=R([],t,!0);o(c)};if(p){var H=function(e){N(e.touches[0].clientX)},k=function(){document.removeEventListener("touchmove",H),document.removeEventListener("touchend",k),i(!1),v&&v(R([],t,!0))};document.addEventListener("touchmove",H),document.addEventListener("touchend",k)}else{var T=function(e){N(e.clientX)},P=function(){document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",P),i(!1),v&&v(R([],t,!0))};document.addEventListener("mousemove",T),document.addEventListener("mouseup",P)}}},bn=function(e){var n=e.delta,r=e.leafHeaders,t=e.minWidth,o=e.startWidth,i=e.maxWidth,a=r.reduce(function(e,n){return Math.min(e,$(n))},40),u=r.reduce(function(e,n){return e+("number"==typeof n.width?n.width:150)},0),l=Math.max(Math.min(o+n,i),a)-u;r.forEach(function(e){var n="number"==typeof e.width?e.width:150;e.width=Math.max(n+l*(n/u),t)})},xn=function(e){var n=e.containerWidth,r=e.maxPinnedWidthPercent,t=void 0===r?.8:r,o=e.collapsedHeaders,i=0,a=0,u=0;e.headers.forEach(function(e){if(!e.hide){var n=J(e,o).reduce(function(e,n){return e+Y(n)},0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:u+=n}});var l=i,c=a;if(n&&n>0){var s=n*t;i>s&&(i=s),a>s&&(a=s)}return{leftWidth:A(i),rightWidth:A(a),mainWidth:u,leftContentWidth:l,rightContentWidth:c}},yn=function(e){var n=e.columnsToShrink,r=e.totalCompensation,t=e.initialWidthsMap;if(0>r){var o=Math.abs(r),i=n.reduce(function(e,n){return e+(t.get(n.accessor)||100)},0);if(0===i)return;n.forEach(function(e,r){var a=t.get(e.accessor)||100,u=o*(a/i);if(r===n.length-1){var l=n.slice(0,r).reduce(function(e,n){var r=t.get(n.accessor)||100;return e+(("number"==typeof n.width?n.width:100)-r)},0);u=o-l}e.width=a+u})}else for(var a=r,u=function(){var e=n.map(function(e){var n=t.get(e.accessor)||100;return{column:e,headroom:Math.max(0,n-30),initialWidth:n,minWidth:30}}),r=e.filter(function(e){return e.headroom>0});if(r.length>0){var o=r.reduce(function(e,n){return e+n.headroom},0),i=0,u=a;r.forEach(function(e,n){var t=u*(e.headroom/o);t=Math.min(t,e.headroom),n===r.length-1&&(t=Math.min(u-i,e.headroom)),e.column.width=e.initialWidth-t,i+=t}),a-=i}else{var l=e.filter(function(e){return e.minWidth>H});if(0>=l.length)return"break";var c=a,s=c/l.length,d=0;l.forEach(function(e,n){var r=e.minWidth-H,t=Math.min(s,r);n===l.length-1&&(t=Math.min(c-d,r));var o=e.initialWidth-t;e.column.width=o,e.column.minWidth=Math.max(o,H),d+=t}),a-=d}};a>.5&&"break"!==u(););},In=function(e){var n=e.delta,r=e.startWidth,t=e.resizedHeader,o=e.sectionHeaders,i=e.reverse,a=e.collapsedHeaders,u=e.initialWidthsMap,l=e.sectionWidth,c=e.isParentResize,s=e.childrenToResize,d=void 0===s?[]:s;if(void 0!==c&&c&&d.length>1){var f=Q(o,a),v=f.findIndex(function(e){return e.accessor===d[0].accessor}),h=f.findIndex(function(e){return e.accessor===d[d.length-1].accessor});if(-1===v||-1===h)return;var p,w=h===f.length-1;p=0===v?f.slice(h+1):w||i?f.slice(0,v):f.slice(h+1);var m=Array.from(u.values()).reduce(function(e,n){return e+n},0);if(n>0){var g=n,b=!1;if(m+n>l){b=!0;var x=p.reduce(function(e,n){var r=u.get(n.accessor)||100;return e+Math.max(0,r-H)},0);g=Math.min(n,x)}var y=(I=r+g)/(C=d.reduce(function(e,n){return e+(u.get(n.accessor)||100)},0));d.forEach(function(e){var n=u.get(e.accessor)||100;e.width=Math.max(n*y,30)}),b&&g>0&&p.length>0&&yn({columnsToShrink:p,totalCompensation:g,initialWidthsMap:u})}else{var I,C=d.reduce(function(e,n){return e+(u.get(n.accessor)||100)},0),R=(I=Math.max(r+n,H*d.length))/C;d.forEach(function(e){var n=u.get(e.accessor)||100;e.width=Math.max(n*R,30)}),(A=r-I)>0&&p.length>0&&yn({columnsToShrink:p,totalCompensation:-A,initialWidthsMap:u})}}else{var S=Q(o,a),M=S.findIndex(function(e){return e.accessor===t.accessor});if(-1!==M){var N,E=M===S.length-1;if(0!==(N=0===M?S.slice(M+1):E||i?S.slice(0,M):S.slice(M+1)).length){var k=Array.from(u.values()).reduce(function(e,n){return e+n},0);if(n>0){if(l>=k+n)return void(t.width=r+n);x=N.reduce(function(e,n){var r=u.get(n.accessor)||100;return e+Math.max(0,r-H)},0);var T=Math.min(n,x);t.width=r+T,T>0&&yn({columnsToShrink:N,totalCompensation:T,initialWidthsMap:u})}else{var P=Math.max(r+n,30),A=r-P;t.width=P,A>0&&yn({columnsToShrink:N,totalCompensation:-A,initialWidthsMap:u})}}else t.width=Math.max(r+n,30)}}},Cn={equals:"Equals",notEquals:"Not equals",contains:"Contains",notContains:"Does not contain",startsWith:"Starts with",endsWith:"Ends with",greaterThan:"Greater than",lessThan:"Less than",greaterThanOrEqual:"Greater than or equal",lessThanOrEqual:"Less than or equal",between:"Between",notBetween:"Not between",before:"Before",after:"After",in:"Is one of",notIn:"Is not one of",isEmpty:"Is empty",isNotEmpty:"Is not empty"},Rn=function(e){switch(e){case"string":return["equals","notEquals","contains","notContains","startsWith","endsWith","isEmpty","isNotEmpty"];case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","notBetween","isEmpty","isNotEmpty"];case"boolean":return["equals","isEmpty","isNotEmpty"];case"date":return["equals","notEquals","before","after","between","notBetween","isEmpty","isNotEmpty"];case"enum":return["in","notIn","isEmpty","isNotEmpty"];default:return["equals","notEquals","isEmpty","isNotEmpty"]}},Sn=function(e){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(e)},Mn=function(e){return["between","notBetween","in","notIn"].includes(e)},Nn=function(e){return["isEmpty","isNotEmpty"].includes(e)},Hn=function(n){return e("div",x({className:"st-filter-container"},{children:n.children}))},En=function(n){var t=n.value,u=n.onChange,l=n.options,c=n.placeholder,s=void 0===c?"Select...":c,d=n.className,f=void 0===d?"":d,v=n.disabled,h=void 0!==v&&v,p=i(!1),w=p[0],m=p[1],g=i(-1),b=g[0],y=g[1],I=a(null),C=l.find(function(e){return e.value===t});o(function(){var e=function(e){if(w)switch(e.key){case"ArrowDown":e.preventDefault(),y(function(e){return l.length-1>e?e+1:0});break;case"ArrowUp":e.preventDefault(),y(function(e){return e>0?e-1:l.length-1});break;case"Enter":e.preventDefault(),0>b||(u(l[b].value),m(!1),y(-1));break;case"Escape":e.preventDefault(),m(!1),y(-1)}};if(w)return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[w,b,l,u]);var R=function(e){u(e),m(!1),y(-1)};return r("div",x({ref:I,className:"st-custom-select ".concat(f," ").concat(h?"st-custom-select-disabled":""," ").concat(w?"st-custom-select-open":"").trim()},{children:[r("button",x({type:"button",className:"st-custom-select-trigger",onClick:function(){if(!h)if(m(!w),w)y(-1);else{var e=l.findIndex(function(e){return e.value===t});y(0>e?0:e)}},disabled:h,"aria-haspopup":"listbox","aria-expanded":w,"aria-labelledby":"select-label"},{children:[e("span",x({className:"st-custom-select-value"},{children:C?C.label:s})),e(ye,{})]})),e(Ce,x({open:w,setOpen:m,onClose:function(){m(!1),y(-1)},positioning:"absolute",overflow:"auto"},{children:e("div",x({className:"st-custom-select-options",role:"listbox"},{children:l.map(function(n,r){return e("div",x({className:"st-custom-select-option ".concat(n.value===t?"st-custom-select-option-selected":""," ").concat(r===b?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":n.value===t,onClick:function(){return R(n.value)},tabIndex:0,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),R(n.value))}},{children:n.label}),r)})}))}))]}))},kn=function(n){var r=n.value,t=n.onChange,o=n.operators.map(function(e){return{value:e,label:Cn[e]}});return e("div",x({className:"st-filter-section"},{children:e(En,{value:r,onChange:function(e){t(e)},options:o})}))},Tn=function(n){var r=n.type,t=n.onChange,o=n.autoFocus,i=n.className,a=n.onEnterPress;return e("input",{type:void 0===r?"text":r,value:n.value,onChange:function(e){return t(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&a&&a()},placeholder:n.placeholder,autoFocus:void 0!==o&&o,className:"st-filter-input ".concat(void 0===i?"":i).trim()})},Pn=function(n){var r=n.children,t=n.className;return e("div",x({className:"st-filter-section ".concat(void 0===t?"":t).trim()},{children:r}))},An=function(n){var t=n.onClear,o=n.canApply,i=n.showClear;return r("div",x({className:"st-filter-actions"},{children:[e("button",x({onClick:n.onApply,disabled:!o,className:"st-filter-button st-filter-button-apply ".concat(o?"":"st-filter-button-disabled"),tabIndex:0},{children:"Apply"})),i&&t&&e("button",x({onClick:t,className:"st-filter-button st-filter-button-clear",tabIndex:0},{children:"Clear"}))]}))},Dn=function(n){var t=n.header,a=n.currentFilter,u=n.onApplyFilter,l=n.onClearFilter,c=i((null==a?void 0:a.operator)||"contains"),s=c[0],d=c[1],f=i(((null==a?void 0:a.value)||"")+""),v=f[0],h=f[1],p=Rn("string");o(function(){a?(d(a.operator),h((a.value||"")+"")):(d("contains"),h(""))},[a]);var w=function(){var e=x({accessor:t.accessor,operator:s},Sn(s)&&{value:v});u(e)},m=Nn(s)||v.trim();return r(Hn,{children:[e(kn,{value:s,onChange:d,operators:p}),Sn(s)&&e(Pn,{children:e(Tn,{type:"text",value:v,onChange:h,placeholder:"Filter...",autoFocus:!0,onEnterPress:w})}),e(An,{onApply:w,onClear:l,canApply:!!m,showClear:!!a})]})},Fn=function(n){var t,a,u=n.header,l=n.currentFilter,c=n.onApplyFilter,s=n.onClearFilter,d=i((null==l?void 0:l.operator)||"equals"),f=d[0],v=d[1],h=i(((null==l?void 0:l.value)||"")+""),p=h[0],w=h[1],m=i(((null===(t=null==l?void 0:l.values)||void 0===t?void 0:t[0])||"")+""),g=m[0],b=m[1],x=i(((null===(a=null==l?void 0:l.values)||void 0===a?void 0:a[1])||"")+""),y=x[0],I=x[1],C=Rn("number");o(function(){var e,n;l?(v(l.operator),w((l.value||"")+""),b(((null===(e=l.values)||void 0===e?void 0:e[0])||"")+""),I(((null===(n=l.values)||void 0===n?void 0:n[1])||"")+"")):(v("equals"),w(""),b(""),I(""))},[l]);var R=function(){var e={accessor:u.accessor,operator:f};Sn(f)?e.value=parseFloat(p):Mn(f)&&(e.values=[parseFloat(""+g),parseFloat(""+y)]),c(e)};return r(Hn,{children:[e(kn,{value:f,onChange:v,operators:C}),Sn(f)&&e(Pn,{children:e(Tn,{type:"number",value:p,onChange:w,placeholder:"Enter number...",autoFocus:!0,onEnterPress:R})}),Mn(f)&&r(Pn,{children:[e(Tn,{type:"number",value:g,onChange:b,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from",onEnterPress:R}),e(Tn,{type:"number",value:y,onChange:I,placeholder:"To...",onEnterPress:R})]}),e(An,{onApply:R,onClear:s,canApply:!!Nn(f)||(Sn(f)?""!==p.trim():!!Mn(f)&&""!==(g+"").trim()&&""!==(y+"").trim()),showClear:!!l})]})},On=function(n){var r=n.className;return e(En,{value:n.value,onChange:n.onChange,options:n.options,className:void 0===r?"":r,placeholder:n.placeholder})},Ln=function(n){var t=n.header,a=n.currentFilter,u=n.onApplyFilter,l=n.onClearFilter,c=i((null==a?void 0:a.operator)||"equals"),s=c[0],d=c[1],f=i(void 0!==(null==a?void 0:a.value)?a.value+"":"true"),v=f[0],h=f[1],p=Rn("boolean");o(function(){a?(d(a.operator),h(void 0!==a.value?a.value+"":"true")):(d("equals"),h("true"))},[a]);var w=Nn(s)||""!==v;return r(Hn,{children:[e(kn,{value:s,onChange:d,operators:p}),Sn(s)&&e(Pn,{children:e(On,{value:v,onChange:h,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),e(An,{onApply:function(){var e={accessor:t.accessor,operator:s};Sn(s)&&(e.value="true"===v),u(e)},onClear:l,canApply:w,showClear:!!a})]})},Wn=function(n){var t,u,l=n.header,c=n.currentFilter,s=n.onApplyFilter,d=n.onClearFilter,f=i((null==c?void 0:c.operator)||"equals"),v=f[0],h=f[1],p=i((null==c?void 0:c.value)?c.value+"":""),w=p[0],m=p[1],g=i((null===(t=null==c?void 0:c.values)||void 0===t?void 0:t[0])?c.values[0]+"":""),b=g[0],y=g[1],I=i(((null===(u=null==c?void 0:c.values)||void 0===u?void 0:u[1])||"")+""),C=I[0],R=I[1],S=Rn("date");o(function(){var e,n;c?(h(c.operator),m((c.value||"")+""),y(((null===(e=c.values)||void 0===e?void 0:e[0])||"")+""),R(((null===(n=c.values)||void 0===n?void 0:n[1])||"")+"")):(h("equals"),m(""),y(""),R(""))},[c]);var M=function(n){var t=n.value,u=n.onChange,l=n.placeholder,c=n.autoFocus,s=n.className,d=i(!1),f=d[0],v=d[1],h=i(""),p=h[0],w=h[1],m=a(null);o(function(){if(t){var e=We(t);isNaN(e.getTime())||w(e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else w("")},[t]),o(function(){c&&m.current&&m.current.focus()},[c]);var g=t?We(t):new Date;return r("div",x({className:"st-date-input-container",style:{position:"relative"}},{children:[e("input",{ref:m,type:"text",value:p,placeholder:l,onClick:function(){v(!f)},onKeyDown:function(e){"Enter"===e.key||" "===e.key?(e.preventDefault(),v(!f)):"Escape"===e.key&&v(!1)},readOnly:!0,className:"st-filter-input ".concat(s||""),style:{cursor:"pointer"}}),e(Ce,x({open:f,setOpen:v,onClose:function(){v(!1)},positioning:"absolute",overflow:"hidden",width:240},{children:e(Ae,{value:g,onChange:function(e){var n=e.toISOString().split("T")[0];u(n),v(!1)},onClose:function(){return v(!1)}})}))]}))};return r(Hn,{children:[e(kn,{value:v,onChange:h,operators:S}),Sn(v)&&e(Pn,{children:e(M,{value:w,onChange:m,placeholder:"Select date...",autoFocus:!0})}),Mn(v)&&r(Pn,{children:[e(M,{value:b,onChange:y,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),e(M,{value:C,onChange:R,placeholder:"To date..."})]}),e(An,{onApply:function(){var e={accessor:l.accessor,operator:v};Sn(v)?e.value=w:Mn(v)&&(e.values=[b,C]),s(e)},onClear:d,canApply:!!Nn(v)||(Sn(v)?""!==w.trim():!!Mn(v)&&""!==b.trim()&&""!==C.trim()),showClear:!!c})]})},Bn=function(n){var t=n.header,a=n.currentFilter,l=n.onApplyFilter,c=n.onClearFilter,s=u(function(){return t.enumOptions||[]},[t.enumOptions]),d=u(function(){return s.map(function(e){return e.value})},[s]),f=i((null==a?void 0:a.values)?a.values.map(String):d),v=f[0],h=f[1],p=i(""),w=p[0],m=p[1],g=u(function(){if(!w)return s;var e=w.toLowerCase();return s.filter(function(n){return n.label.toLowerCase().includes(e)})},[s,w]);o(function(){h(a?a.values?a.values.map(String):[]:d)},[a,d]);var b=s.length>10;return r(Hn,{children:[e(Pn,{children:r("div",x({className:"st-enum-filter-options"},{children:[e("div",x({className:"st-enum-select-all"},{children:e(rn,x({checked:v.length===d.length,onChange:function(e){h(e?d:[])}},{children:e("span",x({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),b&&e("div",x({className:"st-enum-search"},{children:e(Tn,{type:"text",value:w,onChange:m,placeholder:"Search..."})})),g.map(function(n,r){return e(rn,x({checked:v.includes(n.value),onChange:function(){return e=n.value,void h(function(n){return n.includes(e)?n.filter(function(n){return n!==e}):R(R([],n,!0),[e],!1)});var e}},{children:e("span",x({className:"st-enum-option-label"},{children:n.label}))}),r)}),w&&0===g.length&&e("div",x({className:"st-enum-no-results"},{children:"No matching options"}))]}))}),e(An,{onApply:function(){v.length!==d.length?l({accessor:t.accessor,operator:"in",values:v}):c()},onClear:c,canApply:0!==v.length&&v.length!==d.length,showClear:!!a})]})},zn=function(r){var t=r.header,o=r.currentFilter,i=r.onApplyFilter,a=r.onClearFilter;return e(n,{children:function(){switch(t.type){case"number":return e(Fn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"boolean":return e(Ln,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"date":return e(Wn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"enum":return e(Bn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});default:return e(Dn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a})}}()})},qn=function(t){var u=t.content,l=t.children,c=t.delay,s=void 0===c?500:c,d=i(!1),f=d[0],v=d[1],p=i({top:0,left:0}),w=p[0],g=p[1],b=a(null),y=a(null);if(o(function(){return function(){b.current&&clearTimeout(b.current)}},[]),!u||!m(l))return e(n,{children:l});var I=h(l,{ref:y,onMouseEnter:function(){b.current=setTimeout(function(){if(y.current&&u.trim()){var e=y.current.getBoundingClientRect();if(e.width>0&&e.height>0){var n=e.left+e.width/2-100,r=e.bottom+8;8>n?n=8:n+200>window.innerWidth-8&&(n=window.innerWidth-200-8),r+40>window.innerHeight-8&&(r=e.top-40-8),g({top:r,left:n}),v(!0)}}},s)},onMouseLeave:function(){b.current&&(clearTimeout(b.current),b.current=null),v(!1)}});return r(n,{children:[I,f&&e("div",x({className:"st-tooltip",style:{position:"fixed",top:"".concat(w.top,"px"),left:"".concat(w.left,"px"),zIndex:1e4}},{children:u}))]})},Gn=function(n){var t,c,s=n.colIndex,d=n.gridColumnEnd,f=n.gridColumnStart,v=n.gridRowEnd,p=n.gridRowStart,w=n.header,m=n.parentHeader,g=n.reverse,b=n.sort,y=n.isLastHeader,I=void 0!==y&&y,C=i(!1),S=C[0],M=C[1],N=i(!1),H=N[0],E=N[1],P=i(w.label||""),A=P[0],F=P[1],O=se(),L=O.activeHeaderDropdown,W=O.areAllRowsSelected,B=O.autoExpandColumns,q=O.collapsedHeaders,G=O.columnBorders,V=O.columnReordering,j=O.columnResizing,K=O.columnsWithSelectedCells,U=O.draggedHeaderRef,_=O.enableHeaderEditing,J=O.handleApplyFilter,Y=O.handleClearFilter,X=O.handleSelectAll,$=O.headerDropdown,Q=O.headerRegistry,Z=O.icons,ee=O.headers,ne=O.hoveredHeaderRef,re=O.onColumnOrderChange,te=O.onColumnSelect,oe=O.onColumnWidthChange,ie=O.onHeaderEdit,ae=O.onSort,ue=O.onTableHeaderDragEnd,le=O.headerHeight,ce=O.rows,de=O.selectColumns,fe=O.selectableColumns,ve=O.selectedColumns,he=O.setActiveHeaderDropdown,pe=O.setCollapsedHeaders,we=O.setHeaders,me=O.setInitialFocusedCell,ge=O.setIsResizing,be=O.setSelectedCells,xe=O.setSelectedColumns,ye=O.tableBodyContainerRef,Ie=!!(null==w?void 0:w.isSortable),Re=!!(null==w?void 0:w.filterable),Se=O.filters[w.accessor],Ne=(null==L?void 0:L.accessor)===w.accessor,He=w.isSelectionColumn&&O.enableRowSelection,Ee=function(e){var n;return!(!(null===(n=e.children)||void 0===n?void 0:n.length)||!e.collapsible)}(w),ke=q.has(w.accessor),Te=function(e){var n=e.isOpen,r=e.estimatedHeight,t=void 0===r?200:r,u=e.estimatedWidth,l=void 0===u?250:u,c=e.margin,s=void 0===c?4:c,d=a(null),f=i({}),v=f[0],h=f[1];return o(function(){if(n&&d.current){var e=function(){if(d.current){var e=d.current.getBoundingClientRect(),n=window.innerHeight-e.bottom,r=window.innerWidth-e.right,o="bottom",i={};t>n&&e.top>=t&&(o="top");var a="left";l>r+e.width&&(a="right"),"bottom"===o?i.top=e.bottom+s:i.bottom=window.innerHeight-e.top+s,"left"===a?i.left=e.left:i.right=window.innerWidth-e.right,h(i)}};requestAnimationFrame(e);var r=function(){return requestAnimationFrame(e)},o=function(){return requestAnimationFrame(e)};return window.addEventListener("resize",r),window.addEventListener("scroll",o,!0),function(){window.removeEventListener("resize",r),window.removeEventListener("scroll",o,!0)}}h({})},[n,t,l,s]),{triggerRef:d,position:v}}({isOpen:Ne,estimatedHeight:200,estimatedWidth:250,margin:4}),Ae=Te.triggerRef,De=Te.position,Fe=u(function(){var e,n,r;if(!G)return!1;var t=ee.filter(function(e){return"left"===e.pinned}),o=ee.filter(function(e){return!e.pinned}),i=ee.filter(function(e){return"right"===e.pinned});return"left"===w.pinned?(null===(e=t[t.length-1])||void 0===e?void 0:e.accessor)===w.accessor:"right"===w.pinned?(null===(n=i[i.length-1])||void 0===n?void 0:n.accessor)===w.accessor:(null===(r=o[o.length-1])||void 0===r?void 0:r.accessor)===w.accessor},[G,ee,w.accessor,w.pinned]),Oe=u(function(){return!(!fe||He)&&T(w,s).some(function(e){return ve.has(e)})},[fe,He,w,s,ve]),Le=u(function(){return!He&&T(w,s).some(function(e){return K.has(e)})},[He,w,s,K]),We=u(function(){return!(!w.children||0===w.children.length)&&(!ke||w.children.some(function(e){var n=e.showWhen||k;return"parentCollapsed"===n||"always"===n}))},[w.children,ke]),Be=null==m?void 0:m.singleRowChildren,ze=We&&!w.singleRowChildren,qe="st-header-cell ".concat(w.accessor===(null===(t=ne.current)||void 0===t?void 0:t.accessor)?"st-hovered":""," ").concat((null===(c=U.current)||void 0===c?void 0:c.accessor)===w.accessor?"st-dragging":""," ").concat(Ie?"clickable":""," ").concat(V&&!Ie?"columnReordering":""," ").concat(ze?"parent":""," ").concat(Be?"st-sub-header":""," ").concat(Fe?"st-last-column":""," ").concat(_&&!He?"st-header-editable":""," ").concat(Oe?"st-header-selected":""," ").concat(Le&&!Oe?"st-header-has-highlighted-cell":""),Ge=nn({draggedHeaderRef:U,headers:ee,hoveredHeaderRef:ne,onColumnOrderChange:re,onTableHeaderDragEnd:ue}),Ve=Ge.handleDragStart,Ke=Ge.handleDragEnd,Ue=Ge.handleDragOver,_e=je();o(function(){if(Q&&!w.isSelectionColumn){var e=w.accessor+"";return Q.set(e,{setEditing:function(e){E(e)}}),function(){Q.delete(e)}}},[Q,w.accessor,w.isSelectionColumn]),o(function(){F(w.label||"")},[w.label]);var Je=function(e){M(!S)},Ye=l(function(e){F(e);var n=ee.map(function(n){return n.accessor===w.accessor?x(x({},n),{label:e}):n});we(n),ie&&ie(w,e)},[ee,we,ie,w]),Ze=l(function(){he&&he(null)},[he]),en=l(function(e){e.stopPropagation(),pe(function(e){var n=new Set(e);return ke?n.delete(w.accessor):n.add(w.accessor),n})},[pe,ke,w.accessor]),tn=function(e){var n=e.event,r=e.header;if(!r.isSelectionColumn){if(fe){var t=T(r,s),o=t.some(function(e){return ve.has(e)});if(_&&o&&!n.shiftKey)return $&&Ne&&Ze(),void E(!0);n.shiftKey&&de?xe(function(e){if(0===e.size)return new Set(t);var n=t[0],r=Array.from(e).sort(function(e,n){return e-n}),o=r[0],i=Math.abs(n-o);r.forEach(function(e){var r=Math.abs(n-e);i>r&&(i=r,o=e)});var a,u,l,c=R(R([],(l=Math.min(a=o,u=n),Array.from({length:Math.max(a,u)-l+1},function(e,n){return l+n})),!0),t,!0);return new Set(R(R([],Array.from(e),!0),c,!0))}):de&&de(t),be(new Set),me(null)}te&&te(r),!fe&&r.isSortable&&ae(r.accessor)}};o(function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}},[]);var on=l(function(){var e=function(e,n){var r=n||{},t=r.rows,o=r.header,i=r.maxWidth,a=void 0===i?500:i,u=r.sampleSize,l=void 0===u?50:u,c=document.getElementById(D({accessor:e,rowId:"header"}));if(!c)return 150;var s=window.getComputedStyle(c),d=parseFloat(s.paddingLeft)||0,f=parseFloat(s.paddingRight)||0,v=parseFloat(s.gap)||0,h=d+f,p=c.querySelector(".st-header-label");if(p){var w=p.querySelector(".st-header-label-text");if(w){var m=document.createElement("span");m.style.visibility="hidden",m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.width="auto";var g=window.getComputedStyle(w);m.style.font=g.font,m.style.fontSize=g.fontSize,m.style.fontWeight=g.fontWeight,m.style.fontFamily=g.fontFamily,m.style.letterSpacing=g.letterSpacing,m.style.padding=g.padding,m.textContent=w.textContent,document.body.appendChild(m);var b=m.offsetWidth;document.body.removeChild(m),h+=b}}for(var x=Array.from(c.children),y=1,I=0;x.length>I;I++){var C=x[I];if(!C.classList.contains("st-header-label")&&!C.classList.contains("st-sr-only")){var R=window.getComputedStyle(C);"none"!==R.display&&(h+=(C.offsetWidth||0)+(parseFloat(R.marginLeft)||0)+(parseFloat(R.marginRight)||0),y++)}}v>0&&y>1&&(h+=v*(y-1));var S=0;if(t&&t.length>0){var M=Math.min(t.length,l),N=document.createElement("div");N.style.visibility="hidden",N.style.position="absolute",N.style.whiteSpace="nowrap",N.style.width="auto";var H=0,E=0,k=document.querySelector(".st-cell-content");if(k){var T=window.getComputedStyle(k);N.style.font=T.font,N.style.fontSize=T.fontSize,N.style.fontFamily=T.fontFamily,H=parseFloat(T.paddingLeft)||0,E=parseFloat(T.paddingRight)||0}for(document.body.appendChild(N),I=0;M>I;I++){var P,A=t[I],F=P=(null==o?void 0:o.valueGetter)?o.valueGetter({accessor:e,row:A,rowIndex:I}):z(A,e);(null==o?void 0:o.valueFormatter)&&null!=P&&(F=o.valueFormatter({accessor:e,colIndex:0,row:A,rowIndex:I,value:P})),N.textContent=null!=F?F+"":"";var O=N.offsetWidth+H+E;O>S&&(S=O)}document.body.removeChild(N)}var L=Math.max(h,S);return L>a&&(L=a),L+2}(w.accessor,{rows:ce,header:w,maxWidth:500,sampleSize:50}),n=Xe(ee,w.accessor);if(n){var r=$e(ee,n),t=n[n.length-1],o=r.map(function(n,r){return r===t?x(x({},n),{width:e}):n}),i=Qe(ee,n,o);we(i),oe&&oe(i)}},[w,ee,ce,we,oe]);if(!w)return null;var an=j&&!He&&!I&&e("div",x({className:"st-header-resize-handle-container",role:"separator","aria-label":"Resize ".concat(w.label," column"),"aria-orientation":"vertical",onMouseDown:function(e){var n,r=null===(n=document.getElementById(D({accessor:w.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth;_e({callback:gn,callbackProps:{event:e.nativeEvent,header:w,headers:ee,setHeaders:we,setIsResizing:ge,tableBodyContainerRef:ye,startWidth:r,collapsedHeaders:q,autoExpandColumns:B,reverse:g,onColumnWidthChange:oe},limit:10})},onTouchStart:function(e){var n,r=null===(n=document.getElementById(D({accessor:w.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth;_e({callback:gn,callbackProps:{event:e,header:w,headers:ee,setHeaders:we,setIsResizing:ge,tableBodyContainerRef:ye,startWidth:r,collapsedHeaders:q,autoExpandColumns:B,reverse:g,onColumnWidthChange:oe},limit:10})},onDoubleClick:on},{children:e("div",{className:"st-header-resize-handle"})})),un=b&&b.key.accessor===w.accessor&&r("div",x({className:"st-icon-container",onClick:function(e){return tn({event:e,header:w})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||ae(w.accessor)},tabIndex:0,role:"button","aria-label":"Sort ".concat(w.label," ").concat("asc"===b.direction?"descending":"ascending")},{children:["asc"===b.direction&&Z.sortUp&&Z.sortUp,"desc"===b.direction&&Z.sortDown&&Z.sortDown]})),ln=Re&&Z.filter&&r("div",x({className:"st-icon-container",onClick:Je,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.target===e.currentTarget||e.currentTarget.contains(e.target))&&(e.target.closest(".st-dropdown-content")||(e.preventDefault(),Je()))},tabIndex:0,role:"button","aria-label":"Filter ".concat(w.label),"aria-expanded":S,"aria-haspopup":"dialog"},{children:[h(Z.filter,{style:{fill:Se?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),e(Ce,x({open:S,overflow:"visible",setOpen:M,onClose:function(){return M(!1)}},{children:e(zn,{header:w,currentFilter:Se,onApplyFilter:function(e){J(e),M(!1)},onClearFilter:function(){Y(w.accessor),M(!1)}})}))]})),cn=Ee&&!He&&e("div",x({className:"st-icon-container st-collapse-icon-container",onClick:function(e){return en(e)},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),en(e))},tabIndex:0,role:"button","aria-label":"".concat(ke?"Expand":"Collapse"," ").concat(w.label," column"),"aria-expanded":!ke},{children:ke?Z.headerCollapse:Z.headerExpand})),sn=e(qn,x({content:w.tooltip||""},{children:e("span",x({className:"st-header-label-text ".concat("right"===w.align?"right-aligned":"center"===w.align?"center-aligned":"left-aligned")},{children:He?e(rn,{checked:!!W&&W(),onChange:function(e){X&&X(e)},ariaLabel:"Select all rows"}):H?e(Me,{defaultValue:A,onBlur:function(){return E(!1)},onChange:Ye}):A||(null==w?void 0:w.label)}))})),dn="header-desc-".concat(w.accessor),fn=function(e,n){var r=[];return e.type&&"other"!==e.type&&r.push("".concat(e.type," column")),e.isSortable&&r.push("sortable"),n&&r.push("filterable"),e.tooltip&&r.push(e.tooltip),r.join(", ")}(w,Re);return r(Pe,x({className:qe,id:D({accessor:w.accessor,rowId:"header"}),role:"columnheader","aria-sort":function(){if(w.isSortable)return(null==b?void 0:b.key.accessor)===w.accessor?"asc"===b.direction?"ascending":"descending":"none"}(),"aria-colindex":s+1,"aria-describedby":fn?dn:void 0,onDragOver:function(e){He||_e({callback:Ue,callbackProps:{event:e,hoveredHeader:w},limit:50})},style:x({gridRowStart:p,gridRowEnd:v,gridColumnStart:f,gridColumnEnd:d},v-p>1?{}:{height:le})},{children:[g&&an,!w.headerRenderer&&"right"===w.align&&cn,!w.headerRenderer&&"right"===w.align&&ln,!w.headerRenderer&&"right"===w.align&&un,e("div",x({ref:Ae,className:"st-header-label",draggable:V&&!w.disableReorder&&!He,onClick:function(e){He||tn({event:e,header:w})},onDoubleClick:function(e){He||function(e){var n=e.header;n.isSelectionColumn||fe&&n.isSortable&&ae(n.accessor)}({event:e,header:w})},onDragEnd:He?void 0:function(e){e.preventDefault(),Ke()},onDragStart:He?void 0:function(e){V&&w&&function(e){Ve(e)}(w)}},{children:w.headerRenderer?w.headerRenderer({accessor:w.accessor,colIndex:s,header:w,components:{sortIcon:un||void 0,filterIcon:ln||void 0,collapseIcon:cn||void 0,labelContent:sn}}):sn})),!w.headerRenderer&&"right"!==w.align&&un,!w.headerRenderer&&"right"!==w.align&&ln,!w.headerRenderer&&"right"!==w.align&&cn,!g&&an,$&&!He&&e("div",x({className:"st-header-dropdown-container"},{children:$({accessor:w.accessor,colIndex:s,header:w,isOpen:Ne,onClose:Ze,position:De})})),fn&&e("span",x({id:dn,className:"st-sr-only"},{children:fn}))]}))},Vn=function(r){var t=r.columnIndices,o=r.gridTemplateColumns,i=r.handleScroll,a=r.headers,l=r.maxDepth,c=r.pinned,s=r.sectionRef,d=r.sort,f=r.width,v=se(),h=v.collapsedHeaders,p=v.autoExpandColumns,w=u(function(){var e=function(n){return F({header:n,pinned:c,headers:a,collapsedHeaders:h})?n.children&&0!==n.children.length?n.children.flatMap(function(n){return e(n)}):[n]:[]},n=a.flatMap(function(n){return e(n)});return 0===n.length?-1:t[n[n.length-1].accessor]},[a,c,h,t]),m=u(function(){var e=[],n=1,r=function(o,i,u,s){var d,f;if(void 0===u&&(u=!1),!F({header:o,pinned:c,headers:a,collapsedHeaders:h}))return 0;u||n++;var v,p,w=null!==(f=null===(d=o.children)||void 0===d?void 0:d.filter(function(e){return F({header:e,pinned:c,headers:a,collapsedHeaders:h})}).length)&&void 0!==f?f:0,m=n;if(o.singleRowChildren&&w>0?(v=m+1,p=l+1):w>0?(v=m+w,p=i+1):(v=m+1,p=l+1),e.push({header:o,gridColumnStart:m,gridColumnEnd:v,gridRowStart:i,gridRowEnd:p,colIndex:t[o.accessor],parentHeader:s}),o.children&&o.children.length>0){var g=o.singleRowChildren?i:i+1,b=!o.singleRowChildren;o.children.forEach(function(e){F({header:e,pinned:c,headers:a,collapsedHeaders:h})&&(r(e,g,b,o),b=!1)})}return v-m},o=a.filter(function(e){return F({header:e,pinned:c,headers:a,collapsedHeaders:h})}),i=!0;return o.forEach(function(e){r(e,1,i),i=!1}),e},[a,l,c,t,h]);return e(vn,x({childRef:s,group:c?"pinned-".concat(c):"default"},{children:e("div",x({className:"st-header-".concat(c?"pinned-".concat(c):"main")},i&&{onScroll:i},{ref:s,style:{gridTemplateColumns:o,width:f,position:"relative"}},{children:e(n,{children:m.map(function(n){return e(Gn,{colIndex:n.colIndex,gridColumnEnd:n.gridColumnEnd,gridColumnStart:n.gridColumnStart,gridRowEnd:n.gridRowEnd,gridRowStart:n.gridRowStart,header:n.header,parentHeader:n.parentHeader,reverse:"right"===c,sort:d,isLastHeader:p&&n.colIndex===w},n.header.accessor)})})}))}))},jn=function(n){var t=n.centerHeaderRef,o=n.headers,i=n.mainTemplateColumns,a=n.pinnedLeftColumns,l=n.pinnedLeftTemplateColumns,c=n.pinnedRightColumns,s=n.pinnedRightTemplateColumns,d=n.sort,f=n.pinnedLeftWidth,v=n.pinnedRightWidth,h=se(),p=h.headerContainerRef,w=h.pinnedLeftRef,m=h.pinnedRightRef,g=h.collapsedHeaders,b=h.tableRows,y=h.maxHeaderDepth,I=u(function(){return pn({headers:o,pinnedLeftColumns:a,pinnedRightColumns:c,collapsedHeaders:g})},[o,a,c,g]),C=u(function(){return Object.keys(I).length},[I]);return r("div",x({className:"st-header-container",ref:p,"aria-rowcount":b.length+y,"aria-colcount":C},{children:[_e(o,"left")&&e(Vn,{columnIndices:I,gridTemplateColumns:l,handleScroll:void 0,headers:o,maxDepth:y,pinned:"left",sectionRef:w,sort:d,width:f}),e(Vn,{columnIndices:I,gridTemplateColumns:i,handleScroll:void 0,headers:o,maxDepth:y,sectionRef:t,sort:d}),_e(o,"right")&&e(Vn,{columnIndices:I,gridTemplateColumns:s,handleScroll:void 0,headers:o,maxDepth:y,pinned:"right",sectionRef:m,sort:d,width:v})]}))},Kn=function(e){var n=e.collapsedHeaders,r=e.autoExpandColumns,t=function(e){var r=e.flattenedHeaders;return e.headers.forEach(function(e){if(!e.hide&&!e.excludeFromRender)if(e.children&&e.children.length>0)if(n&&n.has(e.accessor)){var o=e.children.filter(function(e){var n=e.showWhen||k;return"parentCollapsed"===n||"always"===n});e.singleRowChildren&&r.push(e),o.length>0?t({headers:o,flattenedHeaders:r}):e.singleRowChildren||r.push(e)}else{var i=e.children.filter(function(e){var n=e.showWhen||k;return"parentExpanded"===n||"always"===n});e.singleRowChildren&&r.push(e),t({headers:i,flattenedHeaders:r})}else r.push(e)}),r},o=t({headers:e.headers,flattenedHeaders:[]});return"".concat(o.map(function(e){return function(e,n){var r=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),r&&"number"==typeof r&&(r="".concat(r,"px")),void 0===r||n?t:"string"==typeof t&&t.endsWith("fr")?"minmax(".concat(r,", ").concat(t,")"):"max(".concat(r,", ").concat(t,")")}(e,r)}).join(" "))},Un=function(n){var t=n.calculatedHeaderHeight,o=n.hideHeader,i=n.pinnedLeftWidth,l=n.pinnedRightWidth,c=n.setScrollTop,s=n.setScrollDirection,d=n.shouldShowEmptyState,f=n.sort,v=n.tableRows,h=n.rowsToRender,p=n.stickyParents,w=n.regularRows,m=n.partiallyVisibleRows,g=n.heightMap,b=se(),y=b.columnResizing,I=b.editColumns,C=b.headers,R=b.collapsedHeaders,S=b.autoExpandColumns,M=a(null),N=C.filter(function(e){return!e.pinned}),H=C.filter(function(e){return"left"===e.pinned}),E=C.filter(function(e){return"right"===e.pinned}),k=u(function(){return Kn({headers:H,collapsedHeaders:R,autoExpandColumns:S})},[H,R,S]),T=u(function(){return Kn({headers:N,collapsedHeaders:R,autoExpandColumns:S})},[N,R,S]),P=u(function(){return Kn({headers:E,collapsedHeaders:R,autoExpandColumns:S})},[E,R,S]),A={centerHeaderRef:M,headers:C,mainTemplateColumns:T,pinnedLeftColumns:H,pinnedLeftTemplateColumns:k,pinnedRightColumns:E,pinnedRightTemplateColumns:P,sort:f,pinnedLeftWidth:i,pinnedRightWidth:l},D={calculatedHeaderHeight:t,mainTemplateColumns:T,pinnedLeftColumns:H,pinnedLeftTemplateColumns:k,pinnedLeftWidth:i,pinnedRightColumns:E,pinnedRightTemplateColumns:P,pinnedRightWidth:l,rowsToRender:h,stickyParents:p,regularRows:w,partiallyVisibleRows:m,heightMap:g,setScrollDirection:s,setScrollTop:c,shouldShowEmptyState:d,tableRows:v};return r("div",x({className:"st-content ".concat(y?"st-resizeable":"st-not-resizeable"),style:{width:I?"calc(100% - 29.5px)":"100%"}},{children:[!o&&e(jn,x({},A)),e(mn,x({},D))]}))},_n=function(n){var t=n.mainBodyWidth,u=n.mainBodyRef,l=n.pinnedLeftWidth,c=n.pinnedRightWidth,s=n.pinnedLeftContentWidth,d=n.pinnedRightContentWidth,f=n.tableBodyContainerRef,v=se().editColumns,h=i(!1),p=h[0],w=h[1],m=a(null),g=a(null),b=a(null),y=v?N:0,I=(v?c+1:c)+(f.current&&f.current&&f.current.scrollHeight>f.current.clientHeight?f.current.offsetWidth-f.current.clientWidth:0);return o(function(){setTimeout(function(){u.current&&w(u.current.scrollWidth-u.current.clientWidth>1)},1)},[u,t]),p?r("div",x({className:"st-horizontal-scrollbar-container"},{children:[l>0&&e(vn,x({childRef:g,group:"pinned-left"},{children:e("div",x({className:"st-horizontal-scrollbar-left",ref:g,style:{width:l}},{children:e("div",{style:{width:s}})}))})),t>0&&e(vn,x({childRef:m},{children:e("div",x({className:"st-horizontal-scrollbar-middle",ref:m},{children:e("div",{style:{width:t}})}))})),c>0&&e(vn,x({childRef:b,group:"pinned-right"},{children:e("div",x({className:"st-horizontal-scrollbar-right",ref:b,style:{width:I}},{children:e("div",{style:{width:d}})}))})),y>0&&e("div",{style:{width:y-1.5,height:"100%",flexShrink:0}})]})):null},Jn={string:function(e,n,r){if(e===n)return 0;var t=e.localeCompare(n);return"asc"===r?t:-t},number:function(e,n,r){if(e===n)return 0;var t=e-n;return"asc"===r?t:-t},boolean:function(e,n,r){if(e===n)return 0;var t=e===n?0:e?-1:1;return"asc"===r?t:-t},date:function(e,n,r){var t=new Date(e),o=new Date(n);if(t.getTime()===o.getTime())return 0;var i=t.getTime()-o.getTime();return"asc"===r?i:-i},enum:function(e,n,r){return Jn.string(e,n,r)},default:function(e,n,r){return e===n?0:null==e?"asc"===r?-1:1:null==n?"asc"===r?1:-1:"string"==typeof e&&"string"==typeof n?Jn.string(e,n,r):"number"==typeof e&&"number"==typeof n?Jn.number(e,n,r):"boolean"==typeof e&&"boolean"==typeof n?Jn.boolean(e,n,r):Jn.string(e+"",n+"",r)}},Yn=function(e){return function(e){var n=e.rows,r=e.sortColumn,t=function(e,n){for(var r=0,o=e;o.length>r;r++){var i=o[r];if(i.accessor===n)return i;if(i.children&&i.children.length>0){var a=t(i.children,n);if(a)return a}}},o=t(e.headers,r.key.accessor),i=(null==o?void 0:o.type)||"string",a=r.direction,u=r.key.accessor;return R([],n,!0).sort(function(e,r){var t,l;if(null==o?void 0:o.valueGetter){var c=n.indexOf(e),s=n.indexOf(r);t=o.valueGetter({accessor:u,row:e,rowIndex:c}),l=o.valueGetter({accessor:u,row:r,rowIndex:s})}else t=z(e,u),l=z(r,u);return(null==o?void 0:o.comparator)?o.comparator({rowA:e,rowB:r,valueA:t,valueB:l,direction:a}):function(e,n,r,t){if(void 0===r&&(r="string"),null==e||""===e)return"asc"===t?-1:1;if(null==n||""===n)return"asc"===t?1:-1;if("number"===r){var o=function(e){var n;if("number"==typeof e)return e;var r=e+"";if("string"==typeof r){var t=r.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(t){var o=parseFloat(t[1]),i=null===(n=t[2])||void 0===n?void 0:n.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(r)||0},i=o(e),a=o(n);return Jn.number(i,a,t)}return"date"===r?Jn.date(e+"",n+"",t):"boolean"===r?Jn.boolean(!!e,!!n,t):"enum"===r?Jn.enum(e+"",n+"",t):Jn.string(e+"",n+"",t)}(t,l,i,a)})}({rows:e.rows,sortColumn:e.sortColumn,headers:e.headers})},Xn=function(e){return u(function(){var n=P(e),r=new Map;return n.forEach(function(e){r.set(e.accessor,e)}),r},[e])},$n=function(e){var n=e.tableRows,r=e.sortColumn,t=e.rowGrouping,o=e.headers;return e.externalSortHandling?n:r?t&&t.length>0?(0,e.sortNestedRows)({groupingKeys:t,headers:o,rows:n,sortColumn:r}):Yn({headers:o,rows:n,sortColumn:r}):n},Qn=function(e,n,r){void 0===r&&(r=new Set);for(var t=0,o=e;o.length>t;t++){var i=o[t];if(!r.has(i.accessor)&&(r.add(i.accessor),i.children&&i.children.length>0)){var a=i.children.some(function(e){return e.accessor===n}),u=!1;if(!a)for(var l=0,c=i.children;c.length>l;l++){var s=c[l];if(Qn([s],n,r),!1===s.hide){u=!0;break}}(a||u)&&(i.hide=!1)}}},Zn=function(e){return e.every(function(e){return e.hide})},er=function(e){e.forEach(function(e){e.children&&e.children.length>0&&(er(e.children),Zn(e.children)&&(e.hide=!0))})},nr=function(t){var o=t.allHeaders,i=t.depth,a=void 0===i?0:i,u=t.doesAnyHeaderHaveChildren,l=t.draggingRow,c=t.expandedHeaders,s=t.flattenedHeaders,d=t.forceExpanded,f=void 0!==d&&d,v=t.header,h=t.hoveredSeparatorIndex,p=t.isCheckedOverride,w=t.rowIndex,m=t.setDraggingRow,g=t.setExpandedHeaders,b=t.setHoveredSeparatorIndex,y=se(),I=y.headers,C=y.icons,S=y.setHeaders,M=y.onColumnVisibilityChange,N=y.onColumnOrderChange,H="".concat(16*a,"px"),E=v.children&&v.children.length>0,k=null!=p?p:!(v.hide||E&&v.children&&Zn(v.children)),T=c.has(v.accessor),P=f||T;return r(n,{children:[0===w&&e("div",{className:"st-column-editor-drag-separator",style:{opacity:-1===h?1:0}}),r("div",x({className:"st-header-checkbox-item",style:{paddingLeft:H},draggable:!0,onDragStart:function(e){e.dataTransfer.effectAllowed="move",void 0!==w&&m(s[w])},onDragEnter:function(e){e.preventDefault()},onDragOver:function(e){if(e.preventDefault(),void 0!==w&&l){var n=e.currentTarget.getBoundingClientRect(),r=function(e){var n,r,t=e.flattenedHeaders,o=e.draggingRow,i=e.hoveredRowIndex,a=e.isTopHalfOfRow,u=t[i];if(u.depth===o.depth)return(null===(n=u.parent)||void 0===n?void 0:n.accessor)!==(null===(r=o.parent)||void 0===r?void 0:r.accessor)?null:a||u.header.children?i-1:i;if(u.depth>o.depth){for(var l=u,c=i,s=function(){var e=l.parent.accessor,n=t.findIndex(function(n){return n.header.accessor===e});if(-1===n)return"break";l=t[n],c=n};l.parent&&l.depth>o.depth&&"break"!==s(););for(var d=c,f=c,v=c+1;t.length>v&&t[v].depth>l.depth;v++)f=v;var h=f-d+1,p=i-d,w=h/2>p;return h%2==1&&p===Math.floor(h/2)&&(w=a),w?c-1:f}return null}({flattenedHeaders:s,draggingRow:l,hoveredRowIndex:w,isTopHalfOfRow:n.top+n.height/2>e.clientY});b(r)}},onDragEnd:function(){var e=function(){m(null),b(null)};if(l&&null!==h){var n=s[h>l.visualIndex?h:h+1];if(n){if(n.depth>l.depth&&n.parent){var r=s.findIndex(function(e){return e.header.accessor===n.parent.accessor});-1!==r&&(n=s[r])}if(l.header.accessor!==n.header.accessor){var t=en({headers:$e(I,l.indexPath),draggedHeader:l.header,hoveredHeader:n.header}),o=t.newHeaders;if(t.emergencyBreak)e();else{var i=Qe(Ue(I),l.indexPath,o);null==N||N(i),S(i),e()}}else e()}else e()}else e()}},{children:[u&&e("div",x({className:"st-header-icon-container"},{children:E?e("div",x({className:"st-collapsible-header-icon st-expand-icon-container ".concat(P?"expanded":"collapsed"),onClick:function(e){e.stopPropagation(),function(){if(!f){var e=new Set(c);T?e.delete(v.accessor):e.add(v.accessor),g(e)}}()}},{children:C.expand})):null})),e(rn,{checked:k,onChange:function(e){v.hide=!e,e?(Qn(o,v.accessor),E&&v.children&&v.children.length>0&&v.children.every(function(e){return!0===e.hide})&&v.children[0]&&(v.children[0].hide=!1,Qn(o,v.children[0].accessor))):er(o);var n=R([],I,!0);if(S(n),M){var r=function(e){var n={},r=function(e){n[e.accessor]=!e.hide,e.children&&e.children.length>0&&e.children.forEach(r)};return e.forEach(r),n}(n);M(r)}}}),e("div",x({className:"st-drag-icon-container"},{children:C.drag})),e("div",x({className:"st-column-label-container"},{children:v.label}))]})),e("div",{className:"st-column-editor-drag-separator",style:{opacity:h===w?1:0}})]})},rr=function(e,n){var r=n.toLowerCase();return!!e.label.toLowerCase().includes(r)||!(!e.children||0>=e.children.length)&&e.children.some(function(e){return rr(e,n)})},tr=function(n){var t=n.headers,o=n.open,a=n.searchEnabled,l=n.searchPlaceholder,c=n.searchFunction,s=i(""),d=s[0],f=s[1],v=i(null),h=v[0],p=v[1],w=i(null),m=w[0],g=w[1],b=i(function(){var e=new Set,n=function(r){r.forEach(function(r){r.children&&r.children.length>0&&(e.add(r.accessor),n(r.children))})};return n(t),e}),y=b[0],I=b[1],C=u(function(){return t.some(function(e){return e.children&&e.children.length>0})},[t]),S=u(function(){return a?function(e,n,r){if(!n.trim())return e;var t=r||rr;return e.filter(function(e){return!e.isSelectionColumn&&!e.excludeFromRender&&t(e,n)})}(t,d,c):t},[t,d,a,c]),M=u(function(){var e=[],n=a&&d.trim().length>0,r=function(t){var o=t.depth,i=void 0===o?0:o,a=t.parent,u=void 0===a?null:a,l=t.currentPath,c=void 0===l?[]:l;t.headers.forEach(function(t,o){if(!t.isSelectionColumn&&!t.excludeFromRender){var a=e.length,l=R(R([],c,!0),[o],!1);e.push({header:t,visualIndex:a,depth:i,parent:u,indexPath:l});var s=t.children&&t.children.length>0,d=n||y.has(t.accessor);s&&d&&t.children&&r({headers:t.children,depth:i+1,parent:t,currentPath:l})}})};return r({headers:S,depth:0,parent:null,currentPath:[]}),e},[S,y,a,d]);return e("div",x({className:"st-column-editor-popout ".concat(o?"open":""),onClick:function(e){return e.stopPropagation()}},{children:r("div",x({className:"st-column-editor-popout-content"},{children:[a&&e("div",x({className:"st-column-editor-search-wrapper"},{children:e("div",x({className:"st-column-editor-search"},{children:e("input",{type:"text",value:d,onChange:function(e){return f(e.target.value)},placeholder:l,className:"st-filter-input",onClick:function(e){return e.stopPropagation()}})}))})),e("div",x({className:"st-column-editor-list"},{children:M.map(function(n){return e(nr,{doesAnyHeaderHaveChildren:C,header:n.header,allHeaders:t,depth:n.depth,forceExpanded:a&&d.trim().length>0,rowIndex:n.visualIndex,draggingRow:h,setDraggingRow:p,hoveredSeparatorIndex:m,setHoveredSeparatorIndex:g,expandedHeaders:y,setExpandedHeaders:I,flattenedHeaders:M},"".concat(n.header.accessor,"-").concat(n.visualIndex))})}))]}))}))},or=function(n){var t=n.columnEditorText,o=n.headers,i=n.open,a=n.searchEnabled,u=n.searchPlaceholder,l=n.searchFunction,c=n.setOpen;return n.editColumns?r("div",x({className:"st-column-editor ".concat(i?"open":""),onClick:function(){c(!i)},style:{width:N}},{children:[e("div",x({className:"st-column-editor-text"},{children:t})),e(tr,{headers:o,open:i,searchEnabled:a,searchPlaceholder:u,searchFunction:l})]})):null},ir=function(n){var r=n.children,o=a({}),i=l(function(e,n){return!!o.current[n]&&o.current[n].find(function(n){return n===e})},[]),u=l(function(e,n){e.scrollWidth-e.clientWidth>0&&(n.scrollLeft=e.scrollLeft)},[]),c=l(function(e){e.onscroll=null},[]),s=l(function(e,n){e.onscroll=function(){window.requestAnimationFrame(function(){n.forEach(function(n){var r;null===(r=o.current[n])||void 0===r||r.forEach(function(n){e!==n&&(c(n),u(e,n),window.requestAnimationFrame(function(){var e=Object.keys(o.current).filter(function(e){return o.current[e].includes(n)});s(n,e)}))})})})}},[c,u]),d=l(function(e,n){n.forEach(function(n){o.current[n]||(o.current[n]=[]),i(e,n)||(o.current[n].length>0&&u(o.current[n][0],e),o.current[n].push(e))}),s(e,n)},[i,u,s]),f=l(function(e,n){n.forEach(function(n){if(i(e,n)){c(e);var r=o.current[n].indexOf(e);-1!==r&&o.current[n].splice(r,1)}})},[i,c]);return e(fn.Provider,x({value:{registerPane:d,unregisterPane:f}},{children:t.Children.only(r)}))},ar=function(e){var n=e.tableRows,r=e.filterState;return e.externalFilterHandling?n:r&&0!==Object.keys(r).length?n.filter(function(e){return Object.values(r).every(function(n){try{return function(e,n){var r=n.operator,t=n.value,o=n.values;if(null==e)return"isEmpty"===r;if("isEmpty"===r)return!e||""===(e+"").trim();if("isNotEmpty"===r)return e&&""!==(e+"").trim();if("string"==typeof e||"contains"===r||"notContains"===r||"startsWith"===r||"endsWith"===r){var i=(e+"").toLowerCase(),a=t?(t+"").toLowerCase():"";switch(r){case"equals":return i===a;case"notEquals":return i!==a;case"contains":return i.includes(a);case"notContains":return!i.includes(a);case"startsWith":return i.startsWith(a);case"endsWith":return i.endsWith(a)}}if("number"==typeof e||!isNaN(+e)){var u=+e,l=+t;switch(r){case"equals":return u===l;case"notEquals":return u!==l;case"greaterThan":return u>l;case"lessThan":return l>u;case"greaterThanOrEqual":return u>=l;case"lessThanOrEqual":return l>=u;case"between":if(o&&2===o.length){var c=o.map(Number),s=c[1];return u>=c[0]&&s>=u}return!1;case"notBetween":if(o&&2===o.length){var d=o.map(Number);return s=d[1],d[0]>u||u>s}return!0}}if(e instanceof Date||!isNaN(Date.parse(e))){var f=We(e),v=We((t||"")+""),h=Le(f),p=Le(v);switch(r){case"equals":return h.getTime()===p.getTime();case"notEquals":return h.getTime()!==p.getTime();case"before":return p>h;case"after":return h>p;case"between":if(o&&2===o.length){var w=o.map(function(e){return Le(We((e||"")+""))}),m=w[1];return h>=w[0]&&m>=h}return!1;case"notBetween":if(o&&2===o.length){var g=o.map(function(e){return Le(We((e||"")+""))});return m=g[1],g[0]>h||h>m}return!0}}if("boolean"==typeof e&&"equals"===r)return e===!!t;if(Array.isArray(e)){var b=e.map(function(e){return"object"==typeof e&&null!==e?JSON.stringify(e):e+""}).join(", ");e=b}if("in"===r||"notIn"===r){if(o&&Array.isArray(o)){var x=o.includes(e+"");return"in"===r?x:!x}return!1}var y=(e+"").toLowerCase(),I=t?(t+"").toLowerCase():"";switch(r){case"equals":return y===I;case"notEquals":return y!==I;default:return!0}}(z(e,n.accessor),n)}catch(e){return console.warn("Filter error for accessor ".concat(n.accessor,":"),e),!0}})}):n},ur=function(e){var n,r=document.querySelector(".simple-table-root");if("string"==typeof e){if(e.endsWith("px"))return parseInt(e,10);if(e.endsWith("vh"))return window.innerHeight*parseInt(e,10)/100;if(e.endsWith("%")){var t=null===(n=null==r?void 0:r.parentElement)||void 0===n?void 0:n.clientHeight;return!t||50>t?0:t*parseInt(e,10)/100}return window.innerHeight}return e},lr=function(e,n,r,t){var o=[],i=function(e){e.forEach(function(e){var r=t?e[t]:void 0;if(t&&r&&G(r))i(r);else{var a=z(e,n);null!=a&&o.push(a)}})};if(i(e),0!==o.length){if("custom"===r.type&&r.customFn)return r.customFn(o);var a,u=r.parseValue?o.map(r.parseValue).filter(function(e){return!isNaN(e)}):o.map(function(e){return"number"==typeof e?e:"string"==typeof e?parseFloat(e):NaN}).filter(function(e){return!isNaN(e)});if(0===u.length)return"count"===r.type?o.length:void 0;switch(r.type){case"sum":a=u.reduce(function(e,n){return e+n},0);break;case"average":a=u.reduce(function(e,n){return e+n},0)/u.length;break;case"count":a=o.length;break;case"min":a=Math.min.apply(Math,u);break;case"max":a=Math.max.apply(Math,u);break;default:return}return r.formatResult?r.formatResult(a):a}},cr=function(e){if(null==e)return"";var n=e+"";if(n.includes(",")||n.includes('"')||n.includes("\n")||n.includes("\r")){var r=n.replace(/"/g,'""');return'"'.concat(r,'"')}return n},sr=function(e){return function(){for(var n=[],r=0;arguments.length>r;r++)n[r]=arguments[r];return new Promise(function(r){e.apply(void 0,n),setTimeout(function(){return r()},0)})}},dr=function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches},fr={COLUMN_REORDER:{duration:180,easing:"cubic-bezier(0.2, 0.0, 0.2, 1)",delay:0},ROW_REORDER:{duration:200,easing:"cubic-bezier(0.2, 0.0, 0.2, 1)",delay:0},REDUCED_MOTION:{duration:150,easing:"ease-out",delay:0}},vr=function(e){e.style.transition="",e.style.transitionDelay="",e.style.transform="",e.style.top="",e.style.willChange="",e.style.backfaceVisibility="",e.classList.remove("st-animating")},hr=function(e,n,r,t){return void 0===r&&(r={}),new Promise(function(t){e.style.transition="transform ".concat(n.duration,"ms ").concat(n.easing),n.delay&&(e.style.transitionDelay="".concat(n.delay,"ms")),e.style.transform="translate3d(0, 0, 0)";var o=function(){vr(e),e.removeEventListener("transitionend",o),r.onComplete&&r.onComplete(),t()};e.addEventListener("transitionend",o),setTimeout(o,n.duration+(n.delay||0)+50)})},pr=function(e){var n=e.element,r=e.finalConfig,t=e.fromBounds,o=e.toBounds;return I(void 0,void 0,void 0,function(){var e,i;return C(this,function(a){switch(a.label){case 0:return e=function(e,n){return{x:("x"in e?e.x:e.left)-n.x,y:("y"in e?e.y:e.top)-n.y}}(t,o),0===e.x&&0===e.y||dr()&&!1!==r.respectReducedMotion?[2]:(u=r,l=Math.abs(e.x)>Math.abs(e.y)?"column":"row",void 0===u&&(u={}),i=dr()?x(x({},fr.REDUCED_MOTION),u):x(x({},"column"===l?fr.COLUMN_REORDER:fr.ROW_REORDER),u),vr(n),function(e,n){e.style.transform="translate3d(".concat(n.x,"px, ").concat(n.y,"px, 0)"),e.style.transition="none",e.style.willChange="transform",e.style.backfaceVisibility="hidden",e.classList.add("st-animating")}(n,e),[4,hr(n,i,r)]);case 1:return a.sent(),[2]}var u,l})})},wr=function(e){var n=e.element,r=e.options;return I(void 0,void 0,void 0,function(){var e,t,o,i,a,u,l,c,s,d,f,v,h,p,w,m;return C(this,function(g){return e=r.startY,t=r.endY,o=r.finalY,a=void 0===(i=r.duration)?300:i,l=void 0===(u=r.easing)?"cubic-bezier(0.2, 0.0, 0.2, 1)":u,s=void 0===(c=r.delay)?0:c,d=r.onComplete,v=void 0===(f=r.respectReducedMotion)||f,dr()&&v?(void 0!==o&&(n.style.transform="",n.style.top="".concat(o,"px")),d&&d(),[2]):(h=n.getBoundingClientRect(),w=e-(p=h.top),m=t-p,[2,new Promise(function(e){n.style.transition="",n.style.transitionDelay="",n.style.transform="",n.style.willChange="",n.style.backfaceVisibility="",n.classList.remove("st-animating"),n.style.transform="translate3d(0, ".concat(w,"px, 0)"),n.style.transition="none",n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.classList.add("st-animating"),n.style.transition="transform ".concat(a,"ms ").concat(l),s&&(n.style.transitionDelay="".concat(s,"ms")),n.style.transform="translate3d(0, ".concat(m,"px, 0)");var r=function(){n.style.transition="",n.style.transitionDelay="",n.style.transform="",n.style.willChange="",n.style.backfaceVisibility="",n.classList.remove("st-animating"),void 0!==o&&(n.style.top="".concat(o,"px")),n.removeEventListener("transitionend",r),d&&d(),e()};n.addEventListener("transitionend",r),setTimeout(r,a+(s||0)+50)})])})})},mr=function(e){var n=e.rows,r=e.rowGrouping,t=void 0===r?[]:r,o=e.getRowId,i=e.expandedRows,a=e.collapsedRows,l=e.expandedDepths,c=e.rowStateMap,s=e.hasLoadingRenderer,d=e.hasErrorRenderer,f=e.hasEmptyRenderer,v=e.headers,h=e.rowHeight,p=e.headerHeight,w=e.customTheme;return u(function(){if(!t||0===t.length){var e=n.map(function(e,n){var r=[n],t=[n];return{row:e,depth:0,displayPosition:n,groupingKey:void 0,position:n,rowId:V({row:e,getRowId:o,depth:0,index:n,rowPath:r,rowIndexPath:t,groupingKey:void 0}),rowPath:r,rowIndexPath:t,absoluteRowIndex:n,isLastGroupRow:!1}});return{flattenedRows:e,heightOffsets:[],paginatableRows:e,parentEndPositions:n.map(function(e,n){return n+1})}}var r=[],u=[],m=[],g=[],b=0,x=function(e,n,y,I,C){void 0===y&&(y=[]),void 0===I&&(I=[]),void 0===C&&(C=[]),e.forEach(function(e,S){var M,N,H=t[n],E=r.length,k=R(R([],y,!0),[S],!1),T=R(R([],I,!0),[S],!1),P=V({row:e,getRowId:o,depth:n,index:S,rowPath:k,rowIndexPath:T,groupingKey:H}),A=r.length,D={row:e,depth:n,displayPosition:b,groupingKey:H,position:E,isLastGroupRow:0===n,rowId:P,rowPath:k,rowIndexPath:T,absoluteRowIndex:E,parentIndices:C.length>0?R([],C,!0):void 0};r.push(D),u.push(D),b++;var F=j(P);if(U(F,n,l,i,a)&&t.length>n){var O=null==c?void 0:c.get(F),B=K(e,H),z=v.find(function(e){return e.expandable&&e.nestedTable});if((null==z?void 0:z.nestedTable)&&B.length>0){var q=r.length,G=(null===(M=z.nestedTable.customTheme)||void 0===M?void 0:M.rowHeight)||h,_=(null===(N=z.nestedTable.customTheme)||void 0===N?void 0:N.headerHeight)||p,J=L({childRowCount:B.length,rowHeight:G,headerHeight:_,customTheme:w}),Y=W({calculatedHeight:J,customHeight:z.nestedTable.height,customTheme:w});m.push([q,Y-h]);var X=R(R([],k,!0),[H],!1);r.push({row:{},depth:n+1,displayPosition:b-1,groupingKey:H,position:q,isLastGroupRow:!1,rowId:X,rowPath:X,rowIndexPath:T,nestedTable:{parentRow:e,expandableHeader:z,childAccessor:H,calculatedHeight:Y},absoluteRowIndex:q})}else if(O&&(O.loading||O.error||O.isEmpty)){if(O.loading&&s||O.error&&d||O.isEmpty&&f){var $=r.length,Q=R(R([],k,!0),[H],!1);r.push({row:{},depth:n+1,displayPosition:b-1,groupingKey:H,position:$,isLastGroupRow:!1,rowId:Q,rowPath:Q,rowIndexPath:T,stateIndicator:{parentRowId:F,parentRow:e,state:O},absoluteRowIndex:$,parentIndices:R(R([],C,!0),[A],!1)})}else if(O.loading&&!s){var Z=r.length,ee=R(R([],k,!0),[H,"loading-skeleton"],!1);r.push({row:{},depth:n+1,displayPosition:b-1,groupingKey:H,position:Z,isLastGroupRow:!1,rowId:ee,rowPath:ee,rowIndexPath:T,isLoadingSkeleton:!0,absoluteRowIndex:Z,parentIndices:R(R([],C,!0),[A],!1)})}}else if(B.length>0){var ne=R(R([],k,!0),[H],!1),re=R([],T,!0);x(B,n+1,ne,re,R(R([],C,!0),[A],!1))}}0===n&&g.push(r.length)})};return x(n,0,[],[],[]),{flattenedRows:r,heightOffsets:m,paginatableRows:u,parentEndPositions:g}},[n,t,o,i,a,l,c,s,d,f,v,h,p,w])},gr=function(){return e("div",x({className:"st-empty-state"},{children:"No rows to display"}))},br={rowHeight:32,headerHeight:32,footerHeight:49,rowSeparatorWidth:1,borderWidth:1,pinnedBorderWidth:1,nestedGridBorderWidth:2,nestedGridPaddingTop:8,nestedGridPaddingBottom:8,nestedGridPaddingLeft:8,nestedGridPaddingRight:8,nestedGridMaxHeight:400,selectionColumnWidth:42},xr={text:"Columns",searchEnabled:!0,searchPlaceholder:"Search columns..."},yr=[{propName:"columnEditorText",replacement:"columnEditorConfig.text",message:"Use the columnEditorConfig object instead for better organization of column editor settings."},{propName:"expandIcon",replacement:"icons.expand",message:"Use the icons object instead for better organization of icon settings."},{propName:"filterIcon",replacement:"icons.filter",message:"Use the icons object instead for better organization of icon settings."},{propName:"headerCollapseIcon",replacement:"icons.headerCollapse",message:"Use the icons object instead for better organization of icon settings."},{propName:"headerExpandIcon",replacement:"icons.headerExpand",message:"Use the icons object instead for better organization of icon settings."},{propName:"nextIcon",replacement:"icons.next",message:"Use the icons object instead for better organization of icon settings."},{propName:"prevIcon",replacement:"icons.prev",message:"Use the icons object instead for better organization of icon settings."},{propName:"sortDownIcon",replacement:"icons.sortDown",message:"Use the icons object instead for better organization of icon settings."},{propName:"sortUpIcon",replacement:"icons.sortUp",message:"Use the icons object instead for better organization of icon settings."}],Ir=function(n){var r=i(!1),t=r[0],a=r[1];return o(function(){!function(e){"production"!==process.env.NODE_ENV&&yr.forEach(function(n){var r=n.propName,t=n.replacement,o=n.message;if(void 0!==e[r]){var i='SimpleTable: The "'.concat(r,'" prop is deprecated and will be removed in a future version.'),a='Please use "'.concat(t,'" instead.'),u=o?"\n".concat(o):"",l=t.split("."),c=l[0],s=l[1],d="string"==typeof e[r]?JSON.stringify(e[r]):"<YourIcon />";console.error("".concat(i,"\n").concat(a).concat(u,"\n\nExample:\n<SimpleTable\n ").concat(c,"={{\n ").concat(s,": ").concat(d,"\n }}\n/>"))}})}(n)},[]),o(function(){a(!0)},[]),t?e(Cr,x({},n)):null},Cr=function(n){var t=n.allowAnimations,c=void 0!==t&&t,s=n.autoExpandColumns,d=void 0!==s&&s,f=n.canExpandRowGroup,v=n.cellUpdateFlash,h=void 0!==v&&v,p=n.className,w=n.columnBorders,m=void 0!==w&&w,y=n.columnEditorConfig,S=void 0===y?xr:y,N=n.columnEditorText,H=n.columnReordering,k=void 0!==H&&H,T=n.columnResizing,A=void 0!==T&&T,D=n.copyHeadersToClipboard,F=void 0!==D&&D,L=n.customTheme,W=n.defaultHeaders,B=n.editColumns,K=void 0!==B&&B,U=n.editColumnsInitOpen,Y=void 0!==U&&U,X=n.emptyStateRenderer,$=n.enableHeaderEditing,Q=void 0!==$&&$,Z=n.enableRowSelection,ee=void 0!==Z&&Z,re=n.enableStickyParents,te=void 0!==re&&re,ie=n.errorStateRenderer,le=n.expandAll,se=void 0===le||le,fe=n.expandIcon,pe=n.externalFilterHandling,me=void 0!==pe&&pe,ye=n.externalSortHandling,Ce=void 0!==ye&&ye,Re=n.filterIcon,Se=n.footerRenderer,Me=n.headerCollapseIcon,Ne=n.headerDropdown,He=n.headerExpandIcon,Ee=n.height,ke=n.hideFooter,Te=void 0!==ke&&ke,Pe=n.hideHeader,Ae=void 0!==Pe&&Pe,De=n.icons,Fe=n.includeHeadersInCSVExport,Oe=void 0===Fe||Fe,Le=n.initialSortColumn,We=n.initialSortDirection,Be=void 0===We?"asc":We,ze=n.isLoading,qe=void 0!==ze&&ze,Ge=n.loadingStateRenderer,Ve=n.maxHeight,je=n.nextIcon,Ue=n.onCellClick,_e=n.onCellEdit,Je=n.onColumnOrderChange,Ye=n.onColumnSelect,Xe=n.onColumnVisibilityChange,$e=n.onColumnWidthChange,Qe=n.onFilterChange,Ze=n.onGridReady,en=n.onHeaderEdit,nn=n.onLoadMore,rn=n.onNextPage,tn=n.onPageChange,on=n.onRowGroupExpand,an=n.onRowSelectionChange,un=n.onSortChange,ln=n.prevIcon,cn=n.quickFilter,sn=n.rowButtons,dn=n.rowGrouping,fn=n.getRowId,vn=n.rows,hn=n.rowsPerPage,pn=void 0===hn?10:hn,wn=n.selectableCells,mn=void 0!==wn&&wn,gn=n.selectableColumns,bn=void 0!==gn&&gn,yn=n.serverSidePagination,In=void 0!==yn&&yn,Cn=n.shouldPaginate,Rn=void 0!==Cn&&Cn,Sn=n.sortDownIcon,Mn=n.sortUpIcon,Nn=n.tableEmptyStateRenderer,Hn=void 0===Nn?e(gr,{}):Nn,En=n.tableRef,kn=n.theme,Tn=void 0===kn?"modern-light":kn,Pn=n.totalRowCount,An=n.useHoverRowBackground,Dn=void 0===An||An,Fn=n.useOddColumnBackground,On=void 0!==Fn&&Fn,Ln=n.useOddEvenRowBackground,Wn=void 0!==Ln&&Ln,Bn=u(function(){var n,r,t,o,i,a,u,l,c,s,d,f,v,h,p,w,m,g={drag:e(be,{className:"st-drag-icon"}),expand:e(he,{className:"st-expand-icon"}),filter:e(xe,{className:"st-header-icon"}),headerCollapse:e(he,{className:"st-header-icon"}),headerExpand:e(ve,{className:"st-header-icon"}),next:e(he,{className:"st-next-prev-icon"}),prev:e(ve,{className:"st-next-prev-icon"}),sortDown:e(ge,{className:"st-header-icon"}),sortUp:e(we,{className:"st-header-icon"})};return{drag:null!==(n=null==De?void 0:De.drag)&&void 0!==n?n:g.drag,expand:null!==(t=null!==(r=null==De?void 0:De.expand)&&void 0!==r?r:fe)&&void 0!==t?t:g.expand,filter:null!==(i=null!==(o=null==De?void 0:De.filter)&&void 0!==o?o:Re)&&void 0!==i?i:g.filter,headerCollapse:null!==(u=null!==(a=null==De?void 0:De.headerCollapse)&&void 0!==a?a:Me)&&void 0!==u?u:g.headerCollapse,headerExpand:null!==(c=null!==(l=null==De?void 0:De.headerExpand)&&void 0!==l?l:He)&&void 0!==c?c:g.headerExpand,next:null!==(d=null!==(s=null==De?void 0:De.next)&&void 0!==s?s:je)&&void 0!==d?d:g.next,prev:null!==(v=null!==(f=null==De?void 0:De.prev)&&void 0!==f?f:ln)&&void 0!==v?v:g.prev,sortDown:null!==(p=null!==(h=null==De?void 0:De.sortDown)&&void 0!==h?h:Sn)&&void 0!==p?p:g.sortDown,sortUp:null!==(m=null!==(w=null==De?void 0:De.sortUp)&&void 0!==w?w:Mn)&&void 0!==m?m:g.sortUp}},[De,fe,Re,Me,He,je,ln,Sn,Mn]),zn=u(function(){return x(x({},br),L)},[L]),qn=u(function(){var e,n,r,t;return{text:null!==(n=null!==(e=null==S?void 0:S.text)&&void 0!==e?e:N)&&void 0!==n?n:xr.text,searchEnabled:null!==(r=null==S?void 0:S.searchEnabled)&&void 0!==r?r:xr.searchEnabled,searchPlaceholder:null!==(t=null==S?void 0:S.searchPlaceholder)&&void 0!==t?t:xr.searchPlaceholder,searchFunction:null==S?void 0:S.searchFunction}},[S,N]),Gn=zn.rowHeight,Vn=zn.headerHeight,jn=zn.footerHeight,Kn=zn.selectionColumnWidth;On&&(Wn=!1),m&&(Dn=!1);var Jn=a(null),Qn=a(null),Zn=a(null),er=a(null),nr=a(null),rr=a(null),tr=a(null),dr=b(function(e){return e+1},0)[1],vr=i(new Map),hr=vr[0],pr=vr[1],wr=i(vn),yr=wr[0],Ir=wr[1],Cr=i(qe),Rr=Cr[0],Sr=Cr[1],Mr=a(qe),Nr=a(new Map);o(function(){Ir(vn);var e=new Map;vn.forEach(function(n,r){var t=V({row:n,getRowId:fn,depth:0,index:r,rowPath:[r],rowIndexPath:[r]}),o=j(t);e.set(o,r)}),Nr.current=e},[vn,fn]),o(function(){var e=Mr.current,n=qe;n&&!e?Sr(!0):!n&&e&&setTimeout(function(){Sr(!1)},0),Mr.current=qe},[qe]);var Hr,Er,kr,Tr,Pr,Ar,Dr,Fr,Or,Lr,Wr=function(e){var n=e.tableBodyContainerRef,r=i(0),t=r[0],o=r[1];return g(function(){n.current&&o(n.current.offsetWidth-n.current.clientWidth)},[n]),{setScrollbarWidth:o,scrollbarWidth:t,tableBodyContainerRef:n}}({tableBodyContainerRef:rr}),Br=Wr.scrollbarWidth,zr=Wr.setScrollbarWidth,qr=Ie({headerContainerRef:tr,mainSectionRef:rr,scrollbarWidth:Br}).isMainSectionScrollable,Gr=u(function(){if(Rr&&0===yr.length){var e=Rn?pn:10;return qr&&(e+=1),Array.from({length:e},function(e,n){return{}})}return yr},[Rr,yr,pn,qr,Rn]),Vr=i(1),jr=Vr[0],Kr=Vr[1],Ur=i(W),_r=Ur[0],Jr=Ur[1],Yr=i(!1),Xr=Yr[0],$r=Yr[1],Qr=i(!1),Zr=Qr[0],et=Qr[1],nt=i(null),rt=nt[0],tt=nt[1],ot=i(Y),it=ot[0],at=ot[1],ut=l(function(){var e=new Set,n=function(r){r.forEach(function(r){r.collapseDefault&&r.collapsible&&e.add(r.accessor),r.children&&n(r.children)})};return n(W),e},[W]),lt=i(ut),ct=lt[0],st=lt[1];o(function(){Jr(W)},[W]);var dt=u(function(){var e,n=R([],_r,!0);return ee&&!(null===(e=null==_r?void 0:_r[0])||void 0===e?void 0:e.isSelectionColumn)&&(n=R([{accessor:"__row_selection__",label:"",width:Kn,isEditable:!1,type:"boolean",pinned:"left",isSelectionColumn:!0,isSortable:!1,filterable:!1,align:"center"}],n,!0)),n},[ee,_r,Kn]),ft=i(0),vt=ft[0],ht=ft[1],pt=i("none"),wt=pt[0],mt=pt[1],gt=function(e,n){var r=i(function(){return function(e,n){if(!n||0===n.length)return new Set;if(e){var r=Array.from({length:n.length},function(e,n){return n});return new Set(r)}return new Set}(e,n)}),t=r[0],a=r[1];return o(function(){a(n&&0!==n.length?function(e){var r=n.length,t=Array.from(e).filter(function(e){return r>e});return new Set(t)}:new Set)},[n]),{expandedDepths:t,setExpandedDepths:a}}(se,dn),bt=gt.expandedDepths,xt=gt.setExpandedDepths,yt=i(new Map),It=yt[0],Ct=yt[1],Rt=i(new Map),St=Rt[0],Mt=Rt[1],Nt=function(){var e=i(""),n=e[0],r=e[1],t=a(null);return o(function(){return n&&(t.current&&clearTimeout(t.current),t.current=setTimeout(function(){r("")},1e3)),function(){t.current&&clearTimeout(t.current)}},[n]),{announcement:n,announce:function(e){r(e)}}}(),Ht=Nt.announcement,Et=Nt.announce,kt=function(e){var n=e.effectiveHeaders,r=e.headerHeight,t=e.rowHeight,o=e.tableBodyContainerRef,a=i(0),c=a[0],s=a[1],d=l(function(e){var n,r;return e.singleRowChildren&&(null===(n=e.children)||void 0===n?void 0:n.length)?1:(null===(r=e.children)||void 0===r?void 0:r.length)?1+Math.max.apply(Math,e.children.map(d)):1},[]),f=u(function(){var e=0;return n.forEach(function(n){var r=d(n);e=Math.max(e,r)}),e},[n,d]),v=u(function(){var e=1;if("undefined"!=typeof window){var n=document.documentElement,o=getComputedStyle(n).getPropertyValue("--st-border-width").trim();if(o){var i=parseFloat(o);isNaN(i)||(e=i)}}return f*(null!=r?r:t)+e},[f,r,t]);return g(function(){var e=function(){o.current&&s(o.current.clientWidth)};e();var n=null;return o.current&&(n=new ResizeObserver(e)).observe(o.current),function(){n&&n.disconnect()}},[o]),{containerWidth:c,calculatedHeaderHeight:v,maxHeaderDepth:f}}({effectiveHeaders:dt,headerHeight:Vn,rowHeight:Gn,tableBodyContainerRef:rr}),Tt=kt.containerWidth,Pt=kt.calculatedHeaderHeight,At=kt.maxHeaderDepth,Dt=a(0),Ft=a(0),Ot=u(function(){var e=E(window.innerWidth),n=xn({headers:dt,containerWidth:Tt,maxPinnedWidthPercent:e,collapsedHeaders:ct});return{mainBodyWidth:n.mainWidth,pinnedLeftWidth:n.leftWidth,pinnedRightWidth:n.rightWidth,pinnedLeftContentWidth:n.leftContentWidth,pinnedRightContentWidth:n.rightContentWidth}},[dt,Tt,ct]),Lt=Ot.mainBodyWidth,Wt=Ot.pinnedLeftWidth,Bt=Ot.pinnedRightWidth,zt=Ot.pinnedLeftContentWidth,qt=Ot.pinnedRightContentWidth;o(function(){if(d&&0!==Tt&&!Xr){var e,n=function(e){var r=[];return e.forEach(function(e){e.hide||(e.children&&e.children.length>0?r.push.apply(r,n(e.children)):r.push(e))}),r};if((e=Zn.current?Zn.current.clientWidth:Math.max(0,Tt-Wt-Bt))>0){var r=_r.filter(function(e){return!e.pinned});n(r).length===Ft.current&&10>Math.abs(e-Dt.current)||Jr(function(r){var t=r.filter(function(e){return!e.pinned}),o=n(t),i=o.reduce(function(e,n){return e+("number"==typeof n.width?n.width:"string"==typeof n.width&&n.width.endsWith("px")?parseFloat(n.width):150)},0);if(0===i)return r;var a=e/i;if(.01>Math.abs(a-1))return r;Dt.current=e,Ft.current=o.length;var u=new Map,l=0;o.forEach(function(n,r){if(!n.pinned){var t,i="number"==typeof n.width?n.width:"string"==typeof n.width&&n.width.endsWith("px")?parseFloat(n.width):150;r===o.length-1?t=e-l:l+=t=Math.round(i*a),u.set(n.accessor,t)}});var c=function(e){var n;if(e.hide)return e;var r=null===(n=e.children)||void 0===n?void 0:n.map(c);if(!e.children||0===e.children.length){if(e.pinned)return x(x({},e),{children:r});var t=u.get(e.accessor);if(void 0!==t)return x(x({},e),{width:t,children:r});var o="number"==typeof e.width?e.width:"string"==typeof e.width&&e.width.endsWith("px")?parseFloat(e.width):150;return x(x({},e),{width:Math.round(o*a),children:r})}return x(x({},e),{children:r})};return r.map(c)})}}},[d,Tt,Xr,_r,Wt,Bt]);var Gt=function(e){var n=e.rows,r=e.headers,t=e.rowGrouping;return u(function(){if(!t||0===t.length)return n;var e=function(e){return P(e).filter(function(e){return e.aggregation})}(r);if(0===e.length)return n;var o=JSON.parse(JSON.stringify(n)),i=function(n,r){return void 0===r&&(r=0),n.map(function(n){var o=t[r],a=t[r+1],u=n[o];if(u&&G(u)){var l=i(u,r+1),c=x({},n);return c[o]=l,e.forEach(function(e){var n=lr(l,e.accessor,e.aggregation,a);void 0!==n&&q(c,e.accessor,n)}),c}return n})};return i(o)},[n,r,t])}({rows:Gr,headers:_r,rowGrouping:dn}),Vt=function(e){var n=e.rows,r=e.headers,t=e.quickFilter;return u(function(){if(!t||!t.text||""===t.text.trim())return n;var e=t.text,o=t.columns,i=t.caseSensitive,a=void 0!==i&&i,u=t.mode,l=void 0===u?"simple":u,c=t.useFormattedValue,s=void 0===c||c,d=r.filter(function(e){return!e.hide&&!e.excludeFromRender&&(o&&o.length>0?o.includes(e.accessor):!1!==e.quickFilterable)}),f="smart"===l?function(e){for(var n=[],r=0;e.length>r;){for(;e.length>r&&/\s/.test(e[r]);)r++;if(r>=e.length)break;if("-"!==e[r])if('"'!==e[r]){for(var t=r;e.length>r&&!/[\s:]/.test(e[r]);)r++;var o=e.substring(t,r);if(e.length>r&&":"===e[r]){for(var i=++r;e.length>r&&!/\s/.test(e[r]);)r++;(l=e.substring(i,r))&&n.push({type:"columnSpecific",value:l,column:o})}else o&&n.push({type:"word",value:o})}else{for(var a=++r;e.length>r&&'"'!==e[r];)r++;(l=e.substring(a,r))&&n.push({type:"phrase",value:l}),e.length>r&&'"'===e[r]&&r++}else{for(var u=++r;e.length>r&&!/\s/.test(e[r]);)r++;var l;(l=e.substring(u,r))&&n.push({type:"negation",value:l})}}return n}(e):null;return n.filter(function(n){if("smart"===l&&f){var r=new Set,t=new Map;f.forEach(function(e,n){"columnSpecific"===e.type&&e.column&&(t.has(e.column)||t.set(e.column,[]),t.get(e.column).push(n))});var o=[];d.forEach(function(e){try{var i;if(e.quickFilterGetter)i=e.quickFilterGetter({row:n,accessor:e.accessor});else{var u=z(n,e.accessor);if(s&&e.valueFormatter){var l=e.valueFormatter({accessor:e.accessor,colIndex:0,row:n,rowIndex:0,value:u});i=Array.isArray(l)?l.join(" "):l+""}else i=null==u?"":Array.isArray(u)?u.join(" "):u+""}o.push(i);var c=t.get(e.accessor);c&&c.forEach(function(e){var n=f[e],t=a?i:i.toLowerCase(),o=a?n.value:n.value.toLowerCase();t.includes(o)&&r.add(e)})}catch(n){console.warn("Quick filter error for column ".concat(e.accessor,":"),n)}});var i=a?o.join(" "):o.join(" ").toLowerCase();return f.forEach(function(e,n){if("columnSpecific"!==e.type){var t=a?e.value:e.value.toLowerCase();switch(e.type){case"word":case"phrase":i.includes(t)&&r.add(n);break;case"negation":i.includes(t)||r.add(n)}}}),r.size===f.length}return d.some(function(r){try{var t=void 0;if(r.quickFilterGetter)t=r.quickFilterGetter({row:n,accessor:r.accessor});else{var o=z(n,r.accessor);if(s&&r.valueFormatter){var i=r.valueFormatter({accessor:r.accessor,colIndex:0,row:n,rowIndex:0,value:o});t=Array.isArray(i)?i.join(" "):i+""}else t=null==o?"":Array.isArray(o)?o.join(" "):o+""}return function(e,n,r){if(!n)return!0;var t=r?e:e.toLowerCase(),o=r?n:n.toLowerCase();return t.includes(o)}(t,e,a)}catch(e){return console.warn("Quick filter error for column ".concat(r.accessor,":"),e),!1}})})},[n,r,t])}({rows:Gt,headers:dt,quickFilter:cn}),jt=function(e){var n=e.rows,r=e.headers,t=e.externalFilterHandling,o=e.onFilterChange,a=e.announce,c=i({}),s=c[0],d=c[1],f=Xn(r),v=u(function(){return ar({externalFilterHandling:t,tableRows:n,filterState:s})},[n,s,t]),h=l(function(e){var n,r=x(x({},s),((n={})[e.accessor]=e,n));if(d(r),null==o||o(r),a){var t=f.get(e.accessor);t&&a("Filter applied to ".concat(t.label))}},[s,o,a,f]),p=l(function(e){var n=x({},s);if(delete n[e],d(n),null==o||o(n),a){var r=f.get(e);r&&a("Filter removed from ".concat(r.label))}},[s,o,a,f]),w=l(function(){d({}),null==o||o({}),a&&a("All filters cleared")},[o,a]),m=l(function(e){var r,o=x(x({},s),((r={})[e.accessor]=e,r));return ar({externalFilterHandling:t,tableRows:n,filterState:o})},[s,n,t]);return{filteredRows:v,updateFilter:h,clearFilter:p,clearAllFilters:w,filters:s,computeFilteredRowsPreview:m}}({rows:Vt,headers:dt,externalFilterHandling:me,onFilterChange:Qe,announce:Et}),Kt=jt.filters,Ut=jt.updateFilter,_t=jt.clearFilter,Jt=jt.clearAllFilters,Yt=jt.computeFilteredRowsPreview,Xt=function(e){var n=e.headers,r=e.tableRows,t=e.externalSortHandling,o=e.onSortChange,a=e.rowGrouping,c=e.initialSortColumn,s=e.initialSortDirection,d=e.announce,f=Xn(n),v=l(function(){if(!c)return null;var e=f.get(c);return e?{key:e,direction:s||"asc"}:null},[f,c,s]),h=i(v),p=h[0],w=h[1],m=l(function(e){var n=e.groupingKeys,r=e.headers,t=e.sortColumn,o=Yn({headers:r,rows:e.rows,sortColumn:t});return n&&0!==n.length?o.map(function(e){var o,i=n[0],a=e[i];if(G(a)){var u=m({rows:a,sortColumn:t,headers:r,groupingKeys:n.slice(1)});return x(x({},e),((o={})[i]=u,o))}return e}):o},[]),g=u(function(){return $n({externalSortHandling:t,tableRows:r,sortColumn:p,rowGrouping:a,headers:n,sortNestedRows:m})},[r,p,n,t,a,m]),b=l(function(e){if(!e)return w(null),void(null==o||o(null));var n=e.accessor,r=e.direction,t=f.get(n);if(t){var i=null;if(r)i={key:t,direction:r};else{var a=t.sortingOrder||["asc","desc",null],u=-1;p&&p.key.accessor===n&&(u=a.indexOf(p.direction));var l=a[(u+1)%a.length];i=null===l?null:{key:t,direction:l}}if(w(i),null==o||o(i),d)if(i){var c="asc"===i.direction?"ascending":"descending";d("Sorted by ".concat(t.label,", ").concat(c))}else d("Sort removed from ".concat(t.label))}},[p,f,o,d]),y=l(function(e){var o=function(n){for(var r=0,t=n;t.length>r;r++){var i=t[r];if(i.accessor===e)return i;if(i.children&&i.children.length>0){var a=o(i.children);if(a)return a}}},i=o(n);if(!i)return r;var u=i.sortingOrder||["asc","desc",null],l=-1;p&&p.key.accessor===e&&(l=u.indexOf(p.direction));var c=u[(l+1)%u.length];return $n({externalSortHandling:t,tableRows:r,sortColumn:null===c?null:{key:i,direction:c},rowGrouping:a,headers:n,sortNestedRows:m})},[p,n,r,t,a,m]);return{sort:p,sortedRows:g,updateSort:b,computeSortedRowsPreview:y}}({headers:_r,tableRows:jt.filteredRows,externalSortHandling:Ce,onSortChange:un,rowGrouping:dn,initialSortColumn:Le,initialSortDirection:Be,announce:Et}),$t=Xt.sort,Qt=Xt.updateSort,Zt=Xt.computeSortedRowsPreview,eo=mr({rows:Xt.sortedRows,rowGrouping:dn,getRowId:fn,expandedRows:It,collapsedRows:St,expandedDepths:bt,rowStateMap:hr,hasLoadingRenderer:!!Ge,hasErrorRenderer:!!ie,hasEmptyRenderer:!!X,headers:dt,rowHeight:Gn,headerHeight:Vn,customTheme:zn}),no=eo.flattenedRows,ro=eo.heightOffsets,to=eo.paginatableRows,oo=eo.parentEndPositions,io=function(e){var n=e.tableRows,r=e.onRowSelectionChange,t=e.enableRowSelection,o=void 0!==t&&t,a=i(new Set),c=a[0],s=a[1],d=l(function(e){return!!o&&function(e,n){return n.has(e)}(e,c)},[c,o]),f=l(function(){return!!o&&function(e,n){return 0!==e.length&&e.filter(function(e){return e&&e.rowId}).every(function(e){return n.has(j(e.rowId))})}(n,c)},[n,c,o]),v=u(function(){return o?function(e){return e.size}(c):0},[c,o]),h=u(function(){return o?function(e,n){return e.filter(function(e){return!(!e||!e.rowId)&&n.has(j(e.rowId))}).map(function(e){return e.row})}(n,c):[]},[n,c,o]),p=l(function(e,t){if(o){var i=function(e,n){var r=new Set(n);return r.has(e)?r.delete(e):r.add(e),r}(e,c);if(s(i),r){var a=n.find(function(n){return j(n.rowId)===e});a&&r({row:a.row,isSelected:t,selectedRows:i})}}},[c,n,r,o]),w=l(function(e){var t;o&&(e?(t=function(e){return new Set(e.filter(function(e){return e&&e.rowId}).map(function(e){return j(e.rowId)}))}(n),r&&n.forEach(function(e){return r({row:e.row,isSelected:!0,selectedRows:t})})):(t=new Set,r&&c.forEach(function(e){var o=n.find(function(n){return j(n.rowId)===e});o&&r({row:o.row,isSelected:!1,selectedRows:t})})),s(t))},[n,r,c,o]),m=l(function(e){if(o){var n=d(e);p(e,!n)}},[d,p,o]),g=l(function(){if(o){if(r){var e=new Set;c.forEach(function(t){var o=n.find(function(e){return j(e.rowId)===t});o&&r({row:o.row,isSelected:!1,selectedRows:e})})}s(new Set)}},[c,n,r,o]);return{selectedRows:c,setSelectedRows:s,isRowSelected:d,areAllRowsSelected:f,selectedRowCount:v,selectedRowsData:h,handleRowSelect:p,handleSelectAll:w,handleToggleRow:m,clearSelection:g}}({tableRows:no,onRowSelectionChange:an,enableRowSelection:ee});Hr=io.selectedRows,Er=io.setSelectedRows,kr=io.isRowSelected,Tr=io.areAllRowsSelected,Pr=io.selectedRowCount,Ar=io.selectedRowsData,Dr=io.handleRowSelect,Fr=io.handleSelectAll,Or=io.handleToggleRow,Lr=io.clearSelection;var ao=mr({rows:Gt,rowGrouping:dn,getRowId:fn,expandedRows:It,collapsedRows:St,expandedDepths:bt,rowStateMap:hr,hasLoadingRenderer:!!Ge,hasErrorRenderer:!!ie,hasEmptyRenderer:!!X,headers:dt,rowHeight:Gn,headerHeight:Vn,customTheme:zn}).flattenedRows,uo=l(function(e){var n=Yt(e);return dn&&0!==dn.length?_({rows:n,rowGrouping:dn,getRowId:fn,expandedRows:It,collapsedRows:St,expandedDepths:bt,rowStateMap:hr,hasLoadingRenderer:!!Ge,hasErrorRenderer:!!ie,hasEmptyRenderer:!!X,headers:dt,rowHeight:Gn,headerHeight:Vn,customTheme:zn}):n.map(function(e,n){return{row:e,depth:0,displayPosition:n,groupingKey:void 0,position:n,isLastGroupRow:!1,rowId:[n],rowPath:[n],absoluteRowIndex:n}})},[Yt,dn,fn,It,St,bt,hr,Ge,ie,X,dt,Gn,Vn,zn]),lo=l(function(e){var n=Zt(e);return dn&&0!==dn.length?_({rows:n,rowGrouping:dn,getRowId:fn,expandedRows:It,collapsedRows:St,expandedDepths:bt,rowStateMap:hr,hasLoadingRenderer:!!Ge,hasErrorRenderer:!!ie,hasEmptyRenderer:!!X,headers:dt,rowHeight:Gn,headerHeight:Vn,customTheme:zn}):n.map(function(e,n){return{row:e,depth:0,displayPosition:n,groupingKey:void 0,position:n,isLastGroupRow:!1,rowId:[n],rowPath:[n],absoluteRowIndex:n}})},[Zt,dn,fn,It,St,bt,hr,Ge,ie,X,dt,Gn,Vn,zn]),co=function(e){var n=e.height,r=e.maxHeight,t=e.rowHeight,o=e.totalRowCount,i=e.headerHeight,a=e.footerHeight;return u(function(){if(r){var e=ur(r);if(0===e)return;var u=i||t;if(e>=u+o*t+(a||0)||20>o)return;return Math.max(0,e-u)}if(n){var l=ur(n);if(0!==l)return Math.max(0,l-t)}},[n,r,t,o,i,a])}({height:Ee,maxHeight:Ve,rowHeight:Gn,shouldPaginate:Rn,rowsPerPage:pn,totalRowCount:null!=Pn?Pn:to.length,headerHeight:Pt,footerHeight:Rn&&!Te?jn:void 0}),so=function(e){var n=e.allowAnimations,r=e.computeFilteredRowsPreview,t=e.computeSortedRowsPreview,o=e.contentHeight,c=e.currentPage,s=e.customTheme,d=e.enableStickyParents,f=e.flattenedRows,v=e.heightOffsets,h=e.originalFlattenedRows,p=e.parentEndPositions,w=e.rowHeight,m=e.rowsPerPage,b=e.scrollDirection,y=void 0===b?"none":b,I=e.scrollTop,C=e.serverSidePagination,S=e.shouldPaginate,N=e.rowGrouping,H=i(!1),E=H[0],k=H[1],T=i([]),P=T[0],A=T[1],D=a([]),F=a([]),O=u(function(){return M(w)},[w]),L=a(new Map),W=a(null),B=l(function(e,n){if(!S||C)return e.map(function(e,n){return x(x({},e),{position:n,absoluteRowIndex:n})});var r=(c-1)*m,t=c*m,o=0===r?0:n[r-1];return e.slice(o,t>n.length?e.length:n[t-1]).map(function(e,n){var r=e.nestedTable?e.absoluteRowIndex:S&&!C?o+n:n;return x(x({},e),{position:n,absoluteRowIndex:r})})},[c,m,C,S]);u(function(){if(0===L.current.size&&h.length>0){var e=new Map;h.forEach(function(n,r){var t=j(n.rowId);e.set(t,r)}),L.current=e}},[h]);var z=u(function(){return B(f,p)},[f,p,B]),q=u(function(){if(!v||0===v.length||!S||C)return v;var e=new Map;return z.forEach(function(n){n.nestedTable&&e.set(n.absoluteRowIndex,n.position)}),v.filter(function(n){return e.has(n[0])}).map(function(n){var r=n[1];return[e.get(n[0]),r]})},[v,z,S,C]),G=u(function(){if(q&&0!==q.length)return function(e,n,r,t){var o=n+t.rowSeparatorWidth,i=Array(e),a=new Map;r&&r.forEach(function(e){a.set(e[0],e[1])});for(var u=0,l=0;e>l;l++){i[l]=u,u+=o;var c=a.get(l);void 0!==c&&(u+=c)}return{rowTopPositions:i,totalHeight:u-t.rowSeparatorWidth}}(z.length,w,q,s)},[z.length,w,q,s]),V=u(function(){return void 0===o?z:ne({bufferRowCount:O,contentHeight:o,tableRows:z,rowHeight:w,scrollTop:I,scrollDirection:y,heightMap:G}).rendered.rows},[z,o,w,I,y,O,G]),K=u(function(){if(!d||void 0===o)return{stickyParents:[],regularRows:V,partiallyVisibleRows:[]};var e=ne({bufferRowCount:O,contentHeight:o,tableRows:z,rowHeight:w,scrollTop:I,scrollDirection:y,heightMap:G}),n=N?function(e,n,r,t,o){return oe({allTableRows:e,renderedRows:n,fullyVisibleRows:r,partiallyVisibleRows:t,partiallyVisibleRowIndex:0,recursionDepth:0,stickyParents:[],rowGrouping:o})}(z,e.rendered.rows,e.fullyVisible.rows,e.partiallyVisible.rows,N):{stickyParents:[],regularRows:e.rendered.rows,partiallyVisibleRows:[]};return x(x({},n),{partiallyVisibleRows:e.partiallyVisible.rows})},[O,o,z,d,G,N,w,y,I,V]),U=K.stickyParents,_=K.regularRows,J=K.partiallyVisibleRows,Y=l(function(e,n){var r=new Set(e.filter(function(e){return e&&e.rowId}).map(function(e){return j(e.rowId)})),t=new Set(n.filter(function(e){return e&&e.rowId}).map(function(e){return j(e.rowId)}));return{staying:n.filter(function(e){var n=j(e.rowId);return r.has(n)}),entering:n.filter(function(e){var n=j(e.rowId);return!r.has(n)}),leaving:e.filter(function(e){var n=j(e.rowId);return!t.has(n)})}},[]),X=u(function(){if(0===D.current.length)return!1;var e=z.filter(function(e){return e&&e.rowId}).map(function(e){return j(e.rowId)}),n=D.current.filter(function(e){return e&&e.rowId}).map(function(e){return j(e.rowId)});return e.length!==n.length||!e.every(function(e,r){return e===n[r]})},[z]);g(function(){if(!E){var e=function(){P.length>0&&A([])};if(!n||S)return e(),D.current=z,void(F.current=V);if(0===D.current.length)return e(),D.current=z,void(F.current=V);if(!X)return e(),D.current=z,void(F.current=V);W.current={tableRows:z,visibleRows:V},k(!0)}},[n,z,P.length,X,E,S,V]),g(function(){if(E&&W.current&&P.length>0){var e=setTimeout(function(){var e=W.current;k(!1),A([]),D.current=e.tableRows,F.current=e.visibleRows,W.current=null},fr.ROW_REORDER.duration+100);return function(){return clearTimeout(e)}}},[E,P.length]);var $=u(function(){if(!n||S)return V;if(P.length>0){var e=new Map,r=new Map;return z.forEach(function(n){var t=j(n.rowId);e.set(t,n.position),r.set(t,n.displayPosition)}),P.map(function(n){var t=j(n.rowId),o=e.get(t),i=r.get(t);return void 0!==o&&void 0!==i?x(x({},n),{position:o,displayPosition:i}):n})}return V},[V,P,z,n,S]),Q=l(function(e){if(n&&!S&&void 0!==o){var t=r(e),i=B(t,[]),a=ne({bufferRowCount:O,contentHeight:o,tableRows:i,rowHeight:w,scrollTop:I,scrollDirection:y,heightMap:G}),u=Y(V,a.rendered.rows).entering.map(function(e){var n=j(e.rowId)+"";return z.find(function(e){return j(e.rowId)+""===n})||e}).filter(Boolean);u.length>0&&A(R(R([],V,!0),u,!0))}},[n,S,r,B,o,w,I,y,Y,z,V,O,G]),Z=l(function(e){if(n&&!S&&void 0!==o){var r=t(e),i=B(r,[]),a=ne({bufferRowCount:O,contentHeight:o,tableRows:i,rowHeight:w,scrollTop:I,scrollDirection:y,heightMap:G}),u=Y(V,a.rendered.rows).entering.map(function(e){var n=j(e.rowId)+"";return z.find(function(e){return j(e.rowId)+""===n})||e}).filter(Boolean);u.length>0&&A(R(R([],V,!0),u,!0))}},[n,S,t,B,o,w,I,y,Y,z,V,O,G]);return{currentTableRows:z,currentVisibleRows:V,isAnimating:E,prepareForFilterChange:Q,prepareForSortChange:Z,rowsToRender:$,stickyParents:U,regularRows:_,partiallyVisibleRows:J,paginatedHeightOffsets:q,heightMap:G}}({allowAnimations:c,computeFilteredRowsPreview:uo,computeSortedRowsPreview:lo,contentHeight:co,currentPage:jr,customTheme:zn,enableStickyParents:te,flattenedRows:no,heightOffsets:ro,originalFlattenedRows:ao,paginatableRows:to,parentEndPositions:oo,rowGrouping:dn,rowHeight:Gn,rowsPerPage:pn,scrollDirection:wt,scrollTop:vt,serverSidePagination:In,shouldPaginate:Rn}),fo=so.currentTableRows,vo=so.rowsToRender,ho=so.prepareForFilterChange,po=so.prepareForSortChange,wo=so.isAnimating,mo=so.stickyParents,go=so.regularRows,bo=so.partiallyVisibleRows,xo=so.paginatedHeightOffsets,yo=so.heightMap,Io=a(new Map),Co=a(new Map),Ro=function(e){var n=e.selectableCells,r=e.headers,t=e.tableRows,c=e.onCellEdit,s=e.cellRegistry,d=e.collapsedHeaders,f=e.rowHeight,v=e.enableRowSelection,h=void 0!==v&&v,p=e.copyHeadersToClipboard,w=void 0!==p&&p,m=e.customTheme,g=i(new Set),b=g[0],x=g[1],y=i(new Set),R=y[0],S=y[1],M=i(null),N=M[0],H=M[1],E=i(null),k=E[0],T=E[1],P=i(new Set),A=P[0],D=P[1],F=i(new Set),O=F[0],L=F[1],W=i(!1),B=W[0],G=W[1],V=a(!1),K=a(null),U=u(function(){var e=new Set;return b.forEach(function(n){var r=n.split("-");if(r.length>=2){var t=parseInt(r[1],10);isNaN(t)||e.add(t)}}),R.forEach(function(n){e.add(n)}),e},[b,R]),_=u(function(){var e=new Set;return b.forEach(function(n){var r=n.split("-");if(r.length>=3){var t=r.slice(2).join("-");e.add(t)}}),R.size>0&&t.forEach(function(n){var r=j(n.rowId);e.add(r)}),e},[b,R,t]),Y=u(function(){return r.flatMap(function(e){return J(e,d)})},[r,d]),X=l(function(){if(0!==b.size){var e=function(e,n,r,t){void 0===t&&(t=!1);var o=n.filter(function(e){return!e.hide&&!e.excludeFromRender}),i=new Map,a=new Map;o.forEach(function(e,n){i.set(n,e.accessor),a.set(n,e)});var u=Array.from(e).reduce(function(e,n){var t,o=n.split("-").map(Number),u=o[0],l=o[1];e[u]||(e[u]=[]);var c=i.get(l),s=a.get(l);if(c&&(null===(t=r[u])||void 0===t?void 0:t.row)){var d=r[u].row,f=z(d,c);if(!1!==(null==s?void 0:s.useFormattedValueForClipboard)&&(null==s?void 0:s.valueFormatter)){var v=s.valueFormatter({accessor:c,colIndex:l,row:d,rowIndex:u,value:f});e[u][l]=v}else e[u][l]=!s||"lineAreaChart"!==s.type&&"barChart"!==s.type?f:Array.isArray(f)?f.join(", "):""}else e[u][l]="";return e},{}),l=new Set;t&&Array.from(e).forEach(function(e){var n=e.split("-").map(Number);l.add(n[1])});var c="";t&&l.size>0&&(c=Array.from(l).sort(function(e,n){return e-n}).map(function(e){var n,r=a.get(e);return null!==(n=null==r?void 0:r.label)&&void 0!==n?n:""}).join("\t"));var s=Object.values(u).map(function(e){return Object.values(e).join("\t")}).join("\n");return t&&c?"".concat(c,"\n").concat(s):s}(b,Y,t,w);navigator.clipboard.writeText(e),D(new Set(b)),setTimeout(function(){return D(new Set)},800)}},[b,Y,t,w]),$=l(function(){return I(void 0,void 0,void 0,function(){var e,n,r,o,i;return C(this,function(a){switch(a.label){case 0:if(!k)return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,navigator.clipboard.readText()];case 2:return(e=a.sent())?(n=function(e,n,r,t,o,i){var a=new Set,u=new Set,l=e.split("\n").filter(function(e){return e.length>0});if(0===l.length)return{updatedCells:a,warningCells:u};var c=r.filter(function(e){return!e.hide&&!e.excludeFromRender}),s=n.rowIndex,d=n.colIndex;return l.forEach(function(e,n){e.split("\t").forEach(function(e,r){var l=s+n,f=d+r;if(t.length>l&&c.length>f){var v=t[l],h=c[f],p=j(v.rowId);if(null==h?void 0:h.isEditable){var w=e;if("number"===h.type){var m=+e;isNaN(m)||(w=m)}else if("boolean"===h.type)w="true"===e.toLowerCase()||"1"===e;else if("date"===h.type){var g=new Date(e);isNaN(g.getTime())||(w=g)}else"lineAreaChart"!==h.type&&"barChart"!==h.type||(w=e.split(",").map(function(e){var n=+e.trim();return isNaN(n)?0:n}));if(q(v.row,h.accessor,w),i){var b="".concat(p,"-").concat(h.accessor),x=i.get(b);x&&x.updateContent(w)}null==o||o({accessor:h.accessor,newValue:w,row:v.row,rowIndex:l});var y="".concat(l,"-").concat(f,"-").concat(p);a.add(y)}else{var I="".concat(l,"-").concat(f,"-").concat(p);u.add(I)}}})}),{updatedCells:a,warningCells:u}}(e,k,Y,t,c,s),o=n.warningCells,(r=n.updatedCells).size>0&&(D(r),setTimeout(function(){return D(new Set)},800)),o.size>0&&(L(o),setTimeout(function(){return L(new Set)},800)),[3,4]):[2];case 3:return i=a.sent(),console.warn("Failed to paste from clipboard:",i),[3,4];case 4:return[2]}})})},[k,Y,t,c,s]),Q=l(function(){if(0!==b.size){var e=function(e,n,r,t,o){var i=new Set,a=new Set,u=n.filter(function(e){return!e.hide&&!e.excludeFromRender}),l=new Map;return u.forEach(function(e,n){l.set(n,e.accessor)}),Array.from(e).forEach(function(e){var n=e.split("-").map(Number),l=n[0],c=n[1];if(r.length>l&&u.length>c){var s=r[l],d=u[c],f=j(s.rowId);if(null==d?void 0:d.isEditable){var v;if(v="string"===d.type?"":"number"===d.type?null:"boolean"!==d.type&&("date"===d.type?null:"lineAreaChart"===d.type||"barChart"===d.type||Array.isArray(z(s.row,d.accessor))?[]:""),q(s.row,d.accessor,v),o){var h="".concat(f,"-").concat(d.accessor),p=o.get(h);p&&p.updateContent(v)}null==t||t({accessor:d.accessor,newValue:v,row:s.row,rowIndex:l}),i.add(e)}else a.add(e)}}),{deletedCells:i,warningCells:a}}(b,Y,t,c,s),n=e.deletedCells,r=e.warningCells;n.size>0&&(D(n),setTimeout(function(){return D(new Set)},800)),r.size>0&&(L(r),setTimeout(function(){return L(new Set)},800))}},[b,Y,t,c,s]),Z=l(function(e,n){for(var r=new Set,o=Math.min(e.rowIndex,n.rowIndex),i=Math.max(e.rowIndex,n.rowIndex),a=Math.min(e.colIndex,n.colIndex),u=Math.max(e.colIndex,n.colIndex),l=o;i>=l;l++)for(var c=a;u>=c;c++)if(l>=0&&t.length>l){if(h&&0===c)continue;var s=j(t[l].rowId);r.add(ue({colIndex:c,rowIndex:l,rowId:s}))}S(new Set),H(null),x(r),T(n),setTimeout(function(){return ae(n,f,m)},0)},[t,f,h,m]),ee=l(function(e){if(e.rowIndex>=0&&t.length>e.rowIndex&&e.colIndex>=0&&(h?Y.length:Y.length-1)>=e.colIndex){var n=ue(e);S(new Set),H(null),x(new Set([n])),T(e),setTimeout(function(){return ae(e,f,m)},0)}},[Y.length,t.length,f,h,m]),ne=l(function(e,n){void 0===n&&(n=!1),x(new Set),T(null),S(function(r){var t=new Set(n?r:[]);return e.forEach(function(e){return t.add(e)}),t}),e.length>0&&H(e[e.length-1])},[]);!function(e){var n=e.copyToClipboard,r=e.deleteSelectedCells,t=e.enableRowSelection,i=void 0!==t&&t,a=e.initialFocusedCell,u=e.leafHeaders,l=e.pasteFromClipboard,c=e.selectCellRange,s=e.selectSingleCell,d=e.selectableCells,f=e.selectedCells,v=e.setLastSelectedColumnIndex,h=e.setSelectedCells,p=e.setSelectedColumns,w=e.startCell,m=e.tableRows;o(function(){var e=function(e){if(d&&a&&0!==f.size){var c=document.activeElement;if(!(c instanceof HTMLInputElement||c instanceof HTMLTextAreaElement||c instanceof HTMLSelectElement||"true"===(null==c?void 0:c.getAttribute("contenteditable")))){var s=a.rowIndex,R=a.colIndex,S=a.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if((e.ctrlKey||e.metaKey)&&"v"===e.key)return e.preventDefault(),void l();if((e.ctrlKey||e.metaKey)&&"a"===e.key){e.preventDefault();for(var M=new Set,N=0;m.length>N;N++)for(var H=0;u.length>H;H++){var E=i?H+1:H,k=j(m[N].rowId);M.add("".concat(N,"-").concat(E,"-").concat(k))}return h(M),p(new Set),void v(null)}if("Delete"===e.key||"Backspace"===e.key)return e.preventDefault(),void r();var T=m[s];if((T?j(T.rowId):null)!==S){var P=m.findIndex(function(e){return j(e.rowId)===S});if(-1===P)return;s=P}var A=function(e,n,r){var t=e,o=n;return"up"===r?t=0:"down"===r?t=m.length-1:"left"===r?o=i?1:0:"right"===r&&(o=i?u.length:u.length-1),{rowIndex:t,colIndex:o}};"ArrowUp"===e.key?(e.preventDefault(),t(e,s,R,A)):"ArrowDown"===e.key?(e.preventDefault(),o(e,s,R,A)):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),g(e,s,R,A)):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),b(e,s,R,A)):"Home"===e.key?(e.preventDefault(),x(e,s)):"End"===e.key?(e.preventDefault(),y(e,s)):"PageUp"===e.key?(e.preventDefault(),I(e,s,R)):"PageDown"===e.key?(e.preventDefault(),C(e,s,R)):"Escape"===e.key&&(h(new Set),p(new Set),v(null),w.current=null)}else n()}}},t=function(e,n,r,t){if(e.shiftKey){w.current||(w.current=a);var o=n-1;if((e.ctrlKey||e.metaKey)&&(o=t(n,r,"up").rowIndex),o>=0){var i=j(m[o].rowId);c(w.current,{rowIndex:o,colIndex:r,rowId:i})}}else n>0&&(o=n-1,(e.ctrlKey||e.metaKey)&&(o=t(n,r,"up").rowIndex),i=j(m[o].rowId),s({rowIndex:o,colIndex:r,rowId:i}),w.current=null)},o=function(e,n,r,t){if(e.shiftKey){w.current||(w.current=a);var o=n+1;if((e.ctrlKey||e.metaKey)&&(o=t(n,r,"down").rowIndex),m.length>o){var i=j(m[o].rowId);c(w.current,{rowIndex:o,colIndex:r,rowId:i})}}else m.length-1>n&&(o=n+1,(e.ctrlKey||e.metaKey)&&(o=t(n,r,"down").rowIndex),i=j(m[o].rowId),s({rowIndex:o,colIndex:r,rowId:i}),w.current=null)},g=function(e,n,r,t){if(e.shiftKey&&"ArrowLeft"===e.key){w.current||(w.current=a);var o=r-1;if(e.ctrlKey||e.metaKey)o=t(n,r,"left").colIndex;else if(i&&0===o)return;if(o>=0){var u=j(m[n].rowId);c(w.current,{rowIndex:n,colIndex:o,rowId:u})}}else if(r>0){if(o=r-1,(e.ctrlKey||e.metaKey)&&"ArrowLeft"===e.key)o=t(n,r,"left").colIndex;else if(i&&0===o)return;0>o||(u=j(m[n].rowId),s({rowIndex:n,colIndex:o,rowId:u}),w.current=null)}},b=function(e,n,r,t){var o=i?u.length:u.length-1;if(e.shiftKey&&"ArrowRight"===e.key){w.current||(w.current=a);var l=r+1;if((e.ctrlKey||e.metaKey)&&(l=t(n,r,"right").colIndex),o>=l){var d=j(m[n].rowId);c(w.current,{rowIndex:n,colIndex:l,rowId:d})}}else o>r&&(l=r+1,(e.ctrlKey||e.metaKey)&&"ArrowRight"===e.key&&(l=t(n,r,"right").colIndex),l>o||(d=j(m[n].rowId),s({rowIndex:n,colIndex:l,rowId:d}),w.current=null))},x=function(e,n,r){if(e.shiftKey){w.current||(w.current=a);var t=n,o=i?1:0;(e.ctrlKey||e.metaKey)&&(t=0);var u=j(m[t].rowId);c(w.current,{rowIndex:t,colIndex:o,rowId:u})}else t=n,o=i?1:0,(e.ctrlKey||e.metaKey)&&(t=0),u=j(m[t].rowId),s({rowIndex:t,colIndex:o,rowId:u}),w.current=null},y=function(e,n,r){if(e.shiftKey){w.current||(w.current=a);var t=n,o=i?u.length:u.length-1;(e.ctrlKey||e.metaKey)&&(t=m.length-1);var l=j(m[t].rowId);c(w.current,{rowIndex:t,colIndex:o,rowId:l})}else t=n,o=i?u.length:u.length-1,(e.ctrlKey||e.metaKey)&&(t=m.length-1),l=j(m[t].rowId),s({rowIndex:t,colIndex:o,rowId:l}),w.current=null},I=function(e,n,r){var t=Math.max(0,n-10);if(e.shiftKey){w.current||(w.current=a);var o=j(m[t].rowId);c(w.current,{rowIndex:t,colIndex:r,rowId:o})}else o=j(m[t].rowId),s({rowIndex:t,colIndex:r,rowId:o}),w.current=null},C=function(e,n,r){var t=Math.min(m.length-1,n+10);if(e.shiftKey){w.current||(w.current=a);var o=j(m[t].rowId);c(w.current,{rowIndex:t,colIndex:r,rowId:o})}else o=j(m[t].rowId),s({rowIndex:t,colIndex:r,rowId:o}),w.current=null};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[d,a,m,u,s,c,f,h,p,v,n,l,r,w,i])}({selectableCells:n,initialFocusedCell:k,tableRows:t,leafHeaders:Y,selectSingleCell:ee,selectCellRange:Z,selectedCells:b,setSelectedCells:x,setSelectedColumns:S,setLastSelectedColumnIndex:H,copyToClipboard:X,pasteFromClipboard:$,deleteSelectedCells:Q,startCell:K,enableRowSelection:h});var re=l(function(e,n){var r=new Set,o=new Map;t.forEach(function(e,n){var r=j(e.rowId);o.set(r,n)});for(var i=o.get(e.rowId+""),a=o.get(n.rowId+""),u=void 0!==i?i:e.rowIndex,l=void 0!==a?a:n.rowIndex,c=Math.min(u,l),s=Math.max(u,l),d=Math.min(e.colIndex,n.colIndex),f=Math.max(e.colIndex,n.colIndex),v=c;s>=v;v++)for(var p=d;f>=p;p++)if(v>=0&&t.length>v){if(h&&0===p)continue;var w=j(t[v].rowId);r.add(ue({colIndex:p,rowIndex:v,rowId:w}))}x(r)},[t,h]),te=l(function(e,n){var r=document.querySelector(".st-body-container");if(!r)return null;var t=r.getBoundingClientRect(),o=Array.from(document.querySelectorAll(".st-cell[data-row-index][data-col-index]:not(.st-selection-cell)"));if(0===o.length)return null;var i=Math.max(t.left,Math.min(t.right,e)),a=Math.max(t.top,Math.min(t.bottom,n)),u=null,l=1/0;if(o.forEach(function(e){if(e instanceof HTMLElement){var n=e,r=n.getBoundingClientRect(),t=r.top+r.height/2,o=Math.sqrt(Math.pow(r.left+r.width/2-i,2)+Math.pow(t-a,2));l>o&&(l=o,u=n)}}),null!==u){var c=u,s=parseInt(c.getAttribute("data-row-index")||"-1",10),d=parseInt(c.getAttribute("data-col-index")||"-1",10),f=c.getAttribute("data-row-id");if(s>=0&&d>=0&&null!==f)return{rowIndex:s,colIndex:d,rowId:f}}return null},[]),oe=l(function(e,n){var r=document.elementFromPoint(e,n);if(!r)return null;var t=r.closest(".st-cell");if(t instanceof HTMLElement){var o=parseInt(t.getAttribute("data-row-index")||"-1",10),i=parseInt(t.getAttribute("data-col-index")||"-1",10),a=t.getAttribute("data-row-id");if(o>=0&&i>=0&&null!==a)return{rowIndex:o,colIndex:i,rowId:a}}return te(e,n)},[te]),ie=l(function(e,n){var r=document.querySelector(".st-body-container");if(r){var t=r.getBoundingClientRect();t.top+50>n?r.scrollTop-=10*Math.min(3,1+Math.max(0,t.top-n)/100):n>t.bottom-50&&(r.scrollTop+=10*Math.min(3,1+Math.max(0,n-t.bottom)/100));var o=document.querySelector(".st-body-main");o&&(t.left+50>e?o.scrollLeft-=10*Math.min(3,1+Math.max(0,t.left-e)/100):e>t.right-50&&(o.scrollLeft+=10*Math.min(3,1+Math.max(0,e-t.right)/100)))}},[]),le=l(function(e){var n=e.colIndex,r=ue({colIndex:n,rowIndex:e.rowIndex,rowId:e.rowId}),t=b.has(r),o=R.has(n);return t||o},[b,R]),ce=l(function(e){var n=e.colIndex,r=e.rowIndex,o=e.rowId;if(B)return"";var i=[],a=t[r-1],u=a?j(a.rowId):null,l=t[r+1],c=l?j(l.rowId):null,s=null!==u?{colIndex:n,rowIndex:r-1,rowId:u}:null,d=null!==c?{colIndex:n,rowIndex:r+1,rowId:c}:null,f={colIndex:n-1,rowIndex:r,rowId:o},v={colIndex:n+1,rowIndex:r,rowId:o};return(!s||!le(s)||R.has(n)&&0===r)&&i.push("st-selected-top-border"),(!d||!le(d)||R.has(n)&&r===t.length-1)&&i.push("st-selected-bottom-border"),le(f)||i.push("st-selected-left-border"),le(v)||i.push("st-selected-right-border"),i.join(" ")},[B,le,t,R]),se=u(function(){return k?function(e){return e.rowIndex===k.rowIndex&&e.colIndex===k.colIndex&&e.rowId===k.rowId}:function(){return!1}},[k]),de=l(function(e){var n=ue({colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId});return A.has(n)},[A]),fe=l(function(e){var n=ue({colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId});return O.has(n)},[O]);return{getBorderClass:ce,handleMouseDown:function(e){var r=e.colIndex,t=e.rowIndex,o=e.rowId;if(n){V.current=!0,G(!0),K.current={rowIndex:t,colIndex:r,rowId:o},setTimeout(function(){S(new Set),H(null);var e=ue({colIndex:r,rowIndex:t,rowId:o});x(new Set([e])),T({rowIndex:t,colIndex:r,rowId:o})},0);var i=null,a=null,u=null,l=0,c=function(){if(V.current&&K.current){if(null!==i&&null!==a){ie(i,a);var e=Date.now();if(e-l>=16){var n=oe(i,a);n&&re(K.current,n),l=e}}u=requestAnimationFrame(c)}else null!==u&&(cancelAnimationFrame(u),u=null)},s=function(e){V.current&&K.current&&(i=e.clientX,a=e.clientY)},d=function(){V.current=!1,G(!1),null!==u&&(cancelAnimationFrame(u),u=null),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",d),u=requestAnimationFrame(c)}},handleMouseOver:function(e){n&&V.current&&K.current&&re(K.current,{colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId})},isCopyFlashing:de,isWarningFlashing:fe,isInitialFocusedCell:se,isSelected:le,lastSelectedColumnIndex:N,pasteFromClipboard:$,selectColumns:ne,selectedCells:b,selectedColumns:R,setInitialFocusedCell:T,setSelectedCells:x,setSelectedColumns:S,deleteSelectedCells:Q,columnsWithSelectedCells:U,rowsWithSelectedCells:_,startCell:K}}({selectableCells:mn,headers:dt,tableRows:fo,onCellEdit:_e,cellRegistry:Io.current,collapsedHeaders:ct,rowHeight:Gn,enableRowSelection:ee,copyHeadersToClipboard:F,customTheme:zn}),So=Ro.getBorderClass,Mo=Ro.handleMouseDown,No=Ro.handleMouseOver,Ho=Ro.isCopyFlashing,Eo=Ro.isInitialFocusedCell,ko=Ro.isSelected,To=Ro.isWarningFlashing,Po=Ro.selectColumns,Ao=Ro.selectedCells,Do=Ro.selectedColumns,Fo=Ro.setInitialFocusedCell,Oo=Ro.setSelectedCells,Lo=Ro.setSelectedColumns,Wo=Ro.columnsWithSelectedCells,Bo=Ro.rowsWithSelectedCells,zo=Ro.startCell,qo=l(function(e){po(e),setTimeout(function(){Qt({accessor:e})},0)},[po,Qt]),Go=l(function(e){Jr(e)},[]);!function(e){var n=e.selectableColumns,r=e.selectedCells,t=e.selectedColumns,i=e.setSelectedCells,a=e.setSelectedColumns,u=e.activeHeaderDropdown,l=e.setActiveHeaderDropdown,c=e.startCell;o(function(){var e=function(e){var o=e.target;o.closest(".editable-cell-input")&&o.closest(".st-header-cell")||(u&&l&&(o.closest(".st-header-cell")||o.closest(".dropdown-content")||l(null)),o.closest(".st-cell")||n&&(o.classList.contains("st-header-cell")||o.classList.contains("st-header-label")||o.classList.contains("st-header-label-text"))||(r.size>0&&i(new Set),t.size>0&&a(new Set),c&&(c.current=null)))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[n,r,t,i,a,u,l,c])}({selectableColumns:bn,selectedCells:Ao,selectedColumns:Do,setSelectedCells:Oo,setSelectedColumns:Lo,activeHeaderDropdown:rt,setActiveHeaderDropdown:tt,startCell:zo}),function(e){var n=e.forceUpdate,r=e.tableBodyContainerRef,t=e.setScrollbarWidth;g(function(){var e=function(){n(),r.current&&t(r.current.offsetWidth-r.current.clientWidth)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[n,r,t])}({forceUpdate:dr,tableBodyContainerRef:rr,setScrollbarWidth:zr}),function(e){var n=e.onGridReady;o(function(){null==n||n()},[n])}({onGridReady:Ze}),function(e){var n=e.cellRegistryRef,r=e.clearAllFilters,t=e.clearFilter,i=e.currentPage,a=e.editColumns,u=e.expandedDepths,l=e.filters,c=e.flattenedRows,s=e.headerRegistryRef,d=e.headers,f=e.includeHeadersInCSVExport,v=e.onColumnVisibilityChange,h=e.onPageChange,p=e.paginatableRows,w=e.quickFilter,m=e.rowGrouping,g=e.rows,b=e.rowsPerPage,y=e.setCollapsedRows,S=e.setColumnEditorOpen,M=e.setCurrentPage,N=e.setExpandedDepths,H=e.setExpandedRows,E=e.setHeaders,k=e.sort,T=e.tableRef,P=e.totalRowCount,A=e.updateFilter,D=e.updateSort,F=e.visibleRows;o(function(){T&&(T.current={updateData:function(e){var r=e.accessor,t=e.rowIndex,o=e.newValue,i=null==g?void 0:g[t];if(i){var a=c.find(function(e){return e.absoluteRowIndex===t});if(a){var u=j(a.rowId),l=O({rowId:u,accessor:r}),s=n.current.get(l);s&&s.updateContent(o)}void 0!==z(i,r)&&q(i,r,o)}},setHeaderRename:function(e){var n=s.current.get(e.accessor+"");n&&n.setEditing(!0)},getVisibleRows:function(){return F},getAllRows:function(){return c},getHeaders:function(){return d},exportToCSV:function(e){!function(e,n,r,t){void 0===t&&(t=!0);var o=function(e,n,r){void 0===r&&(r=!0);var t=function(e){var n=[],r=function(e){for(var t=0,o=e;o.length>t;t++){var i=o[t];i.hide||i.isSelectionColumn||i.excludeFromCsv||(i.children&&i.children.length>0?(i.singleRowChildren&&n.push(i),r(i.children)):n.push(i))}};return r(e),n}(n),o=t.map(function(e){return cr(e.label)}).join(","),i=e.map(function(e,n){var r=e.row;return t.map(function(e,t){var o=z(r,e.accessor);if(e.exportValueGetter){var i=e.valueFormatter?e.valueFormatter({accessor:e.accessor,colIndex:t,row:r,rowIndex:n,value:o}):void 0,a=e.exportValueGetter({accessor:e.accessor,colIndex:t,row:r,rowIndex:n,value:o,formattedValue:i});return cr(a)}return!1!==e.useFormattedValueForCSV&&e.valueFormatter?(i=e.valueFormatter({accessor:e.accessor,colIndex:t,row:r,rowIndex:n,value:o}),cr(i)):cr(o)}).join(",")});return(r?R([o],i,!0):i).join("\n")}(e,n,t);!function(e,n){void 0===n&&(n="table-export.csv");var r=new Blob([e],{type:"text/csv;charset=utf-8;"}),t=document.createElement("a"),o=URL.createObjectURL(r);t.setAttribute("href",o),t.setAttribute("download",n),t.style.visibility="hidden",document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(o)}(o,r)}(c,d,(void 0===e?{}:e).filename,f)},getSortState:function(){return k},applySortState:sr(D),getFilterState:function(){return l},applyFilter:sr(A),clearFilter:sr(t),clearAllFilters:sr(r),getCurrentPage:function(){return i},getTotalPages:function(){return Math.ceil((null!=P?P:p.length)/b)},setPage:function(e){return I(void 0,void 0,void 0,function(){var n;return C(this,function(r){switch(r.label){case 0:return n=Math.ceil((null!=P?P:p.length)/b),1>e||e>n?[3,2]:(M(e),h?[4,h(e)]:[3,2]);case 1:r.sent(),r.label=2;case 2:return[2]}})})},expandAll:function(){var e=Array.from({length:(null==m?void 0:m.length)||0},function(e,n){return n});N(new Set(e)),H(new Map),y(new Map)},collapseAll:function(){N(new Set),H(new Map),y(new Map)},expandDepth:function(e){N(function(n){for(var r=new Set(n),t=0;e>=t;t++)r.add(t);return r}),H(function(n){var r=new Map(n);return Array.from(r.entries()).forEach(function(n){n[1]===e&&r.delete(n[0])}),r}),y(function(n){var r=new Map(n);return Array.from(r.entries()).forEach(function(n){n[1]===e&&r.delete(n[0])}),r})},collapseDepth:function(e){N(function(n){var r=new Set(n);return r.delete(e),r}),H(function(n){var r=new Map(n);return Array.from(r.entries()).forEach(function(n){n[1]===e&&r.delete(n[0])}),r}),y(function(n){var r=new Map(n);return Array.from(r.entries()).forEach(function(n){n[1]===e&&r.delete(n[0])}),r})},toggleDepth:function(e){N(function(n){var r=new Set(n);return r.has(e)?r.delete(e):r.add(e),r}),H(function(n){var r=new Map(n);return Array.from(r.entries()).forEach(function(n){n[1]===e&&r.delete(n[0])}),r}),y(function(n){var r=new Map(n);return Array.from(r.entries()).forEach(function(n){n[1]===e&&r.delete(n[0])}),r})},setExpandedDepths:function(e){N(e)},getExpandedDepths:function(){return u},getGroupingProperty:function(e){return null==m?void 0:m[e]},getGroupingDepth:function(e){var n;return null!==(n=null==m?void 0:m.indexOf(e))&&void 0!==n?n:-1},toggleColumnEditor:function(e){a&&S(void 0!==e?e:function(e){return!e})},applyColumnVisibility:sr(function(e){var n=function(r){return r.map(function(r){var t=r.accessor+"",o=t in e;return x(x({},r),{hide:o?!e[t]:r.hide,children:r.children?n(r.children):r.children})})};E(function(e){return n(e)}),v&&v(e)}),setQuickFilter:function(e){(null==w?void 0:w.onChange)&&w.onChange(e)}})},[n,r,t,i,a,u,l,c,s,d,f,v,h,p,w,m,e.rowIndexMap,g,b,e.serverSidePagination,y,S,M,N,H,E,e.setRows,e.shouldPaginate,k,T,P,A,D,F])}({cellRegistryRef:Io,clearAllFilters:Jt,clearFilter:_t,currentPage:jr,editColumns:K,expandedDepths:bt,filters:Kt,flattenedRows:no,headerRegistryRef:Co,headers:dt,includeHeadersInCSVExport:Oe,onColumnVisibilityChange:Xe,onPageChange:tn,paginatableRows:to,quickFilter:cn,rowGrouping:dn,rowIndexMap:Nr,rows:Gr,rowsPerPage:pn,serverSidePagination:In,setCollapsedRows:Mt,setColumnEditorOpen:at,setCurrentPage:Kr,setExpandedDepths:xt,setExpandedRows:Ct,setHeaders:Jr,setRows:Ir,shouldPaginate:Rn,sort:$t,tableRef:En,totalRowCount:Pn,updateFilter:Ut,updateSort:Qt,visibleRows:vo}),function(e){var n=e.filters,r=e.onFilterChange;o(function(){null==r||r(n)},[n,r])}({filters:Kt,onFilterChange:Qe}),function(e){var n=e.sort,r=e.onSortChange,t=Ke(n);o(function(){!n||(null==t?void 0:t.key.accessor)===n.key.accessor&&(null==t?void 0:t.direction)===n.direction?!n&&t&&(null==r||r(null)):null==r||r(n)},[n,t,r])}({sort:$t,onSortChange:un});var Vo=l(function(e){ho(e),setTimeout(function(){Ut(e)},0)},[ho,Ut]),jo=!Rr&&0===fo.length;return e(ce,x({value:{activeHeaderDropdown:rt,allowAnimations:c,areAllRowsSelected:Tr,autoExpandColumns:d,canExpandRowGroup:f,cellRegistry:Io.current,cellUpdateFlash:h,clearSelection:Lr,collapsedHeaders:ct,columnBorders:m,columnReordering:k,columnResizing:A,columnsWithSelectedCells:Wo,copyHeadersToClipboard:F,draggedHeaderRef:Jn,editColumns:K,emptyStateRenderer:X,enableHeaderEditing:Q,enableRowSelection:ee,errorStateRenderer:ie,expandedDepths:bt,filters:Kt,icons:Bn,forceUpdate:dr,getBorderClass:So,handleApplyFilter:Vo,handleClearAllFilters:Jt,handleClearFilter:_t,handleMouseDown:Mo,handleMouseOver:No,handleRowSelect:Dr,handleSelectAll:Fr,handleToggleRow:Or,headerContainerRef:tr,headerDropdown:Ne,headerHeight:Vn,headerRegistry:Co.current,headers:dt,heightOffsets:xo,hoveredHeaderRef:Qn,includeHeadersInCSVExport:Oe,isAnimating:wo,isCopyFlashing:Ho,isInitialFocusedCell:Eo,isLoading:Rr,isResizing:Xr,isRowSelected:kr,isScrolling:Zr,isSelected:ko,isWarningFlashing:To,loadingStateRenderer:Ge,mainBodyRef:Zn,maxHeaderDepth:At,onCellClick:Ue,onCellEdit:_e,onColumnOrderChange:Je,onColumnSelect:Ye,onColumnVisibilityChange:Xe,onColumnWidthChange:$e,onHeaderEdit:en,onLoadMore:nn,onRowGroupExpand:on,onSort:qo,onTableHeaderDragEnd:Go,pinnedLeftRef:er,pinnedRightRef:nr,rowButtons:sn,rowGrouping:dn,rowHeight:Gn,rowStateMap:hr,rows:yr,rowsWithSelectedCells:Bo,scrollbarWidth:Br,selectColumns:Po,selectableColumns:bn,selectedColumns:Do,selectedRowCount:Pr,selectedRows:Hr,selectedRowsData:Ar,setActiveHeaderDropdown:tt,setCollapsedHeaders:st,setHeaders:Jr,setInitialFocusedCell:Fo,setIsResizing:$r,setIsScrolling:et,setRowStateMap:pr,setSelectedCells:Oo,setSelectedColumns:Lo,setSelectedRows:Er,setExpandedDepths:xt,setExpandedRows:Ct,setCollapsedRows:Mt,shouldPaginate:Rn,tableBodyContainerRef:rr,tableEmptyStateRenderer:Hn,tableRows:fo,theme:Tn,customTheme:zn,expandedRows:It,collapsedRows:St,useHoverRowBackground:Dn,useOddColumnBackground:On,useOddEvenRowBackground:Wn}},{children:r("div",x({className:"simple-table-root st-wrapper theme-".concat(Tn," ").concat(null!=p?p:""," ").concat(m?"st-column-borders":""),role:"grid",style:Ve?{maxHeight:Ve,height:void 0===co?"auto":Ve}:Ee?{height:Ee}:{}},{children:[e(ir,{children:r("div",x({className:"st-wrapper-container"},{children:[r("div",x({className:"st-content-wrapper"},{children:[e(Un,{calculatedHeaderHeight:Pt,hideHeader:Ae,pinnedLeftWidth:Wt,pinnedRightWidth:Bt,setScrollTop:ht,setScrollDirection:mt,shouldShowEmptyState:jo,sort:$t,tableRows:fo,rowsToRender:vo,stickyParents:mo,regularRows:go,partiallyVisibleRows:bo,heightMap:yo}),e(or,{columnEditorText:qn.text,editColumns:K,headers:_r,open:it,searchEnabled:qn.searchEnabled,searchPlaceholder:qn.searchPlaceholder,searchFunction:qn.searchFunction,setOpen:at})]})),!jo&&e(_n,{mainBodyRef:Zn,mainBodyWidth:Lt,pinnedLeftWidth:Wt,pinnedRightWidth:Bt,pinnedLeftContentWidth:zt,pinnedRightContentWidth:qt,tableBodyContainerRef:rr}),!jo&&e(de,{currentPage:jr,footerRenderer:Se,hideFooter:Te,onPageChange:Kr,onNextPage:rn,onUserPageChange:tn,rowsPerPage:pn,shouldPaginate:Rn,totalPages:Math.ceil((null!=Pn?Pn:to.length)/pn),totalRows:null!=Pn?Pn:to.length})]}))}),e("div",x({"aria-live":"polite","aria-atomic":"true",className:"st-sr-only"},{children:Ht}))]}))}))},Rr=function(n){var t=n.data,o=n.width,i=void 0===o?"100%":o,a=n.height,u=void 0===a?30:a,l=n.color,c=n.fillColor,s=n.fillOpacity,d=void 0===s?.2:s,f=n.strokeWidth,v=void 0===f?2:f,h=n.className,p=void 0===h?"":h,w=n.min,m=n.max;if(!t||0===t.length)return null;var g=void 0!==w?w:Math.min.apply(Math,t),b=(void 0!==m?m:Math.max.apply(Math,t))-g||1,y=u,I=t.map(function(e,n){return{x:n/(t.length-1)*100,y:y-(e-g)/b*y}}).map(function(e,n){return"".concat(0===n?"M":"L"," ").concat(e.x,",").concat(e.y)}).join(" "),C="\n ".concat(I,"\n L ").concat(100,",").concat(y,"\n L 0,").concat(y,"\n Z\n ");return r("svg",x({width:i,height:u,viewBox:"0 0 100 ".concat(y),preserveAspectRatio:"none",className:"st-line-area-chart ".concat(p),style:{display:"block"}},{children:[e("path",{d:C,fill:c||"var(--st-chart-fill-color)",fillOpacity:d,stroke:"none",vectorEffect:"non-scaling-stroke"}),e("path",{d:I,fill:"none",stroke:l||"var(--st-chart-color)",strokeWidth:v,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]}))},Sr=Object.freeze({__proto__:null,default:Rr}),Mr=function(n){var r=n.data,t=n.width,o=void 0===t?"100%":t,i=n.height,a=void 0===i?30:i,u=n.color,l=n.gap,c=void 0===l?2:l,s=n.className,d=void 0===s?"":s,f=n.min,v=n.max;if(!r||0===r.length)return null;var h=void 0!==f?f:Math.min.apply(Math,r),p=void 0!==v?v:Math.max.apply(Math,r),w=p-h||1,m=a,g=(100-c*(r.length-1))/r.length,b=0>h,y=b?m*(p/w):m;return e("svg",x({width:o,height:a,viewBox:"0 0 100 ".concat(m),preserveAspectRatio:"none",className:"st-bar-chart ".concat(d),style:{display:"block"}},{children:r.map(function(n,r){var t=r*(g+c),o=(n-h)/w*m,i=m-o,a=o;return b&&(0>n?(a=Math.abs(n)/w*m,i=y):i=y-(a=n/w*m)),e("rect",{x:t,y:i,width:g,height:a,fill:u||"var(--st-chart-color)",rx:1},r)})}))},Nr=Object.freeze({__proto__:null,default:Mr});export{fr as A,Mr as B,me as C,gr as D,xe as F,Rr as L,S as R,Ir as S,y as _,Ke as a,x as b,M as c,wr as d,br as e,pr as f,xr as g,fe as h,ve as i,he as j,pe as k,we as l,ge as m,be as n,ye as o,j as r,se as u};
2
+ //# sourceMappingURL=index-8220459f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-8220459f.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.es.js CHANGED
@@ -1,2 +1,2 @@
1
- export{h as AngleDownIcon,i as AngleLeftIcon,j as AngleRightIcon,k as AngleUpIcon,l as AscIcon,B as BarChart,C as CheckIcon,g as DEFAULT_COLUMN_EDITOR_CONFIG,e as DEFAULT_CUSTOM_THEME,D as DefaultEmptyState,m as DescIcon,n as DragIcon,F as FilterIcon,L as LineAreaChart,o as SelectIcon,S as SimpleTable,r as rowIdToString}from"./index-4950c0c9.js";import"react/jsx-runtime";import"react";
1
+ export{h as AngleDownIcon,i as AngleLeftIcon,j as AngleRightIcon,k as AngleUpIcon,l as AscIcon,B as BarChart,C as CheckIcon,g as DEFAULT_COLUMN_EDITOR_CONFIG,e as DEFAULT_CUSTOM_THEME,D as DefaultEmptyState,m as DescIcon,n as DragIcon,F as FilterIcon,L as LineAreaChart,o as SelectIcon,S as SimpleTable,r as rowIdToString}from"./index-8220459f.js";import"react/jsx-runtime";import"react";
2
2
  //# sourceMappingURL=index.es.js.map