asma-ui-table 1.0.118 → 1.0.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asma-ui-table.es.js +3 -3
- package/package.json +1 -1
package/dist/asma-ui-table.es.js
CHANGED
|
@@ -16,7 +16,7 @@ var e=Object.defineProperty,t=(t,n,o)=>(((t,n,o)=>{n in t?e(t,n,{enumerable:!0,c
|
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the MIT license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/"production"===process.env.NODE_ENV?j.exports=function(){if(P)return A;P=1;var e=o,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,o){var a,s={},u=null,c=null;for(a in void 0!==o&&(u=""+o),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,a)&&!l.hasOwnProperty(a)&&(s[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===s[a]&&(s[a]=n[a]);return{$$typeof:t,type:e,key:u,ref:c,props:s,_owner:i.current}}return A.Fragment=n,A.jsx=a,A.jsxs=a,A}():j.exports=(T||(T=1,"production"!==process.env.NODE_ENV&&function(){var e=o,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator",b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];!function(e,t,n){var o=b.ReactDebugCurrentFrame,r=o.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var i=n.map((function(e){return String(e)}));i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}("error",e,n)}var w,y=!1,x=!1,C=!1,S=!1,R=!1;function E(e){return e.displayName||"Context"}function _(e){if(null==e)return null;if("number"==typeof e.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case r:return"Fragment";case n:return"Portal";case l:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case s:return E(e)+".Consumer";case a:return E(e._context)+".Provider";case u:return function(e,t,n){var o=e.displayName;if(o)return o;var r=t.displayName||t.name||"";return""!==r?n+"("+r+")":n}(e,e.render,"ForwardRef");case g:var t=e.displayName||null;return null!==t?t:_(e.type)||"Memo";case p:var o=e,f=o._payload,h=o._init;try{return _(h(f))}catch{return null}}return null}w=Symbol.for("react.module.reference");var k,I,D,O,N,M,F,P=Object.assign,j=0;function A(){}A.__reactDisabledLog=!0;var T,L=b.ReactCurrentDispatcher;function z(e,t,n){if(void 0===T)try{throw Error()}catch(e){var o=e.stack.trim().match(/\n( *(at )?)/);T=o&&o[1]||""}return"\n"+T+e}var H,$=!1,B="function"==typeof WeakMap?WeakMap:Map;function G(e,t){if(!e||$)return"";var n,o=H.get(e);if(void 0!==o)return o;$=!0;var r,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,r=L.current,L.current=null,function(){if(0===j){k=console.log,I=console.info,D=console.warn,O=console.error,N=console.group,M=console.groupCollapsed,F=console.groupEnd;var e={configurable:!0,enumerable:!0,value:A,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}j++}();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(l,[])}catch(e){n=e}Reflect.construct(e,[],l)}else{try{l.call()}catch(e){n=e}e.call(l.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),s=n.stack.split("\n"),u=a.length-1,c=s.length-1;u>=1&&c>=0&&a[u]!==s[c];)c--;for(;u>=1&&c>=0;u--,c--)if(a[u]!==s[c]){if(1!==u||1!==c)do{if(u--,--c<0||a[u]!==s[c]){var d="\n"+a[u].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&H.set(e,d),d}}while(u>=1&&c>=0);break}}}finally{$=!1,L.current=r,function(){if(0==--j){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},e,{value:k}),info:P({},e,{value:I}),warn:P({},e,{value:D}),error:P({},e,{value:O}),group:P({},e,{value:N}),groupCollapsed:P({},e,{value:M}),groupEnd:P({},e,{value:F})})}j<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var g=e?e.displayName||e.name:"",p=g?z(g):"";return"function"==typeof e&&H.set(e,p),p}function q(e,t,n){if(null==e)return"";if("function"==typeof e)return G(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return z(e);switch(e){case c:return z("Suspense");case d:return z("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case u:return function(e,t,n){return G(e,!1)}(e.render);case g:return q(e.type,t,n);case p:var o=e,r=o._payload,i=o._init;try{return q(i(r),t,n)}catch{}}return""}H=new B;var U=Object.prototype.hasOwnProperty,W={},K=b.ReactDebugCurrentFrame;function X(e){if(e){var t=e._owner,n=q(e.type,e._source,t?t.type:null);K.setExtraStackFrame(n)}else K.setExtraStackFrame(null)}var Y=Array.isArray;function J(e){return Y(e)}function Z(e){return""+e}function Q(e){if(function(e){try{return Z(e),!1}catch{return!0}}(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),Z(e)}var ee,te,ne,oe=b.ReactCurrentOwner,re={key:!0,ref:!0,__self:!0,__source:!0};ne={};var ie=function(e,n,o,r,i,l,a){var s={$$typeof:t,type:e,key:n,ref:o,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:r}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function le(e,t,n,o,r){var i,l={},a=null,s=null;for(i in void 0!==n&&(Q(n),a=""+n),function(e){if(U.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(Q(t.key),a=""+t.key),function(e){if(U.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(s=t.ref,function(e,t){if("string"==typeof e.ref&&oe.current&&t&&oe.current.stateNode!==t){var n=_(oe.current.type);ne[n]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',_(oe.current.type),e.ref),ne[n]=!0)}}(t,r)),t)U.call(t,i)&&!re.hasOwnProperty(i)&&(l[i]=t[i]);if(e&&e.defaultProps){var u=e.defaultProps;for(i in u)void 0===l[i]&&(l[i]=u[i])}if(a||s){var c="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var n=function(){ee||(ee=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(l,c),s&&function(e,t){var n=function(){te||(te=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(l,c)}return ie(e,a,s,r,o,oe.current,l)}var ae,se=b.ReactCurrentOwner,ue=b.ReactDebugCurrentFrame;function ce(e){if(e){var t=e._owner,n=q(e.type,e._source,t?t.type:null);ue.setExtraStackFrame(n)}else ue.setExtraStackFrame(null)}function de(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function ge(){if(se.current){var e=_(se.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ae=!1;var pe={};function fe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=ge();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!pe[n]){pe[n]=!0;var o="";e&&e._owner&&e._owner!==se.current&&(o=" It was passed a child from "+_(e._owner.type)+"."),ce(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),ce(null)}}}function he(e,t){if("object"==typeof e)if(J(e))for(var n=0;n<e.length;n++){var o=e[n];de(o)&&fe(o,t)}else if(de(e))e._store&&(e._store.validated=!0);else if(e){var r=function(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||e[m];return"function"==typeof t?t:null}(e);if("function"==typeof r&&r!==e.entries)for(var i,l=r.call(e);!(i=l.next()).done;)de(i.value)&&fe(i.value,t)}}function me(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==u&&n.$$typeof!==g)return;t=n.propTypes}if(t){var o=_(n);!function(e,t,n,o,r){var i=Function.call.bind(U);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var s=Error((o||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}a=e[l](t,l,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}a&&!(a instanceof Error)&&(X(r),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",n,l,typeof a),X(null)),a instanceof Error&&!(a.message in W)&&(W[a.message]=!0,X(r),v("Failed %s type: %s",n,a.message),X(null))}}(t,e.props,"prop",o,e)}else void 0===n.PropTypes||ae||(ae=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_(n)||"Unknown"));"function"==typeof n.getDefaultProps&&!n.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function be(e,n,o,h,m,b){var E=function(e){return!!("string"==typeof e||"function"==typeof e||e===r||e===l||R||e===i||e===c||e===d||S||e===f||y||x||C||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===g||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===w||void 0!==e.getModuleId))}(e);if(!E){var k="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(k+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var I,D=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(m);k+=D||ge(),null===e?I="null":J(e)?I="array":void 0!==e&&e.$$typeof===t?(I="<"+(_(e.type)||"Unknown")+" />",k=" Did you accidentally export a JSX literal instead of a component?"):I=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",I,k)}var O=le(e,n,o,m,b);if(null==O)return O;if(E){var N=n.children;if(void 0!==N)if(h)if(J(N)){for(var M=0;M<N.length;M++)he(N[M],e);Object.freeze&&Object.freeze(N)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else he(N,e)}return e===r?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var o=t[n];if("children"!==o&&"key"!==o){ce(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),ce(null);break}}null!==e.ref&&(ce(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),ce(null))}(O):me(O),O}var ve=function(e,t,n){return be(e,t,n,!1)},we=function(e,t,n){return be(e,t,n,!0)};V.Fragment=r,V.jsx=ve,V.jsxs=we}()),V);var L=j.exports;const z=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function H(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function $(e){return"nodeType"in e}function B(e){var t,n;return e?H(e)?e:$(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function G(e){const{Document:t}=B(e);return e instanceof t}function q(e){return!H(e)&&e instanceof B(e).HTMLElement}function U(e){return e instanceof B(e).SVGElement}function W(e){return e?H(e)?e.document:$(e)?G(e)?e:q(e)||U(e)?e.ownerDocument:document:document:document}const K=z?i:l;function X(e){const t=a(e);return K((()=>{t.current=e})),s((function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)}),[])}function Y(e,t){void 0===t&&(t=[e]);const n=a(e);return K((()=>{n.current!==e&&(n.current=e)}),t),n}function J(e,t){const n=a();return r((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function Z(e){const t=X(e),n=a(null),o=s((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function Q(e){const t=a();return l((()=>{t.current=e}),[e]),t.current}let ee={};function te(e,t){return r((()=>{if(t)return t;const n=null==ee[e]?0:ee[e]+1;return ee[e]=n,e+"-"+n}),[e,t])}function ne(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>{const o=Object.entries(n);for(const[n,r]of o){const o=t[n];null!=o&&(t[n]=o+e*r)}return t}),{...t})}}const oe=ne(1),re=ne(-1);function ie(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function le(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const ae=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[ae.Translate.toString(e),ae.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),se="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ue(e){return e.matches(se)?e:e.querySelector(se)}const ce={display:"none"};function de(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:ce},n)}function ge(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return o.createElement("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const pe=c(null);const fe={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},he={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function me(e){let{announcements:t=he,container:n,hiddenTextDescribedById:i,screenReaderInstructions:a=fe}=e;const{announce:c,announcement:d}=function(){const[e,t]=u("");return{announce:s((e=>{null!=e&&t(e)}),[]),announcement:e}}(),g=te("DndLiveRegion"),[f,h]=u(!1);if(l((()=>{h(!0)}),[]),function(e){const t=p(pe);l((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}(r((()=>({onDragStart(e){let{active:n}=e;c(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:o}=e;t.onDragMove&&c(t.onDragMove({active:n,over:o}))},onDragOver(e){let{active:n,over:o}=e;c(t.onDragOver({active:n,over:o}))},onDragEnd(e){let{active:n,over:o}=e;c(t.onDragEnd({active:n,over:o}))},onDragCancel(e){let{active:n,over:o}=e;c(t.onDragCancel({active:n,over:o}))}})),[c,t])),!f)return null;const m=o.createElement(o.Fragment,null,o.createElement(de,{id:i,value:a.draggable}),o.createElement(ge,{id:g,announcement:d}));return n?w(m,n):m}var be,ve;function we(){}(ve=be||(be={})).DragStart="dragStart",ve.DragMove="dragMove",ve.DragEnd="dragEnd",ve.DragCancel="dragCancel",ve.DragOver="dragOver",ve.RegisterDroppable="registerDroppable",ve.SetDroppableDisabled="setDroppableDisabled",ve.UnregisterDroppable="unregisterDroppable";const ye=Object.freeze({x:0,y:0});function xe(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ce(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function Se(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function Re(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Ee=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=Re(t,t.left,t.top),i=[];for(const e of o){const{id:t}=e,o=n.get(t);if(o){const n=xe(Re(o),r);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(Ce)};function _e(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),l=r-o,a=i-n;if(o<r&&n<i){const n=t.width*t.height,o=e.width*e.height,r=l*a;return Number((r/(n+o-r)).toFixed(4))}return 0}const ke=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const e of o){const{id:o}=e,i=n.get(o);if(i){const n=_e(i,t);n>0&&r.push({id:o,data:{droppableContainer:e,value:n}})}}return r.sort(Se)};function Ie(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ye}function De(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const Oe=De(1);const Ne={ignoreTransform:!1};function Me(e,t){void 0===t&&(t=Ne);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:o}=B(e).getComputedStyle(e);t&&(n=function(e,t,n){const o=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!o)return e;const{scaleX:r,scaleY:i,x:l,y:a}=o,s=e.left-l-(1-r)*parseFloat(n),u=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,d=i?e.height/i:e.height;return{width:c,height:d,top:u,right:s+c,bottom:u+d,left:s}}(n,t,o))}const{top:o,left:r,width:i,height:l,bottom:a,right:s}=n;return{top:o,left:r,width:i,height:l,bottom:a,right:s}}function Fe(e){return Me(e,{ignoreTransform:!0})}function Pe(e,t){const n=[];return e?function o(r){if(null!=t&&n.length>=t||!r)return n;if(G(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!q(r)||U(r)||n.includes(r))return n;const i=B(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=B(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const o=t[e];return"string"==typeof o&&n.test(o)}))}(r,i)&&n.push(r),function(e,t){return void 0===t&&(t=B(e).getComputedStyle(e)),"fixed"===t.position}(r,i)?n:o(r.parentNode)}(e):n}function je(e){const[t]=Pe(e,1);return t??null}function Ae(e){return z&&e?H(e)?e:$(e)?G(e)||e===W(e).scrollingElement?window:q(e)?e:null:null:null}function Te(e){return H(e)?e.scrollX:e.scrollLeft}function Ve(e){return H(e)?e.scrollY:e.scrollTop}function Le(e){return{x:Te(e),y:Ve(e)}}var ze;function He(e){return!(!z||!e)&&e===document.scrollingElement}function $e(e){const t={x:0,y:0},n=He(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=o.y,isRight:e.scrollLeft>=o.x,maxScroll:o,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(ze||(ze={}));const Be={x:.2,y:.2};function Ge(e,t,n,o,r){let{top:i,left:l,right:a,bottom:s}=n;void 0===o&&(o=10),void 0===r&&(r=Be);const{isTop:u,isBottom:c,isLeft:d,isRight:g}=$e(e),p={x:0,y:0},f={x:0,y:0},h=t.height*r.y,m=t.width*r.x;return!u&&i<=t.top+h?(p.y=ze.Backward,f.y=o*Math.abs((t.top+h-i)/h)):!c&&s>=t.bottom-h&&(p.y=ze.Forward,f.y=o*Math.abs((t.bottom-h-s)/h)),!g&&a>=t.right-m?(p.x=ze.Forward,f.x=o*Math.abs((t.right-m-a)/m)):!d&&l<=t.left+m&&(p.x=ze.Backward,f.x=o*Math.abs((t.left+m-l)/m)),{direction:p,speed:f}}function qe(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function Ue(e){return e.reduce(((e,t)=>oe(e,Le(t))),ye)}const We=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Te(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+Ve(t)),0)}]];class Ke{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Pe(t),o=Ue(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of We)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=r(n),l=o[e]-t;return this.rect[i]+l},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Xe{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var o;null==(o=this.target)||o.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Ye(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t&&o>t.y}var Je,Ze;function Qe(e){e.preventDefault()}function et(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Je||(Je={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(Ze||(Ze={}));const tt={start:[Ze.Space,Ze.Enter],cancel:[Ze.Esc],end:[Ze.Space,Ze.Enter]},nt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ze.Right:return{...n,x:n.x+25};case Ze.Left:return{...n,x:n.x-25};case Ze.Down:return{...n,y:n.y+25};case Ze.Up:return{...n,y:n.y-25}}};class ot{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Xe(W(t)),this.windowListeners=new Xe(B(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Je.Resize,this.handleCancel),this.windowListeners.add(Je.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(Je.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Me),!e)return;const{top:n,left:o,bottom:r,right:i}=t(e);je(e)&&(r<=0||i<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(ye)}handleKeyDown(e){if(ie(e)){const{active:t,context:n,options:o}=this.props,{keyboardCodes:r=tt,coordinateGetter:i=nt,scrollBehavior:l="smooth"}=o,{code:a}=e;if(r.end.includes(a))return void this.handleEnd(e);if(r.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:s}=n.current,u=s?{x:s.left,y:s.top}:ye;this.referenceCoordinates||(this.referenceCoordinates=u);const c=i(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=re(c,u),o={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:i,isRight:a,isLeft:s,isBottom:u,maxScroll:d,minScroll:g}=$e(n),p=qe(n),f={x:Math.min(r===Ze.Right?p.right-p.width/2:p.right,Math.max(r===Ze.Right?p.left:p.left+p.width/2,c.x)),y:Math.min(r===Ze.Down?p.bottom-p.height/2:p.bottom,Math.max(r===Ze.Down?p.top:p.top+p.height/2,c.y))},h=r===Ze.Right&&!a||r===Ze.Left&&!s,m=r===Ze.Down&&!u||r===Ze.Up&&!i;if(h&&f.x!==c.x){const e=n.scrollLeft+t.x,i=r===Ze.Right&&e<=d.x||r===Ze.Left&&e>=g.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});o.x=i?n.scrollLeft-e:r===Ze.Right?n.scrollLeft-d.x:n.scrollLeft-g.x,o.x&&n.scrollBy({left:-o.x,behavior:l});break}if(m&&f.y!==c.y){const e=n.scrollTop+t.y,i=r===Ze.Down&&e<=d.y||r===Ze.Up&&e>=g.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});o.y=i?n.scrollTop-e:r===Ze.Down?n.scrollTop-d.y:n.scrollTop-g.y,o.y&&n.scrollBy({top:-o.y,behavior:l});break}}this.handleMove(e,oe(re(c,this.referenceCoordinates),o))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function rt(e){return!(!e||!("distance"in e))}function it(e){return!(!e||!("delay"in e))}ot.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=tt,onActivation:r}=t,{active:i}=n;const{code:l}=e.nativeEvent;if(o.start.includes(l)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class lt{constructor(e,t,n){var o;void 0===n&&(n=function(e){const{EventTarget:t}=B(e);return e instanceof t?e:W(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=W(i),this.documentListeners=new Xe(this.document),this.listeners=new Xe(n),this.windowListeners=new Xe(B(i)),this.initialCoordinates=null!=(o=le(r))?o:ye,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(Je.Resize,this.handleCancel),this.windowListeners.add(Je.DragStart,Qe),this.windowListeners.add(Je.VisibilityChange,this.handleCancel),this.windowListeners.add(Je.ContextMenu,Qe),this.documentListeners.add(Je.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(it(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(rt(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Je.Click,et,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Je.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:o,props:r}=this,{onMove:i,options:{activationConstraint:l}}=r;if(!o)return;const a=null!=(t=le(e))?t:ye,s=re(o,a);if(!n&&l){if(rt(l)){if(null!=l.tolerance&&Ye(s,l.tolerance))return this.handleCancel();if(Ye(s,l.distance))return this.handleStart()}return it(l)&&Ye(s,l.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(a)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===Ze.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const at={move:{name:"pointermove"},end:{name:"pointerup"}};class st extends lt{constructor(e){const{event:t}=e,n=W(t.target);super(e,at,n)}}st.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!(!n.isPrimary||0!==n.button)&&(null==o||o({event:n}),!0)}}];const ut={move:{name:"mousemove"},end:{name:"mouseup"}};var ct;!function(e){e[e.RightClick=2]="RightClick"}(ct||(ct={}));class dt extends lt{constructor(e){super(e,ut,W(e.event.target))}}dt.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button!==ct.RightClick&&(null==o||o({event:n}),!0)}}];const gt={move:{name:"touchmove"},end:{name:"touchend"}};var pt,ft;function ht(e){let{acceleration:t,activator:n=pt.Pointer,canScroll:o,draggingRect:i,enabled:u,interval:c=5,order:d=ft.TreeOrder,pointerCoordinates:g,scrollableAncestors:p,scrollableAncestorRects:f,delta:h,threshold:m}=e;const b=function(e){let{delta:t,disabled:n}=e;const o=Q(t);return J((e=>{if(n||!o||!e)return mt;const r={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[ze.Backward]:e.x[ze.Backward]||-1===r.x,[ze.Forward]:e.x[ze.Forward]||1===r.x},y:{[ze.Backward]:e.y[ze.Backward]||-1===r.y,[ze.Forward]:e.y[ze.Forward]||1===r.y}}}),[n,t,o])}({delta:h,disabled:!u}),[v,w]=function(){const e=a(null);return[s(((t,n)=>{e.current=setInterval(t,n)}),[]),s((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),y=a({x:0,y:0}),x=a({x:0,y:0}),C=r((()=>{switch(n){case pt.Pointer:return g?{top:g.y,bottom:g.y,left:g.x,right:g.x}:null;case pt.DraggableRect:return i}}),[n,i,g]),S=a(null),R=s((()=>{const e=S.current;if(!e)return;const t=y.current.x*x.current.x,n=y.current.y*x.current.y;e.scrollBy(t,n)}),[]),E=r((()=>d===ft.TreeOrder?[...p].reverse():p),[d,p]);l((()=>{if(u&&p.length&&C){for(const e of E){if(!1===(null==o?void 0:o(e)))continue;const n=p.indexOf(e),r=f[n];if(!r)continue;const{direction:i,speed:l}=Ge(e,r,C,t,m);for(const e of["x","y"])b[e][i[e]]||(l[e]=0,i[e]=0);if(l.x>0||l.y>0)return w(),S.current=e,v(R,c),y.current=l,void(x.current=i)}y.current={x:0,y:0},x.current={x:0,y:0},w()}else w()}),[t,R,o,w,u,c,JSON.stringify(C),JSON.stringify(b),v,p,E,f,JSON.stringify(m)])}(class extends lt{constructor(e){super(e,gt)}static setup(){return window.addEventListener(gt.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(gt.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:r}=n;return!(r.length>1)&&(null==o||o({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(pt||(pt={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(ft||(ft={}));const mt={x:{[ze.Backward]:!1,[ze.Forward]:!1},y:{[ze.Backward]:!1,[ze.Forward]:!1}};var bt,vt;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(bt||(bt={})),(vt||(vt={})).Optimized="optimized";const wt=new Map;function yt(e,t){return J((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function xt(e){let{callback:t,disabled:n}=e;const o=X(t),i=r((()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:e}=window;return new e(o)}),[n]);return l((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function Ct(e){return new Ke(Me(e),e)}function St(e,t,n){void 0===t&&(t=Ct);const[o,i]=g((function(o){if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=o??n)?r:null;const i=t(e);return JSON.stringify(o)===JSON.stringify(i)?o:i}),null),a=function(e){let{callback:t,disabled:n}=e;const o=X(t),i=r((()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:e}=window;return new e(o)}),[o,n]);return l((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:o}=n;if("childList"===t&&o instanceof HTMLElement&&o.contains(e)){i();break}}}}),s=xt({callback:i});return K((()=>{i(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())}),[e]),o}const Rt=[];function Et(e,t){void 0===t&&(t=[]);const n=a(null);return l((()=>{n.current=null}),t),l((()=>{const t=e!==ye;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?re(e,n.current):ye}function _t(e){return r((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const kt=[];function It(e){let{measure:t}=e;const[n,o]=u(null),i=xt({callback:s((e=>{for(const{target:n}of e)if(q(n)){o((e=>{const o=t(n);return e?{...e,width:o.width,height:o.height}:o}));break}}),[t])}),l=s((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return q(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),o(n?t(n):null)}),[t,i]),[a,c]=Z(l);return r((()=>({nodeRef:a,rect:n,setRef:c})),[n,a,c])}const Dt=[{sensor:st,options:{}},{sensor:ot,options:{}}],Ot={current:{}},Nt={draggable:{measure:Fe},droppable:{measure:Fe,strategy:bt.WhileDragging,frequency:vt.Optimized},dragOverlay:{measure:Me}};class Mt extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ft={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Mt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:we},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Nt,measureDroppableContainers:we,windowRect:null,measuringScheduled:!1},Pt=c({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:we,draggableNodes:new Map,over:null,measureDroppableContainers:we}),jt=c(Ft);function At(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Mt}}}function Tt(e,t){switch(t.type){case be.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case be.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case be.DragEnd:case be.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case be.RegisterDroppable:{const{element:n}=t,{id:o}=n,r=new Mt(e.droppable.containers);return r.set(o,n),{...e,droppable:{...e.droppable,containers:r}}}case be.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const l=new Mt(e.droppable.containers);return l.set(n,{...i,disabled:r}),{...e,droppable:{...e.droppable,containers:l}}}case be.UnregisterDroppable:{const{id:n,key:o}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const i=new Mt(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Vt(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:r}=p(Pt),i=Q(o),a=Q(null==n?void 0:n.id);return l((()=>{if(!t&&!o&&i&&null!=a){if(!ie(i)||document.activeElement===i.target)return;const e=r.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=ue(e);if(t){t.focus();break}}}))}}),[o,t,r,a,i]),null}const Lt=c({...ye,scaleX:1,scaleY:1});var zt;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(zt||(zt={}));const Ht=d((function(e){var t,n,i,c;let{id:d,accessibility:p,autoScroll:f=!0,children:h,sensors:m=Dt,collisionDetection:b=ke,measuring:w,modifiers:y,...x}=e;const C=g(Tt,void 0,At),[S,R]=C,[E,_]=function(){const[e]=u((()=>new Set)),t=s((t=>(e.add(t),()=>e.delete(t))),[e]);return[s((t=>{let{type:n,event:o}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,o)}))}),[e]),t]}(),[k,I]=u(zt.Uninitialized),D=k===zt.Initialized,{draggable:{active:O,nodes:N,translate:M},droppable:{containers:F}}=S,P=O?N.get(O):null,j=a({initial:null,translated:null}),A=r((()=>{var e;return null!=O?{id:O,data:null!=(e=null==P?void 0:P.data)?e:Ot,rect:j}:null}),[O,P]),T=a(null),[V,L]=u(null),[H,$]=u(null),G=Y(x,Object.values(x)),q=te("DndDescribedBy",d),U=r((()=>F.getEnabled()),[F]),W=function(e){return r((()=>({draggable:{...Nt.draggable,...null==e?void 0:e.draggable},droppable:{...Nt.droppable,...null==e?void 0:e.droppable},dragOverlay:{...Nt.dragOverlay,...null==e?void 0:e.dragOverlay}})),[null==e?void 0:e.draggable,null==e?void 0:e.droppable,null==e?void 0:e.dragOverlay])}(w),{droppableRects:X,measureDroppableContainers:Z,measuringScheduled:Q}=function(e,t){let{dragging:n,dependencies:o,config:r}=t;const[i,c]=u(null),{frequency:d,measure:g,strategy:p}=r,f=a(e),h=function(){switch(p){case bt.Always:return!1;case bt.BeforeDragging:return n;default:return!n}}(),m=Y(h),b=s((function(e){void 0===e&&(e=[]),!m.current&&c((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[m]),v=a(null),w=J((t=>{if(h&&!n)return wt;if(!t||t===wt||f.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new Ke(g(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,i,n,h,g]);return l((()=>{f.current=e}),[e]),l((()=>{h||b()}),[n,h]),l((()=>{i&&i.length>0&&c(null)}),[JSON.stringify(i)]),l((()=>{h||"number"!=typeof d||null!==v.current||(v.current=setTimeout((()=>{b(),v.current=null}),d))}),[d,h,b,...o]),{droppableRects:w,measureDroppableContainers:b,measuringScheduled:null!=i}}(U,{dragging:D,dependencies:[M.x,M.y],config:W.droppable}),ee=function(e,t){const n=null!==t?e.get(t):void 0,o=n?n.node.current:null;return J((e=>{var n;return null===t?null:null!=(n=o??e)?n:null}),[o,t])}(N,O),ne=r((()=>H?le(H):null),[H]),re=function(){const e=!1===(null==V?void 0:V.autoScrollEnabled),t="object"==typeof f?!1===f.enabled:!1===f,n=D&&!e&&!t;return"object"==typeof f?{...f,enabled:n}:{enabled:n}}(),ie=function(e,t){return yt(e,t)}(ee,W.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:r=!0}=e;const i=a(!1),{x:l,y:s}="boolean"==typeof r?{x:r,y:r}:r;K((()=>{if(!l&&!s||!t)return void(i.current=!1);if(i.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=Ie(n(e),o);if(l||(r.x=0),s||(r.y=0),i.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=je(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,l,s,o,n])}({activeNode:O?N.get(O):null,config:re.layoutShiftCompensation,initialRect:ie,measure:W.draggable.measure});const ae=St(ee,W.draggable.measure,ie),se=St(ee?ee.parentElement:null),ue=a({activatorEvent:null,active:null,activeNode:ee,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ce=F.getNodeFor(null==(t=ue.current.over)?void 0:t.id),de=It({measure:W.dragOverlay.measure}),ge=null!=(n=de.nodeRef.current)?n:ee,fe=D?null!=(i=de.rect)?i:ae:null,he=!(!de.nodeRef.current||!de.rect),ve=function(e){return Ie(e,yt(e))}(he?null:ae),we=_t(ge?B(ge):null),xe=function(e){const t=a(e),n=J((n=>e?n&&n!==Rt&&e&&t.current&&e.parentNode===t.current.parentNode?n:Pe(e):Rt),[e]);return l((()=>{t.current=e}),[e]),n}(D?ce??ee:null),Ce=function(e,t){void 0===t&&(t=Me);const[n]=e,o=_t(n?B(n):null),[r,i]=g((function(){return e.length?e.map((e=>He(e)?o:new Ke(t(e),e))):kt}),kt),l=xt({callback:i});return e.length>0&&r===kt&&i(),K((()=>{e.length?e.forEach((e=>null==l?void 0:l.observe(e))):(null==l||l.disconnect(),i())}),[e]),r}(xe),Se=function(e,t){let{transform:n,...o}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...o})),n):n}(y,{transform:{x:M.x-ve.x,y:M.y-ve.y,scaleX:1,scaleY:1},activatorEvent:H,active:A,activeNodeRect:ae,containerNodeRect:se,draggingNodeRect:fe,over:ue.current.over,overlayNodeRect:de.rect,scrollableAncestors:xe,scrollableAncestorRects:Ce,windowRect:we}),Re=ne?oe(ne,M):null,Ee=function(e){const[t,n]=u(null),o=a(e),i=s((e=>{const t=Ae(e.target);t&&n((e=>e?(e.set(t,Le(t)),new Map(e)):null))}),[]);return l((()=>{const t=o.current;if(e!==t){r(t);const l=e.map((e=>{const t=Ae(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,Le(t)]):null})).filter((e=>null!=e));n(l.length?new Map(l):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=Ae(e);null==t||t.removeEventListener("scroll",i)}))}}),[i,e]),r((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>oe(e,t)),ye):Ue(e):ye),[e,t])}(xe),_e=Et(Ee),De=Et(Ee,[ae]),Ne=oe(Se,_e),Fe=fe?Oe(fe,Se):null,Te=A&&Fe?b({active:A,collisionRect:Fe,droppableRects:X,droppableContainers:U,pointerCoordinates:Re}):null,Ve=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(Te,"id"),[ze,$e]=u(null),Be=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(he?Se:oe(Se,De),null!=(c=null==ze?void 0:ze.rect)?c:null,ae),Ge=s(((e,t)=>{let{sensor:n,options:o}=t;if(null==T.current)return;const r=N.get(T.current);if(!r)return;const i=e.nativeEvent,l=new n({active:T.current,activeNode:r,event:i,options:o,context:ue,onStart(e){const t=T.current;if(null==t)return;const n=N.get(t);if(!n)return;const{onDragStart:o}=G.current,r={active:{id:t,data:n.data,rect:j}};v((()=>{null==o||o(r),I(zt.Initializing),R({type:be.DragStart,initialCoordinates:e,active:t}),E({type:"onDragStart",event:r})}))},onMove(e){R({type:be.DragMove,coordinates:e})},onEnd:a(be.DragEnd),onCancel:a(be.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:r}=ue.current;let l=null;if(t&&r){const{cancelDrop:a}=G.current;l={activatorEvent:i,active:t,collisions:n,delta:r,over:o},e===be.DragEnd&&"function"==typeof a&&await Promise.resolve(a(l))&&(e=be.DragCancel)}T.current=null,v((()=>{R({type:e}),I(zt.Uninitialized),$e(null),L(null),$(null);const t=e===be.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=G.current[t];null==e||e(l),E({type:t,event:l})}}))}}v((()=>{L(l),$(e.nativeEvent)}))}),[N]),qe=function(e,t){return r((()=>e.reduce(((e,n)=>{const{sensor:o}=n;return[...e,...o.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(m,s(((e,t)=>(n,o)=>{const r=n.nativeEvent,i=N.get(o);if(null!==T.current||!i||r.dndKit||r.defaultPrevented)return;const l={active:i};!0===e(n,t.options,l)&&(r.dndKit={capturedBy:t.sensor},T.current=o,Ge(n,t))}),[N,Ge]));(function(e){l((()=>{if(!z)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))})(m),K((()=>{ae&&k===zt.Initializing&&I(zt.Initialized)}),[ae,k]),l((()=>{const{onDragMove:e}=G.current,{active:t,activatorEvent:n,collisions:o,over:r}=ue.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:o,delta:{x:Ne.x,y:Ne.y},over:r};v((()=>{null==e||e(i),E({type:"onDragMove",event:i})}))}),[Ne.x,Ne.y]),l((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:o,scrollAdjustedTranslate:r}=ue.current;if(!e||null==T.current||!t||!r)return;const{onDragOver:i}=G.current,l=o.get(Ve),a=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:a};v((()=>{$e(a),null==i||i(s),E({type:"onDragOver",event:s})}))}),[Ve]),K((()=>{ue.current={activatorEvent:H,active:A,activeNode:ee,collisionRect:Fe,collisions:Te,droppableRects:X,draggableNodes:N,draggingNode:ge,draggingNodeRect:fe,droppableContainers:F,over:ze,scrollableAncestors:xe,scrollAdjustedTranslate:Ne},j.current={initial:fe,translated:Fe}}),[A,ee,Te,Fe,N,ge,fe,X,F,ze,xe,Ne]),ht({...re,delta:M,draggingRect:Fe,pointerCoordinates:Re,scrollableAncestors:xe,scrollableAncestorRects:Ce});const We=r((()=>({active:A,activeNode:ee,activeNodeRect:ae,activatorEvent:H,collisions:Te,containerNodeRect:se,dragOverlay:de,draggableNodes:N,droppableContainers:F,droppableRects:X,over:ze,measureDroppableContainers:Z,scrollableAncestors:xe,scrollableAncestorRects:Ce,measuringConfiguration:W,measuringScheduled:Q,windowRect:we})),[A,ee,ae,H,Te,se,de,N,F,X,ze,Z,xe,Ce,W,Q,we]),Xe=r((()=>({activatorEvent:H,activators:qe,active:A,activeNodeRect:ae,ariaDescribedById:{draggable:q},dispatch:R,draggableNodes:N,over:ze,measureDroppableContainers:Z})),[H,qe,A,ae,R,q,N,ze,Z]);return o.createElement(pe.Provider,{value:_},o.createElement(Pt.Provider,{value:Xe},o.createElement(jt.Provider,{value:We},o.createElement(Lt.Provider,{value:Be},h)),o.createElement(Vt,{disabled:!1===(null==p?void 0:p.restoreFocus)})),o.createElement(me,{...p,hiddenTextDescribedById:q}))})),$t=c(null),Bt="button",Gt="Droppable";function qt(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const l=te(Gt),{activators:a,activatorEvent:s,active:u,activeNodeRect:c,ariaDescribedById:d,draggableNodes:g,over:f}=p(Pt),{role:h=Bt,roleDescription:m="draggable",tabIndex:b=0}=i??{},v=(null==u?void 0:u.id)===t,w=p(v?Lt:$t),[y,x]=Z(),[C,S]=Z(),R=function(e,t){return r((()=>e.reduce(((e,n)=>{let{eventName:o,handler:r}=n;return e[o]=e=>{r(e,t)},e}),{})),[e,t])}(a,t),E=Y(n);K((()=>(g.set(t,{id:t,key:l,node:y,activatorNode:C,data:E}),()=>{const e=g.get(t);e&&e.key===l&&g.delete(t)})),[g,t]);return{active:u,activatorEvent:s,activeNodeRect:c,attributes:r((()=>({role:h,tabIndex:b,"aria-disabled":o,"aria-pressed":!(!v||h!==Bt)||void 0,"aria-roledescription":m,"aria-describedby":d.draggable})),[o,h,b,v,m,d.draggable]),isDragging:v,listeners:o?void 0:R,node:y,over:f,setNodeRef:x,setActivatorNodeRef:S,transform:w}}const Ut="Droppable",Wt={timeout:25};const Kt=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:o}=e;return n&&t?function(e,t,n){const o={...e};return t.top+e.y<=n.top?o.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(o.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?o.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(o.x=n.left+n.width-t.right),o}(o,n,t):o},Xt=e=>{let{transform:t}=e;return{...t,x:0}};function Yt(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function Jt(e,t){return e.reduce(((e,n,o)=>{const r=t.get(n);return r&&(e[o]=r),e}),Array(e.length))}function Zt(e){return null!==e&&e>=0}const Qt=e=>{let{rects:t,activeIndex:n,overIndex:o,index:r}=e;const i=Yt(t,o,n),l=t[r],a=i[r];return a&&l?{x:a.left-l.left,y:a.top-l.top,scaleX:a.width/l.width,scaleY:a.height/l.height}:null},en={scaleX:1,scaleY:1},tn=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:r,rects:i,overIndex:l}=e;const a=null!=(t=i[n])?t:o;if(!a)return null;if(r===n){const e=i[l];return e?{x:0,y:n<l?e.top+e.height-(a.top+a.height):e.top-a.top,...en}:null}const s=function(e,t,n){const o=e[t],r=e[t-1],i=e[t+1];return o?n<t?r?o.top-(r.top+r.height):i?i.top-(o.top+o.height):0:i?i.top-(o.top+o.height):r?o.top-(r.top+r.height):0:0}(i,r,n);return r>n&&r<=l?{x:0,y:-a.height-s,...en}:r<n&&r>=l?{x:0,y:a.height+s,...en}:{x:0,y:0,...en}};const nn="Sortable",on=o.createContext({activeIndex:-1,containerId:nn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Qt,disabled:{draggable:!1,droppable:!1}});function rn(e){let{children:t,id:n,items:i,strategy:s=Qt,disabled:u=!1}=e;const{active:c,dragOverlay:d,droppableRects:g,over:f,measureDroppableContainers:h}=p(jt),m=te(nn,n),b=null!==d.rect,v=r((()=>i.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[i]),w=null!=c,y=c?v.indexOf(c.id):-1,x=f?v.indexOf(f.id):-1,C=a(v),S=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(v,C.current),R=-1!==x&&-1===y||S,E=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);K((()=>{S&&w&&h(v)}),[S,v,w,h]),l((()=>{C.current=v}),[v]);const _=r((()=>({activeIndex:y,containerId:m,disabled:E,disableTransforms:R,items:v,overIndex:x,useDragOverlay:b,sortedRects:Jt(v,g),strategy:s})),[y,m,E.draggable,E.droppable,R,v,x,g,b,s]);return o.createElement(on.Provider,{value:_},t)}const ln=e=>{let{id:t,items:n,activeIndex:o,overIndex:r}=e;return Yt(n,o,r).indexOf(t)},an=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:r,items:i,newIndex:l,previousItems:a,previousContainerId:s,transition:u}=e;return!(!u||!o||a!==i&&r===l)&&(!!n||l!==r&&t===s)},sn={duration:200,easing:"ease"},un="transform",cn=ae.Transition.toString({property:un,duration:0,easing:"linear"}),dn={roleDescription:"sortable"};function gn(e){let{animateLayoutChanges:t=an,attributes:n,disabled:o,data:i,getNewIndex:c=ln,id:d,strategy:g,resizeObserverConfig:f,transition:h=sn}=e;const{items:m,containerId:b,activeIndex:v,disabled:w,disableTransforms:y,sortedRects:x,overIndex:C,useDragOverlay:S,strategy:R}=p(on),E=function(e,t){var n,o;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(o=null==e?void 0:e.droppable)?o:t.droppable}}(o,w),_=m.indexOf(d),k=r((()=>({sortable:{containerId:b,index:_,items:m},...i})),[b,i,_,m]),I=r((()=>m.slice(m.indexOf(d))),[m,d]),{rect:D,node:O,isOver:N,setNodeRef:M}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:r}=e;const i=te(Ut),{active:u,dispatch:c,over:d,measureDroppableContainers:g}=p(Pt),f=a({disabled:n}),h=a(!1),m=a(null),b=a(null),{disabled:v,updateMeasurementsFor:w,timeout:y}={...Wt,...r},x=Y(w??o),C=xt({callback:s((()=>{h.current?(null!=b.current&&clearTimeout(b.current),b.current=setTimeout((()=>{g(Array.isArray(x.current)?x.current:[x.current]),b.current=null}),y)):h.current=!0}),[y]),disabled:v||!u}),S=s(((e,t)=>{C&&(t&&(C.unobserve(t),h.current=!1),e&&C.observe(e))}),[C]),[R,E]=Z(S),_=Y(t);return l((()=>{!C||!R.current||(C.disconnect(),h.current=!1,C.observe(R.current))}),[R,C]),K((()=>(c({type:be.RegisterDroppable,element:{id:o,key:i,disabled:n,node:R,rect:m,data:_}}),()=>c({type:be.UnregisterDroppable,key:i,id:o}))),[o]),l((()=>{n!==f.current.disabled&&(c({type:be.SetDroppableDisabled,id:o,key:i,disabled:n}),f.current.disabled=n)}),[o,i,n,c]),{active:u,rect:m,isOver:(null==d?void 0:d.id)===o,node:R,over:d,setNodeRef:E}}({id:d,data:k,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...f}}),{active:F,activatorEvent:P,activeNodeRect:j,attributes:A,setNodeRef:T,listeners:V,isDragging:L,over:z,setActivatorNodeRef:H,transform:$}=qt({id:d,data:k,attributes:{...dn,...n},disabled:E.draggable}),B=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r((()=>e=>{t.forEach((t=>t(e)))}),t)}(M,T),G=!!F,q=G&&!y&&Zt(v)&&Zt(C),U=!S&&L,W=q?(U&&q?$:null)??(g??R)({rects:x,activeNodeRect:j,activeIndex:v,overIndex:C,index:_}):null,X=Zt(v)&&Zt(C)?c({id:d,items:m,activeIndex:v,overIndex:C}):_,J=null==F?void 0:F.id,Q=a({activeId:J,items:m,newIndex:X,containerId:b}),ee=m!==Q.current.items,ne=t({active:F,containerId:b,isDragging:L,isSorting:G,id:d,index:_,items:m,newIndex:Q.current.newIndex,previousItems:Q.current.items,previousContainerId:Q.current.containerId,transition:h,wasDragging:null!=Q.current.activeId}),oe=function(e){let{disabled:t,index:n,node:o,rect:r}=e;const[i,s]=u(null),c=a(n);return K((()=>{if(!t&&n!==c.current&&o.current){const e=r.current;if(e){const t=Me(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&s(n)}}n!==c.current&&(c.current=n)}),[t,n,o,r]),l((()=>{i&&s(null)}),[i]),i}({disabled:!ne,index:_,node:O,rect:D});return l((()=>{G&&Q.current.newIndex!==X&&(Q.current.newIndex=X),b!==Q.current.containerId&&(Q.current.containerId=b),m!==Q.current.items&&(Q.current.items=m)}),[G,X,b,m]),l((()=>{if(J===Q.current.activeId)return;if(J&&!Q.current.activeId)return void(Q.current.activeId=J);const e=setTimeout((()=>{Q.current.activeId=J}),50);return()=>clearTimeout(e)}),[J]),{active:F,activeIndex:v,attributes:A,data:k,rect:D,index:_,newIndex:X,items:m,isOver:N,isSorting:G,isDragging:L,listeners:V,node:O,overIndex:C,over:z,setNodeRef:B,setActivatorNodeRef:H,setDroppableNodeRef:M,setDraggableNodeRef:T,transform:oe??W,transition:function(){if(oe||ee&&Q.current.newIndex===_)return cn;if((!U||ie(P))&&h&&(G||ne))return ae.Transition.toString({...h,property:un})}()}}function pn(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=pn(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function fn(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=pn(e))&&(o&&(o+=" "),o+=t);return o}function hn(...e){return y(fn(e))}Ze.Down,Ze.Right,Ze.Up,Ze.Left;const mn=c(void 0),bn=({children:e})=>{const[t,n]=u(!1),o={enableResizingFlag:()=>n(!0),disableResizingFlag:()=>n(!1),isResizing:t};return L.jsx(mn.Provider,{value:o,children:e})},vn=()=>{const e=p(mn);if(!e)throw new Error("useRootContext must be used within a RootContextProvider");return e};function wn(){return(e=>e?e<=743:window.innerWidth<743)(function(){const[e,t]=u(window.innerWidth),n=()=>{t(window.innerWidth)};return l((()=>(n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n))),[]),e}())}
|
|
19
|
+
*/"production"===process.env.NODE_ENV?j.exports=function(){if(P)return A;P=1;var e=o,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,o){var a,s={},u=null,c=null;for(a in void 0!==o&&(u=""+o),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,a)&&!l.hasOwnProperty(a)&&(s[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===s[a]&&(s[a]=n[a]);return{$$typeof:t,type:e,key:u,ref:c,props:s,_owner:i.current}}return A.Fragment=n,A.jsx=a,A.jsxs=a,A}():j.exports=(T||(T=1,"production"!==process.env.NODE_ENV&&function(){var e=o,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator",b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];!function(e,t,n){var o=b.ReactDebugCurrentFrame,r=o.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var i=n.map((function(e){return String(e)}));i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}("error",e,n)}var w,y=!1,x=!1,C=!1,S=!1,R=!1;function E(e){return e.displayName||"Context"}function _(e){if(null==e)return null;if("number"==typeof e.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case r:return"Fragment";case n:return"Portal";case l:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case s:return E(e)+".Consumer";case a:return E(e._context)+".Provider";case u:return function(e,t,n){var o=e.displayName;if(o)return o;var r=t.displayName||t.name||"";return""!==r?n+"("+r+")":n}(e,e.render,"ForwardRef");case g:var t=e.displayName||null;return null!==t?t:_(e.type)||"Memo";case p:var o=e,f=o._payload,h=o._init;try{return _(h(f))}catch{return null}}return null}w=Symbol.for("react.module.reference");var k,I,D,O,N,M,F,P=Object.assign,j=0;function A(){}A.__reactDisabledLog=!0;var T,L=b.ReactCurrentDispatcher;function z(e,t,n){if(void 0===T)try{throw Error()}catch(e){var o=e.stack.trim().match(/\n( *(at )?)/);T=o&&o[1]||""}return"\n"+T+e}var H,$=!1,B="function"==typeof WeakMap?WeakMap:Map;function G(e,t){if(!e||$)return"";var n,o=H.get(e);if(void 0!==o)return o;$=!0;var r,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,r=L.current,L.current=null,function(){if(0===j){k=console.log,I=console.info,D=console.warn,O=console.error,N=console.group,M=console.groupCollapsed,F=console.groupEnd;var e={configurable:!0,enumerable:!0,value:A,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}j++}();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(l,[])}catch(e){n=e}Reflect.construct(e,[],l)}else{try{l.call()}catch(e){n=e}e.call(l.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),s=n.stack.split("\n"),u=a.length-1,c=s.length-1;u>=1&&c>=0&&a[u]!==s[c];)c--;for(;u>=1&&c>=0;u--,c--)if(a[u]!==s[c]){if(1!==u||1!==c)do{if(u--,--c<0||a[u]!==s[c]){var d="\n"+a[u].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&H.set(e,d),d}}while(u>=1&&c>=0);break}}}finally{$=!1,L.current=r,function(){if(0==--j){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},e,{value:k}),info:P({},e,{value:I}),warn:P({},e,{value:D}),error:P({},e,{value:O}),group:P({},e,{value:N}),groupCollapsed:P({},e,{value:M}),groupEnd:P({},e,{value:F})})}j<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var g=e?e.displayName||e.name:"",p=g?z(g):"";return"function"==typeof e&&H.set(e,p),p}function q(e,t,n){if(null==e)return"";if("function"==typeof e)return G(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return z(e);switch(e){case c:return z("Suspense");case d:return z("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case u:return function(e,t,n){return G(e,!1)}(e.render);case g:return q(e.type,t,n);case p:var o=e,r=o._payload,i=o._init;try{return q(i(r),t,n)}catch{}}return""}H=new B;var U=Object.prototype.hasOwnProperty,W={},K=b.ReactDebugCurrentFrame;function X(e){if(e){var t=e._owner,n=q(e.type,e._source,t?t.type:null);K.setExtraStackFrame(n)}else K.setExtraStackFrame(null)}var Y=Array.isArray;function J(e){return Y(e)}function Z(e){return""+e}function Q(e){if(function(e){try{return Z(e),!1}catch{return!0}}(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),Z(e)}var ee,te,ne,oe=b.ReactCurrentOwner,re={key:!0,ref:!0,__self:!0,__source:!0};ne={};var ie=function(e,n,o,r,i,l,a){var s={$$typeof:t,type:e,key:n,ref:o,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:r}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function le(e,t,n,o,r){var i,l={},a=null,s=null;for(i in void 0!==n&&(Q(n),a=""+n),function(e){if(U.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(Q(t.key),a=""+t.key),function(e){if(U.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(s=t.ref,function(e,t){if("string"==typeof e.ref&&oe.current&&t&&oe.current.stateNode!==t){var n=_(oe.current.type);ne[n]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',_(oe.current.type),e.ref),ne[n]=!0)}}(t,r)),t)U.call(t,i)&&!re.hasOwnProperty(i)&&(l[i]=t[i]);if(e&&e.defaultProps){var u=e.defaultProps;for(i in u)void 0===l[i]&&(l[i]=u[i])}if(a||s){var c="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var n=function(){ee||(ee=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(l,c),s&&function(e,t){var n=function(){te||(te=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(l,c)}return ie(e,a,s,r,o,oe.current,l)}var ae,se=b.ReactCurrentOwner,ue=b.ReactDebugCurrentFrame;function ce(e){if(e){var t=e._owner,n=q(e.type,e._source,t?t.type:null);ue.setExtraStackFrame(n)}else ue.setExtraStackFrame(null)}function de(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function ge(){if(se.current){var e=_(se.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ae=!1;var pe={};function fe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=ge();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!pe[n]){pe[n]=!0;var o="";e&&e._owner&&e._owner!==se.current&&(o=" It was passed a child from "+_(e._owner.type)+"."),ce(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),ce(null)}}}function he(e,t){if("object"==typeof e)if(J(e))for(var n=0;n<e.length;n++){var o=e[n];de(o)&&fe(o,t)}else if(de(e))e._store&&(e._store.validated=!0);else if(e){var r=function(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||e[m];return"function"==typeof t?t:null}(e);if("function"==typeof r&&r!==e.entries)for(var i,l=r.call(e);!(i=l.next()).done;)de(i.value)&&fe(i.value,t)}}function me(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==u&&n.$$typeof!==g)return;t=n.propTypes}if(t){var o=_(n);!function(e,t,n,o,r){var i=Function.call.bind(U);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var s=Error((o||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}a=e[l](t,l,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}a&&!(a instanceof Error)&&(X(r),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",n,l,typeof a),X(null)),a instanceof Error&&!(a.message in W)&&(W[a.message]=!0,X(r),v("Failed %s type: %s",n,a.message),X(null))}}(t,e.props,"prop",o,e)}else void 0===n.PropTypes||ae||(ae=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_(n)||"Unknown"));"function"==typeof n.getDefaultProps&&!n.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function be(e,n,o,h,m,b){var E=function(e){return!!("string"==typeof e||"function"==typeof e||e===r||e===l||R||e===i||e===c||e===d||S||e===f||y||x||C||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===g||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===w||void 0!==e.getModuleId))}(e);if(!E){var k="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(k+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var I,D=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(m);k+=D||ge(),null===e?I="null":J(e)?I="array":void 0!==e&&e.$$typeof===t?(I="<"+(_(e.type)||"Unknown")+" />",k=" Did you accidentally export a JSX literal instead of a component?"):I=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",I,k)}var O=le(e,n,o,m,b);if(null==O)return O;if(E){var N=n.children;if(void 0!==N)if(h)if(J(N)){for(var M=0;M<N.length;M++)he(N[M],e);Object.freeze&&Object.freeze(N)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else he(N,e)}return e===r?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var o=t[n];if("children"!==o&&"key"!==o){ce(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),ce(null);break}}null!==e.ref&&(ce(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),ce(null))}(O):me(O),O}var ve=function(e,t,n){return be(e,t,n,!1)},we=function(e,t,n){return be(e,t,n,!0)};V.Fragment=r,V.jsx=ve,V.jsxs=we}()),V);var L=j.exports;const z=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function H(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function $(e){return"nodeType"in e}function B(e){var t,n;return e?H(e)?e:$(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function G(e){const{Document:t}=B(e);return e instanceof t}function q(e){return!H(e)&&e instanceof B(e).HTMLElement}function U(e){return e instanceof B(e).SVGElement}function W(e){return e?H(e)?e.document:$(e)?G(e)?e:q(e)||U(e)?e.ownerDocument:document:document:document}const K=z?i:l;function X(e){const t=a(e);return K((()=>{t.current=e})),s((function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)}),[])}function Y(e,t){void 0===t&&(t=[e]);const n=a(e);return K((()=>{n.current!==e&&(n.current=e)}),t),n}function J(e,t){const n=a();return r((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function Z(e){const t=X(e),n=a(null),o=s((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function Q(e){const t=a();return l((()=>{t.current=e}),[e]),t.current}let ee={};function te(e,t){return r((()=>{if(t)return t;const n=null==ee[e]?0:ee[e]+1;return ee[e]=n,e+"-"+n}),[e,t])}function ne(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>{const o=Object.entries(n);for(const[n,r]of o){const o=t[n];null!=o&&(t[n]=o+e*r)}return t}),{...t})}}const oe=ne(1),re=ne(-1);function ie(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function le(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const ae=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[ae.Translate.toString(e),ae.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),se="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ue(e){return e.matches(se)?e:e.querySelector(se)}const ce={display:"none"};function de(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:ce},n)}function ge(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return o.createElement("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const pe=c(null);const fe={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},he={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function me(e){let{announcements:t=he,container:n,hiddenTextDescribedById:i,screenReaderInstructions:a=fe}=e;const{announce:c,announcement:d}=function(){const[e,t]=u("");return{announce:s((e=>{null!=e&&t(e)}),[]),announcement:e}}(),g=te("DndLiveRegion"),[f,h]=u(!1);if(l((()=>{h(!0)}),[]),function(e){const t=p(pe);l((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}(r((()=>({onDragStart(e){let{active:n}=e;c(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:o}=e;t.onDragMove&&c(t.onDragMove({active:n,over:o}))},onDragOver(e){let{active:n,over:o}=e;c(t.onDragOver({active:n,over:o}))},onDragEnd(e){let{active:n,over:o}=e;c(t.onDragEnd({active:n,over:o}))},onDragCancel(e){let{active:n,over:o}=e;c(t.onDragCancel({active:n,over:o}))}})),[c,t])),!f)return null;const m=o.createElement(o.Fragment,null,o.createElement(de,{id:i,value:a.draggable}),o.createElement(ge,{id:g,announcement:d}));return n?w(m,n):m}var be,ve;function we(){}(ve=be||(be={})).DragStart="dragStart",ve.DragMove="dragMove",ve.DragEnd="dragEnd",ve.DragCancel="dragCancel",ve.DragOver="dragOver",ve.RegisterDroppable="registerDroppable",ve.SetDroppableDisabled="setDroppableDisabled",ve.UnregisterDroppable="unregisterDroppable";const ye=Object.freeze({x:0,y:0});function xe(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ce(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function Se(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function Re(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Ee=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=Re(t,t.left,t.top),i=[];for(const e of o){const{id:t}=e,o=n.get(t);if(o){const n=xe(Re(o),r);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(Ce)};function _e(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),l=r-o,a=i-n;if(o<r&&n<i){const n=t.width*t.height,o=e.width*e.height,r=l*a;return Number((r/(n+o-r)).toFixed(4))}return 0}const ke=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const e of o){const{id:o}=e,i=n.get(o);if(i){const n=_e(i,t);n>0&&r.push({id:o,data:{droppableContainer:e,value:n}})}}return r.sort(Se)};function Ie(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ye}function De(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const Oe=De(1);const Ne={ignoreTransform:!1};function Me(e,t){void 0===t&&(t=Ne);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:o}=B(e).getComputedStyle(e);t&&(n=function(e,t,n){const o=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!o)return e;const{scaleX:r,scaleY:i,x:l,y:a}=o,s=e.left-l-(1-r)*parseFloat(n),u=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,d=i?e.height/i:e.height;return{width:c,height:d,top:u,right:s+c,bottom:u+d,left:s}}(n,t,o))}const{top:o,left:r,width:i,height:l,bottom:a,right:s}=n;return{top:o,left:r,width:i,height:l,bottom:a,right:s}}function Fe(e){return Me(e,{ignoreTransform:!0})}function Pe(e,t){const n=[];return e?function o(r){if(null!=t&&n.length>=t||!r)return n;if(G(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!q(r)||U(r)||n.includes(r))return n;const i=B(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=B(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const o=t[e];return"string"==typeof o&&n.test(o)}))}(r,i)&&n.push(r),function(e,t){return void 0===t&&(t=B(e).getComputedStyle(e)),"fixed"===t.position}(r,i)?n:o(r.parentNode)}(e):n}function je(e){const[t]=Pe(e,1);return t??null}function Ae(e){return z&&e?H(e)?e:$(e)?G(e)||e===W(e).scrollingElement?window:q(e)?e:null:null:null}function Te(e){return H(e)?e.scrollX:e.scrollLeft}function Ve(e){return H(e)?e.scrollY:e.scrollTop}function Le(e){return{x:Te(e),y:Ve(e)}}var ze;function He(e){return!(!z||!e)&&e===document.scrollingElement}function $e(e){const t={x:0,y:0},n=He(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=o.y,isRight:e.scrollLeft>=o.x,maxScroll:o,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(ze||(ze={}));const Be={x:.2,y:.2};function Ge(e,t,n,o,r){let{top:i,left:l,right:a,bottom:s}=n;void 0===o&&(o=10),void 0===r&&(r=Be);const{isTop:u,isBottom:c,isLeft:d,isRight:g}=$e(e),p={x:0,y:0},f={x:0,y:0},h=t.height*r.y,m=t.width*r.x;return!u&&i<=t.top+h?(p.y=ze.Backward,f.y=o*Math.abs((t.top+h-i)/h)):!c&&s>=t.bottom-h&&(p.y=ze.Forward,f.y=o*Math.abs((t.bottom-h-s)/h)),!g&&a>=t.right-m?(p.x=ze.Forward,f.x=o*Math.abs((t.right-m-a)/m)):!d&&l<=t.left+m&&(p.x=ze.Backward,f.x=o*Math.abs((t.left+m-l)/m)),{direction:p,speed:f}}function qe(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function Ue(e){return e.reduce(((e,t)=>oe(e,Le(t))),ye)}const We=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Te(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+Ve(t)),0)}]];class Ke{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Pe(t),o=Ue(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of We)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=r(n),l=o[e]-t;return this.rect[i]+l},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Xe{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var o;null==(o=this.target)||o.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Ye(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t&&o>t.y}var Je,Ze;function Qe(e){e.preventDefault()}function et(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Je||(Je={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(Ze||(Ze={}));const tt={start:[Ze.Space,Ze.Enter],cancel:[Ze.Esc],end:[Ze.Space,Ze.Enter]},nt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ze.Right:return{...n,x:n.x+25};case Ze.Left:return{...n,x:n.x-25};case Ze.Down:return{...n,y:n.y+25};case Ze.Up:return{...n,y:n.y-25}}};class ot{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Xe(W(t)),this.windowListeners=new Xe(B(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Je.Resize,this.handleCancel),this.windowListeners.add(Je.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(Je.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Me),!e)return;const{top:n,left:o,bottom:r,right:i}=t(e);je(e)&&(r<=0||i<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(ye)}handleKeyDown(e){if(ie(e)){const{active:t,context:n,options:o}=this.props,{keyboardCodes:r=tt,coordinateGetter:i=nt,scrollBehavior:l="smooth"}=o,{code:a}=e;if(r.end.includes(a))return void this.handleEnd(e);if(r.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:s}=n.current,u=s?{x:s.left,y:s.top}:ye;this.referenceCoordinates||(this.referenceCoordinates=u);const c=i(e,{active:t,context:n.current,currentCoordinates:u});if(c){const t=re(c,u),o={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:i,isRight:a,isLeft:s,isBottom:u,maxScroll:d,minScroll:g}=$e(n),p=qe(n),f={x:Math.min(r===Ze.Right?p.right-p.width/2:p.right,Math.max(r===Ze.Right?p.left:p.left+p.width/2,c.x)),y:Math.min(r===Ze.Down?p.bottom-p.height/2:p.bottom,Math.max(r===Ze.Down?p.top:p.top+p.height/2,c.y))},h=r===Ze.Right&&!a||r===Ze.Left&&!s,m=r===Ze.Down&&!u||r===Ze.Up&&!i;if(h&&f.x!==c.x){const e=n.scrollLeft+t.x,i=r===Ze.Right&&e<=d.x||r===Ze.Left&&e>=g.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});o.x=i?n.scrollLeft-e:r===Ze.Right?n.scrollLeft-d.x:n.scrollLeft-g.x,o.x&&n.scrollBy({left:-o.x,behavior:l});break}if(m&&f.y!==c.y){const e=n.scrollTop+t.y,i=r===Ze.Down&&e<=d.y||r===Ze.Up&&e>=g.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});o.y=i?n.scrollTop-e:r===Ze.Down?n.scrollTop-d.y:n.scrollTop-g.y,o.y&&n.scrollBy({top:-o.y,behavior:l});break}}this.handleMove(e,oe(re(c,this.referenceCoordinates),o))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function rt(e){return!(!e||!("distance"in e))}function it(e){return!(!e||!("delay"in e))}ot.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=tt,onActivation:r}=t,{active:i}=n;const{code:l}=e.nativeEvent;if(o.start.includes(l)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class lt{constructor(e,t,n){var o;void 0===n&&(n=function(e){const{EventTarget:t}=B(e);return e instanceof t?e:W(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=W(i),this.documentListeners=new Xe(this.document),this.listeners=new Xe(n),this.windowListeners=new Xe(B(i)),this.initialCoordinates=null!=(o=le(r))?o:ye,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(Je.Resize,this.handleCancel),this.windowListeners.add(Je.DragStart,Qe),this.windowListeners.add(Je.VisibilityChange,this.handleCancel),this.windowListeners.add(Je.ContextMenu,Qe),this.documentListeners.add(Je.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(it(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(rt(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Je.Click,et,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Je.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:o,props:r}=this,{onMove:i,options:{activationConstraint:l}}=r;if(!o)return;const a=null!=(t=le(e))?t:ye,s=re(o,a);if(!n&&l){if(rt(l)){if(null!=l.tolerance&&Ye(s,l.tolerance))return this.handleCancel();if(Ye(s,l.distance))return this.handleStart()}return it(l)&&Ye(s,l.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(a)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===Ze.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const at={move:{name:"pointermove"},end:{name:"pointerup"}};class st extends lt{constructor(e){const{event:t}=e,n=W(t.target);super(e,at,n)}}st.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!(!n.isPrimary||0!==n.button)&&(null==o||o({event:n}),!0)}}];const ut={move:{name:"mousemove"},end:{name:"mouseup"}};var ct;!function(e){e[e.RightClick=2]="RightClick"}(ct||(ct={}));(class extends lt{constructor(e){super(e,ut,W(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button!==ct.RightClick&&(null==o||o({event:n}),!0)}}];const dt={move:{name:"touchmove"},end:{name:"touchend"}};var gt,pt;function ft(e){let{acceleration:t,activator:n=gt.Pointer,canScroll:o,draggingRect:i,enabled:u,interval:c=5,order:d=pt.TreeOrder,pointerCoordinates:g,scrollableAncestors:p,scrollableAncestorRects:f,delta:h,threshold:m}=e;const b=function(e){let{delta:t,disabled:n}=e;const o=Q(t);return J((e=>{if(n||!o||!e)return ht;const r={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[ze.Backward]:e.x[ze.Backward]||-1===r.x,[ze.Forward]:e.x[ze.Forward]||1===r.x},y:{[ze.Backward]:e.y[ze.Backward]||-1===r.y,[ze.Forward]:e.y[ze.Forward]||1===r.y}}}),[n,t,o])}({delta:h,disabled:!u}),[v,w]=function(){const e=a(null);return[s(((t,n)=>{e.current=setInterval(t,n)}),[]),s((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),y=a({x:0,y:0}),x=a({x:0,y:0}),C=r((()=>{switch(n){case gt.Pointer:return g?{top:g.y,bottom:g.y,left:g.x,right:g.x}:null;case gt.DraggableRect:return i}}),[n,i,g]),S=a(null),R=s((()=>{const e=S.current;if(!e)return;const t=y.current.x*x.current.x,n=y.current.y*x.current.y;e.scrollBy(t,n)}),[]),E=r((()=>d===pt.TreeOrder?[...p].reverse():p),[d,p]);l((()=>{if(u&&p.length&&C){for(const e of E){if(!1===(null==o?void 0:o(e)))continue;const n=p.indexOf(e),r=f[n];if(!r)continue;const{direction:i,speed:l}=Ge(e,r,C,t,m);for(const e of["x","y"])b[e][i[e]]||(l[e]=0,i[e]=0);if(l.x>0||l.y>0)return w(),S.current=e,v(R,c),y.current=l,void(x.current=i)}y.current={x:0,y:0},x.current={x:0,y:0},w()}else w()}),[t,R,o,w,u,c,JSON.stringify(C),JSON.stringify(b),v,p,E,f,JSON.stringify(m)])}(class extends lt{constructor(e){super(e,dt)}static setup(){return window.addEventListener(dt.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(dt.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:r}=n;return!(r.length>1)&&(null==o||o({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(gt||(gt={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(pt||(pt={}));const ht={x:{[ze.Backward]:!1,[ze.Forward]:!1},y:{[ze.Backward]:!1,[ze.Forward]:!1}};var mt,bt;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(mt||(mt={})),(bt||(bt={})).Optimized="optimized";const vt=new Map;function wt(e,t){return J((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function yt(e){let{callback:t,disabled:n}=e;const o=X(t),i=r((()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:e}=window;return new e(o)}),[n]);return l((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function xt(e){return new Ke(Me(e),e)}function Ct(e,t,n){void 0===t&&(t=xt);const[o,i]=g((function(o){if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=o??n)?r:null;const i=t(e);return JSON.stringify(o)===JSON.stringify(i)?o:i}),null),a=function(e){let{callback:t,disabled:n}=e;const o=X(t),i=r((()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:e}=window;return new e(o)}),[o,n]);return l((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:o}=n;if("childList"===t&&o instanceof HTMLElement&&o.contains(e)){i();break}}}}),s=yt({callback:i});return K((()=>{i(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())}),[e]),o}const St=[];function Rt(e,t){void 0===t&&(t=[]);const n=a(null);return l((()=>{n.current=null}),t),l((()=>{const t=e!==ye;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?re(e,n.current):ye}function Et(e){return r((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const _t=[];function kt(e){let{measure:t}=e;const[n,o]=u(null),i=yt({callback:s((e=>{for(const{target:n}of e)if(q(n)){o((e=>{const o=t(n);return e?{...e,width:o.width,height:o.height}:o}));break}}),[t])}),l=s((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return q(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),o(n?t(n):null)}),[t,i]),[a,c]=Z(l);return r((()=>({nodeRef:a,rect:n,setRef:c})),[n,a,c])}const It=[{sensor:st,options:{}},{sensor:ot,options:{}}],Dt={current:{}},Ot={draggable:{measure:Fe},droppable:{measure:Fe,strategy:mt.WhileDragging,frequency:bt.Optimized},dragOverlay:{measure:Me}};class Nt extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Mt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Nt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:we},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ot,measureDroppableContainers:we,windowRect:null,measuringScheduled:!1},Ft=c({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:we,draggableNodes:new Map,over:null,measureDroppableContainers:we}),Pt=c(Mt);function jt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Nt}}}function At(e,t){switch(t.type){case be.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case be.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case be.DragEnd:case be.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case be.RegisterDroppable:{const{element:n}=t,{id:o}=n,r=new Nt(e.droppable.containers);return r.set(o,n),{...e,droppable:{...e.droppable,containers:r}}}case be.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const l=new Nt(e.droppable.containers);return l.set(n,{...i,disabled:r}),{...e,droppable:{...e.droppable,containers:l}}}case be.UnregisterDroppable:{const{id:n,key:o}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const i=new Nt(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Tt(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:r}=p(Ft),i=Q(o),a=Q(null==n?void 0:n.id);return l((()=>{if(!t&&!o&&i&&null!=a){if(!ie(i)||document.activeElement===i.target)return;const e=r.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=ue(e);if(t){t.focus();break}}}))}}),[o,t,r,a,i]),null}const Vt=c({...ye,scaleX:1,scaleY:1});var Lt;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Lt||(Lt={}));const zt=d((function(e){var t,n,i,c;let{id:d,accessibility:p,autoScroll:f=!0,children:h,sensors:m=It,collisionDetection:b=ke,measuring:w,modifiers:y,...x}=e;const C=g(At,void 0,jt),[S,R]=C,[E,_]=function(){const[e]=u((()=>new Set)),t=s((t=>(e.add(t),()=>e.delete(t))),[e]);return[s((t=>{let{type:n,event:o}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,o)}))}),[e]),t]}(),[k,I]=u(Lt.Uninitialized),D=k===Lt.Initialized,{draggable:{active:O,nodes:N,translate:M},droppable:{containers:F}}=S,P=O?N.get(O):null,j=a({initial:null,translated:null}),A=r((()=>{var e;return null!=O?{id:O,data:null!=(e=null==P?void 0:P.data)?e:Dt,rect:j}:null}),[O,P]),T=a(null),[V,L]=u(null),[H,$]=u(null),G=Y(x,Object.values(x)),q=te("DndDescribedBy",d),U=r((()=>F.getEnabled()),[F]),W=function(e){return r((()=>({draggable:{...Ot.draggable,...null==e?void 0:e.draggable},droppable:{...Ot.droppable,...null==e?void 0:e.droppable},dragOverlay:{...Ot.dragOverlay,...null==e?void 0:e.dragOverlay}})),[null==e?void 0:e.draggable,null==e?void 0:e.droppable,null==e?void 0:e.dragOverlay])}(w),{droppableRects:X,measureDroppableContainers:Z,measuringScheduled:Q}=function(e,t){let{dragging:n,dependencies:o,config:r}=t;const[i,c]=u(null),{frequency:d,measure:g,strategy:p}=r,f=a(e),h=function(){switch(p){case mt.Always:return!1;case mt.BeforeDragging:return n;default:return!n}}(),m=Y(h),b=s((function(e){void 0===e&&(e=[]),!m.current&&c((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[m]),v=a(null),w=J((t=>{if(h&&!n)return vt;if(!t||t===vt||f.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new Ke(g(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,i,n,h,g]);return l((()=>{f.current=e}),[e]),l((()=>{h||b()}),[n,h]),l((()=>{i&&i.length>0&&c(null)}),[JSON.stringify(i)]),l((()=>{h||"number"!=typeof d||null!==v.current||(v.current=setTimeout((()=>{b(),v.current=null}),d))}),[d,h,b,...o]),{droppableRects:w,measureDroppableContainers:b,measuringScheduled:null!=i}}(U,{dragging:D,dependencies:[M.x,M.y],config:W.droppable}),ee=function(e,t){const n=null!==t?e.get(t):void 0,o=n?n.node.current:null;return J((e=>{var n;return null===t?null:null!=(n=o??e)?n:null}),[o,t])}(N,O),ne=r((()=>H?le(H):null),[H]),re=function(){const e=!1===(null==V?void 0:V.autoScrollEnabled),t="object"==typeof f?!1===f.enabled:!1===f,n=D&&!e&&!t;return"object"==typeof f?{...f,enabled:n}:{enabled:n}}(),ie=function(e,t){return wt(e,t)}(ee,W.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:r=!0}=e;const i=a(!1),{x:l,y:s}="boolean"==typeof r?{x:r,y:r}:r;K((()=>{if(!l&&!s||!t)return void(i.current=!1);if(i.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=Ie(n(e),o);if(l||(r.x=0),s||(r.y=0),i.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=je(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,l,s,o,n])}({activeNode:O?N.get(O):null,config:re.layoutShiftCompensation,initialRect:ie,measure:W.draggable.measure});const ae=Ct(ee,W.draggable.measure,ie),se=Ct(ee?ee.parentElement:null),ue=a({activatorEvent:null,active:null,activeNode:ee,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ce=F.getNodeFor(null==(t=ue.current.over)?void 0:t.id),de=kt({measure:W.dragOverlay.measure}),ge=null!=(n=de.nodeRef.current)?n:ee,fe=D?null!=(i=de.rect)?i:ae:null,he=!(!de.nodeRef.current||!de.rect),ve=function(e){return Ie(e,wt(e))}(he?null:ae),we=Et(ge?B(ge):null),xe=function(e){const t=a(e),n=J((n=>e?n&&n!==St&&e&&t.current&&e.parentNode===t.current.parentNode?n:Pe(e):St),[e]);return l((()=>{t.current=e}),[e]),n}(D?ce??ee:null),Ce=function(e,t){void 0===t&&(t=Me);const[n]=e,o=Et(n?B(n):null),[r,i]=g((function(){return e.length?e.map((e=>He(e)?o:new Ke(t(e),e))):_t}),_t),l=yt({callback:i});return e.length>0&&r===_t&&i(),K((()=>{e.length?e.forEach((e=>null==l?void 0:l.observe(e))):(null==l||l.disconnect(),i())}),[e]),r}(xe),Se=function(e,t){let{transform:n,...o}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...o})),n):n}(y,{transform:{x:M.x-ve.x,y:M.y-ve.y,scaleX:1,scaleY:1},activatorEvent:H,active:A,activeNodeRect:ae,containerNodeRect:se,draggingNodeRect:fe,over:ue.current.over,overlayNodeRect:de.rect,scrollableAncestors:xe,scrollableAncestorRects:Ce,windowRect:we}),Re=ne?oe(ne,M):null,Ee=function(e){const[t,n]=u(null),o=a(e),i=s((e=>{const t=Ae(e.target);t&&n((e=>e?(e.set(t,Le(t)),new Map(e)):null))}),[]);return l((()=>{const t=o.current;if(e!==t){r(t);const l=e.map((e=>{const t=Ae(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,Le(t)]):null})).filter((e=>null!=e));n(l.length?new Map(l):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=Ae(e);null==t||t.removeEventListener("scroll",i)}))}}),[i,e]),r((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>oe(e,t)),ye):Ue(e):ye),[e,t])}(xe),_e=Rt(Ee),De=Rt(Ee,[ae]),Ne=oe(Se,_e),Fe=fe?Oe(fe,Se):null,Te=A&&Fe?b({active:A,collisionRect:Fe,droppableRects:X,droppableContainers:U,pointerCoordinates:Re}):null,Ve=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(Te,"id"),[ze,$e]=u(null),Be=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(he?Se:oe(Se,De),null!=(c=null==ze?void 0:ze.rect)?c:null,ae),Ge=s(((e,t)=>{let{sensor:n,options:o}=t;if(null==T.current)return;const r=N.get(T.current);if(!r)return;const i=e.nativeEvent,l=new n({active:T.current,activeNode:r,event:i,options:o,context:ue,onStart(e){const t=T.current;if(null==t)return;const n=N.get(t);if(!n)return;const{onDragStart:o}=G.current,r={active:{id:t,data:n.data,rect:j}};v((()=>{null==o||o(r),I(Lt.Initializing),R({type:be.DragStart,initialCoordinates:e,active:t}),E({type:"onDragStart",event:r})}))},onMove(e){R({type:be.DragMove,coordinates:e})},onEnd:a(be.DragEnd),onCancel:a(be.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:r}=ue.current;let l=null;if(t&&r){const{cancelDrop:a}=G.current;l={activatorEvent:i,active:t,collisions:n,delta:r,over:o},e===be.DragEnd&&"function"==typeof a&&await Promise.resolve(a(l))&&(e=be.DragCancel)}T.current=null,v((()=>{R({type:e}),I(Lt.Uninitialized),$e(null),L(null),$(null);const t=e===be.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=G.current[t];null==e||e(l),E({type:t,event:l})}}))}}v((()=>{L(l),$(e.nativeEvent)}))}),[N]),qe=function(e,t){return r((()=>e.reduce(((e,n)=>{const{sensor:o}=n;return[...e,...o.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(m,s(((e,t)=>(n,o)=>{const r=n.nativeEvent,i=N.get(o);if(null!==T.current||!i||r.dndKit||r.defaultPrevented)return;const l={active:i};!0===e(n,t.options,l)&&(r.dndKit={capturedBy:t.sensor},T.current=o,Ge(n,t))}),[N,Ge]));(function(e){l((()=>{if(!z)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))})(m),K((()=>{ae&&k===Lt.Initializing&&I(Lt.Initialized)}),[ae,k]),l((()=>{const{onDragMove:e}=G.current,{active:t,activatorEvent:n,collisions:o,over:r}=ue.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:o,delta:{x:Ne.x,y:Ne.y},over:r};v((()=>{null==e||e(i),E({type:"onDragMove",event:i})}))}),[Ne.x,Ne.y]),l((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:o,scrollAdjustedTranslate:r}=ue.current;if(!e||null==T.current||!t||!r)return;const{onDragOver:i}=G.current,l=o.get(Ve),a=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:a};v((()=>{$e(a),null==i||i(s),E({type:"onDragOver",event:s})}))}),[Ve]),K((()=>{ue.current={activatorEvent:H,active:A,activeNode:ee,collisionRect:Fe,collisions:Te,droppableRects:X,draggableNodes:N,draggingNode:ge,draggingNodeRect:fe,droppableContainers:F,over:ze,scrollableAncestors:xe,scrollAdjustedTranslate:Ne},j.current={initial:fe,translated:Fe}}),[A,ee,Te,Fe,N,ge,fe,X,F,ze,xe,Ne]),ft({...re,delta:M,draggingRect:Fe,pointerCoordinates:Re,scrollableAncestors:xe,scrollableAncestorRects:Ce});const We=r((()=>({active:A,activeNode:ee,activeNodeRect:ae,activatorEvent:H,collisions:Te,containerNodeRect:se,dragOverlay:de,draggableNodes:N,droppableContainers:F,droppableRects:X,over:ze,measureDroppableContainers:Z,scrollableAncestors:xe,scrollableAncestorRects:Ce,measuringConfiguration:W,measuringScheduled:Q,windowRect:we})),[A,ee,ae,H,Te,se,de,N,F,X,ze,Z,xe,Ce,W,Q,we]),Xe=r((()=>({activatorEvent:H,activators:qe,active:A,activeNodeRect:ae,ariaDescribedById:{draggable:q},dispatch:R,draggableNodes:N,over:ze,measureDroppableContainers:Z})),[H,qe,A,ae,R,q,N,ze,Z]);return o.createElement(pe.Provider,{value:_},o.createElement(Ft.Provider,{value:Xe},o.createElement(Pt.Provider,{value:We},o.createElement(Vt.Provider,{value:Be},h)),o.createElement(Tt,{disabled:!1===(null==p?void 0:p.restoreFocus)})),o.createElement(me,{...p,hiddenTextDescribedById:q}))})),Ht=c(null),$t="button",Bt="Droppable";function Gt(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const l=te(Bt),{activators:a,activatorEvent:s,active:u,activeNodeRect:c,ariaDescribedById:d,draggableNodes:g,over:f}=p(Ft),{role:h=$t,roleDescription:m="draggable",tabIndex:b=0}=i??{},v=(null==u?void 0:u.id)===t,w=p(v?Vt:Ht),[y,x]=Z(),[C,S]=Z(),R=function(e,t){return r((()=>e.reduce(((e,n)=>{let{eventName:o,handler:r}=n;return e[o]=e=>{r(e,t)},e}),{})),[e,t])}(a,t),E=Y(n);K((()=>(g.set(t,{id:t,key:l,node:y,activatorNode:C,data:E}),()=>{const e=g.get(t);e&&e.key===l&&g.delete(t)})),[g,t]);return{active:u,activatorEvent:s,activeNodeRect:c,attributes:r((()=>({role:h,tabIndex:b,"aria-disabled":o,"aria-pressed":!(!v||h!==$t)||void 0,"aria-roledescription":m,"aria-describedby":d.draggable})),[o,h,b,v,m,d.draggable]),isDragging:v,listeners:o?void 0:R,node:y,over:f,setNodeRef:x,setActivatorNodeRef:S,transform:w}}const qt="Droppable",Ut={timeout:25};const Wt=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:o}=e;return n&&t?function(e,t,n){const o={...e};return t.top+e.y<=n.top?o.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(o.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?o.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(o.x=n.left+n.width-t.right),o}(o,n,t):o},Kt=e=>{let{transform:t}=e;return{...t,x:0}};function Xt(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function Yt(e,t){return e.reduce(((e,n,o)=>{const r=t.get(n);return r&&(e[o]=r),e}),Array(e.length))}function Jt(e){return null!==e&&e>=0}const Zt=e=>{let{rects:t,activeIndex:n,overIndex:o,index:r}=e;const i=Xt(t,o,n),l=t[r],a=i[r];return a&&l?{x:a.left-l.left,y:a.top-l.top,scaleX:a.width/l.width,scaleY:a.height/l.height}:null},Qt={scaleX:1,scaleY:1},en=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:r,rects:i,overIndex:l}=e;const a=null!=(t=i[n])?t:o;if(!a)return null;if(r===n){const e=i[l];return e?{x:0,y:n<l?e.top+e.height-(a.top+a.height):e.top-a.top,...Qt}:null}const s=function(e,t,n){const o=e[t],r=e[t-1],i=e[t+1];return o?n<t?r?o.top-(r.top+r.height):i?i.top-(o.top+o.height):0:i?i.top-(o.top+o.height):r?o.top-(r.top+r.height):0:0}(i,r,n);return r>n&&r<=l?{x:0,y:-a.height-s,...Qt}:r<n&&r>=l?{x:0,y:a.height+s,...Qt}:{x:0,y:0,...Qt}};const tn="Sortable",nn=o.createContext({activeIndex:-1,containerId:tn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Zt,disabled:{draggable:!1,droppable:!1}});function on(e){let{children:t,id:n,items:i,strategy:s=Zt,disabled:u=!1}=e;const{active:c,dragOverlay:d,droppableRects:g,over:f,measureDroppableContainers:h}=p(Pt),m=te(tn,n),b=null!==d.rect,v=r((()=>i.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[i]),w=null!=c,y=c?v.indexOf(c.id):-1,x=f?v.indexOf(f.id):-1,C=a(v),S=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(v,C.current),R=-1!==x&&-1===y||S,E=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);K((()=>{S&&w&&h(v)}),[S,v,w,h]),l((()=>{C.current=v}),[v]);const _=r((()=>({activeIndex:y,containerId:m,disabled:E,disableTransforms:R,items:v,overIndex:x,useDragOverlay:b,sortedRects:Yt(v,g),strategy:s})),[y,m,E.draggable,E.droppable,R,v,x,g,b,s]);return o.createElement(nn.Provider,{value:_},t)}const rn=e=>{let{id:t,items:n,activeIndex:o,overIndex:r}=e;return Xt(n,o,r).indexOf(t)},ln=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:r,items:i,newIndex:l,previousItems:a,previousContainerId:s,transition:u}=e;return!(!u||!o||a!==i&&r===l)&&(!!n||l!==r&&t===s)},an={duration:200,easing:"ease"},sn="transform",un=ae.Transition.toString({property:sn,duration:0,easing:"linear"}),cn={roleDescription:"sortable"};function dn(e){let{animateLayoutChanges:t=ln,attributes:n,disabled:o,data:i,getNewIndex:c=rn,id:d,strategy:g,resizeObserverConfig:f,transition:h=an}=e;const{items:m,containerId:b,activeIndex:v,disabled:w,disableTransforms:y,sortedRects:x,overIndex:C,useDragOverlay:S,strategy:R}=p(nn),E=function(e,t){var n,o;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(o=null==e?void 0:e.droppable)?o:t.droppable}}(o,w),_=m.indexOf(d),k=r((()=>({sortable:{containerId:b,index:_,items:m},...i})),[b,i,_,m]),I=r((()=>m.slice(m.indexOf(d))),[m,d]),{rect:D,node:O,isOver:N,setNodeRef:M}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:r}=e;const i=te(qt),{active:u,dispatch:c,over:d,measureDroppableContainers:g}=p(Ft),f=a({disabled:n}),h=a(!1),m=a(null),b=a(null),{disabled:v,updateMeasurementsFor:w,timeout:y}={...Ut,...r},x=Y(w??o),C=yt({callback:s((()=>{h.current?(null!=b.current&&clearTimeout(b.current),b.current=setTimeout((()=>{g(Array.isArray(x.current)?x.current:[x.current]),b.current=null}),y)):h.current=!0}),[y]),disabled:v||!u}),S=s(((e,t)=>{C&&(t&&(C.unobserve(t),h.current=!1),e&&C.observe(e))}),[C]),[R,E]=Z(S),_=Y(t);return l((()=>{!C||!R.current||(C.disconnect(),h.current=!1,C.observe(R.current))}),[R,C]),K((()=>(c({type:be.RegisterDroppable,element:{id:o,key:i,disabled:n,node:R,rect:m,data:_}}),()=>c({type:be.UnregisterDroppable,key:i,id:o}))),[o]),l((()=>{n!==f.current.disabled&&(c({type:be.SetDroppableDisabled,id:o,key:i,disabled:n}),f.current.disabled=n)}),[o,i,n,c]),{active:u,rect:m,isOver:(null==d?void 0:d.id)===o,node:R,over:d,setNodeRef:E}}({id:d,data:k,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...f}}),{active:F,activatorEvent:P,activeNodeRect:j,attributes:A,setNodeRef:T,listeners:V,isDragging:L,over:z,setActivatorNodeRef:H,transform:$}=Gt({id:d,data:k,attributes:{...cn,...n},disabled:E.draggable}),B=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r((()=>e=>{t.forEach((t=>t(e)))}),t)}(M,T),G=!!F,q=G&&!y&&Jt(v)&&Jt(C),U=!S&&L,W=q?(U&&q?$:null)??(g??R)({rects:x,activeNodeRect:j,activeIndex:v,overIndex:C,index:_}):null,X=Jt(v)&&Jt(C)?c({id:d,items:m,activeIndex:v,overIndex:C}):_,J=null==F?void 0:F.id,Q=a({activeId:J,items:m,newIndex:X,containerId:b}),ee=m!==Q.current.items,ne=t({active:F,containerId:b,isDragging:L,isSorting:G,id:d,index:_,items:m,newIndex:Q.current.newIndex,previousItems:Q.current.items,previousContainerId:Q.current.containerId,transition:h,wasDragging:null!=Q.current.activeId}),oe=function(e){let{disabled:t,index:n,node:o,rect:r}=e;const[i,s]=u(null),c=a(n);return K((()=>{if(!t&&n!==c.current&&o.current){const e=r.current;if(e){const t=Me(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&s(n)}}n!==c.current&&(c.current=n)}),[t,n,o,r]),l((()=>{i&&s(null)}),[i]),i}({disabled:!ne,index:_,node:O,rect:D});return l((()=>{G&&Q.current.newIndex!==X&&(Q.current.newIndex=X),b!==Q.current.containerId&&(Q.current.containerId=b),m!==Q.current.items&&(Q.current.items=m)}),[G,X,b,m]),l((()=>{if(J===Q.current.activeId)return;if(J&&!Q.current.activeId)return void(Q.current.activeId=J);const e=setTimeout((()=>{Q.current.activeId=J}),50);return()=>clearTimeout(e)}),[J]),{active:F,activeIndex:v,attributes:A,data:k,rect:D,index:_,newIndex:X,items:m,isOver:N,isSorting:G,isDragging:L,listeners:V,node:O,overIndex:C,over:z,setNodeRef:B,setActivatorNodeRef:H,setDroppableNodeRef:M,setDraggableNodeRef:T,transform:oe??W,transition:function(){if(oe||ee&&Q.current.newIndex===_)return un;if((!U||ie(P))&&h&&(G||ne))return ae.Transition.toString({...h,property:sn})}()}}function gn(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=gn(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function pn(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=gn(e))&&(o&&(o+=" "),o+=t);return o}function fn(...e){return y(pn(e))}Ze.Down,Ze.Right,Ze.Up,Ze.Left;const hn=c(void 0),mn=({children:e})=>{const[t,n]=u(!1),o={enableResizingFlag:()=>n(!0),disableResizingFlag:()=>n(!1),isResizing:t};return L.jsx(hn.Provider,{value:o,children:e})},bn=()=>{const e=p(hn);if(!e)throw new Error("useRootContext must be used within a RootContextProvider");return e};function vn(){return(e=>e?e<=743:window.innerWidth<743)(function(){const[e,t]=u(window.innerWidth),n=()=>{t(window.innerWidth)};return l((()=>(n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n))),[]),e}())}
|
|
20
20
|
/**
|
|
21
21
|
* table-core
|
|
22
22
|
*
|
|
@@ -26,7 +26,7 @@ var e=Object.defineProperty,t=(t,n,o)=>(((t,n,o)=>{n in t?e(t,n,{enumerable:!0,c
|
|
|
26
26
|
* LICENSE.md file in the root directory of this source tree.
|
|
27
27
|
*
|
|
28
28
|
* @license MIT
|
|
29
|
-
*/function yn(){return{accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function xn(e,t){return"function"==typeof e?e(t):e}function Cn(e,t){return n=>{t.setState((t=>({...t,[e]:xn(n,t[e])})))}}function Sn(e){return e instanceof Function}function Rn(e,t,n){let o,r=[];return i=>{let l;n.key&&n.debug&&(l=Date.now());const a=e(i);if(a.length===r.length&&!a.some(((e,t)=>r[t]!==e)))return o;let s;if(r=a,n.key&&n.debug&&(s=Date.now()),o=t(...a),null==n||null==n.onChange||n.onChange(o),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-l))/100,t=Math.round(100*(Date.now()-s))/100,o=t/16,r=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${r(t,5)} /${r(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*o,120))}deg 100% 31%);`,null==n?void 0:n.key)}return o}}function En(e,t,n,o){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:"development"===process.env.NODE_ENV&&n,onChange:o}}const _n="debugHeaders";function kn(e,t,n){var o;let r={id:null!=(o=n.id)?o:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(r),e},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(r,e)})),r}const In={createTable:e=>{e.getHeaderGroups=Rn((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,o,r)=>{var i,l;const a=null!=(i=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],s=null!=(l=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?l:[];return Dn(t,[...a,...n.filter((e=>!(null!=o&&o.includes(e.id)||null!=r&&r.includes(e.id)))),...s],e)}),En(e.options,_n,"getHeaderGroups")),e.getCenterHeaderGroups=Rn((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,o,r)=>Dn(t,n=n.filter((e=>!(null!=o&&o.includes(e.id)||null!=r&&r.includes(e.id)))),e,"center")),En(e.options,_n,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Rn((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,o)=>{var r;return Dn(t,null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[],e,"left")}),En(e.options,_n,"getLeftHeaderGroups")),e.getRightHeaderGroups=Rn((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,o)=>{var r;return Dn(t,null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[],e,"right")}),En(e.options,_n,"getRightHeaderGroups")),e.getFooterGroups=Rn((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),En(e.options,_n,"getFooterGroups")),e.getLeftFooterGroups=Rn((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),En(e.options,_n,"getLeftFooterGroups")),e.getCenterFooterGroups=Rn((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),En(e.options,_n,"getCenterFooterGroups")),e.getRightFooterGroups=Rn((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),En(e.options,_n,"getRightFooterGroups")),e.getFlatHeaders=Rn((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),En(e.options,_n,"getFlatHeaders")),e.getLeftFlatHeaders=Rn((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),En(e.options,_n,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Rn((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),En(e.options,_n,"getCenterFlatHeaders")),e.getRightFlatHeaders=Rn((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),En(e.options,_n,"getRightFlatHeaders")),e.getCenterLeafHeaders=Rn((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),En(e.options,_n,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Rn((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),En(e.options,_n,"getLeftLeafHeaders")),e.getRightLeafHeaders=Rn((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),En(e.options,_n,"getRightLeafHeaders")),e.getLeafHeaders=Rn((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var o,r,i,l,a,s;return[...null!=(o=null==(r=e[0])?void 0:r.headers)?o:[],...null!=(i=null==(l=t[0])?void 0:l.headers)?i:[],...null!=(a=null==(s=n[0])?void 0:s.headers)?a:[]].map((e=>e.getLeafHeaders())).flat()}),En(e.options,_n,"getLeafHeaders"))}};function Dn(e,t,n,o){var r,i;let l=0;const a=function(e,t){void 0===t&&(t=1),l=Math.max(l,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&a(e.columns,t+1)}),0)};a(e);let s=[];const u=(e,t)=>{const r={depth:t,id:[o,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const l=[...i].reverse()[0];let a,s=!1;if(e.column.depth===r.depth&&e.column.parent?a=e.column.parent:(a=e.column,s=!0),l&&(null==l?void 0:l.column)===a)l.subHeaders.push(e);else{const r=kn(n,a,{id:[o,t,a.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:s,placeholderId:s?`${i.filter((e=>e.column===a)).length}`:void 0,depth:t,index:i.length});r.subHeaders.push(e),i.push(r)}r.headers.push(e),e.headerGroup=r})),s.push(r),t>0&&u(i,t-1)},c=t.map(((e,t)=>kn(n,e,{depth:l,index:t})));u(c,l-1),s.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,o=[0];e.subHeaders&&e.subHeaders.length?(o=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:r}=e;t+=n,o.push(r)}))):t=1;return n+=Math.min(...o),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(r=null==(i=s[0])?void 0:i.headers)?r:[]),s}const On=(e,t,n,o,r,i,l)=>{let a={id:t,index:o,original:n,depth:r,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(a._valuesCache.hasOwnProperty(t))return a._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(a._valuesCache[t]=n.accessorFn(a.original,o),a._valuesCache[t]):void 0},getUniqueValues:t=>{if(a._uniqueValuesCache.hasOwnProperty(t))return a._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(a._uniqueValuesCache[t]=n.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[t]):(a._uniqueValuesCache[t]=[a.getValue(t)],a._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=a.getValue(t))?n:e.options.renderFallbackValue},subRows:i??[],getLeafRows:()=>function(e,t){const n=[],o=e=>{e.forEach((e=>{n.push(e);const r=t(e);null!=r&&r.length&&o(r)}))};return o(e),n}(a.subRows,(e=>e.subRows)),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let e=[],t=a;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:Rn((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,o){const r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:()=>{var t;return null!=(t=r.getValue())?t:e.options.renderFallbackValue},getContext:Rn((()=>[e,n,t,r]),((e,t,n,o)=>({table:e,column:t,row:n,cell:o,getValue:o.getValue,renderValue:o.renderValue})),En(e.options,"debugCells","cell.getContext"))};return e._features.forEach((o=>{null==o.createCell||o.createCell(r,n,t,e)}),{}),r}(e,a,t,t.id)))),En(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:Rn((()=>[a.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),En(e.options,"debugRows","getAllCellsByColumnId"))};for(let t=0;t<e._features.length;t++){const n=e._features[t];null==n||null==n.createRow||n.createRow(a,e)}return a},Nn={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Mn=(e,t,n)=>{var o,r;const i=null==n||null==(o=n.toString())?void 0:o.toLowerCase();return!(null==(r=e.getValue(t))||null==(r=r.toString())||null==(r=r.toLowerCase())||!r.includes(i))};Mn.autoRemove=e=>$n(e);const Fn=(e,t,n)=>{var o;return!(null==(o=e.getValue(t))||null==(o=o.toString())||!o.includes(n))};Fn.autoRemove=e=>$n(e);const Pn=(e,t,n)=>{var o;return(null==(o=e.getValue(t))||null==(o=o.toString())?void 0:o.toLowerCase())===(null==n?void 0:n.toLowerCase())};Pn.autoRemove=e=>$n(e);const jn=(e,t,n)=>{var o;return null==(o=e.getValue(t))?void 0:o.includes(n)};jn.autoRemove=e=>$n(e);const An=(e,t,n)=>!n.some((n=>{var o;return!(null!=(o=e.getValue(t))&&o.includes(n))}));An.autoRemove=e=>$n(e)||!(null!=e&&e.length);const Tn=(e,t,n)=>n.some((n=>{var o;return null==(o=e.getValue(t))?void 0:o.includes(n)}));Tn.autoRemove=e=>$n(e)||!(null!=e&&e.length);const Vn=(e,t,n)=>e.getValue(t)===n;Vn.autoRemove=e=>$n(e);const Ln=(e,t,n)=>e.getValue(t)==n;Ln.autoRemove=e=>$n(e);const zn=(e,t,n)=>{let[o,r]=n;const i=e.getValue(t);return i>=o&&i<=r};zn.resolveFilterValue=e=>{let[t,n]=e,o="number"!=typeof t?parseFloat(t):t,r="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(o)?-1/0:o,l=null===n||Number.isNaN(r)?1/0:r;if(i>l){const e=i;i=l,l=e}return[i,l]},zn.autoRemove=e=>$n(e)||$n(e[0])&&$n(e[1]);const Hn={includesString:Mn,includesStringSensitive:Fn,equalsString:Pn,arrIncludes:jn,arrIncludesAll:An,arrIncludesSome:Tn,equals:Vn,weakEquals:Ln,inNumberRange:zn};function $n(e){return null==e||""===e}const Bn={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Cn("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=null==n?void 0:n.getValue(e.id);return"string"==typeof o?Hn.includesString:"number"==typeof o?Hn.inNumberRange:"boolean"==typeof o||null!==o&&"object"==typeof o?Hn.equals:Array.isArray(o)?Hn.arrIncludes:Hn.weakEquals},e.getFilterFn=()=>{var n,o;return Sn(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(o=t.options.filterFns)?void 0:o[e.columnDef.filterFn])?n:Hn[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,r;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(o=t.options.enableColumnFilters)||o)&&(null==(r=t.options.enableFilters)||r)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,o;return null!=(n=null==(o=t.getState().columnFilters)?void 0:o.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const o=e.getFilterFn(),r=null==t?void 0:t.find((t=>t.id===e.id)),i=xn(n,r?r.value:void 0);var l;if(Gn(o,i,e))return null!=(l=null==t?void 0:t.filter((t=>t.id!==e.id)))?l:[];const a={id:e.id,value:i};var s;return r?null!=(s=null==t?void 0:t.map((t=>t.id===e.id?a:t)))?s:[]:null!=t&&t.length?[...t,a]:[a]}))}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=xn(t,e))?void 0:o.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(Gn(t.getFilterFn(),e.value,t))return!1}return!0}))}))},e.resetColumnFilters=t=>{var n,o;e.setColumnFilters(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Gn(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||typeof t>"u"||"string"==typeof t&&!t}const qn={sum:(e,t,n)=>n.reduce(((t,n)=>{const o=n.getValue(e);return t+("number"==typeof o?o:0)}),0),min:(e,t,n)=>{let o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(o>n||void 0===o&&n>=n)&&(o=n)})),o},max:(e,t,n)=>{let o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(o<n||void 0===o&&n>=n)&&(o=n)})),o},extent:(e,t,n)=>{let o,r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===o?n>=n&&(o=r=n):(o>n&&(o=n),r<n&&(r=n)))})),[o,r]},mean:(e,t)=>{let n=0,o=0;if(t.forEach((t=>{let r=t.getValue(e);null!=r&&(r=+r)>=r&&(++n,o+=r)})),n)return o/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(!function(e){return Array.isArray(e)&&e.every((e=>"number"==typeof e))}(n))return;if(1===n.length)return n[0];const o=Math.floor(n.length/2),r=n.sort(((e,t)=>e-t));return n.length%2!=0?r[o]:(r[o-1]+r[o])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},Un={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Cn("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...t??[],e.id]))},e.getCanGroup=()=>{var n,o;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(o=t.options.enableGrouping)||o)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=null==n?void 0:n.getValue(e.id);return"number"==typeof o?qn.sum:"[object Date]"===Object.prototype.toString.call(o)?qn.extent:void 0},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return Sn(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(o=t.options.aggregationFns)?void 0:o[e.columnDef.aggregationFn])?n:qn[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,o;e.setGrouping(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const o=t.getColumn(n);return null!=o&&o.columnDef.getGroupingValue?(e._groupingValuesCache[n]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}};const Wn={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Cn("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Rn((e=>[eo(t,e)]),(t=>t.findIndex((t=>t.id===e.id))),En(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var o;return(null==(o=eo(t,n)[0])?void 0:o.id)===e.id},e.getIsLastColumn=n=>{var o;const r=eo(t,n);return(null==(o=r[r.length-1])?void 0:o.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=Rn((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>o=>{let r=[];if(null!=e&&e.length){const t=[...e],n=[...o];for(;n.length&&t.length;){const e=t.shift(),o=n.findIndex((t=>t.id===e));o>-1&&r.push(n.splice(o,1)[0])}r=[...r,...n]}else r=o;return function(e,t,n){if(null==t||!t.length||!n)return e;const o=e.filter((e=>!t.includes(e.id)));return"remove"===n?o:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...o]}(r,t,n)}),En(e.options,"debugTable","_getOrderColumnsFn"))}},Kn={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:Cn("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,r,i,l,a,s;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=o&&o.includes(e)))),right:[...(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=o&&o.includes(e)))),...o]}:"left"===n?{left:[...(null!=(a=null==e?void 0:e.left)?a:[]).filter((e=>!(null!=o&&o.includes(e)))),...o],right:(null!=(s=null==e?void 0:e.right)?s:[]).filter((e=>!(null!=o&&o.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=o&&o.includes(e)))),right:(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=o&&o.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,o,r;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(o=null!=(r=t.options.enableColumnPinning)?r:t.options.enablePinning)||o)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:o,right:r}=t.getState().columnPinning,i=n.some((e=>null==o?void 0:o.includes(e))),l=n.some((e=>null==r?void 0:r.includes(e)));return i?"left":!!l&&"right"},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();return r?null!=(n=null==(o=t.getState().columnPinning)||null==(o=o[r])?void 0:o.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Rn((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const o=[...t??[],...n??[]];return e.filter((e=>!o.includes(e.column.id)))}),En(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=Rn((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),En(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=Rn((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),En(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,o;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(o=e.initialState)?void 0:o.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;var r,i;return t?!(null==(n=o[t])||!n.length):!!(null!=(r=o.left)&&r.length||null!=(i=o.right)&&i.length)},e.getLeftLeafColumns=Rn((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),En(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=Rn((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),En(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=Rn((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const o=[...t??[],...n??[]];return e.filter((e=>!o.includes(e.id)))}),En(e.options,"debugColumns","getCenterLeafColumns"))}};const Xn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Yn={getDefaultColumnDef:()=>Xn,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Cn("columnSizing",e),onColumnSizingInfoChange:Cn("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,r;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:Xn.minSize,null!=(o=i??e.columnDef.size)?o:Xn.size),null!=(r=e.columnDef.maxSize)?r:Xn.maxSize)},e.getStart=Rn((e=>[e,eo(t,e),t.getState().columnSizing]),((t,n)=>n.slice(0,e.getIndex(t)).reduce(((e,t)=>e+t.getSize()),0)),En(t.options,"debugColumns","getStart")),e.getAfter=Rn((e=>[e,eo(t,e),t.getState().columnSizing]),((t,n)=>n.slice(e.getIndex(t)+1).reduce(((e,t)=>e+t.getSize()),0)),En(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...o}=t;return o}))},e.getCanResize=()=>{var n,o;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(o=t.options.enableColumnResizing)||o)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var o;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(o=e.column.getSize())?o:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const o=t.getColumn(e.column.id),r=null==o?void 0:o.getCanResize();return i=>{if(!o||!r||(null==i.persist||i.persist(),Zn(i)&&i.touches&&i.touches.length>1))return;const l=e.getSize(),a=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[o.id,o.getSize()]],s=Zn(i)?Math.round(i.touches[0].clientX):i.clientX,u={},c=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var o,r;const i="rtl"===t.options.columnResizeDirection?-1:1,l=(n-(null!=(o=null==e?void 0:e.startOffset)?o:0))*i,a=Math.max(l/(null!=(r=null==e?void 0:e.startSize)?r:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;u[t]=Math.round(100*Math.max(n+n*a,0))/100})),{...e,deltaOffset:l,deltaPercentage:a}})),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing((e=>({...e,...u}))))},d=e=>c("move",e),g=e=>{c("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p=function(e){return e||(typeof document<"u"?document:null)}(n),f={moveHandler:e=>d(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",f.moveHandler),null==p||p.removeEventListener("mouseup",f.upHandler),g(e.clientX)}},h={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{var t;null==p||p.removeEventListener("touchmove",h.moveHandler),null==p||p.removeEventListener("touchend",h.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),g(null==(t=e.touches[0])?void 0:t.clientX)}},m=!!function(){if("boolean"==typeof Jn)return Jn;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Jn=e,Jn}()&&{passive:!1};Zn(i)?(null==p||p.addEventListener("touchmove",h.moveHandler,m),null==p||p.addEventListener("touchend",h.upHandler,m)):(null==p||p.addEventListener("mousemove",f.moveHandler,m),null==p||p.addEventListener("mouseup",f.upHandler,m)),t.setColumnSizingInfo((e=>({...e,startOffset:s,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:o.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let Jn=null;function Zn(e){return"touchstart"===e.type}const Qn={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Cn("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:n??!e.getIsVisible()})))},e.getIsVisible=()=>{var n,o;const r=e.columns;return null==(n=r.length?r.some((e=>e.getIsVisible())):null==(o=t.getState().columnVisibility)?void 0:o[e.id])||n},e.getCanHide=()=>{var n,o;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(o=t.options.enableHiding)||o)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Rn((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),En(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=Rn((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),En(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(t,n)=>Rn((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),En(e.options,"debugColumns",t));e.getVisibleFlatColumns=t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}};function eo(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const to={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},no={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Cn("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const o=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof o||"number"==typeof o}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,o,r,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(o=t.options.enableGlobalFilter)||o)&&(null==(r=t.options.enableFilters)||r)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Hn.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return Sn(o)?o:"auto"===o?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[o])?t:Hn[o]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},oo={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Cn("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,r;if(t){if(null!=(o=null!=(r=e.options.autoResetAll)?r:e.options.autoResetExpanded)?o:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,o;e.setExpanded(t?{}:null!=(n=null==(o=e.initialState)?void 0:o.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some((e=>!e.getIsExpanded())))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((o=>{var r;const i=!0===o||!(null==o||!o[e.id]);let l={};if(!0===o?Object.keys(t.getRowModel().rowsById).forEach((e=>{l[e]=!0})):l=o,n=null!=(r=n)?r:!i,!i&&n)return{...l,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=l;return n}return o}))},e.getIsExpanded=()=>{var n;const o=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===o||null!=o&&o[e.id])},e.getCanExpand=()=>{var n,o,r;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(o=t.options.enableExpanding)||o)&&!(null==(r=e.subRows)||!r.length)},e.getIsAllParentsExpanded=()=>{let n=!0,o=e;for(;n&&o.parentId;)o=t.getRow(o.parentId,!0),n=o.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},ro={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Cn("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,r;if(t){if(null!=(o=null!=(r=e.options.autoResetAll)?r:e.options.autoResetPageIndex)?o:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>xn(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let o=xn(t,n.pageIndex);const r=typeof e.options.pageCount>"u"||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,r)),{...n,pageIndex:o}}))},e.resetPageIndex=t=>{var n,o;e.setPageIndex(t?0:null!=(n=null==(o=e.initialState)||null==(o=o.pagination)?void 0:o.pageIndex)?n:0)},e.resetPageSize=t=>{var n,o;e.setPageSize(t?10:null!=(n=null==(o=e.initialState)||null==(o=o.pagination)?void 0:o.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,xn(t,e.pageSize)),o=e.pageSize*e.pageIndex,r=Math.floor(o/n);return{...e,pageIndex:r,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var o;let r=xn(t,null!=(o=e.options.pageCount)?o:-1);return"number"==typeof r&&(r=Math.max(-1,r)),{...n,pageCount:r}})),e.getPageOptions=Rn((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),En(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},io={getInitialState:e=>({rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:Cn("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,o,r)=>{const i=o?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],l=r?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],a=new Set([...l,e.id,...i]);t.setRowPinning((e=>{var t,o,r,i,l,s;return"bottom"===n?{top:(null!=(r=null==e?void 0:e.top)?r:[]).filter((e=>!(null!=a&&a.has(e)))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter((e=>!(null!=a&&a.has(e)))),...Array.from(a)]}:"top"===n?{top:[...(null!=(l=null==e?void 0:e.top)?l:[]).filter((e=>!(null!=a&&a.has(e)))),...Array.from(a)],bottom:(null!=(s=null==e?void 0:e.bottom)?s:[]).filter((e=>!(null!=a&&a.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=a&&a.has(e)))),bottom:(null!=(o=null==e?void 0:e.bottom)?o:[]).filter((e=>!(null!=a&&a.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:r}=t.options;return"function"==typeof o?o(e):null==(n=o??r)||n},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:r}=t.getState().rowPinning,i=n.some((e=>null==o?void 0:o.includes(e))),l=n.some((e=>null==r?void 0:r.includes(e)));return i?"top":!!l&&"bottom"},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();if(!r)return-1;const i=null==(n="top"===r?t.getTopRows():t.getBottomRows())?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(o=null==i?void 0:i.indexOf(e.id))?o:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,o;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(o=e.initialState)?void 0:o.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;var r,i;return t?!(null==(n=o[t])||!n.length):!!(null!=(r=o.top)&&r.length||null!=(i=o.bottom)&&i.length)},e._getPinnedRows=(t,n,o)=>{var r;return(null==(r=e.options.keepPinnedRows)||r?(n??[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(n??[]).map((e=>t.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:o})))},e.getTopRows=Rn((()=>[e.getRowModel().rows,e.getState().rowPinning.top]),((t,n)=>e._getPinnedRows(t,n,"top")),En(e.options,"debugRows","getTopRows")),e.getBottomRows=Rn((()=>[e.getRowModel().rows,e.getState().rowPinning.bottom]),((t,n)=>e._getPinnedRows(t,n,"bottom")),En(e.options,"debugRows","getBottomRows")),e.getCenterRows=Rn((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const o=new Set([...t??[],...n??[]]);return e.filter((e=>!o.has(e.id)))}),En(e.options,"debugRows","getCenterRows"))}},lo={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Cn("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const o={...n},r=e.getPreGroupedRowModel().flatRows;return t?r.forEach((e=>{e.getCanSelect()&&(o[e.id]=!0)})):r.forEach((e=>{delete o[e.id]})),o}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),r={...n};return e.getRowModel().rows.forEach((t=>{ao(r,t.id,o,!0,e)})),r})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Rn((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?so(e,n):{rows:[],flatRows:[],rowsById:{}}),En(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=Rn((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?so(e,n):{rows:[],flatRows:[],rowsById:{}}),En(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=Rn((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?so(e,n):{rows:[],flatRows:[],rowsById:{}}),En(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let o=!(!t.length||!Object.keys(n).length);return o&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some((e=>!n[e.id]))&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,o)=>{const r=e.getIsSelected();t.setRowSelection((i=>{var l;if(n=typeof n<"u"?n:!r,e.getCanSelect()&&r===n)return i;const a={...i};return ao(a,e.id,n,null==(l=null==o?void 0:o.selectChildren)||l,t),a}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return uo(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===co(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===co(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var o;t&&e.toggleSelected(null==(o=n.target)?void 0:o.checked)}}}},ao=(e,t,n,o,r)=>{var i;const l=r.getRow(t,!0);n?(l.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),l.getCanSelect()&&(e[t]=!0)):delete e[t],o&&null!=(i=l.subRows)&&i.length&&l.getCanSelectSubRows()&&l.subRows.forEach((t=>ao(e,t.id,n,o,r)))};function so(e,t){const n=e.getState().rowSelection,o=[],r={},i=function(e,t){return e.map((e=>{var t;const l=uo(e,n);if(l&&(o.push(e),r[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),l)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:o,rowsById:r}}function uo(e,t){var n;return null!=(n=t[e.id])&&n}function co(e,t,n){var o;if(null==(o=e.subRows)||!o.length)return!1;let r=!0,i=!1;return e.subRows.forEach((e=>{if((!i||r)&&(e.getCanSelect()&&(uo(e,t)?i=!0:r=!1),e.subRows&&e.subRows.length)){const n=co(e,t);"all"===n?i=!0:("some"===n&&(i=!0),r=!1)}})),r?"all":!!i&&"some"}const go=/([0-9]+)/gm;function po(e,t){return e===t?0:e>t?1:-1}function fo(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function ho(e,t){const n=e.split(go).filter(Boolean),o=t.split(go).filter(Boolean);for(;n.length&&o.length;){const e=n.shift(),t=o.shift(),r=parseInt(e,10),i=parseInt(t,10),l=[r,i].sort();if(isNaN(l[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>i)return 1;if(i>r)return-1}}return n.length-o.length}const mo={alphanumeric:(e,t,n)=>ho(fo(e.getValue(n)).toLowerCase(),fo(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>ho(fo(e.getValue(n)),fo(t.getValue(n))),text:(e,t,n)=>po(fo(e.getValue(n)).toLowerCase(),fo(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>po(fo(e.getValue(n)),fo(t.getValue(n))),datetime:(e,t,n)=>{const o=e.getValue(n),r=t.getValue(n);return o>r?1:o<r?-1:0},basic:(e,t,n)=>po(e.getValue(n),t.getValue(n))},bo={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Cn("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return mo.datetime;if("string"==typeof n&&(o=!0,n.split(go).length>1))return mo.alphanumeric}return o?mo.text:mo.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,o;if(!e)throw new Error;return Sn(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(o=t.options.sortingFns)?void 0:o[e.columnDef.sortingFn])?n:mo[e.columnDef.sortingFn]},e.toggleSorting=(n,o)=>{const r=e.getNextSortingOrder(),i=typeof n<"u"&&null!==n;t.setSorting((l=>{const a=null==l?void 0:l.find((t=>t.id===e.id)),s=null==l?void 0:l.findIndex((t=>t.id===e.id));let u,c=[],d=i?n:"desc"===r;var g;(u=null!=l&&l.length&&e.getCanMultiSort()&&o?a?"toggle":"add":null!=l&&l.length&&s!==l.length-1?"replace":a?"toggle":"replace","toggle"===u&&(i||r||(u="remove")),"add"===u)?(c=[...l,{id:e.id,desc:d}],c.splice(0,c.length-(null!=(g=t.options.maxMultiSortColCount)?g:Number.MAX_SAFE_INTEGER))):c="toggle"===u?l.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===u?l.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}];return c}))},e.getFirstSortDir=()=>{var n,o;return(null!=(n=null!=(o=e.columnDef.sortDescFirst)?o:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var o,r;const i=e.getFirstSortDir(),l=e.getIsSorted();return l?!!(l===i||null!=(o=t.options.enableSortingRemoval)&&!o||n&&null!=(r=t.options.enableMultiRemove)&&!r)&&("desc"===l?"asc":"desc"):i},e.getCanSort=()=>{var n,o;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(o=t.options.enableSorting)||o)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,o;return null!=(n=null!=(o=e.columnDef.enableMultiSort)?o:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const o=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!o&&(o.desc?"desc":"asc")},e.getSortIndex=()=>{var n,o;return null!=(n=null==(o=t.getState().sorting)?void 0:o.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return o=>{n&&(null==o.persist||o.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(o))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,o;e.setSorting(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},vo=[In,Qn,Wn,Kn,Nn,Bn,to,no,bo,Un,oo,ro,io,lo,Yn];function wo(e){var t,n;"production"!==process.env.NODE_ENV&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...vo,...null!=(t=e._features)?t:[]];let r={_features:o};const i=r._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(r))),{});let l={...null!=(n=e.initialState)?n:{}};r._features.forEach((e=>{var t;l=null!=(t=null==e.getInitialState?void 0:e.getInitialState(l))?t:l}));const a=[];let s=!1;const u={_features:o,options:{...i,...e},initialState:l,_queue:e=>{a.push(e),s||(s=!0,Promise.resolve().then((()=>{for(;a.length;)a.shift()();s=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{r.setState(r.initialState)},setOptions:e=>{const t=xn(e,r.options);r.options=(e=>r.options.mergeOptions?r.options.mergeOptions(i,e):{...i,...e})(t)},getState:()=>r.options.state,setState:e=>{null==r.options.onStateChange||r.options.onStateChange(e)},_getRowId:(e,t,n)=>{var o;return null!=(o=null==r.options.getRowId?void 0:r.options.getRowId(e,t,n))?o:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(r._getCoreRowModel||(r._getCoreRowModel=r.options.getCoreRowModel(r)),r._getCoreRowModel()),getRowModel:()=>r.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?r.getPrePaginationRowModel():r.getRowModel()).rowsById[e];if(!n&&(n=r.getCoreRowModel().rowsById[e],!n))throw"production"!==process.env.NODE_ENV?new Error(`getRow could not find row with ID: ${e}`):new Error;return n},_getDefaultColumnDef:Rn((()=>[r.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...r._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),En(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>r.options.columns,getAllColumns:Rn((()=>[r._getColumnDefs()]),(e=>{const t=function(e,n,o){return void 0===o&&(o=0),e.map((e=>{const i=function(e,t,n,o){var r,i;const l={...e._getDefaultColumnDef(),...t},a=l.accessorKey;let s,u=null!=(r=null!=(i=l.id)?i:a?"function"==typeof String.prototype.replaceAll?a.replaceAll(".","_"):a.replace(/\./g,"_"):void 0)?r:"string"==typeof l.header?l.header:void 0;if(l.accessorFn?s=l.accessorFn:a&&(s=a.includes(".")?e=>{let t=e;for(const e of a.split(".")){var n;t=null==(n=t)?void 0:n[e],"production"!==process.env.NODE_ENV&&void 0===t&&console.warn(`"${e}" in deeply nested key "${a}" returned undefined.`)}return t}:e=>e[l.accessorKey]),!u)throw"production"!==process.env.NODE_ENV?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let c={id:`${String(u)}`,accessorFn:s,parent:o,depth:n,columnDef:l,columns:[],getFlatColumns:Rn((()=>[!0]),(()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),En(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Rn((()=>[e._getOrderColumnsFn()]),(e=>{var t;return null!=(t=c.columns)&&t.length?e(c.columns.flatMap((e=>e.getLeafColumns()))):[c]}),En(e.options,"debugColumns","column.getLeafColumns"))};for(const t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(r,e,o,n),l=e;return i.columns=l.columns?t(l.columns,i,o+1):[],i}))};return t(e)}),En(e,"debugColumns","getAllColumns")),getAllFlatColumns:Rn((()=>[r.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),En(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:Rn((()=>[r.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),En(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:Rn((()=>[r.getAllColumns(),r._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),En(e,"debugColumns","getAllLeafColumns")),getColumn:e=>{const t=r._getAllFlatColumnsById()[e];return"production"!==process.env.NODE_ENV&&!t&&console.error(`[Table] Column with id '${e}' does not exist.`),t}};Object.assign(r,u);for(let e=0;e<r._features.length;e++){const t=r._features[e];null==t||null==t.createTable||t.createTable(r)}return r}function yo(e){const t=[],n=e=>{var o;t.push(e),null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function xo(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){var o;const r=[],i={},l=null!=(o=n.options.maxLeafRowFilterDepth)?o:100,a=function(e,o){void 0===o&&(o=0);const s=[];for(let c=0;c<e.length;c++){var u;let d=e[c];const g=On(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);if(g.columnFilters=d.columnFilters,null!=(u=d.subRows)&&u.length&&o<l){if(g.subRows=a(d.subRows,o+1),d=g,t(d)&&!g.subRows.length){s.push(d),i[d.id]=d,r.push(d);continue}if(t(d)||g.subRows.length){s.push(d),i[d.id]=d,r.push(d);continue}}else d=g,t(d)&&(s.push(d),i[d.id]=d,r.push(d))}return s};return{rows:a(e),flatRows:r,rowsById:i}}(e,t,n):function(e,t,n){var o;const r=[],i={},l=null!=(o=n.options.maxLeafRowFilterDepth)?o:100,a=function(e,o){void 0===o&&(o=0);const s=[];for(let c=0;c<e.length;c++){let d=e[c];if(t(d)){var u;if(null!=(u=d.subRows)&&u.length&&o<l){const e=On(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);e.subRows=a(d.subRows,o+1),d=e}s.push(d),r.push(d),i[d.id]=d}}return s};return{rows:a(e),flatRows:r,rowsById:i}}(e,t,n)}
|
|
29
|
+
*/function wn(){return{accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function yn(e,t){return"function"==typeof e?e(t):e}function xn(e,t){return n=>{t.setState((t=>({...t,[e]:yn(n,t[e])})))}}function Cn(e){return e instanceof Function}function Sn(e,t,n){let o,r=[];return i=>{let l;n.key&&n.debug&&(l=Date.now());const a=e(i);if(a.length===r.length&&!a.some(((e,t)=>r[t]!==e)))return o;let s;if(r=a,n.key&&n.debug&&(s=Date.now()),o=t(...a),null==n||null==n.onChange||n.onChange(o),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-l))/100,t=Math.round(100*(Date.now()-s))/100,o=t/16,r=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${r(t,5)} /${r(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*o,120))}deg 100% 31%);`,null==n?void 0:n.key)}return o}}function Rn(e,t,n,o){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:"development"===process.env.NODE_ENV&&n,onChange:o}}const En="debugHeaders";function _n(e,t,n){var o;let r={id:null!=(o=n.id)?o:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(r),e},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(r,e)})),r}const kn={createTable:e=>{e.getHeaderGroups=Sn((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,o,r)=>{var i,l;const a=null!=(i=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],s=null!=(l=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?l:[];return In(t,[...a,...n.filter((e=>!(null!=o&&o.includes(e.id)||null!=r&&r.includes(e.id)))),...s],e)}),Rn(e.options,En,"getHeaderGroups")),e.getCenterHeaderGroups=Sn((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,o,r)=>In(t,n=n.filter((e=>!(null!=o&&o.includes(e.id)||null!=r&&r.includes(e.id)))),e,"center")),Rn(e.options,En,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Sn((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,o)=>{var r;return In(t,null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[],e,"left")}),Rn(e.options,En,"getLeftHeaderGroups")),e.getRightHeaderGroups=Sn((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,o)=>{var r;return In(t,null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[],e,"right")}),Rn(e.options,En,"getRightHeaderGroups")),e.getFooterGroups=Sn((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),Rn(e.options,En,"getFooterGroups")),e.getLeftFooterGroups=Sn((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),Rn(e.options,En,"getLeftFooterGroups")),e.getCenterFooterGroups=Sn((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),Rn(e.options,En,"getCenterFooterGroups")),e.getRightFooterGroups=Sn((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),Rn(e.options,En,"getRightFooterGroups")),e.getFlatHeaders=Sn((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),Rn(e.options,En,"getFlatHeaders")),e.getLeftFlatHeaders=Sn((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),Rn(e.options,En,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Sn((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),Rn(e.options,En,"getCenterFlatHeaders")),e.getRightFlatHeaders=Sn((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),Rn(e.options,En,"getRightFlatHeaders")),e.getCenterLeafHeaders=Sn((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),Rn(e.options,En,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Sn((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),Rn(e.options,En,"getLeftLeafHeaders")),e.getRightLeafHeaders=Sn((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),Rn(e.options,En,"getRightLeafHeaders")),e.getLeafHeaders=Sn((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var o,r,i,l,a,s;return[...null!=(o=null==(r=e[0])?void 0:r.headers)?o:[],...null!=(i=null==(l=t[0])?void 0:l.headers)?i:[],...null!=(a=null==(s=n[0])?void 0:s.headers)?a:[]].map((e=>e.getLeafHeaders())).flat()}),Rn(e.options,En,"getLeafHeaders"))}};function In(e,t,n,o){var r,i;let l=0;const a=function(e,t){void 0===t&&(t=1),l=Math.max(l,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&a(e.columns,t+1)}),0)};a(e);let s=[];const u=(e,t)=>{const r={depth:t,id:[o,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const l=[...i].reverse()[0];let a,s=!1;if(e.column.depth===r.depth&&e.column.parent?a=e.column.parent:(a=e.column,s=!0),l&&(null==l?void 0:l.column)===a)l.subHeaders.push(e);else{const r=_n(n,a,{id:[o,t,a.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:s,placeholderId:s?`${i.filter((e=>e.column===a)).length}`:void 0,depth:t,index:i.length});r.subHeaders.push(e),i.push(r)}r.headers.push(e),e.headerGroup=r})),s.push(r),t>0&&u(i,t-1)},c=t.map(((e,t)=>_n(n,e,{depth:l,index:t})));u(c,l-1),s.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,o=[0];e.subHeaders&&e.subHeaders.length?(o=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:r}=e;t+=n,o.push(r)}))):t=1;return n+=Math.min(...o),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(r=null==(i=s[0])?void 0:i.headers)?r:[]),s}const Dn=(e,t,n,o,r,i,l)=>{let a={id:t,index:o,original:n,depth:r,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(a._valuesCache.hasOwnProperty(t))return a._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(a._valuesCache[t]=n.accessorFn(a.original,o),a._valuesCache[t]):void 0},getUniqueValues:t=>{if(a._uniqueValuesCache.hasOwnProperty(t))return a._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(a._uniqueValuesCache[t]=n.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[t]):(a._uniqueValuesCache[t]=[a.getValue(t)],a._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=a.getValue(t))?n:e.options.renderFallbackValue},subRows:i??[],getLeafRows:()=>function(e,t){const n=[],o=e=>{e.forEach((e=>{n.push(e);const r=t(e);null!=r&&r.length&&o(r)}))};return o(e),n}(a.subRows,(e=>e.subRows)),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let e=[],t=a;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:Sn((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,o){const r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:()=>{var t;return null!=(t=r.getValue())?t:e.options.renderFallbackValue},getContext:Sn((()=>[e,n,t,r]),((e,t,n,o)=>({table:e,column:t,row:n,cell:o,getValue:o.getValue,renderValue:o.renderValue})),Rn(e.options,"debugCells","cell.getContext"))};return e._features.forEach((o=>{null==o.createCell||o.createCell(r,n,t,e)}),{}),r}(e,a,t,t.id)))),Rn(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:Sn((()=>[a.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),Rn(e.options,"debugRows","getAllCellsByColumnId"))};for(let t=0;t<e._features.length;t++){const n=e._features[t];null==n||null==n.createRow||n.createRow(a,e)}return a},On={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Nn=(e,t,n)=>{var o,r;const i=null==n||null==(o=n.toString())?void 0:o.toLowerCase();return!(null==(r=e.getValue(t))||null==(r=r.toString())||null==(r=r.toLowerCase())||!r.includes(i))};Nn.autoRemove=e=>Hn(e);const Mn=(e,t,n)=>{var o;return!(null==(o=e.getValue(t))||null==(o=o.toString())||!o.includes(n))};Mn.autoRemove=e=>Hn(e);const Fn=(e,t,n)=>{var o;return(null==(o=e.getValue(t))||null==(o=o.toString())?void 0:o.toLowerCase())===(null==n?void 0:n.toLowerCase())};Fn.autoRemove=e=>Hn(e);const Pn=(e,t,n)=>{var o;return null==(o=e.getValue(t))?void 0:o.includes(n)};Pn.autoRemove=e=>Hn(e);const jn=(e,t,n)=>!n.some((n=>{var o;return!(null!=(o=e.getValue(t))&&o.includes(n))}));jn.autoRemove=e=>Hn(e)||!(null!=e&&e.length);const An=(e,t,n)=>n.some((n=>{var o;return null==(o=e.getValue(t))?void 0:o.includes(n)}));An.autoRemove=e=>Hn(e)||!(null!=e&&e.length);const Tn=(e,t,n)=>e.getValue(t)===n;Tn.autoRemove=e=>Hn(e);const Vn=(e,t,n)=>e.getValue(t)==n;Vn.autoRemove=e=>Hn(e);const Ln=(e,t,n)=>{let[o,r]=n;const i=e.getValue(t);return i>=o&&i<=r};Ln.resolveFilterValue=e=>{let[t,n]=e,o="number"!=typeof t?parseFloat(t):t,r="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(o)?-1/0:o,l=null===n||Number.isNaN(r)?1/0:r;if(i>l){const e=i;i=l,l=e}return[i,l]},Ln.autoRemove=e=>Hn(e)||Hn(e[0])&&Hn(e[1]);const zn={includesString:Nn,includesStringSensitive:Mn,equalsString:Fn,arrIncludes:Pn,arrIncludesAll:jn,arrIncludesSome:An,equals:Tn,weakEquals:Vn,inNumberRange:Ln};function Hn(e){return null==e||""===e}const $n={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:xn("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=null==n?void 0:n.getValue(e.id);return"string"==typeof o?zn.includesString:"number"==typeof o?zn.inNumberRange:"boolean"==typeof o||null!==o&&"object"==typeof o?zn.equals:Array.isArray(o)?zn.arrIncludes:zn.weakEquals},e.getFilterFn=()=>{var n,o;return Cn(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(o=t.options.filterFns)?void 0:o[e.columnDef.filterFn])?n:zn[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,r;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(o=t.options.enableColumnFilters)||o)&&(null==(r=t.options.enableFilters)||r)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,o;return null!=(n=null==(o=t.getState().columnFilters)?void 0:o.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const o=e.getFilterFn(),r=null==t?void 0:t.find((t=>t.id===e.id)),i=yn(n,r?r.value:void 0);var l;if(Bn(o,i,e))return null!=(l=null==t?void 0:t.filter((t=>t.id!==e.id)))?l:[];const a={id:e.id,value:i};var s;return r?null!=(s=null==t?void 0:t.map((t=>t.id===e.id?a:t)))?s:[]:null!=t&&t.length?[...t,a]:[a]}))}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=yn(t,e))?void 0:o.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(Bn(t.getFilterFn(),e.value,t))return!1}return!0}))}))},e.resetColumnFilters=t=>{var n,o;e.setColumnFilters(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Bn(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||typeof t>"u"||"string"==typeof t&&!t}const Gn={sum:(e,t,n)=>n.reduce(((t,n)=>{const o=n.getValue(e);return t+("number"==typeof o?o:0)}),0),min:(e,t,n)=>{let o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(o>n||void 0===o&&n>=n)&&(o=n)})),o},max:(e,t,n)=>{let o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(o<n||void 0===o&&n>=n)&&(o=n)})),o},extent:(e,t,n)=>{let o,r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===o?n>=n&&(o=r=n):(o>n&&(o=n),r<n&&(r=n)))})),[o,r]},mean:(e,t)=>{let n=0,o=0;if(t.forEach((t=>{let r=t.getValue(e);null!=r&&(r=+r)>=r&&(++n,o+=r)})),n)return o/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(!function(e){return Array.isArray(e)&&e.every((e=>"number"==typeof e))}(n))return;if(1===n.length)return n[0];const o=Math.floor(n.length/2),r=n.sort(((e,t)=>e-t));return n.length%2!=0?r[o]:(r[o-1]+r[o])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},qn={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:xn("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...t??[],e.id]))},e.getCanGroup=()=>{var n,o;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(o=t.options.enableGrouping)||o)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=null==n?void 0:n.getValue(e.id);return"number"==typeof o?Gn.sum:"[object Date]"===Object.prototype.toString.call(o)?Gn.extent:void 0},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return Cn(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(o=t.options.aggregationFns)?void 0:o[e.columnDef.aggregationFn])?n:Gn[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,o;e.setGrouping(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const o=t.getColumn(n);return null!=o&&o.columnDef.getGroupingValue?(e._groupingValuesCache[n]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}};const Un={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xn("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Sn((e=>[Qn(t,e)]),(t=>t.findIndex((t=>t.id===e.id))),Rn(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var o;return(null==(o=Qn(t,n)[0])?void 0:o.id)===e.id},e.getIsLastColumn=n=>{var o;const r=Qn(t,n);return(null==(o=r[r.length-1])?void 0:o.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=Sn((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>o=>{let r=[];if(null!=e&&e.length){const t=[...e],n=[...o];for(;n.length&&t.length;){const e=t.shift(),o=n.findIndex((t=>t.id===e));o>-1&&r.push(n.splice(o,1)[0])}r=[...r,...n]}else r=o;return function(e,t,n){if(null==t||!t.length||!n)return e;const o=e.filter((e=>!t.includes(e.id)));return"remove"===n?o:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...o]}(r,t,n)}),Rn(e.options,"debugTable","_getOrderColumnsFn"))}},Wn={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:xn("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,r,i,l,a,s;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=o&&o.includes(e)))),right:[...(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=o&&o.includes(e)))),...o]}:"left"===n?{left:[...(null!=(a=null==e?void 0:e.left)?a:[]).filter((e=>!(null!=o&&o.includes(e)))),...o],right:(null!=(s=null==e?void 0:e.right)?s:[]).filter((e=>!(null!=o&&o.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=o&&o.includes(e)))),right:(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=o&&o.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,o,r;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(o=null!=(r=t.options.enableColumnPinning)?r:t.options.enablePinning)||o)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:o,right:r}=t.getState().columnPinning,i=n.some((e=>null==o?void 0:o.includes(e))),l=n.some((e=>null==r?void 0:r.includes(e)));return i?"left":!!l&&"right"},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();return r?null!=(n=null==(o=t.getState().columnPinning)||null==(o=o[r])?void 0:o.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Sn((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const o=[...t??[],...n??[]];return e.filter((e=>!o.includes(e.column.id)))}),Rn(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=Sn((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),Rn(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=Sn((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),Rn(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,o;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(o=e.initialState)?void 0:o.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;var r,i;return t?!(null==(n=o[t])||!n.length):!!(null!=(r=o.left)&&r.length||null!=(i=o.right)&&i.length)},e.getLeftLeafColumns=Sn((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),Rn(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=Sn((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),Rn(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=Sn((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const o=[...t??[],...n??[]];return e.filter((e=>!o.includes(e.id)))}),Rn(e.options,"debugColumns","getCenterLeafColumns"))}};const Kn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Xn={getDefaultColumnDef:()=>Kn,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:xn("columnSizing",e),onColumnSizingInfoChange:xn("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,r;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:Kn.minSize,null!=(o=i??e.columnDef.size)?o:Kn.size),null!=(r=e.columnDef.maxSize)?r:Kn.maxSize)},e.getStart=Sn((e=>[e,Qn(t,e),t.getState().columnSizing]),((t,n)=>n.slice(0,e.getIndex(t)).reduce(((e,t)=>e+t.getSize()),0)),Rn(t.options,"debugColumns","getStart")),e.getAfter=Sn((e=>[e,Qn(t,e),t.getState().columnSizing]),((t,n)=>n.slice(e.getIndex(t)+1).reduce(((e,t)=>e+t.getSize()),0)),Rn(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...o}=t;return o}))},e.getCanResize=()=>{var n,o;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(o=t.options.enableColumnResizing)||o)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var o;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(o=e.column.getSize())?o:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const o=t.getColumn(e.column.id),r=null==o?void 0:o.getCanResize();return i=>{if(!o||!r||(null==i.persist||i.persist(),Jn(i)&&i.touches&&i.touches.length>1))return;const l=e.getSize(),a=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[o.id,o.getSize()]],s=Jn(i)?Math.round(i.touches[0].clientX):i.clientX,u={},c=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var o,r;const i="rtl"===t.options.columnResizeDirection?-1:1,l=(n-(null!=(o=null==e?void 0:e.startOffset)?o:0))*i,a=Math.max(l/(null!=(r=null==e?void 0:e.startSize)?r:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;u[t]=Math.round(100*Math.max(n+n*a,0))/100})),{...e,deltaOffset:l,deltaPercentage:a}})),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing((e=>({...e,...u}))))},d=e=>c("move",e),g=e=>{c("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p=function(e){return e||(typeof document<"u"?document:null)}(n),f={moveHandler:e=>d(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",f.moveHandler),null==p||p.removeEventListener("mouseup",f.upHandler),g(e.clientX)}},h={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{var t;null==p||p.removeEventListener("touchmove",h.moveHandler),null==p||p.removeEventListener("touchend",h.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),g(null==(t=e.touches[0])?void 0:t.clientX)}},m=!!function(){if("boolean"==typeof Yn)return Yn;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Yn=e,Yn}()&&{passive:!1};Jn(i)?(null==p||p.addEventListener("touchmove",h.moveHandler,m),null==p||p.addEventListener("touchend",h.upHandler,m)):(null==p||p.addEventListener("mousemove",f.moveHandler,m),null==p||p.addEventListener("mouseup",f.upHandler,m)),t.setColumnSizingInfo((e=>({...e,startOffset:s,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:o.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let Yn=null;function Jn(e){return"touchstart"===e.type}const Zn={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:xn("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:n??!e.getIsVisible()})))},e.getIsVisible=()=>{var n,o;const r=e.columns;return null==(n=r.length?r.some((e=>e.getIsVisible())):null==(o=t.getState().columnVisibility)?void 0:o[e.id])||n},e.getCanHide=()=>{var n,o;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(o=t.options.enableHiding)||o)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Sn((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),Rn(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=Sn((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),Rn(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(t,n)=>Sn((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),Rn(e.options,"debugColumns",t));e.getVisibleFlatColumns=t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}};function Qn(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const eo={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},to={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:xn("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const o=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof o||"number"==typeof o}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,o,r,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(o=t.options.enableGlobalFilter)||o)&&(null==(r=t.options.enableFilters)||r)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>zn.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return Cn(o)?o:"auto"===o?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[o])?t:zn[o]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},no={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:xn("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,r;if(t){if(null!=(o=null!=(r=e.options.autoResetAll)?r:e.options.autoResetExpanded)?o:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,o;e.setExpanded(t?{}:null!=(n=null==(o=e.initialState)?void 0:o.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some((e=>!e.getIsExpanded())))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((o=>{var r;const i=!0===o||!(null==o||!o[e.id]);let l={};if(!0===o?Object.keys(t.getRowModel().rowsById).forEach((e=>{l[e]=!0})):l=o,n=null!=(r=n)?r:!i,!i&&n)return{...l,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=l;return n}return o}))},e.getIsExpanded=()=>{var n;const o=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===o||null!=o&&o[e.id])},e.getCanExpand=()=>{var n,o,r;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(o=t.options.enableExpanding)||o)&&!(null==(r=e.subRows)||!r.length)},e.getIsAllParentsExpanded=()=>{let n=!0,o=e;for(;n&&o.parentId;)o=t.getRow(o.parentId,!0),n=o.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},oo={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:xn("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,r;if(t){if(null!=(o=null!=(r=e.options.autoResetAll)?r:e.options.autoResetPageIndex)?o:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>yn(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let o=yn(t,n.pageIndex);const r=typeof e.options.pageCount>"u"||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,r)),{...n,pageIndex:o}}))},e.resetPageIndex=t=>{var n,o;e.setPageIndex(t?0:null!=(n=null==(o=e.initialState)||null==(o=o.pagination)?void 0:o.pageIndex)?n:0)},e.resetPageSize=t=>{var n,o;e.setPageSize(t?10:null!=(n=null==(o=e.initialState)||null==(o=o.pagination)?void 0:o.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,yn(t,e.pageSize)),o=e.pageSize*e.pageIndex,r=Math.floor(o/n);return{...e,pageIndex:r,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var o;let r=yn(t,null!=(o=e.options.pageCount)?o:-1);return"number"==typeof r&&(r=Math.max(-1,r)),{...n,pageCount:r}})),e.getPageOptions=Sn((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),Rn(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},ro={getInitialState:e=>({rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:xn("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,o,r)=>{const i=o?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],l=r?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],a=new Set([...l,e.id,...i]);t.setRowPinning((e=>{var t,o,r,i,l,s;return"bottom"===n?{top:(null!=(r=null==e?void 0:e.top)?r:[]).filter((e=>!(null!=a&&a.has(e)))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter((e=>!(null!=a&&a.has(e)))),...Array.from(a)]}:"top"===n?{top:[...(null!=(l=null==e?void 0:e.top)?l:[]).filter((e=>!(null!=a&&a.has(e)))),...Array.from(a)],bottom:(null!=(s=null==e?void 0:e.bottom)?s:[]).filter((e=>!(null!=a&&a.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=a&&a.has(e)))),bottom:(null!=(o=null==e?void 0:e.bottom)?o:[]).filter((e=>!(null!=a&&a.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:r}=t.options;return"function"==typeof o?o(e):null==(n=o??r)||n},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:r}=t.getState().rowPinning,i=n.some((e=>null==o?void 0:o.includes(e))),l=n.some((e=>null==r?void 0:r.includes(e)));return i?"top":!!l&&"bottom"},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();if(!r)return-1;const i=null==(n="top"===r?t.getTopRows():t.getBottomRows())?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(o=null==i?void 0:i.indexOf(e.id))?o:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,o;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(o=e.initialState)?void 0:o.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;var r,i;return t?!(null==(n=o[t])||!n.length):!!(null!=(r=o.top)&&r.length||null!=(i=o.bottom)&&i.length)},e._getPinnedRows=(t,n,o)=>{var r;return(null==(r=e.options.keepPinnedRows)||r?(n??[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(n??[]).map((e=>t.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:o})))},e.getTopRows=Sn((()=>[e.getRowModel().rows,e.getState().rowPinning.top]),((t,n)=>e._getPinnedRows(t,n,"top")),Rn(e.options,"debugRows","getTopRows")),e.getBottomRows=Sn((()=>[e.getRowModel().rows,e.getState().rowPinning.bottom]),((t,n)=>e._getPinnedRows(t,n,"bottom")),Rn(e.options,"debugRows","getBottomRows")),e.getCenterRows=Sn((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const o=new Set([...t??[],...n??[]]);return e.filter((e=>!o.has(e.id)))}),Rn(e.options,"debugRows","getCenterRows"))}},io={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:xn("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const o={...n},r=e.getPreGroupedRowModel().flatRows;return t?r.forEach((e=>{e.getCanSelect()&&(o[e.id]=!0)})):r.forEach((e=>{delete o[e.id]})),o}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),r={...n};return e.getRowModel().rows.forEach((t=>{lo(r,t.id,o,!0,e)})),r})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Sn((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?ao(e,n):{rows:[],flatRows:[],rowsById:{}}),Rn(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=Sn((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?ao(e,n):{rows:[],flatRows:[],rowsById:{}}),Rn(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=Sn((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?ao(e,n):{rows:[],flatRows:[],rowsById:{}}),Rn(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let o=!(!t.length||!Object.keys(n).length);return o&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some((e=>!n[e.id]))&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,o)=>{const r=e.getIsSelected();t.setRowSelection((i=>{var l;if(n=typeof n<"u"?n:!r,e.getCanSelect()&&r===n)return i;const a={...i};return lo(a,e.id,n,null==(l=null==o?void 0:o.selectChildren)||l,t),a}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return so(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===uo(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===uo(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var o;t&&e.toggleSelected(null==(o=n.target)?void 0:o.checked)}}}},lo=(e,t,n,o,r)=>{var i;const l=r.getRow(t,!0);n?(l.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),l.getCanSelect()&&(e[t]=!0)):delete e[t],o&&null!=(i=l.subRows)&&i.length&&l.getCanSelectSubRows()&&l.subRows.forEach((t=>lo(e,t.id,n,o,r)))};function ao(e,t){const n=e.getState().rowSelection,o=[],r={},i=function(e,t){return e.map((e=>{var t;const l=so(e,n);if(l&&(o.push(e),r[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),l)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:o,rowsById:r}}function so(e,t){var n;return null!=(n=t[e.id])&&n}function uo(e,t,n){var o;if(null==(o=e.subRows)||!o.length)return!1;let r=!0,i=!1;return e.subRows.forEach((e=>{if((!i||r)&&(e.getCanSelect()&&(so(e,t)?i=!0:r=!1),e.subRows&&e.subRows.length)){const n=uo(e,t);"all"===n?i=!0:("some"===n&&(i=!0),r=!1)}})),r?"all":!!i&&"some"}const co=/([0-9]+)/gm;function go(e,t){return e===t?0:e>t?1:-1}function po(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function fo(e,t){const n=e.split(co).filter(Boolean),o=t.split(co).filter(Boolean);for(;n.length&&o.length;){const e=n.shift(),t=o.shift(),r=parseInt(e,10),i=parseInt(t,10),l=[r,i].sort();if(isNaN(l[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>i)return 1;if(i>r)return-1}}return n.length-o.length}const ho={alphanumeric:(e,t,n)=>fo(po(e.getValue(n)).toLowerCase(),po(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>fo(po(e.getValue(n)),po(t.getValue(n))),text:(e,t,n)=>go(po(e.getValue(n)).toLowerCase(),po(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>go(po(e.getValue(n)),po(t.getValue(n))),datetime:(e,t,n)=>{const o=e.getValue(n),r=t.getValue(n);return o>r?1:o<r?-1:0},basic:(e,t,n)=>go(e.getValue(n),t.getValue(n))},mo={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:xn("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return ho.datetime;if("string"==typeof n&&(o=!0,n.split(co).length>1))return ho.alphanumeric}return o?ho.text:ho.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,o;if(!e)throw new Error;return Cn(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(o=t.options.sortingFns)?void 0:o[e.columnDef.sortingFn])?n:ho[e.columnDef.sortingFn]},e.toggleSorting=(n,o)=>{const r=e.getNextSortingOrder(),i=typeof n<"u"&&null!==n;t.setSorting((l=>{const a=null==l?void 0:l.find((t=>t.id===e.id)),s=null==l?void 0:l.findIndex((t=>t.id===e.id));let u,c=[],d=i?n:"desc"===r;var g;(u=null!=l&&l.length&&e.getCanMultiSort()&&o?a?"toggle":"add":null!=l&&l.length&&s!==l.length-1?"replace":a?"toggle":"replace","toggle"===u&&(i||r||(u="remove")),"add"===u)?(c=[...l,{id:e.id,desc:d}],c.splice(0,c.length-(null!=(g=t.options.maxMultiSortColCount)?g:Number.MAX_SAFE_INTEGER))):c="toggle"===u?l.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===u?l.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}];return c}))},e.getFirstSortDir=()=>{var n,o;return(null!=(n=null!=(o=e.columnDef.sortDescFirst)?o:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var o,r;const i=e.getFirstSortDir(),l=e.getIsSorted();return l?!!(l===i||null!=(o=t.options.enableSortingRemoval)&&!o||n&&null!=(r=t.options.enableMultiRemove)&&!r)&&("desc"===l?"asc":"desc"):i},e.getCanSort=()=>{var n,o;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(o=t.options.enableSorting)||o)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,o;return null!=(n=null!=(o=e.columnDef.enableMultiSort)?o:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const o=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!o&&(o.desc?"desc":"asc")},e.getSortIndex=()=>{var n,o;return null!=(n=null==(o=t.getState().sorting)?void 0:o.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return o=>{n&&(null==o.persist||o.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(o))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,o;e.setSorting(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},bo=[kn,Zn,Un,Wn,On,$n,eo,to,mo,qn,no,oo,ro,io,Xn];function vo(e){var t,n;"production"!==process.env.NODE_ENV&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...bo,...null!=(t=e._features)?t:[]];let r={_features:o};const i=r._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(r))),{});let l={...null!=(n=e.initialState)?n:{}};r._features.forEach((e=>{var t;l=null!=(t=null==e.getInitialState?void 0:e.getInitialState(l))?t:l}));const a=[];let s=!1;const u={_features:o,options:{...i,...e},initialState:l,_queue:e=>{a.push(e),s||(s=!0,Promise.resolve().then((()=>{for(;a.length;)a.shift()();s=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{r.setState(r.initialState)},setOptions:e=>{const t=yn(e,r.options);r.options=(e=>r.options.mergeOptions?r.options.mergeOptions(i,e):{...i,...e})(t)},getState:()=>r.options.state,setState:e=>{null==r.options.onStateChange||r.options.onStateChange(e)},_getRowId:(e,t,n)=>{var o;return null!=(o=null==r.options.getRowId?void 0:r.options.getRowId(e,t,n))?o:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(r._getCoreRowModel||(r._getCoreRowModel=r.options.getCoreRowModel(r)),r._getCoreRowModel()),getRowModel:()=>r.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?r.getPrePaginationRowModel():r.getRowModel()).rowsById[e];if(!n&&(n=r.getCoreRowModel().rowsById[e],!n))throw"production"!==process.env.NODE_ENV?new Error(`getRow could not find row with ID: ${e}`):new Error;return n},_getDefaultColumnDef:Sn((()=>[r.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...r._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),Rn(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>r.options.columns,getAllColumns:Sn((()=>[r._getColumnDefs()]),(e=>{const t=function(e,n,o){return void 0===o&&(o=0),e.map((e=>{const i=function(e,t,n,o){var r,i;const l={...e._getDefaultColumnDef(),...t},a=l.accessorKey;let s,u=null!=(r=null!=(i=l.id)?i:a?"function"==typeof String.prototype.replaceAll?a.replaceAll(".","_"):a.replace(/\./g,"_"):void 0)?r:"string"==typeof l.header?l.header:void 0;if(l.accessorFn?s=l.accessorFn:a&&(s=a.includes(".")?e=>{let t=e;for(const e of a.split(".")){var n;t=null==(n=t)?void 0:n[e],"production"!==process.env.NODE_ENV&&void 0===t&&console.warn(`"${e}" in deeply nested key "${a}" returned undefined.`)}return t}:e=>e[l.accessorKey]),!u)throw"production"!==process.env.NODE_ENV?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let c={id:`${String(u)}`,accessorFn:s,parent:o,depth:n,columnDef:l,columns:[],getFlatColumns:Sn((()=>[!0]),(()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),Rn(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Sn((()=>[e._getOrderColumnsFn()]),(e=>{var t;return null!=(t=c.columns)&&t.length?e(c.columns.flatMap((e=>e.getLeafColumns()))):[c]}),Rn(e.options,"debugColumns","column.getLeafColumns"))};for(const t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(r,e,o,n),l=e;return i.columns=l.columns?t(l.columns,i,o+1):[],i}))};return t(e)}),Rn(e,"debugColumns","getAllColumns")),getAllFlatColumns:Sn((()=>[r.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),Rn(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:Sn((()=>[r.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),Rn(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:Sn((()=>[r.getAllColumns(),r._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),Rn(e,"debugColumns","getAllLeafColumns")),getColumn:e=>{const t=r._getAllFlatColumnsById()[e];return"production"!==process.env.NODE_ENV&&!t&&console.error(`[Table] Column with id '${e}' does not exist.`),t}};Object.assign(r,u);for(let e=0;e<r._features.length;e++){const t=r._features[e];null==t||null==t.createTable||t.createTable(r)}return r}function wo(e){const t=[],n=e=>{var o;t.push(e),null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function yo(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){var o;const r=[],i={},l=null!=(o=n.options.maxLeafRowFilterDepth)?o:100,a=function(e,o){void 0===o&&(o=0);const s=[];for(let c=0;c<e.length;c++){var u;let d=e[c];const g=Dn(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);if(g.columnFilters=d.columnFilters,null!=(u=d.subRows)&&u.length&&o<l){if(g.subRows=a(d.subRows,o+1),d=g,t(d)&&!g.subRows.length){s.push(d),i[d.id]=d,r.push(d);continue}if(t(d)||g.subRows.length){s.push(d),i[d.id]=d,r.push(d);continue}}else d=g,t(d)&&(s.push(d),i[d.id]=d,r.push(d))}return s};return{rows:a(e),flatRows:r,rowsById:i}}(e,t,n):function(e,t,n){var o;const r=[],i={},l=null!=(o=n.options.maxLeafRowFilterDepth)?o:100,a=function(e,o){void 0===o&&(o=0);const s=[];for(let c=0;c<e.length;c++){let d=e[c];if(t(d)){var u;if(null!=(u=d.subRows)&&u.length&&o<l){const e=Dn(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);e.subRows=a(d.subRows,o+1),d=e}s.push(d),r.push(d),i[d.id]=d}}return s};return{rows:a(e),flatRows:r,rowsById:i}}(e,t,n)}
|
|
30
30
|
/**
|
|
31
31
|
* react-table
|
|
32
32
|
*
|
|
@@ -37,4 +37,4 @@ var e=Object.defineProperty,t=(t,n,o)=>(((t,n,o)=>{n in t?e(t,n,{enumerable:!0,c
|
|
|
37
37
|
*
|
|
38
38
|
* @license MIT
|
|
39
39
|
*/
|
|
40
|
-
function Co(e,t){return e?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(e)?n.createElement(e,t):e:null}const So={getInitialState:e=>({expandedRows:new Set,...e}),getDefaultOptions:e=>({onChangeExpandedRows:Cn("expandedRows",e)}),createTable:e=>{e.setExpandedRows=t=>{var n,o;return null==(o=(n=e.options).onChangeExpandedRows)?void 0:o.call(n,(e=>xn(t,e)))}},createRow:(e,t)=>{e.onChangeExpanded=n=>t.setExpandedRows((t=>{const o=new Set(t),r=e.id;return n?o.add(r):o.delete(r),xn((()=>o),t)})),e.isExpanded=()=>t.getState().expandedRows.has(e.id),e.toggleExpand=()=>{const t=e.isExpanded();e.onChangeExpanded(!t)}}},Ro={getInitialState:e=>({focusedRow:null,...e}),getDefaultOptions:e=>({onChangeFocusedRow:Cn("focusedRow",e)}),createTable:e=>{e.setFocusedRow=t=>{var n,o;return null==(o=(n=e.options).onChangeFocusedRow)?void 0:o.call(n,(e=>xn(t,e)))},e.focusRowById=async t=>{var n;if(-1===e.getRowModel().rows.findIndex((e=>e.id===t))&&e.getState().pagination){const o=e.getState().pagination.pageSize,r=e.getCoreRowModel().rows.findIndex((e=>e.id===t));if(-1!==r){const t=Math.floor(r/o);null==(n=e.setPageIndex)||n.call(e,t)}}if(await new Promise(requestAnimationFrame),!e.getRowModel().rows.find((e=>e.id===t)))return;e.setFocusedRow((()=>t));const o=document.getElementById(t);o&&(o.focus({preventScroll:!1}),o.scrollIntoView({behavior:"smooth",block:"center"}))}},createRow:(e,t)=>{e.isFocused=()=>t.getState().focusedRow===e.id,e.onChangeFocused=(n,o)=>{const r=o??e.id;if(t.setFocusedRow((()=>n?r:null)),n){const e=document.getElementById(r);e&&e.focus({preventScroll:!0})}},e.toggleFocused=()=>e.onChangeFocused(!e.isFocused()),e.focusNextRow=()=>{var e;const n=t.getRowModel().rows,o=n.findIndex((e=>e.id===t.getState().focusedRow)),r=n[o+1];r&&(r.onChangeFocused(!0,r.id),null==(e=document.getElementById(r.id))||e.focus({preventScroll:!0}))},e.focusPrevRow=()=>{var e;const n=t.getRowModel().rows,o=n.findIndex((e=>e.id===t.getState().focusedRow)),r=n[o-1];r&&(r.onChangeFocused(!0,r.id),null==(e=document.getElementById(r.id))||e.focus({preventScroll:!0}))}}},Eo={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Cn("columnOrder",e)}),createTable:e=>{const t=e.getAllLeafColumns().map((e=>e.id));e.setColumnOrder=t=>{var n,o;return null==(o=(n=e.options).onColumnOrderChange)?void 0:o.call(n,(e=>xn(t,e)))},e.resetColumnOrder=()=>{e.setColumnOrder(t)}}};const _o=e=>{const{columns:t,data:o,initialState:i,pageSize:a,enableRowSelection:s,tableInstanceRef:u,locale:c,persistColumnOrderKey:d,...g}=e,p=(e=>r((()=>{if(e)try{const t=localStorage.getItem(e);if(!t)return;const n=JSON.parse(t);return Array.isArray(n)?n:void 0}catch{return}}),[e]))(d),f=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=n.useState((()=>({current:wo(t)}))),[r,i]=n.useState((()=>o.current.initialState));return o.current.setOptions((t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),null==e.onStateChange||e.onStateChange(t)}}))),o.current}({_features:[So,Ro,Eo],columns:t,data:o,meta:{locale:c??"en"},initialState:{pagination:{pageIndex:0,pageSize:a||50},columnVisibility:{...null==i?void 0:i.columnVisibility,[I]:!1},columnOrder:p,...i},enableRowSelection:s,getCoreRowModel:e=>Rn((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const l=[];for(let s=0;s<t.length;s++){const u=On(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return l};return n.rows=o(t),n}),En(e.options,"debugTable","getRowModel",(()=>e._autoResetPageIndex()))),getExpandedRowModel:e=>Rn((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?yo(t):t),En(e.options,"debugTable","getExpandedRowModel")),getFilteredRowModel:e=>Rn((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const i=o.getFilterFn();i?r.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const l=(n??[]).map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;o&&a&&s.length&&(l.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return xo(t.rows,(e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0}),e)}),En(e.options,"debugTable","getFilteredRowModel",(()=>e._autoResetPageIndex()))),getSortedRowModel:e=>Rn((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],i=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),l={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(l[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const a=e=>{const t=e.map((e=>({...e})));return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],a=l[r.id],s=a.sortUndefined,u=null!=(n=null==r?void 0:r.desc)&&n;let c=0;if(s){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);if(n||o){if("first"===s)return n?-1:1;if("last"===s)return n?1:-1;c=n&&o?0:n?s:-s}}if(0===c&&(c=a.sortingFn(e,t,r.id)),0!==c)return u&&(c*=-1),a.invertSorting&&(c*=-1),c}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}}),En(e.options,"debugTable","getSortedRowModel",(()=>e._autoResetPageIndex()))),getPaginationRowModel:e=>Rn((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:o,pageIndex:r}=t;let{rows:i,flatRows:l,rowsById:a}=n;const s=o*r,u=s+o;let c;i=i.slice(s,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:l,rowsById:a}:yo({rows:i,flatRows:l,rowsById:a}),c.flatRows=[];const d=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return c.rows.forEach(d),c}),En(e.options,"debugTable","getPaginationRowModel")),getRowId:g.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString()),defaultColumn:e.enableResizing?{size:void 0}:void 0,...g});return u&&(u.current=f),function(e,t){const n=e.getState().columnOrder;l((()=>{if(t&&n)try{localStorage.setItem(t,JSON.stringify(n))}catch(e){console.error(e)}}),[n,t])}(f,d),{table:f}},ko={CheckboxWrapper:"_CheckboxWrapper_k4bh3_1","size-small":"_size-small_k4bh3_11","size-medium":"_size-medium_k4bh3_15",Checkbox:"_Checkbox_k4bh3_1",ReadOnly:"_ReadOnly_k4bh3_45",Indicator:"_Indicator_k4bh3_54",HideWrapper:"_HideWrapper_k4bh3_58",CheckboxHover:"_CheckboxHover_k4bh3_65",CheckboxRippleContainer:"_CheckboxRippleContainer_k4bh3_65",CheckboxRipple:"_CheckboxRipple_k4bh3_65",ripple:"_ripple_k4bh3_1"};function Io(){}const Do=Object.freeze({});const Oo={};function No(e,t){const o=n.useRef(Oo);return o.current===Oo&&(o.current=e(t)),o}const Mo=n[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Fo=Mo&&Mo!==n.useLayoutEffect?Mo:e=>e();function Po(e){const t=No(jo).current;return t.next=e,Fo(t.effect),t.trampoline}function jo(){const e={next:void 0,callback:Ao,trampoline:(...t)=>{var n;return null==(n=e.callback)?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Ao(){if("production"!==process.env.NODE_ENV)throw new Error("Base UI: Cannot call an event handler while rendering.")}const To=typeof document<"u"?n.useLayoutEffect:()=>{};function Vo(e,t,n,o){const r=No(Lo).current;return function(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}(r,e,t,n,o)&&zo(r,[e,t,n,o]),r.callback}function Lo(){return{callback:null,cleanup:null,refs:[]}}function zo(e,t){e.refs=t,t.every((e=>null==e))?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const o=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const r=t[e];if(null!=r)switch(typeof r){case"function":{const t=r(n);"function"==typeof t&&(o[e]=t);break}case"object":r.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(null!=n)switch(typeof n){case"function":{const t=o[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}const Ho={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},$o={...Ho,position:"fixed",top:0,left:0},Bo={...Ho,position:"absolute"};let Go=function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({}),qo=function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({});const Uo={valid:e=>null===e?null:e?{[qo.valid]:""}:{[qo.invalid]:""}};function Wo(e){return n.useMemo((()=>({checked:t=>e.indeterminate?{}:t?{[Go.checked]:""}:{[Go.unchecked]:""},...Uo})),[e.indeterminate])}function Ko(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach((e=>n.searchParams.append("args[]",e))),`Base UI error #${e}; visit ${n} for the full message.`}const Xo=parseInt(n.version,10);function Yo(e){if(!n.isValidElement(e))return null;const t=e,o=t.props;return(function(e){return Xo>=e}(19)?null==o?void 0:o.ref:t.ref)??null}function Jo(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}const Zo={};function Qo(e,t,n,o,r){let i={...or(e,Zo)};return t&&(i=er(i,t)),n&&(i=er(i,n)),o&&(i=er(i,o)),r&&(i=er(i,r)),i}function er(e,t){return nr(t)?t(e):function(e,t){if(!t)return e;for(const n in t){const o=t[n];switch(n){case"style":e[n]=Jo(e.style,o);break;case"className":e[n]=lr(e.className,o);break;default:tr(n,o)?e[n]=rr(e[n],o):e[n]=o}}return e}(e,t)}function tr(e,t){const n=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return 111===n&&110===o&&r>=65&&r<=90&&("function"==typeof t||typeof t>"u")}function nr(e){return"function"==typeof e}function or(e,t){return nr(e)?e(t):e??Zo}function rr(e,t){return t?e?n=>{if(function(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}(n)){const o=n;ir(o);const r=t(o);return o.baseUIHandlerPrevented||null==e||e(o),r}const o=t(n);return null==e||e(n),o}:t:e}function ir(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function lr(e,t){return t?e?t+" "+e:t:e}function ar(e,t,o={}){const r=t.render,i=function(e,t={}){const{className:n,style:o,render:r}=e,{state:i=Do,ref:l,props:a,stateAttributesMapping:s,enabled:u=!0}=t,c=u?function(e,t){return"function"==typeof e?e(t):e}(n,i):void 0,d=u?function(e,t){return"function"==typeof e?e(t):e}(o,i):void 0,g=u?function(e,t){const n={};for(const o in e){const r=e[o];if(null!=t&&t.hasOwnProperty(o)){const e=t[o](r);null!=e&&Object.assign(n,e)}else!0===r?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}(i,s):Do,p=u?Jo(g,Array.isArray(a)?function(e){if(0===e.length)return Zo;if(1===e.length)return or(e[0],Zo);let t={...or(e[0],Zo)};for(let n=1;n<e.length;n+=1)t=er(t,e[n]);return t}(a):a)??Do:Do;return typeof document<"u"&&(u?Array.isArray(l)?p.ref=function(e){const t=No(Lo).current;return function(e,t){return e.refs.length!==t.length||e.refs.some(((e,n)=>e!==t[n]))}(t,e)&&zo(t,e),t.callback}([p.ref,Yo(r),...l]):p.ref=Vo(p.ref,Yo(r),l):Vo(null,null)),u?(void 0!==c&&(p.className=lr(p.className,c)),void 0!==d&&(p.style=Jo(p.style,d)),p):Do}(t,o);if(!1===o.enabled)return null;return function(e,t,o,r){if(t){if("function"==typeof t)return t(o,r);const e=Qo(o,t.props);return e.ref=o.ref,n.cloneElement(t,e)}if(e&&"string"==typeof e)return function(e,t){return"button"===e?f("button",{type:"button",...t,key:t.key}):"img"===e?f("img",{alt:"",...t,key:t.key}):n.createElement(e,t)}(e,o);throw new Error("production"!==process.env.NODE_ENV?"Base UI: Render element or function are not defined.":Ko(8))}(e,r,i,o.state??Do)}const sr={...n};let ur=0;const cr=sr.useId;function dr(e,t){if(void 0!==cr){const n=cr();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){const[o,r]=n.useState(e),i=e||o;return n.useEffect((()=>{null==o&&(ur+=1,r(`${t}-${ur}`))}),[o,t]),i}(e,t)}function gr(e){return dr(e,"base-ui")}function pr(e){return typeof window<"u"&&(e instanceof HTMLElement||e instanceof function(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}(e).HTMLElement)}let fr;function hr(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");fr.has(t)||(fr.add(t),console.error(`Base UI: ${t}`))}}"production"!==process.env.NODE_ENV&&(fr=new Set);const mr=n.createContext(void 0);function br(e={}){const{disabled:t=!1,focusableWhenDisabled:o,tabIndex:r=0,native:i=!0}=e,l=n.useRef(null),a=void 0!==function(e=!1){const t=n.useContext(mr);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Ko(16));return t}(!0),s=Po((()=>{const e=l.current;return!("A"!==(null==e?void 0:e.tagName)||null==e||!e.href)})),{props:u}=function(e){const{focusableWhenDisabled:t,disabled:o,composite:r=!1,tabIndex:i=0,isNativeButton:l}=e,a=r&&!1!==t,s=r&&!1===t;return{props:n.useMemo((()=>{const e={onKeyDown(e){o&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=i,!l&&o&&(e.tabIndex=t?i:-1)),(l&&(t||a)||!l&&o)&&(e["aria-disabled"]=o),l&&(!t||s)&&(e.disabled=o),e}),[r,o,t,a,s,l,i])}}({focusableWhenDisabled:o,disabled:t,composite:a,tabIndex:r,isNativeButton:i});"production"!==process.env.NODE_ENV&&n.useEffect((()=>{if(!l.current)return;const e="BUTTON"===l.current.tagName;i?e||hr("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):e&&hr("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")}),[i]);const c=n.useCallback((()=>{const e=l.current;(function(e){return pr(e)&&"BUTTON"===e.tagName})(e)&&a&&t&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)}),[t,u.disabled,a]);To(c,[c]);return{getButtonProps:n.useCallback(((e={})=>{const{onClick:n,onMouseDown:o,onKeyUp:r,onKeyDown:l,onPointerDown:a,...c}=e;return Qo({type:i?"button":void 0,onClick(e){t?e.preventDefault():null==n||n(e)},onMouseDown(e){t||null==o||o(e)},onKeyDown(e){if(t||(ir(e),null==l||l(e)),e.baseUIHandlerPrevented)return;const o=e.target===e.currentTarget&&!i&&!s()&&!t,r="Enter"===e.key,a=" "===e.key;o&&((a||r)&&e.preventDefault(),r&&(null==n||n(e)))},onKeyUp(e){t||(ir(e),null==r||r(e)),!e.baseUIHandlerPrevented&&e.target===e.currentTarget&&!i&&!t&&" "===e.key&&(null==n||n(e))},onPointerDown(e){t?e.preventDefault():null==a||a(e)}},i?void 0:{role:"button"},u,c)}),[t,u,i,s]),buttonRef:Po((e=>{l.current=e,c()}))}}"production"!==process.env.NODE_ENV&&(mr.displayName="CompositeRootContext");const vr=n.createContext({invalid:void 0,name:void 0,validityData:{state:{badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},errors:[],error:"",value:"",initialValue:null},setValidityData:Io,disabled:void 0,touched:!1,setTouched:Io,dirty:!1,setDirty:Io,filled:!1,setFilled:Io,focused:!1,setFocused:Io,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Do)=>e,getInputValidationProps:(e=Do)=>e,inputRef:{current:null},commit:async()=>{}}});function wr(e=!0){const t=n.useContext(vr);if(t.setValidityData===Io&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Ko(28));return t}"production"!==process.env.NODE_ENV&&(vr.displayName="FieldRootContext");const yr=n.createContext({disabled:!1});function xr(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}"production"!==process.env.NODE_ENV&&(yr.displayName="FieldItemContext");const Cr=n.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Io,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Sr(){return n.useContext(Cr)}"production"!==process.env.NODE_ENV&&(Cr.displayName="FormContext");const Rr=n.createContext({controlId:void 0,setControlId:Io,labelId:void 0,setLabelId:Io,messageIds:[],setMessageIds:Io,getDescriptionProps:e=>e});"production"!==process.env.NODE_ENV&&(Rr.displayName="LabelableContext");const Er=n.createContext(void 0);"production"!==process.env.NODE_ENV&&(Er.displayName="CheckboxGroupContext");const _r=n.createContext(void 0);"production"!==process.env.NODE_ENV&&(_r.displayName="CheckboxRootContext");const kr=n.forwardRef((function(e,t){const{checked:o,className:r,defaultChecked:i=!1,disabled:l=!1,id:a,indeterminate:s=!1,inputRef:u,name:c,onCheckedChange:d,parent:g=!1,readOnly:p=!1,render:f,required:h=!1,uncheckedValue:b,value:v,nativeButton:w=!1,...y}=e,{clearErrors:x}=Sr(),{disabled:C,name:S,setDirty:R,setFilled:E,setFocused:_,setTouched:k,state:I,validationMode:D,validityData:O,shouldValidateOnChange:N,validation:M}=wr(),F=n.useContext(yr),{labelId:P,controlId:j,setControlId:A,getDescriptionProps:T}=n.useContext(Rr),V=function(e=!0){const t=n.useContext(Er);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CheckboxGroupContext is missing. CheckboxGroup parts must be placed within <CheckboxGroup>.":Ko(3));return t}(),z=null==V?void 0:V.parent,H=z&&V.allValues,$=C||F.disabled||(null==V?void 0:V.disabled)||l,B=S??c,G=v??B,q=gr(),U=gr();let W=j;H?W=g?U:`${z.id}-${G}`:a&&(W=a);let K={};H&&(g?K=V.parent.getParentProps():G&&(K=V.parent.getChildProps(G)));const X=Po(d),{checked:Y=o,indeterminate:J=s,onCheckedChange:Z,...Q}=K,ee=null==V?void 0:V.value,te=null==V?void 0:V.setValue,ne=null==V?void 0:V.defaultValue,oe=n.useRef(null),{getButtonProps:re,buttonRef:ie}=br({disabled:$,native:w}),le=(null==V?void 0:V.validation)??M,[ae,se]=function({controlled:e,default:t,name:o,state:r="value"}){const{current:i}=n.useRef(void 0!==e),[l,a]=n.useState(t),s=i?e:l;if("production"!==process.env.NODE_ENV){n.useEffect((()=>{i!==(void 0!==e)&&console.error([`Base UI: A component is changing the ${i?"":"un"}controlled ${r} state of ${o} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${o} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join("\n"))}),[r,o,e]);const{current:l}=n.useRef(t);n.useEffect((()=>{!i&&JSON.stringify(l)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${o} after being initialized. To suppress this warning opt to use a controlled ${o}.`].join("\n"))}),[JSON.stringify(t)])}return[s,n.useCallback((e=>{i||a(e)}),[])]}({controlled:G&&ee&&!g?ee.includes(G):Y,default:G&&ne&&!g?ne.includes(G):i,name:"Checkbox",state:"checked"});To((()=>{if(A!==Io)return A(W),()=>{A(void 0)}}),[W,V,A,g]),function(e){const{enabled:t=!0,value:n,id:o,name:r,controlRef:i,commit:l}=e,{formRef:a}=Sr(),{invalid:s,markedDirtyRef:u,validityData:c,setValidityData:d}=wr(),g=Po(e.getValue);To((()=>{if(!t)return;let e=n;void 0===e&&(e=g()),null===c.initialValue&&null!==e&&d((t=>({...t,initialValue:e})))}),[t,d,n,c.initialValue,g]),To((()=>{!t||!o||a.current.fields.set(o,{getValue:g,name:r,controlRef:i,validityData:xr(c,s),validate(e=!0){let t=n;void 0===t&&(t=g()),u.current=!0,e?m.flushSync((()=>l(t))):l(t)}})}),[l,i,t,a,g,o,s,u,r,c,n]),To((()=>{const e=a.current.fields;return()=>{o&&e.delete(o)}}),[a,o])}({enabled:!V,id:q,commit:le.commit,value:ae,controlRef:oe,name:B,getValue:()=>ae});const ue=n.useRef(null),ce=Vo(u,ue,le.inputRef);To((()=>{ue.current&&(ue.current.indeterminate=J,ae&&E(!0))}),[ae,J,E]),function(e,t){const o=n.useRef(e),r=Po(t);To((()=>{o.current!==e&&r(o.current)}),[e,r]),To((()=>{o.current=e}),[e])}(ae,(()=>{V&&!g||(x(B),E(ae),R(ae!==O.initialValue),N()?le.commit(ae):le.commit(ae,!0))}));const de=Qo({checked:ae,disabled:$,name:g?void 0:B,id:w?void 0:W??void 0,required:h,ref:ce,style:B?Bo:$o,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked,n=function(e,t,n,o){let r=!1,i=!1;const l=o??Do;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){i=!0},get isCanceled(){return r},get isPropagationAllowed(){return i},trigger:n,...l}}("none",e.nativeEvent);if(null==Z||Z(t,n),X(t,n),!n.isCanceled&&(se(t),G&&ee&&te&&!g)){const e=t?[...ee,G]:ee.filter((e=>e!==G));te(e,n)}},onFocus(){var e;null==(e=oe.current)||e.focus()}},void 0!==v?{value:(V?ae&&v:v)||""}:Do,T,V?le.getValidationProps:le.getInputValidationProps),ge=H?!!Y:ae,pe=H&&J||s;n.useEffect((()=>{z&&G&&z.disabledStatesRef.current.set(G,$)}),[z,$,G]);const fe=n.useMemo((()=>({...I,checked:ge,disabled:$,readOnly:p,required:h,indeterminate:pe})),[I,ge,$,p,h,pe]),he=Wo(fe),me=ar("span",e,{state:fe,ref:[ie,oe,t,null==V?void 0:V.registerControlRef],props:[{id:w?W??void 0:q,role:"checkbox","aria-checked":J?"mixed":ae,"aria-readonly":p||void 0,"aria-required":h||void 0,"aria-labelledby":P,"data-parent":g?"":void 0,onFocus(){_(!0)},onBlur(){const e=ue.current;e&&(k(!0),_(!1),"onBlur"===D&&le.commit(V?ee:e.checked))},onClick(e){var t;p||$||(e.preventDefault(),null==(t=ue.current)||t.click())}},T,le.getValidationProps,y,Q,re],stateAttributesMapping:he});return L.jsxs(_r.Provider,{value:fe,children:[me,!ae&&!V&&B&&!g&&void 0!==b&&L.jsx("input",{type:"hidden",name:B,value:b}),L.jsx("input",{...de})]})}));"production"!==process.env.NODE_ENV&&(kr.displayName="CheckboxRoot");const Ir=[];const Dr=null;let Or=globalThis.requestAnimationFrame;const Nr=new class{constructor(){t(this,"callbacks",[]),t(this,"callbacksCount",0),t(this,"nextId",1),t(this,"startId",1),t(this,"isScheduled",!1),t(this,"tick",(e=>{var t;this.isScheduled=!1;const n=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let o=0;o<n.length;o+=1)null==(t=n[o])||t.call(n,e)}))}request(e){const t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;const n="test"===process.env.NODE_ENV&&Or!==requestAnimationFrame&&(Or=requestAnimationFrame,!0);return(!this.isScheduled||n)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class Mr{constructor(){t(this,"currentId",Dr),t(this,"cancel",(()=>{this.currentId!==Dr&&(Nr.cancel(this.currentId),this.currentId=Dr)})),t(this,"disposeEffect",(()=>this.cancel))}static create(){return new Mr}static request(e){return Nr.request(e)}static cancel(e){return Nr.cancel(e)}request(e){this.cancel(),this.currentId=Nr.request((()=>{this.currentId=Dr,e()}))}}function Fr(){const e=No(Mr.create).current;return function(e){n.useEffect(e,Ir)}(e.disposeEffect),e}let Pr=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const jr={[Pr.startingStyle]:""},Ar={[Pr.endingStyle]:""},Tr={transitionStatus:e=>"starting"===e?jr:"ending"===e?Ar:null};function Vr(e){const{enabled:t=!0,open:o,ref:r,onComplete:i}=e,l=Po(i),a=function(e,t=!1,n=!0){const o=Fr();return Po(((r,i=null)=>{function l(){m.flushSync(r)}o.cancel();const a=function(e){return null==e?e:"current"in e?e.current:e}(e);if(null==a)return;const s=a;if("function"!=typeof s.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)r();else{let e=function(){const e=Pr.startingStyle;if(!s.hasAttribute(e))return void o.request(r);const t=new MutationObserver((()=>{s.hasAttribute(e)||(t.disconnect(),r())}));t.observe(s,{attributes:!0,attributeFilter:[e]}),null==i||i.addEventListener("abort",(()=>t.disconnect()),{once:!0})},r=function(){Promise.all(s.getAnimations().map((e=>e.finished))).then((()=>{null!=i&&i.aborted||l()})).catch((()=>{const e=s.getAnimations();if(n){if(null!=i&&i.aborted)return;l()}else e.length>0&&e.some((e=>e.pending||"finished"!==e.playState))&&r()}))};if(t)return void e();o.request(r)}}))}(r,o,!1);n.useEffect((()=>{if(!t)return;const e=new AbortController;return a(l,e.signal),()=>{e.abort()}}),[t,o,l,a])}const Lr=n.forwardRef((function(e,t){const{render:o,className:r,keepMounted:i=!1,...l}=e,a=function(){const e=n.useContext(_r);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.":Ko(14));return e}(),s=a.checked||a.indeterminate,{transitionStatus:u,setMounted:c}=function(e,t=!1,o=!1){const[r,i]=n.useState(e&&t?"idle":void 0),[l,a]=n.useState(e);return e&&!l&&(a(!0),i("starting")),!e&&l&&"ending"!==r&&!o&&i("ending"),!e&&!l&&"ending"===r&&i(void 0),To((()=>{if(!e&&l&&"ending"!==r&&o){const e=Mr.request((()=>{i("ending")}));return()=>{Mr.cancel(e)}}}),[e,l,r,o]),To((()=>{if(!e||t)return;const n=Mr.request((()=>{i(void 0)}));return()=>{Mr.cancel(n)}}),[t,e]),To((()=>{if(!e||!t)return;e&&l&&"idle"!==r&&i("starting");const n=Mr.request((()=>{i("idle")}));return()=>{Mr.cancel(n)}}),[t,e,l,i,r]),n.useMemo((()=>({mounted:l,setMounted:a,transitionStatus:r})),[l,r])}(s),d=n.useRef(null),g=n.useMemo((()=>({...a,transitionStatus:u})),[a,u]);Vr({open:s,ref:d,onComplete(){s||c(!1)}});const p=Wo(a),f=n.useMemo((()=>({...p,...Tr,...Uo})),[p]),h=i||s,m=ar("span",e,{enabled:h,ref:[t,d],state:g,stateAttributesMapping:f,props:l});return h?m:null}));"production"!==process.env.NODE_ENV&&(Lr.displayName="CheckboxIndicator");const zr=({className:e})=>L.jsxs("svg",{viewBox:"0 0 24 24",className:e,fill:"none",children:[L.jsx("title",{children:"Indeterminate icon"}),L.jsx("rect",{x:"5.5",y:"10.5",width:"13",height:"2.75",fill:"currentColor"})]}),Hr=e=>L.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",...e,children:[L.jsx("title",{children:"Check icon"}),L.jsx("path",{d:"M4 12l5 5L20 6"})]}),$r=({dataTest:e,size:t="medium",disabled:n,readOnly:r,indeterminate:i=!1,checked:a,disableRipple:s,hideWrapper:u,className:c,onChange:d,...g})=>{const p=!!u,f=!(s||p||n||r),h=hn(ko.CheckboxWrapper,!p&&ko[`size-${t}`],p&&ko.HideWrapper,r&&ko.ReadOnly,f&&ko.CheckboxHover,c),m=hn("styled-checkbox-inner",ko.Checkbox,ko[`size-${t}`]),b=i?zr:Hr,v=o.useRef(null),w=o.useCallback((e=>{var t;if(e.stopPropagation(),!f)return;const n=document.createElement("span");n.className=ko.CheckboxRipple||"",n.addEventListener("animationend",(()=>n.remove()),{once:!0}),null==(t=v.current)||t.appendChild(n)}),[f]);l((()=>()=>{var e;null==(e=v.current)||e.replaceChildren()}),[]);const y=o.useCallback((e=>{if(r)return;const t={target:{name:g.name,value:g.value,checked:e}};null==d||d(t,e)}),[d,g.name,g.value,r]);return L.jsxs(kr,{className:h,"data-test":e,checked:a,disabled:n,readOnly:r,indeterminate:i,onPointerDown:w,onCheckedChange:y,...g,children:[!p&&f&&L.jsx("span",{ref:v,className:ko.CheckboxRippleContainer}),L.jsx("span",{className:m,children:L.jsx(Lr,{className:ko.Indicator,children:L.jsx(b,{strokeWidth:"small"===t?3:2})})})]})};function Br(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z"})})}const Gr=()=>{const[e,t]=u(null),[n,o]=u(!1),r=s((e=>{t(e.currentTarget),o(!0)}),[]);return{open:n,handleClose:s((()=>{o(!1)}),[]),handleOpen:r,anchorEl:e}};function qr(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"M12 16a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2"})})}const Ur=e=>{var t;return L.jsx(x,{...e,classes:{root:fn("px-3 py-2.5",null==(t=e.classes)?void 0:t.root),...e.classes},sx:{"&.Mui-disabled":{pointerEvents:"auto",cursor:"not-allowed","&:hover":{backgroundColor:"transparent !important"}},...e.sx}})},Wr="_asma-core-ui-button_gteum_1",Kr={contained:"_contained_gteum_27",outlined:"_outlined_gteum_141",text:"_text_gteum_255",textGray:"_textGray_gteum_369",textWhite:"_textWhite_gteum_426",large:"_large_gteum_79",small:"_small_gteum_74",medium:"_medium_gteum_69",error:"_error_gteum_84",common:"_common_gteum_27"},Xr=({variant:e="contained",className:t="",size:n="medium",children:o,refLink:r,startIcon:i,endIcon:l,dataTest:a,error:s,...u})=>{const c="large"===n||"medium"===n,d=s?"error":"common";return L.jsxs("button",{...u,className:fn(Wr,Kr[e],Kr[d],Kr[n],t),ref:r,"data-test":a,children:[i,o&&L.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center",gap:c?"8px":"4px",paddingLeft:c?"8px":"4px",paddingRight:c?"8px":"4px"},children:o}),l]})};function Yr(){return Yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Yr.apply(this,arguments)}function Jr(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}function Zr(e,t){return(Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const Qr=!1;var ei="production"!==process.env.NODE_ENV?E.oneOfType([E.number,E.shape({enter:E.number,exit:E.number,appear:E.number}).isRequired]):null;"production"!==process.env.NODE_ENV&&E.oneOfType([E.string,E.shape({enter:E.string,exit:E.string,active:E.string}),E.shape({enter:E.string,enterDone:E.string,enterActive:E.string,exit:E.string,exitDone:E.string,exitActive:E.string})]);const ti=o.createContext(null);var ni="unmounted",oi="exited",ri="entering",ii="entered",li="exiting",ai=function(e){function t(t,n){var o;o=e.call(this,t,n)||this;var r,i=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(r=oi,o.appearStatus=ri):r=ii:r=t.unmountOnExit||t.mountOnEnter?ni:oi,o.state={status:r},o.nextCallback=null,o}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Zr(e,t)}(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ni?{status:oi}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==ri&&n!==ii&&(t=ri):(n===ri||n===ii)&&(t=li)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,o=this.props.timeout;return e=t=n=o,null!=o&&"number"!=typeof o&&(e=o.exit,t=o.enter,n=void 0!==o.appear?o.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===ri){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:b.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===oi&&this.setState({status:ni})},n.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,r=this.props.nodeRef?[o]:[b.findDOMNode(this),o],i=r[0],l=r[1],a=this.getTimeouts(),s=o?a.appear:a.enter;!e&&!n||Qr?this.safeSetState({status:ii},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,l),this.safeSetState({status:ri},(function(){t.props.onEntering(i,l),t.onTransitionEnd(s,(function(){t.safeSetState({status:ii},(function(){t.props.onEntered(i,l)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:b.findDOMNode(this);t&&!Qr?(this.props.onExit(o),this.safeSetState({status:li},(function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:oi},(function(){e.props.onExited(o)}))}))}))):this.safeSetState({status:oi},(function(){e.props.onExited(o)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,t.nextCallback=null,e(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:b.findDOMNode(this),o=null==e&&!this.props.addEndListener;if(n&&!o){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=r[0],l=r[1];this.props.addEndListener(i,l)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===ni)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Jr(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return o.createElement(ti.Provider,{value:null},"function"==typeof n?n(e,r):o.cloneElement(o.Children.only(n),r))},t}(o.Component);function si(){}ai.contextType=ti,ai.propTypes="production"!==process.env.NODE_ENV?{nodeRef:E.shape({current:typeof Element>"u"?E.any:function(e,t,n,o,r,i){var l=e[t];return E.instanceOf(l&&"ownerDocument"in l?l.ownerDocument.defaultView.Element:Element)(e,t,n,o,r,i)}}),children:E.oneOfType([E.func.isRequired,E.element.isRequired]).isRequired,in:E.bool,mountOnEnter:E.bool,unmountOnExit:E.bool,appear:E.bool,enter:E.bool,exit:E.bool,timeout:function(e){var t=ei;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.apply(void 0,[e].concat(o))},addEndListener:E.func,onEnter:E.func,onEntering:E.func,onEntered:E.func,onExit:E.func,onExiting:E.func,onExited:E.func}:{},ai.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:si,onEntering:si,onEntered:si,onExit:si,onExiting:si,onExited:si},ai.UNMOUNTED=ni,ai.EXITED=oi,ai.ENTERING=ri,ai.ENTERED=ii,ai.EXITING=li;const ui=ai;function ci(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}function di(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function gi(e){if(!di(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=gi(e[n])})),t}function pi(e,t,n={clone:!0}){const o=n.clone?Yr({},e):e;return di(e)&&di(t)&&Object.keys(t).forEach((r=>{"__proto__"!==r&&(di(t[r])&&r in e&&di(e[r])?o[r]=pi(e[r],t[r],n):n.clone?o[r]=di(t[r])?gi(t[r]):t[r]:o[r]=t[r])})),o}function fi(e,t,n,o,r){const i=e[t],l=r||t;if(null==i||typeof window>"u")return null;let a;const s=i.type;return"function"==typeof s&&!function(e){const{prototype:t={}}=e;return!!t.isReactComponent}(s)&&(a="Did you accidentally use a plain function component for an element instead?"),void 0!==a?new Error(`Invalid ${o} \`${l}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const hi=ci(E.element,fi);hi.isRequired=ci(E.element.isRequired,fi);const mi=hi;function bi(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function vi(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":bi(7));return e.charAt(0).toUpperCase()+e.slice(1)}const wi=e=>e,yi=(()=>{let e=wi;return{configure(t){e=t},generate:t=>e(t),reset(){e=wi}}})(),xi=yi,Ci={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function Si(e,t,n="Mui"){const o=Ci[t];return o?`${n}-${o}`:`${xi.generate(e)}-${t}`}const Ri=["values","unit","step"],Ei=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Yr({},e,{[t.key]:t.val})),{})};const _i={borderRadius:4},ki="production"!==process.env.NODE_ENV?E.oneOfType([E.number,E.string,E.object,E.array]):{};function Ii(e,t){return t?pi(e,t,{clone:!1}):e}const Di={xs:0,sm:600,md:900,lg:1200,xl:1536},Oi={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Di[e]}px)`};function Ni(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||Oi;return t.reduce(((o,r,i)=>(o[e.up(e.keys[i])]=n(t[i]),o)),{})}if("object"==typeof t){const e=o.breakpoints||Oi;return Object.keys(t).reduce(((o,r)=>{if(-1!==Object.keys(e.values||Di).indexOf(r)){o[e.up(r)]=n(t[r],r)}else{const e=r;o[e]=t[e]}return o}),{})}return n(t)}function Mi(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function Fi(e,t,n,o=n){let r;return r="function"==typeof e?e(n):Array.isArray(e)?e[n]||o:Mi(e,n)||o,t&&(r=t(r,o,e)),r}function Pi(e){const{prop:t,cssProperty:n=e.prop,themeKey:o,transform:r}=e,i=e=>{if(null==e[t])return null;const i=e[t],l=Mi(e.theme,o)||{};return Ni(e,i,(e=>{let o=Fi(l,r,e);return e===o&&"string"==typeof e&&(o=Fi(l,r,`${t}${"default"===e?"":vi(e)}`,e)),!1===n?o:{[n]:o}}))};return i.propTypes="production"!==process.env.NODE_ENV?{[t]:ki}:{},i.filterProps=[t],i}const ji={m:"margin",p:"padding"},Ai={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ti={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Vi=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!Ti[e])return[e];e=Ti[e]}const[t,n]=e.split(""),o=ji[t],r=Ai[n]||"";return Array.isArray(r)?r.map((e=>o+e)):[o+r]})),Li=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],zi=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Hi=[...Li,...zi];function $i(e,t,n,o){var r;const i=null!=(r=Mi(e,t,!1))?r:n;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function Bi(e){return $i(e,"spacing",8,"spacing")}function Gi(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function qi(e,t,n,o){if(-1===t.indexOf(n))return null;const r=function(e,t){return n=>e.reduce(((e,o)=>(e[o]=Gi(t,n),e)),{})}(Vi(n),o);return Ni(e,e[n],r)}function Ui(e,t){const n=Bi(e.theme);return Object.keys(e).map((o=>qi(e,t,o,n))).reduce(Ii,{})}function Wi(e){return Ui(e,Li)}function Ki(e){return Ui(e,zi)}function Xi(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,o)=>t[o]?Ii(n,t[o](e)):n),{});return n.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function Yi(e){return"number"!=typeof e?e:`${e}px solid`}Wi.propTypes="production"!==process.env.NODE_ENV?Li.reduce(((e,t)=>(e[t]=ki,e)),{}):{},Wi.filterProps=Li,Ki.propTypes="production"!==process.env.NODE_ENV?zi.reduce(((e,t)=>(e[t]=ki,e)),{}):{},Ki.filterProps=zi,"production"!==process.env.NODE_ENV&&Hi.reduce(((e,t)=>(e[t]=ki,e)),{});const Ji=Pi({prop:"border",themeKey:"borders",transform:Yi}),Zi=Pi({prop:"borderTop",themeKey:"borders",transform:Yi}),Qi=Pi({prop:"borderRight",themeKey:"borders",transform:Yi}),el=Pi({prop:"borderBottom",themeKey:"borders",transform:Yi}),tl=Pi({prop:"borderLeft",themeKey:"borders",transform:Yi}),nl=Pi({prop:"borderColor",themeKey:"palette"}),ol=Pi({prop:"borderTopColor",themeKey:"palette"}),rl=Pi({prop:"borderRightColor",themeKey:"palette"}),il=Pi({prop:"borderBottomColor",themeKey:"palette"}),ll=Pi({prop:"borderLeftColor",themeKey:"palette"}),al=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=$i(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:Gi(t,e)});return Ni(e,e.borderRadius,n)}return null};al.propTypes="production"!==process.env.NODE_ENV?{borderRadius:ki}:{},al.filterProps=["borderRadius"],Xi(Ji,Zi,Qi,el,tl,nl,ol,rl,il,ll,al);const sl=e=>{if(void 0!==e.gap&&null!==e.gap){const t=$i(e.theme,"spacing",8,"gap"),n=e=>({gap:Gi(t,e)});return Ni(e,e.gap,n)}return null};sl.propTypes="production"!==process.env.NODE_ENV?{gap:ki}:{},sl.filterProps=["gap"];const ul=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=$i(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:Gi(t,e)});return Ni(e,e.columnGap,n)}return null};ul.propTypes="production"!==process.env.NODE_ENV?{columnGap:ki}:{},ul.filterProps=["columnGap"];const cl=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=$i(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:Gi(t,e)});return Ni(e,e.rowGap,n)}return null};cl.propTypes="production"!==process.env.NODE_ENV?{rowGap:ki}:{},cl.filterProps=["rowGap"];function dl(e,t){return"grey"===t?t:e}Xi(sl,ul,cl,Pi({prop:"gridColumn"}),Pi({prop:"gridRow"}),Pi({prop:"gridAutoFlow"}),Pi({prop:"gridAutoColumns"}),Pi({prop:"gridAutoRows"}),Pi({prop:"gridTemplateColumns"}),Pi({prop:"gridTemplateRows"}),Pi({prop:"gridTemplateAreas"}),Pi({prop:"gridArea"}));function gl(e){return e<=1&&0!==e?100*e+"%":e}Xi(Pi({prop:"color",themeKey:"palette",transform:dl}),Pi({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:dl}),Pi({prop:"backgroundColor",themeKey:"palette",transform:dl}));const pl=Pi({prop:"width",transform:gl}),fl=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,o,r;return{maxWidth:(null==(n=e.theme)||null==(o=n.breakpoints)||null==(r=o.values)?void 0:r[t])||Di[t]||gl(t)}};return Ni(e,e.maxWidth,t)}return null};fl.filterProps=["maxWidth"];const hl=Pi({prop:"minWidth",transform:gl}),ml=Pi({prop:"height",transform:gl}),bl=Pi({prop:"maxHeight",transform:gl}),vl=Pi({prop:"minHeight",transform:gl});Pi({prop:"size",cssProperty:"width",transform:gl}),Pi({prop:"size",cssProperty:"height",transform:gl});Xi(pl,fl,hl,ml,bl,vl,Pi({prop:"boxSizing"}));const wl={border:{themeKey:"borders",transform:Yi},borderTop:{themeKey:"borders",transform:Yi},borderRight:{themeKey:"borders",transform:Yi},borderBottom:{themeKey:"borders",transform:Yi},borderLeft:{themeKey:"borders",transform:Yi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:al},color:{themeKey:"palette",transform:dl},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:dl},backgroundColor:{themeKey:"palette",transform:dl},p:{style:Ki},pt:{style:Ki},pr:{style:Ki},pb:{style:Ki},pl:{style:Ki},px:{style:Ki},py:{style:Ki},padding:{style:Ki},paddingTop:{style:Ki},paddingRight:{style:Ki},paddingBottom:{style:Ki},paddingLeft:{style:Ki},paddingX:{style:Ki},paddingY:{style:Ki},paddingInline:{style:Ki},paddingInlineStart:{style:Ki},paddingInlineEnd:{style:Ki},paddingBlock:{style:Ki},paddingBlockStart:{style:Ki},paddingBlockEnd:{style:Ki},m:{style:Wi},mt:{style:Wi},mr:{style:Wi},mb:{style:Wi},ml:{style:Wi},mx:{style:Wi},my:{style:Wi},margin:{style:Wi},marginTop:{style:Wi},marginRight:{style:Wi},marginBottom:{style:Wi},marginLeft:{style:Wi},marginX:{style:Wi},marginY:{style:Wi},marginInline:{style:Wi},marginInlineStart:{style:Wi},marginInlineEnd:{style:Wi},marginBlock:{style:Wi},marginBlockStart:{style:Wi},marginBlockEnd:{style:Wi},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:sl},rowGap:{style:cl},columnGap:{style:ul},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:gl},maxWidth:{style:fl},minWidth:{transform:gl},height:{transform:gl},maxHeight:{transform:gl},minHeight:{transform:gl},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},yl=wl;const xl=function(){function e(e,t,n,o){const r={[e]:t,theme:n},i=o[e];if(!i)return{[e]:t};const{cssProperty:l=e,themeKey:a,transform:s,style:u}=i;if(null==t)return null;if("typography"===a&&"inherit"===t)return{[e]:t};const c=Mi(n,a)||{};return u?u(r):Ni(r,t,(t=>{let n=Fi(c,s,t);return t===n&&"string"==typeof t&&(n=Fi(c,s,`${e}${"default"===t?"":vi(t)}`,t)),!1===l?n:{[l]:n}}))}return function t(n){var o;const{sx:r,theme:i={}}=n||{};if(!r)return null;const l=null!=(o=i.unstable_sxConfig)?o:yl;function a(n){let o=n;if("function"==typeof n)o=n(i);else if("object"!=typeof n)return n;if(!o)return null;const r=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}(i.breakpoints),a=Object.keys(r);let s=r;return Object.keys(o).forEach((n=>{const r=function(e,t){return"function"==typeof e?e(t):e}(o[n],i);if(null!=r)if("object"==typeof r)if(l[n])s=Ii(s,e(n,r,i,l));else{const e=Ni({theme:i},r,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,r)?s=Ii(s,e):s[n]=t({sx:r,theme:i})}else s=Ii(s,e(n,r,i,l))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(a,s)}return Array.isArray(r)?r.map(a):a(r)}}();xl.filterProps=["sx"];const Cl=xl,Sl=["breakpoints","palette","spacing","shape"];function Rl(e={},...t){const{breakpoints:n={},palette:o={},spacing:r,shape:i={}}=e,l=Jr(e,Sl),a=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,r=Jr(e,Ri),i=Ei(t),l=Object.keys(i);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${n})`}function u(e,r){const i=l.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[l[i]]?t[l[i]]:r)-o/100}${n})`}return Yr({keys:l,values:i,up:a,down:s,between:u,only:function(e){return l.indexOf(e)+1<l.length?u(e,l[l.indexOf(e)+1]):a(e)},not:function(e){const t=l.indexOf(e);return 0===t?a(l[1]):t===l.length-1?s(l[t]):u(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},r)}(n),s=function(e=8){if(e.mui)return e;const t=Bi({spacing:e}),n=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" "));return n.mui=!0,n}(r);let u=pi({breakpoints:a,direction:"ltr",components:{},palette:Yr({mode:"light"},o),spacing:s,shape:Yr({},_i,i)},l);return u=t.reduce(((e,t)=>pi(e,t)),u),u.unstable_sxConfig=Yr({},yl,null==l?void 0:l.unstable_sxConfig),u.unstable_sx=function(e){return Cl({sx:e,theme:this})},u}function El(e=null){const t=n.useContext(_);return!t||function(e){return 0===Object.keys(e).length}(t)?e:t}const _l=Rl();function kl(e,t=0,n=1){return"production"!==process.env.NODE_ENV&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Math.min(Math.max(t,e),n)}function Il(e){if(e.type)return e;if("#"===e.charAt(0))return Il(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error("production"!==process.env.NODE_ENV?`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:bi(9,e));let o,r=e.substring(t+1,e.length-1);if("color"===n){if(r=r.split(" "),o=r.shift(),4===r.length&&"/"===r[3].charAt(0)&&(r[3]=r[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error("production"!==process.env.NODE_ENV?`MUI: unsupported \`${o}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:bi(10,o))}else r=r.split(",");return r=r.map((e=>parseFloat(e))),{type:n,values:r,colorSpace:o}}function Dl(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return-1!==t.indexOf("rgb")?o=o.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),o=-1!==t.indexOf("color")?`${n} ${o.join(" ")}`:`${o.join(", ")}`,`${t}(${o})`}function Ol(e){let t="hsl"===(e=Il(e)).type||"hsla"===e.type?Il(function(e){e=Il(e);const{values:t}=e,n=t[0],o=t[1]/100,r=t[2]/100,i=o*Math.min(r,1-r),l=(e,t=(e+n/30)%12)=>r-i*Math.max(Math.min(t-3,9-t,1),-1);let a="rgb";const s=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(a+="a",s.push(t[3])),Dl({type:a,values:s})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Nl(e,t){const n=Ol(e),o=Ol(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function Ml(e,t){return Yr({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const Fl={black:"#000",white:"#fff"},Pl={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},jl={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Al={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Tl={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Vl={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ll={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},zl={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Hl=["mode","contrastThreshold","tonalOffset"],$l={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Fl.white,default:Fl.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Bl={text:{primary:Fl.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Fl.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Gl(e,t,n,o){const r=o.light||o,i=o.dark||1.5*o;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Il(e),t=kl(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Dl(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=Il(e),t=kl(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Dl(e)}(e.main,i)))}function ql(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2}=e,r=Jr(e,Hl),i=e.primary||function(e="light"){return"dark"===e?{main:Vl[200],light:Vl[50],dark:Vl[400]}:{main:Vl[700],light:Vl[400],dark:Vl[800]}}(t),l=e.secondary||function(e="light"){return"dark"===e?{main:jl[200],light:jl[50],dark:jl[400]}:{main:jl[500],light:jl[300],dark:jl[700]}}(t),a=e.error||function(e="light"){return"dark"===e?{main:Al[500],light:Al[300],dark:Al[700]}:{main:Al[700],light:Al[400],dark:Al[800]}}(t),s=e.info||function(e="light"){return"dark"===e?{main:Ll[400],light:Ll[300],dark:Ll[700]}:{main:Ll[700],light:Ll[500],dark:Ll[900]}}(t),u=e.success||function(e="light"){return"dark"===e?{main:zl[400],light:zl[300],dark:zl[700]}:{main:zl[800],light:zl[500],dark:zl[900]}}(t),c=e.warning||function(e="light"){return"dark"===e?{main:Tl[400],light:Tl[300],dark:Tl[700]}:{main:"#ed6c02",light:Tl[500],dark:Tl[900]}}(t);function d(e){const t=Nl(e,Bl.text.primary)>=n?Bl.text.primary:$l.text.primary;if("production"!==process.env.NODE_ENV){const n=Nl(e,t);n<3&&console.error([`MUI: The contrast ratio of ${n}:1 for ${t} on ${e}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join("\n"))}return t}const g=({color:e,name:t,mainShade:n=500,lightShade:r=300,darkShade:i=700})=>{if(!(e=Yr({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error("production"!==process.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\nThe color object needs to have a \`main\` property or a \`${n}\` property.`:bi(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error("production"!==process.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\n\`color.main\` should be a string, but \`${JSON.stringify(e.main)}\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from "@mui/material/colors";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });`:bi(12,t?` (${t})`:"",JSON.stringify(e.main)));return Gl(e,"light",r,o),Gl(e,"dark",i,o),e.contrastText||(e.contrastText=d(e.main)),e},p={dark:Bl,light:$l};return"production"!==process.env.NODE_ENV&&(p[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),pi(Yr({common:Yr({},Fl),mode:t,primary:g({color:i,name:"primary"}),secondary:g({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:a,name:"error"}),warning:g({color:c,name:"warning"}),info:g({color:s,name:"info"}),success:g({color:u,name:"success"}),grey:Pl,contrastThreshold:n,getContrastText:d,augmentColor:g,tonalOffset:o},p[t]),r)}const Ul=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Wl(e){return Math.round(1e5*e)/1e5}const Kl={textTransform:"uppercase"},Xl='"Roboto", "Helvetica", "Arial", sans-serif';function Yl(e,t){const n="function"==typeof t?t(e):t,{fontFamily:o=Xl,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:l=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,g=Jr(n,Ul);"production"!==process.env.NODE_ENV&&("number"!=typeof r&&console.error("MUI: `fontSize` is required to be a number."),"number"!=typeof u&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=r/14,f=d||(e=>e/u*p+"rem"),h=(e,t,n,r,i)=>Yr({fontFamily:o,fontWeight:e,fontSize:f(t),lineHeight:n},o===Xl?{letterSpacing:`${Wl(r/t)}em`}:{},i,c),m={h1:h(i,96,1.167,-1.5),h2:h(i,60,1.2,-.5),h3:h(l,48,1.167,0),h4:h(l,34,1.235,.25),h5:h(l,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(l,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(l,16,1.5,.15),body2:h(l,14,1.43,.15),button:h(a,14,1.75,.4,Kl),caption:h(l,12,1.66,.4),overline:h(l,12,2.66,1,Kl),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return pi(Yr({htmlFontSize:u,pxToRem:f,fontFamily:o,fontSize:r,fontWeightLight:i,fontWeightRegular:l,fontWeightMedium:a,fontWeightBold:s},m),g,{clone:!1})}function Jl(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const Zl=["none",Jl(0,2,1,-1,0,1,1,0,0,1,3,0),Jl(0,3,1,-2,0,2,2,0,0,1,5,0),Jl(0,3,3,-2,0,3,4,0,0,1,8,0),Jl(0,2,4,-1,0,4,5,0,0,1,10,0),Jl(0,3,5,-1,0,5,8,0,0,1,14,0),Jl(0,3,5,-1,0,6,10,0,0,1,18,0),Jl(0,4,5,-2,0,7,10,1,0,2,16,1),Jl(0,5,5,-3,0,8,10,1,0,3,14,2),Jl(0,5,6,-3,0,9,12,1,0,3,16,2),Jl(0,6,6,-3,0,10,14,1,0,4,18,3),Jl(0,6,7,-4,0,11,15,1,0,4,20,3),Jl(0,7,8,-4,0,12,17,2,0,5,22,4),Jl(0,7,8,-4,0,13,19,2,0,5,24,4),Jl(0,7,9,-4,0,14,21,2,0,5,26,4),Jl(0,8,9,-5,0,15,22,2,0,6,28,5),Jl(0,8,10,-5,0,16,24,2,0,6,30,5),Jl(0,8,11,-5,0,17,26,2,0,6,32,5),Jl(0,9,11,-5,0,18,28,2,0,7,34,6),Jl(0,9,12,-6,0,19,29,2,0,7,36,6),Jl(0,10,13,-6,0,20,31,3,0,8,38,7),Jl(0,10,13,-6,0,21,33,3,0,8,40,7),Jl(0,10,14,-6,0,22,35,3,0,8,42,7),Jl(0,11,14,-7,0,23,36,3,0,9,44,8),Jl(0,11,15,-7,0,24,38,3,0,9,46,8)],Ql=["duration","easing","delay"],ea={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ta={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function na(e){return`${Math.round(e)}ms`}function oa(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function ra(e){const t=Yr({},ea,e.easing),n=Yr({},ta,e.duration);return Yr({getAutoHeightDuration:oa,create:(e=["all"],o={})=>{const{duration:r=n.standard,easing:i=t.easeInOut,delay:l=0}=o,a=Jr(o,Ql);if("production"!==process.env.NODE_ENV){const t=e=>"string"==typeof e,n=e=>!isNaN(parseFloat(e));!t(e)&&!Array.isArray(e)&&console.error('MUI: Argument "props" must be a string or Array.'),!n(r)&&!t(r)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${r}.`),t(i)||console.error('MUI: Argument "easing" must be a string.'),!n(l)&&!t(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),0!==Object.keys(a).length&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(a).join(",")}].`)}return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof r?r:na(r)} ${i} ${"string"==typeof l?l:na(l)}`)).join(",")}},e,{easing:t,duration:n})}const ia={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},la=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];const aa=function(e={},...t){const{mixins:n={},palette:o={},transitions:r={},typography:i={}}=e,l=Jr(e,la);if(e.vars)throw new Error("production"!==process.env.NODE_ENV?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":bi(18));const a=ql(o),s=Rl(e);let u=pi(s,{mixins:Ml(s.breakpoints,n),palette:a,shadows:Zl.slice(),typography:Yl(a,i),transitions:ra(r),zIndex:Yr({},ia)});if(u=pi(u,l),u=t.reduce(((e,t)=>pi(e,t)),u),"production"!==process.env.NODE_ENV){const e=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],t=(t,n)=>{let o;for(o in t){const r=t[o];if(-1!==e.indexOf(o)&&Object.keys(r).length>0){if("production"!==process.env.NODE_ENV){const e=Si("",o);console.error([`MUI: The \`${n}\` component increases the CSS specificity of the \`${o}\` internal state.`,"You can not override it like this: ",JSON.stringify(t,null,2),"",`Instead, you need to use the '&.${e}' syntax:`,JSON.stringify({root:{[`&.${e}`]:r}},null,2),"","https://mui.com/r/state-classes-guide"].join("\n"))}t[o]={}}}};Object.keys(u.components).forEach((e=>{const n=u.components[e].styleOverrides;n&&0===e.indexOf("Mui")&&t(n,e)}))}return u.unstable_sxConfig=Yr({},yl,null==l?void 0:l.unstable_sxConfig),u.unstable_sx=function(e){return Cl({sx:e,theme:this})},u}(),sa=aa;function ua(){const e=function(e=_l){return El(e)}(sa);return"production"!==process.env.NODE_ENV&&n.useDebugValue(e),e.$$material||e}function ca(e,t){var n,o;const{timeout:r,easing:i,style:l={}}=e;return{duration:null!=(n=l.transitionDuration)?n:"number"==typeof r?r:r[t.mode]||0,easing:null!=(o=l.transitionTimingFunction)?o:"object"==typeof i?i[t.mode]:i,delay:l.transitionDelay}}const da=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ga={entering:{opacity:1},entered:{opacity:1}},pa=n.forwardRef((function(e,t){const o=ua(),r={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:l=!0,children:a,easing:s,in:u,onEnter:c,onEntered:d,onEntering:g,onExit:p,onExited:f,onExiting:h,style:m,timeout:b=r,TransitionComponent:v=ui}=e,w=Jr(e,da),y=n.useRef(null),x=function(...e){return n.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(e,t)}))}),e)}(y,a.ref,t),C=e=>t=>{if(e){const n=y.current;void 0===t?e(n):e(n,t)}},S=C(g),R=C(((e,t)=>{(e=>{e.scrollTop})(e);const n=ca({style:m,timeout:b,easing:s},{mode:"enter"});e.style.webkitTransition=o.transitions.create("opacity",n),e.style.transition=o.transitions.create("opacity",n),c&&c(e,t)})),E=C(d),_=C(h),k=C((e=>{const t=ca({style:m,timeout:b,easing:s},{mode:"exit"});e.style.webkitTransition=o.transitions.create("opacity",t),e.style.transition=o.transitions.create("opacity",t),p&&p(e)})),I=C(f);return L.jsx(v,Yr({appear:l,in:u,nodeRef:y,onEnter:R,onEntered:E,onEntering:S,onExit:k,onExited:I,onExiting:_,addEndListener:e=>{i&&i(y.current,e)},timeout:b},w,{children:(e,t)=>n.cloneElement(a,Yr({style:Yr({opacity:0,visibility:"exited"!==e||u?void 0:"hidden"},ga[e],m,a.props.style),ref:x},t))}))}));"production"!==process.env.NODE_ENV&&(pa.propTypes={addEndListener:E.func,appear:E.bool,children:mi.isRequired,easing:E.oneOfType([E.shape({enter:E.string,exit:E.string}),E.string]),in:E.bool,onEnter:E.func,onEntered:E.func,onEntering:E.func,onExit:E.func,onExited:E.func,onExiting:E.func,style:E.object,timeout:E.oneOfType([E.number,E.shape({appear:E.number,enter:E.number,exit:E.number})])});const fa=pa,ha=e=>L.jsx(C,{TransitionComponent:fa,TransitionProps:{timeout:300},arrow:!0,placement:"top",componentsProps:{tooltip:{sx:{borderRadius:"3px !important","& .MuiTooltip-arrow":{color:"#363E4A !important"},color:"white !important",boxShadow:"0px 1px 4px 0px rgba(0, 0, 0, 0.25) !important",display:"flex !important",padding:"4px 8px !important",alignItems:"center !important",fontSize:"12px !important",lineHeight:"16px !important",letterSpacing:" 0.24px !important",bgcolor:"#363E4A !important",wordBreak:"break-word !important"}}},...e});function ma(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16 ",...e,children:L.jsxs("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",children:[L.jsx("circle",{cx:"8",cy:"8",r:"6.25"}),L.jsx("path",{d:"m8 10.75v0m0-6v3.5"})]})})}function ba({tableData:e,actions:t,rowActionsState:n}){var i;const{anchorEl:a,open:s,handleClose:c,handleOpen:d}=Gr(),g=t(e.row),p=(null==n?void 0:n(e.row))??{state:"enabled"},f="no"===(null==(i=e.table.options.meta)?void 0:i.locale)?"Ingen handlinger tilgjengelig":"No actions available",h=r((()=>g.every((e=>!("component"in e)&&e.hide))),[g]),m=g.length>0&&!h,b="enabled"===p.state&&!m,v="hidden"!==p.state&&(m||b||"disabled"===p.state),[w,y]=u(!1);if(l((()=>{if(!w)return;const e=window.setTimeout((()=>y(!1)),1600);return()=>window.clearTimeout(e)}),[w]),!v)return L.jsx("div",{className:"flex justify-center items-center w-[40px]"});const x="disabled"===p.state,C=L.jsx(Xr,{dataTest:"",variant:"text",size:"small",disabled:x,onClick:t=>{t.stopPropagation(),t.preventDefault(),!x&&(d(t),e.row.onChangeFocused(!0))},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:L.jsx(qr,{className:x?"text-delta-300":"text-delta-700",width:20,height:20})});return L.jsx("div",{className:"flex justify-center items-center w-[40px]",children:L.jsxs("div",{className:"flex items-center justify-center",children:["disabled"===p.state?L.jsx(ha,{title:p.tooltipTitle,arrow:!0,placement:p.tooltipPlacement||"top",open:w,onOpen:()=>y(!0),onClose:()=>y(!1),children:L.jsx("span",{className:"cursor-not-allowed",onTouchStart:e=>{e.stopPropagation(),e.preventDefault(),y(!0)},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:C})}):C,"enabled"===p.state&&L.jsx(S,{open:s,anchorEl:a,onClose:()=>{c(),e.row.onChangeFocused(!1)},onClick:()=>{c(),e.row.onChangeFocused(!1)},anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:b?L.jsxs("div",{className:"flex items-center gap-2 p-3 text-delta-700",children:[L.jsx(ma,{width:20,height:20}),L.jsx("span",{children:f})]}):g.map(((t,n)=>{if(k(t)){const r=t.component(e.row,c);return o.isValidElement(r)?L.jsx(o.Fragment,{children:r},n):null}return t.hide?null:L.jsx(ha,{title:null==t?void 0:t.tooltipTitle,arrow:!0,placement:(null==t?void 0:t.tooltipPlacement)||"left",children:L.jsx("span",{children:L.jsx(Ur,{className:t.className,disabled:t.disabled,onClick:()=>{var n;null==(n=t.onClick)||n.call(t,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:t.label})})},n)}))})]})})}function va(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16 9V4h2V2H6v2h2v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1l1-1v-7H19v-2c-1.66 0-3-1.34-3-3"})})}const wa={"actions-header":"_actions-header_1bxzk_1","pin-indicator":"_pin-indicator_1bxzk_11","pin-icon":"_pin-icon_1bxzk_21"},ya={"table-action-item":"_table-action-item_kjriw_1","drag-icon":"_drag-icon_kjriw_18","drag-icon--disabled":"_drag-icon--disabled_kjriw_23","drag-icon--enabled":"_drag-icon--enabled_kjriw_28"};function xa(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",...e,children:L.jsx("path",{fill:"currentColor",d:"M14 6.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0m-5 0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0M5.5 8a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8.5 5.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0M10.5 15a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M4 13.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0"})})}const Ca={en:{column_reorder:"This column is fixed and can’t be reordered.",column_hidden:"This column is fixed and can’t be hidden.",reset_order:"Reset order"},no:{column_reorder:"Denne kolonnen er fast og kan ikke flyttes.",column_hidden:"Denne kolonnen er fast og kan ikke skjules.",reset_order:"Tilbakestill ordre"}};function Sa({id:e,disabled:t,children:n}){const{attributes:o,listeners:r,setNodeRef:i,transform:l,transition:a}=gn({id:e,disabled:t}),s={transform:ae.Transform.toString(l),transition:a};return L.jsx("div",{ref:i,style:s,...o,...r,children:n})}function Ra({headerData:e,locale:t}){const{anchorEl:n,open:o,handleClose:i,handleOpen:l}=Gr(),a=e.table.getAllLeafColumns().some((e=>e.getCanHide()&&!e.getIsVisible()&&!F.includes(e.id))),s=e.table.getAllLeafColumns(),u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r((()=>[...t].filter((e=>null!=e))),[...t])}(function(e,t){return r((()=>({sensor:e,options:t??{}})),[e,t])}(dt,{activationConstraint:{distance:10}})),c=function(e="en"){return r((()=>Ca[e]??Ca.en),[e])}(t),d=s.filter((e=>!F.includes(e.id)&&!!e.columnDef.header));return L.jsxs("div",{className:"flex absolute-center items-center justify-end w-full",children:[L.jsxs("button",{type:"button",className:wa["actions-header"],onClick:l,children:[L.jsx(va,{className:wa["pin-icon"]}),a&&L.jsx("div",{className:wa["pin-indicator"]})]}),L.jsxs(S,{anchorEl:n,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:o,onClose:i,sx:{"& .MuiPaper-root":{maxHeight:"calc(7 * 36px)",overflowY:"auto",scrollbarWidth:"thin"}},children:[L.jsx(Ht,{modifiers:[Xt,Kt],onDragEnd:t=>{var n;const{active:o,over:r}=t;!o||!r||o.id===r.id||null!=(n=s.find((e=>e.id===r.id)))&&n.columnDef.fixedLeft||e.table.setColumnOrder((t=>{const n=function(e){for(var t=-1,n=null==e?0:e.length,o=0,r=[];++t<n;){var i=e[t];i&&(r[o++]=i)}return r}(t).length?t:e.table.getAllLeafColumns().map((e=>e.id)),i=n.indexOf(o.id),l=n.indexOf(r.id);return Yt(n,i,l)}))},collisionDetection:e=>Ee(e).filter((e=>{const t=d.find((t=>t.id===e.id));return!(null!=t&&t.columnDef.fixedLeft)})),sensors:u,children:L.jsx(rn,{items:d.map((e=>e.id)),strategy:tn,children:d.map((e=>{const t=!!e.columnDef.fixedLeft,n=!1===e.columnDef.enableHiding,o=t||n?L.jsxs("div",{children:[t&&c.column_reorder,n&&c.column_hidden]}):null;return L.jsx(Sa,{id:e.id,disabled:t,children:L.jsx(ha,{title:o,arrow:!0,children:L.jsxs("button",{type:"button",onClick:()=>{n||e.toggleVisibility(!e.getIsVisible())},className:ya["table-action-item"],children:[L.jsx(xa,{width:20,height:20,className:hn(ya["drag-icon"],t?ya["drag-icon--disabled"]:ya["drag-icon--enabled"])}),L.jsx("span",{className:"px-2",children:L.jsx($r,{readOnly:n,dataTest:`${e.id}-column-visibility-checkbox`,size:"small",disableRipple:!0,checked:e.getIsVisible(),hideWrapper:!0})}),L.jsx("span",{className:"text-sm text-delta-700 font-roboto",children:e.columnDef.pinnedHeaderText??("string"==typeof e.columnDef.header?e.columnDef.header:e.id)})]})})},e.id)}))})}),L.jsx("div",{className:"pb-2 pl-2",children:L.jsx(Xr,{dataTest:"reset-order-button",variant:"text",size:"small",onClick:()=>e.table.resetColumnOrder(),children:c.reset_order})})]})]})}const Ea=({rowId:e,rowHeight:t,...n})=>{const{attributes:o,listeners:r}=gn({id:e,...n});return L.jsx("div",{...o,...r,style:{height:t||"auto"},children:L.jsx(xa,{width:24,height:24,className:fn(n.disabled?"text-delta-300 cursor-not-allowed":"text-delta-800 cursor-grab")})})};function _a({info:e,rowHeight:t}){const n=e.row.getCanExpand();return L.jsx("div",{className:"flex w-full items-center justify-center",style:{height:t||"auto"},children:L.jsx(Xr,{dataTest:"expand-text-button",size:"small",variant:"textGray",onClick:()=>{n&&e.row.getToggleExpandedHandler()(),e.row.toggleExpand()},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>{e.preventDefault(),e.stopPropagation()},startIcon:L.jsx(Br,{width:20,height:20,style:{rotate:e.row.isExpanded()?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms",cursor:"pointer"}})})})}const ka=e=>{const{columns:t,actions:n,customActionsNode:o,headerPin:r=!0,enableRowSelection:i,expandArrow:l,enableDnd:a,customDndColumnProps:s,rowHeight:u,textExpandArrow:c,customActionsColumnProps:d,rowActionsState:g,locale:p}=e,f=t.some((e=>!0===e.fixedLeft));!t.find((e=>"actions"===e.id))&&(n||o||r)&&t.push(function(e){const{headerPin:t,actions:n,customActionsNode:o,rowHeight:r,customActionsColumnProps:i,rowActionsState:l,locale:a}=e;return{id:O,enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?L.jsx(Ra,{headerData:e,locale:a}):null,cell:e=>n||o?L.jsxs("div",{className:"flex items-center justify-end gap-x-1",style:{height:r||"auto"},children:[o&&L.jsx("div",{children:null==o?void 0:o(e)}),n&&L.jsx(ba,{tableData:e,actions:n,rowActionsState:l})]}):null,size:50,...i}}({headerPin:r,actions:n,customActionsNode:o,rowHeight:u,customActionsColumnProps:d,rowActionsState:g,locale:p})),c&&!t.find((e=>e.id===M))&&t.unshift(function(e,t){return{id:M,minSize:38,maxSize:38,size:38,enableHiding:!1,enableSorting:!1,header:()=>null,cell:e=>L.jsx(_a,{info:e,rowHeight:t}),fixedLeft:e}}(f,u)),l&&!c&&!t.find((e=>e.id===D))&&t.unshift(function(e,t){return{id:D,minSize:50,maxSize:50,size:50,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const n=e.row.getIsExpanded();return e.row.getCanExpand()?L.jsx("span",{className:"flex w-full outline-none focus:outline-none items-center justify-center",onClick:()=>e.row.getToggleExpandedHandler()(),style:{height:t||"auto"},children:L.jsx(Br,{width:24,height:24,style:{rotate:n?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"}})}):null},fixedLeft:e}}(f,u)),a&&!t.find((e=>e.id===N))&&t.unshift(function(e,t){return{enableHiding:!1,enableSorting:!1,header:()=>null,cell:({row:e})=>L.jsx(Ea,{rowId:e.id,rowHeight:t}),...e,id:N}}(s,u)),i&&!t.find((e=>e.id===I))&&t.unshift(function(e,t){return{id:I,minSize:38,maxSize:38,size:38,header:({table:e})=>L.jsx($r,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({cell:e})=>L.jsx("div",{style:{height:t||"auto"},className:"flex items-center w-full",children:L.jsx($r,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onChange:()=>{e.row.toggleSelected()},onMouseUp:e=>{e.preventDefault(),e.stopPropagation()}})}),fixedLeft:e}}(f,u))},Ia={"asma-ui-table-styled-table":"_asma-ui-table-styled-table_1xkq6_1","table-wrapper":"_table-wrapper_1xkq6_16","table-shell":"_table-shell_1xkq6_23","table-wrapper--no-rows":"_table-wrapper--no-rows_1xkq6_29","table-wrapper--proxy":"_table-wrapper--proxy_1xkq6_32","table-wrapper--proxy-bottom":"_table-wrapper--proxy-bottom_1xkq6_33","table-wrapper-fetching":"_table-wrapper-fetching_1xkq6_43","table-scroll":"_table-scroll_1xkq6_46","table-x--fill-height":"_table-x--fill-height_1xkq6_55","table-x":"_table-x_1xkq6_55","table-header--sticky":"_table-header--sticky_1xkq6_70","table-hscroll":"_table-hscroll_1xkq6_75","table-hscroll__content":"_table-hscroll__content_1xkq6_85","no-rows-overlay-container":"_no-rows-overlay-container_1xkq6_88","styled-table":"_styled-table_1xkq6_97",tbody:"_tbody_1xkq6_106","loading-icon":"_loading-icon_1xkq6_111","t-row":"_t-row_1xkq6_118","t-cell":"_t-cell_1xkq6_118","action-cell":"_action-cell_1xkq6_128","fixed-cell":"_fixed-cell_1xkq6_132",expanded_row:"_expanded_row_1xkq6_163",selected:"_selected_1xkq6_181","single-selection":"_single-selection_1xkq6_184",shadowed:"_shadowed_1xkq6_201","is-loading":"_is-loading_1xkq6_227","action-cell-default-background":"_action-cell-default-background_1xkq6_230","fixed-cell-default-background":"_fixed-cell-default-background_1xkq6_233","sortable-column":"_sortable-column_1xkq6_236",resizer:"_resizer_1xkq6_240",isResizing:"_isResizing_1xkq6_252","hide-table-header":"_hide-table-header_1xkq6_264","show-table-header":"_show-table-header_1xkq6_268","table-header":"_table-header_1xkq6_70","hide-header":"_hide-header_1xkq6_293","t-cell__actions":"_t-cell__actions_1xkq6_296","t-cell__fixed":"_t-cell__fixed_1xkq6_309","sort-icon":"_sort-icon_1xkq6_317","table-footer--sticky":"_table-footer--sticky_1xkq6_320","table-footer--inline":"_table-footer--inline_1xkq6_331","table-bottom":"_table-bottom_1xkq6_342","table-bottom--sticky":"_table-bottom--sticky_1xkq6_356"};function Da(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"m7 14l5-5l5 5z"})})}function Oa(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})}const Na=e=>{const{header:t,enableResizing:n,tableWidth:o}=e;let r=t.getSize();const i=t.headerGroup.headers.reduce(((e,t)=>e+t.getSize()),0),l=t.headerGroup.headers.some((e=>e.id===O)),a=t.headerGroup.headers[t.headerGroup.headers.length-(l?2:1)],s=Number(null==a?void 0:a.getSize());if(!n){if(r&&(r=`${r}px`),a&&a.id===t.id){let e;e=o?Math.floor(o)-i+s:"100%";const n=t.column.columnDef.minSize||0;r="string"==typeof e?e:e>n?`${e}px`:`${n}px`}return{width:r||t.column.columnDef.size,maxWidth:r||t.column.columnDef.maxSize,minWidth:r||t.column.columnDef.minSize}}return{width:r||t.column.columnDef.size,maxWidth:t.column.columnDef.maxSize||r,minWidth:t.column.columnDef.minSize||r}};function Ma({styledTableProps:e,header:t,tableCanResize:n=!1,left:o,hasFixedLeftColumn:i,tableWidth:l}){const{actions:s,hideHeader:u=!1,enableResizing:c=!1}=e,d=a(null),{isResizing:g,enableResizingFlag:p,disableResizingFlag:f}=vn(),h=t.column.columnDef.fixedLeft,m=r((()=>t.headerGroup.headers.some((e=>e.id===O))),[t.headerGroup.headers]),b=r((()=>t.headerGroup.headers[t.headerGroup.headers.length-(m?2:1)]),[t.headerGroup.headers,m]);return L.jsx("th",{ref:d,colSpan:t.colSpan,className:fn(Ia["t-cell"],u&&Ia["hide-header"],t.column.id===O&&Ia["t-cell__actions"],i&&!!s&&t.column.id===O&&Ia.shadowed,h&&Ia["t-cell__fixed"]),style:{...Na({enableResizing:c,header:t,element:d.current,tableWidth:l}),...h&&{left:o}},children:L.jsxs("div",{className:fn("flex items-center justify-left",u?Ia["hide-table-header"]:Ia["show-table-header"],t.column.getCanSort()&&Ia["sortable-column"],t.column.columnDef.className),onClick:e=>{const n=t.column.getToggleSortingHandler();!g&&n&&n(e),f()},children:[Co(t.column.columnDef.header,t.getContext()),{asc:L.jsx(Da,{className:Ia["sort-icon"]}),desc:L.jsx(Oa,{className:Ia["sort-icon"]})}[t.column.getIsSorted()]??null,n&&(!!c||t.id!==(null==b?void 0:b.id))&&t.column.getCanResize()&&!F.includes(t.column.id)&&L.jsx("div",{onDoubleClick:()=>t.column.resetSize(),onMouseDown:n=>{n.stopPropagation(),p(),t.getResizeHandler()(n),window.addEventListener("mouseup",(()=>Fa({styledTableProps:e,header:t})))},onTouchStart:n=>{n.stopPropagation(),p(),t.getResizeHandler()(n),window.addEventListener("mouseup",(()=>Fa({styledTableProps:e,header:t})))},className:`${Ia.resizer} ${t.column.getIsResizing()?Ia.isResizing:""}`})]})},t.id)}function Fa({styledTableProps:e,header:t}){if(e.uniqueKey){const n=e.uniqueKey,o=localStorage.getItem(n);let r={};if(o)try{r=JSON.parse(o)}catch{console.warn("Failed to parse stored dimensions. Resetting."),r={}}r[t.column.id]=t.column.getSize(),localStorage.setItem(n,JSON.stringify(r))}}function Pa({table:e,styledTableProps:t,tableCanResize:n,tableWidth:o}){const{stickyHeader:r=!1,tableHeaderRef:i,tableHeaderStyle:l={}}=t,a=e.getHeaderGroups().some((e=>e.headers.some((e=>!0===e.column.columnDef.fixedLeft)))),s={...l};return L.jsx("thead",{className:hn(Ia["table-header"],r&&Ia["table-header--sticky"],t.tableHeaderClassName),style:s,ref:i,children:e.getHeaderGroups().map((e=>L.jsx("tr",{children:e.headers.map(((r,i)=>{const l=r.column.columnDef.fixedLeft,s=e.headers.slice(0,i).reduce(((e,t)=>e+(t.column.getSize()||0)),0);return L.jsx(Ma,{styledTableProps:t,header:r,tableCanResize:n,left:l?s:0,hasFixedLeftColumn:a,tableWidth:o},r.column.id)}))},e.id)))})}const ja="_skeleton-row_5gbhw_1",Aa=({colSpan:e,rowHeight:t=48})=>L.jsx(h,{children:Array.from({length:10}).map(((n,o)=>L.jsx("tr",{children:L.jsx("td",{colSpan:e,height:t,className:ja,children:L.jsx(R,{variant:"rectangular",width:"100%",height:40,sx:{backgroundColor:"var(--colors-delta-50)",borderRadius:"8px"}},o)})},o)))});function Ta({styledTableProps:e,row:t,index:n}){const{loading:o,getRowClassName:i,rowHeight:a,onRowClick:s,expandArrow:u,enableDnd:c,disableDndForRow:d,tdClassName:g,customSubRowData:p,renderSubRows:f,defaultExpanded:m,actions:b,textExpandArrow:v,enableMultiRowSelection:w,enableRowSelection:y,singleSelectionRow:x}=e,C=null==d?void 0:d(t),{transform:S,transition:R,setNodeRef:E,isDragging:_}=gn({id:t.original.id,disabled:!c||C}),k={transform:ae.Transform.toString(S),transition:R,opacity:_?.8:1,zIndex:_?1:0,position:"relative"},{isResizing:I,disableResizingFlag:D}=vn();l((()=>{m&&t.getCanExpand()&&!t.getIsExpanded()&&t.toggleExpand()}),[]);const N=e=>{var n,o;t.getCanExpand()&&!u&&t.getToggleExpandedHandler()(),null==(n=document.getElementById(t.id))||n.focus();const r=!("Range"===(null==(o=window.getSelection())?void 0:o.type)||I),i=s instanceof Function;!i&&v&&r?t.toggleExpand():i&&r&&s(e,t),D()},M=t.getVisibleCells().map(((e,t,n)=>({...e,left:n.slice(0,t).reduce(((e,t)=>e+(t.column.getSize()||0)),0)}))),F=r((()=>M.filter((({column:e})=>e.columnDef.fixedLeft))),[M]),P=!w&&!y&&x,j=t.getIsSelected()&&P,A=s instanceof Function;return L.jsxs(h,{children:[L.jsx("tr",{role:"row","aria-selected":t.getIsSelected()||t.isFocused()?"true":"false",tabIndex:t.isFocused()?0:-1,"data-index":n,"data-test":t.id,id:t.id,className:fn(Ia["t-row"],o&&Ia["is-loading"],null==i?void 0:i(t)),style:{height:a?`${a}px`:"inherit",...c&&k},ref:C?void 0:E,onMouseUp:e=>{e.target.classList.contains("MuiModal-backdrop")||"INPUT"===e.target.nodeName||"BUTTON"===e.target.nodeName||"LI"===e.target.nodeName||e.target.closest("li")||N(e)},onMouseDown:e=>{e.detail>1&&!A&&v&&e.preventDefault()},onKeyDown:e=>{switch(e.key){case"Tab":case"ArrowDown":t.focusNextRow(),e.preventDefault();break;case"ArrowUp":t.focusPrevRow(),e.preventDefault();break;case"Enter":N(e)}},children:M.map(((e,n)=>{var o;const r=e.column.id===O,l=e.column.columnDef.fixedLeft,a=e.id===(null==(o=F.at(-1))?void 0:o.id),s=t.isExpanded(),u=0===n;return L.jsx("td",{className:fn(Ia["t-cell"],A&&"cursor-pointer",g,r&&Ia["action-cell"],r&&!!b&&F.length&&Ia.shadowed,r&&(null!=i&&i(t)?null==i?void 0:i(t):Ia["action-cell-default-background"]),l&&Ia["fixed-cell"],a&&Ia.shadowed,t.getIsSelected()&&Ia.selected,l&&(null!=i&&i(t)?null==i?void 0:i(t):Ia["fixed-cell-default-background"]),s&&Ia.expanded_row,(j||t.isFocused())&&Ia["single-selection"]),style:{left:l?e.left:void 0},children:L.jsxs("div",{style:{display:"flex",alignItems:"center",minWidth:u?32:void 0,position:"relative"},children:[u&&j&&L.jsx("span",{style:{display:"inline-flex",alignItems:"center",position:"absolute",left:0,top:"50%",transform:"translateY(-50%)"},children:L.jsx(Va,{})}),L.jsx("span",{style:{marginLeft:u&&P?30:0,width:"100%"},children:Co(e.column.columnDef.cell,e.getContext())})]})},e.id)}))}),t.getIsExpanded()&&L.jsx(L.Fragment,{children:p&&f&&f({rows:p.get(t.original.id.toString())??[],row:t.original})})]},t.id)}const Va=()=>L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 2 22 22",style:{color:"var(--colors-gama-500)"},children:L.jsx("path",{fill:"currentColor",d:"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"})});function La({styledTableProps:e,table:t}){const n=e.hideFooter?t.getExpandedRowModel().rows:t.getRowModel().rows;return L.jsx(L.Fragment,{children:n.map(((t,n)=>L.jsx(Ta,{styledTableProps:e,row:t,index:n},t.id)))})}function za({table:e,styledTableProps:t}){const{columns:n,data:o,loading:r,enableDnd:i,rowHeight:l}=t,a=e.getAllLeafColumns().length||n.length||1;return r&&0===o.length?L.jsx("tbody",{className:Ia.tbody,children:L.jsx(Aa,{colSpan:a,rowHeight:l})}):0===o.length?null:L.jsx("tbody",{className:Ia.tbody,children:i?L.jsx(rn,{items:o,strategy:tn,children:L.jsx(La,{table:e,styledTableProps:t})}):L.jsx(La,{table:e,styledTableProps:t})})}function Ha(e){return L.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:[L.jsx("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:.5}),L.jsx("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:L.jsx("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]})}const $a=({fetching:e=!1})=>e?L.jsx("div",{className:"absolute z-10 bg-white/40 left-0 top-0 right-0 bottom-0 flex items-center justify-center ",children:L.jsx(Ha,{className:Ia["loading-icon"],width:50,height:50})}):null;function Ba(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"})})}const Ga={"table-pagination":"_table-pagination_pu6mb_1","table-pagination__pages-list":"_table-pagination__pages-list_pu6mb_11","table-pagination__pages-list__page":"_table-pagination__pages-list__page_pu6mb_16","page-selected":"_page-selected_pu6mb_27","check-icon":"_check-icon_pu6mb_30"};function qa(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z"})})}function Ua(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"})})}const Wa=e=>L.jsxs(x,{classes:{root:"flex gap-x-1"},sx:{padding:"8px","&.Mui-selected":{backgroundColor:"var(--colors-gama-50)","&:hover":{backgroundColor:"var(--colors-gama-50)"}}},...e,children:[L.jsx(Ua,{width:24,height:24,color:e.selected?"var(--colors-gama-500)":"transparent",style:{transition:"color 0.2s ease"}}),e.children]}),Ka=[10,20,50];function Xa({table:e,showRowSelect:t,locale:n}){const{anchorEl:o,open:i,handleClose:l,handleOpen:u}=Gr(),{anchorEl:c,open:d,handleClose:g,handleOpen:p}=Gr(),f=a(null),h="no"===n,m=r((()=>({anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}})),[]),b=s((()=>{var e;const t=Ia["asma-ui-table-styled-table"],n=null==(e=f.current)?void 0:e.closest(`.${t}`),o=null==n?void 0:n.querySelector(`.${Ia["table-scroll"]}, .${Ia["table-wrapper"]}`);o&&o.scrollTo({top:0,behavior:"smooth"})}),[]),v=e.getPageCount()||1,w=e.getState().pagination.pageIndex+1,y=r((()=>Array.from({length:v},((e,t)=>t+1))),[v]),x=e.getState().pagination.pageSize,C=r((()=>{const e=new Set([...Ka,x]);return Array.from(e).sort(((e,t)=>e-t))}),[]),R=s((t=>{e.setPageIndex(t-1),l(),b()}),[e,l,b]),E=s((t=>{e.setPageSize(t),g()}),[e,g]);return L.jsxs("div",{ref:f,className:Ga["table-pagination"],children:[t&&L.jsxs(L.Fragment,{children:[L.jsxs(Xr,{dataTest:"table-rows-count-button",variant:"outlined",size:"large",onClick:p,endIcon:L.jsx(Br,{className:(d?"rotate-180":"rotate-0")+" transition-transform duration-300",height:24,width:24}),children:[x," ",h?"rader":"rows"]}),L.jsx(S,{open:d,anchorEl:c,slotProps:{paper:{sx:{width:c?c.clientWidth:void 0,maxHeight:288,overflowY:"auto"}}},onClose:g,anchorOrigin:m.anchorOrigin,transformOrigin:m.transformOrigin,classes:{paper:"border border-solid border-delta-200 py-2"},children:C.map((e=>L.jsx(Wa,{onClick:t=>{t.stopPropagation(),t.preventDefault(),E(e)},selected:x===e,children:L.jsxs("span",{className:"text-delta-700 text-sm font-normal",children:[e," ",h?"rader":"rows"]})},e)))})]}),L.jsx(ha,{title:h?"Nåværende side":"Current Page",children:L.jsx("div",{children:L.jsxs(Xr,{dataTest:"current-page-button",variant:"outlined",size:"large",onClick:u,endIcon:L.jsx(Br,{className:(i?"rotate-180":"rotate-0")+" transition-transform duration-300",height:24,width:24}),children:[h?"Side":"Page"," ",w," ",h?"av":"of"," ",v]})})}),L.jsx(S,{open:i,anchorEl:o,slotProps:{paper:{sx:{width:o?o.clientWidth:void 0,maxHeight:288,overflowY:"auto"}}},onClose:l,anchorOrigin:m.anchorOrigin,transformOrigin:m.transformOrigin,classes:{paper:"border border-solid border-delta-200 py-2"},children:y.map((e=>L.jsx(Wa,{onClick:t=>{t.stopPropagation(),t.preventDefault(),R(e)},selected:e===w,children:L.jsxs("span",{className:"text-delta-700 text-sm font-normal",children:[h?"Side":"Page"," ",e]})},e)))}),L.jsx(ha,{title:1===w?"":h?"Forrige side":"Previous Page",children:L.jsx("div",{children:L.jsx(Xr,{dataTest:"prev-page-button",variant:"outlined",onClick:()=>{e.previousPage(),b()},size:"large",disabled:!e.getCanPreviousPage(),startIcon:L.jsx(qa,{height:24,width:24})})})}),L.jsx(ha,{title:w===v?"":h?"Neste side":"Next Page",children:L.jsx("div",{children:L.jsx(Xr,{dataTest:"next-page-button",variant:"outlined",onClick:()=>{e.nextPage(),b()},size:"large",disabled:!e.getCanNextPage(),startIcon:L.jsx(Ba,{height:24,width:24})})})})]})}function Ya({table:e,styledTableProps:t,canShowStickyFooter:n}){var o,r,i;if(t.hideFooter||0===t.data.length)return null;const l=t.paginationAlignLeft,a=e.getState().pagination.pageSize,s=e.getFilteredRowModel().rows.length>a,u=null==(o=t.footer)?void 0:o.call(t,e);return null!=u&&!1!==u||s?L.jsxs("div",{className:n?Ia["table-footer--sticky"]:Ia["table-footer--inline"],style:l&&{justifyContent:"flex-start"}||{},children:[!l&&(null==(r=t.footer)?void 0:r.call(t,e)),s&&L.jsx(Xa,{table:e,showRowSelect:!!t.showRowCountSelect,locale:t.locale||"en"}),l&&(null==(i=t.footer)?void 0:i.call(t,e))]}):null}function Ja({enabled:e,data:t,setData:n,children:o}){const i=r((()=>t.map((e=>e.id))),[t]);return e?L.jsx(Ht,{collisionDetection:Ee,modifiers:[Xt,Kt],onDragEnd:t=>{if(!e||!n)return;const{active:o,over:r}=t;!o||!r||o.id===r.id||n((e=>Yt(e,i.indexOf(o.id),i.indexOf(r.id))))},children:o}):L.jsx(L.Fragment,{children:o})}function Za({enabled:e,className:t,children:n}){return e?L.jsx("div",{className:t,children:n}):L.jsx(L.Fragment,{children:n})}const Qa=e=>{const t=r((()=>({...e,rowHeight:e.rowHeight||48})),[e]),{className:n,tableClassName:o,height:l,noRowsOverlay:s,data:c,enableDnd:d,setData:g,loading:p}=t;ka(t);const{table:f}=_o(t),h=c.length>0,m=h&&!!p,b=!h&&!p,v=wn(),w=!!t.stickyFooter&&!v,y=!w,{tableScrollRef:x,tableXRef:C,hScrollRef:S,hScrollContentRef:R}=function(e){const t=a(null),n=a(null),o=a(null),r=a(null);return i((()=>{if(!e)return;const i=t.current,l=n.current,a=o.current,s=r.current;if(!(i&&l&&a&&s))return;let u=!1;const c=()=>{s.style.width=`${l.scrollWidth}px`},d=()=>{u||(u=!0,a.scrollLeft=l.scrollLeft,u=!1)},g=()=>{u||(u=!0,l.scrollLeft=a.scrollLeft,u=!1)};c(),d(),l.addEventListener("scroll",d,{passive:!0}),a.addEventListener("scroll",g,{passive:!0});const p=new ResizeObserver(c);return p.observe(l),()=>{l.removeEventListener("scroll",d),a.removeEventListener("scroll",g),p.disconnect()}}),[e]),{tableScrollRef:t,tableXRef:n,hScrollRef:o,hScrollContentRef:r}}(y),{ref:E,heightPx:_}=function(){const e=a(null),[t,n]=u(0);return i((()=>{const t=e.current;if(!t)return;let o=0;const r=()=>{const e=Math.round(t.getBoundingClientRect().height);n((t=>t===e?t:e))},i=()=>{cancelAnimationFrame(o),o=requestAnimationFrame(r)};i();const l=new ResizeObserver(i);return l.observe(t),()=>{cancelAnimationFrame(o),l.disconnect()}}),[]),{ref:e,heightPx:t}}(),k=t.rowHeight??48,I=f.getRowModel().rows.length,D=r((()=>k<=0?0:Math.floor(_/k)),[_,k]),O=!w&&I>0&&I<=D,N=hn(w?Ia["table-wrapper"]:O||!w&&b?Ia["table-wrapper--proxy-bottom"]:Ia["table-wrapper--proxy"],m&&Ia["table-wrapper-fetching"],b&&Ia["table-wrapper--no-rows"],n),M=L.jsxs("table",{className:Ia["styled-table"],style:{width:f.getTotalSize(),minWidth:"100%"},children:[L.jsx(Pa,{table:f,styledTableProps:t,tableCanResize:!!t.enableColumnResizing,tableWidth:null}),L.jsx($a,{fetching:!!m}),L.jsx(za,{table:f,styledTableProps:t})]});return L.jsx(bn,{children:L.jsx(Ja,{enabled:!!d,data:c,setData:g,children:L.jsxs("div",{ref:E,className:hn(Ia["asma-ui-table-styled-table"],o),style:{height:l},children:[L.jsx(Za,{enabled:w,className:Ia["table-shell"],children:L.jsxs("div",{className:N,children:[w?M:L.jsxs("div",{ref:x,className:hn(Ia["table-scroll"]),children:[L.jsx("div",{ref:C,className:hn(Ia["table-x"],!O&&Ia["table-x--fill-height"]),children:M}),L.jsx("div",{ref:S,className:Ia["table-hscroll"],children:L.jsx("div",{ref:R,className:Ia["table-hscroll__content"]})}),L.jsx("div",{className:hn(Ia["table-bottom"],O&&Ia["table-bottom--sticky"]),children:L.jsx(Ya,{table:f,styledTableProps:t,canShowStickyFooter:!1})})]}),b&&L.jsx("div",{className:Ia["no-rows-overlay-container"],children:s})]})}),w&&L.jsx(Ya,{table:f,styledTableProps:t,canShowStickyFooter:!0})]})})})};export{O as ACTIONS_COLUMN_ID,N as DND_HANDLE_COLUMN_ID,D as EXPAND_COLUMN_ID,F as INTERNAL_COLUMN_IDS,Ea as RowDragHandleCell,I as SELECT_COLUMN_ID,M as SHOW_FULL_TEXT_ID,Qa as StyledTable,yn as createColumnHelper,k as isCustomAction};
|
|
40
|
+
function xo(e,t){return e?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(e)?n.createElement(e,t):e:null}const Co={getInitialState:e=>({expandedRows:new Set,...e}),getDefaultOptions:e=>({onChangeExpandedRows:xn("expandedRows",e)}),createTable:e=>{e.setExpandedRows=t=>{var n,o;return null==(o=(n=e.options).onChangeExpandedRows)?void 0:o.call(n,(e=>yn(t,e)))}},createRow:(e,t)=>{e.onChangeExpanded=n=>t.setExpandedRows((t=>{const o=new Set(t),r=e.id;return n?o.add(r):o.delete(r),yn((()=>o),t)})),e.isExpanded=()=>t.getState().expandedRows.has(e.id),e.toggleExpand=()=>{const t=e.isExpanded();e.onChangeExpanded(!t)}}},So={getInitialState:e=>({focusedRow:null,...e}),getDefaultOptions:e=>({onChangeFocusedRow:xn("focusedRow",e)}),createTable:e=>{e.setFocusedRow=t=>{var n,o;return null==(o=(n=e.options).onChangeFocusedRow)?void 0:o.call(n,(e=>yn(t,e)))},e.focusRowById=async t=>{var n;if(-1===e.getRowModel().rows.findIndex((e=>e.id===t))&&e.getState().pagination){const o=e.getState().pagination.pageSize,r=e.getCoreRowModel().rows.findIndex((e=>e.id===t));if(-1!==r){const t=Math.floor(r/o);null==(n=e.setPageIndex)||n.call(e,t)}}if(await new Promise(requestAnimationFrame),!e.getRowModel().rows.find((e=>e.id===t)))return;e.setFocusedRow((()=>t));const o=document.getElementById(t);o&&(o.focus({preventScroll:!1}),o.scrollIntoView({behavior:"smooth",block:"center"}))}},createRow:(e,t)=>{e.isFocused=()=>t.getState().focusedRow===e.id,e.onChangeFocused=(n,o)=>{const r=o??e.id;if(t.setFocusedRow((()=>n?r:null)),n){const e=document.getElementById(r);e&&e.focus({preventScroll:!0})}},e.toggleFocused=()=>e.onChangeFocused(!e.isFocused()),e.focusNextRow=()=>{var e;const n=t.getRowModel().rows,o=n.findIndex((e=>e.id===t.getState().focusedRow)),r=n[o+1];r&&(r.onChangeFocused(!0,r.id),null==(e=document.getElementById(r.id))||e.focus({preventScroll:!0}))},e.focusPrevRow=()=>{var e;const n=t.getRowModel().rows,o=n.findIndex((e=>e.id===t.getState().focusedRow)),r=n[o-1];r&&(r.onChangeFocused(!0,r.id),null==(e=document.getElementById(r.id))||e.focus({preventScroll:!0}))}}},Ro={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xn("columnOrder",e)}),createTable:e=>{const t=e.getAllLeafColumns().map((e=>e.id));e.setColumnOrder=t=>{var n,o;return null==(o=(n=e.options).onColumnOrderChange)?void 0:o.call(n,(e=>yn(t,e)))},e.resetColumnOrder=()=>{e.setColumnOrder(t)}}};const Eo=e=>{const{columns:t,data:o,initialState:i,pageSize:a,enableRowSelection:s,tableInstanceRef:u,locale:c,persistColumnOrderKey:d,...g}=e,p=(e=>r((()=>{if(e)try{const t=localStorage.getItem(e);if(!t)return;const n=JSON.parse(t);return Array.isArray(n)?n:void 0}catch{return}}),[e]))(d),f=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=n.useState((()=>({current:vo(t)}))),[r,i]=n.useState((()=>o.current.initialState));return o.current.setOptions((t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),null==e.onStateChange||e.onStateChange(t)}}))),o.current}({_features:[Co,So,Ro],columns:t,data:o,meta:{locale:c??"en"},initialState:{pagination:{pageIndex:0,pageSize:a||50},columnVisibility:{...null==i?void 0:i.columnVisibility,[I]:!1},columnOrder:p,...i},enableRowSelection:s,getCoreRowModel:e=>Sn((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const l=[];for(let s=0;s<t.length;s++){const u=Dn(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return l};return n.rows=o(t),n}),Rn(e.options,"debugTable","getRowModel",(()=>e._autoResetPageIndex()))),getExpandedRowModel:e=>Sn((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?wo(t):t),Rn(e.options,"debugTable","getExpandedRowModel")),getFilteredRowModel:e=>Sn((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const i=o.getFilterFn();i?r.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const l=(n??[]).map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;o&&a&&s.length&&(l.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return yo(t.rows,(e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0}),e)}),Rn(e.options,"debugTable","getFilteredRowModel",(()=>e._autoResetPageIndex()))),getSortedRowModel:e=>Sn((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],i=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),l={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(l[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const a=e=>{const t=e.map((e=>({...e})));return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],a=l[r.id],s=a.sortUndefined,u=null!=(n=null==r?void 0:r.desc)&&n;let c=0;if(s){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);if(n||o){if("first"===s)return n?-1:1;if("last"===s)return n?1:-1;c=n&&o?0:n?s:-s}}if(0===c&&(c=a.sortingFn(e,t,r.id)),0!==c)return u&&(c*=-1),a.invertSorting&&(c*=-1),c}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}}),Rn(e.options,"debugTable","getSortedRowModel",(()=>e._autoResetPageIndex()))),getPaginationRowModel:e=>Sn((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:o,pageIndex:r}=t;let{rows:i,flatRows:l,rowsById:a}=n;const s=o*r,u=s+o;let c;i=i.slice(s,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:l,rowsById:a}:wo({rows:i,flatRows:l,rowsById:a}),c.flatRows=[];const d=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return c.rows.forEach(d),c}),Rn(e.options,"debugTable","getPaginationRowModel")),getRowId:g.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString()),defaultColumn:e.enableResizing?{size:void 0}:void 0,...g});return u&&(u.current=f),function(e,t){const n=e.getState().columnOrder;l((()=>{if(t&&n)try{localStorage.setItem(t,JSON.stringify(n))}catch(e){console.error(e)}}),[n,t])}(f,d),{table:f}},_o={CheckboxWrapper:"_CheckboxWrapper_k4bh3_1","size-small":"_size-small_k4bh3_11","size-medium":"_size-medium_k4bh3_15",Checkbox:"_Checkbox_k4bh3_1",ReadOnly:"_ReadOnly_k4bh3_45",Indicator:"_Indicator_k4bh3_54",HideWrapper:"_HideWrapper_k4bh3_58",CheckboxHover:"_CheckboxHover_k4bh3_65",CheckboxRippleContainer:"_CheckboxRippleContainer_k4bh3_65",CheckboxRipple:"_CheckboxRipple_k4bh3_65",ripple:"_ripple_k4bh3_1"};function ko(){}const Io=Object.freeze({});const Do={};function Oo(e,t){const o=n.useRef(Do);return o.current===Do&&(o.current=e(t)),o}const No=n[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Mo=No&&No!==n.useLayoutEffect?No:e=>e();function Fo(e){const t=Oo(Po).current;return t.next=e,Mo(t.effect),t.trampoline}function Po(){const e={next:void 0,callback:jo,trampoline:(...t)=>{var n;return null==(n=e.callback)?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function jo(){if("production"!==process.env.NODE_ENV)throw new Error("Base UI: Cannot call an event handler while rendering.")}const Ao=typeof document<"u"?n.useLayoutEffect:()=>{};function To(e,t,n,o){const r=Oo(Vo).current;return function(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}(r,e,t,n,o)&&Lo(r,[e,t,n,o]),r.callback}function Vo(){return{callback:null,cleanup:null,refs:[]}}function Lo(e,t){e.refs=t,t.every((e=>null==e))?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const o=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const r=t[e];if(null!=r)switch(typeof r){case"function":{const t=r(n);"function"==typeof t&&(o[e]=t);break}case"object":r.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(null!=n)switch(typeof n){case"function":{const t=o[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}const zo={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Ho={...zo,position:"fixed",top:0,left:0},$o={...zo,position:"absolute"};let Bo=function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({}),Go=function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({});const qo={valid:e=>null===e?null:e?{[Go.valid]:""}:{[Go.invalid]:""}};function Uo(e){return n.useMemo((()=>({checked:t=>e.indeterminate?{}:t?{[Bo.checked]:""}:{[Bo.unchecked]:""},...qo})),[e.indeterminate])}function Wo(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach((e=>n.searchParams.append("args[]",e))),`Base UI error #${e}; visit ${n} for the full message.`}const Ko=parseInt(n.version,10);function Xo(e){if(!n.isValidElement(e))return null;const t=e,o=t.props;return(function(e){return Ko>=e}(19)?null==o?void 0:o.ref:t.ref)??null}function Yo(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}const Jo={};function Zo(e,t,n,o,r){let i={...nr(e,Jo)};return t&&(i=Qo(i,t)),n&&(i=Qo(i,n)),o&&(i=Qo(i,o)),r&&(i=Qo(i,r)),i}function Qo(e,t){return tr(t)?t(e):function(e,t){if(!t)return e;for(const n in t){const o=t[n];switch(n){case"style":e[n]=Yo(e.style,o);break;case"className":e[n]=ir(e.className,o);break;default:er(n,o)?e[n]=or(e[n],o):e[n]=o}}return e}(e,t)}function er(e,t){const n=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return 111===n&&110===o&&r>=65&&r<=90&&("function"==typeof t||typeof t>"u")}function tr(e){return"function"==typeof e}function nr(e,t){return tr(e)?e(t):e??Jo}function or(e,t){return t?e?n=>{if(function(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}(n)){const o=n;rr(o);const r=t(o);return o.baseUIHandlerPrevented||null==e||e(o),r}const o=t(n);return null==e||e(n),o}:t:e}function rr(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ir(e,t){return t?e?t+" "+e:t:e}function lr(e,t,o={}){const r=t.render,i=function(e,t={}){const{className:n,style:o,render:r}=e,{state:i=Io,ref:l,props:a,stateAttributesMapping:s,enabled:u=!0}=t,c=u?function(e,t){return"function"==typeof e?e(t):e}(n,i):void 0,d=u?function(e,t){return"function"==typeof e?e(t):e}(o,i):void 0,g=u?function(e,t){const n={};for(const o in e){const r=e[o];if(null!=t&&t.hasOwnProperty(o)){const e=t[o](r);null!=e&&Object.assign(n,e)}else!0===r?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}(i,s):Io,p=u?Yo(g,Array.isArray(a)?function(e){if(0===e.length)return Jo;if(1===e.length)return nr(e[0],Jo);let t={...nr(e[0],Jo)};for(let n=1;n<e.length;n+=1)t=Qo(t,e[n]);return t}(a):a)??Io:Io;return typeof document<"u"&&(u?Array.isArray(l)?p.ref=function(e){const t=Oo(Vo).current;return function(e,t){return e.refs.length!==t.length||e.refs.some(((e,n)=>e!==t[n]))}(t,e)&&Lo(t,e),t.callback}([p.ref,Xo(r),...l]):p.ref=To(p.ref,Xo(r),l):To(null,null)),u?(void 0!==c&&(p.className=ir(p.className,c)),void 0!==d&&(p.style=Yo(p.style,d)),p):Io}(t,o);if(!1===o.enabled)return null;return function(e,t,o,r){if(t){if("function"==typeof t)return t(o,r);const e=Zo(o,t.props);return e.ref=o.ref,n.cloneElement(t,e)}if(e&&"string"==typeof e)return function(e,t){return"button"===e?f("button",{type:"button",...t,key:t.key}):"img"===e?f("img",{alt:"",...t,key:t.key}):n.createElement(e,t)}(e,o);throw new Error("production"!==process.env.NODE_ENV?"Base UI: Render element or function are not defined.":Wo(8))}(e,r,i,o.state??Io)}const ar={...n};let sr=0;const ur=ar.useId;function cr(e,t){if(void 0!==ur){const n=ur();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){const[o,r]=n.useState(e),i=e||o;return n.useEffect((()=>{null==o&&(sr+=1,r(`${t}-${sr}`))}),[o,t]),i}(e,t)}function dr(e){return cr(e,"base-ui")}function gr(e){return typeof window<"u"&&(e instanceof HTMLElement||e instanceof function(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}(e).HTMLElement)}let pr;function fr(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");pr.has(t)||(pr.add(t),console.error(`Base UI: ${t}`))}}"production"!==process.env.NODE_ENV&&(pr=new Set);const hr=n.createContext(void 0);function mr(e={}){const{disabled:t=!1,focusableWhenDisabled:o,tabIndex:r=0,native:i=!0}=e,l=n.useRef(null),a=void 0!==function(e=!1){const t=n.useContext(hr);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Wo(16));return t}(!0),s=Fo((()=>{const e=l.current;return!("A"!==(null==e?void 0:e.tagName)||null==e||!e.href)})),{props:u}=function(e){const{focusableWhenDisabled:t,disabled:o,composite:r=!1,tabIndex:i=0,isNativeButton:l}=e,a=r&&!1!==t,s=r&&!1===t;return{props:n.useMemo((()=>{const e={onKeyDown(e){o&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=i,!l&&o&&(e.tabIndex=t?i:-1)),(l&&(t||a)||!l&&o)&&(e["aria-disabled"]=o),l&&(!t||s)&&(e.disabled=o),e}),[r,o,t,a,s,l,i])}}({focusableWhenDisabled:o,disabled:t,composite:a,tabIndex:r,isNativeButton:i});"production"!==process.env.NODE_ENV&&n.useEffect((()=>{if(!l.current)return;const e="BUTTON"===l.current.tagName;i?e||fr("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):e&&fr("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")}),[i]);const c=n.useCallback((()=>{const e=l.current;(function(e){return gr(e)&&"BUTTON"===e.tagName})(e)&&a&&t&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)}),[t,u.disabled,a]);Ao(c,[c]);return{getButtonProps:n.useCallback(((e={})=>{const{onClick:n,onMouseDown:o,onKeyUp:r,onKeyDown:l,onPointerDown:a,...c}=e;return Zo({type:i?"button":void 0,onClick(e){t?e.preventDefault():null==n||n(e)},onMouseDown(e){t||null==o||o(e)},onKeyDown(e){if(t||(rr(e),null==l||l(e)),e.baseUIHandlerPrevented)return;const o=e.target===e.currentTarget&&!i&&!s()&&!t,r="Enter"===e.key,a=" "===e.key;o&&((a||r)&&e.preventDefault(),r&&(null==n||n(e)))},onKeyUp(e){t||(rr(e),null==r||r(e)),!e.baseUIHandlerPrevented&&e.target===e.currentTarget&&!i&&!t&&" "===e.key&&(null==n||n(e))},onPointerDown(e){t?e.preventDefault():null==a||a(e)}},i?void 0:{role:"button"},u,c)}),[t,u,i,s]),buttonRef:Fo((e=>{l.current=e,c()}))}}"production"!==process.env.NODE_ENV&&(hr.displayName="CompositeRootContext");const br=n.createContext({invalid:void 0,name:void 0,validityData:{state:{badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},errors:[],error:"",value:"",initialValue:null},setValidityData:ko,disabled:void 0,touched:!1,setTouched:ko,dirty:!1,setDirty:ko,filled:!1,setFilled:ko,focused:!1,setFocused:ko,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Io)=>e,getInputValidationProps:(e=Io)=>e,inputRef:{current:null},commit:async()=>{}}});function vr(e=!0){const t=n.useContext(br);if(t.setValidityData===ko&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Wo(28));return t}"production"!==process.env.NODE_ENV&&(br.displayName="FieldRootContext");const wr=n.createContext({disabled:!1});function yr(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}"production"!==process.env.NODE_ENV&&(wr.displayName="FieldItemContext");const xr=n.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:ko,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Cr(){return n.useContext(xr)}"production"!==process.env.NODE_ENV&&(xr.displayName="FormContext");const Sr=n.createContext({controlId:void 0,setControlId:ko,labelId:void 0,setLabelId:ko,messageIds:[],setMessageIds:ko,getDescriptionProps:e=>e});"production"!==process.env.NODE_ENV&&(Sr.displayName="LabelableContext");const Rr=n.createContext(void 0);"production"!==process.env.NODE_ENV&&(Rr.displayName="CheckboxGroupContext");const Er=n.createContext(void 0);"production"!==process.env.NODE_ENV&&(Er.displayName="CheckboxRootContext");const _r=n.forwardRef((function(e,t){const{checked:o,className:r,defaultChecked:i=!1,disabled:l=!1,id:a,indeterminate:s=!1,inputRef:u,name:c,onCheckedChange:d,parent:g=!1,readOnly:p=!1,render:f,required:h=!1,uncheckedValue:b,value:v,nativeButton:w=!1,...y}=e,{clearErrors:x}=Cr(),{disabled:C,name:S,setDirty:R,setFilled:E,setFocused:_,setTouched:k,state:I,validationMode:D,validityData:O,shouldValidateOnChange:N,validation:M}=vr(),F=n.useContext(wr),{labelId:P,controlId:j,setControlId:A,getDescriptionProps:T}=n.useContext(Sr),V=function(e=!0){const t=n.useContext(Rr);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CheckboxGroupContext is missing. CheckboxGroup parts must be placed within <CheckboxGroup>.":Wo(3));return t}(),z=null==V?void 0:V.parent,H=z&&V.allValues,$=C||F.disabled||(null==V?void 0:V.disabled)||l,B=S??c,G=v??B,q=dr(),U=dr();let W=j;H?W=g?U:`${z.id}-${G}`:a&&(W=a);let K={};H&&(g?K=V.parent.getParentProps():G&&(K=V.parent.getChildProps(G)));const X=Fo(d),{checked:Y=o,indeterminate:J=s,onCheckedChange:Z,...Q}=K,ee=null==V?void 0:V.value,te=null==V?void 0:V.setValue,ne=null==V?void 0:V.defaultValue,oe=n.useRef(null),{getButtonProps:re,buttonRef:ie}=mr({disabled:$,native:w}),le=(null==V?void 0:V.validation)??M,[ae,se]=function({controlled:e,default:t,name:o,state:r="value"}){const{current:i}=n.useRef(void 0!==e),[l,a]=n.useState(t),s=i?e:l;if("production"!==process.env.NODE_ENV){n.useEffect((()=>{i!==(void 0!==e)&&console.error([`Base UI: A component is changing the ${i?"":"un"}controlled ${r} state of ${o} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${o} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join("\n"))}),[r,o,e]);const{current:l}=n.useRef(t);n.useEffect((()=>{!i&&JSON.stringify(l)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${o} after being initialized. To suppress this warning opt to use a controlled ${o}.`].join("\n"))}),[JSON.stringify(t)])}return[s,n.useCallback((e=>{i||a(e)}),[])]}({controlled:G&&ee&&!g?ee.includes(G):Y,default:G&&ne&&!g?ne.includes(G):i,name:"Checkbox",state:"checked"});Ao((()=>{if(A!==ko)return A(W),()=>{A(void 0)}}),[W,V,A,g]),function(e){const{enabled:t=!0,value:n,id:o,name:r,controlRef:i,commit:l}=e,{formRef:a}=Cr(),{invalid:s,markedDirtyRef:u,validityData:c,setValidityData:d}=vr(),g=Fo(e.getValue);Ao((()=>{if(!t)return;let e=n;void 0===e&&(e=g()),null===c.initialValue&&null!==e&&d((t=>({...t,initialValue:e})))}),[t,d,n,c.initialValue,g]),Ao((()=>{!t||!o||a.current.fields.set(o,{getValue:g,name:r,controlRef:i,validityData:yr(c,s),validate(e=!0){let t=n;void 0===t&&(t=g()),u.current=!0,e?m.flushSync((()=>l(t))):l(t)}})}),[l,i,t,a,g,o,s,u,r,c,n]),Ao((()=>{const e=a.current.fields;return()=>{o&&e.delete(o)}}),[a,o])}({enabled:!V,id:q,commit:le.commit,value:ae,controlRef:oe,name:B,getValue:()=>ae});const ue=n.useRef(null),ce=To(u,ue,le.inputRef);Ao((()=>{ue.current&&(ue.current.indeterminate=J,ae&&E(!0))}),[ae,J,E]),function(e,t){const o=n.useRef(e),r=Fo(t);Ao((()=>{o.current!==e&&r(o.current)}),[e,r]),Ao((()=>{o.current=e}),[e])}(ae,(()=>{V&&!g||(x(B),E(ae),R(ae!==O.initialValue),N()?le.commit(ae):le.commit(ae,!0))}));const de=Zo({checked:ae,disabled:$,name:g?void 0:B,id:w?void 0:W??void 0,required:h,ref:ce,style:B?$o:Ho,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked,n=function(e,t,n,o){let r=!1,i=!1;const l=o??Io;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){i=!0},get isCanceled(){return r},get isPropagationAllowed(){return i},trigger:n,...l}}("none",e.nativeEvent);if(null==Z||Z(t,n),X(t,n),!n.isCanceled&&(se(t),G&&ee&&te&&!g)){const e=t?[...ee,G]:ee.filter((e=>e!==G));te(e,n)}},onFocus(){var e;null==(e=oe.current)||e.focus()}},void 0!==v?{value:(V?ae&&v:v)||""}:Io,T,V?le.getValidationProps:le.getInputValidationProps),ge=H?!!Y:ae,pe=H&&J||s;n.useEffect((()=>{z&&G&&z.disabledStatesRef.current.set(G,$)}),[z,$,G]);const fe=n.useMemo((()=>({...I,checked:ge,disabled:$,readOnly:p,required:h,indeterminate:pe})),[I,ge,$,p,h,pe]),he=Uo(fe),me=lr("span",e,{state:fe,ref:[ie,oe,t,null==V?void 0:V.registerControlRef],props:[{id:w?W??void 0:q,role:"checkbox","aria-checked":J?"mixed":ae,"aria-readonly":p||void 0,"aria-required":h||void 0,"aria-labelledby":P,"data-parent":g?"":void 0,onFocus(){_(!0)},onBlur(){const e=ue.current;e&&(k(!0),_(!1),"onBlur"===D&&le.commit(V?ee:e.checked))},onClick(e){var t;p||$||(e.preventDefault(),null==(t=ue.current)||t.click())}},T,le.getValidationProps,y,Q,re],stateAttributesMapping:he});return L.jsxs(Er.Provider,{value:fe,children:[me,!ae&&!V&&B&&!g&&void 0!==b&&L.jsx("input",{type:"hidden",name:B,value:b}),L.jsx("input",{...de})]})}));"production"!==process.env.NODE_ENV&&(_r.displayName="CheckboxRoot");const kr=[];const Ir=null;let Dr=globalThis.requestAnimationFrame;const Or=new class{constructor(){t(this,"callbacks",[]),t(this,"callbacksCount",0),t(this,"nextId",1),t(this,"startId",1),t(this,"isScheduled",!1),t(this,"tick",(e=>{var t;this.isScheduled=!1;const n=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let o=0;o<n.length;o+=1)null==(t=n[o])||t.call(n,e)}))}request(e){const t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;const n="test"===process.env.NODE_ENV&&Dr!==requestAnimationFrame&&(Dr=requestAnimationFrame,!0);return(!this.isScheduled||n)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class Nr{constructor(){t(this,"currentId",Ir),t(this,"cancel",(()=>{this.currentId!==Ir&&(Or.cancel(this.currentId),this.currentId=Ir)})),t(this,"disposeEffect",(()=>this.cancel))}static create(){return new Nr}static request(e){return Or.request(e)}static cancel(e){return Or.cancel(e)}request(e){this.cancel(),this.currentId=Or.request((()=>{this.currentId=Ir,e()}))}}function Mr(){const e=Oo(Nr.create).current;return function(e){n.useEffect(e,kr)}(e.disposeEffect),e}let Fr=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const Pr={[Fr.startingStyle]:""},jr={[Fr.endingStyle]:""},Ar={transitionStatus:e=>"starting"===e?Pr:"ending"===e?jr:null};function Tr(e){const{enabled:t=!0,open:o,ref:r,onComplete:i}=e,l=Fo(i),a=function(e,t=!1,n=!0){const o=Mr();return Fo(((r,i=null)=>{function l(){m.flushSync(r)}o.cancel();const a=function(e){return null==e?e:"current"in e?e.current:e}(e);if(null==a)return;const s=a;if("function"!=typeof s.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)r();else{let e=function(){const e=Fr.startingStyle;if(!s.hasAttribute(e))return void o.request(r);const t=new MutationObserver((()=>{s.hasAttribute(e)||(t.disconnect(),r())}));t.observe(s,{attributes:!0,attributeFilter:[e]}),null==i||i.addEventListener("abort",(()=>t.disconnect()),{once:!0})},r=function(){Promise.all(s.getAnimations().map((e=>e.finished))).then((()=>{null!=i&&i.aborted||l()})).catch((()=>{const e=s.getAnimations();if(n){if(null!=i&&i.aborted)return;l()}else e.length>0&&e.some((e=>e.pending||"finished"!==e.playState))&&r()}))};if(t)return void e();o.request(r)}}))}(r,o,!1);n.useEffect((()=>{if(!t)return;const e=new AbortController;return a(l,e.signal),()=>{e.abort()}}),[t,o,l,a])}const Vr=n.forwardRef((function(e,t){const{render:o,className:r,keepMounted:i=!1,...l}=e,a=function(){const e=n.useContext(Er);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.":Wo(14));return e}(),s=a.checked||a.indeterminate,{transitionStatus:u,setMounted:c}=function(e,t=!1,o=!1){const[r,i]=n.useState(e&&t?"idle":void 0),[l,a]=n.useState(e);return e&&!l&&(a(!0),i("starting")),!e&&l&&"ending"!==r&&!o&&i("ending"),!e&&!l&&"ending"===r&&i(void 0),Ao((()=>{if(!e&&l&&"ending"!==r&&o){const e=Nr.request((()=>{i("ending")}));return()=>{Nr.cancel(e)}}}),[e,l,r,o]),Ao((()=>{if(!e||t)return;const n=Nr.request((()=>{i(void 0)}));return()=>{Nr.cancel(n)}}),[t,e]),Ao((()=>{if(!e||!t)return;e&&l&&"idle"!==r&&i("starting");const n=Nr.request((()=>{i("idle")}));return()=>{Nr.cancel(n)}}),[t,e,l,i,r]),n.useMemo((()=>({mounted:l,setMounted:a,transitionStatus:r})),[l,r])}(s),d=n.useRef(null),g=n.useMemo((()=>({...a,transitionStatus:u})),[a,u]);Tr({open:s,ref:d,onComplete(){s||c(!1)}});const p=Uo(a),f=n.useMemo((()=>({...p,...Ar,...qo})),[p]),h=i||s,m=lr("span",e,{enabled:h,ref:[t,d],state:g,stateAttributesMapping:f,props:l});return h?m:null}));"production"!==process.env.NODE_ENV&&(Vr.displayName="CheckboxIndicator");const Lr=({className:e})=>L.jsxs("svg",{viewBox:"0 0 24 24",className:e,fill:"none",children:[L.jsx("title",{children:"Indeterminate icon"}),L.jsx("rect",{x:"5.5",y:"10.5",width:"13",height:"2.75",fill:"currentColor"})]}),zr=e=>L.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",...e,children:[L.jsx("title",{children:"Check icon"}),L.jsx("path",{d:"M4 12l5 5L20 6"})]}),Hr=({dataTest:e,size:t="medium",disabled:n,readOnly:r,indeterminate:i=!1,checked:a,disableRipple:s,hideWrapper:u,className:c,onChange:d,...g})=>{const p=!!u,f=!(s||p||n||r),h=fn(_o.CheckboxWrapper,!p&&_o[`size-${t}`],p&&_o.HideWrapper,r&&_o.ReadOnly,f&&_o.CheckboxHover,c),m=fn("styled-checkbox-inner",_o.Checkbox,_o[`size-${t}`]),b=i?Lr:zr,v=o.useRef(null),w=o.useCallback((e=>{var t;if(e.stopPropagation(),!f)return;const n=document.createElement("span");n.className=_o.CheckboxRipple||"",n.addEventListener("animationend",(()=>n.remove()),{once:!0}),null==(t=v.current)||t.appendChild(n)}),[f]);l((()=>()=>{var e;null==(e=v.current)||e.replaceChildren()}),[]);const y=o.useCallback((e=>{if(r)return;const t={target:{name:g.name,value:g.value,checked:e}};null==d||d(t,e)}),[d,g.name,g.value,r]);return L.jsxs(_r,{className:h,"data-test":e,checked:a,disabled:n,readOnly:r,indeterminate:i,onPointerDown:w,onCheckedChange:y,...g,children:[!p&&f&&L.jsx("span",{ref:v,className:_o.CheckboxRippleContainer}),L.jsx("span",{className:m,children:L.jsx(Vr,{className:_o.Indicator,children:L.jsx(b,{strokeWidth:"small"===t?3:2})})})]})};function $r(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z"})})}const Br=()=>{const[e,t]=u(null),[n,o]=u(!1),r=s((e=>{t(e.currentTarget),o(!0)}),[]);return{open:n,handleClose:s((()=>{o(!1)}),[]),handleOpen:r,anchorEl:e}};function Gr(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"M12 16a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2"})})}const qr=e=>{var t;return L.jsx(x,{...e,classes:{root:pn("px-3 py-2.5",null==(t=e.classes)?void 0:t.root),...e.classes},sx:{"&.Mui-disabled":{pointerEvents:"auto",cursor:"not-allowed","&:hover":{backgroundColor:"transparent !important"}},...e.sx}})},Ur="_asma-core-ui-button_gteum_1",Wr={contained:"_contained_gteum_27",outlined:"_outlined_gteum_141",text:"_text_gteum_255",textGray:"_textGray_gteum_369",textWhite:"_textWhite_gteum_426",large:"_large_gteum_79",small:"_small_gteum_74",medium:"_medium_gteum_69",error:"_error_gteum_84",common:"_common_gteum_27"},Kr=({variant:e="contained",className:t="",size:n="medium",children:o,refLink:r,startIcon:i,endIcon:l,dataTest:a,error:s,...u})=>{const c="large"===n||"medium"===n,d=s?"error":"common";return L.jsxs("button",{...u,className:pn(Ur,Wr[e],Wr[d],Wr[n],t),ref:r,"data-test":a,children:[i,o&&L.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center",gap:c?"8px":"4px",paddingLeft:c?"8px":"4px",paddingRight:c?"8px":"4px"},children:o}),l]})};function Xr(){return Xr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Xr.apply(this,arguments)}function Yr(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}function Jr(e,t){return(Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const Zr=!1;var Qr="production"!==process.env.NODE_ENV?E.oneOfType([E.number,E.shape({enter:E.number,exit:E.number,appear:E.number}).isRequired]):null;"production"!==process.env.NODE_ENV&&E.oneOfType([E.string,E.shape({enter:E.string,exit:E.string,active:E.string}),E.shape({enter:E.string,enterDone:E.string,enterActive:E.string,exit:E.string,exitDone:E.string,exitActive:E.string})]);const ei=o.createContext(null);var ti="unmounted",ni="exited",oi="entering",ri="entered",ii="exiting",li=function(e){function t(t,n){var o;o=e.call(this,t,n)||this;var r,i=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(r=ni,o.appearStatus=oi):r=ri:r=t.unmountOnExit||t.mountOnEnter?ti:ni,o.state={status:r},o.nextCallback=null,o}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Jr(e,t)}(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ti?{status:ni}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==oi&&n!==ri&&(t=oi):(n===oi||n===ri)&&(t=ii)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,o=this.props.timeout;return e=t=n=o,null!=o&&"number"!=typeof o&&(e=o.exit,t=o.enter,n=void 0!==o.appear?o.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===oi){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:b.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ni&&this.setState({status:ti})},n.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,r=this.props.nodeRef?[o]:[b.findDOMNode(this),o],i=r[0],l=r[1],a=this.getTimeouts(),s=o?a.appear:a.enter;!e&&!n||Zr?this.safeSetState({status:ri},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,l),this.safeSetState({status:oi},(function(){t.props.onEntering(i,l),t.onTransitionEnd(s,(function(){t.safeSetState({status:ri},(function(){t.props.onEntered(i,l)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:b.findDOMNode(this);t&&!Zr?(this.props.onExit(o),this.safeSetState({status:ii},(function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:ni},(function(){e.props.onExited(o)}))}))}))):this.safeSetState({status:ni},(function(){e.props.onExited(o)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,t.nextCallback=null,e(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:b.findDOMNode(this),o=null==e&&!this.props.addEndListener;if(n&&!o){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=r[0],l=r[1];this.props.addEndListener(i,l)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===ti)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Yr(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return o.createElement(ei.Provider,{value:null},"function"==typeof n?n(e,r):o.cloneElement(o.Children.only(n),r))},t}(o.Component);function ai(){}li.contextType=ei,li.propTypes="production"!==process.env.NODE_ENV?{nodeRef:E.shape({current:typeof Element>"u"?E.any:function(e,t,n,o,r,i){var l=e[t];return E.instanceOf(l&&"ownerDocument"in l?l.ownerDocument.defaultView.Element:Element)(e,t,n,o,r,i)}}),children:E.oneOfType([E.func.isRequired,E.element.isRequired]).isRequired,in:E.bool,mountOnEnter:E.bool,unmountOnExit:E.bool,appear:E.bool,enter:E.bool,exit:E.bool,timeout:function(e){var t=Qr;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.apply(void 0,[e].concat(o))},addEndListener:E.func,onEnter:E.func,onEntering:E.func,onEntered:E.func,onExit:E.func,onExiting:E.func,onExited:E.func}:{},li.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ai,onEntering:ai,onEntered:ai,onExit:ai,onExiting:ai,onExited:ai},li.UNMOUNTED=ti,li.EXITED=ni,li.ENTERING=oi,li.ENTERED=ri,li.EXITING=ii;const si=li;function ui(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}function ci(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function di(e){if(!ci(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=di(e[n])})),t}function gi(e,t,n={clone:!0}){const o=n.clone?Xr({},e):e;return ci(e)&&ci(t)&&Object.keys(t).forEach((r=>{"__proto__"!==r&&(ci(t[r])&&r in e&&ci(e[r])?o[r]=gi(e[r],t[r],n):n.clone?o[r]=ci(t[r])?di(t[r]):t[r]:o[r]=t[r])})),o}function pi(e,t,n,o,r){const i=e[t],l=r||t;if(null==i||typeof window>"u")return null;let a;const s=i.type;return"function"==typeof s&&!function(e){const{prototype:t={}}=e;return!!t.isReactComponent}(s)&&(a="Did you accidentally use a plain function component for an element instead?"),void 0!==a?new Error(`Invalid ${o} \`${l}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const fi=ui(E.element,pi);fi.isRequired=ui(E.element.isRequired,pi);const hi=fi;function mi(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function bi(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":mi(7));return e.charAt(0).toUpperCase()+e.slice(1)}const vi=e=>e,wi=(()=>{let e=vi;return{configure(t){e=t},generate:t=>e(t),reset(){e=vi}}})(),yi=wi,xi={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function Ci(e,t,n="Mui"){const o=xi[t];return o?`${n}-${o}`:`${yi.generate(e)}-${t}`}const Si=["values","unit","step"],Ri=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Xr({},e,{[t.key]:t.val})),{})};const Ei={borderRadius:4},_i="production"!==process.env.NODE_ENV?E.oneOfType([E.number,E.string,E.object,E.array]):{};function ki(e,t){return t?gi(e,t,{clone:!1}):e}const Ii={xs:0,sm:600,md:900,lg:1200,xl:1536},Di={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ii[e]}px)`};function Oi(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||Di;return t.reduce(((o,r,i)=>(o[e.up(e.keys[i])]=n(t[i]),o)),{})}if("object"==typeof t){const e=o.breakpoints||Di;return Object.keys(t).reduce(((o,r)=>{if(-1!==Object.keys(e.values||Ii).indexOf(r)){o[e.up(r)]=n(t[r],r)}else{const e=r;o[e]=t[e]}return o}),{})}return n(t)}function Ni(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function Mi(e,t,n,o=n){let r;return r="function"==typeof e?e(n):Array.isArray(e)?e[n]||o:Ni(e,n)||o,t&&(r=t(r,o,e)),r}function Fi(e){const{prop:t,cssProperty:n=e.prop,themeKey:o,transform:r}=e,i=e=>{if(null==e[t])return null;const i=e[t],l=Ni(e.theme,o)||{};return Oi(e,i,(e=>{let o=Mi(l,r,e);return e===o&&"string"==typeof e&&(o=Mi(l,r,`${t}${"default"===e?"":bi(e)}`,e)),!1===n?o:{[n]:o}}))};return i.propTypes="production"!==process.env.NODE_ENV?{[t]:_i}:{},i.filterProps=[t],i}const Pi={m:"margin",p:"padding"},ji={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ai={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Ti=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!Ai[e])return[e];e=Ai[e]}const[t,n]=e.split(""),o=Pi[t],r=ji[n]||"";return Array.isArray(r)?r.map((e=>o+e)):[o+r]})),Vi=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Li=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],zi=[...Vi,...Li];function Hi(e,t,n,o){var r;const i=null!=(r=Ni(e,t,!1))?r:n;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function $i(e){return Hi(e,"spacing",8,"spacing")}function Bi(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function Gi(e,t,n,o){if(-1===t.indexOf(n))return null;const r=function(e,t){return n=>e.reduce(((e,o)=>(e[o]=Bi(t,n),e)),{})}(Ti(n),o);return Oi(e,e[n],r)}function qi(e,t){const n=$i(e.theme);return Object.keys(e).map((o=>Gi(e,t,o,n))).reduce(ki,{})}function Ui(e){return qi(e,Vi)}function Wi(e){return qi(e,Li)}function Ki(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,o)=>t[o]?ki(n,t[o](e)):n),{});return n.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function Xi(e){return"number"!=typeof e?e:`${e}px solid`}Ui.propTypes="production"!==process.env.NODE_ENV?Vi.reduce(((e,t)=>(e[t]=_i,e)),{}):{},Ui.filterProps=Vi,Wi.propTypes="production"!==process.env.NODE_ENV?Li.reduce(((e,t)=>(e[t]=_i,e)),{}):{},Wi.filterProps=Li,"production"!==process.env.NODE_ENV&&zi.reduce(((e,t)=>(e[t]=_i,e)),{});const Yi=Fi({prop:"border",themeKey:"borders",transform:Xi}),Ji=Fi({prop:"borderTop",themeKey:"borders",transform:Xi}),Zi=Fi({prop:"borderRight",themeKey:"borders",transform:Xi}),Qi=Fi({prop:"borderBottom",themeKey:"borders",transform:Xi}),el=Fi({prop:"borderLeft",themeKey:"borders",transform:Xi}),tl=Fi({prop:"borderColor",themeKey:"palette"}),nl=Fi({prop:"borderTopColor",themeKey:"palette"}),ol=Fi({prop:"borderRightColor",themeKey:"palette"}),rl=Fi({prop:"borderBottomColor",themeKey:"palette"}),il=Fi({prop:"borderLeftColor",themeKey:"palette"}),ll=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Hi(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:Bi(t,e)});return Oi(e,e.borderRadius,n)}return null};ll.propTypes="production"!==process.env.NODE_ENV?{borderRadius:_i}:{},ll.filterProps=["borderRadius"],Ki(Yi,Ji,Zi,Qi,el,tl,nl,ol,rl,il,ll);const al=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Hi(e.theme,"spacing",8,"gap"),n=e=>({gap:Bi(t,e)});return Oi(e,e.gap,n)}return null};al.propTypes="production"!==process.env.NODE_ENV?{gap:_i}:{},al.filterProps=["gap"];const sl=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Hi(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:Bi(t,e)});return Oi(e,e.columnGap,n)}return null};sl.propTypes="production"!==process.env.NODE_ENV?{columnGap:_i}:{},sl.filterProps=["columnGap"];const ul=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Hi(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:Bi(t,e)});return Oi(e,e.rowGap,n)}return null};ul.propTypes="production"!==process.env.NODE_ENV?{rowGap:_i}:{},ul.filterProps=["rowGap"];function cl(e,t){return"grey"===t?t:e}Ki(al,sl,ul,Fi({prop:"gridColumn"}),Fi({prop:"gridRow"}),Fi({prop:"gridAutoFlow"}),Fi({prop:"gridAutoColumns"}),Fi({prop:"gridAutoRows"}),Fi({prop:"gridTemplateColumns"}),Fi({prop:"gridTemplateRows"}),Fi({prop:"gridTemplateAreas"}),Fi({prop:"gridArea"}));function dl(e){return e<=1&&0!==e?100*e+"%":e}Ki(Fi({prop:"color",themeKey:"palette",transform:cl}),Fi({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:cl}),Fi({prop:"backgroundColor",themeKey:"palette",transform:cl}));const gl=Fi({prop:"width",transform:dl}),pl=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,o,r;return{maxWidth:(null==(n=e.theme)||null==(o=n.breakpoints)||null==(r=o.values)?void 0:r[t])||Ii[t]||dl(t)}};return Oi(e,e.maxWidth,t)}return null};pl.filterProps=["maxWidth"];const fl=Fi({prop:"minWidth",transform:dl}),hl=Fi({prop:"height",transform:dl}),ml=Fi({prop:"maxHeight",transform:dl}),bl=Fi({prop:"minHeight",transform:dl});Fi({prop:"size",cssProperty:"width",transform:dl}),Fi({prop:"size",cssProperty:"height",transform:dl});Ki(gl,pl,fl,hl,ml,bl,Fi({prop:"boxSizing"}));const vl={border:{themeKey:"borders",transform:Xi},borderTop:{themeKey:"borders",transform:Xi},borderRight:{themeKey:"borders",transform:Xi},borderBottom:{themeKey:"borders",transform:Xi},borderLeft:{themeKey:"borders",transform:Xi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ll},color:{themeKey:"palette",transform:cl},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:cl},backgroundColor:{themeKey:"palette",transform:cl},p:{style:Wi},pt:{style:Wi},pr:{style:Wi},pb:{style:Wi},pl:{style:Wi},px:{style:Wi},py:{style:Wi},padding:{style:Wi},paddingTop:{style:Wi},paddingRight:{style:Wi},paddingBottom:{style:Wi},paddingLeft:{style:Wi},paddingX:{style:Wi},paddingY:{style:Wi},paddingInline:{style:Wi},paddingInlineStart:{style:Wi},paddingInlineEnd:{style:Wi},paddingBlock:{style:Wi},paddingBlockStart:{style:Wi},paddingBlockEnd:{style:Wi},m:{style:Ui},mt:{style:Ui},mr:{style:Ui},mb:{style:Ui},ml:{style:Ui},mx:{style:Ui},my:{style:Ui},margin:{style:Ui},marginTop:{style:Ui},marginRight:{style:Ui},marginBottom:{style:Ui},marginLeft:{style:Ui},marginX:{style:Ui},marginY:{style:Ui},marginInline:{style:Ui},marginInlineStart:{style:Ui},marginInlineEnd:{style:Ui},marginBlock:{style:Ui},marginBlockStart:{style:Ui},marginBlockEnd:{style:Ui},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:al},rowGap:{style:ul},columnGap:{style:sl},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:dl},maxWidth:{style:pl},minWidth:{transform:dl},height:{transform:dl},maxHeight:{transform:dl},minHeight:{transform:dl},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},wl=vl;const yl=function(){function e(e,t,n,o){const r={[e]:t,theme:n},i=o[e];if(!i)return{[e]:t};const{cssProperty:l=e,themeKey:a,transform:s,style:u}=i;if(null==t)return null;if("typography"===a&&"inherit"===t)return{[e]:t};const c=Ni(n,a)||{};return u?u(r):Oi(r,t,(t=>{let n=Mi(c,s,t);return t===n&&"string"==typeof t&&(n=Mi(c,s,`${e}${"default"===t?"":bi(t)}`,t)),!1===l?n:{[l]:n}}))}return function t(n){var o;const{sx:r,theme:i={}}=n||{};if(!r)return null;const l=null!=(o=i.unstable_sxConfig)?o:wl;function a(n){let o=n;if("function"==typeof n)o=n(i);else if("object"!=typeof n)return n;if(!o)return null;const r=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}(i.breakpoints),a=Object.keys(r);let s=r;return Object.keys(o).forEach((n=>{const r=function(e,t){return"function"==typeof e?e(t):e}(o[n],i);if(null!=r)if("object"==typeof r)if(l[n])s=ki(s,e(n,r,i,l));else{const e=Oi({theme:i},r,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,r)?s=ki(s,e):s[n]=t({sx:r,theme:i})}else s=ki(s,e(n,r,i,l))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(a,s)}return Array.isArray(r)?r.map(a):a(r)}}();yl.filterProps=["sx"];const xl=yl,Cl=["breakpoints","palette","spacing","shape"];function Sl(e={},...t){const{breakpoints:n={},palette:o={},spacing:r,shape:i={}}=e,l=Yr(e,Cl),a=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,r=Yr(e,Si),i=Ri(t),l=Object.keys(i);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${n})`}function u(e,r){const i=l.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[l[i]]?t[l[i]]:r)-o/100}${n})`}return Xr({keys:l,values:i,up:a,down:s,between:u,only:function(e){return l.indexOf(e)+1<l.length?u(e,l[l.indexOf(e)+1]):a(e)},not:function(e){const t=l.indexOf(e);return 0===t?a(l[1]):t===l.length-1?s(l[t]):u(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},r)}(n),s=function(e=8){if(e.mui)return e;const t=$i({spacing:e}),n=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" "));return n.mui=!0,n}(r);let u=gi({breakpoints:a,direction:"ltr",components:{},palette:Xr({mode:"light"},o),spacing:s,shape:Xr({},Ei,i)},l);return u=t.reduce(((e,t)=>gi(e,t)),u),u.unstable_sxConfig=Xr({},wl,null==l?void 0:l.unstable_sxConfig),u.unstable_sx=function(e){return xl({sx:e,theme:this})},u}function Rl(e=null){const t=n.useContext(_);return!t||function(e){return 0===Object.keys(e).length}(t)?e:t}const El=Sl();function _l(e,t=0,n=1){return"production"!==process.env.NODE_ENV&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Math.min(Math.max(t,e),n)}function kl(e){if(e.type)return e;if("#"===e.charAt(0))return kl(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error("production"!==process.env.NODE_ENV?`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:mi(9,e));let o,r=e.substring(t+1,e.length-1);if("color"===n){if(r=r.split(" "),o=r.shift(),4===r.length&&"/"===r[3].charAt(0)&&(r[3]=r[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error("production"!==process.env.NODE_ENV?`MUI: unsupported \`${o}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:mi(10,o))}else r=r.split(",");return r=r.map((e=>parseFloat(e))),{type:n,values:r,colorSpace:o}}function Il(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return-1!==t.indexOf("rgb")?o=o.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),o=-1!==t.indexOf("color")?`${n} ${o.join(" ")}`:`${o.join(", ")}`,`${t}(${o})`}function Dl(e){let t="hsl"===(e=kl(e)).type||"hsla"===e.type?kl(function(e){e=kl(e);const{values:t}=e,n=t[0],o=t[1]/100,r=t[2]/100,i=o*Math.min(r,1-r),l=(e,t=(e+n/30)%12)=>r-i*Math.max(Math.min(t-3,9-t,1),-1);let a="rgb";const s=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(a+="a",s.push(t[3])),Il({type:a,values:s})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Ol(e,t){const n=Dl(e),o=Dl(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function Nl(e,t){return Xr({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const Ml={black:"#000",white:"#fff"},Fl={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Pl={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},jl={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Al={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Tl={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Vl={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Ll={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},zl=["mode","contrastThreshold","tonalOffset"],Hl={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Ml.white,default:Ml.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},$l={text:{primary:Ml.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Ml.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Bl(e,t,n,o){const r=o.light||o,i=o.dark||1.5*o;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=kl(e),t=_l(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Il(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=kl(e),t=_l(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Il(e)}(e.main,i)))}function Gl(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2}=e,r=Yr(e,zl),i=e.primary||function(e="light"){return"dark"===e?{main:Tl[200],light:Tl[50],dark:Tl[400]}:{main:Tl[700],light:Tl[400],dark:Tl[800]}}(t),l=e.secondary||function(e="light"){return"dark"===e?{main:Pl[200],light:Pl[50],dark:Pl[400]}:{main:Pl[500],light:Pl[300],dark:Pl[700]}}(t),a=e.error||function(e="light"){return"dark"===e?{main:jl[500],light:jl[300],dark:jl[700]}:{main:jl[700],light:jl[400],dark:jl[800]}}(t),s=e.info||function(e="light"){return"dark"===e?{main:Vl[400],light:Vl[300],dark:Vl[700]}:{main:Vl[700],light:Vl[500],dark:Vl[900]}}(t),u=e.success||function(e="light"){return"dark"===e?{main:Ll[400],light:Ll[300],dark:Ll[700]}:{main:Ll[800],light:Ll[500],dark:Ll[900]}}(t),c=e.warning||function(e="light"){return"dark"===e?{main:Al[400],light:Al[300],dark:Al[700]}:{main:"#ed6c02",light:Al[500],dark:Al[900]}}(t);function d(e){const t=Ol(e,$l.text.primary)>=n?$l.text.primary:Hl.text.primary;if("production"!==process.env.NODE_ENV){const n=Ol(e,t);n<3&&console.error([`MUI: The contrast ratio of ${n}:1 for ${t} on ${e}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join("\n"))}return t}const g=({color:e,name:t,mainShade:n=500,lightShade:r=300,darkShade:i=700})=>{if(!(e=Xr({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error("production"!==process.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\nThe color object needs to have a \`main\` property or a \`${n}\` property.`:mi(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error("production"!==process.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\n\`color.main\` should be a string, but \`${JSON.stringify(e.main)}\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from "@mui/material/colors";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });`:mi(12,t?` (${t})`:"",JSON.stringify(e.main)));return Bl(e,"light",r,o),Bl(e,"dark",i,o),e.contrastText||(e.contrastText=d(e.main)),e},p={dark:$l,light:Hl};return"production"!==process.env.NODE_ENV&&(p[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),gi(Xr({common:Xr({},Ml),mode:t,primary:g({color:i,name:"primary"}),secondary:g({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:a,name:"error"}),warning:g({color:c,name:"warning"}),info:g({color:s,name:"info"}),success:g({color:u,name:"success"}),grey:Fl,contrastThreshold:n,getContrastText:d,augmentColor:g,tonalOffset:o},p[t]),r)}const ql=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Ul(e){return Math.round(1e5*e)/1e5}const Wl={textTransform:"uppercase"},Kl='"Roboto", "Helvetica", "Arial", sans-serif';function Xl(e,t){const n="function"==typeof t?t(e):t,{fontFamily:o=Kl,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:l=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,g=Yr(n,ql);"production"!==process.env.NODE_ENV&&("number"!=typeof r&&console.error("MUI: `fontSize` is required to be a number."),"number"!=typeof u&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=r/14,f=d||(e=>e/u*p+"rem"),h=(e,t,n,r,i)=>Xr({fontFamily:o,fontWeight:e,fontSize:f(t),lineHeight:n},o===Kl?{letterSpacing:`${Ul(r/t)}em`}:{},i,c),m={h1:h(i,96,1.167,-1.5),h2:h(i,60,1.2,-.5),h3:h(l,48,1.167,0),h4:h(l,34,1.235,.25),h5:h(l,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(l,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(l,16,1.5,.15),body2:h(l,14,1.43,.15),button:h(a,14,1.75,.4,Wl),caption:h(l,12,1.66,.4),overline:h(l,12,2.66,1,Wl),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return gi(Xr({htmlFontSize:u,pxToRem:f,fontFamily:o,fontSize:r,fontWeightLight:i,fontWeightRegular:l,fontWeightMedium:a,fontWeightBold:s},m),g,{clone:!1})}function Yl(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const Jl=["none",Yl(0,2,1,-1,0,1,1,0,0,1,3,0),Yl(0,3,1,-2,0,2,2,0,0,1,5,0),Yl(0,3,3,-2,0,3,4,0,0,1,8,0),Yl(0,2,4,-1,0,4,5,0,0,1,10,0),Yl(0,3,5,-1,0,5,8,0,0,1,14,0),Yl(0,3,5,-1,0,6,10,0,0,1,18,0),Yl(0,4,5,-2,0,7,10,1,0,2,16,1),Yl(0,5,5,-3,0,8,10,1,0,3,14,2),Yl(0,5,6,-3,0,9,12,1,0,3,16,2),Yl(0,6,6,-3,0,10,14,1,0,4,18,3),Yl(0,6,7,-4,0,11,15,1,0,4,20,3),Yl(0,7,8,-4,0,12,17,2,0,5,22,4),Yl(0,7,8,-4,0,13,19,2,0,5,24,4),Yl(0,7,9,-4,0,14,21,2,0,5,26,4),Yl(0,8,9,-5,0,15,22,2,0,6,28,5),Yl(0,8,10,-5,0,16,24,2,0,6,30,5),Yl(0,8,11,-5,0,17,26,2,0,6,32,5),Yl(0,9,11,-5,0,18,28,2,0,7,34,6),Yl(0,9,12,-6,0,19,29,2,0,7,36,6),Yl(0,10,13,-6,0,20,31,3,0,8,38,7),Yl(0,10,13,-6,0,21,33,3,0,8,40,7),Yl(0,10,14,-6,0,22,35,3,0,8,42,7),Yl(0,11,14,-7,0,23,36,3,0,9,44,8),Yl(0,11,15,-7,0,24,38,3,0,9,46,8)],Zl=["duration","easing","delay"],Ql={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ea={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ta(e){return`${Math.round(e)}ms`}function na(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function oa(e){const t=Xr({},Ql,e.easing),n=Xr({},ea,e.duration);return Xr({getAutoHeightDuration:na,create:(e=["all"],o={})=>{const{duration:r=n.standard,easing:i=t.easeInOut,delay:l=0}=o,a=Yr(o,Zl);if("production"!==process.env.NODE_ENV){const t=e=>"string"==typeof e,n=e=>!isNaN(parseFloat(e));!t(e)&&!Array.isArray(e)&&console.error('MUI: Argument "props" must be a string or Array.'),!n(r)&&!t(r)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${r}.`),t(i)||console.error('MUI: Argument "easing" must be a string.'),!n(l)&&!t(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),0!==Object.keys(a).length&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(a).join(",")}].`)}return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof r?r:ta(r)} ${i} ${"string"==typeof l?l:ta(l)}`)).join(",")}},e,{easing:t,duration:n})}const ra={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},ia=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];const la=function(e={},...t){const{mixins:n={},palette:o={},transitions:r={},typography:i={}}=e,l=Yr(e,ia);if(e.vars)throw new Error("production"!==process.env.NODE_ENV?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":mi(18));const a=Gl(o),s=Sl(e);let u=gi(s,{mixins:Nl(s.breakpoints,n),palette:a,shadows:Jl.slice(),typography:Xl(a,i),transitions:oa(r),zIndex:Xr({},ra)});if(u=gi(u,l),u=t.reduce(((e,t)=>gi(e,t)),u),"production"!==process.env.NODE_ENV){const e=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],t=(t,n)=>{let o;for(o in t){const r=t[o];if(-1!==e.indexOf(o)&&Object.keys(r).length>0){if("production"!==process.env.NODE_ENV){const e=Ci("",o);console.error([`MUI: The \`${n}\` component increases the CSS specificity of the \`${o}\` internal state.`,"You can not override it like this: ",JSON.stringify(t,null,2),"",`Instead, you need to use the '&.${e}' syntax:`,JSON.stringify({root:{[`&.${e}`]:r}},null,2),"","https://mui.com/r/state-classes-guide"].join("\n"))}t[o]={}}}};Object.keys(u.components).forEach((e=>{const n=u.components[e].styleOverrides;n&&0===e.indexOf("Mui")&&t(n,e)}))}return u.unstable_sxConfig=Xr({},wl,null==l?void 0:l.unstable_sxConfig),u.unstable_sx=function(e){return xl({sx:e,theme:this})},u}(),aa=la;function sa(){const e=function(e=El){return Rl(e)}(aa);return"production"!==process.env.NODE_ENV&&n.useDebugValue(e),e.$$material||e}function ua(e,t){var n,o;const{timeout:r,easing:i,style:l={}}=e;return{duration:null!=(n=l.transitionDuration)?n:"number"==typeof r?r:r[t.mode]||0,easing:null!=(o=l.transitionTimingFunction)?o:"object"==typeof i?i[t.mode]:i,delay:l.transitionDelay}}const ca=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],da={entering:{opacity:1},entered:{opacity:1}},ga=n.forwardRef((function(e,t){const o=sa(),r={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:l=!0,children:a,easing:s,in:u,onEnter:c,onEntered:d,onEntering:g,onExit:p,onExited:f,onExiting:h,style:m,timeout:b=r,TransitionComponent:v=si}=e,w=Yr(e,ca),y=n.useRef(null),x=function(...e){return n.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(e,t)}))}),e)}(y,a.ref,t),C=e=>t=>{if(e){const n=y.current;void 0===t?e(n):e(n,t)}},S=C(g),R=C(((e,t)=>{(e=>{e.scrollTop})(e);const n=ua({style:m,timeout:b,easing:s},{mode:"enter"});e.style.webkitTransition=o.transitions.create("opacity",n),e.style.transition=o.transitions.create("opacity",n),c&&c(e,t)})),E=C(d),_=C(h),k=C((e=>{const t=ua({style:m,timeout:b,easing:s},{mode:"exit"});e.style.webkitTransition=o.transitions.create("opacity",t),e.style.transition=o.transitions.create("opacity",t),p&&p(e)})),I=C(f);return L.jsx(v,Xr({appear:l,in:u,nodeRef:y,onEnter:R,onEntered:E,onEntering:S,onExit:k,onExited:I,onExiting:_,addEndListener:e=>{i&&i(y.current,e)},timeout:b},w,{children:(e,t)=>n.cloneElement(a,Xr({style:Xr({opacity:0,visibility:"exited"!==e||u?void 0:"hidden"},da[e],m,a.props.style),ref:x},t))}))}));"production"!==process.env.NODE_ENV&&(ga.propTypes={addEndListener:E.func,appear:E.bool,children:hi.isRequired,easing:E.oneOfType([E.shape({enter:E.string,exit:E.string}),E.string]),in:E.bool,onEnter:E.func,onEntered:E.func,onEntering:E.func,onExit:E.func,onExited:E.func,onExiting:E.func,style:E.object,timeout:E.oneOfType([E.number,E.shape({appear:E.number,enter:E.number,exit:E.number})])});const pa=ga,fa=e=>L.jsx(C,{TransitionComponent:pa,TransitionProps:{timeout:300},arrow:!0,placement:"top",componentsProps:{tooltip:{sx:{borderRadius:"3px !important","& .MuiTooltip-arrow":{color:"#363E4A !important"},color:"white !important",boxShadow:"0px 1px 4px 0px rgba(0, 0, 0, 0.25) !important",display:"flex !important",padding:"4px 8px !important",alignItems:"center !important",fontSize:"12px !important",lineHeight:"16px !important",letterSpacing:" 0.24px !important",bgcolor:"#363E4A !important",wordBreak:"break-word !important"}}},...e});function ha(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16 ",...e,children:L.jsxs("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",children:[L.jsx("circle",{cx:"8",cy:"8",r:"6.25"}),L.jsx("path",{d:"m8 10.75v0m0-6v3.5"})]})})}function ma({tableData:e,actions:t,rowActionsState:n}){var i;const{anchorEl:a,open:s,handleClose:c,handleOpen:d}=Br(),g=t(e.row),p=(null==n?void 0:n(e.row))??{state:"enabled"},f="no"===(null==(i=e.table.options.meta)?void 0:i.locale)?"Ingen handlinger tilgjengelig":"No actions available",h=r((()=>g.every((e=>!("component"in e)&&e.hide))),[g]),m=g.length>0&&!h,b="enabled"===p.state&&!m,v="hidden"!==p.state&&(m||b||"disabled"===p.state),[w,y]=u(!1);if(l((()=>{if(!w)return;const e=window.setTimeout((()=>y(!1)),1600);return()=>window.clearTimeout(e)}),[w]),!v)return L.jsx("div",{className:"flex justify-center items-center w-[40px]"});const x="disabled"===p.state,C=L.jsx(Kr,{dataTest:"",variant:"text",size:"small",disabled:x,onClick:t=>{t.stopPropagation(),t.preventDefault(),!x&&(d(t),e.row.onChangeFocused(!0))},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:L.jsx(Gr,{className:x?"text-delta-300":"text-delta-700",width:20,height:20})});return L.jsx("div",{className:"flex justify-center items-center w-[40px]",children:L.jsxs("div",{className:"flex items-center justify-center",children:["disabled"===p.state?L.jsx(fa,{title:p.tooltipTitle,arrow:!0,placement:p.tooltipPlacement||"top",open:w,onOpen:()=>y(!0),onClose:()=>y(!1),children:L.jsx("span",{className:"cursor-not-allowed",onTouchStart:e=>{e.stopPropagation(),e.preventDefault(),y(!0)},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:C})}):C,"enabled"===p.state&&L.jsx(S,{open:s,anchorEl:a,onClose:()=>{c(),e.row.onChangeFocused(!1)},onClick:()=>{c(),e.row.onChangeFocused(!1)},anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:b?L.jsxs("div",{className:"flex items-center gap-2 p-3 text-delta-700",children:[L.jsx(ha,{width:20,height:20}),L.jsx("span",{children:f})]}):g.map(((t,n)=>{if(k(t)){const r=t.component(e.row,c);return o.isValidElement(r)?L.jsx(o.Fragment,{children:r},n):null}return t.hide?null:L.jsx(fa,{title:null==t?void 0:t.tooltipTitle,arrow:!0,placement:(null==t?void 0:t.tooltipPlacement)||"left",children:L.jsx("span",{children:L.jsx(qr,{className:t.className,disabled:t.disabled,onClick:()=>{var n;null==(n=t.onClick)||n.call(t,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:t.label})})},n)}))})]})})}function ba(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16 9V4h2V2H6v2h2v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1l1-1v-7H19v-2c-1.66 0-3-1.34-3-3"})})}const va={"actions-header":"_actions-header_1bxzk_1","pin-indicator":"_pin-indicator_1bxzk_11","pin-icon":"_pin-icon_1bxzk_21"},wa={"table-action-item":"_table-action-item_kjriw_1","drag-icon":"_drag-icon_kjriw_18","drag-icon--disabled":"_drag-icon--disabled_kjriw_23","drag-icon--enabled":"_drag-icon--enabled_kjriw_28"};function ya(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",...e,children:L.jsx("path",{fill:"currentColor",d:"M14 6.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0m-5 0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0M5.5 8a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8.5 5.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0M10.5 15a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M4 13.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0"})})}const xa={en:{column_reorder:"This column is fixed and can’t be reordered.",column_hidden:"This column is fixed and can’t be hidden.",reset_order:"Reset order"},no:{column_reorder:"Denne kolonnen er fast og kan ikke flyttes.",column_hidden:"Denne kolonnen er fast og kan ikke skjules.",reset_order:"Tilbakestill ordre"}};function Ca({id:e,disabled:t,children:n}){const{attributes:o,listeners:r,setNodeRef:i,transform:l,transition:a}=dn({id:e,disabled:t}),s={transform:ae.Transform.toString(l),transition:a,touchAction:"none"};return L.jsx("div",{ref:i,style:s,...o,...r,children:n})}function Sa({headerData:e,locale:t}){const{anchorEl:n,open:o,handleClose:i,handleOpen:l}=Br(),a=e.table.getAllLeafColumns().some((e=>e.getCanHide()&&!e.getIsVisible()&&!F.includes(e.id))),s=e.table.getAllLeafColumns(),u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r((()=>[...t].filter((e=>null!=e))),[...t])}(function(e,t){return r((()=>({sensor:e,options:t??{}})),[e,t])}(st,{activationConstraint:{distance:8}})),c=function(e="en"){return r((()=>xa[e]??xa.en),[e])}(t),d=s.filter((e=>!F.includes(e.id)&&!!e.columnDef.header));return L.jsxs("div",{className:"flex absolute-center items-center justify-end w-full",children:[L.jsxs("button",{type:"button",className:va["actions-header"],onClick:l,children:[L.jsx(ba,{className:va["pin-icon"]}),a&&L.jsx("div",{className:va["pin-indicator"]})]}),L.jsxs(S,{anchorEl:n,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:o,onClose:i,sx:{"& .MuiPaper-root":{maxHeight:"calc(7 * 36px)",overflowY:"auto",scrollbarWidth:"thin"}},children:[L.jsx(zt,{modifiers:[Kt,Wt],onDragEnd:t=>{var n;const{active:o,over:r}=t;!o||!r||o.id===r.id||null!=(n=s.find((e=>e.id===r.id)))&&n.columnDef.fixedLeft||e.table.setColumnOrder((t=>{const n=function(e){for(var t=-1,n=null==e?0:e.length,o=0,r=[];++t<n;){var i=e[t];i&&(r[o++]=i)}return r}(t).length?t:e.table.getAllLeafColumns().map((e=>e.id)),i=n.indexOf(o.id),l=n.indexOf(r.id);return Xt(n,i,l)}))},collisionDetection:e=>Ee(e).filter((e=>{const t=d.find((t=>t.id===e.id));return!(null!=t&&t.columnDef.fixedLeft)})),sensors:u,children:L.jsx(on,{items:d.map((e=>e.id)),strategy:en,children:d.map((e=>{const t=!!e.columnDef.fixedLeft,n=!1===e.columnDef.enableHiding,o=t||n?L.jsxs("div",{children:[t&&c.column_reorder,n&&c.column_hidden]}):null;return L.jsx(Ca,{id:e.id,disabled:t,children:L.jsx(fa,{title:o,arrow:!0,children:L.jsxs("button",{type:"button",onClick:()=>{n||e.toggleVisibility(!e.getIsVisible())},className:wa["table-action-item"],children:[L.jsx(ya,{width:20,height:20,className:fn(wa["drag-icon"],t?wa["drag-icon--disabled"]:wa["drag-icon--enabled"])}),L.jsx("span",{className:"px-2",children:L.jsx(Hr,{readOnly:n,dataTest:`${e.id}-column-visibility-checkbox`,size:"small",disableRipple:!0,checked:e.getIsVisible(),hideWrapper:!0})}),L.jsx("span",{className:"text-sm text-delta-700 font-roboto",children:e.columnDef.pinnedHeaderText??("string"==typeof e.columnDef.header?e.columnDef.header:e.id)})]})})},e.id)}))})}),L.jsx("div",{className:"pb-2 pl-2",children:L.jsx(Kr,{dataTest:"reset-order-button",variant:"text",size:"small",onClick:()=>e.table.resetColumnOrder(),children:c.reset_order})})]})]})}const Ra=({rowId:e,rowHeight:t,...n})=>{const{attributes:o,listeners:r}=dn({id:e,...n});return L.jsx("div",{...o,...r,style:{height:t||"auto"},children:L.jsx(ya,{width:24,height:24,className:pn(n.disabled?"text-delta-300 cursor-not-allowed":"text-delta-800 cursor-grab")})})};function Ea({info:e,rowHeight:t}){const n=e.row.getCanExpand();return L.jsx("div",{className:"flex w-full items-center justify-center",style:{height:t||"auto"},children:L.jsx(Kr,{dataTest:"expand-text-button",size:"small",variant:"textGray",onClick:()=>{n&&e.row.getToggleExpandedHandler()(),e.row.toggleExpand()},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>{e.preventDefault(),e.stopPropagation()},startIcon:L.jsx($r,{width:20,height:20,style:{rotate:e.row.isExpanded()?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms",cursor:"pointer"}})})})}const _a=e=>{const{columns:t,actions:n,customActionsNode:o,headerPin:r=!0,enableRowSelection:i,expandArrow:l,enableDnd:a,customDndColumnProps:s,rowHeight:u,textExpandArrow:c,customActionsColumnProps:d,rowActionsState:g,locale:p}=e,f=t.some((e=>!0===e.fixedLeft));!t.find((e=>"actions"===e.id))&&(n||o||r)&&t.push(function(e){const{headerPin:t,actions:n,customActionsNode:o,rowHeight:r,customActionsColumnProps:i,rowActionsState:l,locale:a}=e;return{id:O,enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?L.jsx(Sa,{headerData:e,locale:a}):null,cell:e=>n||o?L.jsxs("div",{className:"flex items-center justify-end gap-x-1",style:{height:r||"auto"},children:[o&&L.jsx("div",{children:null==o?void 0:o(e)}),n&&L.jsx(ma,{tableData:e,actions:n,rowActionsState:l})]}):null,size:50,...i}}({headerPin:r,actions:n,customActionsNode:o,rowHeight:u,customActionsColumnProps:d,rowActionsState:g,locale:p})),c&&!t.find((e=>e.id===M))&&t.unshift(function(e,t){return{id:M,minSize:38,maxSize:38,size:38,enableHiding:!1,enableSorting:!1,header:()=>null,cell:e=>L.jsx(Ea,{info:e,rowHeight:t}),fixedLeft:e}}(f,u)),l&&!c&&!t.find((e=>e.id===D))&&t.unshift(function(e,t){return{id:D,minSize:50,maxSize:50,size:50,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const n=e.row.getIsExpanded();return e.row.getCanExpand()?L.jsx("span",{className:"flex w-full outline-none focus:outline-none items-center justify-center",onClick:()=>e.row.getToggleExpandedHandler()(),style:{height:t||"auto"},children:L.jsx($r,{width:24,height:24,style:{rotate:n?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"}})}):null},fixedLeft:e}}(f,u)),a&&!t.find((e=>e.id===N))&&t.unshift(function(e,t){return{enableHiding:!1,enableSorting:!1,header:()=>null,cell:({row:e})=>L.jsx(Ra,{rowId:e.id,rowHeight:t}),...e,id:N}}(s,u)),i&&!t.find((e=>e.id===I))&&t.unshift(function(e,t){return{id:I,minSize:38,maxSize:38,size:38,header:({table:e})=>L.jsx(Hr,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({cell:e})=>L.jsx("div",{style:{height:t||"auto"},className:"flex items-center w-full",children:L.jsx(Hr,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onChange:()=>{e.row.toggleSelected()},onMouseUp:e=>{e.preventDefault(),e.stopPropagation()}})}),fixedLeft:e}}(f,u))},ka={"asma-ui-table-styled-table":"_asma-ui-table-styled-table_1xkq6_1","table-wrapper":"_table-wrapper_1xkq6_16","table-shell":"_table-shell_1xkq6_23","table-wrapper--no-rows":"_table-wrapper--no-rows_1xkq6_29","table-wrapper--proxy":"_table-wrapper--proxy_1xkq6_32","table-wrapper--proxy-bottom":"_table-wrapper--proxy-bottom_1xkq6_33","table-wrapper-fetching":"_table-wrapper-fetching_1xkq6_43","table-scroll":"_table-scroll_1xkq6_46","table-x--fill-height":"_table-x--fill-height_1xkq6_55","table-x":"_table-x_1xkq6_55","table-header--sticky":"_table-header--sticky_1xkq6_70","table-hscroll":"_table-hscroll_1xkq6_75","table-hscroll__content":"_table-hscroll__content_1xkq6_85","no-rows-overlay-container":"_no-rows-overlay-container_1xkq6_88","styled-table":"_styled-table_1xkq6_97",tbody:"_tbody_1xkq6_106","loading-icon":"_loading-icon_1xkq6_111","t-row":"_t-row_1xkq6_118","t-cell":"_t-cell_1xkq6_118","action-cell":"_action-cell_1xkq6_128","fixed-cell":"_fixed-cell_1xkq6_132",expanded_row:"_expanded_row_1xkq6_163",selected:"_selected_1xkq6_181","single-selection":"_single-selection_1xkq6_184",shadowed:"_shadowed_1xkq6_201","is-loading":"_is-loading_1xkq6_227","action-cell-default-background":"_action-cell-default-background_1xkq6_230","fixed-cell-default-background":"_fixed-cell-default-background_1xkq6_233","sortable-column":"_sortable-column_1xkq6_236",resizer:"_resizer_1xkq6_240",isResizing:"_isResizing_1xkq6_252","hide-table-header":"_hide-table-header_1xkq6_264","show-table-header":"_show-table-header_1xkq6_268","table-header":"_table-header_1xkq6_70","hide-header":"_hide-header_1xkq6_293","t-cell__actions":"_t-cell__actions_1xkq6_296","t-cell__fixed":"_t-cell__fixed_1xkq6_309","sort-icon":"_sort-icon_1xkq6_317","table-footer--sticky":"_table-footer--sticky_1xkq6_320","table-footer--inline":"_table-footer--inline_1xkq6_331","table-bottom":"_table-bottom_1xkq6_342","table-bottom--sticky":"_table-bottom--sticky_1xkq6_356"};function Ia(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"m7 14l5-5l5 5z"})})}function Da(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})}const Oa=e=>{const{header:t,enableResizing:n,tableWidth:o}=e;let r=t.getSize();const i=t.headerGroup.headers.reduce(((e,t)=>e+t.getSize()),0),l=t.headerGroup.headers.some((e=>e.id===O)),a=t.headerGroup.headers[t.headerGroup.headers.length-(l?2:1)],s=Number(null==a?void 0:a.getSize());if(!n){if(r&&(r=`${r}px`),a&&a.id===t.id){let e;e=o?Math.floor(o)-i+s:"100%";const n=t.column.columnDef.minSize||0;r="string"==typeof e?e:e>n?`${e}px`:`${n}px`}return{width:r||t.column.columnDef.size,maxWidth:r||t.column.columnDef.maxSize,minWidth:r||t.column.columnDef.minSize}}return{width:r||t.column.columnDef.size,maxWidth:t.column.columnDef.maxSize||r,minWidth:t.column.columnDef.minSize||r}};function Na({styledTableProps:e,header:t,tableCanResize:n=!1,left:o,hasFixedLeftColumn:i,tableWidth:l}){const{actions:s,hideHeader:u=!1,enableResizing:c=!1}=e,d=a(null),{isResizing:g,enableResizingFlag:p,disableResizingFlag:f}=bn(),h=t.column.columnDef.fixedLeft,m=r((()=>t.headerGroup.headers.some((e=>e.id===O))),[t.headerGroup.headers]),b=r((()=>t.headerGroup.headers[t.headerGroup.headers.length-(m?2:1)]),[t.headerGroup.headers,m]);return L.jsx("th",{ref:d,colSpan:t.colSpan,className:pn(ka["t-cell"],u&&ka["hide-header"],t.column.id===O&&ka["t-cell__actions"],i&&!!s&&t.column.id===O&&ka.shadowed,h&&ka["t-cell__fixed"]),style:{...Oa({enableResizing:c,header:t,element:d.current,tableWidth:l}),...h&&{left:o}},children:L.jsxs("div",{className:pn("flex items-center justify-left",u?ka["hide-table-header"]:ka["show-table-header"],t.column.getCanSort()&&ka["sortable-column"],t.column.columnDef.className),onClick:e=>{const n=t.column.getToggleSortingHandler();!g&&n&&n(e),f()},children:[xo(t.column.columnDef.header,t.getContext()),{asc:L.jsx(Ia,{className:ka["sort-icon"]}),desc:L.jsx(Da,{className:ka["sort-icon"]})}[t.column.getIsSorted()]??null,n&&(!!c||t.id!==(null==b?void 0:b.id))&&t.column.getCanResize()&&!F.includes(t.column.id)&&L.jsx("div",{onDoubleClick:()=>t.column.resetSize(),onMouseDown:n=>{n.stopPropagation(),p(),t.getResizeHandler()(n),window.addEventListener("mouseup",(()=>Ma({styledTableProps:e,header:t})))},onTouchStart:n=>{n.stopPropagation(),p(),t.getResizeHandler()(n),window.addEventListener("mouseup",(()=>Ma({styledTableProps:e,header:t})))},className:`${ka.resizer} ${t.column.getIsResizing()?ka.isResizing:""}`})]})},t.id)}function Ma({styledTableProps:e,header:t}){if(e.uniqueKey){const n=e.uniqueKey,o=localStorage.getItem(n);let r={};if(o)try{r=JSON.parse(o)}catch{console.warn("Failed to parse stored dimensions. Resetting."),r={}}r[t.column.id]=t.column.getSize(),localStorage.setItem(n,JSON.stringify(r))}}function Fa({table:e,styledTableProps:t,tableCanResize:n,tableWidth:o}){const{stickyHeader:r=!1,tableHeaderRef:i,tableHeaderStyle:l={}}=t,a=e.getHeaderGroups().some((e=>e.headers.some((e=>!0===e.column.columnDef.fixedLeft)))),s={...l};return L.jsx("thead",{className:fn(ka["table-header"],r&&ka["table-header--sticky"],t.tableHeaderClassName),style:s,ref:i,children:e.getHeaderGroups().map((e=>L.jsx("tr",{children:e.headers.map(((r,i)=>{const l=r.column.columnDef.fixedLeft,s=e.headers.slice(0,i).reduce(((e,t)=>e+(t.column.getSize()||0)),0);return L.jsx(Na,{styledTableProps:t,header:r,tableCanResize:n,left:l?s:0,hasFixedLeftColumn:a,tableWidth:o},r.column.id)}))},e.id)))})}const Pa="_skeleton-row_5gbhw_1",ja=({colSpan:e,rowHeight:t=48})=>L.jsx(h,{children:Array.from({length:10}).map(((n,o)=>L.jsx("tr",{children:L.jsx("td",{colSpan:e,height:t,className:Pa,children:L.jsx(R,{variant:"rectangular",width:"100%",height:40,sx:{backgroundColor:"var(--colors-delta-50)",borderRadius:"8px"}},o)})},o)))});function Aa({styledTableProps:e,row:t,index:n}){const{loading:o,getRowClassName:i,rowHeight:a,onRowClick:s,expandArrow:u,enableDnd:c,disableDndForRow:d,tdClassName:g,customSubRowData:p,renderSubRows:f,defaultExpanded:m,actions:b,textExpandArrow:v,enableMultiRowSelection:w,enableRowSelection:y,singleSelectionRow:x}=e,C=null==d?void 0:d(t),{transform:S,transition:R,setNodeRef:E,isDragging:_}=dn({id:t.original.id,disabled:!c||C}),k={transform:ae.Transform.toString(S),transition:R,opacity:_?.8:1,zIndex:_?1:0,position:"relative"},{isResizing:I,disableResizingFlag:D}=bn();l((()=>{m&&t.getCanExpand()&&!t.getIsExpanded()&&t.toggleExpand()}),[]);const N=e=>{var n,o;t.getCanExpand()&&!u&&t.getToggleExpandedHandler()(),null==(n=document.getElementById(t.id))||n.focus();const r=!("Range"===(null==(o=window.getSelection())?void 0:o.type)||I),i=s instanceof Function;!i&&v&&r?t.toggleExpand():i&&r&&s(e,t),D()},M=t.getVisibleCells().map(((e,t,n)=>({...e,left:n.slice(0,t).reduce(((e,t)=>e+(t.column.getSize()||0)),0)}))),F=r((()=>M.filter((({column:e})=>e.columnDef.fixedLeft))),[M]),P=!w&&!y&&x,j=t.getIsSelected()&&P,A=s instanceof Function;return L.jsxs(h,{children:[L.jsx("tr",{role:"row","aria-selected":t.getIsSelected()||t.isFocused()?"true":"false",tabIndex:t.isFocused()?0:-1,"data-index":n,"data-test":t.id,id:t.id,className:pn(ka["t-row"],o&&ka["is-loading"],null==i?void 0:i(t)),style:{height:a?`${a}px`:"inherit",...c&&k},ref:C?void 0:E,onMouseUp:e=>{e.target.classList.contains("MuiModal-backdrop")||"INPUT"===e.target.nodeName||"BUTTON"===e.target.nodeName||"LI"===e.target.nodeName||e.target.closest("li")||N(e)},onMouseDown:e=>{e.detail>1&&!A&&v&&e.preventDefault()},onKeyDown:e=>{switch(e.key){case"Tab":case"ArrowDown":t.focusNextRow(),e.preventDefault();break;case"ArrowUp":t.focusPrevRow(),e.preventDefault();break;case"Enter":N(e)}},children:M.map(((e,n)=>{var o;const r=e.column.id===O,l=e.column.columnDef.fixedLeft,a=e.id===(null==(o=F.at(-1))?void 0:o.id),s=t.isExpanded(),u=0===n;return L.jsx("td",{className:pn(ka["t-cell"],A&&"cursor-pointer",g,r&&ka["action-cell"],r&&!!b&&F.length&&ka.shadowed,r&&(null!=i&&i(t)?null==i?void 0:i(t):ka["action-cell-default-background"]),l&&ka["fixed-cell"],a&&ka.shadowed,t.getIsSelected()&&ka.selected,l&&(null!=i&&i(t)?null==i?void 0:i(t):ka["fixed-cell-default-background"]),s&&ka.expanded_row,(j||t.isFocused())&&ka["single-selection"]),style:{left:l?e.left:void 0},children:L.jsxs("div",{style:{display:"flex",alignItems:"center",minWidth:u?32:void 0,position:"relative"},children:[u&&j&&L.jsx("span",{style:{display:"inline-flex",alignItems:"center",position:"absolute",left:0,top:"50%",transform:"translateY(-50%)"},children:L.jsx(Ta,{})}),L.jsx("span",{style:{marginLeft:u&&P?30:0,width:"100%"},children:xo(e.column.columnDef.cell,e.getContext())})]})},e.id)}))}),t.getIsExpanded()&&L.jsx(L.Fragment,{children:p&&f&&f({rows:p.get(t.original.id.toString())??[],row:t.original})})]},t.id)}const Ta=()=>L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 2 22 22",style:{color:"var(--colors-gama-500)"},children:L.jsx("path",{fill:"currentColor",d:"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"})});function Va({styledTableProps:e,table:t}){const n=e.hideFooter?t.getExpandedRowModel().rows:t.getRowModel().rows;return L.jsx(L.Fragment,{children:n.map(((t,n)=>L.jsx(Aa,{styledTableProps:e,row:t,index:n},t.id)))})}function La({table:e,styledTableProps:t}){const{columns:n,data:o,loading:r,enableDnd:i,rowHeight:l}=t,a=e.getAllLeafColumns().length||n.length||1;return r&&0===o.length?L.jsx("tbody",{className:ka.tbody,children:L.jsx(ja,{colSpan:a,rowHeight:l})}):0===o.length?null:L.jsx("tbody",{className:ka.tbody,children:i?L.jsx(on,{items:o,strategy:en,children:L.jsx(Va,{table:e,styledTableProps:t})}):L.jsx(Va,{table:e,styledTableProps:t})})}function za(e){return L.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:[L.jsx("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:.5}),L.jsx("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:L.jsx("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]})}const Ha=({fetching:e=!1})=>e?L.jsx("div",{className:"absolute z-10 bg-white/40 left-0 top-0 right-0 bottom-0 flex items-center justify-center ",children:L.jsx(za,{className:ka["loading-icon"],width:50,height:50})}):null;function $a(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"})})}const Ba={"table-pagination":"_table-pagination_pu6mb_1","table-pagination__pages-list":"_table-pagination__pages-list_pu6mb_11","table-pagination__pages-list__page":"_table-pagination__pages-list__page_pu6mb_16","page-selected":"_page-selected_pu6mb_27","check-icon":"_check-icon_pu6mb_30"};function Ga(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z"})})}function qa(e){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:L.jsx("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"})})}const Ua=e=>L.jsxs(x,{classes:{root:"flex gap-x-1"},sx:{padding:"8px","&.Mui-selected":{backgroundColor:"var(--colors-gama-50)","&:hover":{backgroundColor:"var(--colors-gama-50)"}}},...e,children:[L.jsx(qa,{width:24,height:24,color:e.selected?"var(--colors-gama-500)":"transparent",style:{transition:"color 0.2s ease"}}),e.children]}),Wa=[10,20,50];function Ka({table:e,showRowSelect:t,locale:n}){const{anchorEl:o,open:i,handleClose:l,handleOpen:u}=Br(),{anchorEl:c,open:d,handleClose:g,handleOpen:p}=Br(),f=a(null),h="no"===n,m=r((()=>({anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}})),[]),b=s((()=>{var e;const t=ka["asma-ui-table-styled-table"],n=null==(e=f.current)?void 0:e.closest(`.${t}`),o=null==n?void 0:n.querySelector(`.${ka["table-scroll"]}, .${ka["table-wrapper"]}`);o&&o.scrollTo({top:0,behavior:"smooth"})}),[]),v=e.getPageCount()||1,w=e.getState().pagination.pageIndex+1,y=r((()=>Array.from({length:v},((e,t)=>t+1))),[v]),x=e.getState().pagination.pageSize,C=r((()=>{const e=new Set([...Wa,x]);return Array.from(e).sort(((e,t)=>e-t))}),[]),R=s((t=>{e.setPageIndex(t-1),l(),b()}),[e,l,b]),E=s((t=>{e.setPageSize(t),g()}),[e,g]);return L.jsxs("div",{ref:f,className:Ba["table-pagination"],children:[t&&L.jsxs(L.Fragment,{children:[L.jsxs(Kr,{dataTest:"table-rows-count-button",variant:"outlined",size:"large",onClick:p,endIcon:L.jsx($r,{className:(d?"rotate-180":"rotate-0")+" transition-transform duration-300",height:24,width:24}),children:[x," ",h?"rader":"rows"]}),L.jsx(S,{open:d,anchorEl:c,slotProps:{paper:{sx:{width:c?c.clientWidth:void 0,maxHeight:288,overflowY:"auto"}}},onClose:g,anchorOrigin:m.anchorOrigin,transformOrigin:m.transformOrigin,classes:{paper:"border border-solid border-delta-200 py-2"},children:C.map((e=>L.jsx(Ua,{onClick:t=>{t.stopPropagation(),t.preventDefault(),E(e)},selected:x===e,children:L.jsxs("span",{className:"text-delta-700 text-sm font-normal",children:[e," ",h?"rader":"rows"]})},e)))})]}),L.jsx(fa,{title:h?"Nåværende side":"Current Page",children:L.jsx("div",{children:L.jsxs(Kr,{dataTest:"current-page-button",variant:"outlined",size:"large",onClick:u,endIcon:L.jsx($r,{className:(i?"rotate-180":"rotate-0")+" transition-transform duration-300",height:24,width:24}),children:[h?"Side":"Page"," ",w," ",h?"av":"of"," ",v]})})}),L.jsx(S,{open:i,anchorEl:o,slotProps:{paper:{sx:{width:o?o.clientWidth:void 0,maxHeight:288,overflowY:"auto"}}},onClose:l,anchorOrigin:m.anchorOrigin,transformOrigin:m.transformOrigin,classes:{paper:"border border-solid border-delta-200 py-2"},children:y.map((e=>L.jsx(Ua,{onClick:t=>{t.stopPropagation(),t.preventDefault(),R(e)},selected:e===w,children:L.jsxs("span",{className:"text-delta-700 text-sm font-normal",children:[h?"Side":"Page"," ",e]})},e)))}),L.jsx(fa,{title:1===w?"":h?"Forrige side":"Previous Page",children:L.jsx("div",{children:L.jsx(Kr,{dataTest:"prev-page-button",variant:"outlined",onClick:()=>{e.previousPage(),b()},size:"large",disabled:!e.getCanPreviousPage(),startIcon:L.jsx(Ga,{height:24,width:24})})})}),L.jsx(fa,{title:w===v?"":h?"Neste side":"Next Page",children:L.jsx("div",{children:L.jsx(Kr,{dataTest:"next-page-button",variant:"outlined",onClick:()=>{e.nextPage(),b()},size:"large",disabled:!e.getCanNextPage(),startIcon:L.jsx($a,{height:24,width:24})})})})]})}function Xa({table:e,styledTableProps:t,canShowStickyFooter:n}){var o,r,i;if(t.hideFooter||0===t.data.length)return null;const l=t.paginationAlignLeft,a=e.getState().pagination.pageSize,s=e.getFilteredRowModel().rows.length>a,u=null==(o=t.footer)?void 0:o.call(t,e);return null!=u&&!1!==u||s?L.jsxs("div",{className:n?ka["table-footer--sticky"]:ka["table-footer--inline"],style:l&&{justifyContent:"flex-start"}||{},children:[!l&&(null==(r=t.footer)?void 0:r.call(t,e)),s&&L.jsx(Ka,{table:e,showRowSelect:!!t.showRowCountSelect,locale:t.locale||"en"}),l&&(null==(i=t.footer)?void 0:i.call(t,e))]}):null}function Ya({enabled:e,data:t,setData:n,children:o}){const i=r((()=>t.map((e=>e.id))),[t]);return e?L.jsx(zt,{collisionDetection:Ee,modifiers:[Kt,Wt],onDragEnd:t=>{if(!e||!n)return;const{active:o,over:r}=t;!o||!r||o.id===r.id||n((e=>Xt(e,i.indexOf(o.id),i.indexOf(r.id))))},children:o}):L.jsx(L.Fragment,{children:o})}function Ja({enabled:e,className:t,children:n}){return e?L.jsx("div",{className:t,children:n}):L.jsx(L.Fragment,{children:n})}const Za=e=>{const t=r((()=>({...e,rowHeight:e.rowHeight||48})),[e]),{className:n,tableClassName:o,height:l,noRowsOverlay:s,data:c,enableDnd:d,setData:g,loading:p}=t;_a(t);const{table:f}=Eo(t),h=c.length>0,m=h&&!!p,b=!h&&!p,v=vn(),w=!!t.stickyFooter&&!v,y=!w,{tableScrollRef:x,tableXRef:C,hScrollRef:S,hScrollContentRef:R}=function(e){const t=a(null),n=a(null),o=a(null),r=a(null);return i((()=>{if(!e)return;const i=t.current,l=n.current,a=o.current,s=r.current;if(!(i&&l&&a&&s))return;let u=!1;const c=()=>{s.style.width=`${l.scrollWidth}px`},d=()=>{u||(u=!0,a.scrollLeft=l.scrollLeft,u=!1)},g=()=>{u||(u=!0,l.scrollLeft=a.scrollLeft,u=!1)};c(),d(),l.addEventListener("scroll",d,{passive:!0}),a.addEventListener("scroll",g,{passive:!0});const p=new ResizeObserver(c);return p.observe(l),()=>{l.removeEventListener("scroll",d),a.removeEventListener("scroll",g),p.disconnect()}}),[e]),{tableScrollRef:t,tableXRef:n,hScrollRef:o,hScrollContentRef:r}}(y),{ref:E,heightPx:_}=function(){const e=a(null),[t,n]=u(0);return i((()=>{const t=e.current;if(!t)return;let o=0;const r=()=>{const e=Math.round(t.getBoundingClientRect().height);n((t=>t===e?t:e))},i=()=>{cancelAnimationFrame(o),o=requestAnimationFrame(r)};i();const l=new ResizeObserver(i);return l.observe(t),()=>{cancelAnimationFrame(o),l.disconnect()}}),[]),{ref:e,heightPx:t}}(),k=t.rowHeight??48,I=f.getRowModel().rows.length,D=r((()=>k<=0?0:Math.floor(_/k)),[_,k]),O=!w&&I>0&&I<=D,N=fn(w?ka["table-wrapper"]:O||!w&&b?ka["table-wrapper--proxy-bottom"]:ka["table-wrapper--proxy"],m&&ka["table-wrapper-fetching"],b&&ka["table-wrapper--no-rows"],n),M=L.jsxs("table",{className:ka["styled-table"],style:{width:f.getTotalSize(),minWidth:"100%"},children:[L.jsx(Fa,{table:f,styledTableProps:t,tableCanResize:!!t.enableColumnResizing,tableWidth:null}),L.jsx(Ha,{fetching:!!m}),L.jsx(La,{table:f,styledTableProps:t})]});return L.jsx(mn,{children:L.jsx(Ya,{enabled:!!d,data:c,setData:g,children:L.jsxs("div",{ref:E,className:fn(ka["asma-ui-table-styled-table"],o),style:{height:l},children:[L.jsx(Ja,{enabled:w,className:ka["table-shell"],children:L.jsxs("div",{className:N,children:[w?M:L.jsxs("div",{ref:x,className:fn(ka["table-scroll"]),children:[L.jsx("div",{ref:C,className:fn(ka["table-x"],!O&&ka["table-x--fill-height"]),children:M}),L.jsx("div",{ref:S,className:ka["table-hscroll"],children:L.jsx("div",{ref:R,className:ka["table-hscroll__content"]})}),L.jsx("div",{className:fn(ka["table-bottom"],O&&ka["table-bottom--sticky"]),children:L.jsx(Xa,{table:f,styledTableProps:t,canShowStickyFooter:!1})})]}),b&&L.jsx("div",{className:ka["no-rows-overlay-container"],children:s})]})}),w&&L.jsx(Xa,{table:f,styledTableProps:t,canShowStickyFooter:!0})]})})})};export{O as ACTIONS_COLUMN_ID,N as DND_HANDLE_COLUMN_ID,D as EXPAND_COLUMN_ID,F as INTERNAL_COLUMN_IDS,Ra as RowDragHandleCell,I as SELECT_COLUMN_ID,M as SHOW_FULL_TEXT_ID,Za as StyledTable,wn as createColumnHelper,k as isCustomAction};
|