simple-table-core 0.8.33 → 0.8.35

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 (37) hide show
  1. package/dist/components/date-picker/DatePicker.d.ts +2 -3
  2. package/dist/components/dropdown/Dropdown.d.ts +3 -1
  3. package/dist/components/filters/BooleanFilter.d.ts +11 -0
  4. package/dist/components/filters/DateFilter.d.ts +11 -0
  5. package/dist/components/filters/EnumFilter.d.ts +11 -0
  6. package/dist/components/filters/FilterBar.d.ts +2 -0
  7. package/dist/components/filters/FilterDropdown.d.ts +11 -0
  8. package/dist/components/filters/NumberFilter.d.ts +11 -0
  9. package/dist/components/filters/StringFilter.d.ts +11 -0
  10. package/dist/components/filters/shared/CustomSelect.d.ts +14 -0
  11. package/dist/components/filters/shared/FilterActions.d.ts +9 -0
  12. package/dist/components/filters/shared/FilterContainer.d.ts +6 -0
  13. package/dist/components/filters/shared/FilterInput.d.ts +11 -0
  14. package/dist/components/filters/shared/FilterSection.d.ts +7 -0
  15. package/dist/components/filters/shared/FilterSelect.d.ts +11 -0
  16. package/dist/components/filters/shared/OperatorSelector.d.ts +8 -0
  17. package/dist/components/simple-table/editable-cells/DateDropdownEdit.d.ts +3 -3
  18. package/dist/components/simple-table/editable-cells/EditableCell.d.ts +2 -1
  19. package/dist/components/simple-table/editable-cells/EnumDropdownEdit.d.ts +3 -3
  20. package/dist/context/TableContext.d.ts +5 -0
  21. package/dist/hooks/useContentHeight.d.ts +6 -0
  22. package/dist/hooks/useHandleOutsideClick.d.ts +8 -0
  23. package/dist/hooks/useTableFilters.d.ts +14 -0
  24. package/dist/hooks/useWindowResize.d.ts +7 -0
  25. package/dist/icons/CheckIcon.d.ts +6 -0
  26. package/dist/icons/FilterIcon.d.ts +6 -0
  27. package/dist/icons/SelectIcon.d.ts +2 -0
  28. package/dist/index.d.ts +2 -1
  29. package/dist/index.es.js +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/styles.css +1 -1
  32. package/dist/types/EnumOption.d.ts +5 -0
  33. package/dist/types/FilterTypes.d.ts +21 -0
  34. package/dist/types/HeaderObject.d.ts +3 -1
  35. package/dist/utils/filterUtils.d.ts +5 -0
  36. package/package.json +1 -1
  37. package/dist/components/Animate.d.ts +0 -10
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(n),o=function(){return o=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},o.apply(this,arguments)};function i(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{d(r.next(e))}catch(e){i(e)}}function c(e){try{d(r.throw(e))}catch(e){i(e)}}function d(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}d((r=r.apply(e,n||[])).next())}))}function a(e,n){var t,r,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=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(d){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(e,i)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,d])}}}function c(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var d=function(e){var n=e.accessor,t=e.rowIndex;return"cell-".concat(n,"-").concat(t)},s=function(e){var n=e.hiddenColumns,t=e.header,r=e.pinned;return n[t.accessor]?null:!r&&!t.pinned||t.pinned===r||null},l=function(e){var n=e.rowId,t=e.accessor;return"".concat(n,"-").concat(t)},u=function(e){return e.hide?[]:e.children&&0!==e.children.length?e.children.flatMap((function(e){return u(e)})):[e]},h=function(e){if(e.hide)return 0;if("number"==typeof e.width)return e.width;if("string"==typeof e.width&&e.width.endsWith("px"))return parseFloat(e.width);var n=document.getElementById(d({accessor:e.accessor,rowIndex:0}));return(null==n?void 0:n.offsetWidth)||150},f=function(e){var n,t=e.width;"string"==typeof t&&t.includes("fr")&&(e.width=(null===(n=document.getElementById(d({accessor:e.accessor,rowIndex:0})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.forEach((function(e){f(e)}))},v=function(e){return"number"==typeof e.minWidth?e.minWidth:40},m=function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return"".concat(n,"-").concat(t,"-").concat(r)},g=n.createContext(void 0),p=function(n){var t=n.children,r=n.value;return e.jsx(g.Provider,o({value:r},{children:t}))},w=function(){var e=n.useContext(g);if(void 0===e)throw new Error("useTableContext must be used within a TableProvider");return e},x=function(t){var r=t.currentPage,c=t.hideFooter,d=t.onPageChange,s=t.onNextPage,l=t.shouldPaginate,u=t.totalPages,h=w(),f=h.nextIcon,v=h.prevIcon,m=n.useState(!0),g=m[0],p=m[1],x=!(r>1),C=!(r<u)&&!s||!g&&r===u;if(c||!l)return null;var I=function(){if(u<=15)return Array.from({length:u},(function(e,n){return n+1}));var e,n,t=[],o=15;if(r<=Math.ceil(7.5))e=1,n=14;else if(r>=u-Math.floor(7.5))e=Math.max(1,u-o+1),n=u;else{var i=Math.floor(7);e=r-i,n=r+(o-i-1)}for(var a=e;a<=n;a++)t.push(a);return n<u-1&&(t.push(-1),t.push(u)),t}();return e.jsxs("div",o({className:"st-footer"},{children:[e.jsx("button",o({className:"st-next-prev-btn ".concat(x?"disabled":""),onClick:function(){var e=r-1;e>=1&&d(e)},disabled:x},{children:v})),e.jsx("button",o({className:"st-next-prev-btn ".concat(C?"disabled":""),onClick:function(){return i(void 0,void 0,void 0,(function(){var e,n;return a(this,(function(t){switch(t.label){case 0:return e=r===u,n=r+1,s&&e?[4,s(r)]:[3,2];case 1:if(!t.sent())return p(!1),[2];t.label=2;case 2:return(n<=u||s)&&d(n),[2]}}))}))},disabled:C},{children:f})),I.map((function(n,t){return n<0?e.jsx("span",o({className:"st-page-ellipsis"},{children:"..."}),"ellipsis-".concat(n)):e.jsx("button",o({onClick:function(){return function(e){e>=1&&e<=u&&d(e)}(n)},className:"st-page-btn ".concat(r===n?"active":"")},{children:n}),"page-".concat(n))}))]}))},C=function(n){var t=n.className;return e.jsx("svg",o({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},I=function(n){var t=n.className;return e.jsx("svg",o({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},b=function(n){var t=n.className;return e.jsx("svg",o({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},y=function(e){return e.position*(e.rowHeight+1)-1},R=function(e){return e.position*(e.rowHeight+1)},E=function(t){var r=t.children,i=t.onClose,a=t.open,c=t.setOpen,d=t.width,s=t.containerRef,l=w().mainBodyRef,u=n.useRef(null),h=n.useRef(null),f=n.useState("bottom-left"),v=f[0],m=f[1],g=n.useState({}),p=g[0],x=g[1],C=n.useState(!1),I=C[0],b=C[1];return n.useEffect((function(){a&&u.current?(b(!1),!h.current&&u.current.parentElement&&(h.current=u.current.parentElement),requestAnimationFrame((function(){if(u.current&&h.current){var e,n=u.current,t=h.current.getBoundingClientRect(),r=n.offsetHeight,o=d||n.offsetWidth,i=(e=(null==s?void 0:s.current)?s.current.getBoundingClientRect():(null==l?void 0:l.current)?l.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-t.bottom,a=t.top-e.top,c="bottom",f={};(r>i&&r<=a||r>i&&a>i)&&(c="top");var v="left";o>e.right-t.right+t.width&&(v="right"),"bottom"===c?f.top=t.bottom+4:f.bottom=window.innerHeight-t.top+4,"left"===v?f.left=t.left:f.right=window.innerWidth-t.right,m("".concat(c,"-").concat(v)),x(f),b(!0)}}))):a||b(!1)}),[a,d,s,l]),n.useEffect((function(){var e=function(e){if(a&&u.current){var n=e.target;u.current&&!u.current.contains(n)&&(c(!1),null==i||i())}};return a&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}}),[a,i,c]),n.useEffect((function(){var e=function(e){u.current&&!u.current.contains(e.target)&&(c(!1),null==i||i())};return a&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[i,a,c]),n.useEffect((function(){var e=function(e){"Escape"===e.key&&a&&(c(!1),null==i||i())};return a&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[i,a,c]),a?e.jsx("div",o({ref:u,className:"st-dropdown-content st-dropdown-".concat(v),style:o({width:d?"".concat(d,"px"):"auto",visibility:I?"visible":"hidden"},p)},{children:r})):null},S=function(n){var t=n.children,r=n.onClick,i=n.isSelected,a=void 0!==i&&i,c=n.disabled,d=void 0!==c&&c,s=n.className,l=void 0===s?"":s;return e.jsx("div",o({className:"st-dropdown-item ".concat(a?"selected":""," ").concat(d?"disabled":""," ").concat(l),onClick:function(){!d&&r&&r()},role:"option","aria-selected":a,"aria-disabled":d},{children:t}))},j=function(t){var r=t.onBlur,i=t.onChange,a=t.open,c=t.setOpen,d=t.value,s=n.useState(d),l=s[0],u=s[1];n.useEffect((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);var h=function(e){u(e),i(e),c(!1),r()};return e.jsxs(E,o({open:a,onClose:function(){r()},setOpen:c,width:120},{children:[e.jsx(S,o({isSelected:!0===l,onClick:function(){return h(!0)}},{children:"True"})),e.jsx(S,o({isSelected:!1===l,onClick:function(){return h(!1)}},{children:"False"}))]}))},M=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:o,onChange:function(e){var n=e.target.value;i(n)}})},k=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:r.toString(),onBlur:o,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&i(n)}})},W=function(t){var r,i,a=t.value,c=t.onChange,d=t.onClose,s=w(),l=s.nextIcon,u=s.prevIcon,h=n.useState(a||new Date),f=h[0],v=h[1],m=n.useState("days"),g=m[0],p=m[1],x=function(e,n){return new Date(e,n+1,0).getDate()};return e.jsxs("div",o({className:"st-datepicker"},{children:[e.jsxs("div",o({className:"st-datepicker-header"},{children:["days"===g&&e.jsxs(e.Fragment,{children:[e.jsx("button",o({onClick:function(){v(new Date(f.getFullYear(),f.getMonth()-1,1))},className:"st-datepicker-nav-btn"},{children:u})),e.jsxs("div",o({className:"st-datepicker-header-label",onClick:function(){return p("months")}},{children:[(i=f,i.toLocaleString("default",{month:"long"}))," ",f.getFullYear()]})),e.jsx("button",o({onClick:function(){v(new Date(f.getFullYear(),f.getMonth()+1,1))},className:"st-datepicker-nav-btn"},{children:l}))]}),"months"===g&&e.jsx("div",o({className:"st-datepicker-header-label",onClick:function(){return p("years")}},{children:f.getFullYear()})),"years"===g&&e.jsx("div",o({className:"st-datepicker-header-label"},{children:"Select Year"}))]})),e.jsxs("div",o({className:"st-datepicker-grid st-datepicker-".concat(g,"-grid")},{children:["days"===g&&function(){var n=[],t=f.getFullYear(),r=f.getMonth(),i=x(t,r),s=function(e,n){return new Date(e,n,1).getDay()}(t,r),l=x(t,r-1);["Su","Mo","Tu","We","Th","Fr","Sa"].forEach((function(t,r){n.push(e.jsx("div",o({className:"st-datepicker-weekday"},{children:t}),"header-".concat(r)))}));for(var u=function(t){var r=l-s+t+1;n.push(e.jsx("div",o({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth()-1,e);v(n),c(n),null==d||d()}(r)}},{children:r}),"prev-".concat(r)))},h=0;h<s;h++)u(h);for(var m=function(i){var s=i===(new Date).getDate()&&r===(new Date).getMonth()&&t===(new Date).getFullYear(),l=i===new Date(a).getDate()&&r===new Date(a).getMonth()&&t===new Date(a).getFullYear();n.push(e.jsx("div",o({className:"st-datepicker-day ".concat(s?"today":""," ").concat(l?"selected":""),onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth(),e);v(n),c(n),null==d||d()}(i)}},{children:i}),"day-".concat(i)))},g=1;g<=i;g++)m(g);var p=35-(s+i),w=function(t){n.push(e.jsx("div",o({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth()+1,e);v(n),c(n),null==d||d()}(t)}},{children:t}),"next-".concat(t)))};for(g=1;g<=p;g++)w(g);return n}(),"months"===g&&(r=[],Array.from({length:12},(function(e,n){return new Date(2e3,n,1).toLocaleString("default",{month:"short"})})).forEach((function(n,t){var i=t===f.getMonth();r.push(e.jsx("div",o({className:"st-datepicker-month ".concat(i?"selected":""),onClick:function(){return function(e){v(new Date(f.getFullYear(),e,1)),p("days")}(t)}},{children:n}),"month-".concat(t)))})),r),"years"===g&&function(){for(var n=[],t=f.getFullYear(),r=t-6,i=function(r){var i=r===t;n.push(e.jsx("div",o({className:"st-datepicker-year ".concat(i?"selected":""),onClick:function(){return function(e){v(new Date(e,f.getMonth(),1)),p("months")}(r)}},{children:r}),"year-".concat(r)))},a=r;a<r+12;a++)i(a);return n}()]})),e.jsx("div",o({className:"st-datepicker-footer"},{children:e.jsx("button",o({className:"st-datepicker-today-btn",onClick:function(){var e=new Date;v(e),c(e),null==d||d()}},{children:"Today"}))}))]}))},D=function(t){var r=t.onBlur,i=t.onChange,a=t.open,c=t.setOpen,d=t.value,s=n.useState(function(e){var n=e.split("-").map(Number),t=n[0],r=n[1],o=n[2],i=new Date;return i.setUTCFullYear(t),i.setUTCMonth(r-1),i.setUTCDate(o),isNaN(i.getTime())?new Date:i}(d)),l=s[0],u=s[1];n.useEffect((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);var h=function(){r()};return e.jsx(E,o({open:a,onClose:h,setOpen:c,width:280},{children:e.jsx(W,{value:l,onChange:function(e){u(e),i(e.toISOString()),c(!1),r()},onClose:h})}))},H=function(t){var r=t.onBlur,i=t.onChange,a=t.open,c=t.options,d=t.setOpen,s=t.value,l=n.useState(s||""),u=l[0],h=l[1];n.useEffect((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);return e.jsx(E,o({open:a,onClose:function(){r()},setOpen:d,width:150},{children:e.jsx("div",o({className:"st-enum-dropdown-content"},{children:c.map((function(n){return e.jsx(S,o({isSelected:u===n,onClick:function(){return h(e=n),i(e),d(!1),void r();var e}},{children:n}),n)}))}))}))},N=function(n){var t=n.enumOptions,r=void 0===t?[]:t,o=n.onChange,i=n.setIsEditing,a=n.type,c=void 0===a?"string":a,d=n.value,s=function(){i(!1)};if("boolean"===c&&"boolean"==typeof d)return e.jsx(j,{onBlur:s,onChange:function(e){return o(e)},open:!0,setOpen:i,value:d});if("date"===c){var l="string"==typeof d?d:"";return e.jsx(D,{onBlur:s,onChange:function(e){return o(e)},open:!0,setOpen:i,value:l})}if("enum"===c){var u="string"==typeof d?d:"";return e.jsx(H,{onBlur:s,onChange:function(e){return o(e)},open:!0,options:r,setOpen:i,value:u})}if("number"===c&&"number"==typeof d)return e.jsx(k,{defaultValue:d,onBlur:s,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}});var h=null==d?"":String(d);return e.jsx(M,{defaultValue:h,onBlur:s,onChange:function(e){return o(e)}})},L=0,B=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();(0===L||o-L>=r)&&(L=o,n(t))}},T=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(T);var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=T(e[t]));return n},O=Date.now(),P={screenX:0,screenY:0},F=function(e,n,t){void 0===t&&(t=[]);for(var r=0;r<e.length;r++){var o=e[r];if(o.accessor===n)return c(c([],t,!0),[r],!1);if(o.children&&o.children.length>0){var i=F(o.children,n,c(c([],t,!0),[r],!1));if(i)return i}}return null};var A=function(e){var t,r,o=e.draggedHeaderRef,i=e.headersRef,a=e.hoveredHeaderRef,c=e.onColumnOrderChange,d=e.onTableHeaderDragEnd,s=(t=i.current,r=n.useRef(t),n.useEffect((function(){JSON.stringify(r.current)!==JSON.stringify(t)&&(r.current=t)}),[t]),r.current);return{handleDragStart:function(e){o.current=e,O=Date.now()},handleDragOver:function(e){var n,t,r=e.event,c=e.hoveredHeader;if(r.preventDefault(),i.current){var l=r.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),u=r.screenX,h=r.screenY,f=Math.sqrt(Math.pow(u-P.screenX,2)+Math.pow(h-P.screenY,2));a.current=c;var v=i.current,m=F(v,(null===(n=o.current)||void 0===n?void 0:n.accessor)||""),g=F(v,c.accessor);if(m&&g){var p=m.length,w=g.length,x=g;if(p!==w){var C=w-p;C>0&&(x=g.slice(0,-C))}var I=function(e,n,t){var r=T(e),o=!1;function i(e,n){for(var t=e,r=0;r<n.length-1;r++)t=t[n[r]].children;return t[n[n.length-1]]}function a(e,n,t){for(var r=e,i=0;i<n.length-1;i++){if(!r[n[i]].children){o=!0;break}r=r[n[i]].children}r[n[n.length-1]]=t}var c=i(r,n);return a(r,n,i(r,t)),a(r,t,c),{newHeaders:r,emergencyBreak:o}}(v,m,x),b=I.newHeaders,y=I.emergencyBreak;if(!(l||c.accessor===(null===(t=o.current)||void 0===t?void 0:t.accessor)||null===o.current||f<10||0===m.length||0===x.length||JSON.stringify(b)===JSON.stringify(i.current)||y)){var R=Date.now();JSON.stringify(b)===JSON.stringify(s)&&(R-O<1500||f<40)||(O=R,P={screenX:u,screenY:h},d(b))}}}},handleDragEnd:function(){o.current=null,a.current=null,null==c||c(i.current)}}},z=function(e){var n=e.content,t=e.header;return"boolean"==typeof n?n?"True":"False":"date"===t.type&&null!==n&&("string"==typeof n||"number"==typeof n||"object"==typeof n&&n instanceof Date)?new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):n},U=n.forwardRef((function(t,r){var i,a,c=t.borderClass,s=t.colIndex,u=t.header,h=t.isHighlighted,f=t.isInitialFocused,v=t.nestedIndex,m=t.onExpandRowClick,g=t.rowIndex,p=t.visibleRow,x=w(),C=x.cellRegistry,I=x.cellUpdateFlash,b=x.collapseIcon,y=x.draggedHeaderRef,R=x.expandIcon,E=x.handleMouseDown,S=x.handleMouseOver,j=x.headersRef,M=x.hoveredHeaderRef,k=x.onCellEdit,W=x.onTableHeaderDragEnd,D=x.theme,H=x.useOddColumnBackground,L=p.depth,T=p.row,O=n.useState(T.rowData[u.accessor]),P=O[0],F=O[1],U=n.useState(!1),Y=U[0],q=U[1],J=n.useState(!1),X=J[0],V=J[1],K=n.useRef(null),G=A({draggedHeaderRef:y,headersRef:j,hoveredHeaderRef:M,onTableHeaderDragEnd:W}).handleDragOver,_=B(),$="cell-".concat(g,"-").concat(s),Q=l({rowId:T.rowMeta.rowId,accessor:u.accessor});n.useEffect((function(){if(C){var e="".concat(T.rowMeta.rowId,"-").concat(u.accessor);return C.set(e,{updateContent:function(e){P!==e?(F(e),I&&(V(!0),K.current&&clearTimeout(K.current),K.current=setTimeout((function(){V(!1)}),800))):F(e)}}),function(){C.delete(e),K.current&&clearTimeout(K.current)}}}),[C,I,T.rowMeta.rowId,u.accessor,P]),n.useEffect((function(){if(X){var e=setTimeout((function(){V(!1)}),850);return function(){return clearTimeout(e)}}}),[X]),n.useEffect((function(){F(T.rowData[u.accessor])}),[T.rowData,u.accessor]),n.useEffect((function(){h||q(!1)}),[h]);var Z="boolean"===u.type||"date"===u.type||"enum"===u.type,ee=Boolean(null===(a=null===(i=T.rowMeta)||void 0===i?void 0:i.children)||void 0===a?void 0:a.length),ne=Boolean(null==u?void 0:u.isEditable),te="st-cell ".concat(L>0&&u.expandable?"st-cell-depth-".concat(L):""," ").concat(h?f?"st-cell-selected-first ".concat(c):"st-cell-selected ".concat(c):""," ").concat(ne?"clickable":""," ").concat(X?"st-cell-updating":""," ").concat(H?v%2==0?"even-column":"odd-column":""),re=n.useCallback((function(e){F(e),null==k||k({accessor:u.accessor,newValue:e,row:T})}),[u.accessor,k,T]);return Y&&!Z?e.jsx("div",o({className:"st-cell-editing",id:d({accessor:u.accessor,rowIndex:g+1})},{children:e.jsx(N,{enumOptions:u.enumOptions,onChange:re,setIsEditing:q,type:u.type,value:P})})):e.jsxs("div",o({className:te,id:$,onDoubleClick:function(){return u.isEditable&&q(!0)},onMouseDown:function(){return E({rowIndex:g,colIndex:s,rowId:T.rowMeta.rowId})},onMouseOver:function(){return S({rowIndex:g,colIndex:s,rowId:T.rowMeta.rowId})},onDragOver:function(e){return _({callback:G,callbackProps:{event:e,hoveredHeader:u},limit:50})},onKeyDown:function(e){"F2"!==e.key&&"Enter"!==e.key||!u.isEditable||Y||(e.preventDefault(),q(!0))},ref:r,"data-row-index":g,"data-col-index":s,"data-row-id":T.rowMeta.rowId,"data-accessor":u.accessor},{children:[u.expandable&&ee?T.rowMeta.isExpanded?e.jsx("div",o({className:"st-sort-icon-container",onClick:function(){return m(T.rowMeta.rowId)},onMouseDown:function(e){e.stopPropagation()}},{children:b})):e.jsx("div",o({className:"st-sort-icon-container",onClick:function(){return m(T.rowMeta.rowId)},onMouseDown:function(e){e.stopPropagation()}},{children:R})):null,e.jsx("span",o({className:"st-cell-content ".concat("right"===u.align?"right-aligned":"center"===u.align?"center-aligned":"left-aligned")},{children:e.jsx("span",{children:u.cellRenderer?u.cellRenderer({accessor:u.accessor,colIndex:s,row:T,theme:D}):z({content:P,header:u})})})),Y&&Z&&e.jsx(N,{enumOptions:u.enumOptions,onChange:re,setIsEditing:q,type:u.type,value:P})]}),Q)})),Y=function(n){var t=n.children,r=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}(n,["children"]);return w().allowAnimations?e.jsx(q,o({},r,{children:t})):e.jsx(e.Fragment,{children:t})},q=function(t){var r=t.children,o=t.isBody,i=t.pauseAnimation,a=t.rowIndex,c=n.useRef(!1),s=w(),l=s.draggedHeaderRef,u=s.headersRef,h=s.mainBodyRef,f=s.shouldPaginate,v=n.useState({}),m=v[0],g=v[1],p=n.useRef({}),x=u.current;return n.useLayoutEffect((function(){if(x){var e=function(e){var n=e.currentHeaders,t=e.draggedHeaderRef,r=e.rowIndex,o={};return n.forEach((function(e){var n;if(e){var i=document.getElementById(d({accessor:e.accessor,rowIndex:r}));if(i){var a=i.getAnimations().some((function(e){return"running"===e.playState})),c=i.getBoundingClientRect();a&&(null===(n=null==t?void 0:t.current)||void 0===n?void 0:n.accessor)!==e.accessor?o[e.accessor]=!1:o[e.accessor]=c}}})),o}({currentHeaders:x,draggedHeaderRef:l,rowIndex:a});JSON.stringify(e)!==JSON.stringify(m)&&(p.current=m,g(e))}}),[m,x,l,o,a]),n.useLayoutEffect((function(){var e=h.current,n=function(){c.current=!0},t=function(){c.current=!1};return null==e||e.addEventListener("scroll",n),null==e||e.addEventListener("scrollend",t),function(){null==e||e.removeEventListener("scroll",n),null==e||e.removeEventListener("scrollend",t)}}),[l,h]),n.useEffect((function(){i||c.current||Object.keys(p.current).length&&x&&x.forEach((function(e){var n=document.getElementById(d({accessor:e.accessor,rowIndex:a}));if(n){var t=p.current[e.accessor],r=m[e.accessor];if(t&&r){var o=t.left-r.left,i=f?0:t.top-r.top,c=Math.abs(o),s=Math.abs(i);(c>10||s>10)&&requestAnimationFrame((function(){n.style.transform="translate(".concat(o,"px, ").concat(i,"px)"),n.style.transition="transform 0s",requestAnimationFrame((function(){n.style.transform="",n.style.transition="transform ".concat(400,"ms ease-out")}))}))}}}))}),[m,x,o,i,p,a,f]),e.jsx(e.Fragment,{children:r})},J=function(n){var t=n.columnIndexStart,r=n.columnIndices,i=n.headers,a=n.hiddenColumns,c=n.isWidthDragging,l=n.onExpandRowClick,u=n.pinned,h=n.rowIndex,f=n.rowIndices,v=n.visibleRow,m=i.filter((function(e){return s({hiddenColumns:a,header:e,pinned:u})}));return e.jsx(Y,o({isBody:!0,pauseAnimation:c,rowIndex:h+1},{children:m.map((function(n,o){return e.jsx(X,{columnIndices:r,header:n,headers:i,hiddenColumns:a,nestedIndex:o+(null!=t?t:0),onExpandRowClick:l,pinned:u,rowIndex:h,rowIndices:f,visibleRow:v},d({accessor:n.accessor,rowIndex:h+1}))}))}))},X=function(t){var r=t.columnIndices,o=t.header,i=t.headers,a=t.hiddenColumns,c=t.nestedIndex,l=t.onExpandRowClick,u=t.pinned,h=t.rowIndex,f=t.rowIndices,v=t.visibleRow,m=r[o.accessor],g=w(),p=g.getBorderClass,x=g.isSelected,C=g.isInitialFocusedCell;if(o.children){var I=o.children.filter((function(e){return s({hiddenColumns:a,header:e,pinned:u})}));return e.jsx(n.Fragment,{children:I.map((function(n){return e.jsx(X,{columnIndices:r,header:n,headers:i,hiddenColumns:a,nestedIndex:c,onExpandRowClick:l,pinned:u,rowIndex:h,rowIndices:f,visibleRow:v},d({accessor:n.accessor,rowIndex:h+1}))}))})}var b={rowIndex:h,colIndex:m,rowId:v.row.rowMeta.rowId},y=p(b),R=x(b),E=C(b);return e.jsx(U,{borderClass:y,colIndex:m,header:o,isHighlighted:R,isInitialFocused:E,nestedIndex:c,onExpandRowClick:l,rowIndex:h,visibleRow:v},d({accessor:o.accessor,rowIndex:h+1}))},V=function(n){var t=n.columnIndices,r=n.columnIndexStart,i=n.gridTemplateColumns,a=n.headers,c=n.hiddenColumns,d=n.hoveredIndex,s=n.index,l=n.isWidthDragging,u=n.onExpandRowClick,h=n.pinned,f=n.rowHeight,v=n.rowIndices,m=n.setHoveredIndex,g=n.visibleRow,p=w().useHoverRowBackground,x=g.position,C=x%2==0;return e.jsx("div",o({className:"st-row ".concat(C?"even":"odd"," ").concat(d===s&&p?"hovered":""),onMouseEnter:function(){m(s)},style:{gridTemplateColumns:i,top:R({position:x,rowHeight:f}),height:"".concat(f,"px")}},{children:e.jsx(J,{columnIndexStart:r,columnIndices:t,headers:a,hiddenColumns:c,isWidthDragging:l,onExpandRowClick:u,pinned:h,rowIndex:s,rowIndices:v,visibleRow:g},s)}))},K=function(n){var t=n.displayStrongBorder,r=n.position,i=n.rowHeight,a=n.templateColumns;return e.jsx("div",o({className:"st-row-separator ".concat(t?"st-last-group-row":""),style:{display:"grid",gridTemplateColumns:a,position:"absolute",top:y({position:r,rowHeight:i}),minWidth:"100%"}},{children:e.jsx("div",{style:{gridColumn:"1 / -1"}})}))},G=n.createContext(void 0),_=["default"],$=function(e){var t=e.childRef,r=e.children,o=function(){var e=n.useContext(G);if(!e)throw new Error("useScrollSyncContext must be used within a ScrollSyncProvider");return e}(),i=o.registerPane,a=o.unregisterPane;return n.useEffect((function(){return t.current&&i(t.current,_),function(){t.current&&a(t.current,_)}}),[t,i,a]),n.cloneElement(r,{ref:function(e){t.current=e}})},Q=function(n){var t=n.condition,r=n.wrapper,o=n.children;return e.jsx(e.Fragment,{children:t?r(o):e.jsx(e.Fragment,{children:o})})},Z=function(t){var r=t.columnIndexStart,i=t.columnIndices,a=t.headers,c=t.hiddenColumns,d=t.hoveredIndex,s=t.isWidthDragging,l=t.onExpandRowClick,u=t.pinned,h=t.ref,f=t.rowHeight,v=t.rowIndices,m=t.setHoveredIndex,g=t.templateColumns,p=t.totalHeight,w=t.visibleRows,x=t.width,C=u?"st-body-pinned-".concat(u):"st-body-main";return e.jsx(Q,o({condition:!u,wrapper:function(n){return e.jsx($,o({childRef:h},{children:n}))}},{children:e.jsx("div",o({className:C,ref:h,style:o({position:"relative",height:"".concat(p,"px"),width:x},!u&&{flexGrow:1})},{children:w.map((function(t,o){var h,p,x=w[o-1],C=Boolean((null==x?void 0:x.depth)!==(null==t?void 0:t.depth)&&(null===(p=null===(h=null==t?void 0:t.row.rowMeta)||void 0===h?void 0:h.children)||void 0===p?void 0:p.length)&&0===t.depth);return e.jsxs(n.Fragment,{children:[0!==o&&e.jsx(K,{displayStrongBorder:C,position:t.position,rowHeight:f,templateColumns:g}),e.jsx(V,{columnIndexStart:r,columnIndices:i,gridTemplateColumns:g,headers:a,hiddenColumns:c,hoveredIndex:d,index:o,isWidthDragging:s,onExpandRowClick:l,pinned:u,rowHeight:f,rowIndices:v,setHoveredIndex:m,visibleRow:t})]},t.position)}))}))}))};function ee(e){var n=e.headersRef,t=e.hiddenColumns,r=e.pinnedLeftColumns,o=e.pinnedRightColumns,i={},a=0,c=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 s({hiddenColumns:t,header:e})})).forEach((function(e,n){c(e,0===n)}))};return r.forEach((function(e,n){c(e,0===n)})),n.current.filter((function(e){return!e.pinned&&s({hiddenColumns:t,header:e})})).forEach((function(e,n){var t=0===n&&0===r.length;c(e,t)})),o.forEach((function(e){c(e,!1)})),i}var ne=function(t){var r=t.flattenedRows,i=t.headerContainerRef,a=t.isWidthDragging,c=t.mainTemplateColumns,d=t.pinnedLeftColumns,s=t.pinnedLeftTemplateColumns,l=t.pinnedLeftWidth,u=t.pinnedRightColumns,h=t.pinnedRightTemplateColumns,f=t.pinnedRightWidth,v=t.setFlattenedRows,m=t.setScrollTop,g=t.visibleRows,p=w(),x=p.headersRef,C=p.hiddenColumns,I=p.mainBodyRef,b=p.rowHeight,y=p.scrollbarWidth,R=p.tableBodyContainerRef,E=n.useState(null),S=E[0],j=E[1];!function(e){var t=e.headerContainerRef,r=e.mainSectionRef,o=e.scrollbarWidth,i=n.useState(!1),a=i[0],c=i[1];n.useEffect((function(){var e=null==t?void 0:t.current;if(a&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(o,"px")),function(){e.classList.remove("st-header-scroll-padding")}}),[t,a,o]),n.useEffect((function(){var e=null==t?void 0:t.current,n=null==r?void 0:r.current;if(n&&e){var o=function(){if(n){var e=n.scrollHeight>n.clientHeight;c(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(n),function(){n&&i.unobserve(n)}}}),[t,r])}({headerContainerRef:i,mainSectionRef:R,scrollbarWidth:y});var M,k,W=n.useRef(null),D=(M=0,(k=function(e){e.forEach((function(e){M+=1,e.rowMeta.isExpanded&&e.rowMeta.children&&k(e.rowMeta.children)}))})(r),M)*(b+1)-1,H=n.useMemo((function(){return ee({headersRef:x,hiddenColumns:C,pinnedLeftColumns:d,pinnedRightColumns:u})}),[x,C,d,u]),N=n.useMemo((function(){var e={};return g.forEach((function(n,t){var r=String(n.row.rowMeta.rowId);e[r]=t})),e}),[g]),L=function(e){var n=function(t){return t.rowMeta.rowId===e&&t.rowMeta.children?o(o({},t),{rowMeta:o(o({},t.rowMeta),{isExpanded:!t.rowMeta.isExpanded})}):t.rowMeta.children?o(o({},t),{rowMeta:o(o({},t.rowMeta),{children:t.rowMeta.children.map(n)})}):t};v((function(e){return e.map(n)}))},B={columnIndices:H,headerContainerRef:i,headers:x.current,hiddenColumns:C,hoveredIndex:S,isWidthDragging:a,rowHeight:b,rowIndices:N,setHoveredIndex:j,visibleRows:g};return e.jsxs("div",o({className:"st-body-container",onMouseLeave:function(){return j(null)},onScroll:function(e){var n=e.currentTarget.scrollTop;W.current&&cancelAnimationFrame(W.current),W.current=requestAnimationFrame((function(){m(n)}))},ref:R},{children:[d.length>0&&e.jsx(Z,o({},B,{onExpandRowClick:L,pinned:"left",templateColumns:s,totalHeight:D,width:l})),e.jsx(Z,o({},B,{columnIndexStart:d.length,onExpandRowClick:L,ref:I,templateColumns:c,totalHeight:D})),u.length>0&&e.jsx(Z,o({},B,{columnIndexStart:d.length+c.length,onExpandRowClick:L,pinned:"right",templateColumns:h,totalHeight:D,width:f}))]}))},te=function(e){return void 0===e&&(e=0),e?e+1:0},re=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=e.setMainBodyWidth,i=e.setPinnedLeftWidth,a=e.setPinnedRightWidth,c=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=n.pinned,i=0;return t.forEach((function(e){e.hide||e.pinned!==o||(e.accessor===n.accessor?i+=r:u(e).forEach((function(e){e.hide||(e.accessor===n.accessor?i+=r:i+=h(e))})))})),n.pinned?te(i):i}({header:n,headers:t,newWidth:r});"left"===n.pinned?i(c):"right"===n.pinned?a(c):n.pinned||o(c)},oe=function(e){var n=e.event,t=e.forceUpdate,r=e.gridColumnEnd,o=e.gridColumnStart,i=e.header,a=e.headersRef,c=e.setIsWidthDragging,d=e.setMainBodyWidth,s=e.setPinnedLeftWidth,l=e.setPinnedRightWidth,h=e.startWidth;c(!0),n.preventDefault();var m="clientX"in n?n.clientX:n.touches[0].clientX,g="touches"in n;if(i&&!i.hide){var p=v(i),w=r-o>1,x=w?u(i):[i],C=function(e){var n="right"===i.pinned?m-e:e-m;if(w&&x.length>1)ie({delta:n,header:i,headersRef:a,leafHeaders:x,minWidth:p,setMainBodyWidth:d,setPinnedLeftWidth:s,setPinnedRightWidth:l,startWidth:h});else{var r=Math.max(h+n,p);i.width=r,re({header:i,headers:a.current,newWidth:r,setMainBodyWidth:d,setPinnedLeftWidth:s,setPinnedRightWidth:l})}a.current.forEach((function(e){f(e)})),t()};if(g){var I=function(e){var n=e.touches[0];C(n.clientX)},b=function(){document.removeEventListener("touchmove",I),document.removeEventListener("touchend",b),c(!1)};document.addEventListener("touchmove",I),document.addEventListener("touchend",b)}else{var y=function(e){C(e.clientX)},R=function(){document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",R),c(!1)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",R)}}},ie=function(e){var n=e.delta,t=e.header,r=e.headersRef,o=e.leafHeaders,i=e.minWidth,a=e.setMainBodyWidth,c=e.setPinnedLeftWidth,d=e.setPinnedRightWidth,s=e.startWidth,l=o.reduce((function(e,n){return Math.min(e,v(n))}),40),u=o.reduce((function(e,n){return e+("number"==typeof n.width?n.width:150)}),0),h=Math.max(s+n,l);re({header:t,headers:r.current,newWidth:h,setMainBodyWidth:a,setPinnedLeftWidth:c,setPinnedRightWidth:d});var f=h-u;o.forEach((function(e){var n="number"==typeof e.width?e.width:150,t=f*(n/u),r=Math.max(n+t,i);e.width=r}))},ae=n.forwardRef((function(t,r){var i,a,s=t.colIndex,l=t.forceHeadersUpdate,u=t.gridColumnEnd,h=t.gridColumnStart,f=t.gridRowEnd,v=t.gridRowStart,m=t.header,g=t.reverse,p=t.sort,x=w(),C=x.columnReordering,I=x.columnResizing,b=x.draggedHeaderRef,y=x.forceUpdate,R=x.headersRef,E=x.hoveredHeaderRef,S=x.onColumnOrderChange,j=x.onSort,M=x.onTableHeaderDragEnd,k=x.rowHeight,W=x.selectColumns,D=x.selectableColumns,H=x.setInitialFocusedCell,N=x.setIsWidthDragging,L=x.setMainBodyWidth,T=x.setPinnedLeftWidth,O=x.setPinnedRightWidth,P=x.setSelectedCells,F=x.setSelectedColumns,z=x.sortDownIcon,U=x.sortUpIcon,Y=Boolean(null==m?void 0:m.isSortable),q="st-header-cell ".concat(m.accessor===(null===(i=E.current)||void 0===i?void 0:i.accessor)?"st-hovered":""," ").concat((null===(a=b.current)||void 0===a?void 0:a.accessor)===m.accessor?"st-dragging":""," ").concat(Y?"clickable":""," ").concat(C&&!Y?"columnReordering":""," ").concat(m.children?"parent":""),J=A({draggedHeaderRef:b,headersRef:R,hoveredHeaderRef:E,onColumnOrderChange:S,onTableHeaderDragEnd:M}),X=J.handleDragStart,V=J.handleDragEnd,K=J.handleDragOver,G=B(),_=function(e){var n=e.event,t=e.header;if(D){var r=function(e,n){if(!e.children||0===e.children.length)return[n];var t=[],r=function(e,n){if(!e.children||0===e.children.length)return t.push(n),n+1;for(var o=n,i=0,a=e.children;i<a.length;i++){var c=a[i];o=r(c,o)}return o};return r(e,n),t}(t,s);return n.shiftKey&&W?F((function(e){if(0===e.size)return new Set(r);var n=r[0],t=Array.from(e).sort((function(e,n){return e-n})),o=t[0],i=Math.abs(n-o);t.forEach((function(e){var t=Math.abs(n-e);t<i&&(i=t,o=e)}));var a,d,s,l,u=c(c([],(a=o,d=n,s=Math.min(a,d),l=Math.max(a,d),Array.from({length:l-s+1},(function(e,n){return s+n}))),!0),r,!0);return new Set(c(c([],Array.from(e),!0),u,!0))})):W&&W(r),P(new Set),void H(null)}t.isSortable&&j(s,t.accessor)};if(n.useEffect((function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}}),[]),!m)return null;var $=I&&e.jsx("div",o({className:"st-header-resize-handle-container",onMouseDown:function(e){var n;G({callback:oe,callbackProps:{event:e.nativeEvent,forceUpdate:y,gridColumnEnd:u,gridColumnStart:h,header:m,headersRef:R,setIsWidthDragging:N,setMainBodyWidth:L,setPinnedLeftWidth:T,setPinnedRightWidth:O,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})},onTouchStart:function(e){var n;G({callback:oe,callbackProps:{event:e,forceUpdate:y,gridColumnEnd:u,gridColumnStart:h,header:m,headersRef:R,setIsWidthDragging:N,setMainBodyWidth:L,setPinnedLeftWidth:T,setPinnedRightWidth:O,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}},{children:e.jsx("div",{className:"st-header-resize-handle"})})),Q=p&&p.key.accessor===m.accessor&&e.jsxs("div",o({className:"st-sort-icon-container",onClick:function(e){return _({event:e,header:m})}},{children:["ascending"===p.direction&&U&&U,"descending"===p.direction&&z&&z]}));return e.jsxs("div",o({className:q,id:d({accessor:m.accessor,rowIndex:0}),onDragOver:function(e){G({callback:K,callbackProps:{event:e,hoveredHeader:m},limit:50})},ref:r,style:o(o({gridRowStart:v,gridRowEnd:f,gridColumnStart:h,gridColumnEnd:u},u-h>1?{}:{width:m.width}),f-v>1?{}:{height:k})},{children:[g&&$,"right"===m.align&&Q,e.jsx("div",o({className:"st-header-label",draggable:C&&!m.disableReorder,onClick:function(e){return _({event:e,header:m})},onDragEnd:function(e){e.preventDefault(),V(),l()},onDragStart:function(e){C&&m&&function(e){X(e)}(m)}},{children:e.jsx("span",o({className:"st-header-label-text ".concat("right"===m.align?"right-aligned":"center"===m.align?"center-aligned":"left-aligned")},{children:null==m?void 0:m.label}))})),"right"!==m.align&&Q,!g&&$]}))})),ce=function(t){var r=t.columnIndices,i=t.gridTemplateColumns,a=t.handleScroll,c=t.headersRef,d=t.hiddenColumns,l=t.maxDepth,u=t.pinned,h=t.sectionRef,f=t.sort,v=n.useReducer((function(e){return e+1}),0)[1],m=n.useMemo((function(){var e=[],n=1,t=function(o,i,a){var c,h;if(void 0===a&&(a=!1),!s({hiddenColumns:d,header:o,pinned:u}))return 0;a||n++;var f=null!==(h=null===(c=o.children)||void 0===c?void 0:c.filter((function(e){return s({hiddenColumns:d,header:e,pinned:u})})).length)&&void 0!==h?h:0,v=n,m=f>0?v+f:v+1,g=i,p=f>0?i+1:l+1;if(e.push({header:o,gridColumnStart:v,gridColumnEnd:m,gridRowStart:g,gridRowEnd:p,colIndex:r[o.accessor]}),o.children){var w=!0;o.children.forEach((function(e){s({hiddenColumns:d,header:e,pinned:u})&&(t(e,i+1,w),w=!1)}))}return m-v},o=c.current.filter((function(e){return s({hiddenColumns:d,header:e,pinned:u})})),i=!0;return o.forEach((function(e){t(e,1,i),i=!1})),e}),[c,d,l,u,r]);return e.jsx(Q,o({condition:!u,wrapper:function(n){return e.jsx($,o({childRef:h},{children:n}))}},{children:e.jsx("div",o({className:"st-header-".concat(u?"pinned-".concat(u):"main")},a&&{onScroll:a},{ref:h,style:{gridTemplateColumns:i,display:"grid",position:"relative"}},{children:e.jsx(Y,o({rowIndex:0},{children:m.map((function(t){return e.jsx(ae,{colIndex:t.colIndex,forceHeadersUpdate:v,gridColumnEnd:t.gridColumnEnd,gridColumnStart:t.gridColumnStart,gridRowEnd:t.gridRowEnd,gridRowStart:t.gridRowStart,header:t.header,ref:n.createRef(),reverse:"right"===u,sort:f},t.header.accessor)}))}))}))}))},de=function(e){var n;return(null===(n=e.children)||void 0===n?void 0:n.length)?1+Math.max.apply(Math,e.children.map(de)):1},se=function(t){var r=t.centerHeaderRef,i=t.headerContainerRef,a=t.headersRef,c=t.hiddenColumns,d=t.mainTemplateColumns,l=t.pinnedLeftColumns,u=t.pinnedLeftTemplateColumns,h=t.pinnedRightColumns,f=t.pinnedRightTemplateColumns,v=t.sort,m=w(),g=m.pinnedLeftRef,p=m.pinnedRightRef,x=m.setPinnedLeftWidth,C=m.setPinnedRightWidth,I=n.useMemo((function(){return ee({headersRef:a,hiddenColumns:c,pinnedLeftColumns:l,pinnedRightColumns:h})}),[a,c,l,h]),b=n.useMemo((function(){var e=a.current,n=0;return e.forEach((function(e){if(s({hiddenColumns:c,header:e})){var t=de(e);n=Math.max(n,t)}})),{maxDepth:n}}),[a,c]).maxDepth;return n.useLayoutEffect((function(){var e,n;x(te(null===(e=g.current)||void 0===e?void 0:e.clientWidth)),C(te(null===(n=p.current)||void 0===n?void 0:n.clientWidth))}),[g,p,x,C]),e.jsxs("div",o({className:"st-header-container",ref:i},{children:[l.length>0&&e.jsx(ce,{columnIndices:I,gridTemplateColumns:u,handleScroll:void 0,headersRef:a,hiddenColumns:c,maxDepth:b,pinned:"left",sectionRef:g,sort:v}),e.jsx(ce,{columnIndices:I,gridTemplateColumns:d,handleScroll:void 0,headersRef:a,hiddenColumns:c,maxDepth:b,sectionRef:r,sort:v}),h.length>0&&e.jsx(ce,{columnIndices:I,gridTemplateColumns:f,handleScroll:void 0,headersRef:a,hiddenColumns:c,maxDepth:b,pinned:"right",sectionRef:p,sort:v})]}))},le=function(e){var n=e.headers,t=e.hiddenColumns,r=function(e){var n=e.headers,o=e.flattenedHeaders;return n.forEach((function(e){!0!==t[e.accessor]&&(e.children?r({headers:e.children,flattenedHeaders:o}):o.push(e))})),o},o=r({headers:n,flattenedHeaders:[]});return"".concat(o.map((function(e){return function(e){var n=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof t&&t.endsWith("fr")?"minmax(".concat(n,", ").concat(t,")"):"max(".concat(n,", ").concat(t,")"):t}(e)})).join(" "))},ue=function(t){var r=t.flattenedRows,i=t.isWidthDragging,a=t.pinnedLeftWidth,c=t.pinnedRightWidth,d=t.setFlattenedRows,s=t.setScrollTop,l=t.sort,u=t.visibleRows,h=w(),f=h.columnResizing,v=h.editColumns,m=h.headersRef,g=h.hiddenColumns,p=n.useRef(null),x=n.useRef(null),C=m.current.filter((function(e){return!e.pinned})),I=m.current.filter((function(e){return"left"===e.pinned})),b=m.current.filter((function(e){return"right"===e.pinned})),y=n.useMemo((function(){return le({headers:I,hiddenColumns:g})}),[I,g]),R=n.useMemo((function(){return le({headers:C,hiddenColumns:g})}),[C,g]),E=n.useMemo((function(){return le({headers:b,hiddenColumns:g})}),[b,g]),S={centerHeaderRef:x,headerContainerRef:p,headersRef:m,hiddenColumns:g,mainTemplateColumns:R,pinnedLeftColumns:I,pinnedLeftTemplateColumns:y,pinnedRightColumns:b,pinnedRightTemplateColumns:E,sort:l},j={flattenedRows:r,headerContainerRef:p,isWidthDragging:i,mainTemplateColumns:R,pinnedLeftColumns:I,pinnedLeftTemplateColumns:y,pinnedLeftWidth:a,pinnedRightColumns:b,pinnedRightTemplateColumns:E,pinnedRightWidth:c,setFlattenedRows:d,setScrollTop:s,visibleRows:u};return e.jsxs("div",o({className:"st-content ".concat(f?"st-resizeable":"st-not-resizeable"),style:{width:v?"calc(100% - 27.5px)":"100%"}},{children:[e.jsx(se,o({},S)),e.jsx(ne,o({},j))]}))},he=function(t){var r,i,a=t.mainBodyWidth,c=t.mainBodyRef,d=t.pinnedLeftWidth,s=t.pinnedRightWidth,l=t.setMainBodyWidth,u=t.tableBodyContainerRef,h=w().editColumns,f=n.useState(!1),v=f[0],m=f[1],g=n.useRef(null),p=u.current&&u.current.scrollHeight>u.current.clientHeight,x=h?28:0,C=(h?s+1:s)+(u.current&&p?u.current.offsetWidth-u.current.clientWidth:0);return n.useEffect((function(){setTimeout((function(){!function(){var e;if(c.current){var n=null===(e=c.current)||void 0===e?void 0:e.scrollWidth;l(n||0)}}()}),1)}),[c,l]),n.useEffect((function(){setTimeout((function(){!function(){if(c.current){var e=c.current.clientWidth;m(a>e)}}()}),1)}),[c,a,l]),v?e.jsxs("div",o({className:"st-horizontal-scrollbar-container"},{children:[d>0&&e.jsx("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:d,height:null===(r=g.current)||void 0===r?void 0:r.offsetHeight}}),a>0&&e.jsx($,o({childRef:g},{children:e.jsx("div",o({className:"st-horizontal-scrollbar-middle",ref:g,style:{flexGrow:1}},{children:e.jsx("div",{style:{width:a,height:".3px"}})}))})),s>0&&e.jsx("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:C,height:null===(i=g.current)||void 0===i?void 0:i.offsetHeight}}),x>0&&e.jsx("div",{style:{width:x-1.5,height:"100%",flexShrink:0}})]})):null},fe={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"ascending"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"ascending"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"ascending"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"ascending"===t?i:-i},enum:function(e,n,t){return fe.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"ascending"===t?-1:1:null==n?"ascending"===t?1:-1:"string"==typeof e&&"string"==typeof n?fe.string(e,n,t):"number"==typeof e&&"number"==typeof n?fe.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?fe.boolean(e,n,t):fe.string(String(e),String(n),t)}},ve=function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"ascending"===r?-1:1;if(null==n||""===n)return"ascending"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=String(e);if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(n=r[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(t)||0},i=o(e),a=o(n);return fe.number(i,a,r)}return"date"===t?fe.date(String(e),String(n),r):"boolean"===t?fe.boolean(Boolean(e),Boolean(n),r):"enum"===t?fe.enum(String(e),String(n),r):fe.string(String(e),String(n),r)},me=function(e,n,t){var r,i=(null===(r=n.key)||void 0===r?void 0:r.type)||"string",a=n.direction,d=new Map,s=new Map,l="";e.forEach((function(e){var t;if(e.rowData&&!0===e.rowMeta.isExpanded&&!0===n.key.expandable){var r=(e.rowData.sector||"group_".concat(d.size)).toString();l=r,s.set(l,e),d.has(l)||d.set(l,[])}else if(l){var o=d.get(l)||[];o.push(e),d.set(l,o)}else{var i="default";d.has(i)||d.set(i,[]),null===(t=d.get(i))||void 0===t||t.push(e)}}));var u=[];return d.forEach((function(e,r){if(s.has(r)){var d=s.get(r);d.rowMeta.children&&d.rowMeta.children.length>0&&(d.rowMeta.children=ge(d.rowMeta.children,n,t)),u.push(d)}var l=c([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,o=e.rowData[r],c=t.rowData[r];return ve(o,c,i,a)}));u.push.apply(u,l.map((function(e){var r=o({},e);if(r.rowMeta.children&&r.rowMeta.children.length>0){var i=ge(r.rowMeta.children,n,t);r.rowMeta=o(o({},r.rowMeta),{children:i})}return r})))})),u},ge=function(e,n,t){var r=t.find((function(e){return e.accessor===n.key.accessor})),i=(null==r?void 0:r.type)||"string",a=n.direction;return c([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,o=e.rowData[r],c=t.rowData[r];return ve(o,c,i,a)})).map((function(e){return e.rowMeta.children&&e.rowMeta.children.length>0?o(o({},e),{rowMeta:o(o({},e.rowMeta),{children:ge(e.rowMeta.children,n,t)})}):e}))},pe=function(e){var t=e.headers,r=e.tableRows,o=n.useState(null),i=o[0],a=o[1],c=n.useMemo((function(){var e={};return t.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[t]),d=n.useState(c),s=d[0],l=d[1],u=n.useMemo((function(){if(!i)return r;var e=function(e,n,t){return{sortedData:me(n,t,e),newSortConfig:t}}(t,r,i).sortedData;return e}),[r,i,t]);return{hiddenColumns:s,setHiddenColumns:l,setSort:a,sort:i,sortedRows:u,updateSort:function(e,n){var r=function(e){for(var t=0,o=e;t<o.length;t++){var i=o[t];if(i.accessor===n)return i;if(i.children&&i.children.length>0){var a=r(i.children);if(a)return a}}},o=r(t);o&&a((function(e){return e&&e.key.accessor===n?"ascending"===e.direction?{key:o,direction:"descending"}:null:{key:o,direction:"ascending"}}))}}},we=function(n){var t=n.checked,r=void 0!==t&&t,i=n.children,a=n.onChange;return e.jsxs("label",o({className:"st-checkbox-label"},{children:[e.jsx("input",{checked:r,className:"st-checkbox-input",onChange:function(){a&&a(!r)},type:"checkbox"}),e.jsx("span",o({className:"st-checkbox-custom ".concat(r?"st-checked":"")},{children:r&&e.jsx("span",{className:"st-checkbox-checkmark"})})),i]}))},xe=function(e,n,t,r){void 0===r&&(r=new Set);for(var o=0,i=e;o<i.length;o++){var a=i[o];if(!r.has(a.accessor)&&(r.add(a.accessor),a.children&&a.children.length>0)){var c=a.children.some((function(e){return e.accessor===n})),d=!1;if(!c)for(var s=0,l=a.children;s<l.length;s++){var u=l[s];if(xe([u],n,t,r),!1===t[u.accessor]){d=!0;break}}(c||d)&&(t[a.accessor]=!1)}}},Ce=function(e,n){return e.every((function(e){return!0===n[e.accessor]}))},Ie=function(e,n){e.forEach((function(e){e.children&&e.children.length>0&&(Ie(e.children,n),Ce(e.children,n)&&(n[e.accessor]=!0))}))},be=function(t){var r=t.allHeaders,i=t.depth,a=void 0===i?0:i,c=t.header,d=t.hiddenColumns,s=t.setHiddenColumns,l=n.useState(!0),f=l[0],v=l[1],m=w(),g=m.expandIcon,p=m.collapseIcon,x=m.headersRef,C=m.setMainBodyWidth,I=m.setPinnedLeftWidth,b=m.setPinnedRightWidth,y="".concat(16*a,"px"),R=c.children&&c.children.length>0,E=d[c.accessor]||R&&c.children&&Ce(c.children,d);return e.jsxs(e.Fragment,{children:[e.jsxs("div",o({className:"st-header-checkbox-item",style:{paddingLeft:y}},{children:[e.jsx("div",o({className:"st-header-icon-container"},{children:R?e.jsx("div",o({className:"st-collapsible-header-icon",onClick:function(e){e.stopPropagation(),v(!f)}},{children:f?p:g})):null})),e.jsx(we,o({checked:E,onChange:function(e){var n=o({},d);(n[c.accessor]=e,e)?Ie(r,n):(xe(r,c.accessor,n),R&&c.children&&c.children.length>0&&c.children.every((function(e){return!0===d[e.accessor]}))&&c.children[0]&&(n[c.children[0].accessor]=!1,xe(r,c.children[0].accessor,n)));s(n),x.current.forEach((function(e){e.hide=!0===n[e.accessor]})),function(e){var n=e.headers,t=e.setMainBodyWidth,r=e.setPinnedLeftWidth,o=e.setPinnedRightWidth,i=0,a=0,c=0;n.forEach((function(e){if(!e.hide){var n=u(e).reduce((function(e,n){return e+h(n)}),0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:c+=n}}));var d=te(i),s=te(a);r(d),o(s),t(c)}({headers:x.current,setMainBodyWidth:C,setPinnedLeftWidth:I,setPinnedRightWidth:b})}},{children:c.label}))]})),R&&f&&c.children&&e.jsx("div",o({className:"st-nested-headers"},{children:c.children.map((function(n,t){return e.jsx(be,{allHeaders:r,depth:a+1,header:n,hiddenColumns:d,setHiddenColumns:s},"".concat(n.accessor,"-").concat(t))}))}))]})},ye=function(n){var t=n.headers,r=n.open,i=n.position,a=n.setHiddenColumns,c=n.hiddenColumns,d="left"===i?"left":"";return e.jsx("div",o({className:"st-column-editor-popout ".concat(r?"open":""," ").concat(d),onClick:function(e){return e.stopPropagation()}},{children:e.jsx("div",o({className:"st-column-editor-popout-content"},{children:t.map((function(n,r){return e.jsx(be,{header:n,hiddenColumns:c,setHiddenColumns:a,allHeaders:t},"".concat(n.accessor,"-").concat(r))}))}))}))},Re=function(t){var r=t.columnEditorText,i=t.editColumns,a=t.editColumnsInitOpen,c=t.headers,d=t.hiddenColumns,s=t.position,l=void 0===s?"right":s,u=t.setHiddenColumns,h=n.useState(a),f=h[0],v=h[1];return i?e.jsxs("div",o({className:"st-column-editor ".concat(f?"open":""," ").concat(l),onClick:function(){return function(e){v(e)}(!f)},style:{width:28}},{children:[e.jsx("div",o({className:"st-column-editor-text"},{children:r})),e.jsx(ye,{headers:c,open:f,position:l,setHiddenColumns:u,hiddenColumns:d})]})):null},Ee=function(n){var t=n.className;return e.jsx("svg",o({"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"down-long",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e.jsx("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"})}))},Se=function(n){var t=n.className;return e.jsx("svg",o({"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"up-long",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e.jsx("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"})}))},je=function(t){var i=t.children,a=n.useRef({}),c=n.useCallback((function(e,n){return!!a.current[n]&&a.current[n].find((function(n){return n===e}))}),[]),d=n.useCallback((function(e,n){var t=e.clientWidth,r=e.scrollLeft;e.scrollWidth-t>0&&(n.scrollLeft=r)}),[]),s=n.useCallback((function(e){e.onscroll=null}),[]),l=n.useCallback((function(e,n){e.onscroll=function(){window.requestAnimationFrame((function(){n.forEach((function(n){var t;null===(t=a.current[n])||void 0===t||t.forEach((function(n){e!==n&&(s(n),d(e,n),window.requestAnimationFrame((function(){var e=Object.keys(a.current).filter((function(e){return a.current[e].includes(n)}));l(n,e)})))}))}))}))}}),[s,d]),u=n.useCallback((function(e,n){n.forEach((function(n){a.current[n]||(a.current[n]=[]),c(e,n)||(a.current[n].length>0&&d(a.current[n][0],e),a.current[n].push(e))})),l(e,n)}),[c,d,l]),h=n.useCallback((function(e,n){n.forEach((function(n){if(c(e,n)){s(e);var t=a.current[n].indexOf(e);-1!==t&&a.current[n].splice(t,1)}}))}),[c,s]);return e.jsx(G.Provider,o({value:{registerPane:u,unregisterPane:h}},{children:r.default.Children.only(i)}))},Me=function(t){var r=t.allowAnimations,i=void 0!==r&&r,a=t.cellUpdateFlash,c=void 0!==a&&a,d=t.collapseIcon,s=void 0===d?e.jsx(b,{className:"st-sort-icon"}):d,h=t.columnEditorPosition,f=void 0===h?"right":h,v=t.columnEditorText,g=void 0===v?"Columns":v,w=t.columnReordering,y=void 0!==w&&w,R=t.columnResizing,E=void 0!==R&&R,S=t.defaultHeaders,j=t.editColumns,M=void 0!==j&&j,k=t.editColumnsInitOpen,W=void 0!==k&&k,D=t.expandIcon,H=void 0===D?e.jsx(I,{className:"st-sort-icon"}):D,N=t.height,L=t.hideFooter,B=void 0!==L&&L,T=t.nextIcon,O=void 0===T?e.jsx(I,{className:"st-next-prev-icon"}):T,P=t.onCellEdit,F=t.onColumnOrderChange,A=t.onGridReady,z=t.onNextPage,U=t.prevIcon,Y=void 0===U?e.jsx(C,{className:"st-next-prev-icon"}):U,q=t.rowHeight,J=void 0===q?40:q,X=t.rows,V=t.rowsPerPage,K=void 0===V?10:V,G=t.selectableCells,_=void 0!==G&&G,$=t.selectableColumns,Q=void 0!==$&&$,Z=t.shouldPaginate,ee=void 0!==Z&&Z,ne=t.sortDownIcon,te=void 0===ne?e.jsx(Ee,{className:"st-sort-icon"}):ne,re=t.sortUpIcon,oe=void 0===re?e.jsx(Se,{className:"st-sort-icon"}):re,ie=t.tableRef,ae=t.theme,ce=void 0===ae?"light":ae,de=t.useHoverRowBackground,se=void 0===de||de,le=t.useOddEvenRowBackground,fe=void 0===le||le,ve=t.useOddColumnBackground,me=void 0!==ve&&ve;me&&(fe=!1);var ge=n.useRef(null),we=n.useRef(S),xe=n.useRef(null),Ce=n.useRef(null),Ie=n.useRef(null),be=n.useRef(null),ye=n.useRef(null),Me=n.useState(1),ke=Me[0],We=Me[1],De=n.useState(!1),He=De[0],Ne=De[1],Le=n.useState(0),Be=Le[0],Te=Le[1],Oe=n.useState(0),Pe=Oe[0],Fe=Oe[1],Ae=n.useState(0),ze=Ae[0],Ue=Ae[1],Ye=n.useState(0),qe=Ye[0],Je=Ye[1],Xe=n.useState(0),Ve=Xe[0],Ke=Xe[1],Ge=pe({headers:we.current,tableRows:X}),_e=Ge.sort,$e=Ge.sortedRows,Qe=Ge.hiddenColumns,Ze=Ge.setHiddenColumns,en=Ge.updateSort;n.useEffect((function(){null==A||A()}),[A]);var nn=n.useMemo((function(){if(!ee)return $e;var e=(ke-1)*K,n=e+K;return $e.slice(e,n)}),[ke,K,ee,$e]),tn=n.useState(nn),rn=tn[0],on=tn[1];n.useEffect((function(){on(nn)}),[nn]);var an=n.useMemo((function(){var e;if(!N)return window.innerHeight-J;var n=document.querySelector(".simple-table-root"),t=0;if(N.endsWith("px"))t=parseInt(N,10);else if(N.endsWith("vh")){var r=parseInt(N,10);t=window.innerHeight*r/100}else if(N.endsWith("%")){var o=parseInt(N,10);t=((null===(e=null==n?void 0:n.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*o/100}else t=window.innerHeight;return Math.max(0,t-J)}),[N,J]),cn=n.useMemo((function(){return function(e){var n=e.bufferRowCount,t=e.contentHeight,r=e.flattenedRows,o=e.rowHeight,i=e.scrollTop,a=o+1,c=[],d=0,s=Math.max(0,i-a*n),l=i+t+a*n,u=function(e,n){for(var t,r=0,o=e;r<o.length;r++){var i=o[r],h=d*a;if(h>=l)break;h+a>s&&c.push({row:i,depth:n,position:d,isLastGroupRow:Boolean(null===(t=i.rowMeta.children)||void 0===t?void 0:t.length)&&n>1}),d+=1,i.rowMeta.isExpanded&&i.rowMeta.children&&u(i.rowMeta.children,n+1)}};return u(r,0),c}({bufferRowCount:5,contentHeight:an,flattenedRows:rn,rowHeight:J,scrollTop:qe})}),[an,J,rn,qe]),dn=n.useReducer((function(e){return e+1}),0)[1],sn=function(e){var t=e.selectableCells,r=e.headers,o=e.visibleRows,i=n.useState(new Set),a=i[0],c=i[1],d=n.useState(new Set),s=d[0],l=d[1],h=n.useState(null),f=h[0],v=h[1],g=n.useState(null),p=g[0],w=g[1],x=n.useRef(!1),C=n.useRef(null),I=n.useCallback((function(){var e=r.flatMap(u).filter((function(e){return!e.hide})),n=new Map;e.forEach((function(e,t){n.set(t,e.accessor)}));var t=Array.from(a).reduce((function(e,t){var r=t.split("-").map(Number),i=r[0],a=r[1];e[i]||(e[i]=[]);var c=n.get(a);return e[i][a]=c?o[i].row.rowData[c]:"",e}),{}),i=Object.values(t).map((function(e){return Object.values(e).join("\t")})).join("\n");a.size>0&&navigator.clipboard.writeText(i)}),[r,a,o]),b=n.useCallback((function(e,n){for(var t=new Set,r=Math.min(e.rowIndex,n.rowIndex),i=Math.max(e.rowIndex,n.rowIndex),a=Math.min(e.colIndex,n.colIndex),d=Math.max(e.colIndex,n.colIndex),s=r;s<=i;s++)for(var u=a;u<=d;u++)if(s>=0&&s<o.length){var h=o[s].row.rowMeta.rowId;t.add(m({colIndex:u,rowIndex:s,rowId:h}))}l(new Set),v(null),c(t)}),[o,l,v,c]),y=n.useCallback((function(e){if(e.rowIndex>=0&&e.rowIndex<o.length&&e.colIndex>=0&&e.colIndex<r.length){var n=m(e);l(new Set),v(null),c(new Set([n])),w(e)}}),[r.length,o.length,l,v,c,w]),R=n.useCallback((function(e,n){void 0===n&&(n=!1),c(new Set),w(null),l((function(t){var r=new Set(n?t:[]);return e.forEach((function(e){return r.add(e)})),r})),e.length>0&&v(e[e.length-1])}),[c,w,l,v]);n.useEffect((function(){var e=function(e){if(t&&p){var n=p.rowIndex,i=p.colIndex,a=p.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if(o[n].row.rowMeta.rowId!==a){var d=o.findIndex((function(e){return e.row.rowMeta.rowId===a}));if(-1===d)return;n=d}if("ArrowUp"===e.key){if(e.preventDefault(),n>0){var s={rowIndex:n-1,colIndex:i,rowId:o[n-1].row.rowMeta.rowId};y(s)}}else"ArrowDown"===e.key?(e.preventDefault(),n<o.length-1&&(s={rowIndex:n+1,colIndex:i,rowId:o[n+1].row.rowMeta.rowId},y(s))):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),i>0&&(s={rowIndex:n,colIndex:i-1,rowId:o[n].row.rowMeta.rowId},y(s))):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),i<r.length-1&&(s={rowIndex:n,colIndex:i+1,rowId:o[n].row.rowMeta.rowId},y(s))):"Escape"===e.key&&(c(new Set),l(new Set),v(null),C.current=null,w(null))}else I()}};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[I,r.length,p,b,y,t,o]);var E=n.useCallback((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=m({colIndex:n,rowIndex:t,rowId:r}),i=a.has(o),c=s.has(n);return i||c}),[a,s]),S=n.useCallback((function(e){var n,t,r,i,a,c,d=e.colIndex,l=e.rowIndex,u=e.rowId,h=[],f=null===(r=null===(t=null===(n=o[l-1])||void 0===n?void 0:n.row)||void 0===t?void 0:t.rowMeta)||void 0===r?void 0:r.rowId,v={colIndex:d,rowIndex:l+1,rowId:null===(c=null===(a=null===(i=o[l+1])||void 0===i?void 0:i.row)||void 0===a?void 0:a.rowMeta)||void 0===c?void 0:c.rowId},m={colIndex:d-1,rowIndex:l,rowId:u},g={colIndex:d+1,rowIndex:l,rowId:u};return(!E({colIndex:d,rowIndex:l-1,rowId:f})||s.has(d)&&0===l)&&h.push("st-selected-top-border"),(!E(v)||s.has(d)&&l===o.length-1)&&h.push("st-selected-bottom-border"),E(m)||h.push("st-selected-left-border"),E(g)||h.push("st-selected-right-border"),h.join(" ")}),[E,o,s]),j=n.useMemo((function(){return p?function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return n===p.rowIndex&&t===p.colIndex&&r===p.rowId}:function(){return!1}}),[p]);return{getBorderClass:S,handleMouseDown:function(e){var n=e.colIndex,r=e.rowIndex,o=e.rowId;if(t){x.current=!0,C.current={rowIndex:r,colIndex:n,rowId:o},l(new Set),v(null);var i=m({colIndex:n,rowIndex:r,rowId:o});c(new Set([i])),w({rowIndex:r,colIndex:n,rowId:o})}},handleMouseOver:function(e){var n=e.colIndex,r=e.rowIndex;if(e.rowId,t&&x.current&&C.current){for(var i=new Set,a=Math.min(C.current.rowIndex,r),d=Math.max(C.current.rowIndex,r),s=Math.min(C.current.colIndex,n),l=Math.max(C.current.colIndex,n),u=a;u<=d;u++)for(var h=s;h<=l;h++)if(u>=0&&u<o.length){var f=o[u].row.rowMeta.rowId;i.add(m({colIndex:h,rowIndex:u,rowId:f}))}c(i)}},handleMouseUp:function(){x.current=!1},isInitialFocusedCell:j,isSelected:E,lastSelectedColumnIndex:f,selectColumns:R,selectedCells:a,selectedColumns:s,setInitialFocusedCell:w,setSelectedCells:c,setSelectedColumns:l}}({selectableCells:_,headers:we.current,visibleRows:cn}),ln=sn.getBorderClass,un=sn.handleMouseDown,hn=sn.handleMouseOver,fn=sn.handleMouseUp,vn=sn.isInitialFocusedCell,mn=sn.isSelected,gn=sn.selectColumns,pn=sn.selectedCells,wn=sn.selectedColumns,xn=sn.setInitialFocusedCell,Cn=sn.setSelectedCells,In=sn.setSelectedColumns,bn=n.useCallback((function(e,n){en(e,n)}),[en]),yn=n.useCallback((function(e){we.current=e,dn()}),[]);n.useEffect((function(){var e=function(e){var n=e.target;n.closest(".st-cell")||Q&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label"))||(pn.size>0&&Cn(new Set),wn.size>0&&In(new Set))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[Q,pn,wn,Cn,In]),n.useLayoutEffect((function(){if(ye.current){var e=ye.current.offsetWidth-ye.current.clientWidth;Ke(e)}}),[]),n.useLayoutEffect((function(){var e=function(){if(dn(),ye.current){var e=ye.current.offsetWidth-ye.current.clientWidth;Ke(e)}};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var Rn=n.useRef(new Map);return n.useEffect((function(){ie&&(ie.current={updateData:function(e){var n,t,r,o,i=e.accessor,a=e.rowIndex,c=e.newValue,d=null===(t=null===(n=null==X?void 0:X[a])||void 0===n?void 0:n.rowMeta)||void 0===t?void 0:t.rowId;if(void 0!==d){var s=l({rowId:d,accessor:i}),u=Rn.current.get(s);u&&u.updateContent(c),void 0!==(null===(o=null===(r=null==X?void 0:X[a])||void 0===r?void 0:r.rowData)||void 0===o?void 0:o[i])&&(X[a].rowData[i]=c)}}})}),[ie,X]),e.jsx(p,o({value:{allowAnimations:i,cellRegistry:Rn.current,cellUpdateFlash:c,collapseIcon:s,columnReordering:y,columnResizing:E,draggedHeaderRef:ge,editColumns:M,expandIcon:H,forceUpdate:dn,getBorderClass:ln,handleMouseDown:un,handleMouseOver:hn,headersRef:we,hiddenColumns:Qe,hoveredHeaderRef:xe,isInitialFocusedCell:vn,isSelected:mn,mainBodyRef:Ce,nextIcon:O,onCellEdit:P,onColumnOrderChange:F,onSort:bn,onTableHeaderDragEnd:yn,pinnedLeftRef:Ie,pinnedRightRef:be,prevIcon:Y,rowHeight:J,scrollbarWidth:Ve,selectColumns:gn,selectableColumns:Q,setInitialFocusedCell:xn,setIsWidthDragging:Ne,setMainBodyWidth:Te,setPinnedLeftWidth:Fe,setPinnedRightWidth:Ue,setSelectedCells:Cn,setSelectedColumns:In,shouldPaginate:ee,sortDownIcon:te,sortUpIcon:oe,tableBodyContainerRef:ye,theme:ce,useOddColumnBackground:me,useHoverRowBackground:se,useOddEvenRowBackground:fe}},{children:e.jsx("div",o({className:"simple-table-root st-wrapper theme-".concat(ce),style:N?{height:N}:{}},{children:e.jsx(je,{children:e.jsxs("div",o({className:"st-wrapper-container"},{children:[e.jsxs("div",o({className:"st-content-wrapper",onMouseUp:fn,onMouseLeave:fn},{children:[e.jsx(ue,{flattenedRows:rn,isWidthDragging:He,pinnedLeftWidth:Pe,pinnedRightWidth:ze,setFlattenedRows:on,setScrollTop:Je,sort:_e,visibleRows:cn}),e.jsx(Re,{columnEditorText:g,editColumns:M,editColumnsInitOpen:W,headers:we.current,hiddenColumns:Qe,position:f,setHiddenColumns:Ze})]})),e.jsx(he,{mainBodyRef:Ce,mainBodyWidth:Be,pinnedLeftWidth:Pe,pinnedRightWidth:ze,setMainBodyWidth:Te,tableBodyContainerRef:ye}),e.jsx(x,{currentPage:ke,hideFooter:B,onPageChange:We,onNextPage:z,shouldPaginate:ee,totalPages:Math.ceil(X.length/K)})]}))})}))}))};exports.SimpleTable=function(t){var r=n.useState(!1),i=r[0],a=r[1];return n.useEffect((function(){a(!0)}),[]),i?e.jsx(Me,o({},t)):null};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(n),o=function(){return o=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},o.apply(this,arguments)};function i(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,l)}s((r=r.apply(e,n||[])).next())}))}function a(e,n){var t,r,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=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=n.call(e,i)}catch(e){l=[6,e],r=0}finally{t=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}function l(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var s=function(e){var n=e.accessor,t=e.rowIndex;return"cell-".concat(n,"-").concat(t)},c=function(e){var n=e.hiddenColumns,t=e.header,r=e.pinned;return n[t.accessor]?null:!r&&!t.pinned||t.pinned===r||null},u=function(e){var n=e.rowId,t=e.accessor;return"".concat(n,"-").concat(t)},d=function(e){return e.hide?[]:e.children&&0!==e.children.length?e.children.flatMap((function(e){return d(e)})):[e]},h=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(s({accessor:e.accessor,rowIndex:0}));return(null==n?void 0:n.offsetWidth)||150},f=function(e){var n,t=e.width;"string"==typeof t&&t.includes("fr")&&(e.width=(null===(n=document.getElementById(s({accessor:e.accessor,rowIndex:0})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.forEach((function(e){f(e)}))},v=function(e){return"number"==typeof e.minWidth?e.minWidth:40},p=function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return"".concat(n,"-").concat(t,"-").concat(r)},m=n.createContext(void 0),g=function(n){var t=n.children,r=n.value;return e.jsx(m.Provider,o({value:r},{children:t}))},w=function(){var e=n.useContext(m);if(void 0===e)throw new Error("useTableContext must be used within a TableProvider");return e},x=function(t){var r=t.currentPage,l=t.hideFooter,s=t.onPageChange,c=t.onNextPage,u=t.shouldPaginate,d=t.totalPages,h=w(),f=h.nextIcon,v=h.prevIcon,p=n.useState(!0),m=p[0],g=p[1],x=!(r>1),C=!(r<d)&&!c||!m&&r===d;if(l||!u)return null;var b=function(){if(d<=15)return Array.from({length:d},(function(e,n){return n+1}));var e,n,t=[],o=15;if(r<=Math.ceil(7.5))e=1,n=14;else if(r>=d-Math.floor(7.5))e=Math.max(1,d-o+1),n=d;else{var i=Math.floor(7);e=r-i,n=r+(o-i-1)}for(var a=e;a<=n;a++)t.push(a);return n<d-1&&(t.push(-1),t.push(d)),t}();return e.jsxs("div",o({className:"st-footer"},{children:[e.jsx("button",o({className:"st-next-prev-btn ".concat(x?"disabled":""),onClick:function(){var e=r-1;e>=1&&s(e)},disabled:x},{children:v})),e.jsx("button",o({className:"st-next-prev-btn ".concat(C?"disabled":""),onClick:function(){return i(void 0,void 0,void 0,(function(){var e,n;return a(this,(function(t){switch(t.label){case 0:return e=r===d,n=r+1,c&&e?[4,c(r)]:[3,2];case 1:if(!t.sent())return g(!1),[2];t.label=2;case 2:return(n<=d||c)&&s(n),[2]}}))}))},disabled:C},{children:f})),b.map((function(n,t){return n<0?e.jsx("span",o({className:"st-page-ellipsis"},{children:"..."}),"ellipsis-".concat(n)):e.jsx("button",o({onClick:function(){return function(e){e>=1&&e<=d&&s(e)}(n)},className:"st-page-btn ".concat(r===n?"active":"")},{children:n}),"page-".concat(n))}))]}))},C=function(n){var t=n.className;return e.jsx("svg",o({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},b=function(n){var t=n.className;return e.jsx("svg",o({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},y=function(n){var t=n.className;return e.jsx("svg",o({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},I=function(e){return e.position*(e.rowHeight+1)-1},j=function(e){return e.position*(e.rowHeight+1)},S=function(t){var r=t.children,i=t.onClose,a=t.open,l=t.overflow,s=void 0===l?"auto":l,c=t.setOpen,u=t.width,d=t.containerRef,h=t.positioning,f=void 0===h?"fixed":h,v=w().mainBodyRef,p=n.useRef(null),m=n.useRef(null),g=n.useState("bottom-left"),x=g[0],C=g[1],b=n.useState({}),y=b[0],I=b[1],j=n.useState(!1),S=j[0],R=j[1];return n.useEffect((function(){a&&p.current?(R(!1),!m.current&&p.current.parentElement&&(m.current=p.current.parentElement),requestAnimationFrame((function(){if(p.current&&m.current){var e,n=p.current,t=m.current.getBoundingClientRect(),r=n.offsetHeight,o=u||n.offsetWidth,i=(e=(null==d?void 0:d.current)?d.current.getBoundingClientRect():(null==v?void 0:v.current)?v.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-t.bottom,a=t.top-e.top,l="bottom",s={};(r>i&&r<=a||r>i&&a>i)&&(l="top");var c="left";o>e.right-t.right+t.width&&(c="right"),"fixed"===f?("bottom"===l?s.top=t.bottom+4:s.bottom=window.innerHeight-t.top+4,"left"===c?s.left=t.left:s.right=window.innerWidth-t.right):("bottom"===l?s.top=t.height+4:s.bottom=t.height+4,"left"===c?s.left=0:s.right=0),C("".concat(l,"-").concat(c)),I(s),R(!0)}}))):a||R(!1)}),[a,u,d,v,f]),n.useEffect((function(){var e=function(e){if(a&&p.current){var n=e.target;p.current&&!p.current.contains(n)&&(c(!1),null==i||i())}};return a&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}}),[a,i,c]),n.useEffect((function(){var e=function(e){p.current&&!p.current.contains(e.target)&&(c(!1),null==i||i())};return a&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[i,a,c]),n.useEffect((function(){var e=function(e){"Escape"===e.key&&a&&(c(!1),null==i||i())};return a&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[i,a,c]),a?e.jsx("div",o({ref:p,className:"st-dropdown-content st-dropdown-".concat(x),onClick:function(e){return e.stopPropagation()},style:o(o({position:f,width:u?"".concat(u,"px"):"auto",visibility:S?"visible":"hidden"},y),{overflow:s})},{children:r})):null},R=function(n){var t=n.children,r=n.onClick,i=n.isSelected,a=void 0!==i&&i,l=n.disabled,s=void 0!==l&&l,c=n.className,u=void 0===c?"":c;return e.jsx("div",o({className:"st-dropdown-item ".concat(a?"selected":""," ").concat(s?"disabled":""," ").concat(u),onClick:function(){!s&&r&&r()},role:"option","aria-selected":a,"aria-disabled":s},{children:t}))},E=function(t){var r=t.onBlur,i=t.onChange,a=t.open,l=t.setOpen,s=t.value,c=n.useState(s),u=c[0],d=c[1],h=function(e){d(e),i(e),l(!1),r()};return e.jsxs(S,o({open:a,onClose:function(){r()},setOpen:l,width:120},{children:[e.jsx(R,o({isSelected:!0===u,onClick:function(){return h(!0)}},{children:"True"})),e.jsx(R,o({isSelected:!1===u,onClick:function(){return h(!1)}},{children:"False"}))]}))},k=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:o,onChange:function(e){var n=e.target.value;i(n)}})},M=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:r.toString(),onBlur:o,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&i(n)}})},N=function(t){var r,i,a=t.onChange,l=t.onClose,s=t.value,c=w(),u=c.nextIcon,d=c.prevIcon,h=n.useState(s||new Date),f=h[0],v=h[1],p=n.useState("days"),m=p[0],g=p[1],x=function(e,n){return new Date(e,n+1,0).getDate()};return e.jsxs("div",o({className:"st-datepicker"},{children:[e.jsxs("div",o({className:"st-datepicker-header"},{children:["days"===m&&e.jsxs(e.Fragment,{children:[e.jsx("button",o({onClick:function(){v(new Date(f.getFullYear(),f.getMonth()-1,1))},className:"st-datepicker-nav-btn"},{children:d})),e.jsxs("div",o({className:"st-datepicker-header-label",onClick:function(){return g("months")}},{children:[(i=f,i.toLocaleString("default",{month:"long"}))," ",f.getFullYear()]})),e.jsx("button",o({onClick:function(){v(new Date(f.getFullYear(),f.getMonth()+1,1))},className:"st-datepicker-nav-btn"},{children:u}))]}),"months"===m&&e.jsx("div",o({className:"st-datepicker-header-label",onClick:function(){return g("years")}},{children:f.getFullYear()})),"years"===m&&e.jsx("div",o({className:"st-datepicker-header-label"},{children:"Select Year"}))]})),e.jsxs("div",o({className:"st-datepicker-grid st-datepicker-".concat(m,"-grid")},{children:["days"===m&&function(){var n=[],t=f.getFullYear(),r=f.getMonth(),i=x(t,r),c=function(e,n){return new Date(e,n,1).getDay()}(t,r),u=x(t,r-1);["Su","Mo","Tu","We","Th","Fr","Sa"].forEach((function(t,r){n.push(e.jsx("div",o({className:"st-datepicker-weekday"},{children:t}),"header-".concat(r)))}));for(var d=function(t){var r=u-c+t+1;n.push(e.jsx("div",o({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth()-1,e);v(n),a(n),null==l||l()}(r)}},{children:r}),"prev-".concat(r)))},h=0;h<c;h++)d(h);for(var p=function(i){var c=i===(new Date).getDate()&&r===(new Date).getMonth()&&t===(new Date).getFullYear(),u=i===new Date(s).getDate()&&r===new Date(s).getMonth()&&t===new Date(s).getFullYear();n.push(e.jsx("div",o({className:"st-datepicker-day ".concat(c?"today":""," ").concat(u?"selected":""),onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth(),e);v(n),a(n),null==l||l()}(i)}},{children:i}),"day-".concat(i)))},m=1;m<=i;m++)p(m);var g=35-(c+i),w=function(t){n.push(e.jsx("div",o({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth()+1,e);v(n),a(n),null==l||l()}(t)}},{children:t}),"next-".concat(t)))};for(m=1;m<=g;m++)w(m);return n}(),"months"===m&&(r=[],Array.from({length:12},(function(e,n){return new Date(2e3,n,1).toLocaleString("default",{month:"short"})})).forEach((function(n,t){var i=t===f.getMonth();r.push(e.jsx("div",o({className:"st-datepicker-month ".concat(i?"selected":""),onClick:function(){return function(e){v(new Date(f.getFullYear(),e,1)),g("days")}(t)}},{children:n}),"month-".concat(t)))})),r),"years"===m&&function(){for(var n=[],t=f.getFullYear(),r=t-6,i=function(r){var i=r===t;n.push(e.jsx("div",o({className:"st-datepicker-year ".concat(i?"selected":""),onClick:function(){return function(e){v(new Date(e,f.getMonth(),1)),g("months")}(r)}},{children:r}),"year-".concat(r)))},a=r;a<r+12;a++)i(a);return n}()]})),e.jsx("div",o({className:"st-datepicker-footer"},{children:e.jsx("button",o({className:"st-datepicker-today-btn",onClick:function(){var e=new Date;v(e),a(e),null==l||l()}},{children:"Today"}))}))]}))},D=function(e){if(!e)return new Date;var n=e.toString().split("-").map(Number),t=n[0],r=n[1],o=n[2],i=new Date;return i.setFullYear(t),i.setMonth(r-1),i.setDate(o),isNaN(i.getTime())?new Date:i},W=function(t){var r=t.onBlur,i=t.onChange,a=t.open,l=t.setOpen,s=t.value;n.useEffect((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);var c=function(){r()};return e.jsx(S,o({open:a,onClose:c,setOpen:l,width:280},{children:e.jsx(N,{value:D(s),onChange:function(e){var n=e.toISOString().split("T")[0];i(n),l(!1),r()},onClose:c})}))},F=function(t){var r=t.onBlur,i=t.onChange,a=t.open,l=t.options,s=t.setOpen,c=t.value,u=n.useState(c||""),d=u[0],h=u[1];return e.jsx(S,o({open:a,onClose:function(){r()},setOpen:s,width:150},{children:e.jsx("div",o({className:"st-enum-dropdown-content"},{children:l.map((function(n){return e.jsx(R,o({isSelected:d===n.value,onClick:function(){return e=n.value,h(e),i(e),s(!1),void r();var e}},{children:n.label}),n.value)}))}))}))},L=function(n){var t=n.enumOptions,r=void 0===t?[]:t,o=n.onChange,i=n.setIsEditing,a=n.type,l=void 0===a?"string":a,s=n.value,c=function(){i(!1)};if("boolean"===l&&"boolean"==typeof s)return e.jsx(E,{onBlur:c,onChange:function(e){return o(e)},open:!0,setOpen:i,value:s});if("date"===l)return e.jsx(W,{onBlur:c,onChange:o,open:!0,setOpen:i,value:s});if("enum"===l){var u="string"==typeof s?s:"";return e.jsx(F,{onBlur:c,onChange:o,open:!0,options:r,setOpen:i,value:u})}if("number"===l&&"number"==typeof s)return e.jsx(M,{defaultValue:s,onBlur:c,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}});var d=null==s?"":String(s);return e.jsx(k,{defaultValue:d,onBlur:c,onChange:o})},H=0,T=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();(0===H||o-H>=r)&&(H=o,n(t))}},B=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(B);var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=B(e[t]));return n},O=Date.now(),P={screenX:0,screenY:0},A=function(e,n,t){void 0===t&&(t=[]);for(var r=0;r<e.length;r++){var o=e[r];if(o.accessor===n)return l(l([],t,!0),[r],!1);if(o.children&&o.children.length>0){var i=A(o.children,n,l(l([],t,!0),[r],!1));if(i)return i}}return null};var q=function(e){var t,r,o=e.draggedHeaderRef,i=e.headersRef,a=e.hoveredHeaderRef,l=e.onColumnOrderChange,s=e.onTableHeaderDragEnd,c=(t=i.current,r=n.useRef(t),n.useEffect((function(){JSON.stringify(r.current)!==JSON.stringify(t)&&(r.current=t)}),[t]),r.current);return{handleDragStart:function(e){o.current=e,O=Date.now()},handleDragOver:function(e){var n,t,r=e.event,l=e.hoveredHeader;if(r.preventDefault(),i.current){var u=r.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),d=r.screenX,h=r.screenY,f=Math.sqrt(Math.pow(d-P.screenX,2)+Math.pow(h-P.screenY,2));a.current=l;var v=i.current,p=A(v,(null===(n=o.current)||void 0===n?void 0:n.accessor)||""),m=A(v,l.accessor);if(p&&m){var g=p.length,w=m.length,x=m;if(g!==w){var C=w-g;C>0&&(x=m.slice(0,-C))}var b=function(e,n,t){var r=B(e),o=!1;function i(e,n){for(var t=e,r=0;r<n.length-1;r++)t=t[n[r]].children;return t[n[n.length-1]]}function a(e,n,t){for(var r=e,i=0;i<n.length-1;i++){if(!r[n[i]].children){o=!0;break}r=r[n[i]].children}r[n[n.length-1]]=t}var l=i(r,n);return a(r,n,i(r,t)),a(r,t,l),{newHeaders:r,emergencyBreak:o}}(v,p,x),y=b.newHeaders,I=b.emergencyBreak;if(!(u||l.accessor===(null===(t=o.current)||void 0===t?void 0:t.accessor)||null===o.current||f<10||0===p.length||0===x.length||JSON.stringify(y)===JSON.stringify(i.current)||I)){var j=Date.now();JSON.stringify(y)===JSON.stringify(c)&&(j-O<1500||f<40)||(O=j,P={screenX:d,screenY:h},s(y))}}}},handleDragEnd:function(){o.current=null,a.current=null,null==l||l(i.current)}}},z=function(e){var n=e.content,t=e.header;return"boolean"==typeof n?n?"True":"False":"date"===t.type&&null!==n&&("string"==typeof n||"number"==typeof n||"object"==typeof n&&n instanceof Date)?new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):n},U=n.forwardRef((function(t,r){var i,a,l=t.borderClass,c=t.colIndex,d=t.header,h=t.isHighlighted,f=t.isInitialFocused,v=t.nestedIndex,p=t.onExpandRowClick,m=t.rowIndex,g=t.visibleRow,x=w(),C=x.cellRegistry,b=x.cellUpdateFlash,y=x.collapseIcon,I=x.draggedHeaderRef,j=x.expandIcon,S=x.handleMouseDown,R=x.handleMouseOver,E=x.headersRef,k=x.hoveredHeaderRef,M=x.onCellEdit,N=x.onTableHeaderDragEnd,D=x.theme,W=x.useOddColumnBackground,F=g.depth,H=g.row,B=n.useState(H.rowData[d.accessor]),O=B[0],P=B[1],A=n.useState(!1),U=A[0],Y=A[1],X=n.useState(!1),K=X[0],V=X[1],G=n.useRef(null),J=q({draggedHeaderRef:I,headersRef:E,hoveredHeaderRef:k,onTableHeaderDragEnd:N}).handleDragOver,_=T(),$="cell-".concat(m,"-").concat(c),Q=u({rowId:H.rowMeta.rowId,accessor:d.accessor});n.useEffect((function(){if(C){var e="".concat(H.rowMeta.rowId,"-").concat(d.accessor);return C.set(e,{updateContent:function(e){O!==e?(P(e),b&&(V(!0),G.current&&clearTimeout(G.current),G.current=setTimeout((function(){V(!1)}),800))):P(e)}}),function(){C.delete(e),G.current&&clearTimeout(G.current)}}}),[C,b,H.rowMeta.rowId,d.accessor,O]),n.useEffect((function(){if(K){var e=setTimeout((function(){V(!1)}),850);return function(){return clearTimeout(e)}}}),[K]),n.useEffect((function(){P(H.rowData[d.accessor])}),[H.rowData,d.accessor]),n.useEffect((function(){h||Y(!1)}),[h]);var Z="boolean"===d.type||"date"===d.type||"enum"===d.type,ee=Boolean(null===(a=null===(i=H.rowMeta)||void 0===i?void 0:i.children)||void 0===a?void 0:a.length),ne=Boolean(null==d?void 0:d.isEditable),te="st-cell ".concat(F>0&&d.expandable?"st-cell-depth-".concat(F):""," ").concat(h?f?"st-cell-selected-first ".concat(l):"st-cell-selected ".concat(l):""," ").concat(ne?"clickable":""," ").concat(K?"st-cell-updating":""," ").concat(W?v%2==0?"even-column":"odd-column":""),re=n.useCallback((function(e){P(e),H.rowData[d.accessor]=e,null==M||M({accessor:d.accessor,newValue:e,row:H,rowIndex:m})}),[d.accessor,M,H,m]);return U&&!Z?e.jsx("div",o({className:"st-cell-editing",id:s({accessor:d.accessor,rowIndex:m+1})},{children:e.jsx(L,{enumOptions:d.enumOptions,onChange:re,setIsEditing:Y,type:d.type,value:O})})):e.jsxs("div",o({className:te,id:$,onDoubleClick:function(){return d.isEditable&&Y(!0)},onMouseDown:function(){return S({rowIndex:m,colIndex:c,rowId:H.rowMeta.rowId})},onMouseOver:function(){return R({rowIndex:m,colIndex:c,rowId:H.rowMeta.rowId})},onDragOver:function(e){return _({callback:J,callbackProps:{event:e,hoveredHeader:d},limit:50})},onKeyDown:function(e){"F2"!==e.key&&"Enter"!==e.key||!d.isEditable||U||(e.preventDefault(),Y(!0))},ref:r,"data-row-index":m,"data-col-index":c,"data-row-id":H.rowMeta.rowId,"data-accessor":d.accessor},{children:[d.expandable&&ee?H.rowMeta.isExpanded?e.jsx("div",o({className:"st-icon-container",onClick:function(){return p(H.rowMeta.rowId)}},{children:y})):e.jsx("div",o({className:"st-icon-container",onClick:function(){return p(H.rowMeta.rowId)}},{children:j})):null,e.jsx("span",o({className:"st-cell-content ".concat("right"===d.align?"right-aligned":"center"===d.align?"center-aligned":"left-aligned")},{children:e.jsx("span",{children:d.cellRenderer?d.cellRenderer({accessor:d.accessor,colIndex:c,row:H,theme:D}):z({content:O,header:d})})})),U&&Z&&e.jsx(L,{enumOptions:d.enumOptions,onChange:re,setIsEditing:Y,type:d.type,value:O})]}),Q)})),Y=function(n){var t=n.columnIndexStart,r=n.columnIndices,o=n.headers,i=n.hiddenColumns;n.isWidthDragging;var a=n.onExpandRowClick,l=n.pinned,u=n.rowIndex,d=n.rowIndices,h=n.visibleRow,f=o.filter((function(e){return c({hiddenColumns:i,header:e,pinned:l})}));return e.jsx(e.Fragment,{children:f.map((function(n,c){return e.jsx(X,{columnIndices:r,header:n,headers:o,hiddenColumns:i,nestedIndex:c+(null!=t?t:0),onExpandRowClick:a,pinned:l,rowIndex:u,rowIndices:d,visibleRow:h},s({accessor:n.accessor,rowIndex:u+1}))}))})},X=function(t){var r=t.columnIndices,o=t.header,i=t.headers,a=t.hiddenColumns,l=t.nestedIndex,u=t.onExpandRowClick,d=t.pinned,h=t.rowIndex,f=t.rowIndices,v=t.visibleRow,p=r[o.accessor],m=w(),g=m.getBorderClass,x=m.isSelected,C=m.isInitialFocusedCell;if(o.children){var b=o.children.filter((function(e){return c({hiddenColumns:a,header:e,pinned:d})}));return e.jsx(n.Fragment,{children:b.map((function(n){return e.jsx(X,{columnIndices:r,header:n,headers:i,hiddenColumns:a,nestedIndex:l,onExpandRowClick:u,pinned:d,rowIndex:h,rowIndices:f,visibleRow:v},s({accessor:n.accessor,rowIndex:h+1}))}))})}var y={rowIndex:h,colIndex:p,rowId:v.row.rowMeta.rowId},I=g(y),j=x(y),S=C(y);return e.jsx(U,{borderClass:I,colIndex:p,header:o,isHighlighted:j,isInitialFocused:S,nestedIndex:l,onExpandRowClick:u,rowIndex:h,visibleRow:v},s({accessor:o.accessor,rowIndex:h+1}))},K=function(n){var t=n.columnIndices,r=n.columnIndexStart,i=n.gridTemplateColumns,a=n.headers,l=n.hiddenColumns,s=n.hoveredIndex,c=n.index,u=n.isWidthDragging,d=n.onExpandRowClick,h=n.pinned,f=n.rowHeight,v=n.rowIndices,p=n.setHoveredIndex,m=n.visibleRow,g=w().useHoverRowBackground,x=m.position,C=x%2==0;return e.jsx("div",o({className:"st-row ".concat(C?"even":"odd"," ").concat(s===c&&g?"hovered":""),onMouseEnter:function(){p(c)},style:{gridTemplateColumns:i,top:j({position:x,rowHeight:f}),height:"".concat(f,"px")}},{children:e.jsx(Y,{columnIndexStart:r,columnIndices:t,headers:a,hiddenColumns:l,isWidthDragging:u,onExpandRowClick:d,pinned:h,rowIndex:c,rowIndices:v,visibleRow:m},c)}))},V=function(n){var t=n.displayStrongBorder,r=n.position,i=n.rowHeight,a=n.templateColumns;return e.jsx("div",o({className:"st-row-separator ".concat(t?"st-last-group-row":""),style:{display:"grid",gridTemplateColumns:a,position:"absolute",top:I({position:r,rowHeight:i}),minWidth:"100%"}},{children:e.jsx("div",{style:{gridColumn:"1 / -1"}})}))},G=n.createContext(void 0),J=["default"],_=function(e){var t=e.childRef,r=e.children,o=function(){var e=n.useContext(G);if(!e)throw new Error("useScrollSyncContext must be used within a ScrollSyncProvider");return e}(),i=o.registerPane,a=o.unregisterPane;return n.useEffect((function(){return t.current&&i(t.current,J),function(){t.current&&a(t.current,J)}}),[t,i,a]),n.cloneElement(r,{ref:function(e){t.current=e}})},$=function(n){var t=n.condition,r=n.wrapper,o=n.children;return e.jsx(e.Fragment,{children:t?r(o):e.jsx(e.Fragment,{children:o})})},Q=function(t){var r=t.columnIndexStart,i=t.columnIndices,a=t.headers,l=t.hiddenColumns,s=t.hoveredIndex,c=t.isWidthDragging,u=t.onExpandRowClick,d=t.pinned,h=t.ref,f=t.rowHeight,v=t.rowIndices,p=t.setHoveredIndex,m=t.templateColumns,g=t.totalHeight,w=t.visibleRows,x=t.width,C=d?"st-body-pinned-".concat(d):"st-body-main";return e.jsx($,o({condition:!d,wrapper:function(n){return e.jsx(_,o({childRef:h},{children:n}))}},{children:e.jsx("div",o({className:C,ref:h,style:o({position:"relative",height:"".concat(g,"px"),width:x},!d&&{flexGrow:1})},{children:w.map((function(t,o){var h,g,x=w[o-1],C=Boolean((null==x?void 0:x.depth)!==(null==t?void 0:t.depth)&&(null===(g=null===(h=null==t?void 0:t.row.rowMeta)||void 0===h?void 0:h.children)||void 0===g?void 0:g.length)&&0===t.depth);return e.jsxs(n.Fragment,{children:[0!==o&&e.jsx(V,{displayStrongBorder:C,position:t.position,rowHeight:f,templateColumns:m}),e.jsx(K,{columnIndexStart:r,columnIndices:i,gridTemplateColumns:m,headers:a,hiddenColumns:l,hoveredIndex:s,index:o,isWidthDragging:c,onExpandRowClick:u,pinned:d,rowHeight:f,rowIndices:v,setHoveredIndex:p,visibleRow:t})]},t.position)}))}))}))};function Z(e){var n=e.headersRef,t=e.hiddenColumns,r=e.pinnedLeftColumns,o=e.pinnedRightColumns,i={},a=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 c({hiddenColumns:t,header:e})})).forEach((function(e,n){l(e,0===n)}))};return r.forEach((function(e,n){l(e,0===n)})),n.current.filter((function(e){return!e.pinned&&c({hiddenColumns:t,header:e})})).forEach((function(e,n){var t=0===n&&0===r.length;l(e,t)})),o.forEach((function(e){l(e,!1)})),i}var ee=function(t){var r=t.flattenedRows,i=t.headerContainerRef,a=t.isWidthDragging,l=t.mainTemplateColumns,s=t.pinnedLeftColumns,c=t.pinnedLeftTemplateColumns,u=t.pinnedLeftWidth,d=t.pinnedRightColumns,h=t.pinnedRightTemplateColumns,f=t.pinnedRightWidth,v=t.setFlattenedRows,p=t.setScrollTop,m=t.visibleRows,g=w(),x=g.headersRef,C=g.hiddenColumns,b=g.mainBodyRef,y=g.rowHeight,I=g.scrollbarWidth,j=g.tableBodyContainerRef,S=n.useState(null),R=S[0],E=S[1];!function(e){var t=e.headerContainerRef,r=e.mainSectionRef,o=e.scrollbarWidth,i=n.useState(!1),a=i[0],l=i[1];n.useEffect((function(){var e=null==t?void 0:t.current;if(a&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(o,"px")),function(){e.classList.remove("st-header-scroll-padding")}}),[t,a,o]),n.useEffect((function(){var e=null==t?void 0:t.current,n=null==r?void 0:r.current;if(n&&e){var o=function(){if(n){var e=n.scrollHeight>n.clientHeight;l(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(n),function(){n&&i.unobserve(n)}}}),[t,r])}({headerContainerRef:i,mainSectionRef:j,scrollbarWidth:I});var k,M,N=n.useRef(null),D=(k=0,(M=function(e){e.forEach((function(e){k+=1,e.rowMeta.isExpanded&&e.rowMeta.children&&M(e.rowMeta.children)}))})(r),k)*(y+1)-1,W=n.useMemo((function(){return Z({headersRef:x,hiddenColumns:C,pinnedLeftColumns:s,pinnedRightColumns:d})}),[x,C,s,d]),F=n.useMemo((function(){var e={};return m.forEach((function(n,t){var r=String(n.row.rowMeta.rowId);e[r]=t})),e}),[m]),L=function(e){var n=function(t){return t.rowMeta.rowId===e&&t.rowMeta.children?o(o({},t),{rowMeta:o(o({},t.rowMeta),{isExpanded:!t.rowMeta.isExpanded})}):t.rowMeta.children?o(o({},t),{rowMeta:o(o({},t.rowMeta),{children:t.rowMeta.children.map(n)})}):t};v((function(e){return e.map(n)}))},H={columnIndices:W,headerContainerRef:i,headers:x.current,hiddenColumns:C,hoveredIndex:R,isWidthDragging:a,rowHeight:y,rowIndices:F,setHoveredIndex:E,visibleRows:m};return e.jsxs("div",o({className:"st-body-container",onMouseLeave:function(){return E(null)},onScroll:function(e){var n=e.currentTarget.scrollTop;N.current&&cancelAnimationFrame(N.current),N.current=requestAnimationFrame((function(){p(n)}))},ref:j},{children:[s.length>0&&e.jsx(Q,o({},H,{onExpandRowClick:L,pinned:"left",templateColumns:c,totalHeight:D,width:u})),e.jsx(Q,o({},H,{columnIndexStart:s.length,onExpandRowClick:L,ref:b,templateColumns:l,totalHeight:D})),d.length>0&&e.jsx(Q,o({},H,{columnIndexStart:s.length+l.length,onExpandRowClick:L,pinned:"right",templateColumns:h,totalHeight:D,width:f}))]}))},ne=function(e){return void 0===e&&(e=0),e?e+1:0},te=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=e.setMainBodyWidth,i=e.setPinnedLeftWidth,a=e.setPinnedRightWidth,l=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=n.pinned,i=0;return t.forEach((function(e){e.hide||e.pinned!==o||(e.accessor===n.accessor?i+=r:d(e).forEach((function(e){e.hide||(e.accessor===n.accessor?i+=r:i+=h(e))})))})),n.pinned?ne(i):i}({header:n,headers:t,newWidth:r});"left"===n.pinned?i(l):"right"===n.pinned?a(l):n.pinned||o(l)},re=function(e){var n=e.event,t=e.forceUpdate,r=e.gridColumnEnd,o=e.gridColumnStart,i=e.header,a=e.headersRef,l=e.setIsWidthDragging,s=e.setMainBodyWidth,c=e.setPinnedLeftWidth,u=e.setPinnedRightWidth,h=e.startWidth;l(!0),n.preventDefault();var p="clientX"in n?n.clientX:n.touches[0].clientX,m="touches"in n;if(i&&!i.hide){var g=v(i),w=r-o>1,x=w?d(i):[i],C=function(e){var n="right"===i.pinned?p-e:e-p;if(w&&x.length>1)oe({delta:n,header:i,headersRef:a,leafHeaders:x,minWidth:g,setMainBodyWidth:s,setPinnedLeftWidth:c,setPinnedRightWidth:u,startWidth:h});else{var r=Math.max(h+n,g);i.width=r,te({header:i,headers:a.current,newWidth:r,setMainBodyWidth:s,setPinnedLeftWidth:c,setPinnedRightWidth:u})}a.current.forEach((function(e){f(e)})),t()};if(m){var b=function(e){var n=e.touches[0];C(n.clientX)},y=function(){document.removeEventListener("touchmove",b),document.removeEventListener("touchend",y),l(!1)};document.addEventListener("touchmove",b),document.addEventListener("touchend",y)}else{var I=function(e){C(e.clientX)},j=function(){document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",j),l(!1)};document.addEventListener("mousemove",I),document.addEventListener("mouseup",j)}}},oe=function(e){var n=e.delta,t=e.header,r=e.headersRef,o=e.leafHeaders,i=e.minWidth,a=e.setMainBodyWidth,l=e.setPinnedLeftWidth,s=e.setPinnedRightWidth,c=e.startWidth,u=o.reduce((function(e,n){return Math.min(e,v(n))}),40),d=o.reduce((function(e,n){return e+("number"==typeof n.width?n.width:150)}),0),h=Math.max(c+n,u);te({header:t,headers:r.current,newWidth:h,setMainBodyWidth:a,setPinnedLeftWidth:l,setPinnedRightWidth:s});var f=h-d;o.forEach((function(e){var n="number"==typeof e.width?e.width:150,t=f*(n/d),r=Math.max(n+t,i);e.width=r}))},ie=function(n){var t=n.className,r=n.style;return e.jsx("svg",o({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:t,style:o({height:"1em"},r)},{children:e.jsx("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"})}))},ae={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"},le=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"]}},se=function(e){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(e)},ce=function(e){return["between","notBetween","in","notIn"].includes(e)},ue=function(e){return["isEmpty","isNotEmpty"].includes(e)},de=function(n){var t=n.children;return e.jsx("div",o({className:"st-filter-container"},{children:t}))},he=function(){return e.jsx("svg",o({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.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},fe=function(t){var r=t.value,i=t.onChange,a=t.options,l=t.placeholder,s=void 0===l?"Select...":l,c=t.className,u=void 0===c?"":c,d=t.disabled,h=void 0!==d&&d,f=n.useState(!1),v=f[0],p=f[1],m=n.useState(-1),g=m[0],w=m[1],x=n.useRef(null),C=a.find((function(e){return e.value===r}));n.useEffect((function(){var e=function(e){if(v)switch(e.key){case"ArrowDown":e.preventDefault(),w((function(e){return e<a.length-1?e+1:0}));break;case"ArrowUp":e.preventDefault(),w((function(e){return e>0?e-1:a.length-1}));break;case"Enter":e.preventDefault(),g>=0&&(i(a[g].value),p(!1),w(-1));break;case"Escape":e.preventDefault(),p(!1),w(-1)}};if(v)return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}),[v,g,a,i]);return e.jsxs("div",o({ref:x,className:"st-custom-select ".concat(u," ").concat(h?"st-custom-select-disabled":""," ").concat(v?"st-custom-select-open":"").trim()},{children:[e.jsxs("button",o({type:"button",className:"st-custom-select-trigger",onClick:function(){if(!h)if(p(!v),v)w(-1);else{var e=a.findIndex((function(e){return e.value===r}));w(e>=0?e:0)}},disabled:h,"aria-haspopup":"listbox","aria-expanded":v,"aria-labelledby":"select-label"},{children:[e.jsx("span",o({className:"st-custom-select-value"},{children:C?C.label:s})),e.jsx(he,{})]})),e.jsx(S,o({open:v,setOpen:p,onClose:function(){p(!1),w(-1)},positioning:"absolute",overflow:"auto"},{children:e.jsx("div",o({className:"st-custom-select-options",role:"listbox"},{children:a.map((function(n,t){return e.jsx("div",o({className:"st-custom-select-option ".concat(n.value===r?"st-custom-select-option-selected":""," ").concat(t===g?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":n.value===r,onClick:function(){return e=n.value,i(e),p(!1),void w(-1);var e}},{children:n.label}),n.value)}))}))}))]}))},ve=function(n){var t=n.value,r=n.onChange,i=n.operators.map((function(e){return{value:e,label:ae[e]}}));return e.jsx("div",o({className:"st-filter-section"},{children:e.jsx(fe,{value:t,onChange:function(e){r(e)},options:i})}))},pe=function(n){var t=n.type,r=void 0===t?"text":t,o=n.value,i=n.onChange,a=n.placeholder,l=n.autoFocus,s=void 0!==l&&l,c=n.className,u=void 0===c?"":c;return e.jsx("input",{type:r,value:o,onChange:function(e){return i(e.target.value)},placeholder:a,autoFocus:s,className:"st-filter-input ".concat(u).trim()})},me=function(n){var t=n.children,r=n.className,i=void 0===r?"":r;return e.jsx("div",o({className:"st-filter-section ".concat(i).trim()},{children:t}))},ge=function(n){var t=n.onApply,r=n.onClear,i=n.canApply,a=n.showClear;return e.jsxs("div",o({className:"st-filter-actions"},{children:[e.jsx("button",o({onClick:t,disabled:!i,className:"st-filter-button st-filter-button-apply ".concat(i?"":"st-filter-button-disabled")},{children:"Apply"})),a&&r&&e.jsx("button",o({onClick:r,className:"st-filter-button st-filter-button-clear"},{children:"Clear"}))]}))},we=function(t){var r=t.header,i=t.currentFilter,a=t.onApplyFilter,l=t.onClearFilter,s=n.useState((null==i?void 0:i.operator)||"contains"),c=s[0],u=s[1],d=n.useState(String((null==i?void 0:i.value)||"")),h=d[0],f=d[1],v=le("string");n.useEffect((function(){i?(u(i.operator),f(String(i.value||""))):(u("contains"),f(""))}),[i]);var p=ue(c)||h.trim();return e.jsxs(de,{children:[e.jsx(ve,{value:c,onChange:u,operators:v}),se(c)&&e.jsx(me,{children:e.jsx(pe,{type:"text",value:h,onChange:f,placeholder:"Filter...",autoFocus:!0})}),e.jsx(ge,{onApply:function(){var e=o({accessor:r.accessor,operator:c},se(c)&&{value:h});a(e)},onClear:l,canApply:!!p,showClear:!!i})]})},xe=function(t){var r,o,i=t.header,a=t.currentFilter,l=t.onApplyFilter,s=t.onClearFilter,c=n.useState((null==a?void 0:a.operator)||"equals"),u=c[0],d=c[1],h=n.useState(String((null==a?void 0:a.value)||"")),f=h[0],v=h[1],p=n.useState(String((null===(r=null==a?void 0:a.values)||void 0===r?void 0:r[0])||"")),m=p[0],g=p[1],w=n.useState(String((null===(o=null==a?void 0:a.values)||void 0===o?void 0:o[1])||"")),x=w[0],C=w[1],b=le("number");n.useEffect((function(){var e,n;a?(d(a.operator),v(String(a.value||"")),g(String((null===(e=a.values)||void 0===e?void 0:e[0])||"")),C(String((null===(n=a.values)||void 0===n?void 0:n[1])||""))):(d("equals"),v(""),g(""),C(""))}),[a]);return e.jsxs(de,{children:[e.jsx(ve,{value:u,onChange:d,operators:b}),se(u)&&e.jsx(me,{children:e.jsx(pe,{type:"number",value:f,onChange:v,placeholder:"Enter number...",autoFocus:!0})}),ce(u)&&e.jsxs(me,{children:[e.jsx(pe,{type:"number",value:m,onChange:g,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from"}),e.jsx(pe,{type:"number",value:x,onChange:C,placeholder:"To..."})]}),e.jsx(ge,{onApply:function(){var e={accessor:i.accessor,operator:u};se(u)?e.value=parseFloat(f):ce(u)&&(e.values=[parseFloat(m.toString()),parseFloat(x.toString())]),l(e)},onClear:s,canApply:!!ue(u)||(se(u)?""!==f.trim():!!ce(u)&&""!==String(m).trim()&&""!==String(x).trim()),showClear:!!a})]})},Ce=function(n){var t=n.value,r=n.onChange,o=n.options,i=n.className,a=void 0===i?"":i,l=n.placeholder;return e.jsx(fe,{value:t,onChange:r,options:o,className:a,placeholder:l})},be=function(t){var r=t.header,o=t.currentFilter,i=t.onApplyFilter,a=t.onClearFilter,l=n.useState((null==o?void 0:o.operator)||"equals"),s=l[0],c=l[1],u=n.useState(void 0!==(null==o?void 0:o.value)?String(o.value):"true"),d=u[0],h=u[1],f=le("boolean");n.useEffect((function(){o?(c(o.operator),h(void 0!==o.value?String(o.value):"true")):(c("equals"),h("true"))}),[o]);var v=ue(s)||""!==d;return e.jsxs(de,{children:[e.jsx(ve,{value:s,onChange:c,operators:f}),se(s)&&e.jsx(me,{children:e.jsx(Ce,{value:d,onChange:h,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),e.jsx(ge,{onApply:function(){var e={accessor:r.accessor,operator:s};se(s)&&(e.value="true"===d),i(e)},onClear:a,canApply:v,showClear:!!o})]})},ye=function(t){var r,i,a=t.header,l=t.currentFilter,s=t.onApplyFilter,c=t.onClearFilter,u=n.useState((null==l?void 0:l.operator)||"equals"),d=u[0],h=u[1],f=n.useState((null==l?void 0:l.value)?String(l.value):""),v=f[0],p=f[1],m=n.useState((null===(r=null==l?void 0:l.values)||void 0===r?void 0:r[0])?String(l.values[0]):""),g=m[0],w=m[1],x=n.useState(String((null===(i=null==l?void 0:l.values)||void 0===i?void 0:i[1])||"")),C=x[0],b=x[1],y=le("date");n.useEffect((function(){var e,n;l?(h(l.operator),p(String(l.value||"")),w(String((null===(e=l.values)||void 0===e?void 0:e[0])||"")),b(String((null===(n=l.values)||void 0===n?void 0:n[1])||""))):(h("equals"),p(""),w(""),b(""))}),[l]);var I=function(t){var r=t.value,i=t.onChange,a=t.placeholder,l=t.autoFocus,s=t.className,c=n.useState(!1),u=c[0],d=c[1],h=n.useState(""),f=h[0],v=h[1],p=n.useRef(null);n.useEffect((function(){if(r){var e=new Date(r);isNaN(e.getTime())||v(e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else v("")}),[r]),n.useEffect((function(){l&&p.current&&p.current.focus()}),[l]);var m=r?new Date(r):new Date;return e.jsxs("div",o({className:"st-date-input-container",style:{position:"relative"}},{children:[e.jsx("input",{ref:p,type:"text",value:f,placeholder:a,onClick:function(){d(!u)},onKeyDown:function(e){"Enter"===e.key||" "===e.key?(e.preventDefault(),d(!u)):"Escape"===e.key&&d(!1)},readOnly:!0,className:"st-filter-input ".concat(s||""),style:{cursor:"pointer"}}),e.jsx(S,o({open:u,setOpen:d,onClose:function(){d(!1)},positioning:"absolute",overflow:"visible"},{children:e.jsx(N,{value:m,onChange:function(e){var n=e.toISOString().split("T")[0];i(n),d(!1)},onClose:function(){return d(!1)}})}))]}))};return e.jsxs(de,{children:[e.jsx(ve,{value:d,onChange:h,operators:y}),se(d)&&e.jsx(me,{children:e.jsx(I,{value:v,onChange:p,placeholder:"Select date...",autoFocus:!0})}),ce(d)&&e.jsxs(me,{children:[e.jsx(I,{value:g,onChange:w,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),e.jsx(I,{value:C,onChange:b,placeholder:"To date..."})]}),e.jsx(ge,{onApply:function(){var e={accessor:a.accessor,operator:d};se(d)?e.value=v:ce(d)&&(e.values=[g,C]),s(e)},onClear:c,canApply:!!ue(d)||(se(d)?""!==v.trim():!!ce(d)&&""!==g.trim()&&""!==C.trim()),showClear:!!l})]})},Ie=function(n){var t=n.className,r=n.style;return e.jsx("svg",o({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:t,style:o({height:"10px"},r)},{children:e.jsx("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"})}))},je=function(n){var t=n.checked,r=void 0!==t&&t,i=n.children,a=n.onChange;return e.jsxs("label",o({className:"st-checkbox-label"},{children:[e.jsx("input",{checked:r,className:"st-checkbox-input",onChange:function(){a&&a(!r)},type:"checkbox"}),e.jsx("span",o({className:"st-checkbox-custom ".concat(r?"st-checked":"")},{children:r&&e.jsx(Ie,{className:"st-checkbox-checkmark"})})),i]}))},Se=function(t){var r=t.header,i=t.currentFilter,a=t.onApplyFilter,s=t.onClearFilter,c=n.useMemo((function(){return r.enumOptions||[]}),[r.enumOptions]),u=n.useMemo((function(){return c.map((function(e){return e.value}))}),[c]),d=n.useState((null==i?void 0:i.values)?i.values.map(String):u),h=d[0],f=d[1];n.useEffect((function(){f(i?i.values?i.values.map(String):[]:u)}),[i,u]);var v=h.length===u.length;return e.jsxs(de,{children:[e.jsx(me,{children:e.jsxs("div",o({className:"st-enum-filter-options"},{children:[e.jsx("div",o({className:"st-enum-select-all"},{children:e.jsx(je,o({checked:v,onChange:function(e){f(e?u:[])}},{children:e.jsx("span",o({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),c.map((function(n){return e.jsx(je,o({checked:h.includes(n.value),onChange:function(){return e=n.value,void f((function(n){return n.includes(e)?n.filter((function(n){return n!==e})):l(l([],n,!0),[e],!1)}));var e}},{children:e.jsx("span",o({className:"st-enum-option-label"},{children:n.label}))}),n.value)}))]}))}),e.jsx(ge,{onApply:function(){if(h.length!==u.length){var e={accessor:r.accessor,operator:"in",values:h};a(e)}else s()},onClear:s,canApply:0!==h.length&&h.length!==u.length,showClear:!!i})]})},Re=function(n){var t=n.header,r=n.currentFilter,o=n.onApplyFilter,i=n.onClearFilter;return e.jsx(e.Fragment,{children:function(){switch(t.type){case"number":return e.jsx(xe,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i});case"boolean":return e.jsx(be,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i});case"date":return e.jsx(ye,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i});case"enum":return e.jsx(Se,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i});default:return e.jsx(we,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i})}}()})},Ee=n.forwardRef((function(t,r){var i,a,c=t.colIndex,u=t.forceHeadersUpdate,d=t.gridColumnEnd,h=t.gridColumnStart,f=t.gridRowEnd,v=t.gridRowStart,p=t.header,m=t.reverse,g=t.sort,x=n.useState(!1),C=x[0],b=x[1],y=w(),I=y.columnReordering,j=y.columnResizing,R=y.draggedHeaderRef,E=y.filters,k=y.forceUpdate,M=y.handleApplyFilter,N=y.handleClearFilter,D=y.headersRef,W=y.hoveredHeaderRef,F=y.onColumnOrderChange,L=y.onSort,H=y.onTableHeaderDragEnd,B=y.rowHeight,O=y.selectColumns,P=y.selectableColumns,A=y.setInitialFocusedCell,z=y.setIsWidthDragging,U=y.setMainBodyWidth,Y=y.setPinnedLeftWidth,X=y.setPinnedRightWidth,K=y.setSelectedCells,V=y.setSelectedColumns,G=y.sortDownIcon,J=y.sortUpIcon,_=Boolean(null==p?void 0:p.isSortable),$=Boolean(null==p?void 0:p.filterable),Q=E[p.accessor],Z="st-header-cell ".concat(p.accessor===(null===(i=W.current)||void 0===i?void 0:i.accessor)?"st-hovered":""," ").concat((null===(a=R.current)||void 0===a?void 0:a.accessor)===p.accessor?"st-dragging":""," ").concat(_?"clickable":""," ").concat(I&&!_?"columnReordering":""," ").concat(p.children?"parent":""),ee=q({draggedHeaderRef:R,headersRef:D,hoveredHeaderRef:W,onColumnOrderChange:F,onTableHeaderDragEnd:H}),ne=ee.handleDragStart,te=ee.handleDragEnd,oe=ee.handleDragOver,ae=T(),le=function(e){var n=e.event,t=e.header;if(P){var r=function(e,n){if(!e.children||0===e.children.length)return[n];var t=[],r=function(e,n){if(!e.children||0===e.children.length)return t.push(n),n+1;for(var o=n,i=0,a=e.children;i<a.length;i++){var l=a[i];o=r(l,o)}return o};return r(e,n),t}(t,c);return n.shiftKey&&O?V((function(e){if(0===e.size)return new Set(r);var n=r[0],t=Array.from(e).sort((function(e,n){return e-n})),o=t[0],i=Math.abs(n-o);t.forEach((function(e){var t=Math.abs(n-e);t<i&&(i=t,o=e)}));var a,s,c,u,d=l(l([],(a=o,s=n,c=Math.min(a,s),u=Math.max(a,s),Array.from({length:u-c+1},(function(e,n){return c+n}))),!0),r,!0);return new Set(l(l([],Array.from(e),!0),d,!0))})):O&&O(r),K(new Set),void A(null)}t.isSortable&&L(c,t.accessor)};if(n.useEffect((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 se=j&&e.jsx("div",o({className:"st-header-resize-handle-container",onMouseDown:function(e){var n;ae({callback:re,callbackProps:{event:e.nativeEvent,forceUpdate:k,gridColumnEnd:d,gridColumnStart:h,header:p,headersRef:D,setIsWidthDragging:z,setMainBodyWidth:U,setPinnedLeftWidth:Y,setPinnedRightWidth:X,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})},onTouchStart:function(e){var n;ae({callback:re,callbackProps:{event:e,forceUpdate:k,gridColumnEnd:d,gridColumnStart:h,header:p,headersRef:D,setIsWidthDragging:z,setMainBodyWidth:U,setPinnedLeftWidth:Y,setPinnedRightWidth:X,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}},{children:e.jsx("div",{className:"st-header-resize-handle"})})),ce=g&&g.key.accessor===p.accessor&&e.jsxs("div",o({className:"st-icon-container",onClick:function(e){return le({event:e,header:p})}},{children:["ascending"===g.direction&&J&&J,"descending"===g.direction&&G&&G]})),ue=$&&e.jsxs("div",o({className:"st-icon-container",onClick:function(e){e.stopPropagation(),b(!C)}},{children:[e.jsx(ie,{className:"st-header-icon",style:{fill:Q?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),e.jsx(S,o({open:C,overflow:"visible",setOpen:b,onClose:function(){return b(!1)}},{children:e.jsx(Re,{header:p,currentFilter:Q,onApplyFilter:function(e){M(e),b(!1)},onClearFilter:function(){N(p.accessor),b(!1)}})}))]}));return e.jsxs("div",o({className:Z,id:s({accessor:p.accessor,rowIndex:0}),onDragOver:function(e){ae({callback:oe,callbackProps:{event:e,hoveredHeader:p},limit:50})},ref:r,style:o(o({gridRowStart:v,gridRowEnd:f,gridColumnStart:h,gridColumnEnd:d},d-h>1?{}:{width:p.width}),f-v>1?{}:{height:B})},{children:[m&&se,"right"===p.align&&ue,"right"===p.align&&ce,e.jsx("div",o({className:"st-header-label",draggable:I&&!p.disableReorder,onClick:function(e){return le({event:e,header:p})},onDragEnd:function(e){e.preventDefault(),te(),u()},onDragStart:function(e){I&&p&&function(e){ne(e)}(p)}},{children:e.jsx("span",o({className:"st-header-label-text ".concat("right"===p.align?"right-aligned":"center"===p.align?"center-aligned":"left-aligned")},{children:null==p?void 0:p.label}))})),"right"!==p.align&&ce,"right"!==p.align&&ue,!m&&se]}))})),ke=function(t){var r=t.columnIndices,i=t.gridTemplateColumns,a=t.handleScroll,l=t.headersRef,s=t.hiddenColumns,u=t.maxDepth,d=t.pinned,h=t.sectionRef,f=t.sort,v=n.useReducer((function(e){return e+1}),0)[1],p=n.useMemo((function(){var e=[],n=1,t=function(o,i,a){var l,h;if(void 0===a&&(a=!1),!c({hiddenColumns:s,header:o,pinned:d}))return 0;a||n++;var f=null!==(h=null===(l=o.children)||void 0===l?void 0:l.filter((function(e){return c({hiddenColumns:s,header:e,pinned:d})})).length)&&void 0!==h?h:0,v=n,p=f>0?v+f:v+1,m=i,g=f>0?i+1:u+1;if(e.push({header:o,gridColumnStart:v,gridColumnEnd:p,gridRowStart:m,gridRowEnd:g,colIndex:r[o.accessor]}),o.children){var w=!0;o.children.forEach((function(e){c({hiddenColumns:s,header:e,pinned:d})&&(t(e,i+1,w),w=!1)}))}return p-v},o=l.current.filter((function(e){return c({hiddenColumns:s,header:e,pinned:d})})),i=!0;return o.forEach((function(e){t(e,1,i),i=!1})),e}),[l,s,u,d,r]);return e.jsx($,o({condition:!d,wrapper:function(n){return e.jsx(_,o({childRef:h},{children:n}))}},{children:e.jsx("div",o({className:"st-header-".concat(d?"pinned-".concat(d):"main")},a&&{onScroll:a},{ref:h,style:{gridTemplateColumns:i,display:"grid",position:"relative"}},{children:e.jsx(e.Fragment,{children:p.map((function(t){return e.jsx(Ee,{colIndex:t.colIndex,forceHeadersUpdate:v,gridColumnEnd:t.gridColumnEnd,gridColumnStart:t.gridColumnStart,gridRowEnd:t.gridRowEnd,gridRowStart:t.gridRowStart,header:t.header,ref:n.createRef(),reverse:"right"===d,sort:f},t.header.accessor)}))})}))}))},Me=function(e){var n;return(null===(n=e.children)||void 0===n?void 0:n.length)?1+Math.max.apply(Math,e.children.map(Me)):1},Ne=function(t){var r=t.centerHeaderRef,i=t.headerContainerRef,a=t.headersRef,l=t.hiddenColumns,s=t.mainTemplateColumns,u=t.pinnedLeftColumns,d=t.pinnedLeftTemplateColumns,h=t.pinnedRightColumns,f=t.pinnedRightTemplateColumns,v=t.sort,p=w(),m=p.pinnedLeftRef,g=p.pinnedRightRef,x=p.setPinnedLeftWidth,C=p.setPinnedRightWidth,b=n.useMemo((function(){return Z({headersRef:a,hiddenColumns:l,pinnedLeftColumns:u,pinnedRightColumns:h})}),[a,l,u,h]),y=n.useMemo((function(){var e=a.current,n=0;return e.forEach((function(e){if(c({hiddenColumns:l,header:e})){var t=Me(e);n=Math.max(n,t)}})),{maxDepth:n}}),[a,l]).maxDepth;return n.useLayoutEffect((function(){var e,n;x(ne(null===(e=m.current)||void 0===e?void 0:e.clientWidth)),C(ne(null===(n=g.current)||void 0===n?void 0:n.clientWidth))}),[m,g,x,C]),e.jsxs("div",o({className:"st-header-container",ref:i},{children:[u.length>0&&e.jsx(ke,{columnIndices:b,gridTemplateColumns:d,handleScroll:void 0,headersRef:a,hiddenColumns:l,maxDepth:y,pinned:"left",sectionRef:m,sort:v}),e.jsx(ke,{columnIndices:b,gridTemplateColumns:s,handleScroll:void 0,headersRef:a,hiddenColumns:l,maxDepth:y,sectionRef:r,sort:v}),h.length>0&&e.jsx(ke,{columnIndices:b,gridTemplateColumns:f,handleScroll:void 0,headersRef:a,hiddenColumns:l,maxDepth:y,pinned:"right",sectionRef:g,sort:v})]}))},De=function(e){var n=e.headers,t=e.hiddenColumns,r=function(e){var n=e.headers,o=e.flattenedHeaders;return n.forEach((function(e){!0!==t[e.accessor]&&(e.children?r({headers:e.children,flattenedHeaders:o}):o.push(e))})),o},o=r({headers:n,flattenedHeaders:[]});return"".concat(o.map((function(e){return function(e){var n=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof t&&t.endsWith("fr")?"minmax(".concat(n,", ").concat(t,")"):"max(".concat(n,", ").concat(t,")"):t}(e)})).join(" "))},We=function(t){var r=t.flattenedRows,i=t.isWidthDragging,a=t.pinnedLeftWidth,l=t.pinnedRightWidth,s=t.setFlattenedRows,c=t.setScrollTop,u=t.sort,d=t.visibleRows,h=w(),f=h.columnResizing,v=h.editColumns,p=h.headersRef,m=h.hiddenColumns,g=n.useRef(null),x=n.useRef(null),C=p.current.filter((function(e){return!e.pinned})),b=p.current.filter((function(e){return"left"===e.pinned})),y=p.current.filter((function(e){return"right"===e.pinned})),I=n.useMemo((function(){return De({headers:b,hiddenColumns:m})}),[b,m]),j=n.useMemo((function(){return De({headers:C,hiddenColumns:m})}),[C,m]),S=n.useMemo((function(){return De({headers:y,hiddenColumns:m})}),[y,m]),R={centerHeaderRef:x,headerContainerRef:g,headersRef:p,hiddenColumns:m,mainTemplateColumns:j,pinnedLeftColumns:b,pinnedLeftTemplateColumns:I,pinnedRightColumns:y,pinnedRightTemplateColumns:S,sort:u},E={flattenedRows:r,headerContainerRef:g,isWidthDragging:i,mainTemplateColumns:j,pinnedLeftColumns:b,pinnedLeftTemplateColumns:I,pinnedLeftWidth:a,pinnedRightColumns:y,pinnedRightTemplateColumns:S,pinnedRightWidth:l,setFlattenedRows:s,setScrollTop:c,visibleRows:d};return e.jsxs("div",o({className:"st-content ".concat(f?"st-resizeable":"st-not-resizeable"),style:{width:v?"calc(100% - 27.5px)":"100%"}},{children:[e.jsx(Ne,o({},R)),e.jsx(ee,o({},E))]}))},Fe=function(t){var r,i,a=t.mainBodyWidth,l=t.mainBodyRef,s=t.pinnedLeftWidth,c=t.pinnedRightWidth,u=t.setMainBodyWidth,d=t.tableBodyContainerRef,h=w().editColumns,f=n.useState(!1),v=f[0],p=f[1],m=n.useRef(null),g=d.current&&d.current.scrollHeight>d.current.clientHeight,x=h?28:0,C=(h?c+1:c)+(d.current&&g?d.current.offsetWidth-d.current.clientWidth:0);return n.useEffect((function(){setTimeout((function(){!function(){var e;if(l.current){var n=null===(e=l.current)||void 0===e?void 0:e.scrollWidth;u(n||0)}}()}),1)}),[l,u]),n.useEffect((function(){setTimeout((function(){!function(){if(l.current){var e=l.current.clientWidth;p(a>e)}}()}),1)}),[l,a,u]),v?e.jsxs("div",o({className:"st-horizontal-scrollbar-container"},{children:[s>0&&e.jsx("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:s,height:null===(r=m.current)||void 0===r?void 0:r.offsetHeight}}),a>0&&e.jsx(_,o({childRef:m},{children:e.jsx("div",o({className:"st-horizontal-scrollbar-middle",ref:m,style:{flexGrow:1}},{children:e.jsx("div",{style:{width:a,height:".3px"}})}))})),c>0&&e.jsx("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:C,height:null===(i=m.current)||void 0===i?void 0:i.offsetHeight}}),x>0&&e.jsx("div",{style:{width:x-1.5,height:"100%",flexShrink:0}})]})):null},Le={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"ascending"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"ascending"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"ascending"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"ascending"===t?i:-i},enum:function(e,n,t){return Le.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"ascending"===t?-1:1:null==n?"ascending"===t?1:-1:"string"==typeof e&&"string"==typeof n?Le.string(e,n,t):"number"==typeof e&&"number"==typeof n?Le.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?Le.boolean(e,n,t):Le.string(String(e),String(n),t)}},He=function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"ascending"===r?-1:1;if(null==n||""===n)return"ascending"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=String(e);if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(n=r[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(t)||0},i=o(e),a=o(n);return Le.number(i,a,r)}return"date"===t?Le.date(String(e),String(n),r):"boolean"===t?Le.boolean(Boolean(e),Boolean(n),r):"enum"===t?Le.enum(String(e),String(n),r):Le.string(String(e),String(n),r)},Te=function(e,n,t){var r,i=(null===(r=n.key)||void 0===r?void 0:r.type)||"string",a=n.direction,s=new Map,c=new Map,u="";e.forEach((function(e){var t;if(e.rowData&&!0===e.rowMeta.isExpanded&&!0===n.key.expandable){var r=(e.rowData.sector||"group_".concat(s.size)).toString();u=r,c.set(u,e),s.has(u)||s.set(u,[])}else if(u){var o=s.get(u)||[];o.push(e),s.set(u,o)}else{var i="default";s.has(i)||s.set(i,[]),null===(t=s.get(i))||void 0===t||t.push(e)}}));var d=[];return s.forEach((function(e,r){if(c.has(r)){var s=c.get(r);s.rowMeta.children&&s.rowMeta.children.length>0&&(s.rowMeta.children=Be(s.rowMeta.children,n,t)),d.push(s)}var u=l([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,o=e.rowData[r],l=t.rowData[r];return He(o,l,i,a)}));d.push.apply(d,u.map((function(e){var r=o({},e);if(r.rowMeta.children&&r.rowMeta.children.length>0){var i=Be(r.rowMeta.children,n,t);r.rowMeta=o(o({},r.rowMeta),{children:i})}return r})))})),d},Be=function(e,n,t){var r=t.find((function(e){return e.accessor===n.key.accessor})),i=(null==r?void 0:r.type)||"string",a=n.direction;return l([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,o=e.rowData[r],l=t.rowData[r];return He(o,l,i,a)})).map((function(e){return e.rowMeta.children&&e.rowMeta.children.length>0?o(o({},e),{rowMeta:o(o({},e.rowMeta),{children:Be(e.rowMeta.children,n,t)})}):e}))},Oe=function(e){var t=e.headers,r=e.tableRows,o=n.useState(null),i=o[0],a=o[1],l=n.useMemo((function(){var e={};return t.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[t]),s=n.useState(l),c=s[0],u=s[1],d=n.useMemo((function(){if(!i)return r;var e=function(e,n,t){return{sortedData:Te(n,t,e),newSortConfig:t}}(t,r,i).sortedData;return e}),[r,i,t]);return{hiddenColumns:c,setHiddenColumns:u,setSort:a,sort:i,sortedRows:d,updateSort:function(e,n){var r=function(e){for(var t=0,o=e;t<o.length;t++){var i=o[t];if(i.accessor===n)return i;if(i.children&&i.children.length>0){var a=r(i.children);if(a)return a}}},o=r(t);o&&a((function(e){return e&&e.key.accessor===n?"ascending"===e.direction?{key:o,direction:"descending"}:null:{key:o,direction:"ascending"}}))}}},Pe=function(e,n,t,r){void 0===r&&(r=new Set);for(var o=0,i=e;o<i.length;o++){var a=i[o];if(!r.has(a.accessor)&&(r.add(a.accessor),a.children&&a.children.length>0)){var l=a.children.some((function(e){return e.accessor===n})),s=!1;if(!l)for(var c=0,u=a.children;c<u.length;c++){var d=u[c];if(Pe([d],n,t,r),!1===t[d.accessor]){s=!0;break}}(l||s)&&(t[a.accessor]=!1)}}},Ae=function(e,n){return e.every((function(e){return!0===n[e.accessor]}))},qe=function(e,n){e.forEach((function(e){e.children&&e.children.length>0&&(qe(e.children,n),Ae(e.children,n)&&(n[e.accessor]=!0))}))},ze=function(t){var r=t.allHeaders,i=t.depth,a=void 0===i?0:i,l=t.header,s=t.hiddenColumns,c=t.setHiddenColumns,u=n.useState(!0),f=u[0],v=u[1],p=w(),m=p.expandIcon,g=p.collapseIcon,x=p.headersRef,C=p.setMainBodyWidth,b=p.setPinnedLeftWidth,y=p.setPinnedRightWidth,I="".concat(16*a,"px"),j=l.children&&l.children.length>0,S=s[l.accessor]||j&&l.children&&Ae(l.children,s);return e.jsxs(e.Fragment,{children:[e.jsxs("div",o({className:"st-header-checkbox-item",style:{paddingLeft:I}},{children:[e.jsx("div",o({className:"st-header-icon-container"},{children:j?e.jsx("div",o({className:"st-collapsible-header-icon",onClick:function(e){e.stopPropagation(),v(!f)}},{children:f?g:m})):null})),e.jsx(je,o({checked:S,onChange:function(e){var n=o({},s);(n[l.accessor]=e,e)?qe(r,n):(Pe(r,l.accessor,n),j&&l.children&&l.children.length>0&&l.children.every((function(e){return!0===s[e.accessor]}))&&l.children[0]&&(n[l.children[0].accessor]=!1,Pe(r,l.children[0].accessor,n)));c(n),x.current.forEach((function(e){e.hide=!0===n[e.accessor]})),function(e){var n=e.headers,t=e.setMainBodyWidth,r=e.setPinnedLeftWidth,o=e.setPinnedRightWidth,i=0,a=0,l=0;n.forEach((function(e){if(!e.hide){var n=d(e).reduce((function(e,n){return e+h(n)}),0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:l+=n}}));var s=ne(i),c=ne(a);r(s),o(c),t(l)}({headers:x.current,setMainBodyWidth:C,setPinnedLeftWidth:b,setPinnedRightWidth:y})}},{children:l.label}))]})),j&&f&&l.children&&e.jsx("div",o({className:"st-nested-headers"},{children:l.children.map((function(n,t){return e.jsx(ze,{allHeaders:r,depth:a+1,header:n,hiddenColumns:s,setHiddenColumns:c},"".concat(n.accessor,"-").concat(t))}))}))]})},Ue=function(n){var t=n.headers,r=n.open,i=n.position,a=n.setHiddenColumns,l=n.hiddenColumns,s="left"===i?"left":"";return e.jsx("div",o({className:"st-column-editor-popout ".concat(r?"open":""," ").concat(s),onClick:function(e){return e.stopPropagation()}},{children:e.jsx("div",o({className:"st-column-editor-popout-content"},{children:t.map((function(n,r){return e.jsx(ze,{header:n,hiddenColumns:l,setHiddenColumns:a,allHeaders:t},"".concat(n.accessor,"-").concat(r))}))}))}))},Ye=function(t){var r=t.columnEditorText,i=t.editColumns,a=t.editColumnsInitOpen,l=t.headers,s=t.hiddenColumns,c=t.position,u=void 0===c?"right":c,d=t.setHiddenColumns,h=n.useState(a),f=h[0],v=h[1];return i?e.jsxs("div",o({className:"st-column-editor ".concat(f?"open":""," ").concat(u),onClick:function(){return function(e){v(e)}(!f)},style:{width:28}},{children:[e.jsx("div",o({className:"st-column-editor-text"},{children:r})),e.jsx(Ue,{headers:l,open:f,position:u,setHiddenColumns:d,hiddenColumns:s})]})):null},Xe=function(n){var t=n.className;return e.jsx("svg",o({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e.jsx("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"})}))},Ke=function(n){var t=n.className;return e.jsx("svg",o({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e.jsx("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"})}))},Ve=function(t){var i=t.children,a=n.useRef({}),l=n.useCallback((function(e,n){return!!a.current[n]&&a.current[n].find((function(n){return n===e}))}),[]),s=n.useCallback((function(e,n){var t=e.clientWidth,r=e.scrollLeft;e.scrollWidth-t>0&&(n.scrollLeft=r)}),[]),c=n.useCallback((function(e){e.onscroll=null}),[]),u=n.useCallback((function(e,n){e.onscroll=function(){window.requestAnimationFrame((function(){n.forEach((function(n){var t;null===(t=a.current[n])||void 0===t||t.forEach((function(n){e!==n&&(c(n),s(e,n),window.requestAnimationFrame((function(){var e=Object.keys(a.current).filter((function(e){return a.current[e].includes(n)}));u(n,e)})))}))}))}))}}),[c,s]),d=n.useCallback((function(e,n){n.forEach((function(n){a.current[n]||(a.current[n]=[]),l(e,n)||(a.current[n].length>0&&s(a.current[n][0],e),a.current[n].push(e))})),u(e,n)}),[l,s,u]),h=n.useCallback((function(e,n){n.forEach((function(n){if(l(e,n)){c(e);var t=a.current[n].indexOf(e);-1!==t&&a.current[n].splice(t,1)}}))}),[l,c]);return e.jsx(G.Provider,o({value:{registerPane:d,unregisterPane:h}},{children:r.default.Children.only(i)}))},Ge=function(e,n){var t=n.find((function(n){return n.accessor===e.accessor})),r=(null==t?void 0:t.label)||e.accessor,o=ae[e.operator],i="";return void 0!==e.value?i="boolean"==typeof e.value?e.value?"True":"False":String(e.value):e.values&&Array.isArray(e.values)&&("between"===e.operator||"notBetween"===e.operator?i="".concat(e.values[0]," - ").concat(e.values[1]):"in"!==e.operator&&"notIn"!==e.operator||(i=e.values.join(", "))),"isEmpty"===e.operator||"isNotEmpty"===e.operator?"".concat(r,": ").concat(o):"".concat(r,": ").concat(o," ").concat(i)},Je=function(){var n=w(),t=n.filters,r=n.handleClearFilter,i=n.headersRef,a=Object.values(t);return 0===a.length||a.length>0?null:e.jsx("div",o({className:"st-filter-bar"},{children:e.jsx("div",o({className:"st-filter-bar-content"},{children:e.jsx("div",o({className:"st-filter-chips"},{children:a.map((function(n){return e.jsxs("div",o({className:"st-filter-chip"},{children:[e.jsx("span",o({className:"st-filter-chip-text"},{children:Ge(n,i.current)})),e.jsx("button",o({className:"st-filter-chip-remove",onClick:function(){return r(n.accessor)},"aria-label":"Remove filter for ".concat(n.accessor)},{children:"×"}))]}),n.accessor)}))}))}))}))},_e=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())},$e=function(e){var t=e.rows,r=n.useState({}),i=r[0],a=r[1],l=n.useMemo((function(){return 0===Object.keys(i).length?t:t.filter((function(e){return Object.values(i).every((function(n){try{return function(e,n){var t=n.operator,r=n.value,o=n.values;if(null==e)return"isEmpty"===t;if("isEmpty"===t)return!e||""===String(e).trim();if("isNotEmpty"===t)return e&&""!==String(e).trim();if("string"==typeof e||"contains"===t||"notContains"===t||"startsWith"===t||"endsWith"===t){var i=String(e).toLowerCase(),a=r?String(r).toLowerCase():"";switch(t){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(Number(e))){var l=Number(e),s=Number(r);switch(t){case"equals":return l===s;case"notEquals":return l!==s;case"greaterThan":return l>s;case"lessThan":return l<s;case"greaterThanOrEqual":return l>=s;case"lessThanOrEqual":return l<=s;case"between":if(o&&2===o.length){var c=o.map(Number),u=c[0],d=c[1];return l>=u&&l<=d}return!1;case"notBetween":if(o&&2===o.length){var h=o.map(Number);return u=h[0],d=h[1],l<u||l>d}return!0}}if(e instanceof Date||!isNaN(Date.parse(e))){var f=new Date(e),v=new Date(String(r||"")),p=_e(f),m=_e(v);switch(t){case"equals":return p.getTime()===m.getTime();case"notEquals":return p.getTime()!==m.getTime();case"before":return p<m;case"after":return p>m;case"between":if(o&&2===o.length){var g=o.map((function(e){return _e(new Date(String(e||"")))})),w=g[0],x=g[1];return p>=w&&p<=x}return!1;case"notBetween":if(o&&2===o.length){var C=o.map((function(e){return _e(new Date(String(e||"")))}));return w=C[0],x=C[1],p<w||p>x}return!0}}if("boolean"==typeof e){var b=Boolean(r);if("equals"===t)return e===b}if("in"===t||"notIn"===t){if(o&&Array.isArray(o)){var y=String(e),I=o.includes(y);return"in"===t?I:!I}return!1}var j=String(e).toLowerCase(),S=r?String(r).toLowerCase():"";switch(t){case"equals":return j===S;case"notEquals":return j!==S;default:return!0}}(e.rowData[n.accessor],n)}catch(e){return console.warn("Filter error for accessor ".concat(n.accessor,":"),e),!0}}))}))}),[t,i]),s=n.useCallback((function(e){a((function(n){var t;return o(o({},n),((t={})[e.accessor]=e,t))}))}),[]),c=n.useCallback((function(e){a((function(n){var t=o({},n);return delete t[e],t}))}),[]),u=n.useCallback((function(){a({})}),[]);return{filters:i,filteredRows:l,handleApplyFilter:s,handleClearFilter:c,handleClearAllFilters:u}},Qe=function(t){var r=t.allowAnimations,i=void 0!==r&&r,a=t.cellUpdateFlash,l=void 0!==a&&a,s=t.collapseIcon,c=void 0===s?e.jsx(y,{className:"st-expand-icon"}):s,h=t.columnEditorPosition,f=void 0===h?"right":h,v=t.columnEditorText,m=void 0===v?"Columns":v,w=t.columnReordering,I=void 0!==w&&w,j=t.columnResizing,S=void 0!==j&&j,R=t.defaultHeaders,E=t.editColumns,k=void 0!==E&&E,M=t.editColumnsInitOpen,N=void 0!==M&&M,D=t.expandIcon,W=void 0===D?e.jsx(b,{className:"st-expand-icon"}):D,F=t.height,L=t.hideFooter,H=void 0!==L&&L,T=t.nextIcon,B=void 0===T?e.jsx(b,{className:"st-next-prev-icon"}):T,O=t.onCellEdit,P=t.onColumnOrderChange,A=t.onGridReady,q=t.onNextPage,z=t.prevIcon,U=void 0===z?e.jsx(C,{className:"st-next-prev-icon"}):z,Y=t.rowHeight,X=void 0===Y?40:Y,K=t.rows,V=t.rowsPerPage,G=void 0===V?10:V,J=t.selectableCells,_=void 0!==J&&J,$=t.selectableColumns,Q=void 0!==$&&$,Z=t.shouldPaginate,ee=void 0!==Z&&Z,ne=t.sortDownIcon,te=void 0===ne?e.jsx(Xe,{className:"st-header-icon"}):ne,re=t.sortUpIcon,oe=void 0===re?e.jsx(Ke,{className:"st-header-icon"}):re,ie=t.tableRef,ae=t.theme,le=void 0===ae?"light":ae,se=t.useHoverRowBackground,ce=void 0===se||se,ue=t.useOddEvenRowBackground,de=void 0===ue||ue,he=t.useOddColumnBackground,fe=void 0!==he&&he;fe&&(de=!1);var ve=n.useRef(null),pe=n.useRef(R),me=n.useRef(null),ge=n.useRef(null),we=n.useRef(null),xe=n.useRef(null),Ce=n.useRef(null),be=n.useState(1),ye=be[0],Ie=be[1],je=n.useState(!1),Se=je[0],Re=je[1],Ee=n.useState(0),ke=Ee[0],Me=Ee[1],Ne=n.useState(0),De=Ne[0],Le=Ne[1],He=n.useState(0),Te=He[0],Be=He[1],Pe=n.useState(0),Ae=Pe[0],qe=Pe[1],ze=n.useState(0),Ue=ze[0],Ge=ze[1],_e=$e({rows:K}),Qe=_e.filters,Ze=_e.filteredRows,en=_e.handleApplyFilter,nn=_e.handleClearFilter,tn=_e.handleClearAllFilters,rn=Oe({headers:pe.current,tableRows:Ze}),on=rn.sort,an=rn.sortedRows,ln=rn.hiddenColumns,sn=rn.setHiddenColumns,cn=rn.updateSort;n.useEffect((function(){null==A||A()}),[A]);var un=n.useMemo((function(){if(!ee)return an;var e=(ye-1)*G,n=e+G;return an.slice(e,n)}),[ye,G,ee,an]),dn=n.useState(un),hn=dn[0],fn=dn[1];n.useEffect((function(){fn(un)}),[un]);var vn=function(e){var t=e.height,r=e.rowHeight;return n.useMemo((function(){var e;if(!t)return window.innerHeight-r;var n=document.querySelector(".simple-table-root"),o=0;if(t.endsWith("px"))o=parseInt(t,10);else if(t.endsWith("vh")){var i=parseInt(t,10);o=window.innerHeight*i/100}else if(t.endsWith("%")){var a=parseInt(t,10);o=((null===(e=null==n?void 0:n.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*a/100}else o=window.innerHeight;return Math.max(0,o-r)}),[t,r])}({height:F,rowHeight:X}),pn=n.useMemo((function(){return function(e){var n=e.bufferRowCount,t=e.contentHeight,r=e.flattenedRows,o=e.rowHeight,i=e.scrollTop,a=o+1,l=[],s=0,c=Math.max(0,i-a*n),u=i+t+a*n,d=function(e,n){for(var t,r=0,o=e;r<o.length;r++){var i=o[r],h=s*a;if(h>=u)break;h+a>c&&l.push({row:i,depth:n,position:s,isLastGroupRow:Boolean(null===(t=i.rowMeta.children)||void 0===t?void 0:t.length)&&n>1}),s+=1,i.rowMeta.isExpanded&&i.rowMeta.children&&d(i.rowMeta.children,n+1)}};return d(r,0),l}({bufferRowCount:5,contentHeight:vn,flattenedRows:hn,rowHeight:X,scrollTop:Ae})}),[vn,X,hn,Ae]),mn=n.useReducer((function(e){return e+1}),0)[1],gn=function(e){var t=e.selectableCells,r=e.headers,o=e.visibleRows,i=n.useState(new Set),a=i[0],l=i[1],s=n.useState(new Set),c=s[0],u=s[1],h=n.useState(null),f=h[0],v=h[1],m=n.useState(null),g=m[0],w=m[1],x=n.useRef(!1),C=n.useRef(null),b=n.useCallback((function(){var e=r.flatMap(d).filter((function(e){return!e.hide})),n=new Map;e.forEach((function(e,t){n.set(t,e.accessor)}));var t=Array.from(a).reduce((function(e,t){var r=t.split("-").map(Number),i=r[0],a=r[1];e[i]||(e[i]=[]);var l=n.get(a);return e[i][a]=l?o[i].row.rowData[l]:"",e}),{}),i=Object.values(t).map((function(e){return Object.values(e).join("\t")})).join("\n");a.size>0&&navigator.clipboard.writeText(i)}),[r,a,o]),y=n.useCallback((function(e,n){for(var t=new Set,r=Math.min(e.rowIndex,n.rowIndex),i=Math.max(e.rowIndex,n.rowIndex),a=Math.min(e.colIndex,n.colIndex),s=Math.max(e.colIndex,n.colIndex),c=r;c<=i;c++)for(var d=a;d<=s;d++)if(c>=0&&c<o.length){var h=o[c].row.rowMeta.rowId;t.add(p({colIndex:d,rowIndex:c,rowId:h}))}u(new Set),v(null),l(t)}),[o,u,v,l]),I=n.useCallback((function(e){if(e.rowIndex>=0&&e.rowIndex<o.length&&e.colIndex>=0&&e.colIndex<r.length){var n=p(e);u(new Set),v(null),l(new Set([n])),w(e)}}),[r.length,o.length,u,v,l,w]),j=n.useCallback((function(e,n){void 0===n&&(n=!1),l(new Set),w(null),u((function(t){var r=new Set(n?t:[]);return e.forEach((function(e){return r.add(e)})),r})),e.length>0&&v(e[e.length-1])}),[l,w,u,v]);n.useEffect((function(){var e=function(e){if(t&&g){var n=g.rowIndex,i=g.colIndex,a=g.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if(o[n].row.rowMeta.rowId!==a){var s=o.findIndex((function(e){return e.row.rowMeta.rowId===a}));if(-1===s)return;n=s}if("ArrowUp"===e.key){if(e.preventDefault(),n>0){var c={rowIndex:n-1,colIndex:i,rowId:o[n-1].row.rowMeta.rowId};I(c)}}else"ArrowDown"===e.key?(e.preventDefault(),n<o.length-1&&(c={rowIndex:n+1,colIndex:i,rowId:o[n+1].row.rowMeta.rowId},I(c))):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),i>0&&(c={rowIndex:n,colIndex:i-1,rowId:o[n].row.rowMeta.rowId},I(c))):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),i<r.length-1&&(c={rowIndex:n,colIndex:i+1,rowId:o[n].row.rowMeta.rowId},I(c))):"Escape"===e.key&&(l(new Set),u(new Set),v(null),C.current=null,w(null))}else b()}};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[b,r.length,g,y,I,t,o]);var S=n.useCallback((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=p({colIndex:n,rowIndex:t,rowId:r}),i=a.has(o),l=c.has(n);return i||l}),[a,c]),R=n.useCallback((function(e){var n,t,r,i,a,l,s=e.colIndex,u=e.rowIndex,d=e.rowId,h=[],f=null===(r=null===(t=null===(n=o[u-1])||void 0===n?void 0:n.row)||void 0===t?void 0:t.rowMeta)||void 0===r?void 0:r.rowId,v={colIndex:s,rowIndex:u+1,rowId:null===(l=null===(a=null===(i=o[u+1])||void 0===i?void 0:i.row)||void 0===a?void 0:a.rowMeta)||void 0===l?void 0:l.rowId},p={colIndex:s-1,rowIndex:u,rowId:d},m={colIndex:s+1,rowIndex:u,rowId:d};return(!S({colIndex:s,rowIndex:u-1,rowId:f})||c.has(s)&&0===u)&&h.push("st-selected-top-border"),(!S(v)||c.has(s)&&u===o.length-1)&&h.push("st-selected-bottom-border"),S(p)||h.push("st-selected-left-border"),S(m)||h.push("st-selected-right-border"),h.join(" ")}),[S,o,c]),E=n.useMemo((function(){return g?function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return n===g.rowIndex&&t===g.colIndex&&r===g.rowId}:function(){return!1}}),[g]);return{getBorderClass:R,handleMouseDown:function(e){var n=e.colIndex,r=e.rowIndex,o=e.rowId;if(t){x.current=!0,C.current={rowIndex:r,colIndex:n,rowId:o},u(new Set),v(null);var i=p({colIndex:n,rowIndex:r,rowId:o});l(new Set([i])),w({rowIndex:r,colIndex:n,rowId:o})}},handleMouseOver:function(e){var n=e.colIndex,r=e.rowIndex;if(e.rowId,t&&x.current&&C.current){for(var i=new Set,a=Math.min(C.current.rowIndex,r),s=Math.max(C.current.rowIndex,r),c=Math.min(C.current.colIndex,n),u=Math.max(C.current.colIndex,n),d=a;d<=s;d++)for(var h=c;h<=u;h++)if(d>=0&&d<o.length){var f=o[d].row.rowMeta.rowId;i.add(p({colIndex:h,rowIndex:d,rowId:f}))}l(i)}},handleMouseUp:function(){x.current=!1},isInitialFocusedCell:E,isSelected:S,lastSelectedColumnIndex:f,selectColumns:j,selectedCells:a,selectedColumns:c,setInitialFocusedCell:w,setSelectedCells:l,setSelectedColumns:u}}({selectableCells:_,headers:pe.current,visibleRows:pn}),wn=gn.getBorderClass,xn=gn.handleMouseDown,Cn=gn.handleMouseOver,bn=gn.handleMouseUp,yn=gn.isInitialFocusedCell,In=gn.isSelected,jn=gn.selectColumns,Sn=gn.selectedCells,Rn=gn.selectedColumns,En=gn.setInitialFocusedCell,kn=gn.setSelectedCells,Mn=gn.setSelectedColumns,Nn=n.useCallback((function(e,n){cn(e,n)}),[cn]),Dn=n.useCallback((function(e){pe.current=e,mn()}),[]);!function(e){var t=e.selectableColumns,r=e.selectedCells,o=e.selectedColumns,i=e.setSelectedCells,a=e.setSelectedColumns;n.useEffect((function(){var e=function(e){var n=e.target;n.closest(".st-cell")||t&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label"))||(r.size>0&&i(new Set),o.size>0&&a(new Set))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[t,r,o,i,a])}({selectableColumns:Q,selectedCells:Sn,selectedColumns:Rn,setSelectedCells:kn,setSelectedColumns:Mn}),n.useLayoutEffect((function(){if(Ce.current){var e=Ce.current.offsetWidth-Ce.current.clientWidth;Ge(e)}}),[]),function(e){var t=e.forceUpdate,r=e.tableBodyContainerRef,o=e.setScrollbarWidth;n.useLayoutEffect((function(){var e=function(){if(t(),r.current){var e=r.current.offsetWidth-r.current.clientWidth;o(e)}};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[t,r,o])}({forceUpdate:mn,tableBodyContainerRef:Ce,setScrollbarWidth:Ge});var Wn=n.useRef(new Map);return n.useEffect((function(){ie&&(ie.current={updateData:function(e){var n,t,r,o,i=e.accessor,a=e.rowIndex,l=e.newValue,s=null===(t=null===(n=null==K?void 0:K[a])||void 0===n?void 0:n.rowMeta)||void 0===t?void 0:t.rowId;if(void 0!==s){var c=u({rowId:s,accessor:i}),d=Wn.current.get(c);d&&d.updateContent(l),void 0!==(null===(o=null===(r=null==K?void 0:K[a])||void 0===r?void 0:r.rowData)||void 0===o?void 0:o[i])&&(K[a].rowData[i]=l)}}})}),[ie,K]),e.jsx(g,o({value:{allowAnimations:i,cellRegistry:Wn.current,cellUpdateFlash:l,collapseIcon:c,columnReordering:I,columnResizing:S,draggedHeaderRef:ve,editColumns:k,expandIcon:W,filters:Qe,forceUpdate:mn,getBorderClass:wn,handleApplyFilter:en,handleClearFilter:nn,handleClearAllFilters:tn,handleMouseDown:xn,handleMouseOver:Cn,headersRef:pe,hiddenColumns:ln,hoveredHeaderRef:me,isInitialFocusedCell:yn,isSelected:In,mainBodyRef:ge,nextIcon:B,onCellEdit:O,onColumnOrderChange:P,onSort:Nn,onTableHeaderDragEnd:Dn,pinnedLeftRef:we,pinnedRightRef:xe,prevIcon:U,rowHeight:X,scrollbarWidth:Ue,selectColumns:jn,selectableColumns:Q,setInitialFocusedCell:En,setIsWidthDragging:Re,setMainBodyWidth:Me,setPinnedLeftWidth:Le,setPinnedRightWidth:Be,setSelectedCells:kn,setSelectedColumns:Mn,shouldPaginate:ee,sortDownIcon:te,sortUpIcon:oe,tableBodyContainerRef:Ce,theme:le,useHoverRowBackground:ce,useOddColumnBackground:fe,useOddEvenRowBackground:de}},{children:e.jsx("div",o({className:"simple-table-root st-wrapper theme-".concat(le),style:F?{height:F}:{}},{children:e.jsx(Ve,{children:e.jsxs("div",o({className:"st-wrapper-container"},{children:[e.jsx(Je,{}),e.jsxs("div",o({className:"st-content-wrapper",onMouseUp:bn,onMouseLeave:bn},{children:[e.jsx(We,{flattenedRows:hn,isWidthDragging:Se,pinnedLeftWidth:De,pinnedRightWidth:Te,setFlattenedRows:fn,setScrollTop:qe,sort:on,visibleRows:pn}),e.jsx(Ye,{columnEditorText:m,editColumns:k,editColumnsInitOpen:N,headers:pe.current,hiddenColumns:ln,position:f,setHiddenColumns:sn})]})),e.jsx(Fe,{mainBodyRef:ge,mainBodyWidth:ke,pinnedLeftWidth:De,pinnedRightWidth:Te,setMainBodyWidth:Me,tableBodyContainerRef:Ce}),e.jsx(x,{currentPage:ye,hideFooter:H,onPageChange:Ie,onNextPage:q,shouldPaginate:ee,totalPages:Math.ceil(Ze.length/G)})]}))})}))}))};exports.SimpleTable=function(t){var r=n.useState(!1),i=r[0],a=r[1];return n.useEffect((function(){a(!0)}),[]),i?e.jsx(Qe,o({},t)):null};
2
2
  //# sourceMappingURL=index.js.map
package/dist/styles.css CHANGED
@@ -1 +1 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");.simple-table-root{--st-after-width:11.01px;--st-resize-handle-width:2px;--st-resize-handle-container-width:10px;--st-border-width:1px;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-white:#fff;--st-black:#000;--st-slate-50:#f8fafc;--st-slate-100:#f1f5f9;--st-slate-200:#e2e8f0;--st-slate-300:#cbd5e1;--st-slate-400:#94a3b8;--st-slate-500:#64748b;--st-slate-600:#475569;--st-slate-700:#334155;--st-slate-800:#1e293b;--st-slate-900:#0f172a;--st-slate-950:#020617;--st-gray-50:#f9fafb;--st-gray-100:#f3f4f6;--st-gray-200:#e5e7eb;--st-gray-300:#d1d5db;--st-gray-400:#9ca3af;--st-gray-500:#6b7280;--st-gray-600:#4b5563;--st-gray-700:#374151;--st-gray-800:#1f2937;--st-gray-900:#111827;--st-gray-950:#030712;--st-zinc-50:#fafafa;--st-zinc-100:#f4f4f5;--st-zinc-200:#e4e4e7;--st-zinc-300:#d4d4d8;--st-zinc-400:#a1a1aa;--st-zinc-500:#71717a;--st-zinc-600:#52525b;--st-zinc-700:#3f3f46;--st-zinc-800:#27272a;--st-zinc-900:#18181b;--st-zinc-950:#09090b;--st-neutral-50:#fafafa;--st-neutral-100:#f5f5f5;--st-neutral-200:#e5e5e5;--st-neutral-300:#d4d4d4;--st-neutral-400:#a3a3a3;--st-neutral-500:#737373;--st-neutral-600:#525252;--st-neutral-700:#404040;--st-neutral-800:#262626;--st-neutral-900:#171717;--st-neutral-950:#0a0a0a;--st-stone-50:#fafaf9;--st-stone-100:#f5f5f4;--st-stone-200:#e7e5e4;--st-stone-300:#d6d3d1;--st-stone-400:#a8a29e;--st-stone-500:#78716c;--st-stone-600:#57534e;--st-stone-700:#44403c;--st-stone-800:#292524;--st-stone-900:#1c1917;--st-stone-950:#0c0a09;--st-red-50:#fef2f2;--st-red-100:#fee2e2;--st-red-200:#fecaca;--st-red-300:#fca5a5;--st-red-400:#f87171;--st-red-500:#ef4444;--st-red-600:#dc2626;--st-red-700:#b91c1c;--st-red-800:#991b1b;--st-red-900:#7f1d1d;--st-red-950:#450a0a;--st-orange-50:#fff7ed;--st-orange-100:#ffedd5;--st-orange-200:#fed7aa;--st-orange-300:#fdba74;--st-orange-400:#fb923c;--st-orange-500:#f97316;--st-orange-600:#ea580c;--st-orange-700:#c2410c;--st-orange-800:#9a3412;--st-orange-900:#7c2d12;--st-orange-950:#431407;--st-amber-50:#fffbeb;--st-amber-100:#fef3c7;--st-amber-200:#fde68a;--st-amber-300:#fcd34d;--st-amber-400:#fbbf24;--st-amber-500:#f59e0b;--st-amber-600:#d97706;--st-amber-700:#b45309;--st-amber-800:#92400e;--st-amber-900:#78350f;--st-amber-950:#451a03;--st-yellow-50:#fefce8;--st-yellow-100:#fef9c3;--st-yellow-200:#fef08a;--st-yellow-300:#fde047;--st-yellow-400:#facc15;--st-yellow-500:#eab308;--st-yellow-600:#ca8a04;--st-yellow-700:#a16207;--st-yellow-800:#854d0e;--st-yellow-900:#713f12;--st-yellow-950:#422006;--st-lime-50:#f7fee7;--st-lime-100:#ecfccb;--st-lime-200:#d9f99d;--st-lime-300:#bef264;--st-lime-400:#a3e635;--st-lime-500:#84cc16;--st-lime-600:#65a30d;--st-lime-700:#4d7c0f;--st-lime-800:#3f6212;--st-lime-900:#365314;--st-lime-950:#1a2e05;--st-green-50:#f0fdf4;--st-green-100:#dcfce7;--st-green-200:#bbf7d0;--st-green-300:#86efac;--st-green-400:#4ade80;--st-green-500:#22c55e;--st-green-600:#16a34a;--st-green-700:#15803d;--st-green-800:#166534;--st-green-900:#14532d;--st-green-950:#052e16;--st-emerald-50:#ecfdf5;--st-emerald-100:#d1fae5;--st-emerald-200:#a7f3d0;--st-emerald-300:#6ee7b7;--st-emerald-400:#34d399;--st-emerald-500:#10b981;--st-emerald-600:#059669;--st-emerald-700:#047857;--st-emerald-800:#065f46;--st-emerald-900:#064e3b;--st-emerald-950:#022c22;--st-teal-50:#f0fdfa;--st-teal-100:#ccfbf1;--st-teal-200:#99f6e4;--st-teal-300:#5eead4;--st-teal-400:#2dd4bf;--st-teal-500:#14b8a6;--st-teal-600:#0d9488;--st-teal-700:#0f766e;--st-teal-800:#115e59;--st-teal-900:#134e4a;--st-teal-950:#042f2e;--st-cyan-50:#ecfeff;--st-cyan-100:#cffafe;--st-cyan-200:#a5f3fc;--st-cyan-300:#67e8f9;--st-cyan-400:#22d3ee;--st-cyan-500:#06b6d4;--st-cyan-600:#0891b2;--st-cyan-700:#0e7490;--st-cyan-800:#155e75;--st-cyan-900:#164e63;--st-cyan-950:#083344;--st-sky-50:#f0f9ff;--st-sky-100:#e0f2fe;--st-sky-200:#bae6fd;--st-sky-300:#7dd3fc;--st-sky-400:#38bdf8;--st-sky-500:#0ea5e9;--st-sky-600:#0284c7;--st-sky-700:#0369a1;--st-sky-800:#075985;--st-sky-900:#0c4a6e;--st-sky-950:#082f49;--st-blue-50:#eff6ff;--st-blue-100:#dbeafe;--st-blue-200:#bfdbfe;--st-blue-300:#93c5fd;--st-blue-400:#60a5fa;--st-blue-500:#3b82f6;--st-blue-600:#2563eb;--st-blue-700:#1d4ed8;--st-blue-800:#1e40af;--st-blue-900:#1e3a8a;--st-blue-950:#172554;--st-indigo-50:#eef2ff;--st-indigo-100:#e0e7ff;--st-indigo-200:#c7d2fe;--st-indigo-300:#a5b4fc;--st-indigo-400:#818cf8;--st-indigo-500:#6366f1;--st-indigo-600:#4f46e5;--st-indigo-700:#4338ca;--st-indigo-800:#3730a3;--st-indigo-900:#312e81;--st-indigo-950:#1e1b4b;--st-violet-50:#f5f3ff;--st-violet-100:#ede9fe;--st-violet-200:#ddd6fe;--st-violet-300:#c4b5fd;--st-violet-400:#a78bfa;--st-violet-500:#8b5cf6;--st-violet-600:#7c3aed;--st-violet-700:#6d28d9;--st-violet-800:#5b21b6;--st-violet-900:#4c1d95;--st-violet-950:#2e1065;--st-purple-50:#faf5ff;--st-purple-100:#f3e8ff;--st-purple-200:#e9d5ff;--st-purple-300:#d8b4fe;--st-purple-400:#c084fc;--st-purple-500:#a855f7;--st-purple-600:#9333ea;--st-purple-700:#7e22ce;--st-purple-800:#6b21a8;--st-purple-900:#581c87;--st-purple-950:#3b0764;--st-fuchsia-50:#fdf4ff;--st-fuchsia-100:#fae8ff;--st-fuchsia-200:#f5d0fe;--st-fuchsia-300:#f0abfc;--st-fuchsia-400:#e879f9;--st-fuchsia-500:#d946ef;--st-fuchsia-600:#c026d3;--st-fuchsia-700:#a21caf;--st-fuchsia-800:#86198f;--st-fuchsia-900:#701a75;--st-fuchsia-950:#4a044e;--st-pink-50:#fdf2f8;--st-pink-100:#fce7f3;--st-pink-200:#fbcfe8;--st-pink-300:#f9a8d4;--st-pink-400:#f472b6;--st-pink-500:#ec4899;--st-pink-600:#db2777;--st-pink-700:#be185d;--st-pink-800:#9d174d;--st-pink-900:#831843;--st-pink-950:#500724;--st-rose-50:#fff1f2;--st-rose-100:#ffe4e6;--st-rose-200:#fecdd3;--st-rose-300:#fda4af;--st-rose-400:#fb7185;--st-rose-500:#f43f5e;--st-rose-600:#e11d48;--st-rose-700:#be123c;--st-rose-800:#9f1239;--st-rose-900:#881337;--st-rose-950:#4c0519}.theme-light{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-slate-50);--st-scrollbar-thumb-color:var(--st-slate-300);--st-border-color:var(--st-slate-300);--st-odd-row-background-color:var(--st-white);--st-even-row-background-color:var(--st-slate-50);--st-odd-column-background-color:var(--st-slate-50);--st-even-column-background-color:var(--st-white);--st-hover-row-background-color:var(--st-slate-100);--st-header-background-color:var(--st-slate-100);--st-header-label-color:var(--st-slate-900);--st-dragging-background-color:var(--st-slate-200);--st-selected-cell-background-color:var(--st-blue-100);--st-selected-first-cell-background-color:var(--st-blue-50);--st-footer-background-color:var(--st-slate-50);--st-cell-color:var(--st-slate-900);--st-cell-odd-row-color:var(--st-slate-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-slate-900);--st-selected-first-cell-color:var(--st-slate-900);--st-resize-handle-color:var(--st-slate-400);--st-separator-border-color:var(--st-slate-200);--st-last-group-row-separator-border-color:var(--st-slate-400);--st-selected-border-color:var(--st-blue-500);--st-editable-cell-focus-border-color:var(--st-blue-500);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-slate-100);--st-button-active-background-color:var(--st-blue-600);--st-cell-flash-color:var(--st-slate-200)}.theme-dark{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-gray-900);--st-scrollbar-thumb-color:var(--st-gray-600);--st-border-color:var(--st-gray-700);--st-odd-row-background-color:var(--st-gray-800);--st-even-row-background-color:var(--st-gray-900);--st-odd-column-background-color:var(--st-gray-800);--st-even-column-background-color:var(--st-gray-900);--st-hover-row-background-color:var(--st-gray-700);--st-header-background-color:var(--st-gray-800);--st-header-label-color:var(--st-gray-100);--st-dragging-background-color:var(--st-gray-600);--st-selected-cell-background-color:var(--st-blue-900);--st-selected-first-cell-background-color:var(--st-blue-800);--st-footer-background-color:var(--st-gray-900);--st-cell-color:var(--st-gray-100);--st-cell-odd-row-color:var(--st-gray-200);--st-edit-cell-shadow:0 1px 3px 0 #ffffff1a;--st-selected-cell-color:var(--st-white);--st-selected-first-cell-color:var(--st-white);--st-resize-handle-color:var(--st-gray-500);--st-separator-border-color:var(--st-gray-600);--st-last-group-row-separator-border-color:var(--st-gray-500);--st-selected-border-color:var(--st-blue-400);--st-editable-cell-focus-border-color:var(--st-blue-400);--st-checkbox-checked-background-color:var(--st-blue-500);--st-checkbox-checked-border-color:var(--st-blue-500);--st-column-editor-background-color:var(--st-gray-800);--st-column-editor-popout-background-color:var(--st-gray-800);--st-button-hover-background-color:var(--st-gray-700);--st-button-active-background-color:var(--st-blue-500);--st-cell-flash-color:var(--st-gray-600)}.theme-neutral{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-neutral-100);--st-scrollbar-thumb-color:var(--st-neutral-400);--st-border-color:var(--st-neutral-300);--st-odd-row-background-color:var(--st-neutral-50);--st-even-row-background-color:var(--st-neutral-100);--st-odd-column-background-color:var(--st-neutral-50);--st-even-column-background-color:var(--st-neutral-100);--st-hover-row-background-color:var(--st-neutral-200);--st-header-background-color:var(--st-neutral-200);--st-header-label-color:var(--st-neutral-900);--st-dragging-background-color:var(--st-neutral-300);--st-selected-cell-background-color:var(--st-neutral-400);--st-selected-first-cell-background-color:var(--st-neutral-300);--st-footer-background-color:var(--st-neutral-50);--st-cell-color:var(--st-neutral-900);--st-cell-odd-row-color:var(--st-neutral-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-neutral-900);--st-selected-first-cell-color:var(--st-neutral-900);--st-resize-handle-color:var(--st-neutral-400);--st-separator-border-color:var(--st-neutral-200);--st-last-group-row-separator-border-color:var(--st-neutral-400);--st-selected-border-color:var(--st-neutral-600);--st-editable-cell-focus-border-color:var(--st-neutral-500);--st-checkbox-checked-background-color:var(--st-neutral-600);--st-checkbox-checked-border-color:var(--st-neutral-600);--st-column-editor-background-color:var(--st-neutral-50);--st-column-editor-popout-background-color:var(--st-neutral-50);--st-button-hover-background-color:var(--st-neutral-200);--st-button-active-background-color:var(--st-neutral-600);--st-cell-flash-color:var(--st-neutral-400)}.theme-sky{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-blue-50);--st-scrollbar-thumb-color:var(--st-blue-300);--st-border-color:var(--st-blue-300);--st-odd-row-background-color:var(--st-blue-50);--st-even-row-background-color:var(--st-blue-100);--st-odd-column-background-color:var(--st-blue-50);--st-even-column-background-color:var(--st-blue-100);--st-hover-row-background-color:var(--st-blue-200);--st-header-background-color:var(--st-blue-200);--st-header-label-color:var(--st-blue-900);--st-dragging-background-color:var(--st-blue-300);--st-selected-cell-background-color:var(--st-blue-400);--st-selected-first-cell-background-color:var(--st-blue-300);--st-footer-background-color:var(--st-blue-50);--st-cell-color:var(--st-blue-900);--st-cell-odd-row-color:var(--st-blue-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-blue-900);--st-selected-first-cell-color:var(--st-blue-900);--st-resize-handle-color:var(--st-blue-400);--st-separator-border-color:var(--st-blue-200);--st-last-group-row-separator-border-color:var(--st-blue-400);--st-selected-border-color:var(--st-blue-600);--st-editable-cell-focus-border-color:var(--st-blue-500);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-blue-50);--st-column-editor-popout-background-color:var(--st-blue-50);--st-button-hover-background-color:var(--st-blue-200);--st-button-active-background-color:var(--st-blue-600);--st-cell-flash-color:var(--st-blue-300)}.theme-funky{--st-border-radius:8px;--st-cell-padding:12px;--st-spacing-small:6px;--st-spacing-medium:10px;--st-scrollbar-bg-color:var(--st-stone-100);--st-scrollbar-thumb-color:var(--st-violet-500);--st-border-color:var(--st-stone-200);--st-odd-row-background-color:var(--st-amber-50);--st-even-row-background-color:var(--st-amber-100);--st-odd-column-background-color:var(--st-violet-50);--st-even-column-background-color:var(--st-amber-50);--st-hover-row-background-color:var(--st-amber-200);--st-header-background-color:var(--st-violet-600);--st-header-label-color:var(--st-white);--st-dragging-background-color:var(--st-violet-50);--st-selected-cell-background-color:var(--st-violet-50);--st-selected-first-cell-background-color:var(--st-violet-100);--st-footer-background-color:var(--st-stone-100);--st-cell-color:var(--st-stone-700);--st-cell-odd-row-color:var(--st-stone-700);--st-edit-cell-shadow:0 4px 6px -1px #7c3aed1a,0 2px 4px -1px #7c3aed0f;--st-selected-cell-color:var(--st-violet-800);--st-selected-first-cell-color:var(--st-violet-800);--st-resize-handle-color:var(--st-violet-400);--st-separator-border-color:var(--st-stone-200);--st-last-group-row-separator-border-color:var(--st-stone-300);--st-selected-border-color:var(--st-violet-500);--st-editable-cell-focus-border-color:var(--st-violet-500);--st-checkbox-checked-background-color:var(--st-violet-500);--st-checkbox-checked-border-color:var(--st-violet-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-violet-50);--st-button-active-background-color:var(--st-violet-600);--st-cell-flash-color:var(--st-violet-200)}.simple-table-root *{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit;scrollbar-color:var(--st-scrollbar-thumb-color) var(--st-scrollbar-bg-color);scrollbar-width:thin}.simple-table-root ::-webkit-scrollbar{height:8px;width:8px}.simple-table-root ::-webkit-scrollbar-track{background:var(--st-scrollbar-bg-color)}.simple-table-root ::-webkit-scrollbar-thumb{background:var(--st-scrollbar-thumb-color);border-radius:4px}.simple-table-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.st-wrapper{-webkit-box-flex:1;-ms-flex-positive:1;border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);flex-grow:1;max-height:100dvh;overflow:hidden;position:relative}.st-wrapper-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.st-content-wrapper,.st-wrapper-container{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;width:100%}.st-content-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:0}.st-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.st-content,.st-header-container{display:-webkit-box;display:-ms-flexbox;display:flex}.st-header-container{background-color:var(--st-header-background-color)}.st-header-container.st-header-scroll-padding:after{-ms-flex-negative:0;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);content:"";display:block;flex-shrink:0;width:default-width;width:var(--st-after-width,default-width)}.st-header-main,.st-header-pinned-left,.st-header-pinned-right{border-bottom:var(--st-border-width) solid var(--st-border-color);display:grid}.st-header-pinned-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-header-pinned-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-header-main{-webkit-overflow-scrolling:touch;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:auto;scrollbar-width:none;-ms-touch-action:auto;touch-action:auto}.st-header-main::-webkit-scrollbar{display:none}.st-body-container{-webkit-box-flex:1;-ms-flex-positive:1;-webkit-overflow-scrolling:touch;background-color:var(--st-even-row-background-color);display:-webkit-box;display:-ms-flexbox;display:flex;flex-grow:1;height:-webkit-max-content;height:-moz-max-content;height:max-content;overflow:auto;-ms-touch-action:auto;touch-action:auto;width:100%}.st-body-main,.st-body-pinned-left,.st-body-pinned-right{display:grid;height:-webkit-max-content;height:-moz-max-content;height:max-content;min-height:100%}.st-body-pinned-left{-ms-flex-negative:0;border-right:var(--st-border-width) solid var(--st-border-color);flex-shrink:0}.st-body-main{-webkit-overflow-scrolling:touch;overflow:auto;scrollbar-width:none;-ms-touch-action:auto;touch-action:auto}.st-body-main::-webkit-scrollbar{display:none}.st-body-pinned-right{-ms-flex-negative:0;border-left:var(--st-border-width) solid var(--st-border-color);flex-shrink:0}.st-row{display:grid;min-width:100%;position:absolute;-webkit-transition:background .2s ease;transition:background .2s ease}.st-row.hovered .st-cell:not(.st-cell-selected){background-color:var(--st-hover-row-background-color)}.st-row.even{background-color:var(--st-even-row-background-color)}.st-row.odd{background-color:var(--st-odd-row-background-color)}.st-row.odd .st-cell-content{color:var(--st-cell-odd-row-color)}.st-row.even .st-cell-content{color:var(--st-cell-color)}.st-header-cell{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-top:var(--st-border-width) solid #0000;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:var(--st-font-weight-bold);gap:var(--st-spacing-small);position:sticky;top:0;z-index:1}.st-header-cell.parent{border-bottom:var(--st-border-width) solid var(--st-border-color)}.st-header-cell.clickable{cursor:pointer}.st-header-cell.draggable{cursor:-webkit-grab;cursor:grab}.st-cell,.st-header-cell{-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--st-slate-800);display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--st-spacing-small);overflow:hidden;position:relative}.st-cell.left-aligned,.st-header-cell.left-aligned{padding-left:var(--st-cell-padding);text-align:left}.st-cell.center-aligned,.st-header-cell.center-aligned{text-align:center}.st-cell.center-aligned{padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-container-width))}.st-cell.center-aligned>.st-cell-content,.st-header-cell.center-aligned>.st-header-label-text{text-align:center}.st-cell.clickable{cursor:pointer}.st-cell,.st-cell-editing,.st-header-cell{height:100%;width:100%}.st-cell-editing{position:relative}.st-header-label{-webkit-box-flex:1;-ms-flex-positive:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;flex-grow:1;height:100%;min-width:0}.st-cell-content,.st-header-label-text{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:100%}.st-header-label-text{color:var(--st-header-label-color);font-weight:600;padding-left:var(--st-cell-padding);padding-right:var(--st-cell-padding)}.st-cell-content.left-aligned,.st-header-label-text.left-aligned{text-align:left}.st-cell-content.center-aligned,.st-header-label-text.center-aligned{text-align:center}.st-cell-content.right-aligned,.st-header-label-text.right-aligned{text-align:right}.st-not-resizeable .st-cell-content{padding-left:var(--st-cell-padding);padding-right:var(--st-cell-padding)}.st-resizeable .st-body-pinned-right .st-cell-content{padding-left:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-container-width));padding-right:var(--st-cell-padding)}.st-resizeable .st-body-main .st-cell-content,.st-resizeable .st-body-pinned-left .st-cell-content{padding-left:var(--st-cell-padding);padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-container-width))}.st-cell{border:var(--st-border-width) solid #0000}.st-cell.even-column:not(.st-cell-selected){background-color:var(--st-even-column-background-color)}.st-cell.odd-column:not(.st-cell-selected){background-color:var(--st-odd-column-background-color)}.st-cell-depth-1{padding-left:calc(var(--st-cell-padding)*4)}.st-cell-depth-2{padding-left:calc(var(--st-cell-padding)*8)}.st-cell-depth-3{padding-left:calc(var(--st-cell-padding)*12)}.st-cell-depth-4{padding-left:calc(var(--st-cell-padding)*16)}.st-cell-depth-5{padding-left:calc(var(--st-cell-padding)*20)}.st-cell-depth-6{padding-left:calc(var(--st-cell-padding)*24)}.st-cell-depth-7{padding-left:calc(var(--st-cell-padding)*28)}.st-cell-depth-1 .st-cell-content{color:rgb(from var(--st-cell-color) r g b/80%)!important}.st-cell-depth-2 .st-cell-content,.st-cell-depth-3 .st-cell-content,.st-cell-depth-4 .st-cell-content,.st-cell-depth-5 .st-cell-content,.st-cell-depth-6 .st-cell-content,.st-cell-depth-7 .st-cell-content{color:rgb(from var(--st-cell-color) r g b/70%)!important}.st-sort-icon-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:center;margin-left:4px}.st-sort-icon{fill:var(--st-slate-500)}.st-header-resize-handle-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;cursor:col-resize;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;justify-content:center;width:var(--st-resize-handle-container-width)}.st-header-resize-handle{background-color:var(--st-resize-handle-color);height:calc(100% - 20px);width:var(--st-resize-handle-width)}.st-row-separator{background-color:var(--st-separator-border-color);grid-column:1/-1;height:1px}.st-row-separator.st-last-group-row{background-color:var(--st-last-group-row-separator-border-color)}.st-dragging{background-color:var(--st-dragging-background-color)}.st-cell-selected{background-color:var(--st-selected-cell-background-color)}.st-cell-selected .st-cell-content{color:var(--st-selected-cell-color)!important}.st-cell-selected-first{background-color:var(--st-selected-first-cell-background-color)!important;border:var(--st-border-width) solid var(--st-selected-border-color)}.st-cell-selected-first .st-cell-content{color:var(--st-selected-first-cell-color)!important}.st-selected-top-border{border-top:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-bottom-border{border-bottom:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-left-border{border-left:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-right-border{border-right:var(--st-border-width) solid var(--st-selected-border-color)}.st-horizontal-scrollbar-container{-ms-flex-negative:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-scrollbar-bg-color);border-top:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;flex-shrink:0;height:12px;width:100%}.st-horizontal-scrollbar-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-left,.st-horizontal-scrollbar-right{height:100%}.st-horizontal-scrollbar-middle{-webkit-overflow-scrolling:touch;min-height:11px;overflow:auto;-ms-touch-action:auto;touch-action:auto}.st-horizontal-scrollbar-middle>div{height:1px}.st-footer{-ms-flex-negative:0;background-color:var(--st-footer-background-color);border-top:var(--st-border-width) solid var(--st-border-color);flex-shrink:0;padding:var(--st-spacing-medium)}.st-footer,.st-next-prev-btn{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.st-next-prev-btn{-webkit-box-pack:center;-ms-flex-pack:center;fill:var(--st-slate-600);background-color:initial;border:none;border-radius:var(--st-border-radius);cursor:pointer;justify-content:center;padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.disabled>.st-next-prev-icon{fill:var(--st-slate-400);cursor:not-allowed}.st-next-prev-btn:not(.disabled):hover{background-color:var(--st-slate-100)}.st-page-btn{background-color:initial;border:none;border-radius:var(--st-border-radius);color:var(--st-slate-600);cursor:pointer;margin-left:var(--st-spacing-small);padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-page-btn:hover{background-color:var(--st-button-hover-background-color)}.st-page-btn.active{background-color:var(--st-button-active-background-color);color:#fff}.st-page-ellipsis{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;color:var(--st-cell-color);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-weight:700;justify-content:center;margin:0 var(--st-spacing-small);padding:var(--st-spacing-small)}.editable-cell-input{border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);-webkit-box-shadow:var(--st-edit-cell-shadow-color);box-shadow:var(--st-edit-cell-shadow-color);font-size:.875rem;height:100%;left:0;outline:none;padding:var(--st-cell-padding);position:absolute;top:0;width:100%;z-index:1}.editable-cell-input:focus{border:var(--st-border-width) solid var(--st-editable-cell-focus-border-color)}.st-column-editor{-ms-flex-negative:0;background:var(--st-column-editor-background-color);border-left:var(--st-border-width) solid var(--st-border-color);color:var(--st-slate-500);cursor:pointer;flex-shrink:0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-column-editor-text{padding:var(--st-spacing-medium) var(--st-spacing-small);-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;z-index:2}.st-column-editor.open,.st-column-editor.open .st-column-editor-text{background-color:var(--st-column-editor-background-color)}.st-column-editor-popout{background-color:var(--st-column-editor-popout-background-color);height:100%;overflow:hidden;position:absolute;right:calc(100% + 1px);top:0;-webkit-transition:width var(--st-transition-duration) var(--st-transition-ease);transition:width var(--st-transition-duration) var(--st-transition-ease);width:0;z-index:1}.st-column-editor-popout-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-overflow-scrolling:touch;border-left:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium);height:100%;overflow:auto;padding:var(--st-spacing-medium) var(--st-spacing-small);-ms-touch-action:auto;touch-action:auto}.st-header-checkbox-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.st-header-checkbox-item,.st-header-icon-container{display:-webkit-box;display:-ms-flexbox;display:flex}.st-header-icon-container{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:24px}.st-collapsible-header-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}.st-collapsible-header-icon,.st-nested-headers{display:-webkit-box;display:-ms-flexbox;display:flex}.st-nested-headers{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium)}.st-column-editor-popout.open{min-width:200px;width:auto}.st-column-editor-popout.left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.st-column-editor-popout.open.left{-webkit-transform:translateX(0);transform:translateX(0)}.st-checkbox-label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--st-spacing-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.st-checkbox-input{display:none}.st-checkbox-custom{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:#fff;border:var(--st-border-width) solid var(--st-slate-300);border-radius:var(--st-border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;height:24px;justify-content:center;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);width:24px}.st-checkbox-custom.st-checked{background-color:var(--st-checkbox-checked-background-color);border-color:var(--st-checkbox-checked-border-color)}.st-checkbox-checkmark{border:solid #fff;border-width:0 2px 2px 0;height:11px;-webkit-transform:rotate(45deg);transform:rotate(45deg);width:6px}@-webkit-keyframes slide-in-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-in-right{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-right{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}.st-group-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:var(--st-font-weight-bold);height:40px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-group-header:hover{background-color:var(--st-button-hover-background-color)}.st-group-header-content{gap:var(--st-spacing-medium)}.st-group-header-content,.st-group-toggle-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.st-group-toggle-icon{-webkit-box-pack:center;-ms-flex-pack:center;font-size:.8em;height:16px;justify-content:center;width:16px}.st-group-name{font-weight:var(--st-font-weight-bold)}.st-group-count{color:var(--st-cell-odd-row-color);font-size:.9em}.st-group-header.expanded .st-group-toggle-icon{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.st-group-header.collapsed .st-group-toggle-icon,.st-group-header.expanded .st-group-toggle-icon{-webkit-transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease),-webkit-transform var(--st-transition-duration) var(--st-transition-ease)}.st-group-header.collapsed .st-group-toggle-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}@-webkit-keyframes cell-flash{0%{background-color:initial}50%{background-color:var(--st-cell-flash-color)}to{background-color:initial}}@keyframes cell-flash{0%{background-color:initial}50%{background-color:var(--st-cell-flash-color)}to{background-color:initial}}.st-cell-updating{-webkit-animation:cell-flash .6s ease-in-out;animation:cell-flash .6s ease-in-out}.st-dropdown-content{-webkit-overflow-scrolling:touch;background-color:var(--st-odd-row-background-color);border:1px solid var(--st-border-color);border-radius:var(--st-border-radius);-webkit-box-shadow:var(--st-edit-cell-shadow);box-shadow:var(--st-edit-cell-shadow);max-height:400px;min-width:120px;overflow:auto;position:fixed;-ms-touch-action:auto;touch-action:auto;-webkit-transform:translateZ(0);transform:translateZ(0);will-change:transform;z-index:100}.st-dropdown-bottom-left,.st-dropdown-bottom-right{margin-top:4px}.st-dropdown-top-left,.st-dropdown-top-right{margin-bottom:4px}.st-dropdown-item{color:var(--st-cell-color);cursor:pointer;padding:8px 12px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);white-space:nowrap}.st-dropdown-item:hover{background-color:var(--st-button-hover-background-color)}.st-dropdown-item.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-dropdown-group-label{color:var(--st-slate-500);font-size:.8em;font-weight:600;padding:6px 12px}.st-dropdown-divider{background-color:var(--st-border-color);height:1px;margin:4px 0}.st-datepicker{background-color:var(--st-odd-row-background-color);font-family:inherit}.st-datepicker-header{-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-bottom:1px solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:space-between;padding:10px}.st-datepicker-header-label{-webkit-box-flex:1;color:var(--st-header-label-color);cursor:pointer;-ms-flex:1;flex:1;font-weight:600;text-align:center}.st-datepicker-nav-btn{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:#0000;border:none;border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:1.2em;justify-content:center;padding:0 8px}.st-datepicker-nav-btn>*{fill:var(--st-cell-color)!important}.st-datepicker-nav-btn:hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-grid{display:grid;padding:10px}.st-datepicker-days-grid{gap:4px;grid-template-columns:repeat(7,1fr)}.st-datepicker-months-grid,.st-datepicker-years-grid{gap:8px;grid-template-columns:repeat(3,1fr)}.st-datepicker-weekday{color:var(--st-slate-500);font-size:.8em;font-weight:600;padding:6px 0;text-align:center}.st-datepicker-day{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:50%;color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:32px;justify-content:center;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-day.empty{cursor:default}.st-datepicker-day:not(.empty):hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-day.today{color:var(--st-button-active-background-color);font-weight:600}.st-datepicker-day.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-datepicker-day.other-month{color:var(--st-slate-400)}.st-datepicker-month,.st-datepicker-year{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:var(--st-border-radius);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:center;padding:12px 8px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-month:hover,.st-datepicker-year:hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-month.selected,.st-datepicker-year.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-datepicker-footer{-webkit-box-pack:end;-ms-flex-pack:end;border-top:1px solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:flex-end;padding:10px}.st-datepicker-today-btn{background-color:initial;border:1px solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;padding:6px 12px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-today-btn:hover{background-color:var(--st-button-hover-background-color)}
1
+ @import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");.simple-table-root{--st-after-width:11.01px;--st-resize-handle-width:2px;--st-resize-handle-container-width:10px;--st-border-width:1px;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-white:#fff;--st-black:#000;--st-slate-50:#f8fafc;--st-slate-100:#f1f5f9;--st-slate-200:#e2e8f0;--st-slate-300:#cbd5e1;--st-slate-400:#94a3b8;--st-slate-500:#64748b;--st-slate-600:#475569;--st-slate-700:#334155;--st-slate-800:#1e293b;--st-slate-900:#0f172a;--st-slate-950:#020617;--st-gray-50:#f9fafb;--st-gray-100:#f3f4f6;--st-gray-200:#e5e7eb;--st-gray-300:#d1d5db;--st-gray-400:#9ca3af;--st-gray-500:#6b7280;--st-gray-600:#4b5563;--st-gray-700:#374151;--st-gray-800:#1f2937;--st-gray-900:#111827;--st-gray-950:#030712;--st-zinc-50:#fafafa;--st-zinc-100:#f4f4f5;--st-zinc-200:#e4e4e7;--st-zinc-300:#d4d4d8;--st-zinc-400:#a1a1aa;--st-zinc-500:#71717a;--st-zinc-600:#52525b;--st-zinc-700:#3f3f46;--st-zinc-800:#27272a;--st-zinc-900:#18181b;--st-zinc-950:#09090b;--st-neutral-50:#fafafa;--st-neutral-100:#f5f5f5;--st-neutral-200:#e5e5e5;--st-neutral-300:#d4d4d4;--st-neutral-400:#a3a3a3;--st-neutral-500:#737373;--st-neutral-600:#525252;--st-neutral-700:#404040;--st-neutral-800:#262626;--st-neutral-900:#171717;--st-neutral-950:#0a0a0a;--st-stone-50:#fafaf9;--st-stone-100:#f5f5f4;--st-stone-200:#e7e5e4;--st-stone-300:#d6d3d1;--st-stone-400:#a8a29e;--st-stone-500:#78716c;--st-stone-600:#57534e;--st-stone-700:#44403c;--st-stone-800:#292524;--st-stone-900:#1c1917;--st-stone-950:#0c0a09;--st-red-50:#fef2f2;--st-red-100:#fee2e2;--st-red-200:#fecaca;--st-red-300:#fca5a5;--st-red-400:#f87171;--st-red-500:#ef4444;--st-red-600:#dc2626;--st-red-700:#b91c1c;--st-red-800:#991b1b;--st-red-900:#7f1d1d;--st-red-950:#450a0a;--st-orange-50:#fff7ed;--st-orange-100:#ffedd5;--st-orange-200:#fed7aa;--st-orange-300:#fdba74;--st-orange-400:#fb923c;--st-orange-500:#f97316;--st-orange-600:#ea580c;--st-orange-700:#c2410c;--st-orange-800:#9a3412;--st-orange-900:#7c2d12;--st-orange-950:#431407;--st-amber-50:#fffbeb;--st-amber-100:#fef3c7;--st-amber-200:#fde68a;--st-amber-300:#fcd34d;--st-amber-400:#fbbf24;--st-amber-500:#f59e0b;--st-amber-600:#d97706;--st-amber-700:#b45309;--st-amber-800:#92400e;--st-amber-900:#78350f;--st-amber-950:#451a03;--st-yellow-50:#fefce8;--st-yellow-100:#fef9c3;--st-yellow-200:#fef08a;--st-yellow-300:#fde047;--st-yellow-400:#facc15;--st-yellow-500:#eab308;--st-yellow-600:#ca8a04;--st-yellow-700:#a16207;--st-yellow-800:#854d0e;--st-yellow-900:#713f12;--st-yellow-950:#422006;--st-lime-50:#f7fee7;--st-lime-100:#ecfccb;--st-lime-200:#d9f99d;--st-lime-300:#bef264;--st-lime-400:#a3e635;--st-lime-500:#84cc16;--st-lime-600:#65a30d;--st-lime-700:#4d7c0f;--st-lime-800:#3f6212;--st-lime-900:#365314;--st-lime-950:#1a2e05;--st-green-50:#f0fdf4;--st-green-100:#dcfce7;--st-green-200:#bbf7d0;--st-green-300:#86efac;--st-green-400:#4ade80;--st-green-500:#22c55e;--st-green-600:#16a34a;--st-green-700:#15803d;--st-green-800:#166534;--st-green-900:#14532d;--st-green-950:#052e16;--st-emerald-50:#ecfdf5;--st-emerald-100:#d1fae5;--st-emerald-200:#a7f3d0;--st-emerald-300:#6ee7b7;--st-emerald-400:#34d399;--st-emerald-500:#10b981;--st-emerald-600:#059669;--st-emerald-700:#047857;--st-emerald-800:#065f46;--st-emerald-900:#064e3b;--st-emerald-950:#022c22;--st-teal-50:#f0fdfa;--st-teal-100:#ccfbf1;--st-teal-200:#99f6e4;--st-teal-300:#5eead4;--st-teal-400:#2dd4bf;--st-teal-500:#14b8a6;--st-teal-600:#0d9488;--st-teal-700:#0f766e;--st-teal-800:#115e59;--st-teal-900:#134e4a;--st-teal-950:#042f2e;--st-cyan-50:#ecfeff;--st-cyan-100:#cffafe;--st-cyan-200:#a5f3fc;--st-cyan-300:#67e8f9;--st-cyan-400:#22d3ee;--st-cyan-500:#06b6d4;--st-cyan-600:#0891b2;--st-cyan-700:#0e7490;--st-cyan-800:#155e75;--st-cyan-900:#164e63;--st-cyan-950:#083344;--st-sky-50:#f0f9ff;--st-sky-100:#e0f2fe;--st-sky-200:#bae6fd;--st-sky-300:#7dd3fc;--st-sky-400:#38bdf8;--st-sky-500:#0ea5e9;--st-sky-600:#0284c7;--st-sky-700:#0369a1;--st-sky-800:#075985;--st-sky-900:#0c4a6e;--st-sky-950:#082f49;--st-blue-50:#eff6ff;--st-blue-100:#dbeafe;--st-blue-200:#bfdbfe;--st-blue-300:#93c5fd;--st-blue-400:#60a5fa;--st-blue-500:#3b82f6;--st-blue-600:#2563eb;--st-blue-700:#1d4ed8;--st-blue-800:#1e40af;--st-blue-900:#1e3a8a;--st-blue-950:#172554;--st-indigo-50:#eef2ff;--st-indigo-100:#e0e7ff;--st-indigo-200:#c7d2fe;--st-indigo-300:#a5b4fc;--st-indigo-400:#818cf8;--st-indigo-500:#6366f1;--st-indigo-600:#4f46e5;--st-indigo-700:#4338ca;--st-indigo-800:#3730a3;--st-indigo-900:#312e81;--st-indigo-950:#1e1b4b;--st-violet-50:#f5f3ff;--st-violet-100:#ede9fe;--st-violet-200:#ddd6fe;--st-violet-300:#c4b5fd;--st-violet-400:#a78bfa;--st-violet-500:#8b5cf6;--st-violet-600:#7c3aed;--st-violet-700:#6d28d9;--st-violet-800:#5b21b6;--st-violet-900:#4c1d95;--st-violet-950:#2e1065;--st-purple-50:#faf5ff;--st-purple-100:#f3e8ff;--st-purple-200:#e9d5ff;--st-purple-300:#d8b4fe;--st-purple-400:#c084fc;--st-purple-500:#a855f7;--st-purple-600:#9333ea;--st-purple-700:#7e22ce;--st-purple-800:#6b21a8;--st-purple-900:#581c87;--st-purple-950:#3b0764;--st-fuchsia-50:#fdf4ff;--st-fuchsia-100:#fae8ff;--st-fuchsia-200:#f5d0fe;--st-fuchsia-300:#f0abfc;--st-fuchsia-400:#e879f9;--st-fuchsia-500:#d946ef;--st-fuchsia-600:#c026d3;--st-fuchsia-700:#a21caf;--st-fuchsia-800:#86198f;--st-fuchsia-900:#701a75;--st-fuchsia-950:#4a044e;--st-pink-50:#fdf2f8;--st-pink-100:#fce7f3;--st-pink-200:#fbcfe8;--st-pink-300:#f9a8d4;--st-pink-400:#f472b6;--st-pink-500:#ec4899;--st-pink-600:#db2777;--st-pink-700:#be185d;--st-pink-800:#9d174d;--st-pink-900:#831843;--st-pink-950:#500724;--st-rose-50:#fff1f2;--st-rose-100:#ffe4e6;--st-rose-200:#fecdd3;--st-rose-300:#fda4af;--st-rose-400:#fb7185;--st-rose-500:#f43f5e;--st-rose-600:#e11d48;--st-rose-700:#be123c;--st-rose-800:#9f1239;--st-rose-900:#881337;--st-rose-950:#4c0519}.theme-light{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-slate-50);--st-scrollbar-thumb-color:var(--st-slate-300);--st-border-color:var(--st-slate-300);--st-odd-row-background-color:var(--st-white);--st-even-row-background-color:var(--st-slate-50);--st-odd-column-background-color:var(--st-slate-50);--st-even-column-background-color:var(--st-white);--st-hover-row-background-color:var(--st-slate-100);--st-header-background-color:var(--st-slate-100);--st-header-label-color:var(--st-slate-900);--st-header-icon-color:var(--st-slate-500);--st-dragging-background-color:var(--st-slate-200);--st-selected-cell-background-color:var(--st-blue-100);--st-selected-first-cell-background-color:var(--st-blue-50);--st-footer-background-color:var(--st-slate-50);--st-cell-color:var(--st-slate-900);--st-cell-odd-row-color:var(--st-slate-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-slate-900);--st-selected-first-cell-color:var(--st-slate-900);--st-resize-handle-color:var(--st-slate-400);--st-separator-border-color:var(--st-slate-200);--st-last-group-row-separator-border-color:var(--st-slate-400);--st-selected-border-color:var(--st-blue-500);--st-editable-cell-focus-border-color:var(--st-blue-500);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-slate-100);--st-button-active-background-color:var(--st-blue-600);--st-cell-flash-color:var(--st-slate-200)}.theme-dark{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-gray-900);--st-scrollbar-thumb-color:var(--st-gray-600);--st-border-color:var(--st-gray-700);--st-odd-row-background-color:var(--st-gray-800);--st-even-row-background-color:var(--st-gray-900);--st-odd-column-background-color:var(--st-gray-800);--st-even-column-background-color:var(--st-gray-900);--st-hover-row-background-color:var(--st-gray-700);--st-header-background-color:var(--st-gray-800);--st-header-label-color:var(--st-gray-100);--st-header-icon-color:var(--st-gray-400);--st-dragging-background-color:var(--st-gray-600);--st-selected-cell-background-color:var(--st-blue-900);--st-selected-first-cell-background-color:var(--st-blue-800);--st-footer-background-color:var(--st-gray-900);--st-cell-color:var(--st-gray-100);--st-cell-odd-row-color:var(--st-gray-200);--st-edit-cell-shadow:0 1px 3px 0 #ffffff1a;--st-selected-cell-color:var(--st-white);--st-selected-first-cell-color:var(--st-white);--st-resize-handle-color:var(--st-gray-500);--st-separator-border-color:var(--st-gray-600);--st-last-group-row-separator-border-color:var(--st-gray-500);--st-selected-border-color:var(--st-blue-400);--st-editable-cell-focus-border-color:var(--st-blue-400);--st-checkbox-checked-background-color:var(--st-blue-500);--st-checkbox-checked-border-color:var(--st-blue-500);--st-column-editor-background-color:var(--st-gray-800);--st-column-editor-popout-background-color:var(--st-gray-800);--st-button-hover-background-color:var(--st-gray-700);--st-button-active-background-color:var(--st-blue-500);--st-cell-flash-color:var(--st-gray-600)}.theme-neutral{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-neutral-100);--st-scrollbar-thumb-color:var(--st-neutral-400);--st-border-color:var(--st-neutral-300);--st-odd-row-background-color:var(--st-neutral-50);--st-even-row-background-color:var(--st-neutral-100);--st-odd-column-background-color:var(--st-neutral-50);--st-even-column-background-color:var(--st-neutral-100);--st-hover-row-background-color:var(--st-neutral-200);--st-header-background-color:var(--st-neutral-200);--st-header-label-color:var(--st-neutral-900);--st-header-icon-color:var(--st-neutral-500);--st-dragging-background-color:var(--st-neutral-300);--st-selected-cell-background-color:var(--st-neutral-400);--st-selected-first-cell-background-color:var(--st-neutral-300);--st-footer-background-color:var(--st-neutral-50);--st-cell-color:var(--st-neutral-900);--st-cell-odd-row-color:var(--st-neutral-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-neutral-900);--st-selected-first-cell-color:var(--st-neutral-900);--st-resize-handle-color:var(--st-neutral-400);--st-separator-border-color:var(--st-neutral-200);--st-last-group-row-separator-border-color:var(--st-neutral-400);--st-selected-border-color:var(--st-neutral-600);--st-editable-cell-focus-border-color:var(--st-neutral-500);--st-checkbox-checked-background-color:var(--st-neutral-600);--st-checkbox-checked-border-color:var(--st-neutral-600);--st-column-editor-background-color:var(--st-neutral-50);--st-column-editor-popout-background-color:var(--st-neutral-50);--st-button-hover-background-color:var(--st-neutral-200);--st-button-active-background-color:var(--st-neutral-600);--st-cell-flash-color:var(--st-neutral-400)}.theme-sky{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-blue-50);--st-scrollbar-thumb-color:var(--st-blue-300);--st-border-color:var(--st-blue-300);--st-odd-row-background-color:var(--st-blue-50);--st-even-row-background-color:var(--st-blue-100);--st-odd-column-background-color:var(--st-blue-50);--st-even-column-background-color:var(--st-blue-100);--st-hover-row-background-color:var(--st-blue-200);--st-header-background-color:var(--st-blue-200);--st-header-label-color:var(--st-blue-900);--st-header-icon-color:var(--st-blue-600);--st-dragging-background-color:var(--st-blue-300);--st-selected-cell-background-color:var(--st-blue-400);--st-selected-first-cell-background-color:var(--st-blue-300);--st-footer-background-color:var(--st-blue-50);--st-cell-color:var(--st-blue-900);--st-cell-odd-row-color:var(--st-blue-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-blue-900);--st-selected-first-cell-color:var(--st-blue-900);--st-resize-handle-color:var(--st-blue-400);--st-separator-border-color:var(--st-blue-200);--st-last-group-row-separator-border-color:var(--st-blue-400);--st-selected-border-color:var(--st-blue-600);--st-editable-cell-focus-border-color:var(--st-blue-500);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-blue-50);--st-column-editor-popout-background-color:var(--st-blue-50);--st-button-hover-background-color:var(--st-blue-200);--st-button-active-background-color:var(--st-blue-600);--st-cell-flash-color:var(--st-blue-300)}.theme-funky{--st-border-radius:8px;--st-cell-padding:12px;--st-spacing-small:6px;--st-spacing-medium:10px;--st-scrollbar-bg-color:var(--st-stone-100);--st-scrollbar-thumb-color:var(--st-violet-500);--st-border-color:var(--st-stone-200);--st-odd-row-background-color:var(--st-amber-50);--st-even-row-background-color:var(--st-amber-100);--st-odd-column-background-color:var(--st-violet-50);--st-even-column-background-color:var(--st-amber-50);--st-hover-row-background-color:var(--st-amber-200);--st-header-background-color:var(--st-violet-600);--st-header-label-color:var(--st-white);--st-header-icon-color:var(--st-violet-200);--st-dragging-background-color:var(--st-violet-50);--st-selected-cell-background-color:var(--st-violet-50);--st-selected-first-cell-background-color:var(--st-violet-100);--st-footer-background-color:var(--st-stone-100);--st-cell-color:var(--st-stone-700);--st-cell-odd-row-color:var(--st-stone-700);--st-edit-cell-shadow:0 4px 6px -1px #7c3aed1a,0 2px 4px -1px #7c3aed0f;--st-selected-cell-color:var(--st-violet-800);--st-selected-first-cell-color:var(--st-violet-800);--st-resize-handle-color:var(--st-violet-400);--st-separator-border-color:var(--st-stone-200);--st-last-group-row-separator-border-color:var(--st-stone-300);--st-selected-border-color:var(--st-violet-500);--st-editable-cell-focus-border-color:var(--st-violet-500);--st-checkbox-checked-background-color:var(--st-violet-500);--st-checkbox-checked-border-color:var(--st-violet-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-violet-50);--st-button-active-background-color:var(--st-violet-600);--st-cell-flash-color:var(--st-violet-200)}.simple-table-root *{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit;scrollbar-color:var(--st-scrollbar-thumb-color) var(--st-scrollbar-bg-color);scrollbar-width:thin}.simple-table-root ::-webkit-scrollbar{height:8px;width:8px}.simple-table-root ::-webkit-scrollbar-track{background:var(--st-scrollbar-bg-color)}.simple-table-root ::-webkit-scrollbar-thumb{background:var(--st-scrollbar-thumb-color);border-radius:4px}.simple-table-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.st-wrapper{-webkit-box-flex:1;-ms-flex-positive:1;border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);flex-grow:1;max-height:100dvh;overflow:hidden;position:relative}.st-wrapper-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.st-content-wrapper,.st-wrapper-container{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;width:100%}.st-content-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:0}.st-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.st-content,.st-header-container{display:-webkit-box;display:-ms-flexbox;display:flex}.st-header-container{background-color:var(--st-header-background-color)}.st-header-container.st-header-scroll-padding:after{-ms-flex-negative:0;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);content:"";display:block;flex-shrink:0;width:default-width;width:var(--st-after-width,default-width)}.st-header-main,.st-header-pinned-left,.st-header-pinned-right{border-bottom:var(--st-border-width) solid var(--st-border-color);display:grid}.st-header-pinned-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-header-pinned-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-header-main{-webkit-overflow-scrolling:touch;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:auto;scrollbar-width:none;-ms-touch-action:auto;touch-action:auto}.st-header-main::-webkit-scrollbar{display:none}.st-body-container{-webkit-box-flex:1;-ms-flex-positive:1;-webkit-overflow-scrolling:touch;background-color:var(--st-even-row-background-color);display:-webkit-box;display:-ms-flexbox;display:flex;flex-grow:1;height:-webkit-max-content;height:-moz-max-content;height:max-content;overflow:auto;-ms-touch-action:auto;touch-action:auto;width:100%}.st-body-main,.st-body-pinned-left,.st-body-pinned-right{display:grid;height:-webkit-max-content;height:-moz-max-content;height:max-content;min-height:100%}.st-body-pinned-left{-ms-flex-negative:0;border-right:var(--st-border-width) solid var(--st-border-color);flex-shrink:0}.st-body-main{-webkit-overflow-scrolling:touch;overflow:auto;scrollbar-width:none;-ms-touch-action:auto;touch-action:auto}.st-body-main::-webkit-scrollbar{display:none}.st-body-pinned-right{-ms-flex-negative:0;border-left:var(--st-border-width) solid var(--st-border-color);flex-shrink:0}.st-row{display:grid;min-width:100%;position:absolute;-webkit-transition:background .2s ease;transition:background .2s ease}.st-row.hovered .st-cell:not(.st-cell-selected){background-color:var(--st-hover-row-background-color)}.st-row.even{background-color:var(--st-even-row-background-color)}.st-row.odd{background-color:var(--st-odd-row-background-color)}.st-row.odd .st-cell-content{color:var(--st-cell-odd-row-color)}.st-row.even .st-cell-content{color:var(--st-cell-color)}.st-header-cell{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-top:var(--st-border-width) solid #0000;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:var(--st-font-weight-bold);gap:var(--st-spacing-small);position:sticky;top:0}.st-header-cell.parent{border-bottom:var(--st-border-width) solid var(--st-border-color)}.st-header-cell.clickable{cursor:pointer}.st-header-cell.draggable{cursor:-webkit-grab;cursor:grab}.st-cell,.st-header-cell{-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--st-slate-800);display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--st-spacing-small);overflow:hidden;position:relative}.st-cell.left-aligned,.st-header-cell.left-aligned{padding-left:var(--st-cell-padding);text-align:left}.st-cell.center-aligned,.st-header-cell.center-aligned{text-align:center}.st-cell.center-aligned{padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-container-width))}.st-cell.center-aligned>.st-cell-content,.st-header-cell.center-aligned>.st-header-label-text{text-align:center}.st-cell.clickable{cursor:pointer}.st-cell,.st-cell-editing,.st-header-cell{height:100%;width:100%}.st-cell-editing{position:relative}.st-header-label{-webkit-box-flex:1;-ms-flex-positive:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;flex-grow:1;height:100%;min-width:0}.st-cell-content,.st-header-label-text{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:100%}.st-header-label-text{color:var(--st-header-label-color);font-weight:600;padding-left:var(--st-cell-padding);padding-right:var(--st-cell-padding)}.st-cell-content.left-aligned,.st-header-label-text.left-aligned{text-align:left}.st-cell-content.center-aligned,.st-header-label-text.center-aligned{text-align:center}.st-cell-content.right-aligned,.st-header-label-text.right-aligned{text-align:right}.st-not-resizeable .st-cell-content{padding-left:var(--st-cell-padding);padding-right:var(--st-cell-padding)}.st-resizeable .st-body-pinned-right .st-cell-content{padding-left:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-container-width));padding-right:var(--st-cell-padding)}.st-resizeable .st-body-main .st-cell-content,.st-resizeable .st-body-pinned-left .st-cell-content{padding-left:var(--st-cell-padding);padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-container-width))}.st-cell{border:var(--st-border-width) solid #0000}.st-cell.even-column:not(.st-cell-selected){background-color:var(--st-even-column-background-color)}.st-cell.odd-column:not(.st-cell-selected){background-color:var(--st-odd-column-background-color)}.st-cell-depth-1{padding-left:calc(var(--st-cell-padding)*4)}.st-cell-depth-2{padding-left:calc(var(--st-cell-padding)*8)}.st-cell-depth-3{padding-left:calc(var(--st-cell-padding)*12)}.st-cell-depth-4{padding-left:calc(var(--st-cell-padding)*16)}.st-cell-depth-5{padding-left:calc(var(--st-cell-padding)*20)}.st-cell-depth-6{padding-left:calc(var(--st-cell-padding)*24)}.st-cell-depth-7{padding-left:calc(var(--st-cell-padding)*28)}.st-cell-depth-1 .st-cell-content{color:rgb(from var(--st-cell-color) r g b/80%)!important}.st-cell-depth-2 .st-cell-content,.st-cell-depth-3 .st-cell-content,.st-cell-depth-4 .st-cell-content,.st-cell-depth-5 .st-cell-content,.st-cell-depth-6 .st-cell-content,.st-cell-depth-7 .st-cell-content{color:rgb(from var(--st-cell-color) r g b/70%)!important}.st-icon-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:center;margin-left:4px}.st-expand-icon{fill:var(--st-header-label-color);cursor:pointer}.st-header-resize-handle-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;cursor:col-resize;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;justify-content:center;width:var(--st-resize-handle-container-width)}.st-header-resize-handle{background-color:var(--st-resize-handle-color);height:calc(100% - 20px);width:var(--st-resize-handle-width)}.st-row-separator{background-color:var(--st-separator-border-color);grid-column:1/-1;height:1px}.st-row-separator.st-last-group-row{background-color:var(--st-last-group-row-separator-border-color)}.st-dragging{background-color:var(--st-dragging-background-color)}.st-cell-selected{background-color:var(--st-selected-cell-background-color)}.st-cell-selected .st-cell-content{color:var(--st-selected-cell-color)!important}.st-cell-selected-first{background-color:var(--st-selected-first-cell-background-color)!important;border:var(--st-border-width) solid var(--st-selected-border-color)}.st-cell-selected-first .st-cell-content{color:var(--st-selected-first-cell-color)!important}.st-selected-top-border{border-top:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-bottom-border{border-bottom:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-left-border{border-left:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-right-border{border-right:var(--st-border-width) solid var(--st-selected-border-color)}.st-horizontal-scrollbar-container{-ms-flex-negative:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-scrollbar-bg-color);border-top:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;flex-shrink:0;height:12px;width:100%}.st-horizontal-scrollbar-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-left,.st-horizontal-scrollbar-right{height:100%}.st-horizontal-scrollbar-middle{-webkit-overflow-scrolling:touch;min-height:11px;overflow:auto;-ms-touch-action:auto;touch-action:auto}.st-horizontal-scrollbar-middle>div{height:1px}.st-footer{-ms-flex-negative:0;background-color:var(--st-footer-background-color);border-top:var(--st-border-width) solid var(--st-border-color);flex-shrink:0;padding:var(--st-spacing-medium)}.st-footer,.st-next-prev-btn{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.st-next-prev-btn{-webkit-box-pack:center;-ms-flex-pack:center;fill:var(--st-slate-600);background-color:initial;border:none;border-radius:var(--st-border-radius);cursor:pointer;justify-content:center;padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.disabled>.st-next-prev-icon{fill:var(--st-slate-400);cursor:not-allowed}.st-next-prev-btn:not(.disabled):hover{background-color:var(--st-slate-100)}.st-page-btn{background-color:initial;border:none;border-radius:var(--st-border-radius);color:var(--st-slate-600);cursor:pointer;margin-left:var(--st-spacing-small);padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-page-btn:hover{background-color:var(--st-button-hover-background-color)}.st-page-btn.active{background-color:var(--st-button-active-background-color);color:#fff}.st-page-ellipsis{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;color:var(--st-cell-color);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-weight:700;justify-content:center;margin:0 var(--st-spacing-small);padding:var(--st-spacing-small)}.editable-cell-input{border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);-webkit-box-shadow:var(--st-edit-cell-shadow-color);box-shadow:var(--st-edit-cell-shadow-color);font-size:.875rem;height:100%;left:0;outline:none;padding:var(--st-cell-padding);position:absolute;top:0;width:100%;z-index:1}.editable-cell-input:focus{border:var(--st-border-width) solid var(--st-editable-cell-focus-border-color)}.st-column-editor{-ms-flex-negative:0;background:var(--st-column-editor-background-color);border-left:var(--st-border-width) solid var(--st-border-color);color:var(--st-slate-500);cursor:pointer;flex-shrink:0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-column-editor-text{padding:var(--st-spacing-medium) var(--st-spacing-small);-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;z-index:2}.st-column-editor.open,.st-column-editor.open .st-column-editor-text{background-color:var(--st-column-editor-background-color)}.st-column-editor-popout{background-color:var(--st-column-editor-popout-background-color);height:100%;overflow:hidden;position:absolute;right:calc(100% + 1px);top:0;-webkit-transition:width var(--st-transition-duration) var(--st-transition-ease);transition:width var(--st-transition-duration) var(--st-transition-ease);width:0;z-index:1}.st-column-editor-popout-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-overflow-scrolling:touch;border-left:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium);height:100%;overflow:auto;padding:var(--st-spacing-medium) var(--st-spacing-small);-ms-touch-action:auto;touch-action:auto}.st-header-checkbox-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.st-header-checkbox-item,.st-header-icon-container{display:-webkit-box;display:-ms-flexbox;display:flex}.st-header-icon-container{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:24px}.st-header-icon{fill:var(--st-header-icon-color);-webkit-transition:fill var(--st-transition-duration) var(--st-transition-ease);transition:fill var(--st-transition-duration) var(--st-transition-ease)}.st-collapsible-header-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}.st-collapsible-header-icon,.st-nested-headers{display:-webkit-box;display:-ms-flexbox;display:flex}.st-nested-headers{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium)}.st-column-editor-popout.open{min-width:200px;width:auto}.st-column-editor-popout.left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.st-column-editor-popout.open.left{-webkit-transform:translateX(0);transform:translateX(0)}.st-checkbox-label{-ms-flex-negative:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;flex-shrink:0;gap:var(--st-spacing-small);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.st-checkbox-input{display:none}.st-checkbox-custom{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:#fff;border:var(--st-border-width) solid var(--st-slate-300);border-radius:var(--st-border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;height:16px;justify-content:center;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);width:16px}.st-checkbox-custom.st-checked{background-color:var(--st-checkbox-checked-background-color);border-color:var(--st-checkbox-checked-border-color)}.st-checkbox-checkmark{fill:#fff}@-webkit-keyframes slide-in-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-in-right{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-right{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}.st-group-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:var(--st-font-weight-bold);height:40px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-group-header:hover{background-color:var(--st-button-hover-background-color)}.st-group-header-content{gap:var(--st-spacing-medium)}.st-group-header-content,.st-group-toggle-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.st-group-toggle-icon{-webkit-box-pack:center;-ms-flex-pack:center;font-size:.8em;height:16px;justify-content:center;width:16px}.st-group-name{font-weight:var(--st-font-weight-bold)}.st-group-count{color:var(--st-cell-odd-row-color);font-size:.9em}.st-group-header.expanded .st-group-toggle-icon{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.st-group-header.collapsed .st-group-toggle-icon,.st-group-header.expanded .st-group-toggle-icon{-webkit-transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease),-webkit-transform var(--st-transition-duration) var(--st-transition-ease)}.st-group-header.collapsed .st-group-toggle-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}@-webkit-keyframes cell-flash{0%{background-color:initial}50%{background-color:var(--st-cell-flash-color)}to{background-color:initial}}@keyframes cell-flash{0%{background-color:initial}50%{background-color:var(--st-cell-flash-color)}to{background-color:initial}}.st-cell-updating{-webkit-animation:cell-flash .6s ease-in-out;animation:cell-flash .6s ease-in-out}.st-dropdown-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-overflow-scrolling:touch;background-color:var(--st-odd-row-background-color);border:1px solid var(--st-border-color);border-radius:var(--st-border-radius);-webkit-box-shadow:var(--st-edit-cell-shadow);box-shadow:var(--st-edit-cell-shadow);cursor:default;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:400px;min-width:120px;position:fixed;-ms-touch-action:auto;touch-action:auto;-webkit-transform:translateZ(0);transform:translateZ(0);will-change:transform;z-index:100}.st-dropdown-bottom-left,.st-dropdown-bottom-right{margin-top:4px}.st-dropdown-top-left,.st-dropdown-top-right{margin-bottom:4px}.st-dropdown-item{color:var(--st-cell-color);cursor:pointer;padding:8px 12px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);white-space:nowrap}.st-dropdown-item:hover{background-color:var(--st-button-hover-background-color)}.st-dropdown-item.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-dropdown-group-label{color:var(--st-slate-500);font-size:.8em;font-weight:600;padding:6px 12px}.st-dropdown-divider{background-color:var(--st-border-color);height:1px;margin:4px 0}.st-datepicker{background-color:var(--st-odd-row-background-color);font-family:inherit;min-width:280px}.st-datepicker-header{-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-bottom:1px solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:space-between;padding:10px}.st-datepicker-header-label{-webkit-box-flex:1;color:var(--st-header-label-color);cursor:pointer;-ms-flex:1;flex:1;font-weight:600;text-align:center}.st-datepicker-nav-btn{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:#0000;border:none;border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:1.2em;justify-content:center;padding:0 8px}.st-datepicker-nav-btn>*{fill:var(--st-cell-color)!important}.st-datepicker-nav-btn:hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-grid{display:grid;padding:10px}.st-datepicker-days-grid{gap:4px;grid-template-columns:repeat(7,1fr)}.st-datepicker-months-grid,.st-datepicker-years-grid{gap:8px;grid-template-columns:repeat(3,1fr)}.st-datepicker-weekday{color:var(--st-slate-500);font-size:.8em;font-weight:600;padding:6px 0;text-align:center}.st-datepicker-day{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:50%;color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:32px;justify-content:center;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-day.empty{cursor:default}.st-datepicker-day:not(.empty):hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-day.today{color:var(--st-button-active-background-color);font-weight:600}.st-datepicker-day.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-datepicker-day.other-month{color:var(--st-slate-400)}.st-datepicker-month,.st-datepicker-year{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:var(--st-border-radius);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:center;padding:12px 8px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-month:hover,.st-datepicker-year:hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-month.selected,.st-datepicker-year.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-datepicker-footer{-webkit-box-pack:end;-ms-flex-pack:end;border-top:1px solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:flex-end;padding:10px}.st-datepicker-today-btn{background-color:initial;border:1px solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;padding:6px 12px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-today-btn:hover{background-color:var(--st-button-hover-background-color)}.st-filter-bar{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium)}.st-filter-container{min-width:150px;padding:var(--st-spacing-medium)}.st-filter-container,.st-filter-section{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-flex:1;-ms-flex-positive:1;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;flex-grow:1}.st-filter-section{margin-bottom:var(--st-spacing-medium)}.st-filter-input{background-color:var(--st-odd-row-background-color);border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);font-family:inherit;font-size:14px;outline:none;padding:var(--st-spacing-small);-webkit-transition:border-color var(--st-transition-duration) var(--st-transition-ease);transition:border-color var(--st-transition-duration) var(--st-transition-ease);width:100%}.st-filter-input:focus{border-color:var(--st-editable-cell-focus-border-color)}.st-filter-input-range-from{margin-bottom:var(--st-spacing-medium)}.st-filter-select{background-color:var(--st-odd-row-background-color);border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;font-family:inherit;font-size:14px;outline:none;padding:var(--st-spacing-medium) var(--st-spacing-medium);-webkit-transition:border-color var(--st-transition-duration) var(--st-transition-ease);transition:border-color var(--st-transition-duration) var(--st-transition-ease);width:100%}.st-filter-select:focus{border-color:var(--st-editable-cell-focus-border-color)}.st-filter-actions{border-top:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--st-spacing-medium);padding-top:var(--st-spacing-medium)}.st-filter-button{-webkit-box-flex:1;border:none;border-radius:var(--st-border-radius);cursor:pointer;-ms-flex:1;flex:1;font-family:inherit;font-size:14px;font-weight:500;padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-filter-button-apply{background-color:var(--st-button-active-background-color);color:#fff}.st-filter-button-apply:hover:not(.st-filter-button-disabled){opacity:.9}.st-filter-button-disabled{background-color:var(--st-slate-300);color:var(--st-slate-500);cursor:not-allowed}.st-filter-button-clear{background-color:initial;border:var(--st-border-width) solid var(--st-border-color);color:var(--st-cell-color)}.st-filter-button-clear:hover{background-color:var(--st-button-hover-background-color)}.st-custom-select{position:relative;width:100%}.st-custom-select-trigger{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;background-color:var(--st-odd-row-background-color);border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-family:inherit;font-size:14px;gap:var(--st-spacing-medium);justify-content:space-between;outline:none;padding:var(--st-spacing-small);-webkit-transition:border-color var(--st-transition-duration) var(--st-transition-ease);transition:border-color var(--st-transition-duration) var(--st-transition-ease);width:100%}.st-custom-select-open .st-custom-select-trigger,.st-custom-select-trigger:focus,.st-custom-select-trigger:hover:not(:disabled){border-color:var(--st-editable-cell-focus-border-color)}.st-custom-select-value{-webkit-box-flex:1;color:var(--st-cell-color);-ms-flex:1;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.st-custom-select-arrow{-ms-flex-negative:0;color:var(--st-header-label-color);flex-shrink:0;-webkit-transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease),-webkit-transform var(--st-transition-duration) var(--st-transition-ease)}.st-custom-select-open .st-custom-select-arrow{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.st-custom-select-options{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:200px;min-width:120px;overflow:auto;overflow-x:hidden}.st-custom-select-option{-ms-flex-negative:0;color:var(--st-cell-color);cursor:pointer;flex-shrink:0;font-size:14px;overflow:hidden;padding:var(--st-spacing-small);text-overflow:ellipsis;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);white-space:nowrap}.st-custom-select-option-focused,.st-custom-select-option:hover{background-color:var(--st-button-hover-background-color)}.st-custom-select-option-selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-custom-select-option-selected.st-custom-select-option-focused{background-color:var(--st-selected-cell-background-color);opacity:.9}.st-custom-select-disabled{opacity:var(--st-opacity-disabled);pointer-events:none}.st-custom-select-disabled .st-custom-select-trigger{background-color:var(--st-header-background-color);color:var(--st-header-label-color);cursor:not-allowed}.st-enum-filter-options{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-flex:1;-ms-flex-positive:1;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;flex-grow:1;gap:var(--st-spacing-small);max-height:200px;overflow:auto}.st-enum-select-all{border-bottom:var(--st-border-width) solid var(--st-border-color);margin-bottom:var(--st-spacing-small);padding-bottom:var(--st-spacing-small)}.st-enum-select-all-label{color:var(--st-header-label-color);font-weight:600}.st-enum-option-label{color:var(--st-cell-color);font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-filter-bar{background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);padding:var(--st-spacing-medium)}.st-filter-bar-content{-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--st-spacing-medium)}.st-filter-bar-content,.st-filter-chips{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.st-filter-chips{gap:var(--st-spacing-small)}.st-filter-chip{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-selected-cell-background-color);border:var(--st-border-width) solid var(--st-selected-border-color);border-radius:calc(var(--st-border-radius)*2);color:var(--st-selected-cell-color);display:-webkit-box;display:-ms-flexbox;display:flex;font-size:13px;padding:var(--st-spacing-small) var(--st-spacing-medium)}.st-filter-chip-text{margin-right:var(--st-spacing-small);white-space:nowrap}.st-filter-chip-remove{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:none;border:none;border-radius:50%;color:inherit;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:16px;font-weight:700;height:16px;justify-content:center;line-height:1;margin-left:var(--st-spacing-small);padding:0;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);width:16px}.st-filter-chip-remove:hover{background-color:#fff3}.st-filter-bar-label{-ms-flex-negative:0;color:var(--st-header-label-color);flex-shrink:0;font-size:14px;font-weight:600}
@@ -0,0 +1,5 @@
1
+ type EnumOption = {
2
+ label: string;
3
+ value: string;
4
+ };
5
+ export default EnumOption;
@@ -0,0 +1,21 @@
1
+ import CellValue from "./CellValue";
2
+ export type StringFilterOperator = "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "isEmpty" | "isNotEmpty";
3
+ export type NumberFilterOperator = "equals" | "notEquals" | "greaterThan" | "lessThan" | "greaterThanOrEqual" | "lessThanOrEqual" | "between" | "notBetween" | "isEmpty" | "isNotEmpty";
4
+ export type BooleanFilterOperator = "equals" | "isEmpty" | "isNotEmpty";
5
+ export type DateFilterOperator = "equals" | "notEquals" | "before" | "after" | "between" | "notBetween" | "isEmpty" | "isNotEmpty";
6
+ export type EnumFilterOperator = "in" | "notIn" | "isEmpty" | "isNotEmpty";
7
+ export type FilterOperator = StringFilterOperator | NumberFilterOperator | BooleanFilterOperator | DateFilterOperator | EnumFilterOperator;
8
+ export interface FilterCondition {
9
+ accessor: string;
10
+ operator: FilterOperator;
11
+ value?: CellValue;
12
+ values?: CellValue[];
13
+ }
14
+ export interface TableFilterState {
15
+ [accessor: string]: FilterCondition;
16
+ }
17
+ export declare const FILTER_OPERATOR_LABELS: Record<FilterOperator, string>;
18
+ export declare const getAvailableOperators: (columnType: "string" | "number" | "boolean" | "date" | "enum") => FilterOperator[];
19
+ export declare const requiresSingleValue: (operator: FilterOperator) => boolean;
20
+ export declare const requiresMultipleValues: (operator: FilterOperator) => boolean;
21
+ export declare const requiresNoValue: (operator: FilterOperator) => boolean;