simple-table-core 1.7.9 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/Animate-e97fe73d.js +2 -0
  2. package/dist/Animate-e97fe73d.js.map +1 -0
  3. package/dist/{DatePicker-9d58037e.js → DatePicker-ed669353.js} +2 -2
  4. package/dist/DatePicker-ed669353.js.map +1 -0
  5. package/dist/cjs/Animate-d94e8d9d.js +2 -0
  6. package/dist/cjs/Animate-d94e8d9d.js.map +1 -0
  7. package/dist/cjs/{DatePicker-4e57944d.js → DatePicker-4b10bbd8.js} +2 -2
  8. package/dist/cjs/DatePicker-4b10bbd8.js.map +1 -0
  9. package/dist/cjs/components/LazyComponents.d.ts +14 -0
  10. package/dist/cjs/components/charts/BarChart.d.ts +17 -0
  11. package/dist/cjs/components/charts/LineAreaChart.d.ts +19 -0
  12. package/dist/cjs/index-d578a077.js +2 -0
  13. package/dist/cjs/index-d578a077.js.map +1 -0
  14. package/dist/cjs/index.d.ts +5 -3
  15. package/dist/cjs/index.js +1 -1
  16. package/dist/cjs/styles.css +1 -1
  17. package/dist/cjs/types/HeaderObject.d.ts +13 -1
  18. package/dist/components/LazyComponents.d.ts +14 -0
  19. package/dist/components/charts/BarChart.d.ts +17 -0
  20. package/dist/components/charts/LineAreaChart.d.ts +19 -0
  21. package/dist/index-2bf0d1e9.js +2 -0
  22. package/dist/index-2bf0d1e9.js.map +1 -0
  23. package/dist/index.d.ts +5 -3
  24. package/dist/index.es.js +1 -1
  25. package/dist/styles.css +1 -1
  26. package/dist/types/HeaderObject.d.ts +13 -1
  27. package/package.json +1 -1
  28. package/src/styles/themes/dark.css +4 -0
  29. package/src/styles/themes/frost.css +4 -0
  30. package/src/styles/themes/light.css +4 -0
  31. package/src/styles/themes/neutral.css +4 -0
  32. package/src/styles/themes/sky.css +4 -0
  33. package/src/styles/themes/violet.css +5 -1
  34. package/dist/Animate-6e505e05.js +0 -2
  35. package/dist/Animate-6e505e05.js.map +0 -1
  36. package/dist/DatePicker-9d58037e.js.map +0 -1
  37. package/dist/cjs/Animate-69de29e9.js +0 -2
  38. package/dist/cjs/Animate-69de29e9.js.map +0 -1
  39. package/dist/cjs/DatePicker-4e57944d.js.map +0 -1
  40. package/dist/cjs/index-6e0a3bca.js +0 -2
  41. package/dist/cjs/index-6e0a3bca.js.map +0 -1
  42. package/dist/index-c670ccb7.js +0 -2
  43. package/dist/index-c670ccb7.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 w,useImperativeHandle as p,isValidElement as m,useLayoutEffect as g,useReducer as b}from"react";var I=function(){return I=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},I.apply(this,arguments)};function C(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 y(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 x(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=5,N=function(e){return 480>e?.3:768>e?.4:.8},A="parentExpanded",M=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},k=function(e){return e.flatMap(function(e){var n=[e];return e.children&&e.children.length>0&&n.push.apply(n,k(e.children)),n})},E=function(e){return void 0===e&&(e=0),e?e+1:0},H=function(e){var n=e.accessor;return"".concat(e.rowId,"-").concat(n)},T=function(e){var n=e.header,r=e.pinned,t=e.headers,o=e.collapsedHeaders;return n.hide||(r||n.pinned)&&n.pinned!==r?null:!(t&&o&&function(e,n,r){var t=function(e,n){for(var r=0,t=k(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||A;return o?"parentExpanded"===i:"parentCollapsed"===i}return!1}(n,t,o))||null},F=function(e){var n=e.accessor;return"".concat(e.rowId,"-").concat(n)},D=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||A;return"parentCollapsed"===n||"always"===n}).flatMap(function(e){return D(e,n)}):e.children.filter(function(e){var n=e.showWhen||A;return"parentExpanded"===n||"always"===n}).flatMap(function(e){return D(e,n)}):[e]},O=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(H({accessor:e.accessor,rowId:"header"}));return(null==n?void 0:n.offsetWidth)||150},L=function(e){var n,r=e.width;"string"==typeof r&&r.includes("fr")&&(e.width=(null===(n=document.getElementById(H({accessor:e.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.length>0&&e.children.forEach(function(e){L(e)})},P=function(e){return"number"==typeof e.minWidth?e.minWidth:40},B=function(e,n){return n.includes(".")?(n+"").split(".").reduce(function(e,n){return null==e?void 0:e[n]},e):e[n]},W=function(e,n,r){if("string"!=typeof n||n.includes(".")){for(var t=(n+"").split("."),o=e,i=0;t.length-1>i;i++){var a=t[i];null!=o[a]&&"object"==typeof o[a]||(o[a]={}),o=o[a]}o[t[t.length-1]]=r}else e[n]=r},q=function(e){return Array.isArray(e)&&e.length>0&&"object"==typeof e[0]&&null!==e[0]},z=function(e){return e.row[e.rowIdAccessor]},j=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)}},_=function(e,n){var r=document.querySelector(".st-body-container"),t=document.querySelector(".st-body-main");if(r){var o=n+1,i=document.querySelector('.st-cell[data-row-index="'.concat(e.rowIndex,'"][data-col-index="').concat(e.colIndex,'"][data-row-id="').concat(e.rowId,'"]'));if(!i)return r.scrollTop=Math.max(0,e.rowIndex*o-r.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&&j(n,r,t)},100);j(i,r,t)}},U=function(e){var n=e.colIndex,r=e.rowId;return"".concat(e.rowIndex,"-").concat(n,"-").concat(r)},G=c(void 0),K=function(n){return e(G.Provider,I({value:n.value},{children:n.children}))},J=function(){var e=s(G);if(void 0===e)throw Error("useTableContext must be used within a TableProvider");return e},V=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,w=J(),p=w.nextIcon,m=w.prevIcon,g=i(!0),b=g[0],C=g[1],R=o>1,S=v>o,N=o===v,A=Math.min((o-1)*d+1,h),M=Math.min(o*d,h),k=!R,E=!S&&!c||!b&&N,H=function(){return y(void 0,void 0,void 0,function(){var e;return x(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]}})})},T=function(){return y(void 0,void 0,void 0,function(){var e,n;return x(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 C(!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]}})})},F=function(e){return y(void 0,void 0,void 0,function(){return x(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:A,endRow:M,onPageChange:F,onNextPage:T,onPrevPage:H,hasNextPage:!E,hasPrevPage:!k,nextIcon:p,prevIcon:m})});var D=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);for(var t=e;n>=t;t++)r.push(t);return v-1>n&&(r.push(-1),r.push(v)),r}();return r("div",I({className:"st-footer"},{children:[e("div",I({className:"st-footer-info"},{children:r("span",I({className:"st-footer-results-text"},{children:["Showing ",A," to ",M," of ",h.toLocaleString()," results"]}))})),r("div",I({className:"st-footer-pagination"},{children:[D.map(function(n,r){return 0>n?e("span",I({className:"st-page-ellipsis"},{children:"..."}),r):e("button",I({onClick:function(){return F(n)},className:"st-page-btn ".concat(o===n?"active":"")},{children:n}),r)}),e("button",I({className:"st-next-prev-btn ".concat(k?"disabled":""),onClick:H,disabled:k},{children:m})),e("button",I({className:"st-next-prev-btn ".concat(E?"disabled":""),onClick:T,disabled:E},{children:p}))]}))]}))},X=function(n){return e("svg",I({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"})}))},Y=function(n){return e("svg",I({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"})}))},$=function(n){return e("svg",I({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"})}))},Z=function(n){return e("svg",I({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"})}))},Q=function(n){return e("svg",I({"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"})}))},ee=function(n){return e("svg",I({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:n.className,style:I({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"})}))},ne=function(n){return e("svg",I({"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"})}))},re=function(n){return e("svg",I({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:n.className,style:I({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"})}))},te=function(){return e("svg",I({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"})}))},oe=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}},ie=function(e){var n=e.bufferRowCount,r=e.scrollTop,t=e.tableRows,o=e.rowHeight+1,i=r+e.contentHeight+o*n;return t.slice(Math.max(0,Math.floor(Math.max(0,r-o*n)/o)),Math.min(t.length,Math.ceil(i/o)))},ae=function(e){return e.position*(e.rowHeight+1)-1},ue=function(e){return e.position*(e.rowHeight+1)},le=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,w=J().mainBodyRef,p=a(null),m=a(null),g=i("bottom-left"),b=g[0],C=g[1],y=i({}),x=y[0],R=y[1],S=i(!1),N=S[0],A=S[1];return o(function(){u&&p.current?(A(!1),!m.current&&p.current.parentElement&&(m.current=p.current.parentElement),requestAnimationFrame(function(){if(p.current&&m.current){var e,n=p.current,r=m.current.getBoundingClientRect(),t=n.offsetHeight,o=d||n.offsetWidth,i=(e=(null==f?void 0:f.current)?f.current.getBoundingClientRect():(null==w?void 0:w.current)?w.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),C("".concat(u,"-").concat(c)),R(l),A(!0)}})):u||A(!1)},[u,d,f,w,h]),o(function(){var e=function(e){u&&p.current&&p.current&&!p.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(p.current&&!p.current.contains(e.target)){var n=p.current.parentElement;n&&!n.contains(e.target)&&(s(!1),null==t||t())}};return u&&document.addEventListener("mousedown",e,!0),function(){document.removeEventListener("mousedown",e,!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",I({ref:p,className:"st-dropdown-content st-dropdown-".concat(b),onClick:function(e){return e.stopPropagation()},style:I(I({position:h,width:d?"".concat(d,"px"):"auto",visibility:N?"visible":"hidden"},x),{overflow:c})},{children:r})):null},ce=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",I({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(le,I({open:a,onClose:function(){t()},setOpen:u,width:120},{children:[e(ce,I({isSelected:!0===c,onClick:function(){return d(!0)}},{children:"True"})),e(ce,I({isSelected:!1===c,onClick:function(){return d(!1)}},{children:"False"}))]}))},de=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()}})},fe=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()}})},ve=d(function(){return import("./Animate-e97fe73d.js")}),he=d(function(){return import("./DatePicker-ed669353.js")}),we=d(function(){return Promise.resolve().then(function(){return Jn})}),pe=d(function(){return Promise.resolve().then(function(){return Xn})}),me=function(n){var r=C(n,["parentRef","tableRow"]);return e(f,I({fallback:e("div",I({},r))},{children:e(ve,I({},n))}))},ge=function(n){return e(f,I({fallback:e("div",I({style:{padding:"20px",textAlign:"center"}},{children:"Loading..."}))},{children:e(he,I({},n))}))},be=function(n){var r=n.width,t=n.height;return e(f,I({fallback:e("div",{style:{width:void 0===r?100:r,height:void 0===t?30:t,background:"#f3f4f6"}})},{children:e(we,I({},n))}))},Ie=function(n){var r=n.width,t=n.height;return e(f,I({fallback:e("div",{style:{width:void 0===r?100:r,height:void 0===t?30:t,background:"#f3f4f6"}})},{children:e(pe,I({},n))}))},Ce=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)},ye=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0)},xe=function(e){if(!e)return new Date;if("string"==typeof e)return Ce(e);if("number"==typeof e){var n=new Date(e);return isNaN(n.getTime())?new Date:ye(n)}return e instanceof Date?ye(e):new Date},Re=function(e){return e?Ce(""+e):new Date},Se=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(le,I({open:i,onClose:l,setOpen:a,width:280},{children:e(ge,{value:Re(u),onChange:function(e){var n=e.toISOString().split("T")[0];t(n),a(!1),r()},onClose:l})}))},Ne=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(le,I({open:o,onClose:function(){r()},setOpen:u,width:150},{children:e("div",I({className:"st-enum-dropdown-content"},{children:a.map(function(n){return e(ce,I({isSelected:c===n.value,onClick:function(){return s(e=n.value),t(e),u(!1),void r();var e}},{children:n.label}),n.value)})}))}))},Ae=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(Se,{onBlur:c,onChange:o,open:!0,setOpen:i,value:l}):"enum"===u?e(Ne,{onBlur:c,onChange:o,open:!0,options:t,setOpen:i,value:"string"==typeof l?l:""}):"number"===u&&"number"==typeof l?e(fe,{defaultValue:l,onBlur:c,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}}):e(de,{defaultValue:null==l?"":l+"",onBlur:c,onChange:o})},Me=0,ke=function(){return function(e){var n=e.callback,r=e.callbackProps,t=e.limit,o=Date.now();0!==Me&&t>o-Me||(Me=o,n(r))}},Ee=function(e){var n=a(e);return o(function(){JSON.stringify(n.current)!==JSON.stringify(e)&&(n.current=e)},[e]),n.current},He=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(He);var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=He(e[r]));return n},Te=function(e,n){return e.filter(function(e){return e.pinned===n}).some(function(e){return!e.hide})},Fe=Date.now(),De={screenX:0,screenY:0},Oe=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=Oe(o.children,n,R(R([],r,!0),[t],!1));if(i)return i}}return null},Le=function(e){return"left"===e.pinned?"left":"right"===e.pinned?"right":"main"};var Pe=function(e){var n=e.draggedHeaderRef,r=e.headers,t=e.hoveredHeaderRef,o=e.onColumnOrderChange,i=e.onTableHeaderDragEnd,a=J().setHeaders,u=Ee(r);return{handleDragStart:function(e){n.current=e,Fe=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-De.screenX,2)+Math.pow(s-De.screenY,2));t.current=a;var f,v=n.current,h=!1;if(Le(v)!==Le(a))f=(x=function(e,n,r){var t,o,i=He(e),a=!1;try{var u=Le(r),l=i.findIndex(function(e){return e.accessor===n.accessor}),c=i.findIndex(function(e){return e.accessor===r.accessor});if(-1===l||-1===c)return{newHeaders:i,emergencyBreak:a=!0};var s=i.splice(l,1)[0],d=(t=u,o=I({},s),"left"===t?o.pinned="left":"right"===t?o.pinned="right":delete o.pinned,o);i.splice(c,0,d)}catch(e){console.error("Error in insertHeaderAcrossSections:",e),a=!0}return{newHeaders:i,emergencyBreak:a}}(r,v,a)).newHeaders,h=x.emergencyBreak;else{var w=r,p=Oe(w,v.accessor),m=Oe(w,a.accessor);if(!p||!m)return;var g=p.length,b=m.length,C=m;if(g!==b){var y=b-g;y>0&&(C=m.slice(0,-y))}var x=function(e,n,r){var t=He(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}}(w,p,C);f=x.newHeaders,h=x.emergencyBreak}if(!(l||a.accessor===v.accessor||10>d||JSON.stringify(f)===JSON.stringify(r)||h)){var R=Date.now();JSON.stringify(f)===JSON.stringify(u)&&(1500>R-Fe||40>d)||(Fe=R,De={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)}}},Be=function(n){var t=n.checked,o=void 0!==t&&t,i=n.children,a=n.onChange;return r("label",I({className:"st-checkbox-label"},{children:[e("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},type:"checkbox"}),e("span",I({className:"st-checkbox-custom ".concat(o?"st-checked":"")},{children:o&&e(ee,{className:"st-checkbox-checkmark"})})),i]}))},We=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(be,I({data:r},o.chartOptions)):null:"barChart"===o.type&&Array.isArray(t)?(r=t.filter(function(e){return"number"==typeof e})).length>0?e(Ie,I({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)?xe(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):t},qe=function(n){var t=n.borderClass,c=n.colIndex,s=n.displayRowNumber,d=n.header,f=n.isHighlighted,v=n.isInitialFocused,h=n.nestedIndex,w=n.parentHeader,p=n.rowIndex,m=n.tableRow,g=J(),b=g.cellRegistry,C=g.cellUpdateFlash,y=g.columnBorders,x=g.draggedHeaderRef,R=g.enableRowSelection,S=g.expandIcon,N=g.handleMouseDown,A=g.handleMouseOver,M=g.handleRowSelect,k=g.headers,E=g.hoveredHeaderRef,T=g.isCopyFlashing,D=g.isLoading,O=g.isRowSelected,L=g.isWarningFlashing,P=g.onCellEdit,j=g.onCellClick,_=g.onTableHeaderDragEnd,U=g.rowButtons,G=g.rowGrouping,K=g.rowIdAccessor,V=g.rowsWithSelectedCells,X=g.selectedColumns,Y=g.setUnexpandedRows,$=g.tableBodyContainerRef,Z=g.theme,Q=g.unexpandedRows,ee=g.useOddColumnBackground,ne=m.depth,re=m.row,te=i(B(re,d.accessor)),oe=te[0],ie=te[1],ae=i(!1),ue=ae[0],le=ae[1],ce=i(!1),se=ce[0],de=ce[1],fe=i(!1),ve=fe[0],he=fe[1],we=a(null),pe=z({row:re,rowIdAccessor:K}),ge=G&&G[ne],be=!!ge&&function(e,n){return!!n&&q(e[n])}(re,ge),Ie=!Q.has(pe+""),Ce=T({rowIndex:p,colIndex:c,rowId:pe}),ye=L({rowIndex:p,colIndex:c,rowId:pe}),xe=u(function(){var e,n,r;if(!y)return!1;var t=k.filter(function(e){return"left"===e.pinned}),o=k.filter(function(e){return!e.pinned}),i=k.filter(function(e){return"right"===e.pinned});return"left"===d.pinned?(null===(e=t[t.length-1])||void 0===e?void 0:e.accessor)===d.accessor:"right"===d.pinned?(null===(n=i[i.length-1])||void 0===n?void 0:n.accessor)===d.accessor:(null===(r=o[o.length-1])||void 0===r?void 0:r.accessor)===d.accessor},[y,k,d.accessor,d.pinned]),Re=Pe({draggedHeaderRef:x,headers:k,hoveredHeaderRef:E,onTableHeaderDragEnd:_}).handleDragOver,Se=ke(),Ne=H({accessor:d.accessor,rowId:pe}),Me=F({rowId:pe,accessor:d.accessor}),Ee=d.isSelectionColumn&&R;o(function(){if(b){var e="".concat(pe,"-").concat(d.accessor);return b.set(e,{updateContent:function(e){oe!==e?(ie(e),C&&(de(!0),we.current&&clearTimeout(we.current),we.current=setTimeout(function(){de(!1)},800))):ie(e)}}),function(){b.delete(e),we.current&&clearTimeout(we.current)}}},[b,C,pe,d.accessor,oe]),o(function(){if(se){var e=setTimeout(function(){de(!1)},850);return function(){return clearTimeout(e)}}},[se]),o(function(){ie(B(re,d.accessor))},[re,d.accessor]);var He="boolean"===d.type||"date"===d.type||"enum"===d.type,Te=!!(null==d?void 0:d.isEditable),Fe=X.has(c),De=f&&!Fe,Oe=u(function(){return!!Ee&&V.has(pe+"")},[Ee,V,pe]),Le=null==w?void 0:w.singleRowChildren,qe="st-cell ".concat(ne>0&&d.expandable?"st-cell-depth-".concat(ne):""," ").concat(De?v?"st-cell-selected-first ".concat(t):"st-cell-selected ".concat(t):""," ").concat(Fe?v?"st-cell-column-selected-first":"st-cell-column-selected":""," ").concat(Te?"clickable":""," ").concat(se?v?"st-cell-updating-first":"st-cell-updating":""," ").concat(Ce?v?"st-cell-copy-flash-first":"st-cell-copy-flash":""," ").concat(ye?v?"st-cell-warning-flash-first":"st-cell-warning-flash":""," ").concat(ee?h%2==0?"even-column":"odd-column":""," ").concat(Ee?"st-selection-cell":""," ").concat(Oe?"st-selection-has-highlighted-cell":""," ").concat(xe?"st-last-column":""," ").concat(Le?"st-sub-cell":""),ze=l(function(e){null==e&&(e="number"===d.type?0:"boolean"!==d.type&&""),ie(e),W(re,d.accessor,e),null==P||P({accessor:d.accessor,newValue:e,row:re,rowIndex:p})},[d.accessor,d.type,P,re,p]),je=l(function(){Y(function(e){var n=new Set(e),r=pe+"";return n.has(r)?n.delete(r):n.add(r),n})},[pe,Y]);return D?e("div",I({className:qe},{children:e("span",I({className:"st-cell-content ".concat("right"===d.align?"right-aligned":"center"===d.align?"center-aligned":"left-aligned")},{children:e("div",{className:"st-loading-skeleton"})}))})):!ue||He||Ee?r(me,I({className:qe,"data-accessor":d.accessor,"data-col-index":c,"data-row-id":pe,"data-row-index":p,id:Ne,onClick:function(){j&&!Ee&&j({accessor:d.accessor,colIndex:c,row:re,rowId:pe,rowIndex:p,value:oe})},onDoubleClick:function(){return d.isEditable&&!Ee&&le(!0)},onDragOver:function(e){Ee||Se({callback:Re,callbackProps:{event:e,hoveredHeader:d},limit:50})},onKeyDown:function(e){ue||Ee||"F2"!==e.key&&"Enter"!==e.key||!d.isEditable||ue||(e.preventDefault(),le(!0))},onMouseDown:function(){ue||Ee||N({rowIndex:p,colIndex:c,rowId:pe})},onMouseEnter:function(){he(!0)},onMouseLeave:function(){he(!1)},onMouseOver:function(){ue||Ee||A({rowIndex:p,colIndex:c,rowId:pe})},parentRef:$,tableRow:m},{children:[d.expandable&&be?e("div",I({className:"st-icon-container st-expand-icon-container ".concat(Ie?"expanded":"collapsed"),onClick:je},{children:S})):null,e("span",I({className:"st-cell-content ".concat("right"===d.align?"right-aligned":"center"===d.align?"center-aligned":"left-aligned")},{children:D?e("div",{className:"st-loading-skeleton"}):e("span",{children:Ee?r("div",I({className:"st-selection-cell-content"},{children:[e("div",I({className:"st-selection-control"},{children:ve||O&&O(pe+"")?e(Be,{checked:!!O&&O(pe+""),onChange:function(e){M&&M(pe+"",e)}}):e("span",I({className:"st-row-number"},{children:s+1}))})),function(){if(!U||!Ee||0===U.length)return null;if(!(ve||O&&O(pe+"")))return null;var n={row:re};return e("div",I({className:"st-row-buttons"},{children:U.map(function(r,t){return e("span",I({className:"st-row-button"},{children:r(n)}),t)})}))}()]})):d.cellRenderer?d.cellRenderer({accessor:d.accessor,colIndex:c,row:re,theme:Z}):We({content:oe,header:d,colIndex:c,row:re,rowIndex:p})})})),!D&&ue&&He&&!Ee&&e(Ae,{enumOptions:d.enumOptions,onChange:ze,setIsEditing:le,type:d.type,value:oe})]}),Me):e("div",I({className:"st-cell-editing",id:H({accessor:d.accessor,rowId:pe}),onMouseDown:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()}},{children:e(Ae,{enumOptions:d.enumOptions,onChange:ze,setIsEditing:le,type:d.type,value:oe})}))},ze=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=J(),f=d.rowIdAccessor,v=d.collapsedHeaders,h=i.filter(function(e){return T({header:e,pinned:a,headers:i,collapsedHeaders:v})});return e(n,{children:h.map(function(n,r){var d=z({row:s.row,rowIdAccessor:f}),v=H({accessor:n.accessor,rowId:d});return e(je,{columnIndices:o,displayRowNumber:l,header:n,headers:i,nestedIndex:r+(null!=t?t:0),pinned:a,rowIndex:u,rowIndices:c,tableRow:s},v)})})},je=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],w=J(),p=w.getBorderClass,m=w.isSelected,g=w.isInitialFocusedCell,b=w.collapsedHeaders,I=z({row:f.row,rowIdAccessor:w.rowIdAccessor});if(i.children&&i.children.length>0){var C=i.children.filter(function(e){return T({header:e,pinned:c,headers:a,collapsedHeaders:b})});if(i.singleRowChildren){var y={rowIndex:s,colIndex:h,rowId:I},x=p(y),R=m(y),S=g(y),N=H({accessor:i.accessor,rowId:I});return r(v,{children:[e(qe,{borderClass:x,colIndex:h,displayRowNumber:o,header:i,isHighlighted:R,isInitialFocused:S,nestedIndex:u,parentHeader:l,rowIndex:s,tableRow:f},N),C.map(function(n){var r=H({accessor:n.accessor,rowId:I});return e(je,{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:C.map(function(n){var r=H({accessor:n.accessor,rowId:I});return e(je,{columnIndices:t,displayRowNumber:o,header:n,headers:a,nestedIndex:u,parentHeader:i,pinned:c,rowIndex:s,rowIndices:d,tableRow:f},r)})})}var A={rowIndex:s,colIndex:h,rowId:I},M=p(A),k=m(A),E=g(A),F=H({accessor:i.accessor,rowId:I});return e(qe,{borderClass:M,colIndex:h,displayRowNumber:o,header:i,isHighlighted:k,isInitialFocused:E,nestedIndex:u,parentHeader:l,rowIndex:s,tableRow:f},F)},_e=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=J(),v=f.useHoverRowBackground,h=f.isAnimating,w=f.isRowSelected,p=f.useOddEvenRowBackground,m=d.position,g=d.displayPosition,b=m%2==0,C=z({row:d.row,rowIdAccessor:f.rowIdAccessor}),y=!!w&&w(C+"");return e("div",I({className:"st-row ".concat(p?b?"even":"odd":""," ").concat(y?"selected":""),"data-index":a,onMouseEnter:function(){!h&&v&&s(a)},style:{gridTemplateColumns:o,top:ue({position:m,rowHeight:l}),height:"".concat(l,"px")}},{children:e(ze,{columnIndexStart:t,columnIndices:r,displayRowNumber:g,headers:i,pinned:u,rowIndex:m,rowIndices:c,tableRow:d},C)}))},Ue=function(n){var r=n.displayStrongBorder,t=n.position,o=n.rowHeight,i=n.templateColumns,u=a(null);return e("div",I({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){u.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(u.current){var n=u.current.getBoundingClientRect(),r=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:e.clientX,clientY:n.top+n.height/2});u.current.dispatchEvent(r),u.current=null}},style:{gridTemplateColumns:i,top:ae({position:t,rowHeight:o})}},{children:e("div",{style:{gridColumn:"1 / -1"}})}))},Ge=c(void 0),Ke=function(e){var n=e.childRef,r=e.children,t=e.group,i=void 0===t?"default":t,a=function(){var e=s(Ge);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}})},Je=w(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,w=n.totalHeight,m=n.rowsToRender,g=n.width,b=c?"st-body-pinned-".concat(c):"st-body-main",C=J().rowIdAccessor,y=a(null);return p(t,function(){return y.current},[]),u(function(){return Te(l,c)},[l,c])?e(Ke,I({childRef:y,group:c?"pinned-".concat(c):"default"},{children:e("div",I({className:b,ref:y,style:I({position:"relative",height:"".concat(w,"px"),width:g},!c&&{flexGrow:1})},{children:m.map(function(n,t){var a=z({row:n.row,rowIdAccessor:C});return r(v,{children:[0!==t&&e(Ue,{displayStrongBorder:n.isLastGroupRow,position:n.position,rowHeight:s,templateColumns:h,rowIndex:t-1}),e(_e,{columnIndexStart:o,columnIndices:i,gridTemplateColumns:h,headers:l,index:t,pinned:c,rowHeight:s,rowIndices:d,setHoveredIndex:f,tableRow:n},a)]},a)})}))})):null});function Ve(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 T({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&&T({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}Je.displayName="TableSection";var Xe=function(n){var t=n.mainTemplateColumns,c=n.pinnedLeftColumns,s=n.pinnedLeftTemplateColumns,d=n.pinnedLeftWidth,f=n.pinnedRightColumns,v=n.pinnedRightTemplateColumns,h=n.pinnedRightWidth,w=n.rowsToRender,p=n.setScrollTop,m=n.tableRows,g=J(),b=g.collapsedHeaders,C=g.headerContainerRef,y=g.headers,x=g.isAnimating,R=g.mainBodyRef,S=g.onLoadMore,N=g.rowHeight,A=g.rowIdAccessor,M=g.scrollbarWidth,k=g.setIsScrolling,E=g.shouldPaginate,H=g.tableBodyContainerRef,T=i(!1),F=T[0],D=T[1],O=a(new Set),L=l(function(e){O.current.forEach(function(e){return e.classList.remove("hovered")}),O.current.clear(),null!==e&&document.querySelectorAll('.st-body-container .st-row[data-index="'.concat(e,'"]')).forEach(function(e){e.classList.add("hovered"),O.current.add(e)})},[]);o(function(){x&&L(null)},[x,L]),oe({headerContainerRef:C,mainSectionRef:H,scrollbarWidth:M}),o(function(){return function(){B.current&&clearTimeout(B.current)}},[]);var P=a(null),B=a(null),W=a(0),q=function(e){return e.length}(m),j=q*(N+1)-1,_=u(function(){return Ve({headers:y,pinnedLeftColumns:c,pinnedRightColumns:f,collapsedHeaders:b})},[y,c,f,b]),U=u(function(){var e={};return w.forEach(function(n,r){var t=z({row:n.row,rowIdAccessor:A})+"";e[t]=r}),e},[w,A]),G=l(function(e,n){!S||E||F||200>=e.scrollHeight-(n+e.clientHeight)&&n>W.current&&(D(!0),S(),setTimeout(function(){D(!1)},1e3))},[S,E,F]),K={columnIndices:_,headerContainerRef:C,headers:y,rowHeight:N,rowIndices:U,rowsToRender:w,setHoveredIndex:L};return r("div",I({className:"st-body-container",onMouseLeave:function(){return L(null)},onScroll:function(e){var n=e.currentTarget,r=n.scrollTop;k(!0),B.current&&clearTimeout(B.current),B.current=setTimeout(function(){k(!1)},150),P.current&&cancelAnimationFrame(P.current),P.current=requestAnimationFrame(function(){p(r),G(n,r),W.current=r})},ref:H},{children:[e(Je,I({},K,{pinned:"left",templateColumns:s,totalHeight:j,width:d})),e(Je,I({},K,{columnIndexStart:c.length,ref:R,templateColumns:t,totalHeight:j})),e(Je,I({},K,{columnIndexStart:c.length+t.length,pinned:"right",templateColumns:v,totalHeight:j,width:h}))]}))},Ye=function(e){var n=e.event,r=e.header,t=e.headers,o=e.setHeaders,i=e.setIsResizing,a=e.startWidth,u=e.collapsedHeaders;n.preventDefault();var l="clientX"in n?n.clientX:n.touches[0].clientX,c="touches"in n;if(r&&!r.hide){i(!0);var s,d=P(r);if(r.children&&r.children.length>0){var f=D(r,u);s=f.length>0?f:[r]}else s=[r];var v=function(e){var n="right"===r.pinned?l-e:e-l,i=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=i*N(window.innerWidth);if(!n.pinned)return Math.max(.6*i,600);var u=a-r.filter(function(e){return e.pinned===n.pinned&&e.accessor!==n.accessor}).reduce(function(e,n){return n.hide?e:e+D(n,t).reduce(function(e,n){return e+O(n)},0)},0),l=P(n);return l>u?(console.warn("Header ".concat(n.accessor," exceeds pinned section width limit")),l):u}({header:r,headers:t,collapsedHeaders:u});s.length>1?$e({delta:n,leafHeaders:s,minWidth:d,startWidth:a,maxWidth:i}):s[0].width=Math.max(Math.min(a+n,i),d),t.forEach(function(e){L(e)});var c=R([],t,!0);o(c)};if(c){var h=function(e){v(e.touches[0].clientX)},w=function(){document.removeEventListener("touchmove",h),document.removeEventListener("touchend",w),i(!1)};document.addEventListener("touchmove",h),document.addEventListener("touchend",w)}else{var p=function(e){v(e.clientX)},m=function(){document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",m),i(!1)};document.addEventListener("mousemove",p),document.addEventListener("mouseup",m)}}},$e=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,P(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)})},Ze={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"},Qe=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"]}},en=function(e){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(e)},nn=function(e){return["between","notBetween","in","notIn"].includes(e)},rn=function(e){return["isEmpty","isNotEmpty"].includes(e)},tn=function(n){return e("div",I({className:"st-filter-container"},{children:n.children}))},on=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,w=i(!1),p=w[0],m=w[1],g=i(-1),b=g[0],C=g[1],y=a(null),x=l.find(function(e){return e.value===t});return o(function(){var e=function(e){if(p)switch(e.key){case"ArrowDown":e.preventDefault(),C(function(e){return l.length-1>e?e+1:0});break;case"ArrowUp":e.preventDefault(),C(function(e){return e>0?e-1:l.length-1});break;case"Enter":e.preventDefault(),0>b||(u(l[b].value),m(!1),C(-1));break;case"Escape":e.preventDefault(),m(!1),C(-1)}};if(p)return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[p,b,l,u]),r("div",I({ref:y,className:"st-custom-select ".concat(f," ").concat(h?"st-custom-select-disabled":""," ").concat(p?"st-custom-select-open":"").trim()},{children:[r("button",I({type:"button",className:"st-custom-select-trigger",onClick:function(){if(!h)if(m(!p),p)C(-1);else{var e=l.findIndex(function(e){return e.value===t});C(0>e?0:e)}},disabled:h,"aria-haspopup":"listbox","aria-expanded":p,"aria-labelledby":"select-label"},{children:[e("span",I({className:"st-custom-select-value"},{children:x?x.label:s})),e(te,{})]})),e(le,I({open:p,setOpen:m,onClose:function(){m(!1),C(-1)},positioning:"absolute",overflow:"auto"},{children:e("div",I({className:"st-custom-select-options",role:"listbox"},{children:l.map(function(n,r){return e("div",I({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 u(n.value),m(!1),void C(-1)}},{children:n.label}),r)})}))}))]}))},an=function(n){var r=n.value,t=n.onChange,o=n.operators.map(function(e){return{value:e,label:Ze[e]}});return e("div",I({className:"st-filter-section"},{children:e(on,{value:r,onChange:function(e){t(e)},options:o})}))},un=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()})},ln=function(n){var r=n.children,t=n.className;return e("div",I({className:"st-filter-section ".concat(void 0===t?"":t).trim()},{children:r}))},cn=function(n){var t=n.onClear,o=n.canApply,i=n.showClear;return r("div",I({className:"st-filter-actions"},{children:[e("button",I({onClick:n.onApply,disabled:!o,className:"st-filter-button st-filter-button-apply ".concat(o?"":"st-filter-button-disabled")},{children:"Apply"})),i&&t&&e("button",I({onClick:t,className:"st-filter-button st-filter-button-clear"},{children:"Clear"}))]}))},sn=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],w=Qe("string");o(function(){a?(d(a.operator),h((a.value||"")+"")):(d("contains"),h(""))},[a]);var p=function(){var e=I({accessor:t.accessor,operator:s},en(s)&&{value:v});u(e)},m=rn(s)||v.trim();return r(tn,{children:[e(an,{value:s,onChange:d,operators:w}),en(s)&&e(ln,{children:e(un,{type:"text",value:v,onChange:h,placeholder:"Filter...",autoFocus:!0,onEnterPress:p})}),e(cn,{onApply:p,onClear:l,canApply:!!m,showClear:!!a})]})},dn=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)||"")+""),w=h[0],p=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],I=i(((null===(a=null==l?void 0:l.values)||void 0===a?void 0:a[1])||"")+""),C=I[0],y=I[1],x=Qe("number");o(function(){var e,n;l?(v(l.operator),p((l.value||"")+""),b(((null===(e=l.values)||void 0===e?void 0:e[0])||"")+""),y(((null===(n=l.values)||void 0===n?void 0:n[1])||"")+"")):(v("equals"),p(""),b(""),y(""))},[l]);var R=function(){var e={accessor:u.accessor,operator:f};en(f)?e.value=parseFloat(w):nn(f)&&(e.values=[parseFloat(""+g),parseFloat(""+C)]),c(e)};return r(tn,{children:[e(an,{value:f,onChange:v,operators:x}),en(f)&&e(ln,{children:e(un,{type:"number",value:w,onChange:p,placeholder:"Enter number...",autoFocus:!0,onEnterPress:R})}),nn(f)&&r(ln,{children:[e(un,{type:"number",value:g,onChange:b,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from",onEnterPress:R}),e(un,{type:"number",value:C,onChange:y,placeholder:"To...",onEnterPress:R})]}),e(cn,{onApply:R,onClear:s,canApply:!!rn(f)||(en(f)?""!==w.trim():!!nn(f)&&""!==(g+"").trim()&&""!==(C+"").trim()),showClear:!!l})]})},fn=function(n){var r=n.className;return e(on,{value:n.value,onChange:n.onChange,options:n.options,className:void 0===r?"":r,placeholder:n.placeholder})},vn=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],w=Qe("boolean");o(function(){a?(d(a.operator),h(void 0!==a.value?a.value+"":"true")):(d("equals"),h("true"))},[a]);var p=rn(s)||""!==v;return r(tn,{children:[e(an,{value:s,onChange:d,operators:w}),en(s)&&e(ln,{children:e(fn,{value:v,onChange:h,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),e(cn,{onApply:function(){var e={accessor:t.accessor,operator:s};en(s)&&(e.value="true"===v),u(e)},onClear:l,canApply:p,showClear:!!a})]})},hn=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],w=i((null==c?void 0:c.value)?c.value+"":""),p=w[0],m=w[1],g=i((null===(t=null==c?void 0:c.values)||void 0===t?void 0:t[0])?c.values[0]+"":""),b=g[0],C=g[1],y=i(((null===(u=null==c?void 0:c.values)||void 0===u?void 0:u[1])||"")+""),x=y[0],R=y[1],S=Qe("date");o(function(){var e,n;c?(h(c.operator),m((c.value||"")+""),C(((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(""),C(""),R(""))},[c]);var N=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(""),w=h[0],p=h[1],m=a(null);o(function(){if(t){var e=xe(t);isNaN(e.getTime())||p(e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else p("")},[t]),o(function(){c&&m.current&&m.current.focus()},[c]);var g=t?xe(t):new Date;return r("div",I({className:"st-date-input-container",style:{position:"relative"}},{children:[e("input",{ref:m,type:"text",value:w,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(le,I({open:f,setOpen:v,onClose:function(){v(!1)},positioning:"absolute",overflow:"visible"},{children:e(ge,{value:g,onChange:function(e){var n=e.toISOString().split("T")[0];u(n),v(!1)},onClose:function(){return v(!1)}})}))]}))};return r(tn,{children:[e(an,{value:v,onChange:h,operators:S}),en(v)&&e(ln,{children:e(N,{value:p,onChange:m,placeholder:"Select date...",autoFocus:!0})}),nn(v)&&r(ln,{children:[e(N,{value:b,onChange:C,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),e(N,{value:x,onChange:R,placeholder:"To date..."})]}),e(cn,{onApply:function(){var e={accessor:l.accessor,operator:v};en(v)?e.value=p:nn(v)&&(e.values=[b,x]),s(e)},onClear:d,canApply:!!rn(v)||(en(v)?""!==p.trim():!!nn(v)&&""!==b.trim()&&""!==x.trim()),showClear:!!c})]})},wn=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],w=i(""),p=w[0],m=w[1],g=u(function(){if(!p)return s;var e=p.toLowerCase();return s.filter(function(n){return n.label.toLowerCase().includes(e)})},[s,p]);o(function(){h(a?a.values?a.values.map(String):[]:d)},[a,d]);var b=s.length>10;return r(tn,{children:[e(ln,{children:r("div",I({className:"st-enum-filter-options"},{children:[e("div",I({className:"st-enum-select-all"},{children:e(Be,I({checked:v.length===d.length,onChange:function(e){h(e?d:[])}},{children:e("span",I({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),b&&e("div",I({className:"st-enum-search"},{children:e(un,{type:"text",value:p,onChange:m,placeholder:"Search..."})})),g.map(function(n,r){return e(Be,I({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",I({className:"st-enum-option-label"},{children:n.label}))}),r)}),p&&0===g.length&&e("div",I({className:"st-enum-no-results"},{children:"No matching options"}))]}))}),e(cn,{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})]})},pn=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(dn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"boolean":return e(vn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"date":return e(hn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"enum":return e(wn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});default:return e(sn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a})}}()})},mn=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],w=i({top:0,left:0}),p=w[0],g=w[1],b=a(null),C=a(null);if(o(function(){return function(){b.current&&clearTimeout(b.current)}},[]),!u||!m(l))return e(n,{children:l});var y=h(l,{ref:C,onMouseEnter:function(){b.current=setTimeout(function(){if(C.current&&u.trim()){var e=C.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:[y,f&&e("div",I({className:"st-tooltip",style:{position:"fixed",top:"".concat(p.top,"px"),left:"".concat(p.left,"px"),zIndex:1e4}},{children:u}))]})},gn=function(n){var t,c,s=n.colIndex,d=n.gridColumnEnd,f=n.gridColumnStart,v=n.gridRowEnd,w=n.gridRowStart,p=n.header,m=n.parentHeader,g=n.reverse,b=n.sort,C=i(!1),y=C[0],x=C[1],S=i(!1),N=S[0],k=S[1],E=i(p.label||""),T=E[0],F=E[1],D=J(),O=D.activeHeaderDropdown,L=D.areAllRowsSelected,P=D.collapsedHeaders,B=D.columnBorders,W=D.columnReordering,q=D.columnResizing,z=D.columnsWithSelectedCells,j=D.draggedHeaderRef,_=D.enableHeaderEditing,U=D.filterIcon,G=D.handleApplyFilter,K=D.handleClearFilter,V=D.handleSelectAll,X=D.headerCollapseIcon,Y=D.headerDropdown,$=D.headerExpandIcon,Z=D.headerRegistry,Q=D.headers,ee=D.hoveredHeaderRef,ne=D.onColumnOrderChange,re=D.onColumnSelect,te=D.onHeaderEdit,oe=D.onSort,ie=D.onTableHeaderDragEnd,ae=D.headerHeight,ue=D.selectColumns,ce=D.selectableColumns,se=D.selectedColumns,fe=D.setActiveHeaderDropdown,ve=D.setCollapsedHeaders,he=D.setHeaders,we=D.setInitialFocusedCell,pe=D.setIsResizing,ge=D.setSelectedCells,be=D.setSelectedColumns,Ie=D.sortDownIcon,Ce=D.sortUpIcon,ye=!!(null==p?void 0:p.isSortable),xe=!!(null==p?void 0:p.filterable),Re=D.filters[p.accessor],Se=(null==O?void 0:O.accessor)===p.accessor,Ne=p.isSelectionColumn&&D.enableRowSelection,Ae=function(e){var n;return!(!(null===(n=e.children)||void 0===n?void 0:n.length)||!e.collapsible)}(p),Me=P.has(p.accessor),Ee=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:Se,estimatedHeight:200,estimatedWidth:250,margin:4}),He=Ee.triggerRef,Te=Ee.position,Fe=u(function(){var e,n,r;if(!B)return!1;var t=Q.filter(function(e){return"left"===e.pinned}),o=Q.filter(function(e){return!e.pinned}),i=Q.filter(function(e){return"right"===e.pinned});return"left"===p.pinned?(null===(e=t[t.length-1])||void 0===e?void 0:e.accessor)===p.accessor:"right"===p.pinned?(null===(n=i[i.length-1])||void 0===n?void 0:n.accessor)===p.accessor:(null===(r=o[o.length-1])||void 0===r?void 0:r.accessor)===p.accessor},[B,Q,p.accessor,p.pinned]),De=u(function(){return!(!ce||Ne)&&M(p,s).some(function(e){return se.has(e)})},[ce,Ne,p,s,se]),Oe=u(function(){return!Ne&&M(p,s).some(function(e){return z.has(e)})},[Ne,p,s,z]),Le=u(function(){return!(!p.children||0===p.children.length)&&(!Me||p.children.some(function(e){var n=e.showWhen||A;return"parentCollapsed"===n||"always"===n}))},[p.children,Me]),We=null==m?void 0:m.singleRowChildren,qe=Le&&!p.singleRowChildren,ze="st-header-cell ".concat(p.accessor===(null===(t=ee.current)||void 0===t?void 0:t.accessor)?"st-hovered":""," ").concat((null===(c=j.current)||void 0===c?void 0:c.accessor)===p.accessor?"st-dragging":""," ").concat(ye?"clickable":""," ").concat(W&&!ye?"columnReordering":""," ").concat(qe?"parent":""," ").concat(We?"st-sub-header":""," ").concat(Fe?"st-last-column":""," ").concat(_&&!Ne?"st-header-editable":""," ").concat(De?"st-header-selected":""," ").concat(Oe&&!De?"st-header-has-highlighted-cell":""),je=Pe({draggedHeaderRef:j,headers:Q,hoveredHeaderRef:ee,onColumnOrderChange:ne,onTableHeaderDragEnd:ie}),_e=je.handleDragStart,Ue=je.handleDragEnd,Ge=je.handleDragOver,Ke=ke();o(function(){if(Z&&!p.isSelectionColumn){var e=p.accessor+"";return Z.set(e,{setEditing:function(e){k(e)}}),function(){Z.delete(e)}}},[Z,p.accessor,p.isSelectionColumn]),o(function(){F(p.label||"")},[p.label]);var Je=l(function(e){F(e);var n=Q.map(function(n){return n.accessor===p.accessor?I(I({},n),{label:e}):n});he(n),te&&te(p,e)},[Q,he,te,p]),Ve=l(function(){fe&&fe(null)},[fe]),Xe=l(function(e){e.stopPropagation(),ve(function(e){var n=new Set(e);return Me?n.delete(p.accessor):n.add(p.accessor),n})},[ve,Me,p.accessor]),$e=function(e){var n=e.event,r=e.header;if(!r.isSelectionColumn){if(ce){var t=M(r,s),o=t.some(function(e){return se.has(e)});if(_&&o&&!n.shiftKey)return Y&&Se&&Ve(),void k(!0);n.shiftKey&&ue?be(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))}):ue&&ue(t),ge(new Set),we(null)}re&&re(r),!ce&&r.isSortable&&oe(r.accessor)}};if(o(function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}},[]),!p)return null;var Ze=q&&!Ne&&e("div",I({className:"st-header-resize-handle-container",onMouseDown:function(e){var n,r=null===(n=document.getElementById(H({accessor:p.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth;Ke({callback:Ye,callbackProps:{event:e.nativeEvent,gridColumnEnd:d,gridColumnStart:f,header:p,headers:Q,setHeaders:he,setIsResizing:pe,startWidth:r,collapsedHeaders:P},limit:10})},onTouchStart:function(e){var n,r=null===(n=document.getElementById(H({accessor:p.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth;Ke({callback:Ye,callbackProps:{event:e,gridColumnEnd:d,gridColumnStart:f,header:p,headers:Q,setHeaders:he,setIsResizing:pe,startWidth:r,collapsedHeaders:P},limit:10})}},{children:e("div",{className:"st-header-resize-handle"})})),Qe=b&&b.key.accessor===p.accessor&&r("div",I({className:"st-icon-container",onClick:function(e){return $e({event:e,header:p})}},{children:["ascending"===b.direction&&Ce&&Ce,"descending"===b.direction&&Ie&&Ie]})),en=xe&&U&&r("div",I({className:"st-icon-container",onClick:function(e){e.stopPropagation(),x(!y)}},{children:[h(U,{style:{fill:Re?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),e(le,I({open:y,overflow:"visible",setOpen:x,onClose:function(){return x(!1)}},{children:e(pn,{header:p,currentFilter:Re,onApplyFilter:function(e){G(e),x(!1)},onClearFilter:function(){K(p.accessor),x(!1)}})}))]})),nn=Ae&&!Ne&&e("div",I({className:"st-icon-container st-collapse-icon-container",onClick:Xe},{children:Me?X:$}));return r(me,I({className:ze,id:H({accessor:p.accessor,rowId:"header"}),onDragOver:function(e){Ne||Ke({callback:Ge,callbackProps:{event:e,hoveredHeader:p},limit:50})},style:I({gridRowStart:w,gridRowEnd:v,gridColumnStart:f,gridColumnEnd:d},v-w>1?{}:{height:ae})},{children:[g&&Ze,"right"===p.align&&nn,"right"===p.align&&en,"right"===p.align&&Qe,e("div",I({ref:He,className:"st-header-label",draggable:W&&!p.disableReorder&&!Ne,onClick:function(e){Ne||$e({event:e,header:p})},onDoubleClick:function(e){Ne||function(e){var n=e.header;n.isSelectionColumn||ce&&n.isSortable&&oe(n.accessor)}({event:e,header:p})},onDragEnd:Ne?void 0:function(e){e.preventDefault(),Ue()},onDragStart:Ne?void 0:function(e){W&&p&&function(e){_e(e)}(p)}},{children:e(mn,I({content:p.tooltip||""},{children:e("span",I({className:"st-header-label-text ".concat("right"===p.align?"right-aligned":"center"===p.align?"center-aligned":"left-aligned")},{children:Ne?e(Be,{checked:!!L&&L(),onChange:function(e){V&&V(e)}}):N?e(de,{defaultValue:T,onBlur:function(){return k(!1)},onChange:Je}):p.headerRenderer?p.headerRenderer({accessor:p.accessor,colIndex:s,header:p}):T||(null==p?void 0:p.label)}))}))})),"right"!==p.align&&Qe,"right"!==p.align&&en,"right"!==p.align&&nn,!g&&Ze,Y&&!Ne&&e("div",I({className:"st-header-dropdown-container"},{children:Y({accessor:p.accessor,colIndex:s,header:p,isOpen:Se,onClose:Ve,position:Te})}))]}))},bn=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=J().collapsedHeaders,h=u(function(){var e=[],n=1,r=function(o,i,u,s){var d,f;if(void 0===u&&(u=!1),!T({header:o,pinned:c,headers:a,collapsedHeaders:v}))return 0;u||n++;var h,w,p=null!==(f=null===(d=o.children)||void 0===d?void 0:d.filter(function(e){return T({header:e,pinned:c,headers:a,collapsedHeaders:v})}).length)&&void 0!==f?f:0,m=n;if(o.singleRowChildren&&p>0?(h=m+1,w=l+1):p>0?(h=m+p,w=i+1):(h=m+1,w=l+1),e.push({header:o,gridColumnStart:m,gridColumnEnd:h,gridRowStart:i,gridRowEnd:w,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){T({header:e,pinned:c,headers:a,collapsedHeaders:v})&&(r(e,g,b,o),b=!1)})}return h-m},o=a.filter(function(e){return T({header:e,pinned:c,headers:a,collapsedHeaders:v})}),i=!0;return o.forEach(function(e){r(e,1,i),i=!1}),e},[a,l,c,t,v]);return e(Ke,I({childRef:s,group:c?"pinned-".concat(c):"default"},{children:e("div",I({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:h.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},n.header.accessor)})})}))}))},In=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(In)):1},Cn=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=J(),w=h.headerContainerRef,p=h.pinnedLeftRef,m=h.pinnedRightRef,g=h.collapsedHeaders,b=u(function(){return Ve({headers:o,pinnedLeftColumns:a,pinnedRightColumns:c,collapsedHeaders:g})},[o,a,c,g]),C=u(function(){var e=0,n=R(R(R([],a,!0),o,!0),c,!0);return o.forEach(function(r){if(T({header:r,headers:n,collapsedHeaders:g})){var t=In(r);e=Math.max(e,t)}}),{maxDepth:e}},[o,a,c,g]).maxDepth;return r("div",I({className:"st-header-container",ref:w},{children:[Te(o,"left")&&e(bn,{columnIndices:b,gridTemplateColumns:l,handleScroll:void 0,headers:o,maxDepth:C,pinned:"left",sectionRef:p,sort:d,width:f}),e(bn,{columnIndices:b,gridTemplateColumns:i,handleScroll:void 0,headers:o,maxDepth:C,sectionRef:t,sort:d}),Te(o,"right")&&e(bn,{columnIndices:b,gridTemplateColumns:s,handleScroll:void 0,headers:o,maxDepth:C,pinned:"right",sectionRef:m,sort:d,width:v})]}))},yn=function(e){var n=e.collapsedHeaders,r=function(e){var t=e.flattenedHeaders;return e.headers.forEach(function(e){if(!e.hide)if(e.children&&e.children.length>0)if(n&&n.has(e.accessor)){var o=e.children.filter(function(e){var n=e.showWhen||A;return"parentCollapsed"===n||"always"===n});e.singleRowChildren&&t.push(e),o.length>0?r({headers:o,flattenedHeaders:t}):e.singleRowChildren||t.push(e)}else{var i=e.children.filter(function(e){var n=e.showWhen||A;return"parentExpanded"===n||"always"===n});e.singleRowChildren&&t.push(e),r({headers:i,flattenedHeaders:t})}else t.push(e)}),t},t=r({headers:e.headers,flattenedHeaders:[]});return"".concat(t.map(function(e){return function(e){var n=e.minWidth,r=e.width;return"number"==typeof r&&(r="".concat(r,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof r&&r.endsWith("fr")?"minmax(".concat(n,", ").concat(r,")"):"max(".concat(n,", ").concat(r,")"):r}(e)}).join(" "))},xn=function(n){var t=n.pinnedLeftWidth,o=n.pinnedRightWidth,i=n.setScrollTop,l=n.sort,c=n.tableRows,s=n.rowsToRender,d=J(),f=d.columnResizing,v=d.editColumns,h=d.headers,w=d.collapsedHeaders,p=a(null),m=h.filter(function(e){return!e.pinned}),g=h.filter(function(e){return"left"===e.pinned}),b=h.filter(function(e){return"right"===e.pinned}),C=u(function(){return yn({headers:g,collapsedHeaders:w})},[g,w]),y=u(function(){return yn({headers:m,collapsedHeaders:w})},[m,w]),x=u(function(){return yn({headers:b,collapsedHeaders:w})},[b,w]),R={centerHeaderRef:p,headers:h,mainTemplateColumns:y,pinnedLeftColumns:g,pinnedLeftTemplateColumns:C,pinnedRightColumns:b,pinnedRightTemplateColumns:x,sort:l,pinnedLeftWidth:t,pinnedRightWidth:o},S={tableRows:c,mainTemplateColumns:y,pinnedLeftColumns:g,pinnedLeftTemplateColumns:C,pinnedLeftWidth:t,pinnedRightColumns:b,pinnedRightTemplateColumns:x,pinnedRightWidth:o,setScrollTop:i,rowsToRender:s};return r("div",I({className:"st-content ".concat(f?"st-resizeable":"st-not-resizeable"),style:{width:v?"calc(100% - 27.5px)":"100%"}},{children:[e(Cn,I({},R)),e(Xe,I({},S))]}))},Rn=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=J().editColumns,h=i(!1),w=h[0],p=h[1],m=a(null),g=a(null),b=a(null),C=v?28:0,y=(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&&p(t>u.current.clientWidth)},1)},[u,t]),w?r("div",I({className:"st-horizontal-scrollbar-container"},{children:[l>0&&e(Ke,I({childRef:g,group:"pinned-left"},{children:e("div",I({className:"st-horizontal-scrollbar-left",ref:g,style:{width:l}},{children:e("div",{style:{width:s}})}))})),t>0&&e(Ke,I({childRef:m},{children:e("div",I({className:"st-horizontal-scrollbar-middle",ref:m},{children:e("div",{style:{width:t}})}))})),c>0&&e(Ke,I({childRef:b,group:"pinned-right"},{children:e("div",I({className:"st-horizontal-scrollbar-right",ref:b,style:{width:y}},{children:e("div",{style:{width:d}})}))})),C>0&&e("div",{style:{width:C-1.5,height:"100%",flexShrink:0}})]})):null},Sn={string:function(e,n,r){if(e===n)return 0;var t=e.localeCompare(n);return"ascending"===r?t:-t},number:function(e,n,r){if(e===n)return 0;var t=e-n;return"ascending"===r?t:-t},boolean:function(e,n,r){if(e===n)return 0;var t=e===n?0:e?-1:1;return"ascending"===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"ascending"===r?i:-i},enum:function(e,n,r){return Sn.string(e,n,r)},default:function(e,n,r){return e===n?0:null==e?"ascending"===r?-1:1:null==n?"ascending"===r?1:-1:"string"==typeof e&&"string"==typeof n?Sn.string(e,n,r):"number"==typeof e&&"number"==typeof n?Sn.number(e,n,r):"boolean"==typeof e&&"boolean"==typeof n?Sn.boolean(e,n,r):Sn.string(e+"",n+"",r)}},Nn=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;return R([],n,!0).sort(function(e,n){var t=r.key.accessor;return function(e,n,r,t){if(void 0===r&&(r="string"),null==e||""===e)return"ascending"===t?-1:1;if(null==n||""===n)return"ascending"===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 Sn.number(i,a,t)}return"date"===r?Sn.date(e+"",n+"",t):"boolean"===r?Sn.boolean(!!e,!!n,t):"enum"===r?Sn.enum(e+"",n+"",t):Sn.string(e+"",n+"",t)}(B(e,t),B(n,t),i,a)})}({rows:e.rows,sortColumn:e.sortColumn,headers:e.headers})},An=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}):Nn({headers:o,rows:n,sortColumn:r}):n},Mn=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(Mn([s],n,r),!1===s.hide){u=!0;break}}(a||u)&&(i.hide=!1)}}},kn=function(e){return e.every(function(e){return e.hide})},En=function(e){e.forEach(function(e){e.children&&e.children.length>0&&(En(e.children),kn(e.children)&&(e.hide=!0))})},Hn=function(t){var o=t.allHeaders,a=t.depth,u=void 0===a?0:a,l=t.doesAnyHeaderHaveChildren,c=t.header,s=t.isCheckedOverride,d=i(!0),f=d[0],v=d[1],h=J(),w=h.expandIcon,p=h.headers,m=h.setHeaders,g=l?"".concat(16*u,"px"):"8px",b=c.children&&c.children.length>0,C=null!=s?s:c.hide||b&&c.children&&kn(c.children);return r(n,{children:[r("div",I({className:"st-header-checkbox-item",style:{paddingLeft:g}},{children:[l&&e("div",I({className:"st-header-icon-container"},{children:b?e("div",I({className:"st-collapsible-header-icon st-expand-icon-container ".concat(f?"expanded":"collapsed"),onClick:function(e){e.stopPropagation(),v(!f)}},{children:w})):null})),e(Be,I({checked:C,onChange:function(e){c.hide=e,e?En(o):(Mn(o,c.accessor),b&&c.children&&c.children.length>0&&c.children.every(function(e){return!0===e.hide})&&c.children[0]&&(c.children[0].hide=!1,Mn(o,c.children[0].accessor))),m(R([],p,!0))}},{children:c.label}))]})),b&&f&&c.children&&e("div",I({className:"st-nested-headers"},{children:c.children.map(function(n,r){return e(Hn,{allHeaders:o,depth:u+1,doesAnyHeaderHaveChildren:l,header:n,isCheckedOverride:!!C||void 0},"".concat(n.accessor,"-").concat(r))})}))]})},Tn=function(n){var r=n.headers,t=n.open,o="left"===n.position?"left":"",i=u(function(){return r.some(function(e){return e.children&&e.children.length>0})},[r]);return e("div",I({className:"st-column-editor-popout ".concat(t?"open":""," ").concat(o),onClick:function(e){return e.stopPropagation()}},{children:e("div",I({className:"st-column-editor-popout-content"},{children:r.map(function(n,t){return n.isSelectionColumn?null:e(Hn,{doesAnyHeaderHaveChildren:i,header:n,allHeaders:r},"".concat(n.accessor,"-").concat(t))})}))}))},Fn=function(n){var t=n.columnEditorText,o=n.editColumns,a=n.headers,u=n.position,l=void 0===u?"right":u,c=i(n.editColumnsInitOpen),s=c[0],d=c[1];return o?r("div",I({className:"st-column-editor ".concat(s?"open":""," ").concat(l),onClick:function(){return function(e){d(e)}(!s)},style:{width:28}},{children:[e("div",I({className:"st-column-editor-text"},{children:t})),e(Tn,{headers:a,open:s,position:l})]})):null},Dn=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(Ge.Provider,I({value:{registerPane:d,unregisterPane:f}},{children:t.Children.only(r)}))},On=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=xe(e),v=xe((t||"")+""),h=ye(f),w=ye(v);switch(r){case"equals":return h.getTime()===w.getTime();case"notEquals":return h.getTime()!==w.getTime();case"before":return w>h;case"after":return h>w;case"between":if(o&&2===o.length){var p=o.map(function(e){return ye(xe((e||"")+""))}),m=p[1];return h>=p[0]&&m>=h}return!1;case"notBetween":if(o&&2===o.length){var g=o.map(function(e){return ye(xe((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 I=o.includes(e+"");return"in"===r?I:!I}return!1}var C=(e+"").toLowerCase(),y=t?(t+"").toLowerCase():"";switch(r){case"equals":return C===y;case"notEquals":return C!==y;default:return!0}}(B(e,n.accessor),n)}catch(e){return console.warn("Filter error for accessor ".concat(n.accessor,":"),e),!0}})}):n},Ln=function(e,n,r,t){var o=[],i=function(e){e.forEach(function(e){var r=t?e[t]:void 0;if(t&&r&&q(r))i(r);else{var a=B(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}},Pn=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},Bn=function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches},Wn={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}},qn=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")},zn=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(){qn(e),e.removeEventListener("transitionend",o),r.onComplete&&r.onComplete(),t()};e.addEventListener("transitionend",o),setTimeout(o,n.duration+(n.delay||0)+50)})},jn=function(e){var n=e.element,r=e.finalConfig,t=e.fromBounds,o=e.toBounds;return y(void 0,void 0,void 0,function(){var e,i;return x(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||Bn()&&!1!==r.respectReducedMotion?[2]:(u=r,l=Math.abs(e.x)>Math.abs(e.y)?"column":"row",void 0===u&&(u={}),i=Bn()?I(I({},Wn.REDUCED_MOTION),u):I(I({},"column"===l?Wn.COLUMN_REORDER:Wn.ROW_REORDER),u),qn(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,zn(n,i,r)]);case 1:return a.sent(),[2]}var u,l})})},_n=function(e){var n=e.element,r=e.options;return y(void 0,void 0,void 0,function(){var e,t,o,i,a,u,l,c,s,d,f,v,h,w,p,m;return x(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,Bn()&&v?(void 0!==o&&(n.style.transform="",n.style.top="".concat(o,"px")),d&&d(),[2]):(h=n.getBoundingClientRect(),p=e-(w=h.top),m=t-w,[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(p,"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)})])})})},Un=function(n){var r=i(!1),t=r[0],a=r[1];return o(function(){a(!0)},[]),t?e(Gn,I({},n)):null},Gn=function(n){var t=n.allowAnimations,c=void 0!==t&&t,s=n.cellUpdateFlash,d=void 0!==s&&s,f=n.className,v=n.columnBorders,h=void 0!==v&&v,w=n.columnEditorPosition,p=void 0===w?"right":w,m=n.columnEditorText,C=void 0===m?"Columns":m,S=n.columnReordering,A=void 0!==S&&S,M=n.columnResizing,H=void 0!==M&&M,T=n.defaultHeaders,L=n.editColumns,P=void 0!==L&&L,j=n.editColumnsInitOpen,G=void 0!==j&&j,J=n.enableHeaderEditing,X=void 0!==J&&J,Z=n.enableRowSelection,ee=void 0!==Z&&Z,te=n.expandAll,ae=void 0===te||te,ue=n.expandIcon,le=void 0===ue?e($,{className:"st-expand-icon"}):ue,ce=n.externalFilterHandling,se=void 0!==ce&&ce,de=n.externalSortHandling,fe=void 0!==de&&de,ve=n.filterIcon,he=void 0===ve?e(re,{className:"st-header-icon"}):ve,we=n.footerRenderer,pe=n.headerCollapseIcon,me=void 0===pe?e($,{className:"st-header-icon"}):pe,ge=n.headerExpandIcon,be=void 0===ge?e(Y,{className:"st-header-icon"}):ge,Ie=n.headerDropdown,Ce=n.headerHeight,ye=n.height,xe=n.hideFooter,Re=void 0!==xe&&xe,Se=n.isLoading,Ne=void 0!==Se&&Se,Ae=n.nextIcon,Me=void 0===Ae?e($,{className:"st-next-prev-icon"}):Ae,ke=n.onCellEdit,He=n.onCellClick,Te=n.onColumnOrderChange,Fe=n.onColumnSelect,De=n.onFilterChange,Oe=n.onGridReady,Le=n.onHeaderEdit,Pe=n.onLoadMore,Be=n.onNextPage,We=n.onPageChange,qe=n.onRowSelectionChange,ze=n.onSortChange,je=n.prevIcon,_e=void 0===je?e(Y,{className:"st-next-prev-icon"}):je,Ue=n.rowButtons,Ge=n.rowGrouping,Ke=n.rowHeight,Je=void 0===Ke?32:Ke,Ve=n.rowIdAccessor,Xe=n.rows,Ye=n.selectionColumnWidth,$e=void 0===Ye?42:Ye,Ze=n.rowsPerPage,Qe=void 0===Ze?10:Ze,en=n.selectableCells,nn=void 0!==en&&en,rn=n.selectableColumns,tn=void 0!==rn&&rn,on=n.serverSidePagination,an=void 0!==on&&on,un=n.shouldPaginate,ln=void 0!==un&&un,cn=n.sortDownIcon,sn=void 0===cn?e(ne,{className:"st-header-icon"}):cn,dn=n.sortUpIcon,fn=void 0===dn?e(Q,{className:"st-header-icon"}):dn,vn=n.tableRef,hn=n.theme,wn=void 0===hn?"light":hn,pn=n.totalRowCount,mn=n.useHoverRowBackground,gn=void 0===mn||mn,bn=n.useOddEvenRowBackground,In=void 0!==bn&&bn,Cn=n.useOddColumnBackground,yn=void 0!==Cn&&Cn;yn&&(In=!1),h&&(gn=!1);var Sn=a(null),Mn=a(null),kn=a(null),En=a(null),Hn=a(null),Tn=a(null),Bn=a(null),qn=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:Tn}),zn=qn.scrollbarWidth,jn=qn.setScrollbarWidth,_n=oe({headerContainerRef:Bn,mainSectionRef:Tn,scrollbarWidth:zn}).isMainSectionScrollable,Un=u(function(){if(Ne&&0===Xe.length){var e=ln?Qe:10;_n&&(e+=1);var n=Array.from({length:e},function(e,n){var r;return(r={})[Ve]="loading-".concat(n),r});return n}return Xe},[Ne,Xe,Ve,Qe,_n,ln]),Gn=b(function(e){return e+1},0)[1],Kn=i(1),Jn=Kn[0],Vn=Kn[1],Xn=i(T),Yn=Xn[0],$n=Xn[1],Zn=i(!1),Qn=Zn[0],er=Zn[1],nr=i(!1),rr=nr[0],tr=nr[1],or=i(null),ir=or[0],ar=or[1],ur=i(new Set),lr=ur[0],cr=ur[1];o(function(){$n(T)},[T]);var sr=function(e){var n=e.rows,r=e.rowIdAccessor,t=e.onRowSelectionChange,o=e.enableRowSelection,a=void 0!==o&&o,c=i(new Set),s=c[0],d=c[1],f=l(function(e){return!!a&&function(e,n){return n.has(e)}(e,s)},[s,a]),v=l(function(){return!!a&&function(e,n,r){return 0!==e.length&&e.every(function(e){return r.has(e[n]+"")})}(n,r,s)},[n,r,s,a]),h=u(function(){return a?function(e){return e.size}(s):0},[s,a]),w=u(function(){return a?function(e,n,r){return e.filter(function(e){return r.has(e[n]+"")})}(n,r,s):[]},[n,r,s,a]),p=l(function(e,o){if(a){var i=function(e,n){var r=new Set(n);return r.has(e)?r.delete(e):r.add(e),r}(e,s);if(d(i),t){var u=n.find(function(n){return n[r]+""===e});u&&t({row:u,isSelected:o,selectedRows:i})}}},[s,n,r,t,a]),m=l(function(e){var o;a&&(e?(o=function(e,n){return new Set(e.map(function(e){return e[n]+""}))}(n,r),t&&n.forEach(function(e){return t({row:e,isSelected:!0,selectedRows:o})})):(o=new Set,t&&s.forEach(function(e){var i=n.find(function(n){return n[r]+""===e});i&&t({row:i,isSelected:!1,selectedRows:o})})),d(o))},[n,r,t,s,a]),g=l(function(e){if(a){var n=f(e);p(e,!n)}},[f,p,a]),b=l(function(){if(a){if(t){var e=new Set;s.forEach(function(o){var i=n.find(function(e){return e[r]+""===o});i&&t({row:i,isSelected:!1,selectedRows:e})})}d(new Set)}},[s,n,r,t,a]);return{selectedRows:s,setSelectedRows:d,isRowSelected:f,areAllRowsSelected:v,selectedRowCount:h,selectedRowsData:w,handleRowSelect:p,handleSelectAll:m,handleToggleRow:g,clearSelection:b}}({rows:Un,rowIdAccessor:Ve,onRowSelectionChange:qe,enableRowSelection:ee}),dr=sr.selectedRows,fr=sr.setSelectedRows,vr=sr.isRowSelected,hr=sr.areAllRowsSelected,wr=sr.selectedRowCount,pr=sr.selectedRowsData,mr=sr.handleRowSelect,gr=sr.handleSelectAll,br=sr.handleToggleRow,Ir=sr.clearSelection,Cr=u(function(){var e,n=R([],Yn,!0);return ee&&!(null===(e=null==Yn?void 0:Yn[0])||void 0===e?void 0:e.isSelectionColumn)&&(n=R([{accessor:"__row_selection__",label:"",width:$e,isEditable:!1,type:"boolean",pinned:"left",isSelectionColumn:!0,isSortable:!1,filterable:!1,align:"center"}],n,!0)),n},[ee,Yn,$e]),yr=i(0),xr=yr[0],Rr=yr[1],Sr=i(new Set),Nr=Sr[0],Ar=Sr[1],Mr=i(0),kr=Mr[0],Er=Mr[1];g(function(){var e=function(){Tn.current&&Er(Tn.current.clientWidth)};e();var n=null;return Tn.current&&(n=new ResizeObserver(e)).observe(Tn.current),function(){n&&n.disconnect()}},[]);var Hr=u(function(){var e=N(window.innerWidth),n=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=D(e,o).reduce(function(e,n){return e+O(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:E(i),rightWidth:E(a),mainWidth:u,leftContentWidth:l,rightContentWidth:c}}({headers:Cr,containerWidth:kr,maxPinnedWidthPercent:e,collapsedHeaders:lr});return{mainBodyWidth:n.mainWidth,pinnedLeftWidth:n.leftWidth,pinnedRightWidth:n.rightWidth,pinnedLeftContentWidth:n.leftContentWidth,pinnedRightContentWidth:n.rightContentWidth}},[Cr,kr,lr]),Tr=Hr.mainBodyWidth,Fr=Hr.pinnedLeftWidth,Dr=Hr.pinnedRightWidth,Or=Hr.pinnedLeftContentWidth,Lr=Hr.pinnedRightContentWidth,Pr=function(e){var n=e.height,r=e.rowHeight,t=e.shouldPaginate,o=e.rowsPerPage;return u(function(){var e;if(!n&&t&&o)return r*(o+1);if(!n)return window.innerHeight-r;var i,a=document.querySelector(".simple-table-root");return i="string"==typeof n?n.endsWith("px")?parseInt(n,10):n.endsWith("vh")?window.innerHeight*parseInt(n,10)/100:n.endsWith("%")?((null===(e=null==a?void 0:a.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*parseInt(n,10)/100:window.innerHeight:n,Math.max(0,i-r)},[n,r,t,o])}({height:ye,rowHeight:Je,shouldPaginate:ln,rowsPerPage:Qe}),Br=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 k(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&&q(u)){var l=i(u,r+1),c=I({},n);return c[o]=l,e.forEach(function(e){var n=Ln(l,e.accessor,e.aggregation,a);void 0!==n&&W(c,e.accessor,n)}),c}return n})};return i(o)},[n,r,t])}({rows:Un,headers:Yn,rowGrouping:Ge}),Wr=function(e){var n=e.rows,r=e.externalFilterHandling,t=e.onFilterChange,o=i({}),a=o[0],c=o[1],s=u(function(){return On({externalFilterHandling:r,tableRows:n,filterState:a})},[n,a,r]),d=l(function(e){var n,r=I(I({},a),((n={})[e.accessor]=e,n));c(r),null==t||t(r)},[a,t]),f=l(function(e){var n=I({},a);delete n[e],c(n),null==t||t(n)},[a,t]),v=l(function(){c({}),null==t||t({})},[t]),h=l(function(e){var t,o=I(I({},a),((t={})[e.accessor]=e,t));return On({externalFilterHandling:r,tableRows:n,filterState:o})},[a,n,r]);return{filteredRows:s,updateFilter:d,clearFilter:f,clearAllFilters:v,filters:a,computeFilteredRowsPreview:h}}({rows:Br,externalFilterHandling:se,onFilterChange:De}),qr=Wr.filters,zr=Wr.updateFilter,jr=Wr.clearFilter,_r=Wr.clearAllFilters,Ur=Wr.computeFilteredRowsPreview,Gr=function(e){var n=e.headers,r=e.tableRows,t=e.externalSortHandling,o=e.onSortChange,a=e.rowGrouping,c=i(null),s=c[0],d=c[1],f=l(function(e){var n=e.groupingKeys,r=e.headers,t=e.sortColumn,o=Nn({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(q(a)){var u=f({rows:a,sortColumn:t,headers:r,groupingKeys:n.slice(1)});return I(I({},e),((o={})[i]=u,o))}return e}):o},[]),v=u(function(){return An({externalSortHandling:t,tableRows:r,sortColumn:s,rowGrouping:a,headers:n,sortNestedRows:f})},[r,s,n,t,a,f]),h=l(function(e){var r=function(n){for(var t=0,o=n;o.length>t;t++){var i=o[t];if(i.accessor===e)return i;if(i.children&&i.children.length>0){var a=r(i.children);if(a)return a}}},t=r(n);if(t){var i=null;s&&s.key.accessor===e?"ascending"===s.direction&&(i={key:t,direction:"descending"}):i={key:t,direction:"ascending"},d(i),null==o||o(i)}},[s,n,o]),w=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=null;return s&&s.key.accessor===e?"ascending"===s.direction&&(u={key:i,direction:"descending"}):u={key:i,direction:"ascending"},An({externalSortHandling:t,tableRows:r,sortColumn:u,rowGrouping:a,headers:n,sortNestedRows:f})},[s,n,r,t,a,f]);return{sort:s,sortedRows:v,updateSort:h,computeSortedRowsPreview:w}}({headers:Yn,tableRows:Wr.filteredRows,externalSortHandling:fe,onSortChange:ze,rowGrouping:Ge}),Kr=Gr.sort,Jr=Gr.sortedRows,Vr=Gr.updateSort,Xr=function(e){var n=e.allowAnimations,r=e.sortedRows,t=e.originalRows,o=e.currentPage,c=e.rowsPerPage,s=e.shouldPaginate,d=e.serverSidePagination,f=e.rowGrouping,v=e.rowIdAccessor,h=e.unexpandedRows,w=e.expandAll,p=e.contentHeight,m=e.rowHeight,b=e.scrollTop,C=e.computeFilteredRowsPreview,y=e.computeSortedRowsPreview,x=i(!1),S=x[0],N=x[1],A=i([]),M=A[0],k=A[1],E=a([]),H=a([]),T=a(new Map),F=a(null),D=l(function(e){var n=s&&!d?e.slice((o-1)*c,o*c):e,r=s?(o-1)*c:0;return f&&0!==f.length?function(e){var n=e.depth,r=e.expandAll,t=void 0!==r&&r,o=e.unexpandedRows,i=e.rowGrouping,a=void 0===i?[]:i,u=e.rowIdAccessor,l=e.displayPositionOffset,c=void 0===l?0:l,s=[],d=function(e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=c);var l=r,f=i;return e.forEach(function(r,i){var c=z({row:r,rowIdAccessor:u}),v=a[n];s.push({row:r,depth:n,displayPosition:f,groupingKey:v,position:l,isLastGroupRow:0===n&&i===e.length-1}),l++,f++;var h=c+"";if((t?!o.has(h):o.has(h))&&a.length>n){var w=function(e,n){var r=e[n];return q(r)?r:[]}(r,v);w.length>0&&(l=d(w,n+1,l,f))}}),l};return d(e.rows,void 0===n?0:n,0,c),s}({rows:n,rowGrouping:f,rowIdAccessor:v,unexpandedRows:h,expandAll:w,displayPositionOffset:r}):n.map(function(e,n){return{row:e,depth:0,displayPosition:r+n,groupingKey:void 0,position:n,isLastGroupRow:!1}})},[o,c,s,d,f,v,h,w]);u(function(){if(0===T.current.size){var e=D(t),n=new Map;e.forEach(function(e){var r=z({row:e.row,rowIdAccessor:v})+"";n.set(r,e.position)}),T.current=n}},[t,D,v]);var O=u(function(){return D(r)},[r,D]),L=u(function(){return ie({bufferRowCount:5,contentHeight:p,tableRows:O,rowHeight:m,scrollTop:b})},[O,p,m,b]),P=l(function(e,n){var r=new Set(e.map(function(e){return z({row:e.row,rowIdAccessor:v})+""})),t=new Set(n.map(function(e){return z({row:e.row,rowIdAccessor:v})+""}));return{staying:n.filter(function(e){var n=z({row:e.row,rowIdAccessor:v})+"";return r.has(n)}),entering:n.filter(function(e){var n=z({row:e.row,rowIdAccessor:v})+"";return!r.has(n)}),leaving:e.filter(function(e){var n=z({row:e.row,rowIdAccessor:v})+"";return!t.has(n)})}},[v]),B=u(function(){if(0===E.current.length)return!1;var e=O.map(function(e){return z({row:e.row,rowIdAccessor:v})+""}),n=E.current.map(function(e){return z({row:e.row,rowIdAccessor:v})+""});return e.length!==n.length||!e.every(function(e,r){return e===n[r]})},[O,v]);g(function(){if(!S){if(!n||s)return k([]),E.current=O,void(H.current=L);if(0===E.current.length)return k([]),E.current=O,void(H.current=L);if(!B)return k([]),E.current=O,void(H.current=L);F.current={tableRows:O,visibleRows:L},N(!0)}},[n,O,B,S,s,L]),g(function(){if(S&&F.current&&M.length>0){var e=setTimeout(function(){var e=F.current;N(!1),k([]),E.current=e.tableRows,H.current=e.visibleRows,F.current=null},Wn.ROW_REORDER.duration+100);return function(){return clearTimeout(e)}}},[S,M.length]);var W=u(function(){if(!n||s)return L;if(M.length>0){var e=new Map,r=new Map;return O.forEach(function(n){var t=z({row:n.row,rowIdAccessor:v})+"";e.set(t,n.position),r.set(t,n.displayPosition)}),M.map(function(n){var t=z({row:n.row,rowIdAccessor:v})+"",o=e.get(t),i=r.get(t);return void 0!==o&&void 0!==i?I(I({},n),{position:o,displayPosition:i}):n})}return L},[L,M,O,n,s,v]),j=l(function(e){if(n&&!s){var r=C(e),t=D(r),o=ie({bufferRowCount:5,contentHeight:p,tableRows:t,rowHeight:m,scrollTop:b}),i=P(L,o).entering.map(function(e){var n=z({row:e.row,rowIdAccessor:v})+"";return O.find(function(e){return z({row:e.row,rowIdAccessor:v})+""===n})||e}).filter(Boolean);i.length>0&&k(R(R([],L,!0),i,!0))}},[n,s,C,D,p,m,b,P,O,L,v]),_=l(function(e){if(n&&!s){var r=y(e),t=D(r),o=ie({bufferRowCount:5,contentHeight:p,tableRows:t,rowHeight:m,scrollTop:b}),i=P(L,o).entering.map(function(e){var n=z({row:e.row,rowIdAccessor:v})+"";return O.find(function(e){return z({row:e.row,rowIdAccessor:v})+""===n})||e}).filter(Boolean);i.length>0&&k(R(R([],L,!0),i,!0))}},[n,s,y,D,p,m,b,P,O,L,v]);return{currentTableRows:O,currentVisibleRows:L,isAnimating:S,prepareForFilterChange:j,prepareForSortChange:_,rowsToRender:W}}({allowAnimations:c,sortedRows:Jr,originalRows:Br,currentPage:Jn,rowsPerPage:Qe,shouldPaginate:ln,serverSidePagination:an,rowGrouping:Ge,rowIdAccessor:Ve,unexpandedRows:Nr,expandAll:ae,contentHeight:Pr,rowHeight:Je,scrollTop:xr,computeFilteredRowsPreview:Ur,computeSortedRowsPreview:Gr.computeSortedRowsPreview}),Yr=Xr.currentTableRows,$r=Xr.rowsToRender,Zr=Xr.prepareForFilterChange,Qr=Xr.prepareForSortChange,et=Xr.isAnimating,nt=a(new Map),rt=a(new Map),tt=function(e){var n=e.selectableCells,r=e.headers,t=e.tableRows,c=e.rowIdAccessor,s=e.onCellEdit,d=e.cellRegistry,f=e.collapsedHeaders,v=e.rowHeight,h=e.enableRowSelection,w=void 0!==h&&h,p=i(new Set),m=p[0],g=p[1],b=i(new Set),I=b[0],C=b[1],R=i(null),S=R[0],N=R[1],A=i(null),M=A[0],k=A[1],E=i(new Set),H=E[0],T=E[1],F=i(new Set),O=F[0],L=F[1],P=i(!1),q=P[0],j=P[1],G=a(!1),K=a(null),J=u(function(){var e=new Set;return m.forEach(function(n){var r=n.split("-");if(r.length>=2){var t=parseInt(r[1],10);isNaN(t)||e.add(t)}}),I.forEach(function(n){e.add(n)}),e},[m,I]),V=u(function(){var e=new Set;return m.forEach(function(n){var r=n.split("-");if(r.length>=3){var t=r.slice(2).join("-");e.add(t)}}),I.size>0&&t.forEach(function(n){var r=z({row:n.row,rowIdAccessor:c});e.add(r+"")}),e},[m,I,t,c]),X=u(function(){return r.flatMap(function(e){return D(e,f)})},[r,f]),Y=l(function(){if(0!==m.size){var e=function(e,n,r){var t=n.filter(function(e){return!e.hide}),o=new Map,i=new Map;t.forEach(function(e,n){o.set(n,e.accessor),i.set(n,e)});var a=Array.from(e).reduce(function(e,n){var t,a=n.split("-").map(Number),u=a[0],l=a[1];e[u]||(e[u]=[]);var c=o.get(l),s=i.get(l);if(c&&(null===(t=r[u])||void 0===t?void 0:t.row)){var d=B(r[u].row,c);e[u][l]=!s||"lineAreaChart"!==s.type&&"barChart"!==s.type?d:Array.isArray(d)?d.join(", "):""}else e[u][l]="";return e},{});return Object.values(a).map(function(e){return Object.values(e).join("\t")}).join("\n")}(m,X,t);navigator.clipboard.writeText(e),T(new Set(m)),setTimeout(function(){return T(new Set)},800)}},[m,X,t]),$=l(function(){return y(void 0,void 0,void 0,function(){var e,n,r,o,i;return x(this,function(a){switch(a.label){case 0:if(!M)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,a){var u=new Set,l=new Set,c=e.split("\n").filter(function(e){return e.length>0});if(0===c.length)return{updatedCells:u,warningCells:l};var s=r.filter(function(e){return!e.hide}),d=n.rowIndex,f=n.colIndex;return c.forEach(function(e,n){e.split("\t").forEach(function(e,r){var c=d+n,v=f+r;if(t.length>c&&s.length>v){var h=t[c],w=s[v],p=z({row:h.row,rowIdAccessor:o});if(null==w?void 0:w.isEditable){var m=e;if("number"===w.type){var g=+e;isNaN(g)||(m=g)}else if("boolean"===w.type)m="true"===e.toLowerCase()||"1"===e;else if("date"===w.type){var b=new Date(e);isNaN(b.getTime())||(m=b)}else"lineAreaChart"!==w.type&&"barChart"!==w.type||(m=e.split(",").map(function(e){var n=+e.trim();return isNaN(n)?0:n}));if(W(h.row,w.accessor,m),a){var I="".concat(p,"-").concat(w.accessor),C=a.get(I);C&&C.updateContent(m)}null==i||i({accessor:w.accessor,newValue:m,row:h.row,rowIndex:c});var y="".concat(c,"-").concat(v,"-").concat(p);u.add(y)}else{var x="".concat(c,"-").concat(v,"-").concat(p);l.add(x)}}})}),{updatedCells:u,warningCells:l}}(e,M,X,t,c,s,d),o=n.warningCells,(r=n.updatedCells).size>0&&(T(r),setTimeout(function(){return T(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]}})})},[M,X,t,c,s,d]),Z=l(function(){if(0!==m.size){var e=function(e,n,r,t,o,i){var a=new Set,u=new Set,l=n.filter(function(e){return!e.hide}),c=new Map;return l.forEach(function(e,n){c.set(n,e.accessor)}),Array.from(e).forEach(function(e){var n=e.split("-").map(Number),c=n[0],s=n[1];if(r.length>c&&l.length>s){var d=r[c],f=l[s],v=z({row:d.row,rowIdAccessor:t});if(null==f?void 0:f.isEditable){var h;if(h="string"===f.type?"":"number"===f.type?null:"boolean"!==f.type&&("date"===f.type?null:"lineAreaChart"===f.type||"barChart"===f.type||Array.isArray(B(d.row,f.accessor))?[]:""),W(d.row,f.accessor,h),i){var w="".concat(v,"-").concat(f.accessor),p=i.get(w);p&&p.updateContent(h)}null==o||o({accessor:f.accessor,newValue:h,row:d.row,rowIndex:c}),a.add(e)}else u.add(e)}}),{deletedCells:a,warningCells:u}}(m,X,t,c,s,d),n=e.deletedCells,r=e.warningCells;n.size>0&&(T(n),setTimeout(function(){return T(new Set)},800)),r.size>0&&(L(r),setTimeout(function(){return L(new Set)},800))}},[m,X,t,c,s,d]),Q=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 s=a;u>=s;s++)if(l>=0&&t.length>l){if(w&&0===s)continue;var d=z({row:t[l].row,rowIdAccessor:c});r.add(U({colIndex:s,rowIndex:l,rowId:d}))}C(new Set),N(null),g(r),k(n),setTimeout(function(){return _(n,v)},0)},[t,c,v,w]),ee=l(function(e){if(e.rowIndex>=0&&t.length>e.rowIndex&&e.colIndex>=0&&(w?X.length:X.length-1)>=e.colIndex){var n=U(e);C(new Set),N(null),g(new Set([n])),k(e),setTimeout(function(){return _(e,v)},0)}},[X.length,t.length,v,w]),ne=l(function(e,n){void 0===n&&(n=!1),g(new Set),k(null),C(function(r){var t=new Set(n?r:[]);return e.forEach(function(e){return t.add(e)}),t}),e.length>0&&N(e[e.length-1])},[]);!function(e){var n=e.selectableCells,r=e.initialFocusedCell,t=e.tableRows,i=e.leafHeaders,a=e.rowIdAccessor,u=e.selectSingleCell,l=e.selectCellRange,c=e.setSelectedCells,s=e.setSelectedColumns,d=e.setLastSelectedColumnIndex,f=e.copyToClipboard,v=e.pasteFromClipboard,h=e.deleteSelectedCells,w=e.startCell,p=e.enableRowSelection,m=void 0!==p&&p;o(function(){var e=function(e){var u;if(n&&r){var l=r.rowIndex,R=r.colIndex,S=r.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if((e.ctrlKey||e.metaKey)&&"v"===e.key)return e.preventDefault(),void v();if((e.ctrlKey||e.metaKey)&&"a"===e.key){e.preventDefault();for(var N=new Set,A=0;t.length>A;A++)for(var M=0;i.length>M;M++){var k=m?M+1:M,E=z({row:t[A].row,rowIdAccessor:a});N.add("".concat(A,"-").concat(k,"-").concat(E))}return c(N),s(new Set),void d(null)}if("Delete"===e.key||"Backspace"===e.key)return e.preventDefault(),void h();if(z({row:null===(u=t[l])||void 0===u?void 0:u.row,rowIdAccessor:a})!==S){var H=t.findIndex(function(e){return z({row:e.row,rowIdAccessor:a})===S});if(-1===H)return;l=H}var T=function(e,n,r){var o=e,a=n;return"up"===r?o=0:"down"===r?o=t.length-1:"left"===r?a=m?1:0:"right"===r&&(a=m?i.length:i.length-1),{rowIndex:o,colIndex:a}};"ArrowUp"===e.key?(e.preventDefault(),o(e,l,R,T)):"ArrowDown"===e.key?(e.preventDefault(),p(e,l,R,T)):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),g(e,l,R,T)):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),b(e,l,R,T)):"Home"===e.key?(e.preventDefault(),I(e,l)):"End"===e.key?(e.preventDefault(),C(e,l)):"PageUp"===e.key?(e.preventDefault(),y(e,l,R)):"PageDown"===e.key?(e.preventDefault(),x(e,l,R)):"Escape"===e.key&&(c(new Set),s(new Set),d(null),w.current=null)}else f()}},o=function(e,n,o,i){if(e.shiftKey){w.current||(w.current=r);var c=n-1;if((e.ctrlKey||e.metaKey)&&(c=i(n,o,"up").rowIndex),c>=0){var s=z({row:t[c].row,rowIdAccessor:a});l(w.current,{rowIndex:c,colIndex:o,rowId:s})}}else n>0&&(c=n-1,(e.ctrlKey||e.metaKey)&&(c=i(n,o,"up").rowIndex),s=z({row:t[c].row,rowIdAccessor:a}),u({rowIndex:c,colIndex:o,rowId:s}),w.current=null)},p=function(e,n,o,i){if(e.shiftKey){w.current||(w.current=r);var c=n+1;if((e.ctrlKey||e.metaKey)&&(c=i(n,o,"down").rowIndex),t.length>c){var s=z({row:t[c].row,rowIdAccessor:a});l(w.current,{rowIndex:c,colIndex:o,rowId:s})}}else t.length-1>n&&(c=n+1,(e.ctrlKey||e.metaKey)&&(c=i(n,o,"down").rowIndex),s=z({row:t[c].row,rowIdAccessor:a}),u({rowIndex:c,colIndex:o,rowId:s}),w.current=null)},g=function(e,n,o,i){if(e.shiftKey&&"ArrowLeft"===e.key){w.current||(w.current=r);var c=o-1;if(e.ctrlKey||e.metaKey)c=i(n,o,"left").colIndex;else if(m&&0===c)return;if(c>=0){var s=z({row:t[n].row,rowIdAccessor:a});l(w.current,{rowIndex:n,colIndex:c,rowId:s})}}else if(o>0){if(c=o-1,(e.ctrlKey||e.metaKey)&&"ArrowLeft"===e.key)c=i(n,o,"left").colIndex;else if(m&&0===c)return;0>c||(s=z({row:t[n].row,rowIdAccessor:a}),u({rowIndex:n,colIndex:c,rowId:s}),w.current=null)}},b=function(e,n,o,c){var s=m?i.length:i.length-1;if(e.shiftKey&&"ArrowRight"===e.key){w.current||(w.current=r);var d=o+1;if((e.ctrlKey||e.metaKey)&&(d=c(n,o,"right").colIndex),s>=d){var f=z({row:t[n].row,rowIdAccessor:a});l(w.current,{rowIndex:n,colIndex:d,rowId:f})}}else s>o&&(d=o+1,(e.ctrlKey||e.metaKey)&&"ArrowRight"===e.key&&(d=c(n,o,"right").colIndex),d>s||(f=z({row:t[n].row,rowIdAccessor:a}),u({rowIndex:n,colIndex:d,rowId:f}),w.current=null))},I=function(e,n,o){if(e.shiftKey){w.current||(w.current=r);var i=n,c=m?1:0;(e.ctrlKey||e.metaKey)&&(i=0);var s=z({row:t[i].row,rowIdAccessor:a});l(w.current,{rowIndex:i,colIndex:c,rowId:s})}else i=n,c=m?1:0,(e.ctrlKey||e.metaKey)&&(i=0),s=z({row:t[i].row,rowIdAccessor:a}),u({rowIndex:i,colIndex:c,rowId:s}),w.current=null},C=function(e,n,o){if(e.shiftKey){w.current||(w.current=r);var c=n,s=m?i.length:i.length-1;(e.ctrlKey||e.metaKey)&&(c=t.length-1);var d=z({row:t[c].row,rowIdAccessor:a});l(w.current,{rowIndex:c,colIndex:s,rowId:d})}else c=n,s=m?i.length:i.length-1,(e.ctrlKey||e.metaKey)&&(c=t.length-1),d=z({row:t[c].row,rowIdAccessor:a}),u({rowIndex:c,colIndex:s,rowId:d}),w.current=null},y=function(e,n,o){var i=Math.max(0,n-10);if(e.shiftKey){w.current||(w.current=r);var c=z({row:t[i].row,rowIdAccessor:a});l(w.current,{rowIndex:i,colIndex:o,rowId:c})}else c=z({row:t[i].row,rowIdAccessor:a}),u({rowIndex:i,colIndex:o,rowId:c}),w.current=null},x=function(e,n,o){var i=Math.min(t.length-1,n+10);if(e.shiftKey){w.current||(w.current=r);var c=z({row:t[i].row,rowIdAccessor:a});l(w.current,{rowIndex:i,colIndex:o,rowId:c})}else c=z({row:t[i].row,rowIdAccessor:a}),u({rowIndex:i,colIndex:o,rowId:c}),w.current=null};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[n,r,t,i,a,u,l,c,s,d,f,v,h,w,m])}({selectableCells:n,initialFocusedCell:M,tableRows:t,leafHeaders:X,rowIdAccessor:c,selectSingleCell:ee,selectCellRange:Q,setSelectedCells:g,setSelectedColumns:C,setLastSelectedColumnIndex:N,copyToClipboard:Y,pasteFromClipboard:$,deleteSelectedCells:Z,startCell:K,enableRowSelection:w});var re=l(function(e,n){var r=new Set,o=new Map;t.forEach(function(e,n){var r=z({row:e.row,rowIdAccessor:c});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,s=Math.min(u,l),d=Math.max(u,l),f=Math.min(e.colIndex,n.colIndex),v=Math.max(e.colIndex,n.colIndex),h=s;d>=h;h++)for(var p=f;v>=p;p++)if(h>=0&&t.length>h){if(w&&0===p)continue;var m=z({row:t[h].row,rowIdAccessor:c});r.add(U({colIndex:p,rowIndex:h,rowId:m}))}g(r)},[t,c,w]),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)))}},[]),ae=l(function(e){var n=e.colIndex,r=U({colIndex:n,rowIndex:e.rowIndex,rowId:e.rowId}),t=m.has(r),o=I.has(n);return t||o},[m,I]),ue=l(function(e){var n=e.colIndex,r=e.rowIndex,o=e.rowId;if(q)return"";var i=[],a=t[r-1]?z({row:t[r-1].row,rowIdAccessor:c}):null,u=t[r+1]?z({row:t[r+1].row,rowIdAccessor:c}):null,l=null!==a?{colIndex:n,rowIndex:r-1,rowId:a}:null,s=null!==u?{colIndex:n,rowIndex:r+1,rowId:u}:null,d={colIndex:n-1,rowIndex:r,rowId:o},f={colIndex:n+1,rowIndex:r,rowId:o};return(!l||!ae(l)||I.has(n)&&0===r)&&i.push("st-selected-top-border"),(!s||!ae(s)||I.has(n)&&r===t.length-1)&&i.push("st-selected-bottom-border"),ae(d)||i.push("st-selected-left-border"),ae(f)||i.push("st-selected-right-border"),i.join(" ")},[q,ae,t,I,c]),le=u(function(){return M?function(e){return e.rowIndex===M.rowIndex&&e.colIndex===M.colIndex&&e.rowId===M.rowId}:function(){return!1}},[M]),ce=l(function(e){var n=U({colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId});return H.has(n)},[H]),se=l(function(e){var n=U({colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId});return O.has(n)},[O]);return{getBorderClass:ue,handleMouseDown:function(e){var r=e.colIndex,t=e.rowIndex,o=e.rowId;if(n){G.current=!0,j(!0),K.current={rowIndex:t,colIndex:r,rowId:o},setTimeout(function(){C(new Set),N(null);var e=U({colIndex:r,rowIndex:t,rowId:o});g(new Set([e])),k({rowIndex:t,colIndex:r,rowId:o})},0);var i=null,a=null,u=null,l=0,c=function(){if(G.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){G.current&&K.current&&(i=e.clientX,a=e.clientY)},d=function(){G.current=!1,j(!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&&G.current&&K.current&&re(K.current,{colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId})},isCopyFlashing:ce,isWarningFlashing:se,isInitialFocusedCell:le,isSelected:ae,lastSelectedColumnIndex:S,pasteFromClipboard:$,selectColumns:ne,selectedCells:m,selectedColumns:I,setInitialFocusedCell:k,setSelectedCells:g,setSelectedColumns:C,deleteSelectedCells:Z,columnsWithSelectedCells:J,rowsWithSelectedCells:V}}({selectableCells:nn,headers:Yn,tableRows:Yr,rowIdAccessor:Ve,onCellEdit:ke,cellRegistry:nt.current,collapsedHeaders:lr,rowHeight:Je,enableRowSelection:ee}),ot=tt.getBorderClass,it=tt.handleMouseDown,at=tt.handleMouseOver,ut=tt.isCopyFlashing,lt=tt.isInitialFocusedCell,ct=tt.isSelected,st=tt.isWarningFlashing,dt=tt.selectColumns,ft=tt.selectedCells,vt=tt.selectedColumns,ht=tt.setInitialFocusedCell,wt=tt.setSelectedCells,pt=tt.setSelectedColumns,mt=tt.columnsWithSelectedCells,gt=tt.rowsWithSelectedCells,bt=l(function(e){Qr(e),setTimeout(function(){Vr(e)},0)},[Qr,Vr]),It=l(function(e){$n(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;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)))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[n,r,t,i,a,u,l])}({selectableColumns:tn,selectedCells:ft,selectedColumns:vt,setSelectedCells:wt,setSelectedColumns:pt,activeHeaderDropdown:ir,setActiveHeaderDropdown:ar}),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:Gn,tableBodyContainerRef:Tn,setScrollbarWidth:jn}),function(e){var n=e.onGridReady;o(function(){null==n||n()},[n])}({onGridReady:Oe}),function(e){var n=e.cellRegistryRef,r=e.currentTableRows,t=e.headerRegistryRef,i=e.headers,a=e.rowIdAccessor,u=e.rows,l=e.tableRef,c=e.visibleRows;o(function(){l&&(l.current={updateData:function(e){var r=e.accessor,t=e.newValue,o=null==u?void 0:u[e.rowIndex];if(o){var i=z({row:o,rowIdAccessor:a}),l=F({rowId:i,accessor:r}),c=n.current.get(l);c&&c.updateContent(t),void 0!==B(o,r)&&W(o,r,t)}},setHeaderRename:function(e){var n=t.current.get(e.accessor+"");n&&n.setEditing(!0)},getVisibleRows:function(){return c},exportToCSV:function(e){!function(e,n,r){var t=function(e,n){var r=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.children&&i.children.length>0?r(i.children):n.push(i))}};return r(e),n}(n);return R([r.map(function(e){return Pn(e.label)}).join(",")],e.map(function(e){var n=e.row;return r.map(function(e){var r=B(n,e.accessor);return Pn(r)}).join(",")}),!0).join("\n")}(e,n);!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)}(t,r)}(r,i,(void 0===e?{}:e).filename)}})},[n,r,t,i,a,u,l,c])}({cellRegistryRef:nt,currentTableRows:Yr,headerRegistryRef:rt,headers:Cr,rowIdAccessor:Ve,rows:Un,tableRef:vn,visibleRows:$r}),function(e){var n=e.filters,r=e.onFilterChange;o(function(){null==r||r(n)},[n,r])}({filters:qr,onFilterChange:De}),function(e){var n=e.sort,r=e.onSortChange,t=Ee(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:Kr,onSortChange:ze});var Ct=l(function(e){Zr(e),setTimeout(function(){zr(e)},0)},[Zr,zr]);return e(K,I({value:{allowAnimations:c,areAllRowsSelected:hr,cellRegistry:nt.current,cellUpdateFlash:d,clearSelection:Ir,collapsedHeaders:lr,columnBorders:h,columnReordering:A,columnResizing:H,draggedHeaderRef:Sn,editColumns:P,enableHeaderEditing:X,enableRowSelection:ee,expandIcon:le,filterIcon:he,filters:qr,forceUpdate:Gn,getBorderClass:ot,handleApplyFilter:Ct,handleClearAllFilters:_r,handleClearFilter:jr,handleMouseDown:it,handleMouseOver:at,handleRowSelect:mr,handleSelectAll:gr,handleToggleRow:br,headerCollapseIcon:me,headerContainerRef:Bn,headerDropdown:Ie,headerExpandIcon:be,headerRegistry:rt.current,headers:Cr,hoveredHeaderRef:Mn,isAnimating:et,isCopyFlashing:ut,isInitialFocusedCell:lt,isLoading:Ne,isResizing:Qn,isRowSelected:vr,isScrolling:rr,isSelected:ct,isWarningFlashing:st,mainBodyRef:kn,nextIcon:Me,onCellEdit:ke,onCellClick:He,onColumnOrderChange:Te,onColumnSelect:Fe,onLoadMore:Pe,onSort:bt,onTableHeaderDragEnd:It,pinnedLeftRef:En,pinnedRightRef:Hn,prevIcon:_e,rowButtons:Ue,rowGrouping:Ge,rowHeight:Je,headerHeight:null!=Ce?Ce:Je,rowIdAccessor:Ve,scrollbarWidth:zn,selectColumns:dt,selectableColumns:tn,selectedColumns:vt,columnsWithSelectedCells:mt,rowsWithSelectedCells:gt,selectedRows:dr,selectedRowCount:wr,selectedRowsData:pr,setCollapsedHeaders:cr,setHeaders:$n,setInitialFocusedCell:ht,setIsResizing:er,setIsScrolling:tr,setSelectedCells:wt,setSelectedColumns:pt,setSelectedRows:fr,setUnexpandedRows:Ar,shouldPaginate:ln,sortDownIcon:sn,sortUpIcon:fn,tableBodyContainerRef:Tn,tableRows:Yr,theme:wn,unexpandedRows:Nr,useHoverRowBackground:gn,useOddColumnBackground:yn,useOddEvenRowBackground:In,activeHeaderDropdown:ir,setActiveHeaderDropdown:ar,onHeaderEdit:Le}},{children:e("div",I({className:"simple-table-root st-wrapper theme-".concat(wn," ").concat(null!=f?f:""," ").concat(h?"st-column-borders":""),style:ye?{height:ye}:{}},{children:e(Dn,{children:r("div",I({className:"st-wrapper-container"},{children:[r("div",I({className:"st-content-wrapper"},{children:[e(xn,{pinnedLeftWidth:Fr,pinnedRightWidth:Dr,setScrollTop:Rr,sort:Kr,tableRows:Yr,rowsToRender:$r}),e(Fn,{columnEditorText:C,editColumns:P,editColumnsInitOpen:G,headers:Yn,position:p})]})),e(Rn,{mainBodyRef:kn,mainBodyWidth:Tr,pinnedLeftWidth:Fr,pinnedRightWidth:Dr,pinnedLeftContentWidth:Or,pinnedRightContentWidth:Lr,tableBodyContainerRef:Tn}),e(V,{currentPage:Jn,footerRenderer:we,hideFooter:Re,onPageChange:Vn,onNextPage:Be,onUserPageChange:We,rowsPerPage:Qe,shouldPaginate:ln,totalPages:Math.ceil((null!=pn?pn:Jr.length)/Qe),totalRows:null!=pn?pn:Jr.length})]}))})}))}))},Kn=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,w=void 0===h?"":h,p=n.min,m=n.max;if(!t||0===t.length)return null;var g=void 0!==p?p:Math.min.apply(Math,t),b=(void 0!==m?m:Math.max.apply(Math,t))-g||1,C=t.map(function(e,n){return{x:n/(t.length-1)*i,y:u-(e-g)/b*u}}).map(function(e,n){return"".concat(0===n?"M":"L"," ").concat(e.x,",").concat(e.y)}).join(" "),y="\n ".concat(C,"\n L ").concat(i,",").concat(u,"\n L 0,").concat(u,"\n Z\n ");return r("svg",I({width:i,height:u,className:"st-line-area-chart ".concat(w),style:{display:"block"}},{children:[e("path",{d:y,fill:c||"var(--st-chart-fill-color)",fillOpacity:d,stroke:"none"}),e("path",{d:C,fill:"none",stroke:l||"var(--st-chart-color)",strokeWidth:v,strokeLinecap:"round",strokeLinejoin:"round"})]}))},Jn=Object.freeze({__proto__:null,default:Kn}),Vn=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),w=void 0!==v?v:Math.max.apply(Math,r),p=w-h||1,m=(o-c*(r.length-1))/r.length,g=0>h,b=g?a*(w/p):a;return e("svg",I({width:o,height:a,className:"st-bar-chart ".concat(d),style:{display:"block"}},{children:r.map(function(n,r){var t=r*(m+c),o=(n-h)/p*a,i=a-o,l=o;return g&&(0>n?(l=Math.abs(n)/p*a,i=b):i=b-(l=n/p*a)),e("rect",{x:t,y:i,width:m,height:l,fill:u||"var(--st-chart-color)",rx:1},r)})}))},Xn=Object.freeze({__proto__:null,default:Vn});export{Wn as A,S as B,ee as C,ne as D,re as F,Kn as L,Un as S,C as _,Ee as a,I as b,_n as c,Vn as d,X as e,jn as f,Y as g,$ as h,Z as i,Q as j,te as k,J as u};
2
+ //# sourceMappingURL=index-2bf0d1e9.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-2bf0d1e9.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import SimpleTable from "./components/simple-table/SimpleTable";
2
+ import LineAreaChart from "./components/charts/LineAreaChart";
3
+ import BarChart from "./components/charts/BarChart";
2
4
  import BoundingBox from "./types/BoundingBox";
3
5
  import Cell from "./types/Cell";
4
6
  import CellChangeProps from "./types/CellChangeProps";
@@ -6,7 +8,7 @@ import CellValue from "./types/CellValue";
6
8
  import ColumnEditorPosition from "./types/ColumnEditorPosition";
7
9
  import DragHandlerProps from "./types/DragHandlerProps";
8
10
  import EnumOption from "./types/EnumOption";
9
- import HeaderObject, { Accessor, ColumnType, ShowWhen, ValueFormatter, ValueFormatterProps } from "./types/HeaderObject";
11
+ import HeaderObject, { Accessor, ChartOptions, ColumnType, ShowWhen, ValueFormatter, ValueFormatterProps } from "./types/HeaderObject";
10
12
  import { AggregationConfig, AggregationType } from "./types/AggregationTypes";
11
13
  import OnSortProps from "./types/OnSortProps";
12
14
  import Row from "./types/Row";
@@ -26,6 +28,6 @@ import HeaderRendererProps, { HeaderRenderer } from "./types/HeaderRendererProps
26
28
  import HeaderDropdownProps, { HeaderDropdown } from "./types/HeaderDropdownProps";
27
29
  import { RowButtonProps } from "./types/RowButton";
28
30
  import FooterRendererProps from "./types/FooterRendererProps";
29
- export { SimpleTable };
31
+ export { SimpleTable, LineAreaChart, BarChart };
30
32
  export * from "./icons";
31
- export type { Accessor, AggregationConfig, AggregationType, BoundingBox, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ColumnEditorPosition, ColumnType, DragHandlerProps, EnumOption, ExportToCSVProps, FilterCondition, FooterRendererProps, HeaderDropdown, HeaderDropdownProps, HeaderObject, HeaderRenderer, HeaderRendererProps, OnSortProps, Row, RowButtonProps, RowSelectionChangeProps, SetHeaderRenameProps, SharedTableProps, ShowWhen, SortColumn, TableCellProps, TableFilterState, TableHeaderProps, TableRefType, TableRowProps, Theme, UpdateDataProps, ValueFormatter, ValueFormatterProps, };
33
+ export type { Accessor, AggregationConfig, AggregationType, BoundingBox, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ChartOptions, ColumnEditorPosition, ColumnType, DragHandlerProps, EnumOption, ExportToCSVProps, FilterCondition, FooterRendererProps, HeaderDropdown, HeaderDropdownProps, HeaderObject, HeaderRenderer, HeaderRendererProps, OnSortProps, Row, RowButtonProps, RowSelectionChangeProps, SetHeaderRenameProps, SharedTableProps, ShowWhen, SortColumn, TableCellProps, TableFilterState, TableHeaderProps, TableRefType, TableRowProps, Theme, UpdateDataProps, ValueFormatter, ValueFormatterProps, };
package/dist/index.es.js CHANGED
@@ -1,2 +1,2 @@
1
- export{d as AngleDownIcon,e as AngleLeftIcon,g as AngleRightIcon,h as AngleUpIcon,i as AscIcon,C as CheckIcon,D as DescIcon,F as FilterIcon,j as SelectIcon,S as SimpleTable}from"./index-c670ccb7.js";import"react/jsx-runtime";import"react";
1
+ export{e as AngleDownIcon,g as AngleLeftIcon,h as AngleRightIcon,i as AngleUpIcon,j as AscIcon,d as BarChart,C as CheckIcon,D as DescIcon,F as FilterIcon,L as LineAreaChart,k as SelectIcon,S as SimpleTable}from"./index-2bf0d1e9.js";import"react/jsx-runtime";import"react";
2
2
  //# sourceMappingURL=index.es.js.map