var at=`
*,
*::before,
*::after {
  box-sizing: border-box;
}

.shiny-data-grid {
  --shiny-datagrid-font-size: 0.9em;
  --shiny-datagrid-padding-x: 0.5em;
  --shiny-datagrid-padding-y: 0.3em;
  --shiny-datagrid-padding: var(--shiny-datagrid-padding-y)
    var(--shiny-datagrid-padding-x);
  --shiny-datagrid-grid-header-bgcolor: var(--bs-light, #eee);
  --shiny-datagrid-grid-header-gridlines-color: var(--bs-border-color, #ccc);
  --shiny-datagrid-grid-header-gridlines-style: solid;
  --shiny-datagrid-grid-gridlines-color: var(--bs-border-color, #ccc);
  --shiny-datagrid-grid-gridlines-style: solid;
  --shiny-datagrid-table-header-bottom-border: 1px solid;
  --shiny-datagrid-table-top-border: 1px solid;
  --shiny-datagrid-table-bottom-border: 1px solid;
  --shiny-datagrid-grid-body-hover-bgcolor: var(
    --shiny-datagrid-grid-header-bgcolor
  );
  --shiny-datagrid-grid-body-selected-bgcolor: #b4d5fe;
  --shiny-datagrid-grid-body-selected-color: var(--bs-dark);
}

.shiny-data-grid svg.sort-arrow {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-bottom: 0.15em;
}

.shiny-data-grid {
  max-width: 100%;
}
.shiny-data-grid > table {
  border-collapse: separate;
  border-spacing: 0;
}
.shiny-data-grid > table > thead {
  position: sticky;
  top: 0;
}
.shiny-data-grid > table > thead > tr > th {
  text-align: left;
  white-space: nowrap;
}
.shiny-data-grid > table > thead > tr > th:focus-visible {
  outline: 5px auto Highlight;
  outline: 5px auto -webkit-focus-ring-color;
}
.shiny-data-grid > table.filtering > thead > tr:nth-last-child(2) > th {
  border-bottom: none;
}
.shiny-data-grid > table.filtering > thead > tr.filters > th {
  font-weight: unset;
  padding-top: 0;
  /* Slight boost to bottom padding */
  padding-bottom: var(--shiny-datagrid-padding-x);
}
.shiny-data-grid > table.filtering > thead > tr.filters > th > input {
  width: 100%;
}

.shiny-data-grid.shiny-data-grid-table {
  border-top: var(--shiny-datagrid-table-top-border);
}
.shiny-data-grid.shiny-data-grid-table.scrolling {
  border-bottom: var(--shiny-datagrid-table-bottom-border);
}
.shiny-data-grid.shiny-data-grid-table > table > thead > tr:last-child > th {
  border-bottom: var(--shiny-datagrid-table-header-bottom-border);
}
.shiny-data-grid.shiny-data-grid-table > table > tbody > tr[aria-selected=true] {
  --shiny-datagrid-grid-gridlines-color: var(
    --shiny-datagrid-grid-body-selected-bgcolor
  );
  background-color: var(--shiny-datagrid-grid-body-selected-bgcolor);
  color: var(--shiny-datagrid-grid-body-selected-color);
}

/*
 *
 * # GRID STYLES
 *
 */
.shiny-data-grid.shiny-data-grid-grid > table {
  font-size: var(--shiny-datagrid-font-size);
}
.shiny-data-grid.shiny-data-grid-grid > table > thead > tr > th,
.shiny-data-grid.shiny-data-grid-grid > table > thead > tr > td {
  background-color: var(--shiny-datagrid-grid-header-bgcolor);
  padding: var(--shiny-datagrid-padding);
}
.shiny-data-grid.shiny-data-grid-grid > table > tbody > tr:focus-visible {
  outline: 5px auto Highlight;
  outline: 5px auto -webkit-focus-ring-color;
}
.shiny-data-grid.shiny-data-grid-grid > table > tbody > tr:hover {
  --shiny-datagrid-grid-gridlines-color: inherit;
  background-color: var(--shiny-datagrid-grid-body-hover-bgcolor);
}
.shiny-data-grid.shiny-data-grid-grid > table > tbody > tr[aria-selected=true] {
  --shiny-datagrid-grid-gridlines-color: var(
    --shiny-datagrid-grid-body-selected-bgcolor
  );
  background-color: var(--shiny-datagrid-grid-body-selected-bgcolor);
  color: var(--shiny-datagrid-grid-body-selected-color);
}
.shiny-data-grid.shiny-data-grid-grid > table > tbody > tr > td {
  padding: var(--shiny-datagrid-padding);
}

/* ## Grid borders */
.shiny-data-grid.shiny-data-grid-grid > table {
  border-collapse: separate;
}
.shiny-data-grid.shiny-data-grid-grid > table > thead > tr:first-child > th {
  border-top-style: var(--shiny-datagrid-grid-gridlines-style);
}
.shiny-data-grid.shiny-data-grid-grid > table > thead > tr > th {
  border: 1px var(--shiny-datagrid-grid-gridlines-style) var(--shiny-datagrid-grid-header-gridlines-color);
  border-top-style: none;
  border-left-style: none;
}
.shiny-data-grid.shiny-data-grid-grid > table > thead > tr > th:first-child {
  border-left-style: var(--shiny-datagrid-grid-gridlines-style);
}
.shiny-data-grid.shiny-data-grid-grid > table > tbody > tr > td {
  border: 1px var(--shiny-datagrid-grid-gridlines-style) var(--shiny-datagrid-grid-gridlines-color);
  border-top-style: none;
  border-left-style: none;
}
.shiny-data-grid.shiny-data-grid-grid > table > tbody > tr > td:first-child {
  border-left-style: var(--shiny-datagrid-grid-gridlines-style);
}
.shiny-data-grid.shiny-data-grid-grid.scrolling {
  border: var(--shiny-datagrid-grid-gridlines-style) 1px var(--shiny-datagrid-grid-header-gridlines-color);
}
.shiny-data-grid.shiny-data-grid-grid.scrolling > table > thead > tr:first-child > th {
  border-top-style: none;
}
.shiny-data-grid.shiny-data-grid-grid.scrolling > table > tbody > tr:last-child > td {
  border-bottom-style: none;
}
.shiny-data-grid.shiny-data-grid-grid.scrolling > table > thead > tr > th:first-child,
.shiny-data-grid.shiny-data-grid-grid.scrolling > table > tbody > tr > td:first-child {
  border-left-style: none;
}
.shiny-data-grid.shiny-data-grid-grid.scrolling > table > thead > tr > th:last-child,
.shiny-data-grid.shiny-data-grid-grid.scrolling > table > tbody > tr > td:last-child {
  border-right-style: none;
}`;var se,h,pt,rr,Y,dt,_t,Fe,mt,fe={},ht=[],or=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,me=Array.isArray;function G(e,n){for(var t in n)e[t]=n[t];return e}function vt(e){var n=e.parentNode;n&&n.removeChild(e)}function D(e,n,t){var r,o,i,l={};for(i in n)i=="key"?r=n[i]:i=="ref"?o=n[i]:l[i]=n[i];if(arguments.length>2&&(l.children=arguments.length>3?se.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)l[i]===void 0&&(l[i]=e.defaultProps[i]);return ie(e,l,r,o,null)}function ie(e,n,t,r,o){var i={type:e,props:n,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++pt};return o==null&&h.vnode!=null&&h.vnode(i),i}function Me(){return{current:null}}function H(e){return e.children}function T(e,n){this.props=e,this.context=n}function le(e,n){if(n==null)return e.__?le(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if((t=e.__k[n])!=null&&t.__e!=null)return t.__e;return typeof e.type=="function"?le(e):null}function yt(e){var n,t;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if((t=e.__k[n])!=null&&t.__e!=null){e.__e=e.__c.base=t.__e;break}return yt(e)}}function $e(e){(!e.__d&&(e.__d=!0)&&Y.push(e)&&!pe.__r++||dt!==h.debounceRendering)&&((dt=h.debounceRendering)||_t)(pe)}function pe(){var e,n,t,r,o,i,l,u;for(Y.sort(Fe);e=Y.shift();)e.__d&&(n=Y.length,r=void 0,o=void 0,l=(i=(t=e).__v).__e,(u=t.__P)&&(r=[],(o=G({},i)).__v=i.__v+1,Ve(u,i,o,t.__n,u.ownerSVGElement!==void 0,i.__h!=null?[l]:null,r,l??le(i),i.__h),Rt(r,i),i.__e!=l&&yt(i)),Y.length>n&&Y.sort(Fe));pe.__r=0}function bt(e,n,t,r,o,i,l,u,a,c){var s,f,g,d,p,_,m,v=r&&r.__k||ht,S=v.length;for(t.__k=[],s=0;s<n.length;s++)if((d=t.__k[s]=(d=n[s])==null||typeof d=="boolean"||typeof d=="function"?null:typeof d=="string"||typeof d=="number"||typeof d=="bigint"?ie(null,d,null,null,d):me(d)?ie(H,{children:d},null,null,null):d.__b>0?ie(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)!=null){if(d.__=t,d.__b=t.__b+1,(g=v[s])===null||g&&d.key==g.key&&d.type===g.type)v[s]=void 0;else for(f=0;f<S;f++){if((g=v[f])&&d.key==g.key&&d.type===g.type){v[f]=void 0;break}g=null}Ve(e,d,g=g||fe,o,i,l,u,a,c),p=d.__e,(f=d.ref)&&g.ref!=f&&(m||(m=[]),g.ref&&m.push(g.ref,null,d),m.push(f,d.__c||p,d)),p!=null?(_==null&&(_=p),typeof d.type=="function"&&d.__k===g.__k?d.__d=a=St(d,a,e):a=Ct(e,d,g,v,p,a),typeof t.type=="function"&&(t.__d=a)):a&&g.__e==a&&a.parentNode!=e&&(a=le(g))}for(t.__e=_,s=S;s--;)v[s]!=null&&(typeof t.type=="function"&&v[s].__e!=null&&v[s].__e==t.__d&&(t.__d=wt(r).nextSibling),xt(v[s],v[s]));if(m)for(s=0;s<m.length;s++)Et(m[s],m[++s],m[++s])}function St(e,n,t){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,n=typeof r.type=="function"?St(r,n,t):Ct(t,r,r,o,r.__e,n));return n}function P(e,n){return n=n||[],e==null||typeof e=="boolean"||(me(e)?e.some(function(t){P(t,n)}):n.push(e)),n}function Ct(e,n,t,r,o,i){var l,u,a;if(n.__d!==void 0)l=n.__d,n.__d=void 0;else if(t==null||o!=i||o.parentNode==null)e:if(i==null||i.parentNode!==e)e.appendChild(o),l=null;else{for(u=i,a=0;(u=u.nextSibling)&&a<r.length;a+=1)if(u==o)break e;e.insertBefore(o,i),l=i}return l!==void 0?l:o.nextSibling}function wt(e){var n,t,r;if(e.type==null||typeof e.type=="string")return e.__e;if(e.__k){for(n=e.__k.length-1;n>=0;n--)if((t=e.__k[n])&&(r=wt(t)))return r}return null}function ir(e,n,t,r,o){var i;for(i in t)i==="children"||i==="key"||i in n||_e(e,i,null,t[i],r);for(i in n)o&&typeof n[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||t[i]===n[i]||_e(e,i,n[i],t[i],r)}function ct(e,n,t){n[0]==="-"?e.setProperty(n,t??""):e[n]=t==null?"":typeof t!="number"||or.test(n)?t:t+"px"}function _e(e,n,t,r,o){var i;e:if(n==="style")if(typeof t=="string")e.style.cssText=t;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(n in r)t&&n in t||ct(e.style,n,"");if(t)for(n in t)r&&t[n]===r[n]||ct(e.style,n,t[n])}else if(n[0]==="o"&&n[1]==="n")i=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?r||e.addEventListener(n,i?ft:gt,i):e.removeEventListener(n,i?ft:gt,i);else if(n!=="dangerouslySetInnerHTML"){if(o)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!=="width"&&n!=="height"&&n!=="href"&&n!=="list"&&n!=="form"&&n!=="tabIndex"&&n!=="download"&&n!=="rowSpan"&&n!=="colSpan"&&n in e)try{e[n]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&n[4]!=="-"?e.removeAttribute(n):e.setAttribute(n,t))}}function gt(e){return this.l[e.type+!1](h.event?h.event(e):e)}function ft(e){return this.l[e.type+!0](h.event?h.event(e):e)}function Ve(e,n,t,r,o,i,l,u,a){var c,s,f,g,d,p,_,m,v,S,x,C,V,N,J,F=n.type;if(n.constructor!==void 0)return null;t.__h!=null&&(a=t.__h,u=n.__e=t.__e,n.__h=null,i=[u]),(c=h.__b)&&c(n);try{e:if(typeof F=="function"){if(m=n.props,v=(c=F.contextType)&&r[c.__c],S=c?v?v.props.value:c.__:r,t.__c?_=(s=n.__c=t.__c).__=s.__E:("prototype"in F&&F.prototype.render?n.__c=s=new F(m,S):(n.__c=s=new T(m,S),s.constructor=F,s.render=sr),v&&v.sub(s),s.props=m,s.state||(s.state={}),s.context=S,s.__n=r,f=s.__d=!0,s.__h=[],s._sb=[]),s.__s==null&&(s.__s=s.state),F.getDerivedStateFromProps!=null&&(s.__s==s.state&&(s.__s=G({},s.__s)),G(s.__s,F.getDerivedStateFromProps(m,s.__s))),g=s.props,d=s.state,s.__v=n,f)F.getDerivedStateFromProps==null&&s.componentWillMount!=null&&s.componentWillMount(),s.componentDidMount!=null&&s.__h.push(s.componentDidMount);else{if(F.getDerivedStateFromProps==null&&m!==g&&s.componentWillReceiveProps!=null&&s.componentWillReceiveProps(m,S),!s.__e&&s.shouldComponentUpdate!=null&&s.shouldComponentUpdate(m,s.__s,S)===!1||n.__v===t.__v){for(n.__v!==t.__v&&(s.props=m,s.state=s.__s,s.__d=!1),s.__e=!1,n.__e=t.__e,n.__k=t.__k,n.__k.forEach(function(Z){Z&&(Z.__=n)}),x=0;x<s._sb.length;x++)s.__h.push(s._sb[x]);s._sb=[],s.__h.length&&l.push(s);break e}s.componentWillUpdate!=null&&s.componentWillUpdate(m,s.__s,S),s.componentDidUpdate!=null&&s.__h.push(function(){s.componentDidUpdate(g,d,p)})}if(s.context=S,s.props=m,s.__P=e,C=h.__r,V=0,"prototype"in F&&F.prototype.render){for(s.state=s.__s,s.__d=!1,C&&C(n),c=s.render(s.props,s.state,s.context),N=0;N<s._sb.length;N++)s.__h.push(s._sb[N]);s._sb=[]}else do s.__d=!1,C&&C(n),c=s.render(s.props,s.state,s.context),s.state=s.__s;while(s.__d&&++V<25);s.state=s.__s,s.getChildContext!=null&&(r=G(G({},r),s.getChildContext())),f||s.getSnapshotBeforeUpdate==null||(p=s.getSnapshotBeforeUpdate(g,d)),bt(e,me(J=c!=null&&c.type===H&&c.key==null?c.props.children:c)?J:[J],n,t,r,o,i,l,u,a),s.base=n.__e,n.__h=null,s.__h.length&&l.push(s),_&&(s.__E=s.__=null),s.__e=!1}else i==null&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=lr(t.__e,n,t,r,o,i,l,a);(c=h.diffed)&&c(n)}catch(Z){n.__v=null,(a||i!=null)&&(n.__e=u,n.__h=!!a,i[i.indexOf(u)]=null),h.__e(Z,n,t)}}function Rt(e,n){h.__c&&h.__c(n,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(r){r.call(t)})}catch(r){h.__e(r,t.__v)}})}function lr(e,n,t,r,o,i,l,u){var a,c,s,f=t.props,g=n.props,d=n.type,p=0;if(d==="svg"&&(o=!0),i!=null){for(;p<i.length;p++)if((a=i[p])&&"setAttribute"in a==!!d&&(d?a.localName===d:a.nodeType===3)){e=a,i[p]=null;break}}if(e==null){if(d===null)return document.createTextNode(g);e=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,g.is&&g),i=null,u=!1}if(d===null)f===g||u&&e.data===g||(e.data=g);else{if(i=i&&se.call(e.childNodes),c=(f=t.props||fe).dangerouslySetInnerHTML,s=g.dangerouslySetInnerHTML,!u){if(i!=null)for(f={},p=0;p<e.attributes.length;p++)f[e.attributes[p].name]=e.attributes[p].value;(s||c)&&(s&&(c&&s.__html==c.__html||s.__html===e.innerHTML)||(e.innerHTML=s&&s.__html||""))}if(ir(e,g,f,o,u),s)n.__k=[];else if(bt(e,me(p=n.props.children)?p:[p],n,t,r,o&&d!=="foreignObject",i,l,i?i[0]:t.__k&&le(t,0),u),i!=null)for(p=i.length;p--;)i[p]!=null&&vt(i[p]);u||("value"in g&&(p=g.value)!==void 0&&(p!==e.value||d==="progress"&&!p||d==="option"&&p!==f.value)&&_e(e,"value",p,f.value,!1),"checked"in g&&(p=g.checked)!==void 0&&p!==e.checked&&_e(e,"checked",p,f.checked,!1))}return e}function Et(e,n,t){try{typeof e=="function"?e(n):e.current=n}catch(r){h.__e(r,t)}}function xt(e,n,t){var r,o;if(h.unmount&&h.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Et(r,null,n)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){h.__e(i,n)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&xt(r[o],n,t||typeof e.type!="function");t||e.__e==null||vt(e.__e),e.__=e.__e=e.__d=void 0}function sr(e,n,t){return this.constructor(e,t)}function ee(e,n,t){var r,o,i;h.__&&h.__(e,n),o=(r=typeof t=="function")?null:t&&t.__k||n.__k,i=[],Ve(n,e=(!r&&t||n).__k=D(H,null,[e]),o||fe,fe,n.ownerSVGElement!==void 0,!r&&t?[t]:o?null:n.firstChild?se.call(n.childNodes):null,i,!r&&t?t:o?o.__e:n.firstChild,r),Rt(i,e)}function Ie(e,n){ee(e,n,Ie)}function Ft(e,n,t){var r,o,i,l,u=G({},e.props);for(i in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),n)i=="key"?r=n[i]:i=="ref"?o=n[i]:u[i]=n[i]===void 0&&l!==void 0?l[i]:n[i];return arguments.length>2&&(u.children=arguments.length>3?se.call(arguments,2):t),ie(e.type,u,r||e.key,o||e.ref,null)}function De(e,n){var t={__c:n="__cC"+mt++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[n]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(l){this.props.value!==l.value&&o.some(function(u){u.__e=!0,$e(u)})},this.sub=function(l){o.push(l);var u=l.componentWillUnmount;l.componentWillUnmount=function(){o.splice(o.indexOf(l),1),u&&u.call(l)}}),r.children}};return t.Provider.__=t.Consumer.contextType=t}se=ht.slice,h={__e:function(e,n,t,r){for(var o,i,l;n=n.__;)if((o=n.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),l=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),l=o.__d),l)return o.__E=o}catch(u){e=u}throw e}},pt=0,rr=function(e){return e!=null&&e.constructor===void 0},T.prototype.setState=function(e,n){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=G({},this.state),typeof e=="function"&&(e=e(G({},t),this.props)),e&&G(t,e),e!=null&&this.__v&&(n&&this._sb.push(n),$e(this))},T.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),$e(this))},T.prototype.render=H,Y=[],_t=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Fe=function(e,n){return e.__v.__b-n.__v.__b},pe.__r=0,mt=0;var K,w,Te,$t,te=0,Ot=[],he=[],Mt=h.__b,Vt=h.__r,It=h.diffed,Dt=h.__c,Tt=h.unmount;function ne(e,n){h.__h&&h.__h(w,e,te||n),te=0;var t=w.__H||(w.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:he}),t.__[e]}function I(e){return te=1,ue(Lt,e)}function ue(e,n,t){var r=ne(K++,2);if(r.t=e,!r.__c&&(r.__=[t?t(n):Lt(void 0,n),function(u){var a=r.__N?r.__N[0]:r.__[0],c=r.t(a,u);a!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=w,!w.u)){var o=function(u,a,c){if(!r.__c.__H)return!0;var s=r.__c.__H.__.filter(function(g){return g.__c});if(s.every(function(g){return!g.__N}))return!i||i.call(this,u,a,c);var f=!1;return s.forEach(function(g){if(g.__N){var d=g.__[0];g.__=g.__N,g.__N=void 0,d!==g.__[0]&&(f=!0)}}),!(!f&&r.__c.props===u)&&(!i||i.call(this,u,a,c))};w.u=!0;var i=w.shouldComponentUpdate,l=w.componentWillUpdate;w.componentWillUpdate=function(u,a,c){if(this.__e){var s=i;i=void 0,o(u,a,c),i=s}l&&l.call(this,u,a,c)},w.shouldComponentUpdate=o}return r.__N||r.__}function B(e,n){var t=ne(K++,3);!h.__s&&Oe(t.__H,n)&&(t.__=e,t.i=n,w.__H.__h.push(t))}function L(e,n){var t=ne(K++,4);!h.__s&&Oe(t.__H,n)&&(t.__=e,t.i=n,w.__h.push(t))}function z(e){return te=5,U(function(){return{current:e}},[])}function Nt(e,n,t){te=6,L(function(){return typeof e=="function"?(e(n()),function(){return e(null)}):e?(e.current=n(),function(){return e.current=null}):void 0},t==null?t:t.concat(e))}function U(e,n){var t=ne(K++,7);return Oe(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function ye(e,n){return te=8,U(function(){return e},n)}function kt(e){var n=w.context[e.__c],t=ne(K++,9);return t.c=e,n?(t.__==null&&(t.__=!0,n.sub(w)),n.props.value):e.__}function Ht(e,n){h.useDebugValue&&h.useDebugValue(n?n(e):e)}function Pt(){var e=ne(K++,11);if(!e.__){for(var n=w.__v;n!==null&&!n.__m&&n.__!==null;)n=n.__;var t=n.__m||(n.__m=[0,0]);e.__="P"+t[0]+"-"+t[1]++}return e.__}function ur(){for(var e;e=Ot.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ve),e.__H.__h.forEach(Ae),e.__H.__h=[]}catch(n){e.__H.__h=[],h.__e(n,e.__v)}}h.__b=function(e){w=null,Mt&&Mt(e)},h.__r=function(e){Vt&&Vt(e),K=0;var n=(w=e.__c).__H;n&&(Te===w?(n.__h=[],w.__h=[],n.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=he,t.__N=t.i=void 0})):(n.__h.forEach(ve),n.__h.forEach(Ae),n.__h=[],K=0)),Te=w},h.diffed=function(e){It&&It(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(Ot.push(n)!==1&&$t===h.requestAnimationFrame||(($t=h.requestAnimationFrame)||ar)(ur)),n.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==he&&(t.__=t.__V),t.i=void 0,t.__V=he})),Te=w=null},h.__c=function(e,n){n.some(function(t){try{t.__h.forEach(ve),t.__h=t.__h.filter(function(r){return!r.__||Ae(r)})}catch(r){n.some(function(o){o.__h&&(o.__h=[])}),n=[],h.__e(r,t.__v)}}),Dt&&Dt(e,n)},h.unmount=function(e){Tt&&Tt(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(r){try{ve(r)}catch(o){n=o}}),t.__H=void 0,n&&h.__e(n,t.__v))};var At=typeof requestAnimationFrame=="function";function ar(e){var n,t=function(){clearTimeout(r),At&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,100);At&&(n=requestAnimationFrame(t))}function ve(e){var n=w,t=e.__c;typeof t=="function"&&(e.__c=void 0,t()),w=n}function Ae(e){var n=w;e.__c=e.__(),w=n}function Oe(e,n){return!e||e.length!==n.length||n.some(function(t,r){return t!==e[r]})}function Lt(e,n){return typeof n=="function"?n(e):n}function Xt(e,n){for(var t in n)e[t]=n[t];return e}function ke(e,n){for(var t in e)if(t!=="__source"&&!(t in n))return!0;for(var r in n)if(r!=="__source"&&e[r]!==n[r])return!0;return!1}function Ne(e,n){return e===n&&(e!==0||1/e==1/n)||e!=e&&n!=n}function He(e){this.props=e}function dr(e,n){function t(o){var i=this.props.ref,l=i==o.ref;return!l&&i&&(i.call?i(null):i.current=null),n?!n(this.props,o)||!l:ke(this.props,o)}function r(o){return this.shouldComponentUpdate=t,D(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(He.prototype=new T).isPureReactComponent=!0,He.prototype.shouldComponentUpdate=function(e,n){return ke(this.props,e)||ke(this.state,n)};var zt=h.__b;h.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),zt&&zt(e)};var cr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function gr(e){function n(t){var r=Xt({},t);return delete r.ref,e(r,t.ref||null)}return n.$$typeof=cr,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var Gt=function(e,n){return e==null?null:P(P(e).map(n))},fr={map:Gt,forEach:Gt,count:function(e){return e?P(e).length:0},only:function(e){var n=P(e);if(n.length!==1)throw"Children.only";return n[0]},toArray:P},pr=h.__e;h.__e=function(e,n,t,r){if(e.then){for(var o,i=n;i=i.__;)if((o=i.__c)&&o.__c)return n.__e==null&&(n.__e=t.__e,n.__k=t.__k),o.__c(e,n)}pr(e,n,t,r)};var Bt=h.unmount;function Jt(e,n,t){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Xt({},e)).__c!=null&&(e.__c.__P===t&&(e.__c.__P=n),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Jt(r,n,t)})),e}function Yt(e,n,t){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Yt(r,n,t)}),e.__c&&e.__c.__P===n&&(e.__e&&t.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=t)),e}function be(){this.__u=0,this.t=null,this.__b=null}function Qt(e){var n=e.__.__c;return n&&n.__a&&n.__a(e)}function _r(e){var n,t,r;function o(i){if(n||(n=e()).then(function(l){t=l.default||l},function(l){r=l}),r)throw r;if(!t)throw n;return D(t,i)}return o.displayName="Lazy",o.__f=!0,o}function ae(){this.u=null,this.o=null}h.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&e.__h===!0&&(e.type=null),Bt&&Bt(e)},(be.prototype=new T).__c=function(e,n){var t=n.__c,r=this;r.t==null&&(r.t=[]),r.t.push(t);var o=Qt(r.__v),i=!1,l=function(){i||(i=!0,t.__R=null,o?o(u):u())};t.__R=l;var u=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=Yt(c,c.__c.__P,c.__c.__O)}var s;for(r.setState({__a:r.__b=null});s=r.t.pop();)s.forceUpdate()}},a=n.__h===!0;r.__u++||a||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(l,l)},be.prototype.componentWillUnmount=function(){this.t=[]},be.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Jt(this.__b,t,r.__O=r.__P)}this.__b=null}var o=n.__a&&D(H,null,e.fallback);return o&&(o.__h=null),[D(H,null,n.__a?null:e.children),o]};var Ut=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.u=t=t[2]}};function mr(e){return this.getChildContext=function(){return e.context},e.children}function hr(e){var n=this,t=e.i;n.componentWillUnmount=function(){ee(null,n.l),n.l=null,n.i=null},n.i&&n.i!==t&&n.componentWillUnmount(),e.__v?(n.l||(n.i=t,n.l={nodeType:1,parentNode:t,childNodes:[],appendChild:function(r){this.childNodes.push(r),n.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),n.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),n.i.removeChild(r)}}),ee(D(mr,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}function vr(e,n){var t=D(hr,{__v:e,i:n});return t.containerInfo=n,t}(ae.prototype=new T).__a=function(e){var n=this,t=Qt(n.__v),r=n.o.get(e);return r[0]++,function(o){var i=function(){n.props.revealOrder?(r.push(o),Ut(n,e,r)):o()};t?t(i):i()}},ae.prototype.render=function(e){this.u=null,this.o=new Map;var n=P(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&n.reverse();for(var t=n.length;t--;)this.o.set(n[t],this.u=[1,0,this.u]);return e.children},ae.prototype.componentDidUpdate=ae.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(n,t){Ut(e,t,n)})};var Zt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,yr=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,br=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Sr=/[A-Z0-9]/g,Cr=typeof document<"u",wr=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Pe(e,n,t){return n.__k==null&&(n.textContent=""),ee(e,n),typeof t=="function"&&t(),e?e.__c:null}function en(e,n,t){return Ie(e,n),typeof t=="function"&&t(),e?e.__c:null}T.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(T.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})});var jt=h.event;function Rr(){}function Er(){return this.cancelBubble}function xr(){return this.defaultPrevented}h.event=function(e){return jt&&(e=jt(e)),e.persist=Rr,e.isPropagationStopped=Er,e.isDefaultPrevented=xr,e.nativeEvent=e};var Le,Fr={enumerable:!1,configurable:!0,get:function(){return this.class}},qt=h.vnode;h.vnode=function(e){typeof e.type=="string"&&function(n){var t=n.props,r=n.type,o={};for(var i in t){var l=t[i];if(!(i==="value"&&"defaultValue"in t&&l==null||Cr&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var u=i.toLowerCase();i==="defaultValue"&&"value"in t&&t.value==null?i="value":i==="download"&&l===!0?l="":u==="ondoubleclick"?i="ondblclick":u!=="onchange"||r!=="input"&&r!=="textarea"||wr(t.type)?u==="onfocus"?i="onfocusin":u==="onblur"?i="onfocusout":br.test(i)?i=u:r.indexOf("-")===-1&&yr.test(i)?i=i.replace(Sr,"-$&").toLowerCase():l===null&&(l=void 0):u=i="oninput",u==="oninput"&&o[i=u]&&(i="oninputCapture"),o[i]=l}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=P(t.children).forEach(function(a){a.props.selected=o.value.indexOf(a.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=P(t.children).forEach(function(a){a.props.selected=o.multiple?o.defaultValue.indexOf(a.props.value)!=-1:o.defaultValue==a.props.value})),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",Fr)):(t.className&&!t.class||t.class&&t.className)&&(o.class=o.className=t.className),n.props=o}(e),e.$$typeof=Zt,qt&&qt(e)};var Kt=h.__r;h.__r=function(e){Kt&&Kt(e),Le=e.__c};var Wt=h.diffed;h.diffed=function(e){Wt&&Wt(e);var n=e.props,t=e.__e;t!=null&&e.type==="textarea"&&"value"in n&&n.value!==t.value&&(t.value=n.value==null?"":n.value),Le=null};var $r={ReactCurrentDispatcher:{current:{readContext:function(e){return Le.__n[e.__c].props.value}}}};function Mr(e){return D.bind(null,e)}function tn(e){return!!e&&e.$$typeof===Zt}function Vr(e){return tn(e)?Ft.apply(null,arguments):e}function ze(e){return!!e.__k&&(ee(null,e),!0)}function Ir(e){return e&&(e.base||e.nodeType===1&&e)||null}var Dr=function(e,n){return e(n)},Tr=function(e,n){return e(n)},Ge=H;function nn(e){e()}function Ar(e){return e}function Or(){return[!1,nn]}var Nr=L;function kr(e,n){var t=n(),r=I({h:{__:t,v:n}}),o=r[0].h,i=r[1];return L(function(){o.__=t,o.v=n,Ne(o.__,n())||i({h:o})},[e,t,n]),B(function(){return Ne(o.__,o.v())||i({h:o}),e(function(){Ne(o.__,o.v())||i({h:o})})},[e]),t}var b={useState:I,useId:Pt,useReducer:ue,useEffect:B,useLayoutEffect:L,useInsertionEffect:Nr,useTransition:Or,useDeferredValue:Ar,useSyncExternalStore:kr,startTransition:nn,useRef:z,useImperativeHandle:Nt,useMemo:U,useCallback:ye,useContext:kt,useDebugValue:Ht,version:"17.0.2",Children:fr,render:Pe,hydrate:en,unmountComponentAtNode:ze,createPortal:vr,createElement:D,createContext:De,createFactory:Mr,cloneElement:Vr,createRef:Me,Fragment:H,isValidElement:tn,findDOMNode:Ir,Component:T,PureComponent:He,memo:dr,forwardRef:gr,flushSync:Tr,unstable_batchedUpdates:Dr,StrictMode:Ge,Suspense:be,SuspenseList:ae,lazy:_r,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$r};function W(e,n){return typeof e=="function"?e(n):e}function A(e,n){return t=>{n.setState(r=>({...r,[e]:W(t,r[e])}))}}function Re(e){return e instanceof Function}function Hr(e){return Array.isArray(e)&&e.every(n=>typeof n=="number")}function Pr(e,n){let t=[],r=o=>{o.forEach(i=>{t.push(i);let l=n(i);l!=null&&l.length&&r(l)})};return r(e),t}function y(e,n,t){let r=[],o;return()=>{let i;t.key&&t.debug&&(i=Date.now());let l=e();if(!(l.length!==r.length||l.some((c,s)=>r[s]!==c)))return o;r=l;let a;if(t.key&&t.debug&&(a=Date.now()),o=n(...l),t==null||t.onChange==null||t.onChange(o),t.key&&t.debug&&t!=null&&t.debug()){let c=Math.round((Date.now()-i)*100)/100,s=Math.round((Date.now()-a)*100)/100,f=s/16,g=(d,p)=>{for(d=String(d);d.length<p;)d=" "+d;return d};console.info(`%c\u23F1 ${g(s,5)} /${g(c,5)} ms`,`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,t?.key)}return o}}function Lr(e,n,t,r){var o,i;let u={...e._getDefaultColumnDef(),...n},a=u.accessorKey,c=(o=(i=u.id)!=null?i:a?a.replace(".","_"):void 0)!=null?o:typeof u.header=="string"?u.header:void 0,s;if(u.accessorFn?s=u.accessorFn:a&&(a.includes(".")?s=g=>{let d=g;for(let _ of a.split(".")){var p;d=(p=d)==null?void 0:p[_]}return d}:s=g=>g[u.accessorKey]),!c)throw new Error;let f={id:`${String(c)}`,accessorFn:s,parent:r,depth:t,columnDef:u,columns:[],getFlatColumns:y(()=>[!0],()=>{var g;return[f,...(g=f.columns)==null?void 0:g.flatMap(d=>d.getFlatColumns())]},{key:"column.getFlatColumns",debug:()=>{var g;return(g=e.options.debugAll)!=null?g:e.options.debugColumns}}),getLeafColumns:y(()=>[e._getOrderColumnsFn()],g=>{var d;if((d=f.columns)!=null&&d.length){let p=f.columns.flatMap(_=>_.getLeafColumns());return g(p)}return[f]},{key:"column.getLeafColumns",debug:()=>{var g;return(g=e.options.debugAll)!=null?g:e.options.debugColumns}})};return f=e._features.reduce((g,d)=>Object.assign(g,d.createColumn==null?void 0:d.createColumn(f,e)),f),f}function on(e,n,t){var r;let i={id:(r=t.id)!=null?r:n.id,column:n,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let l=[],u=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(u),l.push(a)};return u(i),l},getContext:()=>({table:e,header:i,column:n})};return e._features.forEach(l=>{Object.assign(i,l.createHeader==null?void 0:l.createHeader(i,e))}),i}var zr={createTable:e=>({getHeaderGroups:y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,r,o)=>{var i,l;let u=(i=r?.map(f=>t.find(g=>g.id===f)).filter(Boolean))!=null?i:[],a=(l=o?.map(f=>t.find(g=>g.id===f)).filter(Boolean))!=null?l:[],c=t.filter(f=>!(r!=null&&r.includes(f.id))&&!(o!=null&&o.includes(f.id)));return Se(n,[...u,...c,...a],e)},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getCenterHeaderGroups:y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,r,o)=>(t=t.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),Se(n,t,e,"center")),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getLeftHeaderGroups:y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(n,t,r)=>{var o;let i=(o=r?.map(l=>t.find(u=>u.id===l)).filter(Boolean))!=null?o:[];return Se(n,i,e,"left")},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getRightHeaderGroups:y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(n,t,r)=>{var o;let i=(o=r?.map(l=>t.find(u=>u.id===l)).filter(Boolean))!=null?o:[];return Se(n,i,e,"right")},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getFooterGroups:y(()=>[e.getHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getLeftFooterGroups:y(()=>[e.getLeftHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getCenterFooterGroups:y(()=>[e.getCenterHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getRightFooterGroups:y(()=>[e.getRightHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getFlatHeaders:y(()=>[e.getHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getLeftFlatHeaders:y(()=>[e.getLeftHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getCenterFlatHeaders:y(()=>[e.getCenterHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getRightFlatHeaders:y(()=>[e.getRightHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getCenterLeafHeaders:y(()=>[e.getCenterFlatHeaders()],n=>n.filter(t=>{var r;return!((r=t.subHeaders)!=null&&r.length)}),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getLeftLeafHeaders:y(()=>[e.getLeftFlatHeaders()],n=>n.filter(t=>{var r;return!((r=t.subHeaders)!=null&&r.length)}),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getRightLeafHeaders:y(()=>[e.getRightFlatHeaders()],n=>n.filter(t=>{var r;return!((r=t.subHeaders)!=null&&r.length)}),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),getLeafHeaders:y(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(n,t,r)=>{var o,i,l,u,a,c;return[...(o=(i=n[0])==null?void 0:i.headers)!=null?o:[],...(l=(u=t[0])==null?void 0:u.headers)!=null?l:[],...(a=(c=r[0])==null?void 0:c.headers)!=null?a:[]].map(s=>s.getLeafHeaders()).flat()},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}})})};function Se(e,n,t,r){var o,i;let l=0,u=function(g,d){d===void 0&&(d=1),l=Math.max(l,d),g.filter(p=>p.getIsVisible()).forEach(p=>{var _;(_=p.columns)!=null&&_.length&&u(p.columns,d+1)},0)};u(e);let a=[],c=(g,d)=>{let p={depth:d,id:[r,`${d}`].filter(Boolean).join("_"),headers:[]},_=[];g.forEach(m=>{let v=[..._].reverse()[0],S=m.column.depth===p.depth,x,C=!1;if(S&&m.column.parent?x=m.column.parent:(x=m.column,C=!0),v&&v?.column===x)v.subHeaders.push(m);else{let V=on(t,x,{id:[r,d,x.id,m?.id].filter(Boolean).join("_"),isPlaceholder:C,placeholderId:C?`${_.filter(N=>N.column===x).length}`:void 0,depth:d,index:_.length});V.subHeaders.push(m),_.push(V)}p.headers.push(m),m.headerGroup=p}),a.push(p),d>0&&c(_,d-1)},s=n.map((g,d)=>on(t,g,{depth:l,index:d}));c(s,l-1),a.reverse();let f=g=>g.filter(p=>p.column.getIsVisible()).map(p=>{let _=0,m=0,v=[0];p.subHeaders&&p.subHeaders.length?(v=[],f(p.subHeaders).forEach(x=>{let{colSpan:C,rowSpan:V}=x;_+=C,v.push(V)})):_=1;let S=Math.min(...v);return m=m+S,p.colSpan=_,p.rowSpan=m,{colSpan:_,rowSpan:m}});return f((o=(i=a[0])==null?void 0:i.headers)!=null?o:[]),a}var Ce={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Be=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Gr={getDefaultColumnDef:()=>Ce,getInitialState:e=>({columnSizing:{},columnSizingInfo:Be(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:A("columnSizing",e),onColumnSizingInfoChange:A("columnSizingInfo",e)}),createColumn:(e,n)=>({getSize:()=>{var t,r,o;let i=n.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:Ce.minSize,(r=i??e.columnDef.size)!=null?r:Ce.size),(o=e.columnDef.maxSize)!=null?o:Ce.maxSize)},getStart:t=>{let r=t?t==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns(),o=r.findIndex(i=>i.id===e.id);if(o>0){let i=r[o-1];return i.getStart(t)+i.getSize()}return 0},resetSize:()=>{n.setColumnSizing(t=>{let{[e.id]:r,...o}=t;return o})},getCanResize:()=>{var t,r;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((r=n.options.enableColumnResizing)!=null?r:!0)},getIsResizing:()=>n.getState().columnSizingInfo.isResizingColumn===e.id}),createHeader:(e,n)=>({getSize:()=>{let t=0,r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;t+=(i=o.column.getSize())!=null?i:0}};return r(e),t},getStart:()=>{if(e.index>0){let t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},getResizeHandler:()=>{let t=n.getColumn(e.column.id),r=t?.getCanResize();return o=>{if(!t||!r||(o.persist==null||o.persist(),Ue(o)&&o.touches&&o.touches.length>1))return;let i=e.getSize(),l=e?e.getLeafHeaders().map(_=>[_.column.id,_.column.getSize()]):[[t.id,t.getSize()]],u=Ue(o)?Math.round(o.touches[0].clientX):o.clientX,a={},c=(_,m)=>{typeof m=="number"&&(n.setColumnSizingInfo(v=>{var S,x;let C=m-((S=v?.startOffset)!=null?S:0),V=Math.max(C/((x=v?.startSize)!=null?x:0),-.999999);return v.columnSizingStart.forEach(N=>{let[J,F]=N;a[J]=Math.round(Math.max(F+F*V,0)*100)/100}),{...v,deltaOffset:C,deltaPercentage:V}}),(n.options.columnResizeMode==="onChange"||_==="end")&&n.setColumnSizing(v=>({...v,...a})))},s=_=>c("move",_),f=_=>{c("end",_),n.setColumnSizingInfo(m=>({...m,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},g={moveHandler:_=>s(_.clientX),upHandler:_=>{document.removeEventListener("mousemove",g.moveHandler),document.removeEventListener("mouseup",g.upHandler),f(_.clientX)}},d={moveHandler:_=>(_.cancelable&&(_.preventDefault(),_.stopPropagation()),s(_.touches[0].clientX),!1),upHandler:_=>{var m;document.removeEventListener("touchmove",d.moveHandler),document.removeEventListener("touchend",d.upHandler),_.cancelable&&(_.preventDefault(),_.stopPropagation()),f((m=_.touches[0])==null?void 0:m.clientX)}},p=Br()?{passive:!1}:!1;Ue(o)?(document.addEventListener("touchmove",d.moveHandler,p),document.addEventListener("touchend",d.upHandler,p)):(document.addEventListener("mousemove",g.moveHandler,p),document.addEventListener("mouseup",g.upHandler,p)),n.setColumnSizingInfo(_=>({..._,startOffset:u,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:t.id}))}}}),createTable:e=>({setColumnSizing:n=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(n),setColumnSizingInfo:n=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(n),resetColumnSizing:n=>{var t;e.setColumnSizing(n?{}:(t=e.initialState.columnSizing)!=null?t:{})},resetHeaderSizeInfo:n=>{var t;e.setColumnSizingInfo(n?Be():(t=e.initialState.columnSizingInfo)!=null?t:Be())},getTotalSize:()=>{var n,t;return(n=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0},getLeftTotalSize:()=>{var n,t;return(n=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0},getCenterTotalSize:()=>{var n,t;return(n=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0},getRightTotalSize:()=>{var n,t;return(n=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0}})},we=null;function Br(){if(typeof we=="boolean")return we;let e=!1;try{let n={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,n),window.removeEventListener("test",t)}catch{e=!1}return we=e,we}function Ue(e){return e.type==="touchstart"}var Ur={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:A("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let n=!1,t=!1;return{_autoResetExpanded:()=>{var r,o;if(!n){e._queue(()=>{n=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},setExpanded:r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),toggleAllRowsExpanded:r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},resetExpanded:r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},getCanSomeRowsExpand:()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),getToggleAllRowsExpandedHandler:()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},getIsSomeRowsExpanded:()=>{let r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},getIsAllRowsExpanded:()=>{let r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},getExpandedDepth:()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{let l=i.split(".");r=Math.max(r,l.length)}),r},getPreExpandedRowModel:()=>e.getSortedRowModel(),getExpandedRowModel:()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())}},createRow:(e,n)=>({toggleExpanded:t=>{n.setExpanded(r=>{var o;let i=r===!0?!0:!!(r!=null&&r[e.id]),l={};if(r===!0?Object.keys(n.getRowModel().rowsById).forEach(u=>{l[u]=!0}):l=r,t=(o=t)!=null?o:!i,!i&&t)return{...l,[e.id]:!0};if(i&&!t){let{[e.id]:u,...a}=l;return a}return r})},getIsExpanded:()=>{var t;let r=n.getState().expanded;return!!((t=n.options.getIsRowExpanded==null?void 0:n.options.getIsRowExpanded(e))!=null?t:r===!0||r?.[e.id])},getCanExpand:()=>{var t,r,o;return(t=n.options.getRowCanExpand==null?void 0:n.options.getRowCanExpand(e))!=null?t:((r=n.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},getToggleExpandedHandler:()=>{let t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}})},an=(e,n,t)=>{var r,o,i;let l=t.toLowerCase();return!!(!((r=e.getValue(n))==null||(o=r.toString())==null||(i=o.toLowerCase())==null)&&i.includes(l))};an.autoRemove=e=>k(e);var dn=(e,n,t)=>{var r,o;return!!(!((r=e.getValue(n))==null||(o=r.toString())==null)&&o.includes(t))};dn.autoRemove=e=>k(e);var cn=(e,n,t)=>{var r,o;return((r=e.getValue(n))==null||(o=r.toString())==null?void 0:o.toLowerCase())===t?.toLowerCase()};cn.autoRemove=e=>k(e);var gn=(e,n,t)=>{var r;return(r=e.getValue(n))==null?void 0:r.includes(t)};gn.autoRemove=e=>k(e)||!(e!=null&&e.length);var fn=(e,n,t)=>!t.some(r=>{var o;return!((o=e.getValue(n))!=null&&o.includes(r))});fn.autoRemove=e=>k(e)||!(e!=null&&e.length);var pn=(e,n,t)=>t.some(r=>{var o;return(o=e.getValue(n))==null?void 0:o.includes(r)});pn.autoRemove=e=>k(e)||!(e!=null&&e.length);var _n=(e,n,t)=>e.getValue(n)===t;_n.autoRemove=e=>k(e);var mn=(e,n,t)=>e.getValue(n)==t;mn.autoRemove=e=>k(e);var Ze=(e,n,t)=>{let[r,o]=t,i=e.getValue(n);return i>=r&&i<=o};Ze.resolveFilterValue=e=>{let[n,t]=e,r=typeof n!="number"?parseFloat(n):n,o=typeof t!="number"?parseFloat(t):t,i=n===null||Number.isNaN(r)?-1/0:r,l=t===null||Number.isNaN(o)?1/0:o;if(i>l){let u=i;i=l,l=u}return[i,l]};Ze.autoRemove=e=>k(e)||k(e[0])&&k(e[1]);var j={includesString:an,includesStringSensitive:dn,equalsString:cn,arrIncludes:gn,arrIncludesAll:fn,arrIncludesSome:pn,equals:_n,weakEquals:mn,inNumberRange:Ze};function k(e){return e==null||e===""}var jr={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:A("columnFilters",e),onGlobalFilterChange:A("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:n=>{var t,r;let o=(t=e.getCoreRowModel().flatRows[0])==null||(r=t._getAllCellsByColumnId()[n.id])==null?void 0:r.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,n)=>({getAutoFilterFn:()=>{let t=n.getCoreRowModel().flatRows[0],r=t?.getValue(e.id);return typeof r=="string"?j.includesString:typeof r=="number"?j.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?j.equals:Array.isArray(r)?j.arrIncludes:j.weakEquals},getFilterFn:()=>{var t,r;return Re(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(r=n.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?t:j[e.columnDef.filterFn]},getCanFilter:()=>{var t,r,o;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((r=n.options.enableColumnFilters)!=null?r:!0)&&((o=n.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},getCanGlobalFilter:()=>{var t,r,o,i;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((r=n.options.enableGlobalFilter)!=null?r:!0)&&((o=n.options.enableFilters)!=null?o:!0)&&((i=n.options.getColumnCanGlobalFilter==null?void 0:n.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn},getIsFiltered:()=>e.getFilterIndex()>-1,getFilterValue:()=>{var t,r;return(t=n.getState().columnFilters)==null||(r=t.find(o=>o.id===e.id))==null?void 0:r.value},getFilterIndex:()=>{var t,r;return(t=(r=n.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?t:-1},setFilterValue:t=>{n.setColumnFilters(r=>{let o=e.getFilterFn(),i=r?.find(s=>s.id===e.id),l=W(t,i?i.value:void 0);if(ln(o,l,e)){var u;return(u=r?.filter(s=>s.id!==e.id))!=null?u:[]}let a={id:e.id,value:l};if(i){var c;return(c=r?.map(s=>s.id===e.id?a:s))!=null?c:[]}return r!=null&&r.length?[...r,a]:[a]})},_getFacetedRowModel:n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),getFacetedRowModel:()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),_getFacetedUniqueValues:n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),getFacetedUniqueValues:()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),getFacetedMinMaxValues:()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}),createRow:(e,n)=>({columnFilters:{},columnFiltersMeta:{}}),createTable:e=>({getGlobalAutoFilterFn:()=>j.includesString,getGlobalFilterFn:()=>{var n,t;let{globalFilterFn:r}=e.options;return Re(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(n=(t=e.options.filterFns)==null?void 0:t[r])!=null?n:j[r]},setColumnFilters:n=>{let t=e.getAllLeafColumns(),r=o=>{var i;return(i=W(n,o))==null?void 0:i.filter(l=>{let u=t.find(a=>a.id===l.id);if(u){let a=u.getFilterFn();if(ln(a,l.value,u))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},setGlobalFilter:n=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(n)},resetGlobalFilter:n=>{e.setGlobalFilter(n?void 0:e.initialState.globalFilter)},resetColumnFilters:n=>{var t,r;e.setColumnFilters(n?[]:(t=(r=e.initialState)==null?void 0:r.columnFilters)!=null?t:[])},getPreFilteredRowModel:()=>e.getCoreRowModel(),getFilteredRowModel:()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),_getGlobalFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),getGlobalFacetedRowModel:()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),_getGlobalFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),getGlobalFacetedUniqueValues:()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,_getGlobalFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),getGlobalFacetedMinMaxValues:()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}})};function ln(e,n,t){return(e&&e.autoRemove?e.autoRemove(n,t):!1)||typeof n>"u"||typeof n=="string"&&!n}var qr=(e,n,t)=>t.reduce((r,o)=>{let i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),Kr=(e,n,t)=>{let r;return t.forEach(o=>{let i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},Wr=(e,n,t)=>{let r;return t.forEach(o=>{let i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},Xr=(e,n,t)=>{let r,o;return t.forEach(i=>{let l=i.getValue(e);l!=null&&(r===void 0?l>=l&&(r=o=l):(r>l&&(r=l),o<l&&(o=l)))}),[r,o]},Jr=(e,n)=>{let t=0,r=0;if(n.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++t,r+=i)}),t)return r/t},Yr=(e,n)=>{if(!n.length)return;let t=n.map(i=>i.getValue(e));if(!Hr(t))return;if(t.length===1)return t[0];let r=Math.floor(t.length/2),o=t.sort((i,l)=>i-l);return t.length%2!==0?o[r]:(o[r-1]+o[r])/2},Qr=(e,n)=>Array.from(new Set(n.map(t=>t.getValue(e))).values()),Zr=(e,n)=>new Set(n.map(t=>t.getValue(e))).size,eo=(e,n)=>n.length,je={sum:qr,min:Kr,max:Wr,extent:Xr,mean:Jr,median:Yr,unique:Qr,uniqueCount:Zr,count:eo},to={getDefaultColumnDef:()=>({aggregatedCell:e=>{var n,t;return(n=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?n:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:A("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,n)=>({toggleGrouping:()=>{n.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(r=>r!==e.id):[...t??[],e.id])},getCanGroup:()=>{var t,r,o,i;return(t=(r=(o=(i=e.columnDef.enableGrouping)!=null?i:!0)!=null?o:n.options.enableGrouping)!=null?r:!0)!=null?t:!!e.accessorFn},getIsGrouped:()=>{var t;return(t=n.getState().grouping)==null?void 0:t.includes(e.id)},getGroupedIndex:()=>{var t;return(t=n.getState().grouping)==null?void 0:t.indexOf(e.id)},getToggleGroupingHandler:()=>{let t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},getAutoAggregationFn:()=>{let t=n.getCoreRowModel().flatRows[0],r=t?.getValue(e.id);if(typeof r=="number")return je.sum;if(Object.prototype.toString.call(r)==="[object Date]")return je.extent},getAggregationFn:()=>{var t,r;if(!e)throw new Error;return Re(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(r=n.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?t:je[e.columnDef.aggregationFn]}}),createTable:e=>({setGrouping:n=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(n),resetGrouping:n=>{var t,r;e.setGrouping(n?[]:(t=(r=e.initialState)==null?void 0:r.grouping)!=null?t:[])},getPreGroupedRowModel:()=>e.getFilteredRowModel(),getGroupedRowModel:()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())}),createRow:(e,n)=>({getIsGrouped:()=>!!e.groupingColumnId,getGroupingValue:t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];let r=n.getColumn(t);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[t]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},_groupingValuesCache:{}}),createCell:(e,n,t,r)=>({getIsGrouped:()=>n.getIsGrouped()&&n.id===t.groupingColumnId,getIsPlaceholder:()=>!e.getIsGrouped()&&n.getIsGrouped(),getIsAggregated:()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=t.subRows)!=null&&o.length)}})};function no(e,n,t){if(!(n!=null&&n.length)||!t)return e;let r=e.filter(i=>!n.includes(i.id));return t==="remove"?r:[...n.map(i=>e.find(l=>l.id===i)).filter(Boolean),...r]}var ro={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:A("columnOrder",e)}),createTable:e=>({setColumnOrder:n=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(n),resetColumnOrder:n=>{var t;e.setColumnOrder(n?[]:(t=e.initialState.columnOrder)!=null?t:[])},_getOrderColumnsFn:y(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(n,t,r)=>o=>{let i=[];if(!(n!=null&&n.length))i=o;else{let l=[...n],u=[...o];for(;u.length&&l.length;){let a=l.shift(),c=u.findIndex(s=>s.id===a);c>-1&&i.push(u.splice(c,1)[0])}i=[...i,...u]}return no(i,t,r)},{key:!1})})},Xe=0,Je=10,qe=()=>({pageIndex:Xe,pageSize:Je}),oo={getInitialState:e=>({...e,pagination:{...qe(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:A("pagination",e)}),createTable:e=>{let n=!1,t=!1;return{_autoResetPageIndex:()=>{var r,o;if(!n){e._queue(()=>{n=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},setPagination:r=>{let o=i=>W(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},resetPagination:r=>{var o;e.setPagination(r?qe():(o=e.initialState.pagination)!=null?o:qe())},setPageIndex:r=>{e.setPagination(o=>{let i=W(r,o.pageIndex),l=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,l)),{...o,pageIndex:i}})},resetPageIndex:r=>{var o,i,l;e.setPageIndex(r?Xe:(o=(i=e.initialState)==null||(l=i.pagination)==null?void 0:l.pageIndex)!=null?o:Xe)},resetPageSize:r=>{var o,i,l;e.setPageSize(r?Je:(o=(i=e.initialState)==null||(l=i.pagination)==null?void 0:l.pageSize)!=null?o:Je)},setPageSize:r=>{e.setPagination(o=>{let i=Math.max(1,W(r,o.pageSize)),l=o.pageSize*o.pageIndex,u=Math.floor(l/i);return{...o,pageIndex:u,pageSize:i}})},setPageCount:r=>e.setPagination(o=>{var i;let l=W(r,(i=e.options.pageCount)!=null?i:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...o,pageCount:l}}),getPageOptions:y(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,l)=>l)),o},{key:!1,debug:()=>{var r;return(r=e.options.debugAll)!=null?r:e.options.debugTable}}),getCanPreviousPage:()=>e.getState().pagination.pageIndex>0,getCanNextPage:()=>{let{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},previousPage:()=>e.setPageIndex(r=>r-1),nextPage:()=>e.setPageIndex(r=>r+1),getPrePaginationRowModel:()=>e.getExpandedRowModel(),getPaginationRowModel:()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),getPageCount:()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}}},Ke=()=>({left:[],right:[]}),io={getInitialState:e=>({columnPinning:Ke(),...e}),getDefaultOptions:e=>({onColumnPinningChange:A("columnPinning",e)}),createColumn:(e,n)=>({pin:t=>{let r=e.getLeafColumns().map(o=>o.id).filter(Boolean);n.setColumnPinning(o=>{var i,l;if(t==="right"){var u,a;return{left:((u=o?.left)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((a=o?.right)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(t==="left"){var c,s;return{left:[...((c=o?.left)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((s=o?.right)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((i=o?.left)!=null?i:[]).filter(f=>!(r!=null&&r.includes(f))),right:((l=o?.right)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f)))}})},getCanPin:()=>e.getLeafColumns().some(r=>{var o,i;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=n.options.enablePinning)!=null?i:!0)}),getIsPinned:()=>{let t=e.getLeafColumns().map(u=>u.id),{left:r,right:o}=n.getState().columnPinning,i=t.some(u=>r?.includes(u)),l=t.some(u=>o?.includes(u));return i?"left":l?"right":!1},getPinnedIndex:()=>{var t,r,o;let i=e.getIsPinned();return i?(t=(r=n.getState().columnPinning)==null||(o=r[i])==null?void 0:o.indexOf(e.id))!=null?t:-1:0}}),createRow:(e,n)=>({getCenterVisibleCells:y(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,n.getState().columnPinning.right],(t,r,o)=>{let i=[...r??[],...o??[]];return t.filter(l=>!i.includes(l.column.id))},{key:"row.getCenterVisibleCells",debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}}),getLeftVisibleCells:y(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,,],(t,r)=>(r??[]).map(i=>t.find(l=>l.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),{key:"row.getLeftVisibleCells",debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}}),getRightVisibleCells:y(()=>[e._getAllVisibleCells(),n.getState().columnPinning.right],(t,r)=>(r??[]).map(i=>t.find(l=>l.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),{key:"row.getRightVisibleCells",debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}})}),createTable:e=>({setColumnPinning:n=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(n),resetColumnPinning:n=>{var t,r;return e.setColumnPinning(n?Ke():(t=(r=e.initialState)==null?void 0:r.columnPinning)!=null?t:Ke())},getIsSomeColumnsPinned:n=>{var t;let r=e.getState().columnPinning;if(!n){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((t=r[n])!=null&&t.length)},getLeftLeafColumns:y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(n,t)=>(t??[]).map(r=>n.find(o=>o.id===r)).filter(Boolean),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugColumns}}),getRightLeafColumns:y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(n,t)=>(t??[]).map(r=>n.find(o=>o.id===r)).filter(Boolean),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugColumns}}),getCenterLeafColumns:y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,r)=>{let o=[...t??[],...r??[]];return n.filter(i=>!o.includes(i.id))},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugColumns}})})},lo={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:A("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>({setRowSelection:n=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(n),resetRowSelection:n=>{var t;return e.setRowSelection(n?{}:(t=e.initialState.rowSelection)!=null?t:{})},toggleAllRowsSelected:n=>{e.setRowSelection(t=>{n=typeof n<"u"?n:!e.getIsAllRowsSelected();let r={...t},o=e.getPreGroupedRowModel().flatRows;return n?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},toggleAllPageRowsSelected:n=>e.setRowSelection(t=>{let r=typeof n<"u"?n:!e.getIsAllPageRowsSelected(),o={...t};return e.getRowModel().rows.forEach(i=>{Ye(o,i.id,r,e)}),o}),getPreSelectedRowModel:()=>e.getCoreRowModel(),getSelectedRowModel:y(()=>[e.getState().rowSelection,e.getCoreRowModel()],(n,t)=>Object.keys(n).length?We(e,t):{rows:[],flatRows:[],rowsById:{}},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}}),getFilteredSelectedRowModel:y(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(n,t)=>Object.keys(n).length?We(e,t):{rows:[],flatRows:[],rowsById:{}},{key:"getFilteredSelectedRowModel",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}}),getGroupedSelectedRowModel:y(()=>[e.getState().rowSelection,e.getSortedRowModel()],(n,t)=>Object.keys(n).length?We(e,t):{rows:[],flatRows:[],rowsById:{}},{key:"getGroupedSelectedRowModel",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}}),getIsAllRowsSelected:()=>{let n=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState(),r=!!(n.length&&Object.keys(t).length);return r&&n.some(o=>o.getCanSelect()&&!t[o.id])&&(r=!1),r},getIsAllPageRowsSelected:()=>{let n=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:t}=e.getState(),r=!!n.length;return r&&n.some(o=>!t[o.id])&&(r=!1),r},getIsSomeRowsSelected:()=>{var n;let t=Object.keys((n=e.getState().rowSelection)!=null?n:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},getIsSomePageRowsSelected:()=>{let n=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:n.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},getToggleAllRowsSelectedHandler:()=>n=>{e.toggleAllRowsSelected(n.target.checked)},getToggleAllPageRowsSelectedHandler:()=>n=>{e.toggleAllPageRowsSelected(n.target.checked)}}),createRow:(e,n)=>({toggleSelected:t=>{let r=e.getIsSelected();n.setRowSelection(o=>{if(t=typeof t<"u"?t:!r,r===t)return o;let i={...o};return Ye(i,e.id,t,n),i})},getIsSelected:()=>{let{rowSelection:t}=n.getState();return et(e,t)},getIsSomeSelected:()=>{let{rowSelection:t}=n.getState();return sn(e,t)==="some"},getIsAllSubRowsSelected:()=>{let{rowSelection:t}=n.getState();return sn(e,t)==="all"},getCanSelect:()=>{var t;return typeof n.options.enableRowSelection=="function"?n.options.enableRowSelection(e):(t=n.options.enableRowSelection)!=null?t:!0},getCanSelectSubRows:()=>{var t;return typeof n.options.enableSubRowSelection=="function"?n.options.enableSubRowSelection(e):(t=n.options.enableSubRowSelection)!=null?t:!0},getCanMultiSelect:()=>{var t;return typeof n.options.enableMultiRowSelection=="function"?n.options.enableMultiRowSelection(e):(t=n.options.enableMultiRowSelection)!=null?t:!0},getToggleSelectedHandler:()=>{let t=e.getCanSelect();return r=>{var o;t&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}})},Ye=(e,n,t,r)=>{var o;let i=r.getRow(n);t?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[n]=!0)):delete e[n],(o=i.subRows)!=null&&o.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>Ye(e,l.id,t,r))};function We(e,n){let t=e.getState().rowSelection,r=[],o={},i=function(l,u){return l.map(a=>{var c;let s=et(a,t);if(s&&(r.push(a),o[a.id]=a),(c=a.subRows)!=null&&c.length&&(a={...a,subRows:i(a.subRows)}),s)return a}).filter(Boolean)};return{rows:i(n.rows),flatRows:r,rowsById:o}}function et(e,n){var t;return(t=n[e.id])!=null?t:!1}function sn(e,n,t){if(e.subRows&&e.subRows.length){let r=!0,o=!1;return e.subRows.forEach(i=>{o&&!r||(et(i,n)?o=!0:r=!1)}),r?"all":o?"some":!1}return!1}var Qe=/([0-9]+)/gm,so=(e,n,t)=>hn(X(e.getValue(t)).toLowerCase(),X(n.getValue(t)).toLowerCase()),uo=(e,n,t)=>hn(X(e.getValue(t)),X(n.getValue(t))),ao=(e,n,t)=>tt(X(e.getValue(t)).toLowerCase(),X(n.getValue(t)).toLowerCase()),co=(e,n,t)=>tt(X(e.getValue(t)),X(n.getValue(t))),go=(e,n,t)=>{let r=e.getValue(t),o=n.getValue(t);return r>o?1:r<o?-1:0},fo=(e,n,t)=>tt(e.getValue(t),n.getValue(t));function tt(e,n){return e===n?0:e>n?1:-1}function X(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function hn(e,n){let t=e.split(Qe).filter(Boolean),r=n.split(Qe).filter(Boolean);for(;t.length&&r.length;){let o=t.shift(),i=r.shift(),l=parseInt(o,10),u=parseInt(i,10),a=[l,u].sort();if(isNaN(a[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(a[1]))return isNaN(l)?-1:1;if(l>u)return 1;if(u>l)return-1}return t.length-r.length}var de={alphanumeric:so,alphanumericCaseSensitive:uo,text:ao,textCaseSensitive:co,datetime:go,basic:fo},po={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:A("sorting",e),isMultiSortEvent:n=>n.shiftKey}),createColumn:(e,n)=>({getAutoSortingFn:()=>{let t=n.getFilteredRowModel().flatRows.slice(10),r=!1;for(let o of t){let i=o?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return de.datetime;if(typeof i=="string"&&(r=!0,i.split(Qe).length>1))return de.alphanumeric}return r?de.text:de.basic},getAutoSortDir:()=>{let t=n.getFilteredRowModel().flatRows[0];return typeof t?.getValue(e.id)=="string"?"asc":"desc"},getSortingFn:()=>{var t,r;if(!e)throw new Error;return Re(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(r=n.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?t:de[e.columnDef.sortingFn]},toggleSorting:(t,r)=>{let o=e.getNextSortingOrder(),i=typeof t<"u"&&t!==null;n.setSorting(l=>{let u=l?.find(d=>d.id===e.id),a=l?.findIndex(d=>d.id===e.id),c=[],s,f=i?t:o==="desc";if(l!=null&&l.length&&e.getCanMultiSort()&&r?u?s="toggle":s="add":l!=null&&l.length&&a!==l.length-1?s="replace":u?s="toggle":s="replace",s==="toggle"&&(i||o||(s="remove")),s==="add"){var g;c=[...l,{id:e.id,desc:f}],c.splice(0,c.length-((g=n.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else s==="toggle"?c=l.map(d=>d.id===e.id?{...d,desc:f}:d):s==="remove"?c=l.filter(d=>d.id!==e.id):c=[{id:e.id,desc:f}];return c})},getFirstSortDir:()=>{var t,r;return((t=(r=e.columnDef.sortDescFirst)!=null?r:n.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},getNextSortingOrder:t=>{var r,o;let i=e.getFirstSortDir(),l=e.getIsSorted();return l?l!==i&&((r=n.options.enableSortingRemoval)==null||r)&&(!(t&&(o=n.options.enableMultiRemove)!=null)||o)?!1:l==="desc"?"asc":"desc":i},getCanSort:()=>{var t,r;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((r=n.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},getCanMultiSort:()=>{var t,r;return(t=(r=e.columnDef.enableMultiSort)!=null?r:n.options.enableMultiSort)!=null?t:!!e.accessorFn},getIsSorted:()=>{var t;let r=(t=n.getState().sorting)==null?void 0:t.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},getSortIndex:()=>{var t,r;return(t=(r=n.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?t:-1},clearSorting:()=>{n.setSorting(t=>t!=null&&t.length?t.filter(r=>r.id!==e.id):[])},getToggleSortingHandler:()=>{let t=e.getCanSort();return r=>{t&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?n.options.isMultiSortEvent==null?void 0:n.options.isMultiSortEvent(r):!1))}}}),createTable:e=>({setSorting:n=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(n),resetSorting:n=>{var t,r;e.setSorting(n?[]:(t=(r=e.initialState)==null?void 0:r.sorting)!=null?t:[])},getPreSortedRowModel:()=>e.getGroupedRowModel(),getSortedRowModel:()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())})},_o={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:A("columnVisibility",e)}),createColumn:(e,n)=>({toggleVisibility:t=>{e.getCanHide()&&n.setColumnVisibility(r=>({...r,[e.id]:t??!e.getIsVisible()}))},getIsVisible:()=>{var t,r;return(t=(r=n.getState().columnVisibility)==null?void 0:r[e.id])!=null?t:!0},getCanHide:()=>{var t,r;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((r=n.options.enableHiding)!=null?r:!0)},getToggleVisibilityHandler:()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}}),createRow:(e,n)=>({_getAllVisibleCells:y(()=>[e.getAllCells(),n.getState().columnVisibility],t=>t.filter(r=>r.column.getIsVisible()),{key:"row._getAllVisibleCells",debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}}),getVisibleCells:y(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,r,o)=>[...t,...r,...o],{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}})}),createTable:e=>{let n=(t,r)=>y(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),{key:t,debug:()=>{var o;return(o=e.options.debugAll)!=null?o:e.options.debugColumns}});return{getVisibleFlatColumns:n("getVisibleFlatColumns",()=>e.getAllFlatColumns()),getVisibleLeafColumns:n("getVisibleLeafColumns",()=>e.getAllLeafColumns()),getLeftVisibleLeafColumns:n("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),getRightVisibleLeafColumns:n("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),getCenterVisibleLeafColumns:n("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),setColumnVisibility:t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),resetColumnVisibility:t=>{var r;e.setColumnVisibility(t?{}:(r=e.initialState.columnVisibility)!=null?r:{})},toggleAllColumnsVisible:t=>{var r;t=(r=t)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:t||!(i.getCanHide!=null&&i.getCanHide())}),{}))},getIsAllColumnsVisible:()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),getIsSomeColumnsVisible:()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),getToggleAllColumnsVisibilityHandler:()=>t=>{var r;e.toggleAllColumnsVisible((r=t.target)==null?void 0:r.checked)}}}},un=[zr,_o,ro,io,jr,po,to,Ur,oo,lo,Gr];function vn(e){var n;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let t={_features:un},r=t._features.reduce((s,f)=>Object.assign(s,f.getDefaultOptions==null?void 0:f.getDefaultOptions(t)),{}),o=s=>t.options.mergeOptions?t.options.mergeOptions(r,s):{...r,...s},l={...{},...(n=e.initialState)!=null?n:{}};t._features.forEach(s=>{var f;l=(f=s.getInitialState==null?void 0:s.getInitialState(l))!=null?f:l});let u=[],a=!1,c={_features:un,options:{...r,...e},initialState:l,_queue:s=>{u.push(s),a||(a=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();a=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{t.setState(t.initialState)},setOptions:s=>{let f=W(s,t.options);t.options=o(f)},getState:()=>t.options.state,setState:s=>{t.options.onStateChange==null||t.options.onStateChange(s)},_getRowId:(s,f,g)=>{var d;return(d=t.options.getRowId==null?void 0:t.options.getRowId(s,f,g))!=null?d:`${g?[g.id,f].join("."):f}`},getCoreRowModel:()=>(t._getCoreRowModel||(t._getCoreRowModel=t.options.getCoreRowModel(t)),t._getCoreRowModel()),getRowModel:()=>t.getPaginationRowModel(),getRow:s=>{let f=t.getRowModel().rowsById[s];if(!f)throw new Error;return f},_getDefaultColumnDef:y(()=>[t.options.defaultColumn],s=>{var f;return s=(f=s)!=null?f:{},{header:g=>{let d=g.header.column.columnDef;return d.accessorKey?d.accessorKey:d.accessorFn?d.id:null},cell:g=>{var d,p;return(d=(p=g.renderValue())==null||p.toString==null?void 0:p.toString())!=null?d:null},...t._features.reduce((g,d)=>Object.assign(g,d.getDefaultColumnDef==null?void 0:d.getDefaultColumnDef()),{}),...s}},{debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns},key:!1}),_getColumnDefs:()=>t.options.columns,getAllColumns:y(()=>[t._getColumnDefs()],s=>{let f=function(g,d,p){return p===void 0&&(p=0),g.map(_=>{let m=Lr(t,_,p,d),v=_;return m.columns=v.columns?f(v.columns,m,p+1):[],m})};return f(s)},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns}}),getAllFlatColumns:y(()=>[t.getAllColumns()],s=>s.flatMap(f=>f.getFlatColumns()),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns}}),_getAllFlatColumnsById:y(()=>[t.getAllFlatColumns()],s=>s.reduce((f,g)=>(f[g.id]=g,f),{}),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns}}),getAllLeafColumns:y(()=>[t.getAllColumns(),t._getOrderColumnsFn()],(s,f)=>{let g=s.flatMap(d=>d.getLeafColumns());return f(g)},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns}}),getColumn:s=>t._getAllFlatColumnsById()[s]};return Object.assign(t,c),t._features.forEach(s=>Object.assign(t,s.createTable==null?void 0:s.createTable(t))),t}function mo(e,n,t,r){let o=()=>{var l;return(l=i.getValue())!=null?l:e.options.renderFallbackValue},i={id:`${n.id}_${t.id}`,row:n,column:t,getValue:()=>n.getValue(r),renderValue:o,getContext:y(()=>[e,t,n,i],(l,u,a,c)=>({table:l,column:u,row:a,cell:c,getValue:c.getValue,renderValue:c.renderValue}),{key:!1,debug:()=>e.options.debugAll})};return e._features.forEach(l=>{Object.assign(i,l.createCell==null?void 0:l.createCell(i,t,n,e))},{}),i}var nt=(e,n,t,r,o,i,l)=>{let u={id:n,index:r,original:t,depth:o,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(u._valuesCache.hasOwnProperty(a))return u._valuesCache[a];let c=e.getColumn(a);if(c!=null&&c.accessorFn)return u._valuesCache[a]=c.accessorFn(u.original,r),u._valuesCache[a]},getUniqueValues:a=>{if(u._uniqueValuesCache.hasOwnProperty(a))return u._uniqueValuesCache[a];let c=e.getColumn(a);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(u._uniqueValuesCache[a]=c.columnDef.getUniqueValues(u.original,r),u._uniqueValuesCache[a]):(u._uniqueValuesCache[a]=[u.getValue(a)],u._uniqueValuesCache[a])},renderValue:a=>{var c;return(c=u.getValue(a))!=null?c:e.options.renderFallbackValue},subRows:i??[],getLeafRows:()=>Pr(u.subRows,a=>a.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId):void 0,getParentRows:()=>{let a=[],c=u;for(;;){let s=c.getParentRow();if(!s)break;a.push(s),c=s}return a.reverse()},getAllCells:y(()=>[e.getAllLeafColumns()],a=>a.map(c=>mo(e,u,c,c.id)),{key:!1,debug:()=>{var a;return(a=e.options.debugAll)!=null?a:e.options.debugRows}}),_getAllCellsByColumnId:y(()=>[u.getAllCells()],a=>a.reduce((c,s)=>(c[s.column.id]=s,c),{}),{key:"row.getAllCellsByColumnId",debug:()=>{var a;return(a=e.options.debugAll)!=null?a:e.options.debugRows}})};for(let a=0;a<e._features.length;a++){let c=e._features[a];Object.assign(u,c==null||c.createRow==null?void 0:c.createRow(u,e))}return u};function yn(){return e=>y(()=>[e.options.data],n=>{let t={rows:[],flatRows:[],rowsById:{}},r=function(o,i,l){i===void 0&&(i=0);let u=[];for(let c=0;c<o.length;c++){let s=nt(e,e._getRowId(o[c],c,l),o[c],c,i,void 0,l?.id);if(t.flatRows.push(s),t.rowsById[s.id]=s,u.push(s),e.options.getSubRows){var a;s.originalSubRows=e.options.getSubRows(o[c],c),(a=s.originalSubRows)!=null&&a.length&&(s.subRows=r(s.originalSubRows,i+1,s))}}return u};return t.rows=r(n),t},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})}function bn(e,n,t){return t.options.filterFromLeafRows?ho(e,n,t):vo(e,n,t)}function ho(e,n,t){var r;let o=[],i={},l=(r=t.options.maxLeafRowFilterDepth)!=null?r:100,u=function(a,c){c===void 0&&(c=0);let s=[];for(let g=0;g<a.length;g++){var f;let d=a[g],p=nt(t,d.id,d.original,d.index,d.depth,void 0,d.parentId);if(p.columnFilters=d.columnFilters,(f=d.subRows)!=null&&f.length&&c<l){if(p.subRows=u(d.subRows,c+1),d=p,n(d)&&!p.subRows.length){s.push(d),i[d.id]=d,i[g]=d;continue}if(n(d)||p.subRows.length){s.push(d),i[d.id]=d,i[g]=d;continue}}else d=p,n(d)&&(s.push(d),i[d.id]=d,i[g]=d)}return s};return{rows:u(e),flatRows:o,rowsById:i}}function vo(e,n,t){var r;let o=[],i={},l=(r=t.options.maxLeafRowFilterDepth)!=null?r:100,u=function(a,c){c===void 0&&(c=0);let s=[];for(let g=0;g<a.length;g++){let d=a[g];if(n(d)){var f;if((f=d.subRows)!=null&&f.length&&c<l){let _=nt(t,d.id,d.original,d.index,d.depth,void 0,d.parentId);_.subRows=u(d.subRows,c+1),d=_}s.push(d),o.push(d),i[d.id]=d}}return s};return{rows:u(e),flatRows:o,rowsById:i}}function Sn(){return e=>y(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(n,t,r)=>{if(!n.rows.length||!(t!=null&&t.length)&&!r){for(let g=0;g<n.flatRows.length;g++)n.flatRows[g].columnFilters={},n.flatRows[g].columnFiltersMeta={};return n}let o=[],i=[];(t??[]).forEach(g=>{var d;let p=e.getColumn(g.id);if(!p)return;let _=p.getFilterFn();_&&o.push({id:g.id,filterFn:_,resolvedValue:(d=_.resolveFilterValue==null?void 0:_.resolveFilterValue(g.value))!=null?d:g.value})});let l=t.map(g=>g.id),u=e.getGlobalFilterFn(),a=e.getAllLeafColumns().filter(g=>g.getCanGlobalFilter());r&&u&&a.length&&(l.push("__global__"),a.forEach(g=>{var d;i.push({id:g.id,filterFn:u,resolvedValue:(d=u.resolveFilterValue==null?void 0:u.resolveFilterValue(r))!=null?d:r})}));let c,s;for(let g=0;g<n.flatRows.length;g++){let d=n.flatRows[g];if(d.columnFilters={},o.length)for(let p=0;p<o.length;p++){c=o[p];let _=c.id;d.columnFilters[_]=c.filterFn(d,_,c.resolvedValue,m=>{d.columnFiltersMeta[_]=m})}if(i.length){for(let p=0;p<i.length;p++){s=i[p];let _=s.id;if(s.filterFn(d,_,s.resolvedValue,m=>{d.columnFiltersMeta[_]=m})){d.columnFilters.__global__=!0;break}}d.columnFilters.__global__!==!0&&(d.columnFilters.__global__=!1)}}let f=g=>{for(let d=0;d<l.length;d++)if(g.columnFilters[l[d]]===!1)return!1;return!0};return bn(n.rows,f,e)},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})}function Cn(){return(e,n)=>y(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(t,r,o)=>{if(!t.rows.length||!(r!=null&&r.length)&&!o)return t;let i=[...r.map(u=>u.id).filter(u=>u!==n),o?"__global__":void 0].filter(Boolean),l=u=>{for(let a=0;a<i.length;a++)if(u.columnFilters[i[a]]===!1)return!1;return!0};return bn(t.rows,l,e)},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugTable},onChange:()=>{}})}function wn(){return(e,n)=>y(()=>{var t;return[(t=e.getColumn(n))==null?void 0:t.getFacetedRowModel()]},t=>{if(!t)return new Map;let r=new Map;for(let i=0;i<t.flatRows.length;i++){let l=t.flatRows[i].getUniqueValues(n);for(let u=0;u<l.length;u++){let a=l[u];if(r.has(a)){var o;r.set(a,((o=r.get(a))!=null?o:0)+1)}else r.set(a,1)}}return r},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugTable},onChange:()=>{}})}function Rn(){return(e,n)=>y(()=>{var t;return[(t=e.getColumn(n))==null?void 0:t.getFacetedRowModel()]},t=>{var r;if(!t)return;let o=(r=t.flatRows[0])==null?void 0:r.getUniqueValues(n);if(typeof o>"u")return;let i=[o,o];for(let l=0;l<t.flatRows.length;l++){let u=t.flatRows[l].getUniqueValues(n);for(let a=0;a<u.length;a++){let c=u[a];c<i[0]?i[0]=c:c>i[1]&&(i[1]=c)}}return i},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugTable},onChange:()=>{}})}function En(){return e=>y(()=>[e.getState().sorting,e.getPreSortedRowModel()],(n,t)=>{if(!t.rows.length||!(n!=null&&n.length))return t;let r=e.getState().sorting,o=[],i=r.filter(a=>{var c;return(c=e.getColumn(a.id))==null?void 0:c.getCanSort()}),l={};i.forEach(a=>{let c=e.getColumn(a.id);c&&(l[a.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});let u=a=>{let c=[...a];return c.sort((s,f)=>{for(let d=0;d<i.length;d+=1){var g;let p=i[d],_=l[p.id],m=(g=p?.desc)!=null?g:!1,v=0;if(_.sortUndefined){let S=s.getValue(p.id),x=f.getValue(p.id),C=S===void 0,V=x===void 0;(C||V)&&(v=C&&V?0:C?_.sortUndefined:-_.sortUndefined)}if(v===0&&(v=_.sortingFn(s,f,p.id)),v!==0)return m&&(v*=-1),_.invertSorting&&(v*=-1),v}return s.index-f.index}),c.forEach(s=>{var f;o.push(s),(f=s.subRows)!=null&&f.length&&(s.subRows=u(s.subRows))}),c};return{rows:u(t.rows),flatRows:o,rowsById:t.rowsById}},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})}function rt(e,n){return e?yo(e)?D(e,n):e:null}function yo(e){return bo(e)||typeof e=="function"||So(e)}function bo(e){return typeof e=="function"&&(()=>{let n=Object.getPrototypeOf(e);return n.prototype&&n.prototype.isReactComponent})()}function So(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function xn(e){let n={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=I(()=>({current:vn(n)})),[r,o]=I(()=>t.current.initialState);return t.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:l=>{o(l),e.onStateChange==null||e.onStateChange(l)}})),t.current}function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ce.apply(this,arguments)}function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ge.apply(this,arguments)}function Q(e,n,t){var r,o=(r=t.initialDeps)!=null?r:[],i;return function(){var l;t.key&&t.debug!=null&&t.debug()&&(l=Date.now());var u=e(),a=u.length!==o.length||u.some(function(p,_){return o[_]!==p});if(!a)return i;o=u;var c;if(t.key&&t.debug!=null&&t.debug()&&(c=Date.now()),i=n.apply(void 0,u),t.key&&t.debug!=null&&t.debug()){var s=Math.round((Date.now()-l)*100)/100,f=Math.round((Date.now()-c)*100)/100,g=f/16,d=function(_,m){for(_=String(_);_.length<m;)_=" "+_;return _};console.info("%c\u23F1 "+d(f,5)+" /"+d(s,5)+" ms",`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(`+Math.max(0,Math.min(120-120*g,120))+"deg 100% 31%);",t?.key)}return t==null||t.onChange==null||t.onChange(i),i}}function Ee(e,n){if(e===void 0)throw new Error("Unexpected undefined"+(n?": "+n:""));return e}var Fn=function(n,t){return Math.abs(n-t)<1};var Co=function(n){return n},wo=function(n){for(var t=Math.max(n.startIndex-n.overscan,0),r=Math.min(n.endIndex+n.overscan,n.count-1),o=[],i=t;i<=r;i++)o.push(i);return o},$n=function(n,t){var r=n.scrollElement;if(r){var o=function(u){var a=u.width,c=u.height;t({width:Math.round(a),height:Math.round(c)})};o(r.getBoundingClientRect());var i=new ResizeObserver(function(l){var u=l[0];if(u!=null&&u.borderBoxSize){var a=u.borderBoxSize[0];if(a){o({width:a.inlineSize,height:a.blockSize});return}}o(r.getBoundingClientRect())});return i.observe(r,{box:"border-box"}),function(){i.unobserve(r)}}};var Mn=function(n,t){var r=n.scrollElement;if(r){var o=function(){t(r[n.options.horizontal?"scrollLeft":"scrollTop"])};return o(),r.addEventListener("scroll",o,{passive:!0}),function(){r.removeEventListener("scroll",o)}}};var Ro=function(n,t,r){if(t!=null&&t.borderBoxSize){var o=t.borderBoxSize[0];if(o){var i=Math.round(o[r.options.horizontal?"inlineSize":"blockSize"]);return i}}return Math.round(n.getBoundingClientRect()[r.options.horizontal?"width":"height"])};var Vn=function(n,t,r){var o,i,l=t.adjustments,u=l===void 0?0:l,a=t.behavior,c=n+u;(o=r.scrollElement)==null||o.scrollTo==null||o.scrollTo((i={},i[r.options.horizontal?"left":"top"]=c,i.behavior=a,i))},In=function(n){var t=this;this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=function(){var r=null,o=function(){return r||(typeof ResizeObserver<"u"?r=new ResizeObserver(function(l){l.forEach(function(u){t._measureElement(u.target,u)})}):null)};return{disconnect:function(){var l;return(l=o())==null?void 0:l.disconnect()},observe:function(l){var u;return(u=o())==null?void 0:u.observe(l,{box:"border-box"})},unobserve:function(l){var u;return(u=o())==null?void 0:u.unobserve(l)}}}(),this.range={startIndex:0,endIndex:0},this.setOptions=function(r){Object.entries(r).forEach(function(o){var i=o[0],l=o[1];typeof l>"u"&&delete r[i]}),t.options=ge({debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Co,rangeExtractor:wo,onChange:function(){},measureElement:Ro,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1},r)},this.notify=function(){t.options.onChange==null||t.options.onChange(t)},this.cleanup=function(){t.unsubs.filter(Boolean).forEach(function(r){return r()}),t.unsubs=[],t.scrollElement=null},this._didMount=function(){return t.measureElementCache.forEach(t.observer.observe),function(){t.observer.disconnect(),t.cleanup()}},this._willUpdate=function(){var r=t.options.getScrollElement();t.scrollElement!==r&&(t.cleanup(),t.scrollElement=r,t._scrollToOffset(t.scrollOffset,{adjustments:void 0,behavior:void 0}),t.unsubs.push(t.options.observeElementRect(t,function(o){var i=t.scrollRect;t.scrollRect=o,(t.options.horizontal?o.width!==i.width:o.height!==i.height)&&t.maybeNotify()})),t.unsubs.push(t.options.observeElementOffset(t,function(o){t.scrollAdjustments=0,t.scrollOffset!==o&&(t.isScrollingTimeoutId!==null&&(clearTimeout(t.isScrollingTimeoutId),t.isScrollingTimeoutId=null),t.isScrolling=!0,t.scrollDirection=t.scrollOffset<o?"forward":"backward",t.scrollOffset=o,t.maybeNotify(),t.isScrollingTimeoutId=setTimeout(function(){t.isScrollingTimeoutId=null,t.isScrolling=!1,t.scrollDirection=null,t.maybeNotify()},t.options.scrollingDelay))})))},this.getSize=function(){return t.scrollRect[t.options.horizontal?"width":"height"]},this.memoOptions=Q(function(){return[t.options.count,t.options.paddingStart,t.options.scrollMargin,t.options.getItemKey]},function(r,o,i,l){return t.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:o,scrollMargin:i,getItemKey:l}},{key:!1}),this.getFurthestMeasurement=function(r,o){for(var i=new Map,l=new Map,u=o-1;u>=0;u--){var a=r[u];if(!i.has(a.lane)){var c=l.get(a.lane);if(c==null||a.end>c.end?l.set(a.lane,a):a.end<c.end&&i.set(a.lane,!0),i.size===t.options.lanes)break}}return l.size===t.options.lanes?Array.from(l.values()).sort(function(s,f){return s.end-f.end})[0]:void 0},this.getMeasurements=Q(function(){return[t.memoOptions(),t.itemSizeCache]},function(r,o){var i=r.count,l=r.paddingStart,u=r.scrollMargin,a=r.getItemKey,c=t.pendingMeasuredCacheIndexes.length>0?Math.min.apply(Math,t.pendingMeasuredCacheIndexes):0;t.pendingMeasuredCacheIndexes=[];for(var s=t.measurementsCache.slice(0,c),f=c;f<i;f++){var g=a(f),d=t.options.lanes===1?s[f-1]:t.getFurthestMeasurement(s,f),p=d?d.end:l+u,_=o.get(g),m=typeof _=="number"?_:t.options.estimateSize(f),v=p+m,S=d?d.lane:f%t.options.lanes;s[f]={index:f,start:p,size:m,end:v,key:g,lane:S}}return t.measurementsCache=s,s},{key:!1,debug:function(){return t.options.debug}}),this.calculateRange=Q(function(){return[t.getMeasurements(),t.getSize(),t.scrollOffset]},function(r,o,i){return t.range=Eo({measurements:r,outerSize:o,scrollOffset:i})},{key:!1,debug:function(){return t.options.debug}}),this.maybeNotify=Q(function(){var r=t.calculateRange();return[r.startIndex,r.endIndex,t.isScrolling]},function(){t.notify()},{key:!1,debug:function(){return t.options.debug},initialDeps:[this.range.startIndex,this.range.endIndex,this.isScrolling]}),this.getIndexes=Q(function(){return[t.options.rangeExtractor,t.calculateRange(),t.options.overscan,t.options.count]},function(r,o,i,l){return r(ge({},o,{overscan:i,count:l}))},{key:!1,debug:function(){return t.options.debug}}),this.indexFromElement=function(r){var o=t.options.indexAttribute,i=r.getAttribute(o);return i?parseInt(i,10):(console.warn("Missing attribute name '"+o+"={index}' on measured element."),-1)},this._measureElement=function(r,o){var i,l=t.indexFromElement(r),u=t.measurementsCache[l];if(u){var a=t.measureElementCache.get(u.key);if(!r.isConnected){t.observer.unobserve(r),r===a&&t.measureElementCache.delete(u.key);return}a!==r&&(a&&t.observer.unobserve(a),t.observer.observe(r),t.measureElementCache.set(u.key,r));var c=t.options.measureElement(r,o,t),s=(i=t.itemSizeCache.get(u.key))!=null?i:u.size,f=c-s;f!==0&&(u.start<t.scrollOffset&&t._scrollToOffset(t.scrollOffset,{adjustments:t.scrollAdjustments+=f,behavior:void 0}),t.pendingMeasuredCacheIndexes.push(l),t.itemSizeCache=new Map(t.itemSizeCache.set(u.key,c)),t.notify())}},this.measureElement=function(r){r&&t._measureElement(r,void 0)},this.getVirtualItems=Q(function(){return[t.getIndexes(),t.getMeasurements()]},function(r,o){for(var i=[],l=0,u=r.length;l<u;l++){var a=r[l],c=o[a];i.push(c)}return i},{key:!1,debug:function(){return t.options.debug}}),this.getVirtualItemForOffset=function(r){var o=t.getMeasurements();return Ee(o[Dn(0,o.length-1,function(i){return Ee(o[i]).start},r)])},this.getOffsetForAlignment=function(r,o){var i=t.getSize();o==="auto"&&(r<=t.scrollOffset?o="start":r>=t.scrollOffset+i?o="end":o="start"),o==="start"?r=r:o==="end"?r=r-i:o==="center"&&(r=r-i/2);var l=t.options.horizontal?"scrollWidth":"scrollHeight",u=t.scrollElement?"document"in t.scrollElement?t.scrollElement.document.documentElement[l]:t.scrollElement[l]:0,a=u-t.getSize();return Math.max(Math.min(a,r),0)},this.getOffsetForIndex=function(r,o){o===void 0&&(o="auto"),r=Math.max(0,Math.min(r,t.options.count-1));var i=Ee(t.getMeasurements()[r]);if(o==="auto")if(i.end>=t.scrollOffset+t.getSize()-t.options.scrollPaddingEnd)o="end";else if(i.start<=t.scrollOffset+t.options.scrollPaddingStart)o="start";else return[t.scrollOffset,o];var l=o==="end"?i.end+t.options.scrollPaddingEnd:i.start-t.options.scrollPaddingStart;return[t.getOffsetForAlignment(l,o),o]},this.isDynamicMode=function(){return t.measureElementCache.size>0},this.cancelScrollToIndex=function(){t.scrollToIndexTimeoutId!==null&&(clearTimeout(t.scrollToIndexTimeoutId),t.scrollToIndexTimeoutId=null)},this.scrollToOffset=function(r,o){var i=o===void 0?{}:o,l=i.align,u=l===void 0?"start":l,a=i.behavior;t.cancelScrollToIndex(),a==="smooth"&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t._scrollToOffset(t.getOffsetForAlignment(r,u),{adjustments:void 0,behavior:a})},this.scrollToIndex=function(r,o){var i=o===void 0?{}:o,l=i.align,u=l===void 0?"auto":l,a=i.behavior;r=Math.max(0,Math.min(r,t.options.count-1)),t.cancelScrollToIndex(),a==="smooth"&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");var c=t.getOffsetForIndex(r,u),s=c[0],f=c[1];t._scrollToOffset(s,{adjustments:void 0,behavior:a}),a!=="smooth"&&t.isDynamicMode()&&(t.scrollToIndexTimeoutId=setTimeout(function(){t.scrollToIndexTimeoutId=null;var g=t.measureElementCache.has(t.options.getItemKey(r));if(g){var d=t.getOffsetForIndex(r,f),p=d[0];Fn(p,t.scrollOffset)||t.scrollToIndex(r,{align:f,behavior:a})}else t.scrollToIndex(r,{align:f,behavior:a})}))},this.scrollBy=function(r,o){var i=o===void 0?{}:o,l=i.behavior;t.cancelScrollToIndex(),l==="smooth"&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t._scrollToOffset(t.scrollOffset+r,{adjustments:void 0,behavior:l})},this.getTotalSize=function(){var r;return(((r=t.getMeasurements()[t.options.count-1])==null?void 0:r.end)||t.options.paddingStart)-t.options.scrollMargin+t.options.paddingEnd},this._scrollToOffset=function(r,o){var i=o.adjustments,l=o.behavior;t.options.scrollToFn(r,{behavior:l,adjustments:i},t)},this.measure=function(){t.itemSizeCache=new Map,t.notify()},this.setOptions(n),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(function(r){t.itemSizeCache.set(r.key,r.size)}),this.maybeNotify()},Dn=function(n,t,r,o){for(;n<=t;){var i=(n+t)/2|0,l=r(i);if(l<o)n=i+1;else if(l>o)t=i-1;else return i}return n>0?n-1:0};function Eo(e){for(var n=e.measurements,t=e.outerSize,r=e.scrollOffset,o=n.length-1,i=function(c){return n[c].start},l=Dn(0,o,i,r),u=l;u<o&&n[u].end<r+t;)u++;return{startIndex:l,endIndex:u}}var xo=typeof document<"u"?L:B;function Fo(e){var n=ue(function(){return{}},{})[1],t=ce({},e,{onChange:function(l){n(),e.onChange==null||e.onChange(l)}}),r=I(function(){return new In(t)}),o=r[0];return o.setOptions(t),B(function(){return o._didMount()},[]),xo(function(){return o._willUpdate()}),o}function Tn(e){return Fo(ce({observeElementRect:$n,observeElementOffset:Mn,scrollToFn:Vn},e))}function An(e){return{render(n){Pe(n,e)},unmount(){ze(e)}}}function On(e,n,t){let r=Object.assign({top:0,right:0,bottom:0,left:0},t),o=e,i=o.scrollTop+r.top,l=o.scrollLeft+r.left,u=i+o.clientHeight-r.top-r.bottom,a=l+o.clientWidth-r.left-r.right;for(let c=0;c<n.length;c++){let s=n[c],f=s.offsetTop,g=s.offsetLeft;if(f>=i&&f<=u&&g>=l&&g<=a)return s}return null}function ot(e,n){return document?.defaultView?.getComputedStyle(e,null)?.getPropertyValue(n)}var Hn=e=>{let[n,t]=I(!1),{range:r,from:o,to:i,onRangeChange:l}=e;return b.createElement($o,{range:r,value:[o,i],editing:n,onValueChange:u=>l(...u),onFocus:()=>t(!0),onBlur:()=>t(!1)})};var $o=e=>{let[n,t]=e.value,{editing:r,onFocus:o}=e,i=z(null),l=z(null);return b.createElement("div",{onBlur:u=>{if(!u.currentTarget.contains(u.relatedTarget))return e.onBlur()},onFocus:()=>o(),style:{display:"flex",gap:"0.5rem"}},b.createElement("input",{ref:i,className:`form-control form-control-sm ${i.current?.checkValidity()?"":"is-invalid"}`,style:{flex:"1 1 0",width:"0"},type:"number",placeholder:Nn(r,"Min",e.range()[0]),defaultValue:n,step:"any",onChange:u=>{let a=kn(u.target.value);i.current.classList.toggle("is-invalid",!u.target.checkValidity()),e.onValueChange([a,t])}}),b.createElement("input",{ref:l,className:`form-control form-control-sm ${l.current?.checkValidity()?"":"is-invalid"}`,style:{flex:"1 1 0",width:"0"},type:"number",placeholder:Nn(r,"Max",e.range()[1]),defaultValue:t,step:"any",onChange:u=>{let a=kn(u.target.value);l.current.classList.toggle("is-invalid",!u.target.checkValidity()),e.onValueChange([n,a])}}))};function Nn(e,n,t){return e?typeof t>"u"?n:`${n} (${t})`:null}function kn(e){if(e!=="")return+e}function Pn(e){return e?{getFilteredRowModel:Sn(),getFacetedRowModel:Cn(),getFacetedUniqueValues:wn(),getFacetedMinMaxValues:Rn(),filterFns:{substring:(n,t,r,o)=>n.getValue(t).toString().includes(r)}}:{}}var Ln=({header:e,className:n,...t})=>{if((e.column.columnDef.meta?.typeHint).type==="numeric"){let[o,i]=e.column.getFilterValue()??[void 0,void 0];return Hn({from:o,to:i,range:()=>e.column.getFacetedMinMaxValues()??[void 0,void 0],onRangeChange:(u,a)=>e.column.setFilterValue([u,a])})}return b.createElement("input",{...t,className:`form-control form-control-sm ${n}`,type:"text",onChange:o=>e.column.setFilterValue(o.target.value)})};var O=class e{static{this._empty=new e(new Set)}constructor(n){this._set=n}static empty(){return this._empty}static just(...n){return this.empty().add(...n)}has(n){return this._set.has(n)}add(...n){let t=new Set(this._set.keys());for(let r of n)t.add(r);return new e(t)}toggle(n){return this.has(n)?this.delete(n):this.add(n)}delete(n){let t=new Set(this._set.keys());return t.delete(n),new e(t)}clear(){return e.empty()}[Symbol.iterator](){return this._set[Symbol.iterator]()}toList(){return[...this._set.keys()]}};function Gn(e,n,t,r){let[o,i]=I(O.empty()),[l,u]=I(null),a=s=>{if(e==="none")return;let f=s.currentTarget,g=n(f),d=Mo(e,r,o,s,g,l);d&&(i(d.selection),d.anchor&&(u(g),f.focus()),s.preventDefault())},c=s=>{if(e==="none")return;let f=s.currentTarget,g=n(f),d=o.has(g);if(e==="single"){if(s.key===" "||s.key==="Enter")o.has(g)?i(O.empty()):i(O.just(g)),s.preventDefault();else if(s.key==="ArrowUp"||s.key==="ArrowDown"){let p=t(g,s.key==="ArrowUp"?-1:1);p&&(s.preventDefault(),d&&i(O.just(p)))}}else e==="multiple"&&(s.key===" "||s.key==="Enter"?(i(o.toggle(g)),s.preventDefault()):(s.key==="ArrowUp"||s.key==="ArrowDown")&&t(g,s.key==="ArrowUp"?-1:1)&&s.preventDefault())};return{has(s){return o.has(s)},set(s,f){i(f?o.add(s):o.delete(s))},clear(){i(o.clear())},keys(){return o},itemHandlers(){return{onMouseDown:a,onKeyDown:c}}}}var zn=/^mac/i.test(window.navigator.userAgentData?.platform??window.navigator.platform);function Mo(e,n,t,r,o,i){let{shiftKey:l,altKey:u}=r,a=zn?r.metaKey:r.ctrlKey;if((zn?r.ctrlKey:r.metaKey)||u)return null;if(e==="multiple")return{selection:t.toggle(o),anchor:!0};if(e==="single")return a&&!l?t.has(o)?{selection:O.empty(),anchor:!0}:{selection:O.just(o),anchor:!0}:{selection:O.just(o),anchor:!0};if(e==="multi-native")if(l&&a){let s=n(i,o);return{selection:t.add(...s)}}else{if(a)return{selection:t.toggle(o),anchor:!0};if(l){if(i!==null&&n){let s=n(i,o);return{selection:O.just(...s)}}}else return{selection:O.just(o),anchor:!0}}}var Bn={className:"sort-arrow",viewBox:[-1,-1,2,2].map(e=>e*1.4).join(" "),width:"100%",height:"100%",style:{paddingLeft:"3px"}},Un={stroke:"#333333",strokeWidth:"0.6",fill:"transparent"},Vo=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",...Bn},b.createElement("path",{d:"M -1 0.5 L 0 -0.5 L 1 0.5",...Un,strokeLinecap:"round"})),Io=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",...Bn},b.createElement("path",{d:"M -1 -0.5 L 0 0.5 L 1 -0.5",...Un,strokeLinecap:"round"})),jn=({direction:e})=>{if(!e)return null;if(e==="asc")return Vo;if(e==="desc")return Io;throw new Error(`Unexpected sort direction: '${e}'`)};function qn(e,n,t){let[r,o]=I(0),i=b.useCallback(u=>{o(-1),u.target===u.currentTarget&&On(e,n(),t)?.focus()},[e,n,t]),l=b.useCallback(u=>{o(0)},[]);return{containerTabIndex:r,containerHandlers:{onFocus:i,onBlur:l}}}function Kn(e,n,t,r,o){return U(()=>{let i=e??!0;if(!i)return null;let l=typeof i=="string"?i:"Viewing rows {start} through {end} of {total}";if(!n||t.length===0)return null;let u=n.scrollTop+r.clientHeight,a=n.scrollTop+n.clientHeight,[c,s]=Do(u,a,t,(p,_)=>p.start+p.size/2);if(c===null||s===null)return null;let f=t[c],g=t[s];if(f.index===0&&g.index===o-1)return null;let d=To(l,f.index+1,g.index+1,o);return b.createElement("div",{className:"shiny-data-grid-summary"},d)},[e,n,t,r,o])}function Do(e,n,t,r){let o=null,i=null;for(let l=0;l<t.length;l++){let u=t[l];if(o===null)r(u,!0)>=e&&(o=l,i=l);else if(r(u,!1)<=n)i=l;else break}return[o,i]}function To(e,n,t,r){return e.replace(/\{(start|end|total)\}/g,(o,i)=>i==="start"?n+"":i==="end"?t+"":i==="total"?r+"":o)}var Ao=e=>{let{id:n,data:t,bgcolor:r}=e,{columns:o,type_hints:i,data:l}=t,{width:u,height:a,filters:c}=t.options,s=z(null),f=z(null),g=z(null),d=U(()=>o.map((R,M)=>{let E=i?.[M];return{accessorFn:(q,xe)=>q[M],filterFn:E.type==="numeric"?"inNumberRange":"includesString",header:R,meta:{typeHint:E}}}),[o]),p=U(()=>[...l],[l]),_=Pn(c),m={data:p,columns:d,getCoreRowModel:yn(),getSortedRowModel:En(),..._},v=xn(m),S=Tn({count:v.getFilteredRowModel().rows.length,getScrollElement:()=>s.current,estimateSize:()=>31,paddingStart:f.current?.clientHeight??0,scrollingDelay:10});L(()=>{S.scrollToOffset(0)},[t]);let x=S.getTotalSize(),C=S.getVirtualItems(),V=(C.length>0&&C?.[0]?.start||0)-f.current?.clientHeight,N=C.length>0?x-(C?.[C.length-1]?.end||0):0,J=Kn(t.options.summary,s?.current,C,f.current,S.options.count),F=t.options.style??"grid",Z=F==="grid"?"shiny-data-grid-grid":"shiny-data-grid-table",Jn=F==="table"?"table table-sm":null,re=t.options.row_selection_mode??"multi-native",ko=re!=="none",Yn=re==="multi-native"||re==="multiple",oe=Gn(re,R=>R.dataset.key,(R,M)=>{let E=v.getSortedRowModel(),q=E.rows.findIndex(ut=>ut.id===R);if(q<0||(q+=M,q<0||q>=E.rows.length))return null;let xe=E.rows[q].id;return S.scrollToIndex(q),setTimeout(()=>{s.current?.querySelector(`[data-key='${xe}']`)?.focus()},0),xe},(R,M)=>Oo(v.getSortedRowModel(),R,M));B(()=>{n&&(re==="none"?Shiny.setInputValue(`${n}_selected_rows`,null):Shiny.setInputValue(`${n}_selected_rows`,oe.keys().toList().map(R=>parseInt(R)).sort()))},[[...oe.keys()]]);let Qn=b.useCallback(()=>g.current.querySelectorAll("[tabindex='-1']"),[g.current]),st=qn(s.current,Qn,{top:f.current?.clientHeight??0});B(()=>()=>{v.resetSorting(),oe.clear()},[t]);let Zn=v.getHeaderGroups().length,er=s.current?.scrollHeight>s.current?.clientHeight?"scrolling":"",tr=R=>M=>{(M.key===" "||M.key==="Enter")&&R.toggleSorting(void 0,M.shiftKey)},nr=No(S);return b.createElement(b.Fragment,null,b.createElement("div",{className:`shiny-data-grid ${Z} ${er}`,ref:s,style:{width:u,maxHeight:a,overflow:"auto"}},b.createElement("table",{className:Jn+(c?" filtering":""),"aria-rowcount":l.length,"aria-multiselectable":Yn,style:{width:u===null||u==="auto"?null:"100%"}},b.createElement("thead",{ref:f,style:{backgroundColor:r}},v.getHeaderGroups().map((R,M)=>b.createElement("tr",{key:R.id,"aria-rowindex":M+1},R.headers.map(E=>b.createElement("th",{key:E.id,colSpan:E.colSpan,style:{width:E.getSize()},scope:"col",tabIndex:0,onClick:E.column.getToggleSortingHandler(),onKeyDown:tr(E.column)},E.isPlaceholder?null:b.createElement("div",{style:{cursor:E.column.getCanSort()?"pointer":null,userSelect:E.column.getCanSort()?"none":null}},rt(E.column.columnDef.header,E.getContext()),b.createElement(jn,{direction:E.column.getIsSorted()})))))),c&&b.createElement("tr",{className:"filters"},v.getFlatHeaders().map(R=>b.createElement("th",{key:`filter-${R.id}`},b.createElement(Ln,{header:R}))))),b.createElement("tbody",{ref:g,tabIndex:st.containerTabIndex,...st.containerHandlers},V>0&&b.createElement("tr",{style:{height:`${V}px`}}),C.map(R=>{let M=v.getRowModel().rows[R.index];return M&&b.createElement("tr",{key:R.key,"data-index":R.index,"aria-rowindex":R.index+Zn,"data-key":M.id,ref:nr,"aria-selected":oe.has(M.id),tabIndex:-1,...oe.itemHandlers()},M.getVisibleCells().map(E=>b.createElement("td",{key:E.id},rt(E.column.columnDef.cell,E.getContext()))))}),N>0&&b.createElement("tr",{style:{height:`${N}px`}})))),J)};function Oo(e,n,t){let r=e.rows.findIndex(l=>l.id===n),o=e.rows.findIndex(l=>l.id===t);if(r<0||o<0)return[];r>o&&([r,o]=[o,r]);let i=[];for(let l=r;l<=o;l++)i.push(e.rows[l].id);return i}function No(e){let n=z([]),t=ye(r=>{r&&(r.isConnected?e.measureElement(r):n.current.push(r))},[e]);return L(()=>{n.current.length>0&&n.current.splice(0).forEach(e.measureElement)}),t}var it=class extends Shiny.OutputBinding{find(n){return $(n).find("shiny-data-frame")}renderValue(n,t){n.renderValue(t)}renderError(n,t){n.classList.add("shiny-output-error"),n.renderError(t)}clearError(n){n.classList.remove("shiny-output-error"),n.clearError()}};Shiny.outputBindings.register(new it,"shinyDataFrame");function Wn(e){if(!e)return null;let n=ot(e,"background-color");if(!n)return n;let t=n.match(/^rgba\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)$/);if(n==="transparent"||t&&parseFloat(t[4])===0){let r=ot(e,"background-image");return r&&r!=="none"?null:Wn(e.parentElement)}return n}var Xn=document.createElement("template");Xn.innerHTML=`<style>${at}</style>`;var lt=class extends HTMLElement{connectedCallback(){let[t]=[this];t.appendChild(Xn.content.cloneNode(!0)),this.errorRoot=document.createElement("span"),t.appendChild(this.errorRoot);let r=document.createElement("div");r.classList.add("html-fill-container","html-fill-item"),t.appendChild(r),this.reactRoot=An(r);let o=this.querySelector("script.data");if(o){let i=JSON.parse(o.innerText);this.renderValue(i)}}renderValue(t){if(this.clearError(),!t){this.reactRoot.render(null);return}this.reactRoot.render(b.createElement(Ge,null,b.createElement(Ao,{id:this.id,data:t,bgcolor:Wn(this)})))}renderError(t){this.reactRoot.render(null),this.errorRoot.innerText=t.message}clearError(){this.reactRoot.render(null),this.errorRoot.innerText=""}};customElements.define("shiny-data-frame",lt);export{lt as ShinyDataFrameOutput};
/*! Bundled license information:

@tanstack/table-core/build/lib/index.mjs:
  (**
   * table-core
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   *)

@tanstack/react-table/build/lib/index.mjs:
  (**
   * react-table
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   *)

@tanstack/react-virtual/build/lib/_virtual/_rollupPluginBabelHelpers.mjs:
  (**
   * react-virtual
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   *)

@tanstack/virtual-core/build/lib/_virtual/_rollupPluginBabelHelpers.mjs:
  (**
   * virtual-core
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   *)

@tanstack/virtual-core/build/lib/utils.mjs:
  (**
   * virtual-core
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   *)

@tanstack/virtual-core/build/lib/index.mjs:
  (**
   * virtual-core
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   *)

@tanstack/react-virtual/build/lib/index.mjs:
  (**
   * react-virtual
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   *)
*/
//# sourceMappingURL=dataframe.js.map
