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