simple-table-core 2.1.0 → 2.1.1

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