import{r as se,R as be,c as Ae,a as ro,M as Cn,j as q,b as ye,p as pn,m as gn,d as oo,B as vn,e as io,f as ao,g as uo,u as so,C as lo,F as co,I as fo,h as po,S as go}from"./index.171f553a.js";import{u as vo}from"./useRemainingViewPortHeight.7395542b.js";import{C as mo}from"./chevron-down.dd238e96.js";import{f as ho}from"./index.92e2d967.js";import{F as yo,p as wo,A as bo}from"./Fab.ef67ff10.js";import{P as Ro,a as Co}from"./play.7b1a5f99.js";function yt(b){return function(v){return!!v.type&&v.type.tabsRole===b}}var tt=yt("Tab"),wt=yt("TabList"),bt=yt("TabPanel");function So(b){return tt(b)||wt(b)||bt(b)}function vt(b,v){return se.exports.Children.map(b,function(f){return f===null?null:So(f)?v(f):f.props&&f.props.children&&typeof f.props.children=="object"?se.exports.cloneElement(f,Object.assign({},f.props,{children:vt(f.props.children,v)})):f})}function Sn(b,v){return se.exports.Children.forEach(b,function(f){f!==null&&(tt(f)||bt(f)?v(f):f.props&&f.props.children&&typeof f.props.children=="object"&&(wt(f)&&v(f),Sn(f.props.children,v)))})}function Pn(b){var v=0;return Sn(b,function(f){tt(f)&&v++}),v}var Po=["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName","environment","disableUpDownKeys"];function xo(b,v){if(b==null)return{};var f={},g=Object.keys(b),O,_;for(_=0;_=0)&&(f[O]=b[O]);return f}function xn(b){return b&&"getAttribute"in b}function mn(b){return xn(b)&&b.getAttribute("data-rttab")}function ke(b){return xn(b)&&b.getAttribute("aria-disabled")==="true"}var et;function Bo(b){var v=b||(typeof window<"u"?window:void 0);try{et=!!(typeof v<"u"&&v.document&&v.document.activeElement)}catch{et=!1}}var Eo={className:"react-tabs",focus:!1},Rt=function(v){var f=se.exports.useRef([]),g=se.exports.useRef([]),O=se.exports.useRef();function _(m,G){if(!(m<0||m>=X())){var M=v.onSelect,K=v.selectedIndex;M(m,K,G)}}function c(m){for(var G=X(),M=m+1;Mm;)if(!ke(ee(G)))return G;return m}function de(){for(var m=X(),G=0;G=0)&&(f[O]=b[O]);return f}var Go={className:"react-tabs__tab-list"},rt=function(v){var f=v.children,g=v.className,O=Ao(v,ko);return be.createElement("ul",Object.assign({},O,{className:Ae(g),role:"tablist"}),f)};rt.tabsRole="TabList";rt.propTypes={};rt.defaultProps=Go;var Ho=["children","className","disabled","disabledClassName","focus","id","selected","selectedClassName","tabIndex","tabRef"];function No(b,v){if(b==null)return{};var f={},g=Object.keys(b),O,_;for(_=0;_=0)&&(f[O]=b[O]);return f}var gt="react-tabs__tab",Oo={className:gt,disabledClassName:gt+"--disabled",focus:!1,id:null,selected:!1,selectedClassName:gt+"--selected"},De=function(v){var f,g=se.exports.useRef(),O=v.children,_=v.className,c=v.disabled,U=v.disabledClassName,de=v.focus,u=v.id,X=v.selected,ee=v.selectedClassName,le=v.tabIndex,fe=v.tabRef,D=No(v,Ho);return se.exports.useEffect(function(){X&&de&&g.current.focus()},[X,de]),be.createElement("li",Object.assign({},D,{className:Ae(_,(f={},f[ee]=X,f[U]=c,f)),ref:function(ce){g.current=ce,fe&&fe(ce)},role:"tab",id:"tab"+u,"aria-selected":X?"true":"false","aria-disabled":c?"true":"false","aria-controls":"panel"+u,tabIndex:le||(X?"0":null),"data-rttab":!0}),O)};De.propTypes={};De.tabsRole="Tab";De.defaultProps=Oo;var Wo=["children","className","forceRender","id","selected","selectedClassName"];function _o(b,v){if(b==null)return{};var f={},g=Object.keys(b),O,_;for(_=0;_=0)&&(f[O]=b[O]);return f}var hn="react-tabs__tab-panel",zo={className:hn,forceRender:!1,selectedClassName:hn+"--selected"},Ve=function(v){var f,g=v.children,O=v.className,_=v.forceRender,c=v.id,U=v.selected,de=v.selectedClassName,u=_o(v,Wo);return be.createElement("div",Object.assign({},u,{className:Ae(O,(f={},f[de]=U,f)),role:"tabpanel",id:"panel"+c,"aria-labelledby":"tab"+c}),_||U?g:null)};Ve.tabsRole="TabPanel";Ve.propTypes={};Ve.defaultProps=zo;const Mo="_placeHolder_12xws_1",jo="_connQty_12xws_10",Lo="_inputWrapper_12xws_22",Do="_input_12xws_22",Le={placeHolder:Mo,connQty:jo,inputWrapper:Lo,input:Do};var mt={exports:{}},ht={exports:{}};(function(b,v){(function(f,g){g(v,se.exports)})(ro,function(f,g){function O(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(d){return void n(d)}s.done?t(l):Promise.resolve(l).then(r,i)}function _(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(l){O(o,r,i,a,s,"next",l)}function s(l){O(o,r,i,a,s,"throw",l)}a(void 0)})}}function c(){return(c=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function de(e){var t=function(n,r){if(typeof n!="object"||n===null)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return typeof t=="symbol"?t:String(t)}g=g&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g;var u={init:"init"},X=function(e){var t=e.value;return t===void 0?"":t},ee=function(){return g.createElement(g.Fragment,null,"\xA0")},le={Cell:X,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function fe(){for(var e=arguments.length,t=new Array(e),n=0;n(o=typeof o=="number"?o:1/0)){var a=i;i=o,o=a}return e.filter(function(s){return t.some(function(l){var d=s.values[l];return d>=i&&d<=o})})};Ot.autoRemove=function(e){return!e||typeof e[0]!="number"&&typeof e[1]!="number"};var We=Object.freeze({__proto__:null,text:Et,exactText:It,exactTextCase:Tt,includes:Ft,includesAll:kt,includesSome:At,includesValue:Gt,exact:Ht,equals:Nt,between:Ot});u.resetFilters="resetFilters",u.setFilter="setFilter",u.setAllFilters="setAllFilters";var Wt=function(e){e.stateReducers.push(Jn),e.useInstance.push(Yn)};function Jn(e,t,n,r){if(t.type===u.init)return c({filters:[]},e);if(t.type===u.resetFilters)return c({},e,{filters:r.initialState.filters||[]});if(t.type===u.setFilter){var i=t.columnId,o=t.filterValue,a=r.allColumns,s=r.filterTypes,l=a.find(function(S){return S.id===i});if(!l)throw new Error("React-Table: Could not find a column with id: "+i);var d=Se(l.filter,s||{},We),R=e.filters.find(function(S){return S.id===i}),h=ie(o,R&&R.value);return Ie(d.autoRemove,h,l)?c({},e,{filters:e.filters.filter(function(S){return S.id!==i})}):c({},e,R?{filters:e.filters.map(function(S){return S.id===i?{id:i,value:h}:S})}:{filters:[].concat(e.filters,[{id:i,value:h}])})}if(t.type===u.setAllFilters){var y=t.filters,p=r.allColumns,w=r.filterTypes;return c({},e,{filters:ie(y,e.filters).filter(function(S){var P=p.find(function(E){return E.id===S.id});return!Ie(Se(P.filter,w||{},We).autoRemove,S.value,P)})})}}function Yn(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.rowsById,o=e.allColumns,a=e.filterTypes,s=e.manualFilters,l=e.defaultCanFilter,d=l!==void 0&&l,R=e.disableFilters,h=e.state.filters,y=e.dispatch,p=e.autoResetFilters,w=p===void 0||p,S=g.useCallback(function(x,A){y({type:u.setFilter,columnId:x,filterValue:A})},[y]),P=g.useCallback(function(x){y({type:u.setAllFilters,filters:x})},[y]);o.forEach(function(x){var A=x.id,z=x.accessor,T=x.defaultCanFilter,k=x.disableFilters;x.canFilter=z?ne(k!==!0&&void 0,R!==!0&&void 0,!0):ne(T,d,!1),x.setFilter=function(H){return S(x.id,H)};var $=h.find(function(H){return H.id===A});x.filterValue=$&&$.value});var E=g.useMemo(function(){if(s||!h.length)return[n,r,i];var x=[],A={};return[function z(T,k){k===void 0&&(k=0);var $=T;return($=h.reduce(function(H,V){var L=V.id,Q=V.value,I=o.find(function(te){return te.id===L});if(!I)return H;k===0&&(I.preFilteredRows=H);var j=Se(I.filter,a||{},We);return j?(I.filteredRows=j(H,[L],Q),I.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+I.id+"."),H)},T)).forEach(function(H){x.push(H),A[H.id]=H,H.subRows&&(H.subRows=H.subRows&&H.subRows.length>0?z(H.subRows,k+1):H.subRows)}),$}(n),x,A]},[s,h,n,r,i,o,a]),W=E[0],B=E[1],C=E[2];g.useMemo(function(){o.filter(function(x){return!h.find(function(A){return A.id===x.id})}).forEach(function(x){x.preFilteredRows=W,x.filteredRows=W})},[W,h,o]);var N=m(w);M(function(){N()&&y({type:u.resetFilters})},[y,s?null:t]),Object.assign(e,{preFilteredRows:n,preFilteredFlatRows:r,preFilteredRowsById:i,filteredRows:W,filteredFlatRows:B,filteredRowsById:C,rows:W,flatRows:B,rowsById:C,setFilter:S,setAllFilters:P})}Wt.pluginName="useFilters",u.resetGlobalFilter="resetGlobalFilter",u.setGlobalFilter="setGlobalFilter";var _t=function(e){e.stateReducers.push(Zn),e.useInstance.push(er)};function Zn(e,t,n,r){if(t.type===u.resetGlobalFilter)return c({},e,{globalFilter:r.initialState.globalFilter||void 0});if(t.type===u.setGlobalFilter){var i=t.filterValue,o=r.userFilterTypes,a=Se(r.globalFilter,o||{},We),s=ie(i,e.globalFilter);return Ie(a.autoRemove,s)?(e.globalFilter,U(e,["globalFilter"])):c({},e,{globalFilter:s})}}function er(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.rowsById,o=e.allColumns,a=e.filterTypes,s=e.globalFilter,l=e.manualGlobalFilter,d=e.state.globalFilter,R=e.dispatch,h=e.autoResetGlobalFilter,y=h===void 0||h,p=e.disableGlobalFilter,w=g.useCallback(function(C){R({type:u.setGlobalFilter,filterValue:C})},[R]),S=g.useMemo(function(){if(l||d===void 0)return[n,r,i];var C=[],N={},x=Se(s,a||{},We);if(!x)return console.warn("Could not find a valid 'globalFilter' option."),n;o.forEach(function(z){var T=z.disableGlobalFilter;z.canFilter=ne(T!==!0&&void 0,p!==!0&&void 0,!0)});var A=o.filter(function(z){return z.canFilter===!0});return[function z(T){return(T=x(T,A.map(function(k){return k.id}),d)).forEach(function(k){C.push(k),N[k.id]=k,k.subRows=k.subRows&&k.subRows.length?z(k.subRows):k.subRows}),T}(n),C,N]},[l,d,s,a,o,n,r,i,p]),P=S[0],E=S[1],W=S[2],B=m(y);M(function(){B()&&R({type:u.resetGlobalFilter})},[R,l?null:t]),Object.assign(e,{preGlobalFilteredRows:n,preGlobalFilteredFlatRows:r,preGlobalFilteredRowsById:i,globalFilteredRows:P,globalFilteredFlatRows:E,globalFilteredRowsById:W,rows:P,flatRows:E,rowsById:W,setGlobalFilter:w,disableGlobalFilter:p})}function zt(e,t){return t.reduce(function(n,r){return n+(typeof r=="number"?r:0)},0)}_t.pluginName="useGlobalFilter";var Mt=Object.freeze({__proto__:null,sum:zt,min:function(e){var t=e[0]||0;return e.forEach(function(n){typeof n=="number"&&(t=Math.min(t,n))}),t},max:function(e){var t=e[0]||0;return e.forEach(function(n){typeof n=="number"&&(t=Math.max(t,n))}),t},minMax:function(e){var t=e[0]||0,n=e[0]||0;return e.forEach(function(r){typeof r=="number"&&(t=Math.min(t,r),n=Math.max(n,r))}),t+".."+n},average:function(e){return zt(0,e)/e.length},median:function(e){if(!e.length)return null;var t=Math.floor(e.length/2),n=[].concat(e).sort(function(r,i){return r-i});return e.length%2!=0?n[t]:(n[t-1]+n[t])/2},unique:function(e){return Array.from(new Set(e).values())},uniqueCount:function(e){return new Set(e).size},count:function(e){return e.length}}),tr=[],nr={};u.resetGroupBy="resetGroupBy",u.setGroupBy="setGroupBy",u.toggleGroupBy="toggleGroupBy";var jt=function(e){e.getGroupByToggleProps=[rr],e.stateReducers.push(or),e.visibleColumnsDeps.push(function(t,n){var r=n.instance;return[].concat(t,[r.state.groupBy])}),e.visibleColumns.push(ir),e.useInstance.push(ur),e.prepareRow.push(sr)};jt.pluginName="useGroupBy";var rr=function(e,t){var n=t.header;return[e,{onClick:n.canGroupBy?function(r){r.persist(),n.toggleGroupBy()}:void 0,style:{cursor:n.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function or(e,t,n,r){if(t.type===u.init)return c({groupBy:[]},e);if(t.type===u.resetGroupBy)return c({},e,{groupBy:r.initialState.groupBy||[]});if(t.type===u.setGroupBy)return c({},e,{groupBy:t.value});if(t.type===u.toggleGroupBy){var i=t.columnId,o=t.value,a=o!==void 0?o:!e.groupBy.includes(i);return c({},e,a?{groupBy:[].concat(e.groupBy,[i])}:{groupBy:e.groupBy.filter(function(s){return s!==i})})}}function ir(e,t){var n=t.instance.state.groupBy,r=n.map(function(o){return e.find(function(a){return a.id===o})}).filter(Boolean),i=e.filter(function(o){return!n.includes(o.id)});return(e=[].concat(r,i)).forEach(function(o){o.isGrouped=n.includes(o.id),o.groupedIndex=n.indexOf(o.id)}),e}var ar={};function ur(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.rowsById,o=e.allColumns,a=e.flatHeaders,s=e.groupByFn,l=s===void 0?Lt:s,d=e.manualGroupBy,R=e.aggregations,h=R===void 0?ar:R,y=e.plugins,p=e.state.groupBy,w=e.dispatch,S=e.autoResetGroupBy,P=S===void 0||S,E=e.disableGroupBy,W=e.defaultCanGroupBy,B=e.getHooks;Z(y,["useColumnOrder","useFilters"],"useGroupBy");var C=m(e);o.forEach(function(I){var j=I.accessor,te=I.defaultGroupBy,pe=I.disableGroupBy;I.canGroupBy=j?ne(I.canGroupBy,pe!==!0&&void 0,E!==!0&&void 0,!0):ne(I.canGroupBy,te,W,!1),I.canGroupBy&&(I.toggleGroupBy=function(){return e.toggleGroupBy(I.id)}),I.Aggregated=I.Aggregated||I.Cell});var N=g.useCallback(function(I,j){w({type:u.toggleGroupBy,columnId:I,value:j})},[w]),x=g.useCallback(function(I){w({type:u.setGroupBy,value:I})},[w]);a.forEach(function(I){I.getGroupByToggleProps=D(B().getGroupByToggleProps,{instance:C(),header:I})});var A=g.useMemo(function(){if(d||!p.length)return[n,r,i,tr,nr,r,i];var I=p.filter(function(ue){return o.find(function(Pe){return Pe.id===ue})}),j=[],te={},pe=[],F={},Y=[],re={},ge=function ue(Pe,Re,un){if(Re===void 0&&(Re=0),Re===I.length)return Pe.map(function(Ue){return c({},Ue,{depth:Re})});var dt=I[Re],Qr=l(Pe,dt);return Object.entries(Qr).map(function(Ue,Jr){var sn=Ue[0],qe=Ue[1],Xe=dt+":"+sn,ln=ue(qe,Re+1,Xe=un?un+">"+Xe:Xe),cn=Re?Ee(qe,"leafRows"):qe,Yr=function(he,ft,eo){var Qe={};return o.forEach(function(oe){if(I.includes(oe.id))Qe[oe.id]=ft[0]?ft[0].values[oe.id]:null;else{var dn=typeof oe.aggregate=="function"?oe.aggregate:h[oe.aggregate]||Mt[oe.aggregate];if(dn){var to=ft.map(function(Je){return Je.values[oe.id]}),no=he.map(function(Je){var pt=Je.values[oe.id];if(!eo&&oe.aggregateValue){var fn=typeof oe.aggregateValue=="function"?oe.aggregateValue:h[oe.aggregateValue]||Mt[oe.aggregateValue];if(!fn)throw console.info({column:oe}),new Error("React Table: Invalid column.aggregateValue option for column listed above");pt=fn(pt,Je,oe)}return pt});Qe[oe.id]=dn(no,to)}else{if(oe.aggregate)throw console.info({column:oe}),new Error("React Table: Invalid column.aggregate option for column listed above");Qe[oe.id]=null}}}),Qe}(cn,qe,Re),Zr={id:Xe,isGrouped:!0,groupByID:dt,groupByVal:sn,values:Yr,subRows:ln,leafRows:cn,depth:Re,index:Jr};return ln.forEach(function(he){j.push(he),te[he.id]=he,he.isGrouped?(pe.push(he),F[he.id]=he):(Y.push(he),re[he.id]=he)}),Zr})}(n);return ge.forEach(function(ue){j.push(ue),te[ue.id]=ue,ue.isGrouped?(pe.push(ue),F[ue.id]=ue):(Y.push(ue),re[ue.id]=ue)}),[ge,j,te,pe,F,Y,re]},[d,p,n,r,i,o,h,l]),z=A[0],T=A[1],k=A[2],$=A[3],H=A[4],V=A[5],L=A[6],Q=m(P);M(function(){Q()&&w({type:u.resetGroupBy})},[w,d?null:t]),Object.assign(e,{preGroupedRows:n,preGroupedFlatRow:r,preGroupedRowsById:i,groupedRows:z,groupedFlatRows:T,groupedRowsById:k,onlyGroupedFlatRows:$,onlyGroupedRowsById:H,nonGroupedFlatRows:V,nonGroupedRowsById:L,rows:z,flatRows:T,rowsById:k,toggleGroupBy:N,setGroupBy:x})}function sr(e){e.allCells.forEach(function(t){var n;t.isGrouped=t.column.isGrouped&&t.column.id===e.groupByID,t.isPlaceholder=!t.isGrouped&&t.column.isGrouped,t.isAggregated=!t.isGrouped&&!t.isPlaceholder&&((n=e.subRows)==null?void 0:n.length)})}function Lt(e,t){return e.reduce(function(n,r,i){var o=""+r.values[t];return n[o]=Array.isArray(n[o])?n[o]:[],n[o].push(r),n},{})}var Dt=/([0-9]+)/gm;function it(e,t){return e===t?0:e>t?1:-1}function _e(e,t,n){return[e.values[n],t.values[n]]}function Vt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}var lr=Object.freeze({__proto__:null,alphanumeric:function(e,t,n){var r=_e(e,t,n),i=r[0],o=r[1];for(i=Vt(i),o=Vt(o),i=i.split(Dt).filter(Boolean),o=o.split(Dt).filter(Boolean);i.length&&o.length;){var a=i.shift(),s=o.shift(),l=parseInt(a,10),d=parseInt(s,10),R=[l,d].sort();if(isNaN(R[0])){if(a>s)return 1;if(s>a)return-1}else{if(isNaN(R[1]))return isNaN(l)?-1:1;if(l>d)return 1;if(d>l)return-1}}return i.length-o.length},datetime:function(e,t,n){var r=_e(e,t,n),i=r[0],o=r[1];return it(i=i.getTime(),o=o.getTime())},basic:function(e,t,n){var r=_e(e,t,n);return it(r[0],r[1])},string:function(e,t,n){var r=_e(e,t,n),i=r[0],o=r[1];for(i=i.split("").filter(Boolean),o=o.split("").filter(Boolean);i.length&&o.length;){var a=i.shift(),s=o.shift(),l=a.toLowerCase(),d=s.toLowerCase();if(l>d)return 1;if(d>l)return-1;if(a>s)return 1;if(s>a)return-1}return i.length-o.length},number:function(e,t,n){var r=_e(e,t,n),i=r[0],o=r[1],a=/[^0-9.]/gi;return it(i=Number(String(i).replace(a,"")),o=Number(String(o).replace(a,"")))}});u.resetSortBy="resetSortBy",u.setSortBy="setSortBy",u.toggleSortBy="toggleSortBy",u.clearSortBy="clearSortBy",le.sortType="alphanumeric",le.sortDescFirst=!1;var $t=function(e){e.getSortByToggleProps=[cr],e.stateReducers.push(dr),e.useInstance.push(fr)};$t.pluginName="useSortBy";var cr=function(e,t){var n=t.instance,r=t.column,i=n.isMultiSortEvent,o=i===void 0?function(a){return a.shiftKey}:i;return[e,{onClick:r.canSort?function(a){a.persist(),r.toggleSortBy(void 0,!n.disableMultiSort&&o(a))}:void 0,style:{cursor:r.canSort?"pointer":void 0},title:r.canSort?"Toggle SortBy":void 0}]};function dr(e,t,n,r){if(t.type===u.init)return c({sortBy:[]},e);if(t.type===u.resetSortBy)return c({},e,{sortBy:r.initialState.sortBy||[]});if(t.type===u.clearSortBy)return c({},e,{sortBy:e.sortBy.filter(function(C){return C.id!==t.columnId})});if(t.type===u.setSortBy)return c({},e,{sortBy:t.sortBy});if(t.type===u.toggleSortBy){var i,o=t.columnId,a=t.desc,s=t.multi,l=r.allColumns,d=r.disableMultiSort,R=r.disableSortRemove,h=r.disableMultiRemove,y=r.maxMultiSortColCount,p=y===void 0?Number.MAX_SAFE_INTEGER:y,w=e.sortBy,S=l.find(function(C){return C.id===o}).sortDescFirst,P=w.find(function(C){return C.id===o}),E=w.findIndex(function(C){return C.id===o}),W=a!=null,B=[];return(i=!d&&s?P?"toggle":"add":E!==w.length-1||w.length!==1?"replace":P?"toggle":"replace")!="toggle"||R||W||s&&h||!(P&&P.desc&&!S||!P.desc&&S)||(i="remove"),i==="replace"?B=[{id:o,desc:W?a:S}]:i==="add"?(B=[].concat(w,[{id:o,desc:W?a:S}])).splice(0,B.length-p):i==="toggle"?B=w.map(function(C){return C.id===o?c({},C,{desc:W?a:!P.desc}):C}):i==="remove"&&(B=w.filter(function(C){return C.id!==o})),c({},e,{sortBy:B})}}function fr(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.allColumns,o=e.orderByFn,a=o===void 0?Kt:o,s=e.sortTypes,l=e.manualSortBy,d=e.defaultCanSort,R=e.disableSortBy,h=e.flatHeaders,y=e.state.sortBy,p=e.dispatch,w=e.plugins,S=e.getHooks,P=e.autoResetSortBy,E=P===void 0||P;Z(w,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var W=g.useCallback(function(T){p({type:u.setSortBy,sortBy:T})},[p]),B=g.useCallback(function(T,k,$){p({type:u.toggleSortBy,columnId:T,desc:k,multi:$})},[p]),C=m(e);h.forEach(function(T){var k=T.accessor,$=T.canSort,H=T.disableSortBy,V=T.id,L=k?ne(H!==!0&&void 0,R!==!0&&void 0,!0):ne(d,$,!1);T.canSort=L,T.canSort&&(T.toggleSortBy=function(I,j){return B(T.id,I,j)},T.clearSortBy=function(){p({type:u.clearSortBy,columnId:T.id})}),T.getSortByToggleProps=D(S().getSortByToggleProps,{instance:C(),column:T});var Q=y.find(function(I){return I.id===V});T.isSorted=!!Q,T.sortedIndex=y.findIndex(function(I){return I.id===V}),T.isSortedDesc=T.isSorted?Q.desc:void 0});var N=g.useMemo(function(){if(l||!y.length)return[n,r];var T=[],k=y.filter(function($){return i.find(function(H){return H.id===$.id})});return[function $(H){var V=a(H,k.map(function(L){var Q=i.find(function(te){return te.id===L.id});if(!Q)throw new Error("React-Table: Could not find a column with id: "+L.id+" while sorting");var I=Q.sortType,j=Ge(I)||(s||{})[I]||lr[I];if(!j)throw new Error("React-Table: Could not find a valid sortType of '"+I+"' for column '"+L.id+"'.");return function(te,pe){return j(te,pe,L.id,L.desc)}}),k.map(function(L){var Q=i.find(function(I){return I.id===L.id});return Q&&Q.sortInverted?L.desc:!L.desc}));return V.forEach(function(L){T.push(L),L.subRows&&L.subRows.length!==0&&(L.subRows=$(L.subRows))}),V}(n),T]},[l,y,n,r,i,a,s]),x=N[0],A=N[1],z=m(E);M(function(){z()&&p({type:u.resetSortBy})},[l?null:t]),Object.assign(e,{preSortedRows:n,preSortedFlatRows:r,sortedRows:x,sortedFlatRows:A,rows:x,flatRows:A,setSortBy:W,toggleSortBy:B})}function Kt(e,t,n){return[].concat(e).sort(function(r,i){for(var o=0;oe.pageIndex?s=i===-1?o.length>=e.pageSize:a-1),s?c({},e,{pageIndex:a}):e}if(t.type===u.setPageSize){var l=t.pageSize,d=e.pageSize*e.pageIndex;return c({},e,{pageIndex:Math.floor(d/l),pageSize:l})}}function gr(e){var t=e.rows,n=e.autoResetPage,r=n===void 0||n,i=e.manualExpandedKey,o=i===void 0?"expanded":i,a=e.plugins,s=e.pageCount,l=e.paginateExpandedRows,d=l===void 0||l,R=e.expandSubRows,h=R===void 0||R,y=e.state,p=y.pageSize,w=y.pageIndex,S=y.expanded,P=y.globalFilter,E=y.filters,W=y.groupBy,B=y.sortBy,C=e.dispatch,N=e.data,x=e.manualPagination;Z(a,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var A=m(r);M(function(){A()&&C({type:u.resetPage})},[C,x?null:N,P,E,W,B]);var z=x?s:Math.ceil(t.length/p),T=g.useMemo(function(){return z>0?[].concat(new Array(z)).fill(null).map(function(j,te){return te}):[]},[z]),k=g.useMemo(function(){var j;if(x)j=t;else{var te=p*w,pe=te+p;j=t.slice(te,pe)}return d?j:Ne(j,{manualExpandedKey:o,expanded:S,expandSubRows:h})},[h,S,o,x,w,p,d,t]),$=w>0,H=z===-1?k.length>=p:w-1&&o.push(i.splice(l,1)[0])};i.length&&r.length;)a();return[].concat(o,i)}function Wr(e){var t=e.dispatch;e.setColumnOrder=g.useCallback(function(n){return t({type:u.setColumnOrder,columnOrder:n})},[t])}en.pluginName="useColumnOrder",le.canResize=!0,u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize";var tn=function(e){e.getResizerProps=[_r],e.getHeaderProps.push({style:{position:"relative"}}),e.stateReducers.push(zr),e.useInstance.push(jr),e.useInstanceBeforeDimensions.push(Mr)},_r=function(e,t){var n=t.instance,r=t.header,i=n.dispatch,o=function(a,s){var l=!1;if(a.type==="touchstart"){if(a.touches&&a.touches.length>1)return;l=!0}var d,R,h=function(B){var C=[];return function N(x){x.columns&&x.columns.length&&x.columns.map(N),C.push(x)}(B),C}(s).map(function(B){return[B.id,B.totalWidth]}),y=l?Math.round(a.touches[0].clientX):a.clientX,p=function(){window.cancelAnimationFrame(d),d=null,i({type:u.columnDoneResizing})},w=function(){window.cancelAnimationFrame(d),d=null,i({type:u.columnResizing,clientX:R})},S=function(B){R=B,d||(d=window.requestAnimationFrame(w))},P={mouse:{moveEvent:"mousemove",moveHandler:function(B){return S(B.clientX)},upEvent:"mouseup",upHandler:function(B){document.removeEventListener("mousemove",P.mouse.moveHandler),document.removeEventListener("mouseup",P.mouse.upHandler),p()}},touch:{moveEvent:"touchmove",moveHandler:function(B){return B.cancelable&&(B.preventDefault(),B.stopPropagation()),S(B.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(B){document.removeEventListener(P.touch.moveEvent,P.touch.moveHandler),document.removeEventListener(P.touch.upEvent,P.touch.moveHandler),p()}}},E=l?P.touch:P.mouse,W=!!function(){if(typeof Fe=="boolean")return Fe;var B=!1;try{var C={get passive(){return B=!0,!1}};window.addEventListener("test",null,C),window.removeEventListener("test",null,C)}catch{B=!1}return Fe=B}()&&{passive:!1};document.addEventListener(E.moveEvent,E.moveHandler,W),document.addEventListener(E.upEvent,E.upHandler,W),i({type:u.columnStartResizing,columnId:s.id,columnWidth:s.totalWidth,headerIdWidths:h,clientX:y})};return[e,{onMouseDown:function(a){return a.persist()||o(a,r)},onTouchStart:function(a){return a.persist()||o(a,r)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function zr(e,t){if(t.type===u.init)return c({columnResizing:{columnWidths:{}}},e);if(t.type===u.resetResize)return c({},e,{columnResizing:{columnWidths:{}}});if(t.type===u.columnStartResizing){var n=t.clientX,r=t.columnId,i=t.columnWidth,o=t.headerIdWidths;return c({},e,{columnResizing:c({},e.columnResizing,{startX:n,headerIdWidths:o,columnWidth:i,isResizingColumn:r})})}if(t.type===u.columnResizing){var a=t.clientX,s=e.columnResizing,l=s.startX,d=s.columnWidth,R=s.headerIdWidths,h=(a-l)/d,y={};return(R===void 0?[]:R).forEach(function(p){var w=p[0],S=p[1];y[w]=Math.max(S+S*h,0)}),c({},e,{columnResizing:c({},e.columnResizing,{columnWidths:c({},e.columnResizing.columnWidths,{},y)})})}return t.type===u.columnDoneResizing?c({},e,{columnResizing:c({},e.columnResizing,{startX:null,isResizingColumn:null})}):void 0}tn.pluginName="useResizeColumns";var Mr=function(e){var t=e.flatHeaders,n=e.disableResizing,r=e.getHooks,i=e.state.columnResizing,o=m(e);t.forEach(function(a){var s=ne(a.disableResizing!==!0&&void 0,n!==!0&&void 0,!0);a.canResize=s,a.width=i.columnWidths[a.id]||a.originalWidth||a.width,a.isResizing=i.isResizingColumn===a.id,s&&(a.getResizerProps=D(r().getResizerProps,{instance:o(),header:a}))})};function jr(e){var t=e.plugins,n=e.dispatch,r=e.autoResetResize,i=r===void 0||r,o=e.columns;Z(t,["useAbsoluteLayout"],"useResizeColumns");var a=m(i);M(function(){a()&&n({type:u.resetResize})},[o]);var s=g.useCallback(function(){return n({type:u.resetResize})},[n]);Object.assign(e,{resetResizing:s})}var at={position:"absolute",top:0},nn=function(e){e.getTableBodyProps.push(Ke),e.getRowProps.push(Ke),e.getHeaderGroupProps.push(Ke),e.getFooterGroupProps.push(Ke),e.getHeaderProps.push(function(t,n){var r=n.column;return[t,{style:c({},at,{left:r.totalLeft+"px",width:r.totalWidth+"px"})}]}),e.getCellProps.push(function(t,n){var r=n.cell;return[t,{style:c({},at,{left:r.column.totalLeft+"px",width:r.column.totalWidth+"px"})}]}),e.getFooterProps.push(function(t,n){var r=n.column;return[t,{style:c({},at,{left:r.totalLeft+"px",width:r.totalWidth+"px"})}]})};nn.pluginName="useAbsoluteLayout";var Ke=function(e,t){return[e,{style:{position:"relative",width:t.instance.totalColumnsWidth+"px"}}]},ut={display:"inline-block",boxSizing:"border-box"},st=function(e,t){return[e,{style:{display:"flex",width:t.instance.totalColumnsWidth+"px"}}]},rn=function(e){e.getRowProps.push(st),e.getHeaderGroupProps.push(st),e.getFooterGroupProps.push(st),e.getHeaderProps.push(function(t,n){var r=n.column;return[t,{style:c({},ut,{width:r.totalWidth+"px"})}]}),e.getCellProps.push(function(t,n){var r=n.cell;return[t,{style:c({},ut,{width:r.column.totalWidth+"px"})}]}),e.getFooterProps.push(function(t,n){var r=n.column;return[t,{style:c({},ut,{width:r.totalWidth+"px"})}]})};function on(e){e.getTableProps.push(Lr),e.getRowProps.push(lt),e.getHeaderGroupProps.push(lt),e.getFooterGroupProps.push(lt),e.getHeaderProps.push(Dr),e.getCellProps.push(Vr),e.getFooterProps.push($r)}rn.pluginName="useBlockLayout",on.pluginName="useFlexLayout";var Lr=function(e,t){return[e,{style:{minWidth:t.instance.totalColumnsMinWidth+"px"}}]},lt=function(e,t){return[e,{style:{display:"flex",flex:"1 0 auto",minWidth:t.instance.totalColumnsMinWidth+"px"}}]},Dr=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]},Vr=function(e,t){var n=t.cell;return[e,{style:{boxSizing:"border-box",flex:n.column.totalFlexWidth+" 0 auto",minWidth:n.column.totalMinWidth+"px",width:n.column.totalWidth+"px"}}]},$r=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]};function an(e){e.stateReducers.push(Xr),e.getTableProps.push(Kr),e.getHeaderProps.push(Ur),e.getRowProps.push(qr)}u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize",an.pluginName="useGridLayout";var Kr=function(e,t){var n=t.instance;return[e,{style:{display:"grid",gridTemplateColumns:n.visibleColumns.map(function(r){var i;return n.state.gridLayout.columnWidths[r.id]?n.state.gridLayout.columnWidths[r.id]+"px":(i=n.state.columnResizing)!=null&&i.isResizingColumn?n.state.gridLayout.startWidths[r.id]+"px":typeof r.width=="number"?r.width+"px":r.width}).join(" ")}}]},Ur=function(e,t){var n=t.column;return[e,{id:"header-cell-"+n.id,style:{position:"sticky",gridColumn:"span "+n.totalVisibleHeaderCount}}]},qr=function(e,t){var n=t.row;return n.isExpanded?[e,{style:{gridColumn:"1 / "+(n.cells.length+1)}}]:[e,{}]};function Xr(e,t,n,r){if(t.type===u.init)return c({gridLayout:{columnWidths:{}}},e);if(t.type===u.resetResize)return c({},e,{gridLayout:{columnWidths:{}}});if(t.type===u.columnStartResizing){var i=t.columnId,o=t.headerIdWidths,a=ct(i);if(a!==void 0){var s=r.visibleColumns.reduce(function(C,N){var x;return c({},C,((x={})[N.id]=ct(N.id),x))},{}),l=r.visibleColumns.reduce(function(C,N){var x;return c({},C,((x={})[N.id]=N.minWidth,x))},{}),d=r.visibleColumns.reduce(function(C,N){var x;return c({},C,((x={})[N.id]=N.maxWidth,x))},{}),R=o.map(function(C){var N=C[0];return[N,ct(N)]});return c({},e,{gridLayout:c({},e.gridLayout,{startWidths:s,minWidths:l,maxWidths:d,headerIdGridWidths:R,columnWidth:a})})}return e}if(t.type===u.columnResizing){var h=t.clientX,y=e.columnResizing.startX,p=e.gridLayout,w=p.columnWidth,S=p.minWidths,P=p.maxWidths,E=p.headerIdGridWidths,W=(h-y)/w,B={};return(E===void 0?[]:E).forEach(function(C){var N=C[0],x=C[1];B[N]=Math.min(Math.max(S[N],x+x*W),P[N])}),c({},e,{gridLayout:c({},e.gridLayout,{columnWidths:c({},e.gridLayout.columnWidths,{},B)})})}return t.type===u.columnDoneResizing?c({},e,{gridLayout:c({},e.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function ct(e){var t,n=(t=document.getElementById("header-cell-"+e))==null?void 0:t.offsetWidth;if(n!==void 0)return n}f._UNSTABLE_usePivotColumns=qt,f.actions=u,f.defaultColumn=le,f.defaultGroupByFn=Lt,f.defaultOrderByFn=Kt,f.defaultRenderer=X,f.emptyRenderer=ee,f.ensurePluginOrder=Z,f.flexRender=ae,f.functionalUpdate=ie,f.loopHooks=ce,f.makePropGetter=D,f.makeRenderer=K,f.reduceHooks=J,f.safeUseLayoutEffect=G,f.useAbsoluteLayout=nn,f.useAsyncDebounce=function(e,t){t===void 0&&(t=0);var n=g.useRef({}),r=m(e),i=m(t);return g.useCallback(function(){var o=_(regeneratorRuntime.mark(function a(){var s,l,d,R=arguments;return regeneratorRuntime.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:for(s=R.length,l=new Array(s),d=0;d1?t-1:0),r=1;rb.accessor!=="process");function Zo(b){switch(b.column.id){case"start":return ho(b.value,0);case"download":case"upload":return pn(b.value);case"downloadSpeedCurr":case"uploadSpeedCurr":return pn(b.value)+"/s";default:return b.value}}const ei={id:"id",desc:!0},ti={sortBy:[ei],hiddenColumns:["id"]};function ni({data:b}){const v=be.useContext(Cn),{getTableProps:f,headerGroups:g,rows:O,prepareRow:_}=mt.exports.useTable({columns:v.hasProcessPath?Jo:Yo,data:b,initialState:ti,autoResetSortBy:!1},mt.exports.useSortBy);return q("div",{...f(),style:{"--col-count":v.hasProcessPath?"12":"11"},children:g.map(c=>ye("div",{...c.getHeaderGroupProps(),className:xe.tr,children:[c.headers.map(U=>ye("div",{...U.getHeaderProps(U.getSortByToggleProps()),className:xe.th,children:[q("span",{children:U.render("Header")}),q("span",{className:xe.sortIconContainer,children:U.isSorted?q("span",{className:U.isSortedDesc?"":xe.rotate180,children:q(mo,{size:16})}):null})]})),O.map((U,de)=>(_(U),U.cells.map((u,X)=>q("div",{...u.getCellProps(),className:Ae(xe.td,de%2===0?xe.odd:!1,v.hasProcessPath?X>=2&&X<=5?xe.du:!1:X>=1&&X<=4?xe.du:!1),children:Zo(u)}))))]}))})}const ri="_overlay_148w6_1",oi="_cnt_148w6_5",ii="_afterOpen_148w6_15",ai="_btngrp_148w6_20",Ye={overlay:ri,cnt:oi,afterOpen:ii,btngrp:ai},{useRef:ui,useCallback:si,useMemo:li}=be;function ci({isOpen:b,onRequestClose:v,primaryButtonOnTap:f}){const g=ui(null),O=si(()=>{g.current.focus()},[]),_=li(()=>({base:Ae(gn.content,Ye.cnt),afterOpen:Ye.afterOpen,beforeClose:""}),[]);return ye(oo,{isOpen:b,onRequestClose:v,onAfterOpen:O,className:_,overlayClassName:Ae(gn.overlay,Ye.overlay),children:[q("p",{children:"Are you sure you want to close all connections?"}),ye("div",{className:Ye.btngrp,children:[q(vn,{onClick:f,ref:g,children:"I'm sure"}),q("div",{style:{width:20}}),q(vn,{onClick:v,children:"No"})]})]})}const{useEffect:di,useState:Me,useRef:fi,useCallback:je}=be,yn=30;function pi(b){const v={};for(let f=0;f[f.host,f.sourceIP,f.sourcePort,f.destinationIP,f.chains,f.rule,f.type,f.network,f.processPath].some(g=>vi(g,v))):b}function mi(b,v,f,g){const{id:O,metadata:_,upload:c,download:U,start:de,chains:u,rule:X,rulePayload:ee}=b,{host:le,destinationPort:fe,destinationIP:D,network:J,type:ce,sourceIP:Z,sourcePort:ie}=_,m=_.processPath;g.hasProcessPath===!1&&typeof m<"u"&&(g.hasProcessPath=!0);let G=le;G===""&&(G=D);const M=v[O];return{id:O,upload:c,download:U,start:f-new Date(de).valueOf(),chains:u.reverse().join(" / "),rule:ee?`${X}(${ee})`:X,..._,host:`${G}:${fe}`,type:`${ce}(${J})`,source:`${Z}:${ie}`,downloadSpeedCurr:U-(M?M.download:0),uploadSpeedCurr:c-(M?M.upload:0),process:gi(m)}}function bn(b){return b.length>0?q(ni,{data:b}):q("div",{className:Le.placeHolder,children:q(go,{width:200,height:200,c1:"var(--color-text)"})})}function Rn({qty:b}){return b<100?""+b:"99+"}function hi({apiConfig:b}){const[v,f]=vo(),[g,O]=Me([]),[_,c]=Me([]),[U,de]=Me(""),u=wn(g,U),X=wn(_,U),[ee,le]=Me(!1),fe=je(()=>le(!0),[]),D=je(()=>le(!1),[]),[J,ce]=Me(!1),Z=je(()=>{ce(ae=>!ae)},[]),ie=je(()=>{ao(b),D()},[b,D]),m=fi(g),G=be.useContext(Cn),M=je(({connections:ae})=>{const ve=pi(m.current),Be=Date.now(),me=ae.map(we=>mi(we,ve,Be,G)),Ce=[];for(const we of m.current)me.findIndex(ne=>ne.id===we.id)<0&&Ce.push(we);c(we=>[...Ce,...we].slice(0,101)),me&&(me.length!==0||m.current.length!==0)&&!J?(m.current=me,O(me)):m.current=me},[O,J]);di(()=>uo(b,M),[b,M]);const{t:K}=so();return ye("div",{children:[q(lo,{title:K("Connections")}),ye(nt,{children:[ye("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"space-between"},children:[ye(rt,{children:[ye(De,{children:[q("span",{children:K("Active")}),q("span",{className:Le.connQty,children:Rn({qty:u.length})})]}),ye(De,{children:[q("span",{children:K("Closed")}),q("span",{className:Le.connQty,children:Rn({qty:X.length})})]})]}),q("div",{className:Le.inputWrapper,children:q("input",{type:"text",name:"filter",autoComplete:"off",className:Le.input,placeholder:"Filter",onChange:ae=>de(ae.target.value)})})]}),q("div",{ref:v,style:{padding:30,paddingBottom:yn,paddingTop:0},children:ye("div",{style:{height:f-yn,overflow:"auto"},children:[ye(Ve,{children:[q(co,{children:bn(u)}),q(yo,{icon:J?q(Ro,{size:16}):q(Co,{size:16}),mainButtonStyles:J?{background:"#e74c3c"}:{},style:wo,text:K(J?"Resume Refresh":"Pause Refresh"),onClick:Z,children:q(bo,{text:"Close All Connections",onClick:fe,children:q(fo,{size:10})})})]}),q(Ve,{children:bn(X)})]})}),q(ci,{isOpen:ee,primaryButtonOnTap:ie,onRequestClose:D})]})]})}const yi=b=>({apiConfig:po(b)}),xi=io(yi)(hi);export{xi as default};